provider

package
v0.82.3 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: MIT Imports: 16 Imported by: 3 modules, 1 package

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 CTFChainProvider

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

CTFChainProvider initializes a Canton chain instance using the Chainlink Testing Framework (CTF). It will spin up a local Canton instance inside Docker containers, with the specified number of validators.

func NewCTFChainProvider

func NewCTFChainProvider(t *testing.T, selector uint64, config CTFChainProviderConfig) *CTFChainProvider

func (*CTFChainProvider) BlockChain

func (p *CTFChainProvider) BlockChain() chain.BlockChain

func (*CTFChainProvider) ChainSelector

func (p *CTFChainProvider) ChainSelector() uint64

func (*CTFChainProvider) Initialize

func (p *CTFChainProvider) Initialize(ctx context.Context) (chain.BlockChain, error)

func (*CTFChainProvider) Name

func (p *CTFChainProvider) Name() string

type CTFChainProviderConfig

type CTFChainProviderConfig struct {
	// Required: The number of Canton validators to start in the CTF network; must be > 0
	NumberOfValidators int
	// Optional: The Canton Docker image to use; if empty, the default CTF image will be used
	Image string

	// Required: A sync.Once instance to ensure that the CTF framework only sets up the new
	// DefaultNetwork once
	Once *sync.Once
}

CTFChainProviderConfig is the configuration for the CTFChainProvider.

type ParticipantConfig added in v0.81.0

type ParticipantConfig struct {
	// (HTTP) The URL to access the participant's JSON Ledger API
	// Required
	// https://docs.digitalasset.com/build/3.5/reference/json-api/json-api.html
	JSONLedgerAPIURL string
	// (gRPC) The URL to access the participant's gRPC Ledger API
	// Required
	// https://docs.digitalasset.com/build/3.5/reference/lapi-proto-docs.html
	GRPCLedgerAPIURL string
	// (gRPC) The URL to access the participant's Admin API
	// Optional - if not set, admin services will not be populated for this participant
	// https://docs.digitalasset.com/operate/3.5/howtos/configure/apis/admin_api.html
	AdminAPIURL string
	// (HTTP) The URL to access the participant's Validator API
	// Required
	// https://docs.sync.global/app_dev/validator_api/index.html
	ValidatorAPIURL string
	// The UserID of the user that should be used for accessing the participant's API endpoints.
	// Required
	UserID string
	// The PartyID of the party that should be used for accessing the participant's API endpoints.
	// Required
	PartyID string
	// An authentication.Provider implementation that provides the credentials for authenticating with the participant's API endpoints.
	// Required
	AuthProvider authentication.Provider
}

ParticipantConfig is the configuration of a single participant. It contains the configuration details to connect and authenticate against a participant's APIs.

type RPCChainProvider

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

RPCChainProvider initializes a Canton chain instance connecting to existing Canton participants via their RPC endpoints.

func NewRPCChainProvider

func NewRPCChainProvider(selector uint64, config RPCChainProviderConfig) *RPCChainProvider

func (*RPCChainProvider) BlockChain

func (p *RPCChainProvider) BlockChain() chain.BlockChain

func (*RPCChainProvider) ChainSelector

func (p *RPCChainProvider) ChainSelector() uint64

func (*RPCChainProvider) Initialize

func (p *RPCChainProvider) Initialize(_ context.Context) (chain.BlockChain, error)

func (*RPCChainProvider) Name

func (p *RPCChainProvider) Name() string

type RPCChainProviderConfig

type RPCChainProviderConfig struct {
	// Required: List of participants to connect to
	Participants []ParticipantConfig
}

RPCChainProviderConfig is the configuration for the RPCChainProvider. At least one participant must be provided

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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