Package-level declarations

Types

Link copied to clipboard
data class AllocatedExternalParty(val partyId: String, val publicKeyFingerprint: String)

An external party whose signing key never left the SigningDriver.

Link copied to clipboard
data class AmuletRulesConfig(val transferFees: TransferFeeSchedule, val synchronizerFees: SynchronizerFeeConfig, val activeSynchronizerId: String)

The AmuletRules configuration effective at one instant, decoded from scan's /v0/amulet-rules (see ScanClient.amuletRulesConfig).

Link copied to clipboard

Bridges the registry's off-ledger JSON (Daml JSON API encoding) and the gRPC Ledger API's proto values.

Link copied to clipboard
class DelegatingSigningDriver(publicKeyProvider: suspend () -> CryptoOuterClass.SigningPublicKey, signer: suspend (ByteArray) -> CryptoOuterClass.Signature) : SigningDriver

The custody hook: a SigningDriver whose key operations are delegated to caller-supplied suspend functions. Wrap any external signer — Fireblocks, BitGo, Dfns, an HSM, a remote co-signer — by adapting its SDK calls to the two callbacks; everything above the driver (party onboarding, interactive submission, token-standard writes) works unchanged.

Link copied to clipboard
class ExternalPartyClient(channel: Channel)

Onboards external parties: parties whose signing keys are held outside the participant node (device enclave, custody provider), so the node cannot act for them unilaterally.

Link copied to clipboard
data class Holding(val contractId: String, val owner: String, val instrumentId: InstrumentId, val amount: BigDecimal, val lock: HoldingLock?, val meta: Map<String, String>)

A holding UTXO: one contract implementing the CIP-0056 Holding interface.

Link copied to clipboard
data class HoldingLock(val holders: List<String>, val expiresAt: Instant?, val expiresAfterMicros: Long?, val context: String?)

Splice.Api.Token.HoldingV1.Lock. When both expiries are set, the earlier wins.

Link copied to clipboard

Non-durable WalletStore; suitable for tests and previews.

Link copied to clipboard
data class InstrumentId(val admin: String, val id: String)

Splice.Api.Token.HoldingV1.InstrumentId — admin party + admin-unique id.

Link copied to clipboard
class InteractiveSubmissionClient(channel: Channel)

The prepare → sign → execute flow for externally-signed transactions (Interactive Submission Service).

Link copied to clipboard
data class OpenMiningRound(val roundNumber: Long, val amuletPriceUsd: BigDecimal, val opensAt: Instant, val targetClosesAt: Instant)

One open mining round from scan's /v0/open-and-issuing-mining-rounds (see ScanClient.openMiningRounds) — carries the USD price of Amulet that fees and taps convert at.

Link copied to clipboard

Client-side implementation of Canton's "hashing scheme version 2" for interactive submissions: recomputes prepared_transaction_hash from the raw PreparedTransaction proto so a wallet never signs a hash it did not derive itself (interactive_submission_service.proto: "clients MUST recompute the hash from the raw transaction if the preparing participant is not trusted").

Link copied to clipboard

The PreparedTransaction cannot be hashed (or verified) by this client.

Link copied to clipboard

The locally recomputed hash does not match what the node asked us to sign.

Link copied to clipboard
class ScanClient(baseUrl: String, http: OkHttpClient = OkHttpClient())

Read layer over a Super Validator's Scan API (.../api/scan).

Link copied to clipboard

A scan call failed (non-2xx status other than 404, or malformed payload).

Link copied to clipboard
interface SigningDriver

Produces Canton CryptoOuterClass.Signatures over ledger-provided hashes.

Link copied to clipboard

