Documentation ¶
Index ¶
- Constants
- func ContractHandler(cfg MultiSignConfig) contractHandler
- func GeneralInvokingTemplate(ccname string, cfg MultiSignConfig) (ret tx.CollectiveTxs)
- func GeneralQueryTemplate(ccname string, cfg MultiSignConfig) (ret tx.CollectiveTxs)
- func MultiSignAddrPreHandler(cfg MultiSignConfig) *addrVerifier
- func QueryHandler(cfg MultiSignConfig) queryHandler
- func UpdateHandler(cfg MultiSignConfig) updateHandler
- type GeneralCall
- func (i *GeneralCall) Contract(threshold int32, addr2weight map[string]int32) ([]byte, error)
- func (i *GeneralCall) Contract_C(threshold int32, addrs [][]byte, weights []int32) ([]byte, error)
- func (i *GeneralCall) Query(addr string) (error, *ccpb.Contract_s)
- func (i *GeneralCall) Query_C(addr []byte) (error, *ccpb.Contract_s)
- func (i *GeneralCall) Update(addr, from, to string) error
- func (i *GeneralCall) Update_C(addr, from, to []byte) error
- type InnerInvokeConfig
- type MultiSignAddressTx
- type MultiSignConfig
- type StandardMultiSignConfig
Constants ¶
View Source
const ( Method_Update = "MULTISIGN.UPDATE" Method_Query = "MULTISIGN.QUERY" Method_Contract = "MULTISIGN.CONTRACT" )
Variables ¶
This section is empty.
Functions ¶
func ContractHandler ¶
func ContractHandler(cfg MultiSignConfig) contractHandler
func GeneralInvokingTemplate ¶
func GeneralInvokingTemplate(ccname string, cfg MultiSignConfig) (ret tx.CollectiveTxs)
func GeneralQueryTemplate ¶
func GeneralQueryTemplate(ccname string, cfg MultiSignConfig) (ret tx.CollectiveTxs)
func MultiSignAddrPreHandler ¶
func MultiSignAddrPreHandler(cfg MultiSignConfig) *addrVerifier
func QueryHandler ¶
func QueryHandler(cfg MultiSignConfig) queryHandler
func UpdateHandler ¶
func UpdateHandler(cfg MultiSignConfig) updateHandler
Types ¶
type GeneralCall ¶
func (*GeneralCall) Contract ¶
func (*GeneralCall) Contract_C ¶
func (*GeneralCall) Query ¶
func (i *GeneralCall) Query(addr string) (error, *ccpb.Contract_s)
func (*GeneralCall) Query_C ¶
func (i *GeneralCall) Query_C(addr []byte) (error, *ccpb.Contract_s)
func (*GeneralCall) Update ¶
func (i *GeneralCall) Update(addr, from, to string) error
func (*GeneralCall) Update_C ¶
func (i *GeneralCall) Update_C(addr, from, to []byte) error
type InnerInvokeConfig ¶
type InnerInvokeConfig struct {
txgen.InnerChaincode
}
func (InnerInvokeConfig) NewTx ¶
func (c InnerInvokeConfig) NewTx(stub shim.ChaincodeStubInterface, nc []byte) MultiSignAddressTx
type MultiSignAddressTx ¶
type MultiSignAddressTx interface { Contract_C(threshold int32, addrs [][]byte, weights []int32) ([]byte, error) // replace the existing multisign addresses specified by 'from' to 'to' // if 'to' is empty, corresponding part is just removed, and notice this // may cause a contract can not be auth. by anyone again Update_C(acc, from, to []byte) error Query_C(acc []byte) (error, *pb.Contract_s) }
type MultiSignConfig ¶
type MultiSignConfig interface {
NewTx(shim.ChaincodeStubInterface, []byte) MultiSignAddressTx
}
type StandardMultiSignConfig ¶
func NewConfig ¶
func NewConfig(tag string) *StandardMultiSignConfig
func (*StandardMultiSignConfig) NewTx ¶
func (cfg *StandardMultiSignConfig) NewTx(stub shim.ChaincodeStubInterface, nonce []byte) MultiSignAddressTx
Source Files ¶
Click to show internal directories.
Click to hide internal directories.