multisign

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: 14 Imported by: 0

Documentation

Index

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

type GeneralCall struct {
	txgen.TxCaller
}

func (*GeneralCall) Contract

func (i *GeneralCall) Contract(threshold int32, addr2weight map[string]int32) ([]byte, error)

func (*GeneralCall) Contract_C

func (i *GeneralCall) Contract_C(threshold int32, addrs [][]byte, weights []int32) ([]byte, error)

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

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

type StandardMultiSignConfig struct {
	Root string
	*runtime.Config
}

func NewConfig

func NewConfig(tag string) *StandardMultiSignConfig

func (*StandardMultiSignConfig) NewTx

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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