multitoken

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Method_Init        = "M" + generaltoken.Method_Init
	Method_Transfer    = "M" + generaltoken.Method_Transfer
	Method_Assign      = "M" + generaltoken.Method_Assign
	Method_TouchAddr   = "M" + generaltoken.Method_TouchAddr
	Method_QueryToken  = "M" + generaltoken.Method_QueryToken
	Method_QueryGlobal = "M" + generaltoken.Method_QueryGlobal
)

Variables

This section is empty.

Functions

func AssignHandler

func AssignHandler(cfg TokenConfig) txh.TxHandler

func ExtendInvokingTemplate

func ExtendInvokingTemplate(cts tx.CollectiveTxs, verifier tx.AddrVerifier) tx.CollectiveTxs

func GeneralAdminTemplate

func GeneralAdminTemplate(ccname string, cfg TokenConfig) (ret tx.CollectiveTxs)

admintemplate has no verifier

func GeneralInvokingTemplate

func GeneralInvokingTemplate(ccname string, cfg TokenConfig) (ret tx.CollectiveTxs)

func GeneralQueryTemplate

func GeneralQueryTemplate(ccname string, cfg TokenConfig) (ret tx.CollectiveTxs)

func GlobalQueryHandler

func GlobalQueryHandler(cfg TokenConfig) txh.TxHandler

func InitHandler

func InitHandler(cfg TokenConfig) txh.TxHandler

func TokenQueryHandler

func TokenQueryHandler(cfg TokenConfig) txh.TxHandler

func TouchHandler

func TouchHandler(cfg TokenConfig) txh.TxHandler

func TransferHandler

func TransferHandler(cfg TokenConfig) txh.TxHandler

Types

type GeneralCall

type GeneralCall struct {
	txgen.TxCaller
}

func (*GeneralCall) GetToken

func (i *GeneralCall) GetToken(name string) (generaltoken.TokenTx, error)

type InnerInvokeConfig

type InnerInvokeConfig struct {
	txgen.InnerChaincode
}

func (InnerInvokeConfig) NewTx

type MultiTokenTx

type MultiTokenTx interface {
	GetToken(string) (generaltoken.TokenTx, error)
}

Currying: except for createToken, most of the tx in multitoken formed by two continuous calling: GetToken and then one of the methods in the returned TokenTx

type StandardTokenConfig

type StandardTokenConfig struct {
	Root string
	*runtime.Config
	NonceCfg nonce.NonceConfig
}

func ConfigFromToken

func NewConfig

func NewConfig(tag string) *StandardTokenConfig

func (*StandardTokenConfig) NewTx

type TokenConfig

type TokenConfig interface {
	NewTx(shim.ChaincodeStubInterface, []byte) MultiTokenTx
}

Jump to

Keyboard shortcuts

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