nonce

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

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 GeneralTokenNonceKey(txnonce []byte, from []byte, to []byte) pb.NonceKey

func NonceAddHandler

func NonceAddHandler(cfg NonceConfig) nonceAddHandler

func NonceQueryHandler

func NonceQueryHandler(cfg NonceConfig) nonceQueryHandler

Types

type GeneralCall

type GeneralCall struct {
	txgen.TxCaller
}

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

type NonceConfig

type NonceConfig interface {
	NewTx(shim.ChaincodeStubInterface, []byte) TokenNonceTx
}

type StandardNonceConfig

type StandardNonceConfig struct {
	Root string
	*runtime.Config
}

func NewConfig

func NewConfig(tag string) *StandardNonceConfig

func (*StandardNonceConfig) NewTx

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL