Skip to main content

Overview

Use the Ledger Gateway API to read ledger state, onboard an agent, prepare and execute signed transactions, and request faucet funds on supported environments. It is the ledger proxy used by cloud agents that run without direct access to the Canton ledger, while keeping the Ed25519 private key local to each agent.

API surface

Below are the Ledger Gateway API sections.

Streaming queries

Use this API for streaming.

Endpoints:

EndpointUse Сase
GetActiveContractsStream active contracts for the authenticated party.
GetUpdatesStream ledger updates from an offset, for example, to track transaction
confirmations.

Unary queries

Use the unary query RPCs for point-in-time ledger reads.

Endpoints:

EndpointUse Сase
GetLedgerEndGet the current ledger end offset.
GetBalancesFetch token balances, including CIP-56 holdings and Canton Coin.
GetPreapprovalsRetrieve transfer preapproval contracts.
GetDsoRatesRead CC/USD rate and current round data.
GetSettlementContractsDiscover on-chain DVP proposal and settlement contracts.
GetServiceInfoFetch provider service metadata and capability information.
GetAmuletsRetrieve unlocked amulet contracts and amounts.
GetPrepaidTrafficBalanceRead the remaining prepaid traffic balance for the authenticated party.

Onboarding

The onboarding flow is separate from normal JWT-authenticated access.

Endpoints:

EndpointUse Сase
GetAgentConfigGet an unauthenticated agent configuration template.
RegisterAgentRegister an agent on the waiting list with an Ed25519-signed
request.
GetOnboardingStatusPoll onboarding progress with an Ed25519-signed request.
SubmitOnboardingSignatureSubmit the onboarding multihash signature.

Transactions

Transaction Flow

Ledger mutations use a two-phase protocol.

Phase 1

PrepareTransaction builds the transaction and returns a transaction ID, a prepared transaction hash, the prepared Canton payload, the hashing scheme version, fee data, and service signatures over the response.

Phase 2

ExecuteTransaction submits the locally produced signature, together with fee authorization data, and returns the execution status, update ID, optional created contracts, and structured provider errors when execution fails.

SDK Interaction Flow

Read more about transaction mechanics in Silvana.

Endpoints:

EndpointUse Сase
PrepareTransactionBuild a transaction and return the hash and prepared payload to sign
locally.
ExecuteTransactionSubmit the signed transaction for execution.
PreparePayFeeBuild a fee-payment transaction and return the hash and prepared payload to sign
locally. Used as the fee leg for DvP, multicall, and other authenticated flows.
ExecutePayFeeSubmit the signed fee-payment transaction. Pairs with PreparePayFee.

Faucet

Use RequestFaucet to request funds from the faucet when the environment supports it. The service proto describes this as a server-side submission path that does not need the two-phase signing flow.

Endpoints:

EndpointUse Сase
requestFaucetRequest CC or CIP-56 tokens from the faucet, where enabled.
ListFaucetInstrumentsDiscover which token instruments the faucet currently supports in the active environment.

Example flow

A typical Ledger Gateway flow looks like this:
  1. Call GetAgentConfig to load the initial onboarding template.
  2. Call RegisterAgent and poll GetOnboardingStatus.
  3. Submit the required onboarding signature with SubmitOnboardingSignature.
  4. Call GetBalances or RequestFaucet to initialize working balances where needed.
  5. Call PrepareTransaction, sign the returned hash locally, then call ExecuteTransaction.
  6. Use GetLedgerEnd and GetUpdates to monitor confirmation and downstream effects.