Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMissingData = errors.New("missing data for tx") ErrUnserializable = errors.New("unserializable tx") ErrWrongTxType = errors.New("wrong tx type") ErrInvalidAmount = errors.New("invalid amount") ErrInvalidPubkey = errors.New("invalid pubkey") ErrUnmatchSigner = errors.New("unmatch signers") ErrInvalidSignature = errors.New("invalid signatures") ErrInvalidFee = errors.New("invalid fees") ErrNotEnoughFund = errors.New("not enough fund") )
Functions ¶
Types ¶
type Amount ¶
Amount is an easily serializable representation of coin. Nodes can create coin from the Amount object received over the network
func (Amount) IsValid ¶
func (a Amount) IsValid(list *balance.CurrencyList) bool
IsValid checks the validity of the currency and the amount string in the account object, which may be received over a network.
type Context ¶
type Context struct {
Router Router
Header *abci.Header
Accounts accounts.Wallet
Balances *balance.Store
Domains *ons.DomainStore
Currencies *balance.CurrencyList
Validators *identity.ValidatorStore
Logger *log.Logger
}
func NewContext ¶
type RawTx ¶ added in v0.10.8
type Router ¶
Router interface supplies functionality to add a handler function and Handle a request.
type SignedTx ¶ added in v0.10.8
func (*SignedTx) SignedBytes ¶ added in v0.10.8
type Tx ¶
type Tx interface {
//it should be able to validate a tx by itself, non-valid tx will be reject by the node directly
//without going to node process
Validate(ctx *Context, signedTx SignedTx) (bool, error)
//check tx on the first node who receives it, if process check failed, the tx will not be broadcast
//could store a version of checked value in storage, but not implemented now
ProcessCheck(ctx *Context, tx RawTx) (bool, Response)
//deliver tx on the chain by changing the storage values, which should only be committed at Application
//commit stage
ProcessDeliver(ctx *Context, tx RawTx) (bool, Response)
//process the charge of fees
ProcessFee(ctx *Context, fee Fee) (bool, Response)
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.