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'] ]}],
Click to show internal directories.
Click to hide internal directories.