This is the full developer documentation for Sigilry # Connect Canton dApps to wallets > A typed CIP-103 provider, RPC client, and React hooks for Canton Network, built and used in production by Send. Sigilry is a [CIP-103](https://github.com/canton-foundation/cips/blob/main/cip-0103/cip-0103.md) compliant dApp connectivity library for Canton Network. It implements the CIP-103 dApp API as a typed JSON-RPC client/server pair, ships generated Zod schemas for runtime validation, and exposes React Query hooks for fast integration. Install the stable SDK with `yarn add @sigilry/dapp@^3 @sigilry/react@^3`. Building with Send Connect? Start with [testnet connection](/guides/send-connect-testnet/), [message verification](/guides/verify-sign-message/), and [holdings queries](/guides/read-holdings/). Sigilry is built and maintained by [Send](https://send.it) and used in production by Send’s Canton Network dApps. ## Start here [Quick Start ](getting-started/quick-start/)Connect to an installed wallet extension and make your first CIP-103 request. [Demo App ](getting-started/demo-app/)Run the full DAML → codegen → React flow locally, no extension required. [Send Connect testnet ](guides/send-connect-testnet/)Install Send Connect, select Testnet, and verify the network from your dApp. [CIP-103 Conformance ](concepts/cip-103-conformance/)Per-method conformance status, deviations, and versioning. ## Packages @sigilry/dapp Core provider, RPC client and server, message schemas, and transports. [Usage](packages/dapp/) @sigilry/react React Query powered hooks and `CantonReactProvider`. [Usage](packages/react/) @sigilry/cli CLI and programmatic API for generating TypeScript types from DAML DARs. [Usage](packages/cli/) @sigilry/canton-json-api Generated Canton JSON API v2 types and Zod schemas for typed ledger endpoint contracts. [Usage](packages/canton-json-api/) ## New to Canton? Start with the [Demo App](getting-started/demo-app/) before package internals. It shows the full flow in one place: 1. DAML templates and choices (`TodoList` factory + `TodoItem` contracts) 2. DAR build and typed codegen via Sigilry CLI 3. dApp-side React hooks calling a typed `window.canton` provider 4. Event-driven wallet/ledger logs plus `txChanged` updates after approvals Fastest way to run it from the repo root: ```bash nix develop yarn install yarn --cwd examples/demo-app dev ``` Choose your starting path: * Building a real dApp integration against an installed wallet extension: go to [Quick Start](getting-started/quick-start/). * Learning the full flow locally without extension setup: go to [Demo App](getting-started/demo-app/). ## SDK Flow The wallet extension injects a CIP-103 provider at `window.canton`. The provider object follows the EIP-1193 shape that CIP-103 itself specifies (`request` / `on` / `removeListener`), routes calls through typed JSON-RPC method names from the CIP-103 OpenRPC schema, and emits the full CIP-103 §4.2.2 push-event surface (`accountsChanged`, `txChanged`, `statusChanged`, `connected`) to signal wallet, ledger, and session/network state changes. Methods with void params omit the `params` field. See [CIP-103 Conformance](concepts/cip-103-conformance/) for the per-method conformance table, and the [@sigilry/dapp](packages/dapp/) and [@sigilry/react](packages/react/) pages for the full contract. ## Quick start * Start with the basics in [Introduction](getting-started/introduction/). * Follow the 10-minute integration in [Quick Start](getting-started/quick-start/). * Run the full newcomer flow in [Demo App](getting-started/demo-app/). * Go deeper in [Architecture](concepts/architecture/) and [RPC Protocol](concepts/rpc-protocol/). ## CLI Codegen Use `sigilry init` to create `sigilry.config.ts`, then run `sigilry codegen` to generate TypeScript types. The CLI requires the DAML SDK so `dpm` is available, and it wraps `dpm codegen-alpha-typescript` under the hood. See the [@sigilry/cli](packages/cli/) page for the full configuration reference. ## Minimal dApp request ```ts import "@sigilry/dapp/browser-globals"; export async function connectAndListAccounts() { if (!window.canton) { throw new Error("Canton provider not available"); } const status = await window.canton.request({ method: "status" }); if (!status.connection.isConnected) { await window.canton.request({ method: "connect" }); } const accounts = await window.canton.request({ method: "listAccounts" }); console.log("Accounts:", accounts); return accounts; } ``` ## Ledger API Patterns `ledgerApi` requests map directly to Daml JSON Ledger API v2 endpoints. Hooks like `useLedgerApi` and `useActiveContracts` call `/v2/state/ledger-end` and `/v2/state/active-contracts` to resolve the current offset and fetch active contracts. ```ts import "@sigilry/dapp/browser-globals"; if (!window.canton) throw new Error("Canton provider not available"); const ledgerEnd = await window.canton.request({ method: "ledgerApi", params: { requestMethod: "get", resource: "/v2/state/ledger-end", }, }); console.log(ledgerEnd); ``` ## Architecture at a glance ```plaintext dApp UI -> window.canton (CIP-103 provider; EIP-1193 object shape) -> JSON-RPC (CIP-103 OpenRPC schema + Zod validation) -> WindowTransport (postMessage) -> Wallet extension (RPC server) -> Canton Ledger API / DAML ``` ## For AI agents * [`llms.txt`](/llms.txt) is a concise index; [`llms-full.txt`](/llms-full.txt) contains every page. * Every page is available as Markdown: append `.md` to its URL, request it with `Accept: text/markdown`, or follow its ``. * Code samples on package, guide, and concept pages are compiled against the current packages in CI and include explicit CIP-103 method names. * See [CIP-103 Conformance](concepts/cip-103-conformance/) for the per-method conformance table and the [API Reference](api-reference/readme/) for full signatures. # Demo App > A guided walkthrough of the Sigilry demo app and how it mirrors a real Canton dApp flow. The Sigilry demo app is a **self-contained reference implementation** that shows how a dApp talks to a wallet over the Canton network using typed JSON-RPC and the `@sigilry/react` hooks. It pairs a dApp pane with a wallet simulator pane so you can see the full discovery -> connect -> approval -> ledger flow, including the CIP-103 push events the wallet emits along the way. ## Canton onboarding path If you are new to Canton, follow this order: 1. **DAML contract model** (`examples/demo-app/daml/TodoList.daml`) 2. **DAR + TypeScript generation** (`(cd examples/demo-app && dpm build -o dars/demo-todo-package-0.0.1.dar)` then `yarn --cwd examples/demo-app setup`) 3. **React + provider integration** (`examples/demo-app/src/**` using `@sigilry/react`) This mirrors real Canton projects: contract model first, then typed client bindings, then UI and wallet flow. ## Why it matters * Demonstrates provider discovery (`useDiscovery` + `WalletPicker` + a controlled `provider`) in a safe, local environment. * Uses the same hooks and provider patterns you would use in production. * Makes approvals and the full CIP-103 push-event surface (`accountsChanged`, `statusChanged`, `txChanged`, and the `connected` login event) visible so the data flow is easy to follow. ## Quick start (demo app) From the repo root: ```bash nix develop yarn install yarn --cwd examples/demo-app dev ``` `yarn --cwd examples/demo-app dev` runs `setup` first (builds dependencies and regenerates bindings), then starts: * the local Canton sandbox bootstrap flow (`yarn dev:ledger`) * the Vite frontend (`yarn dev:frontend`) Open `http://localhost:5173` and: 1. Pick a wallet in the **Discover a wallet** picker (the demo injects one simulated wallet). 2. Click **Connect wallet**. 3. Click **Create TodoList** (if no active factory exists). 4. Add a todo and approve the request in the wallet pane. 5. Observe the ledger update and the events in the **RPC & Events** panel. ## Verify startup success After `yarn --cwd examples/demo-app dev`, you should see: * Frontend available at `http://localhost:5173`. * Wallet pane status transitions from loading to ready. * Connect button works and account details appear. * Terminal ledger process remains running without immediate crash. If you changed contracts and want to refresh the committed DAR first: ```bash (cd examples/demo-app && dpm build -o dars/demo-todo-package-0.0.1.dar) yarn --cwd examples/demo-app setup ``` ## Useful logs and files * Ledger runtime logs: `examples/demo-app/log/canton.log` * Bootstrap logs: `examples/demo-app/log/canton-bootstrap.log` * Bootstrap stderr: `examples/demo-app/log/bootstrap-stderr.log` * Frontend debug logs: browser devtools console (`console.debug`) ## What the panes represent * **Left pane**: the dApp UI, gated by a discovery `WalletPicker` and then driven by `@sigilry/react` hooks (`useConnect`, `useAccounts`, `useSubmitCommand`). The **RPC & Events** panel logs the provider’s push events. * **Right pane**: an in-browser wallet simulator that injects `window.canton`, queues approvals, and emits provider events. ## Provider discovery The dApp does not reach for `window.canton` directly. Instead it gates on discovery, mirroring the pattern in [`@sigilry/react`](../../packages/react/) and [Provider Discovery](../../concepts/discovery/): * `useDiscovery()` returns the wallets that announced over `canton:announceProvider`, falling back to the injected `window.canton` when none have. * `WalletPicker` renders that list; selecting one calls `wallet.getProvider()`. * The chosen provider is passed to `CantonReactProvider`’s controlled `provider` prop, binding every hook below it to that wallet. The demo injects a single simulated wallet, so the picker shows one entry (“Injected Canton Provider”). In a real deployment each installed wallet extension announces itself and the picker lists all of them. ## Push events The wallet simulator emits the full CIP-103 push-event surface, and the **RPC & Events** panel renders each as it arrives: * `accountsChanged`, `statusChanged`, `txChanged` — the [CIP-103 §4.2.2](../../concepts/cip-103-conformance/) sync events. * `connected` — the separate login-flow event (not one of the §4.2.2 three). Most apps consume these indirectly through `useAccounts`, `useSession`, and `useConnect`; the panel subscribes to the raw `useCanton()` helpers (`onAccountsChanged`, `onStatusChanged`, `onTxChanged`, `onConnected`) purely to make the transitions visible. ## Flow walkthrough * **Discover wallet**: `useDiscovery` lists available wallets; selecting one binds it via `CantonReactProvider`. * **Connect wallet**: `useConnect` issues `request({ method: "connect" })`, the wallet emits `connected`, and accounts load. * **Create todo**: `useSubmitCommand` calls `TodoList.AddItem`; the wallet pane receives an approval request. * **Approve**: mock wallet resolves request, mock ledger applies command, provider emits `txChanged`. * **Refresh UI**: `useActiveContracts` picks up updated contracts and re-renders todo items. ## Nix-first tooling notes * The workspace flake pins toolchain inputs for repeatable `dpm` and codegen behavior. * Demo scripts call `nix develop ../.. --command ...`, so DAML/codegen commands run with the same toolchain. * Keep DAML SDK and generated bindings in sync by rerunning `(cd examples/demo-app && dpm build -o dars/demo-todo-package-0.0.1.dar)` and then `yarn --cwd examples/demo-app setup` after contract edits. ## First-run troubleshooting * `Ed25519 unsupported`: use localhost/HTTPS and a browser with Web Crypto Ed25519. * `No accounts loaded`: connect wallet first; account events are emitted after connect. * No contract updates: rebuild DAR + regenerate bindings (`setup`), then reload the app. ## Learn more * [Quick Start](../quick-start/): how to wire a provider and connect. * [Provider Discovery](../../concepts/discovery/): the discovery model behind `useDiscovery` and `WalletPicker`. * [RPC Protocol](../../concepts/rpc-protocol/): typed JSON-RPC requests and events. * [@sigilry/react](../../packages/react/): hook reference and usage patterns. For the full walkthrough, see the repository guide in [examples/demo-app/README.md](https://github.com/sigilry/sigilry/blob/main/examples/demo-app/README.md). # Introduction > What Sigilry is, when to use it, and how the pieces fit. Sigilry is a chain-agnostic dApp infrastructure library for connecting dApps to wallet extensions via a typed JSON-RPC protocol. It focuses on predictable contracts, runtime validation, and developer ergonomics. ## When to use Sigilry Use Sigilry if you need: * A consistent dApp to wallet interface (`window.canton`). * Type-safe JSON-RPC calls with OpenRPC-backed schemas. * React hooks that mirror wagmi-style ergonomics. * A CLI to generate TypeScript types from DAML DARs. ## Core ideas * The wallet extension injects a provider at `window.canton`. * dApps send JSON-RPC requests like `status`, `connect`, and `listAccounts`. * Responses are validated against generated Zod schemas. * The CIP-103 §4.2.2 sync events (`accountsChanged`, `statusChanged`, `txChanged`) plus the `connected` login event are delivered through provider events. ## Packages at a glance * `@sigilry/dapp`: Protocol, provider interface, transport, client and server. * `@sigilry/react`: `CantonReactProvider` and hooks built on `@tanstack/react-query`. * `@sigilry/cli`: Codegen for DAML contract TypeScript types. ## Prerequisites * Node.js 18 or newer. * Yarn package manager. * A Sigilry-compatible wallet extension (for example, Send Wallet). * For React apps: React 18+ and `@tanstack/react-query`. If you want a self-contained local environment without a browser extension dependency, start with the [Demo App](../demo-app/). ## Minimal provider usage ```ts import "@sigilry/dapp/browser-globals"; export async function checkStatus() { if (!window.canton) { throw new Error("Canton provider not available"); } const status = await window.canton.request({ method: "status" }); console.log("Connected:", status.connection.isConnected); return status; } ``` # Quick Start > Go from zero to a working connection in under 10 minutes. This guide shows two paths: * **Vanilla**: Use `window.canton` directly with `@sigilry/dapp`. * **React**: Use hooks from `@sigilry/react`. ## Before you start * Node.js 18+ and Yarn installed. * A Sigilry-compatible wallet extension available in your browser. * For React apps: `@tanstack/react-query`. For a hosted wallet, follow [Connect to Send Connect testnet](/guides/send-connect-testnet/). For a local wallet simulator, run the demo: ```bash nix develop yarn install yarn --cwd examples/demo-app dev ``` ## 1. Install packages Vanilla: ```bash yarn add @sigilry/dapp@^3 ``` React: ```bash yarn add @sigilry/react@^3 @sigilry/dapp@^3 @tanstack/react-query ``` The stable dapp/react line is 3.x on `latest`; the old `next` prerelease tag is frozen. See [Migrations](/migrations/) when upgrading from 1.x or 2.x. ## 2. Verify the provider is available ```ts import "@sigilry/dapp/browser-globals"; if (!window.canton) { throw new Error("Canton provider not available"); } ``` ## 3. Make your first request ```ts import "@sigilry/dapp/browser-globals"; export async function connectAndListAccounts() { if (!window.canton) { throw new Error("Canton provider not available"); } const status = await window.canton.request({ method: "status" }); if (!status.connection.isConnected) { await window.canton.request({ method: "connect" }); } const accounts = await window.canton.request({ method: "listAccounts" }); console.log("Accounts:", accounts); return accounts; } ``` ## 4. React setup (recommended for React apps) ```tsx import { CantonReactProvider } from "@sigilry/react"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; const queryClient = new QueryClient(); export function AppRoot() { return ( ); } ``` ## 5. Connect and show accounts ```tsx import { useAccounts, useConnect, useDisconnect } from "@sigilry/react"; export function WalletPanel() { const { connect, isPending: isConnecting } = useConnect(); const { disconnect, isPending: isDisconnecting } = useDisconnect(); const { data: accounts, isConnected } = useAccounts(); if (!isConnected) { return ( ); } return (
); } ``` ## 6. What success looks like * Calling `status` returns a typed payload (no provider/runtime schema errors). * Connect action completes and `listAccounts` returns at least one account. * In React, the connect button transitions to a connected account view. ## 7. Common first-run issues * `Canton provider not available`: wallet extension not installed/active on this page. * Connect appears to do nothing: check extension permission prompts and site access settings. * Empty accounts after connect: wallet may not have an active account on the current network. ## 8. Next steps * Learn the protocol in [RPC Protocol](../../concepts/rpc-protocol/). * Explore package docs: [@sigilry/dapp](../../packages/dapp/), [@sigilry/react](../../packages/react/), [@sigilry/cli](../../packages/cli/), [@sigilry/splice-dars](../../packages/splice-dars/). * Generate TypeScript types from Splice DARs: install `@sigilry/splice-dars` and `@sigilry/cli`, then run `sigilry codegen`. # Read holdings > Query Canton token holdings through CIP-0103 ledgerApi using a ledger-end snapshot and the Splice Holding interface filter. CIP-0103 has no dedicated holdings method. Use `ledgerApi` to read the connected party’s active contracts, filtered by the Splice token Holding interface. Send’s gateway authenticates the read as the connected user; the party filter does not grant access to another party’s private contracts. Connect first and confirm the [active network](/guides/send-connect-testnet/). The request sequence is: 1. Read `/v2/state/ledger-end` to select a snapshot offset. 2. POST `/v2/state/active-contracts` with that offset and an `InterfaceFilter` for `#splice-api-token-holding-v1:Splice.Api.Token.HoldingV1:Holding`. 3. Read the returned created events and Holding interface views. ## Query a snapshot ```ts import type { SpliceProvider } from "@sigilry/dapp"; import "@sigilry/dapp/browser-globals"; async function readHoldings(provider: SpliceProvider) { const account = await provider.request({ method: "getPrimaryAccount" }); const ledgerEnd = await provider.request({ method: "ledgerApi", params: { requestMethod: "get", resource: "/v2/state/ledger-end" }, }); // The proxy parses JSON numbers; reject offsets it cannot represent exactly. if (Array.isArray(ledgerEnd)) throw new Error("Expected a ledger-end object"); const offset = ledgerEnd.offset; if (typeof offset !== "number" || !Number.isSafeInteger(offset) || offset < 0) { throw new Error("Ledger end must be a non-negative safe integer"); } const activeAtOffset = offset; const response = await provider.request({ method: "ledgerApi", params: { requestMethod: "post", resource: "/v2/state/active-contracts", body: { activeAtOffset, eventFormat: { verbose: true, filtersByParty: { [account.partyId]: { cumulative: [ { identifierFilter: { InterfaceFilter: { value: { interfaceId: "#splice-api-token-holding-v1:Splice.Api.Token.HoldingV1:Holding", includeInterfaceView: true, includeCreatedEventBlob: true, }, }, }, }, ], }, }, }, }, }, }); // The active-contracts endpoint returns an array, rather than a ledger-end object. if (!Array.isArray(response)) throw new Error("Expected an active-contracts array"); const current = await provider.request({ method: "getPrimaryAccount" }); if (current.partyId !== account.partyId || current.networkId !== account.networkId) { throw new Error("Account or network changed; query a fresh snapshot"); } return response; } if (!window.canton) throw new Error("Connect a Canton wallet first"); const holdings = await readHoldings(window.canton); console.log(holdings); ``` `activeAtOffset` is sent as a JSON number after the safe-integer check. Send’s proxy parses the ledger-end response with `JSON.parse` and serializes request bodies with `JSON.stringify`; offsets above `Number.MAX_SAFE_INTEGER` (`2^53 - 1`) cannot pass through this proxy without potential precision loss. This example rejects them. Quoting the offset does not recover precision already lost in the response. The JSON API uses `InterfaceFilter: { value: ... }` (including capital letters), rather than the protobuf client’s `case: "interfaceFilter"` representation. The package-name reference beginning with `#` selects the installed Holding interface without hard-coding a package hash. The interface must be available on the participant. `eventFormat` supplies the party filter and verbosity. In this `eventFormat` example, top-level `verbose` must be omitted, even though the pinned OpenAPI schema lists it as required; also omit the deprecated top-level `filter`. Set verbosity inside `eventFormat`, as above. Setting top-level `verbose: true` with `eventFormat` is rejected. See the [pinned Canton JSON API schema](https://github.com/sigilry/sigilry/blob/main/packages/canton-json-api/api-specs/openapi.yaml) for the request and response shapes. ## Interpret the response The result is an array of contract entries. Active entries have `contractEntry.JsActiveContract.createdEvent`, including `contractId` and `interfaceViews`. Inspect each interface view’s `viewStatus` (`code` and `message`) before reading `viewValue`; an unavailable or failed view is not a zero balance. Incomplete assignment/unassignment entries can occur during reassignment and need separate handling. Holdings are contracts, not an aggregated balance response. Group amounts by instrument and owner from the Holding views. Keep decimal amounts lossless rather than converting them to JavaScript floating-point numbers. Locked holdings and the application’s spending rules can make the spendable amount differ from the total held amount. An empty result can mean no visible contracts implement this interface at the snapshot. Check the party, network, offset, and interface availability before treating it as the user’s complete portfolio. This query covers implementations of the token Holding interface; it does not enumerate every asset template on Canton. ## Reads and submissions Send’s `ledgerApi` proxy allows ledger reads on an allowlist. Use `prepareExecute` (or Sigilry’s `prepareExecuteAndWait`) for command submission and wallet approval. Do not submit commands through `ledgerApi`. The HTTP active-contracts endpoint is intended for small snapshots and can reject large results with `413 Content Too Large`. After the initial snapshot, use `POST /v2/updates` to query subsequent changes over a bounded offset range. It returns a finite list in a blocking request and has the same `413 Content Too Large` limit. `ledgerApi` cannot open the JSON API websocket. Re-read ledger end for a fresh snapshot after a pruning or reassignment error. # Connect to Send Connect testnet > Install the stable Sigilry 3.x SDK, connect the Send Connect extension to Canton testnet, and check the active network. Send Connect is a browser extension for Canton Network. Its [Chrome Web Store listing](https://chromewebstore.google.com/detail/send-connect/ldmohiccoioolenadmogclhoklmanpgi) supports switching between Mainnet and Testnet. ## Install and select Testnet 1. Install [Send Connect](https://chromewebstore.google.com/detail/send-connect/ldmohiccoioolenadmogclhoklmanpgi) in desktop Chrome. 2. Open the extension popup and use the network switch to select **Testnet**. 3. Sign in or complete wallet setup at [testnet.cantonwallet.com](https://testnet.cantonwallet.com) on Testnet. Approve the dApp connection when prompted. 4. Open or reload the dApp page after installing the extension. Use a separate dApp origin; Send excludes its own wallet pages from provider injection. | Setting | Testnet value | | ----------- | ------------------------------------------------------------ | | Wallet | [testnet.cantonwallet.com](https://testnet.cantonwallet.com) | | API gateway | `https://api-testnet.cantonwallet.com` | | Network ID | `canton:testnet` | The gateway is the wallet’s authenticated API endpoint. A dApp uses the provider’s `ledgerApi` method for ledger reads; the gateway URL alone does not grant ledger access. ## Install the stable SDK ```bash yarn add @sigilry/dapp@^3 # For React applications yarn add @sigilry/react@^3 @tanstack/react-query ``` Both dapp/react packages ship the stable 3.x line on `latest`. The `next` tag is frozen on an old 2.0 prerelease. The current Send Connect message contract is incompatible with the legacy 1.x client; follow [Migrations](/migrations/) to upgrade. ## Connect and check the network This example assumes Send Connect is the selected injected wallet. With several installed wallets, use [provider discovery](/concepts/discovery/) to select Send Connect explicitly. ```ts import type { SpliceProvider } from "@sigilry/dapp"; import "@sigilry/dapp/browser-globals"; async function connectToTestnet(provider: SpliceProvider) { const connection = await provider.request({ method: "connect" }); if (!connection.isConnected || connection.isNetworkConnected === false) { throw new Error("Wallet connection is not ready"); } const network = await provider.request({ method: "getActiveNetwork" }); if (network.networkId !== "canton:testnet") { throw new Error("Select Testnet in the Send Connect popup, then reconnect"); } return provider.request({ method: "listAccounts" }); } if (!window.canton) throw new Error("Install Send Connect and reload the dApp"); const accounts = await connectToTestnet(window.canton); console.log(accounts.map(({ partyId, networkId }) => ({ partyId, networkId }))); ``` Recheck the network before a transaction, and refresh account state after `accountsChanged`. The current Send Connect extension uses this event for account and connection changes; it does not emit `statusChanged`. A party and its contracts belong to their network; switching the popup does not move mainnet holdings to testnet. ## Common connection problems * **Provider missing:** Confirm the extension is enabled for the dApp origin and reload the page. Test on the dApp page rather than a Send wallet page. * **Wrong network:** Select Testnet in the popup and reconnect. Check `getActiveNetwork().networkId` before using accounts. * **Legacy SDK:** Install dapp/react 3.x together. Avoid the frozen `next` tag. * **Connected but ledger unavailable:** Inspect the error returned by `ledgerApi` to diagnose authentication, gateway, or ledger failures. The extension’s `isNetworkConnected` reports whether a network ID and gateway URL are configured; it is not a ledger availability probe and can remain `true` when the ledger is down. Next: [verify a signed message](/guides/verify-sign-message/) or [read token holdings](/guides/read-holdings/). # Verify signMessage > Verify Send Connect's hex DER ECDSA P-256 signatures with WebCrypto and a base64 SPKI public key, including delegated signing keys. [CIP-0103](https://github.com/canton-foundation/cips/blob/main/cip-0103/cip-0103.md#signmessage) defines message signing but does not fix the signature encoding or algorithm. Sigilry’s `SignMessageResult` requires a `signature` string and accepts optional signer metadata. Choose a verifier for the selected wallet’s documented format. ## Send Connect browser extension format | Value | Format | | ------------------- | -------------------------------------------------------------------------------------- | | Message | Exact UTF-8 bytes of the string supplied to `signMessage` | | Algorithm | ECDSA P-256 with SHA-256 | | `signature` | Lowercase hexadecimal, no `0x` prefix, containing ASN.1 DER ECDSA integers `r` and `s` | | Account `publicKey` | Base64-encoded DER SubjectPublicKeyInfo (SPKI) | Do not base64-encode, normalize, or prehash the message before verification. WebCrypto hashes the UTF-8 bytes with SHA-256. The hex DER verifier below is specific to the Send Connect browser extension. Send source now implements hex DER and signer metadata for extension and WalletConnect message signing (`canton-monorepo` commit `9a25c1562ce53b48ca3d88b4a3dec966e2e70561`, October 5, 2026). Wallet pages, extension versions, and SDK versions deploy independently. Select verification behavior using the supported wallet/release contract; signature-only responses remain supported. The inspected source change alone does not establish which production artifacts currently run. Other wallets can return different formats; this DER parser does not accept raw `r‖s` signatures. For a signature-only response, verify with the account `publicKey` captured before signing. ## Optional signer metadata Sigilry’s exported `SignMessageResultSchema` and inferred `SignMessageResult` type accept the following optional fields. Wallets may include them; they are not yet part of CIP-0103 and SDK support does not establish deployed wallet availability. Availability depends on the wallet version and transport. A result containing only `{ signature }` remains valid. Unknown keys and unsupported enum values are rejected. | Field | Meaning / accepted values | | ---------------------- | -------------------------------------------------------- | | `signedBy` | Canton fingerprint (`1220…`) of the signing key | | `publicKey` | Signing key as base64 DER SubjectPublicKeyInfo (SPKI) | | `signingAlgorithmSpec` | `"ed25519"` or `"ecdsa-sha256"` | | `format` | `"concat"` (raw concatenated signature bytes) or `"der"` | | `encoding` | `"base64"` or `"hex"` | The example below verifies with the captured account `publicKey` by default, supporting signature-only responses. If another wallet documents a different signing key in the result, select that key explicitly and independently establish its authorization for the party. The verifier supports only ECDSA P-256/SHA-256, hex, and DER. If metadata declares another format, select a compatible verifier. Accepting metadata in the schema does not verify the signature, key encoding, fingerprint, or the key’s authorization for a party. ## WebCrypto verifier [WebCrypto ECDSA](https://www.w3.org/TR/webcrypto/#ecdsa-operations) uses fixed-width `r || s` signature bytes. Decode Send’s hex DER signature into two 32-byte integers before calling `crypto.subtle.verify`. The key imports with the `spki` format. This JavaScript works in a secure browser context or Node.js with WebCrypto. It returns `false` for a well-formed signature that does not match and throws for malformed input or an unsupported key. The example limits messages to 64 KiB and accepts only P-256 DER signatures (at most 72 bytes). ```js function sendDerSignatureToRaw(signatureHex) { if ( typeof signatureHex !== "string" || signatureHex.length < 16 || signatureHex.length > 144 || !/^(?:[0-9a-f]{2})+$/.test(signatureHex) ) { throw new Error("Expected a lowercase hex DER P-256 signature"); } const der = Uint8Array.from(signatureHex.match(/../g), (byte) => parseInt(byte, 16)); if (der[0] !== 0x30 || der[1] !== der.length - 2) { throw new Error("Invalid DER sequence"); } const raw = new Uint8Array(64); let cursor = 2; for (const destination of [0, 32]) { if (cursor + 2 > der.length || der[cursor++] !== 0x02) { throw new Error("Expected a DER integer"); } const length = der[cursor++]; if (length < 1 || length > 33 || cursor + length > der.length) { throw new Error("Invalid DER integer length"); } let integer = der.subarray(cursor, cursor + length); cursor += length; if (integer[0] & 0x80) throw new Error("Negative DER integer"); if (integer.length > 1 && integer[0] === 0) { if (!(integer[1] & 0x80)) throw new Error("Non-minimal DER integer"); integer = integer.subarray(1); } if (integer.length > 32) throw new Error("Integer exceeds P-256 width"); raw.set(integer, destination + 32 - integer.length); } if (cursor !== der.length) throw new Error("Trailing DER data"); return raw; } async function verifySendMessage(message, signatureHex, publicKeyBase64) { if (typeof message !== "string" || message.length > 65536) { throw new Error("Message exceeds the example's 64 KiB limit"); } const messageBytes = new TextEncoder().encode(message); if (messageBytes.length > 65536) throw new Error("Message exceeds 64 KiB in UTF-8"); if (typeof publicKeyBase64 !== "string" || publicKeyBase64.length > 256) { throw new Error("Expected a base64 SPKI P-256 public key"); } const spki = Uint8Array.from(atob(publicKeyBase64), (character) => character.charCodeAt(0)); const key = await crypto.subtle.importKey( "spki", spki, { name: "ECDSA", namedCurve: "P-256" }, false, ["verify"], ); return crypto.subtle.verify( { name: "ECDSA", hash: "SHA-256" }, key, sendDerSignatureToRaw(signatureHex), messageBytes, ); } ``` After connecting to Send Connect, capture the current account and ask the user to sign: ```ts import "@sigilry/dapp/browser-globals"; if (!window.canton) throw new Error("Connect Send Connect first"); const account = await window.canton.request({ method: "getPrimaryAccount" }); const message = "Example message for signature verification"; const result = await window.canton.request({ method: "signMessage", params: { message }, }); if (result.signingAlgorithmSpec !== undefined && result.signingAlgorithmSpec !== "ecdsa-sha256") { throw new Error("This verifier requires ECDSA P-256/SHA-256"); } if (result.format !== undefined && result.format !== "der") { throw new Error("This verifier requires DER signatures"); } if (result.encoding !== undefined && result.encoding !== "hex") { throw new Error("This verifier requires hex signatures"); } const current = await window.canton.request({ method: "getPrimaryAccount" }); if ( current.partyId !== account.partyId || current.publicKey !== account.publicKey || current.networkId !== account.networkId ) { throw new Error("Account changed during signing; request a fresh signature"); } const valid = await verifySendMessage(message, result.signature, account.publicKey); console.log({ valid }); ``` ## Multiple passkeys and delegated signing keys A Canton party can have several authorized signing keys. Send signs with the key associated with the active session’s credential; the account `publicKey` reflects that signing key. Its fingerprint can differ from the namespace suffix in `partyId`. Do not derive or select the verification key from the party namespace alone. Signature verification proves possession of the supplied key. For login or authorization, a backend must independently establish that this key is authorized for the claimed party on the selected network, for example through trusted Canton topology data. Trusting a caller-supplied `partyId` and `publicKey` is insufficient. Use a server-issued, single-use challenge bound to the intended application, party, network, and expiry, then consume it after verification to prevent replay. The fixed message above only demonstrates cryptographic verification. Do not assume a single namespace key represents every passkey or a threshold safe. The current Send dApp API exposes one active signing key; it does not implement a multi-signature safe verification flow. # @sigilry/canton-json-api > Generated Canton JSON API v2 types and Zod schemas for typed ledgerApi requests and responses. `@sigilry/canton-json-api` provides TypeScript types and Zod schemas generated from the pinned Canton JSON Ledger API v2 OpenAPI spec. Use it to type and validate the bodies that flow through the CIP-103 `ledgerApi` method. ## Install ```bash yarn add @sigilry/canton-json-api@^1 ``` This package has its own 1.x version line. Wallet connectivity uses `@sigilry/dapp@^3` and, for React, `@sigilry/react@^3`. ## Parse a ledger response Schemas are named `z`. `int64` fields, such as ledger offsets, are modeled as `bigint` after parsing. ```ts import { zGetLedgerEndResponse } from "@sigilry/canton-json-api"; const parsed = zGetLedgerEndResponse.parse({ offset: "42" }); const offset: bigint = parsed.offset; console.log(offset); ``` With React, pass a schema’s `parse` to [`useLedgerApi`](../react/#ledger-api-request) to get typed results. For a full holdings query through the wallet, see [Read Holdings](../../guides/read-holdings/). ## Source of truth The package is generated from a checked-in OpenAPI snapshot (`packages/canton-json-api/api-specs/openapi.yaml`) pinned to a specific Canton release. CI runs `codegen:check` and fails when the generated files drift from that snapshot. # @sigilry/cli > CLI and programmatic API for generating TypeScript from DAML DARs. `@sigilry/cli` generates TypeScript types from DAML DAR files using `dpm codegen-alpha-typescript`. ## Install ```bash yarn add -D @sigilry/cli ``` ## Initialize config ```bash sigilry init ``` This creates a `sigilry.config.ts` file in the current directory. It refuses to overwrite an existing config unless you pass `--force` (`-f`). The generated file looks like this, with your DAR paths filled in: sigilry.config.ts ```ts import { defineConfig } from "@sigilry/cli/config"; export default defineConfig({ dars: ["./path/to/your.dar"], output: "./src/generated", cleanup: true, watch: false, }); ``` ### Using Splice DARs For Canton Network / Splice development, use [`@sigilry/splice-dars`](../splice-dars/) instead of managing DAR files manually: sigilry.config.ts ```ts import { defineConfig } from "@sigilry/cli/config"; import { spliceDars } from "@sigilry/splice-dars"; export default defineConfig({ dars: [spliceDars.amulet, spliceDars.apiTokenHolding], output: "./src/generated", }); ``` ## Generate types ```bash sigilry codegen ``` Without `--config`, `codegen` looks for `sigilry.config.ts`, `sigilry.config.mts`, `sigilry.config.js`, or `sigilry.config.mjs` in the current directory and then each parent directory. Point it at a specific file with `--config ` (`-c`): ```bash sigilry codegen --config ./config/sigilry.config.ts ``` ## Watch mode ```bash sigilry codegen --watch ``` ## Configuration reference `SigilryConfig` supports: * `dars`: array of DAR paths (required). * `output`: output directory (default `./src/generated`). * `cleanup`: clean output directory before generation (default `true`). * `watch`: enable watch mode (default `false`). * `dpmSdkVersion`: dpm SDK version used for codegen (default `3.4.9`, the last SDK that ships `codegen-alpha-typescript`). A non-empty `DPM_SDK_VERSION` environment variable takes precedence. ## Programmatic API ```ts import { generateTypes, loadConfig } from "@sigilry/cli"; async function generate() { const { config } = await loadConfig(); const result = await generateTypes(config); if (!result.success) { throw new Error(result.error); } return result; } generate(); ``` ## Requirements * Node.js 18.19+. * DAML SDK installed so `dpm` is available in PATH, or `DPM_BIN` set to the `dpm` executable path. * A Java runtime (`java` on PATH, or `JAVA_HOME` / `JAVA_BIN` set); dpm runs the generator with `java -jar`. Codegen defaults to DPM SDK 3.4.9. The `dpmSdkVersion` config selects a pin; a nonempty `DPM_SDK_VERSION` environment override takes precedence. Consult `packages/cli/src/dpm.ts` for executable resolution and preflight behavior. A pin does not establish artifact availability. This wrapper’s output contract differs from canton-clients’ LF metadata generator; switching generators is an explicit migration. OpenRPC-to-Zod generation belongs to `@sigilry/dapp`’s `codegen` script. # @sigilry/dapp > Core provider, RPC client and server, message schemas, and transports. `@sigilry/dapp` is the core package for [CIP-103](https://github.com/canton-foundation/cips/blob/main/cip-0103/cip-0103.md)-compliant dApp ↔ wallet extension communication on Canton Network. It provides the CIP-103 provider interface (`SpliceProvider`), JSON-RPC client and server, transport abstractions, and Zod schemas generated from the CIP-103 OpenRPC spec. ## Install ```bash yarn add @sigilry/dapp@^3 ``` Use the stable 3.x line on `latest`. Partner guides cover [Send Connect testnet](/guides/send-connect-testnet/), [verifying signMessage](/guides/verify-sign-message/), and [reading holdings](/guides/read-holdings/). ## Provider usage (dApp) The wallet extension injects a CIP-103 provider at `window.canton`. The object shape (`request`, `on`, `removeListener`) is the EIP-1193 pattern that CIP-103 adopts; method names, params, results, and error codes are fixed by the CIP-103 spec. ```ts import "@sigilry/dapp/browser-globals"; export async function connectAndListAccounts() { if (!window.canton) { throw new Error("Canton provider not available"); } const status = await window.canton.request({ method: "status" }); if (!status.connection.isConnected) { await window.canton.request({ method: "connect" }); } const accounts = await window.canton.request({ method: "listAccounts" }); console.log("Accounts:", accounts); return accounts; } ``` ## Typed client usage (custom transport) ```ts import { createCantonClient, WindowTransport } from "@sigilry/dapp"; export async function getStatus() { const transport = new WindowTransport(window, { timeout: 30000 }); const client = createCantonClient(transport); return await client.status(); } ``` ## Extension server usage ```ts import { createCantonServer, createStubHandlers, isSpliceMessageEvent, jsonRpcResponse, WalletEvent, } from "@sigilry/dapp"; const server = createCantonServer({ ...createStubHandlers(), status: async () => ({ provider: { id: "send-extension", providerType: "browser" }, connection: { isConnected: true, isNetworkConnected: true }, }), connect: async () => ({ isConnected: true, isNetworkConnected: true, }), disconnect: async () => null, getActiveNetwork: async () => ({ networkId: "canton:localnet" }), listAccounts: async () => [], getPrimaryAccount: async () => ({ primary: true, partyId: "alice::1220abc123", status: "allocated", hint: "alice", publicKey: "ed25519:abc123", namespace: "1220abc123", networkId: "canton:localnet", signingProviderId: "passkey", }), prepareExecute: async () => null, prepareExecuteAndWait: async () => ({ tx: { status: "executed", commandId: "cmd-123", payload: { updateId: "update-1", completionOffset: 1 }, }, }), // Stub only: DER ECDSA integers r=1, s=1, encoded as hex; not a valid message signature. signMessage: async () => ({ signature: "3006020101020101" }), ledgerApi: async () => ({ events: [] }), }); window.addEventListener("message", async (event) => { if (!isSpliceMessageEvent(event)) return; if (event.data.type !== WalletEvent.SPLICE_WALLET_REQUEST) return; const { id, method, params } = event.data.request; const response = await server.handleRequest(method, params); // JSON-RPC notifications carry no id and receive no response. if (id === undefined) return; window.postMessage( { type: WalletEvent.SPLICE_WALLET_RESPONSE, response: jsonRpcResponse(id, response), }, "*", ); }); ``` The server above uses stub handlers. A real Send Connect `signMessage` response contains a lowercase hex DER ECDSA P-256/SHA-256 signature. CIP-0103 leaves the encoding unspecified; other wallets can use different algorithms and encodings. See [Verify signMessage](/guides/verify-sign-message/) for a working verifier. ## Provider discovery When more than one Canton wallet may be present, dApps should discover providers instead of reaching for `window.canton` directly. The discovery primitives live on the `@sigilry/dapp/discovery` subpath — they are intentionally **not** re-exported from the package root. See [Provider Discovery](/concepts/discovery/) for the model and fallback semantics. ```ts import { createDiscoveryStore } from "@sigilry/dapp/discovery"; const store = createDiscoveryStore(); const unsubscribe = store.subscribe( (wallets) => { // wallets: readonly DiscoveredWallet[] for (const w of wallets) console.log(w.info.rdns, w.info.name); }, { emitImmediately: true }, ); // Build a live provider bound to a chosen wallet's transport target. const provider = store.findProvider({ rdns: "it.send.connect" })?.getProvider(); console.log(provider); // Teardown removes the window listeners. unsubscribe(); store.destroy(); ``` A wallet extension announces itself instead: ```ts import { announceProvider } from "@sigilry/dapp/discovery"; announceProvider({ id: "send-extension", name: "Send Connect", icon: "data:image/svg+xml;base64,...", target: "send-connect", rdns: "it.send.connect", uuid: crypto.randomUUID(), }); ``` Discovery subpath exports: `requestProviders`, `announceProvider`, `createDiscoveryStore`, `createProvider`, and the `DiscoveredWallet`, `SpliceProviderInfo`, `SpliceAnnounceDetail`, `DiscoveryStore`, and `TransportOptions` types. Pass a `TransportOptions` to `wallet.getProvider(opts?)` to tune the announced wallet’s transport (e.g. a longer request `timeout`). ## Push events A `SpliceProvider` delivers the CIP-103 push events through the EIP-1193-style `.on()` API — the §4.2.2 sync events (`accountsChanged`, `statusChanged`, `txChanged`) plus the `connected` login event. `WindowTransport` carries notifications inbound on the same channel as requests (a notification is an id-less frame; the JSON-RPC `id` is the direction discriminant), and `SpliceProviderBase` auto-wires them to the provider’s emitter — so a provider from `createProvider` (or the injected `window.canton`) emits with no extra setup. ```ts const onStatus = (status: StatusEvent) => { /* ongoing status changes: network, session, disconnect */ console.log(status); }; provider.on("statusChanged", onStatus); provider.on("connected", (status) => { /* login-flow completion (login event, not §4.2.2) */ console.log(status); }); provider.on("accountsChanged", (accounts) => { /* active account / session changes */ console.log(accounts); }); provider.on("txChanged", (tx) => { /* transaction updates */ console.log(tx); }); // Unsubscribe: provider.removeListener("statusChanged", onStatus); ``` On the wallet (server) side, emit notifications with `notify(event, payload, target?)` on the transport. Frames whose `target` does not match a provider’s configured target are filtered out, so multi-wallet pages never cross-deliver events. See [CIP-103 Conformance](/concepts/cip-103-conformance/) for the normative event semantics. ## Key exports * `CANTON_DAPP_API_VERSION` * `SpliceProviderBase`, `SpliceProvider` * `WindowTransport` * `createCantonClient`, `createCantonServer`, `createStubHandlers` * `WalletEvent`, `isSpliceMessage`, `isSpliceMessageEvent` * `jsonRpcRequest`, `jsonRpcResponse` * `RpcErrorCode`, `rpcError`, `RpcClientError` * Discovery (subpath `@sigilry/dapp/discovery`): `requestProviders`, `announceProvider`, `createDiscoveryStore`, `createProvider`, and the `TransportOptions` type ## Generated schemas Zod schemas are generated from OpenRPC specifications and exposed under `@sigilry/dapp/schemas`: ```ts import { StatusEventSchema, type StatusEvent } from "@sigilry/dapp/schemas"; const status: StatusEvent = StatusEventSchema.parse(data); ``` `SignMessageResultSchema` requires `signature` and accepts optional `signedBy`, `publicKey` (base64 DER SPKI), `signingAlgorithmSpec` (`"ed25519" | "ecdsa-sha256"`), `format` (`"concat" | "der"`), and `encoding` (`"base64" | "hex"`). Some wallets, including a pending Send release, may include these fields; they are not yet part of CIP-0103. Signature-only results remain valid; unknown keys are rejected. The inferred `SignMessageResult` type carries the same optional fields. See [Verify signMessage](/guides/verify-sign-message/) for the Send Connect extension’s format, metadata availability, and key authorization considerations. Regenerate schemas after spec updates: ```bash yarn workspace @sigilry/dapp codegen ``` # @sigilry/react > React Query hooks and context for Canton wallet integration. `@sigilry/react` provides React hooks and context for interacting with the Sigilry provider. It builds on `@sigilry/dapp` and uses `@tanstack/react-query` for async state. ## Install ```bash yarn add @sigilry/react@^3 @sigilry/dapp@^3 @sigilry/canton-json-api@^1 @tanstack/react-query ``` ## Provider setup ```tsx import { CantonReactProvider } from "@sigilry/react"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; const queryClient = new QueryClient(); export function AppRoot() { return ( ); } ``` ## Provider discovery When multiple Canton wallets may be installed, let the user pick one. `useDiscovery()` returns the live list of discovered wallets; render them with `WalletPicker`; pass the selected provider to `CantonReactProvider` via its controlled `provider` prop. See [Provider Discovery](/concepts/discovery/) for the underlying model. ```tsx import { useState } from "react"; import { CantonReactProvider, useDiscovery, WalletPicker, type DiscoveredWallet, } from "@sigilry/react"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import type { SpliceProvider } from "@sigilry/dapp"; const queryClient = new QueryClient(); function WalletGate({ children }: { children: React.ReactNode }) { const wallets = useDiscovery(); const [provider, setProvider] = useState(null); if (!provider) { return ( setProvider(w.getProvider())} emptyState={

No Canton wallet detected.

} /> ); } // The controlled `provider` prop binds every hook below to the chosen wallet. return {children}; } export function AppRoot() { return ( ); } ``` Without a `provider` prop, `CantonReactProvider` falls back to the injected `window.canton` (the single-wallet path), so adopting discovery is opt-in per consumer. ## Push event subscriptions `useCanton()` exposes subscription helpers for the CIP-103 push events — `onAccountsChanged` and `onStatusChanged` are the §4.2.2 sync events; `onConnected` is the login-flow event. Each returns an unsubscribe function and is safe to use inside an effect. ```tsx import { useEffect } from "react"; import { useCanton } from "@sigilry/react"; export function StatusWatcher() { const { onStatusChanged, onConnected, onAccountsChanged } = useCanton(); useEffect(() => { const offStatus = onStatusChanged((status) => console.log("status", status)); const offConnected = onConnected((status) => console.log("connected", status)); const offAccounts = onAccountsChanged((accounts) => console.log("accounts", accounts)); return () => { offStatus(); offConnected(); offAccounts(); }; }, [onStatusChanged, onConnected, onAccountsChanged]); return null; } ``` Most apps don’t need these directly — `useAccounts`, `useSession`, and `useConnect` already react to the same events internally. Reach for the raw subscriptions to observe transitions, e.g. log “session expired” when `onAccountsChanged` fires with an empty array. ## Connect and read accounts ```tsx import { useAccounts, useActiveAccount, useConnect } from "@sigilry/react"; export function WalletStatus() { const { connect, isPending } = useConnect(); const { data: accounts, isConnected } = useAccounts(); const { data: activeAccount } = useActiveAccount(); if (!isConnected) { return ( ); } return (