JCA-backed software keys, supporting the two schemes relevant to mobile wallets: Ed25519 (Canton's default) and ECDSA P-256 (the only scheme hardware enclaves sign — Apple Secure Enclave and Android StrongBox are P-256-only). Both are accepted by the Ledger API; see crypto.proto.

Link copied to clipboard

Amulet-specific templates from the splice-amulet DAR.

Link copied to clipboard

Amulet-specific templates from the splice-wallet DAR — not part of CIP-0056, but required for the Canton Coin flows every wallet needs.

Link copied to clipboard
data class SteppedRate(val initialRate: BigDecimal, val steps: List<SteppedRate.Step>)

A piecewise fee rate over a USD amount — Splice's Splice.Fees.SteppedRate.

Link copied to clipboard
data class SubmissionCompletion(val updateId: String, val offset: Long)

The ledger's completion for an executed submission — the proof that the command was actually committed, not merely accepted for execution.

Link copied to clipboard
data class SynchronizerFeeConfig(val extraTrafficPriceUsdPerMB: BigDecimal, val minTopupAmountBytes: Long, val baseRateBurstAmountBytes: Long, val baseRateBurstWindow: Duration, val readVsWriteScalingFactor: Long)

The synchronizer usage-fee block published in AmuletRules (decentralizedSynchronizer.fees, Splice's SynchronizerFeesConfig) — what traffic costs and how much comes free.

Link copied to clipboard

CIP-0056 token standard identifiers and Daml value codecs.

Link copied to clipboard
class TokenStandardClient(channel: Channel, registry: TransferRegistryClient? = null)

CIP-0056 token standard client: holdings, two-step transfers, and the pending-instruction inbox — the read/write surface a wallet renders.

Link copied to clipboard
data class Transfer(val sender: String, val receiver: String, val amount: BigDecimal, val instrumentId: InstrumentId, val requestedAt: Instant, val executeBefore: Instant, val inputHoldingCids: List<String>, val meta: Map<String, String>)

Splice.Api.Token.TransferInstructionV1.Transfer — the transfer specification.

Link copied to clipboard

How one committed update moved value relative to the wallet party — the label a wallet renders next to a history row.

Link copied to clipboard

A pure, deterministic preview of the fees a two-output Amulet transfer would be charged — "Fee: ~X CC" before sending. No I/O: feed it ScanClient.amuletRulesConfig and a round price from ScanClient.openMiningRounds.

Link copied to clipboard
data class TransferFeeSchedule(val createFeeUsd: BigDecimal, val transferFee: SteppedRate, val holdingFeeUsdPerRound: BigDecimal, val lockHolderFeeUsd: BigDecimal)

The transfer-fee schedule published in AmuletRules' transferConfig — denominated in USD and converted to Amulet at the open mining round's price when charged (Splice scales the whole config by 1 / amuletPrice; scaleFees in Splice.AmuletRules).

Link copied to clipboard
data class TransferInstruction(val contractId: String, val originalInstructionCid: String?, val transfer: Transfer, val status: TransferInstructionStatus, val meta: Map<String, String>)

A pending two-step transfer (contract implementing the TransferInstruction interface).

Link copied to clipboard

The three choices on a pending TransferInstruction — accept, reject or withdraw — each carrying its Daml choice name and the path segment the registry's choice-context endpoint uses for it.

Link copied to clipboard
sealed interface TransferInstructionStatus

Where a TransferInstruction stands, from the interface view's status variant.

Link copied to clipboard
class TransferRegistryClient(baseUrl: String, http: OkHttpClient = OkHttpClient())

Client for a CIP-0056 registry's off-ledger transfer-instruction API (/registry/transfer-instruction/v1/...).

Link copied to clipboard

A registry call failed (non-2xx status or malformed payload).

Link copied to clipboard
data class TransferSummary(val direction: TransferDirection, val counterparty: String?, val instrumentId: InstrumentId, val amount: BigDecimal, val memo: String?)

Transfer-level reading of one holdings-history update: direction, counterparty, the signed net effect on the wallet party's balance, and the memo when the transfer carried one.

Link copied to clipboard
class ValidatorClient(baseUrl: String, accessTokenProvider: suspend () -> String, http: OkHttpClient = OkHttpClient())

Client for a validator's user-facing wallet API (.../api/validator) — the onboarding, faucet, and traffic-purchase operations a wallet app drives against its own validator, authenticated as the end user.

Link copied to clipboard
class ValidatorException(val statusCode: Int?, message: String) : RuntimeException

A validator API call failed: non-2xx status (see statusCode) or a malformed payload (statusCode is null). Taps in particular fail with 400/404 until the network has an open mining round, and 429/503 under load — all worth retrying.

Link copied to clipboard
data class WalletRecord(val partyId: String, val publicKeyFingerprint: String, val synchronizerId: String, val keyHandle: ByteArray?, val createdAt: Instant)

One onboarded wallet identity: the party, the fingerprint of its registered key, and an opaque handle for reconstructing the signer.

Link copied to clipboard
interface WalletStore

Persistence for wallet identities across launches. The SDK ships InMemoryWalletStore for tests and composition; apps provide a durable implementation (SQLDelight, Room, DataStore, files) — the surface is deliberately small so that's a page of code.

Functions

Link copied to clipboard

The round a submission "now" would execute against — the newest round already open at at, mirroring Splice's latestUsableRound selection. Null when no round has opened yet (right after network bootstrap).

Link copied to clipboard
fun TlsTrust.okHttpClient(base: OkHttpClient = OkHttpClient()): OkHttpClient

An OkHttpClient honouring the same trust anchors as the Ledger API channel, for the off-ledger REST APIs — ScanClient, ValidatorClient and TransferRegistryClient.

Link copied to clipboard
fun Transfer.toValue(): ValueOuterClass.Value

This transfer as the Daml Transfer record a choice argument expects; Transfer.meta becomes a Metadata record.