fabric

package
v0.0.0-...-8fcaae5 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SDK

type SDK struct {
	*gateway.Wallet
	*gateway.Network
	// contains filtered or unexported fields
}

SDK defines Fabric SDK client.

func New

func New() *SDK

New constructs new instance of an SDK client.

func (*SDK) EvaluateTransaction

func (sdk *SDK) EvaluateTransaction(chaincode, tx string, arguments string) (string, error)

EvaluateTransaction will evaluate a transaction `tx` with given `arguments` passed as JSON on specified `chaincode`.

func (*SDK) GetIdentities

func (sdk *SDK) GetIdentities() (string, error)

GetIdentities returns list of signing identities stored in the gateway.Wallet.

func (*SDK) IdentityExists

func (sdk *SDK) IdentityExists(username string) bool

IdentityExists determines whether the gateway.Wallet holds signing credentials for given `username`.

func (*SDK) InitWallet

func (sdk *SDK) InitWallet(path string) error

InitWallet creates or recovers existing wallet from file system.

func (*SDK) PutX509Identity

func (sdk *SDK) PutX509Identity(username, org, cert, key string) error

PutX509Identity adds signing identity with given `cert` and `key` pair to the gateway.Wallet.

func (*SDK) RemoveIdentity

func (sdk *SDK) RemoveIdentity(username string) error

RemoveIdentity removes signing identity from the gateway.Wallet.

func (*SDK) SetupConnectionToChannel

func (sdk *SDK) SetupConnectionToChannel(configRaw, channel, username string) error

SetupConnectionToChannel preforms initialization of Fabric gateway.Gateway client with given `config`, and makes connection attempt to gateway.Network on specified `channel`.

func (*SDK) SubmitTransaction

func (sdk *SDK) SubmitTransaction(chaincode, tx string, arguments string) (string, error)

SubmitTransaction will submit a transaction `tx` to the ledger with given `arguments` passed as JSON on specified `chaincode`.

Jump to

Keyboard shortcuts

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