Documentation ¶
Index ¶
- Constants
- func AssignHandler(cfg TokenConfig) txh.TxHandler
- func ExtendInvokingTemplate(cts tx.CollectiveTxs, verifier tx.AddrVerifier) tx.CollectiveTxs
- func ExtendedQueryTemplate(ccname string, cfg LocalConfig) (ret 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 NewTokenTxImpl(rt *runtime.ChaincodeRuntime, nc []byte, ncTx nonce.TokenNonceTx) *baseTokenTx
- func TokenQueryHandler(cfg TokenConfig) txh.TxHandler
- func TouchHandler(TokenConfig) txh.TxHandler
- func TransferHandler(cfg TokenConfig) txh.TxHandler
- func TransferHandler2(cfg TokenConfig) txh.TxHandler
- type GeneralCall
- func (i *GeneralCall) Account(addr []byte) (error, *pb.AccountData_s)
- func (i *GeneralCall) Assign(to []byte, amount *big.Int) (pb.NonceKey, error)
- func (i *GeneralCall) Global() (error, *pb.TokenGlobalData_s)
- func (i *GeneralCall) Init(amount *big.Int) error
- func (i *GeneralCall) TouchAddr(to []byte) error
- func (i *GeneralCall) Transfer(from []byte, to []byte, amount *big.Int) (pb.NonceKey, error)
- func (i *GeneralCall) Transfer2(from []byte, to []byte, amount *big.Int) (pb.NonceKey, error)
- type InnerInvokeConfig
- type LocalConfig
- type StandardTokenConfig
- type TokenConfig
- type TokenTx
- type TokenTxExt
Constants ¶
View Source
const ( Method_Init = "TOKEN.INIT" Method_Transfer = "TOKEN.TRANSFER" Method_Transfer2 = "TOKEN.TRANSFER2" Method_Assign = "TOKEN.ASSIGN" Method_TouchAddr = "TOKEN.TOUCHADDR" Method_QueryToken = "TOKEN.BALANCEQUERY" Method_QueryGlobal = "TOKEN.GLOBALQUERY" )
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 ExtendedQueryTemplate ¶
func ExtendedQueryTemplate(ccname string, cfg LocalConfig) (ret 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 NewTokenTxImpl ¶
func NewTokenTxImpl(rt *runtime.ChaincodeRuntime, nc []byte, ncTx nonce.TokenNonceTx) *baseTokenTx
func TokenQueryHandler ¶
func TokenQueryHandler(cfg TokenConfig) txh.TxHandler
func TouchHandler ¶
func TouchHandler(TokenConfig) txh.TxHandler
func TransferHandler ¶
func TransferHandler(cfg TokenConfig) txh.TxHandler
func TransferHandler2 ¶
func TransferHandler2(cfg TokenConfig) txh.TxHandler
Types ¶
type GeneralCall ¶
func (*GeneralCall) Account ¶
func (i *GeneralCall) Account(addr []byte) (error, *pb.AccountData_s)
func (*GeneralCall) Global ¶
func (i *GeneralCall) Global() (error, *pb.TokenGlobalData_s)
func (*GeneralCall) TouchAddr ¶
func (i *GeneralCall) TouchAddr(to []byte) error
type InnerInvokeConfig ¶
type InnerInvokeConfig struct {
txgen.InnerChaincode
}
func (InnerInvokeConfig) NewTx ¶
func (c InnerInvokeConfig) NewTx(stub shim.ChaincodeStubInterface, nc []byte) TokenTx
type LocalConfig ¶
type LocalConfig interface { TokenConfig Nonce() nonce.NonceConfig }
the local config must provide both a executable interface and the sub-config (corresponding its sub interface) for local handler building
type StandardTokenConfig ¶
type StandardTokenConfig struct { Root string *runtime.Config NonceCfg nonce.NonceConfig }
func NewConfig ¶
func NewConfig(tag string) *StandardTokenConfig
func (*StandardTokenConfig) NewTx ¶
func (cfg *StandardTokenConfig) NewTx(stub shim.ChaincodeStubInterface, nc []byte) TokenTx
type TokenConfig ¶
type TokenConfig interface {
NewTx(shim.ChaincodeStubInterface, []byte) TokenTx
}
type TokenTx ¶
type TokenTx interface { Init(amount *big.Int) error Transfer(from []byte, to []byte, amount *big.Int) (pb.NonceKey, error) Transfer2(from []byte, to []byte, amount *big.Int) (pb.NonceKey, error) Assign(to []byte, amount *big.Int) (pb.NonceKey, error) Account(addr []byte) (error, *pb.AccountData_s) Global() (error, *pb.TokenGlobalData_s) //this is only used for inner call to register their address, have //no effect on the status of module //--------------- DEPRECATED, see addrspace module-------------- TouchAddr([]byte) error }
type TokenTxExt ¶
type TokenTxExt interface { TokenTx nonce.TokenNonceTx }
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package ccprotos is a generated protocol buffer package.
|
Package ccprotos is a generated protocol buffer package. |
Click to show internal directories.
Click to hide internal directories.