Versions in this module Expand all Collapse all v0 v0.0.1 Nov 6, 2020 Changes in this version + var SYSTEM_ISSUER = crypto.Address("KING_OF_TOKEN") + func MarshalBinaryBare(o interface{}) ([]byte, error) + func MarshalJSON(o interface{}) ([]byte, error) + func UnmarshalBinaryBare(bz []byte, ptr interface{}) error + func UnmarshalJSON(bz []byte, ptr interface{}) error + type IssuePayload struct + Issuer crypto.Address + To crypto.Address + Value int + func NewIssuePayload(issuer, to crypto.Address, value int) *IssuePayload + func (pld *IssuePayload) GetSignBytes() []byte + func (pld *IssuePayload) GetSigner() crypto.Address + func (pld *IssuePayload) GetType() string + type Payload interface + GetSignBytes func() []byte + GetSigner func() crypto.Address + GetType func() string + type TokenApp struct + Accounts map[string]int + func NewTokenApp() *TokenApp + func (app *TokenApp) CheckTx(raw []byte) (rsp types.ResponseCheckTx) + func (app *TokenApp) DeliverTx(raw []byte) (rsp types.ResponseDeliverTx) + func (app *TokenApp) Dump() + func (app *TokenApp) Query(req types.RequestQuery) (rsp types.ResponseQuery) + type TransferPayload struct + From crypto.Address + To crypto.Address + Value int + func NewTransferPayload(from, to crypto.Address, value int) *TransferPayload + func (pld *TransferPayload) GetSignBytes() []byte + func (pld *TransferPayload) GetSigner() crypto.Address + func (pld *TransferPayload) GetType() string + type Tx struct + Payload Payload + PubKey crypto.PubKey + Sequence int64 + Signature []byte + func NewTx(payload Payload) *Tx + func (tx *Tx) Sign(priv crypto.PrivKey) error + func (tx *Tx) Verify() bool + type Wallet struct + Keys map[string]crypto.PrivKey + func LoadWallet(wfn string) *Wallet + func NewWallet() *Wallet + func (wallet *Wallet) GenPrivKey(label string) crypto.PrivKey + func (wallet *Wallet) GetAddress(label string) crypto.Address + func (wallet *Wallet) GetPrivKey(label string) crypto.PrivKey + func (wallet *Wallet) GetPubKey(label string) crypto.PubKey + func (wallet *Wallet) Save(wfn string)