multiparty

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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Enabled   bool
	Org       RootOrg
	Node      LocalNode
	Contracts []blockchain.MultipartyContract
}

type LocalNode

type LocalNode struct {
	Name        string
	Description string
}

type Manager

type Manager interface {
	core.Named

	// RootOrg returns configuration details for the root organization identity
	RootOrg() RootOrg

	// LocalNode returns configuration details for the local node identity
	LocalNode() LocalNode

	// ConfigureContract initializes the subscription to the FireFly contract
	// - Determines the active multiparty contract entry from the config, and updates the namespace with contract info
	// - Resolves the multiparty contract address and version, and initializes subscriptions for contract events
	ConfigureContract(ctx context.Context) (err error)

	// TerminateContract marks the given event as the last one to be parsed on the current FireFly contract
	// - Validates that the event came from the currently active multiparty contract
	// - Re-initializes the plugin against the next configured multiparty contract
	// - Updates the namespace contract info to record the point of termination and the newly active contract
	TerminateContract(ctx context.Context, location *fftypes.JSONAny, termination *blockchain.Event) (err error)

	// GetNetworkVersion returns the network version of the active FireFly contract
	GetNetworkVersion() int

	// SubmitBatchPin sequences a batch of message globally to all viewers of a given ledger
	SubmitBatchPin(ctx context.Context, batch *core.BatchPersisted, contexts []*fftypes.Bytes32, payloadRef string, idempotentSubmit bool) error

	// SubmitNetworkAction writes a special "BatchPin" event which signals the plugin to take an action
	SubmitNetworkAction(ctx context.Context, signingKey string, action *core.NetworkAction, idempotentSubmit bool) error

	// From operations.OperationHandler
	PrepareOperation(ctx context.Context, op *core.Operation) (*core.PreparedOperation, error)
	RunOperation(ctx context.Context, op *core.PreparedOperation) (outputs fftypes.JSONObject, phase core.OpPhase, err error)
}

type RootOrg

type RootOrg struct {
	Name        string
	Description string
	Key         string
}

Jump to

Keyboard shortcuts

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