api

package
v0.0.0-...-667e438 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildEmbeddedCC

func BuildEmbeddedCC(spec *protos.ChaincodeSpec) (*protos.ChaincodeDeploymentSpec, error)

"build" a given chaincode code (the origin buildSysCC) no chaincodeid.path is specified in the input ChaincodeSpec, API help to search the corresponding registry and build correspoinding path

func LaunchEmbeddedCC

func LaunchEmbeddedCC(ctx context.Context, name, chain string, args [][]byte, ledger ...*ledger.Ledger) error

func LaunchEmbeddedCCFull

func LaunchEmbeddedCCFull(ctx context.Context, name, chain string,
	args [][]byte, ledgers ...*ledger.Ledger) (error, *protos.ChaincodeDeploymentSpec, []ledger.TxExecStates)

We MUST take care of the output state: it maybe not replay able because of the execution timestamp is variant and the result is NEVER combinded with any transaction

func RegisterAndLaunchSysCC

func RegisterAndLaunchSysCC(ctx context.Context, syscc *SystemChaincode, ledger ...*ledger.Ledger) error

RegisterSysCC registers the given system chaincode with the peer

func RegisterECC

func RegisterECC(ecc *EmbeddedChaincode) error

Types

type EmbeddedChaincode

type EmbeddedChaincode struct {

	//Unique name of the embedded chaincode
	Name string

	// Chaincode is the actual chaincode object
	Chaincode shim.Chaincode
}

type SystemChaincode

type SystemChaincode struct {
	// Enabled a convenient switch to enable/disable system chaincode without
	// having to remove entry
	Enabled bool

	// if syscc is enforced, register process throw error when this code is not
	// allowed on whitelist
	Enforced bool

	//Unique name of the system chaincode
	Name string

	//Path to the system chaincode; currently not used
	Path string

	//InitArgs initialization arguments to startup the system chaincode,
	//notice this should include the function name as the first arg
	InitArgs [][]byte

	// Chaincode is the actual chaincode object
	Chaincode shim.Chaincode

	Deployed *protos.ChaincodeDeploymentSpec
}

SystemChaincode defines the metadata needed to initialize system chaincode when the fabric comes up. SystemChaincodes are installed by adding an entry in importsysccs.go

Jump to

Keyboard shortcuts

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