core

package
v0.0.0-...-1370914 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockToHashHeight

func BlockToHashHeight(block *api.AccountBlock) (*ledger.HashHeight, error)

func Derivation

func Derivation(mnemonic string, index uint32, err error) (*derivation.Key, *types.Address, error)

func DerivationKey

func DerivationKey(mnemonic string, addr types.Address) (key *derivation.Key, index uint32, e error)

func DervationFromEntropystore

func DervationFromEntropystore(filename, pwd string) (*derivation.Key, *types.Address, error)

func EntropystoreToMnemonic

func EntropystoreToMnemonic(filename, pwd string) (string, error)

func GetCli

func GetCli(url string) client.RpcClient

func RandomEntropystore

func RandomEntropystore(dir, pwd string) (string, error)

func RandomMnemonic

func RandomMnemonic() (string, error)

Types

type Receiver

type Receiver struct {
	*Sender
}

func NewReceiver

func NewReceiver(rpc client.RpcClient, self types.Address, key *derivation.Key) (*Receiver, error)

func NewReceiverFromSender

func NewReceiverFromSender(sender *Sender) (*Receiver, error)

func (Receiver) BatchReceive

func (s Receiver) BatchReceive(logs []client.ResponseTxParams, prev *ledger.HashHeight) ([]*ledger.HashHeight, error)

func (Receiver) Receive

func (s Receiver) Receive(params client.ResponseTxParams, prev *ledger.HashHeight) (*ledger.HashHeight, error)

type Sender

type Sender struct {
	Rpc  client.RpcClient
	Cli  client.Client
	Self types.Address
	// contains filtered or unexported fields
}

func NewSender

func NewSender(rpc client.RpcClient, self types.Address, key *derivation.Key) (*Sender, error)

func NewSenderFromCli

func NewSenderFromCli(c *cli.Context) (*Sender, error)

func NewSenderWithHexPrivateKey

func NewSenderWithHexPrivateKey(rpc client.RpcClient, self types.Address, key string) (*Sender, error)

func (Sender) BatchSend

func (s Sender) BatchSend(logs []*SimpleRequestTx, prev *core.HashHeight) ([]*core.HashHeight, error)

func (Sender) Send

func (s Sender) Send(params client.RequestTxParams, prev *core.HashHeight) (*core.HashHeight, error)

type SimpleRequestTx

type SimpleRequestTx struct {
	ToAddr  types.Address
	Amount  *big.Int
	TokenId types.TokenTypeId
	Data    []byte
}

Jump to

Keyboard shortcuts

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