initialize

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNilStub is returned when the stub is nil.
	ErrNilStub = errors.New("stub can't be nil")
	// ErrDecodeSerializedIdentity is returned when the SerializedIdentity.IdBytes can't be decoded.
	ErrDecodeSerializedIdentity = errors.New("block after decode SerializedIdentity.IdBytes can't be nil or empty")
)

Functions

func InitChaincode

func InitChaincode(stub shim.ChaincodeStubInterface) error

InitChaincode initializes the chaincode with provided arguments. It validates the admin creator and stores necessary data (atomyzeSKI, robotSKI, initArgs) in the state.

Types

type Config

type Config struct {
	// AtomyzeSKI is 0 index from init args
	AtomyzeSKI []byte
	// RobotSKI is 1 index from init args
	RobotSKI []byte
	// Args is subarray from init args from 2 index to last index arg
	Args []string
}

Config is global chaincode parameters from Chaincode Init arguments

func LoadInitArgs

func LoadInitArgs(stub shim.ChaincodeStubInterface) (Config, error)

LoadInitArgs retrieves the initialization arguments from the state.

Jump to

Keyboard shortcuts

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