fabric

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FabconnectConfigKey is a sub-key in the config to contain all the ethconnect specific config,
	FabconnectConfigKey = "fabconnect"

	// FabconnectConfigDefaultChannel is the default Fabric channel to use if no "ledger" is specified in requests
	FabconnectConfigDefaultChannel = "channel"
	// FabconnectConfigSigner is the signer identity used to subscribe to FireFly chaincode events
	FabconnectConfigSigner = "signer"
	// FabconnectConfigTopic is the websocket listen topic that the node should register on, which is important if there are multiple
	// nodes using a single fabconnect
	FabconnectConfigTopic = "topic"
	// FabconnectConfigBatchSize is the batch size to configure on event streams, when auto-defining them
	FabconnectConfigBatchSize = "batchSize"
	// FabconnectConfigBatchTimeout is the batch timeout to configure on event streams, when auto-defining them
	FabconnectConfigBatchTimeout = "batchTimeout"
	// FabconnectPrefixShort is used in the query string in requests to ethconnect
	FabconnectPrefixShort = "prefixShort"
	// FabconnectPrefixLong is used in HTTP headers in requests to ethconnect
	FabconnectPrefixLong = "prefixLong"
	// FabconnectConfigChaincodeDeprecated is the Fabric Firefly chaincode deployed to the Firefly channels
	FabconnectConfigChaincodeDeprecated = "chaincode"
	// FabconnectBackgroundStart is used to not fail the fabric plugin on init and retry to start it in the background
	FabconnectBackgroundStart = "backgroundStart.enabled"
	// FabconnectBackgroundStartInitialDelay is delay between restarts in the case where we retry to restart in the fabric plugin
	FabconnectBackgroundStartInitialDelay = "backgroundStart.initialDelay"
	// FabconnectBackgroundStartMaxDelay is the max delay between restarts in the case where we retry to restart in the fabric plugin
	FabconnectBackgroundStartMaxDelay = "backgroundStart.maxDelay"
	// FabconnectBackgroundStartFactor is to set the factor by which the delay increases when retrying
	FabconnectBackgroundStartFactor = "backgroundStart.factor"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ContractOptions added in v1.3.0

type ContractOptions struct {
	CustomPinSupport bool `json:"customPinSupport"`
}

type Fabric

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

func (*Fabric) AddContractListener added in v0.14.0

func (f *Fabric) AddContractListener(ctx context.Context, listener *core.ContractListener) error

func (*Fabric) AddFireflySubscription added in v1.1.0

func (f *Fabric) AddFireflySubscription(ctx context.Context, namespace *core.Namespace, contract *blockchain.MultipartyContract) (string, error)

func (*Fabric) Capabilities

func (f *Fabric) Capabilities() *blockchain.Capabilities

func (*Fabric) DeleteContractListener added in v0.14.0

func (f *Fabric) DeleteContractListener(ctx context.Context, subscription *core.ContractListener, okNotFound bool) error

func (*Fabric) DeployContract added in v1.1.2

func (f *Fabric) DeployContract(ctx context.Context, nsOpID, signingKey string, definition, contract *fftypes.JSONAny, input []interface{}, options map[string]interface{}) (submissionRejected bool, err error)

func (*Fabric) GenerateErrorSignature added in v1.1.3

func (f *Fabric) GenerateErrorSignature(ctx context.Context, event *fftypes.FFIErrorDefinition) string

func (*Fabric) GenerateEventSignature added in v1.0.0

func (f *Fabric) GenerateEventSignature(ctx context.Context, event *fftypes.FFIEventDefinition) string

func (*Fabric) GenerateFFI added in v0.13.1

func (f *Fabric) GenerateFFI(ctx context.Context, generationRequest *fftypes.FFIGenerationRequest) (*fftypes.FFI, error)

func (*Fabric) GetAndConvertDeprecatedContractConfig added in v1.1.0

func (f *Fabric) GetAndConvertDeprecatedContractConfig(ctx context.Context) (location *fftypes.JSONAny, fromBlock string, err error)

func (*Fabric) GetContractListenerStatus added in v1.1.0

func (f *Fabric) GetContractListenerStatus(ctx context.Context, namespace, subID string, okNotFound bool) (bool, interface{}, error)

