cantonops

package
v1.0.0-preupgrade Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package cantonops contains helpers for looking up or creating the Daml contracts the CLI commands depend on (PerPartyRouter, CCIPSender, CCIPReceiver) and for extracting a CCIPMessageSent message id from a submitted transaction.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMessageIdFromTransaction

func GetMessageIdFromTransaction(tx *apiv2.Transaction) (string, error)

GetMessageIdFromTransaction scans the transaction events for a created CCIPMessageSent contract and returns its message id, or an error.

func GetOrCreateReceiver

func GetOrCreateReceiver(
	ctx context.Context,
	participant canton.Participant,
	receiverFinality core.FinalityConfig,
	requiredCCV contracts.RawInstanceAddress,
) (string, error)

GetOrCreateReceiver returns the CCIPReceiver contract id for the party with the requested finality config and attesting CCV, creating or updating one as needed. Multiple receivers per party are supported (e.g. full finality and FTF).

func GetOrCreateRouter

func GetOrCreateRouter(ctx context.Context, participant canton.Participant, ccipEdsClient oapiCCIP.ClientWithResponsesInterface) (string, error)

GetOrCreateRouter returns the PerPartyRouter contract id for the participant's party, creating one via the factory if it doesn't exist.

func GetOrCreateSender

func GetOrCreateSender(ctx context.Context, participant canton.Participant) (string, error)

GetOrCreateSender returns the CCIPSender contract id for the party, creating one if missing.

func WaitForVerifierResult

func WaitForVerifierResult(
	ctx context.Context,
	idx *indexerclient.IndexerClient,
	messageID string,
	timeout time.Duration,
) (v1.VerifierResultsByMessageIDResponse, error)

WaitForVerifierResult polls the indexer for verifier results for the given message id until at least one is available, the context is cancelled or the timeout elapses.

Types

This section is empty.

Jump to

Keyboard shortcuts

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