Documentation
¶
Index ¶
- Constants
- func AssignHandler(cfg TokenConfig) txh.TxHandler
- func ExtendInvokingTemplate(cts tx.CollectiveTxs, verifier tx.AddrVerifier) tx.CollectiveTxs
- func GeneralAdminTemplate(ccname string, cfg TokenConfig) (ret tx.CollectiveTxs)
- func GeneralInvokingTemplate(ccname string, cfg TokenConfig) (ret tx.CollectiveTxs)
- func GeneralQueryTemplate(ccname string, cfg TokenConfig) (ret tx.CollectiveTxs)
- func GlobalQueryHandler(cfg TokenConfig) txh.TxHandler
- func InitHandler(cfg TokenConfig) txh.TxHandler
- func TokenQueryHandler(cfg TokenConfig) txh.TxHandler
- func TouchHandler(cfg TokenConfig) txh.TxHandler
- func TransferHandler(cfg TokenConfig) txh.TxHandler
- type GeneralCall
- type InnerInvokeConfig
- type MultiTokenTx
- type StandardTokenConfig
- type TokenConfig
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 ¶
func (*GeneralCall) GetToken ¶
func (i *GeneralCall) GetToken(name string) (generaltoken.TokenTx, error)
type InnerInvokeConfig ¶
type InnerInvokeConfig struct {
txgen.InnerChaincode
}
func (InnerInvokeConfig) NewTx ¶
func (c InnerInvokeConfig) NewTx(stub shim.ChaincodeStubInterface, nc []byte) MultiTokenTx
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 ConfigFromToken(tcf *generaltoken.StandardTokenConfig) *StandardTokenConfig
func NewConfig ¶
func NewConfig(tag string) *StandardTokenConfig
func (*StandardTokenConfig) NewTx ¶
func (cfg *StandardTokenConfig) NewTx(stub shim.ChaincodeStubInterface, nc []byte) MultiTokenTx
type TokenConfig ¶
type TokenConfig interface {
NewTx(shim.ChaincodeStubInterface, []byte) MultiTokenTx
}
Click to show internal directories.
Click to hide internal directories.