wallet

package
v0.0.0-...-f94ef0f Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WalletPathFlag = cli.StringFlag{
		Name:  "wallet, w",
		Usage: "Target location of the wallet file ('-' to read from stdin).",
	}

	FromAddrFlag = flags.AddressFlag{
		Name:  "from",
		Usage: "Address to send an asset from",
	}
)

Functions

func MakeEthTx

func MakeEthTx(ctx *cli.Context, facc *wallet.Account, to *common.Address, value *big.Int, data []byte) error

func MakeNeoTx

func MakeNeoTx(ctx *cli.Context, wall *wallet.Wallet, from common.Address, to common.Address, value *big.Int, data []byte) error

func NewCommands

func NewCommands() []cli.Command

NewCommands returns 'wallet' command.

func ReadWallet

func ReadWallet(path string) (*wallet.Wallet, error)

func Sign

func Sign(wall *wallet.Wallet, context *SignContext) error

Types

type SignContext

type SignContext struct {
	ChainID    uint64
	Tx         transaction.NeoTx
	Parameters map[string][]byte
	M          int
}

func (*SignContext) Check

func (sc *SignContext) Check() error

func (*SignContext) CreateTx

func (sc *SignContext) CreateTx() (*transaction.Transaction, error)

func (SignContext) IsComplete

func (sc SignContext) IsComplete() bool

func (SignContext) MarshalJSON

func (sc SignContext) MarshalJSON() ([]byte, error)

func (*SignContext) UnmarshalJSON

func (sc *SignContext) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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