remote_sign

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SignMethodEvm  string = "wallet_eTHSignMsg"
	SignMethodTron string = "wallet_tronSignMsg"
	SignMethodCkb  string = "wallet_cKBSignMsg"
)

Variables

This section is empty.

Functions

func NewTransactionFromHexString

func NewTransactionFromHexString(raw string) (*core.Transaction, error)

func SignTxFor712 added in v1.2.0

func SignTxFor712(url, addr, data string, evmChainId int64, mmJson *common.MMJsonObj) (string, error)

func SignTxForCKB added in v1.2.0

func SignTxForCKB(url, addr, data string) ([]byte, error)

func SignTxForCKBHandle added in v1.2.0

func SignTxForCKBHandle(url, addr string) sign.HandleSignCkbMessage

func SignTxForDOGE added in v1.2.0

func SignTxForDOGE(url, addr string, tx *wire.MsgTx) (*wire.MsgTx, error)

func SignTxForEVM added in v1.2.0

func SignTxForEVM(url, addr string, evmChainId int64, tx *types.Transaction) (*types.Transaction, error)

func SignTxForTRON added in v1.2.0

func SignTxForTRON(url, addr string, data []byte) ([]byte, error)

func TransactionToHexString

func TransactionToHexString(tx *core.Transaction) (string, error)

Types

type RemoteSignClient

type RemoteSignClient struct {
	// contains filtered or unexported fields
}

func NewRemoteSignClient

func NewRemoteSignClient(ctx context.Context, apiUrl string) (*RemoteSignClient, error)

func (*RemoteSignClient) Client

func (r *RemoteSignClient) Client() rpc.Client

func (*RemoteSignClient) SignCkbMessage

func (r *RemoteSignClient) SignCkbMessage(ckbSignerAddress, message string) ([]byte, error)

func (*RemoteSignClient) SignEvmTx

func (r *RemoteSignClient) SignEvmTx(method, address string, tx *types.Transaction) (*types.Transaction, error)

func (*RemoteSignClient) SignTrxTx

type ReqRemoteSign added in v1.2.0

type ReqRemoteSign struct {
	SignType   SignType          `json:"sign_type"`
	Address    string            `json:"address"`
	EvmChainID int64             `json:"evm_chain_id"`
	Data       string            `json:"data"`
	MMJson     *common.MMJsonObj `json:"mm_json"`
}

type RespRemoteSign added in v1.2.0

type RespRemoteSign struct {
	Data string `json:"data"`
}

func RemoteSign added in v1.2.0

func RemoteSign(url string, req ReqRemoteSign) (*http_api.ApiResp, *RespRemoteSign, error)

type SignType added in v1.2.0

type SignType int
const (
	SignTypeTx     SignType = 0
	SignTypeMsg    SignType = 1
	SignTypeETH712 SignType = 2
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL