sdk

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: Apache-2.0 Imports: 4 Imported by: 3 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

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