Documentation
¶
Index ¶
- Constants
- Variables
- func GeneralTemplate(ccname string, cfg NonceConfig) (ret tx.CollectiveTxs)
- func GeneralTokenNonceKey(txnonce []byte, from []byte, to []byte) pb.NonceKey
- func NonceAddHandler(cfg NonceConfig) nonceAddHandler
- func NonceQueryHandler(cfg NonceConfig) nonceQueryHandler
- type GeneralCall
- type InnerConfig
- type NonceConfig
- type StandardNonceConfig
- type TokenDuplicatedError
- type TokenNonceTx
Constants ¶
View Source
const ( Method_Add = "NONCE.ADD" Method_Query = "NONCE.QUERY" )
Variables ¶
View Source
var NonceKeyFromString = pb.NonceKeyFromString
Functions ¶
func GeneralTemplate ¶
func GeneralTemplate(ccname string, cfg NonceConfig) (ret tx.CollectiveTxs)
func GeneralTokenNonceKey ¶
func NonceAddHandler ¶
func NonceAddHandler(cfg NonceConfig) nonceAddHandler
func NonceQueryHandler ¶
func NonceQueryHandler(cfg NonceConfig) nonceQueryHandler
Types ¶
type GeneralCall ¶
func (*GeneralCall) Add ¶
func (i *GeneralCall) Add(key []byte, amount *big.Int, from *pb.FuncRecord, to *pb.FuncRecord) error
func (*GeneralCall) Nonce ¶
func (i *GeneralCall) Nonce(key []byte) (error, *pb.NonceData_s)
type InnerConfig ¶
type InnerConfig struct {
txgen.InnerChaincode
}
func (InnerConfig) NewTx ¶
func (c InnerConfig) NewTx(stub shim.ChaincodeStubInterface, nc []byte) TokenNonceTx
type NonceConfig ¶
type NonceConfig interface {
NewTx(shim.ChaincodeStubInterface, []byte) TokenNonceTx
}
type StandardNonceConfig ¶
func NewConfig ¶
func NewConfig(tag string) *StandardNonceConfig
func (*StandardNonceConfig) NewTx ¶
func (cfg *StandardNonceConfig) NewTx(stub shim.ChaincodeStubInterface, _ []byte) TokenNonceTx
type TokenDuplicatedError ¶
type TokenDuplicatedError []byte
func (TokenDuplicatedError) Error ¶
func (TokenDuplicatedError) Error() string
type TokenNonceTx ¶
type TokenNonceTx interface { Nonce(key []byte) (error, *pb.NonceData_s) Add([]byte, *big.Int, *pb.FuncRecord, *pb.FuncRecord) error }
Click to show internal directories.
Click to hide internal directories.