neartransaction

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Transaction

type Transaction struct {
	SignerID   string
	PublicKey  []byte
	Nonce      uint64
	ReceiverID string
	BlockHash  []byte
	Signature  []byte
	Actions    []Transfer
	RawTxHex   string
	RawTxByte  []byte
}

Transaction struct

func NewTransaction

func NewTransaction(from, to, refBlockHash, transferAmount string, nonce uint64) (*Transaction, error)

func (*Transaction) Serialize

func (tx *Transaction) Serialize() (string, string, error)

序列化 https://github.com/near/near-api-js/blob/79a336931943384708a644d9ca4ce327a1daec07/src/transaction.ts#L148 [Transaction, { kind: 'struct', fields: [ ['signerId', 'string'], ['publicKey', PublicKey], ['nonce', 'u64'], ['receiverId', 'string'], ['blockHash', [32]], ['actions', [Action]] ]}], [Transfer, { kind: 'struct', fields: [ ['deposit', 'u128'] ]}],

type Transfer

type Transfer struct {
	Deposit *big.Int
}

Jump to

Keyboard shortcuts

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