tx

package
v0.0.0-...-8850773 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResultDecoder

type ResultDecoder func([][]byte) ([]any, error)

type Signer

type Signer interface {
	SignTransaction(tx *core.Transaction) ([]byte, error)
}

type Transaction

type Transaction struct {
	*core.Transaction

	Confirmed bool
	Txid      []byte
	Info      *core.TransactionInfo
	// contains filtered or unexported fields
}

func GetFromID

func GetFromID(ctx context.Context, client api.WalletClient, ID string, checkConfirm bool) (*Transaction, error)

func New

func New(client api.WalletClient, tx *core.Transaction) *Transaction

func NewWithDecoder

func NewWithDecoder(client api.WalletClient, tx *core.Transaction, resultDecoder ResultDecoder) *Transaction

func NewWithInfo

func NewWithInfo(client api.WalletClient, tx *core.Transaction, info *core.TransactionInfo) *Transaction

func (*Transaction) CheckConfirmation

func (tx *Transaction) CheckConfirmation() error

func (*Transaction) GetResult

func (tx *Transaction) GetResult() ([]any, error)

func (*Transaction) Send

func (tx *Transaction) Send(ctx context.Context) error

func (*Transaction) Sign

func (tx *Transaction) Sign(signer Signer) error

func (*Transaction) SignAndSend

func (tx *Transaction) SignAndSend(ctx context.Context, signer Signer) error

func (*Transaction) WaitConfirmation

func (tx *Transaction) WaitConfirmation() error

Jump to

Keyboard shortcuts

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