provider

package
v0.110.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2026 License: MIT Imports: 16 Imported by: 1

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 Endpoints added in v0.85.0

type Endpoints struct {
	// (HTTP) The URL to access the participant's JSON Ledger API
	// Optional
	// 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
	// Optional
	// https://docs.sync.global/app_dev/validator_api/index.html
	ValidatorAPIURL string
}

type ParticipantConfig added in v0.81.0

type ParticipantConfig struct {
	// The endpoints used to connect to this participant's APIs.
	Endpoints
	// The (Docker) internal endpoints used to connect to the participant's APIs.
	// If Specified, the resulting chain will have its InternalEndpoints field populated with these values.
	// This is useful when having to connect Canton from within another Docker container.
	// Optional
	InternalEndpoints *Endpoints
	// 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
	// ReadAsPartyIDs lists parties this user may read as (CanReadAs).
	ReadAsPartyIDs []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
authorizationcode
Package authorizationcode provides OAuth2 authorization code flow authentication for Canton gRPC connections.
Package authorizationcode provides OAuth2 authorization code flow authentication for Canton gRPC connections.
clientcredentials
Package clientcredentials provides OAuth2 client credentials flow authentication for Canton gRPC connections.
Package clientcredentials provides OAuth2 client credentials flow authentication for Canton gRPC connections.

Jump to

Keyboard shortcuts

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