addrspace

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Method_Reg   = "ADDRSPACE.REG"
	Method_Query = "ADDRSPACE.QUERY"
)

Variables

This section is empty.

Functions

func CallCache

func CallCache() *generalCallCache

func DummyImplCfg

func DummyImplCfg() dummyImplCfg

func DummyTemplate

func DummyTemplate(ccname string) (ret tx.CollectiveTxs)

func GeneralTemplate

func GeneralTemplate(ccname string, cfg AddrSpaceConfig) (ret tx.CollectiveTxs)

func InnerinvokeImpl

func InnerinvokeImpl(cc txgen.InnerChaincode) *innerInvokeConfig

func NewConfig

func NewConfig(tag string) *addressSpaceConfig

func QueryHandler

func QueryHandler(cfg AddrSpaceConfig) txh.TxHandler

func RegHandler

func RegHandler(cfg AddrSpaceConfig) txh.TxHandler

func Verifier

func Verifier(cfg AddrSpaceConfig) *externalAddrVerifier

Types

type AddrSpaceConfig

type AddrSpaceConfig interface {
	NewTx(shim.ChaincodeStubInterface, []byte) AddressSpace
}

type AddressSpace

type AddressSpace interface {
	RegisterCC() error
	QueryPrefix() ([]byte, error)
	NormalizeAddress([]byte) ([]byte, error)
}

type GeneralCall

type GeneralCall struct {
	txgen.TxCaller
}

func (GeneralCall) CacheImpl

func (i GeneralCall) CacheImpl(c *generalCallCache) cachedGeneralCall

func (GeneralCall) NormalizeAddress

func (i GeneralCall) NormalizeAddress(addr []byte) ([]byte, error)

notice: there is not really a NormalizeAddress call (we just do a query and use the returning result)

func (GeneralCall) QueryPrefix

func (i GeneralCall) QueryPrefix() ([]byte, error)

func (GeneralCall) RegisterCC

func (i GeneralCall) RegisterCC() error

Jump to

Keyboard shortcuts

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