func (*Fabric) GetFFIParamValidator added in v0.12.0

func (f *Fabric) GetFFIParamValidator(ctx context.Context) (fftypes.FFIParamValidator, error)

func (*Fabric) GetNetworkVersion added in v1.1.0

func (f *Fabric) GetNetworkVersion(ctx context.Context, location *fftypes.JSONAny) (version int, err error)

func (*Fabric) GetTransactionStatus added in v1.1.3

func (f *Fabric) GetTransactionStatus(ctx context.Context, operation *core.Operation) (interface{}, error)

func (*Fabric) Init

func (f *Fabric) Init(ctx context.Context, cancelCtx context.CancelFunc, conf config.Section, metrics metrics.Manager, cacheManager cache.Manager) (err error)

func (*Fabric) InitConfig added in v1.1.0

func (f *Fabric) InitConfig(config config.Section)

func (*Fabric) InvokeContract added in v0.12.0

func (f *Fabric) InvokeContract(ctx context.Context, nsOpID string, signingKey string, location *fftypes.JSONAny, parsedMethod interface{}, input map[string]interface{}, options map[string]interface{}, batch *blockchain.BatchPin) (bool, error)

func (*Fabric) Name

func (f *Fabric) Name() string

func (*Fabric) NormalizeContractLocation added in v1.0.0

func (f *Fabric) NormalizeContractLocation(ctx context.Context, ntype blockchain.NormalizeType, location *fftypes.JSONAny) (result *fftypes.JSONAny, err error)

func (*Fabric) ParseInterface added in v1.3.0

func (f *Fabric) ParseInterface(ctx context.Context, method *fftypes.FFIMethod, errors []*fftypes.FFIError) (interface{}, error)

func (*Fabric) QueryContract added in v0.12.0

func (f *Fabric) QueryContract(ctx context.Context, signingKey string, location *fftypes.JSONAny, parsedMethod interface{}, input map[string]interface{}, options map[string]interface{}) (interface{}, error)

func (*Fabric) RemoveFireflySubscription added in v1.1.0

func (f *Fabric) RemoveFireflySubscription(ctx context.Context, subID string)

func (*Fabric) ResolveSigningKey

func (f *Fabric) ResolveSigningKey(ctx context.Context, signingKeyInput string, intent blockchain.ResolveKeyIntent) (string, error)

func (*Fabric) SetHandler added in v1.1.0

func (f *Fabric) SetHandler(namespace string, handler blockchain.Callbacks)

func (*Fabric) SetOperationHandler added in v1.1.0

func (f *Fabric) SetOperationHandler(namespace string, handler core.OperationCallbacks)

func (*Fabric) StartNamespace added in v1.3.0

func (f *Fabric) StartNamespace(ctx context.Context, namespace string) (err error)

func (*Fabric) StopNamespace added in v1.3.0

func (f *Fabric) StopNamespace(ctx context.Context, namespace string) (err error)

func (*Fabric) SubmitBatchPin

func (f *Fabric) SubmitBatchPin(ctx context.Context, nsOpID, networkNamespace, signingKey string, batch *blockchain.BatchPin, location *fftypes.JSONAny) error

func (*Fabric) SubmitNetworkAction added in v1.1.0

func (f *Fabric) SubmitNetworkAction(ctx context.Context, nsOpID string, signingKey string, action core.NetworkActionType, location *fftypes.JSONAny) error

func (*Fabric) ValidateInvokeRequest added in v1.3.0

func (f *Fabric) ValidateInvokeRequest(ctx context.Context, parsedMethod interface{}, input map[string]interface{}, hasMessage bool) error

func (*Fabric) VerifierType added in v0.14.0

func (f *Fabric) VerifierType() core.VerifierType

type Location added in v0.12.0

type Location struct {
	Channel   string `json:"channel"`
	Chaincode string `json:"chaincode"`
}

type PayloadSchema added in v0.12.0

type PayloadSchema struct {
	Type        string        `json:"type"`
	PrefixItems []*PrefixItem `json:"prefixItems"`
}

type PrefixItem added in v0.12.0

type PrefixItem struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

Jump to

Keyboard shortcuts

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