Active: {activeAccount?.hint ?? "Unknown"}

    {accounts.map((account) => (
  • {account.partyId}
  • ))}
); } ``` ## Ledger API request ```tsx import { useLedgerApi } from "@sigilry/react"; import { zGetLedgerEndResponse } from "@sigilry/canton-json-api"; export function LedgerEndButton() { const { requestAsync, data, isPending } = useLedgerApi({ parse: zGetLedgerEndResponse.parse, }); const fetchLedgerEnd = async () => { await requestAsync({ requestMethod: "get", resource: "/v2/state/ledger-end", }); }; return (
{data && Offset: {String(data.data.offset)}}
); } ``` ## Session awareness ```tsx import { useSession } from "@sigilry/react"; export function SessionBadge() { const { sessionState, timeRemainingFormatted, reauthenticate } = useSession(); return (
Status: {sessionState.status} Time remaining: {timeRemainingFormatted} {sessionState.status === "expiring_soon" && ( )}
); } ``` ## Key exports * `CantonReactProvider`, `useCanton` * `useConnect`, `useDisconnect` * `useAccounts`, `useActiveAccount` * `useLedgerApi`, `useLedgerEnd`, `useLedgerUpdates` * `useContractStream`, `useActiveContracts`, `useExerciseChoice`, `useSubmitCommand` * `useSession`, `parseJwt` * `useDiscovery`, `WalletPicker` (+ `DiscoveredWallet`, `SpliceProviderInfo` types) ## Connection state `useCanton()` exposes a discriminated union `connectionState`: * `disconnected` * `connecting` * `connected` (includes `accounts` and `networkId`) * `session_expired` * `error` # @sigilry/splice-dars > Vendored Splice DAR files with typed path exports for Canton Network development. `@sigilry/splice-dars` provides vendored [Splice](https://github.com/hyperledger-labs/splice) DAR files with typed path exports. Use it with `@sigilry/cli` to generate TypeScript types from the official Splice contracts without manually downloading release artifacts. ## What are DARs? DAR (DAML Archive) files are compiled packages of DAML smart contracts. The Splice network publishes DARs for its token standard, amulet contracts, and wallet APIs. You need these DARs to generate typed TypeScript bindings for interacting with Splice contracts on Canton Network. ## Install ```bash yarn add @sigilry/splice-dars ``` ## Usage ### Get DAR paths for codegen The primary use case is feeding DAR paths to `@sigilry/cli` for TypeScript code generation: sigilry.config.ts ```ts import { defineConfig } from "@sigilry/cli/config"; import { spliceDars } from "@sigilry/splice-dars"; export default defineConfig({ dars: [spliceDars.amulet, spliceDars.apiTokenHolding, spliceDars.apiTokenTransferInstruction], output: "./src/generated", }); ``` Then generate types: ```bash sigilry codegen ``` ### Use all DARs sigilry.config.ts ```ts import { defineConfig } from "@sigilry/cli/config"; import { allSpliceDars } from "@sigilry/splice-dars"; // Pass every Splice DAR to codegen export default defineConfig({ dars: [...allSpliceDars], output: "./src/generated", }); ``` ### Check the Splice version ```ts import { SPLICE_VERSION } from "@sigilry/splice-dars"; console.log(SPLICE_VERSION); // "0.5.14" ``` ## Available DARs | Export Key | Contract Package | | ------------------------------- | -------------------------------------------------------- | | `amulet` | Core Amulet contracts (AmuletRules, TransferPreapproval) | | `util` | Shared utility modules | | `apiFeaturedApp` | Featured app API | | `apiTokenAllocation` | Token allocation | | `apiTokenAllocationInstruction` | Token allocation instructions | | `apiTokenAllocationRequest` | Token allocation requests | | `apiTokenBurnMint` | Token burn and mint | | `apiTokenHolding` | Token holdings | | `apiTokenMetadata` | Token metadata | | `apiTokenTransferInstruction` | Token transfer instructions | | `utilBatchedMarkers` | Batched marker utilities | | `utilTokenStandardWallet` | Token standard wallet utilities | ## Exports | Export | Type | Description | | ---------------- | ----------------------------------- | ------------------------------- | | `spliceDars` | `Record` (readonly) | Named DAR file paths | | `allSpliceDars` | `readonly string[]` | All DAR paths as an array | | `SPLICE_VERSION` | `string` literal | Upstream Splice release version | ## Versioning This package follows standard semver via changesets. The `SPLICE_VERSION` export tells you which Splice release the bundled DARs came from — the npm version and Splice version are independent. | Package Version | Splice Version | | --------------- | -------------- | | 0.3.x | 0.5.4 | | 0.4.0 | 0.5.14 | ## Typical workflow 1. Install `@sigilry/splice-dars` and `@sigilry/cli` 2. Reference the DAR paths you need in `sigilry.config.ts` 3. Run `sigilry codegen` to generate TypeScript types 4. Import generated types in your dApp code 5. Use `@sigilry/dapp` or `@sigilry/react` to interact with the Canton ledger ## Source and licensing DAR artifacts are extracted from the public [Splice release](https://github.com/digital-asset/decentralized-canton-sync/releases) with SHA256 verification. Bundled DARs are redistributed under Apache License 2.0; package wrapper code is MIT. # API Reference > Where to find the generated TypeScript API reference and the OpenRPC schema. The [generated API reference](../api-reference/readme/) is built from the TSDoc in each package’s entry point and lists every exported class, function, interface, and type alias. The CIP-103 OpenRPC schema that the `@sigilry/dapp` Zod schemas are generated from is vendored at `packages/dapp/api-specs/openrpc-dapp-api.json`. See [CIP-103 Conformance](../concepts/cip-103-conformance/) for how it maps to the provider surface. For usage-oriented documentation, start with the package guides: * [@sigilry/dapp](../packages/dapp/) * [@sigilry/react](../packages/react/) * [@sigilry/cli](../packages/cli/) * [@sigilry/splice-dars](../packages/splice-dars/) # Choosing a Canton dApp SDK > A sourced comparison of Sigilry, the Canton dApp SDK, PartyLayer, and the Console Wallet dApp SDK. Choose the integration layer that fits the application: Sigilry’s typed provider toolkit, DA’s wallet-discovery SDK, PartyLayer’s native provider with an adapter bridge and UI components, or a Console-focused SDK. These are different documented integration surfaces, not a ranking. [Sigilry](https://sigilry.org/packages/dapp), [Canton dApp SDK](https://docs.canton.network/sdks-tools/sdks/dapp-sdk/overview), [PartyLayer](https://github.com/PartyLayer/PartyLayer/blob/c0d6ddd9caa44e508d53b1586638011dbc6ee0a5/README.md), [Console](https://unpkg.com/@console-wallet/dapp-sdk@2.4.0/README.md). ## Scope and versions Snapshot checked **2026-10-05** with `npm view`: * Sigilry: [`@sigilry/dapp` 3.4.0](https://registry.npmjs.org/@sigilry%2Fdapp/3.4.0), [`@sigilry/react` 3.2.2](https://registry.npmjs.org/@sigilry%2Freact/3.2.2), and [`@sigilry/cli` 0.3.3](https://registry.npmjs.org/@sigilry%2Fcli/0.3.3). * DA: [`@canton-network/dapp-sdk` 1.7.1](https://registry.npmjs.org/@canton-network%2Fdapp-sdk/1.7.1). This is the official Canton dApp SDK linked from [Canton’s introduction to CIP-0103](https://www.canton.network/blog/scaling-canton-apps-with-a-standard-for-wallet-and-app-interoperability) and documented in the [Canton developer docs](https://docs.canton.network/sdks-tools/sdks/dapp-sdk/overview). * PartyLayer: [`@partylayer/sdk` 0.19.0](https://registry.npmjs.org/@partylayer%2Fsdk/0.19.0). The cells below describe documentation at [source commit `c0d6ddd`](https://github.com/PartyLayer/PartyLayer/blob/c0d6ddd9caa44e508d53b1586638011dbc6ee0a5/README.md), not verified behavior of that npm release or every PartyLayer package. * Console: [`@console-wallet/dapp-sdk` 2.4.0](https://registry.npmjs.org/@console-wallet%2Fdapp-sdk/2.4.0), with its [versioned README](https://unpkg.com/@console-wallet/dapp-sdk@2.4.0/README.md) and [distributed type declarations](https://unpkg.com/@console-wallet/dapp-sdk@2.4.0/dist/esm/index.d.ts). Sigilry source links are pinned to public mirror commit `c264b6e`; DA source links are pinned to `d8b41d9`. Website documentation describes the pages inspected on the snapshot date and can change independently of npm releases. **Documented** means a maintainer describes the capability. **Unknown** means the named capability was not established by the cited sources; it does not mean unsupported. This comparison is based on documentation, source, and package metadata. It does not establish interoperability, conformance certification, relative performance, or successful installation in a particular application. ## Documented capabilities On narrow screens, scroll the table horizontally to see all four SDKs. | Capability | Sigilry | `@canton-network/dapp-sdk` (DA) | PartyLayer | `@console-wallet/dapp-sdk` | | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Main integration surface / CIP-0103 | Typed CIP-0103 provider and RPC client/server toolkit. [Docs](https://sigilry.org/packages/dapp) | High-level API over CIP-0103 providers and adapters. [Docs](https://docs.canton.network/sdks-tools/sdks/dapp-sdk/overview) | Native CIP-0103 provider plus adapter-based client/bridge. [Provider](https://github.com/PartyLayer/PartyLayer/blob/c0d6ddd9caa44e508d53b1586638011dbc6ee0a5/packages/provider/README.md) | Console Wallet API; README states CIP-0103 compatibility. [README](https://unpkg.com/@console-wallet/dapp-sdk@2.4.0/README.md) | | Licence / inspectable implementation | MIT; public source. [Metadata](https://registry.npmjs.org/@sigilry%2Fdapp/3.4.0), [source](https://github.com/sigilry/sigilry/blob/c264b6e83b43f4c18818609bf8d8daaf1d7751fd/packages/dapp/package.json) | Apache-2.0; public source. [Metadata](https://registry.npmjs.org/@canton-network%2Fdapp-sdk/1.7.1), [source](https://github.com/canton-network/wallet/blob/d8b41d9a375f66c994442f20c930c83653559b07/sdk/dapp-sdk/README.md) | MIT; public source. [README](https://github.com/PartyLayer/PartyLayer/blob/c0d6ddd9caa44e508d53b1586638011dbc6ee0a5/README.md) | ISC; distributed JS/types inspectable. Public development repository: **unknown** from metadata. [Metadata](https://registry.npmjs.org/@console-wallet%2Fdapp-sdk/2.4.0), [types](https://unpkg.com/@console-wallet/dapp-sdk@2.4.0/dist/esm/index.d.ts) | | Wallet discovery and selection | Discovery store, provider selection, React `WalletPicker`. [dApp](https://sigilry.org/packages/dapp), [React](https://sigilry.org/packages/react) | Announced browser wallets, remote wallets, configurable adapters; built-in picker Web Component. [Discovery](https://docs.canton.network/sdks-tools/sdks/dapp-sdk/guides/wallet-discovery), [README](https://github.com/canton-network/wallet/blob/d8b41d9a375f66c994442f20c930c83653559b07/sdk/dapp-sdk/README.md) | Injected-provider discovery, registry/adapters, React modal and `ConnectButton`. [Provider](https://github.com/PartyLayer/PartyLayer/blob/c0d6ddd9caa44e508d53b1586638011dbc6ee0a5/packages/provider/README.md), [React](https://github.com/PartyLayer/PartyLayer/blob/c0d6ddd9caa44e508d53b1586638011dbc6ee0a5/packages/react/README.md), [README](https://github.com/PartyLayer/PartyLayer/blob/c0d6ddd9caa44e508d53b1586638011dbc6ee0a5/README.md) | Console extension availability; local, remote, or combined target. General multi-wallet picker: **unknown**. [README](https://unpkg.com/@console-wallet/dapp-sdk@2.4.0/README.md) | | Transport / remote connection | Documented `WindowTransport` and custom `RpcTransport` seam; `WalletConnectTransport` exported in inspected source. [Docs](https://sigilry.org/concepts/transports), [exports](https://github.com/sigilry/sigilry/blob/c264b6e83b43f4c18818609bf8d8daaf1d7751fd/packages/dapp/src/transport/index.ts) | Browser postMessage, remote HTTP/SSE; optional WalletConnect adapter. [README](https://github.com/canton-network/wallet/blob/d8b41d9a375f66c994442f20c930c83653559b07/sdk/dapp-sdk/README.md), [discovery](https://docs.canton.network/sdks-tools/sdks/dapp-sdk/guides/wallet-discovery) | Native sync/async flows; opt-in WalletConnect adapter. Legacy provider bridge is sync-only. [README](https://github.com/PartyLayer/PartyLayer/blob/c0d6ddd9caa44e508d53b1586638011dbc6ee0a5/README.md), [adapter](https://github.com/PartyLayer/PartyLayer/blob/c0d6ddd9caa44e508d53b1586638011dbc6ee0a5/packages/adapters/walletconnect/README.md) | Browser postMessage and mobile QR/deep-link flow. Generic WalletConnect adapter: **unknown**. [README](https://unpkg.com/@console-wallet/dapp-sdk@2.4.0/README.md) | | React integration | `@sigilry/react` context/hooks using TanStack Query. [Docs](https://sigilry.org/packages/react) | Framework-agnostic SDK and picker usable in React. Dedicated React hooks package: **unknown** in inspected SDK docs. [Overview](https://docs.canton.network/sdks-tools/sdks/dapp-sdk/overview), [README](https://github.com/canton-network/wallet/blob/d8b41d9a375f66c994442f20c930c83653559b07/sdk/dapp-sdk/README.md) | Hooks/components; separate TanStack Query entry point. [React](https://github.com/PartyLayer/PartyLayer/blob/c0d6ddd9caa44e508d53b1586638011dbc6ee0a5/packages/react/README.md) | Typed application SDK. Dedicated React hooks package: **unknown** in inspected README/exports. [README](https://unpkg.com/@console-wallet/dapp-sdk@2.4.0/README.md), [types](https://unpkg.com/@console-wallet/dapp-sdk@2.4.0/dist/esm/index.d.ts) | | Ledger reads / application data | `ledgerApi`; React ledger and active-contract hooks. [dApp](https://sigilry.org/packages/dapp), [React](https://sigilry.org/packages/react) | Wallet-session JSON Ledger API proxy. [Overview](https://docs.canton.network/sdks-tools/sdks/dapp-sdk/overview) | Native-provider `ledgerApi`; legacy bridge differs. Query hooks wrap application-supplied fetchers. [README](https://github.com/PartyLayer/PartyLayer/blob/c0d6ddd9caa44e508d53b1586638011dbc6ee0a5/README.md), [React](https://github.com/PartyLayer/PartyLayer/blob/c0d6ddd9caa44e508d53b1586638011dbc6ee0a5/packages/react/README.md) | `ledgerApi`, contract, balance, and history methods. [README](https://unpkg.com/@console-wallet/dapp-sdk@2.4.0/README.md), [types](https://unpkg.com/@console-wallet/dapp-sdk@2.4.0/dist/esm/index.d.ts) | | Daml types / action abstraction | CLI wraps alpha DAR-to-TypeScript tooling; inspected source requires Java and pins the DPM SDK. Generated choice-action workflow: **unknown** as a shipped end-to-end integration here. [CLI](https://sigilry.org/packages/cli), [codegen](https://github.com/sigilry/sigilry/blob/c264b6e83b43f4c18818609bf8d8daaf1d7751fd/packages/cli/src/codegen.ts), [config](https://github.com/sigilry/sigilry/blob/c264b6e83b43f4c18818609bf8d8daaf1d7751fd/packages/cli/src/config.ts) | Typed SDK calls. Automatic DAR-to-typed create/exercise binding generation: **unknown** in inspected SDK README. [README](https://github.com/canton-network/wallet/blob/d8b41d9a375f66c994442f20c930c83653559b07/sdk/dapp-sdk/README.md) | `requestTransfer` intent API, gated by wallet capability. Generic generated DAR choice bindings: **unknown** in this transfer guide. [Transfer guide](https://github.com/PartyLayer/PartyLayer/blob/c0d6ddd9caa44e508d53b1586638011dbc6ee0a5/docs/typed-transfer.md) | Typed request/response exports. Automatic DAR-to-typed choice binding generation: **unknown** in inspected README. [README](https://unpkg.com/@console-wallet/dapp-sdk@2.4.0/README.md) | | Account / status / transaction updates | Provider events and React subscription helpers. [dApp](https://sigilry.org/packages/dapp), [React](https://sigilry.org/packages/react) | Status, account, and transaction subscriptions. [README](https://github.com/canton-network/wallet/blob/d8b41d9a375f66c994442f20c930c83653559b07/sdk/dapp-sdk/README.md) | Provider and client events, plus the legacy provider bridge. [Provider](https://github.com/PartyLayer/PartyLayer/blob/c0d6ddd9caa44e508d53b1586638011dbc6ee0a5/packages/provider/README.md), [README](https://github.com/PartyLayer/PartyLayer/blob/c0d6ddd9caa44e508d53b1586638011dbc6ee0a5/README.md) | Account, connection, and transaction callbacks. [README](https://unpkg.com/@console-wallet/dapp-sdk@2.4.0/README.md) | Console documents wallet-side encryption/decryption and batch transaction signing. [Console README](https://unpkg.com/@console-wallet/dapp-sdk@2.4.0/README.md). Message signing is also documented by [Sigilry](https://sigilry.org/packages/dapp), [DA](https://docs.canton.network/sdks-tools/sdks/dapp-sdk/overview), and [PartyLayer](https://github.com/PartyLayer/PartyLayer/blob/c0d6ddd9caa44e508d53b1586638011dbc6ee0a5/README.md); this table does not compare algorithms or encodings. Include Console’s additional signing APIs in an evaluation when the application needs them. ## Choose by required surface The following fit guidance is an editorial interpretation of the documented surfaces, not a result of comparative testing: * Evaluate **Sigilry** when the application needs explicit typed RPC/provider building blocks, custom transports, and its React layer. [dApp](https://sigilry.org/packages/dapp), [transports](https://sigilry.org/concepts/transports), [React](https://sigilry.org/packages/react). * Evaluate **DA’s official SDK** when the framework-independent wallet picker and remote-wallet adapters fit the onboarding flow. Its Web Component supplies a documented UI without requiring React-specific hooks. [Canton introduction](https://www.canton.network/blog/scaling-canton-apps-with-a-standard-for-wallet-and-app-interoperability), [README](https://github.com/canton-network/wallet/blob/d8b41d9a375f66c994442f20c930c83653559b07/sdk/dapp-sdk/README.md), [discovery](https://docs.canton.network/sdks-tools/sdks/dapp-sdk/guides/wallet-discovery). * Evaluate **PartyLayer** when the native provider, adapter bridge, and ready-made React modal/button fit. Select the native or bridge path deliberately: the inspected README documents different async and ledger behavior. [Provider](https://github.com/PartyLayer/PartyLayer/blob/c0d6ddd9caa44e508d53b1586638011dbc6ee0a5/packages/provider/README.md), [README](https://github.com/PartyLayer/PartyLayer/blob/c0d6ddd9caa44e508d53b1586638011dbc6ee0a5/README.md), [React](https://github.com/PartyLayer/PartyLayer/blob/c0d6ddd9caa44e508d53b1586638011dbc6ee0a5/packages/react/README.md). * Evaluate **Console’s SDK** for Console-specific accounts, queries, mobile QR/deep links, and its additional signing/encryption APIs. [README](https://unpkg.com/@console-wallet/dapp-sdk@2.4.0/README.md). ## Separate SDK capability from wallet capability An adapter or transport does not establish that every wallet supports every method or network. PartyLayer explicitly gates typed transfers by wallet capability; DA documents adapter registration and discovery configuration. [PartyLayer transfer guide](https://github.com/PartyLayer/PartyLayer/blob/c0d6ddd9caa44e508d53b1586638011dbc6ee0a5/docs/typed-transfer.md), [DA discovery](https://docs.canton.network/sdks-tools/sdks/dapp-sdk/guides/wallet-discovery). For the actual package, wallet version, and network, record the results of this integration checklist: 1. Discover/select the intended wallet and connect. 2. Observe account, network, and connection changes. 3. Read application data through the intended ledger path. 4. Request and verify a signed message using that wallet’s documented algorithm, encoding, and key authorization rules. 5. Handle user rejection and unsupported methods. 6. Submit a representative transaction and observe completion or failure. 7. Tear down listeners, disconnect, and test session restoration where offered. This checklist is proposed verification work; no results are asserted for the four SDKs here. A reproducible integration recipe should pin the package, wallet, and network versions and report these outcomes after it has been run. ## Understand the type boundary Typed RPC envelopes, generated Daml record types, and generated action functions are separate layers. Sigilry documents typed provider/RPC calls and a CLI wrapping `dpm codegen-alpha-typescript`. Those sources alone do not establish a shipped workflow that generates a choice action from a DAR and executes it through a wallet. PartyLayer’s documented transfer intent is another abstraction: the wallet receives a transfer request, subject to capability support. [Sigilry dApp](https://sigilry.org/packages/dapp), [CLI](https://sigilry.org/packages/cli), [codegen](https://github.com/sigilry/sigilry/blob/c264b6e83b43f4c18818609bf8d8daaf1d7751fd/packages/cli/src/codegen.ts), [PartyLayer transfers](https://github.com/PartyLayer/PartyLayer/blob/c0d6ddd9caa44e508d53b1586638011dbc6ee0a5/docs/typed-transfer.md). ## Sources and corrections Capabilities change. Use the versioned metadata and pinned sources linked above, alongside current maintainer documentation. Send corrections with the relevant package version, public source, and a reproducible example through the [public Sigilry issue tracker](https://github.com/sigilry/sigilry/issues). # Architecture > How Sigilry components fit together across dApp and wallet. Sigilry implements [CIP-103](https://github.com/canton-foundation/cips/blob/main/cip-0103/cip-0103.md) — Canton Network’s dApp API standard — as a thin, typed layer between dApps and wallet extensions. The primary contract is JSON-RPC over a transport such as `postMessage`, with method names, params, results, and event semantics fixed by the CIP-103 OpenRPC schema. See [CIP-103 Conformance](../cip-103-conformance/) for the per-method conformance status. ## System diagram ```plaintext dApp UI -> @sigilry/react (hooks) or @sigilry/dapp (provider) -> WindowTransport (postMessage) or WalletConnectTransport -> Wallet extension (RPC server) -> Canton Ledger API / DAML Developer tooling -> @sigilry/cli (DAML DAR to TypeScript types) ``` ## Responsibilities * **dApp**: Calls `request({ method, params })` on `window.canton` or on a provider obtained through [discovery](../discovery/), and reacts to CIP-103 events. * **Provider**: Implements the CIP-103 dApp API. Object shape (`request`, `on`, `removeListener`) follows the EIP-1193 pattern that CIP-103 adopts. * **RPC server**: Validates params with Zod schemas generated from the CIP-103 OpenRPC spec and routes to handlers. * **Transport**: Moves requests and responses between contexts. * **Schemas**: Generated from the CIP-103 OpenRPC spec and used for runtime validation. ## Data flow 1. dApp sends JSON-RPC request to the provider. 2. Transport serializes the message (for example, `postMessage`). 3. Extension receives the request and routes it through `createCantonServer`. 4. The server validates params and calls the handler. 5. Response is returned to the dApp. Results are typed from the generated schemas but are not runtime-validated on receipt (see [CIP-103 Conformance](../cip-103-conformance/#per-method-conformance)). ## Versioning and specs * `CANTON_DAPP_API_VERSION` exposes the CIP-103 dApp API revision implemented by `@sigilry/dapp`. * The canonical CIP-103 OpenRPC schema lives at `packages/dapp/api-specs/openrpc-dapp-api.json`. * Zod schemas are generated into `packages/dapp/src/generated` from that OpenRPC source. * For per-method conformance status see [CIP-103 Conformance](../cip-103-conformance/). # CIP-103 Conformance > How Sigilry conforms to CIP-103, the Canton Network dApp API standard. Sigilry is a [CIP-103](https://github.com/canton-foundation/cips/blob/main/cip-0103/cip-0103.md)-compliant dApp connectivity library for Canton Network. This page is the citeable source of truth for what that means in practice: which CIP-103 methods sigilry implements, where the provider object, error codes, and event semantics come from in the spec, and any deviations from the normative text. This page is intended to be useful to two audiences: * **Humans**: reviewers, auditors, and dApp builders evaluating whether sigilry behaves as the spec mandates. * **Agents** (Claude Code, Codex, ChatGPT): copy-paste-ready facts about sigilry’s CIP-103 surface, with exact method names and links back to the canonical spec. ## What CIP-103 is CIP-103 — *dApp Connection API* — is the Canton Network standard governing how dApps connect to wallet extensions over JSON-RPC. It specifies: * The provider object exposed at `window.canton`, in the EIP-1193-derived shape (`request`, `on`, `removeListener`). * The full set of dApp-callable JSON-RPC methods (`status`, `connect`, `disconnect`, `isConnected`, `listAccounts`, `getPrimaryAccount`, `getActiveNetwork`, `prepareExecute`, `prepareExecuteAndWait`, `signMessage`, `ledgerApi`). * The CIP-103 §4.2.2 sync event set (`accountsChanged`, `statusChanged`, `txChanged`) plus the `connected` login-flow event. * Error code allocations adopted from EIP-1193 (provider errors, 4001/4100/4200/4900/4901) and EIP-1474 (server errors, -32000..-32099). * The rule that the OpenRPC JSON in [`hyperledger-labs/splice-wallet-kernel`](https://github.com/hyperledger-labs/splice-wallet-kernel) is the ground truth for the API surface where the prose and the schema diverge. **Status:** Approved. **Canonical source:** [github.com/canton-foundation/cips/blob/main/cip-0103/cip-0103.md](https://github.com/canton-foundation/cips/blob/main/cip-0103/cip-0103.md) ## Per-method conformance The table below lists every CIP-103 method, where the `@sigilry/dapp` handler lives, and the conformance status. “Pass” means: the method is implemented; its **params** are runtime-validated against the CIP-103 OpenRPC schema via the generated Zod schemas in `packages/dapp/src/generated/schemas.ts` (`packages/dapp/src/rpc/server.ts`); and the behavior matches the CIP-103 prose to the extent it is testable in isolation. Result shapes are typed via TypeScript and the generated schemas, but are **not** currently runtime-validated by the server before being returned, nor by the client on receipt. Closing that gap — bidirectional Zod validation plus a vendor-neutral CIP-103 interop harness — is Milestone 3 of the [sigilry development fund proposal](#interop-test-harness) below. | CIP-103 method | Sigilry surface | Status | | ------------------------- | -------------------------------------------- | ------ | | `status` | `client.status()` / `window.canton.request` | Pass | | `connect` | `client.connect()` / `window.canton.request` | Pass | | `disconnect` | `client.disconnect()` | Pass | | `isConnected` | `client.isConnected()` | Pass | | `getActiveNetwork` | `client.getActiveNetwork()` | Pass | | `listAccounts` | `client.listAccounts()` | Pass | | `getPrimaryAccount` | `client.getPrimaryAccount()` | Pass | | `prepareExecute` | `client.prepareExecute(req)` | Pass | | `prepareExecuteAndWait` | `client.prepareExecuteAndWait(req)` | Pass | | `signMessage` | `client.signMessage({ message })` | Pass | | `ledgerApi` | `client.ledgerApi(req)` | Pass | | `accountsChanged` (event) | `provider.on('accountsChanged', listener)` | Pass | | `txChanged` (event) | `provider.on('txChanged', listener)` | Pass | | `statusChanged` (event) | `provider.on('statusChanged', listener)` | Pass | | `connected` (event) | `provider.on('connected', listener)` | Pass | The OpenRPC source of truth for this table is `packages/dapp/api-specs/openrpc-dapp-api.json`. ## Provider object shape CIP-103 specifies the dApp-facing provider in the EIP-1193 object shape: a `request` method for JSON-RPC calls, plus an `on` / `removeListener` event API for the CIP-103 push events — the §4.2.2 sync events (`accountsChanged`, `statusChanged`, `txChanged`) plus the `connected` login-flow event. Sigilry implements this contract through the [`SpliceProvider`](../../api-reference/dapp/src/interfaces/spliceprovider/) interface in `@sigilry/dapp` and exposes it at `window.canton`. ```ts // Types `window.canton?: SpliceProvider`; optional because no wallet may be injected. import "@sigilry/dapp/browser-globals"; // Canonical CIP-103 call shape const status = await window.canton?.request({ method: "status" }); // Event subscription window.canton?.on("accountsChanged", (accounts) => { /* ... */ }); ``` ## Error codes CIP-103 normatively adopts: * **EIP-1193 provider error codes** (4001 user-rejected, 4100 unauthorized, 4200 unsupported-method, 4900 disconnected, 4901 chain-disconnected). * **EIP-1474 server error range** (-32000 through -32099). Sigilry exposes these as `RpcErrorCode` from `@sigilry/dapp`. See the [API reference](../../api-reference/dapp/src/type-aliases/rpcerrorcode/) for the full list and `packages/dapp/src/rpc/errors.ts` for the source. ## Known deviations from CIP-103 None at this revision. If a divergence is identified, it is filed against [canton-foundation/cips](https://github.com/canton-foundation/cips/issues) with a proposed amendment, and tracked here until resolved. ## Versioning `CANTON_DAPP_API_VERSION` (exported from `@sigilry/dapp`) records the CIP-103 dApp API revision that sigilry implements. The `@sigilry/dapp` package version itself follows changeset-managed semver independently — package bumps may ship without a CIP-103 revision change, but a CIP-103 revision change always coincides with a major or minor `@sigilry/dapp` bump. ```ts import { CANTON_DAPP_API_VERSION } from "@sigilry/dapp"; console.log(CANTON_DAPP_API_VERSION); // CIP-103 dApp API revision ``` ## Interop test harness A standalone, vendor-neutral CIP-103 interop harness — runnable against any conformant client — is planned as Milestone 3 of the sigilry development fund proposal. It is not yet published. When it lands, this page will link to: * The harness repository under a neutral home. * Sigilry’s most recent harness run (timestamp + commit + result). * The list of independent CIP-103 implementations the harness has been run against. Until then, conformance evidence is the per-method table above plus the test suite at `packages/dapp/__tests__/`. ## Production reference Sigilry is built and maintained by [Send](https://send.it) and runs in production powering Send’s Canton Network dApps. Production-pressure architectural decisions in `@sigilry/dapp` and `@sigilry/react` reflect what Send needed to ship real consumer flows on Canton Network — not what was theorized. ## Contributing conformance reports If you operate a CIP-103 implementation other than sigilry and want to publish a conformance report against the same OpenRPC schema, file an issue at [canton-foundation/cips](https://github.com/canton-foundation/cips/issues) referencing this page. # Provider Discovery > How dApps discover Send Connect and other Canton wallet providers, and how a discovered provider delivers CIP-103 push events. Provider discovery lets a dApp enumerate the Canton wallet providers available in the page and let the user pick one — instead of assuming a single injected `window.canton`. It is sigilry’s answer to the multi-wallet problem, modeled on [EIP-6963](https://eips.ethereum.org/EIPS/eip-6963) (multi-injected provider discovery) and adapted to Canton’s `window.canton` provider shape. Discovery is a sigilry extension, not CIP-103 [CIP-103](../cip-103-conformance/) standardizes the provider *object* (`window.canton`) and the JSON-RPC methods/events on it. It does **not** specify how a dApp finds providers when more than one is present. Discovery (`canton:announceProvider` / `canton:requestProvider`) is a sigilry convention layered on top. The **push events** those providers deliver, by contrast, *are* CIP-103 — the §4.2.2 sync events (`accountsChanged`, `statusChanged`, `txChanged`) plus the `connected` login event. Discovery and the event channel meet at the provider object. ## The handshake Discovery is a symmetric pair of `window` `CustomEvent`s, exactly like EIP-6963: 1. A wallet (browser extension) **announces** itself by dispatching `canton:announceProvider` carrying its detail. 2. A dApp **requests** providers by dispatching `canton:requestProvider`; every wallet listening re-announces in response. Because either side may load first, both events are always live: the dApp announces a request on mount, and wallets also announce eagerly on injection. The dApp accumulates whatever arrives. ```ts import { requestProviders } from "@sigilry/dapp/discovery"; // Listen for announcements and trigger a request for any wallet already present. const unsubscribe = requestProviders((detail) => { console.log("announced:", detail.rdns, detail.name); }); // Later, when the picker unmounts: unsubscribe?.(); ``` ## What a wallet announces vs. what a dApp sees A wallet announces a **flat detail** — `SpliceAnnounceDetail`: ```ts type SpliceAnnounceDetail = { id: string; // provider id (e.g. the extension id) name: string; // human label, e.g. "Send Connect" icon: `data:image/${string}`; // inline icon target: string; // the postMessage target the provider listens on rdns: string; // reverse-DNS identity, e.g. "it.send.connect" uuid: string; // stable per-announcement id }; ``` `rdns` and `uuid` are **required** on the published type — a wallet author must supply both. A pre-discovery wallet that announces without them is normalized at the store boundary instead (see [Fallback semantics](#fallback-semantics-announce-first)), not through the public type. The discovery store **normalizes** each detail on arrival into a `SpliceProviderInfo` and pairs it with a lazy provider factory — a `DiscoveredWallet`: ```ts type SpliceProviderInfo = { uuid: string; rdns: string; name: string; icon: `data:image/${string}`; }; type DiscoveredWallet = { info: SpliceProviderInfo; getProvider(opts?: TransportOptions): SpliceProvider; }; ``` `info.rdns` is the **lookup** key — `store.findProvider({ rdns })` resolves a wallet by it. The store **dedupes announcements by `info.uuid`**, not by `rdns`: two entries that share an `rdns` but differ in `uuid` can coexist unless a higher tier coalesces them. Well-known `rdns` values: | `rdns` | Meaning | | ----------------- | ---------------------------------------------------------------------------- | | `it.send.connect` | Send Connect (the reference wallet extension). | | `canton.injected` | The legacy `window.canton` exposed as a discovered wallet (fallback, below). | | `canton.legacy` | A pre-discovery wallet that announced without `rdns`/`uuid`; normalized. | ## Using the store directly For non-React consumers, drive discovery through the store: ```ts import { createDiscoveryStore } from "@sigilry/dapp/discovery"; const store = createDiscoveryStore(); // React to the live provider set; `emitImmediately` fires once with the current snapshot. const unsubscribe = store.subscribe( (wallets, meta) => { render(wallets); // wallets: readonly DiscoveredWallet[] console.log(meta?.added, meta?.removed); }, { emitImmediately: true }, ); // Look one up by identity, then build a live provider from it. const wallet = store.findProvider({ rdns: "it.send.connect" }); const provider = wallet?.getProvider(); // a SpliceProvider bound to that target // Teardown removes the window listeners. store.destroy(); ``` `getProvider(opts?)` is `createProvider(detail, opts)` under the hood: it constructs a `SpliceProvider` whose transport is bound to the announced `target`, so calls and events route to that specific wallet. The optional `opts` is a `TransportOptions` — pass a longer `timeout` for approval-gated calls (`prepareExecuteAndWait`, `signMessage`) that a user may take longer than the default 30s to approve; omit it to keep the 30s default. The announced `target` is always authoritative and cannot be overridden through `opts`. The `canton.injected` fallback (below) is the exception: its `getProvider()` returns the in-page `window.canton` object itself and ignores `opts`. ## Fallback semantics (announce-first) Discovery is **announce-first**, so it degrades cleanly for pages with a single legacy wallet: * If **any** provider announces, the store reflects exactly the announced set. * If **no** provider announces but `window.canton` is present, the store exposes it as a single `DiscoveredWallet` with `rdns: "canton.injected"` — so a dApp written against discovery still finds the injected wallet with no special-casing. * A wallet that announces without `rdns`/`uuid` (a pre-discovery build) is normalized to `rdns: "canton.legacy"` with a deterministic `uuid` derived from its `target`, so it stays discoverable and dedupes stably. This is why a dApp can adopt discovery unconditionally: the single-wallet and zero-discovery cases both resolve to a usable provider. ## Discovered providers deliver push events A provider obtained from an announced wallet is wired for the CIP-103 **push events** out of the box. `createProvider` (which `getProvider()` calls for announced wallets) attaches its `WindowTransport`’s inbound notification listener to the provider’s emitter, so events arrive through the standard `.on()` API. The subscription is lazy: it starts with the first listener and stops when the last one is removed. `SpliceProviderBase` does not do this on its own — a custom subclass must call the protected `attachEventTransport(transport)` once it has a transport. The CIP-103 §4.2.2 sync event set is `accountsChanged`, `statusChanged`, and `txChanged`; `connected` is an additional CIP-103 login-flow event (not one of the §4.2.2 three) that the same channel delivers: ```ts const provider = store.findProvider({ rdns: "it.send.connect" })?.getProvider(); provider?.on("statusChanged", (status) => { /* §4.2.2 ongoing status change */ }); provider?.on("accountsChanged", (accounts) => { /* §4.2.2 active-account / session change */ }); provider?.on("connected", (status) => { /* login-flow completion (login event, not §4.2.2) */ }); ``` Push frames are delivered over the same transport as requests, disambiguated by the JSON-RPC `id`: a request carries an `id`, a notification does not. Frames carrying a different `target` than the discovered provider’s are dropped, so a page with multiple wallets never cross-delivers events. See [CIP-103 Conformance](../cip-103-conformance/) for the normative event semantics. ## In React `@sigilry/react` wraps all of the above: [`useDiscovery()`](../../packages/react/#provider-discovery) returns the live `DiscoveredWallet[]`, `WalletPicker` renders the selection UI, and passing the chosen provider to `CantonReactProvider` via its controlled `provider` prop binds the rest of the hooks to that wallet. Push events surface as `onStatusChanged` / `onConnected` / `onAccountsChanged` subscriptions on `useCanton()`. ## See also * [`@sigilry/dapp`](../../packages/dapp/) — the discovery subpath and provider primitives. * [`@sigilry/react`](../../packages/react/) — `useDiscovery`, `WalletPicker`, controlled provider. * [CIP-103 Conformance](../cip-103-conformance/) — the §4.2.2 push-event contract. # RPC Protocol > JSON-RPC method contract, validation, and error handling. Sigilry uses JSON-RPC 2.0 for dApp to wallet communication. Methods and schemas are defined in OpenRPC and validated with Zod at runtime. ## Request and response shapes ```ts import type { JsonRpcRequest, JsonRpcResponse } from "@sigilry/dapp/messages"; const request: JsonRpcRequest = { jsonrpc: "2.0", id: "request-id", method: "status", }; const success: JsonRpcResponse = { jsonrpc: "2.0", id: "request-id", result: { /* method result */ }, }; const failure: JsonRpcResponse = { jsonrpc: "2.0", id: "request-id", error: { code: -32601, message: "Method not found" }, }; ``` ## Methods | Method | Params | Result | | ----------------------- | ---------------------------- | -------------------------------------- | | `status` | none | `StatusEvent` | | `connect` | none | `ConnectResult` | | `disconnect` | none | `null` | | `isConnected` | none | `ConnectResult` | | `getActiveNetwork` | none | `Network` | | `listAccounts` | none | `Wallet[]` | | `getPrimaryAccount` | none | `Wallet` | | `prepareExecute` | `JsPrepareSubmissionRequest` | `null` | | `prepareExecuteAndWait` | `JsPrepareSubmissionRequest` | `{ tx: TxChangedExecutedEvent }` | | `signMessage` | `{ message: string }` | `SignMessageResult` | | `ledgerApi` | `LedgerApiRequest` | `Record \| unknown[]` | `SignMessageResult` always carries `signature` and may carry optional `signedBy`, `publicKey`, `signingAlgorithmSpec`, `format`, and `encoding` fields; see [`@sigilry/dapp`](../../packages/dapp/#generated-schemas). Event methods are defined in the OpenRPC spec but delivered as provider events: * `accountsChanged` * `txChanged` * `statusChanged` — CIP-103 §4.2.2 provider status transitions; disconnects route through here per §4.2.2:216 * `connected` — CIP-103 login-flow completion event (not one of the §4.2.2 three); identical payload to `statusChanged` ## Error handling `@sigilry/dapp` exposes common error codes via `RpcErrorCode` and helpers like `rpcError`. ```ts import "@sigilry/dapp/browser-globals"; import { RpcClientError } from "@sigilry/dapp"; async function getStatus() { if (!window.canton) throw new Error("No Canton wallet injected"); try { return await window.canton.request({ method: "status" }); } catch (err) { const parsed = RpcClientError.fromError(err); console.error(parsed.code, parsed.message); throw parsed; } } getStatus(); ``` ## Validation `createCantonServer` validates params using Zod schemas generated from OpenRPC. Invalid params return `RpcErrorCode.INVALID_PARAMS` with a concise error message. # Transports > The transport layer that moves JSON-RPC between dApps and wallets. Transports are responsible for delivering JSON-RPC requests and responses between the dApp and the wallet extension. ## Core interface ```ts import type { RequestPayload, ResponsePayload } from "@sigilry/dapp/messages"; export interface RpcTransport { submit(payload: RequestPayload): Promise; } ``` ## WindowTransport `WindowTransport` uses `window.postMessage` for cross-context communication. ```ts import { createCantonClient, WindowTransport } from "@sigilry/dapp"; async function getStatus() { const transport = new WindowTransport(window, { timeout: 30000, targetOrigin: "*", }); const client = createCantonClient(transport); return await client.status(); } getStatus().then(console.log); ``` ### Options * `timeout`: request timeout in milliseconds (default `30000`). * `targetOrigin`: `postMessage` target origin (default `*`). * `target`: optional routing key that addresses one wallet extension when several are installed (default unset). Providers from [discovery](../discovery/) set it from the wallet’s announcement. ## WalletConnectTransport `WalletConnectTransport` carries the same JSON-RPC surface over the WalletConnect relay instead of `postMessage`, for WalletConnect-capable Canton wallets (cross-device, no extension). It requires a WalletConnect Cloud `projectId` and dApp `metadata`; see the [API reference](../../api-reference/dapp/src/classes/walletconnecttransport/) for the full `WalletConnectTransportConfig`. ## Custom transports `@sigilry/dapp` ships only `WindowTransport` and `WalletConnectTransport`. For other environments (HTTP, WebSocket, iframe bridges), implement `RpcTransport` yourself. A minimal HTTP example: ```ts import type { RequestPayload, ResponsePayload } from "@sigilry/dapp/messages"; import type { RpcTransport } from "@sigilry/dapp/transport"; export class HttpTransport implements RpcTransport { constructor(private readonly baseUrl: string) {} async submit(payload: RequestPayload): Promise { const response = await fetch(`${this.baseUrl}/rpc`, { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify(payload), }); if (!response.ok) { throw new Error(`HTTP ${response.status}`); } return (await response.json()) as ResponsePayload; } } ``` # Migrations > Release cadence, versioning policy, and per-version migration guides for Sigilry packages. Sigilry’s dApp RPC contract evolves alongside [CIP-0103](https://github.com/canton-foundation/cips/blob/main/cip-0103/cip-0103.md) and downstream implementations. This section tracks breaking changes and gives consumers a concrete migration path per release line. ## Release cadence Each published package follows semver, but the way we cut versions differs by maturity: | Package | Line | dist-tag | Stability | | -------------------------- | ----- | -------- | ------------------------------------------------------------------------- | | `@sigilry/dapp` | `3.x` | `latest` | **Stable** — additive changes are minors; breaking changes bump the major | | `@sigilry/react` | `3.x` | `latest` | **Stable** — tracks `@sigilry/dapp` (majors move together) | | `@sigilry/canton-json-api` | `1.x` | `latest` | Stable on wire shape; new endpoints are additive | | `@sigilry/cli` | `0.x` | `latest` | Pre-1.0; breaking changes bump `0.MINOR` | | `@sigilry/splice-dars` | `0.x` | `latest` | Tracks a vendored Splice release; bumps with upstream | ### Versioning policy (`@sigilry/dapp`, `@sigilry/react`) `@sigilry/dapp` and `@sigilry/react` ship on the `latest` dist-tag and move together — a `@sigilry/dapp` major is matched by a `@sigilry/react` major. Install the stable line directly: ```bash yarn add @sigilry/dapp@^3 @sigilry/react@^3 ``` The `next` dist-tag carries the frozen `2.0.0-next.*` pre-release line from early development and is **no longer updated**; all new work lands on `latest`. Within a stable major, minors are additive (new hooks, exports, subpaths, optional props) and patches are fixes; the next breaking change cuts the following major. ### When to expect a break * CIP-0103 spec changes in `hyperledger-labs/splice-wallet-kernel` that we track. * Ledger API wire shape changes in Canton’s JSON API v2. * Internal shape changes in provider types, ConnectionState, or event payloads that only become observable once we move off the pre-release series. ### What is **not** a break * Added optional hook options, new exported types, or new RPC methods that older wallets return `-32601` for. * Bug fixes that make implementations match the existing documented contract. ## Migration guides Start at the guide for your current version and apply each subsequent guide in order. * [`1.x → 2.0`](./v1-to-v2/) — CIP-0103 alignment, EIP-6963-style discovery, nested `StatusEvent`, `ConnectResult`, `isConnected`, `ledgerApi` contract rewrite, command-atom payloads. * [`2.x → 3.0`](./v2-to-v3/) — `latest` promotion off the `next` pre-release line, the `statusChanged`/`connected` push events on the provider, the `@sigilry/dapp/discovery` subpath, and `@sigilry/react` discovery hooks + controlled provider. ## Canton-Send specific notes dApps integrating against the **Send Connect** wallet extension should also read [Connect to Send Connect testnet](../guides/send-connect-testnet/) for its network settings and API gateway behavior, which are layered on top of the Sigilry contract. # 1.x → 2.0 migration > Breaking changes in @sigilry/dapp and @sigilry/react 2.0 — CIP-0103 alignment, EIP-6963-style discovery, ledgerApi contract rewrite. This guide covers every breaking change between `@sigilry/dapp@1.0.1` / `@sigilry/react@1.0.3` (last `1.x` releases) and the `2.0.0-next.*` pre-release line. Apply every section that is relevant to your integration. ## tl;dr — action items 1. **`connect()` now returns `ConnectResult`**, not `StatusEvent`. If you read `.provider`, `.network`, `.session`, or `.connection` off the `connect()` return value, replace those reads with a follow-up `provider.request({ method: "status" })` call. 2. **New method `isConnected()`** — returns `ConnectResult` without user interaction. Safe to feature-detect; calling it on older wallet builds throws `-32601` “method not found”. 3. **Discovery is now EIP-6963-style** — listen for `canton:announceProvider`, dispatch `canton:requestProvider`. `window.canton` is still injected for backward compatibility. 4. **Multi-wallet `target` routing** — each announcement carries a `target`; the injected provider tags requests with it so peer wallets can drop messages that aren’t for them. 5. **`ledgerApi` contract rewrite** — `requestMethod` is a lowercase enum, bodies are plain objects (not JSON strings), and the return value is the raw Canton payload (not `{response: ""}`). 6. **`prepareExecute` command atoms** — `commands: [{CreateCommand: {templateId, createArguments}}]` in PascalCase, matching the Canton Ledger API wire shape. `choice` replaces `choiceName` in `ExerciseCommand`. 7. **`ExerciseChoiceRequest.choice`** — renamed from `choiceName`. 8. **`StatusEvent`/`Provider` rename** — `providerType` replaces `clientType` in `Provider`. *** ## 1. `connect()` return type ### Before (1.x) ```ts const result = await provider.connect(); // result.provider: Provider // result.connection: ConnectResult // result.network?: Network // result.session?: Session ``` ### After (2.x) ```ts const result = await provider.request({ method: "connect" }); // result: ConnectResult // - isConnected: boolean // - isNetworkConnected: boolean // - reason?: string // - networkReason?: string // - userUrl?: string ``` ### Migration ```ts // Old const { connection, provider: p, network, session } = await provider.connect(); if (connection.isConnected) useIt(p, network, session); // New const connectResult = await provider.request({ method: "connect" }); if (connectResult.isConnected) { const { provider: p, network, session } = await provider.request({ method: "status" }); useIt(p, network, session); } ``` Tracks CIP-0103 as shipped upstream in [`splice-wallet-kernel` PR #1609](https://github.com/hyperledger-labs/splice-wallet-kernel/pull/1609). ## 2. `isConnected()` — new method Returns the same `ConnectResult` as `connect()` without triggering any user interaction. Useful after `disconnect()` or on page load. ```ts const { isConnected, isNetworkConnected } = await provider.request({ method: "isConnected", }); ``` Feature-detect for older wallet builds: ```ts try { const r = await provider.request({ method: "isConnected" }); } catch (err) { if (err.code === -32601 /* Method not found */) { // Older wallet — fall back to (await provider.request({ method: "status" })).connection.isConnected } } ``` ## 3. Provider discovery — EIP-6963-style The wallet now dispatches a `canton:announceProvider` CustomEvent at `document_start` with detail: ```ts type AnnounceDetail = { id: string; // equal to browser.runtime.id for this extension name: string; icon?: string; // data: URL or https URL target: string; // used by the SDK to route messages to the right wallet }; ``` In 3.x the published `SpliceAnnounceDetail` also requires `rdns` and `uuid`, and `icon` is a required `data:image/…` URL; see [Provider Discovery](../../concepts/discovery/). dApps that want to enumerate installed wallets should listen for the event and/or dispatch `canton:requestProvider` to ask all wallets to re-announce: ```ts const wallets = new Map(); window.addEventListener("canton:announceProvider", (e: any) => { wallets.set(e.detail.id, e.detail); }); window.dispatchEvent(new CustomEvent("canton:requestProvider")); // After a tick, `wallets` contains every Canton wallet on the page. ``` `window.canton` continues to be injected for dApps that don’t use the announcement flow. ## 4. Multi-wallet `target` routing Each announced wallet carries a `target` equal to that extension’s `browser.runtime.id`. The injected provider passes that value into `WindowTransport.target`, and the content script only forwards messages whose `target` matches its own extension id. Messages with no `target` are still accepted for legacy dApps. For dApp developers: * If you use the announcement flow in §3, capture the `target` field from each `canton:announceProvider` event and treat it as the wallet selector. * If you call a single injected `window.canton` provider directly, no extra work is required; the provider tags requests automatically. * If your dApp supports multiple wallets simultaneously, construct a separate `@sigilry/dapp` `WindowTransport` per wallet and pass the chosen `target` through `TransportOptions`. When multiple wallets are installed, `window.canton` remains a compatibility surface and the last injected provider can win the global name. The announcement flow plus `target` routing is the stable selection mechanism. ## 5. `ledgerApi` contract The JSON-RPC `ledgerApi` method was rewritten to match the canonical CIP-0103 shape. Three things changed on the wire. If you call `ledgerApi` directly, or consume `@sigilry/react` hooks that call it (`useLedgerEnd`, `useLedgerUpdates`, `useActiveContracts`, `useContractStream`), you must upgrade: the `1.x` hooks and the `1.x` request shape are silently rejected by 2.x wallets. ### 5.1 `requestMethod` is a lowercase enum The CIP-0103 `LedgerApiRequestSchema` validates `requestMethod` as `z.enum(['get', 'post', 'patch', 'put', 'delete'])`. Uppercase values are rejected with `-32602 Invalid params`. ```ts // Before (1.x) — silently fails on 2.x wallets await provider.request({ method: "ledgerApi", params: { requestMethod: "GET", resource: "/v2/state/ledger-end" }, }); // After (2.x) await provider.request({ method: "ledgerApi", params: { requestMethod: "get", resource: "/v2/state/ledger-end" }, }); ``` ### 5.2 `body` is a plain object In `1.x` some integrations pre-stringified `body` as a JSON string to preserve `int64` precision. In `2.x` the wallet accepts plain objects and forwards them to the Canton JSON API; the SDK’s `buildUpdatesFlatsRequestBody` / `buildActiveContractsRequestBody` now return objects with decimal-string offsets to keep precision without double-serialization. ```ts // Before (1.x) await provider.request({ method: "ledgerApi", params: { requestMethod: "post", resource: "/v2/updates/flats", body: `{"beginExclusive":${offset},"updateFormat":${JSON.stringify(updateFormat)}}`, }, }); // After (2.x) await provider.request({ method: "ledgerApi", params: { requestMethod: "post", resource: "/v2/updates/flats", body: { beginExclusive: offset, updateFormat }, }, }); ``` ### 5.3 Return value is the raw Canton payload `LedgerApiResult` is now the parsed JSON response from Canton — not `{response: ""}`. Parse the payload directly. ```ts // Before (1.x) const result = await provider.request({ method: "ledgerApi", params: { /* ... */ }, }); if (result?.response) { const parsed = JSON.parse(result.response); // ← wrapper no longer exists useOffset(parsed.offset); } // After (2.x) const result = await provider.request({ method: "ledgerApi", params: { requestMethod: "get", resource: "/v2/state/ledger-end" }, }); // result is the Canton payload itself: Record | unknown[] if (!Array.isArray(result)) useOffset(result.offset); ``` This matches upstream `splice-wallet-kernel/core/wallet-gateway/*/src/dapp-api/controller.ts` and the CIP-0103 `LedgerApiResult` schema (`{additionalProperties: true}` — an arbitrary JSON record, no mandatory `response` key). > **If you were on `@sigilry/react@1.0.3`**, all three issues are already fixed in `2.0.0-next.*`. The `1.0.3` dist shipped uppercase methods, stringified bodies, and `result?.response` unwrapping; errors were swallowed by a blanket `catch {}` inside the hooks, leaving `currentOffset` undefined forever. Upgrade to `2.0.0-next.*` or consume via a yarn patch that refreshes the dist. ## 6. `prepareExecute` / `prepareExecuteAndWait` command atoms The request body uses CIP-0103 Command atoms in PascalCase, matching the Canton Ledger API wire form: ```ts await provider.request({ method: "prepareExecute", params: { commands: [ { CreateCommand: { templateId: "...", createArguments: { /* ... */ }, }, }, ], // optional: commandId, actAs, readAs, disclosedContracts, // synchronizerId, packageIdSelectionPreference }, }); ``` Supported atoms: `CreateCommand`, `ExerciseCommand`, `CreateAndExerciseCommand`, `ExerciseByKeyCommand`. > **Record shape tip.** The Send Canton Wallet api-gateway includes a record-encoding shim that accepts plain JS Daml records and converts them into protobuf `RecordJson` before submission. You do not need to pre-serialize records as `{fields: [{label, value}, ...]}`. This shim is Send-specific; other wallets may require the strict shape. ## 7. `ExerciseChoiceRequest` — `choice` replaces `choiceName` The React hook `useExerciseChoice` (and the underlying RPC params) uses `choice` instead of `choiceName` to match the Canton Ledger API `ExerciseCommand` wire field. ```tsx // Before (1.x) exerciseChoice({ contractId, choiceName: "Archive", choiceArgument: {} }); // After (2.x and later) const { exercise } = useExerciseChoice(); exercise({ contractId, templateId, choice: "Archive", choiceArgument: {} }); ``` ## 8. `Provider.providerType` replaces `clientType` `StatusEvent.provider.clientType` is now `providerType` in the CIP-0103 schema, and the `required` list correctly references the renamed field. ```ts // Before const { clientType } = status.provider; // After const { providerType } = status.provider; ``` *** ## Audited compatibility (unchanged types) The Phase 2 S3 audit compared the pinned upstream OpenRPC schema, the `@sigilry/dapp` runtime schemas, and the webext controller emissions. The following RPC methods and types keep their `1.x` wire shape in `2.x`: * `status`, `disconnect`, `getActiveNetwork`, `accountsChanged`, `getPrimaryAccount`, `listAccounts`, `txChanged` — method shape unchanged. * `Wallet` — return shape from `status()`, `getPrimaryAccount()`, and account-listing flows is unchanged. * `Network` — `networkId` / optional `ledgerApi` / optional `accessToken` unchanged. * `SignMessageRequest` / `SignMessageResult` — unchanged (webext still guards empty-string `message` at runtime). * `AccountsChangedEvent` — subscription payloads unchanged. * `ListAccountsResult` — unchanged. ### Known rough edges (strict validators only) * `TxChangedEvent.completionOffset` / `TxChangedExecutedEvent.completionOffset` — accepted any numeric value on the 2.0 pre-release line. The current generated schemas validate it as an integer (`z.number().int()`). * `DisclosedContract` entries — forwarded opaquely today; test your `prepareExecute*` flows against the specific wallet until explicit field handling lands. ## Error handling Standard JSON-RPC 2.0 error codes: | Code | Meaning | | ------ | ---------------- | | -32600 | Invalid Request | | -32601 | Method not found | | -32602 | Invalid params | | -32603 | Internal error | If you see `-32602 Invalid params` with a message mentioning `requestMethod` or `commands: Invalid input`, you are hitting §5.1 or §6 respectively. # 2.x → 3.0 > Moving from the @sigilry/dapp / @sigilry/react 2.x pre-release line to the stable 3.x line — push events, discovery, and the one breaking change for wallet implementers. The `3.0` line promotes `@sigilry/dapp` and `@sigilry/react` off the `next` pre-release tag onto the stable `latest` line, completes the CIP-103 §4.2.2 push-event surface, and (in `3.1`) adds provider discovery. **For most dApp consumers, 2 → 3 is additive** — the one hard break only affects code that *subclasses* `SpliceProviderBase` or constructs an object-literal `CantonContextValue`. ## Install The 2.x series lived on the `next` dist-tag (`2.0.0-next.*`). The 3.x line is on `latest`: ```bash yarn add @sigilry/dapp@latest @sigilry/react@latest ``` Use `@sigilry/react@>=3.1.1` `@sigilry/react@3.1.0` shipped with an unresolved `workspace:^` dependency on `@sigilry/dapp` and is uninstallable. Use `3.1.1` or later — it pins the dependency to a real range. `@sigilry/dapp@3.1.0` is unaffected. ## Breaking changes ### `SpliceProviderBase` — `setConnected()` removed (wallet implementers) If you subclass `SpliceProviderBase` to build a provider/wallet, the `protected setConnected(boolean)` helper is gone. It emitted bare `"connect"` / `"disconnect"` event names with no payload, which predates and violates CIP-103 §4.2.2 (wrong event name, missing `StatusEvent` payload, and `disconnect` isn’t a CIP-103 event — disconnect signals flow through `statusChanged`). Replace it with the two typed emitters, which also keep `isConnected()` in sync from `payload.connection.isConnected`: ```ts // Before (2.x) this.setConnected(true); this.setConnected(false); // After (3.x) this.emitConnected(connectedEvent); // login-flow completion (ConnectedEvent) this.emitStatusChanged(statusEvent); // ongoing status, incl. disconnect (StatusChangedEvent) ``` Both payloads are `allOf StatusEvent`, so they carry the same shape as the `status` RPC result. A subscriber audit at release found **zero** external consumers of `provider.on('connect', …)` / `provider.on('disconnect', …)`, so dApps listening for events are unaffected — but update any custom provider subclass and replace `connect`/`disconnect` listeners with `connected` / `statusChanged`. ### `CantonContextValue` — two new required members (mock authors) `CantonContextValue` gains two **required** members, `onStatusChanged` and `onConnected`, following the same `(handler) => () => void` registration pattern as the existing `onTxChanged`. This only breaks code that builds an object-literal implementation/mock of `CantonContextValue`; consumers of `useCanton()` are unaffected (they gain two methods). ```ts // Mocks must now include: const ctx: CantonContextValue = { /* …existing members… */ onStatusChanged: (handler) => () => {}, onConnected: (handler) => () => {}, }; ``` ## New in 3.x (additive) * **Push events** (`3.0`, `@sigilry/dapp`): `statusChanged` (a CIP-103 §4.2.2 sync event) and `connected` (the CIP-103 login-flow event) join the existing `accountsChanged` / `txChanged` on `provider.on()`. See [CIP-103 Conformance](../../concepts/cip-103-conformance/). * **Discovery subpath** (`3.1`, `@sigilry/dapp`): `@sigilry/dapp/discovery` exposes `requestProviders`, `announceProvider`, `createDiscoveryStore`, and `createProvider`, plus inbound transport notification support so discovered providers deliver push events automatically. See [Provider Discovery](../../concepts/discovery/). * **React discovery** (`3.1`, `@sigilry/react`): `useDiscovery`, `WalletPicker`, and a controlled `provider` prop on `CantonReactProvider`, plus `onStatusChanged` / `onConnected` subscriptions on `useCanton()`. None of these require changes to existing code — adopt them when you want multi-wallet selection or to observe push events directly. ## Checklist * [ ] Move installs from `@next` / `2.0.0-next.*` to `@latest` (`@sigilry/react@>=3.1.1`). * [ ] If you subclass `SpliceProviderBase`: replace `setConnected()` with `emitConnected()` / `emitStatusChanged()`. * [ ] If you mock `CantonContextValue`: add `onStatusChanged` and `onConnected`. * [ ] Replace any `provider.on('connect'|'disconnect', …)` listeners with `connected` / `statusChanged`. * [ ] (Optional) Adopt discovery via `useDiscovery` + `WalletPicker` for multi-wallet support. # defineConfig > **defineConfig**(`config`): [`SigilryConfig`](api-reference/cli/src/interfaces/sigilryconfig/) Defined in: [packages/cli/src/config.ts:73](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/cli/src/config.ts#L73) Type-safe helper for defining configuration. ## Parameters ### config [`SigilryConfig`](api-reference/cli/src/interfaces/sigilryconfig/) ## Returns [`SigilryConfig`](api-reference/cli/src/interfaces/sigilryconfig/) ## Example ```ts import { defineConfig } from '@sigilry/cli/config' export default defineConfig({ dars: ['./splice-wallet.dar'], output: './src/generated', }) ``` # generateTypes > **generateTypes**(`config`): `Promise`<`CodegenResult`> Defined in: [packages/cli/src/codegen.ts:71](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/cli/src/codegen.ts#L71) Generate TypeScript types from DAR files. ## Parameters ### config `Required`<[`SigilryConfig`](api-reference/cli/src/interfaces/sigilryconfig/)> Resolved configuration ## Returns `Promise`<`CodegenResult`> Result of the codegen operation # loadConfig > **loadConfig**(`configPath?`): `Promise`<`LoadedConfig`> Defined in: [packages/cli/src/loader.ts:66](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/cli/src/loader.ts#L66) Load and parse a sigilry config file. Supports TypeScript (.ts, .mts) and JavaScript (.js, .mjs) configs. TypeScript files are loaded using tsx/register or similar loaders that the user has configured in their project. ## Parameters ### configPath? `string` Path to the config file (optional, will search if not provided) ## Returns `Promise`<`LoadedConfig`> ## Throws Error if config file not found or invalid # resolveConfig > **resolveConfig**(`userConfig`): `Required`<[`SigilryConfig`](api-reference/cli/src/interfaces/sigilryconfig/)> Defined in: [packages/cli/src/config.ts:90](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/cli/src/config.ts#L90) Merge user config with defaults ## Parameters ### userConfig [`SigilryConfig`](api-reference/cli/src/interfaces/sigilryconfig/) ## Returns `Required`<[`SigilryConfig`](api-reference/cli/src/interfaces/sigilryconfig/)> # watchDars > **watchDars**(`config`, `onChange?`): () => `void` Defined in: [packages/cli/src/codegen.ts:149](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/cli/src/codegen.ts#L149) Watch DAR files and regenerate types on changes. ## Parameters ### config `Required`<[`SigilryConfig`](api-reference/cli/src/interfaces/sigilryconfig/)> Resolved configuration ### onChange? (`result`) => `void` Callback when regeneration completes ## Returns Cleanup function to stop watching > (): `void` ### Returns `void` # SigilryConfig Defined in: [packages/cli/src/config.ts:23](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/cli/src/config.ts#L23) CLI configuration options ## Properties ### cleanup? > `optional` **cleanup**: `boolean` Defined in: [packages/cli/src/config.ts:40](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/cli/src/config.ts#L40) Clean output directory before generating. Defaults to true. *** ### dars > **dars**: `string`\[] Defined in: [packages/cli/src/config.ts:28](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/cli/src/config.ts#L28) Path(s) to DAR files to generate types from. Can be absolute or relative to the config file location. *** ### dpmSdkVersion? > `optional` **dpmSdkVersion**: `string` Defined in: [packages/cli/src/config.ts:57](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/cli/src/config.ts#L57) dpm SDK version to pin codegen to. The `codegen-alpha-typescript` generator only ships through dpm SDK 3.4.9; newer SDKs dropped the alpha component (see sigilry-private#54). Defaults to the pinned version; override only if you know a different SDK still provides the generator. An explicit `DPM_SDK_VERSION` in the environment takes precedence over this value. *** ### output? > `optional` **output**: `string` Defined in: [packages/cli/src/config.ts:34](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/cli/src/config.ts#L34) Output directory for generated TypeScript files. Defaults to ’./src/generated’ *** ### watch? > `optional` **watch**: `boolean` Defined in: [packages/cli/src/config.ts:46](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/cli/src/config.ts#L46) Enable watch mode to regenerate on DAR changes. Defaults to false. # cli/src ## Interfaces * [SigilryConfig](api-reference/cli/src/interfaces/sigilryconfig/) ## Variables * [defaultConfig](api-reference/cli/src/variables/defaultconfig/) ## Functions * [defineConfig](api-reference/cli/src/functions/defineconfig/) * [generateTypes](api-reference/cli/src/functions/generatetypes/) * [loadConfig](api-reference/cli/src/functions/loadconfig/) * [resolveConfig](api-reference/cli/src/functions/resolveconfig/) * [watchDars](api-reference/cli/src/functions/watchdars/) # defaultConfig > `const` **defaultConfig**: `Required`<`Omit`<[`SigilryConfig`](api-reference/cli/src/interfaces/sigilryconfig/), `"dars"`>> Defined in: [packages/cli/src/config.ts:80](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/cli/src/config.ts#L80) Default configuration values # RpcClientError Defined in: [packages/dapp/src/rpc/client.ts:112](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/client.ts#L112) RPC client error class for typed error handling. ## Extends * `Error` ## Constructors ### Constructor > **new RpcClientError**(`code`, `message`, `data?`): `RpcClientError` Defined in: [packages/dapp/src/rpc/client.ts:113](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/client.ts#L113) #### Parameters ##### code `number` ##### message `string` ##### data? `unknown` #### Returns `RpcClientError` #### Overrides `Error.constructor` ## Properties ### cause? > `optional` **cause**: `unknown` Defined in: node\_modules/typescript/lib/lib.es2022.error.d.ts:26 The cause of the error. #### Inherited from `Error.cause` *** ### code > `readonly` **code**: `number` Defined in: [packages/dapp/src/rpc/client.ts:114](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/client.ts#L114) *** ### data? > `readonly` `optional` **data**: `unknown` Defined in: [packages/dapp/src/rpc/client.ts:116](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/client.ts#L116) *** ### message > **message**: `string` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1077 #### Inherited from `Error.message` *** ### name > **name**: `string` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1076 #### Inherited from `Error.name` *** ### stack? > `optional` **stack**: `string` Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1078 #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` Defined in: node\_modules/@types/node/globals.d.ts:68 The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. #### Inherited from `Error.stackTraceLimit` ## Methods ### captureStackTrace() #### Call Signature > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` Defined in: node\_modules/@types/node/globals.d.ts:52 Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ```js const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ```js function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` ##### Parameters ###### targetObject `object` ###### constructorOpt? `Function` ##### Returns `void` ##### Inherited from `Error.captureStackTrace` #### Call Signature > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` Defined in: node\_modules/bun-types/globals.d.ts:1042 Create .stack property on a target object ##### Parameters ###### targetObject `object` ###### constructorOpt? `Function` ##### Returns `void` ##### Inherited from `Error.captureStackTrace` *** ### fromError() > `static` **fromError**(`error`): `RpcClientError` Defined in: [packages/dapp/src/rpc/client.ts:122](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/client.ts#L122) #### Parameters ##### error `unknown` #### Returns `RpcClientError` *** ### isError() #### Call Signature > `static` **isError**(`error`): `error is Error` Defined in: node\_modules/typescript/lib/lib.esnext.error.d.ts:23 Indicates whether the argument provided is a built-in Error instance or not. ##### Parameters ###### error `unknown` ##### Returns `error is Error` ##### Inherited from `Error.isError` #### Call Signature > `static` **isError**(`value`): `value is Error` Defined in: node\_modules/bun-types/globals.d.ts:1037 Check if a value is an instance of Error ##### Parameters ###### value `unknown` The value to check ##### Returns `value is Error` True if the value is an instance of Error, false otherwise ##### Inherited from `Error.isError` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` Defined in: node\_modules/@types/node/globals.d.ts:56 #### Parameters ##### err `Error` ##### stackTraces `CallSite`\[] #### Returns `any` #### See #### Inherited from `Error.prepareStackTrace` # SpliceProviderBase Defined in: [packages/dapp/src/provider/base.ts:38](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/provider/base.ts#L38) Abstract base class for SpliceProvider implementations. Provides event handling (on/emit/removeListener) - subclasses implement the request method for their transport mechanism. ## Implements * [`ExtendedSpliceProvider`](api-reference/dapp/src/interfaces/extendedspliceprovider/) ## Constructors ### Constructor > **new SpliceProviderBase**(): `SpliceProviderBase` #### Returns `SpliceProviderBase` ## Properties ### request > `abstract` **request**: [`TypedRequestFn`](api-reference/dapp/src/type-aliases/typedrequestfn/) Defined in: [packages/dapp/src/provider/base.ts:51](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/provider/base.ts#L51) Send a JSON-RPC request. Implemented by subclasses. #### Implementation of [`ExtendedSpliceProvider`](api-reference/dapp/src/interfaces/extendedspliceprovider/).[`request`](api-reference/dapp/src/interfaces/extendedspliceprovider/#request) ## Methods ### emit() > **emit**<`T`>(`event`, …`args`): `boolean` Defined in: [packages/dapp/src/provider/base.ts:80](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/provider/base.ts#L80) Emit an event to all listeners. #### Type Parameters ##### T `T` = `unknown` #### Parameters ##### event `string` ##### args …`T`\[] #### Returns `boolean` #### Implementation of [`ExtendedSpliceProvider`](api-reference/dapp/src/interfaces/extendedspliceprovider/).[`emit`](api-reference/dapp/src/interfaces/extendedspliceprovider/#emit) *** ### isConnected() > **isConnected**(): `boolean` Defined in: [packages/dapp/src/provider/base.ts:56](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/provider/base.ts#L56) Check if connected to the network. #### Returns `boolean` #### Implementation of [`ExtendedSpliceProvider`](api-reference/dapp/src/interfaces/extendedspliceprovider/).[`isConnected`](api-reference/dapp/src/interfaces/extendedspliceprovider/#isconnected) *** ### listenerCount() > **listenerCount**(`event`): `number` Defined in: [packages/dapp/src/provider/base.ts:130](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/provider/base.ts#L130) Get the number of listeners for an event. #### Parameters ##### event `string` #### Returns `number` #### Implementation of [`ExtendedSpliceProvider`](api-reference/dapp/src/interfaces/extendedspliceprovider/).[`listenerCount`](api-reference/dapp/src/interfaces/extendedspliceprovider/#listenercount) *** ### on() > **on**<`T`>(`event`, `listener`): [`SpliceProvider`](api-reference/dapp/src/interfaces/spliceprovider/) Defined in: [packages/dapp/src/provider/base.ts:63](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/provider/base.ts#L63) Subscribe to an event. #### Type Parameters ##### T `T` = `unknown` #### Parameters ##### event `string` ##### listener [`EventListener`](api-reference/dapp/src/type-aliases/eventlistener/)<`T`> #### Returns [`SpliceProvider`](api-reference/dapp/src/interfaces/spliceprovider/) #### Implementation of [`ExtendedSpliceProvider`](api-reference/dapp/src/interfaces/extendedspliceprovider/).[`on`](api-reference/dapp/src/interfaces/extendedspliceprovider/#on) *** ### removeAllListeners() > **removeAllListeners**(`event?`): [`SpliceProvider`](api-reference/dapp/src/interfaces/spliceprovider/) Defined in: [packages/dapp/src/provider/base.ts:117](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/provider/base.ts#L117) Remove all listeners for an event, or all events. #### Parameters ##### event? `string` #### Returns [`SpliceProvider`](api-reference/dapp/src/interfaces/spliceprovider/) #### Implementation of [`ExtendedSpliceProvider`](api-reference/dapp/src/interfaces/extendedspliceprovider/).[`removeAllListeners`](api-reference/dapp/src/interfaces/extendedspliceprovider/#removealllisteners) *** ### removeListener() > **removeListener**<`T`>(`event`, `listener`): [`SpliceProvider`](api-reference/dapp/src/interfaces/spliceprovider/) Defined in: [packages/dapp/src/provider/base.ts:102](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/provider/base.ts#L102) Remove a specific listener. #### Type Parameters ##### T `T` = `unknown` #### Parameters ##### event `string` ##### listener [`EventListener`](api-reference/dapp/src/type-aliases/eventlistener/)<`T`> #### Returns [`SpliceProvider`](api-reference/dapp/src/interfaces/spliceprovider/) #### Implementation of [`ExtendedSpliceProvider`](api-reference/dapp/src/interfaces/extendedspliceprovider/).[`removeListener`](api-reference/dapp/src/interfaces/extendedspliceprovider/#removelistener) # WalletConnectTransport Defined in: [packages/dapp/src/transport/walletconnect.ts:104](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/walletconnect.ts#L104) WalletConnect-backed transport. The dApp side of the Canton WC namespace. ## Implements * [`BidirectionalTransport`](api-reference/dapp/src/interfaces/bidirectionaltransport/) ## Constructors ### Constructor > **new WalletConnectTransport**(`config`): `WalletConnectTransport` Defined in: [packages/dapp/src/transport/walletconnect.ts:128](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/walletconnect.ts#L128) #### Parameters ##### config [`WalletConnectTransportConfig`](api-reference/dapp/src/interfaces/walletconnecttransportconfig/) #### Returns `WalletConnectTransport` ## Accessors ### connected #### Get Signature > **get** **connected**(): `boolean` Defined in: [packages/dapp/src/transport/walletconnect.ts:162](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/walletconnect.ts#L162) True once a Canton WC session is established. ##### Returns `boolean` ## Methods ### disconnect() > **disconnect**(): `Promise`<`void`> Defined in: [packages/dapp/src/transport/walletconnect.ts:321](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/walletconnect.ts#L321) Tear down the WC session. #### Returns `Promise`<`void`> *** ### notify() > **notify**(`event`, `payload`, `target?`): `void` Defined in: [packages/dapp/src/transport/walletconnect.ts:289](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/walletconnect.ts#L289) Dispatch a wallet-pushed notification to `onNotification` subscribers. #### Parameters ##### event `string` ##### payload `unknown` ##### target? `string` #### Returns `void` #### Implementation of [`BidirectionalTransport`](api-reference/dapp/src/interfaces/bidirectionaltransport/).[`notify`](api-reference/dapp/src/interfaces/bidirectionaltransport/#notify) *** ### onNotification() > **onNotification**(`listener`): () => `void` Defined in: [packages/dapp/src/transport/walletconnect.ts:281](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/walletconnect.ts#L281) Subscribe to wallet-pushed notifications (BidirectionalTransport). WC wallet events (`session_event`) are dispatched here in addition to the `onEvent` config bridge, so consumers using either channel receive them. #### Parameters ##### listener [`NotificationListener`](api-reference/dapp/src/type-aliases/notificationlistener/) #### Returns > (): `void` ##### Returns `void` #### Implementation of [`BidirectionalTransport`](api-reference/dapp/src/interfaces/bidirectionaltransport/).[`onNotification`](api-reference/dapp/src/interfaces/bidirectionaltransport/#onnotification) *** ### restore() > **restore**(): `Promise`<`boolean`> Defined in: [packages/dapp/src/transport/walletconnect.ts:294](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/walletconnect.ts#L294) Restore a previously-approved Canton session (e.g. after reload). #### Returns `Promise`<`boolean`> *** ### submit() > **submit**(`payload`): `Promise`<{\[`key`: `string`]: `unknown`; `result?`: `unknown`; } | {\[`key`: `string`]: `unknown`; `error`: { `code`: `number`; `data?`: `unknown`; `message`: `string`; }; }> Defined in: [packages/dapp/src/transport/walletconnect.ts:171](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/walletconnect.ts#L171) Marshal a sigilry RPC call onto the Canton WC namespace. Mirrors the `RpcTransport` contract: resolves to `{ result }` or `{ error }` (never rejects), so the client layer surfaces errors uniformly. #### Parameters ##### payload ###### method `string` = `...` ###### params? `Record`<`string`, `unknown`> | `unknown`\[] = `...` #### Returns `Promise`<{\[`key`: `string`]: `unknown`; `result?`: `unknown`; } | {\[`key`: `string`]: `unknown`; `error`: { `code`: `number`; `data?`: `unknown`; `message`: `string`; }; }> #### Implementation of [`BidirectionalTransport`](api-reference/dapp/src/interfaces/bidirectionaltransport/).[`submit`](api-reference/dapp/src/interfaces/bidirectionaltransport/#submit) *** ### submitResponse() > **submitResponse**(): `void` Defined in: [packages/dapp/src/transport/walletconnect.ts:272](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/walletconnect.ts#L272) The dApp issues requests; it never answers them. The responder side (wallet) owns `submitResponse`. No-op here to satisfy the interface. #### Returns `void` #### Implementation of [`BidirectionalTransport`](api-reference/dapp/src/interfaces/bidirectionaltransport/).[`submitResponse`](api-reference/dapp/src/interfaces/bidirectionaltransport/#submitresponse) # WindowTransport Defined in: [packages/dapp/src/transport/window.ts:79](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/window.ts#L79) Window-based transport using postMessage. Used by the injected provider to communicate with the content script. ## Implements * [`BidirectionalTransport`](api-reference/dapp/src/interfaces/bidirectionaltransport/) ## Constructors ### Constructor > **new WindowTransport**(`win`, `options`): `WindowTransport` Defined in: [packages/dapp/src/transport/window.ts:85](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/window.ts#L85) #### Parameters ##### win `Window` ##### options [`TransportOptions`](api-reference/dapp/src/interfaces/transportoptions/) = `{}` #### Returns `WindowTransport` ## Methods ### notify() > **notify**(`event`, `payload`, `target?`): `void` Defined in: [packages/dapp/src/transport/window.ts:185](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/window.ts#L185) Send a wallet-pushed notification via postMessage. #### Parameters ##### event `string` ##### payload `unknown` ##### target? `string` #### Returns `void` #### Implementation of [`BidirectionalTransport`](api-reference/dapp/src/interfaces/bidirectionaltransport/).[`notify`](api-reference/dapp/src/interfaces/bidirectionaltransport/#notify) *** ### onNotification() > **onNotification**(`listener`): () => `void` Defined in: [packages/dapp/src/transport/window.ts:164](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/window.ts#L164) Subscribe to id-less JSON-RPC notifications sent over postMessage. #### Parameters ##### listener [`NotificationListener`](api-reference/dapp/src/type-aliases/notificationlistener/) #### Returns > (): `void` ##### Returns `void` #### Implementation of [`BidirectionalTransport`](api-reference/dapp/src/interfaces/bidirectionaltransport/).[`onNotification`](api-reference/dapp/src/interfaces/bidirectionaltransport/#onnotification) *** ### submit() > **submit**(`payload`): `Promise`<{\[`key`: `string`]: `unknown`; `result?`: `unknown`; } | {\[`key`: `string`]: `unknown`; `error`: { `code`: `number`; `data?`: `unknown`; `message`: `string`; }; }> Defined in: [packages/dapp/src/transport/window.ts:93](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/window.ts#L93) Submit an RPC request via postMessage and wait for response. #### Parameters ##### payload ###### method `string` = `...` ###### params? `Record`<`string`, `unknown`> | `unknown`\[] = `...` #### Returns `Promise`<{\[`key`: `string`]: `unknown`; `result?`: `unknown`; } | {\[`key`: `string`]: `unknown`; `error`: { `code`: `number`; `data?`: `unknown`; `message`: `string`; }; }> #### Implementation of [`BidirectionalTransport`](api-reference/dapp/src/interfaces/bidirectionaltransport/).[`submit`](api-reference/dapp/src/interfaces/bidirectionaltransport/#submit) *** ### submitResponse() > **submitResponse**(`id`, `payload`): `void` Defined in: [packages/dapp/src/transport/window.ts:202](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/window.ts#L202) Send a response back via postMessage. #### Parameters ##### id `string` | `number` | `null` ##### payload {\[`key`: `string`]: `unknown`; `result?`: `unknown`; } | {\[`key`: `string`]: `unknown`; `error`: { `code`: `number`; `data?`: `unknown`; `message`: `string`; }; } #### Returns `void` #### Implementation of [`BidirectionalTransport`](api-reference/dapp/src/interfaces/bidirectionaltransport/).[`submitResponse`](api-reference/dapp/src/interfaces/bidirectionaltransport/#submitresponse) # announceProvider > **announceProvider**(`detail`): () => `void` Defined in: [packages/dapp/src/discovery/utils.ts:4](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/discovery/utils.ts#L4) ## Parameters ### detail [`SpliceAnnounceDetail`](api-reference/dapp/src/discovery/type-aliases/spliceannouncedetail/) ## Returns > (): `void` ### Returns `void` # createDiscoveryStore > **createDiscoveryStore**(): [`DiscoveryStore`](api-reference/dapp/src/discovery/type-aliases/discoverystore/) Defined in: [packages/dapp/src/discovery/store.ts:102](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/discovery/store.ts#L102) ## Returns [`DiscoveryStore`](api-reference/dapp/src/discovery/type-aliases/discoverystore/) # createProvider > **createProvider**(`detail`, `opts`): [`SpliceProvider`](api-reference/dapp/src/interfaces/spliceprovider/) Defined in: [packages/dapp/src/discovery/create-provider.ts:37](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/discovery/create-provider.ts#L37) ## Parameters ### detail [`SpliceAnnounceDetail`](api-reference/dapp/src/discovery/type-aliases/spliceannouncedetail/) ### opts [`TransportOptions`](api-reference/dapp/src/interfaces/transportoptions/) = `{}` ## Returns [`SpliceProvider`](api-reference/dapp/src/interfaces/spliceprovider/) # requestProviders > **requestProviders**(`onDetail`): () => `void` | `undefined` Defined in: [packages/dapp/src/discovery/utils.ts:20](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/discovery/utils.ts#L20) ## Parameters ### onDetail (`detail`) => `void` ## Returns () => `void` | `undefined` # dapp/src/discovery ## Type Aliases * [DiscoveredWallet](api-reference/dapp/src/discovery/type-aliases/discoveredwallet/) * [DiscoveryStore](api-reference/dapp/src/discovery/type-aliases/discoverystore/) * [DiscoveryStoreListener](api-reference/dapp/src/discovery/type-aliases/discoverystorelistener/) * [DiscoveryStoreMeta](api-reference/dapp/src/discovery/type-aliases/discoverystoremeta/) * [Listener](api-reference/dapp/src/discovery/type-aliases/listener/) * [SpliceAnnounceDetail](api-reference/dapp/src/discovery/type-aliases/spliceannouncedetail/) * [SpliceProviderInfo](api-reference/dapp/src/discovery/type-aliases/spliceproviderinfo/) * [Store](api-reference/dapp/src/discovery/type-aliases/store/) ## Functions * [announceProvider](api-reference/dapp/src/discovery/functions/announceprovider/) * [createDiscoveryStore](api-reference/dapp/src/discovery/functions/creatediscoverystore/) * [createProvider](api-reference/dapp/src/discovery/functions/createprovider/) * [requestProviders](api-reference/dapp/src/discovery/functions/requestproviders/) ## References ### TransportOptions Re-exports [TransportOptions](api-reference/dapp/src/interfaces/transportoptions/) # DiscoveredWallet > **DiscoveredWallet** = `object` Defined in: [packages/dapp/src/discovery/types.ts:20](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/discovery/types.ts#L20) ## Properties ### info > **info**: [`SpliceProviderInfo`](api-reference/dapp/src/discovery/type-aliases/spliceproviderinfo/) Defined in: [packages/dapp/src/discovery/types.ts:21](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/discovery/types.ts#L21) ## Methods ### getProvider() > **getProvider**(`opts?`): [`SpliceProvider`](api-reference/dapp/src/interfaces/spliceprovider/) Defined in: [packages/dapp/src/discovery/types.ts:22](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/discovery/types.ts#L22) #### Parameters ##### opts? [`TransportOptions`](api-reference/dapp/src/interfaces/transportoptions/) #### Returns [`SpliceProvider`](api-reference/dapp/src/interfaces/spliceprovider/) # DiscoveryStore > **DiscoveryStore** = `object` Defined in: [packages/dapp/src/discovery/store.ts:19](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/discovery/store.ts#L19) ## Methods ### clear() > **clear**(): `void` Defined in: [packages/dapp/src/discovery/store.ts:20](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/discovery/store.ts#L20) #### Returns `void` *** ### destroy() > **destroy**(): `void` Defined in: [packages/dapp/src/discovery/store.ts:21](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/discovery/store.ts#L21) #### Returns `void` *** ### findProvider() > **findProvider**(`args`): [`DiscoveredWallet`](api-reference/dapp/src/discovery/type-aliases/discoveredwallet/) | `undefined` Defined in: [packages/dapp/src/discovery/store.ts:22](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/discovery/store.ts#L22) #### Parameters ##### args ###### rdns `string` #### Returns [`DiscoveredWallet`](api-reference/dapp/src/discovery/type-aliases/discoveredwallet/) | `undefined` *** ### getProviders() > **getProviders**(): readonly [`DiscoveredWallet`](api-reference/dapp/src/discovery/type-aliases/discoveredwallet/)\[] Defined in: [packages/dapp/src/discovery/store.ts:23](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/discovery/store.ts#L23) #### Returns readonly [`DiscoveredWallet`](api-reference/dapp/src/discovery/type-aliases/discoveredwallet/)\[] *** ### reset() > **reset**(): `void` Defined in: [packages/dapp/src/discovery/store.ts:24](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/discovery/store.ts#L24) #### Returns `void` *** ### subscribe() > **subscribe**(`listener`, `args?`): () => `void` Defined in: [packages/dapp/src/discovery/store.ts:25](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/discovery/store.ts#L25) #### Parameters ##### listener [`DiscoveryStoreListener`](api-reference/dapp/src/discovery/type-aliases/discoverystorelistener/) ##### args? ###### emitImmediately? `boolean` #### Returns > (): `void` ##### Returns `void` # DiscoveryStoreListener > **DiscoveryStoreListener** = (`providers`, `meta?`) => `void` Defined in: [packages/dapp/src/discovery/store.ts:14](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/discovery/store.ts#L14) ## Parameters ### providers readonly [`DiscoveredWallet`](api-reference/dapp/src/discovery/type-aliases/discoveredwallet/)\[] ### meta? [`DiscoveryStoreMeta`](api-reference/dapp/src/discovery/type-aliases/discoverystoremeta/) ## Returns `void` # DiscoveryStoreMeta > **DiscoveryStoreMeta** = `object` Defined in: [packages/dapp/src/discovery/store.ts:9](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/discovery/store.ts#L9) ## Properties ### added? > `optional` **added**: readonly [`DiscoveredWallet`](api-reference/dapp/src/discovery/type-aliases/discoveredwallet/)\[] Defined in: [packages/dapp/src/discovery/store.ts:10](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/discovery/store.ts#L10) *** ### removed? > `optional` **removed**: readonly [`DiscoveredWallet`](api-reference/dapp/src/discovery/type-aliases/discoveredwallet/)\[] Defined in: [packages/dapp/src/discovery/store.ts:11](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/discovery/store.ts#L11) # Listener > **Listener** = [`DiscoveryStoreListener`](api-reference/dapp/src/discovery/type-aliases/discoverystorelistener/) Defined in: [packages/dapp/src/discovery/store.ts:32](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/discovery/store.ts#L32) # SpliceAnnounceDetail > **SpliceAnnounceDetail** = `object` Defined in: [packages/dapp/src/discovery/types.ts:4](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/discovery/types.ts#L4) ## Properties ### icon > **icon**: `` `data:image/${string}` `` Defined in: [packages/dapp/src/discovery/types.ts:7](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/discovery/types.ts#L7) *** ### id > **id**: `string` Defined in: [packages/dapp/src/discovery/types.ts:5](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/discovery/types.ts#L5) *** ### name > **name**: `string` Defined in: [packages/dapp/src/discovery/types.ts:6](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/discovery/types.ts#L6) *** ### rdns > **rdns**: `string` Defined in: [packages/dapp/src/discovery/types.ts:9](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/discovery/types.ts#L9) *** ### target > **target**: `string` Defined in: [packages/dapp/src/discovery/types.ts:8](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/discovery/types.ts#L8) *** ### uuid > **uuid**: `string` Defined in: [packages/dapp/src/discovery/types.ts:10](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/discovery/types.ts#L10) # SpliceProviderInfo > **SpliceProviderInfo** = `object` Defined in: [packages/dapp/src/discovery/types.ts:13](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/discovery/types.ts#L13) ## Properties ### icon > **icon**: `` `data:image/${string}` `` Defined in: [packages/dapp/src/discovery/types.ts:17](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/discovery/types.ts#L17) *** ### name > **name**: `string` Defined in: [packages/dapp/src/discovery/types.ts:16](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/discovery/types.ts#L16) *** ### rdns > **rdns**: `string` Defined in: [packages/dapp/src/discovery/types.ts:15](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/discovery/types.ts#L15) *** ### uuid > **uuid**: `string` Defined in: [packages/dapp/src/discovery/types.ts:14](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/discovery/types.ts#L14) # Store > **Store** = [`DiscoveryStore`](api-reference/dapp/src/discovery/type-aliases/discoverystore/) Defined in: [packages/dapp/src/discovery/store.ts:31](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/discovery/store.ts#L31) # WalletEvent Defined in: [packages/dapp/src/messages/events.ts:9](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/events.ts#L9) Wallet message event types for dApp ↔ Extension communication. These events define the protocol for: * JSON-RPC request/response flow * Extension discovery handshake * Auth success notifications ## Enumeration Members ### SPLICE\_WALLET\_EXT\_ACK > **SPLICE\_WALLET\_EXT\_ACK**: `"SPLICE_WALLET_EXT_ACK"` Defined in: [packages/dapp/src/messages/events.ts:17](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/events.ts#L17) Extension acknowledges it’s ready *** ### SPLICE\_WALLET\_EXT\_OPEN > **SPLICE\_WALLET\_EXT\_OPEN**: `"SPLICE_WALLET_EXT_OPEN"` Defined in: [packages/dapp/src/messages/events.ts:19](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/events.ts#L19) Request to open wallet UI (e.g., for signing) *** ### SPLICE\_WALLET\_EXT\_READY > **SPLICE\_WALLET\_EXT\_READY**: `"SPLICE_WALLET_EXT_READY"` Defined in: [packages/dapp/src/messages/events.ts:15](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/events.ts#L15) dApp checks if extension is loaded (discovery) *** ### SPLICE\_WALLET\_IDP\_AUTH\_SUCCESS > **SPLICE\_WALLET\_IDP\_AUTH\_SUCCESS**: `"SPLICE_WALLET_IDP_AUTH_SUCCESS"` Defined in: [packages/dapp/src/messages/events.ts:21](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/events.ts#L21) IDP auth completed successfully *** ### SPLICE\_WALLET\_REQUEST > **SPLICE\_WALLET\_REQUEST**: `"SPLICE_WALLET_REQUEST"` Defined in: [packages/dapp/src/messages/events.ts:11](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/events.ts#L11) dApp sends JSON-RPC request to extension *** ### SPLICE\_WALLET\_RESPONSE > **SPLICE\_WALLET\_RESPONSE**: `"SPLICE_WALLET_RESPONSE"` Defined in: [packages/dapp/src/messages/events.ts:13](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/events.ts#L13) Extension sends JSON-RPC response back to dApp # createCantonClient > **createCantonClient**(`transport`): [`CantonClient`](api-reference/dapp/src/interfaces/cantonclient/) Defined in: [packages/dapp/src/rpc/client.ts:67](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/client.ts#L67) Create a type-safe Canton client with transport and validation. ## Parameters ### transport [`RpcTransport`](api-reference/dapp/src/interfaces/rpctransport/) RPC transport for sending requests ## Returns [`CantonClient`](api-reference/dapp/src/interfaces/cantonclient/) Canton client instance # createCantonServer > **createCantonServer**(`handlers`): [`CantonServer`](api-reference/dapp/src/interfaces/cantonserver/) Defined in: [packages/dapp/src/rpc/server.ts:107](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/server.ts#L107) Create a Canton RPC server with handlers. ## Parameters ### handlers [`CantonServerHandlers`](api-reference/dapp/src/interfaces/cantonserverhandlers/) Implementation of Canton API methods ## Returns [`CantonServer`](api-reference/dapp/src/interfaces/cantonserver/) Server instance with request handler # createRpcError > **createRpcError**(`code`, `message`, `data?`): `object` Defined in: [packages/dapp/src/rpc/errors.ts:53](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/errors.ts#L53) Create an RPC error object ## Parameters ### code [`RpcErrorCode`](api-reference/dapp/src/type-aliases/rpcerrorcode/) ### message `string` ### data? `unknown` ## Returns `object` ### code > **code**: `number` ### data? > `optional` **data**: `unknown` ### message > **message**: `string` # createStubHandlers > **createStubHandlers**(): [`CantonServerHandlers`](api-reference/dapp/src/interfaces/cantonserverhandlers/) Defined in: [packages/dapp/src/rpc/server.ts:178](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/server.ts#L178) Create stub handlers that throw “not implemented” errors. Useful for incremental implementation. ## Returns [`CantonServerHandlers`](api-reference/dapp/src/interfaces/cantonserverhandlers/) # isApprovalBridgeMessage > **isApprovalBridgeMessage**(`message`): message is { nonce: string; type: “SPLICE\_GET\_APPROVAL\_REQUEST” } | { extensionId?: string; type: “SPLICE\_APPROVAL\_BRIDGE\_READY” } | { payload: { commandId: string; completionOffset?: number; error?: string; nonce: string; signature?: string; status: “error” | “approved” | “rejected” | “timeout”; updateId?: string }; type: “SPLICE\_APPROVAL\_RESULT” } | { payload: { accessToken: string; commandId: string; createdAt: number; credentialId?: string; expiresAt: number; fingerprint?: string; nonce: string; origin: string; partyId: string; preparedTransactionBase64: string; tabId: number; tokenExpiry: number; transactionHash: string; windowId?: number }; type: “SPLICE\_APPROVAL\_REQUEST\_DATA” } Defined in: [packages/dapp/src/messages/runtime-schemas.ts:130](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/runtime-schemas.ts#L130) ## Parameters ### message `unknown` ## Returns message is { nonce: string; type: “SPLICE\_GET\_APPROVAL\_REQUEST” } | { extensionId?: string; type: “SPLICE\_APPROVAL\_BRIDGE\_READY” } | { payload: { commandId: string; completionOffset?: number; error?: string; nonce: string; signature?: string; status: “error” | “approved” | “rejected” | “timeout”; updateId?: string }; type: “SPLICE\_APPROVAL\_RESULT” } | { payload: { accessToken: string; commandId: string; createdAt: number; credentialId?: string; expiresAt: number; fingerprint?: string; nonce: string; origin: string; partyId: string; preparedTransactionBase64: string; tabId: number; tokenExpiry: number; transactionHash: string; windowId?: number }; type: “SPLICE\_APPROVAL\_REQUEST\_DATA” } # isRpcError > **isRpcError**(`obj`): `obj is { code: number; data?: unknown; message: string }` Defined in: [packages/dapp/src/rpc/errors.ts:92](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/errors.ts#L92) Type guard to check if an object is an RPC error ## Parameters ### obj `unknown` ## Returns `obj is { code: number; data?: unknown; message: string }` # isRuntimeMessage > **isRuntimeMessage**(`message`): message is { payload: { event: “accountsChanged”; payload: { disabled?: boolean; externalTxId?: string; hint: string; namespace: string; networkId: string; partyId: string; primary: boolean; publicKey: string; reason?: string; signingProviderId: string; status: “initialized” | “allocated” | “removed”; topologyTransactions?: string }\[]; type: “SPLICE\_WALLET\_EVENT” } | { event: “txChanged”; payload: { commandId: string; payload: { completionOffset: number; updateId: string }; status: “executed” } | { commandId: string; status: “failed” } | { commandId: string; status: “pending” } | { commandId: string; payload: { party: string; signature: string; signedBy: string }; status: “signed” }; type: “SPLICE\_WALLET\_EVENT” } | { event: “statusChanged”; payload: { connection: { isConnected: boolean; isNetworkConnected: boolean; networkReason?: string; reason?: string; userUrl?: string }; network?: { accessToken?: string; ledgerApi?: string; networkId: string }; provider: { id: string; providerType: “browser” | “desktop” | “mobile” | “remote”; url?: string; userUrl?: string; version?: string }; session?: { accessToken: string; userId: string } }; type: “SPLICE\_WALLET\_EVENT” } | { event: “connected”; payload: { connection: { isConnected: boolean; isNetworkConnected: boolean; networkReason?: string; reason?: string; userUrl?: string }; network?: { accessToken?: string; ledgerApi?: string; networkId: string }; provider: { id: string; providerType: “browser” | “desktop” | “mobile” | “remote”; url?: string; userUrl?: string; version?: string }; session?: { accessToken: string; userId: string } }; type: “SPLICE\_WALLET\_EVENT” }; targetOrigin: string; type: “FORWARD\_TO\_INJECTED” } | { origin: string; permissions?: string\[]; type: “DAPP\_CONNECTED” } | { payload: { commandId: string; completionOffset?: number; error?: string; nonce: string; signature?: string; status: “error” | “approved” | “rejected” | “timeout”; updateId?: string }; senderUrl: string; type: “APPROVAL\_RESULT” } | { nonce: string; type: “GET\_PENDING\_APPROVAL” } Defined in: [packages/dapp/src/messages/runtime-schemas.ts:126](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/runtime-schemas.ts#L126) ## Parameters ### message `unknown` ## Returns message is { payload: { event: “accountsChanged”; payload: { disabled?: boolean; externalTxId?: string; hint: string; namespace: string; networkId: string; partyId: string; primary: boolean; publicKey: string; reason?: string; signingProviderId: string; status: “initialized” | “allocated” | “removed”; topologyTransactions?: string }\[]; type: “SPLICE\_WALLET\_EVENT” } | { event: “txChanged”; payload: { commandId: string; payload: { completionOffset: number; updateId: string }; status: “executed” } | { commandId: string; status: “failed” } | { commandId: string; status: “pending” } | { commandId: string; payload: { party: string; signature: string; signedBy: string }; status: “signed” }; type: “SPLICE\_WALLET\_EVENT” } | { event: “statusChanged”; payload: { connection: { isConnected: boolean; isNetworkConnected: boolean; networkReason?: string; reason?: string; userUrl?: string }; network?: { accessToken?: string; ledgerApi?: string; networkId: string }; provider: { id: string; providerType: “browser” | “desktop” | “mobile” | “remote”; url?: string; userUrl?: string; version?: string }; session?: { accessToken: string; userId: string } }; type: “SPLICE\_WALLET\_EVENT” } | { event: “connected”; payload: { connection: { isConnected: boolean; isNetworkConnected: boolean; networkReason?: string; reason?: string; userUrl?: string }; network?: { accessToken?: string; ledgerApi?: string; networkId: string }; provider: { id: string; providerType: “browser” | “desktop” | “mobile” | “remote”; url?: string; userUrl?: string; version?: string }; session?: { accessToken: string; userId: string } }; type: “SPLICE\_WALLET\_EVENT” }; targetOrigin: string; type: “FORWARD\_TO\_INJECTED” } | { origin: string; permissions?: string\[]; type: “DAPP\_CONNECTED” } | { payload: { commandId: string; completionOffset?: number; error?: string; nonce: string; signature?: string; status: “error” | “approved” | “rejected” | “timeout”; updateId?: string }; senderUrl: string; type: “APPROVAL\_RESULT” } | { nonce: string; type: “GET\_PENDING\_APPROVAL” } # isSpliceMessage > **isSpliceMessage**(`message`): message is { request: { id?: string | number | null; jsonrpc: “2.0”; method: string; params?: Record\ | unknown\[] }; target?: string; type: SPLICE\_WALLET\_REQUEST } | { response: { id?: string | number | null; jsonrpc: “2.0”; result?: unknown; \[key: string]: unknown } | { error: { code: number; data?: unknown; message: string }; id?: string | number | null; jsonrpc: “2.0”; \[key: string]: unknown }; type: SPLICE\_WALLET\_RESPONSE } | { target?: string; type: SPLICE\_WALLET\_EXT\_READY } | { target?: string; type: SPLICE\_WALLET\_EXT\_ACK } | { target?: string; type: SPLICE\_WALLET\_EXT\_OPEN; url: string } | { sessionId: string; token: string; type: SPLICE\_WALLET\_IDP\_AUTH\_SUCCESS } Defined in: [packages/dapp/src/messages/schemas.ts:151](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/schemas.ts#L151) Type guard for SpliceMessage ## Parameters ### message `unknown` ## Returns message is { request: { id?: string | number | null; jsonrpc: “2.0”; method: string; params?: Record\ | unknown\[] }; target?: string; type: SPLICE\_WALLET\_REQUEST } | { response: { id?: string | number | null; jsonrpc: “2.0”; result?: unknown; \[key: string]: unknown } | { error: { code: number; data?: unknown; message: string }; id?: string | number | null; jsonrpc: “2.0”; \[key: string]: unknown }; type: SPLICE\_WALLET\_RESPONSE } | { target?: string; type: SPLICE\_WALLET\_EXT\_READY } | { target?: string; type: SPLICE\_WALLET\_EXT\_ACK } | { target?: string; type: SPLICE\_WALLET\_EXT\_OPEN; url: string } | { sessionId: string; token: string; type: SPLICE\_WALLET\_IDP\_AUTH\_SUCCESS } # isSpliceMessageEvent > **isSpliceMessageEvent**(`event`): `event is SpliceMessageEvent` Defined in: [packages/dapp/src/messages/schemas.ts:143](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/schemas.ts#L143) Type guard for SpliceMessageEvent ## Parameters ### event `unknown` ## Returns `event is SpliceMessageEvent` # jsonRpcRequest > **jsonRpcRequest**(`id`, `payload`): `object` Defined in: [packages/dapp/src/messages/schemas.ts:160](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/schemas.ts#L160) Create a JSON-RPC request object ## Parameters ### id `string` | `number` | `null` ### payload #### method `string` = `...` #### params? `Record`<`string`, `unknown`> | `unknown`\[] = `...` ## Returns `object` ### id? > `optional` **id**: `string` | `number` | `null` ### jsonrpc > **jsonrpc**: `"2.0"` ### method > **method**: `string` ### params? > `optional` **params**: `Record`<`string`, `unknown`> | `unknown`\[] # jsonRpcResponse > **jsonRpcResponse**(`id`, `payload`): {\[`key`: `string`]: `unknown`; `id?`: `string` | `number` | `null`; `jsonrpc`: `"2.0"`; `result?`: `unknown`; } | {\[`key`: `string`]: `unknown`; `error`: { `code`: `number`; `data?`: `unknown`; `message`: `string`; }; `id?`: `string` | `number` | `null`; `jsonrpc`: `"2.0"`; } Defined in: [packages/dapp/src/messages/schemas.ts:172](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/schemas.ts#L172) Create a JSON-RPC response object ## Parameters ### id `string` | `number` | `null` ### payload {\[`key`: `string`]: `unknown`; `result?`: `unknown`; } | {\[`key`: `string`]: `unknown`; `error`: { `code`: `number`; `data?`: `unknown`; `message`: `string`; }; } ## Returns {\[`key`: `string`]: `unknown`; `id?`: `string` | `number` | `null`; `jsonrpc`: `"2.0"`; `result?`: `unknown`; } | {\[`key`: `string`]: `unknown`; `error`: { `code`: `number`; `data?`: `unknown`; `message`: `string`; }; `id?`: `string` | `number` | `null`; `jsonrpc`: `"2.0"`; } # rpcError > **rpcError**(`code`, `customMessage?`, `data?`): `object` Defined in: [packages/dapp/src/rpc/errors.ts:82](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/errors.ts#L82) Create a standard error with default message ## Parameters ### code [`RpcErrorCode`](api-reference/dapp/src/type-aliases/rpcerrorcode/) ### customMessage? `string` ### data? `unknown` ## Returns `object` ### code > **code**: `number` ### data? > `optional` **data**: `unknown` ### message > **message**: `string` # BidirectionalTransport Defined in: [packages/dapp/src/transport/types.ts:36](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/types.ts#L36) Bidirectional transport that can also receive messages. ## Extends * [`RpcTransport`](api-reference/dapp/src/interfaces/rpctransport/) ## Methods ### notify() > **notify**(`event`, `payload`, `target?`): `void` Defined in: [packages/dapp/src/transport/types.ts:52](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/types.ts#L52) Send a wallet-pushed notification to listeners. #### Parameters ##### event `string` Notification method name ##### payload `unknown` Notification params payload ##### target? `string` Optional routing key for browser-extension messaging #### Returns `void` *** ### onNotification() > **onNotification**(`listener`): () => `void` Defined in: [packages/dapp/src/transport/types.ts:43](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/types.ts#L43) Subscribe to wallet-pushed JSON-RPC notifications. #### Parameters ##### listener [`NotificationListener`](api-reference/dapp/src/type-aliases/notificationlistener/) Notification callback invoked for id-less request frames #### Returns Unsubscribe function > (): `void` ##### Returns `void` *** ### submit() > **submit**(`payload`): `Promise`<{\[`key`: `string`]: `unknown`; `result?`: `unknown`; } | {\[`key`: `string`]: `unknown`; `error`: { `code`: `number`; `data?`: `unknown`; `message`: `string`; }; }> Defined in: [packages/dapp/src/transport/types.ts:30](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/types.ts#L30) Submit an RPC request and wait for response. #### Parameters ##### payload Request payload with method and params ###### method `string` = `...` ###### params? `Record`<`string`, `unknown`> | `unknown`\[] = `...` #### Returns `Promise`<{\[`key`: `string`]: `unknown`; `result?`: `unknown`; } | {\[`key`: `string`]: `unknown`; `error`: { `code`: `number`; `data?`: `unknown`; `message`: `string`; }; }> Promise resolving to success or error response #### Inherited from [`RpcTransport`](api-reference/dapp/src/interfaces/rpctransport/).[`submit`](api-reference/dapp/src/interfaces/rpctransport/#submit) *** ### submitResponse() > **submitResponse**(`id`, `payload`): `void` Defined in: [packages/dapp/src/transport/types.ts:60](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/types.ts#L60) Send a response back to the requester. #### Parameters ##### id Request ID to respond to `string` | `number` | `null` ##### payload Response payload {\[`key`: `string`]: `unknown`; `result?`: `unknown`; } | {\[`key`: `string`]: `unknown`; `error`: { `code`: `number`; `data?`: `unknown`; `message`: `string`; }; } #### Returns `void` # CantonClient Defined in: [packages/dapp/src/rpc/client.ts:20](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/client.ts#L20) Canton dApp client interface. All methods return promises that resolve with validated responses or reject with RPC errors. ## Methods ### connect() > **connect**(): `Promise`<{ `isConnected`: `boolean`; `isNetworkConnected`: `boolean`; `networkReason?`: `string`; `reason?`: `string`; `userUrl?`: `string`; }> Defined in: [packages/dapp/src/rpc/client.ts:25](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/client.ts#L25) Connect to wallet and get session token #### Returns `Promise`<{ `isConnected`: `boolean`; `isNetworkConnected`: `boolean`; `networkReason?`: `string`; `reason?`: `string`; `userUrl?`: `string`; }> *** ### disconnect() > **disconnect**(): `Promise`<`null`> Defined in: [packages/dapp/src/rpc/client.ts:28](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/client.ts#L28) Disconnect wallet session #### Returns `Promise`<`null`> *** ### getActiveNetwork() > **getActiveNetwork**(): `Promise`<{ `accessToken?`: `string`; `ledgerApi?`: `string`; `networkId`: `string`; }> Defined in: [packages/dapp/src/rpc/client.ts:34](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/client.ts#L34) Get the active network #### Returns `Promise`<{ `accessToken?`: `string`; `ledgerApi?`: `string`; `networkId`: `string`; }> *** ### getPrimaryAccount() > **getPrimaryAccount**(): `Promise`<{ `disabled?`: `boolean`; `externalTxId?`: `string`; `hint`: `string`; `namespace`: `string`; `networkId`: `string`; `partyId`: `string`; `primary`: `boolean`; `publicKey`: `string`; `reason?`: `string`; `signingProviderId`: `string`; `status`: `"initialized"` | `"allocated"` | `"removed"`; `topologyTransactions?`: `string`; }> Defined in: [packages/dapp/src/rpc/client.ts:40](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/client.ts#L40) Get the primary account #### Returns `Promise`<{ `disabled?`: `boolean`; `externalTxId?`: `string`; `hint`: `string`; `namespace`: `string`; `networkId`: `string`; `partyId`: `string`; `primary`: `boolean`; `publicKey`: `string`; `reason?`: `string`; `signingProviderId`: `string`; `status`: `"initialized"` | `"allocated"` | `"removed"`; `topologyTransactions?`: `string`; }> *** ### isConnected() > **isConnected**(): `Promise`<{ `isConnected`: `boolean`; `isNetworkConnected`: `boolean`; `networkReason?`: `string`; `reason?`: `string`; `userUrl?`: `string`; }> Defined in: [packages/dapp/src/rpc/client.ts:31](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/client.ts#L31) Check whether the wallet session is connected #### Returns `Promise`<{ `isConnected`: `boolean`; `isNetworkConnected`: `boolean`; `networkReason?`: `string`; `reason?`: `string`; `userUrl?`: `string`; }> *** ### ledgerApi() > **ledgerApi**(`params`): `Promise`<`Record`<`string`, `unknown`> | `unknown`\[]> Defined in: [packages/dapp/src/rpc/client.ts:58](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/client.ts#L58) Proxy call to Ledger API #### Parameters ##### params ###### body? `Record`<`string`, `any`> = `...` ###### headers? `Record`<`string`, `any`> = `...` ###### path? `Record`<`string`, `any`> = `...` ###### query? `Record`<`string`, `any`> = `...` ###### requestMethod `"get"` | `"post"` | `"patch"` | `"put"` | `"delete"` = `...` ###### resource `string` = `...` #### Returns `Promise`<`Record`<`string`, `unknown`> | `unknown`\[]> *** ### listAccounts() > **listAccounts**(): `Promise`<`object`\[]> Defined in: [packages/dapp/src/rpc/client.ts:37](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/client.ts#L37) List accounts authorized for the dApp #### Returns `Promise`<`object`\[]> *** ### prepareExecute() > **prepareExecute**(`params`): `Promise`<`null`> Defined in: [packages/dapp/src/rpc/client.ts:43](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/client.ts#L43) Prepare, sign, and execute a transaction #### Parameters ##### params ###### actAs? `string`\[] = `...` ###### commandId? `string` = `...` ###### commands ({ `CreateAndExerciseCommand`: `Record`<`string`, `any`>; } | { `CreateCommand`: { `createArguments`: `Record`<`string`, `any`>; `templateId`: `string`; }; } | { `ExerciseByKeyCommand`: `Record`<`string`, `any`>; } | { `ExerciseCommand`: { `choice`: `string`; `choiceArgument`: `Record`<`string`, `any`>; `contractId`: `string`; `templateId`: `string`; }; })\[] = `JsCommandsSchema` ###### disclosedContracts? `object`\[] = `...` ###### packageIdSelectionPreference? `string`\[] = `...` ###### readAs? `string`\[] = `...` ###### synchronizerId? `string` = `...` #### Returns `Promise`<`null`> *** ### prepareExecuteAndWait() > **prepareExecuteAndWait**(`params`): `Promise`<{ `tx`: { `commandId`: `string`; `payload`: { `completionOffset`: `number`; `updateId`: `string`; }; `status`: `"executed"`; }; }> Defined in: [packages/dapp/src/rpc/client.ts:48](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/client.ts#L48) Prepare, sign, execute, and wait for transaction completion #### Parameters ##### params ###### actAs? `string`\[] = `...` ###### commandId? `string` = `...` ###### commands ({ `CreateAndExerciseCommand`: `Record`<`string`, `any`>; } | { `CreateCommand`: { `createArguments`: `Record`<`string`, `any`>; `templateId`: `string`; }; } | { `ExerciseByKeyCommand`: `Record`<`string`, `any`>; } | { `ExerciseCommand`: { `choice`: `string`; `choiceArgument`: `Record`<`string`, `any`>; `contractId`: `string`; `templateId`: `string`; }; })\[] = `JsCommandsSchema` ###### disclosedContracts? `object`\[] = `...` ###### packageIdSelectionPreference? `string`\[] = `...` ###### readAs? `string`\[] = `...` ###### synchronizerId? `string` = `...` #### Returns `Promise`<{ `tx`: { `commandId`: `string`; `payload`: { `completionOffset`: `number`; `updateId`: `string`; }; `status`: `"executed"`; }; }> *** ### signMessage() > **signMessage**(`params`): `Promise`<{ `encoding?`: `"base64"` | `"hex"`; `format?`: `"concat"` | `"der"`; `publicKey?`: `string`; `signature`: `string`; `signedBy?`: `string`; `signingAlgorithmSpec?`: `"ed25519"` | `"ecdsa-sha256"`; }> Defined in: [packages/dapp/src/rpc/client.ts:53](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/client.ts#L53) Sign an arbitrary message #### Parameters ##### params ###### message `string` = `...` #### Returns `Promise`<{ `encoding?`: `"base64"` | `"hex"`; `format?`: `"concat"` | `"der"`; `publicKey?`: `string`; `signature`: `string`; `signedBy?`: `string`; `signingAlgorithmSpec?`: `"ed25519"` | `"ecdsa-sha256"`; }> *** ### status() > **status**(): `Promise`<{ `connection`: { `isConnected`: `boolean`; `isNetworkConnected`: `boolean`; `networkReason?`: `string`; `reason?`: `string`; `userUrl?`: `string`; }; `network?`: { `accessToken?`: `string`; `ledgerApi?`: `string`; `networkId`: `string`; }; `provider`: { `id`: `string`; `providerType`: `"browser"` | `"desktop"` | `"mobile"` | `"remote"`; `url?`: `string`; `userUrl?`: `string`; `version?`: `string`; }; `session?`: { `accessToken`: `string`; `userId`: `string`; }; }> Defined in: [packages/dapp/src/rpc/client.ts:22](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/client.ts#L22) Get current wallet status #### Returns `Promise`<{ `connection`: { `isConnected`: `boolean`; `isNetworkConnected`: `boolean`; `networkReason?`: `string`; `reason?`: `string`; `userUrl?`: `string`; }; `network?`: { `accessToken?`: `string`; `ledgerApi?`: `string`; `networkId`: `string`; }; `provider`: { `id`: `string`; `providerType`: `"browser"` | `"desktop"` | `"mobile"` | `"remote"`; `url?`: `string`; `userUrl?`: `string`; `version?`: `string`; }; `session?`: { `accessToken`: `string`; `userId`: `string`; }; }> # CantonServer Defined in: [packages/dapp/src/rpc/server.ts:96](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/server.ts#L96) ## Methods ### handleRequest() > **handleRequest**(`method`, `params`): `Promise`<{\[`key`: `string`]: `unknown`; `result?`: `unknown`; } | {\[`key`: `string`]: `unknown`; `error`: { `code`: `number`; `data?`: `unknown`; `message`: `string`; }; }> Defined in: [packages/dapp/src/rpc/server.ts:98](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/server.ts#L98) Handle an incoming RPC request #### Parameters ##### method `string` ##### params `unknown` #### Returns `Promise`<{\[`key`: `string`]: `unknown`; `result?`: `unknown`; } | {\[`key`: `string`]: `unknown`; `error`: { `code`: `number`; `data?`: `unknown`; `message`: `string`; }; }> # CantonServerHandlers Defined in: [packages/dapp/src/rpc/server.ts:69](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/server.ts#L69) Handler functions for Canton dApp API methods. Extension implements these handlers to process dApp requests. ## Methods ### accountsChanged()? > `optional` **accountsChanged**(): `Promise`<`object`\[]> Defined in: [packages/dapp/src/rpc/server.ts:90](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/server.ts#L90) #### Returns `Promise`<`object`\[]> *** ### connect() > **connect**(): `Promise`<{ `isConnected`: `boolean`; `isNetworkConnected`: `boolean`; `networkReason?`: `string`; `reason?`: `string`; `userUrl?`: `string`; }> Defined in: [packages/dapp/src/rpc/server.ts:71](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/server.ts#L71) #### Returns `Promise`<{ `isConnected`: `boolean`; `isNetworkConnected`: `boolean`; `networkReason?`: `string`; `reason?`: `string`; `userUrl?`: `string`; }> *** ### connected()? > `optional` **connected**(): `Promise`<{ `connection`: { `isConnected`: `boolean`; `isNetworkConnected`: `boolean`; `networkReason?`: `string`; `reason?`: `string`; `userUrl?`: `string`; }; `network?`: { `accessToken?`: `string`; `ledgerApi?`: `string`; `networkId`: `string`; }; `provider`: { `id`: `string`; `providerType`: `"browser"` | `"desktop"` | `"mobile"` | `"remote"`; `url?`: `string`; `userUrl?`: `string`; `version?`: `string`; }; `session?`: { `accessToken`: `string`; `userId`: `string`; }; }> Defined in: [packages/dapp/src/rpc/server.ts:93](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/server.ts#L93) #### Returns `Promise`<{ `connection`: { `isConnected`: `boolean`; `isNetworkConnected`: `boolean`; `networkReason?`: `string`; `reason?`: `string`; `userUrl?`: `string`; }; `network?`: { `accessToken?`: `string`; `ledgerApi?`: `string`; `networkId`: `string`; }; `provider`: { `id`: `string`; `providerType`: `"browser"` | `"desktop"` | `"mobile"` | `"remote"`; `url?`: `string`; `userUrl?`: `string`; `version?`: `string`; }; `session?`: { `accessToken`: `string`; `userId`: `string`; }; }> *** ### disconnect() > **disconnect**(): `Promise`<`null`> Defined in: [packages/dapp/src/rpc/server.ts:72](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/server.ts#L72) #### Returns `Promise`<`null`> *** ### getActiveNetwork() > **getActiveNetwork**(): `Promise`<{ `accessToken?`: `string`; `ledgerApi?`: `string`; `networkId`: `string`; }> Defined in: [packages/dapp/src/rpc/server.ts:74](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/server.ts#L74) #### Returns `Promise`<{ `accessToken?`: `string`; `ledgerApi?`: `string`; `networkId`: `string`; }> *** ### getPrimaryAccount() > **getPrimaryAccount**(): `Promise`<{ `disabled?`: `boolean`; `externalTxId?`: `string`; `hint`: `string`; `namespace`: `string`; `networkId`: `string`; `partyId`: `string`; `primary`: `boolean`; `publicKey`: `string`; `reason?`: `string`; `signingProviderId`: `string`; `status`: `"initialized"` | `"allocated"` | `"removed"`; `topologyTransactions?`: `string`; }> Defined in: [packages/dapp/src/rpc/server.ts:76](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/server.ts#L76) #### Returns `Promise`<{ `disabled?`: `boolean`; `externalTxId?`: `string`; `hint`: `string`; `namespace`: `string`; `networkId`: `string`; `partyId`: `string`; `primary`: `boolean`; `publicKey`: `string`; `reason?`: `string`; `signingProviderId`: `string`; `status`: `"initialized"` | `"allocated"` | `"removed"`; `topologyTransactions?`: `string`; }> *** ### isConnected() > **isConnected**(): `Promise`<{ `isConnected`: `boolean`; `isNetworkConnected`: `boolean`; `networkReason?`: `string`; `reason?`: `string`; `userUrl?`: `string`; }> Defined in: [packages/dapp/src/rpc/server.ts:73](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/server.ts#L73) #### Returns `Promise`<{ `isConnected`: `boolean`; `isNetworkConnected`: `boolean`; `networkReason?`: `string`; `reason?`: `string`; `userUrl?`: `string`; }> *** ### ledgerApi() > **ledgerApi**(`params`): `Promise`<`Record`<`string`, `unknown`> | `unknown`\[]> Defined in: [packages/dapp/src/rpc/server.ts:86](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/server.ts#L86) #### Parameters ##### params ###### body? `Record`<`string`, `any`> = `...` ###### headers? `Record`<`string`, `any`> = `...` ###### path? `Record`<`string`, `any`> = `...` ###### query? `Record`<`string`, `any`> = `...` ###### requestMethod `"get"` | `"post"` | `"patch"` | `"put"` | `"delete"` = `...` ###### resource `string` = `...` #### Returns `Promise`<`Record`<`string`, `unknown`> | `unknown`\[]> *** ### listAccounts() > **listAccounts**(): `Promise`<`object`\[]> Defined in: [packages/dapp/src/rpc/server.ts:75](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/server.ts#L75) #### Returns `Promise`<`object`\[]> *** ### prepareExecute() > **prepareExecute**(`params`): `Promise`<`null`> Defined in: [packages/dapp/src/rpc/server.ts:77](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/server.ts#L77) #### Parameters ##### params ###### actAs? `string`\[] = `...` ###### commandId? `string` = `...` ###### commands ({ `CreateAndExerciseCommand`: `Record`<`string`, `any`>; } | { `CreateCommand`: { `createArguments`: `Record`<`string`, `any`>; `templateId`: `string`; }; } | { `ExerciseByKeyCommand`: `Record`<`string`, `any`>; } | { `ExerciseCommand`: { `choice`: `string`; `choiceArgument`: `Record`<`string`, `any`>; `contractId`: `string`; `templateId`: `string`; }; })\[] = `JsCommandsSchema` ###### disclosedContracts? `object`\[] = `...` ###### packageIdSelectionPreference? `string`\[] = `...` ###### readAs? `string`\[] = `...` ###### synchronizerId? `string` = `...` #### Returns `Promise`<`null`> *** ### prepareExecuteAndWait() > **prepareExecuteAndWait**(`params`): `Promise`<{ `tx`: { `commandId`: `string`; `payload`: { `completionOffset`: `number`; `updateId`: `string`; }; `status`: `"executed"`; }; }> Defined in: [packages/dapp/src/rpc/server.ts:80](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/server.ts#L80) #### Parameters ##### params ###### actAs? `string`\[] = `...` ###### commandId? `string` = `...` ###### commands ({ `CreateAndExerciseCommand`: `Record`<`string`, `any`>; } | { `CreateCommand`: { `createArguments`: `Record`<`string`, `any`>; `templateId`: `string`; }; } | { `ExerciseByKeyCommand`: `Record`<`string`, `any`>; } | { `ExerciseCommand`: { `choice`: `string`; `choiceArgument`: `Record`<`string`, `any`>; `contractId`: `string`; `templateId`: `string`; }; })\[] = `JsCommandsSchema` ###### disclosedContracts? `object`\[] = `...` ###### packageIdSelectionPreference? `string`\[] = `...` ###### readAs? `string`\[] = `...` ###### synchronizerId? `string` = `...` #### Returns `Promise`<{ `tx`: { `commandId`: `string`; `payload`: { `completionOffset`: `number`; `updateId`: `string`; }; `status`: `"executed"`; }; }> *** ### signMessage() > **signMessage**(`params`): `Promise`<{ `encoding?`: `"base64"` | `"hex"`; `format?`: `"concat"` | `"der"`; `publicKey?`: `string`; `signature`: `string`; `signedBy?`: `string`; `signingAlgorithmSpec?`: `"ed25519"` | `"ecdsa-sha256"`; }> Defined in: [packages/dapp/src/rpc/server.ts:83](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/server.ts#L83) #### Parameters ##### params ###### message `string` = `...` #### Returns `Promise`<{ `encoding?`: `"base64"` | `"hex"`; `format?`: `"concat"` | `"der"`; `publicKey?`: `string`; `signature`: `string`; `signedBy?`: `string`; `signingAlgorithmSpec?`: `"ed25519"` | `"ecdsa-sha256"`; }> *** ### status() > **status**(): `Promise`<{ `connection`: { `isConnected`: `boolean`; `isNetworkConnected`: `boolean`; `networkReason?`: `string`; `reason?`: `string`; `userUrl?`: `string`; }; `network?`: { `accessToken?`: `string`; `ledgerApi?`: `string`; `networkId`: `string`; }; `provider`: { `id`: `string`; `providerType`: `"browser"` | `"desktop"` | `"mobile"` | `"remote"`; `url?`: `string`; `userUrl?`: `string`; `version?`: `string`; }; `session?`: { `accessToken`: `string`; `userId`: `string`; }; }> Defined in: [packages/dapp/src/rpc/server.ts:70](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/server.ts#L70) #### Returns `Promise`<{ `connection`: { `isConnected`: `boolean`; `isNetworkConnected`: `boolean`; `networkReason?`: `string`; `reason?`: `string`; `userUrl?`: `string`; }; `network?`: { `accessToken?`: `string`; `ledgerApi?`: `string`; `networkId`: `string`; }; `provider`: { `id`: `string`; `providerType`: `"browser"` | `"desktop"` | `"mobile"` | `"remote"`; `url?`: `string`; `userUrl?`: `string`; `version?`: `string`; }; `session?`: { `accessToken`: `string`; `userId`: `string`; }; }> *** ### statusChanged()? > `optional` **statusChanged**(): `Promise`<{ `connection`: { `isConnected`: `boolean`; `isNetworkConnected`: `boolean`; `networkReason?`: `string`; `reason?`: `string`; `userUrl?`: `string`; }; `network?`: { `accessToken?`: `string`; `ledgerApi?`: `string`; `networkId`: `string`; }; `provider`: { `id`: `string`; `providerType`: `"browser"` | `"desktop"` | `"mobile"` | `"remote"`; `url?`: `string`; `userUrl?`: `string`; `version?`: `string`; }; `session?`: { `accessToken`: `string`; `userId`: `string`; }; }> Defined in: [packages/dapp/src/rpc/server.ts:92](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/server.ts#L92) #### Returns `Promise`<{ `connection`: { `isConnected`: `boolean`; `isNetworkConnected`: `boolean`; `networkReason?`: `string`; `reason?`: `string`; `userUrl?`: `string`; }; `network?`: { `accessToken?`: `string`; `ledgerApi?`: `string`; `networkId`: `string`; }; `provider`: { `id`: `string`; `providerType`: `"browser"` | `"desktop"` | `"mobile"` | `"remote"`; `url?`: `string`; `userUrl?`: `string`; `version?`: `string`; }; `session?`: { `accessToken`: `string`; `userId`: `string`; }; }> *** ### txChanged()? > `optional` **txChanged**(): `Promise`<{ `commandId`: `string`; `payload`: { `completionOffset`: `number`; `updateId`: `string`; }; `status`: `"executed"`; } | { `commandId`: `string`; `status`: `"failed"`; } | { `commandId`: `string`; `status`: `"pending"`; } | { `commandId`: `string`; `payload`: { `party`: `string`; `signature`: `string`; `signedBy`: `string`; }; `status`: `"signed"`; }> Defined in: [packages/dapp/src/rpc/server.ts:91](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/server.ts#L91) #### Returns `Promise`<{ `commandId`: `string`; `payload`: { `completionOffset`: `number`; `updateId`: `string`; }; `status`: `"executed"`; } | { `commandId`: `string`; `status`: `"failed"`; } | { `commandId`: `string`; `status`: `"pending"`; } | { `commandId`: `string`; `payload`: { `party`: `string`; `signature`: `string`; `signedBy`: `string`; }; `status`: `"signed"`; }> # ExtendedSpliceProvider Defined in: [packages/dapp/src/provider/interface.ts:82](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/provider/interface.ts#L82) Extended provider interface with additional methods. ## Extends * [`SpliceProvider`](api-reference/dapp/src/interfaces/spliceprovider/) ## Properties ### request > **request**: [`TypedRequestFn`](api-reference/dapp/src/type-aliases/typedrequestfn/) Defined in: [packages/dapp/src/provider/interface.ts:46](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/provider/interface.ts#L46) Send a JSON-RPC request to the wallet. Strictly typed to canonical OpenRPC methods. Use the method name as a literal type to get correct params/result types. #### Param Typed request payload with method and params #### Returns Promise resolving to the typed method result #### Throws RPC error if request fails #### Example ```ts // Methods without params const status = await window.canton.request({ method: 'status' }) // status is StatusEvent // Methods with params const result = await window.canton.request({ method: 'prepareExecuteAndWait', params: { commands: {...}, commandId: 'cmd-1' } }) // result is PrepareExecuteAndWaitResult ``` #### Inherited from [`SpliceProvider`](api-reference/dapp/src/interfaces/spliceprovider/).[`request`](api-reference/dapp/src/interfaces/spliceprovider/#request) ## Methods ### emit() > **emit**<`T`>(`event`, …`args`): `boolean` Defined in: [packages/dapp/src/provider/interface.ts:67](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/provider/interface.ts#L67) Emit an event to all registered listeners. #### Type Parameters ##### T `T` = `unknown` #### Parameters ##### event `string` Event name ##### args …`T`\[] Arguments to pass to listeners #### Returns `boolean` true if event had listeners, false otherwise #### Inherited from [`SpliceProvider`](api-reference/dapp/src/interfaces/spliceprovider/).[`emit`](api-reference/dapp/src/interfaces/spliceprovider/#emit) *** ### isConnected() > **isConnected**(): `boolean` Defined in: [packages/dapp/src/provider/interface.ts:84](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/provider/interface.ts#L84) Check if provider is connected to the network #### Returns `boolean` *** ### listenerCount() > **listenerCount**(`event`): `number` Defined in: [packages/dapp/src/provider/interface.ts:90](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/provider/interface.ts#L90) Get the number of listeners for an event #### Parameters ##### event `string` #### Returns `number` *** ### on() > **on**<`T`>(`event`, `listener`): [`SpliceProvider`](api-reference/dapp/src/interfaces/spliceprovider/) Defined in: [packages/dapp/src/provider/interface.ts:58](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/provider/interface.ts#L58) Subscribe to wallet events. #### Type Parameters ##### T `T` = `unknown` #### Parameters ##### event `string` Event name (e.g., ‘accountsChanged’, ‘txChanged’) ##### listener [`EventListener`](api-reference/dapp/src/type-aliases/eventlistener/)<`T`> Callback function #### Returns [`SpliceProvider`](api-reference/dapp/src/interfaces/spliceprovider/) Provider instance for chaining #### Example ```ts window.canton.on('accountsChanged', (accounts) => console.log(accounts)) ``` #### Inherited from [`SpliceProvider`](api-reference/dapp/src/interfaces/spliceprovider/).[`on`](api-reference/dapp/src/interfaces/spliceprovider/#on) *** ### removeAllListeners() > **removeAllListeners**(`event?`): [`SpliceProvider`](api-reference/dapp/src/interfaces/spliceprovider/) Defined in: [packages/dapp/src/provider/interface.ts:87](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/provider/interface.ts#L87) Remove all listeners for an event (or all events) #### Parameters ##### event? `string` #### Returns [`SpliceProvider`](api-reference/dapp/src/interfaces/spliceprovider/) *** ### removeListener() > **removeListener**<`T`>(`event`, `listener`): [`SpliceProvider`](api-reference/dapp/src/interfaces/spliceprovider/) Defined in: [packages/dapp/src/provider/interface.ts:76](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/provider/interface.ts#L76) Unsubscribe from wallet events. #### Type Parameters ##### T `T` = `unknown` #### Parameters ##### event `string` Event name ##### listener [`EventListener`](api-reference/dapp/src/type-aliases/eventlistener/)<`T`> Callback function to remove #### Returns [`SpliceProvider`](api-reference/dapp/src/interfaces/spliceprovider/) Provider instance for chaining #### Inherited from [`SpliceProvider`](api-reference/dapp/src/interfaces/spliceprovider/).[`removeListener`](api-reference/dapp/src/interfaces/spliceprovider/#removelistener) # RpcTransport Defined in: [packages/dapp/src/transport/types.ts:23](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/types.ts#L23) RPC transport interface. Implementations handle the communication mechanism (postMessage, HTTP, etc.) ## Extended by * [`BidirectionalTransport`](api-reference/dapp/src/interfaces/bidirectionaltransport/) ## Methods ### submit() > **submit**(`payload`): `Promise`<{\[`key`: `string`]: `unknown`; `result?`: `unknown`; } | {\[`key`: `string`]: `unknown`; `error`: { `code`: `number`; `data?`: `unknown`; `message`: `string`; }; }> Defined in: [packages/dapp/src/transport/types.ts:30](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/types.ts#L30) Submit an RPC request and wait for response. #### Parameters ##### payload Request payload with method and params ###### method `string` = `...` ###### params? `Record`<`string`, `unknown`> | `unknown`\[] = `...` #### Returns `Promise`<{\[`key`: `string`]: `unknown`; `result?`: `unknown`; } | {\[`key`: `string`]: `unknown`; `error`: { `code`: `number`; `data?`: `unknown`; `message`: `string`; }; }> Promise resolving to success or error response # SpliceProvider Defined in: [packages/dapp/src/provider/interface.ts:23](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/provider/interface.ts#L23) SpliceProvider interface for CIP-103 dApp ↔ Wallet communication. Exposed to dApps as `window.canton`. CIP-103 specifies the request/on/emit/removeListener object shape (the EIP-1193 pattern) and the method/event surface; this interface implements that contract. See [CIP-103](https://github.com/canton-foundation/cips/blob/main/cip-0103/cip-0103.md). ## Extended by * [`ExtendedSpliceProvider`](api-reference/dapp/src/interfaces/extendedspliceprovider/) ## Properties ### request > **request**: [`TypedRequestFn`](api-reference/dapp/src/type-aliases/typedrequestfn/) Defined in: [packages/dapp/src/provider/interface.ts:46](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/provider/interface.ts#L46) Send a JSON-RPC request to the wallet. Strictly typed to canonical OpenRPC methods. Use the method name as a literal type to get correct params/result types. #### Param Typed request payload with method and params #### Returns Promise resolving to the typed method result #### Throws RPC error if request fails #### Example ```ts // Methods without params const status = await window.canton.request({ method: 'status' }) // status is StatusEvent // Methods with params const result = await window.canton.request({ method: 'prepareExecuteAndWait', params: { commands: {...}, commandId: 'cmd-1' } }) // result is PrepareExecuteAndWaitResult ``` ## Methods ### emit() > **emit**<`T`>(`event`, …`args`): `boolean` Defined in: [packages/dapp/src/provider/interface.ts:67](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/provider/interface.ts#L67) Emit an event to all registered listeners. #### Type Parameters ##### T `T` = `unknown` #### Parameters ##### event `string` Event name ##### args …`T`\[] Arguments to pass to listeners #### Returns `boolean` true if event had listeners, false otherwise *** ### on() > **on**<`T`>(`event`, `listener`): `SpliceProvider` Defined in: [packages/dapp/src/provider/interface.ts:58](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/provider/interface.ts#L58) Subscribe to wallet events. #### Type Parameters ##### T `T` = `unknown` #### Parameters ##### event `string` Event name (e.g., ‘accountsChanged’, ‘txChanged’) ##### listener [`EventListener`](api-reference/dapp/src/type-aliases/eventlistener/)<`T`> Callback function #### Returns `SpliceProvider` Provider instance for chaining #### Example ```ts window.canton.on('accountsChanged', (accounts) => console.log(accounts)) ``` *** ### removeListener() > **removeListener**<`T`>(`event`, `listener`): `SpliceProvider` Defined in: [packages/dapp/src/provider/interface.ts:76](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/provider/interface.ts#L76) Unsubscribe from wallet events. #### Type Parameters ##### T `T` = `unknown` #### Parameters ##### event `string` Event name ##### listener [`EventListener`](api-reference/dapp/src/type-aliases/eventlistener/)<`T`> Callback function to remove #### Returns `SpliceProvider` Provider instance for chaining # TransportOptions Defined in: [packages/dapp/src/transport/types.ts:66](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/types.ts#L66) Transport configuration options. ## Properties ### target? > `optional` **target**: `string` Defined in: [packages/dapp/src/transport/types.ts:72](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/types.ts#L72) Optional routing key for browser-extension messaging *** ### targetOrigin? > `optional` **targetOrigin**: `string` Defined in: [packages/dapp/src/transport/types.ts:70](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/types.ts#L70) Origin to accept messages from (for postMessage) *** ### timeout? > `optional` **timeout**: `number` Defined in: [packages/dapp/src/transport/types.ts:68](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/types.ts#L68) Request timeout in milliseconds # WalletConnectTransportConfig Defined in: [packages/dapp/src/transport/walletconnect.ts:61](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/walletconnect.ts#L61) ## Properties ### chainId? > `optional` **chainId**: `string` Defined in: [packages/dapp/src/transport/walletconnect.ts:65](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/walletconnect.ts#L65) CAIP-2 chain, e.g. `canton:mainnet`. Default `canton:devnet`. *** ### ledgerApiAllowedOrigins? > `optional` **ledgerApiAllowedOrigins**: `string`\[] Defined in: [packages/dapp/src/transport/walletconnect.ts:76](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/walletconnect.ts#L76) Allowlist of origins the wallet-advertised `network.ledgerApi` may use for DIRECT, bearer-authed reads (e.g. `["https://gateway.example.com"]`). The ledgerApi URL comes from the wallet’s `canton_status`; without an allowlist a malicious/compromised wallet could point the dApp’s authed fetch at an arbitrary origin and exfiltrate the session token (confused-deputy). When set, the ledgerApi origin MUST match one of these or the read is refused. Strongly recommended in production. When unset, only the scheme is enforced (https, or http for localhost). *** ### ledgerApiTimeoutMs? > `optional` **ledgerApiTimeoutMs**: `number` Defined in: [packages/dapp/src/transport/walletconnect.ts:78](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/walletconnect.ts#L78) Per-request timeout (ms) for direct ledger-api reads. Default 30000. *** ### metadata > **metadata**: `object` Defined in: [packages/dapp/src/transport/walletconnect.ts:85](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/walletconnect.ts#L85) dApp metadata shown to the user in their wallet at the connection prompt (name, description, url, icon). REQUIRED: the wallet renders this as the dApp’s identity, so it must always be the real dApp — never a generic placeholder the user wouldn’t recognize (a trust/anti-phishing concern). #### description > **description**: `string` #### icons > **icons**: `string`\[] #### name > **name**: `string` #### url > **url**: `string` *** ### onEvent()? > `optional` **onEvent**: (`event`, `data`) => `void` Defined in: [packages/dapp/src/transport/walletconnect.ts:98](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/walletconnect.ts#L98) Forward wallet-originated events (`accountsChanged`, `statusChanged`) and session lifecycle (`session_delete`) to the provider’s emitter. The `@sigilry/react` connect path wires this into the provider’s `emit`. #### Parameters ##### event `string` ##### data `unknown` #### Returns `void` *** ### onUri()? > `optional` **onUri**: (`uri`) => `void` Defined in: [packages/dapp/src/transport/walletconnect.ts:92](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/walletconnect.ts#L92) Called with the pairing URI so the dApp can render a QR / deep-link. #### Parameters ##### uri `string` #### Returns `void` *** ### projectId > **projectId**: `string` Defined in: [packages/dapp/src/transport/walletconnect.ts:63](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/walletconnect.ts#L63) Reown/WalletConnect Cloud project id. # dapp/src ## Enumerations * [WalletEvent](api-reference/dapp/src/enumerations/walletevent/) ## Classes * [RpcClientError](api-reference/dapp/src/classes/rpcclienterror/) * [SpliceProviderBase](api-reference/dapp/src/classes/spliceproviderbase/) * [WalletConnectTransport](api-reference/dapp/src/classes/walletconnecttransport/) * [WindowTransport](api-reference/dapp/src/classes/windowtransport/) ## Interfaces * [BidirectionalTransport](api-reference/dapp/src/interfaces/bidirectionaltransport/) * [CantonClient](api-reference/dapp/src/interfaces/cantonclient/) * [CantonServer](api-reference/dapp/src/interfaces/cantonserver/) * [CantonServerHandlers](api-reference/dapp/src/interfaces/cantonserverhandlers/) * [ExtendedSpliceProvider](api-reference/dapp/src/interfaces/extendedspliceprovider/) * [RpcTransport](api-reference/dapp/src/interfaces/rpctransport/) * [SpliceProvider](api-reference/dapp/src/interfaces/spliceprovider/) * [TransportOptions](api-reference/dapp/src/interfaces/transportoptions/) * [WalletConnectTransportConfig](api-reference/dapp/src/interfaces/walletconnecttransportconfig/) ## Type Aliases * [AnyTypedRequestPayload](api-reference/dapp/src/type-aliases/anytypedrequestpayload/) * [ApprovalBridgeMessage](api-reference/dapp/src/type-aliases/approvalbridgemessage/) * [ApprovalRequestData](api-reference/dapp/src/type-aliases/approvalrequestdata/) * [ApprovalResult](api-reference/dapp/src/type-aliases/approvalresult/) * [ErrorResponse](api-reference/dapp/src/type-aliases/errorresponse/) * [EventListener](api-reference/dapp/src/type-aliases/eventlistener/) * [JsonRpcMeta](api-reference/dapp/src/type-aliases/jsonrpcmeta/) * [JsonRpcRequest](api-reference/dapp/src/type-aliases/jsonrpcrequest/) * [JsonRpcResponse](api-reference/dapp/src/type-aliases/jsonrpcresponse/) * [NotificationListener](api-reference/dapp/src/type-aliases/notificationlistener/) * [NotificationMeta](api-reference/dapp/src/type-aliases/notificationmeta/) * [RequestPayload](api-reference/dapp/src/type-aliases/requestpayload/) * [ResponsePayload](api-reference/dapp/src/type-aliases/responsepayload/) * [RpcError](api-reference/dapp/src/type-aliases/rpcerror/) * [RpcErrorCode](api-reference/dapp/src/type-aliases/rpcerrorcode/) * [RpcMethodName](api-reference/dapp/src/type-aliases/rpcmethodname/) * [RuntimeMessage](api-reference/dapp/src/type-aliases/runtimemessage/) * [SpliceMessage](api-reference/dapp/src/type-aliases/splicemessage/) * [SpliceMessageEvent](api-reference/dapp/src/type-aliases/splicemessageevent/) * [SpliceWalletExtAckMessage](api-reference/dapp/src/type-aliases/splicewalletextackmessage/) * [SpliceWalletExtOpenMessage](api-reference/dapp/src/type-aliases/splicewalletextopenmessage/) * [SpliceWalletExtReadyMessage](api-reference/dapp/src/type-aliases/splicewalletextreadymessage/) * [SpliceWalletIdpAuthSuccessMessage](api-reference/dapp/src/type-aliases/splicewalletidpauthsuccessmessage/) * [SpliceWalletRequestMessage](api-reference/dapp/src/type-aliases/splicewalletrequestmessage/) * [SpliceWalletResponseMessage](api-reference/dapp/src/type-aliases/splicewalletresponsemessage/) * [SuccessResponse](api-reference/dapp/src/type-aliases/successresponse/) * [TypedRequestFn](api-reference/dapp/src/type-aliases/typedrequestfn/) * [TypedRequestPayload](api-reference/dapp/src/type-aliases/typedrequestpayload/) * [TypedResult](api-reference/dapp/src/type-aliases/typedresult/) ## Variables * [CANTON\_DAPP\_API\_VERSION](api-reference/dapp/src/variables/canton_dapp_api_version/) * [DEFAULT\_TRANSPORT\_OPTIONS](api-reference/dapp/src/variables/default_transport_options/) * [ErrorResponse](api-reference/dapp/src/variables/errorresponse/) * [JsonRpcMeta](api-reference/dapp/src/variables/jsonrpcmeta/) * [JsonRpcRequest](api-reference/dapp/src/variables/jsonrpcrequest/) * [JsonRpcResponse](api-reference/dapp/src/variables/jsonrpcresponse/) * [RequestPayload](api-reference/dapp/src/variables/requestpayload/) * [ResponsePayload](api-reference/dapp/src/variables/responsepayload/) * [RpcError](api-reference/dapp/src/variables/rpcerror/) * [RpcErrorCode](api-reference/dapp/src/variables/rpcerrorcode/) * [RpcErrorMessage](api-reference/dapp/src/variables/rpcerrormessage/) * [SpliceMessage](api-reference/dapp/src/variables/splicemessage/) * [SpliceWalletExtAckMessage](api-reference/dapp/src/variables/splicewalletextackmessage/) * [SpliceWalletExtOpenMessage](api-reference/dapp/src/variables/splicewalletextopenmessage/) * [SpliceWalletExtReadyMessage](api-reference/dapp/src/variables/splicewalletextreadymessage/) * [SpliceWalletIdpAuthSuccessMessage](api-reference/dapp/src/variables/splicewalletidpauthsuccessmessage/) * [SpliceWalletRequestMessage](api-reference/dapp/src/variables/splicewalletrequestmessage/) * [SpliceWalletResponseMessage](api-reference/dapp/src/variables/splicewalletresponsemessage/) * [SuccessResponse](api-reference/dapp/src/variables/successresponse/) ## Functions * [createCantonClient](api-reference/dapp/src/functions/createcantonclient/) * [createCantonServer](api-reference/dapp/src/functions/createcantonserver/) * [createRpcError](api-reference/dapp/src/functions/createrpcerror/) * [createStubHandlers](api-reference/dapp/src/functions/createstubhandlers/) * [isApprovalBridgeMessage](api-reference/dapp/src/functions/isapprovalbridgemessage/) * [isRpcError](api-reference/dapp/src/functions/isrpcerror/) * [isRuntimeMessage](api-reference/dapp/src/functions/isruntimemessage/) * [isSpliceMessage](api-reference/dapp/src/functions/issplicemessage/) * [isSpliceMessageEvent](api-reference/dapp/src/functions/issplicemessageevent/) * [jsonRpcRequest](api-reference/dapp/src/functions/jsonrpcrequest/) * [jsonRpcResponse](api-reference/dapp/src/functions/jsonrpcresponse/) * [rpcError](api-reference/dapp/src/functions/rpcerror/) # AnyTypedRequestPayload > **AnyTypedRequestPayload** = `{ [M in RpcMethodName]: TypedRequestPayload }`\[[`RpcMethodName`](api-reference/dapp/src/type-aliases/rpcmethodname/)] Defined in: [packages/dapp/src/provider/typed-request.ts:54](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/provider/typed-request.ts#L54) Union type of all valid request payloads. Useful for runtime validation or narrowing. # ApprovalBridgeMessage > **ApprovalBridgeMessage** = `z.infer`<*typeof* `ApprovalBridgeMessageSchema`> Defined in: [packages/dapp/src/messages/runtime-schemas.ts:121](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/runtime-schemas.ts#L121) # ApprovalRequestData > **ApprovalRequestData** = `z.infer`<*typeof* `ApprovalRequestDataSchema`> Defined in: [packages/dapp/src/messages/runtime-schemas.ts:70](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/runtime-schemas.ts#L70) # ApprovalResult > **ApprovalResult** = `z.infer`<*typeof* `ApprovalResultSchema`> Defined in: [packages/dapp/src/messages/runtime-schemas.ts:50](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/runtime-schemas.ts#L50) # ErrorResponse > **ErrorResponse** = `z.infer`<*typeof* [`ErrorResponse`](api-reference/dapp/src/variables/errorresponse/)> Defined in: [packages/dapp/src/messages/schemas.ts:34](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/schemas.ts#L34) # EventListener > **EventListener**<`T`> = (…`args`) => `void` Defined in: [packages/dapp/src/provider/interface.ts:14](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/provider/interface.ts#L14) Event listener function type ## Type Parameters ### T `T` = `unknown` ## Parameters ### args …`T`\[] ## Returns `void` # JsonRpcMeta > **JsonRpcMeta** = `z.infer`<*typeof* [`JsonRpcMeta`](api-reference/dapp/src/variables/jsonrpcmeta/)> Defined in: [packages/dapp/src/messages/schemas.ts:44](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/schemas.ts#L44) # JsonRpcRequest > **JsonRpcRequest** = `z.infer`<*typeof* [`JsonRpcRequest`](api-reference/dapp/src/variables/jsonrpcrequest/)> Defined in: [packages/dapp/src/messages/schemas.ts:50](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/schemas.ts#L50) # JsonRpcResponse > **JsonRpcResponse** = `z.infer`<*typeof* [`JsonRpcResponse`](api-reference/dapp/src/variables/jsonrpcresponse/)> Defined in: [packages/dapp/src/messages/schemas.ts:62](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/schemas.ts#L62) # NotificationListener > **NotificationListener** = (`method`, `params`, `meta`) => `void` Defined in: [packages/dapp/src/transport/types.ts:12](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/types.ts#L12) ## Parameters ### method `string` ### params `unknown` ### meta [`NotificationMeta`](api-reference/dapp/src/type-aliases/notificationmeta/) ## Returns `void` # NotificationMeta > **NotificationMeta** = `object` Defined in: [packages/dapp/src/transport/types.ts:8](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/types.ts#L8) ## Properties ### target? > `optional` **target**: `string` Defined in: [packages/dapp/src/transport/types.ts:9](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/types.ts#L9) # RequestPayload > **RequestPayload** = `z.infer`<*typeof* [`RequestPayload`](api-reference/dapp/src/variables/requestpayload/)> Defined in: [packages/dapp/src/messages/schemas.ts:14](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/schemas.ts#L14) # ResponsePayload > **ResponsePayload** = `z.infer`<*typeof* [`ResponsePayload`](api-reference/dapp/src/variables/responsepayload/)> Defined in: [packages/dapp/src/messages/schemas.ts:41](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/schemas.ts#L41) # RpcError > **RpcError** = `z.infer`<*typeof* [`RpcError`](api-reference/dapp/src/variables/rpcerror/)> Defined in: [packages/dapp/src/messages/schemas.ts:27](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/schemas.ts#L27) # RpcErrorCode > **RpcErrorCode** = *typeof* [`RpcErrorCode`](api-reference/dapp/src/variables/rpcerrorcode/)\[keyof *typeof* [`RpcErrorCode`](api-reference/dapp/src/variables/rpcerrorcode/)] Defined in: [packages/dapp/src/rpc/errors.ts:11](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/errors.ts#L11) # RpcMethodName > **RpcMethodName** = keyof `RpcMethods` Defined in: [packages/dapp/src/provider/typed-request.ts:12](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/provider/typed-request.ts#L12) Union of all valid RPC method names. # RuntimeMessage > **RuntimeMessage** = `z.infer`<*typeof* `RuntimeMessageSchema`> Defined in: [packages/dapp/src/messages/runtime-schemas.ts:93](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/runtime-schemas.ts#L93) # SpliceMessage > **SpliceMessage** = `z.infer`<*typeof* [`SpliceMessage`](api-reference/dapp/src/variables/splicemessage/)> Defined in: [packages/dapp/src/messages/schemas.ts:126](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/schemas.ts#L126) # SpliceMessageEvent > **SpliceMessageEvent** = `MessageEvent`<[`SpliceMessage`](api-reference/dapp/src/type-aliases/splicemessage/)> Defined in: [packages/dapp/src/messages/schemas.ts:140](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/schemas.ts#L140) # SpliceWalletExtAckMessage > **SpliceWalletExtAckMessage** = `z.infer`<*typeof* [`SpliceWalletExtAckMessage`](api-reference/dapp/src/variables/splicewalletextackmessage/)> Defined in: [packages/dapp/src/messages/schemas.ts:99](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/schemas.ts#L99) # SpliceWalletExtOpenMessage > **SpliceWalletExtOpenMessage** = `z.infer`<*typeof* [`SpliceWalletExtOpenMessage`](api-reference/dapp/src/variables/splicewalletextopenmessage/)> Defined in: [packages/dapp/src/messages/schemas.ts:106](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/schemas.ts#L106) # SpliceWalletExtReadyMessage > **SpliceWalletExtReadyMessage** = `z.infer`<*typeof* [`SpliceWalletExtReadyMessage`](api-reference/dapp/src/variables/splicewalletextreadymessage/)> Defined in: [packages/dapp/src/messages/schemas.ts:92](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/schemas.ts#L92) # SpliceWalletIdpAuthSuccessMessage > **SpliceWalletIdpAuthSuccessMessage** = `z.infer`<*typeof* [`SpliceWalletIdpAuthSuccessMessage`](api-reference/dapp/src/variables/splicewalletidpauthsuccessmessage/)> Defined in: [packages/dapp/src/messages/schemas.ts:114](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/schemas.ts#L114) # SpliceWalletRequestMessage > **SpliceWalletRequestMessage** = `z.infer`<*typeof* [`SpliceWalletRequestMessage`](api-reference/dapp/src/variables/splicewalletrequestmessage/)> Defined in: [packages/dapp/src/messages/schemas.ts:77](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/schemas.ts#L77) # SpliceWalletResponseMessage > **SpliceWalletResponseMessage** = `z.infer`<*typeof* [`SpliceWalletResponseMessage`](api-reference/dapp/src/variables/splicewalletresponsemessage/)> Defined in: [packages/dapp/src/messages/schemas.ts:85](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/schemas.ts#L85) # SuccessResponse > **SuccessResponse** = `z.infer`<*typeof* [`SuccessResponse`](api-reference/dapp/src/variables/successresponse/)> Defined in: [packages/dapp/src/messages/schemas.ts:20](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/schemas.ts#L20) # TypedRequestFn > **TypedRequestFn** = <`M`>(`request`) => `Promise`<[`TypedResult`](api-reference/dapp/src/type-aliases/typedresult/)<`M`>> Defined in: [packages/dapp/src/provider/typed-request.ts:46](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/provider/typed-request.ts#L46) Type-safe request function. Strictly typed to canonical OpenRPC methods only. Use the method name as a literal type to get correct params/result types. ## Type Parameters ### M `M` *extends* [`RpcMethodName`](api-reference/dapp/src/type-aliases/rpcmethodname/) ## Parameters ### request [`TypedRequestPayload`](api-reference/dapp/src/type-aliases/typedrequestpayload/)<`M`> ## Returns `Promise`<[`TypedResult`](api-reference/dapp/src/type-aliases/typedresult/)<`M`>> ## Example ```ts const status = await provider.request({ method: 'status' }) // status is StatusEvent const result = await provider.request({ method: 'prepareExecuteAndWait', params: { commands: {...}, commandId: 'cmd-1' } }) // result is PrepareExecuteAndWaitResult ``` # TypedRequestPayload > **TypedRequestPayload**<`M`> = `RpcMethods`\[`M`]\[`"params"`] *extends* `void` ? `object` : `object` Defined in: [packages/dapp/src/provider/typed-request.ts:21](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/provider/typed-request.ts#L21) Type-safe request payload. Makes illegal states unrepresentable: * Methods with void params: `params` is optional and must be undefined * Methods with params: `params` is required with the correct type ## Type Parameters ### M `M` *extends* [`RpcMethodName`](api-reference/dapp/src/type-aliases/rpcmethodname/) # TypedResult > **TypedResult**<`M`> = `RpcMethods`\[`M`]\[`"result"`] Defined in: [packages/dapp/src/provider/typed-request.ts:28](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/provider/typed-request.ts#L28) Result type for a given method. ## Type Parameters ### M `M` *extends* [`RpcMethodName`](api-reference/dapp/src/type-aliases/rpcmethodname/) # CANTON_DAPP_API_VERSION > `const` **CANTON\_DAPP\_API\_VERSION**: `"0.1.0"` = `"0.1.0"` Defined in: [packages/dapp/src/index.ts:21](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/index.ts#L21) Canton dApp API version. Used by both the client SDK and the API gateway to ensure version consistency. # DEFAULT_TRANSPORT_OPTIONS > `const` **DEFAULT\_TRANSPORT\_OPTIONS**: `Required`<`Pick`<[`TransportOptions`](api-reference/dapp/src/interfaces/transportoptions/), `"timeout"` | `"targetOrigin"`>> & `object` Defined in: [packages/dapp/src/transport/types.ts:78](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/transport/types.ts#L78) Default transport options ## Type Declaration ### target > **target**: `string` | `undefined` # ErrorResponse > `const` **ErrorResponse**: `ZodObject`<{ `error`: `ZodObject`<{ `code`: `ZodNumber`; `data`: `ZodOptional`<`ZodUnknown`>; `message`: `ZodString`; }, `$strip`>; }, `$loose`> Defined in: [packages/dapp/src/messages/schemas.ts:34](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/schemas.ts#L34) # JsonRpcMeta > `const` **JsonRpcMeta**: `ZodObject`<{ `id`: `ZodOptional`<`ZodUnion`\>; `jsonrpc`: `ZodLiteral`<`"2.0"`>; }, `$strip`> Defined in: [packages/dapp/src/messages/schemas.ts:44](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/schemas.ts#L44) # JsonRpcRequest > `const` **JsonRpcRequest**: `ZodObject`<{ `id`: `ZodOptional`<`ZodUnion`\>; `jsonrpc`: `ZodLiteral`<`"2.0"`>; `method`: `ZodString`; `params`: `ZodOptional`<`ZodUnion`\, `ZodRecord`<`ZodString`, `ZodUnknown`>]>>; }, `$strip`> Defined in: [packages/dapp/src/messages/schemas.ts:50](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/schemas.ts#L50) # JsonRpcResponse > `const` **JsonRpcResponse**: `ZodUnion`\>; `jsonrpc`: `ZodLiteral`<`"2.0"`>; `result`: `ZodOptional`<`ZodUnknown`>; }, `$loose`>, `ZodObject`<{ `error`: `ZodObject`<{ `code`: `ZodNumber`; `data`: `ZodOptional`<`ZodUnknown`>; `message`: `ZodString`; }, `$strip`>; `id`: `ZodOptional`<`ZodUnion`\>; `jsonrpc`: `ZodLiteral`<`"2.0"`>; }, `$loose`>]> Defined in: [packages/dapp/src/messages/schemas.ts:62](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/schemas.ts#L62) JSON-RPC 2.0 response (success or error) # RequestPayload > `const` **RequestPayload**: `ZodObject`<{ `method`: `ZodString`; `params`: `ZodOptional`<`ZodUnion`\, `ZodRecord`<`ZodString`, `ZodUnknown`>]>>; }, `$strip`> Defined in: [packages/dapp/src/messages/schemas.ts:14](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/schemas.ts#L14) # ResponsePayload > `const` **ResponsePayload**: `ZodUnion`\; }, `$loose`>, `ZodObject`<{ `error`: `ZodObject`<{ `code`: `ZodNumber`; `data`: `ZodOptional`<`ZodUnknown`>; `message`: `ZodString`; }, `$strip`>; }, `$loose`>]> Defined in: [packages/dapp/src/messages/schemas.ts:41](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/schemas.ts#L41) # RpcError > `const` **RpcError**: `ZodObject`<{ `code`: `ZodNumber`; `data`: `ZodOptional`<`ZodUnknown`>; `message`: `ZodString`; }, `$strip`> Defined in: [packages/dapp/src/messages/schemas.ts:27](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/schemas.ts#L27) # RpcErrorCode > `const` **RpcErrorCode**: `object` Defined in: [packages/dapp/src/rpc/errors.ts:11](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/errors.ts#L11) Standard JSON-RPC 2.0 error codes ## Type Declaration ### CHAIN\_DISCONNECTED > `readonly` **CHAIN\_DISCONNECTED**: `4901` = `4901` The provider is not connected to the requested chain ### DISCONNECTED > `readonly` **DISCONNECTED**: `4900` = `4900` The provider is disconnected from all chains ### INTERNAL\_ERROR > `readonly` **INTERNAL\_ERROR**: `-32603` = `-32603` Internal JSON-RPC error ### INVALID\_INPUT > `readonly` **INVALID\_INPUT**: `-32000` = `-32000` Missing or invalid parameters ### INVALID\_PARAMS > `readonly` **INVALID\_PARAMS**: `-32602` = `-32602` Invalid method parameter(s) ### INVALID\_REQUEST > `readonly` **INVALID\_REQUEST**: `-32600` = `-32600` The JSON sent is not a valid Request object ### LIMIT\_EXCEEDED > `readonly` **LIMIT\_EXCEEDED**: `-32005` = `-32005` Request exceeds defined limit ### METHOD\_NOT\_FOUND > `readonly` **METHOD\_NOT\_FOUND**: `-32601` = `-32601` The method does not exist or is not available ### METHOD\_NOT\_SUPPORTED > `readonly` **METHOD\_NOT\_SUPPORTED**: `-32004` = `-32004` Method is not implemented ### PARSE\_ERROR > `readonly` **PARSE\_ERROR**: `-32700` = `-32700` Invalid JSON was received by the server ### RESOURCE\_NOT\_FOUND > `readonly` **RESOURCE\_NOT\_FOUND**: `-32001` = `-32001` Requested resource not found ### RESOURCE\_UNAVAILABLE > `readonly` **RESOURCE\_UNAVAILABLE**: `-32002` = `-32002` Requested resource not available ### TRANSACTION\_REJECTED > `readonly` **TRANSACTION\_REJECTED**: `-32003` = `-32003` Transaction creation failed ### UNAUTHORIZED > `readonly` **UNAUTHORIZED**: `4100` = `4100` The requested method and/or account has not been authorized by the user ### UNSUPPORTED\_METHOD > `readonly` **UNSUPPORTED\_METHOD**: `4200` = `4200` The provider does not support the requested method ### USER\_REJECTED > `readonly` **USER\_REJECTED**: `4001` = `4001` User rejected the request # RpcErrorMessage > `const` **RpcErrorMessage**: `object` Defined in: [packages/dapp/src/rpc/errors.ts:62](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/rpc/errors.ts#L62) Standard error messages ## Type Declaration ### -32000 > `readonly` **-32000**: `"Invalid input"` = `"Invalid input"` ### -32001 > `readonly` **-32001**: `"Resource not found"` = `"Resource not found"` ### -32002 > `readonly` **-32002**: `"Resource unavailable"` = `"Resource unavailable"` ### -32003 > `readonly` **-32003**: `"Transaction rejected"` = `"Transaction rejected"` ### -32004 > `readonly` **-32004**: `"Method not supported"` = `"Method not supported"` ### -32005 > `readonly` **-32005**: `"Limit exceeded"` = `"Limit exceeded"` ### -32600 > `readonly` **-32600**: `"Invalid request"` = `"Invalid request"` ### -32601 > `readonly` **-32601**: `"Method not found"` = `"Method not found"` ### -32602 > `readonly` **-32602**: `"Invalid params"` = `"Invalid params"` ### -32603 > `readonly` **-32603**: `"Internal error"` = `"Internal error"` ### -32700 > `readonly` **-32700**: `"Parse error"` = `"Parse error"` ### 4001 > `readonly` **4001**: `"User Rejected Request"` = `"User Rejected Request"` ### 4100 > `readonly` **4100**: `"Unauthorized"` = `"Unauthorized"` ### 4200 > `readonly` **4200**: `"Unsupported Method"` = `"Unsupported Method"` ### 4900 > `readonly` **4900**: `"Disconnected"` = `"Disconnected"` ### 4901 > `readonly` **4901**: `"Chain Disconnected"` = `"Chain Disconnected"` # SpliceMessage > `const` **SpliceMessage**: `ZodDiscriminatedUnion`<\[`ZodObject`<{ `request`: `ZodObject`<{ `id`: `ZodOptional`<`ZodUnion`\>; `jsonrpc`: `ZodLiteral`<`"2.0"`>; `method`: `ZodString`; `params`: `ZodOptional`<`ZodUnion`\, `ZodRecord`<`ZodString`, `ZodUnknown`>]>>; }, `$strip`>; `target`: `ZodOptional`<`ZodString`>; `type`: `ZodLiteral`<[`SPLICE_WALLET_REQUEST`](api-reference/dapp/src/enumerations/walletevent/#splice_wallet_request)>; }, `$strip`>, `ZodObject`<{ `response`: `ZodUnion`\>; `jsonrpc`: `ZodLiteral`<`"2.0"`>; `result`: `ZodOptional`<`ZodUnknown`>; }, `$loose`>, `ZodObject`<{ `error`: `ZodObject`<{ `code`: `ZodNumber`; `data`: `ZodOptional`<…>; `message`: `ZodString`; }, `$strip`>; `id`: `ZodOptional`<`ZodUnion`\>; `jsonrpc`: `ZodLiteral`<`"2.0"`>; }, `$loose`>]>; `type`: `ZodLiteral`<[`SPLICE_WALLET_RESPONSE`](api-reference/dapp/src/enumerations/walletevent/#splice_wallet_response)>; }, `$strip`>, `ZodObject`<{ `target`: `ZodOptional`<`ZodString`>; `type`: `ZodLiteral`<[`SPLICE_WALLET_EXT_READY`](api-reference/dapp/src/enumerations/walletevent/#splice_wallet_ext_ready)>; }, `$strip`>], `"type"`> Defined in: [packages/dapp/src/messages/schemas.ts:126](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/schemas.ts#L126) Discriminated union of all message types # SpliceWalletExtAckMessage > `const` **SpliceWalletExtAckMessage**: `ZodObject`<{ `target`: `ZodOptional`<`ZodString`>; `type`: `ZodLiteral`<[`SPLICE_WALLET_EXT_ACK`](api-reference/dapp/src/enumerations/walletevent/#splice_wallet_ext_ack)>; }, `$strip`> Defined in: [packages/dapp/src/messages/schemas.ts:99](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/schemas.ts#L99) Extension acknowledgment - “yes, I’m ready” # SpliceWalletExtOpenMessage > `const` **SpliceWalletExtOpenMessage**: `ZodObject`<{ `target`: `ZodOptional`<`ZodString`>; `type`: `ZodLiteral`<[`SPLICE_WALLET_EXT_OPEN`](api-reference/dapp/src/enumerations/walletevent/#splice_wallet_ext_open)>; `url`: `ZodString`; }, `$strip`> Defined in: [packages/dapp/src/messages/schemas.ts:106](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/schemas.ts#L106) Request to open wallet UI at a specific URL # SpliceWalletExtReadyMessage > `const` **SpliceWalletExtReadyMessage**: `ZodObject`<{ `target`: `ZodOptional`<`ZodString`>; `type`: `ZodLiteral`<[`SPLICE_WALLET_EXT_READY`](api-reference/dapp/src/enumerations/walletevent/#splice_wallet_ext_ready)>; }, `$strip`> Defined in: [packages/dapp/src/messages/schemas.ts:92](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/schemas.ts#L92) dApp discovery message - “is extension loaded?” # SpliceWalletIdpAuthSuccessMessage > `const` **SpliceWalletIdpAuthSuccessMessage**: `ZodObject`<{ `sessionId`: `ZodString`; `token`: `ZodString`; `type`: `ZodLiteral`<[`SPLICE_WALLET_IDP_AUTH_SUCCESS`](api-reference/dapp/src/enumerations/walletevent/#splice_wallet_idp_auth_success)>; }, `$strip`> Defined in: [packages/dapp/src/messages/schemas.ts:114](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/schemas.ts#L114) IDP auth success notification with token # SpliceWalletRequestMessage > `const` **SpliceWalletRequestMessage**: `ZodObject`<{ `request`: `ZodObject`<{ `id`: `ZodOptional`<`ZodUnion`\>; `jsonrpc`: `ZodLiteral`<`"2.0"`>; `method`: `ZodString`; `params`: `ZodOptional`<`ZodUnion`\, `ZodRecord`<`ZodString`, `ZodUnknown`>]>>; }, `$strip`>; `target`: `ZodOptional`<`ZodString`>; `type`: `ZodLiteral`<[`SPLICE_WALLET_REQUEST`](api-reference/dapp/src/enumerations/walletevent/#splice_wallet_request)>; }, `$strip`> Defined in: [packages/dapp/src/messages/schemas.ts:77](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/schemas.ts#L77) Message containing a JSON-RPC request from dApp to extension # SpliceWalletResponseMessage > `const` **SpliceWalletResponseMessage**: `ZodObject`<{ `response`: `ZodUnion`\>; `jsonrpc`: `ZodLiteral`<`"2.0"`>; `result`: `ZodOptional`<`ZodUnknown`>; }, `$loose`>, `ZodObject`<{ `error`: `ZodObject`<{ `code`: `ZodNumber`; `data`: `ZodOptional`<`ZodUnknown`>; `message`: `ZodString`; }, `$strip`>; `id`: `ZodOptional`<`ZodUnion`\>; `jsonrpc`: `ZodLiteral`<`"2.0"`>; }, `$loose`>]>; `type`: `ZodLiteral`<[`SPLICE_WALLET_RESPONSE`](api-reference/dapp/src/enumerations/walletevent/#splice_wallet_response)>; }, `$strip`> Defined in: [packages/dapp/src/messages/schemas.ts:85](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/schemas.ts#L85) Message containing a JSON-RPC response from extension to dApp # SuccessResponse > `const` **SuccessResponse**: `ZodObject`<{ `result`: `ZodOptional`<`ZodUnknown`>; }, `$loose`> Defined in: [packages/dapp/src/messages/schemas.ts:20](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/dapp/src/messages/schemas.ts#L20) # applyPrunedOffsetFloor ## Call Signature > **applyPrunedOffsetFloor**(`body`, `prunedOffset`): `GetUpdatesRequest` Defined in: [packages/react/src/hooks/ledgerApiContract.ts:235](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/ledgerApiContract.ts#L235) ### Parameters #### body `GetUpdatesRequest` #### prunedOffset `string` ### Returns `GetUpdatesRequest` ## Call Signature > **applyPrunedOffsetFloor**<`T`>(`body`, `prunedOffset`): `T` Defined in: [packages/react/src/hooks/ledgerApiContract.ts:239](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/ledgerApiContract.ts#L239) ### Type Parameters #### T `T` *extends* `UpdatesRequestLike` ### Parameters #### body `T` #### prunedOffset `string` ### Returns `T` ## Call Signature > **applyPrunedOffsetFloor**<`T`>(`body`, `prunedOffset`): `T` & `object` Defined in: [packages/react/src/hooks/ledgerApiContract.ts:243](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/ledgerApiContract.ts#L243) ### Type Parameters #### T `T` *extends* `UpdatesRequestRecord` ### Parameters #### body `T` #### prunedOffset `string` ### Returns `T` & `object` # CantonReactProvider > **CantonReactProvider**(`__namedParameters`): `ReactNode` Defined in: [packages/react/src/context.tsx:206](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/context.tsx#L206) @sigilry/react - React hooks and context for Canton wallet integration Provides react-query powered hooks following wagmi patterns. ## Parameters ### \_\_namedParameters `CantonProviderProps` ## Returns `ReactNode` ## Example ```tsx import { CantonReactProvider, useConnect, useLedgerEnd } from '@sigilry/react' import { QueryClient, QueryClientProvider } from '@tanstack/react-query' const queryClient = new QueryClient() function App() { return ( ) } ``` # createWalletConnectProvider > **createWalletConnectProvider**(`config`): [`CantonProvider`](api-reference/react/src/type-aliases/cantonprovider/) Defined in: [packages/react/src/walletconnect-provider.ts:21](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/walletconnect-provider.ts#L21) ## Parameters ### config [`WalletConnectTransportConfig`](api-reference/react/src/interfaces/walletconnecttransportconfig/) ## Returns [`CantonProvider`](api-reference/react/src/type-aliases/cantonprovider/) # deriveRecentBeginExclusive ## Call Signature > **deriveRecentBeginExclusive**(`body`, `ledgerEndOffset`, `defaultDepth?`): `string` Defined in: [packages/react/src/hooks/ledgerApiContract.ts:265](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/ledgerApiContract.ts#L265) ### Parameters #### body `GetUpdatesRequest` #### ledgerEndOffset `string` #### defaultDepth? `number` ### Returns `string` ## Call Signature > **deriveRecentBeginExclusive**(`body`, `ledgerEndOffset`, `defaultDepth?`): `string` Defined in: [packages/react/src/hooks/ledgerApiContract.ts:270](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/ledgerApiContract.ts#L270) ### Parameters #### body `UpdatesRequestLike` #### ledgerEndOffset `string` #### defaultDepth? `number` ### Returns `string` ## Call Signature > **deriveRecentBeginExclusive**(`body`, `ledgerEndOffset`, `defaultDepth?`): `string` Defined in: [packages/react/src/hooks/ledgerApiContract.ts:275](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/ledgerApiContract.ts#L275) ### Parameters #### body `UpdatesRequestRecord` #### ledgerEndOffset `string` #### defaultDepth? `number` ### Returns `string` # isMaximumListElementsError > **isMaximumListElementsError**(`err`): `boolean` Defined in: [packages/react/src/hooks/ledgerApiContract.ts:294](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/ledgerApiContract.ts#L294) ## Parameters ### err `unknown` ## Returns `boolean` # parseError > **parseError**(`error`): [`ParsedError`](api-reference/react/src/interfaces/parsederror/) Defined in: [packages/react/src/types.ts:58](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/types.ts#L58) Parse RPC error into user-friendly format ## Parameters ### error `unknown` ## Returns [`ParsedError`](api-reference/react/src/interfaces/parsederror/) # parseJwt > **parseJwt**(`token`): [`JwtPayload`](api-reference/react/src/interfaces/jwtpayload/) | `null` Defined in: [packages/react/src/hooks/useSession.ts:78](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSession.ts#L78) Parse a JWT token without validation (client-side only, for display purposes) IMPORTANT: This does NOT validate the signature - use for UI display only ## Parameters ### token `string` ## Returns [`JwtPayload`](api-reference/react/src/interfaces/jwtpayload/) | `null` # parseLatestPrunedOffsetResponse > **parseLatestPrunedOffsetResponse**(`payload`): `ParsedLatestPrunedOffsetResponse` Defined in: [packages/react/src/hooks/ledgerApiContract.ts:204](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/ledgerApiContract.ts#L204) ## Parameters ### payload `unknown` ## Returns `ParsedLatestPrunedOffsetResponse` # parseLedgerEndResponse > **parseLedgerEndResponse**(`payload`): `object` Defined in: [packages/react/src/hooks/ledgerApiContract.ts:191](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/ledgerApiContract.ts#L191) ## Parameters ### payload `unknown` ## Returns `object` ### offset > **offset**: `LedgerOffset` # parsePartyId > **parsePartyId**(`partyId`): `object` Defined in: [packages/react/src/types.ts:19](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/types.ts#L19) Parse party ID into hint and namespace components ## Parameters ### partyId `string` ## Returns `object` ### hint > **hint**: `string` ### namespace > **namespace**: `string` # useAccounts > **useAccounts**(): [`UseAccountsResult`](api-reference/react/src/interfaces/useaccountsresult/) Defined in: [packages/react/src/hooks/useAccounts.ts:43](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useAccounts.ts#L43) Hook for accessing connected wallet accounts ## Returns [`UseAccountsResult`](api-reference/react/src/interfaces/useaccountsresult/) ## Example ```tsx function AccountList() { const { data: accounts, isConnected } = useAccounts() if (!isConnected) return

