api

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2020 License: Apache-2.0 Imports: 2 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChaincodeCall

type ChaincodeCall struct {
	ChaincodeName string
	Collections   []string
}

ChaincodeCall ...

type PeerConfig

type PeerConfig interface {
	PeerID() string
	MSPID() string
	PeerAddress() string
	MSPConfigPath() string
	TLSCertPath() string
}

PeerConfig contains peer configuration

type Request

type Request struct {
	// ChaincodeID identifies the chaincode to invoke
	ChaincodeID string

	// Args to pass to the chaincode
	Args [][]byte

	// TransientData map (optional)
	TransientData map[string][]byte

	// Targets for the transaction (optional)
	Targets []fab.Peer

	// InvocationChain contains meta-data that's used by some Selection Service implementations
	// to choose endorsers that satisfy the endorsement policies of all chaincodes involved
	// in an invocation chain (i.e. for CC-to-CC invocations).
	// Each chaincode may also be associated with a set of private data collection names
	// which are used by some Selection Services (e.g. Fabric Selection) to exclude endorsers
	// that do NOT have read access to the collections.
	// The invoked chaincode (specified by ChaincodeID) may optionally be added to the invocation
	// chain along with any collections, otherwise it may be omitted.
	InvocationChain []*ChaincodeCall
}

Request contains the data required for endorsments

type Service

type Service interface {
	// Endorse collects endorsements according to chaincode policy
	Endorse(req *Request) (resp *channel.Response, err error)

	// EndorseAndCommit collects endorsements (according to chaincode policy) and sends the endorsements to the Orderer
	EndorseAndCommit(req *Request) (resp *channel.Response, err error)
}

Service provides functions to collect endorsements and send endorsements to the Orderer

Jump to

Keyboard shortcuts

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