Documentation
¶
Index ¶
Constants ¶
View Source
const ( // MethodPriorityNormal is the normal method priority. MethodPriorityNormal = 0 // MethodPriorityCritical is the priority for methods critical to the protocol operation. MethodPriorityCritical = 255 )
View Source
const MethodSeparator = "."
MethodSeparator is the separator used to separate backend name from method name.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fee ¶
type Fee struct {
// Amount is the fee amount to be paid.
Amount quantity.Quantity `json:"amount"`
// Gas is the maximum gas that a transaction can use.
Gas Gas `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 MethodMetadata ¶
type MethodMetadata struct {
Priority MethodPriority
}
MethodMetadata is the method metadata.
type PrettyTransaction ¶
type PrettyTransaction struct {
Nonce uint64 `json:"nonce"`
Fee *Fee `json:"fee,omitempty"`
Method MethodName `json:"method"`
Body interface{} `json:"body,omitempty"`
}
PrettyTransaction is used for pretty-printing transactions so that the actual content is displayed instead of the binary blob.
It should only be used for pretty printing.
type Proof ¶
type Proof struct {
// Height is the block height at which the transaction was published.
Height int64 `json:"height"`
// RawProof is the actual raw proof.
RawProof []byte `json:"raw_proof"`
}
Proof is a proof of transaction inclusion in a block.
type SignedTransaction ¶
SignedTransaction is a signed consensus transaction.
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 MethodName `json:"method"`
// Body is the method call body.
Body cbor.RawMessage `json:"body,omitempty"`
}
Transaction is an unsigned consensus transaction.
Click to show internal directories.
Click to hide internal directories.