Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAddress ¶
Types ¶
type Fee ¶
type Fee struct { // Amount is the fee amount to be paid. Amount []byte `json:"amount"` // Gas is the maximum gas that a transaction can use. Gas uint64 `json:"gas"` }
Fee is the consensus transaction fee the sender wishes to pay for operations which require a fee to be paid to validators.
type Signature ¶
type Signature struct { // PublicKey is the public key that produced the signature. PublicKey []byte `json:"public_key"` // Signature is the actual raw signature. Signature []byte `json:"signature"` }
Signature is a signature, bundled with the signing public key.
type Signed ¶
type Signed struct { // Blob is the signed blob. Blob []byte `json:"untrusted_raw_value"` // Signature is the signature over blob. Signature Signature `json:"signature"` }
Signed is a signed blob.
type SignedTransaction ¶
type SignedTransaction struct {
Signed
}
SignedTransaction is a signed transaction.
func SignTransaction ¶
func SignTransaction(privateKeyHex, chainId string, tx *Transaction) *SignedTransaction
type Transaction ¶
type Transaction struct { // Nonce is a nonce to prevent replay. Nonce uint64 `json:"nonce"` // Fee is an optional fee that the sender commits to pay to execute this // transaction. Fee *Fee `json:"fee,omitempty"` // Method is the method that should be called. Method string `json:"method"` // Body is the method call body. Body interface{} `json:"body,omitempty"` }
Transaction is an unsigned consensus transaction.
func NewTransferTx ¶
Click to show internal directories.
Click to hide internal directories.