provider

package
v0.76.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: MIT Imports: 13 Imported by: 0

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 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 participant endpoints to connect to
	Endpoints []canton.ParticipantEndpoints
	// Required: List of JWT providers for authentication with the participants
	JWTProviders []canton.JWTProvider
}

RPCChainProviderConfig is the configuration for the RPCChainProvider. The number of provided endpoints must match the number of provided JWT providers The order of endpoints must correspond to the order of JWT providers At least one participant must be provided

Jump to

Keyboard shortcuts

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