neo

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2021 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddressParam

func AddressParam(addr string) request.Param

func ArrayParams

func ArrayParams(params []request.Param) request.Param

func ArrayTypeParam

func ArrayTypeParam(hexStr string) request.Param

func FunctionName

func FunctionName(name string) request.Param

func IntegerTypeParam

func IntegerTypeParam(v int) request.Param

func StackToSwapInfo

func StackToSwapInfo(stack []smartcontract.Parameter) (map[string]interface{}, error)

func StringTypeParam

func StringTypeParam(v string) request.Param

Types

type LockedInfo added in v1.0.1

type LockedInfo struct {
	FromAddress    string `json:"fromAddress"`
	ToAddress      string `json:"toAddress"`
	Txid           string `json:"txid"`
	UserEthAddress string `json:"userEthAddress"`
	Amount         int64  `json:"amount"`
	Timestamp      int64  `json:"timestamp"`
	BlockHeight    int64  `json:"blockHeight"`
	Typ            int    `json:"typ"`
}

func (*LockedInfo) String added in v1.0.1

func (l *LockedInfo) String() string

type Transaction

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

func NewTransaction

func NewTransaction(urls []string, contractAddr string, signer *signer.SignerClient) (*Transaction, error)

func (*Transaction) Client

func (n *Transaction) Client() *client.Client

func (*Transaction) ClientEndpoint added in v1.0.1

func (n *Transaction) ClientEndpoint() string

func (*Transaction) CreateLockTransaction added in v1.0.1

func (n *Transaction) CreateLockTransaction(nep5SenderAddr, erc20ReceiverAddr, wif string, amount int) (string, error)

create lock tx

func (*Transaction) CreateUnLockTransaction added in v1.0.1

func (n *Transaction) CreateUnLockTransaction(ethTxId, nep5ReceiverAddr, erc20SenderAddr string, amount int, signerAddress string) (string, error)

create unlock tx

func (*Transaction) GetTransactionHeight

func (n *Transaction) GetTransactionHeight(txHash string) (uint32, error)

func (*Transaction) QueryLockedInfo added in v1.0.1

func (n *Transaction) QueryLockedInfo(hash string) (*LockedInfo, error)

func (*Transaction) QuerySwapData

func (n *Transaction) QuerySwapData(h string) (map[string]interface{}, error)

func (*Transaction) SendLockTransaction added in v1.0.1

func (n *Transaction) SendLockTransaction(txHash, signature, publicKey, address string) (string, error)

send lock tx

func (*Transaction) SignData

func (n *Transaction) SignData(address string, str string) (*proto.SignResponse, error)

func (*Transaction) SignTx

func (n *Transaction) SignTx(tx *transaction.Transaction, address string) error

func (*Transaction) SwapEnd added in v1.0.1

func (n *Transaction) SwapEnd(hash string)

func (*Transaction) TxVerifyAndConfirmed

func (n *Transaction) TxVerifyAndConfirmed(txHash string, interval int) error

func (*Transaction) UnsignedLockTransaction added in v1.0.1

func (n *Transaction) UnsignedLockTransaction(nep5SenderAddr, erc20ReceiverAddr string, amount int) (string, string, error)

get unsigned lock tx

func (*Transaction) ValidateAddress

func (n *Transaction) ValidateAddress(addr string) error

func (*Transaction) WaitTxVerifyAndConfirmed added in v1.0.1

func (n *Transaction) WaitTxVerifyAndConfirmed(txHash string, interval int) (uint32, error)

type TransactionParam

type TransactionParam struct {
	Params        []request.Param
	SignerAddress string
	Sysfee        util.Fixed8
	Netfee        util.Fixed8
	ROrigin       string
	RHash         string
	FuncName      string
	EmitIndex     string
}

Jump to

Keyboard shortcuts

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