Not connected

return (
    {accounts.map(account => (
  • {account.hint}
  • ))}
) } ``` # useActiveAccount > **useActiveAccount**(): [`UseActiveAccountResult`](api-reference/react/src/interfaces/useactiveaccountresult/) Defined in: [packages/react/src/hooks/useActiveAccount.ts:47](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveAccount.ts#L47) Hook for accessing the currently active wallet account ## Returns [`UseActiveAccountResult`](api-reference/react/src/interfaces/useactiveaccountresult/) ## Example ```tsx function ActiveAccountDisplay() { const { data: account, partyId, isConnected } = useActiveAccount() if (!isConnected) return

Not connected

if (!account) return

No active account

return (

Active: {account.hint}

Party ID: {partyId}

) } ``` # useActiveContracts > **useActiveContracts**(`options`): [`UseActiveContractsResult`](api-reference/react/src/interfaces/useactivecontractsresult/) Defined in: [packages/react/src/hooks/useActiveContracts.ts:110](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveContracts.ts#L110) Hook for querying active contracts ## Parameters ### options [`UseActiveContractsOptions`](api-reference/react/src/interfaces/useactivecontractsoptions/) = `{}` ## Returns [`UseActiveContractsResult`](api-reference/react/src/interfaces/useactivecontractsresult/) ## Example ```tsx function ContractList() { const { data: contracts, isLoading } = useActiveContracts({ templateFilter: { packageName: 'splice-wallet-payment', moduleName: 'Splice.Wallet.Payment', entityName: 'TransferPreapproval', } }) if (isLoading) return

Loading...

return (
    {contracts.map(contract => (
  • {contract.templateId}
  • ))}
) } ``` # useCanton > **useCanton**(): [`CantonContextValue`](api-reference/react/src/interfaces/cantoncontextvalue/) Defined in: [packages/react/src/context.tsx:867](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/context.tsx#L867) Hook to access Canton context ## Returns [`CantonContextValue`](api-reference/react/src/interfaces/cantoncontextvalue/) ## Throws if used outside of CantonReactProvider # useCantonProvider > **useCantonProvider**(): [`CantonContextValue`](api-reference/react/src/interfaces/cantoncontextvalue/) Defined in: [packages/react/src/hooks/useCantonProvider.ts:35](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useCantonProvider.ts#L35) Hook for accessing Canton provider state and actions This is an alias for useCanton() for API discoverability. ## Returns [`CantonContextValue`](api-reference/react/src/interfaces/cantoncontextvalue/) ## Example ```tsx function WalletStatus() { const { isConnected, partyId, connect, disconnect } = useCantonProvider() if (!isConnected) { return } return (

Connected: {partyId}

) } ``` # useConnect > **useConnect**(): [`UseConnectResult`](api-reference/react/src/interfaces/useconnectresult/) Defined in: [packages/react/src/hooks/useConnect.ts:51](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useConnect.ts#L51) Hook for connecting to the Canton wallet extension ## Returns [`UseConnectResult`](api-reference/react/src/interfaces/useconnectresult/) ## Example ```tsx function ConnectButton() { const { connect, isPending, isError, error } = useConnect() return ( ) } ``` # useContractStream > **useContractStream**(`options`): [`UseContractStreamResult`](api-reference/react/src/interfaces/usecontractstreamresult/) Defined in: [packages/react/src/hooks/useContractStream.ts:117](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useContractStream.ts#L117) Hook for streaming live contract updates ## Parameters ### options [`UseContractStreamOptions`](api-reference/react/src/interfaces/usecontractstreamoptions/) = `{}` ## Returns [`UseContractStreamResult`](api-reference/react/src/interfaces/usecontractstreamresult/) ## Example ```tsx function ContractList() { const { contracts, isLoading, count } = useContractStream({ templateFilter: { packageName: 'splice-wallet-payment', moduleName: 'Splice.Wallet.Payment', entityName: 'TransferPreapproval', }, pollingInterval: 2000, }) if (isLoading) return

Loading contracts...

return (

{count} Contracts

    {contracts.map(contract => (
  • {contract.templateId}
  • ))}
) } ``` # useDisconnect > **useDisconnect**(): [`UseDisconnectResult`](api-reference/react/src/interfaces/usedisconnectresult/) Defined in: [packages/react/src/hooks/useDisconnect.ts:41](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useDisconnect.ts#L41) Hook for disconnecting from the Canton wallet extension ## Returns [`UseDisconnectResult`](api-reference/react/src/interfaces/usedisconnectresult/) ## Example ```tsx function DisconnectButton() { const { disconnect, isPending } = useDisconnect() return ( ) } ``` # useDiscovery > **useDiscovery**(): readonly [`DiscoveredWallet`](api-reference/react/src/type-aliases/discoveredwallet/)\[] Defined in: [packages/react/src/discovery.tsx:80](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/discovery.tsx#L80) ## Returns readonly [`DiscoveredWallet`](api-reference/react/src/type-aliases/discoveredwallet/)\[] # useExerciseChoice > **useExerciseChoice**(): [`UseExerciseChoiceResult`](api-reference/react/src/interfaces/useexercisechoiceresult/) Defined in: [packages/react/src/hooks/useExerciseChoice.ts:108](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useExerciseChoice.ts#L108) Hook for exercising choices on Canton contracts ## Returns [`UseExerciseChoiceResult`](api-reference/react/src/interfaces/useexercisechoiceresult/) ## Examples ```tsx function AcceptPaymentButton({ contractId }: { contractId: string }) { const { exercise, isPending, isError, error } = useExerciseChoice() const { partyId } = useCanton() const handleAccept = () => { exercise({ contractId, templateId: 'Splice.Wallet.Payment:PaymentRequest', choice: 'PaymentRequest_Accept', choiceArgument: {}, actAs: [partyId], }) } return ( ) } ``` ```tsx import { PaymentRequest } from './generated/Splice/Wallet/Payment' function AcceptPaymentButton({ contractId }: { contractId: string }) { const { exercise, isPending } = useExerciseChoice() const { partyId } = useCanton() const handleAccept = () => { exercise({ contractId, templateId: PaymentRequest.templateId, choice: 'PaymentRequest_Accept', choiceArgument: {}, actAs: [partyId], }) } return ( ) } ``` # useLedgerApi > **useLedgerApi**<`T`>(`options`): [`UseLedgerApiResult`](api-reference/react/src/interfaces/useledgerapiresult/)<`T`> Defined in: [packages/react/src/hooks/useLedgerApi.ts:123](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerApi.ts#L123) ## Type Parameters ### T `T` ## Parameters ### options [`UseLedgerApiOptions`](api-reference/react/src/interfaces/useledgerapioptions/)<`T`> ## Returns [`UseLedgerApiResult`](api-reference/react/src/interfaces/useledgerapiresult/)<`T`> # useLedgerEnd > **useLedgerEnd**(`options`): [`UseLedgerEndResult`](api-reference/react/src/interfaces/useledgerendresult/) Defined in: [packages/react/src/hooks/useLedgerEnd.ts:66](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerEnd.ts#L66) Hook for polling the ledger end offset ## Parameters ### options [`UseLedgerEndOptions`](api-reference/react/src/interfaces/useledgerendoptions/) = `{}` ## Returns [`UseLedgerEndResult`](api-reference/react/src/interfaces/useledgerendresult/) ## Example ```tsx function LedgerStatus() { const { data: offset, isFetching } = useLedgerEnd({ refetchInterval: 2000 }) return (
Offset: {offset ?? 'Loading...'} {isFetching && }
) } ``` # useLedgerUpdates > **useLedgerUpdates**(`options`): [`UseLedgerUpdatesResult`](api-reference/react/src/interfaces/useledgerupdatesresult/) Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:164](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L164) Hook for polling ledger updates ## Parameters ### options [`UseLedgerUpdatesOptions`](api-reference/react/src/interfaces/useledgerupdatesoptions/) = `{}` ## Returns [`UseLedgerUpdatesResult`](api-reference/react/src/interfaces/useledgerupdatesresult/) ## Example ```tsx function UpdatesPanel() { const { updates, isPolling, connectionStatus } = useLedgerUpdates({ pollingInterval: 2000, onUpdate: (newUpdates) => { console.log('New updates:', newUpdates) } }) return (
Status: {connectionStatus}
    {updates.map(u => (
  • {u.updateId}
  • ))}
) } ``` # useSession > **useSession**(`options`): [`UseSessionResult`](api-reference/react/src/interfaces/usesessionresult/) Defined in: [packages/react/src/hooks/useSession.ts:144](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSession.ts#L144) Hook for session management and expiry tracking ## Parameters ### options [`UseSessionOptions`](api-reference/react/src/interfaces/usesessionoptions/) = `{}` ## Returns [`UseSessionResult`](api-reference/react/src/interfaces/usesessionresult/) ## Example ```tsx function SessionStatus() { const { sessionState, timeRemainingFormatted, isExpiringSoon, reauthenticate } = useSession({ onExpiringSoon: () => console.log('Session expiring soon!'), onExpired: () => console.log('Session expired'), }) return (
Status: {sessionState.status} Time remaining: {timeRemainingFormatted} {isExpiringSoon && ( )}
) } ``` # useSignMessage > **useSignMessage**(): [`UseSignMessageResult`](api-reference/react/src/interfaces/usesignmessageresult/) Defined in: [packages/react/src/hooks/useSignMessage.ts:56](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSignMessage.ts#L56) Hook for requesting a signature from the user’s wallet. Wraps the `signMessage` JSON-RPC method with a react-query mutation. Follows wagmi patterns with `{ signMessage, signMessageAsync, isPending, isError, error, data, reset }`. ## Returns [`UseSignMessageResult`](api-reference/react/src/interfaces/usesignmessageresult/) ## Example ```tsx function SignButton({ message }: { message: string }) { const { signMessageAsync, isPending, error } = useSignMessage() const { data: account } = useActiveAccount() const handleSign = async () => { const { signature } = await signMessageAsync({ message }) console.log('signed by', account?.partyId, 'sig:', signature) } return ( ) } ``` # useSubmitCommand > **useSubmitCommand**(): [`UseSubmitCommandResult`](api-reference/react/src/interfaces/usesubmitcommandresult/) Defined in: [packages/react/src/hooks/useSubmitCommand.ts:87](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSubmitCommand.ts#L87) Hook for submitting commands to the Canton ledger ## Returns [`UseSubmitCommandResult`](api-reference/react/src/interfaces/usesubmitcommandresult/) ## Example ```tsx function TransferButton() { const { submit, isPending, isError, error, data } = useSubmitCommand() const { partyId } = useCanton() const handleTransfer = () => { submit({ commands: [{ ExerciseCommand: { templateId: 'Module:Template', contractId: '00deadbeef', choice: 'Transfer', choiceArgument: { recipient: 'alice::1234' }, }, }], actAs: [partyId], }) } return (
{isError &&

Error: {error?.message}

} {data &&

Success! Update ID: {data.tx.payload.updateId}

}
) } ``` # WalletPicker > **WalletPicker**(`__namedParameters`): `ReactNode` Defined in: [packages/react/src/discovery.tsx:94](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/discovery.tsx#L94) ## Parameters ### \_\_namedParameters [`WalletPickerProps`](api-reference/react/src/type-aliases/walletpickerprops/) ## Returns `ReactNode` # ActiveContract Defined in: [packages/react/src/hooks/useActiveContracts.ts:23](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveContracts.ts#L23) Contract data from active contracts query ## Extended by * [`StreamedContract`](api-reference/react/src/interfaces/streamedcontract/) ## Properties ### contractId > **contractId**: `string` Defined in: [packages/react/src/hooks/useActiveContracts.ts:24](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveContracts.ts#L24) *** ### createdAt? > `optional` **createdAt**: `string` Defined in: [packages/react/src/hooks/useActiveContracts.ts:27](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveContracts.ts#L27) *** ### observers? > `optional` **observers**: `string`\[] Defined in: [packages/react/src/hooks/useActiveContracts.ts:29](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveContracts.ts#L29) *** ### payload > **payload**: `Record`<`string`, `unknown`> Defined in: [packages/react/src/hooks/useActiveContracts.ts:26](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveContracts.ts#L26) *** ### signatories? > `optional` **signatories**: `string`\[] Defined in: [packages/react/src/hooks/useActiveContracts.ts:28](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveContracts.ts#L28) *** ### templateId > **templateId**: `string` Defined in: [packages/react/src/hooks/useActiveContracts.ts:25](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveContracts.ts#L25) # ActiveContractsResponse Defined in: [packages/react/src/hooks/useActiveContracts.ts:35](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveContracts.ts#L35) Response from ledgerApi POST /v2/state/active-contracts ## Properties ### contracts > **contracts**: [`ActiveContract`](api-reference/react/src/interfaces/activecontract/)\[] Defined in: [packages/react/src/hooks/useActiveContracts.ts:36](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveContracts.ts#L36) *** ### offset > **offset**: `string` Defined in: [packages/react/src/hooks/useActiveContracts.ts:37](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveContracts.ts#L37) # ArchivedEvent Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:46](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L46) Archived event from a transaction ## Properties ### contractId > **contractId**: `string` Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:48](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L48) *** ### templateId > **templateId**: `string` Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:49](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L49) *** ### type > **type**: `"archived"` Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:47](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L47) # CantonContextValue Defined in: [packages/react/src/context.tsx:146](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/context.tsx#L146) @sigilry/react - React hooks and context for Canton wallet integration Provides react-query powered hooks following wagmi patterns. ## Example ```tsx import { CantonReactProvider, useConnect, useLedgerEnd } from '@sigilry/react' import { QueryClient, QueryClientProvider } from '@tanstack/react-query' const queryClient = new QueryClient() function App() { return ( ) } ``` ## Properties ### accounts > **accounts**: `object`\[] Defined in: [packages/react/src/context.tsx:152](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/context.tsx#L152) #### disabled? > `optional` **disabled**: `boolean` #### externalTxId? > `optional` **externalTxId**: `string` #### hint > **hint**: `string` #### namespace > **namespace**: `string` #### networkId > **networkId**: `string` #### partyId > **partyId**: `string` #### primary > **primary**: `boolean` #### publicKey > **publicKey**: `string` #### reason? > `optional` **reason**: `string` #### signingProviderId > **signingProviderId**: `string` #### status > **status**: `"initialized"` | `"allocated"` | `"removed"` #### topologyTransactions? > `optional` **topologyTransactions**: `string` *** ### activeAccount > **activeAccount**: { `disabled?`: `boolean`; `externalTxId?`: `string`; `hint`: `string`; `namespace`: `string`; `networkId`: `string`; `partyId`: `string`; `primary`: `boolean`; `publicKey`: `string`; `reason?`: `string`; `signingProviderId`: `string`; `status`: `"initialized"` | `"allocated"` | `"removed"`; `topologyTransactions?`: `string`; } | `null` Defined in: [packages/react/src/context.tsx:153](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/context.tsx#L153) *** ### connect() > **connect**: () => `Promise`<{ `isConnected`: `boolean`; `isNetworkConnected`: `boolean`; `networkReason?`: `string`; `reason?`: `string`; `userUrl?`: `string`; }> Defined in: [packages/react/src/context.tsx:158](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/context.tsx#L158) #### Returns `Promise`<{ `isConnected`: `boolean`; `isNetworkConnected`: `boolean`; `networkReason?`: `string`; `reason?`: `string`; `userUrl?`: `string`; }> *** ### connectionState > **connectionState**: [`ConnectionState`](api-reference/react/src/type-aliases/connectionstate/) Defined in: [packages/react/src/context.tsx:148](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/context.tsx#L148) *** ### disconnect() > **disconnect**: () => `Promise`<`void`> Defined in: [packages/react/src/context.tsx:159](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/context.tsx#L159) #### Returns `Promise`<`void`> *** ### isConnected > **isConnected**: `boolean` Defined in: [packages/react/src/context.tsx:150](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/context.tsx#L150) *** ### isConnecting > **isConnecting**: `boolean` Defined in: [packages/react/src/context.tsx:151](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/context.tsx#L151) *** ### networkId > **networkId**: `string` | `null` Defined in: [packages/react/src/context.tsx:155](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/context.tsx#L155) *** ### onAccountsChanged() > **onAccountsChanged**: (`handler`) => () => `void` Defined in: [packages/react/src/context.tsx:168](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/context.tsx#L168) #### Parameters ##### handler (`accounts`) => `void` #### Returns > (): `void` ##### Returns `void` *** ### onConnected() > **onConnected**: (`handler`) => () => `void` Defined in: [packages/react/src/context.tsx:176](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/context.tsx#L176) #### Parameters ##### handler (`event`) => `void` #### Returns > (): `void` ##### Returns `void` *** ### onStatusChanged() > **onStatusChanged**: (`handler`) => () => `void` Defined in: [packages/react/src/context.tsx:175](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/context.tsx#L175) #### Parameters ##### handler (`event`) => `void` #### Returns > (): `void` ##### Returns `void` *** ### onTxChanged() > **onTxChanged**: (`handler`) => () => `void` Defined in: [packages/react/src/context.tsx:169](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/context.tsx#L169) #### Parameters ##### handler (`event`) => `void` #### Returns > (): `void` ##### Returns `void` *** ### partyId > **partyId**: `string` | `null` Defined in: [packages/react/src/context.tsx:154](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/context.tsx#L154) *** ### providerReady > **providerReady**: `boolean` Defined in: [packages/react/src/context.tsx:156](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/context.tsx#L156) *** ### reconnect() > **reconnect**: () => `Promise`<`void`> Defined in: [packages/react/src/context.tsx:160](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/context.tsx#L160) #### Returns `Promise`<`void`> *** ### request() > **request**: <`M`>(`method`, …`params`) => `Promise`<`RpcResult`<`M`>> Defined in: [packages/react/src/context.tsx:163](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/context.tsx#L163) #### Type Parameters ##### M `M` *extends* keyof `RpcMethods` #### Parameters ##### method `M` ##### params …`OptionalParams`<`M`> #### Returns `Promise`<`RpcResult`<`M`>> *** ### setActiveAccount() > **setActiveAccount**: (`partyId`) => `void` Defined in: [packages/react/src/context.tsx:161](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/context.tsx#L161) #### Parameters ##### partyId `string` #### Returns `void` # CreatedEvent Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:34](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L34) Created event from a transaction ## Properties ### contractId > **contractId**: `string` Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:36](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L36) *** ### observers? > `optional` **observers**: `string`\[] Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:40](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L40) *** ### payload > **payload**: `Record`<`string`, `unknown`> Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:38](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L38) *** ### signatories? > `optional` **signatories**: `string`\[] Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:39](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L39) *** ### templateId > **templateId**: `string` Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:37](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L37) *** ### type > **type**: `"created"` Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:35](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L35) # ExerciseChoiceRequest Defined in: [packages/react/src/hooks/useExerciseChoice.ts:19](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useExerciseChoice.ts#L19) Exercise choice request parameters ## Properties ### actAs? > `optional` **actAs**: `string`\[] Defined in: [packages/react/src/hooks/useExerciseChoice.ts:31](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useExerciseChoice.ts#L31) Parties that will act as the choice executor *** ### choice > **choice**: `string` Defined in: [packages/react/src/hooks/useExerciseChoice.ts:25](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useExerciseChoice.ts#L25) Choice name to exercise *** ### choiceArgument > **choiceArgument**: `Record`<`string`, `unknown`> Defined in: [packages/react/src/hooks/useExerciseChoice.ts:27](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useExerciseChoice.ts#L27) Choice argument (the payload for the choice) *** ### commandId? > `optional` **commandId**: `string` Defined in: [packages/react/src/hooks/useExerciseChoice.ts:29](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useExerciseChoice.ts#L29) Unique command identifier (auto-generated if not provided) *** ### contractId > **contractId**: `string` Defined in: [packages/react/src/hooks/useExerciseChoice.ts:21](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useExerciseChoice.ts#L21) Contract ID to exercise the choice on *** ### readAs? > `optional` **readAs**: `string`\[] Defined in: [packages/react/src/hooks/useExerciseChoice.ts:33](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useExerciseChoice.ts#L33) Parties that should have read access *** ### synchronizerId? > `optional` **synchronizerId**: `string` Defined in: [packages/react/src/hooks/useExerciseChoice.ts:35](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useExerciseChoice.ts#L35) Synchronizer to use (auto-selected if not provided) *** ### templateId > **templateId**: `string` Defined in: [packages/react/src/hooks/useExerciseChoice.ts:23](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useExerciseChoice.ts#L23) Template ID (e.g., ‘Splice.Wallet.Payment:PaymentRequest’) # JwtPayload Defined in: [packages/react/src/hooks/useSession.ts:14](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSession.ts#L14) Parsed JWT payload (minimal fields we care about) ## Properties ### actAs? > `optional` **actAs**: `string`\[] Defined in: [packages/react/src/hooks/useSession.ts:24](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSession.ts#L24) Canton party IDs for acting as *** ### aud? > `optional` **aud**: `string` | `string`\[] Defined in: [packages/react/src/hooks/useSession.ts:22](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSession.ts#L22) Audience *** ### exp? > `optional` **exp**: `number` Defined in: [packages/react/src/hooks/useSession.ts:18](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSession.ts#L18) Expiration time (Unix timestamp in seconds) *** ### iat? > `optional` **iat**: `number` Defined in: [packages/react/src/hooks/useSession.ts:20](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSession.ts#L20) Issued at time (Unix timestamp in seconds) *** ### readAs? > `optional` **readAs**: `string`\[] Defined in: [packages/react/src/hooks/useSession.ts:26](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSession.ts#L26) Canton party IDs for reading as *** ### sub? > `optional` **sub**: `string` Defined in: [packages/react/src/hooks/useSession.ts:16](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSession.ts#L16) Subject (usually userId) # LedgerApiResponse Defined in: [packages/react/src/hooks/useLedgerApi.ts:22](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerApi.ts#L22) Parsed Ledger API response ## Type Parameters ### T `T` = `unknown` ## Properties ### data > **data**: `T` Defined in: [packages/react/src/hooks/useLedgerApi.ts:26](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerApi.ts#L26) Parsed response data *** ### raw > **raw**: `Record`<`string`, `unknown`> | `unknown`\[] Defined in: [packages/react/src/hooks/useLedgerApi.ts:24](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerApi.ts#L24) Raw JSON payload from the API # LedgerEndResponse Defined in: [packages/react/src/hooks/useLedgerEnd.ts:17](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerEnd.ts#L17) Response from ledgerApi GET /v2/state/ledger-end ## Properties ### offset > **offset**: `LedgerOffset` Defined in: [packages/react/src/hooks/useLedgerEnd.ts:18](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerEnd.ts#L18) # ParsedError Defined in: [packages/react/src/types.ts:48](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/types.ts#L48) Parsed error with user-friendly message and suggested action ## Properties ### action > **action**: [`ErrorAction`](api-reference/react/src/type-aliases/erroraction/) Defined in: [packages/react/src/types.ts:51](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/types.ts#L51) *** ### code? > `optional` **code**: `string` Defined in: [packages/react/src/types.ts:50](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/types.ts#L50) *** ### message > **message**: `string` Defined in: [packages/react/src/types.ts:49](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/types.ts#L49) *** ### raw? > `optional` **raw**: `unknown` Defined in: [packages/react/src/types.ts:52](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/types.ts#L52) # StreamedContract Defined in: [packages/react/src/hooks/useContractStream.ts:20](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useContractStream.ts#L20) Contract with stream metadata for animations ## Extends * [`ActiveContract`](api-reference/react/src/interfaces/activecontract/) ## Properties ### contractId > **contractId**: `string` Defined in: [packages/react/src/hooks/useActiveContracts.ts:24](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveContracts.ts#L24) #### Inherited from [`ActiveContract`](api-reference/react/src/interfaces/activecontract/).[`contractId`](api-reference/react/src/interfaces/activecontract/#contractid) *** ### createdAt? > `optional` **createdAt**: `string` Defined in: [packages/react/src/hooks/useActiveContracts.ts:27](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveContracts.ts#L27) #### Inherited from [`ActiveContract`](api-reference/react/src/interfaces/activecontract/).[`createdAt`](api-reference/react/src/interfaces/activecontract/#createdat) *** ### isNew > **isNew**: `boolean` Defined in: [packages/react/src/hooks/useContractStream.ts:24](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useContractStream.ts#L24) Whether this contract was just added (for enter animation) *** ### isRemoving > **isRemoving**: `boolean` Defined in: [packages/react/src/hooks/useContractStream.ts:26](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useContractStream.ts#L26) Whether this contract is being removed (for exit animation) *** ### observers? > `optional` **observers**: `string`\[] Defined in: [packages/react/src/hooks/useActiveContracts.ts:29](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveContracts.ts#L29) #### Inherited from [`ActiveContract`](api-reference/react/src/interfaces/activecontract/).[`observers`](api-reference/react/src/interfaces/activecontract/#observers) *** ### payload > **payload**: `Record`<`string`, `unknown`> Defined in: [packages/react/src/hooks/useActiveContracts.ts:26](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveContracts.ts#L26) #### Inherited from [`ActiveContract`](api-reference/react/src/interfaces/activecontract/).[`payload`](api-reference/react/src/interfaces/activecontract/#payload) *** ### signatories? > `optional` **signatories**: `string`\[] Defined in: [packages/react/src/hooks/useActiveContracts.ts:28](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveContracts.ts#L28) #### Inherited from [`ActiveContract`](api-reference/react/src/interfaces/activecontract/).[`signatories`](api-reference/react/src/interfaces/activecontract/#signatories) *** ### streamedAt > **streamedAt**: `number` Defined in: [packages/react/src/hooks/useContractStream.ts:22](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useContractStream.ts#L22) When the contract was first seen (for animation timing) *** ### templateId > **templateId**: `string` Defined in: [packages/react/src/hooks/useActiveContracts.ts:25](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveContracts.ts#L25) #### Inherited from [`ActiveContract`](api-reference/react/src/interfaces/activecontract/).[`templateId`](api-reference/react/src/interfaces/activecontract/#templateid) # TransactionUpdate Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:60](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L60) Transaction update from the ledger ## Properties ### commandId? > `optional` **commandId**: `string` Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:62](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L62) *** ### effectiveAt > **effectiveAt**: `string` Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:65](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L65) *** ### events > **events**: [`ContractEvent`](api-reference/react/src/type-aliases/contractevent/)\[] Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:66](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L66) *** ### offset > **offset**: `string` Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:64](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L64) Ledger offset as string to preserve precision *** ### updateId > **updateId**: `string` Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:61](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L61) # UseAccountsResult Defined in: [packages/react/src/hooks/useAccounts.ts:10](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useAccounts.ts#L10) ## Properties ### data > **data**: `object`\[] Defined in: [packages/react/src/hooks/useAccounts.ts:12](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useAccounts.ts#L12) List of connected accounts #### disabled? > `optional` **disabled**: `boolean` #### externalTxId? > `optional` **externalTxId**: `string` #### hint > **hint**: `string` #### namespace > **namespace**: `string` #### networkId > **networkId**: `string` #### partyId > **partyId**: `string` #### primary > **primary**: `boolean` #### publicKey > **publicKey**: `string` #### reason? > `optional` **reason**: `string` #### signingProviderId > **signingProviderId**: `string` #### status > **status**: `"initialized"` | `"allocated"` | `"removed"` #### topologyTransactions? > `optional` **topologyTransactions**: `string` *** ### error > **error**: `Error` | `null` Defined in: [packages/react/src/hooks/useAccounts.ts:18](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useAccounts.ts#L18) Error if accounts could not be retrieved *** ### isConnected > **isConnected**: `boolean` Defined in: [packages/react/src/hooks/useAccounts.ts:20](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useAccounts.ts#L20) Whether the wallet is connected *** ### isError > **isError**: `boolean` Defined in: [packages/react/src/hooks/useAccounts.ts:16](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useAccounts.ts#L16) Whether there was an error getting accounts *** ### isLoading > **isLoading**: `boolean` Defined in: [packages/react/src/hooks/useAccounts.ts:14](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useAccounts.ts#L14) Whether accounts are loading (during initial connection) # UseActiveAccountResult Defined in: [packages/react/src/hooks/useActiveAccount.ts:10](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveAccount.ts#L10) ## Properties ### data > **data**: { `disabled?`: `boolean`; `externalTxId?`: `string`; `hint`: `string`; `namespace`: `string`; `networkId`: `string`; `partyId`: `string`; `primary`: `boolean`; `publicKey`: `string`; `reason?`: `string`; `signingProviderId`: `string`; `status`: `"initialized"` | `"allocated"` | `"removed"`; `topologyTransactions?`: `string`; } | `null` Defined in: [packages/react/src/hooks/useActiveAccount.ts:12](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveAccount.ts#L12) The currently active account *** ### error > **error**: `Error` | `null` Defined in: [packages/react/src/hooks/useActiveAccount.ts:20](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveAccount.ts#L20) Error if any *** ### isConnected > **isConnected**: `boolean` Defined in: [packages/react/src/hooks/useActiveAccount.ts:22](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveAccount.ts#L22) Whether the wallet is connected *** ### isError > **isError**: `boolean` Defined in: [packages/react/src/hooks/useActiveAccount.ts:18](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveAccount.ts#L18) Whether there was an error *** ### isLoading > **isLoading**: `boolean` Defined in: [packages/react/src/hooks/useActiveAccount.ts:16](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveAccount.ts#L16) Whether account is loading *** ### partyId > **partyId**: `string` | `null` Defined in: [packages/react/src/hooks/useActiveAccount.ts:14](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveAccount.ts#L14) The party ID of the active account *** ### setActiveAccount() > **setActiveAccount**: (`partyId`) => `void` Defined in: [packages/react/src/hooks/useActiveAccount.ts:24](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveAccount.ts#L24) Set a different account as active #### Parameters ##### partyId `string` #### Returns `void` # UseActiveContractsOptions Defined in: [packages/react/src/hooks/useActiveContracts.ts:46](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveContracts.ts#L46) ## Properties ### enabled? > `optional` **enabled**: `boolean` Defined in: [packages/react/src/hooks/useActiveContracts.ts:54](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveContracts.ts#L54) Whether to enable the query (default: true when connected) *** ### refetchInterval? > `optional` **refetchInterval**: `number` Defined in: [packages/react/src/hooks/useActiveContracts.ts:56](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveContracts.ts#L56) Polling interval in milliseconds (default: disabled) *** ### templateFilter? > `optional` **templateFilter**: `CantonTemplateFilter` Defined in: [packages/react/src/hooks/useActiveContracts.ts:52](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveContracts.ts#L52) Template filter for contract queries. Provide as { packageName, moduleName, entityName } object. When omitted, returns all contracts for the party. # UseActiveContractsResult Defined in: [packages/react/src/hooks/useActiveContracts.ts:59](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveContracts.ts#L59) ## Properties ### data > **data**: [`ActiveContract`](api-reference/react/src/interfaces/activecontract/)\[] Defined in: [packages/react/src/hooks/useActiveContracts.ts:61](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveContracts.ts#L61) List of active contracts *** ### error > **error**: `Error` | `null` Defined in: [packages/react/src/hooks/useActiveContracts.ts:73](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveContracts.ts#L73) Error if any *** ### isError > **isError**: `boolean` Defined in: [packages/react/src/hooks/useActiveContracts.ts:71](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveContracts.ts#L71) Whether there was an error *** ### isFetching > **isFetching**: `boolean` Defined in: [packages/react/src/hooks/useActiveContracts.ts:69](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveContracts.ts#L69) Whether the query is fetching (includes background refetches) *** ### isLoading > **isLoading**: `boolean` Defined in: [packages/react/src/hooks/useActiveContracts.ts:67](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveContracts.ts#L67) Whether the query is loading *** ### offset > **offset**: `string` | `undefined` Defined in: [packages/react/src/hooks/useActiveContracts.ts:65](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveContracts.ts#L65) Current ledger offset *** ### rawData > **rawData**: [`ActiveContractsResponse`](api-reference/react/src/interfaces/activecontractsresponse/) | `undefined` Defined in: [packages/react/src/hooks/useActiveContracts.ts:63](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveContracts.ts#L63) Raw response from ledger API *** ### refetch() > **refetch**: () => `void` Defined in: [packages/react/src/hooks/useActiveContracts.ts:75](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useActiveContracts.ts#L75) Manually refetch the contracts #### Returns `void` # UseConnectResult Defined in: [packages/react/src/hooks/useConnect.ts:20](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useConnect.ts#L20) ## Properties ### connect() > **connect**: () => `void` Defined in: [packages/react/src/hooks/useConnect.ts:22](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useConnect.ts#L22) Connect to the wallet #### Returns `void` *** ### connectAsync() > **connectAsync**: () => `Promise`<{ `isConnected`: `boolean`; `isNetworkConnected`: `boolean`; `networkReason?`: `string`; `reason?`: `string`; `userUrl?`: `string`; }> Defined in: [packages/react/src/hooks/useConnect.ts:24](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useConnect.ts#L24) Connect async with promise return #### Returns `Promise`<{ `isConnected`: `boolean`; `isNetworkConnected`: `boolean`; `networkReason?`: `string`; `reason?`: `string`; `userUrl?`: `string`; }> *** ### error > **error**: [`ParsedError`](api-reference/react/src/interfaces/parsederror/) | `null` Defined in: [packages/react/src/hooks/useConnect.ts:30](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useConnect.ts#L30) Error from the last connect attempt *** ### isError > **isError**: `boolean` Defined in: [packages/react/src/hooks/useConnect.ts:28](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useConnect.ts#L28) Whether the last connect attempt failed *** ### isPending > **isPending**: `boolean` Defined in: [packages/react/src/hooks/useConnect.ts:26](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useConnect.ts#L26) Whether a connection is in progress *** ### reset() > **reset**: () => `void` Defined in: [packages/react/src/hooks/useConnect.ts:32](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useConnect.ts#L32) Reset the mutation state #### Returns `void` # UseContractStreamOptions Defined in: [packages/react/src/hooks/useContractStream.ts:29](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useContractStream.ts#L29) ## Properties ### enabled? > `optional` **enabled**: `boolean` Defined in: [packages/react/src/hooks/useContractStream.ts:35](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useContractStream.ts#L35) Whether to enable the stream (default: true when connected) *** ### newDuration? > `optional` **newDuration**: `number` Defined in: [packages/react/src/hooks/useContractStream.ts:37](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useContractStream.ts#L37) Duration to keep isNew flag (ms, default: 2000) *** ### onChange()? > `optional` **onChange**: (`contracts`) => `void` Defined in: [packages/react/src/hooks/useContractStream.ts:41](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useContractStream.ts#L41) Callback when contracts change #### Parameters ##### contracts [`StreamedContract`](api-reference/react/src/interfaces/streamedcontract/)\[] #### Returns `void` *** ### pollingInterval? > `optional` **pollingInterval**: `number` Defined in: [packages/react/src/hooks/useContractStream.ts:33](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useContractStream.ts#L33) Polling interval in milliseconds (default: 2000) *** ### removeDuration? > `optional` **removeDuration**: `number` Defined in: [packages/react/src/hooks/useContractStream.ts:39](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useContractStream.ts#L39) Duration to keep isRemoving before actually removing (ms, default: 500) *** ### templateFilter? > `optional` **templateFilter**: `CantonTemplateFilter` Defined in: [packages/react/src/hooks/useContractStream.ts:31](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useContractStream.ts#L31) Template filter for contracts to watch # UseContractStreamResult Defined in: [packages/react/src/hooks/useContractStream.ts:44](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useContractStream.ts#L44) ## Properties ### connectionStatus > **connectionStatus**: `"disconnected"` | `"connected"` | `"error"` | `"polling"` Defined in: [packages/react/src/hooks/useContractStream.ts:58](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useContractStream.ts#L58) Connection status *** ### contracts > **contracts**: [`StreamedContract`](api-reference/react/src/interfaces/streamedcontract/)\[] Defined in: [packages/react/src/hooks/useContractStream.ts:46](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useContractStream.ts#L46) Current list of contracts with stream metadata *** ### count > **count**: `number` Defined in: [packages/react/src/hooks/useContractStream.ts:48](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useContractStream.ts#L48) Number of active contracts *** ### error > **error**: `Error` | `null` Defined in: [packages/react/src/hooks/useContractStream.ts:56](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useContractStream.ts#L56) Error if any *** ### isError > **isError**: `boolean` Defined in: [packages/react/src/hooks/useContractStream.ts:54](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useContractStream.ts#L54) Whether there was an error *** ### isLoading > **isLoading**: `boolean` Defined in: [packages/react/src/hooks/useContractStream.ts:50](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useContractStream.ts#L50) Whether initial load is in progress *** ### isPolling > **isPolling**: `boolean` Defined in: [packages/react/src/hooks/useContractStream.ts:52](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useContractStream.ts#L52) Whether updates are being polled *** ### offset > **offset**: `string` | `undefined` Defined in: [packages/react/src/hooks/useContractStream.ts:60](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useContractStream.ts#L60) Current ledger offset (string to preserve precision) *** ### refresh() > **refresh**: () => `void` Defined in: [packages/react/src/hooks/useContractStream.ts:62](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useContractStream.ts#L62) Manually refresh contracts #### Returns `void` # UseDisconnectResult Defined in: [packages/react/src/hooks/useDisconnect.ts:10](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useDisconnect.ts#L10) ## Properties ### disconnect() > **disconnect**: () => `void` Defined in: [packages/react/src/hooks/useDisconnect.ts:12](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useDisconnect.ts#L12) Disconnect from the wallet #### Returns `void` *** ### disconnectAsync() > **disconnectAsync**: () => `Promise`<`void`> Defined in: [packages/react/src/hooks/useDisconnect.ts:14](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useDisconnect.ts#L14) Disconnect async with promise return #### Returns `Promise`<`void`> *** ### error > **error**: `Error` | `null` Defined in: [packages/react/src/hooks/useDisconnect.ts:20](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useDisconnect.ts#L20) Error from the last disconnect attempt *** ### isError > **isError**: `boolean` Defined in: [packages/react/src/hooks/useDisconnect.ts:18](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useDisconnect.ts#L18) Whether the last disconnect attempt failed *** ### isPending > **isPending**: `boolean` Defined in: [packages/react/src/hooks/useDisconnect.ts:16](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useDisconnect.ts#L16) Whether a disconnect is in progress *** ### reset() > **reset**: () => `void` Defined in: [packages/react/src/hooks/useDisconnect.ts:22](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useDisconnect.ts#L22) Reset the mutation state #### Returns `void` # UseExerciseChoiceResult Defined in: [packages/react/src/hooks/useExerciseChoice.ts:38](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useExerciseChoice.ts#L38) ## Properties ### data > **data**: { `tx`: { `commandId`: `string`; `payload`: { `completionOffset`: `number`; `updateId`: `string`; }; `status`: `"executed"`; }; } | `undefined` Defined in: [packages/react/src/hooks/useExerciseChoice.ts:50](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useExerciseChoice.ts#L50) Result from the last successful exercise *** ### error > **error**: [`ParsedError`](api-reference/react/src/interfaces/parsederror/) | `null` Defined in: [packages/react/src/hooks/useExerciseChoice.ts:48](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useExerciseChoice.ts#L48) Error from the last exercise *** ### exercise() > **exercise**: (`params`) => `void` Defined in: [packages/react/src/hooks/useExerciseChoice.ts:40](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useExerciseChoice.ts#L40) Exercise a choice on a contract #### Parameters ##### params [`ExerciseChoiceRequest`](api-reference/react/src/interfaces/exercisechoicerequest/) #### Returns `void` *** ### exerciseAsync() > **exerciseAsync**: (`params`) => `Promise`<{ `tx`: { `commandId`: `string`; `payload`: { `completionOffset`: `number`; `updateId`: `string`; }; `status`: `"executed"`; }; }> Defined in: [packages/react/src/hooks/useExerciseChoice.ts:42](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useExerciseChoice.ts#L42) Exercise async with promise return #### Parameters ##### params [`ExerciseChoiceRequest`](api-reference/react/src/interfaces/exercisechoicerequest/) #### Returns `Promise`<{ `tx`: { `commandId`: `string`; `payload`: { `completionOffset`: `number`; `updateId`: `string`; }; `status`: `"executed"`; }; }> *** ### isError > **isError**: `boolean` Defined in: [packages/react/src/hooks/useExerciseChoice.ts:46](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useExerciseChoice.ts#L46) Whether the last exercise failed *** ### isPending > **isPending**: `boolean` Defined in: [packages/react/src/hooks/useExerciseChoice.ts:44](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useExerciseChoice.ts#L44) Whether an exercise is in progress *** ### reset() > **reset**: () => `void` Defined in: [packages/react/src/hooks/useExerciseChoice.ts:52](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useExerciseChoice.ts#L52) Reset the mutation state #### Returns `void` # UseLedgerApiOptions Defined in: [packages/react/src/hooks/useLedgerApi.ts:48](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerApi.ts#L48) ## Type Parameters ### T `T` ## Properties ### parse > **parse**: `LedgerApiParser`<`T`> Defined in: [packages/react/src/hooks/useLedgerApi.ts:50](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerApi.ts#L50) Parser/validator that narrows unknown JSON payloads to T # UseLedgerApiResult Defined in: [packages/react/src/hooks/useLedgerApi.ts:29](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerApi.ts#L29) ## Type Parameters ### T `T` = `unknown` ## Properties ### data > **data**: [`LedgerApiResponse`](api-reference/react/src/interfaces/ledgerapiresponse/)<`T`> | `undefined` Defined in: [packages/react/src/hooks/useLedgerApi.ts:41](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerApi.ts#L41) Response data from the last successful request *** ### error > **error**: `Error` | `null` Defined in: [packages/react/src/hooks/useLedgerApi.ts:39](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerApi.ts#L39) Error from the last request *** ### isError > **isError**: `boolean` Defined in: [packages/react/src/hooks/useLedgerApi.ts:37](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerApi.ts#L37) Whether the last request failed *** ### isPending > **isPending**: `boolean` Defined in: [packages/react/src/hooks/useLedgerApi.ts:35](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerApi.ts#L35) Whether a request is in progress *** ### request() > **request**: (`params`) => `void` Defined in: [packages/react/src/hooks/useLedgerApi.ts:31](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerApi.ts#L31) Execute a ledger API request #### Parameters ##### params ###### body? `Record`<`string`, `any`> ###### headers? `Record`<`string`, `any`> ###### path? `Record`<`string`, `any`> ###### query? `Record`<`string`, `any`> ###### requestMethod `"get"` | `"post"` | `"patch"` | `"put"` | `"delete"` ###### resource `string` #### Returns `void` *** ### requestAsync() > **requestAsync**: (`params`) => `Promise`<[`LedgerApiResponse`](api-reference/react/src/interfaces/ledgerapiresponse/)<`T`>> Defined in: [packages/react/src/hooks/useLedgerApi.ts:33](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerApi.ts#L33) Execute async with promise return #### Parameters ##### params ###### body? `Record`<`string`, `any`> ###### headers? `Record`<`string`, `any`> ###### path? `Record`<`string`, `any`> ###### query? `Record`<`string`, `any`> ###### requestMethod `"get"` | `"post"` | `"patch"` | `"put"` | `"delete"` ###### resource `string` #### Returns `Promise`<[`LedgerApiResponse`](api-reference/react/src/interfaces/ledgerapiresponse/)<`T`>> *** ### reset() > **reset**: () => `void` Defined in: [packages/react/src/hooks/useLedgerApi.ts:43](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerApi.ts#L43) Reset the mutation state #### Returns `void` # UseLedgerEndOptions Defined in: [packages/react/src/hooks/useLedgerEnd.ts:21](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerEnd.ts#L21) ## Properties ### enabled? > `optional` **enabled**: `boolean` Defined in: [packages/react/src/hooks/useLedgerEnd.ts:25](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerEnd.ts#L25) Whether to enable the query (default: true when connected) *** ### refetchInterval? > `optional` **refetchInterval**: `number` Defined in: [packages/react/src/hooks/useLedgerEnd.ts:23](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerEnd.ts#L23) Polling interval in milliseconds (default: 5000) # UseLedgerEndResult Defined in: [packages/react/src/hooks/useLedgerEnd.ts:28](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerEnd.ts#L28) ## Properties ### data > **data**: `string` | `undefined` Defined in: [packages/react/src/hooks/useLedgerEnd.ts:30](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerEnd.ts#L30) The current ledger end offset *** ### error > **error**: `Error` | `null` Defined in: [packages/react/src/hooks/useLedgerEnd.ts:40](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerEnd.ts#L40) Error if any *** ### isError > **isError**: `boolean` Defined in: [packages/react/src/hooks/useLedgerEnd.ts:38](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerEnd.ts#L38) Whether there was an error *** ### isFetching > **isFetching**: `boolean` Defined in: [packages/react/src/hooks/useLedgerEnd.ts:36](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerEnd.ts#L36) Whether the query is fetching (includes background refetches) *** ### isLoading > **isLoading**: `boolean` Defined in: [packages/react/src/hooks/useLedgerEnd.ts:34](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerEnd.ts#L34) Whether the query is loading *** ### rawData > **rawData**: [`LedgerEndResponse`](api-reference/react/src/interfaces/ledgerendresponse/) | `undefined` Defined in: [packages/react/src/hooks/useLedgerEnd.ts:32](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerEnd.ts#L32) Raw response from ledger API *** ### refetch() > **refetch**: () => `void` Defined in: [packages/react/src/hooks/useLedgerEnd.ts:42](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerEnd.ts#L42) Manually refetch the ledger end #### Returns `void` # UseLedgerUpdatesOptions Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:74](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L74) ## Properties ### enabled? > `optional` **enabled**: `boolean` Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:78](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L78) Whether to enable updates (default: true when connected) *** ### initialOffset? > `optional` **initialOffset**: `string` Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:86](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L86) Initial offset to start polling from (skips ledger-end fetch if provided) *** ### maxHistory? > `optional` **maxHistory**: `number` Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:84](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L84) Maximum updates to keep in history (default: 100) *** ### onUpdate()? > `optional` **onUpdate**: (`updates`) => `void` Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:82](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L82) Callback when new updates arrive #### Parameters ##### updates [`TransactionUpdate`](api-reference/react/src/interfaces/transactionupdate/)\[] #### Returns `void` *** ### pollingInterval? > `optional` **pollingInterval**: `number` Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:76](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L76) Polling interval in milliseconds (default: 2000) *** ### templateFilter? > `optional` **templateFilter**: `CantonTemplateFilter` Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:80](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L80) Template filter to limit updates to specific templates # UseLedgerUpdatesResult Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:89](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L89) ## Properties ### clearHistory() > **clearHistory**: () => `void` Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:111](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L111) Clear update history #### Returns `void` *** ### connectionStatus > **connectionStatus**: `"disconnected"` | `"connected"` | `"error"` | `"polling"` Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:105](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L105) Connection health status *** ### currentOffset > **currentOffset**: `string` | `undefined` Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:95](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L95) Current offset being tracked (string to preserve precision) *** ### error > **error**: `Error` | `null` Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:103](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L103) Error if any *** ### isError > **isError**: `boolean` Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:101](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L101) Whether there was an error *** ### isLoading > **isLoading**: `boolean` Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:97](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L97) Whether initial load is in progress *** ### isPolling > **isPolling**: `boolean` Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:99](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L99) Whether a poll is in progress *** ### lastPollAge > **lastPollAge**: `number` | `undefined` Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:107](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L107) Time since last successful poll in ms *** ### latestUpdate > **latestUpdate**: [`TransactionUpdate`](api-reference/react/src/interfaces/transactionupdate/) | `undefined` Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:93](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L93) Most recent update *** ### poll() > **poll**: () => `void` Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:109](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L109) Manually trigger a poll #### Returns `void` *** ### updates > **updates**: [`TransactionUpdate`](api-reference/react/src/interfaces/transactionupdate/)\[] Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:91](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L91) All updates received since hook mounted # UseSessionOptions Defined in: [packages/react/src/hooks/useSession.ts:44](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSession.ts#L44) ## Properties ### expiringSoonThreshold? > `optional` **expiringSoonThreshold**: `number` Defined in: [packages/react/src/hooks/useSession.ts:46](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSession.ts#L46) Threshold in ms before expiry to consider “expiring soon” (default: 5 minutes) *** ### onExpired()? > `optional` **onExpired**: () => `void` Defined in: [packages/react/src/hooks/useSession.ts:50](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSession.ts#L50) Callback when session expires #### Returns `void` *** ### onExpiringSoon()? > `optional` **onExpiringSoon**: () => `void` Defined in: [packages/react/src/hooks/useSession.ts:48](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSession.ts#L48) Callback when session is about to expire #### Returns `void` *** ### updateInterval? > `optional` **updateInterval**: `number` Defined in: [packages/react/src/hooks/useSession.ts:52](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSession.ts#L52) Update interval in ms (default: 1000) # UseSessionResult Defined in: [packages/react/src/hooks/useSession.ts:55](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSession.ts#L55) ## Properties ### isExpired > **isExpired**: `boolean` Defined in: [packages/react/src/hooks/useSession.ts:63](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSession.ts#L63) Whether session has expired *** ### isExpiringSoon > **isExpiringSoon**: `boolean` Defined in: [packages/react/src/hooks/useSession.ts:61](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSession.ts#L61) Whether session is expiring soon *** ### isValid > **isValid**: `boolean` Defined in: [packages/react/src/hooks/useSession.ts:59](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSession.ts#L59) Whether session is valid and not expiring soon *** ### jwtPayload > **jwtPayload**: [`JwtPayload`](api-reference/react/src/interfaces/jwtpayload/) | `null` Defined in: [packages/react/src/hooks/useSession.ts:69](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSession.ts#L69) Parsed JWT payload (if available) *** ### reauthenticate() > **reauthenticate**: () => `Promise`<`void`> Defined in: [packages/react/src/hooks/useSession.ts:71](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSession.ts#L71) Trigger re-authentication (calls reconnect) #### Returns `Promise`<`void`> *** ### sessionState > **sessionState**: [`SessionState`](api-reference/react/src/type-aliases/sessionstate/) Defined in: [packages/react/src/hooks/useSession.ts:57](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSession.ts#L57) Current session state *** ### timeRemaining > **timeRemaining**: `number` | `undefined` Defined in: [packages/react/src/hooks/useSession.ts:65](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSession.ts#L65) Time remaining in milliseconds (undefined if no session or expired) *** ### timeRemainingFormatted > **timeRemainingFormatted**: `string` Defined in: [packages/react/src/hooks/useSession.ts:67](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSession.ts#L67) Time remaining as formatted string (e.g., “4m 30s”) # UseSignMessageResult Defined in: [packages/react/src/hooks/useSignMessage.ts:14](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSignMessage.ts#L14) ## Properties ### data > **data**: { `encoding?`: `"base64"` | `"hex"`; `format?`: `"concat"` | `"der"`; `publicKey?`: `string`; `signature`: `string`; `signedBy?`: `string`; `signingAlgorithmSpec?`: `"ed25519"` | `"ecdsa-sha256"`; } | `undefined` Defined in: [packages/react/src/hooks/useSignMessage.ts:26](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSignMessage.ts#L26) Result from the last successful signing request *** ### error > **error**: [`ParsedError`](api-reference/react/src/interfaces/parsederror/) | `null` Defined in: [packages/react/src/hooks/useSignMessage.ts:24](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSignMessage.ts#L24) Error from the last signing request *** ### isError > **isError**: `boolean` Defined in: [packages/react/src/hooks/useSignMessage.ts:22](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSignMessage.ts#L22) Whether the last signing request failed *** ### isPending > **isPending**: `boolean` Defined in: [packages/react/src/hooks/useSignMessage.ts:20](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSignMessage.ts#L20) Whether a signing request is in progress *** ### reset() > **reset**: () => `void` Defined in: [packages/react/src/hooks/useSignMessage.ts:28](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSignMessage.ts#L28) Reset the mutation state #### Returns `void` *** ### signMessage() > **signMessage**: (`params`) => `void` Defined in: [packages/react/src/hooks/useSignMessage.ts:16](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSignMessage.ts#L16) Request a signature from the wallet #### Parameters ##### params ###### message `string` #### Returns `void` *** ### signMessageAsync() > **signMessageAsync**: (`params`) => `Promise`<{ `encoding?`: `"base64"` | `"hex"`; `format?`: `"concat"` | `"der"`; `publicKey?`: `string`; `signature`: `string`; `signedBy?`: `string`; `signingAlgorithmSpec?`: `"ed25519"` | `"ecdsa-sha256"`; }> Defined in: [packages/react/src/hooks/useSignMessage.ts:18](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSignMessage.ts#L18) Request a signature with promise return #### Parameters ##### params ###### message `string` #### Returns `Promise`<{ `encoding?`: `"base64"` | `"hex"`; `format?`: `"concat"` | `"der"`; `publicKey?`: `string`; `signature`: `string`; `signedBy?`: `string`; `signingAlgorithmSpec?`: `"ed25519"` | `"ecdsa-sha256"`; }> # UseSubmitCommandResult Defined in: [packages/react/src/hooks/useSubmitCommand.ts:35](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSubmitCommand.ts#L35) ## Properties ### data > **data**: { `tx`: { `commandId`: `string`; `payload`: { `completionOffset`: `number`; `updateId`: `string`; }; `status`: `"executed"`; }; } | `undefined` Defined in: [packages/react/src/hooks/useSubmitCommand.ts:47](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSubmitCommand.ts#L47) Result from the last successful submission *** ### error > **error**: [`ParsedError`](api-reference/react/src/interfaces/parsederror/) | `null` Defined in: [packages/react/src/hooks/useSubmitCommand.ts:45](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSubmitCommand.ts#L45) Error from the last submission *** ### isError > **isError**: `boolean` Defined in: [packages/react/src/hooks/useSubmitCommand.ts:43](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSubmitCommand.ts#L43) Whether the last submission failed *** ### isPending > **isPending**: `boolean` Defined in: [packages/react/src/hooks/useSubmitCommand.ts:41](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSubmitCommand.ts#L41) Whether a submission is in progress *** ### reset() > **reset**: () => `void` Defined in: [packages/react/src/hooks/useSubmitCommand.ts:49](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSubmitCommand.ts#L49) Reset the mutation state #### Returns `void` *** ### submit() > **submit**: (`params`) => `void` Defined in: [packages/react/src/hooks/useSubmitCommand.ts:37](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSubmitCommand.ts#L37) Submit a command #### Parameters ##### params ###### actAs? `string`\[] ###### commandId? `string` ###### commands ({ `CreateCommand`: { `createArguments`: `z.ZodRecord`<`z.ZodString`, `z.ZodAny`>; `templateId`: `string`; }; } | { `ExerciseCommand`: { `choice`: `string`; `choiceArgument`: `z.ZodRecord`<`z.ZodString`, `z.ZodAny`>; `contractId`: `string`; `templateId`: `string`; }; } | { `CreateAndExerciseCommand`: `z.ZodRecord`<`z.ZodString`, `z.ZodAny`>; } | { `ExerciseByKeyCommand`: `z.ZodRecord`<`z.ZodString`, `z.ZodAny`>; })\[] ###### disclosedContracts? `object`\[] ###### packageIdSelectionPreference? `string`\[] ###### readAs? `string`\[] ###### synchronizerId? `string` #### Returns `void` *** ### submitAsync() > **submitAsync**: (`params`) => `Promise`<{ `tx`: { `commandId`: `string`; `payload`: { `completionOffset`: `number`; `updateId`: `string`; }; `status`: `"executed"`; }; }> Defined in: [packages/react/src/hooks/useSubmitCommand.ts:39](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSubmitCommand.ts#L39) Submit async with promise return #### Parameters ##### params ###### actAs? `string`\[] ###### commandId? `string` ###### commands ({ `CreateCommand`: { `createArguments`: `z.ZodRecord`<`z.ZodString`, `z.ZodAny`>; `templateId`: `string`; }; } | { `ExerciseCommand`: { `choice`: `string`; `choiceArgument`: `z.ZodRecord`<`z.ZodString`, `z.ZodAny`>; `contractId`: `string`; `templateId`: `string`; }; } | { `CreateAndExerciseCommand`: `z.ZodRecord`<`z.ZodString`, `z.ZodAny`>; } | { `ExerciseByKeyCommand`: `z.ZodRecord`<`z.ZodString`, `z.ZodAny`>; })\[] ###### disclosedContracts? `object`\[] ###### packageIdSelectionPreference? `string`\[] ###### readAs? `string`\[] ###### synchronizerId? `string` #### Returns `Promise`<{ `tx`: { `commandId`: `string`; `payload`: { `completionOffset`: `number`; `updateId`: `string`; }; `status`: `"executed"`; }; }> # WalletConnectTransportConfig Defined in: node\_modules/@sigilry/dapp/dist/src/transport/walletconnect.d.ts:3 ## Properties ### chainId? > `optional` **chainId**: `string` Defined in: node\_modules/@sigilry/dapp/dist/src/transport/walletconnect.d.ts:7 CAIP-2 chain, e.g. `canton:mainnet`. Default `canton:devnet`. *** ### ledgerApiAllowedOrigins? > `optional` **ledgerApiAllowedOrigins**: `string`\[] Defined in: node\_modules/@sigilry/dapp/dist/src/transport/walletconnect.d.ts:18 Allowlist of origins the wallet-advertised `network.ledgerApi` may use for DIRECT, bearer-authed reads (e.g. `["https://gateway.example.com"]`). The ledgerApi URL comes from the wallet’s `canton_status`; without an allowlist a malicious/compromised wallet could point the dApp’s authed fetch at an arbitrary origin and exfiltrate the session token (confused-deputy). When set, the ledgerApi origin MUST match one of these or the read is refused. Strongly recommended in production. When unset, only the scheme is enforced (https, or http for localhost). *** ### ledgerApiTimeoutMs? > `optional` **ledgerApiTimeoutMs**: `number` Defined in: node\_modules/@sigilry/dapp/dist/src/transport/walletconnect.d.ts:20 Per-request timeout (ms) for direct ledger-api reads. Default 30000. *** ### metadata > **metadata**: `object` Defined in: node\_modules/@sigilry/dapp/dist/src/transport/walletconnect.d.ts:27 dApp metadata shown to the user in their wallet at the connection prompt (name, description, url, icon). REQUIRED: the wallet renders this as the dApp’s identity, so it must always be the real dApp — never a generic placeholder the user wouldn’t recognize (a trust/anti-phishing concern). #### description > **description**: `string` #### icons > **icons**: `string`\[] #### name > **name**: `string` #### url > **url**: `string` *** ### onEvent()? > `optional` **onEvent**: (`event`, `data`) => `void` Defined in: node\_modules/@sigilry/dapp/dist/src/transport/walletconnect.d.ts:40 Forward wallet-originated events (`accountsChanged`, `statusChanged`) and session lifecycle (`session_delete`) to the provider’s emitter. The `@sigilry/react` connect path wires this into the provider’s `emit`. #### Parameters ##### event `string` ##### data `unknown` #### Returns `void` *** ### onUri()? > `optional` **onUri**: (`uri`) => `void` Defined in: node\_modules/@sigilry/dapp/dist/src/transport/walletconnect.d.ts:34 Called with the pairing URI so the dApp can render a QR / deep-link. #### Parameters ##### uri `string` #### Returns `void` *** ### projectId > **projectId**: `string` Defined in: node\_modules/@sigilry/dapp/dist/src/transport/walletconnect.d.ts:5 Reown/WalletConnect Cloud project id. # react/src ## Interfaces * [ActiveContract](api-reference/react/src/interfaces/activecontract/) * [ActiveContractsResponse](api-reference/react/src/interfaces/activecontractsresponse/) * [ArchivedEvent](api-reference/react/src/interfaces/archivedevent/) * [CantonContextValue](api-reference/react/src/interfaces/cantoncontextvalue/) * [CreatedEvent](api-reference/react/src/interfaces/createdevent/) * [ExerciseChoiceRequest](api-reference/react/src/interfaces/exercisechoicerequest/) * [JwtPayload](api-reference/react/src/interfaces/jwtpayload/) * [LedgerApiResponse](api-reference/react/src/interfaces/ledgerapiresponse/) * [LedgerEndResponse](api-reference/react/src/interfaces/ledgerendresponse/) * [ParsedError](api-reference/react/src/interfaces/parsederror/) * [StreamedContract](api-reference/react/src/interfaces/streamedcontract/) * [TransactionUpdate](api-reference/react/src/interfaces/transactionupdate/) * [UseAccountsResult](api-reference/react/src/interfaces/useaccountsresult/) * [UseActiveAccountResult](api-reference/react/src/interfaces/useactiveaccountresult/) * [UseActiveContractsOptions](api-reference/react/src/interfaces/useactivecontractsoptions/) * [UseActiveContractsResult](api-reference/react/src/interfaces/useactivecontractsresult/) * [UseConnectResult](api-reference/react/src/interfaces/useconnectresult/) * [UseContractStreamOptions](api-reference/react/src/interfaces/usecontractstreamoptions/) * [UseContractStreamResult](api-reference/react/src/interfaces/usecontractstreamresult/) * [UseDisconnectResult](api-reference/react/src/interfaces/usedisconnectresult/) * [UseExerciseChoiceResult](api-reference/react/src/interfaces/useexercisechoiceresult/) * [UseLedgerApiOptions](api-reference/react/src/interfaces/useledgerapioptions/) * [UseLedgerApiResult](api-reference/react/src/interfaces/useledgerapiresult/) * [UseLedgerEndOptions](api-reference/react/src/interfaces/useledgerendoptions/) * [UseLedgerEndResult](api-reference/react/src/interfaces/useledgerendresult/) * [UseLedgerUpdatesOptions](api-reference/react/src/interfaces/useledgerupdatesoptions/) * [UseLedgerUpdatesResult](api-reference/react/src/interfaces/useledgerupdatesresult/) * [UseSessionOptions](api-reference/react/src/interfaces/usesessionoptions/) * [UseSessionResult](api-reference/react/src/interfaces/usesessionresult/) * [UseSignMessageResult](api-reference/react/src/interfaces/usesignmessageresult/) * [UseSubmitCommandResult](api-reference/react/src/interfaces/usesubmitcommandresult/) * [WalletConnectTransportConfig](api-reference/react/src/interfaces/walletconnecttransportconfig/) ## Type Aliases * [Account](api-reference/react/src/type-aliases/account/) * [CantonProvider](api-reference/react/src/type-aliases/cantonprovider/) * [ConnectionState](api-reference/react/src/type-aliases/connectionstate/) * [ContractEvent](api-reference/react/src/type-aliases/contractevent/) * [DiscoveredWallet](api-reference/react/src/type-aliases/discoveredwallet/) * [ErrorAction](api-reference/react/src/type-aliases/erroraction/) * [ExecutedPayload](api-reference/react/src/type-aliases/executedpayload/) * [KnownErrorCode](api-reference/react/src/type-aliases/knownerrorcode/) * [LedgerApiRequest](api-reference/react/src/type-aliases/ledgerapirequest/) * [SessionState](api-reference/react/src/type-aliases/sessionstate/) * [SignMessageRequest](api-reference/react/src/type-aliases/signmessagerequest/) * [SignMessageResult](api-reference/react/src/type-aliases/signmessageresult/) * [SpliceProviderInfo](api-reference/react/src/type-aliases/spliceproviderinfo/) * [StatusResult](api-reference/react/src/type-aliases/statusresult/) * [StatusType](api-reference/react/src/type-aliases/statustype/) * [SubmitCommandRequest](api-reference/react/src/type-aliases/submitcommandrequest/) * [SubmitCommandResult](api-reference/react/src/type-aliases/submitcommandresult/) * [TxEvent](api-reference/react/src/type-aliases/txevent/) * [UpdateTemplateFilter](api-reference/react/src/type-aliases/updatetemplatefilter/) * [UseCantonProviderResult](api-reference/react/src/type-aliases/usecantonproviderresult/) * [WalletPickerProps](api-reference/react/src/type-aliases/walletpickerprops/) ## Functions * [applyPrunedOffsetFloor](api-reference/react/src/functions/applyprunedoffsetfloor/) * [CantonReactProvider](api-reference/react/src/functions/cantonreactprovider/) * [createWalletConnectProvider](api-reference/react/src/functions/createwalletconnectprovider/) * [deriveRecentBeginExclusive](api-reference/react/src/functions/deriverecentbeginexclusive/) * [isMaximumListElementsError](api-reference/react/src/functions/ismaximumlistelementserror/) * [parseError](api-reference/react/src/functions/parseerror/) * [parseJwt](api-reference/react/src/functions/parsejwt/) * [parseLatestPrunedOffsetResponse](api-reference/react/src/functions/parselatestprunedoffsetresponse/) * [parseLedgerEndResponse](api-reference/react/src/functions/parseledgerendresponse/) * [parsePartyId](api-reference/react/src/functions/parsepartyid/) * [useAccounts](api-reference/react/src/functions/useaccounts/) * [useActiveAccount](api-reference/react/src/functions/useactiveaccount/) * [useActiveContracts](api-reference/react/src/functions/useactivecontracts/) * [useCanton](api-reference/react/src/functions/usecanton/) * [useCantonProvider](api-reference/react/src/functions/usecantonprovider/) * [useConnect](api-reference/react/src/functions/useconnect/) * [useContractStream](api-reference/react/src/functions/usecontractstream/) * [useDisconnect](api-reference/react/src/functions/usedisconnect/) * [useDiscovery](api-reference/react/src/functions/usediscovery/) * [useExerciseChoice](api-reference/react/src/functions/useexercisechoice/) * [useLedgerApi](api-reference/react/src/functions/useledgerapi/) * [useLedgerEnd](api-reference/react/src/functions/useledgerend/) * [useLedgerUpdates](api-reference/react/src/functions/useledgerupdates/) * [useSession](api-reference/react/src/functions/usesession/) * [useSignMessage](api-reference/react/src/functions/usesignmessage/) * [useSubmitCommand](api-reference/react/src/functions/usesubmitcommand/) * [WalletPicker](api-reference/react/src/functions/walletpicker/) # Account > **Account** = `Wallet` Defined in: [packages/react/src/types.ts:14](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/types.ts#L14) Wallet account returned from listAccounts # CantonProvider > **CantonProvider** = `SpliceProvider` & `object` Defined in: [packages/react/src/types.ts:153](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/types.ts#L153) ## Type Declaration ### off()? > `optional` **off**: (`event`, `handler`) => `SpliceProvider` #### Parameters ##### event `string` ##### handler (…`args`) => `void` #### Returns `SpliceProvider` # ConnectionState > **ConnectionState** = { `status`: `"disconnected"`; } | { `status`: `"connecting"`; } | { `accounts`: [`Account`](api-reference/react/src/type-aliases/account/)\[]; `networkId`: `string`; `status`: `"connected"`; } | { `lastAccounts?`: [`Account`](api-reference/react/src/type-aliases/account/)\[]; `status`: `"session_expired"`; } | { `error`: [`ParsedError`](api-reference/react/src/interfaces/parsederror/); `status`: `"error"`; } Defined in: [packages/react/src/types.ts:134](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/types.ts#L134) Connection state as discriminated union # ContractEvent > **ContractEvent** = [`CreatedEvent`](api-reference/react/src/interfaces/createdevent/) | [`ArchivedEvent`](api-reference/react/src/interfaces/archivedevent/) Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:55](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L55) Union type for contract events # DiscoveredWallet > **DiscoveredWallet** = `object` Defined in: node\_modules/@sigilry/dapp/dist/src/discovery/types.d.ts:17 ## Properties ### info > **info**: [`SpliceProviderInfo`](api-reference/react/src/type-aliases/spliceproviderinfo/) Defined in: node\_modules/@sigilry/dapp/dist/src/discovery/types.d.ts:18 ## Methods ### getProvider() > **getProvider**(`opts?`): `SpliceProvider` Defined in: node\_modules/@sigilry/dapp/dist/src/discovery/types.d.ts:19 #### Parameters ##### opts? `TransportOptions` #### Returns `SpliceProvider` # ErrorAction > **ErrorAction** = { `type`: `"reconnect"`; } | { `type`: `"complete_onboarding"`; } | { `type`: `"retry"`; } | { `type`: `"none"`; } Defined in: [packages/react/src/types.ts:39](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/types.ts#L39) Action the user can take to resolve an error # ExecutedPayload > **ExecutedPayload** = `TxChangedExecutedPayload` Defined in: [packages/react/src/hooks/useSubmitCommand.ts:28](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSubmitCommand.ts#L28) Executed transaction payload # KnownErrorCode > **KnownErrorCode** = `"ONBOARDING_INCOMPLETE"` | `"SESSION_EXPIRED"` | `"TOKEN_REFRESH_REQUIRED"` | `"USER_REJECTED"` | `"NOT_CONNECTED"` | `"TIMEOUT"` | `"INTERNAL_ERROR"` Defined in: [packages/react/src/types.ts:27](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/types.ts#L27) Known error codes from the extension/API # LedgerApiRequest > **LedgerApiRequest** = `DappLedgerApiRequest` Defined in: [packages/react/src/hooks/useLedgerApi.ts:17](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerApi.ts#L17) Ledger API request parameters # SessionState > **SessionState** = { `status`: `"no_session"`; } | { `expiresAt`: `Date`; `expiresIn`: `number`; `status`: `"valid"`; } | { `expiresAt`: `Date`; `expiresIn`: `number`; `status`: `"expiring_soon"`; } | { `expiredAt`: `Date`; `status`: `"expired"`; } | { `status`: `"unknown"`; } Defined in: [packages/react/src/hooks/useSession.ts:32](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSession.ts#L32) Session state discriminated union # SignMessageRequest > **SignMessageRequest** = `z.infer`<*typeof* `SignMessageRequestSchema`> Defined in: node\_modules/@sigilry/dapp/dist/src/generated/schemas.d.ts:426 # SignMessageResult > **SignMessageResult** = `z.infer`<*typeof* `SignMessageResultSchema`> Defined in: node\_modules/@sigilry/dapp/dist/src/generated/schemas.d.ts:427 # SpliceProviderInfo > **SpliceProviderInfo** = `object` Defined in: node\_modules/@sigilry/dapp/dist/src/discovery/types.d.ts:11 ## Properties ### icon > **icon**: `` `data:image/${string}` `` Defined in: node\_modules/@sigilry/dapp/dist/src/discovery/types.d.ts:15 *** ### name > **name**: `string` Defined in: node\_modules/@sigilry/dapp/dist/src/discovery/types.d.ts:14 *** ### rdns > **rdns**: `string` Defined in: node\_modules/@sigilry/dapp/dist/src/discovery/types.d.ts:13 *** ### uuid > **uuid**: `string` Defined in: node\_modules/@sigilry/dapp/dist/src/discovery/types.d.ts:12 # StatusResult > **StatusResult** = `StatusEvent` Defined in: [packages/react/src/types.ts:160](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/types.ts#L160) StatusResult from connect() and status() methods # StatusType > **StatusType** = `"connected"` | `"disconnected"` | `"connecting"` | `"error"` Defined in: [packages/react/src/types.ts:144](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/types.ts#L144) Status type for UI display # SubmitCommandRequest > **SubmitCommandRequest** = `JsPrepareSubmissionRequest` Defined in: [packages/react/src/hooks/useSubmitCommand.ts:23](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSubmitCommand.ts#L23) Command submission request parameters Commands are JS objects representing DAML commands (Create, Exercise, etc.) # SubmitCommandResult > **SubmitCommandResult** = `PrepareExecuteAndWaitResult` Defined in: [packages/react/src/hooks/useSubmitCommand.ts:33](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useSubmitCommand.ts#L33) Command submission result # TxEvent > **TxEvent** = `TxChangedEvent` Defined in: [packages/react/src/types.ts:149](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/types.ts#L149) Transaction event from extension # UpdateTemplateFilter > **UpdateTemplateFilter** = `CantonTemplateFilter` Defined in: [packages/react/src/hooks/useLedgerUpdates.ts:72](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useLedgerUpdates.ts#L72) Template filter for updates # UseCantonProviderResult > **UseCantonProviderResult** = [`CantonContextValue`](api-reference/react/src/interfaces/cantoncontextvalue/) Defined in: [packages/react/src/hooks/useCantonProvider.ts:10](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/hooks/useCantonProvider.ts#L10) # WalletPickerProps > **WalletPickerProps** = `Omit`<`HTMLAttributes`<`HTMLDivElement`>, `"onSelect"`> & `object` Defined in: [packages/react/src/discovery.tsx:88](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/react/src/discovery.tsx#L88) ## Type Declaration ### emptyState? > `optional` **emptyState**: `ReactNode` ### onSelect() > **onSelect**: (`wallet`) => `void` #### Parameters ##### wallet [`DiscoveredWallet`](api-reference/react/src/type-aliases/discoveredwallet/) #### Returns `void` ### wallets > **wallets**: readonly [`DiscoveredWallet`](api-reference/react/src/type-aliases/discoveredwallet/)\[] # sigilry ## Modules * [cli/src](api-reference/cli/src/readme/) * [dapp/src](api-reference/dapp/src/readme/) * [dapp/src/discovery](api-reference/dapp/src/discovery/readme/) * [react/src](api-reference/react/src/readme/) * [splice-dars/src](api-reference/splice-dars/src/readme/) # splice-dars/src ## Variables * [allSpliceDars](api-reference/splice-dars/src/variables/allsplicedars/) * [SPLICE\_VERSION](api-reference/splice-dars/src/variables/splice_version/) * [spliceDars](api-reference/splice-dars/src/variables/splicedars/) # allSpliceDars > `const` **allSpliceDars**: readonly `string`\[] Defined in: [packages/splice-dars/src/index.ts:59](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/splice-dars/src/index.ts#L59) All DAR file paths # SPLICE_VERSION > `const` **SPLICE\_VERSION**: `"0.5.14"` = `"0.5.14"` Defined in: [packages/splice-dars/src/index.ts:62](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/splice-dars/src/index.ts#L62) Splice version this package provides DARs for # spliceDars > `const` **spliceDars**: `object` Defined in: [packages/splice-dars/src/index.ts:17](https://github.com/sigilry/sigilry-private/blob/6e62db48667db919301b2c7895d78da4364879a9/packages/splice-dars/src/index.ts#L17) Paths to Splice DAR files ## Type Declaration ### amulet > `readonly` **amulet**: `string` splice-amulet - Core Amulet contracts (AmuletRules, TransferPreapproval, etc.) ### apiFeaturedApp > `readonly` **apiFeaturedApp**: `string` splice-api-featured-app-v1 - Featured app API ### apiTokenAllocation > `readonly` **apiTokenAllocation**: `string` splice-api-token-allocation-v1 ### apiTokenAllocationInstruction > `readonly` **apiTokenAllocationInstruction**: `string` splice-api-token-allocation-instruction-v1 ### apiTokenAllocationRequest > `readonly` **apiTokenAllocationRequest**: `string` splice-api-token-allocation-request-v1 ### apiTokenBurnMint > `readonly` **apiTokenBurnMint**: `string` splice-api-token-burn-mint-v1 ### apiTokenHolding > `readonly` **apiTokenHolding**: `string` splice-api-token-holding-v1 ### apiTokenMetadata > `readonly` **apiTokenMetadata**: `string` splice-api-token-metadata-v1 ### apiTokenTransferInstruction > `readonly` **apiTokenTransferInstruction**: `string` splice-api-token-transfer-instruction-v1 ### util > `readonly` **util**: `string` splice-util - Shared utility modules ### utilBatchedMarkers > `readonly` **utilBatchedMarkers**: `string` splice-util-batched-markers - Batched marker utilities ### utilTokenStandardWallet > `readonly` **utilTokenStandardWallet**: `string` splice-util-token-standard-wallet - Token standard wallet utilities