chaincode

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrOrdererNotDefined     = errors.New(`orderer not defined`)
	ErrNotEnoughEndorsements = errors.New(`not enough endorsements`)
)

Functions

func CreateEnvelope added in v0.7.4

func CreateEnvelope(
	proposal *fabricPeer.SignedProposal, peerResponses []*fabricPeer.ProposalResponse, identity msp.SigningIdentity) (
	*common.Envelope, error)

func NewInvokeBuilder

func NewInvokeBuilder(ccCore *Core, fn string) api.ChaincodeInvokeBuilder

func NewQueryBuilder

func NewQueryBuilder(ccCore *Core, identity msp.SigningIdentity, fn string, args ...string) api.ChaincodeQueryBuilder

func WithTxWaiter added in v0.5.0

func WithTxWaiter(builder TxWaitBuilder) api.DoOption

WithTxWaiter - add option for set custom tx waiter

Types

type Core

type Core struct {
	// contains filtered or unexported fields
}

func NewCore

func NewCore(
	mspId,
	ccName,
	channelName string,
	endorsingMSPs []string,
	peerPool api.PeerPool,
	orderer api.Orderer,
	identity msp.SigningIdentity,
) *Core

func (*Core) GetPeers added in v0.7.0

func (c *Core) GetPeers() []api.Peer

func (*Core) Invoke

func (c *Core) Invoke(fn string) api.ChaincodeInvokeBuilder

func (*Core) Query

func (c *Core) Query(fn string, args ...string) api.ChaincodeQueryBuilder

func (*Core) Subscribe

func (c *Core) Subscribe(ctx context.Context) (api.EventCCSubscription, error)

type QueryBuilder

type QueryBuilder struct {
	// contains filtered or unexported fields
}

func (*QueryBuilder) AsBytes

func (q *QueryBuilder) AsBytes(ctx context.Context) ([]byte, error)

AsBytes TODO: think about interface in one style with Invoke

func (*QueryBuilder) AsJSON

func (q *QueryBuilder) AsJSON(ctx context.Context, out interface{}) error

func (*QueryBuilder) AsProposalResponse

func (q *QueryBuilder) AsProposalResponse(ctx context.Context) (*fabricPeer.ProposalResponse, error)

func (*QueryBuilder) Do added in v0.7.0

Do makes invoke with built arguments

func (*QueryBuilder) Transient

func (q *QueryBuilder) Transient(args api.TransArgs) api.ChaincodeQueryBuilder

func (*QueryBuilder) WithArguments added in v0.7.0

func (q *QueryBuilder) WithArguments(argBytes [][]byte) api.ChaincodeQueryBuilder

func (*QueryBuilder) WithIdentity

func (q *QueryBuilder) WithIdentity(identity msp.SigningIdentity) api.ChaincodeQueryBuilder

type TruncatableString

type TruncatableString struct {
	// The shortened string. For example, if the original string was 500 bytes long and
	// the limit of the string was 128 bytes, then this value contains the first 128
	// bytes of the 500-byte string. Note that truncation always happens on a
	// character boundary, to ensure that a truncated string is still valid UTF-8.
	// Because it may contain multi-byte characters, the size of the truncated string
	// may be less than the truncation limit.
	Value string

	// The number of bytes removed from the original string. If this
	// value is 0, then the string was not shortened.
	TruncatedByteCount int
}

TruncatableString a string that might be shortened to a specified length.

func (TruncatableString) String

func (t TruncatableString) String() string

type TxWaitBuilder added in v0.5.0

type TxWaitBuilder func(cfg *api.DoOptions) (api.TxWaiter, error)

TxWaitBuilder function signature for pluggable setter on Do options

Directories

Path Synopsis
Package system is a reverse proxy.
Package system is a reverse proxy.

Jump to

Keyboard shortcuts

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