sdk

package
v0.10.5 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: MIT Imports: 4 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventDelivery

type EventDelivery interface {

	// Events returns peer chaincode events stream
	// blockRange:
	// * [] -> api.SeekNewest()},
	// *  [0] - from oldest block to maxBlock
	// * [{blockFrom}] - from specified block to maxBlock
	// * [-{blockFrom}] - specified blocks back from channel height
	// * [0,0] from oldest block to current channel height
	// * [-{blockFrom},0] - specified blocks back from channel height to current channel height
	// * [-{blockFrom}, -{blockTo}} -{blockFrom} blocks back from channel height to -{blockTo} block from channel height
	// * [-{blockFrom}, {blockTo}} -{blockFrom} blocks back from channel height to block {blockTo}
	Events(
		ctx context.Context,
		channelName string,
		ccName string,
		identity msp.SigningIdentity,
		blockRange ...int64,
	) (events chan interface {
		Event() *peer.ChaincodeEvent
		Block() uint64
		TxTimestamp() *timestamp.Timestamp
	}, closer func() error, err error)
}

type Invoker added in v0.10.1

type Invoker interface {
	CurrentIdentity() msp.SigningIdentity

	Query(
		ctx context.Context,
		chanName string,
		ccName string,
		args [][]byte,
		identity msp.SigningIdentity,
		transient map[string][]byte,
	) (*peer.Response, error)

	Invoke(
		ctx context.Context,
		chanName string,
		ccName string,
		args [][]byte,
		identity msp.SigningIdentity,
		transient map[string][]byte,
		txWaiterType string,
	) (res *peer.Response, chaincodeTx string, err error)
}

type SDK

type SDK interface {
	Invoker
	EventDelivery
}

SDK interface for deal with Hyperledger Fabric SDK client from github.com/s7techlab/hlf-sdk-go implements this interface

Jump to

Keyboard shortcuts

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