# Totem Edge SDK — Complete Knowledge Base # Generated by TotemEdgeSDKDocs/scripts/generate.mjs # Last updated: 2026-09-19T11:36:25.491Z ## Page: Agent Policy Overview URL: https://docs.totem.ing/concepts/agent-policy-overview # Agent Policy Overview The **`@totemsdk/agent-policy`** package is the seam between AI agent toolchains and sovereign Minima transactions. It implements the **QVAC execution model** — a four-step pipeline that lets AI agents *propose* actions while ensuring humans (or deterministic policy rules) retain full authority over what actually gets signed. --- ## The QVAC pipeline ``` QVAC proposes → agent-policy evaluates → Totem signs → Minima settles ``` | Step | Actor | What happens | |------|-------|--------------| | **QVAC proposes** | AI agent / automation | Constructs an `AgentProposal` describing an intent: send payment, open channel, transfer asset, etc. | | **agent-policy evaluates** | `@totemsdk/agent-policy` | Runs the proposal through a set of developer-defined `PolicyRule` functions. Returns `approved`, `rejected`, or `requires_human`. | | **Totem signs** | Totem wallet / `@totemsdk/node` | If approved, builds the transaction and signs it with the user's WOTS TreeKey. | | **Minima settles** | Minima network | Broadcasts and mines the TxPoW. | The wallet's private keys never leave the client. QVAC never touches them directly. --- ## Core types ```typescript import type { AgentProposal, AgentPolicy, AgentReceipt, AgentIdentity, PaymentIntent, } from '@totemsdk/agent-policy'; ``` ### `AgentProposal` The AI agent's intent, serialised before any key material is touched: ```typescript interface AgentProposal { id: string; intent: PaymentIntent | ChannelIntent | AssetTransferIntent; requestedBy: AgentIdentity; createdAt: number; expiresAt?: number; metadata?: Record; } ``` ### `AgentPolicy` A developer-supplied evaluator. You implement this interface to express your app's business rules: ```typescript interface AgentPolicy { evaluate(proposal: AgentProposal): Promise; } type PolicyDecision = | { outcome: 'approved'; receipt: AgentReceipt } | { outcome: 'rejected'; reason: string } | { outcome: 'requires_human'; prompt: string }; ``` ### `AgentReceipt` A cryptographically linkable record returned after approval — useful for audit trails: ```typescript interface AgentReceipt { proposalId: string; approvedAt: number; approvedBy: AgentIdentity; policyHash: string; inferenceReceipt?: InferenceReceiptLike; } ``` ### Inference intents With [`@totemsdk/intelligence`](../api/totemsdk-intelligence/index.md) wired in, `PaymentIntent.type` also accepts `'inference'`, letting a policy approve and meter local model inference (LLM, RAG, TTS, vision, …) the same way it approves a payment: ```typescript interface InferenceIntent { type: 'inference'; domain: InferenceDomain; // 'llm' | 'embed' | 'rag' | 'asr' | … (13 domains) operation: string; // e.g. 'completion', 'ragSearch' params?: Record; } ``` On approval, `AgentReceipt.inferenceReceipt` carries the provider's usage figures (`tokensOut`, `durationMs`, …) so inference cost can be budgeted and audited against the provider's `proposalId`/`runId` — without the inference layer ever holding keys. --- ## Writing a policy A policy is just a function (or class) that returns a `PolicyDecision`. Here's a minimal merchant policy: ```typescript import type { AgentPolicy, AgentProposal } from '@totemsdk/agent-policy'; const merchantPolicy: AgentPolicy = { async evaluate(proposal) { const { intent } = proposal; // Only allow payment intents if (intent.type !== 'payment') { return { outcome: 'rejected', reason: 'Only payment intents are allowed' }; } // Auto-approve small payments under 10 MIN if (BigInt(intent.amount) <= 10_000_000n) { return { outcome: 'approved', receipt: { proposalId: proposal.id, approvedAt: Date.now(), approvedBy: { id: 'auto-policy-v1', type: 'policy' }, policyHash: 'sha3:...', }, }; } // Require human confirmation for larger amounts return { outcome: 'requires_human', prompt: `Approve payment of ${intent.amount} MIN to ${intent.recipient}?`, }; }, }; ``` --- ## Why this matters ### AI without key exposure QVAC agents can orchestrate complex workflows — paying for API calls, settling channel balances, issuing access passes — without ever holding signing keys. The policy layer is the chokepoint: if the policy rejects a proposal, no transaction is built. ### Composable rules The `@totemsdk/agent-policy` package ships built-in middleware primitives and a `ComposablePolicy` that chains them with short-circuit semantics: ```typescript import { ComposablePolicy, RateLimitPolicy, AmountCapPolicy, RecipientAllowlistPolicy, RiskThresholdPolicy, } from '@totemsdk/agent-policy'; const policy = new ComposablePolicy([ new RateLimitPolicy(60, 60_000), // max 60 per minute new AmountCapPolicy({ perTx: '500', perDay: '10000' }), new RecipientAllowlistPolicy(['MxSupplier1', 'MxSupplier2']), new RiskThresholdPolicy('low'), ]); const result = await policy.evaluate(proposal); if (result.outcome === 'approved') { // sign and broadcast } ``` Custom middleware layers implement `PolicyMiddleware.evaluate()`. `ComposablePolicy` also satisfies the legacy `AgentPolicy` interface for backward compatibility with `@totemsdk/omnia`. ### Auditability Every approval produces an `AgentReceipt`. Store receipts in your backend alongside the TxPoW ID to create a complete, auditable log of AI-initiated actions. --- ## Integration with example apps Every example app in this documentation includes a **"Future QVAC hook"** callout showing exactly where agent-policy plugs in. Start with the simplest integration: - [TESSA Pay](/guides/tessa-pay) — merchant auto-approve rule for small payments - [KISSVM Studio](/guides/kissvm-studio) — policy as a script safety linter - [MachinePay Edge](/guides/machinepay-edge) — policy enforcing min price and auto-shutdown --- ## See also - [`@totemsdk/agent-policy` API reference](/api/totemsdk-agent-policy) - [TESSA Pay guide](/guides/tessa-pay) - [Minima Network documentation](https://docs.minima.global) --- ## Page: WOTS Key Management URL: https://docs.totem.ing/concepts/wots-key-management # WOTS Key Management Totem uses **Winternitz One-Time Signatures (WOTS)** — the same quantum-resistant scheme used by Minima. Each signing key can only be used once safely. The SDK manages key lifecycles so you never accidentally reuse a key. ## Per-address TreeKey architecture Each wallet address has its own independent 3-level TreeKey (size=64, depth=3): ``` Seed phrase └─ Address 0 TreeKey (base seed + index 0) ├─ L1 keys [0..63] │ └─ L2 keys [0..63] ← leaf signing keys (4,096 total per address) └─ Address 1 TreeKey (base seed + index 1) └─ ... up to 64 addresses ``` A signature path is `(addressIndex, l1, l2)`. Once a `(l1, l2)` pair is used at a given address index, it must never be reused. ## WatermarkStore `WatermarkStore` from `@totemsdk/core` tracks the high-water mark of used indices: ```typescript import { WatermarkStore } from '@totemsdk/core'; const store = new WatermarkStore(storage, logger); await store.initialize(); const indices = store.getNextIndices(); // { addressIndex, l1, l2 } await store.markUsed(indices); await store.advanceWatermark(indices); ``` ## LeaseStore and LeaseMonitor Use `LeaseStore` to persist lease metadata and `LeaseMonitor` for expiry callbacks: ```typescript import { LeaseStore, LeaseMonitor } from '@totemsdk/core'; const leaseStore = new LeaseStore(storage, logger); const monitor = new LeaseMonitor(leaseStore, timer, logger, { defaultIntervalMs: 5_000, expiryThresholdMs: 30_000, }); monitor.onExpirySoon(({ leaseId, remainingMs }) => { console.warn(`Lease ${leaseId} expires in ${remainingMs}ms — renew now`); }); monitor.start(); ``` ## See also - [`@totemsdk/core` API reference](/api/totemsdk-core) - [`@totemsdk/wots-lease` API reference](/api/totemsdk-wots-lease) - [TESSA Pay guide](/guides/tessa-pay) --- ## Page: Omnia Payment Channels URL: https://docs.totem.ing/concepts/omnia-channels # Omnia Payment Channels **Omnia** is Minima's Layer 2 protocol based on **eltoo** — a scheme for replaceable state updates. Instead of punishing old states (like Lightning), eltoo simply allows the latest signed state to replace any earlier one on-chain. ## Core concepts | Term | Meaning | |------|---------| | **Channel** | A 2-of-2 MULTISIG WOTS covenant between two parties | | **State update** | A new balance split signed by both parties, replacing the prior state | | **Settlement** | Broadcasting the latest agreed state to the Minima chain | | **HTLC** | Hash Time-Locked Contract — enables multi-hop routing across channels | ## Channel lifecycle ``` open() → fund() → [update() ...] → cooperativeClose() | forceClose() ``` ```typescript import { openChannel, updateChannel, closeChannel } from '@totemsdk/omnia'; // Open with 100 MIN capacity const channel = await openChannel({ counterparty: peerPublicKey, localAmount: 50_000_000n, // satoshi units remoteAmount: 50_000_000n, chainProvider, wotsLease, }); // Update balance: send 10 MIN to counterparty const updated = await updateChannel(channel, { localDelta: -10_000_000n, }); // Cooperatively close await closeChannel(channel, { cooperative: true }); ``` ## Package family | Package | Role | |---------|------| | `@totemsdk/omnia` | Core state machine | | `@totemsdk/omnia-factory` | N-of-N group channel creation | | `@totemsdk/omnia-router` | Multi-hop pathfinding and fee logic | | `@totemsdk/omnia-splice` | Resize a channel without closing | | `@totemsdk/omnia-hyperswarm` | Peer discovery and wire transport | | [`@totemsdk/omnia-vtxo`](/concepts/omnia-vtxo) | Virtual UTXO claim layer — cash-like off-chain balances backed by Merkle commitment trees | ## See also - [Omnia Pocket guide](/guides/omnia-pocket) — mobile payment wallet - [Omnia Router Node guide](/guides/omnia-router-node) — routing infrastructure - [Channel Factory Wallet guide](/guides/channel-factory-wallet) — group channels - [Omnia VTXO concept](/concepts/omnia-vtxo) — cash-like bearer notes backed by pool capacity --- ## Page: Omnia VTXO — Virtual UTXO Claim Layer URL: https://docs.totem.ing/concepts/omnia-vtxo # Omnia VTXO — Virtual UTXO Claim Layer **`@totemsdk/omnia-vtxo`** is a cash-like off-chain balance primitive that gives Totem Edge applications a way to hold, transfer, split, merge, and exit token balances without requiring a live Minima node for every operation. Each VTXO (Virtual Transaction Output) is a claim on a pool of on-chain capacity, backed by a deterministic Merkle commitment tree. Think of it as a **bearer note inside a shared liquidity pool**: the pool operator holds the on-chain UTXO; the holder holds the VTXO proof. --- ## How VTXOs differ from Statechains Both VTXOs and Statechains are off-chain ownership primitives, but they are designed for different use cases: | | Statechain | Omnia VTXO | |---|---|---| | Ownership transfer | Blind SE co-signature | Pure functional, no live signing needed | | Privacy model | Blind Mercury SE | Local commitment root | | Splitting | Not supported | Supported natively | | Merging | Not supported | Supported natively | | Exit model | On-chain UTXO handoff | Pool epoch settlement | | Use case | Privacy UTXO custody | Merchant receipts, credits, pool liquidity | --- ## The pool model A **pool** is the on-chain anchor that backs a set of VTXOs. Pools are created by an operator and hold a fixed `totalCapacity`. Minting a VTXO reduces the pool's `availableCapacity`. Exiting a VTXO returns capacity to the chain. ```typescript import { createPool } from '@totemsdk/omnia-vtxo'; const pool = createPool({ operator: 'MxOperatorAddress', tokenId: '0x00', // Minima native token totalCapacity: BigInt(1_000_000_000), nonce: 'pool-genesis-v1', // makes poolId deterministic }, Date.now()); // pool.poolId is SHA3-256(operator + tokenId + nonce) — always deterministic ``` | Field | Description | |-------|-------------| | `poolId` | Deterministic hash — never changes | | `operator` | Minima address holding the on-chain backing UTXO | | `tokenId` | Token this pool holds | | `totalCapacity` | Total token units the pool can back | | `availableCapacity` | Remaining mintable capacity | | `epoch` | Advances on each batch refresh round | | `commitmentRoot` | Current Merkle root over all live VTXOs | --- ## Full operation lifecycle ### 1. Mint Creates a new VTXO, reducing `pool.availableCapacity`. ```typescript import { mintVtxo } from '@totemsdk/omnia-vtxo'; const { pool: p1, vtxo: note, receipt } = mintVtxo( pool, { owner: 'MxAlice', amount: BigInt(100_000), nonce: 'note-1' }, Date.now(), ); // note.status === 'active' ``` ### 2. Transfer Moves a VTXO to a new owner. Full transfer marks the input as `transferred` and creates a new `active` output. ```typescript import { transferVtxo } from '@totemsdk/omnia-vtxo'; const { input: spent, output: bobNote, transfer } = transferVtxo( note, { recipient: 'MxBob', amount: BigInt(100_000), nonce: 'tx-1' }, Date.now(), ); // spent.status === 'transferred', bobNote.status === 'active' ``` ### 3. Split Divides one VTXO into two or more pieces. The input becomes `split`; all outputs are `active`. ```typescript import { splitVtxo } from '@totemsdk/omnia-vtxo'; const { input: splitInput, outputs: [piece1, piece2] } = splitVtxo( bobNote, { amounts: [BigInt(60_000), BigInt(40_000)], nonces: ['sp-1', 'sp-2'] }, Date.now(), ); // piece1.amount + piece2.amount must equal bobNote.amount ``` ### 4. Merge Combines multiple VTXOs into one. Inputs become `merged`; the output is `active`. All inputs must belong to the same pool and token. ```typescript import { mergeVtxos } from '@totemsdk/omnia-vtxo'; const { output: mergedNote } = mergeVtxos( [piece1, piece2], { nonce: 'mg-1', owner: 'MxBob' }, Date.now(), ); ``` ### 5. Refresh Re-anchors a VTXO against a new pool epoch. The old VTXO becomes `refreshed`; the new one is `active` with a higher epoch number. ```typescript import { refreshVtxo } from '@totemsdk/omnia-vtxo'; const { old: staleNote, refreshed: freshNote } = refreshVtxo( mergedNote, { newEpoch: 1, nonce: 'ref-1' }, Date.now(), ); ``` ### 6. Exit Initiates and finalises a unilateral exit, returning the VTXO's value to the on-chain pool. ```typescript import { createExitDraft, markExiting, markExited } from '@totemsdk/omnia-vtxo'; const { draft, receipt: exitReceipt } = createExitDraft(freshNote, Date.now()); // draft.draftType === 'mock-exit' (see Security Notes below) ``` --- ## `VtxoStatus` state machine Every VTXO moves through the following states. Terminal states are `transferred`, `split`, `merged`, `refreshed`, `spent`, and `exited`. ``` ┌──────── mint ────────┐ ▼ │ active ──transfer──► transferred │ ├─ partial-transfer ──► split (input) │ │ ├─ split ────────────► split (input) │ ├─ merge ────────────► merged (inputs) │ ├─ refresh ──────────► refreshed (old) │ ├─ exit_initiated ───► exiting │ │ │ exited └─ spent ──────────── spent ``` --- ## Verification and conservation ```typescript import { verifyVtxo, verifyConservation } from '@totemsdk/omnia-vtxo'; // Verify a single VTXO's proof fields const check = verifyVtxo(freshNote); console.log('Valid:', check.valid); // Verify balance conservation across an operation const conservation = verifyConservation({ inputs: [note], outputs: [bobNote], // sum(inputs) must equal sum(outputs) }); console.log('Conservation holds:', conservation.valid); ``` --- ## Error hierarchy All errors extend `OmniaVtxoError` and carry a structured `code` string: ``` OmniaVtxoError ├── VtxoAmountError — invalid amounts (zero, overflow, sum mismatch) ├── VtxoStatusError — wrong status for the requested operation ├── VtxoOwnershipError — owner mismatch ├── VtxoProofError — Merkle proof verification failure ├── VtxoPoolCapacityError — insufficient pool capacity ├── VtxoPolicyError — policy violation (min/max amounts, epoch ordering) ├── VtxoMergeError — merge precondition failure (cross-pool, duplicates) ├── VtxoSplitError — split precondition failure └── VtxoExitError — exit precondition failure ``` --- ## Persistence `OmniaVtxoStore` is a simple async interface. `MemoryOmniaVtxoStore` ships as the in-memory MVP implementation. ```typescript import { MemoryOmniaVtxoStore } from '@totemsdk/omnia-vtxo'; const store = new MemoryOmniaVtxoStore(); await store.savePool(pool); await store.saveVtxo(freshNote); const loaded = await store.getVtxo(freshNote.vtxoId); const all = await store.listVtxos(pool.poolId); ``` --- ## Serialization `serializeVtxo` / `deserializeVtxo` produce BigInt-safe JSON strings (BigInt values are encoded as `"__bigint__:"`). ```typescript import { serializeVtxo, deserializeVtxo, serializePool, deserializePool } from '@totemsdk/omnia-vtxo'; const json = serializeVtxo(freshNote); const restored = deserializeVtxo(json); ``` --- ## Security notes / MVP caveats > **This is an MVP SDK — not a production Ark implementation.** Several components are stubs awaiting production hardening: - **Operator receipts** use `MOCK_OPERATOR_SIGNATURE`. In production the operator signs over the commitment root with a real WOTS or Schnorr key, and clients must verify against the operator's published public key. - **Commitment roots** are single-batch local roots, not pool-wide epoch roots. A full deployment requires the operator to broadcast a pool-wide root each epoch. - **Exit scripts** use `draftType: 'mock-exit'`. Real exits require audited KISSVM covenant exit scripts and a watchtower monitoring the on-chain dispute window. - **No watchtower / dispute monitoring.** Operator equivocation is not detected. - **No replay protection beyond nonce uniqueness.** Nonces must be globally unique per pool. --- ## Future roadmap - **Real Omnia factory backing** — pool funds held in an N-of-N Omnia factory UTXO with batch settlement on exit. - **Batch refresh rounds** — operator posts a new commitment root; all live VTXOs refreshed in a single Minima transaction. - **Operator signing** — real WOTS receipts replacing `MOCK_OPERATOR_SIGNATURE`, with client-side signature verification. - **Wallet integration** — direct integration with Totem Wallet's coin selection and WOTS signing infrastructure. - **Connect API methods** — `totem_mintVtxo`, `totem_transferVtxo`, `totem_listVtxos` via the TOTEM_CONNECT dApp API. - **Persistence adapters** — PostgreSQL and IndexedDB adapters for `OmniaVtxoStore`. - **KISSVM exit script** — audited on-chain exit covenant for unilateral exit with timelock enforcement. --- ## See also - [`@totemsdk/omnia-vtxo` API reference](/api/totemsdk-omnia-vtxo) - [Omnia Payment Channels](/concepts/omnia-channels) — the eltoo channel layer that backs pool funds - [`@totemsdk/statechain` API reference](/api/totemsdk-statechain) — alternative off-chain ownership primitive --- ## Page: Relay Modes URL: https://docs.totem.ing/concepts/relay-modes # Relay Modes `@totemsdk/omnia-hyperswarm` supports three transport modes for Omnia payment channel peer discovery. You pick the mode by setting the `relay` field in `OmniaSwarmConfig`. ## native (default) Raw Hyperswarm P2P. The `hyperswarm` npm package must be installed as a peer dependency. This mode dials directly into the Hyperswarm DHT and is ideal for Node.js, Pear, and Bare environments where UDP is available. ```ts import { createOmniaSwarm } from '@totemsdk/omnia-hyperswarm'; // No relay config → 'native' is implied const swarm = await createOmniaSwarm({ localPubkey: myPubkeyHex }); ``` **Requirements:** `npm install hyperswarm` **Works in:** Node.js ≥ 18, Pear, Bare **Does NOT work in:** Browsers, sandboxed environments, most serverless runtimes --- ## hosted Axia manages the relay infrastructure for you. Pass your Axia API key; no Hyperswarm binary is needed. Traffic is billed against your project's credit balance (10 credits per connection + 2 credits per 50-message batch). ```ts import { createOmniaSwarm } from '@totemsdk/omnia-hyperswarm'; const swarm = await createOmniaSwarm({ localPubkey: myPubkeyHex, relay: { mode: 'hosted', apiKey: 'axia_your_key_here', // endpoint defaults to wss://api.axia.to/api/relay/ws }, }); ``` **Requirements:** An active Axia API key (get one from the [Dashboard](https://app.axia.to/keys)) **Works in:** Browsers, Node.js, serverless, restricted environments **Credit cost:** 10 credits on connect + 2 credits per 50-message batch (every 10 s) **Close code 4402:** Sent when credit limit is reached — reconnect after topping up ### Getting your API key 1. Open the [Axia Dashboard → API Keys](https://app.axia.to/keys). 2. Copy any active key. 3. Pass it as `apiKey` in the relay config. The relay WebSocket URL is displayed in the **Relay Endpoints** section at the bottom of the API Keys page. --- ## self-hosted Point the swarm at your own relay node running the Axia DHT Relay Bridge protocol. Useful for air-gapped environments, private deployments, or testing. ```ts import { createOmniaSwarm } from '@totemsdk/omnia-hyperswarm'; const swarm = await createOmniaSwarm({ localPubkey: myPubkeyHex, relay: { mode: 'self-hosted', relayUrl: 'wss://relay.example.com', }, }); // Or use the convenience function: import { createOmniaSwarmFromRelayUrl } from '@totemsdk/omnia-hyperswarm'; const swarm2 = createOmniaSwarmFromRelayUrl('wss://relay.example.com', { localPubkey }); ``` **Requirements:** A relay node running `DhtRelayBridge` from `@axia/api` (the same one backing the hosted endpoint) **Works in:** Any environment with WebSocket support **Credit cost:** None (your own infrastructure) --- ## How the relay protocol works The hosted and self-hosted modes both use the same JSON pub/sub protocol over WebSocket — the same one that powers the PIPE DHT Relay Bridge: | Direction | Message | |---|---| | Client → Relay | `{ type: 'sub', topic: '' }` | | Client → Relay | `{ type: 'pub', topic: '', env: { id, frame: '' } }` | | Relay → Client | `{ type: 'msg', topic: '', env: { id, frame: '' } }` | Topics are the same SHA3-256-keyed strings used by native Hyperswarm: - `peerTopic(pubkey)` — peer discovery - `channelTopic('channels')` — inbound channel proposals - `broadcastTopic(topic)` — fanout messages OmniaMessage binary frames (4-byte length prefix + UTF-8 JSON) are hex-encoded into `env.frame`. The relay deduplicates on `env.id` and fans out to all subscribers on the same topic. --- ## Choosing a mode | Scenario | Mode | |---|---| | Node.js / Pear / Bare server | `native` | | Browser dApp | `hosted` | | Restricted cloud environment | `hosted` or `self-hosted` | | Private/air-gapped deployment | `self-hosted` | | Development / CI testing | `native` (with mock stream pair) or `self-hosted` | For local development and tests, prefer `createMockStreamPair()` from `@totemsdk/omnia-hyperswarm` to avoid any network dependency. --- ## Page: Totem Connect (dApp Provider) URL: https://docs.totem.ing/concepts/totem-connect # Totem Connect `@totemsdk/connect` is the client-side bridge between a web dApp and the Totem wallet browser extension. It follows the TOTEM_CONNECT v4.1 protocol. ## Quick start ```typescript import { connect, verify, sendTransaction, revokeTxPermission, isTotemInstalled, onEvent, } from '@totemsdk/connect'; // 1. Check wallet is installed if (!isTotemInstalled()) { alert('Install the Totem extension from totem.minima.global'); } // 2. Connect and get the active address const { address } = await connect(location.origin); // 3. Verify ownership (SIWE-style) const proof = await verify(location.origin, { statement: 'Sign in to MyApp' }); // 4. Send a transaction const result = await sendTransaction(location.origin, { version: 1, outputs: [{ address: recipientAddr, amount: '10', tokenId: '0x00' }], }); // 5. Listen for account changes const unsub = onEvent('accountsChanged', (accounts) => { console.log('Active account changed:', accounts[0]); }); // 6. Clean up on logout unsub(); await revokeTxPermission(location.origin); ``` ## Events | Event | Payload | When | |-------|---------|------| | `accountsChanged` | `string[]` | User switches active address | | `connected` | `{ address: string }` | Connection established | | `disconnected` | `void` | User revokes permission | ## See also - [`@totemsdk/connect` API reference](/api/totemsdk-connect) - [TESSA Pay guide](/guides/tessa-pay) — full merchant integration - [Statechain Pass guide](/guides/statechain-pass) — browser-connected access passes --- ## Page: TESSA Pay URL: https://docs.totem.ing/guides/tessa-pay # TESSA Pay **Type:** Edge merchant point-of-sale **Audience:** Retail developers, market operators, kiosk builders TESSA Pay is a browser-based merchant POS that accepts Minima payments via the Totem wallet extension. An `agent-policy` layer auto-approves small transactions (configurable threshold) and flags larger ones for human confirmation, making it safe to run unattended on a tablet at a market stall. --- ## Packages used | Package | Role in TESSA Pay | |---------|------------------| | `@totemsdk/connect` | Connects the POS browser tab to the customer's Totem wallet | | `@totemsdk/agent-policy` | Evaluates each payment intent — auto-approve or escalate | | `@totemsdk/wots-lease` | Manages the merchant's WOTS key lease for signing receipts | | `@totemsdk/tx-builder` | Assembles the payment transaction from the POS inputs | | `@totemsdk/txpow` | Calibrates TxPoW difficulty for the transaction | | `@totemsdk/chain-provider` | Submits transactions to the merchant's local Minima node | | `@totemsdk/lookup-client` | Resolves customer addresses from the Lookup network | | `@totemsdk/realtime` | Streams confirmed payment events back to the POS display | --- ## Core integration path ### 1. Customer connects wallet ```typescript import { isTotemInstalled, connect, onEvent } from '@totemsdk/connect'; if (!isTotemInstalled()) throw new Error('Totem wallet not found'); const { address: customerAddress } = await connect(location.origin); onEvent('accountsChanged', ([newAddress]) => { customerAddress = newAddress; }); ``` ### 2. Define the merchant policy ```typescript import type { AgentPolicy, AgentProposal } from '@totemsdk/agent-policy'; const AUTO_APPROVE_THRESHOLD = 10_000_000n; // 10 MIN in satoshis const tessaPolicy: AgentPolicy = { async evaluate(proposal: AgentProposal) { if (proposal.intent.type !== 'payment') { return { outcome: 'rejected', reason: 'TESSA Pay only processes payment intents' }; } const amount = BigInt(proposal.intent.amount); if (amount <= AUTO_APPROVE_THRESHOLD) { return { outcome: 'approved', receipt: { proposalId: proposal.id, approvedAt: Date.now(), approvedBy: { id: 'tessa-auto-policy', type: 'policy' }, policyHash: 'sha3:auto-v1', }, }; } return { outcome: 'requires_human', prompt: `Confirm payment of ${amount / 1_000_000n} MIN from ${proposal.intent.recipient}?`, }; }, }; ``` ### 3. Build and submit the payment request ```typescript import { buildPaymentTx } from '@totemsdk/tx-builder'; import { calibrateTxPoW } from '@totemsdk/txpow'; import { getChainProvider } from '@totemsdk/chain-provider'; async function requestPayment(amountMin: number, itemDescription: string) { const proposal = { id: crypto.randomUUID(), intent: { type: 'payment' as const, amount: String(BigInt(amountMin) * 1_000_000n), recipient: MERCHANT_ADDRESS, memo: itemDescription, }, requestedBy: { id: 'tessa-pos', type: 'app' as const }, createdAt: Date.now(), expiresAt: Date.now() + 120_000, // 2-minute payment window }; const decision = await tessaPolicy.evaluate(proposal); if (decision.outcome === 'rejected') { throw new Error(`Payment blocked: ${decision.reason}`); } if (decision.outcome === 'requires_human') { const confirmed = await showConfirmDialog(decision.prompt); if (!confirmed) throw new Error('Payment cancelled by operator'); } const tx = await buildPaymentTx({ from: customerAddress, to: MERCHANT_ADDRESS, amount: proposal.intent.amount, tokenId: '0x00', }); const powered = await calibrateTxPoW(tx); const chainProvider = getChainProvider({ nodeUrl: MERCHANT_NODE_URL }); return chainProvider.submit(powered); } ``` ### 4. Stream payment confirmations to the display ```typescript import { createRealtimeClient } from '@totemsdk/realtime'; const realtime = createRealtimeClient({ wsUrl: 'ws://localhost:9004' }); realtime.on('balance', ({ address, confirmed }) => { if (address === MERCHANT_ADDRESS) { updateBalanceDisplay(confirmed); } }); realtime.subscribe(MERCHANT_ADDRESS); ``` --- ## Future QVAC hook :::tip Future QVAC hook When a QVAC agent is attached, it can drive TESSA Pay autonomously — generating payment requests from an IoT weight sensor, applying dynamic pricing from a market feed, and reconciling daily receipts against an off-chain ledger. The `tessaPolicy` above is the exact boundary where QVAC proposals enter: no changes are needed to the wallet or chain layers. ::: --- ## API reference links - [`@totemsdk/connect`](/api/totemsdk-connect) — wallet connection - [`@totemsdk/agent-policy`](/api/totemsdk-agent-policy) — policy evaluation - [`@totemsdk/wots-lease`](/api/totemsdk-wots-lease) — key lease management - [`@totemsdk/tx-builder`](/api/totemsdk-tx-builder) — transaction assembly - [`@totemsdk/txpow`](/api/totemsdk-txpow) — proof-of-work calibration - [`@totemsdk/chain-provider`](/api/totemsdk-chain-provider) — node submission - [`@totemsdk/lookup-client`](/api/totemsdk-lookup-client) — address resolution - [`@totemsdk/realtime`](/api/totemsdk-realtime) — balance streaming --- ## Page: Totem Personal Node URL: https://docs.totem.ing/guides/totem-personal-node # Totem Personal Node **Type:** Personal infrastructure node **Audience:** Power users, self-sovereign builders, multi-device wallet operators Totem Personal Node keeps a Minima node running 24/7 on behalf of a single user, synchronising WOTS key state and spend policies across all of that user's devices. It is the foundation for any application that needs always-available address resolution or multi-device signing coordination. --- ## Packages used | Package | Role in Totem Personal Node | |---------|----------------------------| | `@totemsdk/lookup-node` | Runs the Hyperswarm-based address lookup node | | `@totemsdk/lookup-protocol` | Wire protocol for address announcements and queries | | `@totemsdk/agent-policy` | Governs which spend requests are auto-approved vs. queued | | `@totemsdk/pureminima-rpc` | Low-level RPC for block sync and UTXO queries | | `@totemsdk/chain-provider` | High-level abstraction over the local Minima node | | `@totemsdk/wots-lease` | Shared WOTS lease strategy — one lease shared across devices | | `@totemsdk/realtime` | Real-time push of new TxPoW events to connected devices | --- ## Core integration path ### 1. Start the lookup node ```typescript import { createLookupNode } from '@totemsdk/lookup-node'; const node = await createLookupNode({ seed: process.env.NODE_SEED!, port: 9001, announceInterval: 30_000, }); node.on('query', async (query) => { const result = await resolveFromLocalIndex(query.address); return result; }); await node.start(); console.log('Lookup node running, peer ID:', node.peerId); ``` ### 2. Register addresses on the lookup network ```typescript import { LookupClient } from '@totemsdk/lookup-client'; const client = new LookupClient({ bootstrapPeers: BOOTSTRAP_NODES }); // Announce all wallet addresses to the lookup network for (const account of wallet.getAccounts()) { await client.announce({ address: account.address, publicKey: account.publicKey, nodeId: node.peerId, }); } ``` ### 3. Shared WOTS lease for multi-device signing ```typescript import { createSharedLeaseStrategy } from '@totemsdk/wots-lease'; // One lease shared across all devices — prevents index reuse const leaseStrategy = createSharedLeaseStrategy({ storageKey: `personal-node:${userId}:wots-lease`, storage: encryptedStorage, maxSignaturesPerLease: 100, renewThreshold: 0.8, // Renew when 80% used }); const signer = await leaseStrategy.getSigner(); ``` ### 4. Personal spend policy ```typescript import type { AgentPolicy, AgentProposal } from '@totemsdk/agent-policy'; const personalPolicy: AgentPolicy = { async evaluate(proposal: AgentProposal) { // Always auto-approve from known trusted devices if (TRUSTED_DEVICE_IDS.has(proposal.requestedBy.id)) { return { outcome: 'approved', receipt: buildReceipt(proposal, 'trusted-device'), }; } // Queue unknown devices for manual confirmation return { outcome: 'requires_human', prompt: `Unknown device ${proposal.requestedBy.id} wants to spend ${proposal.intent.amount} MIN`, }; }, }; ``` ### 5. Real-time sync to connected devices ```typescript import { createRealtimeServer } from '@totemsdk/realtime'; const rtServer = createRealtimeServer({ port: 9004 }); // Push every new TxPoW that touches a watched address rpc.on('NEWTXPOW', (txpow) => { const touchedAddresses = extractTouchedAddresses(txpow); for (const addr of touchedAddresses) { rtServer.broadcast(addr, { type: 'newtxpow', txpow }); } }); ``` --- ## Future QVAC hook :::tip Future QVAC hook A QVAC agent attached to a personal node can auto-rebalance channel liquidity, monitor for unusual spend patterns and self-impose temporary rate limits, and auto-renew WOTS leases before exhaustion — all without any key exposure. The `personalPolicy` evaluator is the exact insertion point. ::: --- ## API reference links - [`@totemsdk/lookup-node`](/api/totemsdk-lookup-node) - [`@totemsdk/lookup-protocol`](/api/totemsdk-lookup-protocol) - [`@totemsdk/agent-policy`](/api/totemsdk-agent-policy) - [`@totemsdk/pureminima-rpc`](/api/totemsdk-pureminima-rpc) - [`@totemsdk/chain-provider`](/api/totemsdk-chain-provider) - [`@totemsdk/wots-lease`](/api/totemsdk-wots-lease) - [`@totemsdk/realtime`](/api/totemsdk-realtime) --- ## Page: KISSVM Studio URL: https://docs.totem.ing/guides/kissvm-studio # KISSVM Studio **Type:** Developer tooling **Audience:** Smart contract developers, Minima dApp builders, security researchers KISSVM Studio is a browser-based IDE for authoring, simulating, and testing KISSVM scripts — Minima's on-chain scripting language. An `agent-policy` evaluator acts as a **safety linter**: before any script is broadcast to the chain, the policy checks for common pitfalls (unbounded loops, missing state guards, suspicious coin drains) and either auto-approves, warns, or blocks the deployment. --- ## Packages used | Package | Role in KISSVM Studio | |---------|----------------------| | `@totemsdk/kissvm` | KISSVM v1 evaluator — Rust/WASM engine with TypeScript fallback | | `@totemsdk/agent-policy` | Safety linter — evaluates scripts before on-chain deployment | | `@totemsdk/tx-builder` | Wraps a script in a deployable transaction envelope | | `@totemsdk/chain-provider` | Submits deploy transactions to a local dev node | | `@totemsdk/pureminima-rpc` | Fetches chain state for simulation context | | `@totemsdk/connect` | Connects to the developer's Totem wallet for signing | --- ## Core integration path ### 1. Parse and display a KISSVM script ```typescript import { lex, parse, type ASTNode } from '@totemsdk/kissvm'; const source = ` LET x = STATE 1 IF x GT 0 THEN RETURN TRUE ENDIF RETURN FALSE `; const tokens = lex(source); const ast: ASTNode = parse(tokens); // Render the AST in the editor sidebar renderASTExplorer(ast); ``` ### 2. Simulate against chain state ```typescript import { evaluate } from '@totemsdk/kissvm'; import { PureMinimaRPC } from '@totemsdk/pureminima-rpc'; const rpc = new PureMinimaRPC({ url: 'http://localhost:9002' }); const chainState = await rpc.getChainState(); const result = await evaluate(ast, { state: { 1: '42' }, // mock state variables inputs: [], outputs: [], chainHeight: chainState.topblock, }); console.log('Simulation result:', result); // true | false | Error ``` ### 3. Policy linter before deployment ```typescript import type { AgentPolicy, AgentProposal } from '@totemsdk/agent-policy'; import { analyse } from '@totemsdk/kissvm'; const linterPolicy: AgentPolicy = { async evaluate(proposal: AgentProposal) { if (proposal.intent.type !== 'script_deploy') { return { outcome: 'rejected', reason: 'Only script_deploy intents accepted' }; } const { source } = proposal.intent; const analysis = analyse(source); const criticalIssues = analysis.issues.filter(i => i.severity === 'critical'); if (criticalIssues.length > 0) { return { outcome: 'rejected', reason: `Script has ${criticalIssues.length} critical issue(s): ${criticalIssues.map(i => i.message).join(', ')}`, }; } const warnings = analysis.issues.filter(i => i.severity === 'warning'); if (warnings.length > 0) { return { outcome: 'requires_human', prompt: `Script has ${warnings.length} warning(s). Review before deploying?`, }; } return { outcome: 'approved', receipt: buildReceipt(proposal, 'linter-v1'), }; }, }; ``` ### 4. Deploy the script ```typescript import { buildScriptDeployTx } from '@totemsdk/tx-builder'; import { connect } from '@totemsdk/connect'; import { getChainProvider } from '@totemsdk/chain-provider'; const { address } = await connect(location.origin); const provider = getChainProvider({ nodeUrl: DEV_NODE_URL }); async function deployScript(source: string) { const proposal = { id: crypto.randomUUID(), intent: { type: 'script_deploy' as const, source, author: address }, requestedBy: { id: 'kissvm-studio', type: 'app' as const }, createdAt: Date.now(), }; const decision = await linterPolicy.evaluate(proposal); if (decision.outcome !== 'approved') { if (decision.outcome === 'requires_human') showWarningDialog(decision.prompt); else throw new Error(decision.reason); } const tx = await buildScriptDeployTx({ source, signer: address }); return provider.submit(tx); } ``` --- ## Future QVAC hook :::tip Future QVAC hook A QVAC agent can auto-generate KISSVM scripts from natural-language specs, run the linter policy, iterate on failures, and only surface the approved script to the developer for a final human sign-off. The `linterPolicy` is the gate between AI generation and on-chain deployment. ::: --- ## API reference links - [`@totemsdk/kissvm`](/api/totemsdk-kissvm) - [`@totemsdk/agent-policy`](/api/totemsdk-agent-policy) - [`@totemsdk/tx-builder`](/api/totemsdk-tx-builder) - [`@totemsdk/chain-provider`](/api/totemsdk-chain-provider) - [`@totemsdk/pureminima-rpc`](/api/totemsdk-pureminima-rpc) - [`@totemsdk/connect`](/api/totemsdk-connect) --- ## Page: Statechain Pass URL: https://docs.totem.ing/guides/statechain-pass # Statechain Pass **Type:** Off-chain transferable asset **Audience:** Event platforms, access control systems, voucher issuers Statechain Pass is a system for issuing and transferring **off-chain ownership records** — tickets, vouchers, door passes, or content licences — without touching the Minima chain for every transfer. Ownership is a chain of WOTS signatures; the current holder proves ownership by presenting the full chain. An `agent-policy` enforces approved recipients, expiry checks, and provenance auditing. --- ## Packages used | Package | Role in Statechain Pass | |---------|------------------------| | `@totemsdk/statechain` | Core off-chain ownership chain — create, transfer, verify | | `@totemsdk/agent-policy` | Enforces approved recipients, expiry, and provenance rules | | `@totemsdk/wots-lease` | Manages signing key lifecycle for each transfer | | `@totemsdk/chain-provider` | Anchors statechain roots on-chain for finality | | `@totemsdk/connect` | Browser dApp bridge for customer wallet interactions | | `@totemsdk/realtime` | Pushes transfer confirmations to issuer dashboard | --- ## Core integration path ### 1. Issue a pass ```typescript import { createStatechain } from '@totemsdk/statechain'; import { createSharedLeaseStrategy } from '@totemsdk/wots-lease'; const leaseStrategy = createSharedLeaseStrategy({ storage, storageKey: 'issuer-lease' }); const signer = await leaseStrategy.getSigner(); // Issue a new event ticket const pass = await createStatechain({ assetId: `ticket:${eventId}:${seatNumber}`, issuer: ISSUER_ADDRESS, recipient: initialHolder, metadata: { event: 'Minima DevCon 2026', seat: 'A12', expiresAt: new Date('2026-06-01').getTime(), }, signer, }); console.log('Pass created:', pass.chainId); ``` ### 2. Transfer to a new holder ```typescript import { transferStatechain } from '@totemsdk/statechain'; async function transferPass(pass: Statechain, newHolder: string) { const proposal = { id: crypto.randomUUID(), intent: { type: 'asset_transfer' as const, assetId: pass.chainId, from: pass.currentHolder, to: newHolder, expiresAt: pass.metadata.expiresAt, }, requestedBy: { id: 'statechain-pass-app', type: 'app' as const }, createdAt: Date.now(), }; const decision = await passPolicy.evaluate(proposal); if (decision.outcome === 'rejected') throw new Error(decision.reason); if (decision.outcome === 'requires_human') { const ok = await confirm(decision.prompt); if (!ok) return; } const transferSigner = await leaseStrategy.getSigner(); return transferStatechain(pass, { newHolder, signer: transferSigner }); } ``` ### 3. Policy: approved recipients and expiry ```typescript import type { AgentPolicy, AgentProposal } from '@totemsdk/agent-policy'; const passPolicy: AgentPolicy = { async evaluate(proposal: AgentProposal) { const { intent } = proposal; if (intent.type !== 'asset_transfer') { return { outcome: 'rejected', reason: 'Only asset_transfer intents accepted' }; } // Check expiry if (intent.expiresAt && Date.now() > intent.expiresAt) { return { outcome: 'rejected', reason: 'Pass has expired' }; } // Check recipient allowlist (e.g. KYC'd wallets) const isApproved = await recipientRegistry.isApproved(intent.to); if (!isApproved) { return { outcome: 'requires_human', prompt: `Recipient ${intent.to} is not on the approved list. Transfer anyway?`, }; } return { outcome: 'approved', receipt: buildReceipt(proposal, 'pass-policy-v1'), }; }, }; ``` ### 4. Verify ownership at the gate ```typescript import { verifyStatechain } from '@totemsdk/statechain'; import { connect } from '@totemsdk/connect'; const { address } = await connect(location.origin); const pass = await fetchPassFromWallet(address); const valid = await verifyStatechain(pass, { expectedIssuer: ISSUER_ADDRESS, currentHolder: address, checkExpiry: true, }); if (valid) openGate(); else showError('Invalid or expired pass'); ``` --- ## Future QVAC hook :::tip Future QVAC hook A QVAC agent can automate bulk pass issuance from a ticket manifest, monitor secondary-market transfer rates, auto-expire passes at event end, and trigger on-chain anchoring for audit compliance — all through the `passPolicy` boundary. The human operator only reviews flagged edge cases. ::: --- ## API reference links - [`@totemsdk/statechain`](/api/totemsdk-statechain) - [`@totemsdk/agent-policy`](/api/totemsdk-agent-policy) - [`@totemsdk/wots-lease`](/api/totemsdk-wots-lease) - [`@totemsdk/chain-provider`](/api/totemsdk-chain-provider) - [`@totemsdk/connect`](/api/totemsdk-connect) - [`@totemsdk/realtime`](/api/totemsdk-realtime) --- ## Page: Omnia Pocket URL: https://docs.totem.ing/guides/omnia-pocket # Omnia Pocket **Type:** Mobile payment-channel wallet **Audience:** Mobile developers, Pear/Holepunch app builders, everyday payment apps Omnia Pocket is a lightweight eltoo payment-channel wallet that runs on mobile (via Pear runtime) and enables near-instant off-chain payments. Policy guards set channel size limits, auto-pay caps, and trigger settlement when a channel balance dips below a safety floor. --- ## Packages used | Package | Role in Omnia Pocket | |---------|---------------------| | `@totemsdk/omnia` | Core eltoo state machine — open, update, close channels | | `@totemsdk/omnia-hyperswarm` | Peer discovery and transport for channel counterparties | | `@totemsdk/agent-policy` | Guards on channel size, auto-pay limits, settlement triggers | | `@totemsdk/pear` | Pear/Holepunch runtime integration for mobile/desktop | | `@totemsdk/wots-lease` | Manages WOTS signing keys for each channel state update | | `@totemsdk/txpow` | Calibrates TxPoW for on-chain open/close transactions | | `@totemsdk/chain-provider` | Submits channel-open and settlement transactions | | `@totemsdk/lookup-client` | Resolves counterparty addresses from the lookup network | --- ## Core integration path ### 1. Initialise the Pear runtime ```typescript import { createPearRuntime } from '@totemsdk/pear'; const pear = await createPearRuntime({ appId: 'omnia-pocket', storage: './wallet-data', network: 'mainnet', }); await pear.ready(); ``` ### 2. Open a payment channel ```typescript import { openChannel } from '@totemsdk/omnia'; import { HyperswarmTransport } from '@totemsdk/omnia-hyperswarm'; import { createSharedLeaseStrategy } from '@totemsdk/wots-lease'; const transport = new HyperswarmTransport({ swarm: pear.swarm }); const leaseStrategy = createSharedLeaseStrategy({ storage: pear.storage, storageKey: 'wots-lease' }); const channel = await openChannel({ counterpartyKey: resolvedCounterparty.publicKey, localAmount: 50_000_000n, // 50 MIN remoteAmount: 50_000_000n, transport, chainProvider: getChainProvider({ nodeUrl: NODE_URL }), wotsLease: await leaseStrategy.getSigner(), }); ``` ### 3. Pocket payment policy ```typescript import type { AgentPolicy, AgentProposal } from '@totemsdk/agent-policy'; const pocketPolicy: AgentPolicy = { async evaluate(proposal: AgentProposal) { const { intent } = proposal; if (intent.type !== 'channel_update') { return { outcome: 'rejected', reason: 'Omnia Pocket only handles channel_update intents' }; } const amount = BigInt(intent.localDelta); // Block overspend — can't go negative if (amount > channel.localBalance) { return { outcome: 'rejected', reason: 'Insufficient channel balance' }; } // Auto-pay up to 1 MIN per update if (amount <= 1_000_000n) { return { outcome: 'approved', receipt: buildReceipt(proposal, 'pocket-auto') }; } // Require confirmation for larger amounts return { outcome: 'requires_human', prompt: `Approve channel payment of ${amount / 1_000_000n} MIN?`, }; }, }; ``` ### 4. Send a payment over the channel ```typescript import { updateChannel } from '@totemsdk/omnia'; async function pay(amountMin: bigint) { const proposal = buildProposal('channel_update', { localDelta: String(amountMin * 1_000_000n) }); const decision = await pocketPolicy.evaluate(proposal); if (decision.outcome === 'rejected') throw new Error(decision.reason); if (decision.outcome === 'requires_human') await confirmDialog(decision.prompt); return updateChannel(channel, { localDelta: -(amountMin * 1_000_000n), signer: await leaseStrategy.getSigner(), }); } ``` --- ## Future QVAC hook :::tip Future QVAC hook A QVAC agent can auto-top-up channels from the on-chain wallet when balance drops, negotiate routing paths for payments beyond direct peers, and schedule settlement windows during off-peak hours. All channel state mutations flow through `pocketPolicy` — the agent never touches keys directly. ::: --- ## API reference links - [`@totemsdk/omnia`](/api/totemsdk-omnia) - [`@totemsdk/omnia-hyperswarm`](/api/totemsdk-omnia-hyperswarm) - [`@totemsdk/agent-policy`](/api/totemsdk-agent-policy) - [`@totemsdk/pear`](/api/totemsdk-pear) - [`@totemsdk/wots-lease`](/api/totemsdk-wots-lease) - [`@totemsdk/txpow`](/api/totemsdk-txpow) - [`@totemsdk/chain-provider`](/api/totemsdk-chain-provider) - [`@totemsdk/lookup-client`](/api/totemsdk-lookup-client) --- ## Page: Channel Factory Wallet URL: https://docs.totem.ing/guides/channel-factory-wallet # Channel Factory Wallet **Type:** Multi-party channel infrastructure **Audience:** DAOs, cooperatives, multi-sig wallet operators, liquidity providers Channel Factory Wallet creates and manages **N-of-N group channels** — a single on-chain UTXO backing a factory from which unlimited virtual channels can be opened off-chain. Policy defines participant roles, virtual channel count limits, balance floors, and emergency-close triggers. --- ## Packages used | Package | Role in Channel Factory Wallet | |---------|-------------------------------| | `@totemsdk/omnia-factory` | N-of-N group channel creation and virtual channel management | | `@totemsdk/omnia` | Underlying eltoo state machine for each virtual channel | | `@totemsdk/omnia-splice` | Resize factory capacity without closing | | `@totemsdk/agent-policy` | Role-based access, virtual channel limits, emergency rules | | `@totemsdk/wots-lease` | Per-participant WOTS key lifecycle | | `@totemsdk/txpow` | TxPoW calibration for factory open/close | | `@totemsdk/chain-provider` | On-chain factory anchoring and settlement | --- ## Core integration path ### 1. Create the factory channel ```typescript import { createChannelFactory } from '@totemsdk/omnia-factory'; import { createSharedLeaseStrategy } from '@totemsdk/wots-lease'; // All N participants must call createChannelFactory with matching params const factory = await createChannelFactory({ participants: [ { publicKey: alicePubKey, role: 'admin', quota: 10_000_000n }, { publicKey: bobPubKey, role: 'member', quota: 5_000_000n }, { publicKey: carolPubKey, role: 'member', quota: 5_000_000n }, ], totalCapacity: 20_000_000n, // 20 MIN chainProvider, signers: participantSigners, }); console.log('Factory channel ID:', factory.factoryId); ``` ### 2. Open a virtual channel from the factory ```typescript import { openVirtualChannel } from '@totemsdk/omnia-factory'; const virtualChannel = await openVirtualChannel(factory, { initiator: alicePubKey, responder: bobPubKey, localAmount: 2_000_000n, remoteAmount: 2_000_000n, signer: aliceSigner, }); ``` ### 3. Factory policy: roles and limits ```typescript import type { AgentPolicy, AgentProposal } from '@totemsdk/agent-policy'; const VIRTUAL_CHANNEL_LIMIT: Record = { admin: 20, member: 5, }; const factoryPolicy: AgentPolicy = { async evaluate(proposal: AgentProposal) { const { intent, requestedBy } = proposal; if (intent.type === 'virtual_channel_open') { const participant = factory.participants.find(p => p.publicKey === requestedBy.id); if (!participant) return { outcome: 'rejected', reason: 'Not a factory participant' }; const currentCount = await countVirtualChannels(requestedBy.id); const limit = VIRTUAL_CHANNEL_LIMIT[participant.role] ?? 1; if (currentCount >= limit) { return { outcome: 'rejected', reason: `${participant.role} limit of ${limit} virtual channels reached` }; } } if (intent.type === 'emergency_close') { if (requestedBy.id !== ADMIN_KEY) { return { outcome: 'rejected', reason: 'Only admin can trigger emergency close' }; } return { outcome: 'requires_human', prompt: 'Confirm emergency close of ALL factory channels?' }; } return { outcome: 'approved', receipt: buildReceipt(proposal, 'factory-policy-v1') }; }, }; ``` ### 4. Splice capacity without closing ```typescript import { spliceFactory } from '@totemsdk/omnia-splice'; // All participants sign a splice to increase factory capacity const spliced = await spliceFactory(factory, { additionalCapacity: 10_000_000n, // Add 10 MIN signers: allParticipantSigners, chainProvider, }); console.log('New capacity:', spliced.totalCapacity); ``` --- ## Future QVAC hook :::tip Future QVAC hook A QVAC agent can monitor factory utilisation and automatically propose capacity splices when utilisation exceeds a threshold, reallocate member quotas based on usage patterns, and coordinate cooperative close when all virtual channels are settled. The `factoryPolicy` is the boundary where every QVAC-proposed state change is approved or blocked. ::: --- ## API reference links - [`@totemsdk/omnia-factory`](/api/totemsdk-omnia-factory) - [`@totemsdk/omnia`](/api/totemsdk-omnia) - [`@totemsdk/omnia-splice`](/api/totemsdk-omnia-splice) - [`@totemsdk/agent-policy`](/api/totemsdk-agent-policy) - [`@totemsdk/wots-lease`](/api/totemsdk-wots-lease) - [`@totemsdk/txpow`](/api/totemsdk-txpow) - [`@totemsdk/chain-provider`](/api/totemsdk-chain-provider) --- ## Page: Omnia Router Node URL: https://docs.totem.ing/guides/omnia-router-node # Omnia Router Node **Type:** Routing infrastructure **Audience:** Liquidity providers, infrastructure operators, exchange builders The Omnia Router Node is a professional routing node that forwards multi-hop Omnia channel payments. It earns routing fees and acts as a bridge between different parts of the Minima payment-channel network. Policy controls which routes are accepted, minimum fee floors, and rules for cross-token atomic swaps. --- ## Packages used | Package | Role in Omnia Router Node | |---------|--------------------------| | `@totemsdk/omnia-router` | Multi-hop pathfinding, HTLC forwarding, fee computation | | `@totemsdk/omnia` | Underlying channel state machine | | `@totemsdk/omnia-hyperswarm` | Peer connectivity and route advertisement | | `@totemsdk/agent-policy` | Route acceptance, fee floor, swap rule enforcement | | `@totemsdk/lookup-node` | Registers this router in the lookup network | | `@totemsdk/pear` | Optional Pear runtime for desktop deployment | | `@totemsdk/chain-provider` | On-chain settlement for HTLCs that time out | --- ## Core integration path ### 1. Initialise the router ```typescript import { createOmniaRouter } from '@totemsdk/omnia-router'; import { HyperswarmTransport } from '@totemsdk/omnia-hyperswarm'; const transport = new HyperswarmTransport({ topic: 'omnia-router-mainnet' }); const router = await createOmniaRouter({ nodeKey: ROUTER_SECRET_KEY, transport, chainProvider, feePolicy: { baseFeeMin: 1n, // 1 satoshi minimum proportionalFee: 0.001, // 0.1% of forwarded amount }, }); await router.start(); console.log('Router public key:', router.publicKey); ``` ### 2. Build the channel graph ```typescript import { buildChannelGraph, findBestPath } from '@totemsdk/omnia-router'; // Channels are discovered from peers automatically via Hyperswarm const graph = await buildChannelGraph(router); // Find the best path for a 5 MIN payment const path = await findBestPath(graph, { from: senderAddress, to: recipientAddress, amount: 5_000_000n, maxHops: 4, }); console.log('Path:', path.hops.map(h => h.nodeId).join(' → ')); console.log('Total fee:', path.totalFee, 'satoshis'); ``` ### 3. Router policy: route acceptance and fee floors ```typescript import type { AgentPolicy, AgentProposal } from '@totemsdk/agent-policy'; const BLOCKED_COUNTERPARTIES = new Set([/* sanctioned keys */]); const MIN_FEE_SATOSHIS = 100n; const routerPolicy: AgentPolicy = { async evaluate(proposal: AgentProposal) { const { intent } = proposal; if (intent.type !== 'route_forward') { return { outcome: 'rejected', reason: 'Only route_forward intents accepted' }; } // Check counterparty blocklist if (BLOCKED_COUNTERPARTIES.has(intent.nextHop)) { return { outcome: 'rejected', reason: 'Counterparty is on the blocklist' }; } // Enforce fee floor if (BigInt(intent.fee) < MIN_FEE_SATOSHIS) { return { outcome: 'rejected', reason: `Fee ${intent.fee} is below floor ${MIN_FEE_SATOSHIS}` }; } // Cross-token swaps require human approval if (intent.inTokenId !== intent.outTokenId) { return { outcome: 'requires_human', prompt: `Approve cross-token swap: ${intent.inTokenId} → ${intent.outTokenId}, amount ${intent.amount}?`, }; } return { outcome: 'approved', receipt: buildReceipt(proposal, 'router-policy-v1') }; }, }; ``` ### 4. Forward a payment ```typescript import { forwardPayment } from '@totemsdk/omnia-router'; router.onForwardRequest(async (request) => { const proposal = buildProposal('route_forward', { nextHop: request.nextHop, amount: request.amount, fee: request.fee, inTokenId: request.inTokenId, outTokenId: request.outTokenId, }); const decision = await routerPolicy.evaluate(proposal); if (decision.outcome !== 'approved') { return request.reject(decision.outcome === 'rejected' ? decision.reason : 'awaiting_confirmation'); } return forwardPayment(router, request); }); ``` --- ## Future QVAC hook :::tip Future QVAC hook A QVAC agent can dynamically adjust fee floors based on network congestion, rebalance channels proactively to maintain routing capacity, detect fee sniping patterns and temporarily raise floors, and report routing revenue metrics to an external analytics system — all as proposals evaluated by `routerPolicy`. ::: --- ## API reference links - [`@totemsdk/omnia-router`](/api/totemsdk-omnia-router) - [`@totemsdk/omnia`](/api/totemsdk-omnia) - [`@totemsdk/omnia-hyperswarm`](/api/totemsdk-omnia-hyperswarm) - [`@totemsdk/agent-policy`](/api/totemsdk-agent-policy) - [`@totemsdk/lookup-node`](/api/totemsdk-lookup-node) - [`@totemsdk/pear`](/api/totemsdk-pear) - [`@totemsdk/chain-provider`](/api/totemsdk-chain-provider) --- ## Page: Totem Community Node URL: https://docs.totem.ing/guides/totem-community-node # Totem Community Node **Type:** Community finance infrastructure **Audience:** Cooperative operators, schools, local markets, community administrators Totem Community Node is a shared Minima infrastructure deployment for a community — a cooperative, school, or local market. It runs a Lookup node, a real-time WebSocket server, and an Omnia router, stitched together with a policy layer that enforces merchant spend limits, relay permissions, and child-account rules. --- ## Packages used | Package | Role in Totem Community Node | |---------|------------------------------| | `@totemsdk/lookup-node` | Community address registry — all members register here | | `@totemsdk/lookup-client` | Member devices resolve addresses from the community node | | `@totemsdk/lookup-protocol` | Wire protocol for member registration and queries | | `@totemsdk/agent-policy` | Merchant limits, relay permissions, child-account rules | | `@totemsdk/omnia-router` | Community routing node for off-chain member payments | | `@totemsdk/realtime` | Real-time event push to member dashboards | | `@totemsdk/pureminima-rpc` | Minima node RPC for balance queries and block events | | `@totemsdk/chain-provider` | On-chain settlement for over-limit transactions | --- ## Core integration path ### 1. Start the community lookup node ```typescript import { createLookupNode } from '@totemsdk/lookup-node'; import { LookupProtocol } from '@totemsdk/lookup-protocol'; const node = await createLookupNode({ seed: COMMUNITY_NODE_SEED, port: 9001, protocol: new LookupProtocol({ version: 1 }), storage: communityStorage, }); node.on('register', async (registration) => { const { address, publicKey, role } = registration; await communityRegistry.add({ address, publicKey, role }); console.log(`Member registered: ${address} (${role})`); }); await node.start(); ``` ### 2. Community policy templates ```typescript import type { AgentPolicy, AgentProposal } from '@totemsdk/agent-policy'; const MERCHANT_DAILY_LIMIT = 500_000_000n; // 500 MIN const CHILD_DAILY_LIMIT = 10_000_000n; // 10 MIN async function buildCommunityPolicy(memberId: string): Promise { const member = await communityRegistry.get(memberId); return { async evaluate(proposal: AgentProposal) { const today = new Date().toDateString(); const dailySpend = await getDailySpend(memberId, today); const limit = member.role === 'merchant' ? MERCHANT_DAILY_LIMIT : member.role === 'child' ? CHILD_DAILY_LIMIT : STANDARD_DAILY_LIMIT; const amount = BigInt(proposal.intent.amount ?? 0); if (dailySpend + amount > limit) { return { outcome: 'requires_human', prompt: `Daily limit for ${member.role} ${memberId} would be exceeded. Allow?`, }; } // Relay permissions — only approved roles can run relay nodes if (proposal.intent.type === 'relay_register') { if (!['admin', 'merchant'].includes(member.role)) { return { outcome: 'rejected', reason: 'Only admins and merchants may run relay nodes' }; } } return { outcome: 'approved', receipt: buildReceipt(proposal, `community-policy:${member.role}`) }; }, }; } ``` ### 3. Real-time community dashboard ```typescript import { createRealtimeServer } from '@totemsdk/realtime'; import { PureMinimaRPC } from '@totemsdk/pureminima-rpc'; const rtServer = createRealtimeServer({ port: 9004 }); const rpc = new PureMinimaRPC({ url: NODE_URL }); // Broadcast every payment touching a community address rpc.on('NEWTXPOW', async (txpow) => { const communityAddresses = await communityRegistry.getAllAddresses(); for (const addr of communityAddresses) { if (txpow.touches(addr)) { rtServer.broadcast(addr, { type: 'payment', txpow }); } } }); // Admin dashboard: community-wide stats rtServer.on('subscribe:community-stats', async (ws) => { const stats = await computeCommunityStats(); ws.send(JSON.stringify({ type: 'community-stats', stats })); }); ``` ### 4. Member lookup from a device ```typescript import { LookupClient } from '@totemsdk/lookup-client'; const client = new LookupClient({ bootstrapPeers: [COMMUNITY_NODE_PEER_ID], }); // Resolve "merchant-A" to a Minima address const result = await client.resolve({ name: 'merchant-A', scope: 'community' }); console.log('Merchant address:', result.address); ``` --- ## Future QVAC hook :::tip Future QVAC hook A QVAC agent can monitor community transaction patterns, automatically adjust daily limits based on seasonal demand (market days, school terms), generate community treasury reports, and flag unusual cross-member flows for cooperative review — all proposals filtered through the community policy layer. ::: --- ## API reference links - [`@totemsdk/lookup-node`](/api/totemsdk-lookup-node) - [`@totemsdk/lookup-client`](/api/totemsdk-lookup-client) - [`@totemsdk/lookup-protocol`](/api/totemsdk-lookup-protocol) - [`@totemsdk/agent-policy`](/api/totemsdk-agent-policy) - [`@totemsdk/omnia-router`](/api/totemsdk-omnia-router) - [`@totemsdk/realtime`](/api/totemsdk-realtime) - [`@totemsdk/pureminima-rpc`](/api/totemsdk-pureminima-rpc) - [`@totemsdk/chain-provider`](/api/totemsdk-chain-provider) --- ## Page: MachinePay Edge URL: https://docs.totem.ing/guides/machinepay-edge # MachinePay Edge **Type:** IoT machine-economy gateway **Audience:** IoT developers, mesh network operators, renewable energy traders, compute rental platforms MachinePay Edge turns any device into a pay-per-use service — Wi-Fi hotspot, solar inverter, GPU compute node, or bandwidth relay. Micro-payments flow over Omnia channels. Policy enforces minimum price per unit, maximum unpaid usage, and auto-shutdown when credit runs out. --- ## Packages used | Package | Role in MachinePay Edge | |---------|------------------------| | `@totemsdk/omnia` | Off-chain payment channels for micro-payment streams | | `@totemsdk/omnia-hyperswarm` | Peer-to-peer connectivity for device clients | | `@totemsdk/statechain` | Off-chain ownership of prepaid service tokens | | `@totemsdk/agent-policy` | Min price, max unpaid usage, auto-shutdown enforcement | | `@totemsdk/pear` | Pear runtime for edge device deployment | | `@totemsdk/wots-lease` | WOTS key lifecycle for device signing | | `@totemsdk/txpow` | TxPoW calibration for on-chain settlement triggers | | `@totemsdk/lookup-client` | Resolves client wallets from the lookup network | --- ## Core integration path ### 1. Initialise the edge device ```typescript import { createPearRuntime } from '@totemsdk/pear'; import { HyperswarmTransport } from '@totemsdk/omnia-hyperswarm'; const pear = await createPearRuntime({ appId: `machinepay-edge:${DEVICE_ID}`, storage: './device-data', }); const transport = new HyperswarmTransport({ swarm: pear.swarm }); // Advertise this device on the lookup network await lookupClient.announce({ address: DEVICE_WALLET_ADDRESS, publicKey: DEVICE_PUBLIC_KEY, serviceType: 'wifi-hotspot', pricePerMB: 100n, // 100 satoshis per MB }); ``` ### 2. MachinePay policy ```typescript import type { AgentPolicy, AgentProposal } from '@totemsdk/agent-policy'; const MIN_PRICE_PER_MB_SATOSHIS = 50n; // Floor price const MAX_UNPAID_MB = 5; // Grace buffer before shutdown const machinePolicy: AgentPolicy = { async evaluate(proposal: AgentProposal) { const { intent } = proposal; // New client connecting — check their prepaid credit if (intent.type === 'service_access') { const prepaidCredit = await getClientCredit(intent.clientAddress); if (prepaidCredit <= 0n) { return { outcome: 'rejected', reason: 'No prepaid credit — top up your channel first' }; } } // Usage tick — enforce min price and unpaid buffer if (intent.type === 'usage_tick') { const offeredPrice = BigInt(intent.pricePerUnit); if (offeredPrice < MIN_PRICE_PER_MB_SATOSHIS) { return { outcome: 'rejected', reason: `Price ${offeredPrice} is below floor ${MIN_PRICE_PER_MB_SATOSHIS}` }; } const unpaidUsage = await getUnpaidUsage(intent.clientAddress); if (unpaidUsage >= MAX_UNPAID_MB) { return { outcome: 'rejected', reason: `Max unpaid buffer (${MAX_UNPAID_MB} MB) reached — service suspended`, }; } } // Manual override — auto-shutdown if (intent.type === 'auto_shutdown') { return { outcome: 'requires_human', prompt: 'Auto-shutdown triggered by policy. Confirm service suspension?', }; } return { outcome: 'approved', receipt: buildReceipt(proposal, `machine-policy:${DEVICE_ID}`) }; }, }; ``` ### 3. Micro-payment stream over a channel ```typescript import { openChannel, updateChannel } from '@totemsdk/omnia'; // Client opens a channel to the device const channel = await openChannel({ counterpartyKey: DEVICE_PUBLIC_KEY, localAmount: 10_000_000n, // 10 MIN prepaid remoteAmount: 0n, transport, chainProvider, wotsLease: clientSigner, }); // Every MB consumed triggers a channel update device.on('mb_consumed', async ({ clientAddress, mb }) => { const proposal = buildProposal('usage_tick', { clientAddress, pricePerUnit: String(100n), // 100 sat/MB units: mb, }); const decision = await machinePolicy.evaluate(proposal); if (decision.outcome !== 'approved') { return device.suspend(clientAddress, decision.reason ?? 'policy_block'); } await updateChannel(channel, { localDelta: -(100n * BigInt(mb)) }); }); ``` ### 4. Statechain prepaid pass ```typescript import { createStatechain, verifyStatechain } from '@totemsdk/statechain'; // Issuer creates a 1-hour Wi-Fi pass as a statechain asset const wifiPass = await createStatechain({ assetId: `wifi:${DEVICE_ID}:${Date.now()}`, issuer: DEVICE_WALLET_ADDRESS, recipient: clientAddress, metadata: { durationMs: 3_600_000, maxMB: 500 }, signer: deviceSigner, }); // Client presents the pass — device verifies without an on-chain call const valid = await verifyStatechain(wifiPass, { expectedIssuer: DEVICE_WALLET_ADDRESS, currentHolder: clientAddress, checkExpiry: true, }); if (valid) device.grantAccess(clientAddress); ``` --- ## Future QVAC hook :::tip Future QVAC hook A QVAC agent can adjust pricing dynamically based on demand (surge pricing during events, discounts at off-peak hours), automatically provision new devices into the lookup network when adding capacity, and aggregate multi-device revenue into a cooperative pool — all as proposals through `machinePolicy`. The device never exposes its signing keys to the agent. ::: --- ## API reference links - [`@totemsdk/omnia`](/api/totemsdk-omnia) - [`@totemsdk/omnia-hyperswarm`](/api/totemsdk-omnia-hyperswarm) - [`@totemsdk/statechain`](/api/totemsdk-statechain) - [`@totemsdk/agent-policy`](/api/totemsdk-agent-policy) - [`@totemsdk/pear`](/api/totemsdk-pear) - [`@totemsdk/wots-lease`](/api/totemsdk-wots-lease) - [`@totemsdk/txpow`](/api/totemsdk-txpow) - [`@totemsdk/lookup-client`](/api/totemsdk-lookup-client) --- ## Page: API Reference URL: https://docs.totem.ing/api/index # API Reference Auto-generated from TypeScript sources via TypeDoc. Run `npm run generate` from `TotemEdgeSDKDocs/` to regenerate. | Package | Description | Maturity | |---------|-------------|----------| | [`@totemsdk/agent-policy`](totemsdk-agent-policy/index.md) | Protobuf-based interface contracts for AI agent ↔ wallet communication | rc | | [`@totemsdk/authority`](totemsdk-authority/index.md) | Deterministic authority engine — mandate verification, scope matching, usage tracking | v1 | | [`@totemsdk/chain-provider`](totemsdk-chain-provider/index.md) | Unified ChainStateProvider interface — Hosted, PureMinima, and Composite strategies | rc | | [`@totemsdk/connect`](totemsdk-connect/index.md) | Client-side SDK for Totem wallet browser extension — includes Edge capability layer | v1 | | [`@totemsdk/core`](totemsdk-core/index.md) | Core cryptographic primitives — WOTS+, SHA3-256, TreeKey, BIP39, backed by Rust/WASM | v1 | | [`@totemsdk/core-wasm`](totemsdk-core-wasm/index.md) | WOTS+ cryptographic engine compiled from Rust to WASM | v1 | | [`@totemsdk/edge`](totemsdk-edge/index.md) | Unified developer-facing runtime — composes identity, manifest, wallet, payment, proof, lookup, and policy via injected ports | v1 | | [`@totemsdk/edge-adapters`](totemsdk-edge-adapters/index.md) | Reference adapters bridging SDK packages to @totemsdk/edge port interfaces | rc | | [`@totemsdk/edge-bacnet`](totemsdk-edge-bacnet/index.md) | Edge runtime adapter for BACnet — building automation, HVAC, device properties | rc | | [`@totemsdk/edge-ble`](totemsdk-edge-ble/index.md) | Edge runtime adapter for BLE — wearables, beacons, proximity tracking | rc | | [`@totemsdk/edge-can`](totemsdk-edge-can/index.md) | Edge runtime adapter for CAN bus — automotive, heavy machinery, socketcan | rc | | [`@totemsdk/edge-coap`](totemsdk-edge-coap/index.md) | Edge runtime adapter for CoAP — constrained devices, RFC 7252, UDP transport | rc | | [`@totemsdk/edge-grpc`](totemsdk-edge-grpc/index.md) | Edge runtime adapter for gRPC — service-to-service, cloud-to-edge control planes | rc | | [`@totemsdk/edge-lorawan`](totemsdk-edge-lorawan/index.md) | Edge runtime adapter for LoRaWAN — agriculture, asset tracking, long-range sensors | rc | | [`@totemsdk/edge-matter`](totemsdk-edge-matter/index.md) | Edge runtime adapter for Matter — smart home, multi-transport, fabric management | rc | | [`@totemsdk/edge-modbus`](totemsdk-edge-modbus/index.md) | Edge runtime adapter for Modbus — PLCs, RTUs, industrial sensors over serial/TCP | rc | | [`@totemsdk/edge-mqtt`](totemsdk-edge-mqtt/index.md) | MQTT adapter — Rust/WASM-backed canonicalization, topic matching, MachinePay arithmetic | rc | | [`@totemsdk/edge-nfc`](totemsdk-edge-nfc/index.md) | Edge runtime adapter for NFC — NDEF read/write/erase, ISO 14443-4 APDU transceive, P2P, and Host Card Emulation | alpha | | [`@totemsdk/edge-opcua`](totemsdk-edge-opcua/index.md) | Edge runtime adapter for OPC-UA — SCADA, factory floors, industrial automation | rc | | [`@totemsdk/edge-ros2`](totemsdk-edge-ros2/index.md) | Edge runtime adapter for ROS 2 — robotics, DDS middleware, typed topics | rc | | [`@totemsdk/governance`](totemsdk-governance/index.md) | Deterministic governance engine — quadratic voting, liquid democracy, delegation, mandate-bound proposal execution | rc | | [`@totemsdk/identity`](totemsdk-identity/index.md) | Canonical identity and claims layer — who controls a manifest, device, or agent | v1 | | [`@totemsdk/kissvm`](totemsdk-kissvm/index.md) | KISSVM v1 evaluator for Minima scripting — lexer, parser, VM, all opcodes, backed by Rust/WASM | v1 | | [`@totemsdk/liquidity-bond`](totemsdk-liquidity-bond/index.md) | Deterministic, non-custodial LP position and productive liquidity record | rc | | [`@totemsdk/lookup-client`](totemsdk-lookup-client/index.md) | Hyperswarm client for Totem lookup nodes — chain queries, real-time coin updates, TxPoW broadcast | rc | | [`@totemsdk/lookup-node`](totemsdk-lookup-node/index.md) | Always-on personal lookup node — Hyperswarm, chain queries, COIN_UPDATE push, WOTS lease coordination | rc | | [`@totemsdk/lookup-protocol`](totemsdk-lookup-protocol/index.md) | Wire protocol definitions for lookup node ↔ client communication | rc | | [`@totemsdk/manifest`](totemsdk-manifest/index.md) | Canonical signed declaration format — apps, agent capabilities, dApps, edge services | v1 | | [`@totemsdk/omnia`](totemsdk-omnia/index.md) | Omnia eltoo payment channel state machine — transport-agnostic, WOTS-safe, HTLC-ready | v1 | | [`@totemsdk/omnia-factory`](totemsdk-omnia-factory/index.md) | Channel factory — N-of-N MULTISIG funding, virtual channel management, factory settlement | rc | | [`@totemsdk/omnia-router`](totemsdk-omnia-router/index.md) | Multi-hop payment routing — single-token and cross-token paths over Omnia channels | rc | | [`@totemsdk/omnia-splice`](totemsdk-omnia-splice/index.md) | Channel splicing — resize eltoo channels without close+reopen | rc | | [`@totemsdk/omnia-vtxo`](totemsdk-omnia-vtxo/index.md) | Virtual UTXO / payment-pool claim layer — cash-like off-chain balance primitive | rc | | [`@totemsdk/pear`](totemsdk-pear/index.md) | Bare/Pear runtime integration — storage, networking, lifecycle, Hyperdrive adapters | rc | | [`@totemsdk/proof`](totemsdk-proof/index.md) | Portable proof layer — create, sign, verify, and anchor WOTS-signed proof envelopes on Minima | v1 | | [`@totemsdk/proof-integritas`](totemsdk-proof-integritas/index.md) | Integritas v2 proof provider — hash stamping, checking, on-chain verification on Minima | v1 | | [`@totemsdk/proofgraph`](totemsdk-proofgraph/index.md) | Local deterministic proof relationship graph — indexes proofs, identities, manifests into a content-addressed DAG | v1 | | [`@totemsdk/provider-bond`](totemsdk-provider-bond/index.md) | Provider trust layer — prove, record, score and filter infrastructure providers | rc | | [`@totemsdk/pubsub-transport`](totemsdk-pubsub-transport/index.md) | Pub/sub transport interfaces — IPubSubTransport, EventEmitterTransport, MockPubSubTransport | rc | | [`@totemsdk/minima-rpc`](totemsdk-minima-rpc/index.md) | Fetch-based PureMinima RPC client — Bare/Pear/Node/browser compatible | rc | | [`@totemsdk/realtime`](totemsdk-realtime/index.md) | Real-time balance streaming — WebSocket and HTTP fallback | rc | | [`@totemsdk/recursive-mast`](totemsdk-recursive-mast/index.md) | Recursive MAST + PREVSTATE — composable policy trees, proof chains, state transitions, delegation | rc | | [`@totemsdk/root-identity`](totemsdk-root-identity/index.md) | Single root identity controlling up to 64 on-chain addresses — cryptographically linked via 3-level TreeKeys | v1 | | [`@totemsdk/se-server`](totemsdk-se-server/index.md) | Self-hostable Statechain Entity (SE) server — Mercury-protocol co-signer as Express app | rc | | [`@totemsdk/server`](totemsdk-server/index.md) | Server-side SDK — signing, transaction building and submission via Axia | v1 | | [`@totemsdk/statechain`](totemsdk-statechain/index.md) | Mercury-protocol state chain — privacy-preserving off-chain UTXO custody transfer with blind SE co-signatures | rc | | [`@totemsdk/stream-transport`](totemsdk-stream-transport/index.md) | Transport adapters — IStreamTransport, NodeStream, WebSocket, WebRTC, Stdio, Hyperswarm, in-memory | rc | | [`@totemsdk/tx-builder`](totemsdk-tx-builder/index.md) | Transaction builder for Minima — coin selection, multisig, WOTS signing | rc | | [`@totemsdk/txpow`](totemsdk-txpow/index.md) | TxPoW envelope serialization and proof-of-work mining for Minima | v1 | | [`@totemsdk/wallet-adapter`](totemsdk-wallet-adapter/index.md) | Abstract base class for Totem-compatible wallets — hardware bridges, mobile companions, institutional custody | v1 | | [`@totemsdk/wots-lease`](totemsdk-wots-lease/index.md) | WOTS key-use coordination — canonical v3 watermark, provider-based lease safety | v1 | | [`@totemsdk/edge-email`](totemsdk-edge-email/index.md) | Edge runtime adapter for email — IMAP/SMTP polling, notification delivery, command parsing, and sensor ingestion via email | rc | | [`@totemsdk/industrial-action`](totemsdk-industrial-action/index.md) | Deterministic industrial action lifecycle for Totem Edge — converts governed intent into context-aware, bounded, verifiably executed operations on field devices and protocols | rc | | [`@totemsdk/mcp-server`](totemsdk-mcp-server/index.md) | MCP server exposing the full Totem SDK package set — metadata, types, exports, dependency graphs, and scaffolding tools for 57 packages | rc | | [`@totemsdk/omnia-host`](totemsdk-omnia-host/index.md) | Durable Omnia node daemon for channel lifecycle, routing, and control APIs | rc | | [`@totemsdk/location-proof`](totemsdk-location-proof/index.md) | Generic location and movement proof primitives — device-neutral GPS/GNSS claims, confidence scoring, motion trails, and proof envelope integration | v1 | | [`@totemsdk/spatial-proof`](totemsdk-spatial-proof/index.md) | Generic spatial relationship proof primitives — geometry hashes, geofence relations, route checks, and proof envelope integration | v1 | | [`@totemsdk/raster-proof`](totemsdk-raster-proof/index.md) | Edge-capable raster and visual evidence proof primitives — asset hashes, tile Merkle roots, raster manifests, derived-layer provenance, and proof envelope integration | v1 | | [`@totemsdk/omnia-pool`](totemsdk-omnia-pool/index.md) | Generic Omnia liquidity pool orchestration primitive for Totem SDK | rc | | [`@totemsdk/intelligence`](totemsdk-intelligence/index.md) | Provider-neutral intelligence contracts — capabilities, operations, receipts, errors for local self-hosted AI inference | beta | | [`@totemsdk/qvac`](totemsdk-qvac/index.md) | QVAC intelligence adapter — wraps @qvac/sdk into @totemsdk/intelligence provider-neutral contracts (with /edge and /raw subpaths) | beta | | [`@totemsdk/storage`](totemsdk-storage/index.md) | Provider-neutral storage contracts and adapters — StorageError taxonomy, versioned codec, namespaces, transactions + CAS, artifact-boundary types with a pluggable ArtifactStoreBackend port | alpha | | [`@totemsdk/observability`](totem-observability/index.md) | Drop-in observability for Totem-based dApps — trace propagation and batched telemetry | — | | [`totem-extension/keyring`](totem-extension-keyring/index.md) | Totem Extension public keyring API — signing validator types and security boundary utilities | — | --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-agent-policy/index **@totemsdk/agent-policy** *** **Maturity: rc** # @totemsdk/agent-policy ## Enumerations - [IntentType](enumerations/IntentType.md) - [ReceiptStatus](enumerations/ReceiptStatus.md) - [RiskLevel](enumerations/RiskLevel.md) ## Classes - [AmountCapPolicy](classes/AmountCapPolicy.md) - [AuthorityPolicy](classes/AuthorityPolicy.md) - [ComposablePolicy](classes/ComposablePolicy.md) - [GrantBoundAutonomyPolicy](classes/GrantBoundAutonomyPolicy.md) - [GrantBoundPolicy](classes/GrantBoundPolicy.md) - [MemoryGrantUsageStore](classes/MemoryGrantUsageStore.md) - [MemoryReceiptStore](classes/MemoryReceiptStore.md) - [MemoryRunStateStore](classes/MemoryRunStateStore.md) - [RateLimitPolicy](classes/RateLimitPolicy.md) - [RecipientAllowlistPolicy](classes/RecipientAllowlistPolicy.md) - [RiskThresholdPolicy](classes/RiskThresholdPolicy.md) - [SqliteRunStateStore](classes/SqliteRunStateStore.md) - [TimeWindowPolicy](classes/TimeWindowPolicy.md) ## Interfaces - [AgentIdentity](interfaces/AgentIdentity.md) - [AgentPolicy](interfaces/AgentPolicy.md) - [AgentPolicyConfig](interfaces/AgentPolicyConfig.md) - [AgentProposal](interfaces/AgentProposal.md) - [AgentReceipt](interfaces/AgentReceipt.md) - [AgentStep](interfaces/AgentStep.md) - [AmountCapConfig](interfaces/AmountCapConfig.md) - [AuthorityActionIntent](interfaces/AuthorityActionIntent.md) - [AuthorityDecisionResult](interfaces/AuthorityDecisionResult.md) - [AuthorityEvaluator](interfaces/AuthorityEvaluator.md) - [AuthorityPolicyOptions](interfaces/AuthorityPolicyOptions.md) - [AuthorizeAndReserveParams](interfaces/AuthorizeAndReserveParams.md) - [AuthorizeStepResult](interfaces/AuthorizeStepResult.md) - [AutonomousRun](interfaces/AutonomousRun.md) - [AutonomyPolicy](interfaces/AutonomyPolicy.md) - [AutonomyProfile](interfaces/AutonomyProfile.md) - [BoundaryEscalation](interfaces/BoundaryEscalation.md) - [BoundaryFailure](interfaces/BoundaryFailure.md) - [CanonicalAgentAction](interfaces/CanonicalAgentAction.md) - [ChannelEffect](interfaces/ChannelEffect.md) - [CommitParams](interfaces/CommitParams.md) - [GrantBoundAutonomyOptions](interfaces/GrantBoundAutonomyOptions.md) - [GrantBoundPolicyOptions](interfaces/GrantBoundPolicyOptions.md) - [GrantRequirement](interfaces/GrantRequirement.md) - [GrantUsageStore](interfaces/GrantUsageStore.md) - [LocalBounds](interfaces/LocalBounds.md) - [MemoryGrantUsageStoreOptions](interfaces/MemoryGrantUsageStoreOptions.md) - [OpenRunParams](interfaces/OpenRunParams.md) - [PaymentIntent](interfaces/PaymentIntent.md) - [PolicyEvalResult](interfaces/PolicyEvalResult.md) - [PolicyMiddleware](interfaces/PolicyMiddleware.md) - [PreparedRebalanceOperation](interfaces/PreparedRebalanceOperation.md) - [PreparedStep](interfaces/PreparedStep.md) - [ProtoAgentIdentity](interfaces/ProtoAgentIdentity.md) - [ProtoAgentProposal](interfaces/ProtoAgentProposal.md) - [ProtoAgentReceipt](interfaces/ProtoAgentReceipt.md) - [ProtoPaymentIntent](interfaces/ProtoPaymentIntent.md) - [ReceiptStore](interfaces/ReceiptStore.md) - [RunActionIntent](interfaces/RunActionIntent.md) - [RunAuthorization](interfaces/RunAuthorization.md) - [RunAuthorizationRejected](interfaces/RunAuthorizationRejected.md) - [RunLimits](interfaces/RunLimits.md) - [RunObligations](interfaces/RunObligations.md) - [RunReceiptGraph](interfaces/RunReceiptGraph.md) - [RunReservation](interfaces/RunReservation.md) - [RunSessionTotals](interfaces/RunSessionTotals.md) - [RunStateSnapshot](interfaces/RunStateSnapshot.md) - [RunStateStore](interfaces/RunStateStore.md) - [RunStepReceipt](interfaces/RunStepReceipt.md) - [SqliteRunStateStoreOptions](interfaces/SqliteRunStateStoreOptions.md) - [StepAuthorization](interfaces/StepAuthorization.md) - [StepAuthorizationInput](interfaces/StepAuthorizationInput.md) - [StepEffect](interfaces/StepEffect.md) - [StepEffects](interfaces/StepEffects.md) - [StepReceipt](interfaces/StepReceipt.md) - [StepTransitionRule](interfaces/StepTransitionRule.md) - [SuggestedGrantAmendment](interfaces/SuggestedGrantAmendment.md) ## Type Aliases - [AgentPolicyConfig](type-aliases/AgentPolicyConfig.md) - [AutonomyMode](type-aliases/AutonomyMode.md) - [InferenceDomain](type-aliases/InferenceDomain.md) - [InferenceReceiptLike](type-aliases/InferenceReceiptLike.md) - [ProtoAgentIdentity](type-aliases/ProtoAgentIdentity.md) - [ProtoAgentProposal](type-aliases/ProtoAgentProposal.md) - [ProtoAgentReceipt](type-aliases/ProtoAgentReceipt.md) - [ProtoPaymentIntent](type-aliases/ProtoPaymentIntent.md) - [RunMode](type-aliases/RunMode.md) ## Functions - [accumulateAmount](functions/accumulateAmount.md) - [canonicalAgentActionDigest](functions/canonicalAgentActionDigest.md) - [checkObligations](functions/checkObligations.md) - [checkRunLimits](functions/checkRunLimits.md) - [checkTransition](functions/checkTransition.md) - [createAutonomyPolicy](functions/createAutonomyPolicy.md) - [defaultActionExtractor](functions/defaultActionExtractor.md) - [evaluateGrantRequirement](functions/evaluateGrantRequirement.md) - [intentAction](functions/intentAction.md) - [isStartEligible](functions/isStartEligible.md) - [reduceToCanonicalAction](functions/reduceToCanonicalAction.md) - [resolveStepField](functions/resolveStepField.md) - [summarizeStepSpend](functions/summarizeStepSpend.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-authority/index **@totemsdk/authority** *** **Maturity: v1** # @totemsdk/authority ## Interfaces - [ActionIntent](interfaces/ActionIntent.md) - [AuthorityDecision](interfaces/AuthorityDecision.md) - [AuthorityIdentityResolver](interfaces/AuthorityIdentityResolver.md) - [AuthorityUsage](interfaces/AuthorityUsage.md) - [AuthorityUsageSnapshot](interfaces/AuthorityUsageSnapshot.md) - [CreateAgentMandateParams](interfaces/CreateAgentMandateParams.md) - [EvaluateAuthorityParams](interfaces/EvaluateAuthorityParams.md) - [EvaluateAuthorityResult](interfaces/EvaluateAuthorityResult.md) - [MandateBody](interfaces/MandateBody.md) - [MandateConstraint](interfaces/MandateConstraint.md) - [MandateStatusSnapshot](interfaces/MandateStatusSnapshot.md) - [MandateVerificationResult](interfaces/MandateVerificationResult.md) - [UsageLimit](interfaces/UsageLimit.md) ## Functions - [calculateUsageDelta](functions/calculateUsageDelta.md) - [checkUsageLimit](functions/checkUsageLimit.md) - [computeActionIntentId](functions/computeActionIntentId.md) - [computeAuthorityDecisionId](functions/computeAuthorityDecisionId.md) - [computeMandateId](functions/computeMandateId.md) - [computeUsageRoot](functions/computeUsageRoot.md) - [computeUsageSnapshotHash](functions/computeUsageSnapshotHash.md) - [createAgentMandate](functions/createAgentMandate.md) - [createMandateProofDraft](functions/createMandateProofDraft.md) - [evaluateAuthority](functions/evaluateAuthority.md) - [matchConstraints](functions/matchConstraints.md) - [matchScope](functions/matchScope.md) - [resolveActionField](functions/resolveActionField.md) - [signMandateWithLease](functions/signMandateWithLease.md) - [snapshotFromUsage](functions/snapshotFromUsage.md) - [verifyMandate](functions/verifyMandate.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-chain-provider/index **@totemsdk/chain-provider** *** **Maturity: rc** # @totemsdk/chain-provider ## Classes - [CompositeProvider](classes/CompositeProvider.md) - [HostedProvider](classes/HostedProvider.md) - [LookupClientProvider](classes/LookupClientProvider.md) - [MinimaRpcProvider](classes/MinimaRpcProvider.md) ## Interfaces - [BroadcastResult](interfaces/BroadcastResult.md) - [ChainStateProvider](interfaces/ChainStateProvider.md) - [ChainTip](interfaces/ChainTip.md) - [Coin](interfaces/Coin.md) - [CoinsQuery](interfaces/CoinsQuery.md) - [DepositAddressOptions](interfaces/DepositAddressOptions.md) - [DepositVerification](interfaces/DepositVerification.md) - [DepositVerifier](interfaces/DepositVerifier.md) - [HostedProviderConfig](interfaces/HostedProviderConfig.md) - [LookupClientLike](interfaces/LookupClientLike.md) - [MmrChunkProof](interfaces/MmrChunkProof.md) - [MMRProof](interfaces/MMRProof.md) - [TokenInfo](interfaces/TokenInfo.md) - [TokenSearchQuery](interfaces/TokenSearchQuery.md) - [VerifyDepositParams](interfaces/VerifyDepositParams.md) ## Variables - [DEPOSIT\_ADDRESS\_DOMAIN](variables/DEPOSIT_ADDRESS_DOMAIN.md) ## Functions - [depositAddressFor](functions/depositAddressFor.md) - [verifyDeposit](functions/verifyDeposit.md) - [verifyDepositMmrProof](functions/verifyDepositMmrProof.md) - [withDepositVerifier](functions/withDepositVerifier.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-connect/index **@totemsdk/connect** *** **Maturity: v1** # @totemsdk/connect ## Classes - [TotemConnectionError](classes/TotemConnectionError.md) - [TotemNotInstalledError](classes/TotemNotInstalledError.md) - [WalletDiscovery](classes/WalletDiscovery.md) ## Interfaces - [DiscoveredWallet](interfaces/DiscoveredWallet.md) - [EnhancedBuildParams](interfaces/EnhancedBuildParams.md) - [InputCoinProof](interfaces/InputCoinProof.md) - [InputScriptDescriptor](interfaces/InputScriptDescriptor.md) - [KissvmCoinData](interfaces/KissvmCoinData.md) - [KissvmOutputData](interfaces/KissvmOutputData.md) - [KissvmTxContext](interfaces/KissvmTxContext.md) - [KissvmWitness](interfaces/KissvmWitness.md) - [OmniaChannelSummary](interfaces/OmniaChannelSummary.md) - [ResponseScriptDescriptor](interfaces/ResponseScriptDescriptor.md) - [Route](interfaces/Route.md) - [RoutingHop](interfaces/RoutingHop.md) - [SitePermissionEntry](interfaces/SitePermissionEntry.md) - [StatechainTransferEntry](interfaces/StatechainTransferEntry.md) - [StateVariable](interfaces/StateVariable.md) - [SwapAnnouncement](interfaces/SwapAnnouncement.md) - [SwapHop](interfaces/SwapHop.md) - [TokenSpendingLimit](interfaces/TokenSpendingLimit.md) - [TotemAgentCreateReceiptRequest](interfaces/TotemAgentCreateReceiptRequest.md) - [TotemAgentCreateReceiptResponse](interfaces/TotemAgentCreateReceiptResponse.md) - [TotemAgentExplainTransactionRequest](interfaces/TotemAgentExplainTransactionRequest.md) - [TotemAgentExplainTransactionResponse](interfaces/TotemAgentExplainTransactionResponse.md) - [TotemAgentProposePaymentRequest](interfaces/TotemAgentProposePaymentRequest.md) - [TotemAgentProposePaymentResponse](interfaces/TotemAgentProposePaymentResponse.md) - [TotemAnnounceDetail](interfaces/TotemAnnounceDetail.md) - [TotemBroadcastHexErrorResponse](interfaces/TotemBroadcastHexErrorResponse.md) - [TotemBroadcastHexRequest](interfaces/TotemBroadcastHexRequest.md) - [TotemBroadcastHexSuccessResponse](interfaces/TotemBroadcastHexSuccessResponse.md) - [TotemBroadcastTxPoWRequest](interfaces/TotemBroadcastTxPoWRequest.md) - [TotemBroadcastTxPoWResponse](interfaces/TotemBroadcastTxPoWResponse.md) - [TotemCapabilities](interfaces/TotemCapabilities.md) - [TotemConnectRequest](interfaces/TotemConnectRequest.md) - [TotemConnectResponse](interfaces/TotemConnectResponse.md) - [TotemCreatePaymentRequestRequest](interfaces/TotemCreatePaymentRequestRequest.md) - [TotemCreatePaymentRequestResponse](interfaces/TotemCreatePaymentRequestResponse.md) - [TotemGetAccountsRequest](interfaces/TotemGetAccountsRequest.md) - [TotemGetAccountsResponse](interfaces/TotemGetAccountsResponse.md) - [TotemGetCapabilitiesRequest](interfaces/TotemGetCapabilitiesRequest.md) - [TotemGetCoinsErrorResponse](interfaces/TotemGetCoinsErrorResponse.md) - [TotemGetCoinsRequest](interfaces/TotemGetCoinsRequest.md) - [TotemGetCoinsSuccessResponse](interfaces/TotemGetCoinsSuccessResponse.md) - [TotemGetProviderStatusRequest](interfaces/TotemGetProviderStatusRequest.md) - [TotemGetReceiptRequest](interfaces/TotemGetReceiptRequest.md) - [TotemGetReceiptResponse](interfaces/TotemGetReceiptResponse.md) - [TotemGetTransactionStatusRequest](interfaces/TotemGetTransactionStatusRequest.md) - [TotemGetTransactionStatusResponse](interfaces/TotemGetTransactionStatusResponse.md) - [TotemGetTxPermissionsRequest](interfaces/TotemGetTxPermissionsRequest.md) - [TotemGetWotsStatusRequest](interfaces/TotemGetWotsStatusRequest.md) - [TotemGetWotsStatusResponse](interfaces/TotemGetWotsStatusResponse.md) - [TotemGrantTxPermissionRequest](interfaces/TotemGrantTxPermissionRequest.md) - [TotemGrantTxPermissionResponse](interfaces/TotemGrantTxPermissionResponse.md) - [TotemKissvmSimulateRequest](interfaces/TotemKissvmSimulateRequest.md) - [TotemKissvmSimulateResponse](interfaces/TotemKissvmSimulateResponse.md) - [TotemKissvmValidateRequest](interfaces/TotemKissvmValidateRequest.md) - [TotemKissvmValidateResponse](interfaces/TotemKissvmValidateResponse.md) - [TotemMineTxPoWRequest](interfaces/TotemMineTxPoWRequest.md) - [TotemMineTxPoWResponse](interfaces/TotemMineTxPoWResponse.md) - [TotemOmniaCloseChannelRequest](interfaces/TotemOmniaCloseChannelRequest.md) - [TotemOmniaCloseChannelResponse](interfaces/TotemOmniaCloseChannelResponse.md) - [TotemOmniaCloseFactoryRequest](interfaces/TotemOmniaCloseFactoryRequest.md) - [TotemOmniaCloseFactoryResponse](interfaces/TotemOmniaCloseFactoryResponse.md) - [TotemOmniaCreateFactoryRequest](interfaces/TotemOmniaCreateFactoryRequest.md) - [TotemOmniaCreateFactoryResponse](interfaces/TotemOmniaCreateFactoryResponse.md) - [TotemOmniaGetChannelsRequest](interfaces/TotemOmniaGetChannelsRequest.md) - [TotemOmniaGetChannelsResponse](interfaces/TotemOmniaGetChannelsResponse.md) - [TotemOmniaGetRouteRequest](interfaces/TotemOmniaGetRouteRequest.md) - [TotemOmniaGetRouteResponse](interfaces/TotemOmniaGetRouteResponse.md) - [TotemOmniaGetSwapRateRequest](interfaces/TotemOmniaGetSwapRateRequest.md) - [TotemOmniaGetSwapRateResponse](interfaces/TotemOmniaGetSwapRateResponse.md) - [TotemOmniaOpenChannelRequest](interfaces/TotemOmniaOpenChannelRequest.md) - [TotemOmniaOpenChannelResponse](interfaces/TotemOmniaOpenChannelResponse.md) - [TotemOmniaOpenVirtualChannelRequest](interfaces/TotemOmniaOpenVirtualChannelRequest.md) - [TotemOmniaOpenVirtualChannelResponse](interfaces/TotemOmniaOpenVirtualChannelResponse.md) - [TotemOmniaPayMultiHopRequest](interfaces/TotemOmniaPayMultiHopRequest.md) - [TotemOmniaPayMultiHopResponse](interfaces/TotemOmniaPayMultiHopResponse.md) - [TotemOmniaPayRequest](interfaces/TotemOmniaPayRequest.md) - [TotemOmniaPayResponse](interfaces/TotemOmniaPayResponse.md) - [TotemOmniaSettleRequest](interfaces/TotemOmniaSettleRequest.md) - [TotemOmniaSettleResponse](interfaces/TotemOmniaSettleResponse.md) - [TotemOmniaSpliceInRequest](interfaces/TotemOmniaSpliceInRequest.md) - [TotemOmniaSpliceInResponse](interfaces/TotemOmniaSpliceInResponse.md) - [TotemOmniaSpliceOutRequest](interfaces/TotemOmniaSpliceOutRequest.md) - [TotemOmniaSpliceOutResponse](interfaces/TotemOmniaSpliceOutResponse.md) - [TotemPayPaymentRequestRequest](interfaces/TotemPayPaymentRequestRequest.md) - [TotemPayPaymentRequestResponse](interfaces/TotemPayPaymentRequestResponse.md) - [TotemProvider](interfaces/TotemProvider.md) - [TotemProviderStatus](interfaces/TotemProviderStatus.md) - [TotemReleaseWotsLeaseRequest](interfaces/TotemReleaseWotsLeaseRequest.md) - [TotemReleaseWotsLeaseResponse](interfaces/TotemReleaseWotsLeaseResponse.md) - [TotemRequest](interfaces/TotemRequest.md) - [TotemReserveWotsLeaseRequest](interfaces/TotemReserveWotsLeaseRequest.md) - [TotemReserveWotsLeaseResponse](interfaces/TotemReserveWotsLeaseResponse.md) - [TotemRevokeTxPermissionRequest](interfaces/TotemRevokeTxPermissionRequest.md) - [TotemRevokeTxPermissionResponse](interfaces/TotemRevokeTxPermissionResponse.md) - [TotemSendComplexBuildResponse](interfaces/TotemSendComplexBuildResponse.md) - [TotemSendComplexErrorResponse](interfaces/TotemSendComplexErrorResponse.md) - [TotemSendComplexRequest](interfaces/TotemSendComplexRequest.md) - [TotemSendComplexSubmitResponse](interfaces/TotemSendComplexSubmitResponse.md) - [TotemSendTransactionErrorResponse](interfaces/TotemSendTransactionErrorResponse.md) - [TotemSendTransactionRequest](interfaces/TotemSendTransactionRequest.md) - [TotemSendTransactionSuccessResponse](interfaces/TotemSendTransactionSuccessResponse.md) - [TotemSetChainProviderRequest](interfaces/TotemSetChainProviderRequest.md) - [TotemSetChainProviderResponse](interfaces/TotemSetChainProviderResponse.md) - [TotemSignDataErrorResponse](interfaces/TotemSignDataErrorResponse.md) - [TotemSignDataRequest](interfaces/TotemSignDataRequest.md) - [TotemSignDataSuccessResponse](interfaces/TotemSignDataSuccessResponse.md) - [TotemSignTransactionRequest](interfaces/TotemSignTransactionRequest.md) - [TotemSignTransactionResponse](interfaces/TotemSignTransactionResponse.md) - [TotemStatechainClaimRequest](interfaces/TotemStatechainClaimRequest.md) - [TotemStatechainClaimResponse](interfaces/TotemStatechainClaimResponse.md) - [TotemStatechainCreateRequest](interfaces/TotemStatechainCreateRequest.md) - [TotemStatechainCreateResponse](interfaces/TotemStatechainCreateResponse.md) - [TotemStatechainTransferRequest](interfaces/TotemStatechainTransferRequest.md) - [TotemStatechainTransferResponse](interfaces/TotemStatechainTransferResponse.md) - [TotemStatechainVerifyRequest](interfaces/TotemStatechainVerifyRequest.md) - [TotemStatechainVerifyResponse](interfaces/TotemStatechainVerifyResponse.md) - [TotemVerifyRequest](interfaces/TotemVerifyRequest.md) - [TotemVerifyResponse](interfaces/TotemVerifyResponse.md) - [TotemWalletInfo](interfaces/TotemWalletInfo.md) - [TransactionPlan](interfaces/TransactionPlan.md) ## Type Aliases - [DAppTransactionIntent](type-aliases/DAppTransactionIntent.md) - [ScriptType](type-aliases/ScriptType.md) - [StateVariableType](type-aliases/StateVariableType.md) - [TotemBroadcastHexResponse](type-aliases/TotemBroadcastHexResponse.md) - [TotemGetCapabilitiesResponse](type-aliases/TotemGetCapabilitiesResponse.md) - [TotemGetCoinsResponse](type-aliases/TotemGetCoinsResponse.md) - [TotemGetProviderStatusResponse](type-aliases/TotemGetProviderStatusResponse.md) - [TotemGetTxPermissionsResponse](type-aliases/TotemGetTxPermissionsResponse.md) - [TotemSendComplexResponse](type-aliases/TotemSendComplexResponse.md) - [TotemSendTransactionResponse](type-aliases/TotemSendTransactionResponse.md) - [TotemSignDataResponse](type-aliases/TotemSignDataResponse.md) ## Variables - [~~requestSignature~~](variables/requestSignature.md) - [TOTEM\_ANNOUNCE](variables/TOTEM_ANNOUNCE.md) - [TOTEM\_REQUEST\_ANNOUNCE](variables/TOTEM_REQUEST_ANNOUNCE.md) ## Functions - [agentCreateReceipt](functions/agentCreateReceipt.md) - [agentExplainTransaction](functions/agentExplainTransaction.md) - [agentProposePayment](functions/agentProposePayment.md) - [broadcastHex](functions/broadcastHex.md) - [broadcastTxPoW](functions/broadcastTxPoW.md) - [clearActiveProvider](functions/clearActiveProvider.md) - [clearAgentPolicy](functions/clearAgentPolicy.md) - [connect](functions/connect.md) - [createPaymentRequest](functions/createPaymentRequest.md) - [getAccounts](functions/getAccounts.md) - [getCapabilities](functions/getCapabilities.md) - [getCoins](functions/getCoins.md) - [getProvider](functions/getProvider.md) - [getProviderStatus](functions/getProviderStatus.md) - [getReceipt](functions/getReceipt.md) - [getTransactionStatus](functions/getTransactionStatus.md) - [getTxPermissions](functions/getTxPermissions.md) - [getWotsStatus](functions/getWotsStatus.md) - [grantTxPermission](functions/grantTxPermission.md) - [isTotemInstalled](functions/isTotemInstalled.md) - [kissvmSimulate](functions/kissvmSimulate.md) - [kissvmValidate](functions/kissvmValidate.md) - [mineTxPoW](functions/mineTxPoW.md) - [omniaCloseChannel](functions/omniaCloseChannel.md) - [omniaCloseFactory](functions/omniaCloseFactory.md) - [omniaCreateFactory](functions/omniaCreateFactory.md) - [omniaGetChannels](functions/omniaGetChannels.md) - [omniaGetRoute](functions/omniaGetRoute.md) - [omniaGetSwapRate](functions/omniaGetSwapRate.md) - [omniaOpenChannel](functions/omniaOpenChannel.md) - [omniaOpenVirtualChannel](functions/omniaOpenVirtualChannel.md) - [omniaPay](functions/omniaPay.md) - [omniaPayMultiHop](functions/omniaPayMultiHop.md) - [omniaSettle](functions/omniaSettle.md) - [omniaSpliceIn](functions/omniaSpliceIn.md) - [omniaSpliceOut](functions/omniaSpliceOut.md) - [onEvent](functions/onEvent.md) - [payPaymentRequest](functions/payPaymentRequest.md) - [releaseWotsLease](functions/releaseWotsLease.md) - [reserveWotsLease](functions/reserveWotsLease.md) - [revokeTxPermission](functions/revokeTxPermission.md) - [sendComplex](functions/sendComplex.md) - [sendTransaction](functions/sendTransaction.md) - [setActiveProvider](functions/setActiveProvider.md) - [setAgentPolicy](functions/setAgentPolicy.md) - [setChainProvider](functions/setChainProvider.md) - [signData](functions/signData.md) - [signTransaction](functions/signTransaction.md) - [statechainClaim](functions/statechainClaim.md) - [statechainCreate](functions/statechainCreate.md) - [statechainTransfer](functions/statechainTransfer.md) - [statechainVerify](functions/statechainVerify.md) - [verify](functions/verify.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-core/index **@totemsdk/core** *** **Maturity: v1** # @totemsdk/core ## Classes - [ConsoleLogger](classes/ConsoleLogger.md) - [DefaultTimerAdapter](classes/DefaultTimerAdapter.md) - [ExchangeHelper](classes/ExchangeHelper.md) - [FlashCashHelper](classes/FlashCashHelper.md) - [HTLCHelper](classes/HTLCHelper.md) - [LeaseMonitor](classes/LeaseMonitor.md) - [LeaseStore](classes/LeaseStore.md) - [MASTHelper](classes/MASTHelper.md) - [MiniNumber](classes/MiniNumber.md) - [MMRTree](classes/MMRTree.md) - [NoopLifecycleAdapter](classes/NoopLifecycleAdapter.md) - [NoopLogger](classes/NoopLogger.md) - [NoopMetrics](classes/NoopMetrics.md) - [SlowCashHelper](classes/SlowCashHelper.md) - [StatefulGameHelper](classes/StatefulGameHelper.md) - [TimelockHelper](classes/TimelockHelper.md) - [TransactionLifecycle](classes/TransactionLifecycle.md) - [TransactionLifecycleError](classes/TransactionLifecycleError.md) - [TransactionReceiptStore](classes/TransactionReceiptStore.md) - [TransactionService](classes/TransactionService.md) - [TreeKey](classes/TreeKey.md) - [TreeKeyNode](classes/TreeKeyNode.md) - [VaultHelper](classes/VaultHelper.md) - [WatermarkExhaustedError](classes/WatermarkExhaustedError.md) - [WatermarkStore](classes/WatermarkStore.md) ## Interfaces - [AdapterRegistry](interfaces/AdapterRegistry.md) - [AuthTokenProvider](interfaces/AuthTokenProvider.md) - [CancellationToken](interfaces/CancellationToken.md) - [CancellationTokenSource](interfaces/CancellationTokenSource.md) - [CoinProofData](interfaces/CoinProofData.md) - [ConfigProvider](interfaces/ConfigProvider.md) - [CryptoAdapter](interfaces/CryptoAdapter.md) - [DAppContractCallParams](interfaces/DAppContractCallParams.md) - [DAppHtlcParams](interfaces/DAppHtlcParams.md) - [DAppLiquidityParams](interfaces/DAppLiquidityParams.md) - [DAppMultisigParams](interfaces/DAppMultisigParams.md) - [DAppStateVariable](interfaces/DAppStateVariable.md) - [DAppSwapParams](interfaces/DAppSwapParams.md) - [DAppTimelockParams](interfaces/DAppTimelockParams.md) - [DAppTransactionInput](interfaces/DAppTransactionInput.md) - [DAppTransactionOutput](interfaces/DAppTransactionOutput.md) - [ExternalSignature](interfaces/ExternalSignature.md) - [FinalizeRequest](interfaces/FinalizeRequest.md) - [FinalizeResponse](interfaces/FinalizeResponse.md) - [FlatMMRProofChunk](interfaces/FlatMMRProofChunk.md) - [HierarchicalWitnessBundle](interfaces/HierarchicalWitnessBundle.md) - [HttpClient](interfaces/HttpClient.md) - [HttpRequestOptions](interfaces/HttpRequestOptions.md) - [HttpResponse](interfaces/HttpResponse.md) - [JavaMMRData](interfaces/JavaMMRData.md) - [JavaMMREntry](interfaces/JavaMMREntry.md) - [JavaMMREntryNumber](interfaces/JavaMMREntryNumber.md) - [KeyGenProgress](interfaces/KeyGenProgress.md) - [LeaseExpiryEvent](interfaces/LeaseExpiryEvent.md) - [LeaseMonitorConfig](interfaces/LeaseMonitorConfig.md) - [LeaseStoreConfig](interfaces/LeaseStoreConfig.md) - [LeaseWotsIndices](interfaces/LeaseWotsIndices.md) - [LegacyMMRProof](interfaces/LegacyMMRProof.md) - [LifecycleAdapter](interfaces/LifecycleAdapter.md) - [LoggerAdapter](interfaces/LoggerAdapter.md) - [MetricsAdapter](interfaces/MetricsAdapter.md) - [MinimaCoin](interfaces/MinimaCoin.md) - [MinimaToken](interfaces/MinimaToken.md) - [MinimaTransaction](interfaces/MinimaTransaction.md) - [MMRData](interfaces/MMRData.md) - [MMREntry](interfaces/MMREntry.md) - [MMRProof](interfaces/MMRProof.md) - [MMRProofChunk](interfaces/MMRProofChunk.md) - [ParsedMiniNumber](interfaces/ParsedMiniNumber.md) - [PrepareRequest](interfaces/PrepareRequest.md) - [PrepareResponse](interfaces/PrepareResponse.md) - [PrepareResult](interfaces/PrepareResult.md) - [RawStateVariable](interfaces/RawStateVariable.md) - [ScriptCatalogEntry](interfaces/ScriptCatalogEntry.md) - [ScriptDescriptor](interfaces/ScriptDescriptor.md) - [ScriptProofResult](interfaces/ScriptProofResult.md) - [SignatureProof](interfaces/SignatureProof.md) - [SignRequest](interfaces/SignRequest.md) - [SignResult](interfaces/SignResult.md) - [SiteTransactionPermission](interfaces/SiteTransactionPermission.md) - [SpendableCoinInput](interfaces/SpendableCoinInput.md) - [StateValue](interfaces/StateValue.md) - [StateVariable](interfaces/StateVariable.md) - [StorageAdapter](interfaces/StorageAdapter.md) - [StoredLease](interfaces/StoredLease.md) - [SyncResult](interfaces/SyncResult.md) - [TimerAdapter](interfaces/TimerAdapter.md) - [TotemSendTransactionRequest](interfaces/TotemSendTransactionRequest.md) - [TotemSendTransactionResponse](interfaces/TotemSendTransactionResponse.md) - [TransactionBuildResult](interfaces/TransactionBuildResult.md) - [TransactionError](interfaces/TransactionError.md) - [TransactionLifecycleConfig](interfaces/TransactionLifecycleConfig.md) - [TransactionMetadata](interfaces/TransactionMetadata.md) - [TransactionReceipt](interfaces/TransactionReceipt.md) - [TransactionReceiptStoreConfig](interfaces/TransactionReceiptStoreConfig.md) - [TransactionRoundState](interfaces/TransactionRoundState.md) - [TransactionScope](interfaces/TransactionScope.md) - [TransactionServiceConfig](interfaces/TransactionServiceConfig.md) - [TreeSignature](interfaces/TreeSignature.md) - [VerificationResult](interfaces/VerificationResult.md) - [VerifyOutExpectation](interfaces/VerifyOutExpectation.md) - [WatermarkState](interfaces/WatermarkState.md) - [WatermarkStoreConfig](interfaces/WatermarkStoreConfig.md) - [WatermarkSyncFunction](interfaces/WatermarkSyncFunction.md) - [WebSocketClient](interfaces/WebSocketClient.md) - [WebSocketCloseEvent](interfaces/WebSocketCloseEvent.md) - [WebSocketErrorEvent](interfaces/WebSocketErrorEvent.md) - [WebSocketFactory](interfaces/WebSocketFactory.md) - [WebSocketFactoryOptions](interfaces/WebSocketFactoryOptions.md) - [WebSocketMessageEvent](interfaces/WebSocketMessageEvent.md) - [WebSocketOpenEvent](interfaces/WebSocketOpenEvent.md) - [~~WitnessBundle~~](interfaces/WitnessBundle.md) - [WotsIndices](interfaces/WotsIndices.md) - [~~WotsSigningDependencies~~](interfaces/WotsSigningDependencies.md) ## Type Aliases - [BinaryData](type-aliases/BinaryData.md) - [Bytes](type-aliases/Bytes.md) - [DAppTransactionIntent](type-aliases/DAppTransactionIntent.md) - [LeaseExpiryCallback](type-aliases/LeaseExpiryCallback.md) - [LeaseStatus](type-aliases/LeaseStatus.md) - [ParamSet](type-aliases/ParamSet.md) - [PrepareArgs](type-aliases/PrepareArgs.md) - [PrepareResp](type-aliases/PrepareResp.md) - [ProgressCallback](type-aliases/ProgressCallback.md) - [ScriptType](type-aliases/ScriptType.md) - [StateVariableType](type-aliases/StateVariableType.md) - [TimerHandle](type-aliases/TimerHandle.md) - [TotemTransactionErrorCode](type-aliases/TotemTransactionErrorCode.md) - [WebSocketEventMap](type-aliases/WebSocketEventMap.md) - [WotsKeypair](type-aliases/WotsKeypair.md) - [WotsSignature](type-aliases/WotsSignature.md) ## Variables - [bytesToHex](variables/bytesToHex.md) - [computeTransactionDigest](variables/computeTransactionDigest.md) - [concatBytes](variables/concatBytes.md) - [CORE\_BUILD\_ID](variables/CORE_BUILD_ID.md) - [CORE\_VERSION](variables/CORE_VERSION.md) - [createChallenge](variables/createChallenge.md) - [DEFAULT\_KEYS\_PER\_LEVEL](variables/DEFAULT_KEYS_PER_LEVEL.md) - [DEFAULT\_LEVELS](variables/DEFAULT_LEVELS.md) - [deriveChainSeedJava](variables/deriveChainSeedJava.md) - [deriveFullPublicKey](variables/deriveFullPublicKey.md) - [derivePerAddressSeed](variables/derivePerAddressSeed.md) - [derivePKdigest](variables/derivePKdigest.md) - [deriveRootPrivSeed](variables/deriveRootPrivSeed.md) - [~~deserializeMMRProof~~](variables/deserializeMMRProof.md) - [expandPrivateKey](variables/expandPrivateKey.md) - [h](variables/h.md) - [hashChain](variables/hashChain.md) - [hexToBytes](variables/hexToBytes.md) - [makeMxAddress](variables/makeMxAddress.md) - [MINIMA\_CONSTANTS](variables/MINIMA_CONSTANTS.md) - [mmrRootFromPublicKeys](variables/mmrRootFromPublicKeys.md) - [parseMxAddress](variables/parseMxAddress.md) - [precomputeTransactionCoinID](variables/precomputeTransactionCoinID.md) - [serializeRealMMRProof](variables/serializeRealMMRProof.md) - [serializeTransaction](variables/serializeTransaction.md) - [sha3\_256](variables/sha3_256.md) - [STATETYPE\_BOOL](variables/STATETYPE_BOOL.md) - [STATETYPE\_HEX](variables/STATETYPE_HEX.md) - [STATETYPE\_NUMBER](variables/STATETYPE_NUMBER.md) - [STATETYPE\_STRING](variables/STATETYPE_STRING.md) - [timingSafeEqual](variables/timingSafeEqual.md) - [TOTEM\_SEND\_TRANSACTION\_VERSION](variables/TOTEM_SEND_TRANSACTION_VERSION.md) - [validateChallenge](variables/validateChallenge.md) - [verifyMMRProof](variables/verifyMMRProof.md) - [WebSocketReadyState](variables/WebSocketReadyState.md) - [WORD\_LIST](variables/WORD_LIST.md) - [WOTS\_MINIMA](variables/WOTS_MINIMA.md) - [WOTS\_V1\_DEV](variables/WOTS_V1_DEV.md) - [WOTS\_V2\_SPEC](variables/WOTS_V2_SPEC.md) - [wotsPkFromSig](variables/wotsPkFromSig.md) - [wotsPublicKeyFromSeed](variables/wotsPublicKeyFromSeed.md) - [wotsSign](variables/wotsSign.md) - [wotsVerify](variables/wotsVerify.md) - [wotsVerifyDigest](variables/wotsVerifyDigest.md) - [writeMiniData](variables/writeMiniData.md) - [writeMiniString](variables/writeMiniString.md) ## Functions - [addressToRoot](functions/addressToRoot.md) - [aggregateSignatures](functions/aggregateSignatures.md) - [assert32](functions/assert32.md) - [baseWWithChecksum](functions/baseWWithChecksum.md) - [bigIntToByteArray](functions/bigIntToByteArray.md) - [buildMinimaCoin](functions/buildMinimaCoin.md) - [buildScriptProofFromDescriptor](functions/buildScriptProofFromDescriptor.md) - [bytesToUtf8](functions/bytesToUtf8.md) - [calculateProofRoot](functions/calculateProofRoot.md) - [canonicalJson](functions/canonicalJson.md) - [cleanSeedPhrase](functions/cleanSeedPhrase.md) - [computeScriptAddress](functions/computeScriptAddress.md) - [concat](functions/concat.md) - [convertFlatChunkToSDK](functions/convertFlatChunkToSDK.md) - [convertLegacyProofToSDK](functions/convertLegacyProofToSDK.md) - [convertStringToSeed](functions/convertStringToSeed.md) - [convertWordListToSeed](functions/convertWordListToSeed.md) - [createAdapterRegistry](functions/createAdapterRegistry.md) - [createCancellationToken](functions/createCancellationToken.md) - [createDefaultTransaction](functions/createDefaultTransaction.md) - [createEmptyMMRProof](functions/createEmptyMMRProof.md) - [createExchangeDescriptor](functions/createExchangeDescriptor.md) - [createFlashCashDescriptor](functions/createFlashCashDescriptor.md) - [createHTLCDescriptor](functions/createHTLCDescriptor.md) - [createMASTDescriptor](functions/createMASTDescriptor.md) - [createMMRDataLeafNode](functions/createMMRDataLeafNode.md) - [createMMRDataParentNode](functions/createMMRDataParentNode.md) - [createMMREntryNumber](functions/createMMREntryNumber.md) - [createMofNMultisigDescriptor](functions/createMofNMultisigDescriptor.md) - [createMultisigDescriptor](functions/createMultisigDescriptor.md) - [~~createPerAddressTreeKey~~](functions/createPerAddressTreeKey.md) - [~~createPerAddressTreeKeyAsync~~](functions/createPerAddressTreeKeyAsync.md) - [createSignedByDescriptor](functions/createSignedByDescriptor.md) - [createSlowCashDescriptor](functions/createSlowCashDescriptor.md) - [createTimelockDescriptor](functions/createTimelockDescriptor.md) - [createUnifiedChildTreeKey](functions/createUnifiedChildTreeKey.md) - [createUnifiedChildTreeKeyAsync](functions/createUnifiedChildTreeKeyAsync.md) - [createUnifiedRootTreeKey](functions/createUnifiedRootTreeKey.md) - [deduplicateScriptDescriptors](functions/deduplicateScriptDescriptors.md) - [deriveAddressFromPublicKey](functions/deriveAddressFromPublicKey.md) - [deriveChildTreeSeedJava](functions/deriveChildTreeSeedJava.md) - [deriveUnifiedAddressPublicKey](functions/deriveUnifiedAddressPublicKey.md) - [deriveUnifiedChildSeed](functions/deriveUnifiedChildSeed.md) - [deserializeTreeSignature](functions/deserializeTreeSignature.md) - [encodeMiniData](functions/encodeMiniData.md) - [encodeMiniNumber](functions/encodeMiniNumber.md) - [encodeMiniString](functions/encodeMiniString.md) - [encodeStateValue](functions/encodeStateValue.md) - [F](functions/F.md) - [finalizeLease](functions/finalizeLease.md) - [flatIndexFromLanes](functions/flatIndexFromLanes.md) - [fromHex](functions/fromHex.md) - [generateSeedPhrase](functions/generateSeedPhrase.md) - [generateWordList](functions/generateWordList.md) - [getParamSet](functions/getParamSet.md) - [getRootPublicKey](functions/getRootPublicKey.md) - [hashAllObjects](functions/hashAllObjects.md) - [hashCanonical](functions/hashCanonical.md) - [hashObject](functions/hashObject.md) - [hex](functions/hex.md) - [indexToMiniDataBytes](functions/indexToMiniDataBytes.md) - [javaHashAllObjects](functions/javaHashAllObjects.md) - [mmrLeafExact](functions/mmrLeafExact.md) - [mmrRootFromSingleLeaf](functions/mmrRootFromSingleLeaf.md) - [mxToHex](functions/mxToHex.md) - [normalizeHex](functions/normalizeHex.md) - [parseDecimalToMiniNumber](functions/parseDecimalToMiniNumber.md) - [parseMMRProofFromHex](functions/parseMMRProofFromHex.md) - [phraseToSeed](functions/phraseToSeed.md) - [prepareLease](functions/prepareLease.md) - [~~prfChainSeed~~](functions/prfChainSeed.md) - [scriptFromWotsPk](functions/scriptFromWotsPk.md) - [scriptToAddress](functions/scriptToAddress.md) - [serializeCoin](functions/serializeCoin.md) - [serializeExtraScripts](functions/serializeExtraScripts.md) - [serializeMiniData](functions/serializeMiniData.md) - [serializeMiniNumber](functions/serializeMiniNumber.md) - [serializeMiniNumberONE](functions/serializeMiniNumberONE.md) - [serializeMiniNumberZERO](functions/serializeMiniNumberZERO.md) - [serializeMMRData](functions/serializeMMRData.md) - [serializeMMREntry](functions/serializeMMREntry.md) - [serializeMMREntryNumber](functions/serializeMMREntryNumber.md) - [serializeMMRProof](functions/serializeMMRProof.md) - [serializeMMRProofChunk](functions/serializeMMRProofChunk.md) - [serializeScriptProofWithProof](functions/serializeScriptProofWithProof.md) - [serializeStateVariables](functions/serializeStateVariables.md) - [serializeTreeSignature](functions/serializeTreeSignature.md) - [simpleTotemSendRequest](functions/simpleTotemSendRequest.md) - [toHex](functions/toHex.md) - [toWinternitzDigits](functions/toWinternitzDigits.md) - [u16be](functions/u16be.md) - [u32be](functions/u32be.md) - [utf8ToBytes](functions/utf8ToBytes.md) - [validateExternalSignature](functions/validateExternalSignature.md) - [validatePhrase](functions/validatePhrase.md) - [validateSendTransactionRequest](functions/validateSendTransactionRequest.md) - [verifySignature](functions/verifySignature.md) - [verifySignatureDetailed](functions/verifySignatureDetailed.md) - [verifyTreeSignature](functions/verifyTreeSignature.md) - [verifyTreeSignatureDetailed](functions/verifyTreeSignatureDetailed.md) - [wotsAddressFromKeypair](functions/wotsAddressFromKeypair.md) - [wotsKeypairFromSeed](functions/wotsKeypairFromSeed.md) - [wotsSignLegacy](functions/wotsSignLegacy.md) - [writeHashToStream](functions/writeHashToStream.md) - [writeMiniByte](functions/writeMiniByte.md) - [writeMiniNumber](functions/writeMiniNumber.md) - [writeMMREntryNumber](functions/writeMMREntryNumber.md) ## References ### decodeMx Renames and re-exports [parseMxAddress](variables/parseMxAddress.md) *** ### encodeMx Renames and re-exports [makeMxAddress](variables/makeMxAddress.md) --- ## Page: @totemsdk/core-wasm URL: https://docs.totem.ing/api/totemsdk-core-wasm/index # `@totemsdk/core-wasm` > WOTS+ cryptographic engine compiled from Rust to WASM **Maturity: `v1`** :::info Curated Reference Full API reference for this package requires TypeDoc regeneration. Run `npm run generate` from `TotemEdgeSDKDocs/` after installing deps. ::: ## Install ```bash npm install @totemsdk/core-wasm ``` ← [Back to Package Index](/api) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-edge/index **@totemsdk/edge** *** **Maturity: v1** # @totemsdk/edge ## Classes - [EdgeBuyer](classes/EdgeBuyer.md) - [EdgeCapabilityError](classes/EdgeCapabilityError.md) - [EdgeTxPowAdapter](classes/EdgeTxPowAdapter.md) - [EdgeWorkPolicy](classes/EdgeWorkPolicy.md) - [InMemoryNegotiationStore](classes/InMemoryNegotiationStore.md) - [InMemoryNegotiationTransport](classes/InMemoryNegotiationTransport.md) - [InMemoryOutboxStore](classes/InMemoryOutboxStore.md) - [InMemoryPrincipalNegotiationStore](classes/InMemoryPrincipalNegotiationStore.md) - [InMemoryPurchaseStore](classes/InMemoryPurchaseStore.md) - [InMemoryReplayLedger](classes/InMemoryReplayLedger.md) - [NegotiationEngine](classes/NegotiationEngine.md) - [NegotiationError](classes/NegotiationError.md) - [PurchaseError](classes/PurchaseError.md) ## Interfaces - [AgentEdgeRuntime](interfaces/AgentEdgeRuntime.md) - [AgentEdgeRuntimeOptions](interfaces/AgentEdgeRuntimeOptions.md) - [BuiltinActionRegistration](interfaces/BuiltinActionRegistration.md) - [BuiltTransaction](interfaces/BuiltTransaction.md) - [BuiltTxInput](interfaces/BuiltTxInput.md) - [BuiltTxOutput](interfaces/BuiltTxOutput.md) - [BuyerOptions](interfaces/BuyerOptions.md) - [BuyOptions](interfaces/BuyOptions.md) - [CreateAccountedIntelligencePortOptions](interfaces/CreateAccountedIntelligencePortOptions.md) - [CreateEdgeOptions](interfaces/CreateEdgeOptions.md) - [DeliveryReceipt](interfaces/DeliveryReceipt.md) - [EdgeActionDefinition](interfaces/EdgeActionDefinition.md) - [EdgeActionInput](interfaces/EdgeActionInput.md) - [EdgeActionRegistry](interfaces/EdgeActionRegistry.md) - [EdgeCommerceRuntime](interfaces/EdgeCommerceRuntime.md) - [EdgeDevice](interfaces/EdgeDevice.md) - [EdgeIdentityPort](interfaces/EdgeIdentityPort.md) - [EdgeIntelligencePort](interfaces/EdgeIntelligencePort.md) - [EdgeKeyLeasePort](interfaces/EdgeKeyLeasePort.md) - [EdgeLiquidityPort](interfaces/EdgeLiquidityPort.md) - [EdgeLocationPort](interfaces/EdgeLocationPort.md) - [EdgeLookupPort](interfaces/EdgeLookupPort.md) - [EdgeManifestPort](interfaces/EdgeManifestPort.md) - [EdgeOmniaPort](interfaces/EdgeOmniaPort.md) - [EdgeOperationResult](interfaces/EdgeOperationResult.md) - [EdgePaymentPort](interfaces/EdgePaymentPort.md) - [EdgePolicyPort](interfaces/EdgePolicyPort.md) - [EdgeProofPort](interfaces/EdgeProofPort.md) - [EdgeProviderProfile](interfaces/EdgeProviderProfile.md) - [EdgePubSubPort](interfaces/EdgePubSubPort.md) - [EdgeReceipt](interfaces/EdgeReceipt.md) - [EdgeRuntime](interfaces/EdgeRuntime.md) - [EdgeRuntimePorts](interfaces/EdgeRuntimePorts.md) - [EdgeSeller](interfaces/EdgeSeller.md) - [EdgeServiceRegistration](interfaces/EdgeServiceRegistration.md) - [EdgeStreamPort](interfaces/EdgeStreamPort.md) - [EdgeTxBuilderContext](interfaces/EdgeTxBuilderContext.md) - [FoldCompletedDispatchInput](interfaces/FoldCompletedDispatchInput.md) - [FoldUsageStatementsInput](interfaces/FoldUsageStatementsInput.md) - [FoldUsageStatementsReport](interfaces/FoldUsageStatementsReport.md) - [InferenceAccountingAuthority](interfaces/InferenceAccountingAuthority.md) - [InferenceAccountingReconciliation](interfaces/InferenceAccountingReconciliation.md) - [InferenceRecordedUsage](interfaces/InferenceRecordedUsage.md) - [InferenceRecoveryReport](interfaces/InferenceRecoveryReport.md) - [IngressOptions](interfaces/IngressOptions.md) - [IngressResult](interfaces/IngressResult.md) - [IssueUsageStatementOptions](interfaces/IssueUsageStatementOptions.md) - [LocalWorkBudget](interfaces/LocalWorkBudget.md) - [NegotiationCancellation](interfaces/NegotiationCancellation.md) - [NegotiationEngineOptions](interfaces/NegotiationEngineOptions.md) - [NegotiationLimits](interfaces/NegotiationLimits.md) - [NegotiationRecord](interfaces/NegotiationRecord.md) - [NegotiationRequest](interfaces/NegotiationRequest.md) - [NegotiationResult](interfaces/NegotiationResult.md) - [NegotiationStore](interfaces/NegotiationStore.md) - [NegotiationStrategy](interfaces/NegotiationStrategy.md) - [NegotiationTransport](interfaces/NegotiationTransport.md) - [OutboxDrainerOptions](interfaces/OutboxDrainerOptions.md) - [OutboxEntry](interfaces/OutboxEntry.md) - [OutboxMessage](interfaces/OutboxMessage.md) - [OutboxStore](interfaces/OutboxStore.md) - [PrincipalLimits](interfaces/PrincipalLimits.md) - [PrincipalNegotiationStore](interfaces/PrincipalNegotiationStore.md) - [ProposalAcceptance](interfaces/ProposalAcceptance.md) - [ProposalRejection](interfaces/ProposalRejection.md) - [PurchaseIntent](interfaces/PurchaseIntent.md) - [PurchaseRecord](interfaces/PurchaseRecord.md) - [PurchaseResult](interfaces/PurchaseResult.md) - [PurchaseSession](interfaces/PurchaseSession.md) - [PurchaseStore](interfaces/PurchaseStore.md) - [ReconcileInferenceAccountingOptions](interfaces/ReconcileInferenceAccountingOptions.md) - [ReplayLedger](interfaces/ReplayLedger.md) - [ReplayOutcome](interfaces/ReplayOutcome.md) - [ResourceAdapter](interfaces/ResourceAdapter.md) - [ResourceHandle](interfaces/ResourceHandle.md) - [SellerServiceOptions](interfaces/SellerServiceOptions.md) - [SellerStrategy](interfaces/SellerStrategy.md) - [SessionOptions](interfaces/SessionOptions.md) - [TradeAgreement](interfaces/TradeAgreement.md) - [TradeProposal](interfaces/TradeProposal.md) - [TradeTerms](interfaces/TradeTerms.md) - [TransportMessageContext](interfaces/TransportMessageContext.md) - [UsageAgreementReference](interfaces/UsageAgreementReference.md) - [UsageEvent](interfaces/UsageEvent.md) - [UsageFoldContext](interfaces/UsageFoldContext.md) - [WorkDifficultyPolicy](interfaces/WorkDifficultyPolicy.md) - [WorkRequired](interfaces/WorkRequired.md) ## Type Aliases - [EdgeActionEffect](type-aliases/EdgeActionEffect.md) - [EdgeCapability](type-aliases/EdgeCapability.md) - [EdgeCapabilitySet](type-aliases/EdgeCapabilitySet.md) - [EdgeDeviceKind](type-aliases/EdgeDeviceKind.md) - [InferenceAuditEvent](type-aliases/InferenceAuditEvent.md) - [InferenceReadEvent](type-aliases/InferenceReadEvent.md) - [NegotiationMessage](type-aliases/NegotiationMessage.md) - [NegotiationState](type-aliases/NegotiationState.md) - [OutboxDrainer](type-aliases/OutboxDrainer.md) - [PurchaseEvent](type-aliases/PurchaseEvent.md) - [PurchaseStatus](type-aliases/PurchaseStatus.md) - [ReplayEntry](type-aliases/ReplayEntry.md) - [UsageAgreementResolver](type-aliases/UsageAgreementResolver.md) - [WorkMode](type-aliases/WorkMode.md) ## Variables - [DEFAULT\_MAX\_CONCURRENT\_NEGOTIATIONS](variables/DEFAULT_MAX_CONCURRENT_NEGOTIATIONS.md) - [DEFAULT\_MAX\_NEGOTIATIONS\_PER\_WINDOW](variables/DEFAULT_MAX_NEGOTIATIONS_PER_WINDOW.md) - [DEFAULT\_MAX\_ROUNDS](variables/DEFAULT_MAX_ROUNDS.md) - [DEFAULT\_NEGOTIATION\_COOLDOWN\_MS](variables/DEFAULT_NEGOTIATION_COOLDOWN_MS.md) - [DEFAULT\_NEGOTIATION\_TTL\_MS](variables/DEFAULT_NEGOTIATION_TTL_MS.md) - [DEFAULT\_NEGOTIATION\_WINDOW\_MS](variables/DEFAULT_NEGOTIATION_WINDOW_MS.md) - [EDGE\_INTELLIGENCE\_CAPABILITIES](variables/EDGE_INTELLIGENCE_CAPABILITIES.md) - [EDGE\_VERSION](variables/EDGE_VERSION.md) - [MAX\_NEGOTIATION\_MESSAGE\_BYTES](variables/MAX_NEGOTIATION_MESSAGE_BYTES.md) - [PURCHASE\_ERROR\_CODES](variables/PURCHASE_ERROR_CODES.md) - [PURCHASING\_VERSION](variables/PURCHASING_VERSION.md) - [TERMINAL\_NEGOTIATION\_STATES](variables/TERMINAL_NEGOTIATION_STATES.md) - [TERMINAL\_PURCHASE\_STATUSES](variables/TERMINAL_PURCHASE_STATUSES.md) - [UNGRANTABLE\_ACTIONS](variables/UNGRANTABLE_ACTIONS.md) ## Functions - [assertCapability](functions/assertCapability.md) - [bindEdgeServiceIdentity](functions/bindEdgeServiceIdentity.md) - [createAccountedIntelligencePort](functions/createAccountedIntelligencePort.md) - [createAgentEdgeRuntime](functions/createAgentEdgeRuntime.md) - [createBuiltinActionDefinitions](functions/createBuiltinActionDefinitions.md) - [createCapabilitySet](functions/createCapabilitySet.md) - [createEdge](functions/createEdge.md) - [createEdgeActionRegistry](functions/createEdgeActionRegistry.md) - [createEdgeDevice](functions/createEdgeDevice.md) - [createEdgeIntelligencePort](functions/createEdgeIntelligencePort.md) - [createEdgeProviderProfile](functions/createEdgeProviderProfile.md) - [createEdgeReceipt](functions/createEdgeReceipt.md) - [createEdgeRuntime](functions/createEdgeRuntime.md) - [createEdgeSeller](functions/createEdgeSeller.md) - [createEdgeServiceManifest](functions/createEdgeServiceManifest.md) - [createEdgeServiceRegistration](functions/createEdgeServiceRegistration.md) - [createNegotiationRecord](functions/createNegotiationRecord.md) - [createOutboxDrainer](functions/createOutboxDrainer.md) - [createPurchaseRecord](functions/createPurchaseRecord.md) - [createPurchaseSession](functions/createPurchaseSession.md) - [deliverOne](functions/deliverOne.md) - [deriveEffectsFromBuiltTx](functions/deriveEffectsFromBuiltTx.md) - [deriveSpendsFromBuiltTx](functions/deriveSpendsFromBuiltTx.md) - [edgeCapabilitiesFromTotemCapabilities](functions/edgeCapabilitiesFromTotemCapabilities.md) - [foldCompletedDispatch](functions/foldCompletedDispatch.md) - [foldUsageStatements](functions/foldUsageStatements.md) - [fromEnhancedBuildParams](functions/fromEnhancedBuildParams.md) - [fromOmniaTxDraft](functions/fromOmniaTxDraft.md) - [hasCapability](functions/hasCapability.md) - [hasIntelligenceCapability](functions/hasIntelligenceCapability.md) - [idempotencyKey](functions/idempotencyKey.md) - [ingress](functions/ingress.md) - [isIntelligenceCapability](functions/isIntelligenceCapability.md) - [isPurchaseBound](functions/isPurchaseBound.md) - [issueUsageStatement](functions/issueUsageStatement.md) - [isUngrantableAction](functions/isUngrantableAction.md) - [messageId](functions/messageId.md) - [messageType](functions/messageType.md) - [proposalDigest](functions/proposalDigest.md) - [reconcileInferenceAccounting](functions/reconcileInferenceAccounting.md) - [recoverInferenceJournal](functions/recoverInferenceJournal.md) - [termsHash](functions/termsHash.md) - [usageStatementId](functions/usageStatementId.md) - [verifyEdgeReceipt](functions/verifyEdgeReceipt.md) - [workRequiredDigest](functions/workRequiredDigest.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-edge-adapters/index **@totemsdk/edge-adapters** *** **Maturity: rc** # @totemsdk/edge-adapters ## Classes - [SQLiteCommerceStore](classes/SQLiteCommerceStore.md) ## Interfaces - [CommerceStore](interfaces/CommerceStore.md) - [IdentityPortConfig](interfaces/IdentityPortConfig.md) - [LiquidityPortConfig](interfaces/LiquidityPortConfig.md) - [LocationPortConfig](interfaces/LocationPortConfig.md) - [MinimaL1PaymentPortConfig](interfaces/MinimaL1PaymentPortConfig.md) - [OmniaHostPortConfig](interfaces/OmniaHostPortConfig.md) - [OmniaL2PaymentPortConfig](interfaces/OmniaL2PaymentPortConfig.md) - [ProofPortConfig](interfaces/ProofPortConfig.md) - [PubSubNegotiationTransportConfig](interfaces/PubSubNegotiationTransportConfig.md) - [PurchaseAuthorityAdapterConfig](interfaces/PurchaseAuthorityAdapterConfig.md) - [PurchaseLookupAdapterConfig](interfaces/PurchaseLookupAdapterConfig.md) - [PurchasePaymentAdapterConfig](interfaces/PurchasePaymentAdapterConfig.md) - [SQLiteCommerceStoreConfig](interfaces/SQLiteCommerceStoreConfig.md) - [StreamNegotiationTransportConfig](interfaces/StreamNegotiationTransportConfig.md) ## Type Aliases - [PurchasePaymentClaimRecord](type-aliases/PurchasePaymentClaimRecord.md) - [PurchasePaymentStore](type-aliases/PurchasePaymentStore.md) ## Functions - [createIdentityPortAdapter](functions/createIdentityPortAdapter.md) - [createLiquidityPortAdapter](functions/createLiquidityPortAdapter.md) - [createLocationPortAdapter](functions/createLocationPortAdapter.md) - [createLookupPortAdapter](functions/createLookupPortAdapter.md) - [createManifestPortAdapter](functions/createManifestPortAdapter.md) - [createMinimaL1PaymentPort](functions/createMinimaL1PaymentPort.md) - [createOmniaHostPort](functions/createOmniaHostPort.md) - [createOmniaL2PaymentPort](functions/createOmniaL2PaymentPort.md) - [createPolicyPortAdapter](functions/createPolicyPortAdapter.md) - [createProofPortAdapter](functions/createProofPortAdapter.md) - [createPubSubNegotiationTransport](functions/createPubSubNegotiationTransport.md) - [createPubSubPortAdapter](functions/createPubSubPortAdapter.md) - [createPurchaseAuthorityAdapter](functions/createPurchaseAuthorityAdapter.md) - [createPurchaseLookupAdapter](functions/createPurchaseLookupAdapter.md) - [createPurchasePaymentAdapter](functions/createPurchasePaymentAdapter.md) - [createSQLiteCommerceStore](functions/createSQLiteCommerceStore.md) - [createStreamNegotiationTransport](functions/createStreamNegotiationTransport.md) - [createStreamPortAdapter](functions/createStreamPortAdapter.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-edge-bacnet/index **@totemsdk/edge-bacnet** *** **Maturity: rc** # @totemsdk/edge-bacnet ## Interfaces - [BacnetCovBinding](interfaces/BacnetCovBinding.md) - [BacnetCovNotification](interfaces/BacnetCovNotification.md) - [BacnetDevice](interfaces/BacnetDevice.md) - [BacnetGateway](interfaces/BacnetGateway.md) - [BacnetGatewayConfig](interfaces/BacnetGatewayConfig.md) - [BacnetPropertyValue](interfaces/BacnetPropertyValue.md) - [BacnetSensorBinding](interfaces/BacnetSensorBinding.md) - [BacnetSensorBridge](interfaces/BacnetSensorBridge.md) - [BacnetSensorBridgeConfig](interfaces/BacnetSensorBridgeConfig.md) - [BacnetSubscription](interfaces/BacnetSubscription.md) - [BacnetTransportPort](interfaces/BacnetTransportPort.md) ## Functions - [createBacnetGateway](functions/createBacnetGateway.md) - [createBacnetSensorBridge](functions/createBacnetSensorBridge.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-edge-ble/index **@totemsdk/edge-ble** *** **Maturity: rc** # @totemsdk/edge-ble ## Interfaces - [BleCharacteristic](interfaces/BleCharacteristic.md) - [BleGateway](interfaces/BleGateway.md) - [BleGatewayConfig](interfaces/BleGatewayConfig.md) - [BleNotification](interfaces/BleNotification.md) - [BlePeripheral](interfaces/BlePeripheral.md) - [BleSensorBinding](interfaces/BleSensorBinding.md) - [BleSensorBridge](interfaces/BleSensorBridge.md) - [BleSensorBridgeConfig](interfaces/BleSensorBridgeConfig.md) - [BleService](interfaces/BleService.md) - [BleTransportPort](interfaces/BleTransportPort.md) ## Functions - [createBleGateway](functions/createBleGateway.md) - [createBleSensorBridge](functions/createBleSensorBridge.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-edge-can/index **@totemsdk/edge-can** *** **Maturity: rc** # @totemsdk/edge-can ## Classes - [NativeCanTransport](classes/NativeCanTransport.md) ## Interfaces - [CanFrame](interfaces/CanFrame.md) - [CanGateway](interfaces/CanGateway.md) - [CanGatewayConfig](interfaces/CanGatewayConfig.md) - [CanSensorBinding](interfaces/CanSensorBinding.md) - [CanSensorBridge](interfaces/CanSensorBridge.md) - [CanSensorBridgeConfig](interfaces/CanSensorBridgeConfig.md) - [CanSignal](interfaces/CanSignal.md) - [CanSignalDef](interfaces/CanSignalDef.md) - [CanTransportPort](interfaces/CanTransportPort.md) - [NativeCanConfig](interfaces/NativeCanConfig.md) ## Functions - [createCanGateway](functions/createCanGateway.md) - [createCanSensorBridge](functions/createCanSensorBridge.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-edge-coap/index **@totemsdk/edge-coap** *** **Maturity: rc** # @totemsdk/edge-coap ## Classes - [NativeCoapTransport](classes/NativeCoapTransport.md) ## Interfaces - [CoapGateway](interfaces/CoapGateway.md) - [CoapGatewayConfig](interfaces/CoapGatewayConfig.md) - [CoapMessage](interfaces/CoapMessage.md) - [CoapSensorBinding](interfaces/CoapSensorBinding.md) - [CoapSensorBridge](interfaces/CoapSensorBridge.md) - [CoapSensorBridgeConfig](interfaces/CoapSensorBridgeConfig.md) - [CoapTransportPort](interfaces/CoapTransportPort.md) - [NativeCoapConfig](interfaces/NativeCoapConfig.md) ## Type Aliases - [CoapMessageType](type-aliases/CoapMessageType.md) - [CoapMethod](type-aliases/CoapMethod.md) ## Functions - [createCoapGateway](functions/createCoapGateway.md) - [createCoapSensorBridge](functions/createCoapSensorBridge.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-edge-grpc/index **@totemsdk/edge-grpc** *** **Maturity: rc** # @totemsdk/edge-grpc ## Classes - [NativeGrpcTransport](classes/NativeGrpcTransport.md) ## Interfaces - [GrpcClient](interfaces/GrpcClient.md) - [GrpcGateway](interfaces/GrpcGateway.md) - [GrpcGatewayConfig](interfaces/GrpcGatewayConfig.md) - [GrpcMessage](interfaces/GrpcMessage.md) - [GrpcSensorBinding](interfaces/GrpcSensorBinding.md) - [GrpcSensorBridge](interfaces/GrpcSensorBridge.md) - [GrpcSensorBridgeConfig](interfaces/GrpcSensorBridgeConfig.md) - [GrpcStreamHandle](interfaces/GrpcStreamHandle.md) - [NativeGrpcConfig](interfaces/NativeGrpcConfig.md) ## Type Aliases - [GrpcTransportPort](type-aliases/GrpcTransportPort.md) ## Functions - [createGrpcGateway](functions/createGrpcGateway.md) - [createGrpcSensorBridge](functions/createGrpcSensorBridge.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-edge-lorawan/index **@totemsdk/edge-lorawan** *** **Maturity: rc** # @totemsdk/edge-lorawan ## Interfaces - [LorawanGateway](interfaces/LorawanGateway.md) - [LorawanGatewayConfig](interfaces/LorawanGatewayConfig.md) - [LorawanMessage](interfaces/LorawanMessage.md) - [LorawanSensorBinding](interfaces/LorawanSensorBinding.md) - [LorawanSensorBridge](interfaces/LorawanSensorBridge.md) - [LorawanSensorBridgeConfig](interfaces/LorawanSensorBridgeConfig.md) - [LorawanTransportPort](interfaces/LorawanTransportPort.md) ## Functions - [createLorawanGateway](functions/createLorawanGateway.md) - [createLorawanSensorBridge](functions/createLorawanSensorBridge.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-edge-matter/index **@totemsdk/edge-matter** *** **Maturity: rc** # @totemsdk/edge-matter ## Interfaces - [MatterAttribute](interfaces/MatterAttribute.md) - [MatterAttributeBinding](interfaces/MatterAttributeBinding.md) - [MatterAttributeValue](interfaces/MatterAttributeValue.md) - [MatterCluster](interfaces/MatterCluster.md) - [MatterCommand](interfaces/MatterCommand.md) - [MatterCommissionableDevice](interfaces/MatterCommissionableDevice.md) - [MatterEndpoint](interfaces/MatterEndpoint.md) - [MatterGateway](interfaces/MatterGateway.md) - [MatterGatewayConfig](interfaces/MatterGatewayConfig.md) - [MatterNode](interfaces/MatterNode.md) - [MatterSensorBinding](interfaces/MatterSensorBinding.md) - [MatterSensorBridge](interfaces/MatterSensorBridge.md) - [MatterSensorBridgeConfig](interfaces/MatterSensorBridgeConfig.md) - [MatterSubscription](interfaces/MatterSubscription.md) - [MatterTransportPort](interfaces/MatterTransportPort.md) ## Functions - [createMatterGateway](functions/createMatterGateway.md) - [createMatterSensorBridge](functions/createMatterSensorBridge.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-edge-modbus/index **@totemsdk/edge-modbus** *** **Maturity: rc** # @totemsdk/edge-modbus ## Classes - [NativeModbusTransport](classes/NativeModbusTransport.md) ## Interfaces - [ModbusGateway](interfaces/ModbusGateway.md) - [ModbusGatewayConfig](interfaces/ModbusGatewayConfig.md) - [ModbusMessage](interfaces/ModbusMessage.md) - [ModbusSensorBinding](interfaces/ModbusSensorBinding.md) - [ModbusSensorBridge](interfaces/ModbusSensorBridge.md) - [ModbusSensorBridgeConfig](interfaces/ModbusSensorBridgeConfig.md) - [ModbusTransportPort](interfaces/ModbusTransportPort.md) - [NativeModbusConfig](interfaces/NativeModbusConfig.md) ## Functions - [createModbusGateway](functions/createModbusGateway.md) - [createModbusSensorBridge](functions/createModbusSensorBridge.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/index **@totemsdk/edge-mqtt** *** **Maturity: rc** # @totemsdk/edge-mqtt ## Classes - [MqttClientUnavailableError](classes/MqttClientUnavailableError.md) - [MqttCreditExceededError](classes/MqttCreditExceededError.md) - [MqttEdgeError](classes/MqttEdgeError.md) - [MqttPaymentRequiredError](classes/MqttPaymentRequiredError.md) - [MqttPolicyRejectedError](classes/MqttPolicyRejectedError.md) - [MqttProofCreationError](classes/MqttProofCreationError.md) - [MqttQueueError](classes/MqttQueueError.md) ## Interfaces - [DurableEventRecord](interfaces/DurableEventRecord.md) - [DurableMqttEdgeQueueOptions](interfaces/DurableMqttEdgeQueueOptions.md) - [MqttClientPort](interfaces/MqttClientPort.md) - [MqttCommand](interfaces/MqttCommand.md) - [MqttCommandExecutor](interfaces/MqttCommandExecutor.md) - [MqttCommandHandler](interfaces/MqttCommandHandler.md) - [MqttCommandHandlerConfig](interfaces/MqttCommandHandlerConfig.md) - [MqttCommandRule](interfaces/MqttCommandRule.md) - [MqttCreditDecision](interfaces/MqttCreditDecision.md) - [MqttCreditGate](interfaces/MqttCreditGate.md) - [MqttCreditGateConfig](interfaces/MqttCreditGateConfig.md) - [MqttEdgeGateway](interfaces/MqttEdgeGateway.md) - [MqttEdgeGatewayConfig](interfaces/MqttEdgeGatewayConfig.md) - [MqttEdgeQueue](interfaces/MqttEdgeQueue.md) - [MqttEdgeServiceManifestInput](interfaces/MqttEdgeServiceManifestInput.md) - [MqttGatewayStatus](interfaces/MqttGatewayStatus.md) - [MqttMessage](interfaces/MqttMessage.md) - [MqttPaymentRule](interfaces/MqttPaymentRule.md) - [MqttProofEnvelope](interfaces/MqttProofEnvelope.md) - [MqttProofOptions](interfaces/MqttProofOptions.md) - [MqttProofPublisher](interfaces/MqttProofPublisher.md) - [MqttProofPublisherConfig](interfaces/MqttProofPublisherConfig.md) - [MqttProofRule](interfaces/MqttProofRule.md) - [MqttPublishOptions](interfaces/MqttPublishOptions.md) - [MqttQueuedEvent](interfaces/MqttQueuedEvent.md) - [MqttReceiptInput](interfaces/MqttReceiptInput.md) - [MqttRouteDecision](interfaces/MqttRouteDecision.md) - [MqttRouteRule](interfaces/MqttRouteRule.md) - [MqttRuleEngine](interfaces/MqttRuleEngine.md) - [MqttSensorBinding](interfaces/MqttSensorBinding.md) - [MqttSensorBridge](interfaces/MqttSensorBridge.md) - [MqttSensorBridgeConfig](interfaces/MqttSensorBridgeConfig.md) - [MqttSubscribeOptions](interfaces/MqttSubscribeOptions.md) - [MqttSubscription](interfaces/MqttSubscription.md) - [MqttTopicMatch](interfaces/MqttTopicMatch.md) - [MqttTopicRule](interfaces/MqttTopicRule.md) - [MqttTopicSet](interfaces/MqttTopicSet.md) - [MqttTransportInfo](interfaces/MqttTransportInfo.md) - [MqttUsageEvent](interfaces/MqttUsageEvent.md) - [MqttUsageMeter](interfaces/MqttUsageMeter.md) - [MqttUsageMeterConfig](interfaces/MqttUsageMeterConfig.md) - [RealtimePort](interfaces/RealtimePort.md) ## Type Aliases - [DurableMqttEdgeQueue](type-aliases/DurableMqttEdgeQueue.md) - [MqttRuleKind](type-aliases/MqttRuleKind.md) - [MqttServiceType](type-aliases/MqttServiceType.md) - [MqttTransportKind](type-aliases/MqttTransportKind.md) - [MqttUsageUnit](type-aliases/MqttUsageUnit.md) ## Variables - [createDefaultMqttTopics](variables/createDefaultMqttTopics.md) - [createSensorTopic](variables/createSensorTopic.md) - [matchMqttTopic](variables/matchMqttTopic.md) - [toHex](variables/toHex.md) ## Functions - [announceMqttService](functions/announceMqttService.md) - [announceToAll](functions/announceToAll.md) - [canonicalJson](functions/canonicalJson.md) - [computeMqttEventId](functions/computeMqttEventId.md) - [createDeadLetterEvent](functions/createDeadLetterEvent.md) - [createDurableMqttEdgeQueue](functions/createDurableMqttEdgeQueue.md) - [createEdgeReceipt](functions/createEdgeReceipt.md) - [createEdgeRuntime](functions/createEdgeRuntime.md) - [createMemoryMqttEdgeQueue](functions/createMemoryMqttEdgeQueue.md) - [createMqttCommandHandler](functions/createMqttCommandHandler.md) - [createMqttCreditGate](functions/createMqttCreditGate.md) - [createMqttEdgeGateway](functions/createMqttEdgeGateway.md) - [createMqttEdgeServiceManifest](functions/createMqttEdgeServiceManifest.md) - [createMqttProofPublisher](functions/createMqttProofPublisher.md) - [createMqttReceipt](functions/createMqttReceipt.md) - [createMqttRuleEngine](functions/createMqttRuleEngine.md) - [createMqttSensorBridge](functions/createMqttSensorBridge.md) - [createMqttUsageMeter](functions/createMqttUsageMeter.md) - [decodeMqttEdgeMessage](functions/decodeMqttEdgeMessage.md) - [encodeMqttEdgeMessage](functions/encodeMqttEdgeMessage.md) - [findMatchingRules](functions/findMatchingRules.md) - [flushQueuedEvents](functions/flushQueuedEvents.md) - [mirrorMqttToRealtime](functions/mirrorMqttToRealtime.md) - [publishMqttManifest](functions/publishMqttManifest.md) - [publishMqttReceipt](functions/publishMqttReceipt.md) - [routeMqttMessage](functions/routeMqttMessage.md) - [verifyEdgeReceipt](functions/verifyEdgeReceipt.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-edge-nfc/index **@totemsdk/edge-nfc** *** **Maturity: alpha** # @totemsdk/edge-nfc ## Interfaces - [NdefRecord](interfaces/NdefRecord.md) - [NfcGateway](interfaces/NfcGateway.md) - [NfcGatewayConfig](interfaces/NfcGatewayConfig.md) - [NfcTag](interfaces/NfcTag.md) - [NfcTagEvent](interfaces/NfcTagEvent.md) - [NfcTransportPort](interfaces/NfcTransportPort.md) ## Type Aliases - [HceApduHandler](type-aliases/HceApduHandler.md) ## Variables - [TNF\_ABSOLUTE\_URI](variables/TNF_ABSOLUTE_URI.md) - [TNF\_EXTERNAL](variables/TNF_EXTERNAL.md) - [TNF\_MIME](variables/TNF_MIME.md) - [TNF\_WELL\_KNOWN](variables/TNF_WELL_KNOWN.md) ## Functions - [createNfcGateway](functions/createNfcGateway.md) - [decodeNdefMessage](functions/decodeNdefMessage.md) - [encodeNdefMessage](functions/encodeNdefMessage.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-edge-opcua/index **@totemsdk/edge-opcua** *** **Maturity: rc** # @totemsdk/edge-opcua ## Classes - [NativeOpcuaTransport](classes/NativeOpcuaTransport.md) ## Interfaces - [NativeOpcuaConfig](interfaces/NativeOpcuaConfig.md) - [OpcuaGateway](interfaces/OpcuaGateway.md) - [OpcuaGatewayConfig](interfaces/OpcuaGatewayConfig.md) - [OpcuaNode](interfaces/OpcuaNode.md) - [OpcuaNodeBinding](interfaces/OpcuaNodeBinding.md) - [OpcuaSensorBinding](interfaces/OpcuaSensorBinding.md) - [OpcuaSensorBridge](interfaces/OpcuaSensorBridge.md) - [OpcuaSensorBridgeConfig](interfaces/OpcuaSensorBridgeConfig.md) - [OpcuaSubscription](interfaces/OpcuaSubscription.md) - [OpcuaTransportPort](interfaces/OpcuaTransportPort.md) - [OpcuaValue](interfaces/OpcuaValue.md) - [OpcuaValueChange](interfaces/OpcuaValueChange.md) ## Functions - [createOpcuaGateway](functions/createOpcuaGateway.md) - [createOpcuaSensorBridge](functions/createOpcuaSensorBridge.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-edge-ros2/index **@totemsdk/edge-ros2** *** **Maturity: rc** # @totemsdk/edge-ros2 ## Interfaces - [Ros2Client](interfaces/Ros2Client.md) - [Ros2Gateway](interfaces/Ros2Gateway.md) - [Ros2GatewayConfig](interfaces/Ros2GatewayConfig.md) - [Ros2Message](interfaces/Ros2Message.md) - [Ros2Publisher](interfaces/Ros2Publisher.md) - [Ros2SensorBinding](interfaces/Ros2SensorBinding.md) - [Ros2SensorBridge](interfaces/Ros2SensorBridge.md) - [Ros2SensorBridgeConfig](interfaces/Ros2SensorBridgeConfig.md) - [Ros2Server](interfaces/Ros2Server.md) - [Ros2Subscription](interfaces/Ros2Subscription.md) - [Ros2TopicBinding](interfaces/Ros2TopicBinding.md) - [Ros2TransportPort](interfaces/Ros2TransportPort.md) ## Functions - [createRos2Gateway](functions/createRos2Gateway.md) - [createRos2SensorBridge](functions/createRos2SensorBridge.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-governance/index **@totemsdk/governance** *** **Maturity: rc** # @totemsdk/governance ## Classes - [UsageStore](classes/UsageStore.md) ## Interfaces - [Delegation](interfaces/Delegation.md) - [DelegationConfig](interfaces/DelegationConfig.md) - [DelegationResolution](interfaces/DelegationResolution.md) - [GovernanceConfig](interfaces/GovernanceConfig.md) - [GovernanceError](interfaces/GovernanceError.md) - [MandateReceipt](interfaces/MandateReceipt.md) - [MembershipEntry](interfaces/MembershipEntry.md) - [MembershipSnapshot](interfaces/MembershipSnapshot.md) - [Proposal](interfaces/Proposal.md) - [ProposalAction](interfaces/ProposalAction.md) - [ProposalOutcome](interfaces/ProposalOutcome.md) - [QuadraticConfig](interfaces/QuadraticConfig.md) - [QuadraticCredits](interfaces/QuadraticCredits.md) - [QuadraticVoteAllocation](interfaces/QuadraticVoteAllocation.md) - [UsageReservation](interfaces/UsageReservation.md) - [Vote](interfaces/Vote.md) - [VoteTally](interfaces/VoteTally.md) - [VotingConfig](interfaces/VotingConfig.md) ## Type Aliases - [GovernanceResult](type-aliases/GovernanceResult.md) - [ProposalActionType](type-aliases/ProposalActionType.md) - [ProposalStatus](type-aliases/ProposalStatus.md) - [TallyAlgorithm](type-aliases/TallyAlgorithm.md) ## Functions - [activateProposal](functions/activateProposal.md) - [cancelProposal](functions/cancelProposal.md) - [canonicalJson](functions/canonicalJson.md) - [computeDelegationId](functions/computeDelegationId.md) - [computeOutcomeId](functions/computeOutcomeId.md) - [computeProposalId](functions/computeProposalId.md) - [computeSnapshotHash](functions/computeSnapshotHash.md) - [computeTallyHash](functions/computeTallyHash.md) - [computeTallyProofHash](functions/computeTallyProofHash.md) - [computeVoteId](functions/computeVoteId.md) - [createDelegatedVote](functions/createDelegatedVote.md) - [createDelegation](functions/createDelegation.md) - [createGovernanceConfig](functions/createGovernanceConfig.md) - [createGovernedMandate](functions/createGovernedMandate.md) - [createOutcome](functions/createOutcome.md) - [createOutcomeProofDraft](functions/createOutcomeProofDraft.md) - [createProposal](functions/createProposal.md) - [createProposalProofDraft](functions/createProposalProofDraft.md) - [createQuadraticVote](functions/createQuadraticVote.md) - [createVote](functions/createVote.md) - [createVoteProofDraft](functions/createVoteProofDraft.md) - [executeProposal](functions/executeProposal.md) - [finalizeProposal](functions/finalizeProposal.md) - [finalizeProposalExecution](functions/finalizeProposalExecution.md) - [freezeMembershipSnapshot](functions/freezeMembershipSnapshot.md) - [getActiveDelegations](functions/getActiveDelegations.md) - [getMemberWeight](functions/getMemberWeight.md) - [getTotalWeight](functions/getTotalWeight.md) - [getWeightToDelegate](functions/getWeightToDelegate.md) - [hashCanonical](functions/hashCanonical.md) - [isExecutionReady](functions/isExecutionReady.md) - [isGovernanceError](functions/isGovernanceError.md) - [recallDelegation](functions/recallDelegation.md) - [resolveDelegation](functions/resolveDelegation.md) - [resolveVotingPower](functions/resolveVotingPower.md) - [tallyVotes](functions/tallyVotes.md) - [toHex](functions/toHex.md) - [validateGovernanceConfig](functions/validateGovernanceConfig.md) - [verifyMembershipSnapshot](functions/verifyMembershipSnapshot.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-identity/index **@totemsdk/identity** *** **Maturity: v1** # @totemsdk/identity ## Interfaces - [DelegationClaim](interfaces/DelegationClaim.md) - [IdentityClaim](interfaces/IdentityClaim.md) - [IdentityGraph](interfaces/IdentityGraph.md) - [IdentityProofVerifier](interfaces/IdentityProofVerifier.md) - [IdentityResolutionResult](interfaces/IdentityResolutionResult.md) - [IdentityVerifyResult](interfaces/IdentityVerifyResult.md) - [ManifestIdentityBinding](interfaces/ManifestIdentityBinding.md) - [PaymentRecipientClaim](interfaces/PaymentRecipientClaim.md) - [ResolvedIdentity](interfaces/ResolvedIdentity.md) - [RevocationClaim](interfaces/RevocationClaim.md) - [RotationClaim](interfaces/RotationClaim.md) - [ServiceEndpointClaim](interfaces/ServiceEndpointClaim.md) - [SignedIdentityClaim](interfaces/SignedIdentityClaim.md) - [TotemIdentityDocument](interfaces/TotemIdentityDocument.md) ## Type Aliases - [IdentityClaimType](type-aliases/IdentityClaimType.md) - [IdentityKind](type-aliases/IdentityKind.md) - [IdentityStatus](type-aliases/IdentityStatus.md) ## Variables - [IDENTITY\_VERSION](variables/IDENTITY_VERSION.md) ## Functions - [bindManifestToIdentity](functions/bindManifestToIdentity.md) - [computeIdentityId](functions/computeIdentityId.md) - [createDelegationClaim](functions/createDelegationClaim.md) - [createIdentityClaim](functions/createIdentityClaim.md) - [createIdentityDocument](functions/createIdentityDocument.md) - [createPaymentRecipientClaim](functions/createPaymentRecipientClaim.md) - [createServiceEndpointClaim](functions/createServiceEndpointClaim.md) - [isIdentityClaim](functions/isIdentityClaim.md) - [isRevocationClaim](functions/isRevocationClaim.md) - [isRotationClaim](functions/isRotationClaim.md) - [isSignedIdentityClaim](functions/isSignedIdentityClaim.md) - [isTotemIdentityDocument](functions/isTotemIdentityDocument.md) - [resolveIdentityGraph](functions/resolveIdentityGraph.md) - [revokeIdentity](functions/revokeIdentity.md) - [rotateIdentity](functions/rotateIdentity.md) - [signIdentityClaim](functions/signIdentityClaim.md) - [verifyIdentityClaim](functions/verifyIdentityClaim.md) - [verifyManifestIdentity](functions/verifyManifestIdentity.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-kissvm/index **@totemsdk/kissvm** *** **Maturity: v1** # @totemsdk/kissvm ## Classes - [KissvmLimitError](classes/KissvmLimitError.md) - [KissvmRuntimeError](classes/KissvmRuntimeError.md) - [MiniNumber](classes/MiniNumber.md) ## Interfaces - [ActionAuthorizationConfig](interfaces/ActionAuthorizationConfig.md) - [ActionStateMachineConfig](interfaces/ActionStateMachineConfig.md) - [AgentProposalConfig](interfaces/AgentProposalConfig.md) - [AuthorityRevocationConfig](interfaces/AuthorityRevocationConfig.md) - [CapabilityConfig](interfaces/CapabilityConfig.md) - [CoinData](interfaces/CoinData.md) - [CoinUpdateConfig](interfaces/CoinUpdateConfig.md) - [CommitConfig](interfaces/CommitConfig.md) - [CompiledMast](interfaces/CompiledMast.md) - [CompiledPolicyNode](interfaces/CompiledPolicyNode.md) - [CompiledRecursivePolicy](interfaces/CompiledRecursivePolicy.md) - [DelegationProofConfig](interfaces/DelegationProofConfig.md) - [EltooConfig](interfaces/EltooConfig.md) - [EscrowEnforcementConfig](interfaces/EscrowEnforcementConfig.md) - [EvalResult](interfaces/EvalResult.md) - [ExecutionMandateConfig](interfaces/ExecutionMandateConfig.md) - [FactoryConfig](interfaces/FactoryConfig.md) - [IdentityVerificationConfig](interfaces/IdentityVerificationConfig.md) - [LayeredPolicyConfig](interfaces/LayeredPolicyConfig.md) - [LeaseCertificateConfig](interfaces/LeaseCertificateConfig.md) - [LeaseMessageConfig](interfaces/LeaseMessageConfig.md) - [LiquidityLockConfig](interfaces/LiquidityLockConfig.md) - [MandateEnforcementConfig](interfaces/MandateEnforcementConfig.md) - [ManifestBindingConfig](interfaces/ManifestBindingConfig.md) - [ManifestExpiryConfig](interfaces/ManifestExpiryConfig.md) - [MinimaScriptProof](interfaces/MinimaScriptProof.md) - [OutputData](interfaces/OutputData.md) - [PaymentIntentConfig](interfaces/PaymentIntentConfig.md) - [PolicyAnchorConfig](interfaces/PolicyAnchorConfig.md) - [PolicyDelegationEdge](interfaces/PolicyDelegationEdge.md) - [PolicyEnforcementConfig](interfaces/PolicyEnforcementConfig.md) - [PolicyGraph](interfaces/PolicyGraph.md) - [PolicyGraphNode](interfaces/PolicyGraphNode.md) - [PolicyLayer](interfaces/PolicyLayer.md) - [PolicyNode](interfaces/PolicyNode.md) - [PolicyNodeInput](interfaces/PolicyNodeInput.md) - [PolicyTree](interfaces/PolicyTree.md) - [PrevStateWorkflow](interfaces/PrevStateWorkflow.md) - [ProofChain](interfaces/ProofChain.md) - [ProofConfig](interfaces/ProofConfig.md) - [ProofLink](interfaces/ProofLink.md) - [ProposalConfig](interfaces/ProposalConfig.md) - [ProviderBondConfig](interfaces/ProviderBondConfig.md) - [RevealConfig](interfaces/RevealConfig.md) - [RevocationConfig](interfaces/RevocationConfig.md) - [RotationConfig](interfaces/RotationConfig.md) - [ScriptProof](interfaces/ScriptProof.md) - [ScriptWitness](interfaces/ScriptWitness.md) - [StateChainConfig](interfaces/StateChainConfig.md) - [StateTransition](interfaces/StateTransition.md) - [TemporalConfig](interfaces/TemporalConfig.md) - [TreasuryExecutionConfig](interfaces/TreasuryExecutionConfig.md) - [TrustMessageConfig](interfaces/TrustMessageConfig.md) - [TxContext](interfaces/TxContext.md) - [TxPoWValidationConfig](interfaces/TxPoWValidationConfig.md) - [UsageTrackingConfig](interfaces/UsageTrackingConfig.md) - [VerificationResult](interfaces/VerificationResult.md) - [VoteSubmissionConfig](interfaces/VoteSubmissionConfig.md) - [VoteTallyConfig](interfaces/VoteTallyConfig.md) - [WitnessInput](interfaces/WitnessInput.md) ## Type Aliases - [ASTNode](type-aliases/ASTNode.md) - [ReleaseCurve](type-aliases/ReleaseCurve.md) - [Value](type-aliases/Value.md) ## Variables - [BOND\_STATUS](variables/BOND_STATUS.md) - [IA\_STATUS](variables/IA_STATUS.md) - [MAX\_DECIMAL](variables/MAX_DECIMAL.md) - [POSITION\_STATUS](variables/POSITION_STATUS.md) - [STANDARD\_LAYERS](variables/STANDARD_LAYERS.md) ## Functions - [buildActionAuthorizationScript](functions/buildActionAuthorizationScript.md) - [buildActionStateMachineScript](functions/buildActionStateMachineScript.md) - [buildAgentProposalScript](functions/buildAgentProposalScript.md) - [buildAuthorityRevocationScript](functions/buildAuthorityRevocationScript.md) - [buildBondLockupScript](functions/buildBondLockupScript.md) - [buildBondReleaseScript](functions/buildBondReleaseScript.md) - [buildBondStateMachineScript](functions/buildBondStateMachineScript.md) - [buildCapabilityProofScript](functions/buildCapabilityProofScript.md) - [buildCapabilityScript](functions/buildCapabilityScript.md) - [buildChallengeScript](functions/buildChallengeScript.md) - [buildCliffRelease](functions/buildCliffRelease.md) - [buildCoinUpdateScript](functions/buildCoinUpdateScript.md) - [buildCommitScript](functions/buildCommitScript.md) - [buildDeadlineScript](functions/buildDeadlineScript.md) - [buildDecayScript](functions/buildDecayScript.md) - [buildDelegationProofScript](functions/buildDelegationProofScript.md) - [buildEltooChannelScript](functions/buildEltooChannelScript.md) - [buildEltooFundingScript](functions/buildEltooFundingScript.md) - [buildEltooSettlementScript](functions/buildEltooSettlementScript.md) - [buildEpochAdvancementScript](functions/buildEpochAdvancementScript.md) - [buildEscrowEnforcementScript](functions/buildEscrowEnforcementScript.md) - [buildExecutionMandateScript](functions/buildExecutionMandateScript.md) - [buildFactoryFundingScript](functions/buildFactoryFundingScript.md) - [buildFeeAccrualScript](functions/buildFeeAccrualScript.md) - [buildHeartbeatScript](functions/buildHeartbeatScript.md) - [buildIdentityVerificationScript](functions/buildIdentityVerificationScript.md) - [buildLayeredMastScript](functions/buildLayeredMastScript.md) - [buildLayeredPolicy](functions/buildLayeredPolicy.md) - [buildLayerSubset](functions/buildLayerSubset.md) - [buildLeaseCertificateScript](functions/buildLeaseCertificateScript.md) - [buildLeaseMessageScript](functions/buildLeaseMessageScript.md) - [buildLeaseStateMachineScript](functions/buildLeaseStateMachineScript.md) - [buildLinearRelease](functions/buildLinearRelease.md) - [buildLiquidityLockScript](functions/buildLiquidityLockScript.md) - [buildMagicConstantsScript](functions/buildMagicConstantsScript.md) - [buildMandateEnforcementScript](functions/buildMandateEnforcementScript.md) - [buildManifestBindingScript](functions/buildManifestBindingScript.md) - [buildManifestExpiryScript](functions/buildManifestExpiryScript.md) - [buildPaymentIntentScript](functions/buildPaymentIntentScript.md) - [buildPolicyAnchorScript](functions/buildPolicyAnchorScript.md) - [buildPolicyAnchorState](functions/buildPolicyAnchorState.md) - [buildPolicyEnforcementScript](functions/buildPolicyEnforcementScript.md) - [buildPolicyTree](functions/buildPolicyTree.md) - [buildPositionStateMachineScript](functions/buildPositionStateMachineScript.md) - [buildPrevStateWorkflow](functions/buildPrevStateWorkflow.md) - [buildProofAnchorScript](functions/buildProofAnchorScript.md) - [buildProofChain](functions/buildProofChain.md) - [buildProofDelegationScript](functions/buildProofDelegationScript.md) - [buildProposalStateMachineScript](functions/buildProposalStateMachineScript.md) - [buildRateLimitScript](functions/buildRateLimitScript.md) - [buildRevealScript](functions/buildRevealScript.md) - [buildRevocationProofScript](functions/buildRevocationProofScript.md) - [buildRevocationScript](functions/buildRevocationScript.md) - [buildRootRotationScript](functions/buildRootRotationScript.md) - [buildRotationScript](functions/buildRotationScript.md) - [buildStatechainOwnerRotationScript](functions/buildStatechainOwnerRotationScript.md) - [buildStatechainScript](functions/buildStatechainScript.md) - [buildStateTransition](functions/buildStateTransition.md) - [buildTemporalScript](functions/buildTemporalScript.md) - [buildTreasuryExecutionScript](functions/buildTreasuryExecutionScript.md) - [buildTrustMessageScript](functions/buildTrustMessageScript.md) - [buildTxPoWValidationScript](functions/buildTxPoWValidationScript.md) - [buildUsageTrackingScript](functions/buildUsageTrackingScript.md) - [buildVoteSubmissionScript](functions/buildVoteSubmissionScript.md) - [buildVoteTallyScript](functions/buildVoteTallyScript.md) - [buildWatermarkTrackingScript](functions/buildWatermarkTrackingScript.md) - [buildWindowScript](functions/buildWindowScript.md) - [buildWithdrawalScript](functions/buildWithdrawalScript.md) - [buildWitness](functions/buildWitness.md) - [compileMastTree](functions/compileMastTree.md) - [compilePolicyGraph](functions/compilePolicyGraph.md) - [computeCanonicalScriptAddress](functions/computeCanonicalScriptAddress.md) - [computeCanonicalScriptHash](functions/computeCanonicalScriptHash.md) - [computeRelease](functions/computeRelease.md) - [computeScriptHash](functions/computeScriptHash.md) - [counterWorkflow](functions/counterWorkflow.md) - [evaluateScript](functions/evaluateScript.md) - [evaluateScriptWasm](functions/evaluateScriptWasm.md) - [findPolicyNode](functions/findPolicyNode.md) - [getPolicyLeaves](functions/getPolicyLeaves.md) - [getPolicyPath](functions/getPolicyPath.md) - [parseScript](functions/parseScript.md) - [parseScriptWasm](functions/parseScriptWasm.md) - [roundBasedWorkflow](functions/roundBasedWorkflow.md) - [sigdig](functions/sigdig.md) - [simulateSpend](functions/simulateSpend.md) - [timelockWorkflow](functions/timelockWorkflow.md) - [toMinimaProofExpression](functions/toMinimaProofExpression.md) - [toNestedMastScript](functions/toNestedMastScript.md) - [~~toProofExpression~~](functions/toProofExpression.md) - [~~toTotemProofExpression~~](functions/toTotemProofExpression.md) - [verifyProofChain](functions/verifyProofChain.md) - [verifyScriptMembership](functions/verifyScriptMembership.md) - [vestingWorkflow](functions/vestingWorkflow.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/index **@totemsdk/liquidity-bond** *** **Maturity: rc** # @totemsdk/liquidity-bond ## Classes - [LiquidityAllocationError](classes/LiquidityAllocationError.md) - [LiquidityBondError](classes/LiquidityBondError.md) - [LiquidityCommitmentError](classes/LiquidityCommitmentError.md) - [LiquidityFeeError](classes/LiquidityFeeError.md) - [LiquidityIdentityError](classes/LiquidityIdentityError.md) - [LiquidityPolicyError](classes/LiquidityPolicyError.md) - [LiquidityPoolManifestError](classes/LiquidityPoolManifestError.md) - [LiquidityPositionError](classes/LiquidityPositionError.md) - [LiquidityReceiptError](classes/LiquidityReceiptError.md) - [LiquidityRegistryError](classes/LiquidityRegistryError.md) - [LiquidityRiskError](classes/LiquidityRiskError.md) - [LiquiditySerializationError](classes/LiquiditySerializationError.md) - [LiquidityWithdrawalError](classes/LiquidityWithdrawalError.md) - [MemoryLiquidityBondStore](classes/MemoryLiquidityBondStore.md) ## Interfaces - [ComputePoolUtilisationParams](interfaces/ComputePoolUtilisationParams.md) - [ComputePositionRiskScoreParams](interfaces/ComputePositionRiskScoreParams.md) - [CreateLiquidityAllocationParams](interfaces/CreateLiquidityAllocationParams.md) - [CreateLiquidityCommitmentParams](interfaces/CreateLiquidityCommitmentParams.md) - [CreateLiquidityPoolManifestParams](interfaces/CreateLiquidityPoolManifestParams.md) - [CreateLiquidityPositionParams](interfaces/CreateLiquidityPositionParams.md) - [CreateWithdrawalIntentParams](interfaces/CreateWithdrawalIntentParams.md) - [DurableLiquidityBondStore](interfaces/DurableLiquidityBondStore.md) - [DurableLiquidityBondStoreOptions](interfaces/DurableLiquidityBondStoreOptions.md) - [FeePayoutRef](interfaces/FeePayoutRef.md) - [FeeProofVerifier](interfaces/FeeProofVerifier.md) - [IdentityChallengeProof](interfaces/IdentityChallengeProof.md) - [IssueLiquidityReceiptParams](interfaces/IssueLiquidityReceiptParams.md) - [LiquidityAllocation](interfaces/LiquidityAllocation.md) - [LiquidityBondPolicy](interfaces/LiquidityBondPolicy.md) - [LiquidityBondRegistryState](interfaces/LiquidityBondRegistryState.md) - [LiquidityBondVerifyResult](interfaces/LiquidityBondVerifyResult.md) - [LiquidityChainFundingVerifier](interfaces/LiquidityChainFundingVerifier.md) - [LiquidityCommitment](interfaces/LiquidityCommitment.md) - [LiquidityFeePolicy](interfaces/LiquidityFeePolicy.md) - [LiquidityFeeRecord](interfaces/LiquidityFeeRecord.md) - [LiquidityFunding](interfaces/LiquidityFunding.md) - [LiquidityLockTerms](interfaces/LiquidityLockTerms.md) - [LiquidityPoolManifest](interfaces/LiquidityPoolManifest.md) - [LiquidityPosition](interfaces/LiquidityPosition.md) - [LiquidityProofRef](interfaces/LiquidityProofRef.md) - [LiquidityProviderBondVerifier](interfaces/LiquidityProviderBondVerifier.md) - [LiquidityReceipt](interfaces/LiquidityReceipt.md) - [LiquidityRiskPolicy](interfaces/LiquidityRiskPolicy.md) - [OperatorAutobond](interfaces/OperatorAutobond.md) - [ProviderBondRef](interfaces/ProviderBondRef.md) - [RecordLiquidityFeeParams](interfaces/RecordLiquidityFeeParams.md) - [RegistryOperation](interfaces/RegistryOperation.md) - [RegistryRootOptions](interfaces/RegistryRootOptions.md) - [RegistryRootPort](interfaces/RegistryRootPort.md) - [RegistryRootVerifier](interfaces/RegistryRootVerifier.md) - [RegistrySignedTransition](interfaces/RegistrySignedTransition.md) - [RegistryTransitionDelta](interfaces/RegistryTransitionDelta.md) - [RegistryTransitionSigner](interfaces/RegistryTransitionSigner.md) - [ValidateLiquidityAgainstPolicyParams](interfaces/ValidateLiquidityAgainstPolicyParams.md) - [VerifyLiquidityAllocationParams](interfaces/VerifyLiquidityAllocationParams.md) - [VerifyLiquidityCommitmentParams](interfaces/VerifyLiquidityCommitmentParams.md) - [VerifyLiquidityFeeRecordParams](interfaces/VerifyLiquidityFeeRecordParams.md) - [VerifyLiquidityPoolManifestParams](interfaces/VerifyLiquidityPoolManifestParams.md) - [VerifyLiquidityPositionParams](interfaces/VerifyLiquidityPositionParams.md) - [VerifyLiquidityReceiptParams](interfaces/VerifyLiquidityReceiptParams.md) - [VerifyLpIdentityParams](interfaces/VerifyLpIdentityParams.md) - [VerifyPoolOperatorIdentityParams](interfaces/VerifyPoolOperatorIdentityParams.md) - [VerifyReceiptOwnerIdentityParams](interfaces/VerifyReceiptOwnerIdentityParams.md) - [VerifyWithdrawalAllowedParams](interfaces/VerifyWithdrawalAllowedParams.md) - [WithdrawalIntent](interfaces/WithdrawalIntent.md) ## Type Aliases - [AllocationStatus](type-aliases/AllocationStatus.md) - [AllocationType](type-aliases/AllocationType.md) - [CommitmentStatus](type-aliases/CommitmentStatus.md) - [EarnableFeeSource](type-aliases/EarnableFeeSource.md) - [FeeModel](type-aliases/FeeModel.md) - [FeeSource](type-aliases/FeeSource.md) - [LiquidityAsset](type-aliases/LiquidityAsset.md) - [LiquidityBondVerifyCode](type-aliases/LiquidityBondVerifyCode.md) - [LiquidityPoolType](type-aliases/LiquidityPoolType.md) - [LiquidityPositionStatus](type-aliases/LiquidityPositionStatus.md) - [LiquidityPurpose](type-aliases/LiquidityPurpose.md) - [LockType](type-aliases/LockType.md) - [PoolWriterRegistry](type-aliases/PoolWriterRegistry.md) - [ProofRefType](type-aliases/ProofRefType.md) - [WithdrawalStatus](type-aliases/WithdrawalStatus.md) ## Variables - [DEFAULT\_LIQUIDITY\_BOND\_TOPIC\_PREFIX](variables/DEFAULT_LIQUIDITY_BOND_TOPIC_PREFIX.md) - [DEFAULT\_LIQUIDITY\_RISK\_POLICY](variables/DEFAULT_LIQUIDITY_RISK_POLICY.md) - [DEFAULT\_MINIMA\_TOKEN\_ID](variables/DEFAULT_MINIMA_TOKEN_ID.md) - [DEFAULT\_REGISTRY\_ROOT\_DOMAIN](variables/DEFAULT_REGISTRY_ROOT_DOMAIN.md) - [IDENTITY\_CHALLENGE\_DOMAIN](variables/IDENTITY_CHALLENGE_DOMAIN.md) - [OPERATOR\_AUTOBOND\_DOMAIN](variables/OPERATOR_AUTOBOND_DOMAIN.md) - [RECEIPT\_HASH\_DOMAIN](variables/RECEIPT_HASH_DOMAIN.md) - [registryRootPort](variables/registryRootPort.md) - [WITHDRAWAL\_ID\_DOMAIN](variables/WITHDRAWAL_ID_DOMAIN.md) ## Functions - [acceptLiquidityCommitment](functions/acceptLiquidityCommitment.md) - [activateLiquidityPosition](functions/activateLiquidityPosition.md) - [applyLiquidityHaircut](functions/applyLiquidityHaircut.md) - [applyRegistryTransition](functions/applyRegistryTransition.md) - [approveWithdrawalIntent](functions/approveWithdrawalIntent.md) - [assertLiquidityPoolManifestNotExpired](functions/assertLiquidityPoolManifestNotExpired.md) - [assetToTokenId](functions/assetToTokenId.md) - [attachLiquidityAllocation](functions/attachLiquidityAllocation.md) - [attachLiquidityFeeRecord](functions/attachLiquidityFeeRecord.md) - [attachLiquidityReceipt](functions/attachLiquidityReceipt.md) - [attachWithdrawalIntent](functions/attachWithdrawalIntent.md) - [buildOperatorAutobond](functions/buildOperatorAutobond.md) - [cancelLiquidityCommitment](functions/cancelLiquidityCommitment.md) - [cancelWithdrawalIntent](functions/cancelWithdrawalIntent.md) - [computeAvailableLiquidity](functions/computeAvailableLiquidity.md) - [computeEffectiveLiquidityAmount](functions/computeEffectiveLiquidityAmount.md) - [computeIdentityChallenge](functions/computeIdentityChallenge.md) - [computeLiquidityPoolManifestHash](functions/computeLiquidityPoolManifestHash.md) - [computeLiquidityReceiptHash](functions/computeLiquidityReceiptHash.md) - [computeOperatorAutobondPayloadHash](functions/computeOperatorAutobondPayloadHash.md) - [computePoolUtilisation](functions/computePoolUtilisation.md) - [computePositionRiskScore](functions/computePositionRiskScore.md) - [computeRegistryRoot](functions/computeRegistryRoot.md) - [computeWithdrawalId](functions/computeWithdrawalId.md) - [confirmLiquidityCommitment](functions/confirmLiquidityCommitment.md) - [consumeLiquidityReceipt](functions/consumeLiquidityReceipt.md) - [createDurableLiquidityBondStore](functions/createDurableLiquidityBondStore.md) - [createEmptyLiquidityBondRegistryState](functions/createEmptyLiquidityBondRegistryState.md) - [createLiquidityAllocation](functions/createLiquidityAllocation.md) - [createLiquidityCommitment](functions/createLiquidityCommitment.md) - [createLiquidityPoolManifest](functions/createLiquidityPoolManifest.md) - [createLiquidityPosition](functions/createLiquidityPosition.md) - [createWithdrawalIntent](functions/createWithdrawalIntent.md) - [detectDoubleCountedLiquidity](functions/detectDoubleCountedLiquidity.md) - [explainLiquidityPolicyFailure](functions/explainLiquidityPolicyFailure.md) - [filterLiquidityPositionsByPolicy](functions/filterLiquidityPositionsByPolicy.md) - [getLiquidityPool](functions/getLiquidityPool.md) - [getLiquidityPosition](functions/getLiquidityPosition.md) - [getLiquidityReceipt](functions/getLiquidityReceipt.md) - [issueLiquidityReceipt](functions/issueLiquidityReceipt.md) - [listActivePositions](functions/listActivePositions.md) - [listLiquidityPools](functions/listLiquidityPools.md) - [listPositionsByLp](functions/listPositionsByLp.md) - [listPositionsByPool](functions/listPositionsByPool.md) - [listWithdrawablePositions](functions/listWithdrawablePositions.md) - [markAllocationDepleted](functions/markAllocationDepleted.md) - [markLiquidityPositionDepleted](functions/markLiquidityPositionDepleted.md) - [markLiquidityPositionInvalid](functions/markLiquidityPositionInvalid.md) - [markLiquidityPositionQuiescing](functions/markLiquidityPositionQuiescing.md) - [parseLiquidityBondRecord](functions/parseLiquidityBondRecord.md) - [parseLiquidityBondState](functions/parseLiquidityBondState.md) - [rankLiquidityPositionsByRisk](functions/rankLiquidityPositionsByRisk.md) - [recordLiquidityFee](functions/recordLiquidityFee.md) - [registerLiquidityCommitment](functions/registerLiquidityCommitment.md) - [registerLiquidityPool](functions/registerLiquidityPool.md) - [registerLiquidityPosition](functions/registerLiquidityPosition.md) - [registerPoolWriter](functions/registerPoolWriter.md) - [registryRootPayload](functions/registryRootPayload.md) - [rejectLiquidityCommitment](functions/rejectLiquidityCommitment.md) - [rejectWithdrawalIntent](functions/rejectWithdrawalIntent.md) - [releaseLiquidityAllocation](functions/releaseLiquidityAllocation.md) - [serializeLiquidityBondRecord](functions/serializeLiquidityBondRecord.md) - [serializeLiquidityBondState](functions/serializeLiquidityBondState.md) - [serializeRegistryState](functions/serializeRegistryState.md) - [signRegistryTransition](functions/signRegistryTransition.md) - [sumActiveAllocations](functions/sumActiveAllocations.md) - [sumFeesForPosition](functions/sumFeesForPosition.md) - [sumLpFeesForPosition](functions/sumLpFeesForPosition.md) - [updateLiquidityPool](functions/updateLiquidityPool.md) - [validateLiquidityAgainstPolicy](functions/validateLiquidityAgainstPolicy.md) - [verifyIdentityChallengeProof](functions/verifyIdentityChallengeProof.md) - [verifyLiquidityAllocation](functions/verifyLiquidityAllocation.md) - [verifyLiquidityCommitment](functions/verifyLiquidityCommitment.md) - [verifyLiquidityFeeRecord](functions/verifyLiquidityFeeRecord.md) - [verifyLiquidityPoolManifest](functions/verifyLiquidityPoolManifest.md) - [verifyLiquidityPosition](functions/verifyLiquidityPosition.md) - [verifyLiquidityReceipt](functions/verifyLiquidityReceipt.md) - [verifyLpIdentity](functions/verifyLpIdentity.md) - [verifyOperatorAutobond](functions/verifyOperatorAutobond.md) - [verifyPoolOperatorIdentity](functions/verifyPoolOperatorIdentity.md) - [verifyReceiptOwnerIdentity](functions/verifyReceiptOwnerIdentity.md) - [verifyRegistryRoot](functions/verifyRegistryRoot.md) - [verifyRegistryTransition](functions/verifyRegistryTransition.md) - [verifyWithdrawalAllowed](functions/verifyWithdrawalAllowed.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-lookup-client/index **@totemsdk/lookup-client** *** **Maturity: rc** # @totemsdk/lookup-client ## Classes - [FrameParser](classes/FrameParser.md) - [LookupClient](classes/LookupClient.md) - [LookupClientError](classes/LookupClientError.md) - [LookupClientProvider](classes/LookupClientProvider.md) ## Interfaces - [CoinUpdateEvent](interfaces/CoinUpdateEvent.md) - [ITransport](interfaces/ITransport.md) - [LookupClientConfig](interfaces/LookupClientConfig.md) ## Type Aliases - [CoinUpdateCallback](type-aliases/CoinUpdateCallback.md) - [Unsubscribe](type-aliases/Unsubscribe.md) ## Functions - [connectLookupNode](functions/connectLookupNode.md) - [createInMemoryPair](functions/createInMemoryPair.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-lookup-node/index **@totemsdk/lookup-node** *** **Maturity: rc** # @totemsdk/lookup-node ## Classes - [AgentRegistry](classes/AgentRegistry.md) - [AppRegistry](classes/AppRegistry.md) - [HyperswarmManager](classes/HyperswarmManager.md) - [HyperswarmTransport](classes/HyperswarmTransport.md) - [LeaseCoordinator](classes/LeaseCoordinator.md) - [LookupNode](classes/LookupNode.md) - [SqliteStorageAdapter](classes/SqliteStorageAdapter.md) - [SqliteStore](classes/SqliteStore.md) - [TrustIndex](classes/TrustIndex.md) - [TxPoWRelay](classes/TxPoWRelay.md) - [WatchlistManager](classes/WatchlistManager.md) ## Interfaces - [AgentRegistryConfig](interfaces/AgentRegistryConfig.md) - [AgentRow](interfaces/AgentRow.md) - [AppRegistryConfig](interfaces/AppRegistryConfig.md) - [AppRow](interfaces/AppRow.md) - [HyperswarmManagerConfig](interfaces/HyperswarmManagerConfig.md) - [ITransport](interfaces/ITransport.md) - [LeaseConfig](interfaces/LeaseConfig.md) - [LookupNodeConfig](interfaces/LookupNodeConfig.md) - [MegaMMRConfig](interfaces/MegaMMRConfig.md) - [NodeDispatcher](interfaces/NodeDispatcher.md) - [RelayConfig](interfaces/RelayConfig.md) - [SqliteConfig](interfaces/SqliteConfig.md) - [TrustIndexConfig](interfaces/TrustIndexConfig.md) - [TrustRow](interfaces/TrustRow.md) ## Functions - [createLookupNode](functions/createLookupNode.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/index **@totemsdk/lookup-protocol** *** **Maturity: rc** # @totemsdk/lookup-protocol ## Classes - [FramingError](classes/FramingError.md) ## Interfaces - [AgentAnnounceMessage](interfaces/AgentAnnounceMessage.md) - [AgentQueryMessage](interfaces/AgentQueryMessage.md) - [AgentResultMessage](interfaces/AgentResultMessage.md) - [AppAnnounceMessage](interfaces/AppAnnounceMessage.md) - [AppQueryMessage](interfaces/AppQueryMessage.md) - [AppResultMessage](interfaces/AppResultMessage.md) - [AuthChallengeMessage](interfaces/AuthChallengeMessage.md) - [AuthResponseMessage](interfaces/AuthResponseMessage.md) - [BroadcastTxPoWMessage](interfaces/BroadcastTxPoWMessage.md) - [CoinUpdateMessage](interfaces/CoinUpdateMessage.md) - [ErrorMessage](interfaces/ErrorMessage.md) - [GetCoinMessage](interfaces/GetCoinMessage.md) - [GetCoinsMessage](interfaces/GetCoinsMessage.md) - [GetProofMessage](interfaces/GetProofMessage.md) - [GetTipMessage](interfaces/GetTipMessage.md) - [GetTokenMessage](interfaces/GetTokenMessage.md) - [HelloMessage](interfaces/HelloMessage.md) - [LeaseBurnMessage](interfaces/LeaseBurnMessage.md) - [LeaseCommitMessage](interfaces/LeaseCommitMessage.md) - [LeaseReserveMessage](interfaces/LeaseReserveMessage.md) - [LeaseWatermarkMessage](interfaces/LeaseWatermarkMessage.md) - [PingMessage](interfaces/PingMessage.md) - [PolicyAnnounceMessage](interfaces/PolicyAnnounceMessage.md) - [PolicyQueryMessage](interfaces/PolicyQueryMessage.md) - [PolicyResultMessage](interfaces/PolicyResultMessage.md) - [PolicySignCancelMessage](interfaces/PolicySignCancelMessage.md) - [PolicySignRequestMessage](interfaces/PolicySignRequestMessage.md) - [PolicySignResponseMessage](interfaces/PolicySignResponseMessage.md) - [PolicyUpdateMessage](interfaces/PolicyUpdateMessage.md) - [PolicyWatchMessage](interfaces/PolicyWatchMessage.md) - [PongMessage](interfaces/PongMessage.md) - [ProofResponseMessage](interfaces/ProofResponseMessage.md) - [SignFn](interfaces/SignFn.md) - [TrustQueryMessage](interfaces/TrustQueryMessage.md) - [TrustRecordMessage](interfaces/TrustRecordMessage.md) - [VerifyFn](interfaces/VerifyFn.md) - [VersionCheckResult](interfaces/VersionCheckResult.md) - [VersionMismatchMessage](interfaces/VersionMismatchMessage.md) - [WatchRegisterMessage](interfaces/WatchRegisterMessage.md) - [WatchRemoveMessage](interfaces/WatchRemoveMessage.md) ## Type Aliases - [LookupMessage](type-aliases/LookupMessage.md) - [MessageType](type-aliases/MessageType.md) ## Variables - [MAX\_FRAME\_BODY\_LENGTH](variables/MAX_FRAME_BODY_LENGTH.md) - [PROTOCOL\_VERSION](variables/PROTOCOL_VERSION.md) ## Functions - [checkVersion](functions/checkVersion.md) - [decodeMessage](functions/decodeMessage.md) - [encodeMessage](functions/encodeMessage.md) - [messageDigest](functions/messageDigest.md) - [peekFrameLength](functions/peekFrameLength.md) - [signMessage](functions/signMessage.md) - [verifyMessageAuth](functions/verifyMessageAuth.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-manifest/index **@totemsdk/manifest** *** **Maturity: v1** # @totemsdk/manifest ## Interfaces - [AppManifest](interfaces/AppManifest.md) - [CapabilityManifest](interfaces/CapabilityManifest.md) - [DAppAbiEntry](interfaces/DAppAbiEntry.md) - [DAppManifest](interfaces/DAppManifest.md) - [EdgeServiceManifest](interfaces/EdgeServiceManifest.md) - [SignedManifest](interfaces/SignedManifest.md) - [VerifyResult](interfaces/VerifyResult.md) ## Type Aliases - [AppPermission](type-aliases/AppPermission.md) - [EdgeServiceType](type-aliases/EdgeServiceType.md) - [Manifest](type-aliases/Manifest.md) ## Variables - [MANIFEST\_VERSION](variables/MANIFEST_VERSION.md) ## Functions - [computeManifestId](functions/computeManifestId.md) - [decodeManifest](functions/decodeManifest.md) - [encodeManifest](functions/encodeManifest.md) - [isAppManifest](functions/isAppManifest.md) - [isCapabilityManifest](functions/isCapabilityManifest.md) - [isDAppManifest](functions/isDAppManifest.md) - [isEdgeServiceManifest](functions/isEdgeServiceManifest.md) - [signManifest](functions/signManifest.md) - [verifyManifest](functions/verifyManifest.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-omnia/index **@totemsdk/omnia** *** **Maturity: v1** # @totemsdk/omnia ## Classes - [BalanceConservationError](classes/BalanceConservationError.md) - [ChannelCapacityError](classes/ChannelCapacityError.md) - [ChannelStatusError](classes/ChannelStatusError.md) - [DoubleSignError](classes/DoubleSignError.md) - [FramingError](classes/FramingError.md) - [HostedRelaySwarmImpl](classes/HostedRelaySwarmImpl.md) - [OmniaFrameParser](classes/OmniaFrameParser.md) - [OmniaPeerImpl](classes/OmniaPeerImpl.md) - [OmniaStream](classes/OmniaStream.md) - [OmniaSwarmImpl](classes/OmniaSwarmImpl.md) - [SequenceError](classes/SequenceError.md) - [SigningIndexMonotonicityError](classes/SigningIndexMonotonicityError.md) ## Interfaces - [AddHTLCParams](interfaces/AddHTLCParams.md) - [AgentPolicy](interfaces/AgentPolicy.md) - [AgentReceipt](interfaces/AgentReceipt.md) - [ApplyProgramTransitionParams](interfaces/ApplyProgramTransitionParams.md) - [BindPeerOptions](interfaces/BindPeerOptions.md) - [ChannelLogEntry](interfaces/ChannelLogEntry.md) - [ChannelParticipant](interfaces/ChannelParticipant.md) - [ChannelProgram](interfaces/ChannelProgram.md) - [ChannelProgramBuildStateInput](interfaces/ChannelProgramBuildStateInput.md) - [ChannelProgramValidateTransitionInput](interfaces/ChannelProgramValidateTransitionInput.md) - [ChannelProgramValidationResult](interfaces/ChannelProgramValidationResult.md) - [ChannelProposal](interfaces/ChannelProposal.md) - [ChannelReceipt](interfaces/ChannelReceipt.md) - [ChannelRecoveryResult](interfaces/ChannelRecoveryResult.md) - [ChannelSigner](interfaces/ChannelSigner.md) - [ChannelWatermark](interfaces/ChannelWatermark.md) - [ClosePackageArtifact](interfaces/ClosePackageArtifact.md) - [CreateChannelParams](interfaces/CreateChannelParams.md) - [DisputePayload](interfaces/DisputePayload.md) - [HtlcFulfillmentReceipt](interfaces/HtlcFulfillmentReceipt.md) - [HTLCRecord](interfaces/HTLCRecord.md) - [IntentResult](interfaces/IntentResult.md) - [KissvmValidationOptions](interfaces/KissvmValidationOptions.md) - [OmniaChannel](interfaces/OmniaChannel.md) - [OmniaChannelSnapshot](interfaces/OmniaChannelSnapshot.md) - [OmniaIntegrationConfig](interfaces/OmniaIntegrationConfig.md) - [OmniaMessage](interfaces/OmniaMessage.md) - [OmniaPeer](interfaces/OmniaPeer.md) - [OmniaPeerOptions](interfaces/OmniaPeerOptions.md) - [OmniaSwarm](interfaces/OmniaSwarm.md) - [OmniaSwarmConfig](interfaces/OmniaSwarmConfig.md) - [OmniaTxDraft](interfaces/OmniaTxDraft.md) - [OmniaWitnessOptions](interfaces/OmniaWitnessOptions.md) - [OmniaWitnessProofs](interfaces/OmniaWitnessProofs.md) - [PaymentIntent](interfaces/PaymentIntent.md) - [ProgramTransition](interfaces/ProgramTransition.md) - [RegistryRootTransitionInputs](interfaces/RegistryRootTransitionInputs.md) - [SettlementPayload](interfaces/SettlementPayload.md) - [SignedChannelState](interfaces/SignedChannelState.md) - [SignedClosePackage](interfaces/SignedClosePackage.md) - [StateValue](interfaces/StateValue.md) - [TxInputDraft](interfaces/TxInputDraft.md) - [TxOutputDraft](interfaces/TxOutputDraft.md) - [UnilateralCloseFinalizeResult](interfaces/UnilateralCloseFinalizeResult.md) - [UnilateralCloseStartResult](interfaces/UnilateralCloseStartResult.md) - [UpdateDelta](interfaces/UpdateDelta.md) - [UpdateStateResult](interfaces/UpdateStateResult.md) - [VerifyStateOptions](interfaces/VerifyStateOptions.md) ## Type Aliases - [CapacityWarning](type-aliases/CapacityWarning.md) - [ChannelSignature](type-aliases/ChannelSignature.md) - [ChannelStatus](type-aliases/ChannelStatus.md) - [ChannelStore](type-aliases/ChannelStore.md) - [MinimalChainProvider](type-aliases/MinimalChainProvider.md) - [OmniaMessageType](type-aliases/OmniaMessageType.md) - [partyId](type-aliases/partyId.md) - [RelayConfig](type-aliases/RelayConfig.md) - [Unsubscribe](type-aliases/Unsubscribe.md) - [WotsLeaseProviderLike](type-aliases/WotsLeaseProviderLike.md) ## Variables - [ASSET\_HOLDER\_A\_BALANCE\_PORT](variables/ASSET_HOLDER_A_BALANCE_PORT.md) - [ASSET\_HOLDER\_B\_BALANCE\_PORT](variables/ASSET_HOLDER_B_BALANCE_PORT.md) - [ASSET\_PROGRAM\_ID](variables/ASSET_PROGRAM_ID.md) - [ASSET\_TOKEN\_ID\_PORT](variables/ASSET_TOKEN_ID_PORT.md) - [ASSET\_TOTAL\_PORT](variables/ASSET_TOTAL_PORT.md) - [AssetProgram](variables/AssetProgram.md) - [CAPACITY\_NEAR\_EXHAUSTION](variables/CAPACITY_NEAR_EXHAUSTION.md) - [CAPACITY\_WARNING\_APPROACHING](variables/CAPACITY_WARNING_APPROACHING.md) - [CAPACITY\_WARNING\_CRITICAL](variables/CAPACITY_WARNING_CRITICAL.md) - [COINID\_ELTOO](variables/COINID_ELTOO.md) - [COINID\_OUTPUT](variables/COINID_OUTPUT.md) - [computeLegacyTxDraftDigest](variables/computeLegacyTxDraftDigest.md) - [COUNTER\_ACTION\_DECREMENT](variables/COUNTER_ACTION_DECREMENT.md) - [COUNTER\_ACTION\_INCREMENT](variables/COUNTER_ACTION_INCREMENT.md) - [COUNTER\_ACTION\_NONE](variables/COUNTER_ACTION_NONE.md) - [COUNTER\_ACTION\_PORT](variables/COUNTER_ACTION_PORT.md) - [COUNTER\_ACTION\_SET](variables/COUNTER_ACTION_SET.md) - [COUNTER\_OPERAND\_PORT](variables/COUNTER_OPERAND_PORT.md) - [COUNTER\_PROGRAM\_ID](variables/COUNTER_PROGRAM_ID.md) - [COUNTER\_STATE\_PORT](variables/COUNTER_STATE_PORT.md) - [CounterProgram](variables/CounterProgram.md) - [DefaultEltooPaymentProgram](variables/DefaultEltooPaymentProgram.md) - [ELTOO\_CONTEST\_DELAY\_BLOCKS](variables/ELTOO_CONTEST_DELAY_BLOCKS.md) - [ELTOO\_PAYMENT\_PROGRAM\_ID](variables/ELTOO_PAYMENT_PROGRAM_ID.md) - [HTLC\_CLAIMED\_PORT](variables/HTLC_CLAIMED_PORT.md) - [HTLC\_FEE\_PROOF\_DOMAIN](variables/HTLC_FEE_PROOF_DOMAIN.md) - [HTLC\_HASHLOCK\_PORT](variables/HTLC_HASHLOCK_PORT.md) - [HTLC\_LOCKED\_AMOUNT\_PORT](variables/HTLC_LOCKED_AMOUNT_PORT.md) - [HTLC\_PREIMAGE\_PORT](variables/HTLC_PREIMAGE_PORT.md) - [HTLC\_PROGRAM\_ID](variables/HTLC_PROGRAM_ID.md) - [HTLC\_TIMEOUT\_BLOCK\_PORT](variables/HTLC_TIMEOUT_BLOCK_PORT.md) - [HTLCPaymentProgram](variables/HTLCPaymentProgram.md) - [MEMBERSHIP\_DIVIDEND\_POOL\_PORT](variables/MEMBERSHIP_DIVIDEND_POOL_PORT.md) - [MEMBERSHIP\_MEMBER\_ROOT\_PORT](variables/MEMBERSHIP_MEMBER_ROOT_PORT.md) - [MEMBERSHIP\_PAYOUT\_SEQUENCE\_PORT](variables/MEMBERSHIP_PAYOUT_SEQUENCE_PORT.md) - [MEMBERSHIP\_PROGRAM\_ID](variables/MEMBERSHIP_PROGRAM_ID.md) - [MembershipProgram](variables/MembershipProgram.md) - [METER\_PAYMENT\_PORT](variables/METER_PAYMENT_PORT.md) - [METER\_PROGRAM\_ID](variables/METER_PROGRAM_ID.md) - [METER\_READING\_PORT](variables/METER_READING_PORT.md) - [METER\_UNIT\_PRICE\_PORT](variables/METER_UNIT_PRICE_PORT.md) - [METER\_USAGE\_DELTA\_PORT](variables/METER_USAGE_DELTA_PORT.md) - [MeterProgram](variables/MeterProgram.md) - [PROGRAM\_STATE\_PORT\_MIN](variables/PROGRAM_STATE_PORT_MIN.md) - [REGISTRY\_ROOT\_ACTION](variables/REGISTRY_ROOT_ACTION.md) - [STATE\_COMMITMENT\_V2\_PORT](variables/STATE_COMMITMENT_V2_PORT.md) - [STATE\_SEQUENCE\_PORT](variables/STATE_SEQUENCE_PORT.md) - [STATE\_SETTLEMENT\_PORT](variables/STATE_SETTLEMENT_PORT.md) - [TREASURY\_MEMBERSHIP\_SNAPSHOT\_HASH\_PORT](variables/TREASURY_MEMBERSHIP_SNAPSHOT_HASH_PORT.md) - [TREASURY\_OUTCOME\_PROOF\_ID\_PORT](variables/TREASURY_OUTCOME_PROOF_ID_PORT.md) - [TREASURY\_PROGRAM\_ID](variables/TREASURY_PROGRAM_ID.md) - [TREASURY\_SPEND\_CAP\_PORT](variables/TREASURY_SPEND_CAP_PORT.md) - [TREASURY\_SPENT\_PORT](variables/TREASURY_SPENT_PORT.md) - [TREASURY\_VOTE\_TALLY\_HASH\_PORT](variables/TREASURY_VOTE_TALLY_HASH_PORT.md) - [TreasuryProgram](variables/TreasuryProgram.md) - [VAULT\_LOCKED\_VALUE\_PORT](variables/VAULT_LOCKED_VALUE_PORT.md) - [VAULT\_PROGRAM\_ID](variables/VAULT_PROGRAM_ID.md) - [VAULT\_RELEASE\_SEQUENCE\_PORT](variables/VAULT_RELEASE_SEQUENCE_PORT.md) - [VAULT\_SWEPT\_PORT](variables/VAULT_SWEPT_PORT.md) - [VaultProgram](variables/VaultProgram.md) - [WOTS\_CAPACITY\_TOTAL](variables/WOTS_CAPACITY_TOTAL.md) ## Functions - [\_resetChannelWatermarks](functions/resetChannelWatermarks.md) - [acceptChannel](functions/acceptChannel.md) - [activateChannel](functions/activateChannel.md) - [addClosePackageSignature](functions/addClosePackageSignature.md) - [addHTLC](functions/addHTLC.md) - [applyProgramTransition](functions/applyProgramTransition.md) - [assertBroadcastProofs](functions/assertBroadcastProofs.md) - [assertProgramStatePort](functions/assertProgramStatePort.md) - [assessCapacity](functions/assessCapacity.md) - [attachCounterpartySignature](functions/attachCounterpartySignature.md) - [bindPeerIntegration](functions/bindPeerIntegration.md) - [broadcastTopic](functions/broadcastTopic.md) - [buildAndHashEltooScript](functions/buildAndHashEltooScript.md) - [buildDisputePayload](functions/buildDisputePayload.md) - [buildEltooScript](functions/buildEltooScript.md) - [buildFundingTx](functions/buildFundingTx.md) - [buildHtlcFulfillmentReceipt](functions/buildHtlcFulfillmentReceipt.md) - [buildProgramTransitionStateUpdateMessage](functions/buildProgramTransitionStateUpdateMessage.md) - [buildProgramUpdateTx](functions/buildProgramUpdateTx.md) - [buildRegistryRootTransition](functions/buildRegistryRootTransition.md) - [buildSettlementTx](functions/buildSettlementTx.md) - [buildTxPoWPayload](functions/buildTxPoWPayload.md) - [buildUnsignedClosePackage](functions/buildUnsignedClosePackage.md) - [buildUpdateTx](functions/buildUpdateTx.md) - [canonicalizeProgramTransition](functions/canonicalizeProgramTransition.md) - [channelTopic](functions/channelTopic.md) - [closePackageSignatureBytes](functions/closePackageSignatureBytes.md) - [computeHtlcFulfillmentReceiptHash](functions/computeHtlcFulfillmentReceiptHash.md) - [computeOmniaTxDigest](functions/computeOmniaTxDigest.md) - [computeProgramUpdateDigest](functions/computeProgramUpdateDigest.md) - [computeProgramUpdateDigestHex](functions/computeProgramUpdateDigestHex.md) - [computeStateCommitment](functions/computeStateCommitment.md) - [computeStateCommitmentV2](functions/computeStateCommitmentV2.md) - [computeTxDraftDigest](functions/computeTxDraftDigest.md) - [createChannel](functions/createChannel.md) - [createOmniaIntegration](functions/createOmniaIntegration.md) - [createOmniaSwarm](functions/createOmniaSwarm.md) - [createOmniaSwarmFromInstance](functions/createOmniaSwarmFromInstance.md) - [createOmniaSwarmFromRelayUrl](functions/createOmniaSwarmFromRelayUrl.md) - [decrementCounter](functions/decrementCounter.md) - [deserializeChannelSnapshot](functions/deserializeChannelSnapshot.md) - [deserializeTxDraft](functions/deserializeTxDraft.md) - [encodeOmniaMessage](functions/encodeOmniaMessage.md) - [enforceUpdateGuards](functions/enforceUpdateGuards.md) - [executeIntent](functions/executeIntent.md) - [finalizeUnilateralClose](functions/finalizeUnilateralClose.md) - [flatSigningIndex](functions/flatSigningIndex.md) - [fulfillHTLC](functions/fulfillHTLC.md) - [getChannelReceipt](functions/getChannelReceipt.md) - [getStateBigInt](functions/getStateBigInt.md) - [getStateValue](functions/getStateValue.md) - [incrementCounter](functions/incrementCounter.md) - [markChannelClosed](functions/markChannelClosed.md) - [markChannelClosing](functions/markChannelClosing.md) - [mergeClosePackages](functions/mergeClosePackages.md) - [minimaOutputCoinIdsForDraft](functions/minimaOutputCoinIdsForDraft.md) - [normalizeScript](functions/normalizeScript.md) - [omniaDraftToCanonicalMinimaBytes](functions/omniaDraftToCanonicalMinimaBytes.md) - [omniaDraftToMinimaBytes](functions/omniaDraftToMinimaBytes.md) - [peerTopic](functions/peerTopic.md) - [programNumberState](functions/programNumberState.md) - [proposeSettlement](functions/proposeSettlement.md) - [recordMeterReading](functions/recordMeterReading.md) - [recoverChannel](functions/recoverChannel.md) - [recoverChannelSnapshot](functions/recoverChannelSnapshot.md) - [registerChannelProgram](functions/registerChannelProgram.md) - [replaceUnilateralCloseState](functions/replaceUnilateralCloseState.md) - [resolveChannelProgram](functions/resolveChannelProgram.md) - [scriptAddress](functions/scriptAddress.md) - [sendProgramTransitionStateUpdate](functions/sendProgramTransitionStateUpdate.md) - [serializeChannelSnapshot](functions/serializeChannelSnapshot.md) - [serializeOmniaWitness](functions/serializeOmniaWitness.md) - [serializeProgramTransition](functions/serializeProgramTransition.md) - [serializeTxDraft](functions/serializeTxDraft.md) - [setCounter](functions/setCounter.md) - [signState](functions/signState.md) - [signTxDraft](functions/signTxDraft.md) - [snapshotChannel](functions/snapshotChannel.md) - [startUnilateralClose](functions/startUnilateralClose.md) - [stateCommitmentV2Matches](functions/stateCommitmentV2Matches.md) - [timeoutHTLC](functions/timeoutHTLC.md) - [toEnhancedBuildParams](functions/toEnhancedBuildParams.md) - [toRawMinima](functions/toRawMinima.md) - [updateState](functions/updateState.md) - [validateChannelStateWithKissvm](functions/validateChannelStateWithKissvm.md) - [validateStateTransition](functions/validateStateTransition.md) - [verifyClosePackage](functions/verifyClosePackage.md) - [verifyPartialClosePackage](functions/verifyPartialClosePackage.md) - [verifyRegistryRootInState](functions/verifyRegistryRootInState.md) - [verifyState](functions/verifyState.md) - [verifyStateForCoSign](functions/verifyStateForCoSign.md) - [verifyStateSignature](functions/verifyStateSignature.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-omnia-factory/index **@totemsdk/omnia-factory** *** **Maturity: rc** # @totemsdk/omnia-factory ## Interfaces - [ChannelFactory](interfaces/ChannelFactory.md) - [DurableFactoryStore](interfaces/DurableFactoryStore.md) - [DurableFactoryStoreOptions](interfaces/DurableFactoryStoreOptions.md) - [FactoryDisputePayload](interfaces/FactoryDisputePayload.md) - [FactoryLeaseOps](interfaces/FactoryLeaseOps.md) - [FactoryLogEntry](interfaces/FactoryLogEntry.md) - [FactoryParticipant](interfaces/FactoryParticipant.md) - [FactoryRegistryState](interfaces/FactoryRegistryState.md) - [FactorySettlementPayload](interfaces/FactorySettlementPayload.md) - [OmniaChannel](interfaces/OmniaChannel.md) - [WotsLeaseBundle](interfaces/WotsLeaseBundle.md) ## Type Aliases - [FactorySignature](type-aliases/FactorySignature.md) - [FactoryStatus](type-aliases/FactoryStatus.md) ## Functions - [acceptFactory](functions/acceptFactory.md) - [buildAndHashFactoryScript](functions/buildAndHashFactoryScript.md) - [buildDisputePayload](functions/buildDisputePayload.md) - [buildFactoryScript](functions/buildFactoryScript.md) - [closeFactory](functions/closeFactory.md) - [closeVirtualChannel](functions/closeVirtualChannel.md) - [computeFactoryStateCommitment](functions/computeFactoryStateCommitment.md) - [createDurableFactoryStore](functions/createDurableFactoryStore.md) - [createFactory](functions/createFactory.md) - [enforceConservation](functions/enforceConservation.md) - [normalizeScript](functions/normalizeScript.md) - [openVirtualChannel](functions/openVirtualChannel.md) - [reallocate](functions/reallocate.md) - [scriptAddress](functions/scriptAddress.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-omnia-router/index **@totemsdk/omnia-router** *** **Maturity: rc** # @totemsdk/omnia-router ## Interfaces - [ChannelGraph](interfaces/ChannelGraph.md) - [ChannelGraphEdge](interfaces/ChannelGraphEdge.md) - [ChannelHTLC](interfaces/ChannelHTLC.md) - [ChannelOps](interfaces/ChannelOps.md) - [ChannelParty](interfaces/ChannelParty.md) - [ChannelSigner](interfaces/ChannelSigner.md) - [CrossTokenRoute](interfaces/CrossTokenRoute.md) - [DurableRouterLedger](interfaces/DurableRouterLedger.md) - [DurableRouterLedgerOptions](interfaces/DurableRouterLedgerOptions.md) - [HTLCParams](interfaces/HTLCParams.md) - [PaymentRequest](interfaces/PaymentRequest.md) - [PaymentResult](interfaces/PaymentResult.md) - [Route](interfaces/Route.md) - [RouteOptions](interfaces/RouteOptions.md) - [RouterChannel](interfaces/RouterChannel.md) - [RouterFeeProof](interfaces/RouterFeeProof.md) - [RouterLedgerState](interfaces/RouterLedgerState.md) - [RoutingHop](interfaces/RoutingHop.md) - [SettledSegment](interfaces/SettledSegment.md) - [SwapAnnouncement](interfaces/SwapAnnouncement.md) - [SwapHop](interfaces/SwapHop.md) ## Type Aliases - [HTLCStatus](type-aliases/HTLCStatus.md) - [LeaseProvider](type-aliases/LeaseProvider.md) ## Variables - [ROUTER\_FEE\_PROOF\_DOMAIN](variables/ROUTER_FEE_PROOF_DOMAIN.md) ## Functions - [addChannel](functions/addChannel.md) - [announceSwap](functions/announceSwap.md) - [applyRate](functions/applyRate.md) - [buildCrossTokenRequest](functions/buildCrossTokenRequest.md) - [buildPaymentRequest](functions/buildPaymentRequest.md) - [buildRouterFeeProof](functions/buildRouterFeeProof.md) - [cancelPayment](functions/cancelPayment.md) - [computeRouterFeeProofHash](functions/computeRouterFeeProofHash.md) - [createChannelGraph](functions/createChannelGraph.md) - [createDurableRouterLedger](functions/createDurableRouterLedger.md) - [executeCrossTokenPayment](functions/executeCrossTokenPayment.md) - [executeMultiHopPayment](functions/executeMultiHopPayment.md) - [findCrossTokenRoute](functions/findCrossTokenRoute.md) - [findRoute](functions/findRoute.md) - [getSwapAnnouncements](functions/getSwapAnnouncements.md) - [parseRateToScaled](functions/parseRateToScaled.md) - [removeChannel](functions/removeChannel.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-omnia-splice/index **@totemsdk/omnia-splice** *** **Maturity: rc** # @totemsdk/omnia-splice ## Classes - [PendingHTLCError](classes/PendingHTLCError.md) - [SpliceBalanceConservationError](classes/SpliceBalanceConservationError.md) - [SpliceChannelStatusError](classes/SpliceChannelStatusError.md) - [SpliceError](classes/SpliceError.md) - [SpliceInsufficientFundsError](classes/SpliceInsufficientFundsError.md) - [SpliceMissingPartyError](classes/SpliceMissingPartyError.md) - [SpliceSignatureMismatchError](classes/SpliceSignatureMismatchError.md) ## Interfaces - [DurableSpliceStore](interfaces/DurableSpliceStore.md) - [DurableSpliceStoreOptions](interfaces/DurableSpliceStoreOptions.md) - [FinalizeSpliceOptions](interfaces/FinalizeSpliceOptions.md) - [QuiesceOptions](interfaces/QuiesceOptions.md) - [SpliceAcceptance](interfaces/SpliceAcceptance.md) - [SpliceLeaseProvider](interfaces/SpliceLeaseProvider.md) - [SpliceParams](interfaces/SpliceParams.md) - [SpliceProposal](interfaces/SpliceProposal.md) - [SpliceRecord](interfaces/SpliceRecord.md) - [SpliceSigningIndices](interfaces/SpliceSigningIndices.md) - [SpliceStoreState](interfaces/SpliceStoreState.md) - [SpliceTxDraft](interfaces/SpliceTxDraft.md) - [SpliceTxInput](interfaces/SpliceTxInput.md) - [SpliceTxOutput](interfaces/SpliceTxOutput.md) ## Type Aliases - [QuiescedChannel](type-aliases/QuiescedChannel.md) - [SplicedChannel](type-aliases/SplicedChannel.md) - [SpliceRecordStatus](type-aliases/SpliceRecordStatus.md) - [SpliceType](type-aliases/SpliceType.md) - [WotsSignature](type-aliases/WotsSignature.md) ## Functions - [acceptSplice](functions/acceptSplice.md) - [buildSpliceTx](functions/buildSpliceTx.md) - [computeSpliceTxDigest](functions/computeSpliceTxDigest.md) - [createDurableSpliceStore](functions/createDurableSpliceStore.md) - [finalizeSplice](functions/finalizeSplice.md) - [proposeSpliceIn](functions/proposeSpliceIn.md) - [proposeSpliceOut](functions/proposeSpliceOut.md) - [quiesceChannel](functions/quiesceChannel.md) - [spliceDraftToMinimaBytes](functions/spliceDraftToMinimaBytes.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/index **@totemsdk/omnia-vtxo** *** **Maturity: rc** # @totemsdk/omnia-vtxo ## Classes - [MemoryOmniaVtxoStore](classes/MemoryOmniaVtxoStore.md) - [OmniaVtxoError](classes/OmniaVtxoError.md) - [VtxoAmountError](classes/VtxoAmountError.md) - [VtxoExitError](classes/VtxoExitError.md) - [VtxoMergeError](classes/VtxoMergeError.md) - [VtxoOwnershipError](classes/VtxoOwnershipError.md) - [VtxoPolicyError](classes/VtxoPolicyError.md) - [VtxoPoolCapacityError](classes/VtxoPoolCapacityError.md) - [VtxoProofError](classes/VtxoProofError.md) - [VtxoSplitError](classes/VtxoSplitError.md) - [VtxoStatusError](classes/VtxoStatusError.md) ## Interfaces - [ComputePoolIdParams](interfaces/ComputePoolIdParams.md) - [ComputeVtxoIdParams](interfaces/ComputeVtxoIdParams.md) - [ConservationInput](interfaces/ConservationInput.md) - [CreatePoolParams](interfaces/CreatePoolParams.md) - [DurableOmniaVtxoStore](interfaces/DurableOmniaVtxoStore.md) - [DurableOmniaVtxoStoreOptions](interfaces/DurableOmniaVtxoStoreOptions.md) - [ExitDraft](interfaces/ExitDraft.md) - [MergeResult](interfaces/MergeResult.md) - [MergeVtxosParams](interfaces/MergeVtxosParams.md) - [MerkleProofNode](interfaces/MerkleProofNode.md) - [MintResult](interfaces/MintResult.md) - [MintVtxoParams](interfaces/MintVtxoParams.md) - [OmniaVtxo](interfaces/OmniaVtxo.md) - [OmniaVtxoOperator](interfaces/OmniaVtxoOperator.md) - [OmniaVtxoPool](interfaces/OmniaVtxoPool.md) - [OmniaVtxoRegistryState](interfaces/OmniaVtxoRegistryState.md) - [OmniaVtxoStore](interfaces/OmniaVtxoStore.md) - [RefreshResult](interfaces/RefreshResult.md) - [RefreshVtxoParams](interfaces/RefreshVtxoParams.md) - [SplitResult](interfaces/SplitResult.md) - [SplitVtxoParams](interfaces/SplitVtxoParams.md) - [TransferResult](interfaces/TransferResult.md) - [TransferVtxoParams](interfaces/TransferVtxoParams.md) - [VerifyVtxoResult](interfaces/VerifyVtxoResult.md) - [VtxoExitIntent](interfaces/VtxoExitIntent.md) - [VtxoHistoryEntry](interfaces/VtxoHistoryEntry.md) - [VtxoOperatorReceipt](interfaces/VtxoOperatorReceipt.md) - [VtxoPoolPolicy](interfaces/VtxoPoolPolicy.md) - [VtxoProof](interfaces/VtxoProof.md) - [VtxoProofSet](interfaces/VtxoProofSet.md) - [VtxoTransfer](interfaces/VtxoTransfer.md) - [VtxoTransferIntent](interfaces/VtxoTransferIntent.md) ## Type Aliases - [VtxoId](type-aliases/VtxoId.md) - [VtxoOp](type-aliases/VtxoOp.md) - [VtxoStatus](type-aliases/VtxoStatus.md) ## Variables - [DEFAULT\_POLICY](variables/DEFAULT_POLICY.md) - [EMPTY\_LEAF](variables/EMPTY_LEAF.md) - [EMPTY\_TREE\_ROOT](variables/EMPTY_TREE_ROOT.md) - [EPOCH\_ZERO](variables/EPOCH_ZERO.md) - [MOCK\_BATCH\_ID](variables/MOCK_BATCH_ID.md) - [MOCK\_OPERATOR\_SIGNATURE](variables/MOCK_OPERATOR_SIGNATURE.md) - [VTXO\_ID\_DOMAIN](variables/VTXO_ID_DOMAIN.md) - [VTXO\_LEAF\_DOMAIN](variables/VTXO_LEAF_DOMAIN.md) - [VTXO\_POOL\_ID\_DOMAIN](variables/VTXO_POOL_ID_DOMAIN.md) - [VTXO\_RECEIPT\_DOMAIN](variables/VTXO_RECEIPT_DOMAIN.md) ## Functions - [advancePoolEpoch](functions/advancePoolEpoch.md) - [assertPoolCanMint](functions/assertPoolCanMint.md) - [buildVtxoExitIntent](functions/buildVtxoExitIntent.md) - [buildVtxoProofSet](functions/buildVtxoProofSet.md) - [buildVtxoTransferIntent](functions/buildVtxoTransferIntent.md) - [computeCommitmentRoot](functions/computeCommitmentRoot.md) - [computePoolId](functions/computePoolId.md) - [computeReceiptId](functions/computeReceiptId.md) - [computeVtxoId](functions/computeVtxoId.md) - [computeVtxoLeaf](functions/computeVtxoLeaf.md) - [consumeExitReceipt](functions/consumeExitReceipt.md) - [createDurableOmniaVtxoStore](functions/createDurableOmniaVtxoStore.md) - [createExitDraft](functions/createExitDraft.md) - [createPool](functions/createPool.md) - [deserializePool](functions/deserializePool.md) - [deserializeVtxo](functions/deserializeVtxo.md) - [isVtxoActive](functions/isVtxoActive.md) - [markExited](functions/markExited.md) - [markExiting](functions/markExiting.md) - [markVtxoSpent](functions/markVtxoSpent.md) - [mergeVtxos](functions/mergeVtxos.md) - [mintVtxo](functions/mintVtxo.md) - [refreshVtxo](functions/refreshVtxo.md) - [serializePool](functions/serializePool.md) - [serializeVtxo](functions/serializeVtxo.md) - [splitVtxo](functions/splitVtxo.md) - [transferVtxo](functions/transferVtxo.md) - [updatePoolRoot](functions/updatePoolRoot.md) - [verifyConservation](functions/verifyConservation.md) - [verifyMerkleProof](functions/verifyMerkleProof.md) - [verifyVtxo](functions/verifyVtxo.md) - [verifyVtxoProof](functions/verifyVtxoProof.md) - [verifyVtxoTransfer](functions/verifyVtxoTransfer.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-pear/index **@totemsdk/pear** *** **Maturity: rc** # @totemsdk/pear ## Classes - [BareFileStore](classes/BareFileStore.md) - [BareHyperdriveAdapter](classes/BareHyperdriveAdapter.md) - [BareHyperswarm](classes/BareHyperswarm.md) - [BareKVStore](classes/BareKVStore.md) ## Interfaces - [AppConfig](interfaces/AppConfig.md) - [BareFileStoreOptions](interfaces/BareFileStoreOptions.md) - [BareKVStoreOptions](interfaces/BareKVStoreOptions.md) - [FetchInit](interfaces/FetchInit.md) - [FetchResponse](interfaces/FetchResponse.md) - [FsLike](interfaces/FsLike.md) - [HypebeeLike](interfaces/HypebeeLike.md) - [HyperdriveAdapter](interfaces/HyperdriveAdapter.md) - [IStreamTransport](interfaces/IStreamTransport.md) - [KVStore](interfaces/KVStore.md) - [Logger](interfaces/Logger.md) - [PearApp](interfaces/PearApp.md) - [PearAppConfig](interfaces/PearAppConfig.md) - [RemoteDriveOptions](interfaces/RemoteDriveOptions.md) - [SignedManifest](interfaces/SignedManifest.md) - [SwarmConfig](interfaces/SwarmConfig.md) - [SwarmConnectOptions](interfaces/SwarmConnectOptions.md) ## Type Aliases - [ExitCallback](type-aliases/ExitCallback.md) - [Unsubscribe](type-aliases/Unsubscribe.md) ## Functions - [bareFetch](functions/bareFetch.md) - [createLogger](functions/createLogger.md) - [createPearApp](functions/createPearApp.md) - [defaultSwarmConfig](functions/defaultSwarmConfig.md) - [loadConfig](functions/loadConfig.md) - [loadManifest](functions/loadManifest.md) - [onExit](functions/onExit.md) - [openLocalDrive](functions/openLocalDrive.md) - [openRemoteDrive](functions/openRemoteDrive.md) - [runExitHandlers](functions/runExitHandlers.md) ## References ### ITransport Renames and re-exports [IStreamTransport](interfaces/IStreamTransport.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-proof/index **@totemsdk/proof** *** **Maturity: v1** # @totemsdk/proof ## Interfaces - [AnchorRef](interfaces/AnchorRef.md) - [CreateIdentityProofParams](interfaces/CreateIdentityProofParams.md) - [CreateManifestProofParams](interfaces/CreateManifestProofParams.md) - [CreateProofParams](interfaces/CreateProofParams.md) - [EvidenceRef](interfaces/EvidenceRef.md) - [ProofLink](interfaces/ProofLink.md) - [ProofOperationResult](interfaces/ProofOperationResult.md) - [ProofProvider](interfaces/ProofProvider.md) - [ProofSubject](interfaces/ProofSubject.md) - [ProofVerifyResult](interfaces/ProofVerifyResult.md) - [SignedProof](interfaces/SignedProof.md) - [SigningIndices](interfaces/SigningIndices.md) - [UnsignedProof](interfaces/UnsignedProof.md) ## Type Aliases - [ProofKind](type-aliases/ProofKind.md) - [ProofProviderCapability](type-aliases/ProofProviderCapability.md) ## Variables - [sha3\_256](variables/sha3_256.md) ## Functions - [attachAnchor](functions/attachAnchor.md) - [canonicalJson](functions/canonicalJson.md) - [computeProofId](functions/computeProofId.md) - [createAnchorCommitment](functions/createAnchorCommitment.md) - [createIdentityProof](functions/createIdentityProof.md) - [createManifestProof](functions/createManifestProof.md) - [createProof](functions/createProof.md) - [hashEvidence](functions/hashEvidence.md) - [hashProofPayload](functions/hashProofPayload.md) - [signProof](functions/signProof.md) - [signWithLease](functions/signWithLease.md) - [toHex](functions/toHex.md) - [verifyAnchorRef](functions/verifyAnchorRef.md) - [verifyIdentityProof](functions/verifyIdentityProof.md) - [verifyManifestProof](functions/verifyManifestProof.md) - [verifyProof](functions/verifyProof.md) - [verifyProofIdIntegrity](functions/verifyProofIdIntegrity.md) - [verifyProofPayload](functions/verifyProofPayload.md) - [verifyProofSignature](functions/verifyProofSignature.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-proof-integritas/index **@totemsdk/proof-integritas** *** **Maturity: v1** # @totemsdk/proof-integritas ## Interfaces - [IntegritasCheckResponse](interfaces/IntegritasCheckResponse.md) - [IntegritasConfig](interfaces/IntegritasConfig.md) - [IntegritasStampResponse](interfaces/IntegritasStampResponse.md) - [IntegritasVerifyResponse](interfaces/IntegritasVerifyResponse.md) ## Type Aliases - [IntegritasCapability](type-aliases/IntegritasCapability.md) - [IntegritasExtendedCapability](type-aliases/IntegritasExtendedCapability.md) ## Functions - [createIntegritasProofProvider](functions/createIntegritasProofProvider.md) - [integritasAnchorRefFromResponse](functions/integritasAnchorRefFromResponse.md) - [integritasHashFromProof](functions/integritasHashFromProof.md) - [normalizeIntegritasCheckResponse](functions/normalizeIntegritasCheckResponse.md) - [normalizeIntegritasStampResponse](functions/normalizeIntegritasStampResponse.md) - [normalizeIntegritasVerifyResponse](functions/normalizeIntegritasVerifyResponse.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-proofgraph/index **@totemsdk/proofgraph** *** **Maturity: v1** # @totemsdk/proofgraph ## Interfaces - [AnchorInput](interfaces/AnchorInput.md) - [DurableProofGraphStoreOptions](interfaces/DurableProofGraphStoreOptions.md) - [ProofGraph](interfaces/ProofGraph.md) - [ProofGraphEdge](interfaces/ProofGraphEdge.md) - [ProofGraphEvidenceResult](interfaces/ProofGraphEvidenceResult.md) - [ProofGraphEvidenceStore](interfaces/ProofGraphEvidenceStore.md) - [ProofGraphEvidenceStoreOptions](interfaces/ProofGraphEvidenceStoreOptions.md) - [ProofGraphNode](interfaces/ProofGraphNode.md) - [ProofGraphRecoveryReport](interfaces/ProofGraphRecoveryReport.md) - [ProofGraphStoragePort](interfaces/ProofGraphStoragePort.md) - [ProofGraphVerifyResult](interfaces/ProofGraphVerifyResult.md) - [ReceiptLikeInput](interfaces/ReceiptLikeInput.md) ## Type Aliases - [DurableProofGraphStore](type-aliases/DurableProofGraphStore.md) - [ProofGraphEdgeType](type-aliases/ProofGraphEdgeType.md) - [ProofGraphNodeType](type-aliases/ProofGraphNodeType.md) ## Functions - [addAnchor](functions/addAnchor.md) - [addEdge](functions/addEdge.md) - [addIdentityClaim](functions/addIdentityClaim.md) - [addIdentityDocument](functions/addIdentityDocument.md) - [addManifest](functions/addManifest.md) - [addNode](functions/addNode.md) - [addProof](functions/addProof.md) - [addReceiptLike](functions/addReceiptLike.md) - [buildEdge](functions/buildEdge.md) - [canonicalJson](functions/canonicalJson.md) - [computeEdgeId](functions/computeEdgeId.md) - [computeNodeId](functions/computeNodeId.md) - [computeProofGraphId](functions/computeProofGraphId.md) - [createDurableProofGraphStore](functions/createDurableProofGraphStore.md) - [createProofGraph](functions/createProofGraph.md) - [createProofGraphEvidenceStore](functions/createProofGraphEvidenceStore.md) - [exportProofGraph](functions/exportProofGraph.md) - [findAnchorsForProof](functions/findAnchorsForProof.md) - [findConflicts](functions/findConflicts.md) - [findNode](functions/findNode.md) - [findProofsByIssuer](functions/findProofsByIssuer.md) - [findProofsBySubject](functions/findProofsBySubject.md) - [findRevocations](functions/findRevocations.md) - [findSupersessions](functions/findSupersessions.md) - [getEdgesBetween](functions/getEdgesBetween.md) - [getEdgesByType](functions/getEdgesByType.md) - [getEdgesFrom](functions/getEdgesFrom.md) - [getEdgesTo](functions/getEdgesTo.md) - [getEvidenceTrail](functions/getEvidenceTrail.md) - [getManifestsForAddress](functions/getManifestsForAddress.md) - [getProofLineage](functions/getProofLineage.md) - [getProofNodes](functions/getProofNodes.md) - [importProofGraph](functions/importProofGraph.md) - [reachableFrom](functions/reachableFrom.md) - [recomputeGraphId](functions/recomputeGraphId.md) - [resolveCurrentProofSet](functions/resolveCurrentProofSet.md) - [setGraphMetadata](functions/setGraphMetadata.md) - [toHex](functions/toHex.md) - [verifyGraphProofs](functions/verifyGraphProofs.md) - [verifyProofGraph](functions/verifyProofGraph.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-provider-bond/index **@totemsdk/provider-bond** *** **Maturity: rc** # @totemsdk/provider-bond ## Classes - [BondProofError](classes/BondProofError.md) - [IncidentError](classes/IncidentError.md) - [MemoryProviderBondStore](classes/MemoryProviderBondStore.md) - [ProbeError](classes/ProbeError.md) - [ProviderBondError](classes/ProviderBondError.md) - [ProviderIdentityError](classes/ProviderIdentityError.md) - [ProviderManifestError](classes/ProviderManifestError.md) - [ProviderPolicyError](classes/ProviderPolicyError.md) - [ProviderRegistryError](classes/ProviderRegistryError.md) - [ProviderScoreError](classes/ProviderScoreError.md) - [ProviderSerializationError](classes/ProviderSerializationError.md) ## Interfaces - [AssertProviderControlsAddressParams](interfaces/AssertProviderControlsAddressParams.md) - [BindProviderManifestToIdentityParams](interfaces/BindProviderManifestToIdentityParams.md) - [BondProofRef](interfaces/BondProofRef.md) - [BondProofVerifier](interfaces/BondProofVerifier.md) - [BondStatusContext](interfaces/BondStatusContext.md) - [ComputeProviderScoreParams](interfaces/ComputeProviderScoreParams.md) - [CreateProviderBondManifestParams](interfaces/CreateProviderBondManifestParams.md) - [DurableProviderBondStore](interfaces/DurableProviderBondStore.md) - [DurableProviderBondStoreOptions](interfaces/DurableProviderBondStoreOptions.md) - [IncidentRecord](interfaces/IncidentRecord.md) - [IncidentSummary](interfaces/IncidentSummary.md) - [PolicyMatch](interfaces/PolicyMatch.md) - [ProbeResult](interfaces/ProbeResult.md) - [ProviderBondAssetDeclaration](interfaces/ProviderBondAssetDeclaration.md) - [ProviderBondExtension](interfaces/ProviderBondExtension.md) - [ProviderBondManifest](interfaces/ProviderBondManifest.md) - [ProviderBondRegistryState](interfaces/ProviderBondRegistryState.md) - [ProviderBondVerifyResult](interfaces/ProviderBondVerifyResult.md) - [ProviderPolicy](interfaces/ProviderPolicy.md) - [ProviderScore](interfaces/ProviderScore.md) - [ProviderScoringWeights](interfaces/ProviderScoringWeights.md) - [RecordIncidentParams](interfaces/RecordIncidentParams.md) - [RecordProbeParams](interfaces/RecordProbeParams.md) - [VerifyBondStackParams](interfaces/VerifyBondStackParams.md) - [VerifyProviderBondAddressesParams](interfaces/VerifyProviderBondAddressesParams.md) - [VerifyProviderBondManifestParams](interfaces/VerifyProviderBondManifestParams.md) - [VerifyProviderManifestIdentityParams](interfaces/VerifyProviderManifestIdentityParams.md) ## Type Aliases - [BondAsset](type-aliases/BondAsset.md) - [BondLockType](type-aliases/BondLockType.md) - [BondProofType](type-aliases/BondProofType.md) - [BondPurpose](type-aliases/BondPurpose.md) - [BondStatus](type-aliases/BondStatus.md) - [IncidentSeverity](type-aliases/IncidentSeverity.md) - [IncidentStatus](type-aliases/IncidentStatus.md) - [IncidentType](type-aliases/IncidentType.md) - [ProbeType](type-aliases/ProbeType.md) - [ProviderBondVerifyCode](type-aliases/ProviderBondVerifyCode.md) - [ProviderRecommendation](type-aliases/ProviderRecommendation.md) ## Variables - [DEFAULT\_MINIMA\_TOKEN\_ID](variables/DEFAULT_MINIMA_TOKEN_ID.md) - [DEFAULT\_PROVIDER\_SCORING\_WEIGHTS](variables/DEFAULT_PROVIDER_SCORING_WEIGHTS.md) - [PROVIDER\_BOND\_TOPIC\_PREFIX](variables/PROVIDER_BOND_TOPIC_PREFIX.md) ## Functions - [acknowledgeIncident](functions/acknowledgeIncident.md) - [assertBondMeetsMinimum](functions/assertBondMeetsMinimum.md) - [assertManifestNotExpired](functions/assertManifestNotExpired.md) - [assertProviderControlsAddress](functions/assertProviderControlsAddress.md) - [attachBondProof](functions/attachBondProof.md) - [bindProviderManifestToIdentity](functions/bindProviderManifestToIdentity.md) - [computeProviderBondExtensionHash](functions/computeProviderBondExtensionHash.md) - [computeProviderBondManifestHash](functions/computeProviderBondManifestHash.md) - [computeProviderRecommendation](functions/computeProviderRecommendation.md) - [computeProviderScore](functions/computeProviderScore.md) - [createDurableProviderBondStore](functions/createDurableProviderBondStore.md) - [createEmptyProviderBondRegistryState](functions/createEmptyProviderBondRegistryState.md) - [createProviderBondManifest](functions/createProviderBondManifest.md) - [explainProviderPolicyMatch](functions/explainProviderPolicyMatch.md) - [filterProvidersByPolicy](functions/filterProvidersByPolicy.md) - [getProvider](functions/getProvider.md) - [listOfflineProviders](functions/listOfflineProviders.md) - [listProviders](functions/listProviders.md) - [listProvidersByServiceType](functions/listProvidersByServiceType.md) - [listRiskyProviders](functions/listRiskyProviders.md) - [parseProviderBondRecord](functions/parseProviderBondRecord.md) - [parseProviderBondState](functions/parseProviderBondState.md) - [rankProvidersByPolicy](functions/rankProvidersByPolicy.md) - [recordHeartbeat](functions/recordHeartbeat.md) - [recordIncident](functions/recordIncident.md) - [recordProbe](functions/recordProbe.md) - [recordProviderIncident](functions/recordProviderIncident.md) - [recordProviderProbe](functions/recordProviderProbe.md) - [registerProvider](functions/registerProvider.md) - [rejectIncident](functions/rejectIncident.md) - [resolveIncident](functions/resolveIncident.md) - [serializeProviderBondRecord](functions/serializeProviderBondRecord.md) - [serializeProviderBondState](functions/serializeProviderBondState.md) - [updateProviderManifest](functions/updateProviderManifest.md) - [updateProviderScore](functions/updateProviderScore.md) - [verifyBondProof](functions/verifyBondProof.md) - [verifyBondStack](functions/verifyBondStack.md) - [verifyProviderBondAddresses](functions/verifyProviderBondAddresses.md) - [verifyProviderBondManifest](functions/verifyProviderBondManifest.md) - [verifyProviderManifestIdentity](functions/verifyProviderManifestIdentity.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-pubsub-transport/index **@totemsdk/pubsub-transport** *** **Maturity: rc** # @totemsdk/pubsub-transport ## Classes - [EventEmitterTransport](classes/EventEmitterTransport.md) - [MockPubSubTransport](classes/MockPubSubTransport.md) ## Interfaces - [IPubSubTransport](interfaces/IPubSubTransport.md) - [PubSubMessage](interfaces/PubSubMessage.md) - [PubSubSubscription](interfaces/PubSubSubscription.md) ## Type Aliases - [MqttClientPort](type-aliases/MqttClientPort.md) - [MqttMessage](type-aliases/MqttMessage.md) ## Functions - [createPairedEventEmitterTransports](functions/createPairedEventEmitterTransports.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-minima-rpc/index **@totemsdk/minima-rpc** *** **Maturity: rc** # @totemsdk/minima-rpc ## Classes - [MinimaRpcError](classes/MinimaRpcError.md) ## Interfaces - [AddressInfo](interfaces/AddressInfo.md) - [Balance](interfaces/Balance.md) - [BalanceQuery](interfaces/BalanceQuery.md) - [BurnInfo](interfaces/BurnInfo.md) - [ChainTip](interfaces/ChainTip.md) - [Coin](interfaces/Coin.md) - [CoinCheckResult](interfaces/CoinCheckResult.md) - [CoinExportResult](interfaces/CoinExportResult.md) - [CoinsQuery](interfaces/CoinsQuery.md) - [HistoryEntry](interfaces/HistoryEntry.md) - [HistoryQuery](interfaces/HistoryQuery.md) - [MegaMMRInfo](interfaces/MegaMMRInfo.md) - [MinimaEnvelope](interfaces/MinimaEnvelope.md) - [MinimaRpcClient](interfaces/MinimaRpcClient.md) - [MinimaRpcConfig](interfaces/MinimaRpcConfig.md) - [MMRProof](interfaces/MMRProof.md) - [NodeStatus](interfaces/NodeStatus.md) - [SendParams](interfaces/SendParams.md) - [TokenInfo](interfaces/TokenInfo.md) - [TxnCheckResult](interfaces/TxnCheckResult.md) - [TxnInputParams](interfaces/TxnInputParams.md) - [TxnListResult](interfaces/TxnListResult.md) - [TxnMineParams](interfaces/TxnMineParams.md) - [TxnOutputParams](interfaces/TxnOutputParams.md) - [TxnPostParams](interfaces/TxnPostParams.md) - [TxnPostResult](interfaces/TxnPostResult.md) - [TxnScriptParams](interfaces/TxnScriptParams.md) - [TxnSignParams](interfaces/TxnSignParams.md) - [TxnStateParams](interfaces/TxnStateParams.md) - [WebhookEntry](interfaces/WebhookEntry.md) ## Functions - [buildCommandString](functions/buildCommandString.md) - [createMinimaRpcClient](functions/createMinimaRpcClient.md) - [postCommand](functions/postCommand.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-realtime/index **@totemsdk/realtime** *** **Maturity: rc** # @totemsdk/realtime ## Classes - [LookupBackend](classes/LookupBackend.md) - [MinimaRpcBackend](classes/MinimaRpcBackend.md) - [PortfolioCache](classes/PortfolioCache.md) - [PortfolioStreamManager](classes/PortfolioStreamManager.md) ## Interfaces - [LookupLike](interfaces/LookupLike.md) - [MinimaRpcLike](interfaces/MinimaRpcLike.md) - [PortfolioBackend](interfaces/PortfolioBackend.md) - [PortfolioCacheConfig](interfaces/PortfolioCacheConfig.md) - [PortfolioCacheDependencies](interfaces/PortfolioCacheDependencies.md) - [PortfolioEntry](interfaces/PortfolioEntry.md) - [PortfolioStreamConfig](interfaces/PortfolioStreamConfig.md) - [PortfolioStreamDependencies](interfaces/PortfolioStreamDependencies.md) - [PortfolioStreamListener](interfaces/PortfolioStreamListener.md) - [PortfolioUpdateEvent](interfaces/PortfolioUpdateEvent.md) - [RawBalanceEntry](interfaces/RawBalanceEntry.md) - [TxConfirmationEvent](interfaces/TxConfirmationEvent.md) - [WebSocketMessage](interfaces/WebSocketMessage.md) - [WebSocketTokenResponse](interfaces/WebSocketTokenResponse.md) ## Type Aliases - [BackendUnsubscribe](type-aliases/BackendUnsubscribe.md) - [ConnectionState](type-aliases/ConnectionState.md) ## Functions - [classifyKind](functions/classifyKind.md) - [createPortfolioStreamManager](functions/createPortfolioStreamManager.md) - [toPortfolioEntry](functions/toPortfolioEntry.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-recursive-mast/index **@totemsdk/recursive-mast** *** **Maturity: rc** # @totemsdk/recursive-mast ## Classes - [HttpPolicyStore](classes/HttpPolicyStore.md) - [MemoryPolicyStore](classes/MemoryPolicyStore.md) ## Interfaces - [AnnouncePolicyConfig](interfaces/AnnouncePolicyConfig.md) - [AuditConfig](interfaces/AuditConfig.md) - [AvailabilityPolicy](interfaces/AvailabilityPolicy.md) - [AvailabilityReceipt](interfaces/AvailabilityReceipt.md) - [BranchFilter](interfaces/BranchFilter.md) - [BranchInventory](interfaces/BranchInventory.md) - [BranchInventoryEntry](interfaces/BranchInventoryEntry.md) - [CompiledMast](interfaces/CompiledMast.md) - [CompiledPolicyNode](interfaces/CompiledPolicyNode.md) - [CompiledRecursivePolicy](interfaces/CompiledRecursivePolicy.md) - [ContentKey](interfaces/ContentKey.md) - [CreateSigningRequestConfig](interfaces/CreateSigningRequestConfig.md) - [CreateSigningResponseConfig](interfaces/CreateSigningResponseConfig.md) - [DecryptedBranchResult](interfaces/DecryptedBranchResult.md) - [EncryptedBranchPackage](interfaces/EncryptedBranchPackage.md) - [EncryptionEnvelope](interfaces/EncryptionEnvelope.md) - [EvidenceState](interfaces/EvidenceState.md) - [ExpectedInput](interfaces/ExpectedInput.md) - [ExpectedOutput](interfaces/ExpectedOutput.md) - [HttpStoreOptions](interfaces/HttpStoreOptions.md) - [KeyWrappingEnvelope](interfaces/KeyWrappingEnvelope.md) - [LayeredPolicyConfig](interfaces/LayeredPolicyConfig.md) - [MastBranchPackage](interfaces/MastBranchPackage.md) - [MastBranchSummary](interfaces/MastBranchSummary.md) - [MemoryStoreOptions](interfaces/MemoryStoreOptions.md) - [MinimaScriptProof](interfaces/MinimaScriptProof.md) - [MirrorResult](interfaces/MirrorResult.md) - [PolicyAction](interfaces/PolicyAction.md) - [PolicyAnchorConfig](interfaces/PolicyAnchorConfig.md) - [PolicyAvailabilityReport](interfaces/PolicyAvailabilityReport.md) - [PolicyDelegationEdge](interfaces/PolicyDelegationEdge.md) - [PolicyEndpoint](interfaces/PolicyEndpoint.md) - [PolicyGraph](interfaces/PolicyGraph.md) - [PolicyGraphNode](interfaces/PolicyGraphNode.md) - [PolicyLayer](interfaces/PolicyLayer.md) - [PolicyLookupClient](interfaces/PolicyLookupClient.md) - [PolicyNode](interfaces/PolicyNode.md) - [PolicyNodeInput](interfaces/PolicyNodeInput.md) - [PolicyPathDescriptor](interfaces/PolicyPathDescriptor.md) - [PolicyQueryResult](interfaces/PolicyQueryResult.md) - [PolicyRole](interfaces/PolicyRole.md) - [PolicySignature](interfaces/PolicySignature.md) - [PolicySigner](interfaces/PolicySigner.md) - [PolicySignerConfig](interfaces/PolicySignerConfig.md) - [PolicySigningRequest](interfaces/PolicySigningRequest.md) - [PolicySigningResponse](interfaces/PolicySigningResponse.md) - [PolicyTree](interfaces/PolicyTree.md) - [PolicyUpdateNotification](interfaces/PolicyUpdateNotification.md) - [PrevStateWorkflow](interfaces/PrevStateWorkflow.md) - [ProofChain](interfaces/ProofChain.md) - [ProofLink](interfaces/ProofLink.md) - [QueryPolicyConfig](interfaces/QueryPolicyConfig.md) - [RecursiveMastPolicyManifest](interfaces/RecursiveMastPolicyManifest.md) - [RecursiveMastPolicyStore](interfaces/RecursiveMastPolicyStore.md) - [RequiredRoleState](interfaces/RequiredRoleState.md) - [ResolvedPolicy](interfaces/ResolvedPolicy.md) - [ResolvePolicyConfig](interfaces/ResolvePolicyConfig.md) - [RestrictedBranchPackage](interfaces/RestrictedBranchPackage.md) - [ScriptDisclosure](interfaces/ScriptDisclosure.md) - [SignedEvidence](interfaces/SignedEvidence.md) - [SignedIdentityClaim](interfaces/SignedIdentityClaim.md) - [SigningRoundResult](interfaces/SigningRoundResult.md) - [SigningSession](interfaces/SigningSession.md) - [SigningSessionConfig](interfaces/SigningSessionConfig.md) - [StateTransition](interfaces/StateTransition.md) - [VerificationResult](interfaces/VerificationResult.md) - [WatchPolicyConfig](interfaces/WatchPolicyConfig.md) ## Type Aliases - [BlockDuration](type-aliases/BlockDuration.md) - [BlockHeight](type-aliases/BlockHeight.md) - [EncodingDomain](type-aliases/EncodingDomain.md) - [EncryptionAlgorithm](type-aliases/EncryptionAlgorithm.md) - [SigningDomain](type-aliases/SigningDomain.md) - [SigningSessionStatus](type-aliases/SigningSessionStatus.md) - [UnixTimeMs](type-aliases/UnixTimeMs.md) - [UnixTimeSec](type-aliases/UnixTimeSec.md) ## Variables - [CANONICAL\_ENCODING\_VERSION](variables/CANONICAL_ENCODING_VERSION.md) - [ENCRYPTION\_ALGORITHMS](variables/ENCRYPTION_ALGORITHMS.md) - [ENVELOPE\_VERSION](variables/ENVELOPE_VERSION.md) - [KEY\_PREFIX](variables/KEY_PREFIX.md) - [STANDARD\_LAYERS](variables/STANDARD_LAYERS.md) ## Functions - [acceptResponse](functions/acceptResponse.md) - [advanceSession](functions/advanceSession.md) - [announcePolicy](functions/announcePolicy.md) - [asBlockDuration](functions/asBlockDuration.md) - [asBlockHeight](functions/asBlockHeight.md) - [asUnixTimeMs](functions/asUnixTimeMs.md) - [asUnixTimeSec](functions/asUnixTimeSec.md) - [auditPolicyAvailability](functions/auditPolicyAvailability.md) - [branchSummary](functions/branchSummary.md) - [buildAcceptanceScript](functions/buildAcceptanceScript.md) - [buildBidirectionalBridge](functions/buildBidirectionalBridge.md) - [buildCrossDomainBridge](functions/buildCrossDomainBridge.md) - [buildDelegationChain](functions/buildDelegationChain.md) - [buildDelegationLink](functions/buildDelegationLink.md) - [buildDelegationScript](functions/buildDelegationScript.md) - [buildEpochAdvancementScript](functions/buildEpochAdvancementScript.md) - [buildLayeredMastScript](functions/buildLayeredMastScript.md) - [buildLayeredPolicy](functions/buildLayeredPolicy.md) - [buildLayerSubset](functions/buildLayerSubset.md) - [buildMigrationPath](functions/buildMigrationPath.md) - [buildMigrationScript](functions/buildMigrationScript.md) - [buildMigrationStep](functions/buildMigrationStep.md) - [buildPolicyAnchorScript](functions/buildPolicyAnchorScript.md) - [buildPolicyAnchorState](functions/buildPolicyAnchorState.md) - [buildPolicyTree](functions/buildPolicyTree.md) - [buildPrevStateWorkflow](functions/buildPrevStateWorkflow.md) - [buildProofChain](functions/buildProofChain.md) - [buildRecursiveWitnessPlan](functions/buildRecursiveWitnessPlan.md) - [buildRootRotationScript](functions/buildRootRotationScript.md) - [buildStateTransition](functions/buildStateTransition.md) - [buildTrustNetwork](functions/buildTrustNetwork.md) - [bundleKey](functions/bundleKey.md) - [cancelSession](functions/cancelSession.md) - [canonicalHash](functions/canonicalHash.md) - [canonicalSerialize](functions/canonicalSerialize.md) - [canonicalSign](functions/canonicalSign.md) - [canonicalVerify](functions/canonicalVerify.md) - [collectSigningResponses](functions/collectSigningResponses.md) - [compileMastTree](functions/compileMastTree.md) - [compilePolicyGraph](functions/compilePolicyGraph.md) - [computeBranchInventoryHash](functions/computeBranchInventoryHash.md) - [computeBundleHash](functions/computeBundleHash.md) - [computeCanonicalScriptAddress](functions/computeCanonicalScriptAddress.md) - [computeCanonicalScriptHash](functions/computeCanonicalScriptHash.md) - [computeKeyFingerprint](functions/computeKeyFingerprint.md) - [computePolicyPackageHash](functions/computePolicyPackageHash.md) - [computeScriptHash](functions/computeScriptHash.md) - [confirmSession](functions/confirmSession.md) - [counterWorkflow](functions/counterWorkflow.md) - [createAvailabilityReceipt](functions/createAvailabilityReceipt.md) - [createBranchPackage](functions/createBranchPackage.md) - [createEncryptedBranch](functions/createEncryptedBranch.md) - [createEncryptionEnvelope](functions/createEncryptionEnvelope.md) - [createKeyWrappingEnvelope](functions/createKeyWrappingEnvelope.md) - [createSigningRequest](functions/createSigningRequest.md) - [createSigningResponse](functions/createSigningResponse.md) - [createSigningSession](functions/createSigningSession.md) - [decryptBranch](functions/decryptBranch.md) - [deserializeBranchPackage](functions/deserializeBranchPackage.md) - [deserializeEncryptionEnvelope](functions/deserializeEncryptionEnvelope.md) - [deserializeKeyWrappingEnvelope](functions/deserializeKeyWrappingEnvelope.md) - [encryptedBranchPublicMetadata](functions/encryptedBranchPublicMetadata.md) - [findPolicyNode](functions/findPolicyNode.md) - [getActivePolicyRoot](functions/getActivePolicyRoot.md) - [getBranchesByAction](functions/getBranchesByAction.md) - [getBranchesByRole](functions/getBranchesByRole.md) - [getCriticalBranches](functions/getCriticalBranches.md) - [getPolicyLeaves](functions/getPolicyLeaves.md) - [getPolicyPath](functions/getPolicyPath.md) - [getRecoveryBranches](functions/getRecoveryBranches.md) - [isEncryptedBranch](functions/isEncryptedBranch.md) - [isMigrationActive](functions/isMigrationActive.md) - [isMigrationComplete](functions/isMigrationComplete.md) - [nowMs](functions/nowMs.md) - [nowSec](functions/nowSec.md) - [parseContentKey](functions/parseContentKey.md) - [policyManifestKey](functions/policyManifestKey.md) - [proofKey](functions/proofKey.md) - [queryPolicies](functions/queryPolicies.md) - [receiptCoversBranch](functions/receiptCoversBranch.md) - [receiptCoversInventory](functions/receiptCoversInventory.md) - [recordEvidence](functions/recordEvidence.md) - [resolvePolicyForSubject](functions/resolvePolicyForSubject.md) - [roundBasedWorkflow](functions/roundBasedWorkflow.md) - [scriptKey](functions/scriptKey.md) - [serializeBranchPackage](functions/serializeBranchPackage.md) - [serializeEncryptionEnvelope](functions/serializeEncryptionEnvelope.md) - [serializeKeyWrappingEnvelope](functions/serializeKeyWrappingEnvelope.md) - [sessionSummary](functions/sessionSummary.md) - [signAvailabilityReceipt](functions/signAvailabilityReceipt.md) - [signPolicyManifest](functions/signPolicyManifest.md) - [splitPolicyManifest](functions/splitPolicyManifest.md) - [submitSession](functions/submitSession.md) - [timelockWorkflow](functions/timelockWorkflow.md) - [toDelegationChainScript](functions/toDelegationChainScript.md) - [toMigrationPathScript](functions/toMigrationPathScript.md) - [toMinimaProofExpression](functions/toMinimaProofExpression.md) - [toNestedMastScript](functions/toNestedMastScript.md) - [~~toProofExpression~~](functions/toProofExpression.md) - [~~toTotemProofExpression~~](functions/toTotemProofExpression.md) - [unixTimeMsToSec](functions/unixTimeMsToSec.md) - [unixTimeSecToMs](functions/unixTimeSecToMs.md) - [validateInventoryCoverage](functions/validateInventoryCoverage.md) - [verifyAvailabilityReceipt](functions/verifyAvailabilityReceipt.md) - [~~verifyBranchPackage~~](functions/verifyBranchPackage.md) - [verifyDelegationChain](functions/verifyDelegationChain.md) - [verifyProofChain](functions/verifyProofChain.md) - [verifyScriptMembership](functions/verifyScriptMembership.md) - [verifySigningRequest](functions/verifySigningRequest.md) - [vestingWorkflow](functions/vestingWorkflow.md) - [watchPolicy](functions/watchPolicy.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-root-identity/index **@totemsdk/root-identity** *** **Maturity: v1** # @totemsdk/root-identity ## Classes - [UnifiedIdentityWallet](classes/UnifiedIdentityWallet.md) ## Interfaces - [OwnershipProof](interfaces/OwnershipProof.md) - [WotsProof](interfaces/WotsProof.md) ## Variables - [MAX\_CHILD\_COUNT](variables/MAX_CHILD_COUNT.md) ## References ### RootIdentityWallet Renames and re-exports [UnifiedIdentityWallet](classes/UnifiedIdentityWallet.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-se-server/index **@totemsdk/se-server** *** **Maturity: rc** # @totemsdk/se-server ## Interfaces - [SeServer](interfaces/SeServer.md) - [SeServerConfig](interfaces/SeServerConfig.md) - [SeSignEvent](interfaces/SeSignEvent.md) - [StatechainRecord](interfaces/StatechainRecord.md) - [TimelockAlert](interfaces/TimelockAlert.md) ## Variables - [SE\_API\_VERSION](variables/SE_API_VERSION.md) ## Functions - [consumeNonce](functions/consumeNonce.md) - [createSeRouter](functions/createSeRouter.md) - [createSeServer](functions/createSeServer.md) - [createTimelockMonitor](functions/createTimelockMonitor.md) - [decryptReclaimTx](functions/decryptReclaimTx.md) - [encryptReclaimTx](functions/encryptReclaimTx.md) - [getApproachingTimelockChains](functions/getApproachingTimelockChains.md) - [getPublicKeyHex](functions/getPublicKeyHex.md) - [getPublicKeyHexAsync](functions/getPublicKeyHexAsync.md) - [getStatechainRecord](functions/getStatechainRecord.md) - [insertRevocation](functions/insertRevocation.md) - [insertStatechainRecord](functions/insertStatechainRecord.md) - [isRevoked](functions/isRevoked.md) - [issueNonce](functions/issueNonce.md) - [loadConfigFromEnv](functions/loadConfigFromEnv.md) - [logSignEvent](functions/logSignEvent.md) - [migrateStatechainTables](functions/migrateStatechainTables.md) - [seSign](functions/seSign.md) - [updateStatechainOwner](functions/updateStatechainOwner.md) - [updateStatechainStatus](functions/updateStatechainStatus.md) - [wotsVerifyDigestAsync](functions/wotsVerifyDigestAsync.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-server/index **@totemsdk/server** *** **Maturity: v1** # @totemsdk/server ## Classes - [ConsoleLogger](classes/ConsoleLogger.md) - [DefaultTimerAdapter](classes/DefaultTimerAdapter.md) - [EnvironmentAuthProvider](classes/EnvironmentAuthProvider.md) - [ExchangeHelper](classes/ExchangeHelper.md) - [FileStorageAdapter](classes/FileStorageAdapter.md) - [FlashCashHelper](classes/FlashCashHelper.md) - [HTLCHelper](classes/HTLCHelper.md) - [InMemoryAuthProvider](classes/InMemoryAuthProvider.md) - [LeaseMonitor](classes/LeaseMonitor.md) - [LeaseStore](classes/LeaseStore.md) - [MASTHelper](classes/MASTHelper.md) - [MemoryStorageAdapter](classes/MemoryStorageAdapter.md) - [MinimaClient](classes/MinimaClient.md) - [MinimaProvider](classes/MinimaProvider.md) - [MinimaWallet](classes/MinimaWallet.md) - [MiniNumber](classes/MiniNumber.md) - [MMRTree](classes/MMRTree.md) - [NodeConfigProvider](classes/NodeConfigProvider.md) - [NodeCryptoAdapter](classes/NodeCryptoAdapter.md) - [NodeHttpClient](classes/NodeHttpClient.md) - [NodeWebSocketFactory](classes/NodeWebSocketFactory.md) - [NoopLifecycleAdapter](classes/NoopLifecycleAdapter.md) - [NoopLogger](classes/NoopLogger.md) - [NoopMetrics](classes/NoopMetrics.md) - [SlowCashHelper](classes/SlowCashHelper.md) - [StatefulGameHelper](classes/StatefulGameHelper.md) - [StorageAuthProvider](classes/StorageAuthProvider.md) - [TimelockHelper](classes/TimelockHelper.md) - [TransactionLifecycle](classes/TransactionLifecycle.md) - [TransactionLifecycleError](classes/TransactionLifecycleError.md) - [TransactionReceiptStore](classes/TransactionReceiptStore.md) - [TransactionService](classes/TransactionService.md) - [TreeKey](classes/TreeKey.md) - [TreeKeyNode](classes/TreeKeyNode.md) - [VaultHelper](classes/VaultHelper.md) - [WatermarkExhaustedError](classes/WatermarkExhaustedError.md) - [WatermarkStore](classes/WatermarkStore.md) ## Interfaces - [AdapterRegistry](interfaces/AdapterRegistry.md) - [AuthTokenProvider](interfaces/AuthTokenProvider.md) - [CancellationToken](interfaces/CancellationToken.md) - [CancellationTokenSource](interfaces/CancellationTokenSource.md) - [CoinProofData](interfaces/CoinProofData.md) - [ConfigProvider](interfaces/ConfigProvider.md) - [CreateNodeAdaptersOptions](interfaces/CreateNodeAdaptersOptions.md) - [CreateServerAdaptersOptions](interfaces/CreateServerAdaptersOptions.md) - [CryptoAdapter](interfaces/CryptoAdapter.md) - [DAppContractCallParams](interfaces/DAppContractCallParams.md) - [DAppHtlcParams](interfaces/DAppHtlcParams.md) - [DAppLiquidityParams](interfaces/DAppLiquidityParams.md) - [DAppMultisigParams](interfaces/DAppMultisigParams.md) - [DAppStateVariable](interfaces/DAppStateVariable.md) - [DAppSwapParams](interfaces/DAppSwapParams.md) - [DAppTimelockParams](interfaces/DAppTimelockParams.md) - [DAppTransactionInput](interfaces/DAppTransactionInput.md) - [DAppTransactionOutput](interfaces/DAppTransactionOutput.md) - [EnvironmentConfigMapping](interfaces/EnvironmentConfigMapping.md) - [ExternalSignature](interfaces/ExternalSignature.md) - [FileStorageAdapterOptions](interfaces/FileStorageAdapterOptions.md) - [FinalizeRequest](interfaces/FinalizeRequest.md) - [FinalizeResponse](interfaces/FinalizeResponse.md) - [FlatMMRProofChunk](interfaces/FlatMMRProofChunk.md) - [HierarchicalWitnessBundle](interfaces/HierarchicalWitnessBundle.md) - [HttpClient](interfaces/HttpClient.md) - [HttpRequestOptions](interfaces/HttpRequestOptions.md) - [HttpResponse](interfaces/HttpResponse.md) - [JavaMMRData](interfaces/JavaMMRData.md) - [JavaMMREntry](interfaces/JavaMMREntry.md) - [JavaMMREntryNumber](interfaces/JavaMMREntryNumber.md) - [KeyGenProgress](interfaces/KeyGenProgress.md) - [LeaseExpiryEvent](interfaces/LeaseExpiryEvent.md) - [LeaseMonitorConfig](interfaces/LeaseMonitorConfig.md) - [LeaseStoreConfig](interfaces/LeaseStoreConfig.md) - [LeaseWotsIndices](interfaces/LeaseWotsIndices.md) - [LegacyMMRProof](interfaces/LegacyMMRProof.md) - [LifecycleAdapter](interfaces/LifecycleAdapter.md) - [LoggerAdapter](interfaces/LoggerAdapter.md) - [MetricsAdapter](interfaces/MetricsAdapter.md) - [MinimaCoin](interfaces/MinimaCoin.md) - [MinimaToken](interfaces/MinimaToken.md) - [MinimaTransaction](interfaces/MinimaTransaction.md) - [MMRData](interfaces/MMRData.md) - [MMREntry](interfaces/MMREntry.md) - [MMRProof](interfaces/MMRProof.md) - [MMRProofChunk](interfaces/MMRProofChunk.md) - [NodeConfigOptions](interfaces/NodeConfigOptions.md) - [NodeHttpClientOptions](interfaces/NodeHttpClientOptions.md) - [ParsedMiniNumber](interfaces/ParsedMiniNumber.md) - [PrepareRequest](interfaces/PrepareRequest.md) - [PrepareResponse](interfaces/PrepareResponse.md) - [PrepareResult](interfaces/PrepareResult.md) - [RawStateVariable](interfaces/RawStateVariable.md) - [ScriptCatalogEntry](interfaces/ScriptCatalogEntry.md) - [ScriptDescriptor](interfaces/ScriptDescriptor.md) - [ScriptProofResult](interfaces/ScriptProofResult.md) - [SendParams](interfaces/SendParams.md) - [SendResult](interfaces/SendResult.md) - [SignatureProof](interfaces/SignatureProof.md) - [SignRequest](interfaces/SignRequest.md) - [SignResult](interfaces/SignResult.md) - [SiteTransactionPermission](interfaces/SiteTransactionPermission.md) - [SpendableCoinInput](interfaces/SpendableCoinInput.md) - [StateValue](interfaces/StateValue.md) - [StateVariable](interfaces/StateVariable.md) - [StorageAdapter](interfaces/StorageAdapter.md) - [StorageAuthProviderOptions](interfaces/StorageAuthProviderOptions.md) - [StoredLease](interfaces/StoredLease.md) - [SyncResult](interfaces/SyncResult.md) - [TimerAdapter](interfaces/TimerAdapter.md) - [TotemSendTransactionRequest](interfaces/TotemSendTransactionRequest.md) - [TotemSendTransactionResponse](interfaces/TotemSendTransactionResponse.md) - [TransactionBuildResult](interfaces/TransactionBuildResult.md) - [TransactionError](interfaces/TransactionError.md) - [TransactionLifecycleConfig](interfaces/TransactionLifecycleConfig.md) - [TransactionMetadata](interfaces/TransactionMetadata.md) - [TransactionReceipt](interfaces/TransactionReceipt.md) - [TransactionReceiptStoreConfig](interfaces/TransactionReceiptStoreConfig.md) - [TransactionRoundState](interfaces/TransactionRoundState.md) - [TransactionScope](interfaces/TransactionScope.md) - [TransactionServiceConfig](interfaces/TransactionServiceConfig.md) - [TreeSignature](interfaces/TreeSignature.md) - [VerificationResult](interfaces/VerificationResult.md) - [VerifyOutExpectation](interfaces/VerifyOutExpectation.md) - [WatermarkState](interfaces/WatermarkState.md) - [WatermarkStoreConfig](interfaces/WatermarkStoreConfig.md) - [WatermarkSyncFunction](interfaces/WatermarkSyncFunction.md) - [WebSocketClient](interfaces/WebSocketClient.md) - [WebSocketCloseEvent](interfaces/WebSocketCloseEvent.md) - [WebSocketErrorEvent](interfaces/WebSocketErrorEvent.md) - [WebSocketFactory](interfaces/WebSocketFactory.md) - [WebSocketFactoryOptions](interfaces/WebSocketFactoryOptions.md) - [WebSocketMessageEvent](interfaces/WebSocketMessageEvent.md) - [WebSocketOpenEvent](interfaces/WebSocketOpenEvent.md) - [~~WitnessBundle~~](interfaces/WitnessBundle.md) - [WotsIndices](interfaces/WotsIndices.md) - [~~WotsSigningDependencies~~](interfaces/WotsSigningDependencies.md) ## Type Aliases - [BinaryData](type-aliases/BinaryData.md) - [Bytes](type-aliases/Bytes.md) - [DAppTransactionIntent](type-aliases/DAppTransactionIntent.md) - [LeaseExpiryCallback](type-aliases/LeaseExpiryCallback.md) - [LeaseStatus](type-aliases/LeaseStatus.md) - [ParamSet](type-aliases/ParamSet.md) - [PrepareArgs](type-aliases/PrepareArgs.md) - [PrepareResp](type-aliases/PrepareResp.md) - [ProgressCallback](type-aliases/ProgressCallback.md) - [ScriptType](type-aliases/ScriptType.md) - [StateVariableType](type-aliases/StateVariableType.md) - [TimerHandle](type-aliases/TimerHandle.md) - [TotemTransactionErrorCode](type-aliases/TotemTransactionErrorCode.md) - [WebSocketEventMap](type-aliases/WebSocketEventMap.md) - [WotsKeypair](type-aliases/WotsKeypair.md) - [WotsSignature](type-aliases/WotsSignature.md) ## Variables - [bytesToHex](variables/bytesToHex.md) - [computeTransactionDigest](variables/computeTransactionDigest.md) - [concatBytes](variables/concatBytes.md) - [CORE\_BUILD\_ID](variables/CORE_BUILD_ID.md) - [CORE\_VERSION](variables/CORE_VERSION.md) - [createChallenge](variables/createChallenge.md) - [DEFAULT\_KEYS\_PER\_LEVEL](variables/DEFAULT_KEYS_PER_LEVEL.md) - [DEFAULT\_LEVELS](variables/DEFAULT_LEVELS.md) - [deriveChainSeedJava](variables/deriveChainSeedJava.md) - [deriveFullPublicKey](variables/deriveFullPublicKey.md) - [derivePerAddressSeed](variables/derivePerAddressSeed.md) - [derivePKdigest](variables/derivePKdigest.md) - [deriveRootPrivSeed](variables/deriveRootPrivSeed.md) - [~~deserializeMMRProof~~](variables/deserializeMMRProof.md) - [expandPrivateKey](variables/expandPrivateKey.md) - [F](variables/F.md) - [fromHex](variables/fromHex.md) - [h](variables/h.md) - [hashChain](variables/hashChain.md) - [hex](variables/hex.md) - [hexToBytes](variables/hexToBytes.md) - [makeMxAddress](variables/makeMxAddress.md) - [MINIMA\_CONSTANTS](variables/MINIMA_CONSTANTS.md) - [mmrRootFromPublicKeys](variables/mmrRootFromPublicKeys.md) - [parseMxAddress](variables/parseMxAddress.md) - [precomputeTransactionCoinID](variables/precomputeTransactionCoinID.md) - [serializeRealMMRProof](variables/serializeRealMMRProof.md) - [serializeTransaction](variables/serializeTransaction.md) - [sha3\_256](variables/sha3_256.md) - [STATETYPE\_BOOL](variables/STATETYPE_BOOL.md) - [STATETYPE\_HEX](variables/STATETYPE_HEX.md) - [STATETYPE\_NUMBER](variables/STATETYPE_NUMBER.md) - [STATETYPE\_STRING](variables/STATETYPE_STRING.md) - [timingSafeEqual](variables/timingSafeEqual.md) - [TOTEM\_SEND\_TRANSACTION\_VERSION](variables/TOTEM_SEND_TRANSACTION_VERSION.md) - [u16be](variables/u16be.md) - [u32be](variables/u32be.md) - [validateChallenge](variables/validateChallenge.md) - [verifyMMRProof](variables/verifyMMRProof.md) - [WebSocketReadyState](variables/WebSocketReadyState.md) - [WORD\_LIST](variables/WORD_LIST.md) - [WOTS\_MINIMA](variables/WOTS_MINIMA.md) - [WOTS\_V1\_DEV](variables/WOTS_V1_DEV.md) - [WOTS\_V2\_SPEC](variables/WOTS_V2_SPEC.md) - [wotsPkFromSig](variables/wotsPkFromSig.md) - [wotsPublicKeyFromSeed](variables/wotsPublicKeyFromSeed.md) - [wotsSign](variables/wotsSign.md) - [wotsVerify](variables/wotsVerify.md) - [wotsVerifyDigest](variables/wotsVerifyDigest.md) - [writeMiniData](variables/writeMiniData.md) - [writeMiniString](variables/writeMiniString.md) ## Functions - [addressToRoot](functions/addressToRoot.md) - [aggregateSignatures](functions/aggregateSignatures.md) - [assert32](functions/assert32.md) - [baseWWithChecksum](functions/baseWWithChecksum.md) - [bigIntToByteArray](functions/bigIntToByteArray.md) - [buildMinimaCoin](functions/buildMinimaCoin.md) - [buildScriptProofFromDescriptor](functions/buildScriptProofFromDescriptor.md) - [bytesToUtf8](functions/bytesToUtf8.md) - [calculateProofRoot](functions/calculateProofRoot.md) - [canonicalJson](functions/canonicalJson.md) - [cleanSeedPhrase](functions/cleanSeedPhrase.md) - [computeScriptAddress](functions/computeScriptAddress.md) - [concat](functions/concat.md) - [convertFlatChunkToSDK](functions/convertFlatChunkToSDK.md) - [convertLegacyProofToSDK](functions/convertLegacyProofToSDK.md) - [convertStringToSeed](functions/convertStringToSeed.md) - [convertWordListToSeed](functions/convertWordListToSeed.md) - [createAdapterRegistry](functions/createAdapterRegistry.md) - [createAuthedNodeHttpClient](functions/createAuthedNodeHttpClient.md) - [createCancellationToken](functions/createCancellationToken.md) - [createConfigFromEnv](functions/createConfigFromEnv.md) - [createDefaultTransaction](functions/createDefaultTransaction.md) - [createEmptyMMRProof](functions/createEmptyMMRProof.md) - [createExchangeDescriptor](functions/createExchangeDescriptor.md) - [createFlashCashDescriptor](functions/createFlashCashDescriptor.md) - [createHTLCDescriptor](functions/createHTLCDescriptor.md) - [createMASTDescriptor](functions/createMASTDescriptor.md) - [createMMRDataLeafNode](functions/createMMRDataLeafNode.md) - [createMMRDataParentNode](functions/createMMRDataParentNode.md) - [createMMREntryNumber](functions/createMMREntryNumber.md) - [createMofNMultisigDescriptor](functions/createMofNMultisigDescriptor.md) - [createMultisigDescriptor](functions/createMultisigDescriptor.md) - [createNodeAdapters](functions/createNodeAdapters.md) - [~~createPerAddressTreeKey~~](functions/createPerAddressTreeKey.md) - [~~createPerAddressTreeKeyAsync~~](functions/createPerAddressTreeKeyAsync.md) - [createServerAdapters](functions/createServerAdapters.md) - [createSignedByDescriptor](functions/createSignedByDescriptor.md) - [createSlowCashDescriptor](functions/createSlowCashDescriptor.md) - [createTimelockDescriptor](functions/createTimelockDescriptor.md) - [createUnifiedChildTreeKey](functions/createUnifiedChildTreeKey.md) - [createUnifiedChildTreeKeyAsync](functions/createUnifiedChildTreeKeyAsync.md) - [createUnifiedRootTreeKey](functions/createUnifiedRootTreeKey.md) - [deduplicateScriptDescriptors](functions/deduplicateScriptDescriptors.md) - [deriveAddressFromPublicKey](functions/deriveAddressFromPublicKey.md) - [deriveChildTreeSeedJava](functions/deriveChildTreeSeedJava.md) - [deriveUnifiedAddressPublicKey](functions/deriveUnifiedAddressPublicKey.md) - [deriveUnifiedChildSeed](functions/deriveUnifiedChildSeed.md) - [deserializeTreeSignature](functions/deserializeTreeSignature.md) - [encodeMiniData](functions/encodeMiniData.md) - [encodeMiniNumber](functions/encodeMiniNumber.md) - [encodeMiniString](functions/encodeMiniString.md) - [encodeStateValue](functions/encodeStateValue.md) - [finalizeLease](functions/finalizeLease.md) - [flatIndexFromLanes](functions/flatIndexFromLanes.md) - [generateSeedPhrase](functions/generateSeedPhrase.md) - [generateWordList](functions/generateWordList.md) - [getParamSet](functions/getParamSet.md) - [getRootPublicKey](functions/getRootPublicKey.md) - [hashAllObjects](functions/hashAllObjects.md) - [hashCanonical](functions/hashCanonical.md) - [hashObject](functions/hashObject.md) - [indexToMiniDataBytes](functions/indexToMiniDataBytes.md) - [javaHashAllObjects](functions/javaHashAllObjects.md) - [mmrLeafExact](functions/mmrLeafExact.md) - [mmrRootFromSingleLeaf](functions/mmrRootFromSingleLeaf.md) - [mxToHex](functions/mxToHex.md) - [normalizeHex](functions/normalizeHex.md) - [parseDecimalToMiniNumber](functions/parseDecimalToMiniNumber.md) - [parseMMRProofFromHex](functions/parseMMRProofFromHex.md) - [phraseToSeed](functions/phraseToSeed.md) - [prepareLease](functions/prepareLease.md) - [~~prfChainSeed~~](functions/prfChainSeed.md) - [scriptFromWotsPk](functions/scriptFromWotsPk.md) - [scriptToAddress](functions/scriptToAddress.md) - [sendTransaction](functions/sendTransaction.md) - [serializeCoin](functions/serializeCoin.md) - [serializeExtraScripts](functions/serializeExtraScripts.md) - [serializeMiniData](functions/serializeMiniData.md) - [serializeMiniNumber](functions/serializeMiniNumber.md) - [serializeMiniNumberONE](functions/serializeMiniNumberONE.md) - [serializeMiniNumberZERO](functions/serializeMiniNumberZERO.md) - [serializeMMRData](functions/serializeMMRData.md) - [serializeMMREntry](functions/serializeMMREntry.md) - [serializeMMREntryNumber](functions/serializeMMREntryNumber.md) - [serializeMMRProof](functions/serializeMMRProof.md) - [serializeMMRProofChunk](functions/serializeMMRProofChunk.md) - [serializeScriptProofWithProof](functions/serializeScriptProofWithProof.md) - [serializeStateVariables](functions/serializeStateVariables.md) - [serializeTreeSignature](functions/serializeTreeSignature.md) - [simpleTotemSendRequest](functions/simpleTotemSendRequest.md) - [toHex](functions/toHex.md) - [toWinternitzDigits](functions/toWinternitzDigits.md) - [utf8ToBytes](functions/utf8ToBytes.md) - [validateExternalSignature](functions/validateExternalSignature.md) - [validatePhrase](functions/validatePhrase.md) - [validateSendTransactionRequest](functions/validateSendTransactionRequest.md) - [verifySignature](functions/verifySignature.md) - [verifySignatureDetailed](functions/verifySignatureDetailed.md) - [verifyTreeSignature](functions/verifyTreeSignature.md) - [verifyTreeSignatureDetailed](functions/verifyTreeSignatureDetailed.md) - [wotsAddressFromKeypair](functions/wotsAddressFromKeypair.md) - [wotsKeypairFromSeed](functions/wotsKeypairFromSeed.md) - [wotsSignLegacy](functions/wotsSignLegacy.md) - [writeHashToStream](functions/writeHashToStream.md) - [writeMiniByte](functions/writeMiniByte.md) - [writeMiniNumber](functions/writeMiniNumber.md) - [writeMMREntryNumber](functions/writeMMREntryNumber.md) ## References ### decodeMx Renames and re-exports [parseMxAddress](variables/parseMxAddress.md) *** ### encodeMx Renames and re-exports [makeMxAddress](variables/makeMxAddress.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-statechain/index **@totemsdk/statechain** *** **Maturity: rc** # @totemsdk/statechain ## Classes - [HttpSEClient](classes/HttpSEClient.md) - [SENotFoundError](classes/SENotFoundError.md) ## Interfaces - [AbandonedProof](interfaces/AbandonedProof.md) - [ClaimPayload](interfaces/ClaimPayload.md) - [DurableStateChainStore](interfaces/DurableStateChainStore.md) - [DurableStateChainStoreOptions](interfaces/DurableStateChainStoreOptions.md) - [HttpSEClientOptions](interfaces/HttpSEClientOptions.md) - [RecoveryReport](interfaces/RecoveryReport.md) - [ResolveSEClientOptions](interfaces/ResolveSEClientOptions.md) - [SEClient](interfaces/SEClient.md) - [SERegistryEntry](interfaces/SERegistryEntry.md) - [StateChain](interfaces/StateChain.md) - [StatechainLeaseOps](interfaces/StatechainLeaseOps.md) - [StatechainLeaseProvider](interfaces/StatechainLeaseProvider.md) - [StatechainOwner](interfaces/StatechainOwner.md) - [StateChainRegistryState](interfaces/StateChainRegistryState.md) - [TransferRecord](interfaces/TransferRecord.md) - [VerifyOptions](interfaces/VerifyOptions.md) - [VerifyResult](interfaces/VerifyResult.md) ## Type Aliases - [StatechainStatus](type-aliases/StatechainStatus.md) - [StoredStateChain](type-aliases/StoredStateChain.md) - [StoredStatechainOwner](type-aliases/StoredStatechainOwner.md) ## Variables - [RECLAIM\_TIMELOCK](variables/RECLAIM_TIMELOCK.md) - [STATECHAIN\_RECORD\_VERSION](variables/STATECHAIN_RECORD_VERSION.md) ## Functions - [buildStatechainScript](functions/buildStatechainScript.md) - [claimOwnership](functions/claimOwnership.md) - [clearSeRegistryCache](functions/clearSeRegistryCache.md) - [createDurableStateChainStore](functions/createDurableStateChainStore.md) - [createStateChain](functions/createStateChain.md) - [fetchSeRegistry](functions/fetchSeRegistry.md) - [reclaimAbandoned](functions/reclaimAbandoned.md) - [resolveSEClient](functions/resolveSEClient.md) - [scriptAddress](functions/scriptAddress.md) - [transferOwnership](functions/transferOwnership.md) - [verifyStateChain](functions/verifyStateChain.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-stream-transport/index **@totemsdk/stream-transport** *** **Maturity: rc** # @totemsdk/stream-transport ## Classes - [ClosedTransportError](classes/ClosedTransportError.md) - [HyperswarmStreamTransport](classes/HyperswarmStreamTransport.md) - [InMemoryTransport](classes/InMemoryTransport.md) - [NodeStreamTransport](classes/NodeStreamTransport.md) - [StdioStreamTransport](classes/StdioStreamTransport.md) - [WebRTCDataChannelTransport](classes/WebRTCDataChannelTransport.md) - [WebSocketTransport](classes/WebSocketTransport.md) ## Interfaces - [HyperswarmTransportConfig](interfaces/HyperswarmTransportConfig.md) - [IStreamTransport](interfaces/IStreamTransport.md) - [StdioStreamTransportOptions](interfaces/StdioStreamTransportOptions.md) ## Type Aliases - [CloseHandler](type-aliases/CloseHandler.md) - [DataHandler](type-aliases/DataHandler.md) - [ErrorHandler](type-aliases/ErrorHandler.md) - [TransportState](type-aliases/TransportState.md) ## Functions - [broadcastTopic](functions/broadcastTopic.md) - [channelTopic](functions/channelTopic.md) - [createHyperswarmTransport](functions/createHyperswarmTransport.md) - [createInMemoryPair](functions/createInMemoryPair.md) - [createWebSocketTransport](functions/createWebSocketTransport.md) - [peerTopic](functions/peerTopic.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-tx-builder/index **@totemsdk/tx-builder** *** **Maturity: rc** # @totemsdk/tx-builder ## Classes - [CoinSelectionError](classes/CoinSelectionError.md) - [CoinSelectionService](classes/CoinSelectionService.md) - [MultisigManager](classes/MultisigManager.md) - [MultisigStorageError](classes/MultisigStorageError.md) ## Interfaces - [BuildPoolFundTxParams](interfaces/BuildPoolFundTxParams.md) - [CoinFetcher](interfaces/CoinFetcher.md) - [CoinSelectionOptions](interfaces/CoinSelectionOptions.md) - [CoinSelectionResult](interfaces/CoinSelectionResult.md) - [DeepFundingProof](interfaces/DeepFundingProof.md) - [EnhancedBuildParams](interfaces/EnhancedBuildParams.md) - [EnhancedCoinInput](interfaces/EnhancedCoinInput.md) - [EnhancedCoinOutput](interfaces/EnhancedCoinOutput.md) - [MultisigConfig](interfaces/MultisigConfig.md) - [MultisigExportData](interfaces/MultisigExportData.md) - [PendingMultisigTransaction](interfaces/PendingMultisigTransaction.md) - [PoolFundBuildResult](interfaces/PoolFundBuildResult.md) - [PoolFundTx](interfaces/PoolFundTx.md) - [PoolFundVerification](interfaces/PoolFundVerification.md) - [ScriptProofWitnessInput](interfaces/ScriptProofWitnessInput.md) - [SignatureWitnessInput](interfaces/SignatureWitnessInput.md) - [SpendableCoin](interfaces/SpendableCoin.md) - [StorageAdapter](interfaces/StorageAdapter.md) - [TokenProofWitnessInput](interfaces/TokenProofWitnessInput.md) - [TransactionWitnessDescriptor](interfaces/TransactionWitnessDescriptor.md) ## Type Aliases - [SendMode](type-aliases/SendMode.md) - [StoragePort](type-aliases/StoragePort.md) ## Variables - [POOL\_FUND\_DOMAIN](variables/POOL_FUND_DOMAIN.md) ## Functions - [addDecimalStrings](functions/addDecimalStrings.md) - [addDecimalStringsWasm](functions/addDecimalStringsWasm.md) - [addressFromPkDigest](functions/addressFromPkDigest.md) - [bigIntToDecimalString](functions/bigIntToDecimalString.md) - [buildPoolFundTx](functions/buildPoolFundTx.md) - [compareDecimal](functions/compareDecimal.md) - [compareDecimalWasm](functions/compareDecimalWasm.md) - [computeMultisigAddressWasm](functions/computeMultisigAddressWasm.md) - [hashPoolFundTx](functions/hashPoolFundTx.md) - [isPositive](functions/isPositive.md) - [isPositiveWasm](functions/isPositiveWasm.md) - [orderCoinsByAmountWasm](functions/orderCoinsByAmountWasm.md) - [parseDecimalToBigInt](functions/parseDecimalToBigInt.md) - [recomputeDigestWasm](functions/recomputeDigestWasm.md) - [selectCoinsWasm](functions/selectCoinsWasm.md) - [sha3\_256\_hexWasm](functions/sha3_256_hexWasm.md) - [subtractDecimalStrings](functions/subtractDecimalStrings.md) - [subtractDecimalStringsWasm](functions/subtractDecimalStringsWasm.md) - [toProofHex](functions/toProofHex.md) - [verifyPoolFundTx](functions/verifyPoolFundTx.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-txpow/index **@totemsdk/txpow** *** **Maturity: v1** # @totemsdk/txpow ## Interfaces - [MachineWorkAction](interfaces/MachineWorkAction.md) - [MachineWorkAdmissionProof](interfaces/MachineWorkAdmissionProof.md) - [MineOptions](interfaces/MineOptions.md) - [MineResult](interfaces/MineResult.md) - [MineWorkAdmissionOptions](interfaces/MineWorkAdmissionOptions.md) - [MinimaWorkRelay](interfaces/MinimaWorkRelay.md) - [MinimaWorkTemplate](interfaces/MinimaWorkTemplate.md) - [MinimaWorkTemplateProvider](interfaces/MinimaWorkTemplateProvider.md) - [MiningEstimate](interfaces/MiningEstimate.md) - [TxBodyOptions](interfaces/TxBodyOptions.md) - [TxHeaderOptions](interfaces/TxHeaderOptions.md) - [TxPowParams](interfaces/TxPowParams.md) - [VerifyResult](interfaces/VerifyResult.md) - [VerifyWorkAdmissionOptions](interfaces/VerifyWorkAdmissionOptions.md) - [WorkAdmissionVerification](interfaces/WorkAdmissionVerification.md) - [WorkChallenge](interfaces/WorkChallenge.md) ## Type Aliases - [TxPoWOptions](type-aliases/TxPoWOptions.md) ## Variables - [CASCADE\_LEVELS](variables/CASCADE_LEVELS.md) - [DEFAULT\_CHALLENGE\_TTL\_MS](variables/DEFAULT_CHALLENGE_TTL_MS.md) - [MACHINE\_WORK\_ADMISSION\_VERSION](variables/MACHINE_WORK_ADMISSION_VERSION.md) - [MACHINE\_WORK\_DOMAIN](variables/MACHINE_WORK_DOMAIN.md) - [MAIN\_NET\_CHAIN\_ID](variables/MAIN_NET_CHAIN_ID.md) - [MAX\_CHALLENGE\_TTL\_MS](variables/MAX_CHALLENGE_TTL_MS.md) - [MAX\_HASH](variables/MAX_HASH.md) - [TX\_POW\_MIN\_DIFFICULTY](variables/TX_POW_MIN_DIFFICULTY.md) - [ZERO\_HASH](variables/ZERO_HASH.md) ## Functions - [assembleTxPoWEnvelope](functions/assembleTxPoWEnvelope.md) - [buildBlockHeaderTail](functions/buildBlockHeaderTail.md) - [buildEmptyBlockBody](functions/buildEmptyBlockBody.md) - [buildEmptyBurnTxBytes](functions/buildEmptyBurnTxBytes.md) - [buildEmptyBurnWitnessBytes](functions/buildEmptyBurnWitnessBytes.md) - [buildEmptyTransactionBytes](functions/buildEmptyTransactionBytes.md) - [buildEmptyWitnessBytes](functions/buildEmptyWitnessBytes.md) - [buildHeaderTail](functions/buildHeaderTail.md) - [calibrateHashRate](functions/calibrateHashRate.md) - [canonicalAction](functions/canonicalAction.md) - [canonicalChallenge](functions/canonicalChallenge.md) - [challengeFingerprint](functions/challengeFingerprint.md) - [computeActionCommitment](functions/computeActionCommitment.md) - [computeBlockCandidateId](functions/computeBlockCandidateId.md) - [computeSuperLevel](functions/computeSuperLevel.md) - [computeTxPoWId](functions/computeTxPoWId.md) - [createWorkChallenge](functions/createWorkChallenge.md) - [estimateMiningCost](functions/estimateMiningCost.md) - [fetchTxPowTarget](functions/fetchTxPowTarget.md) - [getBrowserWasmUrl](functions/getBrowserWasmUrl.md) - [isBlockWinner](functions/isBlockWinner.md) - [isLessThan](functions/isLessThan.md) - [isWasmAvailable](functions/isWasmAvailable.md) - [mineHeaderTail](functions/mineHeaderTail.md) - [mineTxPoW](functions/mineTxPoW.md) - [mineTxPoWInProcess](functions/mineTxPoWInProcess.md) - [mineWorkAdmission](functions/mineWorkAdmission.md) - [reconstructTxPoWEnvelope](functions/reconstructTxPoWEnvelope.md) - [serializeMagic](functions/serializeMagic.md) - [serializeSuperParents](functions/serializeSuperParents.md) - [serializeTxBody](functions/serializeTxBody.md) - [serializeTxHeader](functions/serializeTxHeader.md) - [serializeTxPoW](functions/serializeTxPoW.md) - [setBrowserWorkerUrl](functions/setBrowserWorkerUrl.md) - [setWasmUrl](functions/setWasmUrl.md) - [templateFreshness](functions/templateFreshness.md) - [validateWorkChallenge](functions/validateWorkChallenge.md) - [verifyProofOfWork](functions/verifyProofOfWork.md) - [verifyTxPoWParts](functions/verifyTxPoWParts.md) - [verifyTxPoWWork](functions/verifyTxPoWWork.md) - [verifyWorkAdmission](functions/verifyWorkAdmission.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-wallet-adapter/index **@totemsdk/wallet-adapter** *** **Maturity: v1** # @totemsdk/wallet-adapter ## Classes - [TotemAdapterError](classes/TotemAdapterError.md) - [TotemWalletAdapter](classes/TotemWalletAdapter.md) ## Interfaces - [AccountEntry](interfaces/AccountEntry.md) - [AdapterProvider](interfaces/AdapterProvider.md) - [ChainProviderLike](interfaces/ChainProviderLike.md) - [ConnectResponse](interfaces/ConnectResponse.md) - [DisconnectResponse](interfaces/DisconnectResponse.md) - [GetAccountsResponse](interfaces/GetAccountsResponse.md) - [SignDataParams](interfaces/SignDataParams.md) - [SignDataResponse](interfaces/SignDataResponse.md) - [SignTransactionParams](interfaces/SignTransactionParams.md) - [SignTransactionResponse](interfaces/SignTransactionResponse.md) - [VerifyResponse](interfaces/VerifyResponse.md) - [WalletAdapterConfig](interfaces/WalletAdapterConfig.md) - [WalletCapabilities](interfaces/WalletCapabilities.md) - [WalletInfo](interfaces/WalletInfo.md) ## Type Aliases - [ChainProviderFactory](type-aliases/ChainProviderFactory.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-wots-lease/index **@totemsdk/wots-lease** *** **Maturity: v1** # @totemsdk/wots-lease ## Classes - [AxiaLeaseProvider](classes/AxiaLeaseProvider.md) - [DeviceRangeViolationError](classes/DeviceRangeViolationError.md) - [HybridLeaseProvider](classes/HybridLeaseProvider.md) - [IndicesUnavailableError](classes/IndicesUnavailableError.md) - [LeaseJournal](classes/LeaseJournal.md) - [LeaseNotFoundError](classes/LeaseNotFoundError.md) - [LocalLeaseProvider](classes/LocalLeaseProvider.md) - [OnchainWatermarkError](classes/OnchainWatermarkError.md) - [OnchainWatermarkNotImplementedError](classes/OnchainWatermarkNotImplementedError.md) - [OnchainWatermarkProvider](classes/OnchainWatermarkProvider.md) - [P2PQuorumLeaseProvider](classes/P2PQuorumLeaseProvider.md) - [P2PQuorumNotImplementedError](classes/P2PQuorumNotImplementedError.md) - [PersonalLeaseNodeNotConfiguredError](classes/PersonalLeaseNodeNotConfiguredError.md) - [PersonalLeaseNodeProvider](classes/PersonalLeaseNodeProvider.md) - [QuorumConflictError](classes/QuorumConflictError.md) - [QuorumUnavailableError](classes/QuorumUnavailableError.md) - [WatermarkExhaustedError](classes/WatermarkExhaustedError.md) - [WatermarkMonotonicityError](classes/WatermarkMonotonicityError.md) - [WotsWatermarkStore](classes/WotsWatermarkStore.md) ## Interfaces - [AxiaLeaseProviderConfig](interfaces/AxiaLeaseProviderConfig.md) - [CertificateSigner](interfaces/CertificateSigner.md) - [ConflictRecord](interfaces/ConflictRecord.md) - [DeviceKeyRange](interfaces/DeviceKeyRange.md) - [HybridLeaseProviderConfig](interfaces/HybridLeaseProviderConfig.md) - [JournalEntry](interfaces/JournalEntry.md) - [LeaseCertificate](interfaces/LeaseCertificate.md) - [LeaseReservation](interfaces/LeaseReservation.md) - [LocalWatermark](interfaces/LocalWatermark.md) - [OnchainWatermarkProviderConfig](interfaces/OnchainWatermarkProviderConfig.md) - [P2PQuorumLeaseProviderConfig](interfaces/P2PQuorumLeaseProviderConfig.md) - [PersonalLeaseNodeConfig](interfaces/PersonalLeaseNodeConfig.md) - [QuorumAttestation](interfaces/QuorumAttestation.md) - [QuorumPeer](interfaces/QuorumPeer.md) - [ReserveParams](interfaces/ReserveParams.md) - [SigningIndices](interfaces/SigningIndices.md) - [SyncResult](interfaces/SyncResult.md) - [TreeWatermark](interfaces/TreeWatermark.md) - [WotsLeaseProvider](interfaces/WotsLeaseProvider.md) - [WotsWatermarkState](interfaces/WotsWatermarkState.md) ## Type Aliases - [LeaseStatus](type-aliases/LeaseStatus.md) - [UnavailableReason](type-aliases/UnavailableReason.md) ## Functions - [allocateDeviceRange](functions/allocateDeviceRange.md) - [deviceSlotForAddressIndex](functions/deviceSlotForAddressIndex.md) - [flatIndex](functions/flatIndex.md) - [fromFlatIndex](functions/fromFlatIndex.md) ## References ### ChainWatermarkProvider Renames and re-exports [OnchainWatermarkProvider](classes/OnchainWatermarkProvider.md) *** ### QuorumLeaseProvider Renames and re-exports [P2PQuorumLeaseProvider](classes/P2PQuorumLeaseProvider.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-edge-email/index **@totemsdk/edge-email** *** **Maturity: rc** # @totemsdk/edge-email ## Interfaces - [EmailAttachment](interfaces/EmailAttachment.md) - [EmailGateway](interfaces/EmailGateway.md) - [EmailGatewayConfig](interfaces/EmailGatewayConfig.md) - [EmailMessage](interfaces/EmailMessage.md) - [EmailPollBinding](interfaces/EmailPollBinding.md) - [EmailSensorBridge](interfaces/EmailSensorBridge.md) - [EmailSensorBridgeConfig](interfaces/EmailSensorBridgeConfig.md) - [EmailTransportPort](interfaces/EmailTransportPort.md) - [SendOptions](interfaces/SendOptions.md) ## Functions - [createEmailGateway](functions/createEmailGateway.md) - [createEmailSensorBridge](functions/createEmailSensorBridge.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-industrial-action/index **@totemsdk/industrial-action** *** **Maturity: rc** # @totemsdk/industrial-action ## Classes - [ActionCommitmentError](classes/ActionCommitmentError.md) - [ActionConditionError](classes/ActionConditionError.md) - [ActionDefinitionError](classes/ActionDefinitionError.md) - [ActionExecutionError](classes/ActionExecutionError.md) - [ActionGovernanceError](classes/ActionGovernanceError.md) - [ActionRegistry](classes/ActionRegistry.md) - [ActionValidationError](classes/ActionValidationError.md) - [IndustrialActionError](classes/IndustrialActionError.md) ## Interfaces - [ActionError](interfaces/ActionError.md) - [ActionExecution](interfaces/ActionExecution.md) - [ActionExecutor](interfaces/ActionExecutor.md) - [ActionHandler](interfaces/ActionHandler.md) - [ActionProposal](interfaces/ActionProposal.md) - [ActionReceipt](interfaces/ActionReceipt.md) - [ActionRegistryState](interfaces/ActionRegistryState.md) - [ActionSchema](interfaces/ActionSchema.md) - [ActionStorage](interfaces/ActionStorage.md) - [Condition](interfaces/Condition.md) - [ConditionResult](interfaces/ConditionResult.md) - [ContextField](interfaces/ContextField.md) - [ContextSchema](interfaces/ContextSchema.md) - [CreateProposalParams](interfaces/CreateProposalParams.md) - [DurableActionStorage](interfaces/DurableActionStorage.md) - [DurableActionStorageOptions](interfaces/DurableActionStorageOptions.md) - [ExecuteActionResult](interfaces/ExecuteActionResult.md) - [GovernanceBridge](interfaces/GovernanceBridge.md) - [IndustrialActionDefinition](interfaces/IndustrialActionDefinition.md) - [ParameterSchema](interfaces/ParameterSchema.md) ## Type Aliases - [ActionStatus](type-aliases/ActionStatus.md) - [ExecutionStatus](type-aliases/ExecutionStatus.md) - [ParameterType](type-aliases/ParameterType.md) ## Functions - [assertValidContext](functions/assertValidContext.md) - [assertValidParameters](functions/assertValidParameters.md) - [assertValidProposal](functions/assertValidProposal.md) - [canonicalJson](functions/canonicalJson.md) - [checkGovernanceConstraints](functions/checkGovernanceConstraints.md) - [computeActionExecutionId](functions/computeActionExecutionId.md) - [computeActionProposalId](functions/computeActionProposalId.md) - [computeCommitmentHash](functions/computeCommitmentHash.md) - [computeReceiptId](functions/computeReceiptId.md) - [createActionDefinition](functions/createActionDefinition.md) - [createCommitment](functions/createCommitment.md) - [createCondition](functions/createCondition.md) - [createDurableActionStorage](functions/createDurableActionStorage.md) - [createGovernanceBridge](functions/createGovernanceBridge.md) - [createProposal](functions/createProposal.md) - [createReceipt](functions/createReceipt.md) - [evaluateConditions](functions/evaluateConditions.md) - [executeAction](functions/executeAction.md) - [hashCanonical](functions/hashCanonical.md) - [isProposalExecutable](functions/isProposalExecutable.md) - [isProposalExpired](functions/isProposalExpired.md) - [serializeCommitmentPayload](functions/serializeCommitmentPayload.md) - [toHex](functions/toHex.md) - [validateContext](functions/validateContext.md) - [validateParameters](functions/validateParameters.md) - [verifyCommitment](functions/verifyCommitment.md) - [verifyCommitmentBinding](functions/verifyCommitmentBinding.md) - [verifyReceiptIntegrity](functions/verifyReceiptIntegrity.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-mcp-server/index **@totemsdk/mcp-server** *** **Maturity: rc** # @totemsdk/mcp-server ## Variables - [sdkIndex](variables/sdkIndex.md) - [SERVER\_INFO](variables/SERVER_INFO.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-omnia-host/index **@totemsdk/omnia-host** *** **Maturity: rc** # @totemsdk/omnia-host ## Classes - [DisabledAnalyticsStore](classes/DisabledAnalyticsStore.md) - [DuckDbAnalyticsStore](classes/DuckDbAnalyticsStore.md) - [GoRoutingProvider](classes/GoRoutingProvider.md) - [InProcessRoutingProvider](classes/InProcessRoutingProvider.md) - [JsonFileStorageAdapter](classes/JsonFileStorageAdapter.md) - [OperationStore](classes/OperationStore.md) - [SqliteChannelStore](classes/SqliteChannelStore.md) ## Interfaces - [AnalyticsEvent](interfaces/AnalyticsEvent.md) - [AnalyticsStore](interfaces/AnalyticsStore.md) - [ConfirmationOptions](interfaces/ConfirmationOptions.md) - [DuckDbConnection](interfaces/DuckDbConnection.md) - [HostApiContext](interfaces/HostApiContext.md) - [HostIdentity](interfaces/HostIdentity.md) - [HostIdentityAndManifest](interfaces/HostIdentityAndManifest.md) - [HostSigning](interfaces/HostSigning.md) - [OmniaHost](interfaces/OmniaHost.md) - [OmniaHostConfig](interfaces/OmniaHostConfig.md) - [OperationRecord](interfaces/OperationRecord.md) - [RouteQuery](interfaces/RouteQuery.md) - [RoutingProvider](interfaces/RoutingProvider.md) - [TotemNodeAdapter](interfaces/TotemNodeAdapter.md) - [TotemNodeAdapterOptions](interfaces/TotemNodeAdapterOptions.md) ## Type Aliases - [OperationStatus](type-aliases/OperationStatus.md) - [OperationStoreLike](type-aliases/OperationStoreLike.md) ## Functions - [createHostIdentityAndManifest](functions/createHostIdentityAndManifest.md) - [createHostManifest](functions/createHostManifest.md) - [createHostMethods](functions/createHostMethods.md) - [createHostSigning](functions/createHostSigning.md) - [createOmniaHost](functions/createOmniaHost.md) - [createTotemNodeAdapter](functions/createTotemNodeAdapter.md) - [encryptSeedForKeyfile](functions/encryptSeedForKeyfile.md) - [hasSigningMaterial](functions/hasSigningMaterial.md) - [initializeDuckDb](functions/initializeDuckDb.md) - [leaseStorageDir](functions/leaseStorageDir.md) - [loadConfigFromEnv](functions/loadConfigFromEnv.md) - [loadHostIdentity](functions/loadHostIdentity.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-location-proof/index **@totemsdk/location-proof** *** **Maturity: v1** # @totemsdk/location-proof ## Interfaces - [CreateLocationProofParams](interfaces/CreateLocationProofParams.md) - [CreateMovementTrailParams](interfaces/CreateMovementTrailParams.md) - [GeoPoint](interfaces/GeoPoint.md) - [ImpossibleJumpResult](interfaces/ImpossibleJumpResult.md) - [LocationChallenge](interfaces/LocationChallenge.md) - [LocationClaim](interfaces/LocationClaim.md) - [LocationConfidenceOptions](interfaces/LocationConfidenceOptions.md) - [LocationConfidenceResult](interfaces/LocationConfidenceResult.md) - [LocationCorroboration](interfaces/LocationCorroboration.md) - [LocationProofVerifyResult](interfaces/LocationProofVerifyResult.md) - [LocationSource](interfaces/LocationSource.md) - [LocationValidationResult](interfaces/LocationValidationResult.md) - [MotionOptions](interfaces/MotionOptions.md) - [MotionSample](interfaces/MotionSample.md) - [MovementTrail](interfaces/MovementTrail.md) ## Type Aliases - [DeviceClass](type-aliases/DeviceClass.md) - [LocationSourceType](type-aliases/LocationSourceType.md) ## Functions - [addLocationClaimToGraph](functions/addLocationClaimToGraph.md) - [addLocationProofToGraph](functions/addLocationProofToGraph.md) - [canonicalJson](functions/canonicalJson.md) - [computeLocationClaimId](functions/computeLocationClaimId.md) - [computeMovementTrailId](functions/computeMovementTrailId.md) - [computeSpeedMps](functions/computeSpeedMps.md) - [createLocationClaim](functions/createLocationClaim.md) - [createMovementTrail](functions/createMovementTrail.md) - [createUnsignedLocationProof](functions/createUnsignedLocationProof.md) - [detectImpossibleJumps](functions/detectImpossibleJumps.md) - [distanceMeters](functions/distanceMeters.md) - [hashLocationClaim](functions/hashLocationClaim.md) - [hashMovementTrail](functions/hashMovementTrail.md) - [isChallengeExpired](functions/isChallengeExpired.md) - [locationClaimToEvidenceRef](functions/locationClaimToEvidenceRef.md) - [locationClaimToProofGraphNode](functions/locationClaimToProofGraphNode.md) - [locationProofToGraphEdges](functions/locationProofToGraphEdges.md) - [movementTrailToEvidenceRef](functions/movementTrailToEvidenceRef.md) - [scoreLocationClaim](functions/scoreLocationClaim.md) - [signLocationProof](functions/signLocationProof.md) - [signLocationProofWithLease](functions/signLocationProofWithLease.md) - [toHex](functions/toHex.md) - [validateGeoPoint](functions/validateGeoPoint.md) - [validateLocationClaim](functions/validateLocationClaim.md) - [validateMovementTrail](functions/validateMovementTrail.md) - [verifyLocationProof](functions/verifyLocationProof.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-spatial-proof/index **@totemsdk/spatial-proof** *** **Maturity: v1** # @totemsdk/spatial-proof ## Interfaces - [BoundingBox](interfaces/BoundingBox.md) - [CreateSpatialProofParams](interfaces/CreateSpatialProofParams.md) - [EngineInfo](interfaces/EngineInfo.md) - [EvaluateSpatialRelationParams](interfaces/EvaluateSpatialRelationParams.md) - [GeoLineStringGeometry](interfaces/GeoLineStringGeometry.md) - [GeoMultiPolygonGeometry](interfaces/GeoMultiPolygonGeometry.md) - [GeoPointGeometry](interfaces/GeoPointGeometry.md) - [GeoPolygonGeometry](interfaces/GeoPolygonGeometry.md) - [SpatialObject](interfaces/SpatialObject.md) - [SpatialProofVerifyResult](interfaces/SpatialProofVerifyResult.md) - [SpatialRelationClaim](interfaces/SpatialRelationClaim.md) - [SpatialRelationClaimInputs](interfaces/SpatialRelationClaimInputs.md) - [SpatialRelationClaimResult](interfaces/SpatialRelationClaimResult.md) - [SpatialValidationResult](interfaces/SpatialValidationResult.md) ## Type Aliases - [Coordinate](type-aliases/Coordinate.md) - [GeoGeometry](type-aliases/GeoGeometry.md) - [SpatialObjectKind](type-aliases/SpatialObjectKind.md) - [SpatialRelationType](type-aliases/SpatialRelationType.md) ## Functions - [addSpatialRelationToGraph](functions/addSpatialRelationToGraph.md) - [bboxCovers](functions/bboxCovers.md) - [bboxIntersects](functions/bboxIntersects.md) - [canonicalJson](functions/canonicalJson.md) - [computeGeometryHash](functions/computeGeometryHash.md) - [computeSpatialObjectId](functions/computeSpatialObjectId.md) - [computeSpatialRelationId](functions/computeSpatialRelationId.md) - [createUnsignedSpatialProof](functions/createUnsignedSpatialProof.md) - [distanceMeters](functions/distanceMeters.md) - [distancePointToLineStringMeters](functions/distancePointToLineStringMeters.md) - [distancePointToSegmentMeters](functions/distancePointToSegmentMeters.md) - [evaluateSpatialRelation](functions/evaluateSpatialRelation.md) - [getBoundingBox](functions/getBoundingBox.md) - [hashSpatialObject](functions/hashSpatialObject.md) - [hashSpatialRelationClaim](functions/hashSpatialRelationClaim.md) - [isPointNearBoundary](functions/isPointNearBoundary.md) - [isRingClosed](functions/isRingClosed.md) - [normalizePolygon](functions/normalizePolygon.md) - [normalizePolygonRing](functions/normalizePolygonRing.md) - [pointInMultiPolygon](functions/pointInMultiPolygon.md) - [pointInPolygon](functions/pointInPolygon.md) - [signSpatialProof](functions/signSpatialProof.md) - [spatialClaimEvidenceRefs](functions/spatialClaimEvidenceRefs.md) - [spatialObjectToEvidenceRef](functions/spatialObjectToEvidenceRef.md) - [spatialObjectToProofGraphNode](functions/spatialObjectToProofGraphNode.md) - [spatialRelationFromLocationClaim](functions/spatialRelationFromLocationClaim.md) - [spatialRelationToEvidenceRef](functions/spatialRelationToEvidenceRef.md) - [spatialRelationToGraphEdges](functions/spatialRelationToGraphEdges.md) - [spatialRelationToProofGraphNode](functions/spatialRelationToProofGraphNode.md) - [toHex](functions/toHex.md) - [validateCoordinate](functions/validateCoordinate.md) - [validateGeometry](functions/validateGeometry.md) - [validateSpatialObject](functions/validateSpatialObject.md) - [validateSpatialRelationClaim](functions/validateSpatialRelationClaim.md) - [verifySpatialProof](functions/verifySpatialProof.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-raster-proof/index **@totemsdk/raster-proof** *** **Maturity: v1** # @totemsdk/raster-proof ## Interfaces - [CreateDerivedRasterManifestParams](interfaces/CreateDerivedRasterManifestParams.md) - [CreateRasterManifestParams](interfaces/CreateRasterManifestParams.md) - [CreateRasterProofParams](interfaces/CreateRasterProofParams.md) - [CreateRasterSpatialRelationParams](interfaces/CreateRasterSpatialRelationParams.md) - [CreateRasterWindowProofParams](interfaces/CreateRasterWindowProofParams.md) - [RasterAssetRef](interfaces/RasterAssetRef.md) - [RasterChunk](interfaces/RasterChunk.md) - [RasterDerivationVerifyResult](interfaces/RasterDerivationVerifyResult.md) - [RasterManifest](interfaces/RasterManifest.md) - [RasterMerkleOptions](interfaces/RasterMerkleOptions.md) - [RasterMerkleProof](interfaces/RasterMerkleProof.md) - [RasterMerkleSummary](interfaces/RasterMerkleSummary.md) - [RasterProofVerifyResult](interfaces/RasterProofVerifyResult.md) - [RasterProvenance](interfaces/RasterProvenance.md) - [RasterSpatialMetadata](interfaces/RasterSpatialMetadata.md) - [RasterValidationResult](interfaces/RasterValidationResult.md) - [RasterWindowProof](interfaces/RasterWindowProof.md) ## Type Aliases - [RasterAssetFormat](type-aliases/RasterAssetFormat.md) - [RasterLayerType](type-aliases/RasterLayerType.md) - [RasterSourceType](type-aliases/RasterSourceType.md) ## Variables - [DEFAULT\_CHUNK\_SIZE\_BYTES](variables/DEFAULT_CHUNK_SIZE_BYTES.md) ## Functions - [addRasterManifestToGraph](functions/addRasterManifestToGraph.md) - [canonicalJson](functions/canonicalJson.md) - [chunkBytes](functions/chunkBytes.md) - [computeMerkleRoot](functions/computeMerkleRoot.md) - [computeRasterManifestId](functions/computeRasterManifestId.md) - [computeRasterWindowProofId](functions/computeRasterWindowProofId.md) - [createDerivedRasterManifest](functions/createDerivedRasterManifest.md) - [createMerkleProof](functions/createMerkleProof.md) - [createRasterManifest](functions/createRasterManifest.md) - [createRasterMerkleSummary](functions/createRasterMerkleSummary.md) - [createRasterSpatialRelation](functions/createRasterSpatialRelation.md) - [createRasterWindowProof](functions/createRasterWindowProof.md) - [createUnsignedRasterProof](functions/createUnsignedRasterProof.md) - [hashBytes](functions/hashBytes.md) - [hashRasterManifest](functions/hashRasterManifest.md) - [hashRasterWindowProof](functions/hashRasterWindowProof.md) - [hashString](functions/hashString.md) - [hashSubarray](functions/hashSubarray.md) - [merkleLeafHash](functions/merkleLeafHash.md) - [rasterEvidenceRefs](functions/rasterEvidenceRefs.md) - [rasterFootprintToSpatialObject](functions/rasterFootprintToSpatialObject.md) - [rasterManifestToEvidenceRef](functions/rasterManifestToEvidenceRef.md) - [rasterManifestToGraphEdges](functions/rasterManifestToGraphEdges.md) - [rasterManifestToProofGraphNode](functions/rasterManifestToProofGraphNode.md) - [rasterWindowProofToEvidenceRef](functions/rasterWindowProofToEvidenceRef.md) - [rasterWindowProofToGraphEdges](functions/rasterWindowProofToGraphEdges.md) - [rasterWindowProofToProofGraphNode](functions/rasterWindowProofToProofGraphNode.md) - [signRasterProof](functions/signRasterProof.md) - [toHex](functions/toHex.md) - [validateRasterManifest](functions/validateRasterManifest.md) - [verifyMerkleProof](functions/verifyMerkleProof.md) - [verifyRasterDerivation](functions/verifyRasterDerivation.md) - [verifyRasterProof](functions/verifyRasterProof.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-omnia-pool/index **@totemsdk/omnia-pool** *** **Maturity: rc** # @totemsdk/omnia-pool ## Interfaces - [AutonomousRebalanceOptions](interfaces/AutonomousRebalanceOptions.md) - [AutonomousRebalanceResult](interfaces/AutonomousRebalanceResult.md) - [ChannelCloseResult](interfaces/ChannelCloseResult.md) - [ChannelSnapshotStore](interfaces/ChannelSnapshotStore.md) - [ClaimFeesOptions](interfaces/ClaimFeesOptions.md) - [CompoundFeesOptions](interfaces/CompoundFeesOptions.md) - [CreateOmniaPoolParams](interfaces/CreateOmniaPoolParams.md) - [DepositToPoolResult](interfaces/DepositToPoolResult.md) - [DurableChannelSnapshotStore](interfaces/DurableChannelSnapshotStore.md) - [DurableChannelSnapshotStoreOptions](interfaces/DurableChannelSnapshotStoreOptions.md) - [FactoryExecutionPort](interfaces/FactoryExecutionPort.md) - [OmniaExecutionPort](interfaces/OmniaExecutionPort.md) - [OmniaPool](interfaces/OmniaPool.md) - [OmniaPoolAllocationContext](interfaces/OmniaPoolAllocationContext.md) - [OmniaPoolDeploymentContext](interfaces/OmniaPoolDeploymentContext.md) - [OmniaPoolFeeRecord](interfaces/OmniaPoolFeeRecord.md) - [OmniaPoolWithdrawalResult](interfaces/OmniaPoolWithdrawalResult.md) - [PoolNAV](interfaces/PoolNAV.md) - [PoolSigner](interfaces/PoolSigner.md) - [PreparedRebalanceStep](interfaces/PreparedRebalanceStep.md) - [RebalanceChannelUpdate](interfaces/RebalanceChannelUpdate.md) - [RegistryRootingContext](interfaces/RegistryRootingContext.md) - [RouterExecutionPort](interfaces/RouterExecutionPort.md) - [SpliceExecutionPort](interfaces/SpliceExecutionPort.md) - [VtxoExecutionPort](interfaces/VtxoExecutionPort.md) - [WithdrawLiquidityOptions](interfaces/WithdrawLiquidityOptions.md) ## Type Aliases - [AllocatePositionCapitalParams](type-aliases/AllocatePositionCapitalParams.md) - [AllocationResult](type-aliases/AllocationResult.md) - [AllocationTarget](type-aliases/AllocationTarget.md) - [ExecutePoolPayoutParams](type-aliases/ExecutePoolPayoutParams.md) - [RebalanceAllocationParams](type-aliases/RebalanceAllocationParams.md) - [RecordPoolFeeParams](type-aliases/RecordPoolFeeParams.md) - [ReleaseAllocationParams](type-aliases/ReleaseAllocationParams.md) ## Functions - [acceptCommitment](functions/acceptCommitment.md) - [allocatePositionCapital](functions/allocatePositionCapital.md) - [approveWithdrawal](functions/approveWithdrawal.md) - [claimFees](functions/claimFees.md) - [commitRegistryTransition](functions/commitRegistryTransition.md) - [commitToPool](functions/commitToPool.md) - [compoundFees](functions/compoundFees.md) - [computePoolNAV](functions/computePoolNAV.md) - [computePoolRiskScore](functions/computePoolRiskScore.md) - [computeUnclaimedFees](functions/computeUnclaimedFees.md) - [createChannelLoader](functions/createChannelLoader.md) - [createDurableChannelSnapshotStore](functions/createDurableChannelSnapshotStore.md) - [createOmniaPool](functions/createOmniaPool.md) - [createPositionFromCommitment](functions/createPositionFromCommitment.md) - [depositToPool](functions/depositToPool.md) - [executeAutonomousRebalanceStep](functions/executeAutonomousRebalanceStep.md) - [executePoolPayout](functions/executePoolPayout.md) - [getUtilisation](functions/getUtilisation.md) - [issueLpReceipt](functions/issueLpReceipt.md) - [loadChannelFromSnapshotStore](functions/loadChannelFromSnapshotStore.md) - [loadOmniaPool](functions/loadOmniaPool.md) - [makeOmniaFeePolicy](functions/makeOmniaFeePolicy.md) - [makeOmniaLockTerms](functions/makeOmniaLockTerms.md) - [maybeSignTransition](functions/maybeSignTransition.md) - [prepareRebalanceStep](functions/prepareRebalanceStep.md) - [quiescePosition](functions/quiescePosition.md) - [rebalancePoolCapital](functions/rebalancePoolCapital.md) - [recordPoolFee](functions/recordPoolFee.md) - [releaseAllocation](functions/releaseAllocation.md) - [saveChannelSnapshot](functions/saveChannelSnapshot.md) - [toOmniaPoolFeeRecord](functions/toOmniaPoolFeeRecord.md) - [withdrawLiquidity](functions/withdrawLiquidity.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-intelligence/index **@totemsdk/intelligence** *** **Maturity: beta** # @totemsdk/intelligence ## Classes - [IntelligenceError](classes/IntelligenceError.md) ## Interfaces - [ContentAccessDecision](interfaces/ContentAccessDecision.md) - [ContentAccessPolicy](interfaces/ContentAccessPolicy.md) - [ContentWorkspaceEntitlement](interfaces/ContentWorkspaceEntitlement.md) - [EdgeIntelligencePort](interfaces/EdgeIntelligencePort.md) - [IntelligenceContext](interfaces/IntelligenceContext.md) - [IntelligenceErrorResult](interfaces/IntelligenceErrorResult.md) - [IntelligenceOperation](interfaces/IntelligenceOperation.md) - [IntelligencePortResult](interfaces/IntelligencePortResult.md) - [IntelligenceProvider](interfaces/IntelligenceProvider.md) - [IntelligenceProviderInfo](interfaces/IntelligenceProviderInfo.md) - [IntelligenceProviderOptions](interfaces/IntelligenceProviderOptions.md) - [IntelligenceReceipt](interfaces/IntelligenceReceipt.md) - [IntelligenceResult](interfaces/IntelligenceResult.md) - [IntelligenceStreamOperation](interfaces/IntelligenceStreamOperation.md) - [IntelligenceUsage](interfaces/IntelligenceUsage.md) ## Type Aliases - [IntelligenceCapability](type-aliases/IntelligenceCapability.md) - [IntelligenceDomain](type-aliases/IntelligenceDomain.md) - [IntelligenceDomainOrString](type-aliases/IntelligenceDomainOrString.md) - [IntelligenceErrorCode](type-aliases/IntelligenceErrorCode.md) - [IntelligenceOp](type-aliases/IntelligenceOp.md) - [IntelligenceOutcome](type-aliases/IntelligenceOutcome.md) - [IntelligenceStreamChunk](type-aliases/IntelligenceStreamChunk.md) - [RagWorkspaceOp](type-aliases/RagWorkspaceOp.md) ## Variables - [CONTENT\_DENY\_CODE](variables/CONTENT_DENY_CODE.md) - [INTELLIGENCE\_CAPABILITIES](variables/INTELLIGENCE_CAPABILITIES.md) - [INTELLIGENCE\_DOMAINS](variables/INTELLIGENCE_DOMAINS.md) - [INTELLIGENCE\_ERROR\_MESSAGES](variables/INTELLIGENCE_ERROR_MESSAGES.md) - [INTELLIGENCE\_OPS](variables/INTELLIGENCE_OPS.md) - [INTELLIGENCE\_VERSION](variables/INTELLIGENCE_VERSION.md) - [RAG\_DESTRUCTIVE\_OPS](variables/RAG_DESTRUCTIVE_OPS.md) - [RAG\_WORKSPACE\_OPS](variables/RAG_WORKSPACE_OPS.md) ## Functions - [createContentAccessGatedProvider](functions/createContentAccessGatedProvider.md) - [createEdgeIntelligencePort](functions/createEdgeIntelligencePort.md) - [evaluateContentAccess](functions/evaluateContentAccess.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-qvac/index **@totemsdk/qvac** *** **Maturity: beta** # @totemsdk/qvac ## Interfaces - [AssessModelFitInput](interfaces/AssessModelFitInput.md) - [AssessModelFitResult](interfaces/AssessModelFitResult.md) - [AudioGenClientParams](interfaces/AudioGenClientParams.md) - [AudioGenResult](interfaces/AudioGenResult.md) - [BatchCompletionRun](interfaces/BatchCompletionRun.md) - [BciTranscribeClientParams](interfaces/BciTranscribeClientParams.md) - [BciTranscribeStreamSession](interfaces/BciTranscribeStreamSession.md) - [ClassificationResult](interfaces/ClassificationResult.md) - [ClassifyClientParams](interfaces/ClassifyClientParams.md) - [CompletionFinal](interfaces/CompletionFinal.md) - [CompletionParams](interfaces/CompletionParams.md) - [CompletionRun](interfaces/CompletionRun.md) - [CompletionStats](interfaces/CompletionStats.md) - [ContentAccessDecision](interfaces/ContentAccessDecision.md) - [ContentAccessPolicy](interfaces/ContentAccessPolicy.md) - [ContentWorkspaceEntitlement](interfaces/ContentWorkspaceEntitlement.md) - [DiffusionClientParams](interfaces/DiffusionClientParams.md) - [DiffusionProgressTick](interfaces/DiffusionProgressTick.md) - [DiffusionResult](interfaces/DiffusionResult.md) - [DownloadAssetOptions](interfaces/DownloadAssetOptions.md) - [EmbedParams](interfaces/EmbedParams.md) - [EmbedResult](interfaces/EmbedResult.md) - [EmbedStats](interfaces/EmbedStats.md) - [FinetuneHandle](interfaces/FinetuneHandle.md) - [GetLoadedModelInfoParams](interfaces/GetLoadedModelInfoParams.md) - [GetModelInfoParams](interfaces/GetModelInfoParams.md) - [GetSystemResourcesInput](interfaces/GetSystemResourcesInput.md) - [HeartbeatResponse](interfaces/HeartbeatResponse.md) - [InvokePluginOptions](interfaces/InvokePluginOptions.md) - [LoadedModelInfo](interfaces/LoadedModelInfo.md) - [LoadModelOptions](interfaces/LoadModelOptions.md) - [LoggingParams](interfaces/LoggingParams.md) - [LoggingStreamResponse](interfaces/LoggingStreamResponse.md) - [ModelInfo](interfaces/ModelInfo.md) - [ModelRegistryEntry](interfaces/ModelRegistryEntry.md) - [ModelRegistryEntryAddon](interfaces/ModelRegistryEntryAddon.md) - [ModelRegistrySearchParams](interfaces/ModelRegistrySearchParams.md) - [OCRClientParams](interfaces/OCRClientParams.md) - [OcrResult](interfaces/OcrResult.md) - [OCRStats](interfaces/OCRStats.md) - [OCRTextBlock](interfaces/OCRTextBlock.md) - [QvacAsrOps](interfaces/QvacAsrOps.md) - [QvacAudiogenOps](interfaces/QvacAudiogenOps.md) - [QvacCallResult](interfaces/QvacCallResult.md) - [QvacClassifyOps](interfaces/QvacClassifyOps.md) - [QvacDiffusionOps](interfaces/QvacDiffusionOps.md) - [QvacEmbedOps](interfaces/QvacEmbedOps.md) - [QvacLlmOps](interfaces/QvacLlmOps.md) - [QvacModelsOps](interfaces/QvacModelsOps.md) - [QvacOcrOps](interfaces/QvacOcrOps.md) - [QvacOpHandler](interfaces/QvacOpHandler.md) - [QvacPluginsOps](interfaces/QvacPluginsOps.md) - [QvacProviderOptions](interfaces/QvacProviderOptions.md) - [QvacRagOps](interfaces/QvacRagOps.md) - [QvacRuntimeObservation](interfaces/QvacRuntimeObservation.md) - [QvacRuntimeVerificationMark](interfaces/QvacRuntimeVerificationMark.md) - [QvacSdkLike](interfaces/QvacSdkLike.md) - [QvacSystemOps](interfaces/QvacSystemOps.md) - [QvacTranslateOps](interfaces/QvacTranslateOps.md) - [QvacTtsOps](interfaces/QvacTtsOps.md) - [QvacVideoOps](interfaces/QvacVideoOps.md) - [QvacVlaOps](interfaces/QvacVlaOps.md) - [QvacWorldOps](interfaces/QvacWorldOps.md) - [RagChunkParams](interfaces/RagChunkParams.md) - [RagCloseWorkspaceParams](interfaces/RagCloseWorkspaceParams.md) - [RagDeleteWorkspaceParams](interfaces/RagDeleteWorkspaceParams.md) - [RagDoc](interfaces/RagDoc.md) - [RagEmbeddedDoc](interfaces/RagEmbeddedDoc.md) - [RagIngestParams](interfaces/RagIngestParams.md) - [RagReindexParams](interfaces/RagReindexParams.md) - [RagSaveEmbeddingsParams](interfaces/RagSaveEmbeddingsParams.md) - [RagSaveEmbeddingsResult](interfaces/RagSaveEmbeddingsResult.md) - [RagSearchParams](interfaces/RagSearchParams.md) - [RagSearchResult](interfaces/RagSearchResult.md) - [RagWorkspaceInfo](interfaces/RagWorkspaceInfo.md) - [ServerLogHandler](interfaces/ServerLogHandler.md) - [SystemResources](interfaces/SystemResources.md) - [TextToSpeechStreamClientParams](interfaces/TextToSpeechStreamClientParams.md) - [TextToSpeechStreamResponse](interfaces/TextToSpeechStreamResponse.md) - [TextToSpeechStreamResult](interfaces/TextToSpeechStreamResult.md) - [TextToSpeechStreamSession](interfaces/TextToSpeechStreamSession.md) - [TranscribeClientParams](interfaces/TranscribeClientParams.md) - [TranscribeSegment](interfaces/TranscribeSegment.md) - [TranscribeStreamSession](interfaces/TranscribeStreamSession.md) - [TranslateClientParams](interfaces/TranslateClientParams.md) - [TranslateResult](interfaces/TranslateResult.md) - [TranslationStats](interfaces/TranslationStats.md) - [TtsClientParamsInput](interfaces/TtsClientParamsInput.md) - [TtsSentenceChunkUpdate](interfaces/TtsSentenceChunkUpdate.md) - [UpscaleClientParams](interfaces/UpscaleClientParams.md) - [UpscaleResult](interfaces/UpscaleResult.md) - [UpscaleStats](interfaces/UpscaleStats.md) - [UpscaleStreamResponse](interfaces/UpscaleStreamResponse.md) - [VerifyQvacRuntimeBehaviorInput](interfaces/VerifyQvacRuntimeBehaviorInput.md) - [VideoClientParams](interfaces/VideoClientParams.md) - [VideoProgressTick](interfaces/VideoProgressTick.md) - [VideoResult](interfaces/VideoResult.md) - [VlaClientRunParams](interfaces/VlaClientRunParams.md) - [VlaClientRunResult](interfaces/VlaClientRunResult.md) - [VlaHparams](interfaces/VlaHparams.md) - [VlaHparamsOpResult](interfaces/VlaHparamsOpResult.md) - [VlaStats](interfaces/VlaStats.md) - [WorldSceneClientParams](interfaces/WorldSceneClientParams.md) - [WorldSceneResult](interfaces/WorldSceneResult.md) - [WorldSceneResultWithPack](interfaces/WorldSceneResultWithPack.md) - [WorldStepClientParams](interfaces/WorldStepClientParams.md) - [WorldStepProgressTick](interfaces/WorldStepProgressTick.md) - [WorldStepResult](interfaces/WorldStepResult.md) ## Type Aliases - [CancelClientInput](type-aliases/CancelClientInput.md) - [CompletionEvent](type-aliases/CompletionEvent.md) - [DeleteCacheParams](type-aliases/DeleteCacheParams.md) - [LogLevel](type-aliases/LogLevel.md) - [QvacOpShape](type-aliases/QvacOpShape.md) - [QvacRuntimeBehaviorScenario](type-aliases/QvacRuntimeBehaviorScenario.md) - [QvacUsageExtractor](type-aliases/QvacUsageExtractor.md) - [RagDeleteEmbeddingsParams](type-aliases/RagDeleteEmbeddingsParams.md) - [RagWorkspaceOp](type-aliases/RagWorkspaceOp.md) - [StopReason](type-aliases/StopReason.md) - [TtsPace](type-aliases/TtsPace.md) - [VlaEmbodimentSelection](type-aliases/VlaEmbodimentSelection.md) - [WorldCreateSceneResult](type-aliases/WorldCreateSceneResult.md) ## Variables - [asrDomain](variables/asrDomain.md) - [audiogenDomain](variables/audiogenDomain.md) - [classifyDomain](variables/classifyDomain.md) - [CONTENT\_DENY\_CODE](variables/CONTENT_DENY_CODE.md) - [diffusionDomain](variables/diffusionDomain.md) - [embedDomain](variables/embedDomain.md) - [llmDomain](variables/llmDomain.md) - [modelsDomain](variables/modelsDomain.md) - [ocrDomain](variables/ocrDomain.md) - [pluginsDomain](variables/pluginsDomain.md) - [QVAC\_OP\_SHAPES](variables/QVAC_OP_SHAPES.md) - [QVAC\_PROVIDER\_VERIFIED\_CLAIMS](variables/QVAC_PROVIDER_VERIFIED_CLAIMS.md) - [RAG\_DESTRUCTIVE\_OPS](variables/RAG_DESTRUCTIVE_OPS.md) - [RAG\_WORKSPACE\_OPS](variables/RAG_WORKSPACE_OPS.md) - [ragDomain](variables/ragDomain.md) - [systemDomain](variables/systemDomain.md) - [translateDomain](variables/translateDomain.md) - [ttsDomain](variables/ttsDomain.md) - [videoDomain](variables/videoDomain.md) - [vlaDomain](variables/vlaDomain.md) - [worldDomain](variables/worldDomain.md) ## Functions - [asrAdapter](functions/asrAdapter.md) - [audiogenAdapter](functions/audiogenAdapter.md) - [classifyAdapter](functions/classifyAdapter.md) - [createContentAccessGatedProvider](functions/createContentAccessGatedProvider.md) - [createQvacIntelligenceProvider](functions/createQvacIntelligenceProvider.md) - [diffusionAdapter](functions/diffusionAdapter.md) - [embedAdapter](functions/embedAdapter.md) - [evaluateContentAccess](functions/evaluateContentAccess.md) - [llmAdapter](functions/llmAdapter.md) - [modelsAdapter](functions/modelsAdapter.md) - [ocrAdapter](functions/ocrAdapter.md) - [pluginsAdapter](functions/pluginsAdapter.md) - [qvacOpShape](functions/qvacOpShape.md) - [ragAdapter](functions/ragAdapter.md) - [systemAdapter](functions/systemAdapter.md) - [translateAdapter](functions/translateAdapter.md) - [ttsAdapter](functions/ttsAdapter.md) - [verifyQvacRuntimeBehavior](functions/verifyQvacRuntimeBehavior.md) - [videoAdapter](functions/videoAdapter.md) - [vlaAdapter](functions/vlaAdapter.md) - [worldAdapter](functions/worldAdapter.md) --- ## Page: index URL: https://docs.totem.ing/api/totemsdk-storage/index **@totemsdk/storage** *** **Maturity: alpha** # @totemsdk/storage ## Classes - [ArtifactStore](classes/ArtifactStore.md) - [MemoryStore](classes/MemoryStore.md) - [Namespace](classes/Namespace.md) - [StorageError](classes/StorageError.md) ## Interfaces - [ArtifactBackendCapabilities](interfaces/ArtifactBackendCapabilities.md) - [ArtifactIndexEntry](interfaces/ArtifactIndexEntry.md) - [ArtifactRead](interfaces/ArtifactRead.md) - [ArtifactRef](interfaces/ArtifactRef.md) - [ArtifactStoreBackend](interfaces/ArtifactStoreBackend.md) - [CasStore](interfaces/CasStore.md) - [Codec](interfaces/Codec.md) - [ConditionalResult](interfaces/ConditionalResult.md) - [EnqueueReceipt](interfaces/EnqueueReceipt.md) - [Journal](interfaces/Journal.md) - [JournalEntry](interfaces/JournalEntry.md) - [JournalOptions](interfaces/JournalOptions.md) - [JournalRecoveryReport](interfaces/JournalRecoveryReport.md) - [PutOptions](interfaces/PutOptions.md) - [PutReceipt](interfaces/PutReceipt.md) - [RevisionedSnapshotStore](interfaces/RevisionedSnapshotStore.md) - [RevisionedSnapshotStoreOptions](interfaces/RevisionedSnapshotStoreOptions.md) - [SnapshotRecord](interfaces/SnapshotRecord.md) - [StorageAdapter](interfaces/StorageAdapter.md) - [StorageAdapterWithCapabilities](interfaces/StorageAdapterWithCapabilities.md) - [StorageErrorDetails](interfaces/StorageErrorDetails.md) - [StoreCapabilities](interfaces/StoreCapabilities.md) - [Transaction](interfaces/Transaction.md) - [TransactionalStore](interfaces/TransactionalStore.md) ## Type Aliases - [ArtifactReadStatus](type-aliases/ArtifactReadStatus.md) - [ConditionalUpdateDecision](type-aliases/ConditionalUpdateDecision.md) - [ConditionalUpdater](type-aliases/ConditionalUpdater.md) - [FailurePolicy](type-aliases/FailurePolicy.md) - [StorageErrorCode](type-aliases/StorageErrorCode.md) - [WriteAckMode](type-aliases/WriteAckMode.md) ## Variables - [ARTIFACT\_DEFAULT\_ALGORITHM](variables/ARTIFACT_DEFAULT_ALGORITHM.md) - [codec](variables/codec.md) - [CODEC\_MAGIC](variables/CODEC_MAGIC.md) - [CODEC\_VERSION](variables/CODEC_VERSION.md) - [FailurePolicies](variables/FailurePolicies.md) - [JOURNAL\_RECORD\_VERSION](variables/JOURNAL_RECORD_VERSION.md) - [SNAPSHOT\_RECORD\_VERSION](variables/SNAPSHOT_RECORD_VERSION.md) - [StorageErrorCodes](variables/StorageErrorCodes.md) - [WriteAckModes](variables/WriteAckModes.md) ## Functions - [artifactRefId](functions/artifactRefId.md) - [assertCapabilities](functions/assertCapabilities.md) - [asStorageError](functions/asStorageError.md) - [createJournal](functions/createJournal.md) - [createRevisionedSnapshotStore](functions/createRevisionedSnapshotStore.md) - [enqueueItem](functions/enqueueItem.md) - [isStorageError](functions/isStorageError.md) - [jsonClean](functions/jsonClean.md) --- ## Page: @totemsdk/observability URL: https://docs.totem.ing/api/totem-observability/index # `@totemsdk/observability` > Drop-in observability for Totem-based dApps — trace propagation and batched telemetry **Maturity: not classified** :::info Curated Reference Full API reference for this package requires TypeDoc regeneration. Run `npm run generate` from `TotemEdgeSDKDocs/` after installing deps. ::: ## Install ```bash npm install @totemsdk/observability ``` ← [Back to Package Index](/api) --- ## Page: index URL: https://docs.totem.ing/api/totem-extension-keyring/index **totem-extension/keyring** *** # totem-extension/keyring Totem Extension — Keyring API Public surface of the Totem wallet keyring exposed to dApp integrations and SDK consumers. Re-exports the signing validator and security boundary types used across all Totem extension code paths. ## Type Aliases - [SignDataManifest](type-aliases/SignDataManifest.md) - [SignDataManifestInput](type-aliases/SignDataManifestInput.md) - [SignDataValidationError](type-aliases/SignDataValidationError.md) - [SignDataValidationOk](type-aliases/SignDataValidationOk.md) - [SignDataValidationResult](type-aliases/SignDataValidationResult.md) ## Functions - [computeManifestBlobHash](functions/computeManifestBlobHash.md) - [normalizeAddrToHex](functions/normalizeAddrToHex.md) --- ## Page: computeManifestBlobHash URL: https://docs.totem.ing/api/totem-extension-keyring/functions/computeManifestBlobHash [**totem-extension/keyring**](../index.md) *** [totem-extension/keyring](../index.md) / computeManifestBlobHash # Function: computeManifestBlobHash() > **computeManifestBlobHash**(`digestTx`, `inputs`): `string` ## Parameters ### digestTx `string` ### inputs [`SignDataManifestInput`](../type-aliases/SignDataManifestInput.md)[] ## Returns `string` --- ## Page: normalizeAddrToHex URL: https://docs.totem.ing/api/totem-extension-keyring/functions/normalizeAddrToHex [**totem-extension/keyring**](../index.md) *** [totem-extension/keyring](../index.md) / normalizeAddrToHex # Function: normalizeAddrToHex() > **normalizeAddrToHex**(`addr`): `string` ## Parameters ### addr `string` ## Returns `string` --- ## Page: SignDataManifest URL: https://docs.totem.ing/api/totem-extension-keyring/type-aliases/SignDataManifest [**totem-extension/keyring**](../index.md) *** [totem-extension/keyring](../index.md) / SignDataManifest # Type Alias: SignDataManifest > **SignDataManifest** = `object` ## Properties ### blobHash > **blobHash**: `string` *** ### digestTx > **digestTx**: `string` *** ### inputs > **inputs**: [`SignDataManifestInput`](SignDataManifestInput.md)[] --- ## Page: SignDataManifestInput URL: https://docs.totem.ing/api/totem-extension-keyring/type-aliases/SignDataManifestInput [**totem-extension/keyring**](../index.md) *** [totem-extension/keyring](../index.md) / SignDataManifestInput # Type Alias: SignDataManifestInput > **SignDataManifestInput** = `object` ## Properties ### address > **address**: `string` *** ### amount > **amount**: `string` *** ### coinId > **coinId**: `string` *** ### inputIndex > **inputIndex**: `number` *** ### tokenId > **tokenId**: `string` --- ## Page: SignDataValidationError URL: https://docs.totem.ing/api/totem-extension-keyring/type-aliases/SignDataValidationError [**totem-extension/keyring**](../index.md) *** [totem-extension/keyring](../index.md) / SignDataValidationError # Type Alias: SignDataValidationError > **SignDataValidationError** = `object` ## Properties ### error > **error**: `string` *** ### errorCode > **errorCode**: `string` --- ## Page: SignDataValidationOk URL: https://docs.totem.ing/api/totem-extension-keyring/type-aliases/SignDataValidationOk [**totem-extension/keyring**](../index.md) *** [totem-extension/keyring](../index.md) / SignDataValidationOk # Type Alias: SignDataValidationOk > **SignDataValidationOk** = `object` ## Properties ### digestHex > **digestHex**: `string` *** ### manifestInputs > **manifestInputs**: [`SignDataManifestInput`](SignDataManifestInput.md)[] *** ### ownedCount > **ownedCount**: `number` *** ### parsedInputs > **parsedInputs**: `object`[] #### address > **address**: `string` #### coinId > **coinId**: `string` *** ### walletAddrsHex > **walletAddrsHex**: `string`[] --- ## Page: SignDataValidationResult URL: https://docs.totem.ing/api/totem-extension-keyring/type-aliases/SignDataValidationResult [**totem-extension/keyring**](../index.md) *** [totem-extension/keyring](../index.md) / SignDataValidationResult # Type Alias: SignDataValidationResult > **SignDataValidationResult** = \{ `ok`: `false`; `result`: [`SignDataValidationError`](SignDataValidationError.md); \} \| \{ `data`: [`SignDataValidationOk`](SignDataValidationOk.md); `ok`: `true`; \} --- ## Page: AmountCapPolicy URL: https://docs.totem.ing/api/totemsdk-agent-policy/classes/AmountCapPolicy [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / AmountCapPolicy # Class: AmountCapPolicy A single composable middleware layer in the policy evaluation pipeline. Each middleware receives the full AgentProposal and returns a decision. Evaluation is read-only. Implementors that need state (rate limits, daily caps) expose the optional reservation lifecycle below. The middleware API replaces the boolean-based AgentPolicy with a richer three-state result that includes a reason string for auditability. ## Implements - [`PolicyMiddleware`](../interfaces/PolicyMiddleware.md) ## Constructors ### Constructor > **new AmountCapPolicy**(`config`): `AmountCapPolicy` #### Parameters ##### config [`AmountCapConfig`](../interfaces/AmountCapConfig.md) #### Returns `AmountCapPolicy` ## Methods ### commit() > **commit**(`operationId`): `Promise`\<`void`\> Commit a prior reservation after execution succeeds. #### Parameters ##### operationId `string` #### Returns `Promise`\<`void`\> #### Implementation of [`PolicyMiddleware`](../interfaces/PolicyMiddleware.md).[`commit`](../interfaces/PolicyMiddleware.md#commit) *** ### evaluate() > **evaluate**(`proposal`, `now?`): `Promise`\<[`PolicyEvalResult`](../interfaces/PolicyEvalResult.md)\> Evaluate a proposal. Called in sequence by ComposablePolicy. #### Parameters ##### proposal [`AgentProposal`](../interfaces/AgentProposal.md) ##### now? `number` = `...` #### Returns `Promise`\<[`PolicyEvalResult`](../interfaces/PolicyEvalResult.md)\> #### Implementation of [`PolicyMiddleware`](../interfaces/PolicyMiddleware.md).[`evaluate`](../interfaces/PolicyMiddleware.md#evaluate) *** ### release() > **release**(`operationId`): `Promise`\<`void`\> Release a reservation. Monotonic: only `reserved → released` is allowed; releasing a `committed` operation is a no-op so committed quota can never be recycled by a later reservation under the same operation ID. #### Parameters ##### operationId `string` #### Returns `Promise`\<`void`\> #### Implementation of [`PolicyMiddleware`](../interfaces/PolicyMiddleware.md).[`release`](../interfaces/PolicyMiddleware.md#release) *** ### reserve() > **reserve**(`proposal`, `now?`): `Promise`\<[`PolicyEvalResult`](../interfaces/PolicyEvalResult.md)\> Reserve state for execution using `proposal.id` as the idempotency key. Implementations must not consume committed quota during evaluation. #### Parameters ##### proposal [`AgentProposal`](../interfaces/AgentProposal.md) ##### now? `number` = `...` #### Returns `Promise`\<[`PolicyEvalResult`](../interfaces/PolicyEvalResult.md)\> #### Implementation of [`PolicyMiddleware`](../interfaces/PolicyMiddleware.md).[`reserve`](../interfaces/PolicyMiddleware.md#reserve) *** ### reset() > **reset**(): `Promise`\<`void`\> Optional: reset internal state (useful in tests or at midnight rollover). #### Returns `Promise`\<`void`\> #### Implementation of [`PolicyMiddleware`](../interfaces/PolicyMiddleware.md).[`reset`](../interfaces/PolicyMiddleware.md#reset) --- ## Page: AuthorityPolicy URL: https://docs.totem.ing/api/totemsdk-agent-policy/classes/AuthorityPolicy [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / AuthorityPolicy # Class: AuthorityPolicy AuthorityPolicy — bridges PolicyMiddleware evaluation with mandate-based authority verification. Corrected bridge: - uses the authenticated `proposal.principal` (never `agentId` as principal); - preserves the real action namespace (no synthesized `payment:*`); - returns the full `AuthorityDecision` + usage delta, not a boolean; - binds the decision to the proposal id as the intent nonce. Insert this layer into a ComposablePolicy pipeline to ensure every proposal is backed by a valid mandate before it is approved. ## Implements - [`PolicyMiddleware`](../interfaces/PolicyMiddleware.md) ## Constructors ### Constructor > **new AuthorityPolicy**(`evaluator`, `extractAction?`, `options?`): `AuthorityPolicy` #### Parameters ##### evaluator [`AuthorityEvaluator`](../interfaces/AuthorityEvaluator.md) ##### extractAction? (`proposal`) => [`AuthorityActionIntent`](../interfaces/AuthorityActionIntent.md) ##### options? [`AuthorityPolicyOptions`](../interfaces/AuthorityPolicyOptions.md) #### Returns `AuthorityPolicy` ## Methods ### evaluate() > **evaluate**(`proposal`, `now?`): `Promise`\<[`PolicyEvalResult`](../interfaces/PolicyEvalResult.md)\> Evaluate a proposal. Called in sequence by ComposablePolicy. #### Parameters ##### proposal [`AgentProposal`](../interfaces/AgentProposal.md) ##### now? `number` = `...` #### Returns `Promise`\<[`PolicyEvalResult`](../interfaces/PolicyEvalResult.md)\> #### Implementation of [`PolicyMiddleware`](../interfaces/PolicyMiddleware.md).[`evaluate`](../interfaces/PolicyMiddleware.md#evaluate) --- ## Page: ComposablePolicy URL: https://docs.totem.ing/api/totemsdk-agent-policy/classes/ComposablePolicy [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / ComposablePolicy # Class: ComposablePolicy ComposablePolicy chains multiple PolicyMiddleware layers into a single evaluation pipeline. Layers are evaluated in registration order with short-circuit semantics: if any layer returns `rejected`, subsequent layers are skipped and the rejection is returned immediately. ComposablePolicy also implements the legacy `AgentPolicy` interface (`canAutoApprove` / `requiresUserApproval`) so it can be used anywhere the old interface is expected (e.g. `@totemsdk/omnia`'s `executeIntent`). ## Middleware contract - `approved` → continue to next layer - `rejected` → short-circuit, return rejection - `requires_human` → short-circuit, return requires_human An empty middleware list approves all proposals (pass-through). ## Implements - [`AgentPolicy`](../interfaces/AgentPolicy.md) - [`PolicyMiddleware`](../interfaces/PolicyMiddleware.md) ## Constructors ### Constructor > **new ComposablePolicy**(`layers`): `ComposablePolicy` #### Parameters ##### layers [`PolicyMiddleware`](../interfaces/PolicyMiddleware.md)[] #### Returns `ComposablePolicy` ## Methods ### canAutoApprove() > **canAutoApprove**(`proposal`): `Promise`\<`boolean`\> Return true if the wallet should sign the intent without user interaction. Implementations typically check risk, amount thresholds, and known agents. #### Parameters ##### proposal [`AgentProposal`](../interfaces/AgentProposal.md) #### Returns `Promise`\<`boolean`\> #### Implementation of [`AgentPolicy`](../interfaces/AgentPolicy.md).[`canAutoApprove`](../interfaces/AgentPolicy.md#canautoapprove) *** ### commit() > **commit**(`operationId`): `Promise`\<`void`\> Commit a prior reservation after execution succeeds. #### Parameters ##### operationId `string` #### Returns `Promise`\<`void`\> #### Implementation of [`PolicyMiddleware`](../interfaces/PolicyMiddleware.md).[`commit`](../interfaces/PolicyMiddleware.md#commit) *** ### evaluate() > **evaluate**(`proposal`): `Promise`\<[`PolicyEvalResult`](../interfaces/PolicyEvalResult.md)\> Evaluate a proposal. Called in sequence by ComposablePolicy. #### Parameters ##### proposal [`AgentProposal`](../interfaces/AgentProposal.md) #### Returns `Promise`\<[`PolicyEvalResult`](../interfaces/PolicyEvalResult.md)\> #### Implementation of [`PolicyMiddleware`](../interfaces/PolicyMiddleware.md).[`evaluate`](../interfaces/PolicyMiddleware.md#evaluate) *** ### release() > **release**(`operationId`): `Promise`\<`void`\> Release a prior reservation after execution fails or is cancelled. #### Parameters ##### operationId `string` #### Returns `Promise`\<`void`\> #### Implementation of [`PolicyMiddleware`](../interfaces/PolicyMiddleware.md).[`release`](../interfaces/PolicyMiddleware.md#release) *** ### requiresUserApproval() > **requiresUserApproval**(`proposal`): `Promise`\<`boolean`\> Return true if the wallet must show a user-approval UI before signing. Generally the complement of canAutoApprove, but may have independent logic (e.g. always require approval for settlements regardless of risk). #### Parameters ##### proposal [`AgentProposal`](../interfaces/AgentProposal.md) #### Returns `Promise`\<`boolean`\> #### Implementation of [`AgentPolicy`](../interfaces/AgentPolicy.md).[`requiresUserApproval`](../interfaces/AgentPolicy.md#requiresuserapproval) *** ### reserve() > **reserve**(`proposal`): `Promise`\<[`PolicyEvalResult`](../interfaces/PolicyEvalResult.md)\> Optional reservation lifecycle for stateful policies. The execution boundary calls `reserve` before executing, then `commit` after a successful execution or `release` on any failure path. When implemented, quota is only consumed through reserve/commit — a read-only `evaluate` / `canAutoApprove` never touches the limits. #### Parameters ##### proposal [`AgentProposal`](../interfaces/AgentProposal.md) #### Returns `Promise`\<[`PolicyEvalResult`](../interfaces/PolicyEvalResult.md)\> #### Implementation of [`PolicyMiddleware`](../interfaces/PolicyMiddleware.md).[`reserve`](../interfaces/PolicyMiddleware.md#reserve) *** ### reset() > **reset**(): `Promise`\<`void`\> Optional: reset internal state (useful in tests or at midnight rollover). #### Returns `Promise`\<`void`\> #### Implementation of [`PolicyMiddleware`](../interfaces/PolicyMiddleware.md).[`reset`](../interfaces/PolicyMiddleware.md#reset) --- ## Page: GrantBoundAutonomyPolicy URL: https://docs.totem.ing/api/totemsdk-agent-policy/classes/GrantBoundAutonomyPolicy [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / GrantBoundAutonomyPolicy # Class: GrantBoundAutonomyPolicy ## Constructors ### Constructor > **new GrantBoundAutonomyPolicy**(`options`): `GrantBoundAutonomyPolicy` #### Parameters ##### options [`GrantBoundAutonomyOptions`](../interfaces/GrantBoundAutonomyOptions.md) #### Returns `GrantBoundAutonomyPolicy` ## Methods ### abort() > **abort**(`reservationId`, `error`): `Promise`\<`void`\> #### Parameters ##### reservationId `string` ##### error `unknown` #### Returns `Promise`\<`void`\> *** ### authorizeAndReserve() > **authorizeAndReserve**(`params`): `Promise`\<`AuthorizeAndReserveResult`\> #### Parameters ##### params [`AuthorizeAndReserveParams`](../interfaces/AuthorizeAndReserveParams.md) #### Returns `Promise`\<`AuthorizeAndReserveResult`\> *** ### commit() > **commit**(`params`): `Promise`\<[`RunStepReceipt`](../interfaces/RunStepReceipt.md)\> #### Parameters ##### params [`CommitParams`](../interfaces/CommitParams.md) #### Returns `Promise`\<[`RunStepReceipt`](../interfaces/RunStepReceipt.md)\> *** ### getRun() > **getRun**(`runId`): `Promise`\<[`RunStateSnapshot`](../interfaces/RunStateSnapshot.md) \| `undefined`\> #### Parameters ##### runId `string` #### Returns `Promise`\<[`RunStateSnapshot`](../interfaces/RunStateSnapshot.md) \| `undefined`\> *** ### getRunReceiptGraph() > **getRunReceiptGraph**(`runId`): `Promise`\<[`RunReceiptGraph`](../interfaces/RunReceiptGraph.md) \| `undefined`\> #### Parameters ##### runId `string` #### Returns `Promise`\<[`RunReceiptGraph`](../interfaces/RunReceiptGraph.md) \| `undefined`\> *** ### openRun() > **openRun**(`params`): `Promise`\<[`RunStateSnapshot`](../interfaces/RunStateSnapshot.md)\> #### Parameters ##### params [`OpenRunParams`](../interfaces/OpenRunParams.md) #### Returns `Promise`\<[`RunStateSnapshot`](../interfaces/RunStateSnapshot.md)\> *** ### reconcileReservation() > **reconcileReservation**(`reservationId`, `outcome`, `opts?`): `Promise`\<`void`\> #### Parameters ##### reservationId `string` ##### outcome `ReservationSettlementOutcome` ##### opts? ###### reason? `string` ###### receipt? [`RunStepReceipt`](../interfaces/RunStepReceipt.md) #### Returns `Promise`\<`void`\> *** ### recoverReservations() > **recoverReservations**(`runId?`): `Promise`\<`OutOfBandReservation`[]\> Conservative reservation recovery (RFC-007 §3.5): reservations never settled before their deadline are surfaced as `unknown` — budget held — until the host settles them via `reconcileReservation`. No expiry ever restores spending capacity. #### Parameters ##### runId? `string` #### Returns `Promise`\<`OutOfBandReservation`[]\> --- ## Page: GrantBoundPolicy URL: https://docs.totem.ing/api/totemsdk-agent-policy/classes/GrantBoundPolicy [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / GrantBoundPolicy # Class: GrantBoundPolicy ## Constructors ### Constructor > **new GrantBoundPolicy**(`options`): `GrantBoundPolicy` #### Parameters ##### options [`GrantBoundPolicyOptions`](../interfaces/GrantBoundPolicyOptions.md) #### Returns `GrantBoundPolicy` ## Methods ### abortStep() > **abortStep**(`reservationId`, `reason`): `Promise`\<`void`\> #### Parameters ##### reservationId `string` ##### reason `string` #### Returns `Promise`\<`void`\> *** ### authorizeStep() > **authorizeStep**(`run`, `step`, `now?`): `Promise`\<[`AuthorizeStepResult`](../interfaces/AuthorizeStepResult.md)\> Evaluate and reserve a step atomically: 1. resolve applicable mandates; 2. verify scope, constraints, expiry and revocation; 3. check remaining count/amount/window budget; 4. apply local bounds (tighten, never broaden); 5. reserve mandate usage + local quotas atomically; 6. return the full decision + reservation. #### Parameters ##### run [`AutonomousRun`](../interfaces/AutonomousRun.md) ##### step [`AgentStep`](../interfaces/AgentStep.md) ##### now? `number` = `...` #### Returns `Promise`\<[`AuthorizeStepResult`](../interfaces/AuthorizeStepResult.md)\> *** ### commitStep() > **commitStep**(`reservationId`, `executionProof?`): `Promise`\<`void`\> #### Parameters ##### reservationId `string` ##### executionProof? `unknown` #### Returns `Promise`\<`void`\> --- ## Page: MemoryGrantUsageStore URL: https://docs.totem.ing/api/totemsdk-agent-policy/classes/MemoryGrantUsageStore [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / MemoryGrantUsageStore # Class: MemoryGrantUsageStore In-memory `GrantUsageStore`. Atomic within a single process (single-threaded JS event loop), so concurrent steps observe a consistent budget. Swap for a durable store (SQLite/Postgres) at the wallet boundary. ## Implements - [`GrantUsageStore`](../interfaces/GrantUsageStore.md) ## Constructors ### Constructor > **new MemoryGrantUsageStore**(`options?`): `MemoryGrantUsageStore` #### Parameters ##### options? [`MemoryGrantUsageStoreOptions`](../interfaces/MemoryGrantUsageStoreOptions.md) #### Returns `MemoryGrantUsageStore` ## Methods ### abort() > **abort**(`reservationId`, `reason`): `Promise`\<`void`\> Abort a reservation after execution fails or is cancelled. #### Parameters ##### reservationId `string` ##### reason `string` #### Returns `Promise`\<`void`\> #### Implementation of [`GrantUsageStore`](../interfaces/GrantUsageStore.md).[`abort`](../interfaces/GrantUsageStore.md#abort) *** ### authorizeAndReserve() > **authorizeAndReserve**(`input`): `Promise`\<[`StepAuthorization`](../interfaces/StepAuthorization.md)\> Atomically reserve mandate usage + local quotas for a step. #### Parameters ##### input ###### actionDigest `string` ###### mandateId `string` ###### now `number` ###### runId `string` ###### stepId `string` ###### ttlMs? `number` ###### usageDelta \{ `amount?`: `string`; `count`: `number`; \} ###### usageDelta.amount? `string` ###### usageDelta.count `number` #### Returns `Promise`\<[`StepAuthorization`](../interfaces/StepAuthorization.md)\> #### Implementation of [`GrantUsageStore`](../interfaces/GrantUsageStore.md).[`authorizeAndReserve`](../interfaces/GrantUsageStore.md#authorizeandreserve) *** ### commit() > **commit**(`reservationId`, `receipt`): `Promise`\<`void`\> Commit a reservation after execution succeeds. #### Parameters ##### reservationId `string` ##### receipt [`StepReceipt`](../interfaces/StepReceipt.md) #### Returns `Promise`\<`void`\> #### Implementation of [`GrantUsageStore`](../interfaces/GrantUsageStore.md).[`commit`](../interfaces/GrantUsageStore.md#commit) *** ### countAborted() > **countAborted**(`runId`): `Promise`\<`number`\> #### Parameters ##### runId `string` #### Returns `Promise`\<`number`\> #### Implementation of [`GrantUsageStore`](../interfaces/GrantUsageStore.md).[`countAborted`](../interfaces/GrantUsageStore.md#countaborted) *** ### countCommitted() > **countCommitted**(`runId`): `Promise`\<`number`\> Run-level accounting for local bounds. #### Parameters ##### runId `string` #### Returns `Promise`\<`number`\> #### Implementation of [`GrantUsageStore`](../interfaces/GrantUsageStore.md).[`countCommitted`](../interfaces/GrantUsageStore.md#countcommitted) *** ### countReserved() > **countReserved**(`runId`): `Promise`\<`number`\> #### Parameters ##### runId `string` #### Returns `Promise`\<`number`\> #### Implementation of [`GrantUsageStore`](../interfaces/GrantUsageStore.md).[`countReserved`](../interfaces/GrantUsageStore.md#countreserved) *** ### countUnknown() > **countUnknown**(`runId`): `Promise`\<`number`\> Reservations whose outcome is unknown after crash/timeout — budget HELD. #### Parameters ##### runId `string` #### Returns `Promise`\<`number`\> #### Implementation of [`GrantUsageStore`](../interfaces/GrantUsageStore.md).[`countUnknown`](../interfaces/GrantUsageStore.md#countunknown) *** ### getReceipt() > **getReceipt**(`reservationId`): [`StepReceipt`](../interfaces/StepReceipt.md) \| `undefined` #### Parameters ##### reservationId `string` #### Returns [`StepReceipt`](../interfaces/StepReceipt.md) \| `undefined` *** ### getReservation() > **getReservation**(`reservationId`): `Promise`\<[`StepAuthorization`](../interfaces/StepAuthorization.md) \| `undefined`\> Read a reservation (for commit/abort bookkeeping). #### Parameters ##### reservationId `string` #### Returns `Promise`\<[`StepAuthorization`](../interfaces/StepAuthorization.md) \| `undefined`\> #### Implementation of [`GrantUsageStore`](../interfaces/GrantUsageStore.md).[`getReservation`](../interfaces/GrantUsageStore.md#getreservation) *** ### listCommittedReceipts() > **listCommittedReceipts**(`mandateId`): `Promise`\<[`StepReceipt`](../interfaces/StepReceipt.md)[]\> Committed receipts for a mandate — used to build the usage snapshot. #### Parameters ##### mandateId `string` #### Returns `Promise`\<[`StepReceipt`](../interfaces/StepReceipt.md)[]\> #### Implementation of [`GrantUsageStore`](../interfaces/GrantUsageStore.md).[`listCommittedReceipts`](../interfaces/GrantUsageStore.md#listcommittedreceipts) *** ### reconcileReservation() > **reconcileReservation**(`reservationId`, `outcome`, `opts?`): `Promise`\<`void`\> Explicit settlement of a recovered (`unknown`) reservation. The only way budget is released is `'definitely-not-executed'`; `'completed'` commits. #### Parameters ##### reservationId `string` ##### outcome `ReservationSettlementOutcome` ##### opts? ###### reason? `string` ###### receipt? [`StepReceipt`](../interfaces/StepReceipt.md) #### Returns `Promise`\<`void`\> #### Implementation of [`GrantUsageStore`](../interfaces/GrantUsageStore.md).[`reconcileReservation`](../interfaces/GrantUsageStore.md#reconcilereservation) *** ### recoverReservations() > **recoverReservations**(`runId?`): `Promise`\<`OutOfBandReservation`[]\> Conservative reservation recovery: unsettled past-deadline reservations are classified `unknown` and their budget is HELD until explicit reconciliation. #### Parameters ##### runId? `string` #### Returns `Promise`\<`OutOfBandReservation`[]\> #### Implementation of [`GrantUsageStore`](../interfaces/GrantUsageStore.md).[`recoverReservations`](../interfaces/GrantUsageStore.md#recoverreservations) --- ## Page: MemoryReceiptStore URL: https://docs.totem.ing/api/totemsdk-agent-policy/classes/MemoryReceiptStore [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / MemoryReceiptStore # Class: MemoryReceiptStore In-memory receipt store with optional JSON-file persistence. ## Example ```ts // In-memory only const store = new MemoryReceiptStore(); // With file persistence const store = new MemoryReceiptStore({ filePath: './data/receipts.jsonl' }); ``` ## Implements - [`ReceiptStore`](../interfaces/ReceiptStore.md) ## Constructors ### Constructor > **new MemoryReceiptStore**(`opts?`): `MemoryReceiptStore` #### Parameters ##### opts? ###### filePath? `string` #### Returns `MemoryReceiptStore` ## Methods ### count() > **count**(): `Promise`\<`number`\> Total number of stored receipts. #### Returns `Promise`\<`number`\> #### Implementation of [`ReceiptStore`](../interfaces/ReceiptStore.md).[`count`](../interfaces/ReceiptStore.md#count) *** ### get() > **get**(`receiptId`): `Promise`\<[`AgentReceipt`](../interfaces/AgentReceipt.md) \| `null`\> Retrieve a receipt by receiptId. #### Parameters ##### receiptId `string` #### Returns `Promise`\<[`AgentReceipt`](../interfaces/AgentReceipt.md) \| `null`\> #### Implementation of [`ReceiptStore`](../interfaces/ReceiptStore.md).[`get`](../interfaces/ReceiptStore.md#get) *** ### list() > **list**(`limit?`, `offset?`): `Promise`\<[`AgentReceipt`](../interfaces/AgentReceipt.md)[]\> List all receipts, newest first. #### Parameters ##### limit? `number` = `50` ##### offset? `number` = `0` #### Returns `Promise`\<[`AgentReceipt`](../interfaces/AgentReceipt.md)[]\> #### Implementation of [`ReceiptStore`](../interfaces/ReceiptStore.md).[`list`](../interfaces/ReceiptStore.md#list) *** ### save() > **save**(`receipt`): `Promise`\<`string`\> Persist a receipt. Returns a receiptId for retrieval. #### Parameters ##### receipt [`AgentReceipt`](../interfaces/AgentReceipt.md) #### Returns `Promise`\<`string`\> #### Implementation of [`ReceiptStore`](../interfaces/ReceiptStore.md).[`save`](../interfaces/ReceiptStore.md#save) --- ## Page: MemoryRunStateStore URL: https://docs.totem.ing/api/totemsdk-agent-policy/classes/MemoryRunStateStore [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / MemoryRunStateStore # Class: MemoryRunStateStore ## Implements - [`RunStateStore`](../interfaces/RunStateStore.md) ## Constructors ### Constructor > **new MemoryRunStateStore**(`options?`): `MemoryRunStateStore` #### Parameters ##### options? `MemoryRunStateStoreOptions` #### Returns `MemoryRunStateStore` ## Methods ### abortStep() > **abortStep**(`reservationId`, `reason`): `Promise`\<`void`\> #### Parameters ##### reservationId `string` ##### reason `string` #### Returns `Promise`\<`void`\> #### Implementation of [`RunStateStore`](../interfaces/RunStateStore.md).[`abortStep`](../interfaces/RunStateStore.md#abortstep) *** ### checkNonce() > **checkNonce**(`runId`, `nonce`): `Promise`\<`boolean`\> #### Parameters ##### runId `string` ##### nonce `string` #### Returns `Promise`\<`boolean`\> #### Implementation of [`RunStateStore`](../interfaces/RunStateStore.md).[`checkNonce`](../interfaces/RunStateStore.md#checknonce) *** ### commitStep() > **commitStep**(`reservationId`, `receipt`): `Promise`\<`void`\> #### Parameters ##### reservationId `string` ##### receipt [`RunStepReceipt`](../interfaces/RunStepReceipt.md) #### Returns `Promise`\<`void`\> #### Implementation of [`RunStateStore`](../interfaces/RunStateStore.md).[`commitStep`](../interfaces/RunStateStore.md#commitstep) *** ### createRun() > **createRun**(`snapshot`): `Promise`\<`void`\> #### Parameters ##### snapshot [`RunStateSnapshot`](../interfaces/RunStateSnapshot.md) #### Returns `Promise`\<`void`\> #### Implementation of [`RunStateStore`](../interfaces/RunStateStore.md).[`createRun`](../interfaces/RunStateStore.md#createrun) *** ### getReceipt() > **getReceipt**(`reservationId`): `Promise`\<[`RunStepReceipt`](../interfaces/RunStepReceipt.md) \| `undefined`\> #### Parameters ##### reservationId `string` #### Returns `Promise`\<[`RunStepReceipt`](../interfaces/RunStepReceipt.md) \| `undefined`\> #### Implementation of [`RunStateStore`](../interfaces/RunStateStore.md).[`getReceipt`](../interfaces/RunStateStore.md#getreceipt) *** ### getReservation() > **getReservation**(`reservationId`): `Promise`\<[`RunReservation`](../interfaces/RunReservation.md) \| `undefined`\> #### Parameters ##### reservationId `string` #### Returns `Promise`\<[`RunReservation`](../interfaces/RunReservation.md) \| `undefined`\> #### Implementation of [`RunStateStore`](../interfaces/RunStateStore.md).[`getReservation`](../interfaces/RunStateStore.md#getreservation) *** ### getRun() > **getRun**(`runId`): `Promise`\<[`RunStateSnapshot`](../interfaces/RunStateSnapshot.md) \| `undefined`\> #### Parameters ##### runId `string` #### Returns `Promise`\<[`RunStateSnapshot`](../interfaces/RunStateSnapshot.md) \| `undefined`\> #### Implementation of [`RunStateStore`](../interfaces/RunStateStore.md).[`getRun`](../interfaces/RunStateStore.md#getrun) *** ### listStepReceipts() > **listStepReceipts**(`runId`): `Promise`\<[`RunStepReceipt`](../interfaces/RunStepReceipt.md)[]\> #### Parameters ##### runId `string` #### Returns `Promise`\<[`RunStepReceipt`](../interfaces/RunStepReceipt.md)[]\> #### Implementation of [`RunStateStore`](../interfaces/RunStateStore.md).[`listStepReceipts`](../interfaces/RunStateStore.md#liststepreceipts) *** ### reconcileReservation() > **reconcileReservation**(`reservationId`, `outcome`, `opts?`): `Promise`\<`void`\> Settle a recovered (`unknown`) reservation. The ONLY way an unsettled reservation releases its budget is an explicit `'definitely-not-executed'` reconciliation; `'completed'` commits it and folds the receipt into the run totals. #### Parameters ##### reservationId `string` ##### outcome `ReservationSettlementOutcome` ##### opts? ###### reason? `string` ###### receipt? [`RunStepReceipt`](../interfaces/RunStepReceipt.md) #### Returns `Promise`\<`void`\> #### Implementation of [`RunStateStore`](../interfaces/RunStateStore.md).[`reconcileReservation`](../interfaces/RunStateStore.md#reconcilereservation) *** ### recoverReservations() > **recoverReservations**(`runId?`): `Promise`\<`OutOfBandReservation`[]\> Conservative reservation recovery (RFC-007 §3.5): a reservation that was never settled before its deadline is classified `unknown` — its budget is HELD, never restored by expiry. Returns every unsettled reservation. #### Parameters ##### runId? `string` #### Returns `Promise`\<`OutOfBandReservation`[]\> #### Implementation of [`RunStateStore`](../interfaces/RunStateStore.md).[`recoverReservations`](../interfaces/RunStateStore.md#recoverreservations) *** ### reserveStep() > **reserveStep**(`reservation`): `Promise`\<`void`\> #### Parameters ##### reservation [`RunReservation`](../interfaces/RunReservation.md) #### Returns `Promise`\<`void`\> #### Implementation of [`RunStateStore`](../interfaces/RunStateStore.md).[`reserveStep`](../interfaces/RunStateStore.md#reservestep) --- ## Page: RateLimitPolicy URL: https://docs.totem.ing/api/totemsdk-agent-policy/classes/RateLimitPolicy [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / RateLimitPolicy # Class: RateLimitPolicy A single composable middleware layer in the policy evaluation pipeline. Each middleware receives the full AgentProposal and returns a decision. Evaluation is read-only. Implementors that need state (rate limits, daily caps) expose the optional reservation lifecycle below. The middleware API replaces the boolean-based AgentPolicy with a richer three-state result that includes a reason string for auditability. ## Implements - [`PolicyMiddleware`](../interfaces/PolicyMiddleware.md) ## Constructors ### Constructor > **new RateLimitPolicy**(`maxProposals`, `windowMs`): `RateLimitPolicy` #### Parameters ##### maxProposals `number` ##### windowMs `number` #### Returns `RateLimitPolicy` ## Methods ### commit() > **commit**(`operationId`): `Promise`\<`void`\> Commit a prior reservation after execution succeeds. #### Parameters ##### operationId `string` #### Returns `Promise`\<`void`\> #### Implementation of [`PolicyMiddleware`](../interfaces/PolicyMiddleware.md).[`commit`](../interfaces/PolicyMiddleware.md#commit) *** ### evaluate() > **evaluate**(`proposal`, `now?`): `Promise`\<[`PolicyEvalResult`](../interfaces/PolicyEvalResult.md)\> Evaluate a proposal. Called in sequence by ComposablePolicy. #### Parameters ##### proposal [`AgentProposal`](../interfaces/AgentProposal.md) ##### now? `number` = `...` #### Returns `Promise`\<[`PolicyEvalResult`](../interfaces/PolicyEvalResult.md)\> #### Implementation of [`PolicyMiddleware`](../interfaces/PolicyMiddleware.md).[`evaluate`](../interfaces/PolicyMiddleware.md#evaluate) *** ### release() > **release**(`operationId`): `Promise`\<`void`\> Release a reservation. Monotonic: only `reserved → released` is allowed; releasing a `committed` operation is a no-op so committed quota can never be recycled by a later reservation under the same operation ID. #### Parameters ##### operationId `string` #### Returns `Promise`\<`void`\> #### Implementation of [`PolicyMiddleware`](../interfaces/PolicyMiddleware.md).[`release`](../interfaces/PolicyMiddleware.md#release) *** ### reserve() > **reserve**(`proposal`, `now?`): `Promise`\<[`PolicyEvalResult`](../interfaces/PolicyEvalResult.md)\> Reserve state for execution using `proposal.id` as the idempotency key. Implementations must not consume committed quota during evaluation. #### Parameters ##### proposal [`AgentProposal`](../interfaces/AgentProposal.md) ##### now? `number` = `...` #### Returns `Promise`\<[`PolicyEvalResult`](../interfaces/PolicyEvalResult.md)\> #### Implementation of [`PolicyMiddleware`](../interfaces/PolicyMiddleware.md).[`reserve`](../interfaces/PolicyMiddleware.md#reserve) *** ### reset() > **reset**(): `Promise`\<`void`\> Optional: reset internal state (useful in tests or at midnight rollover). #### Returns `Promise`\<`void`\> #### Implementation of [`PolicyMiddleware`](../interfaces/PolicyMiddleware.md).[`reset`](../interfaces/PolicyMiddleware.md#reset) --- ## Page: RecipientAllowlistPolicy URL: https://docs.totem.ing/api/totemsdk-agent-policy/classes/RecipientAllowlistPolicy [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / RecipientAllowlistPolicy # Class: RecipientAllowlistPolicy RecipientAllowlistPolicy — only allows proposals whose recipient address appears in a predefined allowlist. Proposals without a recipient pass through (lookups, receipts). Addresses are compared as case-sensitive strings. Include all valid address formats (Mx-prefixed, 0x-prefixed, raw hex) that your agents may use. ## Example ```ts const allowlist = new RecipientAllowlistPolicy([ 'MxABC...', // supplier A 'MxDEF...', // supplier B ]); ``` ## Implements - [`PolicyMiddleware`](../interfaces/PolicyMiddleware.md) ## Constructors ### Constructor > **new RecipientAllowlistPolicy**(`allowedAddresses`): `RecipientAllowlistPolicy` #### Parameters ##### allowedAddresses `string`[] #### Returns `RecipientAllowlistPolicy` ## Methods ### evaluate() > **evaluate**(`proposal`): `Promise`\<[`PolicyEvalResult`](../interfaces/PolicyEvalResult.md)\> Evaluate a proposal. Called in sequence by ComposablePolicy. #### Parameters ##### proposal [`AgentProposal`](../interfaces/AgentProposal.md) #### Returns `Promise`\<[`PolicyEvalResult`](../interfaces/PolicyEvalResult.md)\> #### Implementation of [`PolicyMiddleware`](../interfaces/PolicyMiddleware.md).[`evaluate`](../interfaces/PolicyMiddleware.md#evaluate) --- ## Page: RiskThresholdPolicy URL: https://docs.totem.ing/api/totemsdk-agent-policy/classes/RiskThresholdPolicy [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / RiskThresholdPolicy # Class: RiskThresholdPolicy A single composable middleware layer in the policy evaluation pipeline. Each middleware receives the full AgentProposal and returns a decision. Evaluation is read-only. Implementors that need state (rate limits, daily caps) expose the optional reservation lifecycle below. The middleware API replaces the boolean-based AgentPolicy with a richer three-state result that includes a reason string for auditability. ## Implements - [`PolicyMiddleware`](../interfaces/PolicyMiddleware.md) ## Constructors ### Constructor > **new RiskThresholdPolicy**(`maxRisk`): `RiskThresholdPolicy` #### Parameters ##### maxRisk `"low"` \| `"medium"` \| `"high"` #### Returns `RiskThresholdPolicy` ## Methods ### evaluate() > **evaluate**(`proposal`): `Promise`\<[`PolicyEvalResult`](../interfaces/PolicyEvalResult.md)\> Evaluate a proposal. Called in sequence by ComposablePolicy. #### Parameters ##### proposal [`AgentProposal`](../interfaces/AgentProposal.md) #### Returns `Promise`\<[`PolicyEvalResult`](../interfaces/PolicyEvalResult.md)\> #### Implementation of [`PolicyMiddleware`](../interfaces/PolicyMiddleware.md).[`evaluate`](../interfaces/PolicyMiddleware.md#evaluate) --- ## Page: SqliteRunStateStore URL: https://docs.totem.ing/api/totemsdk-agent-policy/classes/SqliteRunStateStore [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / SqliteRunStateStore # Class: SqliteRunStateStore ## Implements - [`RunStateStore`](../interfaces/RunStateStore.md) - [`GrantUsageStore`](../interfaces/GrantUsageStore.md) ## Constructors ### Constructor > **new SqliteRunStateStore**(`dbPath`, `options?`): `SqliteRunStateStore` #### Parameters ##### dbPath `string` ##### options? [`SqliteRunStateStoreOptions`](../interfaces/SqliteRunStateStoreOptions.md) #### Returns `SqliteRunStateStore` ## Methods ### abort() > **abort**(`reservationId`, `reason`): `Promise`\<`void`\> Abort a reservation after execution fails or is cancelled. #### Parameters ##### reservationId `string` ##### reason `string` #### Returns `Promise`\<`void`\> #### Implementation of [`GrantUsageStore`](../interfaces/GrantUsageStore.md).[`abort`](../interfaces/GrantUsageStore.md#abort) *** ### abortStep() > **abortStep**(`reservationId`, `reason`): `Promise`\<`void`\> #### Parameters ##### reservationId `string` ##### reason `string` #### Returns `Promise`\<`void`\> #### Implementation of [`RunStateStore`](../interfaces/RunStateStore.md).[`abortStep`](../interfaces/RunStateStore.md#abortstep) *** ### authorizeAndReserve() > **authorizeAndReserve**(`input`): `Promise`\<[`StepAuthorization`](../interfaces/StepAuthorization.md)\> Atomically reserve mandate usage + local quotas for a step. #### Parameters ##### input ###### actionDigest `string` ###### mandateId `string` ###### now `number` ###### runId `string` ###### stepId `string` ###### ttlMs? `number` ###### usageDelta \{ `amount?`: `string`; `count`: `number`; \} ###### usageDelta.amount? `string` ###### usageDelta.count `number` #### Returns `Promise`\<[`StepAuthorization`](../interfaces/StepAuthorization.md)\> #### Implementation of [`GrantUsageStore`](../interfaces/GrantUsageStore.md).[`authorizeAndReserve`](../interfaces/GrantUsageStore.md#authorizeandreserve) *** ### checkNonce() > **checkNonce**(`runId`, `nonce`): `Promise`\<`boolean`\> #### Parameters ##### runId `string` ##### nonce `string` #### Returns `Promise`\<`boolean`\> #### Implementation of [`RunStateStore`](../interfaces/RunStateStore.md).[`checkNonce`](../interfaces/RunStateStore.md#checknonce) *** ### close() > **close**(): `void` #### Returns `void` *** ### commit() > **commit**(`reservationId`, `receipt`): `Promise`\<`void`\> Commit a reservation after execution succeeds. #### Parameters ##### reservationId `string` ##### receipt [`StepReceipt`](../interfaces/StepReceipt.md) #### Returns `Promise`\<`void`\> #### Implementation of [`GrantUsageStore`](../interfaces/GrantUsageStore.md).[`commit`](../interfaces/GrantUsageStore.md#commit) *** ### commitStep() > **commitStep**(`reservationId`, `receipt`): `Promise`\<`void`\> #### Parameters ##### reservationId `string` ##### receipt [`RunStepReceipt`](../interfaces/RunStepReceipt.md) #### Returns `Promise`\<`void`\> #### Implementation of [`RunStateStore`](../interfaces/RunStateStore.md).[`commitStep`](../interfaces/RunStateStore.md#commitstep) *** ### countAborted() > **countAborted**(`runId`): `Promise`\<`number`\> #### Parameters ##### runId `string` #### Returns `Promise`\<`number`\> #### Implementation of [`GrantUsageStore`](../interfaces/GrantUsageStore.md).[`countAborted`](../interfaces/GrantUsageStore.md#countaborted) *** ### countCommitted() > **countCommitted**(`runId`): `Promise`\<`number`\> Run-level accounting for local bounds. #### Parameters ##### runId `string` #### Returns `Promise`\<`number`\> #### Implementation of [`GrantUsageStore`](../interfaces/GrantUsageStore.md).[`countCommitted`](../interfaces/GrantUsageStore.md#countcommitted) *** ### countReserved() > **countReserved**(`runId`): `Promise`\<`number`\> #### Parameters ##### runId `string` #### Returns `Promise`\<`number`\> #### Implementation of [`GrantUsageStore`](../interfaces/GrantUsageStore.md).[`countReserved`](../interfaces/GrantUsageStore.md#countreserved) *** ### countUnknown() > **countUnknown**(`runId`): `Promise`\<`number`\> Reservations whose outcome is unknown after crash/timeout — budget HELD. #### Parameters ##### runId `string` #### Returns `Promise`\<`number`\> #### Implementation of [`GrantUsageStore`](../interfaces/GrantUsageStore.md).[`countUnknown`](../interfaces/GrantUsageStore.md#countunknown) *** ### createRun() > **createRun**(`snapshot`): `Promise`\<`void`\> #### Parameters ##### snapshot [`RunStateSnapshot`](../interfaces/RunStateSnapshot.md) #### Returns `Promise`\<`void`\> #### Implementation of [`RunStateStore`](../interfaces/RunStateStore.md).[`createRun`](../interfaces/RunStateStore.md#createrun) *** ### getReceipt() > **getReceipt**(`reservationId`): `Promise`\<[`RunStepReceipt`](../interfaces/RunStepReceipt.md) \| `undefined`\> #### Parameters ##### reservationId `string` #### Returns `Promise`\<[`RunStepReceipt`](../interfaces/RunStepReceipt.md) \| `undefined`\> #### Implementation of [`RunStateStore`](../interfaces/RunStateStore.md).[`getReceipt`](../interfaces/RunStateStore.md#getreceipt) *** ### getReservation() #### Call Signature > **getReservation**(`reservationId`): `Promise`\<[`RunReservation`](../interfaces/RunReservation.md) \| `undefined`\> Read a reservation (for commit/abort bookkeeping). ##### Parameters ###### reservationId `string` ##### Returns `Promise`\<[`RunReservation`](../interfaces/RunReservation.md) \| `undefined`\> ##### Implementation of [`GrantUsageStore`](../interfaces/GrantUsageStore.md).[`getReservation`](../interfaces/GrantUsageStore.md#getreservation) #### Call Signature > **getReservation**(`reservationId`): `Promise`\<[`StepAuthorization`](../interfaces/StepAuthorization.md) \| `undefined`\> ##### Parameters ###### reservationId `string` ##### Returns `Promise`\<[`StepAuthorization`](../interfaces/StepAuthorization.md) \| `undefined`\> ##### Implementation of `RunStateStore.getReservation` *** ### getRun() > **getRun**(`runId`): `Promise`\<[`RunStateSnapshot`](../interfaces/RunStateSnapshot.md) \| `undefined`\> #### Parameters ##### runId `string` #### Returns `Promise`\<[`RunStateSnapshot`](../interfaces/RunStateSnapshot.md) \| `undefined`\> #### Implementation of [`RunStateStore`](../interfaces/RunStateStore.md).[`getRun`](../interfaces/RunStateStore.md#getrun) *** ### listCommittedReceipts() > **listCommittedReceipts**(`mandateId`): `Promise`\<[`StepReceipt`](../interfaces/StepReceipt.md)[]\> Committed receipts for a mandate — used to build the usage snapshot. #### Parameters ##### mandateId `string` #### Returns `Promise`\<[`StepReceipt`](../interfaces/StepReceipt.md)[]\> #### Implementation of [`GrantUsageStore`](../interfaces/GrantUsageStore.md).[`listCommittedReceipts`](../interfaces/GrantUsageStore.md#listcommittedreceipts) *** ### listStepReceipts() > **listStepReceipts**(`runId`): `Promise`\<[`RunStepReceipt`](../interfaces/RunStepReceipt.md)[]\> #### Parameters ##### runId `string` #### Returns `Promise`\<[`RunStepReceipt`](../interfaces/RunStepReceipt.md)[]\> #### Implementation of [`RunStateStore`](../interfaces/RunStateStore.md).[`listStepReceipts`](../interfaces/RunStateStore.md#liststepreceipts) *** ### reconcileReservation() > **reconcileReservation**(`reservationId`, `outcome`, `opts?`): `Promise`\<`void`\> Settle a recovered (`unknown`) reservation. The ONLY way an unsettled reservation releases its budget is an explicit `'definitely-not-executed'` reconciliation; `'completed'` commits it and folds the receipt into the run totals. #### Parameters ##### reservationId `string` ##### outcome `ReservationSettlementOutcome` ##### opts? ###### reason? `string` ###### receipt? [`StepReceipt`](../interfaces/StepReceipt.md) \| [`RunStepReceipt`](../interfaces/RunStepReceipt.md) #### Returns `Promise`\<`void`\> #### Implementation of [`GrantUsageStore`](../interfaces/GrantUsageStore.md).[`reconcileReservation`](../interfaces/GrantUsageStore.md#reconcilereservation) *** ### recoverReservations() > **recoverReservations**(`runId?`): `Promise`\<`OutOfBandReservation`[]\> Conservative reservation recovery (RFC-007 §3.5): a reservation that was never settled before its deadline is classified `unknown` — its budget is HELD, never restored by expiry. Returns every unsettled reservation. #### Parameters ##### runId? `string` #### Returns `Promise`\<`OutOfBandReservation`[]\> #### Implementation of [`GrantUsageStore`](../interfaces/GrantUsageStore.md).[`recoverReservations`](../interfaces/GrantUsageStore.md#recoverreservations) *** ### reserveStep() > **reserveStep**(`reservation`): `Promise`\<`void`\> #### Parameters ##### reservation [`RunReservation`](../interfaces/RunReservation.md) #### Returns `Promise`\<`void`\> #### Implementation of [`RunStateStore`](../interfaces/RunStateStore.md).[`reserveStep`](../interfaces/RunStateStore.md#reservestep) --- ## Page: TimeWindowPolicy URL: https://docs.totem.ing/api/totemsdk-agent-policy/classes/TimeWindowPolicy [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / TimeWindowPolicy # Class: TimeWindowPolicy TimeWindowPolicy — only approves proposals during a configurable daily time window (e.g. business hours 06:00 – 22:00 UTC). Times are specified in **minutes since midnight UTC**. Use helpers: - `TimeWindowPolicy.hour(6)` → 360 (06:00) - `TimeWindowPolicy.hour(22)` → 1320 (22:00) Proposals outside the window are rejected with the time until the next opening so the agent can schedule a retry. ## Example ```ts // Only allow proposals between 06:00 and 22:00 UTC const businessHours = new TimeWindowPolicy(360, 1320); ``` ## Implements - [`PolicyMiddleware`](../interfaces/PolicyMiddleware.md) ## Constructors ### Constructor > **new TimeWindowPolicy**(`startMinute`, `endMinute`): `TimeWindowPolicy` #### Parameters ##### startMinute `number` Minutes since midnight UTC when the window opens (0–1439). ##### endMinute `number` Minutes since midnight UTC when the window closes (1–1440). #### Returns `TimeWindowPolicy` ## Methods ### evaluate() > **evaluate**(`proposal`, `now?`): `Promise`\<[`PolicyEvalResult`](../interfaces/PolicyEvalResult.md)\> Evaluate a proposal. Called in sequence by ComposablePolicy. #### Parameters ##### proposal [`AgentProposal`](../interfaces/AgentProposal.md) ##### now? `Date` = `...` #### Returns `Promise`\<[`PolicyEvalResult`](../interfaces/PolicyEvalResult.md)\> #### Implementation of [`PolicyMiddleware`](../interfaces/PolicyMiddleware.md).[`evaluate`](../interfaces/PolicyMiddleware.md#evaluate) *** ### hour() > `static` **hour**(`h`): `number` Convenience: convert an hour (0–23) to minutes since midnight. #### Parameters ##### h `number` #### Returns `number` --- ## Page: IntentType URL: https://docs.totem.ing/api/totemsdk-agent-policy/enumerations/IntentType [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / IntentType # Enumeration: IntentType ## Generated from protobuf enum totem.agent.policy.v1.IntentType ## Enumeration Members ### CHANNEL\_UPDATE > **CHANNEL\_UPDATE**: `2` #### Generated from protobuf enum value: INTENT_TYPE_CHANNEL_UPDATE = 2; *** ### LOOKUP > **LOOKUP**: `4` #### Generated from protobuf enum value: INTENT_TYPE_LOOKUP = 4; *** ### PAYMENT > **PAYMENT**: `1` #### Generated from protobuf enum value: INTENT_TYPE_PAYMENT = 1; *** ### RECEIPT > **RECEIPT**: `5` #### Generated from protobuf enum value: INTENT_TYPE_RECEIPT = 5; *** ### SETTLEMENT > **SETTLEMENT**: `3` #### Generated from protobuf enum value: INTENT_TYPE_SETTLEMENT = 3; *** ### UNSPECIFIED > **UNSPECIFIED**: `0` #### Generated from protobuf enum value: INTENT_TYPE_UNSPECIFIED = 0; --- ## Page: ReceiptStatus URL: https://docs.totem.ing/api/totemsdk-agent-policy/enumerations/ReceiptStatus [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / ReceiptStatus # Enumeration: ReceiptStatus ## Generated from protobuf enum totem.agent.policy.v1.ReceiptStatus ## Enumeration Members ### APPROVED > **APPROVED**: `1` #### Generated from protobuf enum value: RECEIPT_STATUS_APPROVED = 1; *** ### PENDING\_USER > **PENDING\_USER**: `3` #### Generated from protobuf enum value: RECEIPT_STATUS_PENDING_USER = 3; *** ### REJECTED > **REJECTED**: `2` #### Generated from protobuf enum value: RECEIPT_STATUS_REJECTED = 2; *** ### UNSPECIFIED > **UNSPECIFIED**: `0` #### Generated from protobuf enum value: RECEIPT_STATUS_UNSPECIFIED = 0; --- ## Page: RiskLevel URL: https://docs.totem.ing/api/totemsdk-agent-policy/enumerations/RiskLevel [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / RiskLevel # Enumeration: RiskLevel ## Generated from protobuf enum totem.agent.policy.v1.RiskLevel ## Enumeration Members ### HIGH > **HIGH**: `3` #### Generated from protobuf enum value: RISK_LEVEL_HIGH = 3; *** ### LOW > **LOW**: `1` #### Generated from protobuf enum value: RISK_LEVEL_LOW = 1; *** ### MEDIUM > **MEDIUM**: `2` #### Generated from protobuf enum value: RISK_LEVEL_MEDIUM = 2; *** ### UNSPECIFIED > **UNSPECIFIED**: `0` #### Generated from protobuf enum value: RISK_LEVEL_UNSPECIFIED = 0; --- ## Page: accumulateAmount URL: https://docs.totem.ing/api/totemsdk-agent-policy/functions/accumulateAmount [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / accumulateAmount # Function: accumulateAmount() > **accumulateAmount**(`a`, `b`): `string` ## Parameters ### a `string` \| `undefined` ### b `string` ## Returns `string` --- ## Page: canonicalAgentActionDigest URL: https://docs.totem.ing/api/totemsdk-agent-policy/functions/canonicalAgentActionDigest [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / canonicalAgentActionDigest # Function: canonicalAgentActionDigest() > **canonicalAgentActionDigest**(`action`): `string` Canonical digest of a prepared operation's SECURITY FACTS: the action, the verified effects (spends/fees/channels/state), and the run+step binding. Agent-supplied hints are excluded. A step that changes any effect or its run/step identity is a different operation. ## Parameters ### action [`CanonicalAgentAction`](../interfaces/CanonicalAgentAction.md) ## Returns `string` --- ## Page: checkObligations URL: https://docs.totem.ing/api/totemsdk-agent-policy/functions/checkObligations [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / checkObligations # Function: checkObligations() > **checkObligations**(`obligations`, `action`, `evidence`, `now`): `object` Validate obligations for a step (quoting freshness, simulation, execution, postconditions). ## Parameters ### obligations [`RunObligations`](../interfaces/RunObligations.md) \| `undefined` ### action [`CanonicalAgentAction`](../interfaces/CanonicalAgentAction.md) ### evidence #### executionReceipt? `unknown` #### postconditionsVerified? `boolean` #### quoteTimestamp? `number` #### simulation? `unknown` ### now `number` ## Returns `object` ### ok > **ok**: `boolean` ### reason? > `optional` **reason?**: `string` --- ## Page: checkRunLimits URL: https://docs.totem.ing/api/totemsdk-agent-policy/functions/checkRunLimits [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / checkRunLimits # Function: checkRunLimits() > **checkRunLimits**(`profile`, `action`, `state`): [`BoundaryFailure`](../interfaces/BoundaryFailure.md) \| `undefined` Evaluate run limits for a prepared action's verified effects. All ceilings are per-profile; a broader mandate is never needed. ## Parameters ### profile [`AutonomyProfile`](../interfaces/AutonomyProfile.md) ### action [`CanonicalAgentAction`](../interfaces/CanonicalAgentAction.md) ### state #### abortedSteps `number` #### committedSteps `number` #### feesByToken `Record`\<`string`, `string`\> #### now `number` #### outstandingByToken `Record`\<`string`, `string`\> #### reservedSteps `number` #### spentByToken `Record`\<`string`, `string`\> #### startedAt `number` #### stepSpendByToken `Record`\<`string`, `string`\> ## Returns [`BoundaryFailure`](../interfaces/BoundaryFailure.md) \| `undefined` --- ## Page: checkTransition URL: https://docs.totem.ing/api/totemsdk-agent-policy/functions/checkTransition [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / checkTransition # Function: checkTransition() > **checkTransition**(`profile`, `fromAction`, `toAction`): `boolean` Validate a step transition against the profile's allowed DAG. Returns whether `toAction` may follow `fromAction` (undefined = start of run). ## Parameters ### profile [`AutonomyProfile`](../interfaces/AutonomyProfile.md) ### fromAction `string` \| `undefined` ### toAction `string` ## Returns `boolean` --- ## Page: createAutonomyPolicy URL: https://docs.totem.ing/api/totemsdk-agent-policy/functions/createAutonomyPolicy [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / createAutonomyPolicy # Function: createAutonomyPolicy() > **createAutonomyPolicy**(`config`): [`AutonomyPolicy`](../interfaces/AutonomyPolicy.md) Define the local autonomy policy. Profiles are ceilings; they cannot broaden a mandate. ## Parameters ### config #### profiles `Record`\<`string`, `ProfileConfig`\> ## Returns [`AutonomyPolicy`](../interfaces/AutonomyPolicy.md) --- ## Page: defaultActionExtractor URL: https://docs.totem.ing/api/totemsdk-agent-policy/functions/defaultActionExtractor [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / defaultActionExtractor # Function: defaultActionExtractor() > **defaultActionExtractor**(`proposal`): [`AuthorityActionIntent`](../interfaces/AuthorityActionIntent.md) Default mapping: AgentProposal → AuthorityActionIntent. The action is the intent type itself. The principal is the authenticated `proposal.principal` (falling back to `agentId` only when strict mode is off). The target is the recipient. Intent fields and metadata are exposed as constraints so dotted paths (`payload.*`) resolve via `@totemsdk/authority`'s `resolveActionField`. ## Parameters ### proposal [`AgentProposal`](../interfaces/AgentProposal.md) ## Returns [`AuthorityActionIntent`](../interfaces/AuthorityActionIntent.md) --- ## Page: evaluateGrantRequirement URL: https://docs.totem.ing/api/totemsdk-agent-policy/functions/evaluateGrantRequirement [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / evaluateGrantRequirement # Function: evaluateGrantRequirement() > **evaluateGrantRequirement**(`requirement`, `authorizedGrantIds`): `boolean` Evaluate a grant requirement (allOf / anyOf) against the set of grant ids that authorized. Explicit semantics — never "whichever approves first". ## Parameters ### requirement [`GrantRequirement`](../interfaces/GrantRequirement.md) \| `undefined` ### authorizedGrantIds `string`[] ## Returns `boolean` --- ## Page: intentAction URL: https://docs.totem.ing/api/totemsdk-agent-policy/functions/intentAction [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / intentAction # Function: intentAction() > **intentAction**(`type`): `string` Map an intent type to its real action namespace. The intent type IS the action — no `payment:*` synthesis. ## Parameters ### type `string` ## Returns `string` --- ## Page: isStartEligible URL: https://docs.totem.ing/api/totemsdk-agent-policy/functions/isStartEligible [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / isStartEligible # Function: isStartEligible() > **isStartEligible**(`profile`, `action`): `boolean` First-step eligibility: a rule whose `from` is 'start' lists starting actions. ## Parameters ### profile [`AutonomyProfile`](../interfaces/AutonomyProfile.md) ### action `string` ## Returns `boolean` --- ## Page: reduceToCanonicalAction URL: https://docs.totem.ing/api/totemsdk-agent-policy/functions/reduceToCanonicalAction [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / reduceToCanonicalAction # Function: reduceToCanonicalAction() > **reduceToCanonicalAction**(`runId`, `principal`, `agentId`, `step`, `evidence`): [`CanonicalAgentAction`](../interfaces/CanonicalAgentAction.md) Build a canonical action from a PREPARED operation. The wallet supplies the effects; the autonomy policy authorizes exactly these. ## Parameters ### runId `string` ### principal `string` ### agentId `string` ### step [`PreparedStep`](../interfaces/PreparedStep.md) ### evidence #### executionReceipt? `unknown` #### postconditionsVerified? `boolean` #### quoteTimestamp? `number` #### simulation? `unknown` ## Returns [`CanonicalAgentAction`](../interfaces/CanonicalAgentAction.md) --- ## Page: resolveStepField URL: https://docs.totem.ing/api/totemsdk-agent-policy/functions/resolveStepField [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / resolveStepField # Function: resolveStepField() > **resolveStepField**(`step`, `field`): `unknown` Resolve a trusted step field for mandate matching. Supports top-level step fields (`runId`, `stepId`, `sequence`, `parentStepIds`, `workflow`, `target`) and dotted paths into the action constraints (`payload.*`, `previousReceiptId`, `cumulativeAmount`, `failureCount`). ## Parameters ### step [`AgentStep`](../interfaces/AgentStep.md) ### field `string` ## Returns `unknown` --- ## Page: summarizeStepSpend URL: https://docs.totem.ing/api/totemsdk-agent-policy/functions/summarizeStepSpend [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / summarizeStepSpend # Function: summarizeStepSpend() > **summarizeStepSpend**(`effects`): `Record`\<`string`, `string`\> Compose a run-level spend ceiling from the prepared operations actually authorized/committed — used for the run receipt graph totals. ## Parameters ### effects [`StepEffects`](../interfaces/StepEffects.md) ## Returns `Record`\<`string`, `string`\> --- ## Page: AgentIdentity URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/AgentIdentity [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / AgentIdentity # Interface: AgentIdentity Minimal agent identity for lookup-node registration and capability advertisement. Contains NO private keys — just an address and capability list. Signing the capability announcement is always the wallet's responsibility, never the agent's. ## Properties ### address > **address**: `string` Minima address where this agent accepts payments. This is NOT a signing key — it is just an address for receiving funds. *** ### agentId > **agentId**: `string` Opaque string chosen by the agent (e.g. "my-invoice-agent-1"). *** ### capabilities > **capabilities**: `string`[] Capability names this agent can service (e.g. ["invoice-parse", "fx-quote"]). --- ## Page: AgentPolicy URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/AgentPolicy [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / AgentPolicy # Interface: AgentPolicy Policy evaluated by the Totem wallet layer — NEVER by the agent. The wallet implements this interface to decide whether to auto-sign or route to the user. The AI never has access to the policy implementation. ## Methods ### canAutoApprove() > **canAutoApprove**(`proposal`): `Promise`\<`boolean`\> Return true if the wallet should sign the intent without user interaction. Implementations typically check risk, amount thresholds, and known agents. #### Parameters ##### proposal [`AgentProposal`](AgentProposal.md) #### Returns `Promise`\<`boolean`\> *** ### commit()? > `optional` **commit**(`operationId`): `Promise`\<`void`\> #### Parameters ##### operationId `string` #### Returns `Promise`\<`void`\> *** ### release()? > `optional` **release**(`operationId`): `Promise`\<`void`\> #### Parameters ##### operationId `string` #### Returns `Promise`\<`void`\> *** ### requiresUserApproval() > **requiresUserApproval**(`proposal`): `Promise`\<`boolean`\> Return true if the wallet must show a user-approval UI before signing. Generally the complement of canAutoApprove, but may have independent logic (e.g. always require approval for settlements regardless of risk). #### Parameters ##### proposal [`AgentProposal`](AgentProposal.md) #### Returns `Promise`\<`boolean`\> *** ### reserve()? > `optional` **reserve**(`proposal`): `Promise`\<[`PolicyEvalResult`](PolicyEvalResult.md)\> Optional reservation lifecycle for stateful policies. The execution boundary calls `reserve` before executing, then `commit` after a successful execution or `release` on any failure path. When implemented, quota is only consumed through reserve/commit — a read-only `evaluate` / `canAutoApprove` never touches the limits. #### Parameters ##### proposal [`AgentProposal`](AgentProposal.md) #### Returns `Promise`\<[`PolicyEvalResult`](PolicyEvalResult.md)\> --- ## Page: AgentPolicyConfig URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/AgentPolicyConfig [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / AgentPolicyConfig # Interface: AgentPolicyConfig ## Generated from protobuf message totem.agent.policy.v1.AgentPolicyConfig ## Properties ### agentId > **agentId**: `string` #### Generated from protobuf field: string agent_id = 1 *** ### allowedIntents > **allowedIntents**: [`IntentType`](../enumerations/IntentType.md)[] #### Generated from protobuf field: repeated totem.agent.policy.v1.IntentType allowed_intents = 2 *** ### expiresAt > **expiresAt**: `string` #### Generated from protobuf field: int64 expires_at = 4 *** ### limits > **limits**: `object` #### Index Signature \[`key`: `string`\]: `string` #### Generated from protobuf field: map limits = 3 --- ## Page: AgentProposal URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/AgentProposal [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / AgentProposal # Interface: AgentProposal A concrete proposal from an agent, wrapping a PaymentIntent. The wallet evaluates this against an AgentPolicy before signing anything. ## Properties ### agentId > **agentId**: `string` Opaque agent identifier — NOT a public key, NOT a root-identity reference. Just a string the agent chooses (e.g. "qvac-payment-agent-v1"). *** ### confidence > **confidence**: `number` Agent's confidence in the proposal (0 = uncertain, 1 = certain). *** ### createdAt > **createdAt**: `number` Unix timestamp (ms) when this proposal was created. *** ### explanation > **explanation**: `string` Human-readable justification shown to the user in the approval UI. *** ### id > **id**: `string` Unique proposal identifier (UUID or agent-generated opaque string). *** ### intent > **intent**: [`PaymentIntent`](PaymentIntent.md) The intent this proposal wants executed. *** ### principal? > `optional` **principal?**: `string` Authenticated principal supplied by the trusted execution boundary (e.g. the wallet's resolved signer public-key digest or session ID). `agentId` is chosen by the agent and can be rotated to evade limits. Stateful policies MUST key quota buckets by `principal` when present, never by the caller-controlled `agentId` alone. The agent cannot set this field itself; only the wallet layer that executes the proposal populates it after authenticating the signer. --- ## Page: AgentReceipt URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/AgentReceipt [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / AgentReceipt # Interface: AgentReceipt Result returned to the agent after Totem has processed the intent. The agent uses this to learn whether its proposal was executed. ## Properties ### channelState? > `optional` **channelState?**: `string` Serialised Omnia channel state, set when an off-chain channel was updated. *** ### inferenceReceipt? > `optional` **inferenceReceipt?**: `IntelligenceReceipt` Consumption receipt for inference intents (`type: 'inference'`), when the wallet/authority layer attested execution. *** ### proposalId > **proposalId**: `string` Matches AgentProposal.id — ties the receipt back to the original proposal. *** ### rejectionReason? > `optional` **rejectionReason?**: `string` Human-readable reason, set when status is 'rejected'. *** ### settledAt? > `optional` **settledAt?**: `number` Unix timestamp (ms) when the intent was settled (signed/rejected). *** ### status > **status**: `"approved"` \| `"rejected"` \| `"pending_user"` - 'approved' — wallet signed and broadcast the transaction - 'rejected' — wallet or policy rejected the proposal - 'pending_user' — waiting for explicit user approval in the UI *** ### txpowId? > `optional` **txpowId?**: `string` TxPoW ID, set when a transaction was successfully mined and broadcast. --- ## Page: AgentStep URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/AgentStep [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / AgentStep # Interface: AgentStep ## Properties ### action > **action**: [`RunActionIntent`](RunActionIntent.md) *** ### evidenceIds? > `optional` **evidenceIds?**: `string`[] *** ### intent? > `optional` **intent?**: [`PaymentIntent`](PaymentIntent.md) The intent that produced this step (kept for wallet execution). *** ### parentStepIds? > `optional` **parentStepIds?**: `string`[] *** ### runId > **runId**: `string` *** ### sequence > **sequence**: `number` *** ### stepId > **stepId**: `string` --- ## Page: AmountCapConfig URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/AmountCapConfig [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / AmountCapConfig # Interface: AmountCapConfig AmountCapPolicy — caps the total amount of MIN or tokens an agent can spend per transaction and/or per day. Amounts are compared as BigInt. Only proposals with a numeric `amount` are subject to caps — proposals without an amount pass through. The daily cap uses a fixed 24-hour window per principal and token. ## Lifecycle contract `evaluate()` is read-only and never mutates state. Quota is consumed only through the reservation lifecycle: reserve(proposal) → commit(proposal.id) // on success → release(proposal.id) // on failure Operation IDs are bound to a canonical digest of the full proposal. A retry that reuses an operation ID with different contents is rejected. The committed state is irreversible: `release` only refunds a `reserved` operation and is a no-op on `committed` operations. ## Example ```ts // Max 500 MIN per transaction, 10_000 MIN per day const amountCap = new AmountCapPolicy({ perTx: '500', perDay: '10000' }); ``` ## Properties ### perDay? > `optional` **perDay?**: `string` Maximum total amount per fixed 24-hour window. *** ### perTx? > `optional` **perTx?**: `string` Maximum amount per single transaction. --- ## Page: AuthorityActionIntent URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/AuthorityActionIntent [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / AuthorityActionIntent # Interface: AuthorityActionIntent Action intent extracted from an AgentProposal for authority evaluation. ## Properties ### action > **action**: `string` *** ### agent > **agent**: `string` *** ### constraints? > `optional` **constraints?**: `Record`\<`string`, `unknown`\> *** ### nonce? > `optional` **nonce?**: `string` *** ### principal > **principal**: `string` *** ### target? > `optional` **target?**: `string` --- ## Page: AuthorityDecisionResult URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/AuthorityDecisionResult [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / AuthorityDecisionResult # Interface: AuthorityDecisionResult Full authority evaluation result — the complete `AuthorityDecision` plus the usage delta it implies. Never reduced to a boolean. ## Properties ### decision > **decision**: `AuthorityDecision` *** ### usageDelta > **usageDelta**: `object` #### amount? > `optional` **amount?**: `string` #### count > **count**: `number` --- ## Page: AuthorityEvaluator URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/AuthorityEvaluator [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / AuthorityEvaluator # Interface: AuthorityEvaluator Authority evaluation interface — the caller injects their authority engine (e.g. `@totemsdk/authority`'s `evaluateAuthority`). ## Methods ### evaluate() > **evaluate**(`params`): `Promise`\<[`AuthorityDecisionResult`](AuthorityDecisionResult.md)\> #### Parameters ##### params ###### action [`AuthorityActionIntent`](AuthorityActionIntent.md) ###### now `number` #### Returns `Promise`\<[`AuthorityDecisionResult`](AuthorityDecisionResult.md)\> --- ## Page: AuthorityPolicyOptions URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/AuthorityPolicyOptions [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / AuthorityPolicyOptions # Interface: AuthorityPolicyOptions ## Properties ### now? > `optional` **now?**: () => `number` Injectable clock (defaults to Date.now). #### Returns `number` *** ### strictPrincipal? > `optional` **strictPrincipal?**: `boolean` When true, a proposal without an authenticated `proposal.principal` is rejected outright. When false, the extractor falls back to `agentId`. --- ## Page: AuthorizeAndReserveParams URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/AuthorizeAndReserveParams [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / AuthorizeAndReserveParams # Interface: AuthorizeAndReserveParams ## Properties ### action > **action**: [`CanonicalAgentAction`](CanonicalAgentAction.md) The PREPARED operation reduced to canonical security facts. *** ### evidence? > `optional` **evidence?**: `object` #### executionReceipt? > `optional` **executionReceipt?**: `unknown` #### postconditionsVerified? > `optional` **postconditionsVerified?**: `boolean` #### quoteTimestamp? > `optional` **quoteTimestamp?**: `number` #### simulation? > `optional` **simulation?**: `unknown` *** ### nonce > **nonce**: `string` Must be unique per run (anti-replay of a prepared step). *** ### runId > **runId**: `string` *** ### stepId > **stepId**: `string` --- ## Page: AuthorizeStepResult URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/AuthorizeStepResult [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / AuthorizeStepResult # Interface: AuthorizeStepResult ## Properties ### allowed > **allowed**: `boolean` *** ### decision? > `optional` **decision?**: `AuthorityDecision` *** ### matchedMandateId? > `optional` **matchedMandateId?**: `string` *** ### reason? > `optional` **reason?**: `string` *** ### reservation? > `optional` **reservation?**: [`StepAuthorization`](StepAuthorization.md) --- ## Page: AutonomousRun URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/AutonomousRun [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / AutonomousRun # Interface: AutonomousRun ## Properties ### agentId > **agentId**: `string` *** ### grantProofIds > **grantProofIds**: `string`[] Signed mandate proof ids this run may draw from. *** ### mode > **mode**: [`RunMode`](../type-aliases/RunMode.md) *** ### planDigest? > `optional` **planDigest?**: `string` Plan digest, when plan_locked. *** ### principal > **principal**: `string` Authenticated principal (wallet-resolved signer / session), never agentId. *** ### runId > **runId**: `string` *** ### startedAt > **startedAt**: `number` --- ## Page: AutonomyPolicy URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/AutonomyPolicy [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / AutonomyPolicy # Interface: AutonomyPolicy ## Properties ### profiles > **profiles**: `Record`\<`string`, [`AutonomyProfile`](AutonomyProfile.md)\> --- ## Page: AutonomyProfile URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/AutonomyProfile [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / AutonomyProfile # Interface: AutonomyProfile ## Properties ### boundaryFailure? > `optional` **boundaryFailure?**: `"request_narrow_grant"` \| `"reject"` *** ### grantRequirements? > `optional` **grantRequirements?**: `Record`\<`string`, [`GrantRequirement`](GrantRequirement.md)\> grant-set composition, keyed by action string. *** ### mode > **mode**: [`AutonomyMode`](../type-aliases/AutonomyMode.md) *** ### obligations? > `optional` **obligations?**: [`RunObligations`](RunObligations.md) *** ### profileId > **profileId**: `string` *** ### runLimits > **runLimits**: [`RunLimits`](RunLimits.md) *** ### transitions? > `optional` **transitions?**: [`StepTransitionRule`](StepTransitionRule.md)[] --- ## Page: BoundaryEscalation URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/BoundaryEscalation [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / BoundaryEscalation # Interface: BoundaryEscalation A boundary escalation that asks for a narrow, expiring, run-bound grant. ## Properties ### boundary > **boundary**: `string` *** ### remaining > **remaining**: `string` *** ### requested > **requested**: `string` *** ### suggestedGrant > **suggestedGrant**: `object` #### bindToRunId > **bindToRunId**: `string` #### expiresInMs > **expiresInMs**: `number` #### maxCount? > `optional` **maxCount?**: `number` #### maxTotal? > `optional` **maxTotal?**: `string` #### scope > **scope**: `string` --- ## Page: BoundaryFailure URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/BoundaryFailure [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / BoundaryFailure # Interface: BoundaryFailure Structured boundary failure — never a bare boolean. ## Properties ### boundary? > `optional` **boundary?**: `string` *** ### escalation? > `optional` **escalation?**: [`BoundaryEscalation`](BoundaryEscalation.md) *** ### kind > **kind**: `"boundary_exceeded"` \| `"transition_invalid"` \| `"obligation_failed"` \| `"escalate"` *** ### reason > **reason**: `string` --- ## Page: CanonicalAgentAction URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/CanonicalAgentAction [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / CanonicalAgentAction # Interface: CanonicalAgentAction Canonical action produced by the wallet from a prepared operation. The authorization layer commits to these effects — not to an agent description. ## Extends - [`RunActionIntent`](RunActionIntent.md) ## Properties ### action > **action**: `string` #### Inherited from [`RunActionIntent`](RunActionIntent.md).[`action`](RunActionIntent.md#action) *** ### agent > **agent**: `string` #### Inherited from [`RunActionIntent`](RunActionIntent.md).[`agent`](RunActionIntent.md#agent) *** ### constraints? > `optional` **constraints?**: `Record`\<`string`, `unknown`\> #### Inherited from [`RunActionIntent`](RunActionIntent.md).[`constraints`](RunActionIntent.md#constraints) *** ### effects > **effects**: [`StepEffects`](StepEffects.md) *** ### nonce? > `optional` **nonce?**: `string` #### Inherited from [`RunActionIntent`](RunActionIntent.md).[`nonce`](RunActionIntent.md#nonce) *** ### parentReceiptIds? > `optional` **parentReceiptIds?**: `string`[] Optional: receipt ids of predecessor steps this step depends on. *** ### principal > **principal**: `string` #### Inherited from [`RunActionIntent`](RunActionIntent.md).[`principal`](RunActionIntent.md#principal) *** ### runId > **runId**: `string` *** ### stepId > **stepId**: `string` *** ### target? > `optional` **target?**: `string` #### Inherited from [`RunActionIntent`](RunActionIntent.md).[`target`](RunActionIntent.md#target) --- ## Page: ChannelEffect URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/ChannelEffect [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / ChannelEffect # Interface: ChannelEffect ## Properties ### channelId > **channelId**: `string` *** ### operation > **operation**: `string` --- ## Page: CommitParams URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/CommitParams [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / CommitParams # Interface: CommitParams ## Properties ### effects? > `optional` **effects?**: [`StepEffects`](StepEffects.md) The executor's re-snapshotted effects (default: the authorized action's effects). *** ### executionProof? > `optional` **executionProof?**: `unknown` *** ### reservationId > **reservationId**: `string` --- ## Page: GrantBoundAutonomyOptions URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/GrantBoundAutonomyOptions [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / GrantBoundAutonomyOptions # Interface: GrantBoundAutonomyOptions ## Properties ### autonomyProfiles > **autonomyProfiles**: `Record`\<`string`, [`AutonomyProfile`](AutonomyProfile.md)\> *** ### ephemeral? > `optional` **ephemeral?**: `boolean` Explicitly permit the in-memory default store (dev/testing only). Without it, construction fails rather than silently downgrading to an ephemeral store that cannot recover reservations after a restart. *** ### grantRequirements? > `optional` **grantRequirements?**: `Record`\<`string`, [`GrantRequirement`](GrantRequirement.md)\> Grant-set composition, keyed by action string. *** ### identityResolver > **identityResolver**: `AuthorityIdentityResolver` *** ### mandateResolver > **mandateResolver**: (`mandateId`) => `Promise`\<`SignedProof` \| `undefined`\> #### Parameters ##### mandateId `string` #### Returns `Promise`\<`SignedProof` \| `undefined`\> *** ### mandateStatusResolver? > `optional` **mandateStatusResolver?**: () => `Promise`\<`MandateStatusSnapshot`\> #### Returns `Promise`\<`MandateStatusSnapshot`\> *** ### now? > `optional` **now?**: () => `number` #### Returns `number` *** ### stateStore? > `optional` **stateStore?**: [`RunStateStore`](RunStateStore.md) --- ## Page: GrantBoundPolicyOptions URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/GrantBoundPolicyOptions [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / GrantBoundPolicyOptions # Interface: GrantBoundPolicyOptions ## Properties ### identityResolver > **identityResolver**: `AuthorityIdentityResolver` *** ### localBounds? > `optional` **localBounds?**: [`LocalBounds`](LocalBounds.md) *** ### mandateResolver > **mandateResolver**: (`mandateId`) => `Promise`\<`SignedProof` \| `undefined`\> Resolve a signed mandate proof by id. #### Parameters ##### mandateId `string` #### Returns `Promise`\<`SignedProof` \| `undefined`\> *** ### mandateStatusResolver? > `optional` **mandateStatusResolver?**: () => `Promise`\<`MandateStatusSnapshot`\> Resolve current epoch / revocation state. #### Returns `Promise`\<`MandateStatusSnapshot`\> *** ### now? > `optional` **now?**: () => `number` Injectable clock (defaults to Date.now). #### Returns `number` *** ### usageStore > **usageStore**: [`GrantUsageStore`](GrantUsageStore.md) --- ## Page: GrantRequirement URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/GrantRequirement [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / GrantRequirement # Interface: GrantRequirement ## Properties ### allOf? > `optional` **allOf?**: `string`[] All of these grant ids must authorize (conjunction). *** ### anyOf? > `optional` **anyOf?**: `string`[] Any of these grant ids may authorize (disjunction). --- ## Page: GrantUsageStore URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/GrantUsageStore [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / GrantUsageStore # Interface: GrantUsageStore ## Methods ### abort() > **abort**(`reservationId`, `reason`): `Promise`\<`void`\> Abort a reservation after execution fails or is cancelled. #### Parameters ##### reservationId `string` ##### reason `string` #### Returns `Promise`\<`void`\> *** ### authorizeAndReserve() > **authorizeAndReserve**(`input`): `Promise`\<[`StepAuthorization`](StepAuthorization.md)\> Atomically reserve mandate usage + local quotas for a step. #### Parameters ##### input ###### actionDigest `string` ###### mandateId `string` ###### now `number` ###### runId `string` ###### stepId `string` ###### ttlMs? `number` ###### usageDelta \{ `amount?`: `string`; `count`: `number`; \} ###### usageDelta.amount? `string` ###### usageDelta.count `number` #### Returns `Promise`\<[`StepAuthorization`](StepAuthorization.md)\> *** ### commit() > **commit**(`reservationId`, `receipt`): `Promise`\<`void`\> Commit a reservation after execution succeeds. #### Parameters ##### reservationId `string` ##### receipt [`StepReceipt`](StepReceipt.md) #### Returns `Promise`\<`void`\> *** ### countAborted() > **countAborted**(`runId`): `Promise`\<`number`\> #### Parameters ##### runId `string` #### Returns `Promise`\<`number`\> *** ### countCommitted() > **countCommitted**(`runId`): `Promise`\<`number`\> Run-level accounting for local bounds. #### Parameters ##### runId `string` #### Returns `Promise`\<`number`\> *** ### countReserved() > **countReserved**(`runId`): `Promise`\<`number`\> #### Parameters ##### runId `string` #### Returns `Promise`\<`number`\> *** ### countUnknown() > **countUnknown**(`runId`): `Promise`\<`number`\> Reservations whose outcome is unknown after crash/timeout — budget HELD. #### Parameters ##### runId `string` #### Returns `Promise`\<`number`\> *** ### getReservation() > **getReservation**(`reservationId`): `Promise`\<[`StepAuthorization`](StepAuthorization.md) \| `undefined`\> Read a reservation (for commit/abort bookkeeping). #### Parameters ##### reservationId `string` #### Returns `Promise`\<[`StepAuthorization`](StepAuthorization.md) \| `undefined`\> *** ### listCommittedReceipts() > **listCommittedReceipts**(`mandateId`): `Promise`\<[`StepReceipt`](StepReceipt.md)[]\> Committed receipts for a mandate — used to build the usage snapshot. #### Parameters ##### mandateId `string` #### Returns `Promise`\<[`StepReceipt`](StepReceipt.md)[]\> *** ### reconcileReservation() > **reconcileReservation**(`reservationId`, `outcome`, `opts?`): `Promise`\<`void`\> Explicit settlement of a recovered (`unknown`) reservation. The only way budget is released is `'definitely-not-executed'`; `'completed'` commits. #### Parameters ##### reservationId `string` ##### outcome `ReservationSettlementOutcome` ##### opts? ###### reason? `string` ###### receipt? [`StepReceipt`](StepReceipt.md) #### Returns `Promise`\<`void`\> *** ### recoverReservations() > **recoverReservations**(`runId?`): `Promise`\<`OutOfBandReservation`[]\> Conservative reservation recovery: unsettled past-deadline reservations are classified `unknown` and their budget is HELD until explicit reconciliation. #### Parameters ##### runId? `string` #### Returns `Promise`\<`OutOfBandReservation`[]\> --- ## Page: LocalBounds URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/LocalBounds [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / LocalBounds # Interface: LocalBounds ## Properties ### maxFailures? > `optional` **maxFailures?**: `number` *** ### maxParallelSteps? > `optional` **maxParallelSteps?**: `number` *** ### maxRunDurationMs? > `optional` **maxRunDurationMs?**: `number` *** ### maxSteps? > `optional` **maxSteps?**: `number` *** ### requireMandateForEveryStep? > `optional` **requireMandateForEveryStep?**: `boolean` *** ### unmatchedAction? > `optional` **unmatchedAction?**: `"rejected"` \| `"requires_human"` What to do when no mandate matches: 'requires_human' | 'rejected'. --- ## Page: MemoryGrantUsageStoreOptions URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/MemoryGrantUsageStoreOptions [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / MemoryGrantUsageStoreOptions # Interface: MemoryGrantUsageStoreOptions ## Properties ### now? > `optional` **now?**: () => `number` Injectable clock (defaults to Date.now). #### Returns `number` *** ### ttlMs? > `optional` **ttlMs?**: `number` Reservation TTL in ms (default 60_000). --- ## Page: OpenRunParams URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/OpenRunParams [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / OpenRunParams # Interface: OpenRunParams ## Properties ### agentId > **agentId**: `string` *** ### deadlineAt? > `optional` **deadlineAt?**: `number` *** ### grantProofIds > **grantProofIds**: `string`[] *** ### principal > **principal**: `string` *** ### profileId > **profileId**: `string` *** ### runId > **runId**: `string` *** ### startedAt? > `optional` **startedAt?**: `number` --- ## Page: PaymentIntent URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/PaymentIntent [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / PaymentIntent # Interface: PaymentIntent The action an agent wants the wallet to take. Agents produce intents; they do not execute them. ## Properties ### amount? > `optional` **amount?**: `string` Amount in the token's native unit (string to preserve precision). *** ### inference? > `optional` **inference?**: `object` Inference block — present when `type === 'inference'` and describes the compute the agent wants authorized. Its `usage` output is the metering unit budget/cap policies convert into spend. #### budgetTokenId? > `optional` **budgetTokenId?**: `string` Token id the provider meters in, if inference is token-denominated. #### domain > **domain**: [`InferenceDomain`](../type-aliases/InferenceDomain.md) #### input? > `optional` **input?**: `unknown` Prompt / audio / image reference to compute over. #### maxTokens? > `optional` **maxTokens?**: `number` Upper bound on output tokens, used by budget policies. #### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> #### model? > `optional` **model?**: `string` Requested model, when the intent targets a specific one. #### op > **op**: `string` Provider-neutral operation name, e.g. 'completion', 'ragSearch'. *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> Arbitrary extra context the agent wants to attach (e.g. invoice ref). *** ### reason? > `optional` **reason?**: `string` Human-readable reason for the payment (shown to user in approval UI). *** ### recipient? > `optional` **recipient?**: `string` Recipient Minima address (Mx… or hex). *** ### risk? > `optional` **risk?**: `"low"` \| `"medium"` \| `"high"` Agent's self-assessed risk level — used by AgentPolicy routing. *** ### tokenId? > `optional` **tokenId?**: `string` Minima tokenId, or '0x00' for native Minima. *** ### type > **type**: `"payment"` \| `"channel_update"` \| `"settlement"` \| `"lookup"` \| `"receipt"` \| `"inference"` Discriminator — what kind of operation this intent represents. --- ## Page: PolicyEvalResult URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/PolicyEvalResult [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / PolicyEvalResult # Interface: PolicyEvalResult Result of evaluating a proposal against a single policy middleware layer. Richer than a boolean — communicates why a decision was made. ## Properties ### authorityDecision? > `optional` **authorityDecision?**: `AuthorityDecision` Full authority decision, when an authority layer produced one. *** ### outcome > **outcome**: `"approved"` \| `"rejected"` \| `"requires_human"` Three-state outcome — never `pending_user` which is a wallet concern. *** ### reason > **reason**: `string` Human-readable explanation (shown in logs, audit trail, user UI). *** ### reservationState? > `optional` **reservationState?**: `"new"` \| `"already_reserved"` \| `"already_committed"` Reservation lifecycle state, when returned by a stateful policy. *** ### usageDelta? > `optional` **usageDelta?**: `object` Usage delta implied by the authority decision. #### amount? > `optional` **amount?**: `string` #### count > **count**: `number` --- ## Page: PolicyMiddleware URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/PolicyMiddleware [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / PolicyMiddleware # Interface: PolicyMiddleware A single composable middleware layer in the policy evaluation pipeline. Each middleware receives the full AgentProposal and returns a decision. Evaluation is read-only. Implementors that need state (rate limits, daily caps) expose the optional reservation lifecycle below. The middleware API replaces the boolean-based AgentPolicy with a richer three-state result that includes a reason string for auditability. ## Methods ### commit()? > `optional` **commit**(`operationId`): `Promise`\<`void`\> Commit a prior reservation after execution succeeds. #### Parameters ##### operationId `string` #### Returns `Promise`\<`void`\> *** ### evaluate() > **evaluate**(`proposal`): `Promise`\<[`PolicyEvalResult`](PolicyEvalResult.md)\> Evaluate a proposal. Called in sequence by ComposablePolicy. #### Parameters ##### proposal [`AgentProposal`](AgentProposal.md) #### Returns `Promise`\<[`PolicyEvalResult`](PolicyEvalResult.md)\> *** ### release()? > `optional` **release**(`operationId`): `Promise`\<`void`\> Release a prior reservation after execution fails or is cancelled. #### Parameters ##### operationId `string` #### Returns `Promise`\<`void`\> *** ### reserve()? > `optional` **reserve**(`proposal`): `Promise`\<[`PolicyEvalResult`](PolicyEvalResult.md)\> Reserve state for execution using `proposal.id` as the idempotency key. Implementations must not consume committed quota during evaluation. #### Parameters ##### proposal [`AgentProposal`](AgentProposal.md) #### Returns `Promise`\<[`PolicyEvalResult`](PolicyEvalResult.md)\> *** ### reset()? > `optional` **reset**(): `Promise`\<`void`\> Optional: reset internal state (useful in tests or at midnight rollover). #### Returns `Promise`\<`void`\> --- ## Page: PreparedRebalanceOperation URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/PreparedRebalanceOperation [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / PreparedRebalanceOperation # Interface: PreparedRebalanceOperation ## Properties ### channelOps > **channelOps**: `object`[] The channel operation the rebalance performs. #### channelId > **channelId**: `string` #### operation > **operation**: `string` *** ### executionReceipt? > `optional` **executionReceipt?**: `unknown` *** ### fees > **fees**: `object`[] #### amount > **amount**: `string` #### tokenId > **tokenId**: `string` *** ### fromAllocationId > **fromAllocationId**: `string` *** ### poolId > **poolId**: `string` *** ### positionId > **positionId**: `string` *** ### postconditionsVerified? > `optional` **postconditionsVerified?**: `boolean` *** ### quoteTimestamp? > `optional` **quoteTimestamp?**: `number` *** ### simulation? > `optional` **simulation?**: `unknown` Quote/simulation evidence captured by the wallet. *** ### spends > **spends**: `object`[] Prepared by the wallet from the actual tx build/simulation. #### amount > **amount**: `string` #### recipient > **recipient**: `string` #### tokenId > **tokenId**: `string` *** ### toChannelId > **toChannelId**: `string` --- ## Page: PreparedStep URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/PreparedStep [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / PreparedStep # Interface: PreparedStep ## Properties ### action > **action**: `string` *** ### nonce > **nonce**: `string` *** ### operation > **operation**: [`PreparedRebalanceOperation`](PreparedRebalanceOperation.md) *** ### stepId > **stepId**: `string` --- ## Page: ProtoAgentIdentity URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/ProtoAgentIdentity [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / ProtoAgentIdentity # Interface: ProtoAgentIdentity ## Generated from protobuf message totem.agent.policy.v1.AgentIdentity ## Properties ### address > **address**: `string` #### Generated from protobuf field: string address = 2 *** ### agentId > **agentId**: `string` #### Generated from protobuf field: string agent_id = 1 *** ### capabilities > **capabilities**: `string`[] #### Generated from protobuf field: repeated string capabilities = 3 --- ## Page: ProtoAgentProposal URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/ProtoAgentProposal [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / ProtoAgentProposal # Interface: ProtoAgentProposal ## Generated from protobuf message totem.agent.policy.v1.AgentProposal ## Properties ### agentId > **agentId**: `string` #### Generated from protobuf field: string agent_id = 2 *** ### confidence > **confidence**: `number` #### Generated from protobuf field: double confidence = 5 *** ### createdAt > **createdAt**: `string` #### Generated from protobuf field: int64 created_at = 6 *** ### explanation > **explanation**: `string` #### Generated from protobuf field: string explanation = 4 *** ### id > **id**: `string` #### Generated from protobuf field: string id = 1 *** ### intent? > `optional` **intent?**: [`ProtoPaymentIntent`](../type-aliases/ProtoPaymentIntent.md) #### Generated from protobuf field: totem.agent.policy.v1.PaymentIntent intent = 3 --- ## Page: ProtoAgentReceipt URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/ProtoAgentReceipt [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / ProtoAgentReceipt # Interface: ProtoAgentReceipt ## Generated from protobuf message totem.agent.policy.v1.AgentReceipt ## Properties ### channelState > **channelState**: `string` #### Generated from protobuf field: string channel_state = 4 *** ### proposalId > **proposalId**: `string` #### Generated from protobuf field: string proposal_id = 1 *** ### rejectionReason > **rejectionReason**: `string` #### Generated from protobuf field: string rejection_reason = 5 *** ### settledAt > **settledAt**: `string` #### Generated from protobuf field: int64 settled_at = 6 *** ### status > **status**: [`ReceiptStatus`](../enumerations/ReceiptStatus.md) #### Generated from protobuf field: totem.agent.policy.v1.ReceiptStatus status = 2 *** ### txpowId > **txpowId**: `string` #### Generated from protobuf field: string txpow_id = 3 --- ## Page: ProtoPaymentIntent URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/ProtoPaymentIntent [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / ProtoPaymentIntent # Interface: ProtoPaymentIntent ## Generated from protobuf message totem.agent.policy.v1.PaymentIntent ## Properties ### amount > **amount**: `string` #### Generated from protobuf field: string amount = 2 *** ### metadata? > `optional` **metadata?**: `Struct` #### Generated from protobuf field: google.protobuf.Struct metadata = 7 *** ### reason > **reason**: `string` #### Generated from protobuf field: string reason = 5 *** ### recipient > **recipient**: `string` #### Generated from protobuf field: string recipient = 4 *** ### risk > **risk**: [`RiskLevel`](../enumerations/RiskLevel.md) #### Generated from protobuf field: totem.agent.policy.v1.RiskLevel risk = 6 *** ### tokenId > **tokenId**: `string` #### Generated from protobuf field: string token_id = 3 *** ### type > **type**: [`IntentType`](../enumerations/IntentType.md) #### Generated from protobuf field: totem.agent.policy.v1.IntentType type = 1 --- ## Page: ReceiptStore URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/ReceiptStore [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / ReceiptStore # Interface: ReceiptStore ReceiptStore — persists AgentReceipt objects for audit trail. Default implementation stores receipts in memory. Callers can provide a custom `save` function for file, database, or remote storage. ## Methods ### count() > **count**(): `Promise`\<`number`\> Total number of stored receipts. #### Returns `Promise`\<`number`\> *** ### get() > **get**(`receiptId`): `Promise`\<[`AgentReceipt`](AgentReceipt.md) \| `null`\> Retrieve a receipt by receiptId. #### Parameters ##### receiptId `string` #### Returns `Promise`\<[`AgentReceipt`](AgentReceipt.md) \| `null`\> *** ### list() > **list**(`limit?`, `offset?`): `Promise`\<[`AgentReceipt`](AgentReceipt.md)[]\> List all receipts, newest first. #### Parameters ##### limit? `number` ##### offset? `number` #### Returns `Promise`\<[`AgentReceipt`](AgentReceipt.md)[]\> *** ### save() > **save**(`receipt`): `Promise`\<`string`\> Persist a receipt. Returns a receiptId for retrieval. #### Parameters ##### receipt [`AgentReceipt`](AgentReceipt.md) #### Returns `Promise`\<`string`\> --- ## Page: RunActionIntent URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/RunActionIntent [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / RunActionIntent # Interface: RunActionIntent ## Extended by - [`CanonicalAgentAction`](CanonicalAgentAction.md) ## Properties ### action > **action**: `string` *** ### agent > **agent**: `string` *** ### constraints? > `optional` **constraints?**: `Record`\<`string`, `unknown`\> *** ### nonce? > `optional` **nonce?**: `string` *** ### principal > **principal**: `string` *** ### target? > `optional` **target?**: `string` --- ## Page: RunAuthorization URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/RunAuthorization [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / RunAuthorization # Interface: RunAuthorization ## Properties ### actionDigest > **actionDigest**: `string` *** ### decisionIds > **decisionIds**: `string`[] *** ### expiresAt > **expiresAt**: `number` *** ### mandateIds > **mandateIds**: `string`[] *** ### outcome > **outcome**: `"approved"` *** ### reservationId > **reservationId**: `string` *** ### reservedAt > **reservedAt**: `number` *** ### usageDeltas > **usageDeltas**: `object`[] #### delta > **delta**: `object` ##### delta.amount? > `optional` **amount?**: `string` ##### delta.count > **count**: `number` #### mandateId > **mandateId**: `string` --- ## Page: RunAuthorizationRejected URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/RunAuthorizationRejected [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / RunAuthorizationRejected # Interface: RunAuthorizationRejected ## Properties ### boundaryError? > `optional` **boundaryError?**: [`BoundaryFailure`](BoundaryFailure.md) *** ### outcome > **outcome**: `"rejected"` \| `"requires_human"` *** ### reason > **reason**: `string` *** ### suggestedGrant? > `optional` **suggestedGrant?**: [`SuggestedGrantAmendment`](SuggestedGrantAmendment.md) --- ## Page: RunLimits URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/RunLimits [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / RunLimits # Interface: RunLimits ## Properties ### maxDurationMs? > `optional` **maxDurationMs?**: `number` *** ### maxFailures? > `optional` **maxFailures?**: `number` *** ### maxFees? > `optional` **maxFees?**: `object` Aggregate fee ceiling per run. #### amount > **amount**: `string` #### tokenId > **tokenId**: `string` *** ### maxGrossSpend? > `optional` **maxGrossSpend?**: `object` Gross spend per run. `amount` is the ceiling in the token's native unit. #### amount > **amount**: `string` #### tokenId > **tokenId**: `string` *** ### maxOutstandingChannelExposure? > `optional` **maxOutstandingChannelExposure?**: `object` #### amount > **amount**: `string` #### tokenId > **tokenId**: `string` *** ### maxParallel? > `optional` **maxParallel?**: `number` *** ### maxSteps? > `optional` **maxSteps?**: `number` *** ### maxStepSpend? > `optional` **maxStepSpend?**: `object` Cap on gross spend across a single step. #### amount > **amount**: `string` #### tokenId > **tokenId**: `string` --- ## Page: RunObligations URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/RunObligations [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / RunObligations # Interface: RunObligations ## Properties ### quoteMaxAgeMs? > `optional` **quoteMaxAgeMs?**: `number` *** ### requireExecutionReceipt? > `optional` **requireExecutionReceipt?**: `boolean` *** ### requireSimulation? > `optional` **requireSimulation?**: `boolean` *** ### verifyPostconditions? > `optional` **verifyPostconditions?**: `boolean` --- ## Page: RunReceiptGraph URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/RunReceiptGraph [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / RunReceiptGraph # Interface: RunReceiptGraph ## Properties ### agentId > **agentId**: `string` *** ### principal > **principal**: `string` *** ### profileId > **profileId**: `string` *** ### runId > **runId**: `string` *** ### startedAt > **startedAt**: `number` *** ### stepReceipts > **stepReceipts**: [`RunStepReceipt`](RunStepReceipt.md)[] *** ### totals > **totals**: [`RunSessionTotals`](RunSessionTotals.md) --- ## Page: RunReservation URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/RunReservation [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / RunReservation # Interface: RunReservation ## Properties ### abortReason? > `optional` **abortReason?**: `string` *** ### actionDigest > **actionDigest**: `string` *** ### decisionIds? > `optional` **decisionIds?**: `string`[] *** ### effects? > `optional` **effects?**: [`StepEffects`](StepEffects.md) The authorized step effects (for run-total folding on commit). *** ### expiresAt > **expiresAt**: `number` *** ### mandateIds? > `optional` **mandateIds?**: `string`[] Mandates/decisions that authorized this step. *** ### receipt? > `optional` **receipt?**: [`RunStepReceipt`](RunStepReceipt.md) *** ### reservationId > **reservationId**: `string` *** ### reservedAt > **reservedAt**: `number` *** ### runId > **runId**: `string` *** ### status > **status**: `"reserved"` \| `"committed"` \| `"aborted"` \| `"unknown"` `unknown` = the executor never settled the step (crash/timeout). The budget stays HELD until the host reconciles the outcome explicitly. *** ### stepAction > **stepAction**: `string` The action string (for transition validation across steps). *** ### stepId > **stepId**: `string` *** ### usageDeltas? > `optional` **usageDeltas?**: `object`[] Per-mandate usage reserved atomically with the run-state reservation. #### delta > **delta**: `object` ##### delta.amount? > `optional` **amount?**: `string` ##### delta.count > **count**: `number` #### mandateId > **mandateId**: `string` --- ## Page: RunSessionTotals URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/RunSessionTotals [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / RunSessionTotals # Interface: RunSessionTotals ## Properties ### abortedSteps > **abortedSteps**: `number` *** ### committedSteps > **committedSteps**: `number` *** ### feesByToken > **feesByToken**: `Record`\<`string`, `string`\> *** ### outstandingByToken > **outstandingByToken**: `Record`\<`string`, `string`\> *** ### reservedSteps > **reservedSteps**: `number` *** ### spentByToken > **spentByToken**: `Record`\<`string`, `string`\> *** ### usedNonces > **usedNonces**: `string`[] --- ## Page: RunStateSnapshot URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/RunStateSnapshot [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / RunStateSnapshot # Interface: RunStateSnapshot ## Properties ### agentId > **agentId**: `string` *** ### deadlineAt? > `optional` **deadlineAt?**: `number` *** ### grantProofIds > **grantProofIds**: `string`[] *** ### principal > **principal**: `string` *** ### profileId > **profileId**: `string` *** ### runId > **runId**: `string` *** ### startedAt > **startedAt**: `number` *** ### totals > **totals**: [`RunSessionTotals`](RunSessionTotals.md) --- ## Page: RunStateStore URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/RunStateStore [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / RunStateStore # Interface: RunStateStore ## Methods ### abortStep() > **abortStep**(`reservationId`, `reason`): `Promise`\<`void`\> #### Parameters ##### reservationId `string` ##### reason `string` #### Returns `Promise`\<`void`\> *** ### checkNonce() > **checkNonce**(`runId`, `nonce`): `Promise`\<`boolean`\> #### Parameters ##### runId `string` ##### nonce `string` #### Returns `Promise`\<`boolean`\> *** ### commitStep() > **commitStep**(`reservationId`, `receipt`): `Promise`\<`void`\> #### Parameters ##### reservationId `string` ##### receipt [`RunStepReceipt`](RunStepReceipt.md) #### Returns `Promise`\<`void`\> *** ### createRun() > **createRun**(`snapshot`): `Promise`\<`void`\> #### Parameters ##### snapshot [`RunStateSnapshot`](RunStateSnapshot.md) #### Returns `Promise`\<`void`\> *** ### getReceipt() > **getReceipt**(`reservationId`): `Promise`\<[`RunStepReceipt`](RunStepReceipt.md) \| `undefined`\> #### Parameters ##### reservationId `string` #### Returns `Promise`\<[`RunStepReceipt`](RunStepReceipt.md) \| `undefined`\> *** ### getReservation() > **getReservation**(`reservationId`): `Promise`\<[`RunReservation`](RunReservation.md) \| `undefined`\> #### Parameters ##### reservationId `string` #### Returns `Promise`\<[`RunReservation`](RunReservation.md) \| `undefined`\> *** ### getRun() > **getRun**(`runId`): `Promise`\<[`RunStateSnapshot`](RunStateSnapshot.md) \| `undefined`\> #### Parameters ##### runId `string` #### Returns `Promise`\<[`RunStateSnapshot`](RunStateSnapshot.md) \| `undefined`\> *** ### listStepReceipts() > **listStepReceipts**(`runId`): `Promise`\<[`RunStepReceipt`](RunStepReceipt.md)[]\> #### Parameters ##### runId `string` #### Returns `Promise`\<[`RunStepReceipt`](RunStepReceipt.md)[]\> *** ### reconcileReservation() > **reconcileReservation**(`reservationId`, `outcome`, `opts?`): `Promise`\<`void`\> Settle a recovered (`unknown`) reservation. The ONLY way an unsettled reservation releases its budget is an explicit `'definitely-not-executed'` reconciliation; `'completed'` commits it and folds the receipt into the run totals. #### Parameters ##### reservationId `string` ##### outcome `ReservationSettlementOutcome` ##### opts? ###### reason? `string` ###### receipt? [`RunStepReceipt`](RunStepReceipt.md) #### Returns `Promise`\<`void`\> *** ### recoverReservations() > **recoverReservations**(`runId?`): `Promise`\<`OutOfBandReservation`[]\> Conservative reservation recovery (RFC-007 §3.5): a reservation that was never settled before its deadline is classified `unknown` — its budget is HELD, never restored by expiry. Returns every unsettled reservation. #### Parameters ##### runId? `string` #### Returns `Promise`\<`OutOfBandReservation`[]\> *** ### reserveStep() > **reserveStep**(`reservation`): `Promise`\<`void`\> #### Parameters ##### reservation [`RunReservation`](RunReservation.md) #### Returns `Promise`\<`void`\> --- ## Page: RunStepReceipt URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/RunStepReceipt [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / RunStepReceipt # Interface: RunStepReceipt ## Properties ### actionDigest > **actionDigest**: `string` *** ### committedAt > **committedAt**: `number` *** ### decisionIds > **decisionIds**: `string`[] Authority decision ids that authorized this step. *** ### effects? > `optional` **effects?**: [`StepEffects`](StepEffects.md) Verified effects — folded into run totals on commit. *** ### executionProof? > `optional` **executionProof?**: `unknown` *** ### mandateIds > **mandateIds**: `string`[] Mandates that authorized this step. *** ### reservationId > **reservationId**: `string` *** ### runId > **runId**: `string` *** ### stepId > **stepId**: `string` --- ## Page: SqliteRunStateStoreOptions URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/SqliteRunStateStoreOptions [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / SqliteRunStateStoreOptions # Interface: SqliteRunStateStoreOptions ## Properties ### now? > `optional` **now?**: () => `number` Injectable clock (defaults to Date.now). #### Returns `number` *** ### ttlMs? > `optional` **ttlMs?**: `number` Reservation TTL in ms (default 60_000). --- ## Page: StepAuthorization URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/StepAuthorization [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / StepAuthorization # Interface: StepAuthorization ## Properties ### actionDigest > **actionDigest**: `string` *** ### decision > **decision**: `AuthorityDecision` *** ### expiresAt > **expiresAt**: `number` *** ### mandateId > **mandateId**: `string` *** ### reservationId > **reservationId**: `string` *** ### reservedAt > **reservedAt**: `number` *** ### runId > **runId**: `string` *** ### stepId > **stepId**: `string` *** ### usageDelta > **usageDelta**: `object` #### amount? > `optional` **amount?**: `string` #### count > **count**: `number` --- ## Page: StepAuthorizationInput URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/StepAuthorizationInput [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / StepAuthorizationInput # Interface: StepAuthorizationInput ## Properties ### grantProofIds? > `optional` **grantProofIds?**: `string`[] Signed mandate proof ids to consider (defaults to run.grantProofIds). *** ### now? > `optional` **now?**: `number` *** ### run > **run**: [`AutonomousRun`](AutonomousRun.md) *** ### step > **step**: [`AgentStep`](AgentStep.md) --- ## Page: StepEffect URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/StepEffect [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / StepEffect # Interface: StepEffect The security facts of an operation — derived from a PREPARED transaction or simulation, never from agent-supplied hints. `PaymentIntent.amount` / `recipient` / `risk` / `metadata` are explanatory hints, not security facts. ## Properties ### amount > **amount**: `string` *** ### recipient? > `optional` **recipient?**: `string` *** ### tokenId > **tokenId**: `string` --- ## Page: StepEffects URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/StepEffects [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / StepEffects # Interface: StepEffects ## Properties ### channels? > `optional` **channels?**: [`ChannelEffect`](ChannelEffect.md)[] *** ### fees? > `optional` **fees?**: [`StepEffect`](StepEffect.md)[] *** ### spends > **spends**: [`StepEffect`](StepEffect.md)[] *** ### stateChanges? > `optional` **stateChanges?**: `Record`\<`string`, `unknown`\> --- ## Page: StepReceipt URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/StepReceipt [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / StepReceipt # Interface: StepReceipt ## Properties ### actionDigest > **actionDigest**: `string` *** ### committedAt > **committedAt**: `number` *** ### executionProof? > `optional` **executionProof?**: `unknown` *** ### mandateId > **mandateId**: `string` *** ### reservationId > **reservationId**: `string` *** ### runId > **runId**: `string` *** ### stepId > **stepId**: `string` --- ## Page: StepTransitionRule URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/StepTransitionRule [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / StepTransitionRule # Interface: StepTransitionRule ## Properties ### from > **from**: `string` A step's action string. Wildcards allowed, e.g. `simulate`, `omnia:channel:pay:*`. *** ### to > **to**: `string`[] Actions that may follow `from`. --- ## Page: SuggestedGrantAmendment URL: https://docs.totem.ing/api/totemsdk-agent-policy/interfaces/SuggestedGrantAmendment [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / SuggestedGrantAmendment # Interface: SuggestedGrantAmendment ## Properties ### bindToRunId > **bindToRunId**: `string` *** ### expiresInMs > **expiresInMs**: `number` *** ### maxCount? > `optional` **maxCount?**: `number` *** ### maxTotal? > `optional` **maxTotal?**: `string` *** ### scope > **scope**: `string` --- ## Page: AgentPolicyConfig URL: https://docs.totem.ing/api/totemsdk-agent-policy/type-aliases/AgentPolicyConfig [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / AgentPolicyConfig # Type Alias: AgentPolicyConfig > **AgentPolicyConfig** = `AgentPolicyConfig$Type` ## Generated MessageType for protobuf message totem.agent.policy.v1.AgentPolicyConfig --- ## Page: AutonomyMode URL: https://docs.totem.ing/api/totemsdk-agent-policy/type-aliases/AutonomyMode [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / AutonomyMode # Type Alias: AutonomyMode > **AutonomyMode** = `"dynamic"` \| `"declared_plan"` \| `"locked_plan"` \| `"single_step"` Autonomy profile modes: - `dynamic`: any step allowed by remaining grant authority. - `declared_plan`: steps may vary, but within a committed plan envelope. - `locked_plan`: exact DAG, actions and parameter ranges. - `single_step`: current behavior (one authorization, no run). --- ## Page: InferenceDomain URL: https://docs.totem.ing/api/totemsdk-agent-policy/type-aliases/InferenceDomain [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / InferenceDomain # Type Alias: InferenceDomain > **InferenceDomain** = `"llm"` \| `"embed"` \| `"rag"` \| `"asr"` \| `"translate"` \| `"tts"` \| `"diffusion"` \| `"ocr"` \| `"classify"` \| `"audiogen"` \| `"video"` \| `"vla"` \| `"world"` Domains eligible for inference intents — mirrors the provider-neutral capability set shipped by @totemsdk/intelligence. --- ## Page: InferenceReceiptLike URL: https://docs.totem.ing/api/totemsdk-agent-policy/type-aliases/InferenceReceiptLike [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / InferenceReceiptLike # Type Alias: InferenceReceiptLike > **InferenceReceiptLike** = `IntelligenceReceipt` Structural receipt produced by an IntelligenceProvider / EdgeIntelligencePort attestation path, with no hard compile-time dependency on @totemsdk/intelligence at the consumer boundary. TypeScript treats it identically to IntelligenceReceipt. --- ## Page: ProtoAgentIdentity URL: https://docs.totem.ing/api/totemsdk-agent-policy/type-aliases/ProtoAgentIdentity [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / ProtoAgentIdentity # Type Alias: ProtoAgentIdentity > **ProtoAgentIdentity** = `AgentIdentity$Type` ## Generated MessageType for protobuf message totem.agent.policy.v1.AgentIdentity --- ## Page: ProtoAgentProposal URL: https://docs.totem.ing/api/totemsdk-agent-policy/type-aliases/ProtoAgentProposal [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / ProtoAgentProposal # Type Alias: ProtoAgentProposal > **ProtoAgentProposal** = `AgentProposal$Type` ## Generated MessageType for protobuf message totem.agent.policy.v1.AgentProposal --- ## Page: ProtoAgentReceipt URL: https://docs.totem.ing/api/totemsdk-agent-policy/type-aliases/ProtoAgentReceipt [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / ProtoAgentReceipt # Type Alias: ProtoAgentReceipt > **ProtoAgentReceipt** = `AgentReceipt$Type` ## Generated MessageType for protobuf message totem.agent.policy.v1.AgentReceipt --- ## Page: ProtoPaymentIntent URL: https://docs.totem.ing/api/totemsdk-agent-policy/type-aliases/ProtoPaymentIntent [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / ProtoPaymentIntent # Type Alias: ProtoPaymentIntent > **ProtoPaymentIntent** = `PaymentIntent$Type` ## Generated MessageType for protobuf message totem.agent.policy.v1.PaymentIntent --- ## Page: RunMode URL: https://docs.totem.ing/api/totemsdk-agent-policy/type-aliases/RunMode [**@totemsdk/agent-policy**](../index.md) *** [@totemsdk/agent-policy](../index.md) / RunMode # Type Alias: RunMode > **RunMode** = `"dynamic"` \| `"plan_locked"` --- ## Page: calculateUsageDelta URL: https://docs.totem.ing/api/totemsdk-authority/functions/calculateUsageDelta [**@totemsdk/authority**](../index.md) *** [@totemsdk/authority](../index.md) / calculateUsageDelta # Function: calculateUsageDelta() > **calculateUsageDelta**(`action`): `object` ## Parameters ### action [`ActionIntent`](../interfaces/ActionIntent.md) ## Returns `object` ### amount? > `optional` **amount?**: `string` ### count > **count**: `number` --- ## Page: checkUsageLimit URL: https://docs.totem.ing/api/totemsdk-authority/functions/checkUsageLimit [**@totemsdk/authority**](../index.md) *** [@totemsdk/authority](../index.md) / checkUsageLimit # Function: checkUsageLimit() > **checkUsageLimit**(`snapshot`, `limit`, `now`, `proposed?`): `boolean` ## Parameters ### snapshot [`AuthorityUsageSnapshot`](../interfaces/AuthorityUsageSnapshot.md) ### limit [`UsageLimit`](../interfaces/UsageLimit.md) ### now `number` ### proposed? #### amount? `string` #### count `number` ## Returns `boolean` --- ## Page: computeActionIntentId URL: https://docs.totem.ing/api/totemsdk-authority/functions/computeActionIntentId [**@totemsdk/authority**](../index.md) *** [@totemsdk/authority](../index.md) / computeActionIntentId # Function: computeActionIntentId() > **computeActionIntentId**(`intent`): `string` ## Parameters ### intent [`ActionIntent`](../interfaces/ActionIntent.md) ## Returns `string` --- ## Page: computeAuthorityDecisionId URL: https://docs.totem.ing/api/totemsdk-authority/functions/computeAuthorityDecisionId [**@totemsdk/authority**](../index.md) *** [@totemsdk/authority](../index.md) / computeAuthorityDecisionId # Function: computeAuthorityDecisionId() > **computeAuthorityDecisionId**(`decision`): `string` ## Parameters ### decision #### evaluatedAt `number` #### evidenceIds readonly `string`[] #### failedRules readonly `string`[] #### finalStatus `string` #### intentId `string` #### mandateId `string` #### mandateVerification \{ `valid`: `boolean`; \} #### mandateVerification.valid `boolean` #### matchedRules readonly `string`[] #### policyVersion `string` #### usageSnapshotHash `string` ## Returns `string` --- ## Page: computeMandateId URL: https://docs.totem.ing/api/totemsdk-authority/functions/computeMandateId [**@totemsdk/authority**](../index.md) *** [@totemsdk/authority](../index.md) / computeMandateId # Function: computeMandateId() > **computeMandateId**(`mandate`): `string` ## Parameters ### mandate [`MandateBody`](../interfaces/MandateBody.md) ## Returns `string` --- ## Page: computeUsageRoot URL: https://docs.totem.ing/api/totemsdk-authority/functions/computeUsageRoot [**@totemsdk/authority**](../index.md) *** [@totemsdk/authority](../index.md) / computeUsageRoot # Function: computeUsageRoot() > **computeUsageRoot**(`receipts`): `string` ## Parameters ### receipts [`AuthorityUsage`](../interfaces/AuthorityUsage.md)[] ## Returns `string` --- ## Page: computeUsageSnapshotHash URL: https://docs.totem.ing/api/totemsdk-authority/functions/computeUsageSnapshotHash [**@totemsdk/authority**](../index.md) *** [@totemsdk/authority](../index.md) / computeUsageSnapshotHash # Function: computeUsageSnapshotHash() > **computeUsageSnapshotHash**(`snapshot`): `string` ## Parameters ### snapshot [`AuthorityUsageSnapshot`](../interfaces/AuthorityUsageSnapshot.md) ## Returns `string` --- ## Page: createAgentMandate URL: https://docs.totem.ing/api/totemsdk-authority/functions/createAgentMandate [**@totemsdk/authority**](../index.md) *** [@totemsdk/authority](../index.md) / createAgentMandate # Function: createAgentMandate() > **createAgentMandate**(`params`): [`MandateBody`](../interfaces/MandateBody.md) ## Parameters ### params [`CreateAgentMandateParams`](../interfaces/CreateAgentMandateParams.md) ## Returns [`MandateBody`](../interfaces/MandateBody.md) --- ## Page: createMandateProofDraft URL: https://docs.totem.ing/api/totemsdk-authority/functions/createMandateProofDraft [**@totemsdk/authority**](../index.md) *** [@totemsdk/authority](../index.md) / createMandateProofDraft # Function: createMandateProofDraft() > **createMandateProofDraft**(`mandate`): `UnsignedProof` ## Parameters ### mandate [`MandateBody`](../interfaces/MandateBody.md) ## Returns `UnsignedProof` --- ## Page: evaluateAuthority URL: https://docs.totem.ing/api/totemsdk-authority/functions/evaluateAuthority [**@totemsdk/authority**](../index.md) *** [@totemsdk/authority](../index.md) / evaluateAuthority # Function: evaluateAuthority() > **evaluateAuthority**(`params`): [`EvaluateAuthorityResult`](../interfaces/EvaluateAuthorityResult.md) ## Parameters ### params [`EvaluateAuthorityParams`](../interfaces/EvaluateAuthorityParams.md) ## Returns [`EvaluateAuthorityResult`](../interfaces/EvaluateAuthorityResult.md) --- ## Page: matchConstraints URL: https://docs.totem.ing/api/totemsdk-authority/functions/matchConstraints [**@totemsdk/authority**](../index.md) *** [@totemsdk/authority](../index.md) / matchConstraints # Function: matchConstraints() > **matchConstraints**(`action`, `constraints`): `boolean` ## Parameters ### action [`ActionIntent`](../interfaces/ActionIntent.md) ### constraints [`MandateConstraint`](../interfaces/MandateConstraint.md)[] ## Returns `boolean` --- ## Page: matchScope URL: https://docs.totem.ing/api/totemsdk-authority/functions/matchScope [**@totemsdk/authority**](../index.md) *** [@totemsdk/authority](../index.md) / matchScope # Function: matchScope() > **matchScope**(`action`, `scope`): `boolean` ## Parameters ### action `string` ### scope `string` ## Returns `boolean` --- ## Page: resolveActionField URL: https://docs.totem.ing/api/totemsdk-authority/functions/resolveActionField [**@totemsdk/authority**](../index.md) *** [@totemsdk/authority](../index.md) / resolveActionField # Function: resolveActionField() > **resolveActionField**(`action`, `field`): `unknown` Resolve a constraint field against an action intent. Supports: - top-level action fields (`target`, `principal`, `agent`, `action`, `nonce`); - flat constraint keys (`action.constraints[field]`); - dotted nested paths into the constraint map (`payload.foo` → `constraints.payload.foo`). This lets governance-emitted constraints such as `target` and `payload.foo` match without the caller manually flattening them into a single map. ## Parameters ### action [`ActionIntent`](../interfaces/ActionIntent.md) ### field `string` ## Returns `unknown` --- ## Page: signMandateWithLease URL: https://docs.totem.ing/api/totemsdk-authority/functions/signMandateWithLease [**@totemsdk/authority**](../index.md) *** [@totemsdk/authority](../index.md) / signMandateWithLease # Function: signMandateWithLease() > **signMandateWithLease**(`unsignedMandate`, `seed`, `leaseProvider`, `options?`): `Promise`\<`SignedProof`\> ## Parameters ### unsignedMandate `UnsignedProof` ### seed `Uint8Array` ### leaseProvider #### burnReservation #### commitKeyUse #### reserveKeyUse ### options? #### treeId? `string` #### ttlMs? `number` ## Returns `Promise`\<`SignedProof`\> --- ## Page: snapshotFromUsage URL: https://docs.totem.ing/api/totemsdk-authority/functions/snapshotFromUsage [**@totemsdk/authority**](../index.md) *** [@totemsdk/authority](../index.md) / snapshotFromUsage # Function: snapshotFromUsage() > **snapshotFromUsage**(`usages`, `now`, `limit?`): [`AuthorityUsageSnapshot`](../interfaces/AuthorityUsageSnapshot.md) ## Parameters ### usages [`AuthorityUsage`](../interfaces/AuthorityUsage.md)[] ### now `number` ### limit? [`UsageLimit`](../interfaces/UsageLimit.md) ## Returns [`AuthorityUsageSnapshot`](../interfaces/AuthorityUsageSnapshot.md) --- ## Page: verifyMandate URL: https://docs.totem.ing/api/totemsdk-authority/functions/verifyMandate [**@totemsdk/authority**](../index.md) *** [@totemsdk/authority](../index.md) / verifyMandate # Function: verifyMandate() > **verifyMandate**(`mandate`, `identityResolver`, `now`, `graceMs?`, `mandateStatus?`): [`MandateVerificationResult`](../interfaces/MandateVerificationResult.md) ## Parameters ### mandate `SignedProof` ### identityResolver [`AuthorityIdentityResolver`](../interfaces/AuthorityIdentityResolver.md) ### now `number` ### graceMs? `number` = `0` ### mandateStatus? [`MandateStatusSnapshot`](../interfaces/MandateStatusSnapshot.md) ## Returns [`MandateVerificationResult`](../interfaces/MandateVerificationResult.md) --- ## Page: ActionIntent URL: https://docs.totem.ing/api/totemsdk-authority/interfaces/ActionIntent [**@totemsdk/authority**](../index.md) *** [@totemsdk/authority](../index.md) / ActionIntent # Interface: ActionIntent ## Properties ### action > **action**: `string` *** ### agent > **agent**: `string` *** ### constraints? > `optional` **constraints?**: `Record`\<`string`, `unknown`\> *** ### nonce? > `optional` **nonce?**: `string` *** ### principal > **principal**: `string` *** ### target? > `optional` **target?**: `string` --- ## Page: AuthorityDecision URL: https://docs.totem.ing/api/totemsdk-authority/interfaces/AuthorityDecision [**@totemsdk/authority**](../index.md) *** [@totemsdk/authority](../index.md) / AuthorityDecision # Interface: AuthorityDecision ## Properties ### allowed > **allowed**: `boolean` *** ### decisionId > **decisionId**: `string` *** ### evaluatedAt > **evaluatedAt**: `number` *** ### evidenceIds > **evidenceIds**: readonly `string`[] *** ### failedRules > **failedRules**: `string`[] *** ### intentId > **intentId**: `string` *** ### mandateId > **mandateId**: `string` *** ### mandateVerification > **mandateVerification**: [`MandateVerificationResult`](MandateVerificationResult.md) *** ### matchedRules > **matchedRules**: `string`[] *** ### policyVersion > **policyVersion**: `string` *** ### reason? > `optional` **reason?**: `string` *** ### usageDelta? > `optional` **usageDelta?**: `object` #### amount? > `optional` **amount?**: `string` #### count > **count**: `number` *** ### usageSnapshot > **usageSnapshot**: [`AuthorityUsageSnapshot`](AuthorityUsageSnapshot.md) *** ### usageSnapshotHash > **usageSnapshotHash**: `string` --- ## Page: AuthorityIdentityResolver URL: https://docs.totem.ing/api/totemsdk-authority/interfaces/AuthorityIdentityResolver [**@totemsdk/authority**](../index.md) *** [@totemsdk/authority](../index.md) / AuthorityIdentityResolver # Interface: AuthorityIdentityResolver ## Methods ### resolve() > **resolve**(`identityId`): `IdentityGraph` \| `undefined` #### Parameters ##### identityId `string` #### Returns `IdentityGraph` \| `undefined` --- ## Page: AuthorityUsage URL: https://docs.totem.ing/api/totemsdk-authority/interfaces/AuthorityUsage [**@totemsdk/authority**](../index.md) *** [@totemsdk/authority](../index.md) / AuthorityUsage # Interface: AuthorityUsage ## Properties ### countsToward? > `optional` **countsToward?**: `object` #### amount? > `optional` **amount?**: `string` #### count? > `optional` **count?**: `number` *** ### intentId > **intentId**: `string` *** ### mandateProofId > **mandateProofId**: `string` *** ### usageId > **usageId**: `string` *** ### usedAt > **usedAt**: `number` --- ## Page: AuthorityUsageSnapshot URL: https://docs.totem.ing/api/totemsdk-authority/interfaces/AuthorityUsageSnapshot [**@totemsdk/authority**](../index.md) *** [@totemsdk/authority](../index.md) / AuthorityUsageSnapshot # Interface: AuthorityUsageSnapshot ## Properties ### mandateProofId > **mandateProofId**: `string` *** ### totalAmount? > `optional` **totalAmount?**: `string` *** ### totalCount > **totalCount**: `number` *** ### windowEnd? > `optional` **windowEnd?**: `number` *** ### windowStart? > `optional` **windowStart?**: `number` --- ## Page: CreateAgentMandateParams URL: https://docs.totem.ing/api/totemsdk-authority/interfaces/CreateAgentMandateParams [**@totemsdk/authority**](../index.md) *** [@totemsdk/authority](../index.md) / CreateAgentMandateParams # Interface: CreateAgentMandateParams ## Properties ### constraints? > `optional` **constraints?**: [`MandateConstraint`](MandateConstraint.md)[] *** ### expiresAt? > `optional` **expiresAt?**: `number` *** ### grantee > **grantee**: `string` *** ### grantor > **grantor**: `string` *** ### issuedAt? > `optional` **issuedAt?**: `number` *** ### principal > **principal**: `string` *** ### revocationEpoch? > `optional` **revocationEpoch?**: `number` *** ### scope > **scope**: `string` *** ### usageLimit? > `optional` **usageLimit?**: [`UsageLimit`](UsageLimit.md) --- ## Page: EvaluateAuthorityParams URL: https://docs.totem.ing/api/totemsdk-authority/interfaces/EvaluateAuthorityParams [**@totemsdk/authority**](../index.md) *** [@totemsdk/authority](../index.md) / EvaluateAuthorityParams # Interface: EvaluateAuthorityParams ## Properties ### action > **action**: [`ActionIntent`](ActionIntent.md) *** ### evidence? > `optional` **evidence?**: `SignedProof`[] *** ### graceMs? > `optional` **graceMs?**: `number` *** ### identityResolver > **identityResolver**: [`AuthorityIdentityResolver`](AuthorityIdentityResolver.md) *** ### mandate > **mandate**: `SignedProof` *** ### mandateStatus? > `optional` **mandateStatus?**: [`MandateStatusSnapshot`](MandateStatusSnapshot.md) *** ### now > **now**: `number` *** ### policyVersion? > `optional` **policyVersion?**: `string` *** ### usageSnapshot > **usageSnapshot**: [`AuthorityUsageSnapshot`](AuthorityUsageSnapshot.md) --- ## Page: EvaluateAuthorityResult URL: https://docs.totem.ing/api/totemsdk-authority/interfaces/EvaluateAuthorityResult [**@totemsdk/authority**](../index.md) *** [@totemsdk/authority](../index.md) / EvaluateAuthorityResult # Interface: EvaluateAuthorityResult ## Properties ### decision > **decision**: [`AuthorityDecision`](AuthorityDecision.md) *** ### usageDelta > **usageDelta**: `object` #### amount? > `optional` **amount?**: `string` #### count > **count**: `number` --- ## Page: MandateBody URL: https://docs.totem.ing/api/totemsdk-authority/interfaces/MandateBody [**@totemsdk/authority**](../index.md) *** [@totemsdk/authority](../index.md) / MandateBody # Interface: MandateBody ## Properties ### constraints? > `optional` **constraints?**: [`MandateConstraint`](MandateConstraint.md)[] *** ### expiresAt? > `optional` **expiresAt?**: `number` *** ### grantee > **grantee**: `string` *** ### grantor > **grantor**: `string` *** ### issuedAt > **issuedAt**: `number` *** ### principal > **principal**: `string` *** ### revocationEpoch? > `optional` **revocationEpoch?**: `number` *** ### scope > **scope**: `string` *** ### usageLimit? > `optional` **usageLimit?**: [`UsageLimit`](UsageLimit.md) --- ## Page: MandateConstraint URL: https://docs.totem.ing/api/totemsdk-authority/interfaces/MandateConstraint [**@totemsdk/authority**](../index.md) *** [@totemsdk/authority](../index.md) / MandateConstraint # Interface: MandateConstraint ## Properties ### field > **field**: `string` *** ### operator > **operator**: `"eq"` \| `"lt"` \| `"lte"` \| `"gt"` \| `"gte"` \| `"in"` \| `"not_in"` *** ### value > **value**: `unknown` --- ## Page: MandateStatusSnapshot URL: https://docs.totem.ing/api/totemsdk-authority/interfaces/MandateStatusSnapshot [**@totemsdk/authority**](../index.md) *** [@totemsdk/authority](../index.md) / MandateStatusSnapshot # Interface: MandateStatusSnapshot ## Properties ### checkedAt > **checkedAt**: `number` *** ### currentEpoch? > `optional` **currentEpoch?**: `number` *** ### revocationEpochs? > `optional` **revocationEpochs?**: `Record`\<`string`, `number`\> --- ## Page: MandateVerificationResult URL: https://docs.totem.ing/api/totemsdk-authority/interfaces/MandateVerificationResult [**@totemsdk/authority**](../index.md) *** [@totemsdk/authority](../index.md) / MandateVerificationResult # Interface: MandateVerificationResult ## Properties ### expired > **expired**: `boolean` *** ### granteeAddress? > `optional` **granteeAddress?**: `string` *** ### grantorAddress? > `optional` **grantorAddress?**: `string` *** ### identityRevoked > **identityRevoked**: `boolean` *** ### identityVerified > **identityVerified**: `boolean` *** ### mandateId? > `optional` **mandateId?**: `string` *** ### mandateRevoked > **mandateRevoked**: `boolean` *** ### principalId? > `optional` **principalId?**: `string` *** ### reason? > `optional` **reason?**: `string` *** ### scopeMatch > **scopeMatch**: `boolean` *** ### usageExceeded > **usageExceeded**: `boolean` *** ### valid > **valid**: `boolean` --- ## Page: UsageLimit URL: https://docs.totem.ing/api/totemsdk-authority/interfaces/UsageLimit [**@totemsdk/authority**](../index.md) *** [@totemsdk/authority](../index.md) / UsageLimit # Interface: UsageLimit ## Properties ### maxCount? > `optional` **maxCount?**: `number` *** ### maxTotal? > `optional` **maxTotal?**: `string` *** ### windowMs? > `optional` **windowMs?**: `number` --- ## Page: CompositeProvider URL: https://docs.totem.ing/api/totemsdk-chain-provider/classes/CompositeProvider [**@totemsdk/chain-provider**](../index.md) *** [@totemsdk/chain-provider](../index.md) / CompositeProvider # Class: CompositeProvider ## Implements - [`ChainStateProvider`](../interfaces/ChainStateProvider.md) ## Constructors ### Constructor > **new CompositeProvider**(`primary`, `fallback`, `onFallback?`): `CompositeProvider` #### Parameters ##### primary [`ChainStateProvider`](../interfaces/ChainStateProvider.md) ##### fallback [`ChainStateProvider`](../interfaces/ChainStateProvider.md) ##### onFallback? (`method`, `error`) => `void` #### Returns `CompositeProvider` ## Methods ### broadcastTxPoW() > **broadcastTxPoW**(`txpowHex`): `Promise`\<[`BroadcastResult`](../interfaces/BroadcastResult.md)\> #### Parameters ##### txpowHex `string` #### Returns `Promise`\<[`BroadcastResult`](../interfaces/BroadcastResult.md)\> #### Implementation of [`ChainStateProvider`](../interfaces/ChainStateProvider.md).[`broadcastTxPoW`](../interfaces/ChainStateProvider.md#broadcasttxpow) *** ### getCoin() > **getCoin**(`coinId`): `Promise`\<[`Coin`](../interfaces/Coin.md) \| `null`\> #### Parameters ##### coinId `string` #### Returns `Promise`\<[`Coin`](../interfaces/Coin.md) \| `null`\> #### Implementation of [`ChainStateProvider`](../interfaces/ChainStateProvider.md).[`getCoin`](../interfaces/ChainStateProvider.md#getcoin) *** ### getCoins() > **getCoins**(`query`): `Promise`\<[`Coin`](../interfaces/Coin.md)[]\> #### Parameters ##### query [`CoinsQuery`](../interfaces/CoinsQuery.md) #### Returns `Promise`\<[`Coin`](../interfaces/Coin.md)[]\> #### Implementation of [`ChainStateProvider`](../interfaces/ChainStateProvider.md).[`getCoins`](../interfaces/ChainStateProvider.md#getcoins) *** ### getProof() > **getProof**(`coinId`): `Promise`\<[`MMRProof`](../interfaces/MMRProof.md)\> #### Parameters ##### coinId `string` #### Returns `Promise`\<[`MMRProof`](../interfaces/MMRProof.md)\> #### Implementation of [`ChainStateProvider`](../interfaces/ChainStateProvider.md).[`getProof`](../interfaces/ChainStateProvider.md#getproof) *** ### getTip() > **getTip**(): `Promise`\<[`ChainTip`](../interfaces/ChainTip.md)\> #### Returns `Promise`\<[`ChainTip`](../interfaces/ChainTip.md)\> #### Implementation of [`ChainStateProvider`](../interfaces/ChainStateProvider.md).[`getTip`](../interfaces/ChainStateProvider.md#gettip) *** ### getToken() > **getToken**(`tokenId`): `Promise`\<[`TokenInfo`](../interfaces/TokenInfo.md)\> #### Parameters ##### tokenId `string` #### Returns `Promise`\<[`TokenInfo`](../interfaces/TokenInfo.md)\> #### Implementation of [`ChainStateProvider`](../interfaces/ChainStateProvider.md).[`getToken`](../interfaces/ChainStateProvider.md#gettoken) *** ### getTokensByCreator() > **getTokensByCreator**(`address`): `Promise`\<[`TokenInfo`](../interfaces/TokenInfo.md)[]\> #### Parameters ##### address `string` #### Returns `Promise`\<[`TokenInfo`](../interfaces/TokenInfo.md)[]\> #### Implementation of [`ChainStateProvider`](../interfaces/ChainStateProvider.md).[`getTokensByCreator`](../interfaces/ChainStateProvider.md#gettokensbycreator) *** ### searchTokens() > **searchTokens**(`query`): `Promise`\<[`TokenInfo`](../interfaces/TokenInfo.md)[]\> #### Parameters ##### query [`TokenSearchQuery`](../interfaces/TokenSearchQuery.md) #### Returns `Promise`\<[`TokenInfo`](../interfaces/TokenInfo.md)[]\> #### Implementation of [`ChainStateProvider`](../interfaces/ChainStateProvider.md).[`searchTokens`](../interfaces/ChainStateProvider.md#searchtokens) --- ## Page: HostedProvider URL: https://docs.totem.ing/api/totemsdk-chain-provider/classes/HostedProvider [**@totemsdk/chain-provider**](../index.md) *** [@totemsdk/chain-provider](../index.md) / HostedProvider # Class: HostedProvider ## Implements - [`ChainStateProvider`](../interfaces/ChainStateProvider.md) ## Constructors ### Constructor > **new HostedProvider**(`config`): `HostedProvider` #### Parameters ##### config [`HostedProviderConfig`](../interfaces/HostedProviderConfig.md) #### Returns `HostedProvider` ## Methods ### broadcastTxPoW() > **broadcastTxPoW**(`txpowHex`): `Promise`\<[`BroadcastResult`](../interfaces/BroadcastResult.md)\> Broadcast a mined TxPoW hex. Uses POST /api/meg/postminedtxn (the correct Axia MEG broadcast bridge). #### Parameters ##### txpowHex `string` #### Returns `Promise`\<[`BroadcastResult`](../interfaces/BroadcastResult.md)\> #### Implementation of [`ChainStateProvider`](../interfaces/ChainStateProvider.md).[`broadcastTxPoW`](../interfaces/ChainStateProvider.md#broadcasttxpow) *** ### getCoin() > **getCoin**(`coinId`): `Promise`\<[`Coin`](../interfaces/Coin.md) \| `null`\> #### Parameters ##### coinId `string` #### Returns `Promise`\<[`Coin`](../interfaces/Coin.md) \| `null`\> #### Implementation of [`ChainStateProvider`](../interfaces/ChainStateProvider.md).[`getCoin`](../interfaces/ChainStateProvider.md#getcoin) *** ### getCoins() > **getCoins**(`query`): `Promise`\<[`Coin`](../interfaces/Coin.md)[]\> Get coins (UTXOs) for an address. Maps GET /v1/wallet/utxos/:address → Coin[]. #### Parameters ##### query [`CoinsQuery`](../interfaces/CoinsQuery.md) #### Returns `Promise`\<[`Coin`](../interfaces/Coin.md)[]\> #### Implementation of [`ChainStateProvider`](../interfaces/ChainStateProvider.md).[`getCoins`](../interfaces/ChainStateProvider.md#getcoins) *** ### getProof() > **getProof**(`coinId`): `Promise`\<[`MMRProof`](../interfaces/MMRProof.md)\> Get MMR proof for a coin via Minima `coinproof` RPC command. #### Parameters ##### coinId `string` #### Returns `Promise`\<[`MMRProof`](../interfaces/MMRProof.md)\> #### Implementation of [`ChainStateProvider`](../interfaces/ChainStateProvider.md).[`getProof`](../interfaces/ChainStateProvider.md#getproof) *** ### getTip() > **getTip**(): `Promise`\<[`ChainTip`](../interfaces/ChainTip.md)\> Get chain tip via Minima `status` RPC — parses response.chain. #### Returns `Promise`\<[`ChainTip`](../interfaces/ChainTip.md)\> #### Implementation of [`ChainStateProvider`](../interfaces/ChainStateProvider.md).[`getTip`](../interfaces/ChainStateProvider.md#gettip) *** ### getToken() > **getToken**(`tokenId`): `Promise`\<[`TokenInfo`](../interfaces/TokenInfo.md)\> Get token info via Minima `tokens tokenid:X` RPC command. #### Parameters ##### tokenId `string` #### Returns `Promise`\<[`TokenInfo`](../interfaces/TokenInfo.md)\> #### Implementation of [`ChainStateProvider`](../interfaces/ChainStateProvider.md).[`getToken`](../interfaces/ChainStateProvider.md#gettoken) *** ### getTokensByCreator() > **getTokensByCreator**(`address`): `Promise`\<[`TokenInfo`](../interfaces/TokenInfo.md)[]\> #### Parameters ##### address `string` #### Returns `Promise`\<[`TokenInfo`](../interfaces/TokenInfo.md)[]\> #### Implementation of [`ChainStateProvider`](../interfaces/ChainStateProvider.md).[`getTokensByCreator`](../interfaces/ChainStateProvider.md#gettokensbycreator) *** ### searchTokens() > **searchTokens**(`query`): `Promise`\<[`TokenInfo`](../interfaces/TokenInfo.md)[]\> Search tokens via Minima `tokens` RPC command, then filter client-side. #### Parameters ##### query [`TokenSearchQuery`](../interfaces/TokenSearchQuery.md) #### Returns `Promise`\<[`TokenInfo`](../interfaces/TokenInfo.md)[]\> #### Implementation of [`ChainStateProvider`](../interfaces/ChainStateProvider.md).[`searchTokens`](../interfaces/ChainStateProvider.md#searchtokens) --- ## Page: LookupClientProvider URL: https://docs.totem.ing/api/totemsdk-chain-provider/classes/LookupClientProvider [**@totemsdk/chain-provider**](../index.md) *** [@totemsdk/chain-provider](../index.md) / LookupClientProvider # Class: LookupClientProvider ## Implements - [`ChainStateProvider`](../interfaces/ChainStateProvider.md) ## Constructors ### Constructor > **new LookupClientProvider**(`_client`): `LookupClientProvider` #### Parameters ##### \_client [`LookupClientLike`](../interfaces/LookupClientLike.md) #### Returns `LookupClientProvider` ## Methods ### broadcastTxPoW() > **broadcastTxPoW**(`txpowHex`): `Promise`\<[`BroadcastResult`](../interfaces/BroadcastResult.md)\> #### Parameters ##### txpowHex `string` #### Returns `Promise`\<[`BroadcastResult`](../interfaces/BroadcastResult.md)\> #### Implementation of [`ChainStateProvider`](../interfaces/ChainStateProvider.md).[`broadcastTxPoW`](../interfaces/ChainStateProvider.md#broadcasttxpow) *** ### getCoin() > **getCoin**(`coinId`): `Promise`\<[`Coin`](../interfaces/Coin.md) \| `null`\> #### Parameters ##### coinId `string` #### Returns `Promise`\<[`Coin`](../interfaces/Coin.md) \| `null`\> #### Implementation of [`ChainStateProvider`](../interfaces/ChainStateProvider.md).[`getCoin`](../interfaces/ChainStateProvider.md#getcoin) *** ### getCoins() > **getCoins**(`query`): `Promise`\<[`Coin`](../interfaces/Coin.md)[]\> #### Parameters ##### query [`CoinsQuery`](../interfaces/CoinsQuery.md) #### Returns `Promise`\<[`Coin`](../interfaces/Coin.md)[]\> #### Implementation of [`ChainStateProvider`](../interfaces/ChainStateProvider.md).[`getCoins`](../interfaces/ChainStateProvider.md#getcoins) *** ### getProof() > **getProof**(`coinId`): `Promise`\<[`MMRProof`](../interfaces/MMRProof.md)\> #### Parameters ##### coinId `string` #### Returns `Promise`\<[`MMRProof`](../interfaces/MMRProof.md)\> #### Implementation of [`ChainStateProvider`](../interfaces/ChainStateProvider.md).[`getProof`](../interfaces/ChainStateProvider.md#getproof) *** ### getTip() > **getTip**(): `Promise`\<[`ChainTip`](../interfaces/ChainTip.md)\> #### Returns `Promise`\<[`ChainTip`](../interfaces/ChainTip.md)\> #### Implementation of [`ChainStateProvider`](../interfaces/ChainStateProvider.md).[`getTip`](../interfaces/ChainStateProvider.md#gettip) *** ### getToken() > **getToken**(`tokenId`): `Promise`\<[`TokenInfo`](../interfaces/TokenInfo.md)\> #### Parameters ##### tokenId `string` #### Returns `Promise`\<[`TokenInfo`](../interfaces/TokenInfo.md)\> #### Implementation of [`ChainStateProvider`](../interfaces/ChainStateProvider.md).[`getToken`](../interfaces/ChainStateProvider.md#gettoken) *** ### getTokensByCreator() > **getTokensByCreator**(`address`): `Promise`\<[`TokenInfo`](../interfaces/TokenInfo.md)[]\> #### Parameters ##### address `string` #### Returns `Promise`\<[`TokenInfo`](../interfaces/TokenInfo.md)[]\> #### Implementation of [`ChainStateProvider`](../interfaces/ChainStateProvider.md).[`getTokensByCreator`](../interfaces/ChainStateProvider.md#gettokensbycreator) *** ### searchTokens() > **searchTokens**(`query`): `Promise`\<[`TokenInfo`](../interfaces/TokenInfo.md)[]\> #### Parameters ##### query [`TokenSearchQuery`](../interfaces/TokenSearchQuery.md) #### Returns `Promise`\<[`TokenInfo`](../interfaces/TokenInfo.md)[]\> #### Implementation of [`ChainStateProvider`](../interfaces/ChainStateProvider.md).[`searchTokens`](../interfaces/ChainStateProvider.md#searchtokens) --- ## Page: MinimaRpcProvider URL: https://docs.totem.ing/api/totemsdk-chain-provider/classes/MinimaRpcProvider [**@totemsdk/chain-provider**](../index.md) *** [@totemsdk/chain-provider](../index.md) / MinimaRpcProvider # Class: MinimaRpcProvider Optional funding-truth extension port. Providers that can attest deposits implement this; `withDepositVerifier(provider)` provides a default that uses the base provider's `getCoin` for the live path. ## Implements - [`ChainStateProvider`](../interfaces/ChainStateProvider.md) - [`DepositVerifier`](../interfaces/DepositVerifier.md) ## Constructors ### Constructor > **new MinimaRpcProvider**(`client`): `MinimaRpcProvider` #### Parameters ##### client `MinimaRpcClient` #### Returns `MinimaRpcProvider` ## Methods ### broadcastTxPoW() > **broadcastTxPoW**(`txpowHex`): `Promise`\<[`BroadcastResult`](../interfaces/BroadcastResult.md)\> #### Parameters ##### txpowHex `string` #### Returns `Promise`\<[`BroadcastResult`](../interfaces/BroadcastResult.md)\> #### Implementation of [`ChainStateProvider`](../interfaces/ChainStateProvider.md).[`broadcastTxPoW`](../interfaces/ChainStateProvider.md#broadcasttxpow) *** ### depositAddressFor() > **depositAddressFor**(`lp`, `opts?`): `string` Deterministic deposit address the LP funds the pool/channel from. #### Parameters ##### lp `string` ##### opts? ###### poolId? `string` ###### tokenId? `string` #### Returns `string` #### Implementation of [`DepositVerifier`](../interfaces/DepositVerifier.md).[`depositAddressFor`](../interfaces/DepositVerifier.md#depositaddressfor) *** ### getCoin() > **getCoin**(`coinId`): `Promise`\<[`Coin`](../interfaces/Coin.md) \| `null`\> #### Parameters ##### coinId `string` #### Returns `Promise`\<[`Coin`](../interfaces/Coin.md) \| `null`\> #### Implementation of [`ChainStateProvider`](../interfaces/ChainStateProvider.md).[`getCoin`](../interfaces/ChainStateProvider.md#getcoin) *** ### getCoins() > **getCoins**(`query`): `Promise`\<[`Coin`](../interfaces/Coin.md)[]\> #### Parameters ##### query [`CoinsQuery`](../interfaces/CoinsQuery.md) #### Returns `Promise`\<[`Coin`](../interfaces/Coin.md)[]\> #### Implementation of [`ChainStateProvider`](../interfaces/ChainStateProvider.md).[`getCoins`](../interfaces/ChainStateProvider.md#getcoins) *** ### getMmrRoot() > **getMmrRoot**(): `Promise`\<`string` \| `null`\> MMR root at tip — the anchor peers verify offline proofs against. #### Returns `Promise`\<`string` \| `null`\> #### Implementation of [`DepositVerifier`](../interfaces/DepositVerifier.md).[`getMmrRoot`](../interfaces/DepositVerifier.md#getmmrroot) *** ### getProof() > **getProof**(`coinId`): `Promise`\<[`MMRProof`](../interfaces/MMRProof.md)\> #### Parameters ##### coinId `string` #### Returns `Promise`\<[`MMRProof`](../interfaces/MMRProof.md)\> #### Implementation of [`ChainStateProvider`](../interfaces/ChainStateProvider.md).[`getProof`](../interfaces/ChainStateProvider.md#getproof) *** ### getTip() > **getTip**(): `Promise`\<[`ChainTip`](../interfaces/ChainTip.md)\> #### Returns `Promise`\<[`ChainTip`](../interfaces/ChainTip.md)\> #### Implementation of [`ChainStateProvider`](../interfaces/ChainStateProvider.md).[`getTip`](../interfaces/ChainStateProvider.md#gettip) *** ### getToken() > **getToken**(`tokenId`): `Promise`\<[`TokenInfo`](../interfaces/TokenInfo.md)\> #### Parameters ##### tokenId `string` #### Returns `Promise`\<[`TokenInfo`](../interfaces/TokenInfo.md)\> #### Implementation of [`ChainStateProvider`](../interfaces/ChainStateProvider.md).[`getToken`](../interfaces/ChainStateProvider.md#gettoken) *** ### getTokensByCreator() > **getTokensByCreator**(`address`): `Promise`\<[`TokenInfo`](../interfaces/TokenInfo.md)[]\> #### Parameters ##### address `string` #### Returns `Promise`\<[`TokenInfo`](../interfaces/TokenInfo.md)[]\> #### Implementation of [`ChainStateProvider`](../interfaces/ChainStateProvider.md).[`getTokensByCreator`](../interfaces/ChainStateProvider.md#gettokensbycreator) *** ### searchTokens() > **searchTokens**(`query`): `Promise`\<[`TokenInfo`](../interfaces/TokenInfo.md)[]\> #### Parameters ##### query [`TokenSearchQuery`](../interfaces/TokenSearchQuery.md) #### Returns `Promise`\<[`TokenInfo`](../interfaces/TokenInfo.md)[]\> #### Implementation of [`ChainStateProvider`](../interfaces/ChainStateProvider.md).[`searchTokens`](../interfaces/ChainStateProvider.md#searchtokens) *** ### verifyDeposit() > **verifyDeposit**(`params`): `Promise`\<[`DepositVerification`](../interfaces/DepositVerification.md)\> Authoritative live check via `coinexport` (the coinproof endpoint): returns found/unspent/owned/token/amount + the full coin proof. `coincheck` on totem-node wants a full proof payload rather than a coinid, so coinexport is the canonical primitive (#3). #### Parameters ##### params [`VerifyDepositParams`](../interfaces/VerifyDepositParams.md) #### Returns `Promise`\<[`DepositVerification`](../interfaces/DepositVerification.md)\> #### Implementation of [`DepositVerifier`](../interfaces/DepositVerifier.md).[`verifyDeposit`](../interfaces/DepositVerifier.md#verifydeposit) --- ## Page: depositAddressFor URL: https://docs.totem.ing/api/totemsdk-chain-provider/functions/depositAddressFor [**@totemsdk/chain-provider**](../index.md) *** [@totemsdk/chain-provider](../index.md) / depositAddressFor # Function: depositAddressFor() > **depositAddressFor**(`lp`, `opts?`): `string` Deterministic, domain-separated funding address for an LP deposit. In production this is the channel/pool script address the LP pays into and the funding check is run against; keeping it a pure derivation keeps issue #25 constructable and checkable without a live script compiler. ## Parameters ### lp `string` ### opts? [`DepositAddressOptions`](../interfaces/DepositAddressOptions.md) ## Returns `string` --- ## Page: verifyDeposit URL: https://docs.totem.ing/api/totemsdk-chain-provider/functions/verifyDeposit [**@totemsdk/chain-provider**](../index.md) *** [@totemsdk/chain-provider](../index.md) / verifyDeposit # Function: verifyDeposit() > **verifyDeposit**(`provider`, `params`): `Promise`\<[`DepositVerification`](../interfaces/DepositVerification.md)\> Live deposit check against a chain provider. All gates must hold: 1. the coin exists; 2. it is unspent (confirmed on-chain, never a declared flag); 3. it is owned by `ownerAddress` (Mx or 0x-root form); 4. its tokenid matches (base MINIMA = '0x00' when none is requested); 5. its amount covers `claimedAmount`; 6. when `requireConfirmed` is set, the coin is chain-confirmed. ## Parameters ### provider `Pick`\<[`ChainStateProvider`](../interfaces/ChainStateProvider.md), `"getCoin"`\> ### params [`VerifyDepositParams`](../interfaces/VerifyDepositParams.md) ## Returns `Promise`\<[`DepositVerification`](../interfaces/DepositVerification.md)\> --- ## Page: verifyDepositMmrProof URL: https://docs.totem.ing/api/totemsdk-chain-provider/functions/verifyDepositMmrProof [**@totemsdk/chain-provider**](../index.md) *** [@totemsdk/chain-provider](../index.md) / verifyDepositMmrProof # Function: verifyDepositMmrProof() > **verifyDepositMmrProof**(`leafPubkey`, `proof`, `expectedRoot`): `boolean` Offline verification of a legacy chunk MMR proof against an expected root. Pure function — a peer holding (leafPubkey, proof, root) can re-validate a deposit commitment without node access. The proof is encoded to the wasm contract (hex `data`, decimal-string `value` per chunk). ## Parameters ### leafPubkey `Uint8Array` ### proof [`MmrChunkProof`](../interfaces/MmrChunkProof.md) ### expectedRoot `Uint8Array` ## Returns `boolean` --- ## Page: withDepositVerifier URL: https://docs.totem.ing/api/totemsdk-chain-provider/functions/withDepositVerifier [**@totemsdk/chain-provider**](../index.md) *** [@totemsdk/chain-provider](../index.md) / withDepositVerifier # Function: withDepositVerifier() > **withDepositVerifier**(`provider`): [`ChainStateProvider`](../interfaces/ChainStateProvider.md) & [`DepositVerifier`](../interfaces/DepositVerifier.md) Default `DepositVerifier` over any `ChainStateProvider`. The live path uses `getCoin`; the MMR-root path returns `null` unless the base provider knows a root (concrete providers override `getMmrRoot`). ## Parameters ### provider [`ChainStateProvider`](../interfaces/ChainStateProvider.md) ## Returns [`ChainStateProvider`](../interfaces/ChainStateProvider.md) & [`DepositVerifier`](../interfaces/DepositVerifier.md) --- ## Page: BroadcastResult URL: https://docs.totem.ing/api/totemsdk-chain-provider/interfaces/BroadcastResult [**@totemsdk/chain-provider**](../index.md) *** [@totemsdk/chain-provider](../index.md) / BroadcastResult # Interface: BroadcastResult ## Properties ### message? > `optional` **message?**: `string` *** ### success > **success**: `boolean` *** ### txpowid? > `optional` **txpowid?**: `string` --- ## Page: ChainStateProvider URL: https://docs.totem.ing/api/totemsdk-chain-provider/interfaces/ChainStateProvider [**@totemsdk/chain-provider**](../index.md) *** [@totemsdk/chain-provider](../index.md) / ChainStateProvider # Interface: ChainStateProvider ## Methods ### broadcastTxPoW() > **broadcastTxPoW**(`txpowHex`): `Promise`\<[`BroadcastResult`](BroadcastResult.md)\> #### Parameters ##### txpowHex `string` #### Returns `Promise`\<[`BroadcastResult`](BroadcastResult.md)\> *** ### getCoin() > **getCoin**(`coinId`): `Promise`\<[`Coin`](Coin.md) \| `null`\> #### Parameters ##### coinId `string` #### Returns `Promise`\<[`Coin`](Coin.md) \| `null`\> *** ### getCoins() > **getCoins**(`query`): `Promise`\<[`Coin`](Coin.md)[]\> #### Parameters ##### query [`CoinsQuery`](CoinsQuery.md) #### Returns `Promise`\<[`Coin`](Coin.md)[]\> *** ### getProof() > **getProof**(`coinId`): `Promise`\<[`MMRProof`](MMRProof.md)\> #### Parameters ##### coinId `string` #### Returns `Promise`\<[`MMRProof`](MMRProof.md)\> *** ### getTip() > **getTip**(): `Promise`\<[`ChainTip`](ChainTip.md)\> #### Returns `Promise`\<[`ChainTip`](ChainTip.md)\> *** ### getToken() > **getToken**(`tokenId`): `Promise`\<[`TokenInfo`](TokenInfo.md)\> #### Parameters ##### tokenId `string` #### Returns `Promise`\<[`TokenInfo`](TokenInfo.md)\> *** ### getTokensByCreator() > **getTokensByCreator**(`address`): `Promise`\<[`TokenInfo`](TokenInfo.md)[]\> #### Parameters ##### address `string` #### Returns `Promise`\<[`TokenInfo`](TokenInfo.md)[]\> *** ### searchTokens() > **searchTokens**(`query`): `Promise`\<[`TokenInfo`](TokenInfo.md)[]\> #### Parameters ##### query [`TokenSearchQuery`](TokenSearchQuery.md) #### Returns `Promise`\<[`TokenInfo`](TokenInfo.md)[]\> --- ## Page: ChainTip URL: https://docs.totem.ing/api/totemsdk-chain-provider/interfaces/ChainTip [**@totemsdk/chain-provider**](../index.md) *** [@totemsdk/chain-provider](../index.md) / ChainTip # Interface: ChainTip ## Properties ### block > **block**: `number` *** ### hash > **hash**: `string` *** ### time? > `optional` **time?**: `string` --- ## Page: Coin URL: https://docs.totem.ing/api/totemsdk-chain-provider/interfaces/Coin [**@totemsdk/chain-provider**](../index.md) *** [@totemsdk/chain-provider](../index.md) / Coin # Interface: Coin ## Properties ### address > **address**: `string` *** ### amount > **amount**: `string` *** ### coinid > **coinid**: `string` *** ### created? > `optional` **created?**: `string` *** ### miniaddress? > `optional` **miniaddress?**: `string` *** ### mmrentry? > `optional` **mmrentry?**: `string` *** ### spent? > `optional` **spent?**: `boolean` *** ### state? > `optional` **state?**: `unknown`[] *** ### storestate? > `optional` **storestate?**: `boolean` *** ### token? > `optional` **token?**: `unknown` *** ### tokenid > **tokenid**: `string` --- ## Page: CoinsQuery URL: https://docs.totem.ing/api/totemsdk-chain-provider/interfaces/CoinsQuery [**@totemsdk/chain-provider**](../index.md) *** [@totemsdk/chain-provider](../index.md) / CoinsQuery # Interface: CoinsQuery @totemsdk/chain-provider — shared types and ChainStateProvider interface ## Properties ### address? > `optional` **address?**: `string` *** ### coinId? > `optional` **coinId?**: `string` *** ### megammr? > `optional` **megammr?**: `boolean` *** ### relevant? > `optional` **relevant?**: `boolean` *** ### sendable? > `optional` **sendable?**: `boolean` *** ### tokenId? > `optional` **tokenId?**: `string` --- ## Page: DepositAddressOptions URL: https://docs.totem.ing/api/totemsdk-chain-provider/interfaces/DepositAddressOptions [**@totemsdk/chain-provider**](../index.md) *** [@totemsdk/chain-provider](../index.md) / DepositAddressOptions # Interface: DepositAddressOptions Address-derivation policy for LP funding deposits. ## Properties ### poolId? > `optional` **poolId?**: `string` *** ### tokenId? > `optional` **tokenId?**: `string` --- ## Page: DepositVerification URL: https://docs.totem.ing/api/totemsdk-chain-provider/interfaces/DepositVerification [**@totemsdk/chain-provider**](../index.md) *** [@totemsdk/chain-provider](../index.md) / DepositVerification # Interface: DepositVerification Granular result of a deposit-funding check. `valid` is the all-gates AND. ## Properties ### amountSufficient > **amountSufficient**: `boolean` Coin amount covers the claimed amount. *** ### coin? > `optional` **coin?**: [`Coin`](Coin.md) The coin as observed on-chain. *** ### confirmed > **confirmed**: `boolean` Coin is confirmed on-chain (not a mempool entry). *** ### error? > `optional` **error?**: `unknown` *** ### exists > **exists**: `boolean` *** ### ownedByOwner > **ownedByOwner**: `boolean` Coin address equals the claimed owner (Mx or 0x-root form). *** ### reason? > `optional` **reason?**: `string` *** ### tokenMatches > **tokenMatches**: `boolean` Coin tokenid matches the requested token (or base token when none given). *** ### unspent > **unspent**: `boolean` Coin exists and is not spent (on-chain confirm, not declared). *** ### valid > **valid**: `boolean` --- ## Page: DepositVerifier URL: https://docs.totem.ing/api/totemsdk-chain-provider/interfaces/DepositVerifier [**@totemsdk/chain-provider**](../index.md) *** [@totemsdk/chain-provider](../index.md) / DepositVerifier # Interface: DepositVerifier Optional funding-truth extension port. Providers that can attest deposits implement this; `withDepositVerifier(provider)` provides a default that uses the base provider's `getCoin` for the live path. ## Methods ### depositAddressFor() > **depositAddressFor**(`lp`, `opts?`): `string` Deterministic deposit address the LP funds the pool/channel from. #### Parameters ##### lp `string` ##### opts? [`DepositAddressOptions`](DepositAddressOptions.md) #### Returns `string` *** ### getMmrRoot() > **getMmrRoot**(): `Promise`\<`string` \| `null`\> Chain MMR root for offline proof verification; null when unavailable. #### Returns `Promise`\<`string` \| `null`\> *** ### verifyDeposit() > **verifyDeposit**(`params`): `Promise`\<[`DepositVerification`](DepositVerification.md)\> #### Parameters ##### params [`VerifyDepositParams`](VerifyDepositParams.md) #### Returns `Promise`\<[`DepositVerification`](DepositVerification.md)\> *** ### verifyMmrDeposit()? > `optional` **verifyMmrDeposit**(`params`): `Promise`\<`boolean`\> Offline (root-anchored) proof check; falls back to the live path when absent. #### Parameters ##### params ###### expectedRoot `Uint8Array` ###### leafPubkey `Uint8Array` ###### proof [`MmrChunkProof`](MmrChunkProof.md) #### Returns `Promise`\<`boolean`\> --- ## Page: HostedProviderConfig URL: https://docs.totem.ing/api/totemsdk-chain-provider/interfaces/HostedProviderConfig [**@totemsdk/chain-provider**](../index.md) *** [@totemsdk/chain-provider](../index.md) / HostedProviderConfig # Interface: HostedProviderConfig ## Properties ### apiKey > **apiKey**: `string` *** ### baseUrl > **baseUrl**: `string` *** ### timeoutMs? > `optional` **timeoutMs?**: `number` --- ## Page: LookupClientLike URL: https://docs.totem.ing/api/totemsdk-chain-provider/interfaces/LookupClientLike [**@totemsdk/chain-provider**](../index.md) *** [@totemsdk/chain-provider](../index.md) / LookupClientLike # Interface: LookupClientLike Structural interface describing the subset of LookupClient methods that LookupClientProvider requires. Any object satisfying this interface can be passed in — most commonly a `LookupClient` from @totemsdk/lookup-client. ## Methods ### broadcastTxPoW() > **broadcastTxPoW**(`txpowHex`): `Promise`\<[`BroadcastResult`](BroadcastResult.md)\> #### Parameters ##### txpowHex `string` #### Returns `Promise`\<[`BroadcastResult`](BroadcastResult.md)\> *** ### getCoin() > **getCoin**(`coinId`): `Promise`\<[`Coin`](Coin.md) \| `null`\> #### Parameters ##### coinId `string` #### Returns `Promise`\<[`Coin`](Coin.md) \| `null`\> *** ### getCoins() > **getCoins**(`query`): `Promise`\<[`Coin`](Coin.md)[]\> #### Parameters ##### query [`CoinsQuery`](CoinsQuery.md) #### Returns `Promise`\<[`Coin`](Coin.md)[]\> *** ### getProof() > **getProof**(`coinId`): `Promise`\<[`MMRProof`](MMRProof.md)\> #### Parameters ##### coinId `string` #### Returns `Promise`\<[`MMRProof`](MMRProof.md)\> *** ### getTip() > **getTip**(): `Promise`\<[`ChainTip`](ChainTip.md)\> #### Returns `Promise`\<[`ChainTip`](ChainTip.md)\> *** ### getToken() > **getToken**(`tokenId`): `Promise`\<[`TokenInfo`](TokenInfo.md)\> #### Parameters ##### tokenId `string` #### Returns `Promise`\<[`TokenInfo`](TokenInfo.md)\> *** ### getTokensByCreator() > **getTokensByCreator**(`address`): `Promise`\<[`TokenInfo`](TokenInfo.md)[]\> #### Parameters ##### address `string` #### Returns `Promise`\<[`TokenInfo`](TokenInfo.md)[]\> *** ### searchTokens() > **searchTokens**(`query`): `Promise`\<[`TokenInfo`](TokenInfo.md)[]\> #### Parameters ##### query [`TokenSearchQuery`](TokenSearchQuery.md) #### Returns `Promise`\<[`TokenInfo`](TokenInfo.md)[]\> --- ## Page: MMRProof URL: https://docs.totem.ing/api/totemsdk-chain-provider/interfaces/MMRProof [**@totemsdk/chain-provider**](../index.md) *** [@totemsdk/chain-provider](../index.md) / MMRProof # Interface: MMRProof ## Properties ### coinid > **coinid**: `string` *** ### data > **data**: `unknown` --- ## Page: MmrChunkProof URL: https://docs.totem.ing/api/totemsdk-chain-provider/interfaces/MmrChunkProof [**@totemsdk/chain-provider**](../index.md) *** [@totemsdk/chain-provider](../index.md) / MmrChunkProof # Interface: MmrChunkProof A chunk-based MMR proof (legacy Minima shape), i.e. the sibling hashes between a leaf and the root. Matches `@totemsdk/core` `MMRProof`. ## Properties ### chunks > **chunks**: `object`[] #### isLeft > **isLeft**: `boolean` #### mmrData > **mmrData**: `object` ##### mmrData.data > **data**: `Uint8Array` ##### mmrData.value > **value**: `bigint` --- ## Page: TokenInfo URL: https://docs.totem.ing/api/totemsdk-chain-provider/interfaces/TokenInfo [**@totemsdk/chain-provider**](../index.md) *** [@totemsdk/chain-provider](../index.md) / TokenInfo # Interface: TokenInfo ## Properties ### coins? > `optional` **coins?**: `number` *** ### confirmed? > `optional` **confirmed?**: `string` *** ### description? > `optional` **description?**: `unknown` *** ### name > **name**: `Record`\<`string`, `unknown`\> *** ### script? > `optional` **script?**: `string` *** ### sendable? > `optional` **sendable?**: `string` *** ### tokenid > **tokenid**: `string` *** ### total? > `optional` **total?**: `string` --- ## Page: TokenSearchQuery URL: https://docs.totem.ing/api/totemsdk-chain-provider/interfaces/TokenSearchQuery [**@totemsdk/chain-provider**](../index.md) *** [@totemsdk/chain-provider](../index.md) / TokenSearchQuery # Interface: TokenSearchQuery ## Properties ### category? > `optional` **category?**: `string`[] *** ### creatorAddress? > `optional` **creatorAddress?**: `string` *** ### limit? > `optional` **limit?**: `number` *** ### name? > `optional` **name?**: `string` *** ### offset? > `optional` **offset?**: `number` --- ## Page: VerifyDepositParams URL: https://docs.totem.ing/api/totemsdk-chain-provider/interfaces/VerifyDepositParams [**@totemsdk/chain-provider**](../index.md) *** [@totemsdk/chain-provider](../index.md) / VerifyDepositParams # Interface: VerifyDepositParams Inputs for a live deposit-funding check. "Verified" here means a check against on-chain truth (unspent coin owned by the LP for the claimed token+amount) — never a declared string on a record. ## Properties ### claimedAmount? > `optional` **claimedAmount?**: `string` Claimed funding amount (decimal string); coin.amount must be >= this. *** ### coinId > **coinId**: `string` Coin spendable as the funding source. *** ### ownerAddress > **ownerAddress**: `string` Address that must own the coin (Mx form; 0x-hex roots are normalized against). *** ### requireConfirmed? > `optional` **requireConfirmed?**: `boolean` When true, only chain-confirmed coins pass (mmrentry != '0'). *** ### tokenId? > `optional` **tokenId?**: `string` Required token ID; omit to accept base MINIMA. --- ## Page: DEPOSIT_ADDRESS_DOMAIN URL: https://docs.totem.ing/api/totemsdk-chain-provider/variables/DEPOSIT_ADDRESS_DOMAIN [**@totemsdk/chain-provider**](../index.md) *** [@totemsdk/chain-provider](../index.md) / DEPOSIT\_ADDRESS\_DOMAIN # Variable: DEPOSIT\_ADDRESS\_DOMAIN > `const` **DEPOSIT\_ADDRESS\_DOMAIN**: `"totemsdk/chain-provider/deposit/v1"` = `'totemsdk/chain-provider/deposit/v1'` --- ## Page: TotemConnectionError URL: https://docs.totem.ing/api/totemsdk-connect/classes/TotemConnectionError [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemConnectionError # Class: TotemConnectionError ## Extends - `Error` ## Constructors ### Constructor > **new TotemConnectionError**(`message`): `TotemConnectionError` #### Parameters ##### message `string` #### Returns `TotemConnectionError` #### Overrides `Error.constructor` ## Properties ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: TotemNotInstalledError URL: https://docs.totem.ing/api/totemsdk-connect/classes/TotemNotInstalledError [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemNotInstalledError # Class: TotemNotInstalledError ## Extends - `Error` ## Constructors ### Constructor > **new TotemNotInstalledError**(): `TotemNotInstalledError` #### Returns `TotemNotInstalledError` #### Overrides `Error.constructor` ## Properties ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: WalletDiscovery URL: https://docs.totem.ing/api/totemsdk-connect/classes/WalletDiscovery [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / WalletDiscovery # Class: WalletDiscovery WalletDiscovery — listens for wallet announcements via the 'totem:announce' CustomEvent and maintains a live list of available wallets. Usage: const discovery = new WalletDiscovery(); // Subscribe to wallet list changes const unsubscribe = discovery.onChange((wallets) => { if (wallets.length === 1) { setActiveProvider(wallets[0].provider); } }); // Snapshot of currently-known wallets const wallets = discovery.getWallets(); // Teardown (removes the 'totem:announce' listener) discovery.destroy(); ## Constructors ### Constructor > **new WalletDiscovery**(): `WalletDiscovery` #### Returns `WalletDiscovery` ## Methods ### destroy() > **destroy**(): `void` #### Returns `void` *** ### getWallets() > **getWallets**(): readonly [`DiscoveredWallet`](../interfaces/DiscoveredWallet.md)[] #### Returns readonly [`DiscoveredWallet`](../interfaces/DiscoveredWallet.md)[] *** ### onChange() > **onChange**(`callback`): () => `void` #### Parameters ##### callback (`wallets`) => `void` #### Returns () => `void` --- ## Page: agentCreateReceipt URL: https://docs.totem.ing/api/totemsdk-connect/functions/agentCreateReceipt [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / agentCreateReceipt # Function: agentCreateReceipt() > **agentCreateReceipt**(`origin`, `params`): `Promise`\<[`TotemAgentCreateReceiptResponse`](../interfaces/TotemAgentCreateReceiptResponse.md)\> ## Parameters ### origin `string` ### params #### channelState? `string` #### metadata? `Record`\<`string`, `unknown`\> #### proposalId `string` #### rejectionReason? `string` #### status `"approved"` \| `"rejected"` \| `"pending_user"` #### txpowId? `string` ## Returns `Promise`\<[`TotemAgentCreateReceiptResponse`](../interfaces/TotemAgentCreateReceiptResponse.md)\> --- ## Page: agentExplainTransaction URL: https://docs.totem.ing/api/totemsdk-connect/functions/agentExplainTransaction [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / agentExplainTransaction # Function: agentExplainTransaction() > **agentExplainTransaction**(`origin`, `params`): `Promise`\<[`TotemAgentExplainTransactionResponse`](../interfaces/TotemAgentExplainTransactionResponse.md)\> ## Parameters ### origin `string` ### params #### context? `Record`\<`string`, `unknown`\> #### intent? \{ `amount?`: `string`; `reason?`: `string`; `recipient?`: `string`; `tokenId?`: `string`; `type`: `"payment"` \| `"channel_update"` \| `"settlement"` \| `"lookup"` \| `"receipt"`; \} #### intent.amount? `string` #### intent.reason? `string` #### intent.recipient? `string` #### intent.tokenId? `string` #### intent.type `"payment"` \| `"channel_update"` \| `"settlement"` \| `"lookup"` \| `"receipt"` #### txpowId? `string` #### unsignedHex? `string` ## Returns `Promise`\<[`TotemAgentExplainTransactionResponse`](../interfaces/TotemAgentExplainTransactionResponse.md)\> --- ## Page: agentProposePayment URL: https://docs.totem.ing/api/totemsdk-connect/functions/agentProposePayment [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / agentProposePayment # Function: agentProposePayment() > **agentProposePayment**(`origin`, `params`): `Promise`\<[`TotemAgentProposePaymentResponse`](../interfaces/TotemAgentProposePaymentResponse.md)\> ## Parameters ### origin `string` ### params #### agentId `string` #### confidence? `number` #### explanation `string` #### intent \{ `amount?`: `string`; `metadata?`: `Record`\<`string`, `unknown`\>; `reason?`: `string`; `recipient?`: `string`; `risk?`: `"low"` \| `"medium"` \| `"high"`; `tokenId?`: `string`; `type`: `"payment"` \| `"channel_update"` \| `"settlement"` \| `"lookup"` \| `"receipt"`; \} #### intent.amount? `string` #### intent.metadata? `Record`\<`string`, `unknown`\> #### intent.reason? `string` #### intent.recipient? `string` #### intent.risk? `"low"` \| `"medium"` \| `"high"` #### intent.tokenId? `string` #### intent.type `"payment"` \| `"channel_update"` \| `"settlement"` \| `"lookup"` \| `"receipt"` ## Returns `Promise`\<[`TotemAgentProposePaymentResponse`](../interfaces/TotemAgentProposePaymentResponse.md)\> --- ## Page: broadcastHex URL: https://docs.totem.ing/api/totemsdk-connect/functions/broadcastHex [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / broadcastHex # Function: broadcastHex() > **broadcastHex**(`origin`, `params`): `Promise`\<[`TotemBroadcastHexResponse`](../type-aliases/TotemBroadcastHexResponse.md)\> ## Parameters ### origin `string` ### params #### expectedDigestTx? `string` #### signedHex `string` ## Returns `Promise`\<[`TotemBroadcastHexResponse`](../type-aliases/TotemBroadcastHexResponse.md)\> --- ## Page: broadcastTxPoW URL: https://docs.totem.ing/api/totemsdk-connect/functions/broadcastTxPoW [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / broadcastTxPoW # Function: broadcastTxPoW() > **broadcastTxPoW**(`origin`, `params`): `Promise`\<[`TotemBroadcastTxPoWResponse`](../interfaces/TotemBroadcastTxPoWResponse.md)\> ## Parameters ### origin `string` ### params #### expectedTxpowId? `string` #### minedHex `string` ## Returns `Promise`\<[`TotemBroadcastTxPoWResponse`](../interfaces/TotemBroadcastTxPoWResponse.md)\> --- ## Page: clearActiveProvider URL: https://docs.totem.ing/api/totemsdk-connect/functions/clearActiveProvider [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / clearActiveProvider # Function: clearActiveProvider() > **clearActiveProvider**(): `void` ## Returns `void` --- ## Page: clearAgentPolicy URL: https://docs.totem.ing/api/totemsdk-connect/functions/clearAgentPolicy [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / clearAgentPolicy # Function: clearAgentPolicy() > **clearAgentPolicy**(): `void` ## Returns `void` --- ## Page: connect URL: https://docs.totem.ing/api/totemsdk-connect/functions/connect [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / connect # Function: connect() > **connect**(`origin`): `Promise`\<[`TotemConnectResponse`](../interfaces/TotemConnectResponse.md)\> ## Parameters ### origin `string` ## Returns `Promise`\<[`TotemConnectResponse`](../interfaces/TotemConnectResponse.md)\> --- ## Page: createPaymentRequest URL: https://docs.totem.ing/api/totemsdk-connect/functions/createPaymentRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / createPaymentRequest # Function: createPaymentRequest() > **createPaymentRequest**(`origin`, `params`): `Promise`\<[`TotemCreatePaymentRequestResponse`](../interfaces/TotemCreatePaymentRequestResponse.md)\> ## Parameters ### origin `string` ### params #### amount `string` #### description? `string` #### expiryMs? `number` #### tokenId? `string` ## Returns `Promise`\<[`TotemCreatePaymentRequestResponse`](../interfaces/TotemCreatePaymentRequestResponse.md)\> --- ## Page: getAccounts URL: https://docs.totem.ing/api/totemsdk-connect/functions/getAccounts [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / getAccounts # Function: getAccounts() > **getAccounts**(`origin`): `Promise`\<[`TotemGetAccountsResponse`](../interfaces/TotemGetAccountsResponse.md)\> ## Parameters ### origin `string` ## Returns `Promise`\<[`TotemGetAccountsResponse`](../interfaces/TotemGetAccountsResponse.md)\> --- ## Page: getCapabilities URL: https://docs.totem.ing/api/totemsdk-connect/functions/getCapabilities [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / getCapabilities # Function: getCapabilities() > **getCapabilities**(): `Promise`\<[`TotemCapabilities`](../interfaces/TotemCapabilities.md)\> ## Returns `Promise`\<[`TotemCapabilities`](../interfaces/TotemCapabilities.md)\> --- ## Page: getCoins URL: https://docs.totem.ing/api/totemsdk-connect/functions/getCoins [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / getCoins # Function: getCoins() > **getCoins**(`origin`, `params?`): `Promise`\<[`TotemGetCoinsResponse`](../type-aliases/TotemGetCoinsResponse.md)\> ## Parameters ### origin `string` ### params? #### address? `string` #### minAmount? `string` #### tokenId? `string` ## Returns `Promise`\<[`TotemGetCoinsResponse`](../type-aliases/TotemGetCoinsResponse.md)\> --- ## Page: getProvider URL: https://docs.totem.ing/api/totemsdk-connect/functions/getProvider [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / getProvider # Function: getProvider() > **getProvider**(): [`TotemProvider`](../interfaces/TotemProvider.md) ## Returns [`TotemProvider`](../interfaces/TotemProvider.md) --- ## Page: getProviderStatus URL: https://docs.totem.ing/api/totemsdk-connect/functions/getProviderStatus [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / getProviderStatus # Function: getProviderStatus() > **getProviderStatus**(): `Promise`\<[`TotemProviderStatus`](../interfaces/TotemProviderStatus.md)\> ## Returns `Promise`\<[`TotemProviderStatus`](../interfaces/TotemProviderStatus.md)\> --- ## Page: getReceipt URL: https://docs.totem.ing/api/totemsdk-connect/functions/getReceipt [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / getReceipt # Function: getReceipt() > **getReceipt**(`txpowId`): `Promise`\<[`TotemGetReceiptResponse`](../interfaces/TotemGetReceiptResponse.md)\> ## Parameters ### txpowId `string` ## Returns `Promise`\<[`TotemGetReceiptResponse`](../interfaces/TotemGetReceiptResponse.md)\> --- ## Page: getTransactionStatus URL: https://docs.totem.ing/api/totemsdk-connect/functions/getTransactionStatus [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / getTransactionStatus # Function: getTransactionStatus() > **getTransactionStatus**(`txpowId`): `Promise`\<[`TotemGetTransactionStatusResponse`](../interfaces/TotemGetTransactionStatusResponse.md)\> ## Parameters ### txpowId `string` ## Returns `Promise`\<[`TotemGetTransactionStatusResponse`](../interfaces/TotemGetTransactionStatusResponse.md)\> --- ## Page: getTxPermissions URL: https://docs.totem.ing/api/totemsdk-connect/functions/getTxPermissions [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / getTxPermissions # Function: getTxPermissions() > **getTxPermissions**(): `Promise`\<[`TotemGetTxPermissionsResponse`](../type-aliases/TotemGetTxPermissionsResponse.md)\> ## Returns `Promise`\<[`TotemGetTxPermissionsResponse`](../type-aliases/TotemGetTxPermissionsResponse.md)\> --- ## Page: getWotsStatus URL: https://docs.totem.ing/api/totemsdk-connect/functions/getWotsStatus [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / getWotsStatus # Function: getWotsStatus() > **getWotsStatus**(`params?`): `Promise`\<[`TotemGetWotsStatusResponse`](../interfaces/TotemGetWotsStatusResponse.md)\> ## Parameters ### params? #### address? `string` #### addressIndex? `number` ## Returns `Promise`\<[`TotemGetWotsStatusResponse`](../interfaces/TotemGetWotsStatusResponse.md)\> --- ## Page: grantTxPermission URL: https://docs.totem.ing/api/totemsdk-connect/functions/grantTxPermission [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / grantTxPermission # Function: grantTxPermission() > **grantTxPermission**(`origin`, `config`): `Promise`\<[`TotemGrantTxPermissionResponse`](../interfaces/TotemGrantTxPermissionResponse.md)\> ## Parameters ### origin `string` ### config #### allowedIntents? [`DAppTransactionIntent`](../type-aliases/DAppTransactionIntent.md)[] #### expiresInDays? `number` #### tokenLimits? [`TokenSpendingLimit`](../interfaces/TokenSpendingLimit.md)[] ## Returns `Promise`\<[`TotemGrantTxPermissionResponse`](../interfaces/TotemGrantTxPermissionResponse.md)\> --- ## Page: isTotemInstalled URL: https://docs.totem.ing/api/totemsdk-connect/functions/isTotemInstalled [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / isTotemInstalled # Function: isTotemInstalled() > **isTotemInstalled**(): `boolean` ## Returns `boolean` --- ## Page: kissvmSimulate URL: https://docs.totem.ing/api/totemsdk-connect/functions/kissvmSimulate [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / kissvmSimulate # Function: kissvmSimulate() > **kissvmSimulate**(`params`): `Promise`\<[`TotemKissvmSimulateResponse`](../interfaces/TotemKissvmSimulateResponse.md)\> ## Parameters ### params #### script `string` #### txContext [`KissvmTxContext`](../interfaces/KissvmTxContext.md) #### witness? [`KissvmWitness`](../interfaces/KissvmWitness.md) ## Returns `Promise`\<[`TotemKissvmSimulateResponse`](../interfaces/TotemKissvmSimulateResponse.md)\> --- ## Page: kissvmValidate URL: https://docs.totem.ing/api/totemsdk-connect/functions/kissvmValidate [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / kissvmValidate # Function: kissvmValidate() > **kissvmValidate**(`script`): `Promise`\<[`TotemKissvmValidateResponse`](../interfaces/TotemKissvmValidateResponse.md)\> ## Parameters ### script `string` ## Returns `Promise`\<[`TotemKissvmValidateResponse`](../interfaces/TotemKissvmValidateResponse.md)\> --- ## Page: mineTxPoW URL: https://docs.totem.ing/api/totemsdk-connect/functions/mineTxPoW [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / mineTxPoW # Function: mineTxPoW() > **mineTxPoW**(`origin`, `params`): `Promise`\<[`TotemMineTxPoWResponse`](../interfaces/TotemMineTxPoWResponse.md)\> ## Parameters ### origin `string` ### params #### difficulty? `number` #### signedHex `string` ## Returns `Promise`\<[`TotemMineTxPoWResponse`](../interfaces/TotemMineTxPoWResponse.md)\> --- ## Page: omniaCloseChannel URL: https://docs.totem.ing/api/totemsdk-connect/functions/omniaCloseChannel [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / omniaCloseChannel # Function: omniaCloseChannel() > **omniaCloseChannel**(`origin`, `params`): `Promise`\<[`TotemOmniaCloseChannelResponse`](../interfaces/TotemOmniaCloseChannelResponse.md)\> ## Parameters ### origin `string` ### params #### channelId `string` #### force? `boolean` ## Returns `Promise`\<[`TotemOmniaCloseChannelResponse`](../interfaces/TotemOmniaCloseChannelResponse.md)\> --- ## Page: omniaCloseFactory URL: https://docs.totem.ing/api/totemsdk-connect/functions/omniaCloseFactory [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / omniaCloseFactory # Function: omniaCloseFactory() > **omniaCloseFactory**(`origin`, `factoryId`): `Promise`\<[`TotemOmniaCloseFactoryResponse`](../interfaces/TotemOmniaCloseFactoryResponse.md)\> ## Parameters ### origin `string` ### factoryId `string` ## Returns `Promise`\<[`TotemOmniaCloseFactoryResponse`](../interfaces/TotemOmniaCloseFactoryResponse.md)\> --- ## Page: omniaCreateFactory URL: https://docs.totem.ing/api/totemsdk-connect/functions/omniaCreateFactory [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / omniaCreateFactory # Function: omniaCreateFactory() > **omniaCreateFactory**(`origin`, `params`): `Promise`\<[`TotemOmniaCreateFactoryResponse`](../interfaces/TotemOmniaCreateFactoryResponse.md)\> ## Parameters ### origin `string` ### params #### amounts `string`[] #### fundingCoinIds? `string`[] #### partyIds `string`[] #### tokenId? `string` ## Returns `Promise`\<[`TotemOmniaCreateFactoryResponse`](../interfaces/TotemOmniaCreateFactoryResponse.md)\> --- ## Page: omniaGetChannels URL: https://docs.totem.ing/api/totemsdk-connect/functions/omniaGetChannels [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / omniaGetChannels # Function: omniaGetChannels() > **omniaGetChannels**(`origin`, `params?`): `Promise`\<[`TotemOmniaGetChannelsResponse`](../interfaces/TotemOmniaGetChannelsResponse.md)\> ## Parameters ### origin `string` ### params? #### status? `string` #### tokenId? `string` ## Returns `Promise`\<[`TotemOmniaGetChannelsResponse`](../interfaces/TotemOmniaGetChannelsResponse.md)\> --- ## Page: omniaGetRoute URL: https://docs.totem.ing/api/totemsdk-connect/functions/omniaGetRoute [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / omniaGetRoute # Function: omniaGetRoute() > **omniaGetRoute**(`origin`, `params`): `Promise`\<[`TotemOmniaGetRouteResponse`](../interfaces/TotemOmniaGetRouteResponse.md)\> ## Parameters ### origin `string` ### params #### amount `string` #### fromPartyId `string` #### maxHops? `number` #### targetTokenId? `string` #### tokenId `string` #### toPartyId `string` ## Returns `Promise`\<[`TotemOmniaGetRouteResponse`](../interfaces/TotemOmniaGetRouteResponse.md)\> --- ## Page: omniaGetSwapRate URL: https://docs.totem.ing/api/totemsdk-connect/functions/omniaGetSwapRate [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / omniaGetSwapRate # Function: omniaGetSwapRate() > **omniaGetSwapRate**(`origin`, `params`): `Promise`\<[`TotemOmniaGetSwapRateResponse`](../interfaces/TotemOmniaGetSwapRateResponse.md)\> ## Parameters ### origin `string` ### params #### tokenIn `string` #### tokenOut `string` ## Returns `Promise`\<[`TotemOmniaGetSwapRateResponse`](../interfaces/TotemOmniaGetSwapRateResponse.md)\> --- ## Page: omniaOpenChannel URL: https://docs.totem.ing/api/totemsdk-connect/functions/omniaOpenChannel [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / omniaOpenChannel # Function: omniaOpenChannel() > **omniaOpenChannel**(`origin`, `params`): `Promise`\<[`TotemOmniaOpenChannelResponse`](../interfaces/TotemOmniaOpenChannelResponse.md)\> ## Parameters ### origin `string` ### params #### fundingCoinId `string` #### localAmount `string` #### remoteAmount `string` #### remotePartyId `string` #### tokenId? `string` ## Returns `Promise`\<[`TotemOmniaOpenChannelResponse`](../interfaces/TotemOmniaOpenChannelResponse.md)\> --- ## Page: omniaOpenVirtualChannel URL: https://docs.totem.ing/api/totemsdk-connect/functions/omniaOpenVirtualChannel [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / omniaOpenVirtualChannel # Function: omniaOpenVirtualChannel() > **omniaOpenVirtualChannel**(`origin`, `params`): `Promise`\<[`TotemOmniaOpenVirtualChannelResponse`](../interfaces/TotemOmniaOpenVirtualChannelResponse.md)\> ## Parameters ### origin `string` ### params #### factoryId `string` #### localAmount `string` #### remoteAmount `string` #### remotePartyId `string` #### tokenId? `string` ## Returns `Promise`\<[`TotemOmniaOpenVirtualChannelResponse`](../interfaces/TotemOmniaOpenVirtualChannelResponse.md)\> --- ## Page: omniaPay URL: https://docs.totem.ing/api/totemsdk-connect/functions/omniaPay [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / omniaPay # Function: omniaPay() > **omniaPay**(`origin`, `params`): `Promise`\<[`TotemOmniaPayResponse`](../interfaces/TotemOmniaPayResponse.md)\> ## Parameters ### origin `string` ### params #### amount `string` #### channelId `string` #### memo? `string` #### tokenId? `string` ## Returns `Promise`\<[`TotemOmniaPayResponse`](../interfaces/TotemOmniaPayResponse.md)\> --- ## Page: omniaPayMultiHop URL: https://docs.totem.ing/api/totemsdk-connect/functions/omniaPayMultiHop [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / omniaPayMultiHop # Function: omniaPayMultiHop() > **omniaPayMultiHop**(`origin`, `params`): `Promise`\<[`TotemOmniaPayMultiHopResponse`](../interfaces/TotemOmniaPayMultiHopResponse.md)\> ## Parameters ### origin `string` ### params #### hashlock `string` #### route [`Route`](../interfaces/Route.md) #### timeoutBlocks? `number` ## Returns `Promise`\<[`TotemOmniaPayMultiHopResponse`](../interfaces/TotemOmniaPayMultiHopResponse.md)\> --- ## Page: omniaSettle URL: https://docs.totem.ing/api/totemsdk-connect/functions/omniaSettle [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / omniaSettle # Function: omniaSettle() > **omniaSettle**(`origin`, `channelId`): `Promise`\<[`TotemOmniaSettleResponse`](../interfaces/TotemOmniaSettleResponse.md)\> ## Parameters ### origin `string` ### channelId `string` ## Returns `Promise`\<[`TotemOmniaSettleResponse`](../interfaces/TotemOmniaSettleResponse.md)\> --- ## Page: omniaSpliceIn URL: https://docs.totem.ing/api/totemsdk-connect/functions/omniaSpliceIn [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / omniaSpliceIn # Function: omniaSpliceIn() > **omniaSpliceIn**(`origin`, `params`): `Promise`\<[`TotemOmniaSpliceInResponse`](../interfaces/TotemOmniaSpliceInResponse.md)\> ## Parameters ### origin `string` ### params #### additionalCoinId `string` #### channelId `string` #### newBalances `Record`\<`string`, `string`\> #### newTotalValue `string` ## Returns `Promise`\<[`TotemOmniaSpliceInResponse`](../interfaces/TotemOmniaSpliceInResponse.md)\> --- ## Page: omniaSpliceOut URL: https://docs.totem.ing/api/totemsdk-connect/functions/omniaSpliceOut [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / omniaSpliceOut # Function: omniaSpliceOut() > **omniaSpliceOut**(`origin`, `params`): `Promise`\<[`TotemOmniaSpliceOutResponse`](../interfaces/TotemOmniaSpliceOutResponse.md)\> ## Parameters ### origin `string` ### params #### channelId `string` #### newBalances `Record`\<`string`, `string`\> #### newTotalValue `string` #### withdrawAddress `string` #### withdrawAmount `string` ## Returns `Promise`\<[`TotemOmniaSpliceOutResponse`](../interfaces/TotemOmniaSpliceOutResponse.md)\> --- ## Page: onEvent URL: https://docs.totem.ing/api/totemsdk-connect/functions/onEvent [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / onEvent # Function: onEvent() > **onEvent**(`event`, `handler`): () => `void` ## Parameters ### event `string` ### handler (...`args`) => `void` ## Returns () => `void` --- ## Page: payPaymentRequest URL: https://docs.totem.ing/api/totemsdk-connect/functions/payPaymentRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / payPaymentRequest # Function: payPaymentRequest() > **payPaymentRequest**(`origin`, `params`): `Promise`\<[`TotemPayPaymentRequestResponse`](../interfaces/TotemPayPaymentRequestResponse.md)\> ## Parameters ### origin `string` ### params #### maxFeePercent? `number` #### paymentUri `string` ## Returns `Promise`\<[`TotemPayPaymentRequestResponse`](../interfaces/TotemPayPaymentRequestResponse.md)\> --- ## Page: releaseWotsLease URL: https://docs.totem.ing/api/totemsdk-connect/functions/releaseWotsLease [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / releaseWotsLease # Function: releaseWotsLease() > **releaseWotsLease**(`params`): `Promise`\<[`TotemReleaseWotsLeaseResponse`](../interfaces/TotemReleaseWotsLeaseResponse.md)\> ## Parameters ### params #### reason? `string` #### reservationId `string` ## Returns `Promise`\<[`TotemReleaseWotsLeaseResponse`](../interfaces/TotemReleaseWotsLeaseResponse.md)\> --- ## Page: reserveWotsLease URL: https://docs.totem.ing/api/totemsdk-connect/functions/reserveWotsLease [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / reserveWotsLease # Function: reserveWotsLease() > **reserveWotsLease**(`params?`): `Promise`\<[`TotemReserveWotsLeaseResponse`](../interfaces/TotemReserveWotsLeaseResponse.md)\> ## Parameters ### params? #### address? `string` #### addressIndex? `number` #### purpose? `string` #### ttlMs? `number` ## Returns `Promise`\<[`TotemReserveWotsLeaseResponse`](../interfaces/TotemReserveWotsLeaseResponse.md)\> --- ## Page: revokeTxPermission URL: https://docs.totem.ing/api/totemsdk-connect/functions/revokeTxPermission [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / revokeTxPermission # Function: revokeTxPermission() > **revokeTxPermission**(`origin`): `Promise`\<[`TotemRevokeTxPermissionResponse`](../interfaces/TotemRevokeTxPermissionResponse.md)\> ## Parameters ### origin `string` ## Returns `Promise`\<[`TotemRevokeTxPermissionResponse`](../interfaces/TotemRevokeTxPermissionResponse.md)\> --- ## Page: sendComplex URL: https://docs.totem.ing/api/totemsdk-connect/functions/sendComplex [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / sendComplex # Function: sendComplex() ## Call Signature > **sendComplex**(`origin`, `buildParams`, `mode?`): `Promise`\<[`TotemSendComplexBuildResponse`](../interfaces/TotemSendComplexBuildResponse.md)\> ### Parameters #### origin `string` #### buildParams [`EnhancedBuildParams`](../interfaces/EnhancedBuildParams.md) #### mode? `"build"` ### Returns `Promise`\<[`TotemSendComplexBuildResponse`](../interfaces/TotemSendComplexBuildResponse.md)\> ## Call Signature > **sendComplex**(`origin`, `buildParams`, `mode`): `Promise`\<[`TotemSendComplexSubmitResponse`](../interfaces/TotemSendComplexSubmitResponse.md)\> ### Parameters #### origin `string` #### buildParams [`EnhancedBuildParams`](../interfaces/EnhancedBuildParams.md) #### mode `"submit"` ### Returns `Promise`\<[`TotemSendComplexSubmitResponse`](../interfaces/TotemSendComplexSubmitResponse.md)\> ## Call Signature > **sendComplex**(`origin`, `buildParams`, `mode?`): `Promise`\<[`TotemSendComplexBuildResponse`](../interfaces/TotemSendComplexBuildResponse.md) \| [`TotemSendComplexSubmitResponse`](../interfaces/TotemSendComplexSubmitResponse.md)\> ### Parameters #### origin `string` #### buildParams [`EnhancedBuildParams`](../interfaces/EnhancedBuildParams.md) #### mode? `"build"` \| `"submit"` ### Returns `Promise`\<[`TotemSendComplexBuildResponse`](../interfaces/TotemSendComplexBuildResponse.md) \| [`TotemSendComplexSubmitResponse`](../interfaces/TotemSendComplexSubmitResponse.md)\> --- ## Page: sendTransaction URL: https://docs.totem.ing/api/totemsdk-connect/functions/sendTransaction [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / sendTransaction # Function: sendTransaction() > **sendTransaction**(`origin`, `request`): `Promise`\<[`TotemSendTransactionResponse`](../type-aliases/TotemSendTransactionResponse.md)\> ## Parameters ### origin `string` ### request #### intent? [`DAppTransactionIntent`](../type-aliases/DAppTransactionIntent.md) #### outputs `object`[] #### version `1` ## Returns `Promise`\<[`TotemSendTransactionResponse`](../type-aliases/TotemSendTransactionResponse.md)\> --- ## Page: setActiveProvider URL: https://docs.totem.ing/api/totemsdk-connect/functions/setActiveProvider [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / setActiveProvider # Function: setActiveProvider() > **setActiveProvider**(`provider`): `void` ## Parameters ### provider [`TotemProvider`](../interfaces/TotemProvider.md) ## Returns `void` --- ## Page: setAgentPolicy URL: https://docs.totem.ing/api/totemsdk-connect/functions/setAgentPolicy [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / setAgentPolicy # Function: setAgentPolicy() > **setAgentPolicy**(`policy`): `void` ## Parameters ### policy \{ `evaluate`: `Promise`\<\{ `outcome`: `string`; `reason`: `string`; \}\>; \} \| `null` ## Returns `void` --- ## Page: setChainProvider URL: https://docs.totem.ing/api/totemsdk-connect/functions/setChainProvider [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / setChainProvider # Function: setChainProvider() > **setChainProvider**(`params`): `Promise`\<[`TotemSetChainProviderResponse`](../interfaces/TotemSetChainProviderResponse.md)\> ## Parameters ### params #### providerType `"hosted"` \| `"pure_rpc"` \| `"hybrid"` #### rpcEndpoint? `string` ## Returns `Promise`\<[`TotemSetChainProviderResponse`](../interfaces/TotemSetChainProviderResponse.md)\> --- ## Page: signData URL: https://docs.totem.ing/api/totemsdk-connect/functions/signData [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / signData # Function: signData() > **signData**(`origin`, `params`): `Promise`\<[`TotemSignDataResponse`](../type-aliases/TotemSignDataResponse.md)\> ## Parameters ### origin `string` ### params #### inputAddresses `string`[] #### inputIndices? `number`[] #### returnFormat? `"hex"` \| `"json"` #### unsignedHex `string` ## Returns `Promise`\<[`TotemSignDataResponse`](../type-aliases/TotemSignDataResponse.md)\> --- ## Page: signTransaction URL: https://docs.totem.ing/api/totemsdk-connect/functions/signTransaction [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / signTransaction # Function: signTransaction() > **signTransaction**(`origin`, `params`): `Promise`\<[`TotemSignTransactionResponse`](../interfaces/TotemSignTransactionResponse.md)\> ## Parameters ### origin `string` ### params #### inputAddresses `string`[] #### inputIndices? `number`[] #### returnFormat? `"hex"` \| `"json"` #### unsignedHex `string` ## Returns `Promise`\<[`TotemSignTransactionResponse`](../interfaces/TotemSignTransactionResponse.md)\> --- ## Page: statechainClaim URL: https://docs.totem.ing/api/totemsdk-connect/functions/statechainClaim [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / statechainClaim # Function: statechainClaim() > **statechainClaim**(`origin`, `params`): `Promise`\<[`TotemStatechainClaimResponse`](../interfaces/TotemStatechainClaimResponse.md)\> ## Parameters ### origin `string` ### params #### chainId `string` #### claimAddress `string` #### cooperative? `boolean` ## Returns `Promise`\<[`TotemStatechainClaimResponse`](../interfaces/TotemStatechainClaimResponse.md)\> --- ## Page: statechainCreate URL: https://docs.totem.ing/api/totemsdk-connect/functions/statechainCreate [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / statechainCreate # Function: statechainCreate() > **statechainCreate**(`origin`, `params`): `Promise`\<[`TotemStatechainCreateResponse`](../interfaces/TotemStatechainCreateResponse.md)\> ## Parameters ### origin `string` ### params #### coinId `string` #### ownerPublicKeyDigest `string` #### reclaimTimelock? `number` #### seEndpoint `string` ## Returns `Promise`\<[`TotemStatechainCreateResponse`](../interfaces/TotemStatechainCreateResponse.md)\> --- ## Page: statechainTransfer URL: https://docs.totem.ing/api/totemsdk-connect/functions/statechainTransfer [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / statechainTransfer # Function: statechainTransfer() > **statechainTransfer**(`origin`, `params`): `Promise`\<[`TotemStatechainTransferResponse`](../interfaces/TotemStatechainTransferResponse.md)\> ## Parameters ### origin `string` ### params #### chainId `string` #### newOwnerPublicKeyDigest `string` ## Returns `Promise`\<[`TotemStatechainTransferResponse`](../interfaces/TotemStatechainTransferResponse.md)\> --- ## Page: statechainVerify URL: https://docs.totem.ing/api/totemsdk-connect/functions/statechainVerify [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / statechainVerify # Function: statechainVerify() > **statechainVerify**(`origin`, `params`): `Promise`\<[`TotemStatechainVerifyResponse`](../interfaces/TotemStatechainVerifyResponse.md)\> ## Parameters ### origin `string` ### params #### chainId `string` #### transferHistory [`StatechainTransferEntry`](../interfaces/StatechainTransferEntry.md)[] ## Returns `Promise`\<[`TotemStatechainVerifyResponse`](../interfaces/TotemStatechainVerifyResponse.md)\> --- ## Page: verify URL: https://docs.totem.ing/api/totemsdk-connect/functions/verify [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / verify # Function: verify() > **verify**(`origin`, `challenge?`): `Promise`\<[`TotemVerifyResponse`](../interfaces/TotemVerifyResponse.md)\> ## Parameters ### origin `string` ### challenge? #### expiryMs? `number` #### nonce? `string` #### statement? `string` ## Returns `Promise`\<[`TotemVerifyResponse`](../interfaces/TotemVerifyResponse.md)\> --- ## Page: DiscoveredWallet URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/DiscoveredWallet [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / DiscoveredWallet # Interface: DiscoveredWallet ## Properties ### info > **info**: [`TotemWalletInfo`](TotemWalletInfo.md) *** ### provider > **provider**: [`TotemProvider`](TotemProvider.md) --- ## Page: EnhancedBuildParams URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/EnhancedBuildParams [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / EnhancedBuildParams # Interface: EnhancedBuildParams ## Properties ### inputs > **inputs**: `object`[] #### address > **address**: `string` #### amount > **amount**: `string` #### coinId > **coinId**: `string` #### scriptDescriptor > **scriptDescriptor**: [`InputScriptDescriptor`](InputScriptDescriptor.md) #### tokenId? > `optional` **tokenId?**: `string` *** ### linkHash? > `optional` **linkHash?**: `string` *** ### outputs > **outputs**: `object`[] #### address > **address**: `string` #### amount > **amount**: `string` #### state? > `optional` **state?**: [`StateVariable`](StateVariable.md)[] #### tokenId? > `optional` **tokenId?**: `string` *** ### transactionState? > `optional` **transactionState?**: [`StateVariable`](StateVariable.md)[] --- ## Page: InputCoinProof URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/InputCoinProof [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / InputCoinProof # Interface: InputCoinProof ## Properties ### address > **address**: `string` *** ### amount > **amount**: `string` *** ### coinId > **coinId**: `string` *** ### proof > **proof**: `object` \| `null` *** ### tokenId > **tokenId**: `string` --- ## Page: InputScriptDescriptor URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/InputScriptDescriptor [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / InputScriptDescriptor # Interface: InputScriptDescriptor ## Properties ### externalSignatures? > `optional` **externalSignatures?**: `object`[] *** ### extraScripts? > `optional` **extraScripts?**: `object` *** ### htlcHash? > `optional` **htlcHash?**: `string` *** ### htlcPreimage? > `optional` **htlcPreimage?**: `string` *** ### mastProof? > `optional` **mastProof?**: `object` *** ### multisigKeys? > `optional` **multisigKeys?**: `string`[] *** ### multisigThreshold? > `optional` **multisigThreshold?**: `number` *** ### script > **script**: `string` *** ### scriptType > **scriptType**: [`ScriptType`](../type-aliases/ScriptType.md) *** ### stateVariables? > `optional` **stateVariables?**: [`StateVariable`](StateVariable.md)[] *** ### storeState? > `optional` **storeState?**: `boolean` *** ### timelockBlock? > `optional` **timelockBlock?**: `bigint` *** ### verifyOutExpectations? > `optional` **verifyOutExpectations?**: `object`[] #### amount > **amount**: `string` #### inputIndex > **inputIndex**: `string` #### keepState > **keepState**: `boolean` #### outputAddress > **outputAddress**: `string` #### tokenId > **tokenId**: `string` *** ### wotsRootPublicKey? > `optional` **wotsRootPublicKey?**: `string` --- ## Page: KissvmCoinData URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/KissvmCoinData [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / KissvmCoinData # Interface: KissvmCoinData ## Properties ### address > **address**: `string` *** ### amount > **amount**: `number` *** ### coinCreatedBlock? > `optional` **coinCreatedBlock?**: `number` *** ### coinId > **coinId**: `string` *** ### scriptHash? > `optional` **scriptHash?**: `string` *** ### tokenId > **tokenId**: `string` --- ## Page: KissvmOutputData URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/KissvmOutputData [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / KissvmOutputData # Interface: KissvmOutputData ## Properties ### address > **address**: `string` *** ### amount > **amount**: `number` *** ### keepState > **keepState**: `boolean` *** ### tokenId > **tokenId**: `string` --- ## Page: KissvmTxContext URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/KissvmTxContext [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / KissvmTxContext # Interface: KissvmTxContext ## Properties ### block > **block**: `number` *** ### inputIndex > **inputIndex**: `number` *** ### inputs > **inputs**: [`KissvmCoinData`](KissvmCoinData.md)[] *** ### outputs > **outputs**: [`KissvmOutputData`](KissvmOutputData.md)[] *** ### prevState > **prevState**: `Record`\<`number`, `string`\> *** ### simulationMode? > `optional` **simulationMode?**: `boolean` *** ### state > **state**: `Record`\<`number`, `string`\> *** ### txDigest? > `optional` **txDigest?**: `string` --- ## Page: KissvmWitness URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/KissvmWitness [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / KissvmWitness # Interface: KissvmWitness ## Properties ### preimages? > `optional` **preimages?**: `Record`\<`string`, `string`\> *** ### signatures > **signatures**: `Record`\<`string`, `string`\> --- ## Page: OmniaChannelSummary URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/OmniaChannelSummary [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / OmniaChannelSummary # Interface: OmniaChannelSummary ## Properties ### channelId > **channelId**: `string` *** ### currentSequence > **currentSequence**: `number` *** ### localBalance > **localBalance**: `string` *** ### remoteBalance > **remoteBalance**: `string` *** ### status > **status**: `string` *** ### tokenId > **tokenId**: `string` *** ### totalValue > **totalValue**: `string` --- ## Page: ResponseScriptDescriptor URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/ResponseScriptDescriptor [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / ResponseScriptDescriptor # Interface: ResponseScriptDescriptor ## Properties ### branchScript? > `optional` **branchScript?**: `string` *** ### extraScripts? > `optional` **extraScripts?**: `string`[] *** ### proofPath? > `optional` **proofPath?**: `string`[] *** ### requiredSignatures? > `optional` **requiredSignatures?**: `number` *** ### root? > `optional` **root?**: `string` *** ### script > **script**: `string` *** ### scriptType > **scriptType**: `string` *** ### signerKeys? > `optional` **signerKeys?**: `string`[] *** ### totalSigners? > `optional` **totalSigners?**: `number` --- ## Page: Route URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/Route [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / Route # Interface: Route ## Properties ### estimatedBlocks > **estimatedBlocks**: `number` *** ### hops > **hops**: ([`RoutingHop`](RoutingHop.md) \| [`SwapHop`](SwapHop.md))[] *** ### tokenIn > **tokenIn**: `string` *** ### tokenOut > **tokenOut**: `string` *** ### totalFees > **totalFees**: `string` --- ## Page: RoutingHop URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/RoutingHop [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / RoutingHop # Interface: RoutingHop ## Extended by - [`SwapHop`](SwapHop.md) ## Properties ### amount > **amount**: `string` *** ### channelId > **channelId**: `string` *** ### from > **from**: `string` *** ### htlcId? > `optional` **htlcId?**: `string` *** ### to > **to**: `string` *** ### tokenId > **tokenId**: `string` --- ## Page: SitePermissionEntry URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/SitePermissionEntry [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / SitePermissionEntry # Interface: SitePermissionEntry ## Properties ### address > **address**: `string` *** ### origin > **origin**: `string` *** ### permissions > **permissions**: `object` #### allowedIntents > **allowedIntents**: [`DAppTransactionIntent`](../type-aliases/DAppTransactionIntent.md)[] #### expiresAt > **expiresAt**: `number` #### grantedAt > **grantedAt**: `number` #### lastTransactionAt? > `optional` **lastTransactionAt?**: `number` #### tokenLimits > **tokenLimits**: [`TokenSpendingLimit`](TokenSpendingLimit.md)[] #### totalTransactions > **totalTransactions**: `number` --- ## Page: StateVariable URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/StateVariable [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / StateVariable # Interface: StateVariable ## Properties ### port > **port**: `number` *** ### type? > `optional` **type?**: [`StateVariableType`](../type-aliases/StateVariableType.md) *** ### value > **value**: `string` --- ## Page: StatechainTransferEntry URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/StatechainTransferEntry [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / StatechainTransferEntry # Interface: StatechainTransferEntry ## Properties ### blindedSignature > **blindedSignature**: `string` *** ### from > **from**: `string` *** ### fromPublicKeyDigest > **fromPublicKeyDigest**: `string` *** ### ownerSignature > **ownerSignature**: `string` *** ### signedDigest > **signedDigest**: `string` *** ### timestamp > **timestamp**: `number` *** ### to > **to**: `string` *** ### toPublicKeyDigest > **toPublicKeyDigest**: `string` *** ### txBodyHex > **txBodyHex**: `string` *** ### txHex > **txHex**: `string` --- ## Page: SwapAnnouncement URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/SwapAnnouncement [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / SwapAnnouncement # Interface: SwapAnnouncement ## Properties ### inboundChannelId > **inboundChannelId**: `string` *** ### intermediaryPubKey > **intermediaryPubKey**: `string` *** ### maxAmountIn > **maxAmountIn**: `string` *** ### outboundChannelId > **outboundChannelId**: `string` *** ### rate > **rate**: `string` *** ### tokenIn > **tokenIn**: `string` *** ### tokenOut > **tokenOut**: `string` --- ## Page: SwapHop URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/SwapHop [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / SwapHop # Interface: SwapHop ## Extends - [`RoutingHop`](RoutingHop.md) ## Properties ### amount > **amount**: `string` #### Inherited from [`RoutingHop`](RoutingHop.md).[`amount`](RoutingHop.md#amount) *** ### amountIn > **amountIn**: `string` *** ### amountOut > **amountOut**: `string` *** ### channelId > **channelId**: `string` #### Inherited from [`RoutingHop`](RoutingHop.md).[`channelId`](RoutingHop.md#channelid) *** ### from > **from**: `string` #### Inherited from [`RoutingHop`](RoutingHop.md).[`from`](RoutingHop.md#from) *** ### htlcId? > `optional` **htlcId?**: `string` #### Inherited from [`RoutingHop`](RoutingHop.md).[`htlcId`](RoutingHop.md#htlcid) *** ### inboundChannelId > **inboundChannelId**: `string` *** ### isSwap > **isSwap**: `true` *** ### outboundChannelId > **outboundChannelId**: `string` *** ### rate > **rate**: `string` *** ### to > **to**: `string` #### Inherited from [`RoutingHop`](RoutingHop.md).[`to`](RoutingHop.md#to) *** ### tokenId > **tokenId**: `string` #### Inherited from [`RoutingHop`](RoutingHop.md).[`tokenId`](RoutingHop.md#tokenid) *** ### tokenIn > **tokenIn**: `string` *** ### tokenOut > **tokenOut**: `string` --- ## Page: TokenSpendingLimit URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TokenSpendingLimit [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TokenSpendingLimit # Interface: TokenSpendingLimit ## Properties ### maxAmountPerTx > **maxAmountPerTx**: `string` *** ### maxDailyAmount > **maxDailyAmount**: `string` *** ### tokenId > **tokenId**: `string` *** ### tokenSymbol > **tokenSymbol**: `string` --- ## Page: TotemAgentCreateReceiptRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemAgentCreateReceiptRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemAgentCreateReceiptRequest # Interface: TotemAgentCreateReceiptRequest ## Properties ### method > **method**: `"totem_agentCreateReceipt"` *** ### params > **params**: `object` #### channelState? > `optional` **channelState?**: `string` #### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> #### origin > **origin**: `string` #### proposalId > **proposalId**: `string` #### rejectionReason? > `optional` **rejectionReason?**: `string` #### status > **status**: `"approved"` \| `"rejected"` \| `"pending_user"` #### txpowId? > `optional` **txpowId?**: `string` --- ## Page: TotemAgentCreateReceiptResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemAgentCreateReceiptResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemAgentCreateReceiptResponse # Interface: TotemAgentCreateReceiptResponse ## Properties ### error? > `optional` **error?**: `string` *** ### errorCode? > `optional` **errorCode?**: `string` *** ### receiptId? > `optional` **receiptId?**: `string` *** ### receiptUri? > `optional` **receiptUri?**: `string` *** ### success > **success**: `boolean` --- ## Page: TotemAgentExplainTransactionRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemAgentExplainTransactionRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemAgentExplainTransactionRequest # Interface: TotemAgentExplainTransactionRequest ## Properties ### method > **method**: `"totem_agentExplainTransaction"` *** ### params > **params**: `object` #### context? > `optional` **context?**: `Record`\<`string`, `unknown`\> #### intent? > `optional` **intent?**: `object` ##### intent.amount? > `optional` **amount?**: `string` ##### intent.reason? > `optional` **reason?**: `string` ##### intent.recipient? > `optional` **recipient?**: `string` ##### intent.tokenId? > `optional` **tokenId?**: `string` ##### intent.type > **type**: `"payment"` \| `"channel_update"` \| `"settlement"` \| `"lookup"` \| `"receipt"` #### origin > **origin**: `string` #### txpowId? > `optional` **txpowId?**: `string` #### unsignedHex? > `optional` **unsignedHex?**: `string` --- ## Page: TotemAgentExplainTransactionResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemAgentExplainTransactionResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemAgentExplainTransactionResponse # Interface: TotemAgentExplainTransactionResponse ## Properties ### error? > `optional` **error?**: `string` *** ### errorCode? > `optional` **errorCode?**: `string` *** ### explanation > **explanation**: `string` *** ### riskLevel? > `optional` **riskLevel?**: `"low"` \| `"medium"` \| `"high"` *** ### success > **success**: `boolean` *** ### warnings? > `optional` **warnings?**: `string`[] --- ## Page: TotemAgentProposePaymentRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemAgentProposePaymentRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemAgentProposePaymentRequest # Interface: TotemAgentProposePaymentRequest ## Properties ### method > **method**: `"totem_agentProposePayment"` *** ### params > **params**: `object` #### agentId > **agentId**: `string` Agent identifier — opaque string chosen by the agent. #### confidence? > `optional` **confidence?**: `number` Agent's confidence (0–1). #### explanation > **explanation**: `string` Human-readable explanation shown to the user. #### intent > **intent**: `object` The intent this proposal wants executed. ##### intent.amount? > `optional` **amount?**: `string` ##### intent.metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> ##### intent.reason? > `optional` **reason?**: `string` ##### intent.recipient? > `optional` **recipient?**: `string` ##### intent.risk? > `optional` **risk?**: `"low"` \| `"medium"` \| `"high"` ##### intent.tokenId? > `optional` **tokenId?**: `string` ##### intent.type > **type**: `"payment"` \| `"channel_update"` \| `"settlement"` \| `"lookup"` \| `"receipt"` #### origin > **origin**: `string` --- ## Page: TotemAgentProposePaymentResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemAgentProposePaymentResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemAgentProposePaymentResponse # Interface: TotemAgentProposePaymentResponse ## Properties ### error? > `optional` **error?**: `string` *** ### errorCode? > `optional` **errorCode?**: `string` *** ### proposalId? > `optional` **proposalId?**: `string` *** ### receipt? > `optional` **receipt?**: `object` Populated when approved — the receipt for the executed intent. #### channelState? > `optional` **channelState?**: `string` #### proposalId > **proposalId**: `string` #### rejectionReason? > `optional` **rejectionReason?**: `string` #### settledAt? > `optional` **settledAt?**: `number` #### status > **status**: `"approved"` \| `"rejected"` \| `"pending_user"` #### txpowId? > `optional` **txpowId?**: `string` *** ### rejectionReason? > `optional` **rejectionReason?**: `string` *** ### status? > `optional` **status?**: `"approved"` \| `"rejected"` \| `"pending_user"` *** ### success > **success**: `boolean` --- ## Page: TotemAnnounceDetail URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemAnnounceDetail [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemAnnounceDetail # Interface: TotemAnnounceDetail ## Properties ### info > **info**: [`TotemWalletInfo`](TotemWalletInfo.md) *** ### provider > **provider**: [`TotemProvider`](TotemProvider.md) --- ## Page: TotemBroadcastHexErrorResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemBroadcastHexErrorResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemBroadcastHexErrorResponse # Interface: TotemBroadcastHexErrorResponse ## Properties ### error > **error**: `string` *** ### errorCode > **errorCode**: `string` *** ### requiredIntent? > `optional` **requiredIntent?**: `string` *** ### success > **success**: `false` --- ## Page: TotemBroadcastHexRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemBroadcastHexRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemBroadcastHexRequest # Interface: TotemBroadcastHexRequest ## Properties ### method > **method**: `"TOTEM_BROADCAST_HEX"` *** ### params > **params**: `object` #### expectedDigestTx? > `optional` **expectedDigestTx?**: `string` #### origin > **origin**: `string` #### signedHex > **signedHex**: `string` --- ## Page: TotemBroadcastHexSuccessResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemBroadcastHexSuccessResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemBroadcastHexSuccessResponse # Interface: TotemBroadcastHexSuccessResponse ## Properties ### success > **success**: `true` *** ### txpowid > **txpowid**: `string` --- ## Page: TotemBroadcastTxPoWRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemBroadcastTxPoWRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemBroadcastTxPoWRequest # Interface: TotemBroadcastTxPoWRequest ## Properties ### method > **method**: `"totem_broadcastTxPoW"` *** ### params > **params**: `object` #### expectedTxpowId? > `optional` **expectedTxpowId?**: `string` #### minedHex > **minedHex**: `string` #### origin > **origin**: `string` --- ## Page: TotemBroadcastTxPoWResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemBroadcastTxPoWResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemBroadcastTxPoWResponse # Interface: TotemBroadcastTxPoWResponse ## Properties ### error? > `optional` **error?**: `string` *** ### errorCode? > `optional` **errorCode?**: `string` *** ### status? > `optional` **status?**: `"submitted"` *** ### success > **success**: `boolean` *** ### txpowId? > `optional` **txpowId?**: `string` --- ## Page: TotemCapabilities URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemCapabilities [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemCapabilities # Interface: TotemCapabilities ## Properties ### account > **account**: `object` #### accountSwitcher > **accountSwitcher**: `boolean` #### multiAddress > **multiAddress**: `boolean` *** ### chain > **chain**: `object` #### hostedProvider > **hostedProvider**: `boolean` #### hyperswarm > **hyperswarm**: `boolean` #### localProofVerify > **localProofVerify**: `boolean` #### lookupNode > **lookupNode**: `boolean` #### pearRuntime > **pearRuntime**: `boolean` #### pureMinimaRpc > **pureMinimaRpc**: `boolean` *** ### omnia > **omnia**: `object` #### channels > **channels**: `boolean` #### crossTokenSwap > **crossTokenSwap**: `boolean` #### factory > **factory**: `boolean` #### hyperswarm > **hyperswarm**: `boolean` #### multiHop > **multiHop**: `boolean` #### routing > **routing**: `boolean` #### splicing > **splicing**: `boolean` #### virtualChannels > **virtualChannels**: `boolean` *** ### qvac > **qvac**: `object` #### explanations > **explanations**: `boolean` #### paymentIntents > **paymentIntents**: `boolean` *** ### scripting > **scripting**: `object` #### kissvm > **kissvm**: `boolean` *** ### statechain > **statechain**: `object` #### blindSE > **blindSE**: `boolean` #### supported > **supported**: `boolean` *** ### txpow > **txpow**: `object` #### localMining > **localMining**: `boolean` #### progressEvents > **progressEvents**: `boolean` *** ### version > **version**: `string` *** ### wallet > **wallet**: `object` #### custodyType > **custodyType**: `"hosted"` \| `"hybrid"` \| `"self"` #### maxAddresses > **maxAddresses**: `number` \| `null` #### rootIdentity > **rootIdentity**: `boolean` #### seedExport > **seedExport**: `boolean` #### selfCustody > **selfCustody**: `boolean` #### treeKeyDepth > **treeKeyDepth**: `number` \| `null` #### wotsTreeKey > **wotsTreeKey**: `boolean` --- ## Page: TotemConnectRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemConnectRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemConnectRequest # Interface: TotemConnectRequest ## Properties ### method > **method**: `"TOTEM_CONNECT"` *** ### params > **params**: `object` #### origin > **origin**: `string` --- ## Page: TotemConnectResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemConnectResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemConnectResponse # Interface: TotemConnectResponse ## Properties ### address > **address**: `string` *** ### addressIndex > **addressIndex**: `number` *** ### connected > **connected**: `true` *** ### isReconnect? > `optional` **isReconnect?**: `boolean` *** ### publicKey > **publicKey**: `string` \| `null` --- ## Page: TotemCreatePaymentRequestRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemCreatePaymentRequestRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemCreatePaymentRequestRequest # Interface: TotemCreatePaymentRequestRequest ## Properties ### method > **method**: `"totem_createPaymentRequest"` *** ### params > **params**: `object` #### amount > **amount**: `string` #### description? > `optional` **description?**: `string` #### expiryMs? > `optional` **expiryMs?**: `number` #### origin > **origin**: `string` #### tokenId? > `optional` **tokenId?**: `string` --- ## Page: TotemCreatePaymentRequestResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemCreatePaymentRequestResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemCreatePaymentRequestResponse # Interface: TotemCreatePaymentRequestResponse ## Properties ### error? > `optional` **error?**: `string` *** ### errorCode? > `optional` **errorCode?**: `string` *** ### expiresAt? > `optional` **expiresAt?**: `number` *** ### hashlock? > `optional` **hashlock?**: `string` *** ### paymentUri? > `optional` **paymentUri?**: `string` *** ### requestId? > `optional` **requestId?**: `string` *** ### success > **success**: `boolean` --- ## Page: TotemGetAccountsRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemGetAccountsRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemGetAccountsRequest # Interface: TotemGetAccountsRequest ## Properties ### method > **method**: `"TOTEM_GET_ACCOUNTS"` *** ### params > **params**: `object` #### origin > **origin**: `string` --- ## Page: TotemGetAccountsResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemGetAccountsResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemGetAccountsResponse # Interface: TotemGetAccountsResponse ## Properties ### accounts > **accounts**: `object`[] #### address > **address**: `string` #### balance > **balance**: `string` #### index > **index**: `number` --- ## Page: TotemGetCapabilitiesRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemGetCapabilitiesRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemGetCapabilitiesRequest # Interface: TotemGetCapabilitiesRequest ## Properties ### method > **method**: `"totem_getCapabilities"` *** ### params? > `optional` **params?**: `Record`\<`string`, `never`\> --- ## Page: TotemGetCoinsErrorResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemGetCoinsErrorResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemGetCoinsErrorResponse # Interface: TotemGetCoinsErrorResponse ## Properties ### error > **error**: `string` *** ### errorCode > **errorCode**: `string` *** ### requiredIntent? > `optional` **requiredIntent?**: `string` *** ### success > **success**: `false` --- ## Page: TotemGetCoinsRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemGetCoinsRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemGetCoinsRequest # Interface: TotemGetCoinsRequest ## Properties ### method > **method**: `"TOTEM_GET_COINS"` *** ### params > **params**: `object` #### address? > `optional` **address?**: `string` #### minAmount? > `optional` **minAmount?**: `string` #### origin > **origin**: `string` #### tokenId? > `optional` **tokenId?**: `string` --- ## Page: TotemGetCoinsSuccessResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemGetCoinsSuccessResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemGetCoinsSuccessResponse # Interface: TotemGetCoinsSuccessResponse ## Properties ### coins > **coins**: `object`[] #### address > **address**: `string` #### amount > **amount**: `string` #### coinId > **coinId**: `string` #### created > **created**: `string` #### tokenId > **tokenId**: `string` *** ### queriedAddresses > **queriedAddresses**: `number` *** ### success > **success**: `true` *** ### tokenId > **tokenId**: `string` *** ### totalCoins > **totalCoins**: `number` --- ## Page: TotemGetProviderStatusRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemGetProviderStatusRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemGetProviderStatusRequest # Interface: TotemGetProviderStatusRequest ## Properties ### method > **method**: `"totem_getProviderStatus"` *** ### params? > `optional` **params?**: `Record`\<`string`, `never`\> --- ## Page: TotemGetReceiptRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemGetReceiptRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemGetReceiptRequest # Interface: TotemGetReceiptRequest ## Properties ### method > **method**: `"totem_getReceipt"` *** ### params > **params**: `object` #### txpowId > **txpowId**: `string` --- ## Page: TotemGetReceiptResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemGetReceiptResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemGetReceiptResponse # Interface: TotemGetReceiptResponse ## Properties ### amount > **amount**: `string` *** ### blockNumber? > `optional` **blockNumber?**: `number` *** ### description? > `optional` **description?**: `string` *** ### from > **from**: `string` *** ### timestamp > **timestamp**: `number` *** ### to > **to**: `string` *** ### tokenId > **tokenId**: `string` *** ### txpowId > **txpowId**: `string` --- ## Page: TotemGetTransactionStatusRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemGetTransactionStatusRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemGetTransactionStatusRequest # Interface: TotemGetTransactionStatusRequest ## Properties ### method > **method**: `"totem_getTransactionStatus"` *** ### params > **params**: `object` #### txpowId > **txpowId**: `string` --- ## Page: TotemGetTransactionStatusResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemGetTransactionStatusResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemGetTransactionStatusResponse # Interface: TotemGetTransactionStatusResponse ## Properties ### blockNumber? > `optional` **blockNumber?**: `number` *** ### confirmedAt? > `optional` **confirmedAt?**: `number` *** ### status > **status**: `"pending"` \| `"failed"` \| `"confirmed"` \| `"unknown"` *** ### txpowId > **txpowId**: `string` --- ## Page: TotemGetTxPermissionsRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemGetTxPermissionsRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemGetTxPermissionsRequest # Interface: TotemGetTxPermissionsRequest ## Properties ### method > **method**: `"TOTEM_GET_TX_PERMISSIONS"` *** ### params > **params**: `object` --- ## Page: TotemGetWotsStatusRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemGetWotsStatusRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemGetWotsStatusRequest # Interface: TotemGetWotsStatusRequest ## Properties ### method > **method**: `"totem_getWotsStatus"` *** ### params > **params**: `object` #### address? > `optional` **address?**: `string` #### addressIndex? > `optional` **addressIndex?**: `number` --- ## Page: TotemGetWotsStatusResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemGetWotsStatusResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemGetWotsStatusResponse # Interface: TotemGetWotsStatusResponse ## Properties ### address > **address**: `string` *** ### addressIndex > **addressIndex**: `number` *** ### availableSlots > **availableSlots**: `number` *** ### nearExhaustion > **nearExhaustion**: `boolean` *** ### totalSlots > **totalSlots**: `number` *** ### usedSlots > **usedSlots**: `number` --- ## Page: TotemGrantTxPermissionRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemGrantTxPermissionRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemGrantTxPermissionRequest # Interface: TotemGrantTxPermissionRequest ## Properties ### method > **method**: `"TOTEM_GRANT_TX_PERMISSION"` *** ### params > **params**: `object` #### config > **config**: `object` ##### config.allowedIntents? > `optional` **allowedIntents?**: [`DAppTransactionIntent`](../type-aliases/DAppTransactionIntent.md)[] ##### config.expiresInDays? > `optional` **expiresInDays?**: `number` ##### config.tokenLimits? > `optional` **tokenLimits?**: [`TokenSpendingLimit`](TokenSpendingLimit.md)[] #### origin > **origin**: `string` --- ## Page: TotemGrantTxPermissionResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemGrantTxPermissionResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemGrantTxPermissionResponse # Interface: TotemGrantTxPermissionResponse ## Properties ### success > **success**: `boolean` --- ## Page: TotemKissvmSimulateRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemKissvmSimulateRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemKissvmSimulateRequest # Interface: TotemKissvmSimulateRequest ## Properties ### method > **method**: `"totem_kissvmSimulate"` *** ### params > **params**: `object` #### script > **script**: `string` #### txContext > **txContext**: [`KissvmTxContext`](KissvmTxContext.md) #### witness? > `optional` **witness?**: [`KissvmWitness`](KissvmWitness.md) --- ## Page: TotemKissvmSimulateResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemKissvmSimulateResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemKissvmSimulateResponse # Interface: TotemKissvmSimulateResponse ## Properties ### error? > `optional` **error?**: `string` *** ### instructionsUsed > **instructionsUsed**: `number` *** ### passed > **passed**: `boolean` *** ### trace > **trace**: `string`[] --- ## Page: TotemKissvmValidateRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemKissvmValidateRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemKissvmValidateRequest # Interface: TotemKissvmValidateRequest ## Properties ### method > **method**: `"totem_kissvmValidate"` *** ### params > **params**: `object` #### script > **script**: `string` --- ## Page: TotemKissvmValidateResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemKissvmValidateResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemKissvmValidateResponse # Interface: TotemKissvmValidateResponse ## Properties ### errors > **errors**: `object`[] #### column? > `optional` **column?**: `number` #### line? > `optional` **line?**: `number` #### message > **message**: `string` *** ### valid > **valid**: `boolean` --- ## Page: TotemMineTxPoWRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemMineTxPoWRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemMineTxPoWRequest # Interface: TotemMineTxPoWRequest ## Properties ### method > **method**: `"totem_mineTxPoW"` *** ### params > **params**: `object` #### difficulty? > `optional` **difficulty?**: `number` #### origin > **origin**: `string` #### signedHex > **signedHex**: `string` --- ## Page: TotemMineTxPoWResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemMineTxPoWResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemMineTxPoWResponse # Interface: TotemMineTxPoWResponse ## Properties ### error? > `optional` **error?**: `string` *** ### errorCode? > `optional` **errorCode?**: `string` *** ### minedHex? > `optional` **minedHex?**: `string` *** ### success > **success**: `boolean` *** ### txpowId? > `optional` **txpowId?**: `string` --- ## Page: TotemOmniaCloseChannelRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemOmniaCloseChannelRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemOmniaCloseChannelRequest # Interface: TotemOmniaCloseChannelRequest ## Properties ### method > **method**: `"totem_omniaCloseChannel"` *** ### params > **params**: `object` #### channelId > **channelId**: `string` #### force? > `optional` **force?**: `boolean` #### origin > **origin**: `string` --- ## Page: TotemOmniaCloseChannelResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemOmniaCloseChannelResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemOmniaCloseChannelResponse # Interface: TotemOmniaCloseChannelResponse ## Properties ### channelId? > `optional` **channelId?**: `string` *** ### closingTxId? > `optional` **closingTxId?**: `string` *** ### error? > `optional` **error?**: `string` *** ### errorCode? > `optional` **errorCode?**: `string` *** ### success > **success**: `boolean` --- ## Page: TotemOmniaCloseFactoryRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemOmniaCloseFactoryRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemOmniaCloseFactoryRequest # Interface: TotemOmniaCloseFactoryRequest ## Properties ### method > **method**: `"totem_omniaCloseFactory"` *** ### params > **params**: `object` #### factoryId > **factoryId**: `string` #### origin > **origin**: `string` --- ## Page: TotemOmniaCloseFactoryResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemOmniaCloseFactoryResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemOmniaCloseFactoryResponse # Interface: TotemOmniaCloseFactoryResponse ## Properties ### error? > `optional` **error?**: `string` *** ### errorCode? > `optional` **errorCode?**: `string` *** ### factoryId? > `optional` **factoryId?**: `string` *** ### finalAllocations? > `optional` **finalAllocations?**: `Record`\<`string`, `string`\> *** ### settlementTxId? > `optional` **settlementTxId?**: `string` *** ### success > **success**: `boolean` --- ## Page: TotemOmniaCreateFactoryRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemOmniaCreateFactoryRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemOmniaCreateFactoryRequest # Interface: TotemOmniaCreateFactoryRequest ## Properties ### method > **method**: `"totem_omniaCreateFactory"` *** ### params > **params**: `object` #### amounts > **amounts**: `string`[] #### fundingCoinIds? > `optional` **fundingCoinIds?**: `string`[] #### origin > **origin**: `string` #### partyIds > **partyIds**: `string`[] #### tokenId? > `optional` **tokenId?**: `string` --- ## Page: TotemOmniaCreateFactoryResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemOmniaCreateFactoryResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemOmniaCreateFactoryResponse # Interface: TotemOmniaCreateFactoryResponse ## Properties ### error? > `optional` **error?**: `string` *** ### errorCode? > `optional` **errorCode?**: `string` *** ### factoryId? > `optional` **factoryId?**: `string` *** ### fundingTxId? > `optional` **fundingTxId?**: `string` *** ### success > **success**: `boolean` --- ## Page: TotemOmniaGetChannelsRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemOmniaGetChannelsRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemOmniaGetChannelsRequest # Interface: TotemOmniaGetChannelsRequest ## Properties ### method > **method**: `"totem_omniaGetChannels"` *** ### params > **params**: `object` #### origin > **origin**: `string` #### status? > `optional` **status?**: `string` #### tokenId? > `optional` **tokenId?**: `string` --- ## Page: TotemOmniaGetChannelsResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemOmniaGetChannelsResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemOmniaGetChannelsResponse # Interface: TotemOmniaGetChannelsResponse ## Properties ### channels > **channels**: [`OmniaChannelSummary`](OmniaChannelSummary.md)[] --- ## Page: TotemOmniaGetRouteRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemOmniaGetRouteRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemOmniaGetRouteRequest # Interface: TotemOmniaGetRouteRequest ## Properties ### method > **method**: `"totem_omniaGetRoute"` *** ### params > **params**: `object` #### amount > **amount**: `string` #### fromPartyId > **fromPartyId**: `string` #### maxHops? > `optional` **maxHops?**: `number` #### origin > **origin**: `string` #### targetTokenId? > `optional` **targetTokenId?**: `string` #### tokenId > **tokenId**: `string` #### toPartyId > **toPartyId**: `string` --- ## Page: TotemOmniaGetRouteResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemOmniaGetRouteResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemOmniaGetRouteResponse # Interface: TotemOmniaGetRouteResponse ## Properties ### error? > `optional` **error?**: `string` *** ### errorCode? > `optional` **errorCode?**: `string` *** ### route? > `optional` **route?**: [`Route`](Route.md) *** ### success > **success**: `boolean` --- ## Page: TotemOmniaGetSwapRateRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemOmniaGetSwapRateRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemOmniaGetSwapRateRequest # Interface: TotemOmniaGetSwapRateRequest ## Properties ### method > **method**: `"totem_omniaGetSwapRate"` *** ### params > **params**: `object` #### origin > **origin**: `string` #### tokenIn > **tokenIn**: `string` #### tokenOut > **tokenOut**: `string` --- ## Page: TotemOmniaGetSwapRateResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemOmniaGetSwapRateResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemOmniaGetSwapRateResponse # Interface: TotemOmniaGetSwapRateResponse ## Properties ### announcements? > `optional` **announcements?**: [`SwapAnnouncement`](SwapAnnouncement.md)[] *** ### error? > `optional` **error?**: `string` *** ### errorCode? > `optional` **errorCode?**: `string` *** ### success > **success**: `boolean` --- ## Page: TotemOmniaOpenChannelRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemOmniaOpenChannelRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemOmniaOpenChannelRequest # Interface: TotemOmniaOpenChannelRequest ## Properties ### method > **method**: `"totem_omniaOpenChannel"` *** ### params > **params**: `object` #### fundingCoinId > **fundingCoinId**: `string` #### localAmount > **localAmount**: `string` #### origin > **origin**: `string` #### remoteAmount > **remoteAmount**: `string` #### remotePartyId > **remotePartyId**: `string` #### tokenId? > `optional` **tokenId?**: `string` --- ## Page: TotemOmniaOpenChannelResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemOmniaOpenChannelResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemOmniaOpenChannelResponse # Interface: TotemOmniaOpenChannelResponse ## Properties ### channelId? > `optional` **channelId?**: `string` *** ### error? > `optional` **error?**: `string` *** ### errorCode? > `optional` **errorCode?**: `string` *** ### fundingTxId? > `optional` **fundingTxId?**: `string` *** ### success > **success**: `boolean` --- ## Page: TotemOmniaOpenVirtualChannelRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemOmniaOpenVirtualChannelRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemOmniaOpenVirtualChannelRequest # Interface: TotemOmniaOpenVirtualChannelRequest ## Properties ### method > **method**: `"totem_omniaOpenVirtualChannel"` *** ### params > **params**: `object` #### factoryId > **factoryId**: `string` #### localAmount > **localAmount**: `string` #### origin > **origin**: `string` #### remoteAmount > **remoteAmount**: `string` #### remotePartyId > **remotePartyId**: `string` #### tokenId? > `optional` **tokenId?**: `string` --- ## Page: TotemOmniaOpenVirtualChannelResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemOmniaOpenVirtualChannelResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemOmniaOpenVirtualChannelResponse # Interface: TotemOmniaOpenVirtualChannelResponse ## Properties ### channelId? > `optional` **channelId?**: `string` *** ### error? > `optional` **error?**: `string` *** ### errorCode? > `optional` **errorCode?**: `string` *** ### success > **success**: `boolean` --- ## Page: TotemOmniaPayMultiHopRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemOmniaPayMultiHopRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemOmniaPayMultiHopRequest # Interface: TotemOmniaPayMultiHopRequest ## Properties ### method > **method**: `"totem_omniaPayMultiHop"` *** ### params > **params**: `object` #### hashlock > **hashlock**: `string` #### origin > **origin**: `string` #### route > **route**: [`Route`](Route.md) #### timeoutBlocks? > `optional` **timeoutBlocks?**: `number` --- ## Page: TotemOmniaPayMultiHopResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemOmniaPayMultiHopResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemOmniaPayMultiHopResponse # Interface: TotemOmniaPayMultiHopResponse ## Properties ### error? > `optional` **error?**: `string` *** ### errorCode? > `optional` **errorCode?**: `string` *** ### preimage? > `optional` **preimage?**: `string` *** ### settledHops? > `optional` **settledHops?**: `string`[] *** ### success > **success**: `boolean` --- ## Page: TotemOmniaPayRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemOmniaPayRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemOmniaPayRequest # Interface: TotemOmniaPayRequest ## Properties ### method > **method**: `"totem_omniaPay"` *** ### params > **params**: `object` #### amount > **amount**: `string` #### channelId > **channelId**: `string` #### memo? > `optional` **memo?**: `string` #### origin > **origin**: `string` #### tokenId? > `optional` **tokenId?**: `string` --- ## Page: TotemOmniaPayResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemOmniaPayResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemOmniaPayResponse # Interface: TotemOmniaPayResponse ## Properties ### channelId? > `optional` **channelId?**: `string` *** ### error? > `optional` **error?**: `string` *** ### errorCode? > `optional` **errorCode?**: `string` *** ### localBalance? > `optional` **localBalance?**: `string` *** ### remoteBalance? > `optional` **remoteBalance?**: `string` *** ### sequence? > `optional` **sequence?**: `number` *** ### success > **success**: `boolean` --- ## Page: TotemOmniaSettleRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemOmniaSettleRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemOmniaSettleRequest # Interface: TotemOmniaSettleRequest ## Properties ### method > **method**: `"totem_omniaSettle"` *** ### params > **params**: `object` #### channelId > **channelId**: `string` #### origin > **origin**: `string` --- ## Page: TotemOmniaSettleResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemOmniaSettleResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemOmniaSettleResponse # Interface: TotemOmniaSettleResponse ## Properties ### channelId? > `optional` **channelId?**: `string` *** ### error? > `optional` **error?**: `string` *** ### errorCode? > `optional` **errorCode?**: `string` *** ### finalBalances? > `optional` **finalBalances?**: `Record`\<`string`, `string`\> *** ### settlementTxId? > `optional` **settlementTxId?**: `string` *** ### success > **success**: `boolean` --- ## Page: TotemOmniaSpliceInRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemOmniaSpliceInRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemOmniaSpliceInRequest # Interface: TotemOmniaSpliceInRequest ## Properties ### method > **method**: `"totem_omniaSpliceIn"` *** ### params > **params**: `object` #### additionalCoinId > **additionalCoinId**: `string` #### channelId > **channelId**: `string` #### newBalances > **newBalances**: `Record`\<`string`, `string`\> #### newTotalValue > **newTotalValue**: `string` #### origin > **origin**: `string` --- ## Page: TotemOmniaSpliceInResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemOmniaSpliceInResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemOmniaSpliceInResponse # Interface: TotemOmniaSpliceInResponse ## Properties ### channelId? > `optional` **channelId?**: `string` *** ### error? > `optional` **error?**: `string` *** ### errorCode? > `optional` **errorCode?**: `string` *** ### newTotalValue? > `optional` **newTotalValue?**: `string` *** ### spliceTxId? > `optional` **spliceTxId?**: `string` *** ### success > **success**: `boolean` *** ### updatedChannelState? > `optional` **updatedChannelState?**: `string` --- ## Page: TotemOmniaSpliceOutRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemOmniaSpliceOutRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemOmniaSpliceOutRequest # Interface: TotemOmniaSpliceOutRequest ## Properties ### method > **method**: `"totem_omniaSpliceOut"` *** ### params > **params**: `object` #### channelId > **channelId**: `string` #### newBalances > **newBalances**: `Record`\<`string`, `string`\> #### newTotalValue > **newTotalValue**: `string` #### origin > **origin**: `string` #### withdrawAddress > **withdrawAddress**: `string` #### withdrawAmount > **withdrawAmount**: `string` --- ## Page: TotemOmniaSpliceOutResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemOmniaSpliceOutResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemOmniaSpliceOutResponse # Interface: TotemOmniaSpliceOutResponse ## Properties ### channelId? > `optional` **channelId?**: `string` *** ### error? > `optional` **error?**: `string` *** ### errorCode? > `optional` **errorCode?**: `string` *** ### newTotalValue? > `optional` **newTotalValue?**: `string` *** ### spliceTxId? > `optional` **spliceTxId?**: `string` *** ### success > **success**: `boolean` *** ### updatedChannelState? > `optional` **updatedChannelState?**: `string` --- ## Page: TotemPayPaymentRequestRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemPayPaymentRequestRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemPayPaymentRequestRequest # Interface: TotemPayPaymentRequestRequest ## Properties ### method > **method**: `"totem_payPaymentRequest"` *** ### params > **params**: `object` #### maxFeePercent? > `optional` **maxFeePercent?**: `number` #### origin > **origin**: `string` #### paymentUri > **paymentUri**: `string` --- ## Page: TotemPayPaymentRequestResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemPayPaymentRequestResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemPayPaymentRequestResponse # Interface: TotemPayPaymentRequestResponse ## Properties ### error? > `optional` **error?**: `string` *** ### errorCode? > `optional` **errorCode?**: `string` *** ### preimage? > `optional` **preimage?**: `string` *** ### status? > `optional` **status?**: `"paid"` \| `"pending"` \| `"failed"` *** ### success > **success**: `boolean` *** ### txpowId? > `optional` **txpowId?**: `string` --- ## Page: TotemProvider URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemProvider [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemProvider # Interface: TotemProvider ## Properties ### isTotem > **isTotem**: `true` ## Methods ### broadcastHex() > **broadcastHex**(`params`): `Promise`\<`unknown`\> #### Parameters ##### params ###### expectedDigestTx? `string` ###### signedHex `string` #### Returns `Promise`\<`unknown`\> *** ### enable() > **enable**(): `Promise`\<[`TotemConnectResponse`](TotemConnectResponse.md)\> #### Returns `Promise`\<[`TotemConnectResponse`](TotemConnectResponse.md)\> *** ### getCoins() > **getCoins**(`params?`): `Promise`\<`unknown`\> #### Parameters ##### params? ###### address? `string` ###### minAmount? `string` ###### tokenId? `string` #### Returns `Promise`\<`unknown`\> *** ### on() > **on**(`event`, `handler`): `void` #### Parameters ##### event `string` ##### handler (...`args`) => `void` #### Returns `void` *** ### removeListener() > **removeListener**(`event`, `handler`): `void` #### Parameters ##### event `string` ##### handler (...`args`) => `void` #### Returns `void` *** ### request() #### Call Signature > **request**(`args`): `Promise`\<[`TotemConnectResponse`](TotemConnectResponse.md)\> ##### Parameters ###### args [`TotemConnectRequest`](TotemConnectRequest.md) ##### Returns `Promise`\<[`TotemConnectResponse`](TotemConnectResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemVerifyResponse`](TotemVerifyResponse.md)\> ##### Parameters ###### args [`TotemVerifyRequest`](TotemVerifyRequest.md) ##### Returns `Promise`\<[`TotemVerifyResponse`](TotemVerifyResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemGetAccountsResponse`](TotemGetAccountsResponse.md)\> ##### Parameters ###### args [`TotemGetAccountsRequest`](TotemGetAccountsRequest.md) ##### Returns `Promise`\<[`TotemGetAccountsResponse`](TotemGetAccountsResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemSendTransactionResponse`](../type-aliases/TotemSendTransactionResponse.md)\> ##### Parameters ###### args [`TotemSendTransactionRequest`](TotemSendTransactionRequest.md) ##### Returns `Promise`\<[`TotemSendTransactionResponse`](../type-aliases/TotemSendTransactionResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemGetCoinsResponse`](../type-aliases/TotemGetCoinsResponse.md)\> ##### Parameters ###### args [`TotemGetCoinsRequest`](TotemGetCoinsRequest.md) ##### Returns `Promise`\<[`TotemGetCoinsResponse`](../type-aliases/TotemGetCoinsResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemSendComplexBuildResponse`](TotemSendComplexBuildResponse.md)\> ##### Parameters ###### args [`TotemSendComplexRequest`](TotemSendComplexRequest.md) & `object` ##### Returns `Promise`\<[`TotemSendComplexBuildResponse`](TotemSendComplexBuildResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemSendComplexSubmitResponse`](TotemSendComplexSubmitResponse.md)\> ##### Parameters ###### args [`TotemSendComplexRequest`](TotemSendComplexRequest.md) & `object` ##### Returns `Promise`\<[`TotemSendComplexSubmitResponse`](TotemSendComplexSubmitResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemSendComplexBuildResponse`](TotemSendComplexBuildResponse.md) \| [`TotemSendComplexSubmitResponse`](TotemSendComplexSubmitResponse.md)\> ##### Parameters ###### args [`TotemSendComplexRequest`](TotemSendComplexRequest.md) ##### Returns `Promise`\<[`TotemSendComplexBuildResponse`](TotemSendComplexBuildResponse.md) \| [`TotemSendComplexSubmitResponse`](TotemSendComplexSubmitResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemSignDataResponse`](../type-aliases/TotemSignDataResponse.md)\> ##### Parameters ###### args [`TotemSignDataRequest`](TotemSignDataRequest.md) ##### Returns `Promise`\<[`TotemSignDataResponse`](../type-aliases/TotemSignDataResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemBroadcastHexResponse`](../type-aliases/TotemBroadcastHexResponse.md)\> ##### Parameters ###### args [`TotemBroadcastHexRequest`](TotemBroadcastHexRequest.md) ##### Returns `Promise`\<[`TotemBroadcastHexResponse`](../type-aliases/TotemBroadcastHexResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemGrantTxPermissionResponse`](TotemGrantTxPermissionResponse.md)\> ##### Parameters ###### args [`TotemGrantTxPermissionRequest`](TotemGrantTxPermissionRequest.md) ##### Returns `Promise`\<[`TotemGrantTxPermissionResponse`](TotemGrantTxPermissionResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemRevokeTxPermissionResponse`](TotemRevokeTxPermissionResponse.md)\> ##### Parameters ###### args [`TotemRevokeTxPermissionRequest`](TotemRevokeTxPermissionRequest.md) ##### Returns `Promise`\<[`TotemRevokeTxPermissionResponse`](TotemRevokeTxPermissionResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemGetTxPermissionsResponse`](../type-aliases/TotemGetTxPermissionsResponse.md)\> ##### Parameters ###### args [`TotemGetTxPermissionsRequest`](TotemGetTxPermissionsRequest.md) ##### Returns `Promise`\<[`TotemGetTxPermissionsResponse`](../type-aliases/TotemGetTxPermissionsResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemCapabilities`](TotemCapabilities.md)\> ##### Parameters ###### args [`TotemGetCapabilitiesRequest`](TotemGetCapabilitiesRequest.md) ##### Returns `Promise`\<[`TotemCapabilities`](TotemCapabilities.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemProviderStatus`](TotemProviderStatus.md)\> ##### Parameters ###### args [`TotemGetProviderStatusRequest`](TotemGetProviderStatusRequest.md) ##### Returns `Promise`\<[`TotemProviderStatus`](TotemProviderStatus.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemSetChainProviderResponse`](TotemSetChainProviderResponse.md)\> ##### Parameters ###### args [`TotemSetChainProviderRequest`](TotemSetChainProviderRequest.md) ##### Returns `Promise`\<[`TotemSetChainProviderResponse`](TotemSetChainProviderResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemGetWotsStatusResponse`](TotemGetWotsStatusResponse.md)\> ##### Parameters ###### args [`TotemGetWotsStatusRequest`](TotemGetWotsStatusRequest.md) ##### Returns `Promise`\<[`TotemGetWotsStatusResponse`](TotemGetWotsStatusResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemReserveWotsLeaseResponse`](TotemReserveWotsLeaseResponse.md)\> ##### Parameters ###### args [`TotemReserveWotsLeaseRequest`](TotemReserveWotsLeaseRequest.md) ##### Returns `Promise`\<[`TotemReserveWotsLeaseResponse`](TotemReserveWotsLeaseResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemReleaseWotsLeaseResponse`](TotemReleaseWotsLeaseResponse.md)\> ##### Parameters ###### args [`TotemReleaseWotsLeaseRequest`](TotemReleaseWotsLeaseRequest.md) ##### Returns `Promise`\<[`TotemReleaseWotsLeaseResponse`](TotemReleaseWotsLeaseResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemSignTransactionResponse`](TotemSignTransactionResponse.md)\> ##### Parameters ###### args [`TotemSignTransactionRequest`](TotemSignTransactionRequest.md) ##### Returns `Promise`\<[`TotemSignTransactionResponse`](TotemSignTransactionResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemMineTxPoWResponse`](TotemMineTxPoWResponse.md)\> ##### Parameters ###### args [`TotemMineTxPoWRequest`](TotemMineTxPoWRequest.md) ##### Returns `Promise`\<[`TotemMineTxPoWResponse`](TotemMineTxPoWResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemBroadcastTxPoWResponse`](TotemBroadcastTxPoWResponse.md)\> ##### Parameters ###### args [`TotemBroadcastTxPoWRequest`](TotemBroadcastTxPoWRequest.md) ##### Returns `Promise`\<[`TotemBroadcastTxPoWResponse`](TotemBroadcastTxPoWResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemCreatePaymentRequestResponse`](TotemCreatePaymentRequestResponse.md)\> ##### Parameters ###### args [`TotemCreatePaymentRequestRequest`](TotemCreatePaymentRequestRequest.md) ##### Returns `Promise`\<[`TotemCreatePaymentRequestResponse`](TotemCreatePaymentRequestResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemPayPaymentRequestResponse`](TotemPayPaymentRequestResponse.md)\> ##### Parameters ###### args [`TotemPayPaymentRequestRequest`](TotemPayPaymentRequestRequest.md) ##### Returns `Promise`\<[`TotemPayPaymentRequestResponse`](TotemPayPaymentRequestResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemGetTransactionStatusResponse`](TotemGetTransactionStatusResponse.md)\> ##### Parameters ###### args [`TotemGetTransactionStatusRequest`](TotemGetTransactionStatusRequest.md) ##### Returns `Promise`\<[`TotemGetTransactionStatusResponse`](TotemGetTransactionStatusResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemGetReceiptResponse`](TotemGetReceiptResponse.md)\> ##### Parameters ###### args [`TotemGetReceiptRequest`](TotemGetReceiptRequest.md) ##### Returns `Promise`\<[`TotemGetReceiptResponse`](TotemGetReceiptResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemOmniaGetChannelsResponse`](TotemOmniaGetChannelsResponse.md)\> ##### Parameters ###### args [`TotemOmniaGetChannelsRequest`](TotemOmniaGetChannelsRequest.md) ##### Returns `Promise`\<[`TotemOmniaGetChannelsResponse`](TotemOmniaGetChannelsResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemOmniaOpenChannelResponse`](TotemOmniaOpenChannelResponse.md)\> ##### Parameters ###### args [`TotemOmniaOpenChannelRequest`](TotemOmniaOpenChannelRequest.md) ##### Returns `Promise`\<[`TotemOmniaOpenChannelResponse`](TotemOmniaOpenChannelResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemOmniaPayResponse`](TotemOmniaPayResponse.md)\> ##### Parameters ###### args [`TotemOmniaPayRequest`](TotemOmniaPayRequest.md) ##### Returns `Promise`\<[`TotemOmniaPayResponse`](TotemOmniaPayResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemOmniaSettleResponse`](TotemOmniaSettleResponse.md)\> ##### Parameters ###### args [`TotemOmniaSettleRequest`](TotemOmniaSettleRequest.md) ##### Returns `Promise`\<[`TotemOmniaSettleResponse`](TotemOmniaSettleResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemOmniaCloseChannelResponse`](TotemOmniaCloseChannelResponse.md)\> ##### Parameters ###### args [`TotemOmniaCloseChannelRequest`](TotemOmniaCloseChannelRequest.md) ##### Returns `Promise`\<[`TotemOmniaCloseChannelResponse`](TotemOmniaCloseChannelResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemOmniaGetRouteResponse`](TotemOmniaGetRouteResponse.md)\> ##### Parameters ###### args [`TotemOmniaGetRouteRequest`](TotemOmniaGetRouteRequest.md) ##### Returns `Promise`\<[`TotemOmniaGetRouteResponse`](TotemOmniaGetRouteResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemOmniaPayMultiHopResponse`](TotemOmniaPayMultiHopResponse.md)\> ##### Parameters ###### args [`TotemOmniaPayMultiHopRequest`](TotemOmniaPayMultiHopRequest.md) ##### Returns `Promise`\<[`TotemOmniaPayMultiHopResponse`](TotemOmniaPayMultiHopResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemOmniaGetSwapRateResponse`](TotemOmniaGetSwapRateResponse.md)\> ##### Parameters ###### args [`TotemOmniaGetSwapRateRequest`](TotemOmniaGetSwapRateRequest.md) ##### Returns `Promise`\<[`TotemOmniaGetSwapRateResponse`](TotemOmniaGetSwapRateResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemOmniaCreateFactoryResponse`](TotemOmniaCreateFactoryResponse.md)\> ##### Parameters ###### args [`TotemOmniaCreateFactoryRequest`](TotemOmniaCreateFactoryRequest.md) ##### Returns `Promise`\<[`TotemOmniaCreateFactoryResponse`](TotemOmniaCreateFactoryResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemOmniaOpenVirtualChannelResponse`](TotemOmniaOpenVirtualChannelResponse.md)\> ##### Parameters ###### args [`TotemOmniaOpenVirtualChannelRequest`](TotemOmniaOpenVirtualChannelRequest.md) ##### Returns `Promise`\<[`TotemOmniaOpenVirtualChannelResponse`](TotemOmniaOpenVirtualChannelResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemOmniaCloseFactoryResponse`](TotemOmniaCloseFactoryResponse.md)\> ##### Parameters ###### args [`TotemOmniaCloseFactoryRequest`](TotemOmniaCloseFactoryRequest.md) ##### Returns `Promise`\<[`TotemOmniaCloseFactoryResponse`](TotemOmniaCloseFactoryResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemOmniaSpliceInResponse`](TotemOmniaSpliceInResponse.md)\> ##### Parameters ###### args [`TotemOmniaSpliceInRequest`](TotemOmniaSpliceInRequest.md) ##### Returns `Promise`\<[`TotemOmniaSpliceInResponse`](TotemOmniaSpliceInResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemOmniaSpliceOutResponse`](TotemOmniaSpliceOutResponse.md)\> ##### Parameters ###### args [`TotemOmniaSpliceOutRequest`](TotemOmniaSpliceOutRequest.md) ##### Returns `Promise`\<[`TotemOmniaSpliceOutResponse`](TotemOmniaSpliceOutResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemStatechainCreateResponse`](TotemStatechainCreateResponse.md)\> ##### Parameters ###### args [`TotemStatechainCreateRequest`](TotemStatechainCreateRequest.md) ##### Returns `Promise`\<[`TotemStatechainCreateResponse`](TotemStatechainCreateResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemStatechainTransferResponse`](TotemStatechainTransferResponse.md)\> ##### Parameters ###### args [`TotemStatechainTransferRequest`](TotemStatechainTransferRequest.md) ##### Returns `Promise`\<[`TotemStatechainTransferResponse`](TotemStatechainTransferResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemStatechainClaimResponse`](TotemStatechainClaimResponse.md)\> ##### Parameters ###### args [`TotemStatechainClaimRequest`](TotemStatechainClaimRequest.md) ##### Returns `Promise`\<[`TotemStatechainClaimResponse`](TotemStatechainClaimResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemStatechainVerifyResponse`](TotemStatechainVerifyResponse.md)\> ##### Parameters ###### args [`TotemStatechainVerifyRequest`](TotemStatechainVerifyRequest.md) ##### Returns `Promise`\<[`TotemStatechainVerifyResponse`](TotemStatechainVerifyResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemKissvmSimulateResponse`](TotemKissvmSimulateResponse.md)\> ##### Parameters ###### args [`TotemKissvmSimulateRequest`](TotemKissvmSimulateRequest.md) ##### Returns `Promise`\<[`TotemKissvmSimulateResponse`](TotemKissvmSimulateResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemKissvmValidateResponse`](TotemKissvmValidateResponse.md)\> ##### Parameters ###### args [`TotemKissvmValidateRequest`](TotemKissvmValidateRequest.md) ##### Returns `Promise`\<[`TotemKissvmValidateResponse`](TotemKissvmValidateResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemAgentProposePaymentResponse`](TotemAgentProposePaymentResponse.md)\> ##### Parameters ###### args [`TotemAgentProposePaymentRequest`](TotemAgentProposePaymentRequest.md) ##### Returns `Promise`\<[`TotemAgentProposePaymentResponse`](TotemAgentProposePaymentResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemAgentExplainTransactionResponse`](TotemAgentExplainTransactionResponse.md)\> ##### Parameters ###### args [`TotemAgentExplainTransactionRequest`](TotemAgentExplainTransactionRequest.md) ##### Returns `Promise`\<[`TotemAgentExplainTransactionResponse`](TotemAgentExplainTransactionResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<[`TotemAgentCreateReceiptResponse`](TotemAgentCreateReceiptResponse.md)\> ##### Parameters ###### args [`TotemAgentCreateReceiptRequest`](TotemAgentCreateReceiptRequest.md) ##### Returns `Promise`\<[`TotemAgentCreateReceiptResponse`](TotemAgentCreateReceiptResponse.md)\> #### Call Signature > **request**(`args`): `Promise`\<`unknown`\> ##### Parameters ###### args [`TotemRequest`](TotemRequest.md) ##### Returns `Promise`\<`unknown`\> *** ### send() > **send**(`method`, `params?`): `Promise`\<`unknown`\> #### Parameters ##### method `string` ##### params? `unknown`[] #### Returns `Promise`\<`unknown`\> *** ### sendComplex() > **sendComplex**(`buildParams`, `mode?`): `Promise`\<`unknown`\> #### Parameters ##### buildParams `Record`\<`string`, `unknown`\> ##### mode? `"build"` \| `"submit"` #### Returns `Promise`\<`unknown`\> *** ### signData() > **signData**(`params`): `Promise`\<`unknown`\> #### Parameters ##### params ###### inputAddresses `string`[] ###### inputIndices? `number`[] ###### returnFormat? `string` ###### unsignedHex `string` #### Returns `Promise`\<`unknown`\> --- ## Page: TotemProviderStatus URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemProviderStatus [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemProviderStatus # Interface: TotemProviderStatus ## Properties ### localMiningAvailable > **localMiningAvailable**: `boolean` *** ### lookupLatencyMs > **lookupLatencyMs**: `number` \| `null` *** ### network > **network**: `string` *** ### pearRuntime > **pearRuntime**: `boolean` *** ### providerType > **providerType**: `"hosted"` \| `"pure_rpc"` \| `"hybrid"` *** ### relayAvailable > **relayAvailable**: `boolean` --- ## Page: TotemReleaseWotsLeaseRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemReleaseWotsLeaseRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemReleaseWotsLeaseRequest # Interface: TotemReleaseWotsLeaseRequest ## Properties ### method > **method**: `"totem_releaseWotsLease"` *** ### params > **params**: `object` #### reason? > `optional` **reason?**: `string` #### reservationId > **reservationId**: `string` --- ## Page: TotemReleaseWotsLeaseResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemReleaseWotsLeaseResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemReleaseWotsLeaseResponse # Interface: TotemReleaseWotsLeaseResponse ## Properties ### reservationId > **reservationId**: `string` *** ### success > **success**: `boolean` --- ## Page: TotemRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemRequest # Interface: TotemRequest ## Properties ### method > **method**: `string` *** ### params? > `optional` **params?**: `Record`\<`string`, `unknown`\> --- ## Page: TotemReserveWotsLeaseRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemReserveWotsLeaseRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemReserveWotsLeaseRequest # Interface: TotemReserveWotsLeaseRequest ## Properties ### method > **method**: `"totem_reserveWotsLease"` *** ### params > **params**: `object` #### address? > `optional` **address?**: `string` #### addressIndex? > `optional` **addressIndex?**: `number` #### purpose? > `optional` **purpose?**: `string` #### ttlMs? > `optional` **ttlMs?**: `number` --- ## Page: TotemReserveWotsLeaseResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemReserveWotsLeaseResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemReserveWotsLeaseResponse # Interface: TotemReserveWotsLeaseResponse ## Properties ### addressIndex > **addressIndex**: `number` *** ### expiresAt > **expiresAt**: `number` *** ### l1 > **l1**: `number` *** ### l2 > **l2**: `number` *** ### reservationId > **reservationId**: `string` --- ## Page: TotemRevokeTxPermissionRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemRevokeTxPermissionRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemRevokeTxPermissionRequest # Interface: TotemRevokeTxPermissionRequest ## Properties ### method > **method**: `"TOTEM_REVOKE_TX_PERMISSION"` *** ### params > **params**: `object` #### origin > **origin**: `string` --- ## Page: TotemRevokeTxPermissionResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemRevokeTxPermissionResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemRevokeTxPermissionResponse # Interface: TotemRevokeTxPermissionResponse ## Properties ### success > **success**: `boolean` --- ## Page: TotemSendComplexBuildResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemSendComplexBuildResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemSendComplexBuildResponse # Interface: TotemSendComplexBuildResponse ## Properties ### blobHash > **blobHash**: `string` *** ### chainId > **chainId**: `string` *** ### detectedIntent > **detectedIntent**: `string` *** ### digestTx > **digestTx**: `string` *** ### inputCoinProofs > **inputCoinProofs**: [`InputCoinProof`](InputCoinProof.md)[] *** ### mode > **mode**: `"build"` *** ### plan > **plan**: [`TransactionPlan`](TransactionPlan.md) *** ### scriptDescriptors > **scriptDescriptors**: [`ResponseScriptDescriptor`](ResponseScriptDescriptor.md)[] *** ### scriptTypes > **scriptTypes**: `string`[] *** ### success > **success**: `true` *** ### unsignedHex > **unsignedHex**: `string` --- ## Page: TotemSendComplexErrorResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemSendComplexErrorResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemSendComplexErrorResponse # Interface: TotemSendComplexErrorResponse ## Properties ### detectedIntent? > `optional` **detectedIntent?**: `string` *** ### error > **error**: `string` *** ### errorCode > **errorCode**: `string` *** ### requiredIntent? > `optional` **requiredIntent?**: `string` *** ### scriptTypes? > `optional` **scriptTypes?**: `string`[] *** ### success > **success**: `false` --- ## Page: TotemSendComplexRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemSendComplexRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemSendComplexRequest # Interface: TotemSendComplexRequest ## Properties ### method > **method**: `"TOTEM_SEND_COMPLEX"` *** ### params > **params**: `object` #### buildParams > **buildParams**: [`EnhancedBuildParams`](EnhancedBuildParams.md) #### mode? > `optional` **mode?**: `"build"` \| `"submit"` #### origin > **origin**: `string` --- ## Page: TotemSendComplexSubmitResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemSendComplexSubmitResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemSendComplexSubmitResponse # Interface: TotemSendComplexSubmitResponse ## Properties ### detectedIntent > **detectedIntent**: `string` *** ### inputCount > **inputCount**: `number` *** ### mode > **mode**: `"submit"` *** ### outputCount > **outputCount**: `number` *** ### scriptTypes > **scriptTypes**: `string`[] *** ### status > **status**: `"submitted"` *** ### success > **success**: `true` *** ### txpowid > **txpowid**: `string` --- ## Page: TotemSendTransactionErrorResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemSendTransactionErrorResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemSendTransactionErrorResponse # Interface: TotemSendTransactionErrorResponse ## Properties ### error > **error**: `string` *** ### errorCode > **errorCode**: `string` *** ### requestedAmount? > `optional` **requestedAmount?**: `string` *** ### requestedIntent? > `optional` **requestedIntent?**: `string` *** ### requestedToken? > `optional` **requestedToken?**: `string` *** ### requiresApproval? > `optional` **requiresApproval?**: `boolean` *** ### success > **success**: `false` --- ## Page: TotemSendTransactionRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemSendTransactionRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemSendTransactionRequest # Interface: TotemSendTransactionRequest ## Properties ### method > **method**: `"TOTEM_SEND_TRANSACTION"` *** ### params > **params**: `object` #### origin > **origin**: `string` #### request > **request**: `object` ##### request.intent? > `optional` **intent?**: [`DAppTransactionIntent`](../type-aliases/DAppTransactionIntent.md) ##### request.outputs > **outputs**: `object`[] ##### request.version > **version**: `1` --- ## Page: TotemSendTransactionSuccessResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemSendTransactionSuccessResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemSendTransactionSuccessResponse # Interface: TotemSendTransactionSuccessResponse ## Properties ### status > **status**: `"submitted"` *** ### success > **success**: `true` *** ### txpowid > **txpowid**: `string` --- ## Page: TotemSetChainProviderRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemSetChainProviderRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemSetChainProviderRequest # Interface: TotemSetChainProviderRequest ## Properties ### method > **method**: `"totem_setChainProvider"` *** ### params > **params**: `object` #### providerType > **providerType**: `"hosted"` \| `"pure_rpc"` \| `"hybrid"` #### rpcEndpoint? > `optional` **rpcEndpoint?**: `string` --- ## Page: TotemSetChainProviderResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemSetChainProviderResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemSetChainProviderResponse # Interface: TotemSetChainProviderResponse ## Properties ### providerType > **providerType**: `string` *** ### success > **success**: `boolean` --- ## Page: TotemSignDataErrorResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemSignDataErrorResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemSignDataErrorResponse # Interface: TotemSignDataErrorResponse ## Properties ### error > **error**: `string` *** ### errorCode > **errorCode**: `string` *** ### requiredIntent? > `optional` **requiredIntent?**: `string` *** ### success > **success**: `false` --- ## Page: TotemSignDataRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemSignDataRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemSignDataRequest # Interface: TotemSignDataRequest ## Properties ### method > **method**: `"TOTEM_SIGN_DATA"` *** ### params > **params**: `object` #### inputAddresses > **inputAddresses**: `string`[] #### inputIndices? > `optional` **inputIndices?**: `number`[] #### origin > **origin**: `string` #### returnFormat? > `optional` **returnFormat?**: `"hex"` \| `"json"` #### unsignedHex > **unsignedHex**: `string` --- ## Page: TotemSignDataSuccessResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemSignDataSuccessResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemSignDataSuccessResponse # Interface: TotemSignDataSuccessResponse ## Properties ### inputsSigned > **inputsSigned**: `number`[] *** ### signatures > **signatures**: `object`[] *** ### signedHex > **signedHex**: `string` *** ### signerAddress > **signerAddress**: `string` *** ### signerIndex > **signerIndex**: `number` *** ### status > **status**: `"signed"` *** ### success > **success**: `true` --- ## Page: TotemSignTransactionRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemSignTransactionRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemSignTransactionRequest # Interface: TotemSignTransactionRequest ## Properties ### method > **method**: `"totem_signTransaction"` *** ### params > **params**: `object` #### inputAddresses > **inputAddresses**: `string`[] #### inputIndices? > `optional` **inputIndices?**: `number`[] #### origin > **origin**: `string` #### returnFormat? > `optional` **returnFormat?**: `"hex"` \| `"json"` #### unsignedHex > **unsignedHex**: `string` --- ## Page: TotemSignTransactionResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemSignTransactionResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemSignTransactionResponse # Interface: TotemSignTransactionResponse ## Properties ### error? > `optional` **error?**: `string` *** ### errorCode? > `optional` **errorCode?**: `string` *** ### signatures? > `optional` **signatures?**: `object`[] *** ### signedHex? > `optional` **signedHex?**: `string` *** ### success > **success**: `boolean` --- ## Page: TotemStatechainClaimRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemStatechainClaimRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemStatechainClaimRequest # Interface: TotemStatechainClaimRequest ## Properties ### method > **method**: `"totem_statechainClaim"` *** ### params > **params**: `object` #### chainId > **chainId**: `string` #### claimAddress > **claimAddress**: `string` #### cooperative? > `optional` **cooperative?**: `boolean` #### origin > **origin**: `string` --- ## Page: TotemStatechainClaimResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemStatechainClaimResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemStatechainClaimResponse # Interface: TotemStatechainClaimResponse ## Properties ### chainId? > `optional` **chainId?**: `string` *** ### cooperative? > `optional` **cooperative?**: `boolean` *** ### error? > `optional` **error?**: `string` *** ### errorCode? > `optional` **errorCode?**: `string` *** ### success > **success**: `boolean` *** ### txpowId? > `optional` **txpowId?**: `string` --- ## Page: TotemStatechainCreateRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemStatechainCreateRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemStatechainCreateRequest # Interface: TotemStatechainCreateRequest ## Properties ### method > **method**: `"totem_statechainCreate"` *** ### params > **params**: `object` #### coinId > **coinId**: `string` #### origin > **origin**: `string` #### ownerPublicKeyDigest > **ownerPublicKeyDigest**: `string` #### reclaimTimelock? > `optional` **reclaimTimelock?**: `number` #### seEndpoint > **seEndpoint**: `string` --- ## Page: TotemStatechainCreateResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemStatechainCreateResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemStatechainCreateResponse # Interface: TotemStatechainCreateResponse ## Properties ### chainId? > `optional` **chainId?**: `string` *** ### error? > `optional` **error?**: `string` *** ### errorCode? > `optional` **errorCode?**: `string` *** ### lockingAddress? > `optional` **lockingAddress?**: `string` *** ### lockTxId? > `optional` **lockTxId?**: `string` *** ### success > **success**: `boolean` --- ## Page: TotemStatechainTransferRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemStatechainTransferRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemStatechainTransferRequest # Interface: TotemStatechainTransferRequest ## Properties ### method > **method**: `"totem_statechainTransfer"` *** ### params > **params**: `object` #### chainId > **chainId**: `string` #### newOwnerPublicKeyDigest > **newOwnerPublicKeyDigest**: `string` #### origin > **origin**: `string` --- ## Page: TotemStatechainTransferResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemStatechainTransferResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemStatechainTransferResponse # Interface: TotemStatechainTransferResponse ## Properties ### chainId? > `optional` **chainId?**: `string` *** ### error? > `optional` **error?**: `string` *** ### errorCode? > `optional` **errorCode?**: `string` *** ### success > **success**: `boolean` *** ### transferRecord? > `optional` **transferRecord?**: [`StatechainTransferEntry`](StatechainTransferEntry.md) --- ## Page: TotemStatechainVerifyRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemStatechainVerifyRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemStatechainVerifyRequest # Interface: TotemStatechainVerifyRequest ## Properties ### method > **method**: `"totem_statechainVerify"` *** ### params > **params**: `object` #### chainId > **chainId**: `string` #### origin > **origin**: `string` #### transferHistory > **transferHistory**: [`StatechainTransferEntry`](StatechainTransferEntry.md)[] --- ## Page: TotemStatechainVerifyResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemStatechainVerifyResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemStatechainVerifyResponse # Interface: TotemStatechainVerifyResponse ## Properties ### chainId > **chainId**: `string` *** ### error? > `optional` **error?**: `string` *** ### hopsVerified > **hopsVerified**: `number` *** ### valid > **valid**: `boolean` --- ## Page: TotemVerifyRequest URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemVerifyRequest [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemVerifyRequest # Interface: TotemVerifyRequest ## Properties ### method > **method**: `"TOTEM_VERIFY"` *** ### params > **params**: `object` #### challenge? > `optional` **challenge?**: `object` ##### challenge.expiryMs? > `optional` **expiryMs?**: `number` ##### challenge.nonce? > `optional` **nonce?**: `string` ##### challenge.statement? > `optional` **statement?**: `string` #### origin > **origin**: `string` --- ## Page: TotemVerifyResponse URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemVerifyResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemVerifyResponse # Interface: TotemVerifyResponse ## Properties ### address > **address**: `string` *** ### expiresAt > **expiresAt**: `number` *** ### message > **message**: `string` *** ### publicKey > **publicKey**: `string` *** ### sessionExpiresAt? > `optional` **sessionExpiresAt?**: `number` *** ### sessionToken? > `optional` **sessionToken?**: `string` *** ### signature > **signature**: `string` *** ### verificationId > **verificationId**: `string` *** ### verified > **verified**: `true` --- ## Page: TotemWalletInfo URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TotemWalletInfo [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemWalletInfo # Interface: TotemWalletInfo ## Properties ### icon? > `optional` **icon?**: `string` *** ### id > **id**: `string` *** ### name > **name**: `string` *** ### version? > `optional` **version?**: `string` --- ## Page: TransactionPlan URL: https://docs.totem.ing/api/totemsdk-connect/interfaces/TransactionPlan [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TransactionPlan # Interface: TransactionPlan ## Properties ### change > **change**: \{ `address`: `string`; `amount`: `string`; `tokenId`: `string`; \} \| `null` *** ### fee > **fee**: `string` \| `null` *** ### inputs > **inputs**: `object`[] #### address > **address**: `string` #### amount > **amount**: `string` #### coinId > **coinId**: `string` #### tokenId > **tokenId**: `string` *** ### outputs > **outputs**: `object`[] #### address > **address**: `string` #### amount > **amount**: `string` #### tokenId > **tokenId**: `string` --- ## Page: DAppTransactionIntent URL: https://docs.totem.ing/api/totemsdk-connect/type-aliases/DAppTransactionIntent [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / DAppTransactionIntent # Type Alias: DAppTransactionIntent > **DAppTransactionIntent** = `"send"` \| `"token_send"` \| `"swap"` \| `"liquidity_add"` \| `"liquidity_remove"` \| `"contract_call"` \| `"multisig"` \| `"timelock"` \| `"htlc"` \| `"custom"` \| `"utxo_read"` \| `"complex_send"` \| `"sign_data"` \| `"broadcast_tx"` --- ## Page: ScriptType URL: https://docs.totem.ing/api/totemsdk-connect/type-aliases/ScriptType [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / ScriptType # Type Alias: ScriptType > **ScriptType** = `"signedby"` \| `"multisig"` \| `"multisig_mofn"` \| `"timelock"` \| `"htlc"` \| `"mast"` \| `"exchange"` \| `"vault"` \| `"flashcash"` \| `"slowcash"` \| `"stateful"` \| `"custom"` --- ## Page: StateVariableType URL: https://docs.totem.ing/api/totemsdk-connect/type-aliases/StateVariableType [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / StateVariableType # Type Alias: StateVariableType > **StateVariableType** = `"number"` \| `"string"` \| `"hex"` \| `"bool"` --- ## Page: TotemBroadcastHexResponse URL: https://docs.totem.ing/api/totemsdk-connect/type-aliases/TotemBroadcastHexResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemBroadcastHexResponse # Type Alias: TotemBroadcastHexResponse > **TotemBroadcastHexResponse** = [`TotemBroadcastHexSuccessResponse`](../interfaces/TotemBroadcastHexSuccessResponse.md) \| [`TotemBroadcastHexErrorResponse`](../interfaces/TotemBroadcastHexErrorResponse.md) --- ## Page: TotemGetCapabilitiesResponse URL: https://docs.totem.ing/api/totemsdk-connect/type-aliases/TotemGetCapabilitiesResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemGetCapabilitiesResponse # Type Alias: TotemGetCapabilitiesResponse > **TotemGetCapabilitiesResponse** = [`TotemCapabilities`](../interfaces/TotemCapabilities.md) --- ## Page: TotemGetCoinsResponse URL: https://docs.totem.ing/api/totemsdk-connect/type-aliases/TotemGetCoinsResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemGetCoinsResponse # Type Alias: TotemGetCoinsResponse > **TotemGetCoinsResponse** = [`TotemGetCoinsSuccessResponse`](../interfaces/TotemGetCoinsSuccessResponse.md) \| [`TotemGetCoinsErrorResponse`](../interfaces/TotemGetCoinsErrorResponse.md) --- ## Page: TotemGetProviderStatusResponse URL: https://docs.totem.ing/api/totemsdk-connect/type-aliases/TotemGetProviderStatusResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemGetProviderStatusResponse # Type Alias: TotemGetProviderStatusResponse > **TotemGetProviderStatusResponse** = [`TotemProviderStatus`](../interfaces/TotemProviderStatus.md) --- ## Page: TotemGetTxPermissionsResponse URL: https://docs.totem.ing/api/totemsdk-connect/type-aliases/TotemGetTxPermissionsResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemGetTxPermissionsResponse # Type Alias: TotemGetTxPermissionsResponse > **TotemGetTxPermissionsResponse** = [`SitePermissionEntry`](../interfaces/SitePermissionEntry.md)[] --- ## Page: TotemSendComplexResponse URL: https://docs.totem.ing/api/totemsdk-connect/type-aliases/TotemSendComplexResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemSendComplexResponse # Type Alias: TotemSendComplexResponse > **TotemSendComplexResponse** = [`TotemSendComplexBuildResponse`](../interfaces/TotemSendComplexBuildResponse.md) \| [`TotemSendComplexSubmitResponse`](../interfaces/TotemSendComplexSubmitResponse.md) \| [`TotemSendComplexErrorResponse`](../interfaces/TotemSendComplexErrorResponse.md) --- ## Page: TotemSendTransactionResponse URL: https://docs.totem.ing/api/totemsdk-connect/type-aliases/TotemSendTransactionResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemSendTransactionResponse # Type Alias: TotemSendTransactionResponse > **TotemSendTransactionResponse** = [`TotemSendTransactionSuccessResponse`](../interfaces/TotemSendTransactionSuccessResponse.md) \| [`TotemSendTransactionErrorResponse`](../interfaces/TotemSendTransactionErrorResponse.md) --- ## Page: TotemSignDataResponse URL: https://docs.totem.ing/api/totemsdk-connect/type-aliases/TotemSignDataResponse [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TotemSignDataResponse # Type Alias: TotemSignDataResponse > **TotemSignDataResponse** = [`TotemSignDataSuccessResponse`](../interfaces/TotemSignDataSuccessResponse.md) \| [`TotemSignDataErrorResponse`](../interfaces/TotemSignDataErrorResponse.md) --- ## Page: TOTEM_ANNOUNCE URL: https://docs.totem.ing/api/totemsdk-connect/variables/TOTEM_ANNOUNCE [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TOTEM\_ANNOUNCE # Variable: TOTEM\_ANNOUNCE > `const` **TOTEM\_ANNOUNCE**: `"totem:announce"` --- ## Page: TOTEM_REQUEST_ANNOUNCE URL: https://docs.totem.ing/api/totemsdk-connect/variables/TOTEM_REQUEST_ANNOUNCE [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / TOTEM\_REQUEST\_ANNOUNCE # Variable: TOTEM\_REQUEST\_ANNOUNCE > `const` **TOTEM\_REQUEST\_ANNOUNCE**: `"totem:requestAnnounce"` --- ## Page: requestSignature URL: https://docs.totem.ing/api/totemsdk-connect/variables/requestSignature [**@totemsdk/connect**](../index.md) *** [@totemsdk/connect](../index.md) / requestSignature # ~~Variable: requestSignature~~ > `const` **requestSignature**: (`origin`, `challenge?`) => `Promise`\<[`TotemVerifyResponse`](../interfaces/TotemVerifyResponse.md)\> = `verify` ## Parameters ### origin `string` ### challenge? #### expiryMs? `number` #### nonce? `string` #### statement? `string` ## Returns `Promise`\<[`TotemVerifyResponse`](../interfaces/TotemVerifyResponse.md)\> ## Deprecated Use verify() instead --- ## Page: ConsoleLogger URL: https://docs.totem.ing/api/totemsdk-core/classes/ConsoleLogger [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / ConsoleLogger # Class: ConsoleLogger ## Implements - [`LoggerAdapter`](../interfaces/LoggerAdapter.md) ## Constructors ### Constructor > **new ConsoleLogger**(`prefix?`): `ConsoleLogger` #### Parameters ##### prefix? `string` = `'[SDK]'` #### Returns `ConsoleLogger` ## Methods ### debug() > **debug**(`message`, ...`args`): `void` #### Parameters ##### message `string` ##### args ...`unknown`[] #### Returns `void` #### Implementation of [`LoggerAdapter`](../interfaces/LoggerAdapter.md).[`debug`](../interfaces/LoggerAdapter.md#debug) *** ### error() > **error**(`message`, ...`args`): `void` #### Parameters ##### message `string` ##### args ...`unknown`[] #### Returns `void` #### Implementation of [`LoggerAdapter`](../interfaces/LoggerAdapter.md).[`error`](../interfaces/LoggerAdapter.md#error) *** ### info() > **info**(`message`, ...`args`): `void` #### Parameters ##### message `string` ##### args ...`unknown`[] #### Returns `void` #### Implementation of [`LoggerAdapter`](../interfaces/LoggerAdapter.md).[`info`](../interfaces/LoggerAdapter.md#info) *** ### warn() > **warn**(`message`, ...`args`): `void` #### Parameters ##### message `string` ##### args ...`unknown`[] #### Returns `void` #### Implementation of [`LoggerAdapter`](../interfaces/LoggerAdapter.md).[`warn`](../interfaces/LoggerAdapter.md#warn) --- ## Page: DefaultTimerAdapter URL: https://docs.totem.ing/api/totemsdk-core/classes/DefaultTimerAdapter [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / DefaultTimerAdapter # Class: DefaultTimerAdapter ## Implements - [`TimerAdapter`](../interfaces/TimerAdapter.md) ## Constructors ### Constructor > **new DefaultTimerAdapter**(): `DefaultTimerAdapter` #### Returns `DefaultTimerAdapter` ## Methods ### clearInterval() > **clearInterval**(`handle`): `void` #### Parameters ##### handle `Timeout` #### Returns `void` #### Implementation of [`TimerAdapter`](../interfaces/TimerAdapter.md).[`clearInterval`](../interfaces/TimerAdapter.md#clearinterval) *** ### clearTimeout() > **clearTimeout**(`handle`): `void` #### Parameters ##### handle `Timeout` #### Returns `void` #### Implementation of [`TimerAdapter`](../interfaces/TimerAdapter.md).[`clearTimeout`](../interfaces/TimerAdapter.md#cleartimeout) *** ### now() > **now**(): `number` #### Returns `number` #### Implementation of [`TimerAdapter`](../interfaces/TimerAdapter.md).[`now`](../interfaces/TimerAdapter.md#now) *** ### setInterval() > **setInterval**(`callback`, `ms`): `Timeout` #### Parameters ##### callback () => `void` ##### ms `number` #### Returns `Timeout` #### Implementation of [`TimerAdapter`](../interfaces/TimerAdapter.md).[`setInterval`](../interfaces/TimerAdapter.md#setinterval) *** ### setTimeout() > **setTimeout**(`callback`, `ms`): `Timeout` #### Parameters ##### callback () => `void` ##### ms `number` #### Returns `Timeout` #### Implementation of [`TimerAdapter`](../interfaces/TimerAdapter.md).[`setTimeout`](../interfaces/TimerAdapter.md#settimeout) --- ## Page: ExchangeHelper URL: https://docs.totem.ing/api/totemsdk-core/classes/ExchangeHelper [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / ExchangeHelper # Class: ExchangeHelper Exchange Contract Helper Creates DEX-style exchange contracts using VERIFYOUT. ## Constructors ### Constructor > **new ExchangeHelper**(): `ExchangeHelper` #### Returns `ExchangeHelper` ## Methods ### buildOfferState() > `static` **buildOfferState**(`ownerPublicKey`, `desiredAddress`, `desiredAmount`, `desiredTokenId`): [`StateValue`](../interfaces/StateValue.md)[] Build state variables for an exchange offer. #### Parameters ##### ownerPublicKey `string` ##### desiredAddress `string` ##### desiredAmount `string` ##### desiredTokenId `string` #### Returns [`StateValue`](../interfaces/StateValue.md)[] *** ### buildTakeOfferDescriptor() > `static` **buildTakeOfferDescriptor**(`address`, `ownerPublicKey`, `desiredAddress`, `desiredAmount`, `desiredTokenId`): [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) Build ScriptDescriptor for taking an exchange offer. #### Parameters ##### address `string` ##### ownerPublicKey `string` ##### desiredAddress `string` ##### desiredAmount `string` ##### desiredTokenId `string` #### Returns [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) *** ### createOffer() > `static` **createOffer**(`ownerPublicKey`, `desiredAddress`, `desiredAmount`, `desiredTokenId`): `object` Create an exchange offer script. Owner can cancel, or anyone can take the offer by providing the specified output. #### Parameters ##### ownerPublicKey `string` ##### desiredAddress `string` ##### desiredAmount `string` ##### desiredTokenId `string` #### Returns `object` ##### address > **address**: `string` ##### script > **script**: `string` *** ### validateExchange() > `static` **validateExchange**(`outputs`, `expectedAddress`, `expectedAmount`, `expectedTokenId`, `inputIndex`): `object` Validate VERIFYOUT for an exchange transaction. #### Parameters ##### outputs `object`[] ##### expectedAddress `string` ##### expectedAmount `string` ##### expectedTokenId `string` ##### inputIndex `number` #### Returns `object` ##### error? > `optional` **error?**: `string` ##### valid > **valid**: `boolean` --- ## Page: FlashCashHelper URL: https://docs.totem.ing/api/totemsdk-core/classes/FlashCashHelper [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / FlashCashHelper # Class: FlashCashHelper Flash Cash Helper Creates flash loan contracts for single-transaction borrowing. ## Constructors ### Constructor > **new FlashCashHelper**(): `FlashCashHelper` #### Returns `FlashCashHelper` ## Methods ### buildBorrowDescriptor() > `static` **buildBorrowDescriptor**(`address`, `ownerPublicKey`, `interestMultiplier?`): [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) Build ScriptDescriptor for borrowing flash cash. #### Parameters ##### address `string` ##### ownerPublicKey `string` ##### interestMultiplier? `string` = `'1.01'` #### Returns [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) *** ### calculateReturn() > `static` **calculateReturn**(`borrowAmount`, `interestMultiplier`): `bigint` Calculate return amount with interest. #### Parameters ##### borrowAmount `bigint` ##### interestMultiplier `number` #### Returns `bigint` *** ### createFlashCash() > `static` **createFlashCash**(`ownerPublicKey`, `interestMultiplier?`): `object` Create a flash cash contract. #### Parameters ##### ownerPublicKey `string` ##### interestMultiplier? `string` = `'1.01'` #### Returns `object` ##### address > **address**: `string` ##### script > **script**: `string` --- ## Page: HTLCHelper URL: https://docs.totem.ing/api/totemsdk-core/classes/HTLCHelper [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / HTLCHelper # Class: HTLCHelper HTLC Helper Creates Hashed Timelock Contracts for atomic swaps and lightning-style payments. ## Constructors ### Constructor > **new HTLCHelper**(): `HTLCHelper` #### Returns `HTLCHelper` ## Methods ### buildClaimDescriptor() > `static` **buildClaimDescriptor**(`address`, `senderPublicKey`, `recipientPublicKey`, `hashLock`, `timeoutBlock`, `preimage`): [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) Build ScriptDescriptor to claim HTLC with preimage. #### Parameters ##### address `string` ##### senderPublicKey `string` ##### recipientPublicKey `string` ##### hashLock `string` ##### timeoutBlock `bigint` ##### preimage `string` #### Returns [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) *** ### buildRefundDescriptor() > `static` **buildRefundDescriptor**(`address`, `senderPublicKey`, `recipientPublicKey`, `hashLock`, `timeoutBlock`): [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) Build ScriptDescriptor to refund HTLC after timeout. #### Parameters ##### address `string` ##### senderPublicKey `string` ##### recipientPublicKey `string` ##### hashLock `string` ##### timeoutBlock `bigint` #### Returns [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) *** ### createHTLC() > `static` **createHTLC**(`senderPublicKey`, `recipientPublicKey`, `hashLock`, `timeoutBlock`, `algorithm?`): `object` Create an HTLC script. The script allows: - Recipient to claim with preimage before timeout - Sender to refund after timeout #### Parameters ##### senderPublicKey `string` ##### recipientPublicKey `string` ##### hashLock `string` ##### timeoutBlock `bigint` ##### algorithm? `"sha3"` \| `"sha2"` #### Returns `object` ##### address > **address**: `string` ##### script > **script**: `string` *** ### generateSecret() > `static` **generateSecret**(): `object` Generate a random preimage and its hash. #### Returns `object` ##### hash > **hash**: `string` ##### preimage > **preimage**: `string` *** ### hashPreimage() > `static` **hashPreimage**(`preimage`, `algorithm?`): `string` Hash a preimage using SHA3 (default) or SHA2. #### Parameters ##### preimage `string` ##### algorithm? `"sha3"` \| `"sha2"` #### Returns `string` *** ### verifyPreimage() > `static` **verifyPreimage**(`preimage`, `expectedHash`, `algorithm?`): `boolean` Verify a preimage matches a hash. #### Parameters ##### preimage `string` ##### expectedHash `string` ##### algorithm? `"sha3"` \| `"sha2"` #### Returns `boolean` --- ## Page: LeaseMonitor URL: https://docs.totem.ing/api/totemsdk-core/classes/LeaseMonitor [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / LeaseMonitor # Class: LeaseMonitor ## Constructors ### Constructor > **new LeaseMonitor**(`leaseStore`, `timer?`, `logger?`, `config?`): `LeaseMonitor` #### Parameters ##### leaseStore [`LeaseStore`](LeaseStore.md) ##### timer? [`TimerAdapter`](../interfaces/TimerAdapter.md) = `...` ##### logger? [`LoggerAdapter`](../interfaces/LoggerAdapter.md) = `...` ##### config? [`LeaseMonitorConfig`](../interfaces/LeaseMonitorConfig.md) = `{}` #### Returns `LeaseMonitor` ## Methods ### checkNow() > **checkNow**(): `Promise`\<[`LeaseExpiryEvent`](../interfaces/LeaseExpiryEvent.md)[]\> #### Returns `Promise`\<[`LeaseExpiryEvent`](../interfaces/LeaseExpiryEvent.md)[]\> *** ### isActive() > **isActive**(): `boolean` #### Returns `boolean` *** ### onExpirySoon() > **onExpirySoon**(`callback`): () => `void` #### Parameters ##### callback [`LeaseExpiryCallback`](../type-aliases/LeaseExpiryCallback.md) #### Returns () => `void` *** ### removeAllListeners() > **removeAllListeners**(): `void` #### Returns `void` *** ### start() > **start**(): `void` #### Returns `void` *** ### stop() > **stop**(): `void` #### Returns `void` --- ## Page: LeaseStore URL: https://docs.totem.ing/api/totemsdk-core/classes/LeaseStore [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / LeaseStore # Class: LeaseStore ## Constructors ### Constructor > **new LeaseStore**(`storage`, `logger?`, `config?`): `LeaseStore` #### Parameters ##### storage [`StorageAdapter`](../interfaces/StorageAdapter.md) ##### logger? [`LoggerAdapter`](../interfaces/LoggerAdapter.md) = `...` ##### config? [`LeaseStoreConfig`](../interfaces/LeaseStoreConfig.md) = `{}` #### Returns `LeaseStore` ## Methods ### calculateMonitoringInterval() > **calculateMonitoringInterval**(): `number` #### Returns `number` *** ### cleanupExpired() > **cleanupExpired**(): `Promise`\<`number`\> #### Returns `Promise`\<`number`\> *** ### clear() > **clear**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### delete() > **delete**(`leaseId`): `Promise`\<`boolean`\> #### Parameters ##### leaseId `string` #### Returns `Promise`\<`boolean`\> *** ### deleteByToken() > **deleteByToken**(`leaseToken`): `Promise`\<`boolean`\> #### Parameters ##### leaseToken `string` #### Returns `Promise`\<`boolean`\> *** ### get() > **get**(`leaseId`): [`StoredLease`](../interfaces/StoredLease.md) \| `undefined` #### Parameters ##### leaseId `string` #### Returns [`StoredLease`](../interfaces/StoredLease.md) \| `undefined` *** ### getActive() > **getActive**(): [`StoredLease`](../interfaces/StoredLease.md)[] #### Returns [`StoredLease`](../interfaces/StoredLease.md)[] *** ### getAll() > **getAll**(): [`StoredLease`](../interfaces/StoredLease.md)[] #### Returns [`StoredLease`](../interfaces/StoredLease.md)[] *** ### getByToken() > **getByToken**(`leaseToken`): [`StoredLease`](../interfaces/StoredLease.md) \| `undefined` #### Parameters ##### leaseToken `string` #### Returns [`StoredLease`](../interfaces/StoredLease.md) \| `undefined` *** ### getExpiringSoon() > **getExpiringSoon**(`thresholdMs?`): [`StoredLease`](../interfaces/StoredLease.md)[] #### Parameters ##### thresholdMs? `number` = `5000` #### Returns [`StoredLease`](../interfaces/StoredLease.md)[] *** ### getMinimumTTL() > **getMinimumTTL**(): `number` \| `null` #### Returns `number` \| `null` *** ### initialize() > **initialize**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### isInitialized() > **isInitialized**(): `boolean` #### Returns `boolean` *** ### save() > **save**(`lease`): `Promise`\<`void`\> #### Parameters ##### lease [`StoredLease`](../interfaces/StoredLease.md) #### Returns `Promise`\<`void`\> *** ### updateStatus() > **updateStatus**(`leaseId`, `status`): `Promise`\<`void`\> #### Parameters ##### leaseId `string` ##### status [`LeaseStatus`](../type-aliases/LeaseStatus.md) #### Returns `Promise`\<`void`\> --- ## Page: MASTHelper URL: https://docs.totem.ing/api/totemsdk-core/classes/MASTHelper [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / MASTHelper # Class: MASTHelper MAST Helper Creates Merkelized Abstract Syntax Tree contracts for privacy and scalability. ## Constructors ### Constructor > **new MASTHelper**(): `MASTHelper` #### Returns `MASTHelper` ## Methods ### buildDescriptor() > `static` **buildDescriptor**(`address`, `rootHash`, `branchScript`, `branchProof`, `wotsPublicKey?`): [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) Build ScriptDescriptor for spending a MAST branch. #### Parameters ##### address `string` ##### rootHash `string` ##### branchScript `string` ##### branchProof `string` ##### wotsPublicKey? `string` #### Returns [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) *** ### buildSimpleTree() > `static` **buildSimpleTree**(`scripts`): `object` Build a simple MAST tree from multiple scripts. Returns the root hash and proofs for each script. For a proper implementation, this should call the mmrcreate RPC. This is a simplified local version for 2 scripts. #### Parameters ##### scripts `string`[] #### Returns `object` ##### proofs > **proofs**: `Map`\<`string`, \{ `index`: `number`; `proof`: `string`; \}\> ##### root > **root**: `string` *** ### createMASTScript() > `static` **createMASTScript**(`rootHash`): `object` Create a MAST script with the given root hash. #### Parameters ##### rootHash `string` #### Returns `object` ##### address > **address**: `string` ##### script > **script**: `string` *** ### hashScript() > `static` **hashScript**(`script`): `string` Compute hash of a script for MAST leaf. #### Parameters ##### script `string` #### Returns `string` --- ## Page: MMRTree URL: https://docs.totem.ing/api/totemsdk-core/classes/MMRTree [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / MMRTree # Class: MMRTree Simple MMR Tree for TreeKeyNode Builds a perfect binary tree from N entries (N must be power of 2 for simplicity) This matches TreeKeyNode.java which always uses 64 leaves (2^6) ## Constructors ### Constructor > **new MMRTree**(): `MMRTree` #### Returns `MMRTree` ## Methods ### addLeaf() > **addLeaf**(`data`): [`MMREntry`](../interfaces/MMREntry.md) Add a leaf entry to the MMR Matches MMR.java addEntry() but simplified for power-of-2 trees #### Parameters ##### data [`MMRData`](../interfaces/MMRData.md) #### Returns [`MMREntry`](../interfaces/MMREntry.md) *** ### getLeaf() > **getLeaf**(`index`): [`MMRData`](../interfaces/MMRData.md) \| `null` Get the leaf MMRData at a specific index #### Parameters ##### index `number` #### Returns [`MMRData`](../interfaces/MMRData.md) \| `null` *** ### getProof() > **getProof**(`leafIndex`): [`MMRProof`](../interfaces/MMRProof.md) Get proof for a leaf at given index Matches MMR.java getProofToPeak() #### Parameters ##### leafIndex `number` #### Returns [`MMRProof`](../interfaces/MMRProof.md) *** ### getRoot() > **getRoot**(): [`MMRData`](../interfaces/MMRData.md) \| `null` Get the root of the tree For a perfect binary tree with N leaves, root is at row log2(N), entry 0 #### Returns [`MMRData`](../interfaces/MMRData.md) \| `null` *** ### fromPublicKeys() > `static` **fromPublicKeys**(`pubkeys`): `MMRTree` Build tree from array of Winternitz public keys Used by TreeKeyNode to compute wallet public key #### Parameters ##### pubkeys `Bytes`[] #### Returns `MMRTree` --- ## Page: MiniNumber URL: https://docs.totem.ing/api/totemsdk-core/classes/MiniNumber [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / MiniNumber # Class: MiniNumber ## Constructors ### Constructor > **new MiniNumber**(`value`): `MiniNumber` #### Parameters ##### value `string` \| `number` \| `bigint` \| `MiniNumber` #### Returns `MiniNumber` ## Properties ### scale > `readonly` **scale**: `number` *** ### unscaled > `readonly` **unscaled**: `bigint` *** ### EIGHT > `readonly` `static` **EIGHT**: `MiniNumber` *** ### FIFTY > `readonly` `static` **FIFTY**: `MiniNumber` *** ### FIVEONE12 > `readonly` `static` **FIVEONE12**: `MiniNumber` *** ### FOUR > `readonly` `static` **FOUR**: `MiniNumber` *** ### MINUSONE > `readonly` `static` **MINUSONE**: `MiniNumber` *** ### ONE > `readonly` `static` **ONE**: `MiniNumber` *** ### SIXTEEN > `readonly` `static` **SIXTEEN**: `MiniNumber` *** ### SIXTYFOUR > `readonly` `static` **SIXTYFOUR**: `MiniNumber` *** ### THIRTYTWO > `readonly` `static` **THIRTYTWO**: `MiniNumber` *** ### THOUSAND24 > `readonly` `static` **THOUSAND24**: `MiniNumber` *** ### THREE > `readonly` `static` **THREE**: `MiniNumber` *** ### TWELVE > `readonly` `static` **TWELVE**: `MiniNumber` *** ### TWENTY > `readonly` `static` **TWENTY**: `MiniNumber` *** ### TWO > `readonly` `static` **TWO**: `MiniNumber` *** ### TWOFIVESIX > `readonly` `static` **TWOFIVESIX**: `MiniNumber` *** ### ZERO > `readonly` `static` **ZERO**: `MiniNumber` ## Methods ### abs() > **abs**(): `MiniNumber` #### Returns `MiniNumber` *** ### add() > **add**(`other`): `MiniNumber` #### Parameters ##### other `MiniNumber` #### Returns `MiniNumber` *** ### ceil() > **ceil**(): `MiniNumber` #### Returns `MiniNumber` *** ### compareTo() > **compareTo**(`other`): `number` #### Parameters ##### other `MiniNumber` #### Returns `number` *** ### decimalPlaces() > **decimalPlaces**(): `number` #### Returns `number` *** ### decrement() > **decrement**(): `MiniNumber` #### Returns `MiniNumber` *** ### div() > **div**(`other`): `MiniNumber` #### Parameters ##### other `MiniNumber` #### Returns `MiniNumber` *** ### floor() > **floor**(): `MiniNumber` #### Returns `MiniNumber` *** ### getAsBigDecimal() > **getAsBigDecimal**(): `string` #### Returns `string` *** ### getAsBigInteger() > **getAsBigInteger**(): `string` #### Returns `string` *** ### increment() > **increment**(): `MiniNumber` #### Returns `MiniNumber` *** ### isEqual() > **isEqual**(`other`): `boolean` #### Parameters ##### other `MiniNumber` #### Returns `boolean` *** ### isLess() > **isLess**(`other`): `boolean` #### Parameters ##### other `MiniNumber` #### Returns `boolean` *** ### isLessEqual() > **isLessEqual**(`other`): `boolean` #### Parameters ##### other `MiniNumber` #### Returns `boolean` *** ### isMore() > **isMore**(`other`): `boolean` #### Parameters ##### other `MiniNumber` #### Returns `boolean` *** ### isMoreEqual() > **isMoreEqual**(`other`): `boolean` #### Parameters ##### other `MiniNumber` #### Returns `boolean` *** ### modulo() > **modulo**(`other`): `MiniNumber` #### Parameters ##### other `MiniNumber` #### Returns `MiniNumber` *** ### mult() > **mult**(`other`): `MiniNumber` #### Parameters ##### other `MiniNumber` #### Returns `MiniNumber` *** ### negate() > **negate**(): `MiniNumber` #### Returns `MiniNumber` *** ### pow() > **pow**(`n`): `MiniNumber` #### Parameters ##### n `number` #### Returns `MiniNumber` *** ### setSignificantDigits() > **setSignificantDigits**(`d`): `MiniNumber` #### Parameters ##### d `number` #### Returns `MiniNumber` *** ### sqrt() > **sqrt**(): `MiniNumber` #### Returns `MiniNumber` *** ### sub() > **sub**(`other`): `MiniNumber` #### Parameters ##### other `MiniNumber` #### Returns `MiniNumber` *** ### toNumber() > **toNumber**(): `number` #### Returns `number` *** ### toString() > **toString**(): `string` #### Returns `string` --- ## Page: NoopLifecycleAdapter URL: https://docs.totem.ing/api/totemsdk-core/classes/NoopLifecycleAdapter [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / NoopLifecycleAdapter # Class: NoopLifecycleAdapter ## Implements - [`LifecycleAdapter`](../interfaces/LifecycleAdapter.md) ## Constructors ### Constructor > **new NoopLifecycleAdapter**(): `NoopLifecycleAdapter` #### Returns `NoopLifecycleAdapter` ## Methods ### onResume() > **onResume**(`_callback`): () => `void` #### Parameters ##### \_callback () => `void` #### Returns () => `void` #### Implementation of [`LifecycleAdapter`](../interfaces/LifecycleAdapter.md).[`onResume`](../interfaces/LifecycleAdapter.md#onresume) *** ### onSuspend() > **onSuspend**(`_callback`): () => `void` #### Parameters ##### \_callback () => `void` #### Returns () => `void` #### Implementation of [`LifecycleAdapter`](../interfaces/LifecycleAdapter.md).[`onSuspend`](../interfaces/LifecycleAdapter.md#onsuspend) --- ## Page: NoopLogger URL: https://docs.totem.ing/api/totemsdk-core/classes/NoopLogger [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / NoopLogger # Class: NoopLogger ## Implements - [`LoggerAdapter`](../interfaces/LoggerAdapter.md) ## Constructors ### Constructor > **new NoopLogger**(): `NoopLogger` #### Returns `NoopLogger` ## Methods ### debug() > **debug**(`_message`, ...`_args`): `void` #### Parameters ##### \_message `string` ##### \_args ...`unknown`[] #### Returns `void` #### Implementation of [`LoggerAdapter`](../interfaces/LoggerAdapter.md).[`debug`](../interfaces/LoggerAdapter.md#debug) *** ### error() > **error**(`_message`, ...`_args`): `void` #### Parameters ##### \_message `string` ##### \_args ...`unknown`[] #### Returns `void` #### Implementation of [`LoggerAdapter`](../interfaces/LoggerAdapter.md).[`error`](../interfaces/LoggerAdapter.md#error) *** ### info() > **info**(`_message`, ...`_args`): `void` #### Parameters ##### \_message `string` ##### \_args ...`unknown`[] #### Returns `void` #### Implementation of [`LoggerAdapter`](../interfaces/LoggerAdapter.md).[`info`](../interfaces/LoggerAdapter.md#info) *** ### warn() > **warn**(`_message`, ...`_args`): `void` #### Parameters ##### \_message `string` ##### \_args ...`unknown`[] #### Returns `void` #### Implementation of [`LoggerAdapter`](../interfaces/LoggerAdapter.md).[`warn`](../interfaces/LoggerAdapter.md#warn) --- ## Page: NoopMetrics URL: https://docs.totem.ing/api/totemsdk-core/classes/NoopMetrics [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / NoopMetrics # Class: NoopMetrics ## Implements - [`MetricsAdapter`](../interfaces/MetricsAdapter.md) ## Constructors ### Constructor > **new NoopMetrics**(): `NoopMetrics` #### Returns `NoopMetrics` ## Methods ### gauge() > **gauge**(`_name`, `_value`, `_tags?`): `void` #### Parameters ##### \_name `string` ##### \_value `number` ##### \_tags? `Record`\<`string`, `string`\> #### Returns `void` #### Implementation of [`MetricsAdapter`](../interfaces/MetricsAdapter.md).[`gauge`](../interfaces/MetricsAdapter.md#gauge) *** ### histogram() > **histogram**(`_name`, `_value`, `_tags?`): `void` #### Parameters ##### \_name `string` ##### \_value `number` ##### \_tags? `Record`\<`string`, `string`\> #### Returns `void` #### Implementation of [`MetricsAdapter`](../interfaces/MetricsAdapter.md).[`histogram`](../interfaces/MetricsAdapter.md#histogram) *** ### increment() > **increment**(`_name`, `_value?`, `_tags?`): `void` #### Parameters ##### \_name `string` ##### \_value? `number` ##### \_tags? `Record`\<`string`, `string`\> #### Returns `void` #### Implementation of [`MetricsAdapter`](../interfaces/MetricsAdapter.md).[`increment`](../interfaces/MetricsAdapter.md#increment) *** ### timing() > **timing**(`_name`, `_durationMs`, `_tags?`): `void` #### Parameters ##### \_name `string` ##### \_durationMs `number` ##### \_tags? `Record`\<`string`, `string`\> #### Returns `void` #### Implementation of [`MetricsAdapter`](../interfaces/MetricsAdapter.md).[`timing`](../interfaces/MetricsAdapter.md#timing) --- ## Page: SlowCashHelper URL: https://docs.totem.ing/api/totemsdk-core/classes/SlowCashHelper [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / SlowCashHelper # Class: SlowCashHelper Slow Cash Helper Creates rate-limited withdrawal contracts. ## Constructors ### Constructor > **new SlowCashHelper**(): `SlowCashHelper` #### Returns `SlowCashHelper` ## Methods ### buildWithdrawalDescriptor() > `static` **buildWithdrawalDescriptor**(`address`, `ownerPublicKey`, `withdrawalPercent?`, `cooldownBlocks?`): [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) Build ScriptDescriptor for slow cash withdrawal. #### Parameters ##### address `string` ##### ownerPublicKey `string` ##### withdrawalPercent? `string` = `'0.9'` ##### cooldownBlocks? `bigint` = `10000n` #### Returns [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) *** ### calculateWithdrawal() > `static` **calculateWithdrawal**(`currentAmount`, `withdrawalPercent`): `object` Calculate withdrawal amount. #### Parameters ##### currentAmount `bigint` ##### withdrawalPercent `number` #### Returns `object` ##### remaining > **remaining**: `bigint` ##### withdrawal > **withdrawal**: `bigint` *** ### canWithdraw() > `static` **canWithdraw**(`coinAge`, `cooldownBlocks`): `boolean` Check if withdrawal is allowed based on coin age. #### Parameters ##### coinAge `bigint` ##### cooldownBlocks `bigint` #### Returns `boolean` *** ### createSlowCash() > `static` **createSlowCash**(`ownerPublicKey`, `withdrawalPercent?`, `cooldownBlocks?`): `object` Create a slow cash contract. #### Parameters ##### ownerPublicKey `string` ##### withdrawalPercent? `string` = `'0.9'` ##### cooldownBlocks? `bigint` = `10000n` #### Returns `object` ##### address > **address**: `string` ##### script > **script**: `string` --- ## Page: StatefulGameHelper URL: https://docs.totem.ing/api/totemsdk-core/classes/StatefulGameHelper [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / StatefulGameHelper # Class: StatefulGameHelper Stateful Game Helper Creates multi-round stateful contracts (like coin flip). ## Constructors ### Constructor > **new StatefulGameHelper**(): `StatefulGameHelper` #### Returns `StatefulGameHelper` ## Methods ### buildNextRoundState() > `static` **buildNextRoundState**(`currentRound`, `preservedPorts`, `newStates`): [`StateValue`](../interfaces/StateValue.md)[] Build state for next round. #### Parameters ##### currentRound `number` ##### preservedPorts `number`[] ##### newStates [`StateValue`](../interfaces/StateValue.md)[] #### Returns [`StateValue`](../interfaces/StateValue.md)[] *** ### createRoundCheck() > `static` **createRoundCheck**(): `string` Create a round increment assertion. #### Returns `string` *** ### validateRound() > `static` **validateRound**(`previousRound`, `currentRound`): `boolean` Validate round progression. #### Parameters ##### previousRound `number` ##### currentRound `number` #### Returns `boolean` --- ## Page: TimelockHelper URL: https://docs.totem.ing/api/totemsdk-core/classes/TimelockHelper [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / TimelockHelper # Class: TimelockHelper Timelock Helper Creates timelocked scripts that can only be spent after a certain block. ## Constructors ### Constructor > **new TimelockHelper**(): `TimelockHelper` #### Returns `TimelockHelper` ## Methods ### buildDescriptor() > `static` **buildDescriptor**(`address`, `publicKey`, `unlockBlock`): [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) Build ScriptDescriptor for a timelock spend. #### Parameters ##### address `string` ##### publicKey `string` ##### unlockBlock `bigint` #### Returns [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) *** ### createBlockTimelock() > `static` **createBlockTimelock**(`publicKey`, `unlockBlock`): `object` Create a timelock script that unlocks at a specific block. #### Parameters ##### publicKey `string` ##### unlockBlock `bigint` #### Returns `object` ##### address > **address**: `string` ##### script > **script**: `string` *** ### createCoinageTimelock() > `static` **createCoinageTimelock**(`publicKey`, `minCoinAge`): `object` Create a timelock script based on coin age. #### Parameters ##### publicKey `string` ##### minCoinAge `bigint` #### Returns `object` ##### address > **address**: `string` ##### script > **script**: `string` *** ### isUnlocked() > `static` **isUnlocked**(`unlockBlock`, `currentBlock`): `boolean` Check if a timelock is satisfied given current block. #### Parameters ##### unlockBlock `bigint` ##### currentBlock `bigint` #### Returns `boolean` --- ## Page: TransactionLifecycle URL: https://docs.totem.ing/api/totemsdk-core/classes/TransactionLifecycle [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / TransactionLifecycle # Class: TransactionLifecycle ## Constructors ### Constructor > **new TransactionLifecycle**(`txService`, `leaseStore`, `watermarkStore`, `receiptStore`, `logger?`, `metrics?`, `config?`): `TransactionLifecycle` #### Parameters ##### txService [`TransactionService`](TransactionService.md) ##### leaseStore [`LeaseStore`](LeaseStore.md) ##### watermarkStore [`WatermarkStore`](WatermarkStore.md) ##### receiptStore [`TransactionReceiptStore`](TransactionReceiptStore.md) ##### logger? [`LoggerAdapter`](../interfaces/LoggerAdapter.md) = `...` ##### metrics? [`MetricsAdapter`](../interfaces/MetricsAdapter.md) = `...` ##### config? [`TransactionLifecycleConfig`](../interfaces/TransactionLifecycleConfig.md) = `{}` #### Returns `TransactionLifecycle` ## Methods ### cancelLease() > **cancelLease**(`leaseToken`): `Promise`\<`void`\> #### Parameters ##### leaseToken `string` #### Returns `Promise`\<`void`\> *** ### finalize() > **finalize**(`leaseToken`, `signedHex`, `metadata`): `Promise`\<[`FinalizeResponse`](../interfaces/FinalizeResponse.md)\> #### Parameters ##### leaseToken `string` ##### signedHex `string` ##### metadata [`TransactionMetadata`](../interfaces/TransactionMetadata.md) #### Returns `Promise`\<[`FinalizeResponse`](../interfaces/FinalizeResponse.md)\> *** ### prepare() > **prepare**(`params`, `rootPublicKey`): `Promise`\<[`PrepareResult`](../interfaces/PrepareResult.md)\> #### Parameters ##### params [`PrepareRequest`](../interfaces/PrepareRequest.md) ##### rootPublicKey `string` #### Returns `Promise`\<[`PrepareResult`](../interfaces/PrepareResult.md)\> *** ### setSyncWatermarkFunction() > **setSyncWatermarkFunction**(`fn`): `void` #### Parameters ##### fn [`WatermarkSyncFunction`](../interfaces/WatermarkSyncFunction.md) #### Returns `void` *** ### sign() > **sign**(`prepareResult`, `seed`, `deps`, `paramSetName?`): `Promise`\<[`SignResult`](../interfaces/SignResult.md)\> #### Parameters ##### prepareResult [`PrepareResult`](../interfaces/PrepareResult.md) ##### seed `Uint8Array` ##### deps [`WotsSigningDependencies`](../interfaces/WotsSigningDependencies.md) ##### paramSetName? `string` #### Returns `Promise`\<[`SignResult`](../interfaces/SignResult.md)\> --- ## Page: TransactionLifecycleError URL: https://docs.totem.ing/api/totemsdk-core/classes/TransactionLifecycleError [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / TransactionLifecycleError # Class: TransactionLifecycleError ## Extends - `Error` ## Constructors ### Constructor > **new TransactionLifecycleError**(`message`, `code`, `userMessage`): `TransactionLifecycleError` #### Parameters ##### message `string` ##### code `number` ##### userMessage `string` #### Returns `TransactionLifecycleError` #### Overrides `Error.constructor` ## Properties ### cause? > `optional` **cause?**: `unknown` #### Inherited from `Error.cause` *** ### code > **code**: `number` *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### userMessage > **userMessage**: `string` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: TransactionReceiptStore URL: https://docs.totem.ing/api/totemsdk-core/classes/TransactionReceiptStore [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / TransactionReceiptStore # Class: TransactionReceiptStore ## Constructors ### Constructor > **new TransactionReceiptStore**(`storage`, `logger?`, `config?`): `TransactionReceiptStore` #### Parameters ##### storage [`StorageAdapter`](../interfaces/StorageAdapter.md) ##### logger? [`LoggerAdapter`](../interfaces/LoggerAdapter.md) = `...` ##### config? [`TransactionReceiptStoreConfig`](../interfaces/TransactionReceiptStoreConfig.md) = `{}` #### Returns `TransactionReceiptStore` ## Methods ### add() > **add**(`receipt`): `Promise`\<`void`\> #### Parameters ##### receipt [`TransactionReceipt`](../interfaces/TransactionReceipt.md) #### Returns `Promise`\<`void`\> *** ### clear() > **clear**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### count() > **count**(): `number` #### Returns `number` *** ### getAll() > **getAll**(): [`TransactionReceipt`](../interfaces/TransactionReceipt.md)[] #### Returns [`TransactionReceipt`](../interfaces/TransactionReceipt.md)[] *** ### getByTxpowid() > **getByTxpowid**(`txpowid`): [`TransactionReceipt`](../interfaces/TransactionReceipt.md) \| `undefined` #### Parameters ##### txpowid `string` #### Returns [`TransactionReceipt`](../interfaces/TransactionReceipt.md) \| `undefined` *** ### getRecent() > **getRecent**(`count?`): [`TransactionReceipt`](../interfaces/TransactionReceipt.md)[] #### Parameters ##### count? `number` = `50` #### Returns [`TransactionReceipt`](../interfaces/TransactionReceipt.md)[] *** ### initialize() > **initialize**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### isInitialized() > **isInitialized**(): `boolean` #### Returns `boolean` *** ### updateStatus() > **updateStatus**(`txpowid`, `status`): `Promise`\<`void`\> #### Parameters ##### txpowid `string` ##### status `"pending"` \| `"confirmed"` \| `"failed"` #### Returns `Promise`\<`void`\> --- ## Page: TransactionService URL: https://docs.totem.ing/api/totemsdk-core/classes/TransactionService [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / TransactionService # Class: TransactionService ## Constructors ### Constructor > **new TransactionService**(`http`, `config`, `logger?`, `metrics?`): `TransactionService` #### Parameters ##### http [`HttpClient`](../interfaces/HttpClient.md) ##### config [`TransactionServiceConfig`](../interfaces/TransactionServiceConfig.md) ##### logger? [`LoggerAdapter`](../interfaces/LoggerAdapter.md) = `...` ##### metrics? [`MetricsAdapter`](../interfaces/MetricsAdapter.md) = `...` #### Returns `TransactionService` ## Methods ### finalize() > **finalize**(`params`): `Promise`\<[`FinalizeResponse`](../interfaces/FinalizeResponse.md)\> #### Parameters ##### params [`FinalizeRequest`](../interfaces/FinalizeRequest.md) #### Returns `Promise`\<[`FinalizeResponse`](../interfaces/FinalizeResponse.md)\> *** ### prepare() > **prepare**(`params`, `rootPublicKey`): `Promise`\<[`PrepareResponse`](../interfaces/PrepareResponse.md)\> #### Parameters ##### params [`PrepareRequest`](../interfaces/PrepareRequest.md) ##### rootPublicKey `string` #### Returns `Promise`\<[`PrepareResponse`](../interfaces/PrepareResponse.md)\> *** ### sign() > **sign**(`request`, `seed`, `_deps?`, `_paramSet?`): `Promise`\<[`SignResult`](../interfaces/SignResult.md)\> Sign a transaction using per-address TreeKey architecture. Produces 3 proofs (Root→L1→L2→DATA) matching Minima's TreeKey.sign() exactly. #### Parameters ##### request [`SignRequest`](../interfaces/SignRequest.md) Indices and digestTx from the /prepare response ##### seed `Uint8Array` 32-byte wallet base seed (from mnemonic) ##### \_deps? [`WotsSigningDependencies`](../interfaces/WotsSigningDependencies.md) \| `null` Deprecated, unused. Pass null or omit. ##### \_paramSet? `string` Deprecated, unused. TreeKey uses its own param set. #### Returns `Promise`\<[`SignResult`](../interfaces/SignResult.md)\> --- ## Page: TreeKey URL: https://docs.totem.ing/api/totemsdk-core/classes/TreeKey [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / TreeKey # Class: TreeKey TreeKey - Full hierarchical key tree with multiple levels Matches TreeKey.java: - Default: 3 levels x 64 keys = 262,144 one-time signatures - Tracks usage count to determine which key to use - Produces multi-level signatures ## Constructors ### Constructor > **new TreeKey**(`privateSeed`, `keysPerLevel?`, `levels?`): `TreeKey` #### Parameters ##### privateSeed `Bytes` ##### keysPerLevel? `number` = `DEFAULT_KEYS_PER_LEVEL` ##### levels? `number` = `DEFAULT_LEVELS` #### Returns `TreeKey` ## Methods ### getAddressPublicKey() > **getAddressPublicKey**(`l1`): `Bytes` Get the public key for a level-1 address (single index) This is the MMR root of the level-1 TreeKeyNode's 64 Winternitz keys. Use this for wallet addresses where each address = one level-1 node. #### Parameters ##### l1 `number` Level 1 index (0-63, corresponds to wallet address index) #### Returns `Bytes` 32-byte MMR root public key for SIGNEDBY scripts *** ### getCachedSignatures() > **getCachedSignatures**(): `Map`\<`string`, [`SignatureProof`](../interfaces/SignatureProof.md)\> Get all cached parent-child signatures (for serialization/persistence) #### Returns `Map`\<`string`, [`SignatureProof`](../interfaces/SignatureProof.md)\> *** ### getMaxUses() > **getMaxUses**(): `number` Get the maximum number of signatures this tree can produce #### Returns `number` *** ### getParentChildSig() > **getParentChildSig**(`path`): [`SignatureProof`](../interfaces/SignatureProof.md) \| `undefined` Get a cached parent-child signature #### Parameters ##### path `number`[] Array of indices (e.g., [l1] for root->level1) #### Returns [`SignatureProof`](../interfaces/SignatureProof.md) \| `undefined` *** ### getPublicKey() > **getPublicKey**(): `Bytes` Get the wallet's public key (root of the key tree) #### Returns `Bytes` *** ### getRootNode() > **getRootNode**(): [`TreeKeyNode`](TreeKeyNode.md) Get the root TreeKeyNode (for internal use) #### Returns [`TreeKeyNode`](TreeKeyNode.md) *** ### getRootPublicKey() > **getRootPublicKey**(): `Bytes` Get the root public key (for watermark tracking) #### Returns `Bytes` *** ### getSigningNodePublicKey() > **getSigningNodePublicKey**(`l1`, `l2`): `Bytes` Get the public key for a specific signing key at tree index (l1, l2) This navigates to the level-2 node for signing operations. #### Parameters ##### l1 `number` Level 1 index (address) ##### l2 `number` Level 2 index (signing key within address) #### Returns `Bytes` 32-byte MMR root public key of level-2 node *** ### getUses() > **getUses**(): `number` Get current usage count #### Returns `number` *** ### hasParentChildSig() > **hasParentChildSig**(`path`): `boolean` Check if a parent-child signature is cached #### Parameters ##### path `number`[] Array of indices (e.g., [l1] for root->level1) #### Returns `boolean` *** ### restoreCachedSignatures() > **restoreCachedSignatures**(`cache`): `void` Restore cached signatures (for hydrating from persistence) #### Parameters ##### cache `Map`\<`string`, [`SignatureProof`](../interfaces/SignatureProof.md)\> #### Returns `void` *** ### setParentChildSig() > **setParentChildSig**(`path`, `sig`): `void` Cache a parent-child signature for reuse This allows the same signature to be reused across multiple signing operations #### Parameters ##### path `number`[] Array of indices leading to the child (e.g., [l1] or [l1, l2]) ##### sig [`SignatureProof`](../interfaces/SignatureProof.md) SignatureProof from parent signing child's public key #### Returns `void` *** ### setUses() > **setUses**(`uses`): `void` Set the usage counter (for resuming from a known state) #### Parameters ##### uses `number` #### Returns `void` *** ### sign() > **sign**(`data`): [`TreeSignature`](../interfaces/TreeSignature.md) Sign data with the current key and increment usage Matches TreeKey.java sign(): - Determines path through tree based on usage count - Each level's key signs the next level's root public key - Final level signs the actual data CRITICAL FIX (January 2026): Build proofs bottom-up to sign child's getRootPublicKey() Java's TreeKey.verify() verifies non-leaf signatures against childsig.getRootPublicKey(), which is the 32-byte MMR root computed from the NEXT proof's leafPubkey + MMRproof. Uses parent-child signature caching for efficiency: - Parent-child signatures are cached and reused - Only the final data signature is computed fresh each time #### Parameters ##### data `Bytes` #### Returns [`TreeSignature`](../interfaces/TreeSignature.md) *** ### createWithProgress() > `static` **createWithProgress**(`privateSeed`, `keysPerLevel?`, `levels?`, `onProgress?`): `Promise`\<`TreeKey`\> Async factory method for TreeKey with progress reporting Reports progress as the root TreeKeyNode generates its 64 signing keys #### Parameters ##### privateSeed `Bytes` ##### keysPerLevel? `number` = `DEFAULT_KEYS_PER_LEVEL` ##### levels? `number` = `DEFAULT_LEVELS` ##### onProgress? [`ProgressCallback`](../type-aliases/ProgressCallback.md) #### Returns `Promise`\<`TreeKey`\> --- ## Page: TreeKeyNode URL: https://docs.totem.ing/api/totemsdk-core/classes/TreeKeyNode [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / TreeKeyNode # Class: TreeKeyNode TreeKeyNode - One node in the key tree containing 64 Winternitz keys Matches TreeKeyNode.java (see attached_assets/TreeKeyNode_1767574401422.java): Key generation (lines 44-62): - Creates 64 Winternitz keys from a deterministic seed - For each key: MiniData pubkey = wots.getPublicKey() returns 32-byte DIGEST - Adds to MMR: MMRData.CreateMMRDataLeafNode(pubkey, MiniNumber.ZERO) - Public key = MMR root (mPublicKey = mTree.getRoot().getData()) MMR leaf construction (see MMRData.java lines 30-36): MMRData.CreateMMRDataLeafNode(pubkeyDigest, MiniNumber.ZERO) → hash = Crypto.hashAllObjects(MiniNumber.ZERO, zData, zSumValue) → Serialization: [0x00,0x01,0x00] + [4-byte-len + pubkey] + [0x00,0x01,0x00] MMR parent construction (see MMRData.java lines 38-50): MMRData.CreateMMRDataParentNode(left, right) → hash = Crypto.hashAllObjects(MiniNumber.ONE, left.data, right.data, sumValue) IMPORTANT: Minima NEVER stores the 1088-byte full WOTS public key. Only the 32-byte digest is stored and used for MMR construction. ## Constructors ### Constructor > **new TreeKeyNode**(`privateSeed`, `keysPerLevel?`): `TreeKeyNode` #### Parameters ##### privateSeed `Bytes` ##### keysPerLevel? `number` = `DEFAULT_KEYS_PER_LEVEL` #### Returns `TreeKeyNode` ## Methods ### getChild() > **getChild**(`childIndex`): `TreeKeyNode` Create a child TreeKeyNode at the specified index Matches TreeKeyNode.java getChild() PERFORMANCE FIX: Child nodes are now cached to avoid regenerating 64 WOTS keys on every getChild() call. This is critical for address derivation performance where getChild() is called 64 times. #### Parameters ##### childIndex `number` #### Returns `TreeKeyNode` *** ### getProof() > **getProof**(`keyIndex`): [`MMRProof`](../interfaces/MMRProof.md) Get the MMR proof for a specific key index #### Parameters ##### keyIndex `number` #### Returns [`MMRProof`](../interfaces/MMRProof.md) *** ### getPublicKey() > **getPublicKey**(): `Bytes` Get the public key for this tree node (MMR root of all 64 Winternitz keys) #### Returns `Bytes` *** ### ~~getWOTSPublicKey()~~ > **getWOTSPublicKey**(`index`): `Bytes` Get the full Winternitz public key at a specific index (0-63) Returns the full L×32 byte public key (1088 bytes), derived on-demand NOTE: This is only used for local signature verification in tests. Java's Winternitz.getPublicKey() returns a 32-byte digest, not this. For production code, use getWOTSPublicKeyDigest() instead. #### Parameters ##### index `number` #### Returns `Bytes` #### Deprecated Use getWOTSPublicKeyDigest() for Minima compatibility *** ### getWOTSPublicKeyDigest() > **getWOTSPublicKeyDigest**(`index`): `Bytes` Get the Winternitz public key digest at a specific index (0-63) Returns the 32-byte SHA3 hash of the full public key #### Parameters ##### index `number` #### Returns `Bytes` *** ### sign() > **sign**(`keyIndex`, `data`): [`SignatureProof`](../interfaces/SignatureProof.md) Sign data with a specific key from this node Returns a SignatureProof containing the 32-byte leaf pubkey DIGEST, signature, and MMR proof CRITICAL: Java's WinternitzOTSignature.getSignature() ALWAYS hashes the message first, regardless of input length. From BouncyCastle WinternitzOTSignature.java lines 137-138: messDigestOTS.update(message, 0, message.length); messDigestOTS.doFinal(hash, 0); We MUST always hash to match Java verification, which also always hashes. CRITICAL FIX (January 2026): leafPubkey is the 32-byte WOTS public key DIGEST. Java's Winternitz.getPublicKey() returns SHA3-256(full_key) = 32 bytes! Previous bug: We stored 1088-byte full keys, Java expected 32-byte digests → verification failed. #### Parameters ##### keyIndex `number` ##### data `Bytes` #### Returns [`SignatureProof`](../interfaces/SignatureProof.md) *** ### createWithProgress() > `static` **createWithProgress**(`privateSeed`, `keysPerLevel?`, `onProgress?`): `Promise`\<`TreeKeyNode`\> Async factory method for TreeKeyNode with progress reporting Yields to event loop every few keys to keep UI responsive #### Parameters ##### privateSeed `Bytes` ##### keysPerLevel? `number` = `DEFAULT_KEYS_PER_LEVEL` ##### onProgress? [`ProgressCallback`](../type-aliases/ProgressCallback.md) #### Returns `Promise`\<`TreeKeyNode`\> --- ## Page: VaultHelper URL: https://docs.totem.ing/api/totemsdk-core/classes/VaultHelper [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / VaultHelper # Class: VaultHelper Vault Helper Creates vault/covenant contracts with safe house enforcement. ## Constructors ### Constructor > **new VaultHelper**(): `VaultHelper` #### Returns `VaultHelper` ## Methods ### buildWithdrawalState() > `static` **buildWithdrawalState**(`amount`, `recipientAddress`): [`StateValue`](../interfaces/StateValue.md)[] Build state for vault withdrawal. #### Parameters ##### amount `string` ##### recipientAddress `string` #### Returns [`StateValue`](../interfaces/StateValue.md)[] *** ### createVault() > `static` **createVault**(`coldKey`, `hotKey`, `cooldownBlocks?`): `object` Create a vault script. #### Parameters ##### coldKey `string` ##### hotKey `string` ##### cooldownBlocks? `bigint` = `20n` #### Returns `object` ##### safeHouseAddress > **safeHouseAddress**: `string` ##### safeHouseScript > **safeHouseScript**: `string` ##### vaultAddress > **vaultAddress**: `string` ##### vaultScript > **vaultScript**: `string` *** ### generateSafeHouseScript() > `static` **generateSafeHouseScript**(`coldKey`, `hotKey`, `cooldownBlocks?`): `string` Generate safe house script from vault parameters. #### Parameters ##### coldKey `string` ##### hotKey `string` ##### cooldownBlocks? `bigint` = `20n` #### Returns `string` --- ## Page: WatermarkExhaustedError URL: https://docs.totem.ing/api/totemsdk-core/classes/WatermarkExhaustedError [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / WatermarkExhaustedError # Class: WatermarkExhaustedError ## Extends - `Error` ## Constructors ### Constructor > **new WatermarkExhaustedError**(): `WatermarkExhaustedError` #### Returns `WatermarkExhaustedError` #### Overrides `Error.constructor` ## Properties ### cause? > `optional` **cause?**: `unknown` #### Inherited from `Error.cause` *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: WatermarkStore URL: https://docs.totem.ing/api/totemsdk-core/classes/WatermarkStore [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / WatermarkStore # Class: WatermarkStore ## Constructors ### Constructor > **new WatermarkStore**(`storage`, `logger?`, `config?`): `WatermarkStore` #### Parameters ##### storage [`StorageAdapter`](../interfaces/StorageAdapter.md) ##### logger? [`LoggerAdapter`](../interfaces/LoggerAdapter.md) = `...` ##### config? [`WatermarkStoreConfig`](../interfaces/WatermarkStoreConfig.md) = `{}` #### Returns `WatermarkStore` ## Methods ### advanceWatermark() > **advanceWatermark**(`indices`): `Promise`\<`void`\> #### Parameters ##### indices `WotsIndices` #### Returns `Promise`\<`void`\> *** ### clear() > **clear**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### getCurrent() > **getCurrent**(): [`WatermarkState`](../interfaces/WatermarkState.md) \| `null` #### Returns [`WatermarkState`](../interfaces/WatermarkState.md) \| `null` *** ### getNextIndices() > **getNextIndices**(): `WotsIndices` \| `null` #### Returns `WotsIndices` \| `null` *** ### getUsageStats() > **getUsageStats**(): `object` #### Returns `object` ##### percentage > **percentage**: `number` ##### total > **total**: `number` ##### used > **used**: `number` *** ### hasAvailableIndices() > **hasAvailableIndices**(): `boolean` #### Returns `boolean` *** ### initialize() > **initialize**(): `Promise`\<[`WatermarkState`](../interfaces/WatermarkState.md)\> #### Returns `Promise`\<[`WatermarkState`](../interfaces/WatermarkState.md)\> *** ### isExhausted() > **isExhausted**(): `boolean` #### Returns `boolean` *** ### isInitialized() > **isInitialized**(): `boolean` #### Returns `boolean` *** ### load() > **load**(): `Promise`\<[`WatermarkState`](../interfaces/WatermarkState.md) \| `null`\> #### Returns `Promise`\<[`WatermarkState`](../interfaces/WatermarkState.md) \| `null`\> *** ### markUsed() > **markUsed**(`indices`): `Promise`\<`void`\> #### Parameters ##### indices `WotsIndices` #### Returns `Promise`\<`void`\> *** ### save() > **save**(`watermark`): `Promise`\<`void`\> #### Parameters ##### watermark [`WatermarkState`](../interfaces/WatermarkState.md) #### Returns `Promise`\<`void`\> *** ### updateFromServer() > **updateFromServer**(`serverWatermark`): `Promise`\<[`SyncResult`](../interfaces/SyncResult.md)\> #### Parameters ##### serverWatermark `WotsIndices` #### Returns `Promise`\<[`SyncResult`](../interfaces/SyncResult.md)\> --- ## Page: F URL: https://docs.totem.ing/api/totemsdk-core/functions/F [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / F # Function: F() > **F**(`x`): `Uint8Array`\<`ArrayBufferLike`\> ## Parameters ### x `Uint8Array` ## Returns `Uint8Array`\<`ArrayBufferLike`\> --- ## Page: addressToRoot URL: https://docs.totem.ing/api/totemsdk-core/functions/addressToRoot [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / addressToRoot # Function: addressToRoot() > **addressToRoot**(`mx`): `Uint8Array` ## Parameters ### mx `string` ## Returns `Uint8Array` --- ## Page: aggregateSignatures URL: https://docs.totem.ing/api/totemsdk-core/functions/aggregateSignatures [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / aggregateSignatures # Function: aggregateSignatures() > **aggregateSignatures**(`totemSignature`, `externalSignatures`): `Uint8Array`\<`ArrayBufferLike`\>[] ## Parameters ### totemSignature #### publicKey `Uint8Array` #### signature `Uint8Array` ### externalSignatures [`ExternalSignature`](../interfaces/ExternalSignature.md)[] ## Returns `Uint8Array`\<`ArrayBufferLike`\>[] --- ## Page: assert32 URL: https://docs.totem.ing/api/totemsdk-core/functions/assert32 [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / assert32 # Function: assert32() > **assert32**(`u`, `label?`): `void` ## Parameters ### u `Uint8Array` ### label? `string` = `'value'` ## Returns `void` --- ## Page: baseWWithChecksum URL: https://docs.totem.ing/api/totemsdk-core/functions/baseWWithChecksum [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / baseWWithChecksum # Function: baseWWithChecksum() > **baseWWithChecksum**(`msgHash`, `paramSet?`): `number`[] Decompose digest into base-w digits + checksum Returns flat array of all L digits ## Parameters ### msgHash `Uint8Array` ### paramSet? [`ParamSet`](../type-aliases/ParamSet.md) ## Returns `number`[] --- ## Page: bigIntToByteArray URL: https://docs.totem.ing/api/totemsdk-core/functions/bigIntToByteArray [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / bigIntToByteArray # Function: bigIntToByteArray() > **bigIntToByteArray**(`value`): `Uint8Array` Convert a BigInt to Java BigInteger.toByteArray() format. Java BigInteger uses two's complement: - Zero → [0x00] - Positive with high bit set → leading 0x00 byte ## Parameters ### value `bigint` The BigInt value (must be non-negative) ## Returns `Uint8Array` Uint8Array in two's complement format --- ## Page: buildMinimaCoin URL: https://docs.totem.ing/api/totemsdk-core/functions/buildMinimaCoin [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / buildMinimaCoin # Function: buildMinimaCoin() > **buildMinimaCoin**(`opts`): [`MinimaCoin`](../interfaces/MinimaCoin.md) ## Parameters ### opts #### address `Uint8Array` #### amount `string` #### coinId? `Uint8Array`\<`ArrayBufferLike`\> #### coinProofData? [`CoinProofData`](../interfaces/CoinProofData.md) #### created? `bigint` #### mmrEntryNumber? `bigint` #### rawAmountBytes? `Uint8Array`\<`ArrayBufferLike`\> #### rawBlockCreatedBytes? `Uint8Array`\<`ArrayBufferLike`\> #### rawMmrEntryBytes? `Uint8Array`\<`ArrayBufferLike`\> #### spent? `boolean` #### state? [`StateVariable`](../interfaces/StateVariable.md)[] #### storeState? `boolean` #### tokenId? `Uint8Array`\<`ArrayBufferLike`\> ## Returns [`MinimaCoin`](../interfaces/MinimaCoin.md) --- ## Page: buildScriptProofFromDescriptor URL: https://docs.totem.ing/api/totemsdk-core/functions/buildScriptProofFromDescriptor [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / buildScriptProofFromDescriptor # Function: buildScriptProofFromDescriptor() > **buildScriptProofFromDescriptor**(`descriptor`): [`ScriptProofResult`](../interfaces/ScriptProofResult.md) ## Parameters ### descriptor [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) ## Returns [`ScriptProofResult`](../interfaces/ScriptProofResult.md) --- ## Page: bytesToUtf8 URL: https://docs.totem.ing/api/totemsdk-core/functions/bytesToUtf8 [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / bytesToUtf8 # Function: bytesToUtf8() > **bytesToUtf8**(`bytes`): `string` ## Parameters ### bytes `Uint8Array` ## Returns `string` --- ## Page: calculateProofRoot URL: https://docs.totem.ing/api/totemsdk-core/functions/calculateProofRoot [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / calculateProofRoot # Function: calculateProofRoot() > **calculateProofRoot**(`leafData`, `proof`): `Bytes` Calculate root from leaf data and proof Matches SignatureProof.getRootPublicKey() in Java From SignatureProof.java: MMRData pubentry = MMRData.CreateMMRDataLeafNode(mPublicKey, MiniNumber.ZERO); return mProof.calculateProof(pubentry).getData(); ## Parameters ### leafData [`MMRData`](../interfaces/MMRData.md) ### proof [`MMRProof`](../interfaces/MMRProof.md) ## Returns `Bytes` --- ## Page: canonicalJson URL: https://docs.totem.ing/api/totemsdk-core/functions/canonicalJson [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / canonicalJson # Function: canonicalJson() > **canonicalJson**(`value`): `string` ## Parameters ### value `unknown` ## Returns `string` --- ## Page: cleanSeedPhrase URL: https://docs.totem.ing/api/totemsdk-core/functions/cleanSeedPhrase [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / cleanSeedPhrase # Function: cleanSeedPhrase() > **cleanSeedPhrase**(`seedPhrase`): `string` Clean and normalize a seed phrase matching Minima's BIP39.cleanSeedPhrase() exactly From BIP39.java: - Split by whitespace - For each token: lowercase; length >= 3 required - If token length < 4: must match full word in wordlist - Else: accept FIRST word in wordlist that startsWith(token) - Join with single spaces, trim, then convert to UPPERCASE ## Parameters ### seedPhrase `string` Raw user input (may be abbreviated, mixed case) ## Returns `string` Canonical uppercase phrase with full words from BIP39 list ## Throws Error if any word cannot be matched --- ## Page: computeScriptAddress URL: https://docs.totem.ing/api/totemsdk-core/functions/computeScriptAddress [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / computeScriptAddress # Function: computeScriptAddress() > **computeScriptAddress**(`script`): `string` ## Parameters ### script `string` ## Returns `string` --- ## Page: concat URL: https://docs.totem.ing/api/totemsdk-core/functions/concat [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / concat # Function: concat() > **concat**(...`arrays`): `Uint8Array` ## Parameters ### arrays ...`Uint8Array`\<`ArrayBufferLike`\>[] ## Returns `Uint8Array` --- ## Page: convertFlatChunkToSDK URL: https://docs.totem.ing/api/totemsdk-core/functions/convertFlatChunkToSDK [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / convertFlatChunkToSDK # Function: convertFlatChunkToSDK() > **convertFlatChunkToSDK**(`chunk`): [`MMRProofChunk`](../interfaces/MMRProofChunk.md) ## Parameters ### chunk [`FlatMMRProofChunk`](../interfaces/FlatMMRProofChunk.md) ## Returns [`MMRProofChunk`](../interfaces/MMRProofChunk.md) --- ## Page: convertLegacyProofToSDK URL: https://docs.totem.ing/api/totemsdk-core/functions/convertLegacyProofToSDK [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / convertLegacyProofToSDK # Function: convertLegacyProofToSDK() > **convertLegacyProofToSDK**(`legacy`): `object` ## Parameters ### legacy [`LegacyMMRProof`](../interfaces/LegacyMMRProof.md) ## Returns `object` ### blockTime > **blockTime**: `bigint` ### proof > **proof**: [`MMRProof`](../interfaces/MMRProof.md) --- ## Page: convertStringToSeed URL: https://docs.totem.ing/api/totemsdk-core/functions/convertStringToSeed [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / convertStringToSeed # Function: convertStringToSeed() > **convertStringToSeed**(`phrase`): `Uint8Array` Convert a seed phrase to a 32-byte seed matching Minima's BIP39.convertStringToSeed() IMPORTANT: This is NOT standard BIP39! Minima simply hashes the phrase bytes with SHA3-256. No PBKDF2, no passphrase salt, no "mnemonic" prefix. From BIP39.java convertStringToSeed(): MiniString phrase = new MiniString(zPhrase); return new MiniData(Crypto.getInstance().hashData(phrase.getData())); ## Parameters ### phrase `string` Canonical phrase (should be cleaned first with cleanSeedPhrase) ## Returns `Uint8Array` 32-byte SHA3-256 seed --- ## Page: convertWordListToSeed URL: https://docs.totem.ing/api/totemsdk-core/functions/convertWordListToSeed [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / convertWordListToSeed # Function: convertWordListToSeed() > **convertWordListToSeed**(`words`): `Uint8Array` Convert word array to seed matching Minima's BIP39.convertWordListToSeed() From BIP39.java: String allwords = convertWordListToString(zWords); MiniString ministr = new MiniString(allwords); MiniData hash = new MiniData(Crypto.getInstance().hashData(ministr.getData())); ## Parameters ### words `string`[] Array of BIP39 words ## Returns `Uint8Array` 32-byte SHA3-256 seed --- ## Page: createAdapterRegistry URL: https://docs.totem.ing/api/totemsdk-core/functions/createAdapterRegistry [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / createAdapterRegistry # Function: createAdapterRegistry() > **createAdapterRegistry**(`adapters`): [`AdapterRegistry`](../interfaces/AdapterRegistry.md) ## Parameters ### adapters `Partial`\<[`AdapterRegistry`](../interfaces/AdapterRegistry.md)\> ## Returns [`AdapterRegistry`](../interfaces/AdapterRegistry.md) --- ## Page: createCancellationToken URL: https://docs.totem.ing/api/totemsdk-core/functions/createCancellationToken [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / createCancellationToken # Function: createCancellationToken() > **createCancellationToken**(): [`CancellationTokenSource`](../interfaces/CancellationTokenSource.md) ## Returns [`CancellationTokenSource`](../interfaces/CancellationTokenSource.md) --- ## Page: createDefaultTransaction URL: https://docs.totem.ing/api/totemsdk-core/functions/createDefaultTransaction [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / createDefaultTransaction # Function: createDefaultTransaction() > **createDefaultTransaction**(): [`MinimaTransaction`](../interfaces/MinimaTransaction.md) ## Returns [`MinimaTransaction`](../interfaces/MinimaTransaction.md) --- ## Page: createEmptyMMRProof URL: https://docs.totem.ing/api/totemsdk-core/functions/createEmptyMMRProof [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / createEmptyMMRProof # Function: createEmptyMMRProof() > **createEmptyMMRProof**(): [`MMRProof`](../interfaces/MMRProof.md) ## Returns [`MMRProof`](../interfaces/MMRProof.md) --- ## Page: createExchangeDescriptor URL: https://docs.totem.ing/api/totemsdk-core/functions/createExchangeDescriptor [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / createExchangeDescriptor # Function: createExchangeDescriptor() > **createExchangeDescriptor**(`address`, `ownerPublicKey`, `desiredAddress`, `desiredAmount`, `desiredTokenId`): [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) ## Parameters ### address `string` ### ownerPublicKey `string` ### desiredAddress `string` ### desiredAmount `string` ### desiredTokenId `string` ## Returns [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) --- ## Page: createFlashCashDescriptor URL: https://docs.totem.ing/api/totemsdk-core/functions/createFlashCashDescriptor [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / createFlashCashDescriptor # Function: createFlashCashDescriptor() > **createFlashCashDescriptor**(`address`, `ownerPublicKey`, `interestMultiplier?`): [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) ## Parameters ### address `string` ### ownerPublicKey `string` ### interestMultiplier? `string` = `'1.01'` ## Returns [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) --- ## Page: createHTLCDescriptor URL: https://docs.totem.ing/api/totemsdk-core/functions/createHTLCDescriptor [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / createHTLCDescriptor # Function: createHTLCDescriptor() > **createHTLCDescriptor**(`address`, `ownerPublicKey`, `recipientPublicKey`, `hashLock`, `timeoutBlock`, `isOwner`, `preimage?`): [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) ## Parameters ### address `string` ### ownerPublicKey `string` ### recipientPublicKey `string` ### hashLock `string` ### timeoutBlock `bigint` ### isOwner `boolean` ### preimage? `string` ## Returns [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) --- ## Page: createMASTDescriptor URL: https://docs.totem.ing/api/totemsdk-core/functions/createMASTDescriptor [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / createMASTDescriptor # Function: createMASTDescriptor() > **createMASTDescriptor**(`address`, `rootHash`, `branchScript`, `branchProof`, `wotsPublicKey?`): [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) ## Parameters ### address `string` ### rootHash `string` ### branchScript `string` ### branchProof `string` ### wotsPublicKey? `string` ## Returns [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) --- ## Page: createMMRDataLeafNode URL: https://docs.totem.ing/api/totemsdk-core/functions/createMMRDataLeafNode [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / createMMRDataLeafNode # Function: createMMRDataLeafNode() > **createMMRDataLeafNode**(`pubkey`, `sumValue?`): [`MMRData`](../interfaces/MMRData.md) Create MMRData leaf node matching Minima's MMRData.CreateMMRDataLeafNode From MMRData.java: MiniData hash = Crypto.getInstance().hashAllObjects(MiniNumber.ZERO, zData, zSumValue); CRITICAL: Crypto.hashAllObjects uses writeDataStream for Streamables: - MiniNumber: scale + len + data (see serializeMiniNumber) - MiniData: 4-byte length + data (see serializeMiniData) For TreeKeyNode, zData is the Winternitz public key (MiniData) and zSumValue is ZERO Serialization order: 1. MiniNumber.ZERO: [0x00, 0x01, 0x00] 2. MiniData (pubkey): [4-byte length] + [bytes] (writeDataStream, NOT writeHashToStream) 3. MiniNumber.ZERO: [0x00, 0x01, 0x00] ## Parameters ### pubkey `Bytes` ### sumValue? `bigint` = `0n` ## Returns [`MMRData`](../interfaces/MMRData.md) --- ## Page: createMMRDataParentNode URL: https://docs.totem.ing/api/totemsdk-core/functions/createMMRDataParentNode [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / createMMRDataParentNode # Function: createMMRDataParentNode() > **createMMRDataParentNode**(`left`, `right`): [`MMRData`](../interfaces/MMRData.md) Create MMRData parent node matching Minima's MMRData.CreateMMRDataParentNode From MMRData.java: MiniNumber sumvalue = zLeft.getValue().add(zRight.getValue()); MiniData combinedhash = Crypto.getInstance().hashAllObjects( MiniNumber.ONE, zLeft.getData(), zRight.getData(), sumvalue); CRITICAL: The getData() returns MiniData (the hash), which is serialized with writeDataStream (4-byte length) in hashAllObjects. Serialization order: 1. MiniNumber.ONE: [0x00, 0x01, 0x01] 2. MiniData (left.data): [4-byte length] + [bytes] 3. MiniData (right.data): [4-byte length] + [bytes] 4. MiniNumber (sumvalue): serialized MiniNumber ## Parameters ### left [`MMRData`](../interfaces/MMRData.md) ### right [`MMRData`](../interfaces/MMRData.md) ## Returns [`MMRData`](../interfaces/MMRData.md) --- ## Page: createMMREntryNumber URL: https://docs.totem.ing/api/totemsdk-core/functions/createMMREntryNumber [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / createMMREntryNumber # Function: createMMREntryNumber() > **createMMREntryNumber**(`value`): [`JavaMMREntryNumber`](../interfaces/JavaMMREntryNumber.md) Create MMREntryNumber from bigint (common case for integer positions) ## Parameters ### value `bigint` ## Returns [`JavaMMREntryNumber`](../interfaces/JavaMMREntryNumber.md) --- ## Page: createMofNMultisigDescriptor URL: https://docs.totem.ing/api/totemsdk-core/functions/createMofNMultisigDescriptor [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / createMofNMultisigDescriptor # Function: createMofNMultisigDescriptor() > **createMofNMultisigDescriptor**(`address`, `threshold`, `publicKeys`, `ownPublicKey`): [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) ## Parameters ### address `string` ### threshold `number` ### publicKeys `string`[] ### ownPublicKey `string` ## Returns [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) --- ## Page: createMultisigDescriptor URL: https://docs.totem.ing/api/totemsdk-core/functions/createMultisigDescriptor [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / createMultisigDescriptor # Function: createMultisigDescriptor() > **createMultisigDescriptor**(`address`, `publicKey1`, `publicKey2`, `ownPublicKey`): [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) ## Parameters ### address `string` ### publicKey1 `string` ### publicKey2 `string` ### ownPublicKey `string` ## Returns [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) --- ## Page: createPerAddressTreeKey URL: https://docs.totem.ing/api/totemsdk-core/functions/createPerAddressTreeKey [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / createPerAddressTreeKey # ~~Function: createPerAddressTreeKey()~~ > **createPerAddressTreeKey**(`baseSeed`, `addressIndex`): [`TreeKey`](../classes/TreeKey.md) ## Parameters ### baseSeed `Bytes` ### addressIndex `number` ## Returns [`TreeKey`](../classes/TreeKey.md) ## Deprecated Use [createUnifiedChildTreeKey](createUnifiedChildTreeKey.md) instead. This wrapper preserves the LEGACY per-address seed derivation (`SHA3-256(baseSeed ‖ indexBytes(i))`) so that existing callers that import this symbol by name continue to derive the same keys. New code must use createUnifiedChildTreeKey which applies the unified two-step derivation (root_priv_seed → child_seed_i). --- ## Page: createPerAddressTreeKeyAsync URL: https://docs.totem.ing/api/totemsdk-core/functions/createPerAddressTreeKeyAsync [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / createPerAddressTreeKeyAsync # ~~Function: createPerAddressTreeKeyAsync()~~ > **createPerAddressTreeKeyAsync**(`baseSeed`, `addressIndex`, `onProgress?`): `Promise`\<[`TreeKey`](../classes/TreeKey.md)\> ## Parameters ### baseSeed `Bytes` ### addressIndex `number` ### onProgress? [`ProgressCallback`](../type-aliases/ProgressCallback.md) ## Returns `Promise`\<[`TreeKey`](../classes/TreeKey.md)\> ## Deprecated Use [createUnifiedChildTreeKeyAsync](createUnifiedChildTreeKeyAsync.md) instead. Preserves legacy per-address seed derivation for backward compatibility. --- ## Page: createSignedByDescriptor URL: https://docs.totem.ing/api/totemsdk-core/functions/createSignedByDescriptor [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / createSignedByDescriptor # Function: createSignedByDescriptor() > **createSignedByDescriptor**(`address`, `wotsRootPublicKey`): [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) ## Parameters ### address `string` ### wotsRootPublicKey `string` ## Returns [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) --- ## Page: createSlowCashDescriptor URL: https://docs.totem.ing/api/totemsdk-core/functions/createSlowCashDescriptor [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / createSlowCashDescriptor # Function: createSlowCashDescriptor() > **createSlowCashDescriptor**(`address`, `ownerPublicKey`, `withdrawalPercent?`, `cooldownBlocks?`): [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) ## Parameters ### address `string` ### ownerPublicKey `string` ### withdrawalPercent? `string` = `'0.9'` ### cooldownBlocks? `bigint` = `10000n` ## Returns [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) --- ## Page: createTimelockDescriptor URL: https://docs.totem.ing/api/totemsdk-core/functions/createTimelockDescriptor [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / createTimelockDescriptor # Function: createTimelockDescriptor() > **createTimelockDescriptor**(`address`, `publicKey`, `unlockBlock`): [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) ## Parameters ### address `string` ### publicKey `string` ### unlockBlock `bigint` ## Returns [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) --- ## Page: createUnifiedChildTreeKey URL: https://docs.totem.ing/api/totemsdk-core/functions/createUnifiedChildTreeKey [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / createUnifiedChildTreeKey # Function: createUnifiedChildTreeKey() > **createUnifiedChildTreeKey**(`baseSeed`, `index`): [`TreeKey`](../classes/TreeKey.md) Create the unified child TreeKey for spend address at `index`. Derivation: child_seed_i = deriveUnifiedChildSeed(baseSeed, i) treeKey = new TreeKey(child_seed_i, 64, 3) ## Parameters ### baseSeed `Bytes` 32-byte wallet base seed (from mnemonic) ### index `number` Address index (0-63) ## Returns [`TreeKey`](../classes/TreeKey.md) TreeKey for this spend address with size=64, depth=3 --- ## Page: createUnifiedChildTreeKeyAsync URL: https://docs.totem.ing/api/totemsdk-core/functions/createUnifiedChildTreeKeyAsync [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / createUnifiedChildTreeKeyAsync # Function: createUnifiedChildTreeKeyAsync() > **createUnifiedChildTreeKeyAsync**(`baseSeed`, `index`, `onProgress?`): `Promise`\<[`TreeKey`](../classes/TreeKey.md)\> Async version with progress reporting for UI. ## Parameters ### baseSeed `Bytes` 32-byte wallet base seed ### index `number` Address index (0-63) ### onProgress? [`ProgressCallback`](../type-aliases/ProgressCallback.md) Optional progress callback ## Returns `Promise`\<[`TreeKey`](../classes/TreeKey.md)\> Promise resolving to the child TreeKey --- ## Page: createUnifiedRootTreeKey URL: https://docs.totem.ing/api/totemsdk-core/functions/createUnifiedRootTreeKey [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / createUnifiedRootTreeKey # Function: createUnifiedRootTreeKey() > **createUnifiedRootTreeKey**(`baseSeed`): [`TreeKey`](../classes/TreeKey.md) Create the unified root identity TreeKey (identity anchor, never a spend address). Derivation: root_priv_seed = deriveRootPrivSeed(baseSeed) treeKey = new TreeKey(root_priv_seed, 64, 3) ## Parameters ### baseSeed `Bytes` 32-byte wallet base seed (from mnemonic) ## Returns [`TreeKey`](../classes/TreeKey.md) Root identity TreeKey with size=64, depth=3 --- ## Page: deduplicateScriptDescriptors URL: https://docs.totem.ing/api/totemsdk-core/functions/deduplicateScriptDescriptors [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / deduplicateScriptDescriptors # Function: deduplicateScriptDescriptors() > **deduplicateScriptDescriptors**(`descriptors`): `Map`\<`string`, [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md)\> ## Parameters ### descriptors [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md)[] ## Returns `Map`\<`string`, [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md)\> --- ## Page: deriveAddressFromPublicKey URL: https://docs.totem.ing/api/totemsdk-core/functions/deriveAddressFromPublicKey [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / deriveAddressFromPublicKey # Function: deriveAddressFromPublicKey() > **deriveAddressFromPublicKey**(`publicKeyHex`): `string` ## Parameters ### publicKeyHex `string` ## Returns `string` --- ## Page: deriveChildTreeSeedJava URL: https://docs.totem.ing/api/totemsdk-core/functions/deriveChildTreeSeedJava [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / deriveChildTreeSeedJava # Function: deriveChildTreeSeedJava() > **deriveChildTreeSeedJava**(`childSeed`, `childIndex`): `Uint8Array` Derive child tree seed matching Java TreeKeyNode.java exactly From TreeKeyNode.java getChild (line 68): MiniData seed = Crypto.getInstance().hashAllObjects(new MiniNumber(zChild), mChildSeed); The child seed is derived from parent's private seed: mChildSeed = Crypto.getInstance().hashObject(zPrivateSeed); // line 30 ## Parameters ### childSeed `Uint8Array` 32-byte child seed (hash of parent's private seed) ### childIndex `number` Child index (0-63) ## Returns `Uint8Array` 32-byte derived seed for child tree --- ## Page: deriveUnifiedAddressPublicKey URL: https://docs.totem.ing/api/totemsdk-core/functions/deriveUnifiedAddressPublicKey [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / deriveUnifiedAddressPublicKey # Function: deriveUnifiedAddressPublicKey() > **deriveUnifiedAddressPublicKey**(`baseSeed`, `index`): `Bytes` Fast path for deriving a child address public key without constructing the full TreeKey. Useful during wallet initialisation. ## Parameters ### baseSeed `Bytes` 32-byte wallet base seed ### index `number` Address index (0-63) ## Returns `Bytes` 32-byte address public key (MMR root of child TreeKey) --- ## Page: deriveUnifiedChildSeed URL: https://docs.totem.ing/api/totemsdk-core/functions/deriveUnifiedChildSeed [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / deriveUnifiedChildSeed # Function: deriveUnifiedChildSeed() > **deriveUnifiedChildSeed**(`baseSeed`, `index`): `Uint8Array` Derive a unified child seed for the address at `index`. Architecture: child_seed_i = SHA3-256( serializeMiniData(root_priv_seed) ‖ serializeMiniData(indexBytes(i)) ) ## Parameters ### baseSeed `Uint8Array` 32-byte wallet base seed (from mnemonic) ### index `number` Address index (0-63) ## Returns `Uint8Array` 32-byte child seed for the TreeKey at this address --- ## Page: deserializeTreeSignature URL: https://docs.totem.ing/api/totemsdk-core/functions/deserializeTreeSignature [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / deserializeTreeSignature # Function: deserializeTreeSignature() > **deserializeTreeSignature**(`data`): [`TreeSignature`](../interfaces/TreeSignature.md) Deserialize a TreeSignature from bytes Matches Java's Signature.readDataStream(): - Number of proofs: MiniNumber format - Each SignatureProof: MiniData(pubkey) + MiniData(signature) + MMRProof ## Parameters ### data `Bytes` ## Returns [`TreeSignature`](../interfaces/TreeSignature.md) --- ## Page: encodeMiniData URL: https://docs.totem.ing/api/totemsdk-core/functions/encodeMiniData [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / encodeMiniData # Function: encodeMiniData() > **encodeMiniData**(`data`): `Uint8Array` ## Parameters ### data `Uint8Array` ## Returns `Uint8Array` --- ## Page: encodeMiniNumber URL: https://docs.totem.ing/api/totemsdk-core/functions/encodeMiniNumber [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / encodeMiniNumber # Function: encodeMiniNumber() > **encodeMiniNumber**(`value`, `scale?`): `Uint8Array` ## Parameters ### value `bigint` ### scale? `number` = `0` ## Returns `Uint8Array` --- ## Page: encodeMiniString URL: https://docs.totem.ing/api/totemsdk-core/functions/encodeMiniString [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / encodeMiniString # Function: encodeMiniString() > **encodeMiniString**(`str`): `Uint8Array` ## Parameters ### str `string` ## Returns `Uint8Array` --- ## Page: encodeStateValue URL: https://docs.totem.ing/api/totemsdk-core/functions/encodeStateValue [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / encodeStateValue # Function: encodeStateValue() > **encodeStateValue**(`stateValue`): `Uint8Array` ## Parameters ### stateValue [`StateValue`](../interfaces/StateValue.md) ## Returns `Uint8Array` --- ## Page: finalizeLease URL: https://docs.totem.ing/api/totemsdk-core/functions/finalizeLease [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / finalizeLease # Function: finalizeLease() > **finalizeLease**(`apiUrl`, `apiKey`, `leaseToken`, `signedHex`): `Promise`\<\{ `body`: `string`; `status`: `number`; \}\> ## Parameters ### apiUrl `string` ### apiKey `string` ### leaseToken `string` ### signedHex `string` ## Returns `Promise`\<\{ `body`: `string`; `status`: `number`; \}\> --- ## Page: flatIndexFromLanes URL: https://docs.totem.ing/api/totemsdk-core/functions/flatIndexFromLanes [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / flatIndexFromLanes # Function: flatIndexFromLanes() > **flatIndexFromLanes**(`addressIndex`, `l1`, `l2`): `number` lane tuple -> flat WOTS index (64^3 space) ## Parameters ### addressIndex `number` ### l1 `number` ### l2 `number` ## Returns `number` --- ## Page: fromHex URL: https://docs.totem.ing/api/totemsdk-core/functions/fromHex [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / fromHex # Function: fromHex() > **fromHex**(`h`): `Uint8Array` ## Parameters ### h `string` ## Returns `Uint8Array` --- ## Page: generateSeedPhrase URL: https://docs.totem.ing/api/totemsdk-core/functions/generateSeedPhrase [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / generateSeedPhrase # Function: generateSeedPhrase() > **generateSeedPhrase**(): `string` Generate a new random seed phrase as a string ## Returns `string` 24-word phrase in UPPERCASE (canonical form) --- ## Page: generateWordList URL: https://docs.totem.ing/api/totemsdk-core/functions/generateWordList [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / generateWordList # Function: generateWordList() > **generateWordList**(): `string`[] Generate a new random 24-word seed phrase Uses crypto.getRandomValues for secure randomness ## Returns `string`[] Array of 24 random BIP39 words (lowercase) --- ## Page: getParamSet URL: https://docs.totem.ing/api/totemsdk-core/functions/getParamSet [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / getParamSet # Function: getParamSet() > **getParamSet**(`_env?`): [`ParamSet`](../type-aliases/ParamSet.md) ## Parameters ### \_env? `string` ## Returns [`ParamSet`](../type-aliases/ParamSet.md) --- ## Page: getRootPublicKey URL: https://docs.totem.ing/api/totemsdk-core/functions/getRootPublicKey [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / getRootPublicKey # Function: getRootPublicKey() > **getRootPublicKey**(`proof`): `Bytes` Compute root public key from a Winternitz signature proof Matches SignatureProof.getRootPublicKey() in Java ## Parameters ### proof [`SignatureProof`](../interfaces/SignatureProof.md) ## Returns `Bytes` --- ## Page: hashAllObjects URL: https://docs.totem.ing/api/totemsdk-core/functions/hashAllObjects [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / hashAllObjects # Function: hashAllObjects() > **hashAllObjects**(...`items`): `Uint8Array` Hash multiple Streamable objects (Java compatible) From Crypto.java hashAllObjects: 1. Write each object to DataOutputStream 2. SHA3-256 hash the combined bytes This matches TreeKeyNode.java seed derivation: Crypto.getInstance().hashAllObjects(new MiniNumber(i), zPrivateSeed) ## Parameters ### items ...`Uint8Array`\<`ArrayBufferLike`\>[] Array of serialized objects (use serializeMiniNumber/serializeMiniData) ## Returns `Uint8Array` 32-byte SHA3-256 hash --- ## Page: hashCanonical URL: https://docs.totem.ing/api/totemsdk-core/functions/hashCanonical [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / hashCanonical # Function: hashCanonical() > **hashCanonical**(`domain`, `value`): `string` ## Parameters ### domain `string` ### value `unknown` ## Returns `string` --- ## Page: hashObject URL: https://docs.totem.ing/api/totemsdk-core/functions/hashObject [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / hashObject # Function: hashObject() > **hashObject**(`data`): `Uint8Array` Hash a single object matching Java's Crypto.hashObject() From TreeKeyNode.java line 30: mChildSeed = Crypto.getInstance().hashObject(zPrivateSeed); This serializes the object as MiniData (length-prefixed) and hashes it. ## Parameters ### data `Uint8Array` Raw bytes (will be serialized as MiniData) ## Returns `Uint8Array` 32-byte SHA3-256 hash --- ## Page: hex URL: https://docs.totem.ing/api/totemsdk-core/functions/hex [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / hex # Function: hex() > **hex**(`u`): `string` ## Parameters ### u `Uint8Array` ## Returns `string` --- ## Page: indexToMiniDataBytes URL: https://docs.totem.ing/api/totemsdk-core/functions/indexToMiniDataBytes [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / indexToMiniDataBytes # Function: indexToMiniDataBytes() > **indexToMiniDataBytes**(`index`): `Uint8Array` Convert index to MiniData bytes matching Java's: new MiniData(new BigInteger(Integer.toString(index))) BigInteger uses minimum byte representation (no leading zeros). This is used for per-address key derivation in Wallet.java. ## Parameters ### index `number` Non-negative integer (0, 1, 2, ...) ## Returns `Uint8Array` Minimal byte representation of the index --- ## Page: javaHashAllObjects URL: https://docs.totem.ing/api/totemsdk-core/functions/javaHashAllObjects [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / javaHashAllObjects # Function: javaHashAllObjects() > **javaHashAllObjects**(...`items`): `Uint8Array` Java hashAllObjects for MMRData hashing Used for MMRData.CreateMMRDataLeafNode and CreateMMRDataParentNode From Crypto.java hashAllObjects: Serializes each Streamable object and hashes the concatenation. For MMRData, the serialization is: - MiniNumber: [scale][len][data] (see serializeMiniNumber) - MiniData: [4-byte len][data] for writeDataStream - Hash: [4-byte len][data] for writeHashToStream (same as MiniData) CRITICAL: Java writeHashToStream uses writeInt (4-byte prefix), identical to writeDataStream. See MiniData.java lines 282-289. ## Parameters ### items ...`Uint8Array`\<`ArrayBufferLike`\>[] Pre-serialized items to concatenate and hash ## Returns `Uint8Array` 32-byte SHA3-256 hash --- ## Page: mmrLeafExact URL: https://docs.totem.ing/api/totemsdk-core/functions/mmrLeafExact [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / mmrLeafExact # Function: mmrLeafExact() > **mmrLeafExact**(`script`): `Bytes` Byte-exact one-leaf MMR leaf used by Minima Address.java path: sha3( MiniNumber.ZERO || MiniString(script) || MiniNumber.ZERO ) ## Parameters ### script `string` ## Returns `Bytes` --- ## Page: mmrRootFromSingleLeaf URL: https://docs.totem.ing/api/totemsdk-core/functions/mmrRootFromSingleLeaf [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / mmrRootFromSingleLeaf # Function: mmrRootFromSingleLeaf() > **mmrRootFromSingleLeaf**(`script`): `Bytes` In a single-leaf MMR the root equals the leaf commitment. ## Parameters ### script `string` ## Returns `Bytes` --- ## Page: mxToHex URL: https://docs.totem.ing/api/totemsdk-core/functions/mxToHex [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / mxToHex # Function: mxToHex() > **mxToHex**(`address`): `string` Convert an Mx (radix-32) or hex Minima address to lowercase hex. ## Parameters ### address `string` ## Returns `string` --- ## Page: normalizeHex URL: https://docs.totem.ing/api/totemsdk-core/functions/normalizeHex [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / normalizeHex # Function: normalizeHex() > **normalizeHex**(`hex`): `string` ## Parameters ### hex `string` ## Returns `string` --- ## Page: parseDecimalToMiniNumber URL: https://docs.totem.ing/api/totemsdk-core/functions/parseDecimalToMiniNumber [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / parseDecimalToMiniNumber # Function: parseDecimalToMiniNumber() > **parseDecimalToMiniNumber**(`decimal`): [`ParsedMiniNumber`](../interfaces/ParsedMiniNumber.md) ## Parameters ### decimal `string` ## Returns [`ParsedMiniNumber`](../interfaces/ParsedMiniNumber.md) --- ## Page: parseMMRProofFromHex URL: https://docs.totem.ing/api/totemsdk-core/functions/parseMMRProofFromHex [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / parseMMRProofFromHex # Function: parseMMRProofFromHex() > **parseMMRProofFromHex**(`data`): `object` Deserialize MMRProof from bytes matching Minima's MMRProof.readDataStream() Format: 1. blockTime (MiniNumber) 2. chain length (MiniNumber) 3. Each chunk: isLeft (1 byte) + MMRData (hash with 4-byte length prefix + value MiniNumber) CRITICAL: Java MMRData.readDataStream uses mData.readHashFromStream() which reads a 4-byte big-endian length prefix followed by the hash bytes. ## Parameters ### data `Bytes` ## Returns `object` ### blockTime > **blockTime**: `bigint` ### bytesRead > **bytesRead**: `number` ### proof > **proof**: [`MMRProof`](../interfaces/MMRProof.md) --- ## Page: phraseToSeed URL: https://docs.totem.ing/api/totemsdk-core/functions/phraseToSeed [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / phraseToSeed # Function: phraseToSeed() > **phraseToSeed**(`rawPhrase`): `Uint8Array` Full pipeline: raw user input → 32-byte seed 1. cleanSeedPhrase() - normalize with prefix matching, output uppercase 2. convertStringToSeed() - SHA3-256 hash of phrase bytes ## Parameters ### rawPhrase `string` User's input (may be abbreviated, mixed case) ## Returns `Uint8Array` 32-byte seed for TreeKey ## Throws Error if phrase contains invalid words --- ## Page: prepareLease URL: https://docs.totem.ing/api/totemsdk-core/functions/prepareLease [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / prepareLease # Function: prepareLease() > **prepareLease**(`apiUrl`, `apiKey`, `args`): `Promise`\<[`PrepareResp`](../type-aliases/PrepareResp.md)\> ## Parameters ### apiUrl `string` ### apiKey `string` ### args [`PrepareArgs`](../type-aliases/PrepareArgs.md) ## Returns `Promise`\<[`PrepareResp`](../type-aliases/PrepareResp.md)\> --- ## Page: prfChainSeed URL: https://docs.totem.ing/api/totemsdk-core/functions/prfChainSeed [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / prfChainSeed # ~~Function: prfChainSeed()~~ > **prfChainSeed**(`seed`, `i`, `j`, `_paramSet`): `Uint8Array` ## Parameters ### seed `Uint8Array` ### i `number` ### j `number` ### \_paramSet [`ParamSet`](../type-aliases/ParamSet.md) ## Returns `Uint8Array` ## Deprecated Use expandPrivateKey instead --- ## Page: scriptFromWotsPk URL: https://docs.totem.ing/api/totemsdk-core/functions/scriptFromWotsPk [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / scriptFromWotsPk # Function: scriptFromWotsPk() > **scriptFromWotsPk**(`pkDigest32`): `string` Produce KISSVM script that authorizes with a WOTS PK digest (32 bytes). ## Parameters ### pkDigest32 `Uint8Array` ## Returns `string` --- ## Page: scriptToAddress URL: https://docs.totem.ing/api/totemsdk-core/functions/scriptToAddress [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / scriptToAddress # Function: scriptToAddress() > **scriptToAddress**(`script`): `string` ## Parameters ### script `string` ## Returns `string` --- ## Page: serializeCoin URL: https://docs.totem.ing/api/totemsdk-core/functions/serializeCoin [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / serializeCoin # Function: serializeCoin() > **serializeCoin**(`coin`): `Uint8Array` ## Parameters ### coin [`MinimaCoin`](../interfaces/MinimaCoin.md) ## Returns `Uint8Array` --- ## Page: serializeExtraScripts URL: https://docs.totem.ing/api/totemsdk-core/functions/serializeExtraScripts [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / serializeExtraScripts # Function: serializeExtraScripts() > **serializeExtraScripts**(`extraScripts`): `Uint8Array` ## Parameters ### extraScripts `Map`\<`string`, `string`\> ## Returns `Uint8Array` --- ## Page: serializeMMRData URL: https://docs.totem.ing/api/totemsdk-core/functions/serializeMMRData [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / serializeMMRData # Function: serializeMMRData() > **serializeMMRData**(`mmrData`): `Uint8Array` Serialize MMRData matching Java MMRData.writeDataStream() From MMRData.java: mData.writeHashToStream(zOut); // 4-byte length prefix + hash bytes mValue.writeDataStream(zOut); // MiniNumber format ## Parameters ### mmrData [`JavaMMRData`](../interfaces/JavaMMRData.md) MMRData to serialize ## Returns `Uint8Array` Serialized bytes: writeHashToStream(hash) + MiniNumber(value) --- ## Page: serializeMMREntry URL: https://docs.totem.ing/api/totemsdk-core/functions/serializeMMREntry [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / serializeMMREntry # Function: serializeMMREntry() > **serializeMMREntry**(`entry`): `Uint8Array` Serialize MMREntry matching Java MMREntry.writeDataStream() From MMREntry.java: MiniNumber row = new MiniNumber(mRow); row.writeDataStream(zOut); mEntryNumber.writeDataStream(zOut); mMMRData.writeDataStream(zOut); ## Parameters ### entry [`JavaMMREntry`](../interfaces/JavaMMREntry.md) MMREntry to serialize ## Returns `Uint8Array` Serialized bytes: MiniNumber(row) + MMREntryNumber + MMRData --- ## Page: serializeMMREntryNumber URL: https://docs.totem.ing/api/totemsdk-core/functions/serializeMMREntryNumber [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / serializeMMREntryNumber # Function: serializeMMREntryNumber() > **serializeMMREntryNumber**(`entry`): `Uint8Array` Serialize MMREntryNumber matching Java MMREntryNumber.writeDataStream() From MMREntryNumber.java: MiniNumber.WriteToStream(zOut, mNumber.scale()); MiniData.WriteToStream(zOut, mNumber.unscaledValue().toByteArray()); ## Parameters ### entry [`JavaMMREntryNumber`](../interfaces/JavaMMREntryNumber.md) MMREntryNumber to serialize ## Returns `Uint8Array` Serialized bytes: MiniNumber(scale) + MiniData(unscaled bytes) --- ## Page: serializeMMRProof URL: https://docs.totem.ing/api/totemsdk-core/functions/serializeMMRProof [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / serializeMMRProof # Function: serializeMMRProof() > **serializeMMRProof**(`proof`, `blockTime?`): `Bytes` ## Parameters ### proof #### chunks `object`[] ### blockTime? `bigint` = `0n` ## Returns `Bytes` --- ## Page: serializeMMRProofChunk URL: https://docs.totem.ing/api/totemsdk-core/functions/serializeMMRProofChunk [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / serializeMMRProofChunk # Function: serializeMMRProofChunk() > **serializeMMRProofChunk**(`chunk`): `Uint8Array` ## Parameters ### chunk [`MMRProofChunk`](../interfaces/MMRProofChunk.md) ## Returns `Uint8Array` --- ## Page: serializeMiniData URL: https://docs.totem.ing/api/totemsdk-core/functions/serializeMiniData [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / serializeMiniData # Function: serializeMiniData() > **serializeMiniData**(`data`): `Uint8Array` Serialize bytes in MiniData format (Java compatible) Re-export of Streamable.writeMiniData for backward compatibility. ## Parameters ### data `Uint8Array` Bytes to serialize ## Returns `Uint8Array` Serialized bytes matching Java MiniData format --- ## Page: serializeMiniNumber URL: https://docs.totem.ing/api/totemsdk-core/functions/serializeMiniNumber [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / serializeMiniNumber # Function: serializeMiniNumber() > **serializeMiniNumber**(`n`): `Uint8Array` Serialize a number in MiniNumber format (Java compatible) Thin wrapper over Streamable.writeMiniNumber that accepts number for backward compatibility. ## Parameters ### n `number` Non-negative integer to serialize ## Returns `Uint8Array` Serialized bytes matching Java MiniNumber format --- ## Page: serializeMiniNumberONE URL: https://docs.totem.ing/api/totemsdk-core/functions/serializeMiniNumberONE [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / serializeMiniNumberONE # Function: serializeMiniNumberONE() > **serializeMiniNumberONE**(): `Uint8Array` Serialize MiniNumber.ONE Returns: [0x00, 0x01, 0x01] = scale(0) + length(1) + value(1) ## Returns `Uint8Array` --- ## Page: serializeMiniNumberZERO URL: https://docs.totem.ing/api/totemsdk-core/functions/serializeMiniNumberZERO [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / serializeMiniNumberZERO # Function: serializeMiniNumberZERO() > **serializeMiniNumberZERO**(): `Uint8Array` Serialize MiniNumber.ZERO - cached for performance Returns: [0x00, 0x01, 0x00] = scale(0) + length(1) + value(0) ## Returns `Uint8Array` --- ## Page: serializeScriptProofWithProof URL: https://docs.totem.ing/api/totemsdk-core/functions/serializeScriptProofWithProof [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / serializeScriptProofWithProof # Function: serializeScriptProofWithProof() > **serializeScriptProofWithProof**(`script`, `proof`, `blockTime?`): `Uint8Array` ## Parameters ### script `string` ### proof [`MMRProof`](../interfaces/MMRProof.md) ### blockTime? `bigint` = `0n` ## Returns `Uint8Array` --- ## Page: serializeStateVariables URL: https://docs.totem.ing/api/totemsdk-core/functions/serializeStateVariables [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / serializeStateVariables # Function: serializeStateVariables() > **serializeStateVariables**(`stateValues`): `Uint8Array` ## Parameters ### stateValues [`StateValue`](../interfaces/StateValue.md)[] ## Returns `Uint8Array` --- ## Page: serializeTreeSignature URL: https://docs.totem.ing/api/totemsdk-core/functions/serializeTreeSignature [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / serializeTreeSignature # Function: serializeTreeSignature() > **serializeTreeSignature**(`sig`): `Bytes` Serialize a TreeSignature to bytes Uses Streamable.writeSignature() for byte-exact compatibility with Java's Signature.writeDataStream(). ## Parameters ### sig [`TreeSignature`](../interfaces/TreeSignature.md) ## Returns `Bytes` --- ## Page: simpleTotemSendRequest URL: https://docs.totem.ing/api/totemsdk-core/functions/simpleTotemSendRequest [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / simpleTotemSendRequest # Function: simpleTotemSendRequest() > **simpleTotemSendRequest**(`to`, `amount`, `tokenId?`): [`TotemSendTransactionRequest`](../interfaces/TotemSendTransactionRequest.md) ## Parameters ### to `string` ### amount `string` ### tokenId? `string` ## Returns [`TotemSendTransactionRequest`](../interfaces/TotemSendTransactionRequest.md) --- ## Page: toHex URL: https://docs.totem.ing/api/totemsdk-core/functions/toHex [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / toHex # Function: toHex() > **toHex**(`bytes`): `string` ## Parameters ### bytes `Uint8Array` ## Returns `string` --- ## Page: toWinternitzDigits URL: https://docs.totem.ing/api/totemsdk-core/functions/toWinternitzDigits [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / toWinternitzDigits # Function: toWinternitzDigits() > **toWinternitzDigits**(`hash32`, `ps?`): `object` Convert message hash to Winternitz digits with checksum For w=8 (8 bits per digit), since 8 % 8 == 0: - Each byte of the hash IS one digit (0-255) - messagesize = 32 digits - checksum = (messagesize << w) - sum = 8192 - sum - checksumsize = 14 bits, extracted as 2 digits Matches WinternitzOTSignature.getSignature() for w=8 case ## Parameters ### hash32 `Uint8Array` ### ps? [`ParamSet`](../type-aliases/ParamSet.md) = `...` ## Returns `object` ### checksumDigits > **checksumDigits**: `number`[] ### digits > **digits**: `number`[] ### total > **total**: `number` --- ## Page: u16be URL: https://docs.totem.ing/api/totemsdk-core/functions/u16be [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / u16be # Function: u16be() > **u16be**(`n`): `Uint8Array`\<`ArrayBuffer`\> ## Parameters ### n `number` ## Returns `Uint8Array`\<`ArrayBuffer`\> --- ## Page: u32be URL: https://docs.totem.ing/api/totemsdk-core/functions/u32be [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / u32be # Function: u32be() > **u32be**(`n`): `Uint8Array`\<`ArrayBuffer`\> ## Parameters ### n `number` ## Returns `Uint8Array`\<`ArrayBuffer`\> --- ## Page: utf8ToBytes URL: https://docs.totem.ing/api/totemsdk-core/functions/utf8ToBytes [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / utf8ToBytes # Function: utf8ToBytes() > **utf8ToBytes**(`str`): `Uint8Array` ## Parameters ### str `string` ## Returns `Uint8Array` --- ## Page: validateExternalSignature URL: https://docs.totem.ing/api/totemsdk-core/functions/validateExternalSignature [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / validateExternalSignature # Function: validateExternalSignature() > **validateExternalSignature**(`signature`, `transactionDigest`): `boolean` ## Parameters ### signature [`ExternalSignature`](../interfaces/ExternalSignature.md) ### transactionDigest `Uint8Array` ## Returns `boolean` --- ## Page: validatePhrase URL: https://docs.totem.ing/api/totemsdk-core/functions/validatePhrase [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / validatePhrase # Function: validatePhrase() > **validatePhrase**(`phrase`): `boolean` Validate that a phrase contains valid BIP39 words Does NOT check checksum (Minima doesn't use checksums) ## Parameters ### phrase `string` Space-separated words (any case) ## Returns `boolean` true if all words are valid BIP39 words --- ## Page: validateSendTransactionRequest URL: https://docs.totem.ing/api/totemsdk-core/functions/validateSendTransactionRequest [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / validateSendTransactionRequest # Function: validateSendTransactionRequest() > **validateSendTransactionRequest**(`request`): `object` ## Parameters ### request `unknown` ## Returns `object` ### errors > **errors**: `string`[] ### valid > **valid**: `boolean` --- ## Page: verifySignature URL: https://docs.totem.ing/api/totemsdk-core/functions/verifySignature [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / verifySignature # Function: verifySignature() > **verifySignature**(`address`, `message`, `signatureHex`, `publicKeyHex`): `boolean` ## Parameters ### address `string` ### message `string` ### signatureHex `string` ### publicKeyHex `string` ## Returns `boolean` --- ## Page: verifySignatureDetailed URL: https://docs.totem.ing/api/totemsdk-core/functions/verifySignatureDetailed [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / verifySignatureDetailed # Function: verifySignatureDetailed() > **verifySignatureDetailed**(`address`, `message`, `signatureHex`, `publicKeyHex`): [`VerificationResult`](../interfaces/VerificationResult.md) ## Parameters ### address `string` ### message `string` ### signatureHex `string` ### publicKeyHex `string` ## Returns [`VerificationResult`](../interfaces/VerificationResult.md) --- ## Page: verifyTreeSignature URL: https://docs.totem.ing/api/totemsdk-core/functions/verifyTreeSignature [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / verifyTreeSignature # Function: verifyTreeSignature() > **verifyTreeSignature**(`expectedPubkey`, `data`, `signature`): `boolean` Verify a tree signature against expected public key and data Matches TreeKey.java verify(): - First proof's computed root must match expected public key - Each intermediate proof must sign the next level's root - Final proof must verify against the actual data ## Parameters ### expectedPubkey `Bytes` ### data `Bytes` ### signature [`TreeSignature`](../interfaces/TreeSignature.md) ## Returns `boolean` --- ## Page: verifyTreeSignatureDetailed URL: https://docs.totem.ing/api/totemsdk-core/functions/verifyTreeSignatureDetailed [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / verifyTreeSignatureDetailed # Function: verifyTreeSignatureDetailed() > **verifyTreeSignatureDetailed**(`expectedPubkey`, `data`, `signature`): [`VerificationResult`](../interfaces/VerificationResult.md) ## Parameters ### expectedPubkey `Bytes` ### data `Bytes` ### signature [`TreeSignature`](../interfaces/TreeSignature.md) ## Returns [`VerificationResult`](../interfaces/VerificationResult.md) --- ## Page: wotsAddressFromKeypair URL: https://docs.totem.ing/api/totemsdk-core/functions/wotsAddressFromKeypair [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / wotsAddressFromKeypair # Function: wotsAddressFromKeypair() ## Call Signature > **wotsAddressFromKeypair**(`seed`, `index`): `string` ### Parameters #### seed `Uint8Array` #### index `number` ### Returns `string` ## Call Signature > **wotsAddressFromKeypair**(`kp`): `string` ### Parameters #### kp ##### index `number` ##### seed `Uint8Array` ### Returns `string` --- ## Page: wotsKeypairFromSeed URL: https://docs.totem.ing/api/totemsdk-core/functions/wotsKeypairFromSeed [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / wotsKeypairFromSeed # Function: wotsKeypairFromSeed() > **wotsKeypairFromSeed**(`seed`, `index`): `object` ## Parameters ### seed `Uint8Array` ### index `number` ## Returns `object` ### index > **index**: `number` ### pk > **pk**: `Uint8Array` ### seed > **seed**: `Uint8Array` --- ## Page: wotsSignLegacy URL: https://docs.totem.ing/api/totemsdk-core/functions/wotsSignLegacy [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / wotsSignLegacy # Function: wotsSignLegacy() > **wotsSignLegacy**(`msgHash`, `seed`, `index`, `paramSet?`): [`WotsSignature`](../type-aliases/WotsSignature.md) Legacy wrapper returning structured signature ## Parameters ### msgHash `Uint8Array` ### seed `Uint8Array` ### index `number` ### paramSet? [`ParamSet`](../type-aliases/ParamSet.md) ## Returns [`WotsSignature`](../type-aliases/WotsSignature.md) --- ## Page: writeHashToStream URL: https://docs.totem.ing/api/totemsdk-core/functions/writeHashToStream [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / writeHashToStream # Function: writeHashToStream() > **writeHashToStream**(`data`): `Uint8Array` Serialize hash in MiniData.writeHashToStream format (4-byte length prefix) Re-export of Streamable.writeHashToStream for backward compatibility. ## Parameters ### data `Uint8Array` Hash bytes (max 64 bytes per MINIMA_MAX_HASH_LENGTH) ## Returns `Uint8Array` Serialized bytes with 4-byte length prefix --- ## Page: writeMMREntryNumber URL: https://docs.totem.ing/api/totemsdk-core/functions/writeMMREntryNumber [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / writeMMREntryNumber # Function: writeMMREntryNumber() > **writeMMREntryNumber**(`value`, `scale?`): `Uint8Array` Encode an MMREntryNumber per Java MMREntryNumber.writeDataStream() Java source (MMREntryNumber.java): MiniNumber.WriteToStream(zOut, mNumber.scale()); // scale as MiniNumber MiniData.WriteToStream(zOut, mNumber.unscaledValue().toByteArray()); // unscaled as MiniData Format: - MiniNumber for scale (always 0 for integer values) - MiniData for unscaled BigInteger value For integer MMREntryNumber (scale=0), this encodes as: [00 01 00] - MiniNumber: scale=0, len=1, data=0x00 [00 00 00 LL ...] - MiniData: 4-byte len + BigInteger bytes ## Parameters ### value `bigint` ### scale? `number` = `0` ## Returns `Uint8Array` --- ## Page: writeMiniByte URL: https://docs.totem.ing/api/totemsdk-core/functions/writeMiniByte [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / writeMiniByte # Function: writeMiniByte() > **writeMiniByte**(`value`): `Uint8Array` Encode a MiniByte per Java MiniByte.writeDataStream() Format: single byte (0-255) ## Parameters ### value `number` \| `boolean` ## Returns `Uint8Array` --- ## Page: writeMiniNumber URL: https://docs.totem.ing/api/totemsdk-core/functions/writeMiniNumber [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / writeMiniNumber # Function: writeMiniNumber() > **writeMiniNumber**(`value`, `scale?`): `Uint8Array` ## Parameters ### value `bigint` ### scale? `number` = `0` ## Returns `Uint8Array` --- ## Page: AdapterRegistry URL: https://docs.totem.ing/api/totemsdk-core/interfaces/AdapterRegistry [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / AdapterRegistry # Interface: AdapterRegistry ## Properties ### auth > **auth**: [`AuthTokenProvider`](AuthTokenProvider.md) *** ### config > **config**: [`ConfigProvider`](ConfigProvider.md) *** ### crypto > **crypto**: [`CryptoAdapter`](CryptoAdapter.md) *** ### http > **http**: [`HttpClient`](HttpClient.md) *** ### logger > **logger**: [`LoggerAdapter`](LoggerAdapter.md) *** ### metrics? > `optional` **metrics?**: [`MetricsAdapter`](MetricsAdapter.md) *** ### storage > **storage**: [`StorageAdapter`](StorageAdapter.md) *** ### timer > **timer**: [`TimerAdapter`](TimerAdapter.md) *** ### websocket > **websocket**: [`WebSocketFactory`](WebSocketFactory.md) --- ## Page: AuthTokenProvider URL: https://docs.totem.ing/api/totemsdk-core/interfaces/AuthTokenProvider [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / AuthTokenProvider # Interface: AuthTokenProvider ## Methods ### clearToken() > **clearToken**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### getToken() > **getToken**(): `Promise`\<`string` \| `null`\> #### Returns `Promise`\<`string` \| `null`\> *** ### isAuthenticated() > **isAuthenticated**(): `Promise`\<`boolean`\> #### Returns `Promise`\<`boolean`\> *** ### onTokenChange() > **onTokenChange**(`callback`): () => `void` #### Parameters ##### callback (`token`) => `void` #### Returns () => `void` *** ### setToken() > **setToken**(`token`): `Promise`\<`void`\> #### Parameters ##### token `string` #### Returns `Promise`\<`void`\> --- ## Page: CancellationToken URL: https://docs.totem.ing/api/totemsdk-core/interfaces/CancellationToken [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / CancellationToken # Interface: CancellationToken ## Properties ### cancelled > `readonly` **cancelled**: `boolean` ## Methods ### onCancel() > **onCancel**(`callback`): () => `void` #### Parameters ##### callback () => `void` #### Returns () => `void` --- ## Page: CancellationTokenSource URL: https://docs.totem.ing/api/totemsdk-core/interfaces/CancellationTokenSource [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / CancellationTokenSource # Interface: CancellationTokenSource ## Properties ### token > `readonly` **token**: [`CancellationToken`](CancellationToken.md) ## Methods ### cancel() > **cancel**(): `void` #### Returns `void` --- ## Page: CoinProofData URL: https://docs.totem.ing/api/totemsdk-core/interfaces/CoinProofData [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / CoinProofData # Interface: CoinProofData ## Properties ### address > **address**: `Uint8Array` *** ### blockCreated > **blockCreated**: `bigint` *** ### coinId > **coinId**: `Uint8Array` *** ### mmrEntryNumber > **mmrEntryNumber**: `bigint` *** ### rawAmountBytes > **rawAmountBytes**: `Uint8Array` *** ### rawBlockCreatedBytes > **rawBlockCreatedBytes**: `Uint8Array` *** ### rawMmrEntryBytes > **rawMmrEntryBytes**: `Uint8Array` *** ### rawTokenData? > `optional` **rawTokenData?**: `Uint8Array`\<`ArrayBufferLike`\> *** ### spent > **spent**: `boolean` *** ### state > **state**: [`RawStateVariable`](RawStateVariable.md)[] *** ### storeState > **storeState**: `boolean` *** ### tokenId > **tokenId**: `Uint8Array` --- ## Page: ConfigProvider URL: https://docs.totem.ing/api/totemsdk-core/interfaces/ConfigProvider [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / ConfigProvider # Interface: ConfigProvider ## Properties ### apiKey? > `readonly` `optional` **apiKey?**: `string` *** ### apiUrl > `readonly` **apiUrl**: `string` *** ### network > `readonly` **network**: `"mainnet"` \| `"testnet"` \| `"devnet"` *** ### wsUrl > `readonly` **wsUrl**: `string` ## Methods ### get() #### Call Signature > **get**\<`T`\>(`key`): `T` \| `undefined` ##### Type Parameters ###### T `T` ##### Parameters ###### key `string` ##### Returns `T` \| `undefined` #### Call Signature > **get**\<`T`\>(`key`, `defaultValue`): `T` ##### Type Parameters ###### T `T` ##### Parameters ###### key `string` ###### defaultValue `T` ##### Returns `T` *** ### getAll() > **getAll**(): `Record`\<`string`, `unknown`\> #### Returns `Record`\<`string`, `unknown`\> *** ### has() > **has**(`key`): `boolean` #### Parameters ##### key `string` #### Returns `boolean` *** ### set() > **set**\<`T`\>(`key`, `value`): `void` #### Type Parameters ##### T `T` #### Parameters ##### key `string` ##### value `T` #### Returns `void` --- ## Page: CryptoAdapter URL: https://docs.totem.ing/api/totemsdk-core/interfaces/CryptoAdapter [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / CryptoAdapter # Interface: CryptoAdapter ## Methods ### randomBytes() > **randomBytes**(`length`): `Uint8Array` #### Parameters ##### length `number` #### Returns `Uint8Array` *** ### sha256() > **sha256**(`data`): `Uint8Array` #### Parameters ##### data `Uint8Array` #### Returns `Uint8Array` *** ### sha256Async() > **sha256Async**(`data`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> #### Parameters ##### data `Uint8Array` #### Returns `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> --- ## Page: DAppContractCallParams URL: https://docs.totem.ing/api/totemsdk-core/interfaces/DAppContractCallParams [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / DAppContractCallParams # Interface: DAppContractCallParams ## Properties ### args? > `optional` **args?**: `Record`\<`string`, `string`\> *** ### contractAddress > **contractAddress**: `string` *** ### method? > `optional` **method?**: `string` *** ### script? > `optional` **script?**: `string` --- ## Page: DAppHtlcParams URL: https://docs.totem.ing/api/totemsdk-core/interfaces/DAppHtlcParams [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / DAppHtlcParams # Interface: DAppHtlcParams ## Properties ### hashlock > **hashlock**: `string` *** ### recipientAddress > **recipientAddress**: `string` *** ### refundAddress > **refundAddress**: `string` *** ### timeoutBlocks > **timeoutBlocks**: `number` --- ## Page: DAppLiquidityParams URL: https://docs.totem.ing/api/totemsdk-core/interfaces/DAppLiquidityParams [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / DAppLiquidityParams # Interface: DAppLiquidityParams ## Properties ### amountA? > `optional` **amountA?**: `string` *** ### amountB? > `optional` **amountB?**: `string` *** ### lpTokenAmount? > `optional` **lpTokenAmount?**: `string` *** ### poolAddress > **poolAddress**: `string` *** ### tokenAId > **tokenAId**: `string` *** ### tokenBId > **tokenBId**: `string` --- ## Page: DAppMultisigParams URL: https://docs.totem.ing/api/totemsdk-core/interfaces/DAppMultisigParams [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / DAppMultisigParams # Interface: DAppMultisigParams ## Properties ### publicKeys > **publicKeys**: `string`[] *** ### requiredSignatures > **requiredSignatures**: `number` *** ### timeoutBlocks? > `optional` **timeoutBlocks?**: `number` --- ## Page: DAppStateVariable URL: https://docs.totem.ing/api/totemsdk-core/interfaces/DAppStateVariable [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / DAppStateVariable # Interface: DAppStateVariable ## Properties ### port > **port**: `number` *** ### type? > `optional` **type?**: `"string"` \| `"number"` \| `"hex"` \| `"address"` *** ### value > **value**: `string` --- ## Page: DAppSwapParams URL: https://docs.totem.ing/api/totemsdk-core/interfaces/DAppSwapParams [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / DAppSwapParams # Interface: DAppSwapParams ## Properties ### amountIn > **amountIn**: `string` *** ### fromTokenId > **fromTokenId**: `string` *** ### minAmountOut > **minAmountOut**: `string` *** ### poolAddress? > `optional` **poolAddress?**: `string` *** ### slippageBps? > `optional` **slippageBps?**: `number` *** ### toTokenId > **toTokenId**: `string` --- ## Page: DAppTimelockParams URL: https://docs.totem.ing/api/totemsdk-core/interfaces/DAppTimelockParams [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / DAppTimelockParams # Interface: DAppTimelockParams ## Properties ### fallbackAddress? > `optional` **fallbackAddress?**: `string` *** ### releaseBlock > **releaseBlock**: `number` --- ## Page: DAppTransactionInput URL: https://docs.totem.ing/api/totemsdk-core/interfaces/DAppTransactionInput [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / DAppTransactionInput # Interface: DAppTransactionInput ## Properties ### address? > `optional` **address?**: `string` *** ### amount? > `optional` **amount?**: `string` *** ### coinId > **coinId**: `string` *** ### tokenId? > `optional` **tokenId?**: `string` --- ## Page: DAppTransactionOutput URL: https://docs.totem.ing/api/totemsdk-core/interfaces/DAppTransactionOutput [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / DAppTransactionOutput # Interface: DAppTransactionOutput ## Properties ### address > **address**: `string` *** ### amount > **amount**: `string` *** ### script? > `optional` **script?**: `string` *** ### scriptRef? > `optional` **scriptRef?**: `string` *** ### state? > `optional` **state?**: [`DAppStateVariable`](DAppStateVariable.md)[] *** ### storeState? > `optional` **storeState?**: `boolean` *** ### tokenId? > `optional` **tokenId?**: `string` --- ## Page: ExternalSignature URL: https://docs.totem.ing/api/totemsdk-core/interfaces/ExternalSignature [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / ExternalSignature # Interface: ExternalSignature ## Properties ### proof? > `optional` **proof?**: [`MMRProof`](MMRProof.md) *** ### publicKey > **publicKey**: `string` *** ### signature > **signature**: `string` *** ### signatureType > **signatureType**: `"wots"` \| `"standard"` *** ### validated? > `optional` **validated?**: `boolean` --- ## Page: FinalizeRequest URL: https://docs.totem.ing/api/totemsdk-core/interfaces/FinalizeRequest [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / FinalizeRequest # Interface: FinalizeRequest ## Properties ### importId? > `optional` **importId?**: `string` *** ### leaseToken > **leaseToken**: `string` *** ### signedBase64? > `optional` **signedBase64?**: `string` *** ### signedHex? > `optional` **signedHex?**: `string` *** ### transactionHex? > `optional` **transactionHex?**: `string` --- ## Page: FinalizeResponse URL: https://docs.totem.ing/api/totemsdk-core/interfaces/FinalizeResponse [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / FinalizeResponse # Interface: FinalizeResponse ## Properties ### leaseId > **leaseId**: `string` *** ### ok > **ok**: `boolean` *** ### txpowid > **txpowid**: `string` --- ## Page: FlatMMRProofChunk URL: https://docs.totem.ing/api/totemsdk-core/interfaces/FlatMMRProofChunk [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / FlatMMRProofChunk # Interface: FlatMMRProofChunk ## Properties ### data > **data**: `Uint8Array` *** ### isLeft > **isLeft**: `boolean` --- ## Page: HierarchicalWitnessBundle URL: https://docs.totem.ing/api/totemsdk-core/interfaces/HierarchicalWitnessBundle [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / HierarchicalWitnessBundle # Interface: HierarchicalWitnessBundle Hierarchical witness bundle produced by per-address TreeKey signing. Index mapping: addressIndex — which HD address (0-63) l1 — L1 index within per-address TreeKey (0-63) l2 — L2 index within per-address TreeKey (0-63) proofs contains 3 entries for depth-3 TreeKeys (Root→L1→L2→DATA), matching Minima's TreeKey.sign() exactly. ## Properties ### addressIndex > **addressIndex**: `number` *** ### l1 > **l1**: `number` *** ### l2 > **l2**: `number` *** ### proofs > **proofs**: `SignatureProofHex`[] *** ### rootPublicKey > **rootPublicKey**: `string` --- ## Page: HttpClient URL: https://docs.totem.ing/api/totemsdk-core/interfaces/HttpClient [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / HttpClient # Interface: HttpClient ## Methods ### delete() > **delete**\<`T`\>(`url`, `options?`): `Promise`\<[`HttpResponse`](HttpResponse.md)\<`T`\>\> #### Type Parameters ##### T `T` #### Parameters ##### url `string` ##### options? [`HttpRequestOptions`](HttpRequestOptions.md) #### Returns `Promise`\<[`HttpResponse`](HttpResponse.md)\<`T`\>\> *** ### get() > **get**\<`T`\>(`url`, `options?`): `Promise`\<[`HttpResponse`](HttpResponse.md)\<`T`\>\> #### Type Parameters ##### T `T` #### Parameters ##### url `string` ##### options? [`HttpRequestOptions`](HttpRequestOptions.md) #### Returns `Promise`\<[`HttpResponse`](HttpResponse.md)\<`T`\>\> *** ### post() > **post**\<`T`\>(`url`, `body?`, `options?`): `Promise`\<[`HttpResponse`](HttpResponse.md)\<`T`\>\> #### Type Parameters ##### T `T` #### Parameters ##### url `string` ##### body? `unknown` ##### options? [`HttpRequestOptions`](HttpRequestOptions.md) #### Returns `Promise`\<[`HttpResponse`](HttpResponse.md)\<`T`\>\> *** ### put() > **put**\<`T`\>(`url`, `body?`, `options?`): `Promise`\<[`HttpResponse`](HttpResponse.md)\<`T`\>\> #### Type Parameters ##### T `T` #### Parameters ##### url `string` ##### body? `unknown` ##### options? [`HttpRequestOptions`](HttpRequestOptions.md) #### Returns `Promise`\<[`HttpResponse`](HttpResponse.md)\<`T`\>\> --- ## Page: HttpRequestOptions URL: https://docs.totem.ing/api/totemsdk-core/interfaces/HttpRequestOptions [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / HttpRequestOptions # Interface: HttpRequestOptions ## Properties ### cancellationToken? > `optional` **cancellationToken?**: [`CancellationToken`](CancellationToken.md) *** ### headers? > `optional` **headers?**: `Record`\<`string`, `string`\> *** ### timeout? > `optional` **timeout?**: `number` --- ## Page: HttpResponse URL: https://docs.totem.ing/api/totemsdk-core/interfaces/HttpResponse [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / HttpResponse # Interface: HttpResponse\ ## Type Parameters ### T `T` ## Properties ### data > **data**: `T` *** ### headers > **headers**: `Record`\<`string`, `string`\> *** ### ok > **ok**: `boolean` *** ### status > **status**: `number` *** ### statusText > **statusText**: `string` --- ## Page: JavaMMRData URL: https://docs.totem.ing/api/totemsdk-core/interfaces/JavaMMRData [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / JavaMMRData # Interface: JavaMMRData MMRData interface for serialization purposes Matches Minima's MMRData.java ## Properties ### data > **data**: `Uint8Array` *** ### value > **value**: `bigint` --- ## Page: JavaMMREntry URL: https://docs.totem.ing/api/totemsdk-core/interfaces/JavaMMREntry [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / JavaMMREntry # Interface: JavaMMREntry MMREntry interface for serialization purposes Matches Minima's MMREntry.java ## Properties ### entryNumber > **entryNumber**: [`JavaMMREntryNumber`](JavaMMREntryNumber.md) *** ### mmrData > **mmrData**: [`JavaMMRData`](JavaMMRData.md) *** ### row > **row**: `number` --- ## Page: JavaMMREntryNumber URL: https://docs.totem.ing/api/totemsdk-core/interfaces/JavaMMREntryNumber [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / JavaMMREntryNumber # Interface: JavaMMREntryNumber MMREntryNumber interface matching Minima's MMREntryNumber.java Represents a BigDecimal position in the MMR tree ## Properties ### scale > **scale**: `number` *** ### unscaled > **unscaled**: `bigint` --- ## Page: KeyGenProgress URL: https://docs.totem.ing/api/totemsdk-core/interfaces/KeyGenProgress [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / KeyGenProgress # Interface: KeyGenProgress Progress callback for key generation ## Properties ### current > **current**: `number` *** ### message > **message**: `string` *** ### phase > **phase**: `"wots_keys"` \| `"mmr_build"` \| `"address_derive"` \| `"complete"` *** ### total > **total**: `number` --- ## Page: LeaseExpiryEvent URL: https://docs.totem.ing/api/totemsdk-core/interfaces/LeaseExpiryEvent [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / LeaseExpiryEvent # Interface: LeaseExpiryEvent ## Properties ### expiresAt > **expiresAt**: `number` *** ### lease > **lease**: [`StoredLease`](StoredLease.md) *** ### leaseId > **leaseId**: `string` *** ### remainingMs > **remainingMs**: `number` --- ## Page: LeaseMonitorConfig URL: https://docs.totem.ing/api/totemsdk-core/interfaces/LeaseMonitorConfig [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / LeaseMonitorConfig # Interface: LeaseMonitorConfig ## Properties ### defaultIntervalMs? > `optional` **defaultIntervalMs?**: `number` *** ### expiryThresholdMs? > `optional` **expiryThresholdMs?**: `number` *** ### maxIntervalMs? > `optional` **maxIntervalMs?**: `number` *** ### minIntervalMs? > `optional` **minIntervalMs?**: `number` --- ## Page: LeaseStoreConfig URL: https://docs.totem.ing/api/totemsdk-core/interfaces/LeaseStoreConfig [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / LeaseStoreConfig # Interface: LeaseStoreConfig ## Properties ### storageKey? > `optional` **storageKey?**: `string` --- ## Page: LeaseWotsIndices URL: https://docs.totem.ing/api/totemsdk-core/interfaces/LeaseWotsIndices [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / LeaseWotsIndices # Interface: LeaseWotsIndices ## Properties ### addressIndex > **addressIndex**: `number` *** ### l1 > **l1**: `number` *** ### l2 > **l2**: `number` --- ## Page: LegacyMMRProof URL: https://docs.totem.ing/api/totemsdk-core/interfaces/LegacyMMRProof [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / LegacyMMRProof # Interface: LegacyMMRProof ## Properties ### blockTime > **blockTime**: `bigint` *** ### proofChain > **proofChain**: [`FlatMMRProofChunk`](FlatMMRProofChunk.md)[] --- ## Page: LifecycleAdapter URL: https://docs.totem.ing/api/totemsdk-core/interfaces/LifecycleAdapter [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / LifecycleAdapter # Interface: LifecycleAdapter ## Methods ### onResume()? > `optional` **onResume**(`callback`): () => `void` #### Parameters ##### callback () => `void` #### Returns () => `void` *** ### onSuspend() > **onSuspend**(`callback`): () => `void` #### Parameters ##### callback () => `void` #### Returns () => `void` --- ## Page: LoggerAdapter URL: https://docs.totem.ing/api/totemsdk-core/interfaces/LoggerAdapter [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / LoggerAdapter # Interface: LoggerAdapter ## Methods ### debug() > **debug**(`message`, ...`args`): `void` #### Parameters ##### message `string` ##### args ...`unknown`[] #### Returns `void` *** ### error() > **error**(`message`, ...`args`): `void` #### Parameters ##### message `string` ##### args ...`unknown`[] #### Returns `void` *** ### info() > **info**(`message`, ...`args`): `void` #### Parameters ##### message `string` ##### args ...`unknown`[] #### Returns `void` *** ### warn() > **warn**(`message`, ...`args`): `void` #### Parameters ##### message `string` ##### args ...`unknown`[] #### Returns `void` --- ## Page: MMRData URL: https://docs.totem.ing/api/totemsdk-core/interfaces/MMRData [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / MMRData # Interface: MMRData MMRData structure matching Minima's MMRData.java Contains hash and value (for sum tree functionality) ## Properties ### data > **data**: `Bytes` *** ### value > **value**: `bigint` --- ## Page: MMREntry URL: https://docs.totem.ing/api/totemsdk-core/interfaces/MMREntry [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / MMREntry # Interface: MMREntry MMREntry structure matching Minima's MMREntry.java Represents a node in the MMR at a specific row and position ## Properties ### entryNumber > **entryNumber**: `bigint` *** ### mmrData > **mmrData**: [`MMRData`](MMRData.md) *** ### row > **row**: `number` --- ## Page: MMRProof URL: https://docs.totem.ing/api/totemsdk-core/interfaces/MMRProof [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / MMRProof # Interface: MMRProof MMRProof structure matching Minima's MMRProof.java Contains proof chunks to verify leaf membership in the tree ## Properties ### chunks > **chunks**: [`MMRProofChunk`](MMRProofChunk.md)[] --- ## Page: MMRProofChunk URL: https://docs.totem.ing/api/totemsdk-core/interfaces/MMRProofChunk [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / MMRProofChunk # Interface: MMRProofChunk MMRProofChunk - one step in the proof path Matches Minima's MMRProof structure ## Properties ### isLeft > **isLeft**: `boolean` *** ### mmrData > **mmrData**: [`MMRData`](MMRData.md) --- ## Page: MetricsAdapter URL: https://docs.totem.ing/api/totemsdk-core/interfaces/MetricsAdapter [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / MetricsAdapter # Interface: MetricsAdapter ## Methods ### gauge() > **gauge**(`name`, `value`, `tags?`): `void` #### Parameters ##### name `string` ##### value `number` ##### tags? `Record`\<`string`, `string`\> #### Returns `void` *** ### histogram() > **histogram**(`name`, `value`, `tags?`): `void` #### Parameters ##### name `string` ##### value `number` ##### tags? `Record`\<`string`, `string`\> #### Returns `void` *** ### increment() > **increment**(`name`, `value?`, `tags?`): `void` #### Parameters ##### name `string` ##### value? `number` ##### tags? `Record`\<`string`, `string`\> #### Returns `void` *** ### timing() > **timing**(`name`, `durationMs`, `tags?`): `void` #### Parameters ##### name `string` ##### durationMs `number` ##### tags? `Record`\<`string`, `string`\> #### Returns `void` --- ## Page: MinimaCoin URL: https://docs.totem.ing/api/totemsdk-core/interfaces/MinimaCoin [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / MinimaCoin # Interface: MinimaCoin ## Properties ### address > **address**: `Uint8Array` *** ### amount > **amount**: `string` *** ### coinId > **coinId**: `Uint8Array` *** ### created > **created**: `bigint` *** ### mmrEntryNumber > **mmrEntryNumber**: `bigint` *** ### rawAmountBytes? > `optional` **rawAmountBytes?**: `Uint8Array`\<`ArrayBufferLike`\> *** ### rawBlockCreatedBytes? > `optional` **rawBlockCreatedBytes?**: `Uint8Array`\<`ArrayBufferLike`\> *** ### rawMmrEntryBytes? > `optional` **rawMmrEntryBytes?**: `Uint8Array`\<`ArrayBufferLike`\> *** ### rawTokenData? > `optional` **rawTokenData?**: `Uint8Array`\<`ArrayBufferLike`\> *** ### spent > **spent**: `boolean` *** ### state > **state**: [`StateVariable`](StateVariable.md)[] \| [`RawStateVariable`](RawStateVariable.md)[] *** ### storeState > **storeState**: `boolean` *** ### token > **token**: [`MinimaToken`](MinimaToken.md) \| `null` *** ### tokenId > **tokenId**: `Uint8Array` --- ## Page: MinimaToken URL: https://docs.totem.ing/api/totemsdk-core/interfaces/MinimaToken [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / MinimaToken # Interface: MinimaToken ## Properties ### coinId > **coinId**: `Uint8Array` *** ### created? > `optional` **created?**: `bigint` *** ### name > **name**: `Uint8Array` *** ### scale > **scale**: `number` *** ### script > **script**: `Uint8Array` *** ### totalAmount > **totalAmount**: `bigint` --- ## Page: MinimaTransaction URL: https://docs.totem.ing/api/totemsdk-core/interfaces/MinimaTransaction [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / MinimaTransaction # Interface: MinimaTransaction ## Properties ### inputs > **inputs**: [`MinimaCoin`](MinimaCoin.md)[] *** ### linkHash > **linkHash**: `Uint8Array` *** ### outputs > **outputs**: [`MinimaCoin`](MinimaCoin.md)[] *** ### state > **state**: [`StateVariable`](StateVariable.md)[] --- ## Page: ParsedMiniNumber URL: https://docs.totem.ing/api/totemsdk-core/interfaces/ParsedMiniNumber [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / ParsedMiniNumber # Interface: ParsedMiniNumber ## Properties ### scale > **scale**: `number` *** ### unscaledValue > **unscaledValue**: `bigint` --- ## Page: PrepareRequest URL: https://docs.totem.ing/api/totemsdk-core/interfaces/PrepareRequest [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / PrepareRequest # Interface: PrepareRequest ## Properties ### addressIndex? > `optional` **addressIndex?**: `number` *** ### amount > **amount**: `string` *** ### burn? > `optional` **burn?**: `string` *** ### to > **to**: `string` *** ### tokenId? > `optional` **tokenId?**: `string` *** ### txId? > `optional` **txId?**: `string` --- ## Page: PrepareResponse URL: https://docs.totem.ing/api/totemsdk-core/interfaces/PrepareResponse [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / PrepareResponse # Interface: PrepareResponse ## Extended by - [`PrepareResult`](PrepareResult.md) ## Properties ### addressIndex > **addressIndex**: `number` *** ### digestL2 > **digestL2**: `string` \| `null` *** ### digestL3 > **digestL3**: `string` \| `null` *** ### digestTx > **digestTx**: `string` *** ### l1 > **l1**: `number` *** ### l2 > **l2**: `number` *** ### leaseId > **leaseId**: `string` *** ### leaseToken > **leaseToken**: `string` *** ### leaseTTL > **leaseTTL**: `number` *** ### paramSet > **paramSet**: `string` *** ### perAddressScript? > `optional` **perAddressScript?**: `string` \| `null` *** ### rootPublicKey > **rootPublicKey**: `string` *** ### txId > **txId**: `string` --- ## Page: PrepareResult URL: https://docs.totem.ing/api/totemsdk-core/interfaces/PrepareResult [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / PrepareResult # Interface: PrepareResult ## Extends - [`PrepareResponse`](PrepareResponse.md) ## Properties ### addressIndex > **addressIndex**: `number` #### Inherited from [`PrepareResponse`](PrepareResponse.md).[`addressIndex`](PrepareResponse.md#addressindex) *** ### digestL2 > **digestL2**: `string` \| `null` #### Inherited from [`PrepareResponse`](PrepareResponse.md).[`digestL2`](PrepareResponse.md#digestl2) *** ### digestL3 > **digestL3**: `string` \| `null` #### Inherited from [`PrepareResponse`](PrepareResponse.md).[`digestL3`](PrepareResponse.md#digestl3) *** ### digestTx > **digestTx**: `string` #### Inherited from [`PrepareResponse`](PrepareResponse.md).[`digestTx`](PrepareResponse.md#digesttx) *** ### l1 > **l1**: `number` #### Inherited from [`PrepareResponse`](PrepareResponse.md).[`l1`](PrepareResponse.md#l1) *** ### l2 > **l2**: `number` #### Inherited from [`PrepareResponse`](PrepareResponse.md).[`l2`](PrepareResponse.md#l2) *** ### leaseId > **leaseId**: `string` #### Inherited from [`PrepareResponse`](PrepareResponse.md).[`leaseId`](PrepareResponse.md#leaseid) *** ### leaseToken > **leaseToken**: `string` #### Inherited from [`PrepareResponse`](PrepareResponse.md).[`leaseToken`](PrepareResponse.md#leasetoken) *** ### leaseTTL > **leaseTTL**: `number` #### Inherited from [`PrepareResponse`](PrepareResponse.md).[`leaseTTL`](PrepareResponse.md#leasettl) *** ### metadata > **metadata**: [`TransactionMetadata`](TransactionMetadata.md) *** ### paramSet > **paramSet**: `string` #### Inherited from [`PrepareResponse`](PrepareResponse.md).[`paramSet`](PrepareResponse.md#paramset) *** ### perAddressScript? > `optional` **perAddressScript?**: `string` \| `null` #### Inherited from [`PrepareResponse`](PrepareResponse.md).[`perAddressScript`](PrepareResponse.md#peraddressscript) *** ### rootPublicKey > **rootPublicKey**: `string` #### Inherited from [`PrepareResponse`](PrepareResponse.md).[`rootPublicKey`](PrepareResponse.md#rootpublickey) *** ### txId > **txId**: `string` #### Inherited from [`PrepareResponse`](PrepareResponse.md).[`txId`](PrepareResponse.md#txid) --- ## Page: RawStateVariable URL: https://docs.totem.ing/api/totemsdk-core/interfaces/RawStateVariable [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / RawStateVariable # Interface: RawStateVariable ## Properties ### port > **port**: `number` *** ### rawData > **rawData**: `Uint8Array` *** ### type > **type**: `number` --- ## Page: ScriptCatalogEntry URL: https://docs.totem.ing/api/totemsdk-core/interfaces/ScriptCatalogEntry [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / ScriptCatalogEntry # Interface: ScriptCatalogEntry ## Properties ### address > **address**: `string` *** ### createdAt > **createdAt**: `number` *** ### lastUsed > **lastUsed**: `number` *** ### script > **script**: `string` *** ### scriptType > **scriptType**: [`ScriptType`](../type-aliases/ScriptType.md) --- ## Page: ScriptDescriptor URL: https://docs.totem.ing/api/totemsdk-core/interfaces/ScriptDescriptor [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / ScriptDescriptor # Interface: ScriptDescriptor ## Properties ### address > **address**: `string` *** ### externalSignatures? > `optional` **externalSignatures?**: [`ExternalSignature`](ExternalSignature.md)[] *** ### extraScripts? > `optional` **extraScripts?**: `Map`\<`string`, `string`\> *** ### htlcHash? > `optional` **htlcHash?**: `string` *** ### htlcPreimage? > `optional` **htlcPreimage?**: `string` *** ### mastProof? > `optional` **mastProof?**: [`MMRProof`](MMRProof.md) *** ### multisigKeys? > `optional` **multisigKeys?**: `string`[] *** ### multisigThreshold? > `optional` **multisigThreshold?**: `number` *** ### script > **script**: `string` *** ### scriptType > **scriptType**: [`ScriptType`](../type-aliases/ScriptType.md) *** ### stateVariables? > `optional` **stateVariables?**: [`StateValue`](StateValue.md)[] *** ### storeState? > `optional` **storeState?**: `boolean` *** ### timelockBlock? > `optional` **timelockBlock?**: `bigint` *** ### verifyOutExpectations? > `optional` **verifyOutExpectations?**: [`VerifyOutExpectation`](VerifyOutExpectation.md)[] *** ### wotsRootPublicKey? > `optional` **wotsRootPublicKey?**: `string` --- ## Page: ScriptProofResult URL: https://docs.totem.ing/api/totemsdk-core/interfaces/ScriptProofResult [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / ScriptProofResult # Interface: ScriptProofResult ## Properties ### proof > **proof**: [`MMRProof`](MMRProof.md) *** ### script > **script**: `string` *** ### serialized > **serialized**: `Uint8Array` --- ## Page: SignRequest URL: https://docs.totem.ing/api/totemsdk-core/interfaces/SignRequest [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / SignRequest # Interface: SignRequest ## Properties ### addressIndex > **addressIndex**: `number` *** ### digestTx > **digestTx**: `string` *** ### l1 > **l1**: `number` *** ### l2 > **l2**: `number` --- ## Page: SignResult URL: https://docs.totem.ing/api/totemsdk-core/interfaces/SignResult [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / SignResult # Interface: SignResult ## Properties ### signedHex > **signedHex**: `string` *** ### witnessBundle > **witnessBundle**: [`HierarchicalWitnessBundle`](HierarchicalWitnessBundle.md) --- ## Page: SignatureProof URL: https://docs.totem.ing/api/totemsdk-core/interfaces/SignatureProof [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / SignatureProof # Interface: SignatureProof SignatureProof structure matching Minima's SignatureProof.java Contains: - leafPubkey: The 32-byte WOTS public key DIGEST (SHA3-256 of full L×32 key) - signature: The 1088-byte Winternitz signature (L×32 bytes) - mmrProof: Proof linking the leaf pubkey to the tree node's root CRITICAL FIX (January 2026): Java's Winternitz.getPublicKey() returns a 32-byte digest! From BouncyCastle WinternitzOTSignature.getPublicKey() (lines 103-121): byte[] buf = new byte[keysize * mdsize]; // Full 1088 bytes (34×32) // ... hash each chain 255 times into buf ... messDigestOTS.update(buf, 0, buf.length); // Hash the full key byte[] tmp = new byte[mdsize]; // 32 bytes messDigestOTS.doFinal(tmp, 0); // SHA3-256 return tmp; // Returns 32-byte DIGEST! Similarly, WinternitzOTSVerify.Verify() recovers the full key then hashes to 32 bytes. Winternitz.verify() then compares the 32-byte recovered digest to mPublicKey (32 bytes). Previous bug: We stored 1088-byte full keys, Java expected 32-byte digests → always failed. ## Properties ### leafPubkey > **leafPubkey**: `Bytes` *** ### mmrProof > **mmrProof**: [`MMRProof`](MMRProof.md) *** ### signature > **signature**: `Bytes` --- ## Page: SiteTransactionPermission URL: https://docs.totem.ing/api/totemsdk-core/interfaces/SiteTransactionPermission [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / SiteTransactionPermission # Interface: SiteTransactionPermission ## Properties ### expiresAt > **expiresAt**: `number` *** ### grantedAt > **grantedAt**: `number` *** ### origin > **origin**: `string` *** ### scopes > **scopes**: [`TransactionScope`](TransactionScope.md)[] --- ## Page: SpendableCoinInput URL: https://docs.totem.ing/api/totemsdk-core/interfaces/SpendableCoinInput [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / SpendableCoinInput # Interface: SpendableCoinInput ## Properties ### address > **address**: `string` *** ### amount > **amount**: `string` *** ### coinId > **coinId**: `string` *** ### coinProofData? > `optional` **coinProofData?**: [`CoinProofData`](CoinProofData.md) *** ### rawAmountBytes? > `optional` **rawAmountBytes?**: `Uint8Array`\<`ArrayBufferLike`\> *** ### tokenId > **tokenId**: `string` --- ## Page: StateValue URL: https://docs.totem.ing/api/totemsdk-core/interfaces/StateValue [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / StateValue # Interface: StateValue ## Properties ### port > **port**: `number` *** ### type > **type**: `"string"` \| `"number"` \| `"bool"` \| `"hex"` *** ### value > **value**: `string` \| `bigint` \| `boolean` \| `Uint8Array`\<`ArrayBufferLike`\> --- ## Page: StateVariable URL: https://docs.totem.ing/api/totemsdk-core/interfaces/StateVariable [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / StateVariable # Interface: StateVariable ## Properties ### port > **port**: `number` *** ### type > **type**: `"string"` \| `"number"` \| `"bool"` \| `"hex"` *** ### value > **value**: `string` \| `bigint` \| `boolean` \| `Uint8Array`\<`ArrayBufferLike`\> --- ## Page: StorageAdapter URL: https://docs.totem.ing/api/totemsdk-core/interfaces/StorageAdapter [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / StorageAdapter # Interface: StorageAdapter ## Methods ### clear() > **clear**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### get() > **get**\<`T`\>(`key`): `Promise`\<`T` \| `null`\> #### Type Parameters ##### T `T` #### Parameters ##### key `string` #### Returns `Promise`\<`T` \| `null`\> *** ### has() > **has**(`key`): `Promise`\<`boolean`\> #### Parameters ##### key `string` #### Returns `Promise`\<`boolean`\> *** ### keys() > **keys**(): `Promise`\<`string`[]\> #### Returns `Promise`\<`string`[]\> *** ### remove() > **remove**(`key`): `Promise`\<`boolean`\> #### Parameters ##### key `string` #### Returns `Promise`\<`boolean`\> *** ### set() > **set**\<`T`\>(`key`, `value`): `Promise`\<`void`\> #### Type Parameters ##### T `T` #### Parameters ##### key `string` ##### value `T` #### Returns `Promise`\<`void`\> --- ## Page: StoredLease URL: https://docs.totem.ing/api/totemsdk-core/interfaces/StoredLease [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / StoredLease # Interface: StoredLease ## Properties ### createdAt > **createdAt**: `number` *** ### expiresAt > **expiresAt**: `number` *** ### indices > **indices**: [`LeaseWotsIndices`](LeaseWotsIndices.md) *** ### leaseId > **leaseId**: `string` *** ### leaseToken > **leaseToken**: `string` *** ### leaseTTL > **leaseTTL**: `number` *** ### status > **status**: [`LeaseStatus`](../type-aliases/LeaseStatus.md) *** ### treeId? > `optional` **treeId?**: `string` *** ### txId? > `optional` **txId?**: `string` --- ## Page: SyncResult URL: https://docs.totem.ing/api/totemsdk-core/interfaces/SyncResult [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / SyncResult # Interface: SyncResult ## Properties ### drift > **drift**: `number` *** ### hasConflict > **hasConflict**: `boolean` *** ### updated > **updated**: `boolean` --- ## Page: TimerAdapter URL: https://docs.totem.ing/api/totemsdk-core/interfaces/TimerAdapter [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / TimerAdapter # Interface: TimerAdapter ## Methods ### clearInterval() > **clearInterval**(`handle`): `void` #### Parameters ##### handle `Timeout` #### Returns `void` *** ### clearTimeout() > **clearTimeout**(`handle`): `void` #### Parameters ##### handle `Timeout` #### Returns `void` *** ### now() > **now**(): `number` #### Returns `number` *** ### setInterval() > **setInterval**(`callback`, `ms`): `Timeout` #### Parameters ##### callback () => `void` ##### ms `number` #### Returns `Timeout` *** ### setTimeout() > **setTimeout**(`callback`, `ms`): `Timeout` #### Parameters ##### callback () => `void` ##### ms `number` #### Returns `Timeout` --- ## Page: TotemSendTransactionRequest URL: https://docs.totem.ing/api/totemsdk-core/interfaces/TotemSendTransactionRequest [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / TotemSendTransactionRequest # Interface: TotemSendTransactionRequest ## Properties ### burn? > `optional` **burn?**: `string` *** ### contract? > `optional` **contract?**: [`DAppContractCallParams`](DAppContractCallParams.md) *** ### htlc? > `optional` **htlc?**: [`DAppHtlcParams`](DAppHtlcParams.md) *** ### inputs? > `optional` **inputs?**: [`DAppTransactionInput`](DAppTransactionInput.md)[] *** ### intent > **intent**: [`DAppTransactionIntent`](../type-aliases/DAppTransactionIntent.md) *** ### liquidity? > `optional` **liquidity?**: [`DAppLiquidityParams`](DAppLiquidityParams.md) *** ### memo? > `optional` **memo?**: `string` *** ### metadata? > `optional` **metadata?**: `object` #### appName? > `optional` **appName?**: `string` #### description? > `optional` **description?**: `string` #### iconUrl? > `optional` **iconUrl?**: `string` *** ### multisig? > `optional` **multisig?**: [`DAppMultisigParams`](DAppMultisigParams.md) *** ### options? > `optional` **options?**: `object` #### excludeAddresses? > `optional` **excludeAddresses?**: `string`[] #### skipPreview? > `optional` **skipPreview?**: `boolean` #### useSourceAddress? > `optional` **useSourceAddress?**: `string` #### verifyWithTotemidea? > `optional` **verifyWithTotemidea?**: `boolean` *** ### outputs > **outputs**: [`DAppTransactionOutput`](DAppTransactionOutput.md)[] *** ### swap? > `optional` **swap?**: [`DAppSwapParams`](DAppSwapParams.md) *** ### timelock? > `optional` **timelock?**: [`DAppTimelockParams`](DAppTimelockParams.md) *** ### version > **version**: `1` --- ## Page: TotemSendTransactionResponse URL: https://docs.totem.ing/api/totemsdk-core/interfaces/TotemSendTransactionResponse [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / TotemSendTransactionResponse # Interface: TotemSendTransactionResponse ## Properties ### artifactId? > `optional` **artifactId?**: `string` *** ### digestHex? > `optional` **digestHex?**: `string` *** ### error? > `optional` **error?**: `string` *** ### errorCode? > `optional` **errorCode?**: [`TotemTransactionErrorCode`](../type-aliases/TotemTransactionErrorCode.md) *** ### status? > `optional` **status?**: `"pending"` \| `"submitted"` \| `"confirmed"` \| `"rejected"` *** ### success > **success**: `boolean` *** ### txpowid? > `optional` **txpowid?**: `string` *** ### verification? > `optional` **verification?**: `object` #### totemideaNotes? > `optional` **totemideaNotes?**: `string`[] #### totemideaValid? > `optional` **totemideaValid?**: `boolean` #### totemideaWarnings? > `optional` **totemideaWarnings?**: `string`[] --- ## Page: TransactionBuildResult URL: https://docs.totem.ing/api/totemsdk-core/interfaces/TransactionBuildResult [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / TransactionBuildResult # Interface: TransactionBuildResult ## Properties ### digestTx > **digestTx**: `Uint8Array` *** ### digestTxHex > **digestTxHex**: `string` *** ### serialized > **serialized**: `Uint8Array` *** ### serializedHex > **serializedHex**: `string` *** ### transaction > **transaction**: [`MinimaTransaction`](MinimaTransaction.md) --- ## Page: TransactionError URL: https://docs.totem.ing/api/totemsdk-core/interfaces/TransactionError [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / TransactionError # Interface: TransactionError ## Properties ### code > **code**: `number` *** ### message > **message**: `string` *** ### userMessage > **userMessage**: `string` --- ## Page: TransactionLifecycleConfig URL: https://docs.totem.ing/api/totemsdk-core/interfaces/TransactionLifecycleConfig [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / TransactionLifecycleConfig # Interface: TransactionLifecycleConfig ## Properties ### syncWatermarkBeforePrepare? > `optional` **syncWatermarkBeforePrepare?**: `boolean` *** ### validateWatermarkBeforePrepare? > `optional` **validateWatermarkBeforePrepare?**: `boolean` --- ## Page: TransactionMetadata URL: https://docs.totem.ing/api/totemsdk-core/interfaces/TransactionMetadata [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / TransactionMetadata # Interface: TransactionMetadata ## Properties ### amount > **amount**: `string` *** ### to > **to**: `string` *** ### tokenId > **tokenId**: `string` --- ## Page: TransactionReceipt URL: https://docs.totem.ing/api/totemsdk-core/interfaces/TransactionReceipt [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / TransactionReceipt # Interface: TransactionReceipt ## Properties ### amount > **amount**: `string` *** ### indices > **indices**: [`WotsIndices`](WotsIndices.md) *** ### leaseId? > `optional` **leaseId?**: `string` *** ### status > **status**: `"pending"` \| `"confirmed"` \| `"failed"` *** ### timestamp > **timestamp**: `number` *** ### to > **to**: `string` *** ### tokenId > **tokenId**: `string` *** ### txId? > `optional` **txId?**: `string` *** ### txpowid > **txpowid**: `string` --- ## Page: TransactionReceiptStoreConfig URL: https://docs.totem.ing/api/totemsdk-core/interfaces/TransactionReceiptStoreConfig [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / TransactionReceiptStoreConfig # Interface: TransactionReceiptStoreConfig ## Properties ### maxReceipts? > `optional` **maxReceipts?**: `number` *** ### storageKey? > `optional` **storageKey?**: `string` --- ## Page: TransactionRoundState URL: https://docs.totem.ing/api/totemsdk-core/interfaces/TransactionRoundState [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / TransactionRoundState # Interface: TransactionRoundState ## Properties ### newStates > **newStates**: [`StateValue`](StateValue.md)[] *** ### preservedPorts > **preservedPorts**: `number`[] *** ### previousRound > **previousRound**: `number` *** ### round > **round**: `number` --- ## Page: TransactionScope URL: https://docs.totem.ing/api/totemsdk-core/interfaces/TransactionScope [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / TransactionScope # Interface: TransactionScope ## Properties ### allowedIntents > **allowedIntents**: [`DAppTransactionIntent`](../type-aliases/DAppTransactionIntent.md)[] *** ### dailyUsed > **dailyUsed**: `string` *** ### lastResetDate > **lastResetDate**: `string` *** ### maxAmountPerTx > **maxAmountPerTx**: `string` *** ### maxDailyAmount > **maxDailyAmount**: `string` *** ### tokenId > **tokenId**: `string` *** ### tokenSymbol? > `optional` **tokenSymbol?**: `string` --- ## Page: TransactionServiceConfig URL: https://docs.totem.ing/api/totemsdk-core/interfaces/TransactionServiceConfig [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / TransactionServiceConfig # Interface: TransactionServiceConfig ## Properties ### apiKey > **apiKey**: `string` *** ### baseUrl > **baseUrl**: `string` *** ### paramSet? > `optional` **paramSet?**: `string` --- ## Page: TreeSignature URL: https://docs.totem.ing/api/totemsdk-core/interfaces/TreeSignature [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / TreeSignature # Interface: TreeSignature Full Signature structure matching Minima's Signature.java For a 3-level tree, contains 3 SignatureProofs: - Level 0: Signs level 1's root public key - Level 1: Signs level 2's root public key - Level 2: Signs the actual data ## Properties ### proofs > **proofs**: [`SignatureProof`](SignatureProof.md)[] --- ## Page: VerificationResult URL: https://docs.totem.ing/api/totemsdk-core/interfaces/VerificationResult [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / VerificationResult # Interface: VerificationResult ## Properties ### error? > `optional` **error?**: `string` *** ### valid > **valid**: `boolean` --- ## Page: VerifyOutExpectation URL: https://docs.totem.ing/api/totemsdk-core/interfaces/VerifyOutExpectation [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / VerifyOutExpectation # Interface: VerifyOutExpectation ## Properties ### amount > **amount**: `string` \| `bigint` *** ### inputIndex > **inputIndex**: `number` \| `"@INPUT"` *** ### keepState > **keepState**: `boolean` *** ### outputAddress > **outputAddress**: `string` *** ### tokenId > **tokenId**: `string` --- ## Page: WatermarkState URL: https://docs.totem.ing/api/totemsdk-core/interfaces/WatermarkState [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / WatermarkState # Interface: WatermarkState ## Properties ### lastSyncTimestamp? > `optional` **lastSyncTimestamp?**: `number` *** ### next\_addressIndex > **next\_addressIndex**: `number` *** ### next\_l1 > **next\_l1**: `number` *** ### next\_l2 > **next\_l2**: `number` *** ### serverWatermark? > `optional` **serverWatermark?**: `WotsIndices` *** ### usedIndices > **usedIndices**: \[`number`, `number`, `number`\][] --- ## Page: WatermarkStoreConfig URL: https://docs.totem.ing/api/totemsdk-core/interfaces/WatermarkStoreConfig [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / WatermarkStoreConfig # Interface: WatermarkStoreConfig ## Properties ### storageKey? > `optional` **storageKey?**: `string` --- ## Page: WatermarkSyncFunction URL: https://docs.totem.ing/api/totemsdk-core/interfaces/WatermarkSyncFunction [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / WatermarkSyncFunction # Interface: WatermarkSyncFunction() > **WatermarkSyncFunction**(`rootPublicKey`): `Promise`\<\{ `multiDeviceConflict`: `boolean`; `updated`: `boolean`; \}\> ## Parameters ### rootPublicKey `string` ## Returns `Promise`\<\{ `multiDeviceConflict`: `boolean`; `updated`: `boolean`; \}\> --- ## Page: WebSocketClient URL: https://docs.totem.ing/api/totemsdk-core/interfaces/WebSocketClient [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / WebSocketClient # Interface: WebSocketClient ## Properties ### onclose > **onclose**: ((`ev`) => `void`) \| `null` *** ### onerror > **onerror**: ((`ev`) => `void`) \| `null` *** ### onmessage > **onmessage**: ((`ev`) => `void`) \| `null` *** ### onopen > **onopen**: ((`ev`) => `void`) \| `null` *** ### readyState > `readonly` **readyState**: `number` *** ### url > `readonly` **url**: `string` ## Methods ### addEventListener() > **addEventListener**\<`K`\>(`event`, `listener`): `void` #### Type Parameters ##### K `K` *extends* keyof [`WebSocketEventMap`](../type-aliases/WebSocketEventMap.md) #### Parameters ##### event `K` ##### listener (`ev`) => `void` #### Returns `void` *** ### close() > **close**(`code?`, `reason?`): `void` #### Parameters ##### code? `number` ##### reason? `string` #### Returns `void` *** ### removeAllListeners() > **removeAllListeners**(): `void` #### Returns `void` *** ### removeEventListener() > **removeEventListener**\<`K`\>(`event`, `listener`): `void` #### Type Parameters ##### K `K` *extends* keyof [`WebSocketEventMap`](../type-aliases/WebSocketEventMap.md) #### Parameters ##### event `K` ##### listener (`ev`) => `void` #### Returns `void` *** ### send() > **send**(`data`): `void` #### Parameters ##### data `string` \| [`BinaryData`](../type-aliases/BinaryData.md) #### Returns `void` *** ### terminate() > **terminate**(): `void` #### Returns `void` --- ## Page: WebSocketCloseEvent URL: https://docs.totem.ing/api/totemsdk-core/interfaces/WebSocketCloseEvent [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / WebSocketCloseEvent # Interface: WebSocketCloseEvent ## Properties ### code > **code**: `number` *** ### reason > **reason**: `string` *** ### type > **type**: `"close"` *** ### wasClean > **wasClean**: `boolean` --- ## Page: WebSocketErrorEvent URL: https://docs.totem.ing/api/totemsdk-core/interfaces/WebSocketErrorEvent [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / WebSocketErrorEvent # Interface: WebSocketErrorEvent ## Properties ### error? > `optional` **error?**: `Error` *** ### message? > `optional` **message?**: `string` *** ### type > **type**: `"error"` --- ## Page: WebSocketFactory URL: https://docs.totem.ing/api/totemsdk-core/interfaces/WebSocketFactory [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / WebSocketFactory # Interface: WebSocketFactory ## Methods ### create() > **create**(`url`, `protocols?`, `options?`): [`WebSocketClient`](WebSocketClient.md) #### Parameters ##### url `string` ##### protocols? `string`[] ##### options? [`WebSocketFactoryOptions`](WebSocketFactoryOptions.md) #### Returns [`WebSocketClient`](WebSocketClient.md) *** ### dispose() > **dispose**(): `void` #### Returns `void` --- ## Page: WebSocketFactoryOptions URL: https://docs.totem.ing/api/totemsdk-core/interfaces/WebSocketFactoryOptions [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / WebSocketFactoryOptions # Interface: WebSocketFactoryOptions ## Properties ### maxPayloadBytes? > `optional` **maxPayloadBytes?**: `number` *** ### pingIntervalMs? > `optional` **pingIntervalMs?**: `number` *** ### pongTimeoutMs? > `optional` **pongTimeoutMs?**: `number` --- ## Page: WebSocketMessageEvent URL: https://docs.totem.ing/api/totemsdk-core/interfaces/WebSocketMessageEvent [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / WebSocketMessageEvent # Interface: WebSocketMessageEvent ## Properties ### data > **data**: `string` \| [`BinaryData`](../type-aliases/BinaryData.md) *** ### type > **type**: `"message"` --- ## Page: WebSocketOpenEvent URL: https://docs.totem.ing/api/totemsdk-core/interfaces/WebSocketOpenEvent [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / WebSocketOpenEvent # Interface: WebSocketOpenEvent ## Properties ### type > **type**: `"open"` --- ## Page: WitnessBundle URL: https://docs.totem.ing/api/totemsdk-core/interfaces/WitnessBundle [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / WitnessBundle # ~~Interface: WitnessBundle~~ ## Deprecated Use HierarchicalWitnessBundle. Kept for backward compatibility. ## Properties ### ~~addressIndex~~ > **addressIndex**: `number` *** ### ~~l1~~ > **l1**: `number` *** ### ~~l2~~ > **l2**: `number` *** ### ~~signatures~~ > **signatures**: `object` #### ~~l1Proof~~ > **l1Proof**: `string`[] #### ~~l2Proof~~ > **l2Proof**: `string`[] #### ~~l3Proof~~ > **l3Proof**: `string`[] --- ## Page: WotsIndices URL: https://docs.totem.ing/api/totemsdk-core/interfaces/WotsIndices [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / WotsIndices # Interface: WotsIndices ## Properties ### addressIndex > **addressIndex**: `number` *** ### l1 > **l1**: `number` *** ### l2 > **l2**: `number` --- ## Page: WotsSigningDependencies URL: https://docs.totem.ing/api/totemsdk-core/interfaces/WotsSigningDependencies [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / WotsSigningDependencies # ~~Interface: WotsSigningDependencies~~ ## Deprecated WotsSigningDependencies is no longer used by TransactionService.sign(). The service now derives everything from the seed and indices directly using the built-in TreeKey implementation. This interface is kept for backward compatibility only and will be removed in a future version. ## Properties ### ~~defaultParamSet?~~ > `optional` **defaultParamSet?**: `any` *** ### ~~fromHex?~~ > `optional` **fromHex?**: (`hex`) => `Uint8Array` #### Parameters ##### hex `string` #### Returns `Uint8Array` *** ### ~~getParamSet?~~ > `optional` **getParamSet?**: (`name`) => `any` #### Parameters ##### name `string` #### Returns `any` *** ### ~~wotsSign?~~ > `optional` **wotsSign?**: (`seed`, `index`, `message`, `paramSet`) => `Uint8Array` #### Parameters ##### seed `Uint8Array` ##### index `number` ##### message `Uint8Array` ##### paramSet `any` #### Returns `Uint8Array` --- ## Page: BinaryData URL: https://docs.totem.ing/api/totemsdk-core/type-aliases/BinaryData [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / BinaryData # Type Alias: BinaryData > **BinaryData** = `Uint8Array` \| `ArrayBuffer` --- ## Page: Bytes URL: https://docs.totem.ing/api/totemsdk-core/type-aliases/Bytes [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / Bytes # Type Alias: Bytes > **Bytes** = `Uint8Array` Streamable.ts - Canonical Java-Compatible Serialization Primitives This module provides byte-exact serialization functions matching Minima's Java Streamable interface and its implementations. JAVA REFERENCE CLASSES: - MiniData.writeDataStream(): 4-byte int length + raw bytes - MiniNumber.writeDataStream(): 1-byte scale + 1-byte len + BigInteger bytes - MiniString.writeDataStream(): delegates to MiniData(UTF-8 bytes) - MiniByte.writeDataStream(): single byte - Crypto.writeHashToStream(): 4-byte int length + hash bytes - MMREntryNumber.writeDataStream(): 1-byte len + BigInteger bytes CRITICAL NOTES: - MiniNumber uses 1-byte length, NOT 4-byte like MiniData - BigInteger.toByteArray() uses two's complement (leading 0 if high bit set) - Zero encodes as length=1, value=0x00 Created: 2026-01-20 Purpose: Single source of truth for all Minima type serialization --- ## Page: DAppTransactionIntent URL: https://docs.totem.ing/api/totemsdk-core/type-aliases/DAppTransactionIntent [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / DAppTransactionIntent # Type Alias: DAppTransactionIntent > **DAppTransactionIntent** = `"send"` \| `"token_send"` \| `"swap"` \| `"liquidity_add"` \| `"liquidity_remove"` \| `"contract_call"` \| `"multisig"` \| `"timelock"` \| `"htlc"` \| `"custom"` --- ## Page: LeaseExpiryCallback URL: https://docs.totem.ing/api/totemsdk-core/type-aliases/LeaseExpiryCallback [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / LeaseExpiryCallback # Type Alias: LeaseExpiryCallback > **LeaseExpiryCallback** = (`event`) => `void` ## Parameters ### event [`LeaseExpiryEvent`](../interfaces/LeaseExpiryEvent.md) ## Returns `void` --- ## Page: LeaseStatus URL: https://docs.totem.ing/api/totemsdk-core/type-aliases/LeaseStatus [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / LeaseStatus # Type Alias: LeaseStatus > **LeaseStatus** = `"pending"` \| `"active"` \| `"expired"` \| `"finalized"` \| `"cancelled"` --- ## Page: ParamSet URL: https://docs.totem.ing/api/totemsdk-core/type-aliases/ParamSet [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / ParamSet # Type Alias: ParamSet > **ParamSet** = `object` WOTS Parameter Set - BouncyCastle Compatible (w=8) Matches Minima Java implementation which uses BouncyCastle: - Winternitz.java: WINTERNITZ_VALUE = 8 - WinternitzOTSignature.java: w=8 means 8 BITS per digit (not base-8) - SHA3-256 hash function (mdsize = 32 bytes) Chain count calculation (from WinternitzOTSignature constructor): messagesize = ((mdsize << 3) + w - 1) / w = (256 + 7) / 8 = 32 checksumsize = getLog((messagesize << w) + 1) = getLog(8193) = 14 bits keysize = messagesize + (checksumsize + w - 1) / w = 32 + (14 + 7) / 8 = 34 So L = 34 chains total, each chain value is 0-255 (8-bit digit) ## Properties ### checksumDigits > **checksumDigits**: `2` *** ### checksumSize > **checksumSize**: `14` *** ### L > **L**: `34` *** ### maxDigit > **maxDigit**: `255` *** ### messageSize > **messageSize**: `32` *** ### n > **n**: `256` *** ### name > **name**: `"minima"` *** ### w > **w**: `8` --- ## Page: PrepareArgs URL: https://docs.totem.ing/api/totemsdk-core/type-aliases/PrepareArgs [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / PrepareArgs # Type Alias: PrepareArgs > **PrepareArgs** = `object` Totem <-> Axia hardened WOTS helpers (no deps on server internals). ## Properties ### amount > **amount**: `string` *** ### burn? > `optional` **burn?**: `string` \| `null` *** ### digestL2? > `optional` **digestL2?**: `string` \| `null` *** ### digestL3? > `optional` **digestL3?**: `string` \| `null` *** ### rootPublicKey > **rootPublicKey**: `string` *** ### to > **to**: `string` *** ### tokenId? > `optional` **tokenId?**: `string` *** ### ttlMs? > `optional` **ttlMs?**: `number` *** ### txId > **txId**: `string` --- ## Page: PrepareResp URL: https://docs.totem.ing/api/totemsdk-core/type-aliases/PrepareResp [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / PrepareResp # Type Alias: PrepareResp > **PrepareResp** = `object` ## Properties ### digestTx? > `optional` **digestTx?**: `string` \| `null` *** ### lease > **lease**: `object` #### addressIndex > **addressIndex**: `number` #### l1 > **l1**: `number` #### l2 > **l2**: `number` *** ### leaseToken > **leaseToken**: `string` *** ### txId > **txId**: `string` --- ## Page: ProgressCallback URL: https://docs.totem.ing/api/totemsdk-core/type-aliases/ProgressCallback [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / ProgressCallback # Type Alias: ProgressCallback > **ProgressCallback** = (`progress`) => `void` ## Parameters ### progress [`KeyGenProgress`](../interfaces/KeyGenProgress.md) ## Returns `void` --- ## Page: ScriptType URL: https://docs.totem.ing/api/totemsdk-core/type-aliases/ScriptType [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / ScriptType # Type Alias: ScriptType > **ScriptType** = `"signedby"` \| `"multisig"` \| `"multisig_mofn"` \| `"timelock"` \| `"htlc"` \| `"mast"` \| `"exchange"` \| `"vault"` \| `"flashcash"` \| `"slowcash"` \| `"stateful"` \| `"custom"` --- ## Page: StateVariableType URL: https://docs.totem.ing/api/totemsdk-core/type-aliases/StateVariableType [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / StateVariableType # Type Alias: StateVariableType > **StateVariableType** = `"STATE"` \| `"PREVSTATE"` \| `"SAMESTATE"` --- ## Page: TimerHandle URL: https://docs.totem.ing/api/totemsdk-core/type-aliases/TimerHandle [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / TimerHandle # Type Alias: TimerHandle > **TimerHandle** = `ReturnType`\<*typeof* `setTimeout`\> --- ## Page: TotemTransactionErrorCode URL: https://docs.totem.ing/api/totemsdk-core/type-aliases/TotemTransactionErrorCode [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / TotemTransactionErrorCode # Type Alias: TotemTransactionErrorCode > **TotemTransactionErrorCode** = `"INVALID_REQUEST"` \| `"INSUFFICIENT_FUNDS"` \| `"PERMISSION_DENIED"` \| `"USER_REJECTED"` \| `"SITE_NOT_CONNECTED"` \| `"SPENDING_LIMIT_EXCEEDED"` \| `"TOKEN_NOT_ALLOWED"` \| `"VERIFICATION_FAILED"` \| `"BUILD_FAILED"` \| `"SIGN_FAILED"` \| `"BROADCAST_FAILED"` \| `"TIMEOUT"` --- ## Page: WebSocketEventMap URL: https://docs.totem.ing/api/totemsdk-core/type-aliases/WebSocketEventMap [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / WebSocketEventMap # Type Alias: WebSocketEventMap > **WebSocketEventMap** = `object` ## Properties ### close > **close**: [`WebSocketCloseEvent`](../interfaces/WebSocketCloseEvent.md) *** ### error > **error**: [`WebSocketErrorEvent`](../interfaces/WebSocketErrorEvent.md) *** ### message > **message**: [`WebSocketMessageEvent`](../interfaces/WebSocketMessageEvent.md) *** ### open > **open**: [`WebSocketOpenEvent`](../interfaces/WebSocketOpenEvent.md) --- ## Page: WotsKeypair URL: https://docs.totem.ing/api/totemsdk-core/type-aliases/WotsKeypair [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / WotsKeypair # Type Alias: WotsKeypair > **WotsKeypair** = `object` ## Properties ### index > **index**: `number` *** ### pk > **pk**: `Uint8Array` *** ### seed > **seed**: `Uint8Array` --- ## Page: WotsSignature URL: https://docs.totem.ing/api/totemsdk-core/type-aliases/WotsSignature [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / WotsSignature # Type Alias: WotsSignature > **WotsSignature** = `object` ## Properties ### index > **index**: `number` *** ### sig > **sig**: `Uint8Array`[] *** ### w > **w**: `number` --- ## Page: CORE_BUILD_ID URL: https://docs.totem.ing/api/totemsdk-core/variables/CORE_BUILD_ID [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / CORE\_BUILD\_ID # Variable: CORE\_BUILD\_ID > `const` **CORE\_BUILD\_ID**: `"2026.02.05-v1"` = `'2026.02.05-v1'` SDK Core Version Information CORE_BUILD_ID is used to detect bundle duplication issues where the extension might bundle two different copies of sdk-core, computing addresses with one copy and signing with another. If you see different CORE_BUILD_IDs logged from wallet creation vs signing modules, there's a bundling issue. --- ## Page: CORE_VERSION URL: https://docs.totem.ing/api/totemsdk-core/variables/CORE_VERSION [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / CORE\_VERSION # Variable: CORE\_VERSION > `const` **CORE\_VERSION**: `"1.0.0"` = `'1.0.0'` --- ## Page: DEFAULT_KEYS_PER_LEVEL URL: https://docs.totem.ing/api/totemsdk-core/variables/DEFAULT_KEYS_PER_LEVEL [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / DEFAULT\_KEYS\_PER\_LEVEL # Variable: DEFAULT\_KEYS\_PER\_LEVEL > `const` **DEFAULT\_KEYS\_PER\_LEVEL**: `64` = `64` --- ## Page: DEFAULT_LEVELS URL: https://docs.totem.ing/api/totemsdk-core/variables/DEFAULT_LEVELS [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / DEFAULT\_LEVELS # Variable: DEFAULT\_LEVELS > `const` **DEFAULT\_LEVELS**: `3` = `3` --- ## Page: MINIMA_CONSTANTS URL: https://docs.totem.ing/api/totemsdk-core/variables/MINIMA_CONSTANTS [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / MINIMA\_CONSTANTS # Variable: MINIMA\_CONSTANTS > `const` **MINIMA\_CONSTANTS**: `object` ## Type Declaration ### ADDRESS\_PREFIX > `readonly` **ADDRESS\_PREFIX**: `"Mx"` = `'Mx'` ### MAX\_SIGNATURES > `readonly` **MAX\_SIGNATURES**: `262144` = `262144` ### NETWORK\_ID > `readonly` **NETWORK\_ID**: `1` = `1` ### SIGNATURE\_LEVELS > `readonly` **SIGNATURE\_LEVELS**: `3` = `3` ### WOTS\_N > `readonly` **WOTS\_N**: `32` = `32` ### WOTS\_W > `readonly` **WOTS\_W**: `8` = `8` --- ## Page: STATETYPE_BOOL URL: https://docs.totem.ing/api/totemsdk-core/variables/STATETYPE_BOOL [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / STATETYPE\_BOOL # Variable: STATETYPE\_BOOL > `const` **STATETYPE\_BOOL**: `8` = `8` --- ## Page: STATETYPE_HEX URL: https://docs.totem.ing/api/totemsdk-core/variables/STATETYPE_HEX [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / STATETYPE\_HEX # Variable: STATETYPE\_HEX > `const` **STATETYPE\_HEX**: `1` = `1` --- ## Page: STATETYPE_NUMBER URL: https://docs.totem.ing/api/totemsdk-core/variables/STATETYPE_NUMBER [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / STATETYPE\_NUMBER # Variable: STATETYPE\_NUMBER > `const` **STATETYPE\_NUMBER**: `2` = `2` --- ## Page: STATETYPE_STRING URL: https://docs.totem.ing/api/totemsdk-core/variables/STATETYPE_STRING [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / STATETYPE\_STRING # Variable: STATETYPE\_STRING > `const` **STATETYPE\_STRING**: `4` = `4` --- ## Page: TOTEM_SEND_TRANSACTION_VERSION URL: https://docs.totem.ing/api/totemsdk-core/variables/TOTEM_SEND_TRANSACTION_VERSION [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / TOTEM\_SEND\_TRANSACTION\_VERSION # Variable: TOTEM\_SEND\_TRANSACTION\_VERSION > `const` **TOTEM\_SEND\_TRANSACTION\_VERSION**: `1` = `1` --- ## Page: WORD_LIST URL: https://docs.totem.ing/api/totemsdk-core/variables/WORD_LIST [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / WORD\_LIST # Variable: WORD\_LIST > `const` **WORD\_LIST**: readonly `string`[] Official BIP39 English word list (2048 words) From https://github.com/bitcoin/bips/blob/master/bip-0039/english.txt --- ## Page: WOTS_MINIMA URL: https://docs.totem.ing/api/totemsdk-core/variables/WOTS_MINIMA [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / WOTS\_MINIMA # Variable: WOTS\_MINIMA > `const` **WOTS\_MINIMA**: [`ParamSet`](../type-aliases/ParamSet.md) --- ## Page: WOTS_V1_DEV URL: https://docs.totem.ing/api/totemsdk-core/variables/WOTS_V1_DEV [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / WOTS\_V1\_DEV # Variable: WOTS\_V1\_DEV > `const` **WOTS\_V1\_DEV**: [`ParamSet`](../type-aliases/ParamSet.md) = `WOTS_MINIMA` --- ## Page: WOTS_V2_SPEC URL: https://docs.totem.ing/api/totemsdk-core/variables/WOTS_V2_SPEC [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / WOTS\_V2\_SPEC # Variable: WOTS\_V2\_SPEC > `const` **WOTS\_V2\_SPEC**: [`ParamSet`](../type-aliases/ParamSet.md) = `WOTS_MINIMA` --- ## Page: WebSocketReadyState URL: https://docs.totem.ing/api/totemsdk-core/variables/WebSocketReadyState [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / WebSocketReadyState # Variable: WebSocketReadyState > `const` **WebSocketReadyState**: `object` ## Type Declaration ### CLOSED > `readonly` **CLOSED**: `3` = `3` ### CLOSING > `readonly` **CLOSING**: `2` = `2` ### CONNECTING > `readonly` **CONNECTING**: `0` = `0` ### OPEN > `readonly` **OPEN**: `1` = `1` --- ## Page: bytesToHex URL: https://docs.totem.ing/api/totemsdk-core/variables/bytesToHex [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / bytesToHex # Variable: bytesToHex > `const` **bytesToHex**: (`bytes`) => `string` = `bytes_to_hex_wasm` Convert bytes to uppercase hex string. ## Parameters ### bytes `Uint8Array` ## Returns `string` --- ## Page: computeTransactionDigest URL: https://docs.totem.ing/api/totemsdk-core/variables/computeTransactionDigest [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / computeTransactionDigest # Variable: computeTransactionDigest > `const` **computeTransactionDigest**: (`serialized_tx`) => `Uint8Array` = `compute_transaction_digest_wasm` Compute transaction digest (SHA3-256 of serialized tx). ## Parameters ### serialized\_tx `Uint8Array` ## Returns `Uint8Array` --- ## Page: concatBytes URL: https://docs.totem.ing/api/totemsdk-core/variables/concatBytes [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / concatBytes # Variable: concatBytes > `const` **concatBytes**: (`a`, `b`) => `Uint8Array` = `concat_bytes_wasm` Concatenate multiple byte arrays. ## Parameters ### a `Uint8Array` ### b `Uint8Array` ## Returns `Uint8Array` --- ## Page: createChallenge URL: https://docs.totem.ing/api/totemsdk-core/variables/createChallenge [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / createChallenge # Variable: createChallenge > `const` **createChallenge**: (`domain`, `statement`) => `string` = `create_challenge_wasm` Create a Sign-In With Wallet challenge. ## Parameters ### domain `string` ### statement `string` ## Returns `string` --- ## Page: deriveChainSeedJava URL: https://docs.totem.ing/api/totemsdk-core/variables/deriveChainSeedJava [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / deriveChainSeedJava # Variable: deriveChainSeedJava > `const` **deriveChainSeedJava**: (`seed`, `key_index`) => `Uint8Array` = `derive_chain_seed_wasm` Derive chain seed for a specific key index (Java-compatible). ## Parameters ### seed `Uint8Array` ### key\_index `number` ## Returns `Uint8Array` --- ## Page: deriveFullPublicKey URL: https://docs.totem.ing/api/totemsdk-core/variables/deriveFullPublicKey [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / deriveFullPublicKey # Variable: deriveFullPublicKey > `const` **deriveFullPublicKey**: (`seed`, `key_index`) => `Uint8Array` = `derive_full_public_key_wasm` Derive full WOTS public key (1088 bytes). ## Parameters ### seed `Uint8Array` ### key\_index `number` ## Returns `Uint8Array` --- ## Page: derivePKdigest URL: https://docs.totem.ing/api/totemsdk-core/variables/derivePKdigest [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / derivePKdigest # Variable: derivePKdigest > `const` **derivePKdigest**: (`seed`, `key_index`) => `Uint8Array` = `derive_pk_digest_wasm` Derive WOTS public key digest (32 bytes). ## Parameters ### seed `Uint8Array` ### key\_index `number` ## Returns `Uint8Array` --- ## Page: derivePerAddressSeed URL: https://docs.totem.ing/api/totemsdk-core/variables/derivePerAddressSeed [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / derivePerAddressSeed # Variable: derivePerAddressSeed > `const` **derivePerAddressSeed**: (`root_seed`, `address_index`) => `Uint8Array` = `derive_per_address_seed_wasm` Derive per-address seed from root seed. ## Parameters ### root\_seed `Uint8Array` ### address\_index `number` ## Returns `Uint8Array` --- ## Page: deriveRootPrivSeed URL: https://docs.totem.ing/api/totemsdk-core/variables/deriveRootPrivSeed [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / deriveRootPrivSeed # Variable: deriveRootPrivSeed > `const` **deriveRootPrivSeed**: (`bip39_seed`) => `Uint8Array` = `derive_root_priv_seed_wasm` Derive root private seed from BIP39 seed. ## Parameters ### bip39\_seed `Uint8Array` ## Returns `Uint8Array` --- ## Page: deserializeMMRProof URL: https://docs.totem.ing/api/totemsdk-core/variables/deserializeMMRProof [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / deserializeMMRProof # ~~Variable: deserializeMMRProof~~ > `const` **deserializeMMRProof**: (`data`) => `object` = `parseMMRProofFromHex` Deserialize MMRProof from bytes matching Minima's MMRProof.readDataStream() Format: 1. blockTime (MiniNumber) 2. chain length (MiniNumber) 3. Each chunk: isLeft (1 byte) + MMRData (hash with 4-byte length prefix + value MiniNumber) CRITICAL: Java MMRData.readDataStream uses mData.readHashFromStream() which reads a 4-byte big-endian length prefix followed by the hash bytes. ## Parameters ### data `Bytes` ## Returns `object` ### ~~blockTime~~ > **blockTime**: `bigint` ### ~~bytesRead~~ > **bytesRead**: `number` ### ~~proof~~ > **proof**: [`MMRProof`](../interfaces/MMRProof.md) ## Deprecated Use parseMMRProofFromHex --- ## Page: expandPrivateKey URL: https://docs.totem.ing/api/totemsdk-core/variables/expandPrivateKey [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / expandPrivateKey # Variable: expandPrivateKey > `const` **expandPrivateKey**: (`seed`) => `Uint8Array` = `expand_private_key_wasm` Expand master seed into L private key chains. Returns a flat array of L×32 bytes (1088 bytes total). ## Parameters ### seed `Uint8Array` ## Returns `Uint8Array` --- ## Page: h URL: https://docs.totem.ing/api/totemsdk-core/variables/h [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / h # Variable: h > `const` **h**: (`x`) => `Uint8Array`\<`ArrayBufferLike`\> = `F` ## Parameters ### x `Uint8Array` ## Returns `Uint8Array`\<`ArrayBufferLike`\> --- ## Page: hashChain URL: https://docs.totem.ing/api/totemsdk-core/variables/hashChain [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / hashChain # Variable: hashChain > `const` **hashChain**: (`x`, `rounds`) => `Uint8Array` = `hash_chain_wasm` Hash a value k times (hash chain). ## Parameters ### x `Uint8Array` ### rounds `number` ## Returns `Uint8Array` --- ## Page: hexToBytes URL: https://docs.totem.ing/api/totemsdk-core/variables/hexToBytes [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / hexToBytes # Variable: hexToBytes > `const` **hexToBytes**: (`hex_str`) => `Uint8Array` = `hex_to_bytes_wasm` Convert hex string to bytes. ## Parameters ### hex\_str `string` ## Returns `Uint8Array` --- ## Page: makeMxAddress URL: https://docs.totem.ing/api/totemsdk-core/variables/makeMxAddress [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / makeMxAddress # Variable: makeMxAddress > `const` **makeMxAddress**: (`root32`) => `string` = `make_mx_address_wasm` Encode bytes to Minima Mx address format. ## Parameters ### root32 `Uint8Array` ## Returns `string` --- ## Page: mmrRootFromPublicKeys URL: https://docs.totem.ing/api/totemsdk-core/variables/mmrRootFromPublicKeys [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / mmrRootFromPublicKeys # Variable: mmrRootFromPublicKeys > `const` **mmrRootFromPublicKeys**: (`pubkeys_flat`, `count`) => `Uint8Array` = `mmr_root_from_public_keys_wasm` Build MMR tree from public key digests and return the root. ## Parameters ### pubkeys\_flat `Uint8Array` ### count `number` ## Returns `Uint8Array` --- ## Page: parseMxAddress URL: https://docs.totem.ing/api/totemsdk-core/variables/parseMxAddress [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / parseMxAddress # Variable: parseMxAddress > `const` **parseMxAddress**: (`address`) => `Uint8Array` = `parse_mx_address_wasm` Decode a Minima Mx address to bytes. ## Parameters ### address `string` ## Returns `Uint8Array` --- ## Page: precomputeTransactionCoinID URL: https://docs.totem.ing/api/totemsdk-core/variables/precomputeTransactionCoinID [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / precomputeTransactionCoinID # Variable: precomputeTransactionCoinID > `const` **precomputeTransactionCoinID**: (`txid`, `output_index`) => `Uint8Array` = `precompute_transaction_coin_id_wasm` Precompute output coin IDs before transaction digest. ## Parameters ### txid `Uint8Array` ### output\_index `number` ## Returns `Uint8Array` --- ## Page: serializeRealMMRProof URL: https://docs.totem.ing/api/totemsdk-core/variables/serializeRealMMRProof [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / serializeRealMMRProof # Variable: serializeRealMMRProof > `const` **serializeRealMMRProof**: (`proof`, `blockTime`) => `Bytes` = `serializeMMRProof` ## Parameters ### proof #### chunks `object`[] ### blockTime? `bigint` = `0n` ## Returns `Bytes` --- ## Page: serializeTransaction URL: https://docs.totem.ing/api/totemsdk-core/variables/serializeTransaction [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / serializeTransaction # Variable: serializeTransaction > `const` **serializeTransaction**: (`tx_json`) => `Uint8Array` = `serialize_transaction_wasm` Serialize a transaction for digest computation. ## Parameters ### tx\_json `string` ## Returns `Uint8Array` --- ## Page: sha3_256 URL: https://docs.totem.ing/api/totemsdk-core/variables/sha3_256 [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / sha3\_256 # Variable: sha3\_256 > `const` **sha3\_256**: (`data`) => `Uint8Array` = `sha3_256_wasm` SHA3-256 hash of data. ## Parameters ### data `Uint8Array` ## Returns `Uint8Array` --- ## Page: timingSafeEqual URL: https://docs.totem.ing/api/totemsdk-core/variables/timingSafeEqual [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / timingSafeEqual # Variable: timingSafeEqual > `const` **timingSafeEqual**: (`a`, `b`) => `boolean` = `timing_safe_equal_wasm` Constant-time comparison of two byte arrays. ## Parameters ### a `Uint8Array` ### b `Uint8Array` ## Returns `boolean` --- ## Page: validateChallenge URL: https://docs.totem.ing/api/totemsdk-core/variables/validateChallenge [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / validateChallenge # Variable: validateChallenge > `const` **validateChallenge**: (`challenge_json`, `domain`) => `boolean` = `validate_challenge_wasm` Validate a Sign-In With Wallet challenge. ## Parameters ### challenge\_json `string` ### domain `string` ## Returns `boolean` --- ## Page: verifyMMRProof URL: https://docs.totem.ing/api/totemsdk-core/variables/verifyMMRProof [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / verifyMMRProof # Variable: verifyMMRProof > `const` **verifyMMRProof**: (`leaf_pubkey`, `proof_json`, `expected_root`) => `boolean` = `verify_mmr_proof_wasm` Verify an MMR proof for a leaf public key. ## Parameters ### leaf\_pubkey `Uint8Array` ### proof\_json `string` ### expected\_root `Uint8Array` ## Returns `boolean` --- ## Page: wotsPkFromSig URL: https://docs.totem.ing/api/totemsdk-core/variables/wotsPkFromSig [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / wotsPkFromSig # Variable: wotsPkFromSig > `const` **wotsPkFromSig**: (`message`, `signature`) => `Uint8Array` = `wots_pk_from_sig_wasm` Recover public key digest from signature. ## Parameters ### message `Uint8Array` ### signature `Uint8Array` ## Returns `Uint8Array` --- ## Page: wotsPublicKeyFromSeed URL: https://docs.totem.ing/api/totemsdk-core/variables/wotsPublicKeyFromSeed [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / wotsPublicKeyFromSeed # Variable: wotsPublicKeyFromSeed > `const` **wotsPublicKeyFromSeed**: (`seed`, `key_index`) => `Uint8Array` = `derive_pk_digest_wasm` Derive WOTS public key digest (32 bytes). ## Parameters ### seed `Uint8Array` ### key\_index `number` ## Returns `Uint8Array` --- ## Page: wotsSign URL: https://docs.totem.ing/api/totemsdk-core/variables/wotsSign [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / wotsSign # Variable: wotsSign > `const` **wotsSign**: (`seed`, `key_index`, `message`) => `Uint8Array` = `wots_sign_wasm` Sign a message using WOTS. Returns 1088-byte signature. ## Parameters ### seed `Uint8Array` ### key\_index `number` ### message `Uint8Array` ## Returns `Uint8Array` --- ## Page: wotsVerify URL: https://docs.totem.ing/api/totemsdk-core/variables/wotsVerify [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / wotsVerify # Variable: wotsVerify > `const` **wotsVerify**: (`sig`, `message`, `pk_full`) => `boolean` = `wots_verify_wasm` Verify WOTS signature against full 1088-byte public key. ## Parameters ### sig `Uint8Array` ### message `Uint8Array` ### pk\_full `Uint8Array` ## Returns `boolean` --- ## Page: wotsVerifyDigest URL: https://docs.totem.ing/api/totemsdk-core/variables/wotsVerifyDigest [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / wotsVerifyDigest # Variable: wotsVerifyDigest > `const` **wotsVerifyDigest**: (`sig`, `message`, `pk_digest`) => `boolean` = `wots_verify_digest_wasm` Verify WOTS signature against 32-byte public key digest. ## Parameters ### sig `Uint8Array` ### message `Uint8Array` ### pk\_digest `Uint8Array` ## Returns `boolean` --- ## Page: writeMiniData URL: https://docs.totem.ing/api/totemsdk-core/variables/writeMiniData [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / writeMiniData # Variable: writeMiniData > `const` **writeMiniData**: (`data`) => `Uint8Array` = `write_mini_data_wasm` Write MiniData (Java-compatible serialization). ## Parameters ### data `Uint8Array` ## Returns `Uint8Array` --- ## Page: writeMiniString URL: https://docs.totem.ing/api/totemsdk-core/variables/writeMiniString [**@totemsdk/core**](../index.md) *** [@totemsdk/core](../index.md) / writeMiniString # Variable: writeMiniString > `const` **writeMiniString**: (`s`) => `Uint8Array` = `write_mini_string_wasm` Write MiniString (Java-compatible serialization). ## Parameters ### s `string` ## Returns `Uint8Array` --- ## Page: EdgeBuyer URL: https://docs.totem.ing/api/totemsdk-edge/classes/EdgeBuyer [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / EdgeBuyer # Class: EdgeBuyer ## Constructors ### Constructor > **new EdgeBuyer**(`opts`): `EdgeBuyer` #### Parameters ##### opts [`BuyerOptions`](../interfaces/BuyerOptions.md) #### Returns `EdgeBuyer` ## Accessors ### engine #### Get Signature > **get** **engine**(): [`NegotiationEngine`](NegotiationEngine.md) The underlying negotiation engine. Exposed so a seller-side runtime can wire inbound authenticated transport messages into the same engine that drives purchases. The engine remains the deterministic economic state machine; transport stays separate. ##### Returns [`NegotiationEngine`](NegotiationEngine.md) ## Methods ### buy() > **buy**(`options`): `Promise`\<[`PurchaseResult`](../interfaces/PurchaseResult.md)\> edge.buy() — resource-generic demand orchestration. #### Parameters ##### options [`BuyOptions`](../interfaces/BuyOptions.md) #### Returns `Promise`\<[`PurchaseResult`](../interfaces/PurchaseResult.md)\> *** ### enqueueMessage() > **enqueueMessage**(`recipient`, `message`): `Promise`\<`void`\> Enqueue a signed protocol message into the durable outbox. Exposed for the runtime-level outbox drainer to send. #### Parameters ##### recipient `string` ##### message [`NegotiationMessage`](../type-aliases/NegotiationMessage.md) #### Returns `Promise`\<`void`\> *** ### handleInbound() > **handleInbound**(`message`, `context`): `Promise`\<[`ReplayOutcome`](../interfaces/ReplayOutcome.md)\> Handle an inbound authenticated negotiation message. Used by the transport-driven negotiation loop. #### Parameters ##### message [`NegotiationMessage`](../type-aliases/NegotiationMessage.md) ##### context [`TransportMessageContext`](../interfaces/TransportMessageContext.md) #### Returns `Promise`\<[`ReplayOutcome`](../interfaces/ReplayOutcome.md)\> *** ### negotiate() > **negotiate**(`options`): `Promise`\<[`NegotiationResult`](../interfaces/NegotiationResult.md)\> edge.negotiate() — bounded peer-to-peer negotiation. When a negotiation transport is configured, this method becomes transport-driven: the initial proposal is sent over the wire and the service waits for seller responses. When no transport is configured, negotiation is local/programmatic (used for deterministic tests and co-located runtimes). #### Parameters ##### options ###### desiredTerms [`TradeTerms`](../interfaces/TradeTerms.md) ###### limits `Partial`\<[`NegotiationLimits`](../interfaces/NegotiationLimits.md)\> ###### manifest `SignedManifest` ###### strategy [`NegotiationStrategy`](../interfaces/NegotiationStrategy.md) #### Returns `Promise`\<[`NegotiationResult`](../interfaces/NegotiationResult.md)\> *** ### reconcilePrincipalSlots() > **reconcilePrincipalSlots**(): `Promise`\<`void`\> Reconcile principal admission slots against active negotiations after a restart. Any slot whose negotiation is terminal/expired/missing is released, preventing capacity leaks from crashed processes. #### Returns `Promise`\<`void`\> *** ### recoverResource() > **recoverResource**(`purchaseId`): `Promise`\<[`PurchaseSession`](../interfaces/PurchaseSession.md) \| `null`\> Recover a purchase's resource after a restart. Looks up the durable purchase record, and if a resource reference is persisted, reconnects via the adapter's recover() hook — never starting another identical resource. Returns the recovered session, or null when the purchase has no persisted resource reference (nothing to recover). #### Parameters ##### purchaseId `string` #### Returns `Promise`\<[`PurchaseSession`](../interfaces/PurchaseSession.md) \| `null`\> *** ### startTransport() > **startTransport**(): `Promise`\<() => `void`\> Start listening on the negotiation transport (idempotent). #### Returns `Promise`\<() => `void`\> *** ### stopTransport() > **stopTransport**(): `void` Stop listening on the negotiation transport. #### Returns `void` --- ## Page: EdgeCapabilityError URL: https://docs.totem.ing/api/totemsdk-edge/classes/EdgeCapabilityError [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / EdgeCapabilityError # Class: EdgeCapabilityError Typed errors for @totemsdk/edge. ## Extends - `Error` ## Constructors ### Constructor > **new EdgeCapabilityError**(`capability`, `message?`): `EdgeCapabilityError` #### Parameters ##### capability `string` ##### message? `string` #### Returns `EdgeCapabilityError` #### Overrides `Error.constructor` ## Properties ### capability > `readonly` **capability**: `string` *** ### code > `readonly` **code**: `string` *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: EdgeTxPowAdapter URL: https://docs.totem.ing/api/totemsdk-edge/classes/EdgeTxPowAdapter [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / EdgeTxPowAdapter # Class: EdgeTxPowAdapter TxPoW adapter — the only place Edge touches @totemsdk/txpow. ## Constructors ### Constructor > **new EdgeTxPowAdapter**(`templateProvider`, `relay?`): `EdgeTxPowAdapter` #### Parameters ##### templateProvider `MinimaWorkTemplateProvider` ##### relay? `MinimaWorkRelay` #### Returns `EdgeTxPowAdapter` ## Methods ### fingerprint() > **fingerprint**(`challenge`): `string` One-shot challenge fingerprint. #### Parameters ##### challenge `WorkChallenge` #### Returns `string` *** ### mine() > **mine**(`action`, `challenge`, `opts?`): `Promise`\<`MachineWorkAdmissionProof`\> Mine a Machine Work Admission proof for a proposal. The action commitment binds negotiationId, proposalId, parentProposalId, manifestId, proposer, recipient, round, terms hash, and proposal expiry. NOTE: mining does NOT relay. Only the locally returned verifyWorkAdmission() metadata may trigger block relay (see verify()). #### Parameters ##### action `MachineWorkAction` ##### challenge `WorkChallenge` ##### opts? ###### _skipWorker? `boolean` ###### forceJs? `boolean` ###### maxIterations? `number` ###### prng? `Uint8Array`\<`ArrayBufferLike`\> ###### signal? `AbortSignal` #### Returns `Promise`\<`MachineWorkAdmissionProof`\> *** ### verify() > **verify**(`action`, `challenge`, `proof`): `Promise`\<`WorkAdmissionVerification`\> Verify a Machine Work Admission proof. Only the locally returned verification metadata may trigger block relay. Relay is best-effort: a relay failure must never invalidate a valid proposal or stall negotiation. #### Parameters ##### action `MachineWorkAction` ##### challenge `WorkChallenge` ##### proof `MachineWorkAdmissionProof` #### Returns `Promise`\<`WorkAdmissionVerification`\> --- ## Page: EdgeWorkPolicy URL: https://docs.totem.ing/api/totemsdk-edge/classes/EdgeWorkPolicy [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / EdgeWorkPolicy # Class: EdgeWorkPolicy Edge work policy — answers "am I willing to perform this challenge?" Cryptographic verification still depends on challenge.target, not local timing estimates. The budget only gates whether the machine proceeds. ## Constructors ### Constructor > **new EdgeWorkPolicy**(`mode`, `budget`, `difficulty`, `hashRatePerSec`): `EdgeWorkPolicy` #### Parameters ##### mode [`WorkMode`](../type-aliases/WorkMode.md) ##### budget [`LocalWorkBudget`](../interfaces/LocalWorkBudget.md) ##### difficulty [`WorkDifficultyPolicy`](../interfaces/WorkDifficultyPolicy.md) ##### hashRatePerSec `number` #### Returns `EdgeWorkPolicy` ## Methods ### expectedHashes() > **expectedHashes**(`targetHex`): `bigint` Expected hashes for a target (exposed for telemetry). #### Parameters ##### targetHex `string` #### Returns `bigint` *** ### getMode() > **getMode**(): [`WorkMode`](../type-aliases/WorkMode.md) #### Returns [`WorkMode`](../type-aliases/WorkMode.md) *** ### issueChallenge() > **issueChallenge**(`params`): `Promise`\<\{ `challenge`: `WorkChallenge`; `workRequired`: [`WorkRequired`](../interfaces/WorkRequired.md); \}\> Issue a WorkRequired challenge for the next round, bound by local policy. The caller (engine or seller service) is responsible for sending the challenge to the counterparty and persisting it as an outstanding challenge in the negotiation record. #### Parameters ##### params ###### domain? `string` ###### issuer `string` ###### negotiationId `string` ###### now? () => `number` ###### recipient `string` ###### round `number` ###### sign (`digest`) => `Promise`\<\{ `signature`: `string`; `signerPublicKey`: `string`; \}\> #### Returns `Promise`\<\{ `challenge`: `WorkChallenge`; `workRequired`: [`WorkRequired`](../interfaces/WorkRequired.md); \}\> *** ### targetForRound() > **targetForRound**(`round`): `string` \| `null` Resolve the difficulty target for a given round, bounded by local policy. Returns null when the round's target would exceed the configured maximum. #### Parameters ##### round `number` #### Returns `string` \| `null` *** ### willingToWork() > **willingToWork**(`challenge`, `round`, `cumulativeWork`): `Promise`\<\{ `ok`: `boolean`; `reason?`: `string`; \}\> Decide whether the machine is willing to perform a challenge for a given round, given the cumulative work already spent in this negotiation. #### Parameters ##### challenge `WorkChallenge` ##### round `number` ##### cumulativeWork `bigint` #### Returns `Promise`\<\{ `ok`: `boolean`; `reason?`: `string`; \}\> --- ## Page: InMemoryNegotiationStore URL: https://docs.totem.ing/api/totemsdk-edge/classes/InMemoryNegotiationStore [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / InMemoryNegotiationStore # Class: InMemoryNegotiationStore In-memory negotiation store. No crash guarantees — for development and tests only. Production must supply a durable implementation. ## Implements - [`NegotiationStore`](../interfaces/NegotiationStore.md) ## Constructors ### Constructor > **new InMemoryNegotiationStore**(`outbox?`): `InMemoryNegotiationStore` #### Parameters ##### outbox? [`OutboxStore`](../interfaces/OutboxStore.md) #### Returns `InMemoryNegotiationStore` ## Methods ### compareAndSet() > **compareAndSet**(`negotiationId`, `expectedRevision`, `next`): `Promise`\<`boolean`\> Atomically replace the record only if its current revision equals `expectedRevision`. Returns false when the record was advanced by another writer (stale transition). #### Parameters ##### negotiationId `string` ##### expectedRevision `number` ##### next [`NegotiationRecord`](../interfaces/NegotiationRecord.md) #### Returns `Promise`\<`boolean`\> #### Implementation of [`NegotiationStore`](../interfaces/NegotiationStore.md).[`compareAndSet`](../interfaces/NegotiationStore.md#compareandset) *** ### create() > **create**(`record`): `Promise`\<`void`\> #### Parameters ##### record [`NegotiationRecord`](../interfaces/NegotiationRecord.md) #### Returns `Promise`\<`void`\> #### Implementation of [`NegotiationStore`](../interfaces/NegotiationStore.md).[`create`](../interfaces/NegotiationStore.md#create) *** ### get() > **get**(`negotiationId`): `Promise`\<[`NegotiationRecord`](../interfaces/NegotiationRecord.md) \| `undefined`\> #### Parameters ##### negotiationId `string` #### Returns `Promise`\<[`NegotiationRecord`](../interfaces/NegotiationRecord.md) \| `undefined`\> #### Implementation of [`NegotiationStore`](../interfaces/NegotiationStore.md).[`get`](../interfaces/NegotiationStore.md#get) *** ### getOutbox() > **getOutbox**(): [`OutboxStore`](../interfaces/OutboxStore.md) Expose the outbox read/write surface (dev mode + tests). #### Returns [`OutboxStore`](../interfaces/OutboxStore.md) *** ### listRecoverable() > **listRecoverable**(): `Promise`\<[`NegotiationRecord`](../interfaces/NegotiationRecord.md)[]\> List recoverable (non-terminal) negotiations. #### Returns `Promise`\<[`NegotiationRecord`](../interfaces/NegotiationRecord.md)[]\> #### Implementation of [`NegotiationStore`](../interfaces/NegotiationStore.md).[`listRecoverable`](../interfaces/NegotiationStore.md#listrecoverable) *** ### listUndelivered() > **listUndelivered**(): `Promise`\<[`OutboxEntry`](../interfaces/OutboxEntry.md)[]\> #### Returns `Promise`\<[`OutboxEntry`](../interfaces/OutboxEntry.md)[]\> *** ### markOutboxDelivered() > **markOutboxDelivered**(`messageId`): `Promise`\<`void`\> #### Parameters ##### messageId `string` #### Returns `Promise`\<`void`\> *** ### transitionAndEnqueue() > **transitionAndEnqueue**(`negotiationId`, `expectedRevision`, `next`, `outboxMessages`): `Promise`\<`boolean`\> Atomically perform a negotiation CAS AND enqueue outbox messages in ONE durable transaction. Returns false when the CAS failed (stale revision). For SQLite/Postgres this MUST be a single DB transaction so that the economic transition and the protocol response commit or fail together. The default falls back to a two-step (non-transactional) sequence. A durable store MUST override this to keep the crash window closed. #### Parameters ##### negotiationId `string` ##### expectedRevision `number` ##### next [`NegotiationRecord`](../interfaces/NegotiationRecord.md) ##### outboxMessages [`OutboxMessage`](../interfaces/OutboxMessage.md)[] #### Returns `Promise`\<`boolean`\> #### Implementation of [`NegotiationStore`](../interfaces/NegotiationStore.md).[`transitionAndEnqueue`](../interfaces/NegotiationStore.md#transitionandenqueue) --- ## Page: InMemoryNegotiationTransport URL: https://docs.totem.ing/api/totemsdk-edge/classes/InMemoryNegotiationTransport [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / InMemoryNegotiationTransport # Class: InMemoryNegotiationTransport Deterministic in-memory transport for tests and local/programmatic negotiation. Delivers messages synchronously to subscribed handlers, and returns a DeliveryReceipt when the handler is present (durably delivered). ## Implements - [`NegotiationTransport`](../interfaces/NegotiationTransport.md) ## Constructors ### Constructor > **new InMemoryNegotiationTransport**(): `InMemoryNegotiationTransport` #### Returns `InMemoryNegotiationTransport` ## Methods ### getSent() > **getSent**(): `object`[] Inspect delivered messages (for tests). #### Returns `object`[] *** ### send() > **send**(`recipient`, `message`): `Promise`\<[`DeliveryReceipt`](../interfaces/DeliveryReceipt.md) \| `undefined`\> #### Parameters ##### recipient `string` ##### message [`NegotiationMessage`](../type-aliases/NegotiationMessage.md) #### Returns `Promise`\<[`DeliveryReceipt`](../interfaces/DeliveryReceipt.md) \| `undefined`\> #### Implementation of [`NegotiationTransport`](../interfaces/NegotiationTransport.md).[`send`](../interfaces/NegotiationTransport.md#send) *** ### subscribe() > **subscribe**(`handler`): `Unsubscribe` #### Parameters ##### handler (`message`, `context`) => `Promise`\<`void`\> #### Returns `Unsubscribe` #### Implementation of [`NegotiationTransport`](../interfaces/NegotiationTransport.md).[`subscribe`](../interfaces/NegotiationTransport.md#subscribe) --- ## Page: InMemoryOutboxStore URL: https://docs.totem.ing/api/totemsdk-edge/classes/InMemoryOutboxStore [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / InMemoryOutboxStore # Class: InMemoryOutboxStore In-memory outbox (dev/test). ## Implements - [`OutboxStore`](../interfaces/OutboxStore.md) ## Constructors ### Constructor > **new InMemoryOutboxStore**(): `InMemoryOutboxStore` #### Returns `InMemoryOutboxStore` ## Methods ### enqueue() > **enqueue**(`entry`): `Promise`\<`void`\> Atomically enqueue an outbound message. #### Parameters ##### entry [`OutboxEntry`](../interfaces/OutboxEntry.md) #### Returns `Promise`\<`void`\> #### Implementation of [`OutboxStore`](../interfaces/OutboxStore.md).[`enqueue`](../interfaces/OutboxStore.md#enqueue) *** ### listUndelivered() > **listUndelivered**(): `Promise`\<[`OutboxEntry`](../interfaces/OutboxEntry.md)[]\> List undelivered entries (for resend on restart). #### Returns `Promise`\<[`OutboxEntry`](../interfaces/OutboxEntry.md)[]\> #### Implementation of [`OutboxStore`](../interfaces/OutboxStore.md).[`listUndelivered`](../interfaces/OutboxStore.md#listundelivered) *** ### markDelivered() > **markDelivered**(`messageId`, `deliveredAt`): `Promise`\<`void`\> Mark a message as delivered. #### Parameters ##### messageId `string` ##### deliveredAt `number` #### Returns `Promise`\<`void`\> #### Implementation of [`OutboxStore`](../interfaces/OutboxStore.md).[`markDelivered`](../interfaces/OutboxStore.md#markdelivered) *** ### recordAttempt() > **recordAttempt**(`messageId`): `Promise`\<`void`\> Increment the delivery attempt count. #### Parameters ##### messageId `string` #### Returns `Promise`\<`void`\> #### Implementation of [`OutboxStore`](../interfaces/OutboxStore.md).[`recordAttempt`](../interfaces/OutboxStore.md#recordattempt) --- ## Page: InMemoryPrincipalNegotiationStore URL: https://docs.totem.ing/api/totemsdk-edge/classes/InMemoryPrincipalNegotiationStore [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / InMemoryPrincipalNegotiationStore # Class: InMemoryPrincipalNegotiationStore In-memory principal anti-abuse store. No crash guarantees — dev/test only. ## Implements - [`PrincipalNegotiationStore`](../interfaces/PrincipalNegotiationStore.md) ## Constructors ### Constructor > **new InMemoryPrincipalNegotiationStore**(): `InMemoryPrincipalNegotiationStore` #### Returns `InMemoryPrincipalNegotiationStore` ## Methods ### close() > **close**(`principal`, `negotiationId`): `Promise`\<`void`\> Atomically release capacity for a principal for a specific negotiation. Safe to call multiple times (no double-release). #### Parameters ##### principal `string` ##### negotiationId `string` #### Returns `Promise`\<`void`\> #### Implementation of [`PrincipalNegotiationStore`](../interfaces/PrincipalNegotiationStore.md).[`close`](../interfaces/PrincipalNegotiationStore.md#close) *** ### getCooldownUntil() > **getCooldownUntil**(`principal`): `Promise`\<`number`\> Get the cooldown-until timestamp for a principal (0 = none). #### Parameters ##### principal `string` #### Returns `Promise`\<`number`\> #### Implementation of [`PrincipalNegotiationStore`](../interfaces/PrincipalNegotiationStore.md).[`getCooldownUntil`](../interfaces/PrincipalNegotiationStore.md#getcooldownuntil) *** ### reconcile() > **reconcile**(`principal`, `activeNegotiationIds`): `Promise`\<`void`\> Reconcile open slots against the set of still-active negotiation IDs. Any slot whose negotiation is terminal, expired, or no longer present is released. This is the recovery hook that prevents capacity leaks when a process crashes before close(). #### Parameters ##### principal `string` ##### activeNegotiationIds `string`[] #### Returns `Promise`\<`void`\> #### Implementation of [`PrincipalNegotiationStore`](../interfaces/PrincipalNegotiationStore.md).[`reconcile`](../interfaces/PrincipalNegotiationStore.md#reconcile) *** ### setCooldownUntil() > **setCooldownUntil**(`principal`, `until`): `Promise`\<`void`\> Set the cooldown-until timestamp for a principal. #### Parameters ##### principal `string` ##### until `number` #### Returns `Promise`\<`void`\> #### Implementation of [`PrincipalNegotiationStore`](../interfaces/PrincipalNegotiationStore.md).[`setCooldownUntil`](../interfaces/PrincipalNegotiationStore.md#setcooldownuntil) *** ### tryOpen() > **tryOpen**(`principal`, `negotiationId`, `now`, `limits`): `Promise`\<\{ `allowed`: `true`; \} \| \{ `allowed`: `false`; `reason`: `"CONCURRENCY_LIMIT"` \| `"COOLDOWN"` \| `"WINDOW_LIMIT"`; \}\> Atomically check limits AND consume capacity. Returns `{ allowed: true }` when the principal may open a negotiation, or a typed rejection reason. Each consumed slot is bound to its `negotiationId` so recovery can reconcile open slots against actual negotiation records — a crashed process cannot leak capacity permanently. #### Parameters ##### principal `string` ##### negotiationId `string` ##### now `number` ##### limits ###### cooldownMs `number` ###### maxConcurrentNegotiations `number` ###### maxNegotiationsPerWindow `number` ###### windowMs `number` #### Returns `Promise`\<\{ `allowed`: `true`; \} \| \{ `allowed`: `false`; `reason`: `"CONCURRENCY_LIMIT"` \| `"COOLDOWN"` \| `"WINDOW_LIMIT"`; \}\> #### Implementation of [`PrincipalNegotiationStore`](../interfaces/PrincipalNegotiationStore.md).[`tryOpen`](../interfaces/PrincipalNegotiationStore.md#tryopen) --- ## Page: InMemoryPurchaseStore URL: https://docs.totem.ing/api/totemsdk-edge/classes/InMemoryPurchaseStore [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / InMemoryPurchaseStore # Class: InMemoryPurchaseStore In-memory purchase store. No crash guarantees — dev/test only. ## Implements - [`PurchaseStore`](../interfaces/PurchaseStore.md) ## Constructors ### Constructor > **new InMemoryPurchaseStore**(): `InMemoryPurchaseStore` #### Returns `InMemoryPurchaseStore` ## Methods ### compareAndSet() > **compareAndSet**(`purchaseId`, `expectedRevision`, `next`): `Promise`\<`boolean`\> #### Parameters ##### purchaseId `string` ##### expectedRevision `number` ##### next [`PurchaseRecord`](../interfaces/PurchaseRecord.md) #### Returns `Promise`\<`boolean`\> #### Implementation of [`PurchaseStore`](../interfaces/PurchaseStore.md).[`compareAndSet`](../interfaces/PurchaseStore.md#compareandset) *** ### create() > **create**(`record`): `Promise`\<`void`\> #### Parameters ##### record [`PurchaseRecord`](../interfaces/PurchaseRecord.md) #### Returns `Promise`\<`void`\> #### Implementation of [`PurchaseStore`](../interfaces/PurchaseStore.md).[`create`](../interfaces/PurchaseStore.md#create) *** ### get() > **get**(`purchaseId`): `Promise`\<[`PurchaseRecord`](../interfaces/PurchaseRecord.md) \| `undefined`\> #### Parameters ##### purchaseId `string` #### Returns `Promise`\<[`PurchaseRecord`](../interfaces/PurchaseRecord.md) \| `undefined`\> #### Implementation of [`PurchaseStore`](../interfaces/PurchaseStore.md).[`get`](../interfaces/PurchaseStore.md#get) *** ### listRecoverable() > **listRecoverable**(): `Promise`\<[`PurchaseRecord`](../interfaces/PurchaseRecord.md)[]\> #### Returns `Promise`\<[`PurchaseRecord`](../interfaces/PurchaseRecord.md)[]\> #### Implementation of [`PurchaseStore`](../interfaces/PurchaseStore.md).[`listRecoverable`](../interfaces/PurchaseStore.md#listrecoverable) --- ## Page: InMemoryReplayLedger URL: https://docs.totem.ing/api/totemsdk-edge/classes/InMemoryReplayLedger [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / InMemoryReplayLedger # Class: InMemoryReplayLedger In-memory replay ledger (dev/test). Atomic within a single process. ## Implements - [`ReplayLedger`](../interfaces/ReplayLedger.md) ## Constructors ### Constructor > **new InMemoryReplayLedger**(): `InMemoryReplayLedger` #### Returns `InMemoryReplayLedger` ## Methods ### claim() > **claim**(`messageId`, `receivedAt`, `leaseMs?`): `Promise`\<\{ `claimed`: `true`; `reclaimed?`: `boolean`; \} \| \{ `claimed`: `false`; `entry?`: [`ReplayEntry`](../type-aliases/ReplayEntry.md); \}\> Atomically claim a message for processing. Returns `{ claimed: true }` when this caller won the claim, `{ claimed: false, outcome }` when the message was already completed, or `{ claimed: true, reclaimed: true }` when a stale lease was reclaimed. #### Parameters ##### messageId `string` ##### receivedAt `number` ##### leaseMs? `number` = `30_000` #### Returns `Promise`\<\{ `claimed`: `true`; `reclaimed?`: `boolean`; \} \| \{ `claimed`: `false`; `entry?`: [`ReplayEntry`](../type-aliases/ReplayEntry.md); \}\> #### Implementation of [`ReplayLedger`](../interfaces/ReplayLedger.md).[`claim`](../interfaces/ReplayLedger.md#claim) *** ### complete() > **complete**(`messageId`, `outcome`): `Promise`\<`void`\> Mark a claimed message as durably processed with its outcome. #### Parameters ##### messageId `string` ##### outcome [`ReplayOutcome`](../interfaces/ReplayOutcome.md) #### Returns `Promise`\<`void`\> #### Implementation of [`ReplayLedger`](../interfaces/ReplayLedger.md).[`complete`](../interfaces/ReplayLedger.md#complete) *** ### get() > **get**(`messageId`): `Promise`\<[`ReplayEntry`](../type-aliases/ReplayEntry.md) \| `undefined`\> Look up a previously processed message. #### Parameters ##### messageId `string` #### Returns `Promise`\<[`ReplayEntry`](../type-aliases/ReplayEntry.md) \| `undefined`\> #### Implementation of [`ReplayLedger`](../interfaces/ReplayLedger.md).[`get`](../interfaces/ReplayLedger.md#get) --- ## Page: NegotiationEngine URL: https://docs.totem.ing/api/totemsdk-edge/classes/NegotiationEngine [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / NegotiationEngine # Class: NegotiationEngine ## Constructors ### Constructor > **new NegotiationEngine**(`opts`): `NegotiationEngine` #### Parameters ##### opts [`NegotiationEngineOptions`](../interfaces/NegotiationEngineOptions.md) #### Returns `NegotiationEngine` ## Methods ### acceptProposal() > **acceptProposal**(`acceptance`): `Promise`\<[`TradeAgreement`](../interfaces/TradeAgreement.md)\> Accept the current proposal head. Binds the exact current proposal. Returns the immutable TradeAgreement. #### Parameters ##### acceptance [`ProposalAcceptance`](../interfaces/ProposalAcceptance.md) #### Returns `Promise`\<[`TradeAgreement`](../interfaces/TradeAgreement.md)\> *** ### buildAction() > **buildAction**(`proposal`): `MachineWorkAction` Build a MachineWorkAction for a proposal (binds all security-relevant fields). Used both for mining and verification. #### Parameters ##### proposal [`TradeProposal`](../interfaces/TradeProposal.md) #### Returns `MachineWorkAction` *** ### cancelNegotiation() > **cancelNegotiation**(`cancellation`): `Promise`\<`void`\> Cancel a negotiation. #### Parameters ##### cancellation [`NegotiationCancellation`](../interfaces/NegotiationCancellation.md) #### Returns `Promise`\<`void`\> *** ### getCumulativeWork() > **getCumulativeWork**(`negotiationId`): `Promise`\<`bigint`\> Get cumulative work spent in a negotiation. #### Parameters ##### negotiationId `string` #### Returns `Promise`\<`bigint`\> *** ### getHistory() > **getHistory**(`negotiationId`): `Promise`\<[`TradeProposal`](../interfaces/TradeProposal.md)[]\> Get the proposal history for a negotiation. #### Parameters ##### negotiationId `string` #### Returns `Promise`\<[`TradeProposal`](../interfaces/TradeProposal.md)[]\> *** ### getIssuedChallenge() > **getIssuedChallenge**(`negotiationId`, `round`): `WorkChallenge` \| `undefined` Retrieve a previously issued or received challenge for a round. #### Parameters ##### negotiationId `string` ##### round `number` #### Returns `WorkChallenge` \| `undefined` *** ### getRecordFor() > **getRecordFor**(`negotiationId`): `Promise`\<[`NegotiationRecord`](../interfaces/NegotiationRecord.md) \| `undefined`\> Get the durable record for a negotiation. #### Parameters ##### negotiationId `string` #### Returns `Promise`\<[`NegotiationRecord`](../interfaces/NegotiationRecord.md) \| `undefined`\> *** ### getState() > **getState**(`negotiationId`): `Promise`\<[`NegotiationState`](../type-aliases/NegotiationState.md) \| `undefined`\> Get the current state of a negotiation. #### Parameters ##### negotiationId `string` #### Returns `Promise`\<[`NegotiationState`](../type-aliases/NegotiationState.md) \| `undefined`\> *** ### getTermsHashes() > **getTermsHashes**(`negotiationId`): `Promise`\<`string`[]\> Get the terms hashes for a negotiation (for cycle detection). #### Parameters ##### negotiationId `string` #### Returns `Promise`\<`string`[]\> *** ### handleWorkRequired() > **handleWorkRequired**(`msg`): `Promise`\<`WorkChallenge`\> Handle an inbound WorkRequired. Validates issuer signature, recipient, negotiation state, and that only one outstanding WorkRequired exists for the current head. Returns the challenge when acceptable. #### Parameters ##### msg [`WorkRequired`](../interfaces/WorkRequired.md) #### Returns `Promise`\<`WorkChallenge`\> *** ### issueChallenge() > **issueChallenge**(`negotiationId`): `Promise`\<[`WorkRequired`](../interfaces/WorkRequired.md)\> Issue a WorkRequired challenge for the next round from this engine. Persists the challenge locally as outstanding so that a future proposal mined against it can be verified. Validates local work policy and budget before issuing. #### Parameters ##### negotiationId `string` #### Returns `Promise`\<[`WorkRequired`](../interfaces/WorkRequired.md)\> *** ### openNegotiation() > **openNegotiation**(`opts`): `Promise`\<[`NegotiationRecord`](../interfaces/NegotiationRecord.md)\> Open a new negotiation. Enforces per-principal concurrency, cooldown, and window limits ATOMICALLY (check + consume is one operation). Returns the negotiation record. #### Parameters ##### opts ###### counterparty `string` ###### expiresAt? `number` ###### manifestId `string` ###### negotiationId `string` #### Returns `Promise`\<[`NegotiationRecord`](../interfaces/NegotiationRecord.md)\> *** ### reconcilePrincipalSlots() > **reconcilePrincipalSlots**(): `Promise`\<`void`\> Reconcile principal admission slots against currently-active negotiation records. Any slot whose negotiation is terminal, expired, or missing is released. Invoke after restart to prevent capacity leaks. #### Returns `Promise`\<`void`\> *** ### rejectProposal() > **rejectProposal**(`rejection`): `Promise`\<`void`\> Reject the current proposal head. #### Parameters ##### rejection [`ProposalRejection`](../interfaces/ProposalRejection.md) #### Returns `Promise`\<`void`\> *** ### submitProposal() > **submitProposal**(`proposal`): `Promise`\<[`NegotiationRecord`](../interfaces/NegotiationRecord.md)\> Submit a proposal (initial or counter). Enforces every bound atomically. Returns the updated record. #### Parameters ##### proposal [`TradeProposal`](../interfaces/TradeProposal.md) #### Returns `Promise`\<[`NegotiationRecord`](../interfaces/NegotiationRecord.md)\> --- ## Page: NegotiationError URL: https://docs.totem.ing/api/totemsdk-edge/classes/NegotiationError [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / NegotiationError # Class: NegotiationError ## Extends - `Error` ## Constructors ### Constructor > **new NegotiationError**(`code`, `message`): `NegotiationError` #### Parameters ##### code `string` ##### message `string` #### Returns `NegotiationError` #### Overrides `Error.constructor` ## Properties ### code > `readonly` **code**: `string` *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: PurchaseError URL: https://docs.totem.ing/api/totemsdk-edge/classes/PurchaseError [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / PurchaseError # Class: PurchaseError purchasing/errors.ts — Typed errors for the purchasing module. ## Extends - `Error` ## Constructors ### Constructor > **new PurchaseError**(`code`, `message`): `PurchaseError` #### Parameters ##### code `string` ##### message `string` #### Returns `PurchaseError` #### Overrides `Error.constructor` ## Properties ### code > `readonly` **code**: `string` *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: assertCapability URL: https://docs.totem.ing/api/totemsdk-edge/functions/assertCapability [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / assertCapability # Function: assertCapability() > **assertCapability**(`set`, `cap`): `void` ## Parameters ### set [`EdgeCapabilitySet`](../type-aliases/EdgeCapabilitySet.md) ### cap [`EdgeCapability`](../type-aliases/EdgeCapability.md) ## Returns `void` --- ## Page: bindEdgeServiceIdentity URL: https://docs.totem.ing/api/totemsdk-edge/functions/bindEdgeServiceIdentity [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / bindEdgeServiceIdentity # Function: bindEdgeServiceIdentity() > **bindEdgeServiceIdentity**(`signedManifest`, `identityGraph`, `options?`): `Promise`\<`ManifestIdentityBinding`\> ## Parameters ### signedManifest `SignedManifest`\<`EdgeServiceManifest`\> ### identityGraph `IdentityGraph` ### options? #### proofVerifiers? `Record`\<`string`, `IdentityProofVerifier`\> ## Returns `Promise`\<`ManifestIdentityBinding`\> --- ## Page: createAccountedIntelligencePort URL: https://docs.totem.ing/api/totemsdk-edge/functions/createAccountedIntelligencePort [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / createAccountedIntelligencePort # Function: createAccountedIntelligencePort() > **createAccountedIntelligencePort**(`options`): [`EdgeIntelligencePort`](../interfaces/EdgeIntelligencePort.md) Bind an [EdgeIntelligencePort](../interfaces/EdgeIntelligencePort.md) and a Journal into an accounted port. The wrapper is provider-neutral — it only ever sees `EdgeIntelligencePort`'s provider-agnostic surface. Guarantees: - A `started` event exists iff the provider was actually dispatched to (a pre-aborted signal short-circuits to `CANCELLED` with no journal write). - Every dispatched call is closed by a `finished` event; a thrown provider call is closed as `outcome-unknown` and rethrown (behavior unchanged). - No receipt is ever fabricated here. ## Parameters ### options [`CreateAccountedIntelligencePortOptions`](../interfaces/CreateAccountedIntelligencePortOptions.md) ## Returns [`EdgeIntelligencePort`](../interfaces/EdgeIntelligencePort.md) --- ## Page: createAgentEdgeRuntime URL: https://docs.totem.ing/api/totemsdk-edge/functions/createAgentEdgeRuntime [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / createAgentEdgeRuntime # Function: createAgentEdgeRuntime() > **createAgentEdgeRuntime**(`options`): [`AgentEdgeRuntime`](../interfaces/AgentEdgeRuntime.md) ## Parameters ### options [`AgentEdgeRuntimeOptions`](../interfaces/AgentEdgeRuntimeOptions.md) ## Returns [`AgentEdgeRuntime`](../interfaces/AgentEdgeRuntime.md) --- ## Page: createBuiltinActionDefinitions URL: https://docs.totem.ing/api/totemsdk-edge/functions/createBuiltinActionDefinitions [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / createBuiltinActionDefinitions # Function: createBuiltinActionDefinitions() > **createBuiltinActionDefinitions**(`ports`, `trusted?`, `txBuilder?`): [`BuiltinActionRegistration`](../interfaces/BuiltinActionRegistration.md)[] ## Parameters ### ports [`EdgeRuntimePorts`](../interfaces/EdgeRuntimePorts.md) ### trusted? `EdgeTrustedSigningContext` ### txBuilder? [`EdgeTxBuilderContext`](../interfaces/EdgeTxBuilderContext.md) ## Returns [`BuiltinActionRegistration`](../interfaces/BuiltinActionRegistration.md)[] --- ## Page: createCapabilitySet URL: https://docs.totem.ing/api/totemsdk-edge/functions/createCapabilitySet [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / createCapabilitySet # Function: createCapabilitySet() > **createCapabilitySet**(`caps`): [`EdgeCapabilitySet`](../type-aliases/EdgeCapabilitySet.md) ## Parameters ### caps [`EdgeCapability`](../type-aliases/EdgeCapability.md)[] ## Returns [`EdgeCapabilitySet`](../type-aliases/EdgeCapabilitySet.md) --- ## Page: createEdge URL: https://docs.totem.ing/api/totemsdk-edge/functions/createEdge [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / createEdge # Function: createEdge() > **createEdge**(`opts`): [`EdgeCommerceRuntime`](../interfaces/EdgeCommerceRuntime.md) Create a runtime-level machine commerce facade. Optional ports degrade gracefully: - no durable store → explicit in-memory/dev mode - no negotiation transport → local/programmatic negotiation only - no Minima relay → commerce still works - no work admission → work-disabled policy only ## Parameters ### opts [`CreateEdgeOptions`](../interfaces/CreateEdgeOptions.md) ## Returns [`EdgeCommerceRuntime`](../interfaces/EdgeCommerceRuntime.md) --- ## Page: createEdgeActionRegistry URL: https://docs.totem.ing/api/totemsdk-edge/functions/createEdgeActionRegistry [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / createEdgeActionRegistry # Function: createEdgeActionRegistry() > **createEdgeActionRegistry**(): [`EdgeActionRegistry`](../interfaces/EdgeActionRegistry.md) ## Returns [`EdgeActionRegistry`](../interfaces/EdgeActionRegistry.md) --- ## Page: createEdgeDevice URL: https://docs.totem.ing/api/totemsdk-edge/functions/createEdgeDevice [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / createEdgeDevice # Function: createEdgeDevice() > **createEdgeDevice**(`opts`): [`EdgeDevice`](../interfaces/EdgeDevice.md) ## Parameters ### opts #### address? `string` #### identityId? `string` #### kind [`EdgeDeviceKind`](../type-aliases/EdgeDeviceKind.md) #### metadata? `Record`\<`string`, `unknown`\> ## Returns [`EdgeDevice`](../interfaces/EdgeDevice.md) --- ## Page: createEdgeIntelligencePort URL: https://docs.totem.ing/api/totemsdk-edge/functions/createEdgeIntelligencePort [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / createEdgeIntelligencePort # Function: createEdgeIntelligencePort() > **createEdgeIntelligencePort**(`provider`): [`EdgeIntelligencePort`](../interfaces/EdgeIntelligencePort.md) Bind a provider-neutral IntelligenceProvider to an [EdgeIntelligencePort](../interfaces/EdgeIntelligencePort.md). The port exposes the provider's `intelligence:*` capability strings and translates provider-neutral operations/results into the port result shape. ## Parameters ### provider `IntelligenceProvider` ## Returns [`EdgeIntelligencePort`](../interfaces/EdgeIntelligencePort.md) ## Example ```ts import { createEdgeIntelligencePort } from '@totemsdk/intelligence'; import { createQvacIntelligenceProvider } from '@totemsdk/qvac'; const port = createEdgeIntelligencePort( createQvacIntelligenceProvider({ sdk }), ); ``` --- ## Page: createEdgeProviderProfile URL: https://docs.totem.ing/api/totemsdk-edge/functions/createEdgeProviderProfile [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / createEdgeProviderProfile # Function: createEdgeProviderProfile() > **createEdgeProviderProfile**(`opts`): [`EdgeProviderProfile`](../interfaces/EdgeProviderProfile.md) ## Parameters ### opts #### description? `string` #### name `string` #### operatorAddress `string` #### tags? `string`[] ## Returns [`EdgeProviderProfile`](../interfaces/EdgeProviderProfile.md) --- ## Page: createEdgeReceipt URL: https://docs.totem.ing/api/totemsdk-edge/functions/createEdgeReceipt [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / createEdgeReceipt # Function: createEdgeReceipt() > **createEdgeReceipt**(`opts`): [`EdgeReceipt`](../interfaces/EdgeReceipt.md) ## Parameters ### opts #### issuedAt? `number` #### kind `string` #### payload `Record`\<`string`, `unknown`\> #### relatedIdentityId? `string` #### relatedManifestId? `string` ## Returns [`EdgeReceipt`](../interfaces/EdgeReceipt.md) --- ## Page: createEdgeRuntime URL: https://docs.totem.ing/api/totemsdk-edge/functions/createEdgeRuntime [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / createEdgeRuntime # Function: createEdgeRuntime() > **createEdgeRuntime**(`opts`): [`EdgeRuntime`](../interfaces/EdgeRuntime.md) ## Parameters ### opts #### capabilities [`EdgeCapabilitySet`](../type-aliases/EdgeCapabilitySet.md) #### deviceId `string` #### ports [`EdgeRuntimePorts`](../interfaces/EdgeRuntimePorts.md) ## Returns [`EdgeRuntime`](../interfaces/EdgeRuntime.md) --- ## Page: createEdgeSeller URL: https://docs.totem.ing/api/totemsdk-edge/functions/createEdgeSeller [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / createEdgeSeller # Function: createEdgeSeller() > **createEdgeSeller**(`opts`): [`EdgeSeller`](../interfaces/EdgeSeller.md) Create a seller-side negotiation service. The returned object is a lightweight wrapper around the shared NegotiationEngine plus an inbound transport handler. All durable state lives in the injected stores. ## Parameters ### opts [`SellerServiceOptions`](../interfaces/SellerServiceOptions.md) ## Returns [`EdgeSeller`](../interfaces/EdgeSeller.md) --- ## Page: createEdgeServiceManifest URL: https://docs.totem.ing/api/totemsdk-edge/functions/createEdgeServiceManifest [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / createEdgeServiceManifest # Function: createEdgeServiceManifest() > **createEdgeServiceManifest**(`manifest`, `seed`, `keyIndex`): `Promise`\<`SignedManifest`\<`EdgeServiceManifest`\>\> ## Parameters ### manifest `EdgeServiceManifest` ### seed `Uint8Array` ### keyIndex `number` ## Returns `Promise`\<`SignedManifest`\<`EdgeServiceManifest`\>\> --- ## Page: createEdgeServiceRegistration URL: https://docs.totem.ing/api/totemsdk-edge/functions/createEdgeServiceRegistration [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / createEdgeServiceRegistration # Function: createEdgeServiceRegistration() > **createEdgeServiceRegistration**(`opts`): [`EdgeServiceRegistration`](../interfaces/EdgeServiceRegistration.md) ## Parameters ### opts #### expiresAt? `number` #### metadata? `Record`\<`string`, `unknown`\> #### operatorAddress `string` #### profileId `string` #### serviceId `string` ## Returns [`EdgeServiceRegistration`](../interfaces/EdgeServiceRegistration.md) --- ## Page: createNegotiationRecord URL: https://docs.totem.ing/api/totemsdk-edge/functions/createNegotiationRecord [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / createNegotiationRecord # Function: createNegotiationRecord() > **createNegotiationRecord**(`opts`): [`NegotiationRecord`](../interfaces/NegotiationRecord.md) ## Parameters ### opts #### counterparty `string` #### expiresAt `number` #### manifestId `string` #### negotiationId `string` #### openedAt? `number` #### principal `string` ## Returns [`NegotiationRecord`](../interfaces/NegotiationRecord.md) --- ## Page: createOutboxDrainer URL: https://docs.totem.ing/api/totemsdk-edge/functions/createOutboxDrainer [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / createOutboxDrainer # Function: createOutboxDrainer() > **createOutboxDrainer**(`opts`): `object` Create a bounded outbox drain worker. Returns: - `drain()`: attempt all undelivered messages (one pass, bounded attempts). - `start()`/`stop()`: a simple interval loop (caller controls cadence). - `resume()`: drain undelivered on restart. ## Parameters ### opts [`OutboxDrainerOptions`](../interfaces/OutboxDrainerOptions.md) ## Returns `object` ### drain > **drain**: () => `Promise`\<\{ `delivered`: `number`; `held`: `number`; `retrying`: `number`; \}\> #### Returns `Promise`\<\{ `delivered`: `number`; `held`: `number`; `retrying`: `number`; \}\> ### resume > **resume**: () => `Promise`\<\{ `delivered`: `number`; `held`: `number`; `retrying`: `number`; \}\> = `drain` #### Returns `Promise`\<\{ `delivered`: `number`; `held`: `number`; `retrying`: `number`; \}\> ### start > **start**: (`intervalMs`) => `void` #### Parameters ##### intervalMs? `number` = `5_000` #### Returns `void` ### stop > **stop**: () => `void` #### Returns `void` --- ## Page: createPurchaseRecord URL: https://docs.totem.ing/api/totemsdk-edge/functions/createPurchaseRecord [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / createPurchaseRecord # Function: createPurchaseRecord() > **createPurchaseRecord**(`opts`): [`PurchaseRecord`](../interfaces/PurchaseRecord.md) ## Parameters ### opts #### acquireBy? `number` #### createdAt? `number` #### intent [`PurchaseIntent`](../interfaces/PurchaseIntent.md) #### purchaseId `string` ## Returns [`PurchaseRecord`](../interfaces/PurchaseRecord.md) --- ## Page: createPurchaseSession URL: https://docs.totem.ing/api/totemsdk-edge/functions/createPurchaseSession [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / createPurchaseSession # Function: createPurchaseSession() > **createPurchaseSession**(`opts`): [`PurchaseSession`](../interfaces/PurchaseSession.md) Create a PurchaseSession backed by an in-memory usage event list. Production deployments should source usage from a resource adapter or verifiable meter — not from arbitrary callers. ## Parameters ### opts [`SessionOptions`](../interfaces/SessionOptions.md) ## Returns [`PurchaseSession`](../interfaces/PurchaseSession.md) --- ## Page: deliverOne URL: https://docs.totem.ing/api/totemsdk-edge/functions/deliverOne [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / deliverOne # Function: deliverOne() > **deliverOne**(`opts`, `entry`): `Promise`\<`boolean` \| `"held"`\> Deliver one outbox message and mark it delivered only on a durable receipt. Returns true when delivered, false when retry needed, 'held' when the retry budget is exhausted. ## Parameters ### opts [`OutboxDrainerOptions`](../interfaces/OutboxDrainerOptions.md) ### entry [`OutboxEntry`](../interfaces/OutboxEntry.md) ## Returns `Promise`\<`boolean` \| `"held"`\> --- ## Page: deriveEffectsFromBuiltTx URL: https://docs.totem.ing/api/totemsdk-edge/functions/deriveEffectsFromBuiltTx [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / deriveEffectsFromBuiltTx # Function: deriveEffectsFromBuiltTx() > **deriveEffectsFromBuiltTx**(`tx`): `StepEffects` Build a full StepEffects from a built transaction. ## Parameters ### tx [`BuiltTransaction`](../interfaces/BuiltTransaction.md) ## Returns `StepEffects` --- ## Page: deriveSpendsFromBuiltTx URL: https://docs.totem.ing/api/totemsdk-edge/functions/deriveSpendsFromBuiltTx [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / deriveSpendsFromBuiltTx # Function: deriveSpendsFromBuiltTx() > **deriveSpendsFromBuiltTx**(`tx`): `object`[] Derive spends from a built transaction's outputs, excluding: - change back to the wallet's own addresses; - channel-internal outputs back to the channel script. ## Parameters ### tx [`BuiltTransaction`](../interfaces/BuiltTransaction.md) ## Returns `object`[] --- ## Page: edgeCapabilitiesFromTotemCapabilities URL: https://docs.totem.ing/api/totemsdk-edge/functions/edgeCapabilitiesFromTotemCapabilities [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / edgeCapabilitiesFromTotemCapabilities # Function: edgeCapabilitiesFromTotemCapabilities() > **edgeCapabilitiesFromTotemCapabilities**(`caps`): [`EdgeCapabilitySet`](../type-aliases/EdgeCapabilitySet.md) Maps boolean fields from @totemsdk/connect's TotemCapabilities to the appropriate EdgeCapability strings. @totemsdk/connect is imported as a type-only import — no runtime import is emitted, preserving independent deployability of @totemsdk/edge. ## Parameters ### caps `TotemCapabilities` ## Returns [`EdgeCapabilitySet`](../type-aliases/EdgeCapabilitySet.md) --- ## Page: foldCompletedDispatch URL: https://docs.totem.ing/api/totemsdk-edge/functions/foldCompletedDispatch [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / foldCompletedDispatch # Function: foldCompletedDispatch() > **foldCompletedDispatch**(`input`): `Promise`\<\{ `folded`: `boolean`; \}\> Fold a single completed dispatch (the live-completion path, used by the accounted port's `afterCompleted` hook). Returns `{ folded: true }` when a statement was enqueued, `{ folded: false }` when the dispatch is not purchase-bound or the agreement cannot be resolved. ## Parameters ### input [`FoldCompletedDispatchInput`](../interfaces/FoldCompletedDispatchInput.md) ## Returns `Promise`\<\{ `folded`: `boolean`; \}\> --- ## Page: foldUsageStatements URL: https://docs.totem.ing/api/totemsdk-edge/functions/foldUsageStatements [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / foldUsageStatements # Function: foldUsageStatements() > **foldUsageStatements**(`input`): `Promise`\<[`FoldUsageStatementsReport`](../interfaces/FoldUsageStatementsReport.md)\> Recover the journal and fold every completed purchase-bound dispatch into the purchasing outbox as a signed usage statement. This is the authoritative reconciliation pass: it is also safe to run after a crash that interrupted a dispatch or the previous fold attempt — entries already enqueued re-enqueue the SAME messageId (no duplication), and `interrupted` runs are never billed. ## Parameters ### input [`FoldUsageStatementsInput`](../interfaces/FoldUsageStatementsInput.md) ## Returns `Promise`\<[`FoldUsageStatementsReport`](../interfaces/FoldUsageStatementsReport.md)\> --- ## Page: fromEnhancedBuildParams URL: https://docs.totem.ing/api/totemsdk-edge/functions/fromEnhancedBuildParams [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / fromEnhancedBuildParams # Function: fromEnhancedBuildParams() > **fromEnhancedBuildParams**(`params`, `ownAddresses`): [`BuiltTransaction`](../interfaces/BuiltTransaction.md) Normalize an `EnhancedBuildParams` (@totemsdk/tx-builder) into a `BuiltTransaction`. Outputs carry the real recipient amounts; inputs carry the wallet's own addresses (change detection). ## Parameters ### params #### inputs `object`[] #### outputs `object`[] ### ownAddresses `string`[] ## Returns [`BuiltTransaction`](../interfaces/BuiltTransaction.md) --- ## Page: fromOmniaTxDraft URL: https://docs.totem.ing/api/totemsdk-edge/functions/fromOmniaTxDraft [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / fromOmniaTxDraft # Function: fromOmniaTxDraft() > **fromOmniaTxDraft**(`draft`, `channelScriptAddress`, `channelOps?`): [`BuiltTransaction`](../interfaces/BuiltTransaction.md) Normalize an `OmniaTxDraft` (@totemsdk/omnia) into a `BuiltTransaction`. The channel's own script address is excluded from spends — a channel update pays the full value back to the channel script (state change, not spend). ## Parameters ### draft #### inputs `object`[] #### outputs `object`[] ### channelScriptAddress `string` ### channelOps? `object`[] ## Returns [`BuiltTransaction`](../interfaces/BuiltTransaction.md) --- ## Page: hasCapability URL: https://docs.totem.ing/api/totemsdk-edge/functions/hasCapability [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / hasCapability # Function: hasCapability() > **hasCapability**(`set`, `cap`): `boolean` ## Parameters ### set [`EdgeCapabilitySet`](../type-aliases/EdgeCapabilitySet.md) ### cap [`EdgeCapability`](../type-aliases/EdgeCapability.md) ## Returns `boolean` --- ## Page: hasIntelligenceCapability URL: https://docs.totem.ing/api/totemsdk-edge/functions/hasIntelligenceCapability [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / hasIntelligenceCapability # Function: hasIntelligenceCapability() > **hasIntelligenceCapability**(`set`, `domain`): `boolean` True if every intelligence domain capability is present. ## Parameters ### set [`EdgeCapabilitySet`](../type-aliases/EdgeCapabilitySet.md) ### domain `string` ## Returns `boolean` --- ## Page: idempotencyKey URL: https://docs.totem.ing/api/totemsdk-edge/functions/idempotencyKey [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / idempotencyKey # Function: idempotencyKey() > **idempotencyKey**(`purchaseId`, `agreementId`, `operation`): `string` Derive a stable idempotency key for a side-effecting operation. ## Parameters ### purchaseId `string` ### agreementId `string` ### operation `"payment"` \| `"resource-start"` \| `"settlement"` \| `"receipt"` ## Returns `string` --- ## Page: ingress URL: https://docs.totem.ing/api/totemsdk-edge/functions/ingress [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / ingress # Function: ingress() > **ingress**(`raw`, `context`, `opts`): `Promise`\<[`IngressResult`](../interfaces/IngressResult.md)\> Run the authenticated ingress pipeline. Returns the authenticated message and sender, or throws a typed error. The replay claim is ATOMIC: two identical messages arriving concurrently cannot both observe "not present". Exactly one caller wins the claim. ## Parameters ### raw `unknown` ### context #### recipient `string` #### sender `string` ### opts [`IngressOptions`](../interfaces/IngressOptions.md) ## Returns `Promise`\<[`IngressResult`](../interfaces/IngressResult.md)\> --- ## Page: isIntelligenceCapability URL: https://docs.totem.ing/api/totemsdk-edge/functions/isIntelligenceCapability [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / isIntelligenceCapability # Function: isIntelligenceCapability() > **isIntelligenceCapability**(`cap`): `boolean` Whether a capability string is an intelligence capability. ## Parameters ### cap `string` ## Returns `boolean` --- ## Page: isPurchaseBound URL: https://docs.totem.ing/api/totemsdk-edge/functions/isPurchaseBound [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / isPurchaseBound # Function: isPurchaseBound() > **isPurchaseBound**(`context`): `boolean` True when the mirrored invocation context names a purchase agreement. ## Parameters ### context `Record`\<`string`, `unknown`\> \| `undefined` ## Returns `boolean` --- ## Page: isUngrantableAction URL: https://docs.totem.ing/api/totemsdk-edge/functions/isUngrantableAction [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / isUngrantableAction # Function: isUngrantableAction() > **isUngrantableAction**(`action`): `boolean` ## Parameters ### action `string` ## Returns `boolean` --- ## Page: issueUsageStatement URL: https://docs.totem.ing/api/totemsdk-edge/functions/issueUsageStatement [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / issueUsageStatement # Function: issueUsageStatement() > **issueUsageStatement**(`opts`): `Promise`\<`UsageStatement`\> Build and sign a bounded usage statement for one completed dispatch. `statementId` is deterministic over the request: `${agreementId}:${requestId}:usage`. Idempotency follows from the deterministic messageId over the signed payload. ## Parameters ### opts [`IssueUsageStatementOptions`](../interfaces/IssueUsageStatementOptions.md) ## Returns `Promise`\<`UsageStatement`\> --- ## Page: messageId URL: https://docs.totem.ing/api/totemsdk-edge/functions/messageId [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / messageId # Function: messageId() > **messageId**(`msg`): `string` Compute the canonical message ID for a state-changing message. Binds: protocol version, message type, negotiationId, proposalId / parentProposalId where relevant, sender, recipient, timestamp, and payload hash. The ID is recomputed deterministically — never trusted from the wire. ## Parameters ### msg [`NegotiationMessage`](../type-aliases/NegotiationMessage.md) ## Returns `string` --- ## Page: messageType URL: https://docs.totem.ing/api/totemsdk-edge/functions/messageType [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / messageType # Function: messageType() > **messageType**(`msg`): `string` Canonical message type discriminator. ## Parameters ### msg [`NegotiationMessage`](../type-aliases/NegotiationMessage.md) ## Returns `string` --- ## Page: proposalDigest URL: https://docs.totem.ing/api/totemsdk-edge/functions/proposalDigest [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / proposalDigest # Function: proposalDigest() > **proposalDigest**(`proposal`): `string` Canonical digest of a TradeProposal (excluding the signature and the signer public key, which are not part of the signed content). Binds: version, proposalId, negotiationId, parentProposalId, round, manifestId, proposer, recipient, terms, createdAt, expiresAt. ## Parameters ### proposal `Omit`\<[`TradeProposal`](../interfaces/TradeProposal.md), `"signature"` \| `"signerPublicKey"`\> ## Returns `string` --- ## Page: reconcileInferenceAccounting URL: https://docs.totem.ing/api/totemsdk-edge/functions/reconcileInferenceAccounting [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / reconcileInferenceAccounting # Function: reconcileInferenceAccounting() > **reconcileInferenceAccounting**(`input`): `Promise`\<[`InferenceAccountingReconciliation`](../interfaces/InferenceAccountingReconciliation.md)\> Read-only cross-check between the inference journal and the owning accounting authority for one mandate. Matches journal events to committed receipts by `(runId, stepId)`. A completed entry with no committed receipt is `completedUnaccounted` (the host should resolve — e.g. aborted prematurely or the account lags). An interrupted entry that IS in the committed set is `interruptedAccounted`, which must never be treated as a normal completion — the account has consumption the journal cannot corroborate as `completed`. The caller decides the corrective action; this function never writes. ## Parameters ### input [`ReconcileInferenceAccountingOptions`](../interfaces/ReconcileInferenceAccountingOptions.md) ## Returns `Promise`\<[`InferenceAccountingReconciliation`](../interfaces/InferenceAccountingReconciliation.md)\> --- ## Page: recoverInferenceJournal URL: https://docs.totem.ing/api/totemsdk-edge/functions/recoverInferenceJournal [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / recoverInferenceJournal # Function: recoverInferenceJournal() > **recoverInferenceJournal**(`journal`): `Promise`\<[`InferenceRecoveryReport`](../interfaces/InferenceRecoveryReport.md)\> The accounting-recovery view over an inference journal. Walks the whole journal (strict: any corruption — a hole, a duplicate start/finish for one requestId, a `finished` with no matching `started` — surfaces rather than being treated as absence, matching RFC-007 §4.2). Returns: - `interrupted`: `started` without `finished` → **outcome-unknown**. The host must hold budget for these and must never re-run the call or issue a receipt (RFC-007 §3.5). - `completed`: definitively completed `finished` events, available for reconciliation against the owning domain authority. Performs zero provider interaction. ## Parameters ### journal `Journal`\<[`InferenceAuditEvent`](../type-aliases/InferenceAuditEvent.md)\> ## Returns `Promise`\<[`InferenceRecoveryReport`](../interfaces/InferenceRecoveryReport.md)\> --- ## Page: termsHash URL: https://docs.totem.ing/api/totemsdk-edge/functions/termsHash [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / termsHash # Function: termsHash() > **termsHash**(`terms`): `string` Canonical SHA3-256 hex hash of trade terms. ## Parameters ### terms [`TradeTerms`](../interfaces/TradeTerms.md) ## Returns `string` --- ## Page: usageStatementId URL: https://docs.totem.ing/api/totemsdk-edge/functions/usageStatementId [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / usageStatementId # Function: usageStatementId() > **usageStatementId**(`agreementId`, `requestId`): `string` Stable canonical statement identity for a completed dispatch. ## Parameters ### agreementId `string` ### requestId `string` ## Returns `string` --- ## Page: verifyEdgeReceipt URL: https://docs.totem.ing/api/totemsdk-edge/functions/verifyEdgeReceipt [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / verifyEdgeReceipt # Function: verifyEdgeReceipt() > **verifyEdgeReceipt**(`receipt`): [`EdgeOperationResult`](../interfaces/EdgeOperationResult.md)\<\{ `receipt`: [`EdgeReceipt`](../interfaces/EdgeReceipt.md); \}\> ## Parameters ### receipt `unknown` ## Returns [`EdgeOperationResult`](../interfaces/EdgeOperationResult.md)\<\{ `receipt`: [`EdgeReceipt`](../interfaces/EdgeReceipt.md); \}\> --- ## Page: workRequiredDigest URL: https://docs.totem.ing/api/totemsdk-edge/functions/workRequiredDigest [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / workRequiredDigest # Function: workRequiredDigest() > **workRequiredDigest**(`msg`): `string` Canonical digest of a WorkRequired message (excluding signature). ## Parameters ### msg `Omit`\<`WorkRequiredLike`, `"signature"`\> ## Returns `string` --- ## Page: AgentEdgeRuntime URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/AgentEdgeRuntime [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / AgentEdgeRuntime # Interface: AgentEdgeRuntime ## Properties ### deviceId > `readonly` **deviceId**: `string` *** ### version > `readonly` **version**: `number` ## Methods ### executeAction() > **executeAction**(`input`): `Promise`\<`EdgeActionResult`\> Execute a single governed action. The agent has no other entry point. #### Parameters ##### input [`EdgeActionInput`](EdgeActionInput.md) #### Returns `Promise`\<`EdgeActionResult`\> --- ## Page: AgentEdgeRuntimeOptions URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/AgentEdgeRuntimeOptions [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / AgentEdgeRuntimeOptions # Interface: AgentEdgeRuntimeOptions ## Properties ### agentId > **agentId**: `string` *** ### capabilities > **capabilities**: [`EdgeCapabilitySet`](../type-aliases/EdgeCapabilitySet.md) *** ### deviceId > **deviceId**: `string` *** ### now? > `optional` **now?**: () => `number` Injectable clock (defaults to Date.now). #### Returns `number` *** ### policy > **policy**: `GrantBoundAutonomyPolicy` Run-level autonomy policy — the authorization engine. *** ### principal > **principal**: `string` *** ### registry > **registry**: [`EdgeActionRegistry`](EdgeActionRegistry.md) *** ### runId > **runId**: `string` --- ## Page: BuiltTransaction URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/BuiltTransaction [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / BuiltTransaction # Interface: BuiltTransaction ## Properties ### channelOps? > `optional` **channelOps?**: `object`[] Channel operations performed (channelId + operation). #### channelId > **channelId**: `string` #### operation > **operation**: `string` *** ### channelScriptAddress? > `optional` **channelScriptAddress?**: `string` Channel script address — outputs to it are channel-internal state. *** ### fees? > `optional` **fees?**: `object`[] Fees paid (tokenId + amount). #### amount > **amount**: `string` #### tokenId > **tokenId**: `string` *** ### inputs > **inputs**: [`BuiltTxInput`](BuiltTxInput.md)[] *** ### outputs > **outputs**: [`BuiltTxOutput`](BuiltTxOutput.md)[] *** ### ownAddresses > **ownAddresses**: `string`[] Addresses the wallet controls — outputs to these are change, not spends. --- ## Page: BuiltTxInput URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/BuiltTxInput [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / BuiltTxInput # Interface: BuiltTxInput ## Properties ### address > **address**: `string` *** ### amount > **amount**: `string` *** ### tokenId? > `optional` **tokenId?**: `string` --- ## Page: BuiltTxOutput URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/BuiltTxOutput [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / BuiltTxOutput # Interface: BuiltTxOutput ## Properties ### address > **address**: `string` *** ### amount > **amount**: `string` *** ### tokenId? > `optional` **tokenId?**: `string` --- ## Page: BuiltinActionRegistration URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/BuiltinActionRegistration [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / BuiltinActionRegistration # Interface: BuiltinActionRegistration ## Properties ### action > **action**: `string` *** ### def > **def**: [`EdgeActionDefinition`](EdgeActionDefinition.md) --- ## Page: BuyOptions URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/BuyOptions [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / BuyOptions # Interface: BuyOptions ## Properties ### acquireBy? > `optional` **acquireBy?**: `number` Overall acquisition deadline (independent of negotiation TTL). *** ### adapter? > `optional` **adapter?**: [`ResourceAdapter`](ResourceAdapter.md) Resource adapter to use for execution. *** ### context? > `optional` **context?**: `Record`\<`string`, `unknown`\> Execution context passed to the adapter. *** ### intent > **intent**: [`PurchaseIntent`](PurchaseIntent.md) *** ### negotiation? > `optional` **negotiation?**: `Partial`\<[`NegotiationLimits`](NegotiationLimits.md)\> Negotiation limits (used only on the negotiated path). *** ### strategy? > `optional` **strategy?**: [`NegotiationStrategy`](NegotiationStrategy.md) --- ## Page: BuyerOptions URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/BuyerOptions [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / BuyerOptions # Interface: BuyerOptions ## Properties ### adapters > **adapters**: [`ResourceAdapter`](ResourceAdapter.md)[] *** ### authority > **authority**: `AuthorityPort` *** ### lookup > **lookup**: `PurchaseLookupPort` *** ### negotiationStore? > `optional` **negotiationStore?**: [`NegotiationStore`](NegotiationStore.md) Durable negotiation store. When omitted, in-memory (dev mode). *** ### negotiationTransport? > `optional` **negotiationTransport?**: [`NegotiationTransport`](NegotiationTransport.md) Authenticated negotiation transport. When omitted, negotiation is local/programmatic. *** ### now? > `optional` **now?**: () => `number` #### Returns `number` *** ### onEvent? > `optional` **onEvent?**: (`event`) => `void` #### Parameters ##### event [`PurchaseEvent`](../type-aliases/PurchaseEvent.md) #### Returns `void` *** ### onOutboundEnqueued? > `optional` **onOutboundEnqueued?**: () => `Promise`\<`void`\> Optional hook invoked after a message is enqueued to the durable outbox. The runtime uses this to trigger an immediate outbox drain over the wire. #### Returns `Promise`\<`void`\> *** ### outboxStore? > `optional` **outboxStore?**: [`OutboxStore`](OutboxStore.md) Durable outbox store. When omitted, in-memory (dev mode). *** ### payment > **payment**: `PurchasePaymentPort` *** ### principal > **principal**: `string` *** ### principalStore? > `optional` **principalStore?**: [`PrincipalNegotiationStore`](PrincipalNegotiationStore.md) Durable principal anti-abuse store. When omitted, in-memory (dev mode). *** ### providerTrust? > `optional` **providerTrust?**: `ProviderTrustPort` *** ### purchaseStore? > `optional` **purchaseStore?**: [`PurchaseStore`](PurchaseStore.md) Durable purchase store. When omitted, in-memory (dev mode). *** ### replayLedger? > `optional` **replayLedger?**: [`ReplayLedger`](ReplayLedger.md) Durable replay ledger. When omitted, in-memory (dev mode). *** ### sign > **sign**: `Signer` *** ### txpow > **txpow**: [`EdgeTxPowAdapter`](../classes/EdgeTxPowAdapter.md) *** ### verifySignature > **verifySignature**: `SignatureVerifier` *** ### workPolicy > **workPolicy**: [`EdgeWorkPolicy`](../classes/EdgeWorkPolicy.md) --- ## Page: CreateAccountedIntelligencePortOptions URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/CreateAccountedIntelligencePortOptions [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / CreateAccountedIntelligencePortOptions # Interface: CreateAccountedIntelligencePortOptions ## Properties ### afterCompleted? > `optional` **afterCompleted?**: (`completed`) => `Promise`\<`void`\> Optional live-accounting hook invoked after a dispatch finishes `completed` (the journal write already appended). The commerce accounting fold (`@totemsdk/edge/commerce-accounting`) attaches here. Best-effort: a failure is reported to `onAfterCompletedError` and does NOT fail the already-completed dispatch — the authoritative fold pass is [foldUsageStatements](../functions/foldUsageStatements.md) on restart (idempotent by messageId). #### Parameters ##### completed ###### context `Record`\<`string`, `unknown`\> \| `undefined` ###### requestId `string` ###### usage [`InferenceRecordedUsage`](InferenceRecordedUsage.md) \| `undefined` #### Returns `Promise`\<`void`\> *** ### journal > **journal**: `Journal`\<[`InferenceAuditEvent`](../type-aliases/InferenceAuditEvent.md)\> Append-only accounting journal (durably-acknowledged in production). *** ### now? > `optional` **now?**: () => `number` Injectable clock (defaults to Date.now). #### Returns `number` *** ### onAfterCompletedError? > `optional` **onAfterCompletedError?**: (`error`) => `void` Reports a best-effort `afterCompleted` failure (never throws upward). #### Parameters ##### error `unknown` #### Returns `void` *** ### port > **port**: [`EdgeIntelligencePort`](EdgeIntelligencePort.md) Underlying provider-neutral port. *** ### requestId? > `optional` **requestId?**: () => `string` Request-id generator used when the caller omits one (defaults to UUID). #### Returns `string` --- ## Page: CreateEdgeOptions URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/CreateEdgeOptions [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / CreateEdgeOptions # Interface: CreateEdgeOptions ## Properties ### adapters > **adapters**: [`ResourceAdapter`](ResourceAdapter.md)[] Resource adapters. *** ### authority > **authority**: `EdgeAuthorityPort` Authority / policy approval. *** ### commerceStore? > `optional` **commerceStore?**: `object` Aggregated durable commerce store (negotiations + purchases + replay + principals + outbox in one physical backend). When supplied, it takes precedence over the individual store options. A SQLiteCommerceStore from @totemsdk/edge-adapters is the production reference. #### negotiations > **negotiations**: [`NegotiationStore`](NegotiationStore.md) #### outbox > **outbox**: [`OutboxStore`](OutboxStore.md) #### principals > **principals**: [`PrincipalNegotiationStore`](PrincipalNegotiationStore.md) #### purchases > **purchases**: [`PurchaseStore`](PurchaseStore.md) #### replay > **replay**: [`ReplayLedger`](ReplayLedger.md) *** ### hashRatePerSec? > `optional` **hashRatePerSec?**: `number` Hash rate for work estimation. *** ### lookup > **lookup**: `EdgeLookupPort` Lookup port. *** ### minimaRelay? > `optional` **minimaRelay?**: `MinimaWorkRelay` Minima block relay (optional — commerce still works without it). *** ### negotiationLimits? > `optional` **negotiationLimits?**: `Partial`\<[`NegotiationLimits`](NegotiationLimits.md)\> Negotiation limits. *** ### negotiationStore? > `optional` **negotiationStore?**: [`NegotiationStore`](NegotiationStore.md) Durable negotiation store (optional — in-memory dev mode). *** ### negotiationTransport? > `optional` **negotiationTransport?**: [`NegotiationTransport`](NegotiationTransport.md) Authenticated negotiation transport (optional — local/programmatic only). *** ### now? > `optional` **now?**: () => `number` Current time (for deterministic tests). #### Returns `number` *** ### onEvent? > `optional` **onEvent?**: (`event`) => `void` Event sink. #### Parameters ##### event [`PurchaseEvent`](../type-aliases/PurchaseEvent.md) #### Returns `void` *** ### outboxStore? > `optional` **outboxStore?**: [`OutboxStore`](OutboxStore.md) Durable outbox store (optional — in-memory dev mode). *** ### payment > **payment**: `EdgePaymentPort` Payment port (idempotent). *** ### persistence? > `optional` **persistence?**: `"ephemeral"` \| `"durable"` Explicit persistence mode. When 'ephemeral' (or when durable stores are not supplied), the runtime emits `runtime.persistence_ephemeral` on startup so operators never mistake dev mode for crash guarantees. *** ### principal > **principal**: `string` Authenticated principal (root identity) that owns this runtime. *** ### principalStore? > `optional` **principalStore?**: [`PrincipalNegotiationStore`](PrincipalNegotiationStore.md) Durable principal anti-abuse store (optional — in-memory dev mode). *** ### purchaseStore? > `optional` **purchaseStore?**: [`PurchaseStore`](PurchaseStore.md) Durable purchase store (optional — in-memory dev mode). *** ### replayLedger? > `optional` **replayLedger?**: [`ReplayLedger`](ReplayLedger.md) Replay ledger (optional — in-memory dev mode). *** ### seller? > `optional` **seller?**: `object` Seller-side negotiation service configuration. When supplied, the runtime also operates as a supply-side counterpart for inbound negotiation messages. #### manifest? > `optional` **manifest?**: `SignedManifest`\<`Manifest`\> Standing service manifest (used to compute manifestId for opened negotiations). #### strategy > **strategy**: [`SellerStrategy`](SellerStrategy.md) Seller bargaining strategy. *** ### sign > **sign**: `Signer` Signature creation (WOTS). *** ### templateProvider? > `optional` **templateProvider?**: `MinimaWorkTemplateProvider` Minima work template provider (optional — work-disabled if omitted). *** ### verifySignature > **verifySignature**: `SignatureVerifier` Signature verification (WOTS). *** ### workBudget? > `optional` **workBudget?**: [`LocalWorkBudget`](LocalWorkBudget.md) Local work budget. *** ### workDifficulty? > `optional` **workDifficulty?**: [`WorkDifficultyPolicy`](WorkDifficultyPolicy.md) Work difficulty policy. *** ### workMode? > `optional` **workMode?**: [`WorkMode`](../type-aliases/WorkMode.md) Work mode. Defaults to 'disabled' when no template provider is supplied. --- ## Page: DeliveryReceipt URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/DeliveryReceipt [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / DeliveryReceipt # Interface: DeliveryReceipt A durable delivery receipt. Means ONLY: "the remote machine durably received/claimed this exact logical message (messageId)". It does NOT mean "I accept your economic proposal" — that is ProposalAcceptance. Never conflate the two. ## Properties ### durablyProcessed > **durablyProcessed**: `true` Always true — a receipt is only produced after durable processing. *** ### messageId > **messageId**: `string` *** ### receivedAt > **receivedAt**: `number` Epoch ms when the remote durably processed (claimed) the message. --- ## Page: EdgeActionDefinition URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/EdgeActionDefinition [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / EdgeActionDefinition # Interface: EdgeActionDefinition ## Properties ### capability > **capability**: [`EdgeCapability`](../type-aliases/EdgeCapability.md) Runtime capability the action requires (support check, not authorization). *** ### effect > **effect**: [`EdgeActionEffect`](../type-aliases/EdgeActionEffect.md) Effect class — used for capability gating and audit. ## Methods ### deriveEffects() > **deriveEffects**(`prepared`): `StepEffects` Extract canonical security facts from the PREPARED operation. #### Parameters ##### prepared `unknown` #### Returns `StepEffects` *** ### execute() > **execute**(`prepared`): `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<`unknown`\>\> Execute the prepared operation through the private port. #### Parameters ##### prepared `unknown` #### Returns `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<`unknown`\>\> *** ### prepare() > **prepare**(`input`): `unknown` Build the real operation from the request (wallet builds/simulates first). #### Parameters ##### input [`EdgeActionInput`](EdgeActionInput.md) #### Returns `unknown` --- ## Page: EdgeActionInput URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/EdgeActionInput [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / EdgeActionInput # Interface: EdgeActionInput ## Properties ### action > **action**: `string` *** ### context? > `optional` **context?**: `Record`\<`string`, `unknown`\> *** ### payload? > `optional` **payload?**: `Record`\<`string`, `unknown`\> *** ### subject > **subject**: `string` --- ## Page: EdgeActionRegistry URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/EdgeActionRegistry [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / EdgeActionRegistry # Interface: EdgeActionRegistry ## Methods ### isUngrantable() > **isUngrantable**(`action`): `boolean` #### Parameters ##### action `string` #### Returns `boolean` *** ### listActions() > **listActions**(): `string`[] #### Returns `string`[] *** ### register() > **register**(`def`, `action`): `void` #### Parameters ##### def [`EdgeActionDefinition`](EdgeActionDefinition.md) ##### action `string` \| `string`[] #### Returns `void` *** ### resolve() > **resolve**(`action`): [`EdgeActionDefinition`](EdgeActionDefinition.md) \| `undefined` #### Parameters ##### action `string` #### Returns [`EdgeActionDefinition`](EdgeActionDefinition.md) \| `undefined` --- ## Page: EdgeCommerceRuntime URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/EdgeCommerceRuntime [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / EdgeCommerceRuntime # Interface: EdgeCommerceRuntime ## Properties ### buyer > **buyer**: [`EdgeBuyer`](../classes/EdgeBuyer.md) The underlying buyer (advanced use). *** ### seller? > `optional` **seller?**: [`EdgeSeller`](EdgeSeller.md) The optional seller-side negotiation service (advanced use). ## Methods ### buy() > **buy**(`options`): `Promise`\<[`PurchaseResult`](PurchaseResult.md)\> #### Parameters ##### options ###### acquireBy? `number` ###### adapter? [`ResourceAdapter`](ResourceAdapter.md) ###### context? `Record`\<`string`, `unknown`\> ###### intent [`PurchaseIntent`](PurchaseIntent.md) ###### negotiation? `Partial`\<[`NegotiationLimits`](NegotiationLimits.md)\> ###### strategy? [`NegotiationStrategy`](NegotiationStrategy.md) #### Returns `Promise`\<[`PurchaseResult`](PurchaseResult.md)\> *** ### drainOutbox() > **drainOutbox**(): `Promise`\<\{ `delivered`: `number`; `held`: `number`; `retrying`: `number`; \}\> Drain undelivered outbox messages (bounded attempts, durable receipt). #### Returns `Promise`\<\{ `delivered`: `number`; `held`: `number`; `retrying`: `number`; \}\> *** ### negotiate() > **negotiate**(`options`): `Promise`\<[`NegotiationResult`](NegotiationResult.md)\> #### Parameters ##### options ###### desiredTerms [`TradeTerms`](TradeTerms.md) ###### limits `Partial`\<[`NegotiationLimits`](NegotiationLimits.md)\> ###### manifest `SignedManifest` ###### strategy [`NegotiationStrategy`](NegotiationStrategy.md) #### Returns `Promise`\<[`NegotiationResult`](NegotiationResult.md)\> *** ### recoverPurchases() > **recoverPurchases**(): `Promise`\<`object`[]\> Recover in-flight purchases after a restart (inspects durable state first). #### Returns `Promise`\<`object`[]\> *** ### startOutbox() > **startOutbox**(`intervalMs?`): `void` Start a periodic outbox drain loop (caller controls cadence). #### Parameters ##### intervalMs? `number` #### Returns `void` *** ### startTransport() > **startTransport**(): `Promise`\<() => `void`\> Start the buyer-side transport listener (when a transport is configured). #### Returns `Promise`\<() => `void`\> *** ### stopOutbox() > **stopOutbox**(): `void` Stop the periodic outbox drain loop. #### Returns `void` *** ### stopTransport() > **stopTransport**(): `void` Stop the buyer-side transport listener. #### Returns `void` --- ## Page: EdgeDevice URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/EdgeDevice [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / EdgeDevice # Interface: EdgeDevice ## Properties ### address? > `optional` **address?**: `string` *** ### createdAt > **createdAt**: `number` *** ### deviceId > **deviceId**: `string` *** ### identityId? > `optional` **identityId?**: `string` *** ### kind > **kind**: [`EdgeDeviceKind`](../type-aliases/EdgeDeviceKind.md) *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> --- ## Page: EdgeIdentityPort URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/EdgeIdentityPort [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / EdgeIdentityPort # Interface: EdgeIdentityPort ## Methods ### resolve() > **resolve**(`identityId`): `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `identity`: `unknown`; \}\>\> #### Parameters ##### identityId `string` #### Returns `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `identity`: `unknown`; \}\>\> *** ### verify() > **verify**(`proof`): `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `address?`: `string`; `valid`: `boolean`; \}\>\> #### Parameters ##### proof `unknown` #### Returns `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `address?`: `string`; `valid`: `boolean`; \}\>\> --- ## Page: EdgeIntelligencePort URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/EdgeIntelligencePort [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / EdgeIntelligencePort # Interface: EdgeIntelligencePort Edge-compatible intelligence port contract. Lives in @totemsdk/intelligence (not @totemsdk/edge) so that adapters like `@totemsdk/qvac/edge` can implement a port for @totemsdk/edge without depending on edge itself. @totemsdk/edge re-exports this type and hosts implementations via `EdgeRuntimePorts.intelligence`. ## Properties ### capabilities > `readonly` **capabilities**: readonly `string`[] Capability strings advertised (e.g. ['intelligence:llm', …]). *** ### providerId > `readonly` **providerId**: `string` Stable provider id (e.g. 'qvac'). ## Methods ### cancel()? > `optional` **cancel**(`requestId`): `Promise`\<`IntelligencePortResult`\<`unknown`\>\> #### Parameters ##### requestId `string` #### Returns `Promise`\<`IntelligencePortResult`\<`unknown`\>\> *** ### close()? > `optional` **close**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### invoke() > **invoke**(`params`): `Promise`\<`IntelligencePortResult`\<\{ `data`: `unknown`; `receipt?`: `unknown`; `usage?`: `Record`\<`string`, `unknown`\>; \}\>\> #### Parameters ##### params ###### context? `Record`\<`string`, `unknown`\> ###### domain `string` ###### op `string` ###### params `Record`\<`string`, `unknown`\> ###### requestId? `string` ###### signal? `AbortSignal` #### Returns `Promise`\<`IntelligencePortResult`\<\{ `data`: `unknown`; `receipt?`: `unknown`; `usage?`: `Record`\<`string`, `unknown`\>; \}\>\> --- ## Page: EdgeKeyLeasePort URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/EdgeKeyLeasePort [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / EdgeKeyLeasePort # Interface: EdgeKeyLeasePort Port for WOTS key-lease coordination. Implementations must ensure that a WOTS key index is reserved exclusively before any signing operation consumes it. This prevents double-spend of a one-time WOTS key slot in concurrent or distributed environments. Wire this port to @totemsdk/wots-lease's LocalLeaseProvider or any distributed provider in the lease chain. ## Methods ### burn() > **burn**(`reservationId`): `Promise`\<`void`\> Burn the reservation without using the key (on error or cancellation). #### Parameters ##### reservationId `string` #### Returns `Promise`\<`void`\> *** ### commit() > **commit**(`reservationId`): `Promise`\<`void`\> Commit the reservation — the key has been used successfully. #### Parameters ##### reservationId `string` #### Returns `Promise`\<`void`\> *** ### reserve() > **reserve**(`keyIndex`): `Promise`\<\{ `reservationId`: `string`; \}\> Reserve a key index for signing. Returns a reservation token. #### Parameters ##### keyIndex `number` #### Returns `Promise`\<\{ `reservationId`: `string`; \}\> --- ## Page: EdgeLiquidityPort URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/EdgeLiquidityPort [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / EdgeLiquidityPort # Interface: EdgeLiquidityPort ## Methods ### getBalance() > **getBalance**(`address`): `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `balance`: `string`; `tokenId`: `string`; \}\>\> #### Parameters ##### address `string` #### Returns `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `balance`: `string`; `tokenId`: `string`; \}\>\> *** ### getUtxos() > **getUtxos**(`address`): `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `utxos`: `unknown`[]; \}\>\> #### Parameters ##### address `string` #### Returns `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `utxos`: `unknown`[]; \}\>\> --- ## Page: EdgeLocationPort URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/EdgeLocationPort [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / EdgeLocationPort # Interface: EdgeLocationPort ## Methods ### createClaim() > **createClaim**(`params`): `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `claim`: `unknown`; `claimId`: `string`; \}\>\> #### Parameters ##### params ###### challenge? \{ `expiresAt?`: `number`; `issuedAt`: `number`; `nonce`: `string`; `verifierId`: `string`; \} ###### challenge.expiresAt? `number` ###### challenge.issuedAt `number` ###### challenge.nonce `string` ###### challenge.verifierId `string` ###### corroboration? \{ `beaconsSeen?`: `string`[]; `cellTowers?`: `string`[]; `lorawanGateways?`: `string`[]; `metadata?`: `Record`\<`string`, `unknown`\>; `nearbyDeviceProofIds?`: `string`[]; `networkProfileId?`: `string`; `wifiFingerprints?`: `string`[]; \} ###### corroboration.beaconsSeen? `string`[] ###### corroboration.cellTowers? `string`[] ###### corroboration.lorawanGateways? `string`[] ###### corroboration.metadata? `Record`\<`string`, `unknown`\> ###### corroboration.nearbyDeviceProofIds? `string`[] ###### corroboration.networkProfileId? `string` ###### corroboration.wifiFingerprints? `string`[] ###### deviceClass? `string` ###### deviceId `string` ###### location \{ `accuracyM?`: `number`; `altitudeM?`: `number`; `lat`: `number`; `lon`: `number`; \} ###### location.accuracyM? `number` ###### location.altitudeM? `number` ###### location.lat `number` ###### location.lon `number` ###### metadata? `Record`\<`string`, `unknown`\> ###### observedAt? `number` ###### operatorId? `string` ###### source \{ `fixType?`: `string`; `hdop?`: `number`; `jammingFlag?`: `boolean`; `metadata?`: `Record`\<`string`, `unknown`\>; `nmeaPayloadHash?`: `string`; `pdop?`: `number`; `rawPayloadHash?`: `string`; `satellitesUsed?`: `number`; `spoofingFlag?`: `boolean`; `type`: `string`; `vdop?`: `number`; \} ###### source.fixType? `string` ###### source.hdop? `number` ###### source.jammingFlag? `boolean` ###### source.metadata? `Record`\<`string`, `unknown`\> ###### source.nmeaPayloadHash? `string` ###### source.pdop? `number` ###### source.rawPayloadHash? `string` ###### source.satellitesUsed? `number` ###### source.spoofingFlag? `boolean` ###### source.type `string` ###### source.vdop? `number` ###### subjectId `string` #### Returns `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `claim`: `unknown`; `claimId`: `string`; \}\>\> *** ### createProof() > **createProof**(`params`): `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `proof`: `unknown`; `proofId`: `string`; \}\>\> #### Parameters ##### params ###### claim `unknown` ###### context? `Record`\<`string`, `unknown`\> #### Returns `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `proof`: `unknown`; `proofId`: `string`; \}\>\> *** ### createTrail() > **createTrail**(`params`): `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `trail`: `unknown`; `trailId`: `string`; \}\>\> #### Parameters ##### params ###### deviceId `string` ###### maxSpeedMps? `number` ###### metadata? `Record`\<`string`, `unknown`\> ###### samples `object`[] ###### subjectId `string` #### Returns `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `trail`: `unknown`; `trailId`: `string`; \}\>\> *** ### scoreClaim() > **scoreClaim**(`params`): `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `level`: `string`; `negativeSignals`: `string`[]; `positiveSignals`: `string`[]; `score`: `number`; \}\>\> #### Parameters ##### params ###### claim `unknown` ###### options? \{ `accuracyThresholdM?`: `number`; `maxAgeMs?`: `number`; `now?`: `number`; `strongHdop?`: `number`; `strongSatellites?`: `number`; `weakAccuracyThresholdM?`: `number`; \} ###### options.accuracyThresholdM? `number` ###### options.maxAgeMs? `number` ###### options.now? `number` ###### options.strongHdop? `number` ###### options.strongSatellites? `number` ###### options.weakAccuracyThresholdM? `number` #### Returns `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `level`: `string`; `negativeSignals`: `string`[]; `positiveSignals`: `string`[]; `score`: `number`; \}\>\> *** ### verifyProof() > **verifyProof**(`params`): `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `claimId?`: `string`; `expired?`: `boolean`; `reason?`: `string`; `signerAddress?`: `string`; `valid`: `boolean`; \}\>\> #### Parameters ##### params ###### now? `number` ###### proof `unknown` #### Returns `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `claimId?`: `string`; `expired?`: `boolean`; `reason?`: `string`; `signerAddress?`: `string`; `valid`: `boolean`; \}\>\> --- ## Page: EdgeLookupPort URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/EdgeLookupPort [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / EdgeLookupPort # Interface: EdgeLookupPort ## Methods ### announce() > **announce**(`params`): `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<`unknown`\>\> #### Parameters ##### params \{ `appId`: `string`; `authorAddress?`: `string`; `expiresAt`: `number`; `isFree?`: `boolean`; `kind`: `"app"`; `signed`: `unknown`; \} \| \{ `capabilityId`: `string`; `expiresAt`: `number`; `kind`: `"agent"`; `latencyMs?`: `number`; `pricePerCall?`: `number`; `signed`: `unknown`; `tags?`: `string`[]; \} ###### Type Literal \{ `appId`: `string`; `authorAddress?`: `string`; `expiresAt`: `number`; `isFree?`: `boolean`; `kind`: `"app"`; `signed`: `unknown`; \} ###### appId `string` ###### authorAddress? `string` ###### expiresAt `number` ###### isFree? `boolean` ###### kind `"app"` ###### signed `unknown` WOTS-signed manifest (SignedManifest from @totemsdk/manifest). *** ###### Type Literal \{ `capabilityId`: `string`; `expiresAt`: `number`; `kind`: `"agent"`; `latencyMs?`: `number`; `pricePerCall?`: `number`; `signed`: `unknown`; `tags?`: `string`[]; \} ###### capabilityId `string` ###### expiresAt `number` ###### kind `"agent"` ###### latencyMs? `number` ###### pricePerCall? `number` ###### signed `unknown` WOTS-signed manifest (SignedManifest from @totemsdk/manifest). ###### tags? `string`[] #### Returns `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<`unknown`\>\> *** ### lookup() > **lookup**(`params`): `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `results`: `unknown`[]; \}\>\> #### Parameters ##### params ###### kind? `string` ###### query `string` #### Returns `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `results`: `unknown`[]; \}\>\> *** ### query() > **query**(`params`): `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `results`: `object`[]; \}\>\> Query the lookup network for registered apps or agents. Returns an empty array if no lookup port is configured on the node. #### Parameters ##### params \{ `authorAddress?`: `string`; `category?`: `string`[]; `freeOnly?`: `boolean`; `kind`: `"app"`; `limit?`: `number`; `minVersion?`: `number`; \} \| \{ `capabilityName?`: `string`; `kind`: `"agent"`; `limit?`: `number`; `maxLatencyMs?`: `number`; `maxPricePerCall?`: `number`; `tags?`: `string`[]; \} #### Returns `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `results`: `object`[]; \}\>\> *** ### watch() > **watch**(`params`): `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `unsubscribe`: () => `void`; \}\>\> #### Parameters ##### params ###### address `string` ###### onUpdate (`data`) => `void` #### Returns `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `unsubscribe`: () => `void`; \}\>\> --- ## Page: EdgeManifestPort URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/EdgeManifestPort [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / EdgeManifestPort # Interface: EdgeManifestPort ## Methods ### sign() > **sign**(`manifest`, `seed`, `keyIndex`): `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `signed`: `unknown`; \}\>\> #### Parameters ##### manifest `unknown` ##### seed `Uint8Array` ##### keyIndex `number` #### Returns `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `signed`: `unknown`; \}\>\> *** ### verify() > **verify**(`signed`): `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `reason?`: `string`; `valid`: `boolean`; \}\>\> #### Parameters ##### signed `unknown` #### Returns `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `reason?`: `string`; `valid`: `boolean`; \}\>\> --- ## Page: EdgeOmniaPort URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/EdgeOmniaPort [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / EdgeOmniaPort # Interface: EdgeOmniaPort ## Methods ### closeChannel() > **closeChannel**(`params`): `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<`unknown`\>\> #### Parameters ##### params `Record`\<`string`, `unknown`\> #### Returns `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<`unknown`\>\> *** ### closeFactory() > **closeFactory**(`params`): `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<`unknown`\>\> #### Parameters ##### params `Record`\<`string`, `unknown`\> #### Returns `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<`unknown`\>\> *** ### createFactory() > **createFactory**(`params`): `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<`unknown`\>\> #### Parameters ##### params `Record`\<`string`, `unknown`\> #### Returns `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<`unknown`\>\> *** ### getChannels() > **getChannels**(`params?`): `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `channels`: `unknown`[]; \}\>\> #### Parameters ##### params? `Record`\<`string`, `unknown`\> #### Returns `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `channels`: `unknown`[]; \}\>\> *** ### getRoute() > **getRoute**(`params`): `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<`unknown`\>\> #### Parameters ##### params `Record`\<`string`, `unknown`\> #### Returns `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<`unknown`\>\> *** ### getSwapRate() > **getSwapRate**(`params`): `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<`unknown`\>\> #### Parameters ##### params `Record`\<`string`, `unknown`\> #### Returns `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<`unknown`\>\> *** ### openChannel() > **openChannel**(`params`): `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<`unknown`\>\> #### Parameters ##### params `Record`\<`string`, `unknown`\> #### Returns `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<`unknown`\>\> *** ### openVirtualChannel() > **openVirtualChannel**(`params`): `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<`unknown`\>\> #### Parameters ##### params `Record`\<`string`, `unknown`\> #### Returns `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<`unknown`\>\> *** ### pay() > **pay**(`params`): `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<`unknown`\>\> #### Parameters ##### params `Record`\<`string`, `unknown`\> #### Returns `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<`unknown`\>\> *** ### payMultiHop() > **payMultiHop**(`params`): `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<`unknown`\>\> #### Parameters ##### params `Record`\<`string`, `unknown`\> #### Returns `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<`unknown`\>\> *** ### settle() > **settle**(`params`): `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<`unknown`\>\> #### Parameters ##### params `Record`\<`string`, `unknown`\> #### Returns `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<`unknown`\>\> *** ### spliceIn() > **spliceIn**(`params`): `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<`unknown`\>\> #### Parameters ##### params `Record`\<`string`, `unknown`\> #### Returns `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<`unknown`\>\> *** ### spliceOut() > **spliceOut**(`params`): `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<`unknown`\>\> #### Parameters ##### params `Record`\<`string`, `unknown`\> #### Returns `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<`unknown`\>\> --- ## Page: EdgeOperationResult URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/EdgeOperationResult [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / EdgeOperationResult # Interface: EdgeOperationResult\ ## Type Parameters ### T `T` = `unknown` ## Properties ### data? > `optional` **data?**: `T` *** ### error? > `optional` **error?**: `string` *** ### errorCode? > `optional` **errorCode?**: `string` *** ### ok > **ok**: `boolean` --- ## Page: EdgePaymentPort URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/EdgePaymentPort [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / EdgePaymentPort # Interface: EdgePaymentPort ## Methods ### pay() > **pay**(`params`): `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `txpowId?`: `string`; \}\>\> #### Parameters ##### params ###### amount `string` ###### memo? `string` ###### recipient `string` ###### tokenId? `string` #### Returns `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `txpowId?`: `string`; \}\>\> --- ## Page: EdgePolicyPort URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/EdgePolicyPort [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / EdgePolicyPort # Interface: EdgePolicyPort ## Methods ### check() > **check**(`params`): `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `allowed`: `boolean`; `reason?`: `string`; \}\>\> #### Parameters ##### params ###### action `string` ###### context? `Record`\<`string`, `unknown`\> ###### proposal? \{ `agentId`: `string`; `confidence`: `number`; `createdAt`: `number`; `explanation`: `string`; `id`: `string`; `intent`: \{ `amount?`: `string`; `reason?`: `string`; `recipient?`: `string`; `risk?`: `string`; `tokenId?`: `string`; `type`: `string`; \}; \} Full agent proposal (when available — richer than flat action/subject). ###### proposal.agentId `string` ###### proposal.confidence `number` ###### proposal.createdAt `number` ###### proposal.explanation `string` ###### proposal.id `string` ###### proposal.intent \{ `amount?`: `string`; `reason?`: `string`; `recipient?`: `string`; `risk?`: `string`; `tokenId?`: `string`; `type`: `string`; \} ###### proposal.intent.amount? `string` ###### proposal.intent.reason? `string` ###### proposal.intent.recipient? `string` ###### proposal.intent.risk? `string` ###### proposal.intent.tokenId? `string` ###### proposal.intent.type `string` ###### subject `string` #### Returns `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `allowed`: `boolean`; `reason?`: `string`; \}\>\> --- ## Page: EdgeProofPort URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/EdgeProofPort [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / EdgeProofPort # Interface: EdgeProofPort ## Methods ### createProof() > **createProof**(`params`): `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `proof`: `unknown`; `proofId`: `string`; \}\>\> #### Parameters ##### params ###### claims `unknown`[] ###### context? `Record`\<`string`, `unknown`\> ###### subject `string` #### Returns `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `proof`: `unknown`; `proofId`: `string`; \}\>\> *** ### verifyProof() > **verifyProof**(`params`): `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `reason?`: `string`; `valid`: `boolean`; \}\>\> #### Parameters ##### params ###### proof `unknown` ###### subject? `string` #### Returns `Promise`\<[`EdgeOperationResult`](EdgeOperationResult.md)\<\{ `reason?`: `string`; `valid`: `boolean`; \}\>\> --- ## Page: EdgeProviderProfile URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/EdgeProviderProfile [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / EdgeProviderProfile # Interface: EdgeProviderProfile ## Properties ### createdAt > **createdAt**: `number` *** ### description? > `optional` **description?**: `string` *** ### name > **name**: `string` *** ### operatorAddress > **operatorAddress**: `string` *** ### profileId > **profileId**: `string` *** ### tags > **tags**: `string`[] --- ## Page: EdgePubSubPort URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/EdgePubSubPort [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / EdgePubSubPort # Interface: EdgePubSubPort Publish-subscribe transport port. Wraps @totemsdk/pubsub-transport's IPubSubTransport as a first-class Edge runtime port. Protocol-agnostic — works with MQTT brokers, in-process event buses, or any pub/sub backend. ## Methods ### connect() > **connect**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### disconnect() > **disconnect**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### onMessage() > **onMessage**(`handler`): () => `void` #### Parameters ##### handler (`message`) => `void` #### Returns () => `void` *** ### publish() > **publish**(`topic`, `payload`): `Promise`\<`void`\> #### Parameters ##### topic `string` ##### payload `string` \| `Uint8Array`\<`ArrayBufferLike`\> #### Returns `Promise`\<`void`\> *** ### subscribe() > **subscribe**(`topic`): `Promise`\<\{ `topic`: `string`; `unsubscribe`: `Promise`\<`void`\>; \}\> #### Parameters ##### topic `string` #### Returns `Promise`\<\{ `topic`: `string`; `unsubscribe`: `Promise`\<`void`\>; \}\> --- ## Page: EdgeReceipt URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/EdgeReceipt [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / EdgeReceipt # Interface: EdgeReceipt ## Properties ### issuedAt > **issuedAt**: `number` *** ### kind > **kind**: `string` *** ### payload > **payload**: `Record`\<`string`, `unknown`\> *** ### receiptId > **receiptId**: `string` *** ### relatedIdentityId? > `optional` **relatedIdentityId?**: `string` *** ### relatedManifestId? > `optional` **relatedManifestId?**: `string` --- ## Page: EdgeRuntime URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/EdgeRuntime [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / EdgeRuntime # Interface: EdgeRuntime ## Properties ### capabilities > **capabilities**: [`EdgeCapabilitySet`](../type-aliases/EdgeCapabilitySet.md) *** ### deviceId > **deviceId**: `string` *** ### ports > **ports**: [`EdgeRuntimePorts`](EdgeRuntimePorts.md) *** ### version > **version**: `number` ## Methods ### assertCapability() > **assertCapability**(`cap`): `void` #### Parameters ##### cap [`EdgeCapability`](../type-aliases/EdgeCapability.md) #### Returns `void` *** ### executeAction() > **executeAction**(`params`): `Promise`\<`EdgeActionResult`\> Execute an action through the runtime. If a policy port is configured, the action is first checked against it. If the policy rejects the action, execution is blocked and the rejection reason is returned. The action string determines which port handles execution: - 'payment:*' → EdgePaymentPort.pay() - 'lookup:*' → EdgeLookupPort.query() / announce() - 'proof:*' → EdgeProofPort.createProof() / verifyProof() - 'intelligence:*' → EdgeIntelligencePort.invoke() / cancel() Unknown action strings return an error without attempting execution. #### Parameters ##### params `EdgeActionParams` #### Returns `Promise`\<`EdgeActionResult`\> *** ### hasCapability() > **hasCapability**(`cap`): `boolean` #### Parameters ##### cap [`EdgeCapability`](../type-aliases/EdgeCapability.md) #### Returns `boolean` --- ## Page: EdgeRuntimePorts URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/EdgeRuntimePorts [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / EdgeRuntimePorts # Interface: EdgeRuntimePorts ## Properties ### identity? > `optional` **identity?**: [`EdgeIdentityPort`](EdgeIdentityPort.md) *** ### intelligence? > `optional` **intelligence?**: [`EdgeIntelligencePort`](EdgeIntelligencePort.md) Optional local intelligence/inference surface. *** ### keyLease? > `optional` **keyLease?**: [`EdgeKeyLeasePort`](EdgeKeyLeasePort.md) WOTS key-lease coordination — required before any signing operation. *** ### liquidity? > `optional` **liquidity?**: [`EdgeLiquidityPort`](EdgeLiquidityPort.md) *** ### location? > `optional` **location?**: [`EdgeLocationPort`](EdgeLocationPort.md) *** ### lookup? > `optional` **lookup?**: [`EdgeLookupPort`](EdgeLookupPort.md) *** ### manifest? > `optional` **manifest?**: [`EdgeManifestPort`](EdgeManifestPort.md) *** ### omnia? > `optional` **omnia?**: [`EdgeOmniaPort`](EdgeOmniaPort.md) *** ### payment? > `optional` **payment?**: [`EdgePaymentPort`](EdgePaymentPort.md) *** ### policy? > `optional` **policy?**: [`EdgePolicyPort`](EdgePolicyPort.md) *** ### proof? > `optional` **proof?**: [`EdgeProofPort`](EdgeProofPort.md) *** ### pubsub? > `optional` **pubsub?**: [`EdgePubSubPort`](EdgePubSubPort.md) Publish-subscribe transport (MQTT-compatible, protocol-agnostic). *** ### stream? > `optional` **stream?**: [`EdgeStreamPort`](EdgeStreamPort.md) Bidirectional byte-stream transport (WebSocket, Hyperswarm, WebRTC, stdio). --- ## Page: EdgeSeller URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/EdgeSeller [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / EdgeSeller # Interface: EdgeSeller ## Properties ### engine > **engine**: [`NegotiationEngine`](../classes/NegotiationEngine.md) The underlying engine (advanced use / recovery). ## Methods ### getState() > **getState**(`negotiationId`): `Promise`\<[`NegotiationState`](../type-aliases/NegotiationState.md) \| `undefined`\> Get current negotiation state. #### Parameters ##### negotiationId `string` #### Returns `Promise`\<[`NegotiationState`](../type-aliases/NegotiationState.md) \| `undefined`\> *** ### handleInbound() > **handleInbound**(`message`, `context`): `Promise`\<[`ReplayOutcome`](ReplayOutcome.md)\> Handle a single authenticated inbound message (advanced use). #### Parameters ##### message [`NegotiationMessage`](../type-aliases/NegotiationMessage.md) ##### context [`TransportMessageContext`](TransportMessageContext.md) #### Returns `Promise`\<[`ReplayOutcome`](ReplayOutcome.md)\> *** ### issueChallenge() > **issueChallenge**(`negotiationId`): `Promise`\<[`WorkRequired`](WorkRequired.md)\> Issue a WorkRequired challenge for the next round (advanced use). #### Parameters ##### negotiationId `string` #### Returns `Promise`\<[`WorkRequired`](WorkRequired.md)\> *** ### openNegotiation() > **openNegotiation**(`opts`): `Promise`\<[`NegotiationRecord`](NegotiationRecord.md)\> Open a negotiation locally in response to a buyer request (advanced use). #### Parameters ##### opts ###### counterparty `string` ###### expiresAt? `number` ###### manifestId `string` ###### negotiationId `string` #### Returns `Promise`\<[`NegotiationRecord`](NegotiationRecord.md)\> *** ### subscribe() > **subscribe**(`transport`): `Promise`\<() => `void`\> Subscribe to a negotiation transport. #### Parameters ##### transport [`NegotiationTransport`](NegotiationTransport.md) #### Returns `Promise`\<() => `void`\> --- ## Page: EdgeServiceRegistration URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/EdgeServiceRegistration [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / EdgeServiceRegistration # Interface: EdgeServiceRegistration ## Properties ### expiresAt? > `optional` **expiresAt?**: `number` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### operatorAddress > **operatorAddress**: `string` *** ### profileId > **profileId**: `string` *** ### registeredAt > **registeredAt**: `number` *** ### registrationId > **registrationId**: `string` *** ### serviceId > **serviceId**: `string` --- ## Page: EdgeStreamPort URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/EdgeStreamPort [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / EdgeStreamPort # Interface: EdgeStreamPort Bidirectional byte-stream transport port. Wraps @totemsdk/stream-transport's IStreamTransport as a first-class Edge runtime port. Use for P2P channel messaging, lookup node connections, or any protocol that needs a raw bidirectional byte pipe. ## Methods ### close() > **close**(): `void` Close the connection. #### Returns `void` *** ### onClose() > **onClose**(`handler`): () => `void` Register a handler for connection close. #### Parameters ##### handler () => `void` #### Returns () => `void` *** ### onData() > **onData**(`handler`): () => `void` Register a handler for inbound data. #### Parameters ##### handler (`data`) => `void` #### Returns () => `void` *** ### onError() > **onError**(`handler`): () => `void` Register a handler for transport errors. #### Parameters ##### handler (`err`) => `void` #### Returns () => `void` *** ### send() > **send**(`data`): `void` Send raw bytes to the remote peer. #### Parameters ##### data `Uint8Array` #### Returns `void` --- ## Page: EdgeTxBuilderContext URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/EdgeTxBuilderContext [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / EdgeTxBuilderContext # Interface: EdgeTxBuilderContext Wallet-side tx building context. The wallet builds the transaction FIRST (coin selection + outputs), then the action derives effects from the real built tx — never from agent-supplied hints. ## Methods ### buildChannelUpdateTx()? > `optional` **buildChannelUpdateTx**(`params`): `Promise`\<\{ `channelScriptAddress`: `string`; `draft`: \{ `inputs`: `object`[]; `outputs`: `object`[]; \}; \}\> Build an Omnia channel update tx. Returns the draft + channel script address. #### Parameters ##### params ###### channelId `string` ###### newBalances `Record`\<`string`, `string`\> #### Returns `Promise`\<\{ `channelScriptAddress`: `string`; `draft`: \{ `inputs`: `object`[]; `outputs`: `object`[]; \}; \}\> *** ### buildPaymentTx()? > `optional` **buildPaymentTx**(`params`): `Promise`\<\{ `ownAddresses`: `string`[]; `params`: \{ `inputs`: `object`[]; `outputs`: `object`[]; \}; \}\> Build an L1 payment tx (coin selection + outputs). Returns the built params. #### Parameters ##### params ###### amount `string` ###### memo? `string` ###### recipient `string` ###### tokenId? `string` #### Returns `Promise`\<\{ `ownAddresses`: `string`[]; `params`: \{ `inputs`: `object`[]; `outputs`: `object`[]; \}; \}\> --- ## Page: FoldCompletedDispatchInput URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/FoldCompletedDispatchInput [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / FoldCompletedDispatchInput # Interface: FoldCompletedDispatchInput ## Properties ### context > **context**: `Record`\<`string`, `unknown`\> \| `undefined` *** ### now? > `optional` **now?**: () => `number` Injectable clock. #### Returns `number` *** ### outbox > **outbox**: [`OutboxStore`](OutboxStore.md) The durable purchasing outbox (the commerce accounting authority). *** ### principal > **principal**: `string` The buyer principal issuing the statement. *** ### requestId > **requestId**: `string` *** ### resolveAgreement > **resolveAgreement**: [`UsageAgreementResolver`](../type-aliases/UsageAgreementResolver.md) Resolve the completed dispatch to its agreement (undefined = skip). *** ### signer > **signer**: `Signer` The buyer's signature creation. *** ### usage > **usage**: [`InferenceRecordedUsage`](InferenceRecordedUsage.md) \| `undefined` --- ## Page: FoldUsageStatementsInput URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/FoldUsageStatementsInput [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / FoldUsageStatementsInput # Interface: FoldUsageStatementsInput ## Properties ### journal > **journal**: `Journal`\<[`InferenceAuditEvent`](../type-aliases/InferenceAuditEvent.md)\> The inference usage journal (recovered for accounting). *** ### now? > `optional` **now?**: () => `number` Injectable clock. #### Returns `number` *** ### outbox > **outbox**: [`OutboxStore`](OutboxStore.md) The durable purchasing outbox (the commerce accounting authority). *** ### principal > **principal**: `string` The buyer principal issuing statements. *** ### resolveAgreement > **resolveAgreement**: [`UsageAgreementResolver`](../type-aliases/UsageAgreementResolver.md) Resolve a completed dispatch to the agreement it bills against. *** ### signer > **signer**: `Signer` The buyer's signature creation. --- ## Page: FoldUsageStatementsReport URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/FoldUsageStatementsReport [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / FoldUsageStatementsReport # Interface: FoldUsageStatementsReport ## Properties ### dropped > **dropped**: `number` Completed purchase-attributable dispatches with no resolvable agreement. *** ### folded > **folded**: `number` Completed purchase-bound dispatches folded into the outbox. *** ### interrupted > **interrupted**: `number` Recovered interrupted runs — never folded, never billed. *** ### skippedNotPurchaseBound > **skippedNotPurchaseBound**: `number` Completed dispatches with no purchase agreement context at all. --- ## Page: InferenceAccountingAuthority URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/InferenceAccountingAuthority [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / InferenceAccountingAuthority # Interface: InferenceAccountingAuthority The minimal surface of the owning authority this reconciliation needs. ## Methods ### listCommittedReceipts() > **listCommittedReceipts**(`mandateId`): `Promise`\ Committed step receipts for a mandate — used to see what was accounted. #### Parameters ##### mandateId `string` #### Returns `Promise`\ --- ## Page: InferenceAccountingReconciliation URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/InferenceAccountingReconciliation [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / InferenceAccountingReconciliation # Interface: InferenceAccountingReconciliation ## Properties ### accountedCount > `readonly` **accountedCount**: `number` *** ### completedCount > `readonly` **completedCount**: `number` *** ### completedUnaccounted > `readonly` **completedUnaccounted**: readonly [`InferenceReadEvent`](../type-aliases/InferenceReadEvent.md)[] Completed journal entries with no matching committed receipt. *** ### consistent > `readonly` **consistent**: `boolean` *** ### interruptedAccounted > `readonly` **interruptedAccounted**: readonly [`InferenceReadEvent`](../type-aliases/InferenceReadEvent.md)[] Interrupted (outcome-unknown) entries that nevertheless have a committed receipt — the serious case: work was charged for an execution whose outcome is unknown. Surfaced, never silently accepted. *** ### interruptedCount > `readonly` **interruptedCount**: `number` --- ## Page: InferenceRecordedUsage URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/InferenceRecordedUsage [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / InferenceRecordedUsage # Interface: InferenceRecordedUsage JSON-clean usage measurements copied from the provider result. ## Properties ### durationMs? > `readonly` `optional` **durationMs?**: `number` *** ### metadata? > `readonly` `optional` **metadata?**: `Record`\<`string`, `string` \| `number`\> *** ### tokensIn? > `readonly` `optional` **tokensIn?**: `number` *** ### tokensOut? > `readonly` `optional` **tokensOut?**: `number` --- ## Page: InferenceRecoveryReport URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/InferenceRecoveryReport [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / InferenceRecoveryReport # Interface: InferenceRecoveryReport Recovery view of the journal (Phase 3a accounting-recovery gate). ## Properties ### completed > `readonly` **completed**: readonly [`InferenceReadEvent`](../type-aliases/InferenceReadEvent.md)[] `finished` events whose outcome is definitively `completed`. *** ### interrupted > `readonly` **interrupted**: readonly [`InferenceReadEvent`](../type-aliases/InferenceReadEvent.md)[] `started` events with no `finished` — the process died (or the journal was written for a call that never dispatched anything else). These are *interrupted*: never re-run, never receipted, budget held. --- ## Page: IngressOptions URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/IngressOptions [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / IngressOptions # Interface: IngressOptions ## Properties ### digest > **digest**: `MessageDigester` Canonical digest computation. *** ### maxBytes? > `optional` **maxBytes?**: `number` Max message size in bytes. *** ### recipient > **recipient**: `string` Local recipient address. *** ### replayLedger > **replayLedger**: [`ReplayLedger`](ReplayLedger.md) Replay ledger (durable). *** ### verifySignature > **verifySignature**: `SignatureVerifier` Signature verification. --- ## Page: IngressResult URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/IngressResult [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / IngressResult # Interface: IngressResult ## Properties ### claimed > **claimed**: `boolean` True when this caller won the atomic replay claim and must process the message. When false, the message was already claimed/completed — take the replay path (return the prior outcome, do not re-process). *** ### message > **message**: [`NegotiationMessage`](../type-aliases/NegotiationMessage.md) The authenticated message. *** ### priorEntry? > `optional` **priorEntry?**: [`ReplayEntry`](../type-aliases/ReplayEntry.md) Prior durable entry when replayed/completed. *** ### reclaimed? > `optional` **reclaimed?**: `boolean` True when a stale PROCESSING lease was reclaimed. *** ### replayed > **replayed**: `boolean` True when this exact message was already processed (idempotent replay). *** ### sender > **sender**: `string` The authenticated sender address. --- ## Page: IssueUsageStatementOptions URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/IssueUsageStatementOptions [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / IssueUsageStatementOptions # Interface: IssueUsageStatementOptions ## Properties ### agreement > **agreement**: [`UsageAgreementReference`](UsageAgreementReference.md) *** ### now? > `optional` **now?**: () => `number` Injectable clock (defaults to Date.now). #### Returns `number` *** ### principal > **principal**: `string` The issuer (buyer principal) whose signature binds the statement. *** ### requestId > **requestId**: `string` *** ### signer > **signer**: `Signer` Signature creation (WOTS). *** ### usage? > `optional` **usage?**: [`InferenceRecordedUsage`](InferenceRecordedUsage.md) --- ## Page: LocalWorkBudget URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/LocalWorkBudget [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / LocalWorkBudget # Interface: LocalWorkBudget Local work budget — Edge-level policy for whether the machine is willing to perform a challenge. Cryptographic verification still depends on challenge.target, not local timing estimates. ## Properties ### maxCumulativeWorkPerNegotiation? > `optional` **maxCumulativeWorkPerNegotiation?**: `bigint` Maximum cumulative expected hashes across the whole negotiation. *** ### maxEstimatedLocalMs? > `optional` **maxEstimatedLocalMs?**: `number` Maximum estimated local duration (ms) for a single challenge. *** ### maxExpectedHashes? > `optional` **maxExpectedHashes?**: `bigint` Maximum expected hashes for a single challenge. *** ### requireMinimaBacked? > `optional` **requireMinimaBacked?**: `boolean` Require Minima-backed proofs (superLevel >= 0) when true. --- ## Page: NegotiationCancellation URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/NegotiationCancellation [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / NegotiationCancellation # Interface: NegotiationCancellation Cancellation of a negotiation. ## Properties ### cancelledAt > **cancelledAt**: `number` *** ### negotiationId > **negotiationId**: `string` *** ### reason? > `optional` **reason?**: `string` *** ### recipient > **recipient**: `string` *** ### sender > **sender**: `string` *** ### signature > **signature**: `string` *** ### signerPublicKey > **signerPublicKey**: `string` *** ### version > **version**: `number` --- ## Page: NegotiationEngineOptions URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/NegotiationEngineOptions [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / NegotiationEngineOptions # Interface: NegotiationEngineOptions ## Properties ### limits? > `optional` **limits?**: `Partial`\<[`NegotiationLimits`](NegotiationLimits.md)\> Default negotiation limits. *** ### now? > `optional` **now?**: () => `number` Current time (for deterministic tests). #### Returns `number` *** ### onEvent? > `optional` **onEvent?**: (`event`) => `void` Event sink. #### Parameters ##### event [`PurchaseEvent`](../type-aliases/PurchaseEvent.md) #### Returns `void` *** ### principal > **principal**: `string` Local principal (root identity) that owns this engine. *** ### principalStore? > `optional` **principalStore?**: [`PrincipalNegotiationStore`](PrincipalNegotiationStore.md) Durable principal anti-abuse store. When omitted, in-memory. *** ### sign > **sign**: `Signer` Signature creation (WOTS). *** ### store? > `optional` **store?**: [`NegotiationStore`](NegotiationStore.md) Durable negotiation store (implements atomic transitionAndEnqueue). *** ### txpow > **txpow**: [`EdgeTxPowAdapter`](../classes/EdgeTxPowAdapter.md) TxPoW adapter (work admission). *** ### verifySignature > **verifySignature**: `SignatureVerifier` Signature verification (WOTS). *** ### workPolicy > **workPolicy**: [`EdgeWorkPolicy`](../classes/EdgeWorkPolicy.md) Edge work policy. --- ## Page: NegotiationLimits URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/NegotiationLimits [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / NegotiationLimits # Interface: NegotiationLimits Negotiation limits. ## Properties ### acquireBy? > `optional` **acquireBy?**: `number` Optional overall acquisition deadline (edge.buy). *** ### expiresAt > **expiresAt**: `number` *** ### maxRounds > **maxRounds**: `number` *** ### principal? > `optional` **principal?**: [`PrincipalLimits`](PrincipalLimits.md) Per-principal anti-abuse limits. --- ## Page: NegotiationRecord URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/NegotiationRecord [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / NegotiationRecord # Interface: NegotiationRecord A single negotiation's tracked state. ## Properties ### agreement? > `optional` **agreement?**: [`TradeAgreement`](TradeAgreement.md) The formed agreement (when AGREED). *** ### consumedChallenges > **consumedChallenges**: `string`[] Consumed challenge fingerprints (one-shot). *** ### counterparty > **counterparty**: `string` Counterparty address. *** ### cumulativeWork > **cumulativeWork**: `bigint` Cumulative expected hashes spent in this negotiation. *** ### expiresAt > **expiresAt**: `number` Hard negotiation expiry. *** ### headProposalId? > `optional` **headProposalId?**: `string` The current proposal head (only this may be accepted/rejected/countered). *** ### lastRound > **lastRound**: `number` Round of the last proposal. *** ### manifestId > **manifestId**: `string` Manifest this negotiation is over. *** ### negotiationId > **negotiationId**: `string` *** ### openedAt > **openedAt**: `number` When the negotiation was opened. *** ### outstandingChallenges > **outstandingChallenges**: `object`[] Outstanding WorkRequired challenges (one per transition/head). #### challengeId > **challengeId**: `string` #### fingerprint > **fingerprint**: `string` #### round > **round**: `number` #### status > **status**: `"CANCELLED"` \| `"EXPIRED"` \| `"OUTSTANDING"` \| `"CONSUMED"` *** ### principal > **principal**: `string` Authenticated principal (root identity) that opened it. *** ### proposals > **proposals**: `object`[] All proposals in this negotiation, in order. #### proposalId > **proposalId**: `string` #### round > **round**: `number` #### termsHash > **termsHash**: `string` *** ### revision > **revision**: `number` Monotonically increasing revision for atomic CAS transitions. *** ### state > **state**: [`NegotiationState`](../type-aliases/NegotiationState.md) *** ### terminalReason? > `optional` **terminalReason?**: `string` Terminal reason (when terminal). *** ### termsHashes > **termsHashes**: `string`[] Canonical terms hashes of all proposals (for cycle detection). *** ### updatedAt > **updatedAt**: `number` When the record was last updated. --- ## Page: NegotiationRequest URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/NegotiationRequest [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / NegotiationRequest # Interface: NegotiationRequest Initial negotiation request (before any proposal). ## Properties ### desiredTerms > **desiredTerms**: [`TradeTerms`](TradeTerms.md) *** ### manifestId > **manifestId**: `string` *** ### negotiationId > **negotiationId**: `string` *** ### recipient > **recipient**: `string` *** ### requestedAt > **requestedAt**: `number` *** ### sender > **sender**: `string` *** ### signature > **signature**: `string` *** ### signerPublicKey > **signerPublicKey**: `string` *** ### version > **version**: `number` --- ## Page: NegotiationResult URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/NegotiationResult [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / NegotiationResult # Interface: NegotiationResult Result of a negotiation. ## Properties ### agreement > **agreement**: [`TradeAgreement`](TradeAgreement.md) *** ### history > **history**: [`TradeProposal`](TradeProposal.md)[] Full proposal history (for observability). --- ## Page: NegotiationStore URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/NegotiationStore [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / NegotiationStore # Interface: NegotiationStore A durable negotiation store with atomic CAS semantics. ## Methods ### compareAndSet() > **compareAndSet**(`negotiationId`, `expectedRevision`, `next`): `Promise`\<`boolean`\> Atomically replace the record only if its current revision equals `expectedRevision`. Returns false when the record was advanced by another writer (stale transition). #### Parameters ##### negotiationId `string` ##### expectedRevision `number` ##### next [`NegotiationRecord`](NegotiationRecord.md) #### Returns `Promise`\<`boolean`\> *** ### create() > **create**(`record`): `Promise`\<`void`\> #### Parameters ##### record [`NegotiationRecord`](NegotiationRecord.md) #### Returns `Promise`\<`void`\> *** ### get() > **get**(`negotiationId`): `Promise`\<[`NegotiationRecord`](NegotiationRecord.md) \| `undefined`\> #### Parameters ##### negotiationId `string` #### Returns `Promise`\<[`NegotiationRecord`](NegotiationRecord.md) \| `undefined`\> *** ### listRecoverable()? > `optional` **listRecoverable**(): `Promise`\<[`NegotiationRecord`](NegotiationRecord.md)[]\> List recoverable (non-terminal) negotiations. #### Returns `Promise`\<[`NegotiationRecord`](NegotiationRecord.md)[]\> *** ### transitionAndEnqueue() > **transitionAndEnqueue**(`negotiationId`, `expectedRevision`, `next`, `outboxMessages`): `Promise`\<`boolean`\> Atomically perform a negotiation CAS AND enqueue outbox messages in ONE durable transaction. Returns false when the CAS failed (stale revision). For SQLite/Postgres this MUST be a single DB transaction so that the economic transition and the protocol response commit or fail together. The default falls back to a two-step (non-transactional) sequence. A durable store MUST override this to keep the crash window closed. #### Parameters ##### negotiationId `string` ##### expectedRevision `number` ##### next [`NegotiationRecord`](NegotiationRecord.md) ##### outboxMessages [`OutboxMessage`](OutboxMessage.md)[] #### Returns `Promise`\<`boolean`\> --- ## Page: NegotiationStrategy URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/NegotiationStrategy [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / NegotiationStrategy # Interface: NegotiationStrategy Applications supply bargaining intelligence. The core SDK supplies protocol mechanics only — no LLM, no private reservation price. ## Methods ### evaluate() > **evaluate**(`context`): `Promise`\<\{ `action`: `"accept"`; \} \| \{ `action`: `"reject"`; `reason?`: `string`; \} \| \{ `action`: `"counter"`; `terms`: [`TradeTerms`](TradeTerms.md); \}\> #### Parameters ##### context ###### history [`TradeProposal`](TradeProposal.md)[] ###### negotiationId `string` ###### proposal [`TradeProposal`](TradeProposal.md) ###### termsHashes `string`[] Canonical terms hashes of all prior proposals (for cycle detection). #### Returns `Promise`\<\{ `action`: `"accept"`; \} \| \{ `action`: `"reject"`; `reason?`: `string`; \} \| \{ `action`: `"counter"`; `terms`: [`TradeTerms`](TradeTerms.md); \}\> --- ## Page: NegotiationTransport URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/NegotiationTransport [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / NegotiationTransport # Interface: NegotiationTransport Authenticated negotiation transport boundary. `send` returns a DeliveryReceipt when the transport can prove the remote machine durably received/claimed the message (request/response or a durable acknowledgement), or `undefined` when the transport is fire-and-forget (e.g. pub/sub) and cannot prove durable remote processing. The outbox drainer must NOT mark a message delivered when `undefined` is returned — local transmission is not durable delivery. ## Methods ### send() > **send**(`recipient`, `message`): `Promise`\<[`DeliveryReceipt`](DeliveryReceipt.md) \| `undefined`\> #### Parameters ##### recipient `string` ##### message [`NegotiationMessage`](../type-aliases/NegotiationMessage.md) #### Returns `Promise`\<[`DeliveryReceipt`](DeliveryReceipt.md) \| `undefined`\> *** ### subscribe() > **subscribe**(`handler`): `Unsubscribe` \| `Promise`\<`Unsubscribe`\> #### Parameters ##### handler (`message`, `context`) => `Promise`\<`void`\> #### Returns `Unsubscribe` \| `Promise`\<`Unsubscribe`\> --- ## Page: OutboxDrainerOptions URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/OutboxDrainerOptions [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / OutboxDrainerOptions # Interface: OutboxDrainerOptions ## Properties ### backoffBaseMs? > `optional` **backoffBaseMs?**: `number` Base backoff ms between attempts (default 1_000). *** ### backoffMaxMs? > `optional` **backoffMaxMs?**: `number` Max backoff ms (default 30_000). *** ### maxAttempts? > `optional` **maxAttempts?**: `number` Max delivery attempts per message (default 5). Beyond this the entry is held. *** ### onEvent? > `optional` **onEvent?**: (`event`) => `void` Optional event hook for observability. #### Parameters ##### event ###### attempts `number` ###### messageId `string` ###### type `"negotiation.message_sent"` \| `"negotiation.delivery_retried"` #### Returns `void` *** ### outbox > **outbox**: [`OutboxStore`](OutboxStore.md) The durable outbox store. *** ### transport > **transport**: [`NegotiationTransport`](NegotiationTransport.md) The transport used to deliver outbox messages. --- ## Page: OutboxEntry URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/OutboxEntry [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / OutboxEntry # Interface: OutboxEntry An outbound message awaiting delivery. ## Properties ### attempts > **attempts**: `number` Delivery attempt count (bounded retry budget). *** ### deliveredAt? > `optional` **deliveredAt?**: `number` When the message was delivered (undefined = undelivered). *** ### enqueuedAt > **enqueuedAt**: `number` When the entry was enqueued. *** ### message > **message**: [`NegotiationMessage`](../type-aliases/NegotiationMessage.md) The signed message to deliver. *** ### messageId > **messageId**: `string` Stable canonical message ID (recomputed, never trusted from the wire). *** ### recipient > **recipient**: `string` The recipient address. --- ## Page: OutboxMessage URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/OutboxMessage [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / OutboxMessage # Interface: OutboxMessage An outbound message to enqueue atomically with a state transition. ## Properties ### messageId > **messageId**: `string` *** ### payload > **payload**: `string` The wire message (canonical JSON string). *** ### recipient > **recipient**: `string` --- ## Page: OutboxStore URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/OutboxStore [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / OutboxStore # Interface: OutboxStore A durable outbox store. ## Methods ### enqueue() > **enqueue**(`entry`): `Promise`\<`void`\> Atomically enqueue an outbound message. #### Parameters ##### entry [`OutboxEntry`](OutboxEntry.md) #### Returns `Promise`\<`void`\> *** ### listUndelivered() > **listUndelivered**(): `Promise`\<[`OutboxEntry`](OutboxEntry.md)[]\> List undelivered entries (for resend on restart). #### Returns `Promise`\<[`OutboxEntry`](OutboxEntry.md)[]\> *** ### markDelivered() > **markDelivered**(`messageId`, `deliveredAt`): `Promise`\<`void`\> Mark a message as delivered. #### Parameters ##### messageId `string` ##### deliveredAt `number` #### Returns `Promise`\<`void`\> *** ### recordAttempt() > **recordAttempt**(`messageId`): `Promise`\<`void`\> Increment the delivery attempt count. #### Parameters ##### messageId `string` #### Returns `Promise`\<`void`\> --- ## Page: PrincipalLimits URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/PrincipalLimits [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / PrincipalLimits # Interface: PrincipalLimits Per-principal anti-abuse limits. Keyed on the authenticated principal/root identity, never on an arbitrary child agentId. ## Properties ### cooldownMs? > `optional` **cooldownMs?**: `number` *** ### maxConcurrentNegotiations? > `optional` **maxConcurrentNegotiations?**: `number` *** ### maxNegotiationsPerWindow? > `optional` **maxNegotiationsPerWindow?**: `number` *** ### windowMs? > `optional` **windowMs?**: `number` --- ## Page: PrincipalNegotiationStore URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/PrincipalNegotiationStore [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / PrincipalNegotiationStore # Interface: PrincipalNegotiationStore Per-principal anti-abuse accounting. Concurrent negotiations, cooldown, and window counts must not reset trivially on process restart. This is protocol admission accounting only — NOT a global reputation system. `tryOpen` is ATOMIC: checking limits and consuming capacity is one operation. Two negotiations cannot simultaneously inspect a limit, both decide admission is allowed, then both record themselves and exceed it. ## Methods ### close() > **close**(`principal`, `negotiationId`): `Promise`\<`void`\> Atomically release capacity for a principal for a specific negotiation. Safe to call multiple times (no double-release). #### Parameters ##### principal `string` ##### negotiationId `string` #### Returns `Promise`\<`void`\> *** ### getCooldownUntil() > **getCooldownUntil**(`principal`): `Promise`\<`number`\> Get the cooldown-until timestamp for a principal (0 = none). #### Parameters ##### principal `string` #### Returns `Promise`\<`number`\> *** ### reconcile() > **reconcile**(`principal`, `activeNegotiationIds`): `Promise`\<`void`\> Reconcile open slots against the set of still-active negotiation IDs. Any slot whose negotiation is terminal, expired, or no longer present is released. This is the recovery hook that prevents capacity leaks when a process crashes before close(). #### Parameters ##### principal `string` ##### activeNegotiationIds `string`[] #### Returns `Promise`\<`void`\> *** ### setCooldownUntil() > **setCooldownUntil**(`principal`, `until`): `Promise`\<`void`\> Set the cooldown-until timestamp for a principal. #### Parameters ##### principal `string` ##### until `number` #### Returns `Promise`\<`void`\> *** ### tryOpen() > **tryOpen**(`principal`, `negotiationId`, `now`, `limits`): `Promise`\<\{ `allowed`: `true`; \} \| \{ `allowed`: `false`; `reason`: `"CONCURRENCY_LIMIT"` \| `"COOLDOWN"` \| `"WINDOW_LIMIT"`; \}\> Atomically check limits AND consume capacity. Returns `{ allowed: true }` when the principal may open a negotiation, or a typed rejection reason. Each consumed slot is bound to its `negotiationId` so recovery can reconcile open slots against actual negotiation records — a crashed process cannot leak capacity permanently. #### Parameters ##### principal `string` ##### negotiationId `string` ##### now `number` ##### limits ###### cooldownMs `number` ###### maxConcurrentNegotiations `number` ###### maxNegotiationsPerWindow `number` ###### windowMs `number` #### Returns `Promise`\<\{ `allowed`: `true`; \} \| \{ `allowed`: `false`; `reason`: `"CONCURRENCY_LIMIT"` \| `"COOLDOWN"` \| `"WINDOW_LIMIT"`; \}\> --- ## Page: ProposalAcceptance URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/ProposalAcceptance [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / ProposalAcceptance # Interface: ProposalAcceptance Acceptance of the current proposal head. ## Properties ### acceptedAt > **acceptedAt**: `number` *** ### acceptor > **acceptor**: `string` *** ### negotiationId > **negotiationId**: `string` *** ### proposalId > **proposalId**: `string` *** ### recipient > **recipient**: `string` *** ### signature > **signature**: `string` *** ### signerPublicKey > **signerPublicKey**: `string` *** ### version > **version**: `number` --- ## Page: ProposalRejection URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/ProposalRejection [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / ProposalRejection # Interface: ProposalRejection Rejection of the current proposal head. ## Properties ### negotiationId > **negotiationId**: `string` *** ### proposalId > **proposalId**: `string` *** ### reason? > `optional` **reason?**: `string` *** ### recipient > **recipient**: `string` *** ### rejectedAt > **rejectedAt**: `number` *** ### rejector > **rejector**: `string` *** ### signature > **signature**: `string` *** ### signerPublicKey > **signerPublicKey**: `string` *** ### version > **version**: `number` --- ## Page: PurchaseIntent URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/PurchaseIntent [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / PurchaseIntent # Interface: PurchaseIntent\ A generic demand-side intent. `Resource` is an open-ended string (e.g. "compute", "storage", "bandwidth", "energy", "sensor-data", "api", "robot-action"). `Constraints` is a typed extensible payload — not an unrestricted giant Record. ## Type Parameters ### Resource `Resource` *extends* `string` = `string` ### Constraints `Constraints` = `unknown` ## Properties ### constraints? > `optional` **constraints?**: `Constraints` *** ### expiresAt? > `optional` **expiresAt?**: `number` *** ### id > **id**: `string` *** ### maxSpend? > `optional` **maxSpend?**: `object` #### amount > **amount**: `string` #### tokenId? > `optional` **tokenId?**: `string` *** ### negotiate? > `optional` **negotiate?**: `boolean` *** ### preferredPaymentMethods? > `optional` **preferredPaymentMethods?**: `string`[] *** ### provider? > `optional` **provider?**: `string` *** ### quantity? > `optional` **quantity?**: `object` #### amount > **amount**: `string` #### unit > **unit**: `string` *** ### resource > **resource**: `Resource` --- ## Page: PurchaseRecord URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/PurchaseRecord [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / PurchaseRecord # Interface: PurchaseRecord A durable purchase record. `idempotencyKeys` records the stable operation identities already issued (payment, resource-start, settlement, receipt) so retries never duplicate side effects. ## Properties ### acquireBy? > `optional` **acquireBy?**: `number` Absolute acquisition deadline (persisted, not a relative timer). *** ### agreement? > `optional` **agreement?**: [`TradeAgreement`](TradeAgreement.md) *** ### createdAt > **createdAt**: `number` *** ### idempotencyKeys > **idempotencyKeys**: `string`[] Stable idempotency keys already issued. *** ### intent > **intent**: [`PurchaseIntent`](PurchaseIntent.md) *** ### purchaseId > **purchaseId**: `string` *** ### resourceReference? > `optional` **resourceReference?**: `string` Resource handle reference (only if safe/meaningful to persist). *** ### revision > **revision**: `number` Monotonically increasing revision for atomic CAS transitions. *** ### status > **status**: [`PurchaseStatus`](../type-aliases/PurchaseStatus.md) *** ### terminalReason? > `optional` **terminalReason?**: `string` Terminal reason (when terminal). *** ### updatedAt > **updatedAt**: `number` --- ## Page: PurchaseResult URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/PurchaseResult [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / PurchaseResult # Interface: PurchaseResult Result of a purchase. ## Properties ### agreement > **agreement**: [`TradeAgreement`](TradeAgreement.md) *** ### negotiated > **negotiated**: `boolean` True when the purchase went through the negotiated path. *** ### receipt? > `optional` **receipt?**: [`EdgeReceipt`](EdgeReceipt.md) *** ### session? > `optional` **session?**: [`PurchaseSession`](PurchaseSession.md) --- ## Page: PurchaseSession URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/PurchaseSession [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / PurchaseSession # Interface: PurchaseSession A long-running resource exchange session. ## Properties ### agreement > **agreement**: [`TradeAgreement`](TradeAgreement.md) *** ### id > **id**: `string` *** ### status > **status**: `"completed"` \| `"failed"` \| `"authorized"` \| `"active"` \| `"settling"` \| `"cancelled"` ## Methods ### close() > **close**(): `Promise`\<[`EdgeReceipt`](EdgeReceipt.md)\> #### Returns `Promise`\<[`EdgeReceipt`](EdgeReceipt.md)\> *** ### spent() > **spent**(): `Promise`\<\{ `amount`: `string`; `tokenId?`: `string`; \}\> #### Returns `Promise`\<\{ `amount`: `string`; `tokenId?`: `string`; \}\> *** ### usage() > **usage**(): `Promise`\<[`UsageEvent`](UsageEvent.md)[]\> #### Returns `Promise`\<[`UsageEvent`](UsageEvent.md)[]\> --- ## Page: PurchaseStore URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/PurchaseStore [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / PurchaseStore # Interface: PurchaseStore A durable purchase/session store with atomic CAS semantics. ## Methods ### compareAndSet() > **compareAndSet**(`purchaseId`, `expectedRevision`, `next`): `Promise`\<`boolean`\> #### Parameters ##### purchaseId `string` ##### expectedRevision `number` ##### next [`PurchaseRecord`](PurchaseRecord.md) #### Returns `Promise`\<`boolean`\> *** ### create() > **create**(`record`): `Promise`\<`void`\> #### Parameters ##### record [`PurchaseRecord`](PurchaseRecord.md) #### Returns `Promise`\<`void`\> *** ### get() > **get**(`purchaseId`): `Promise`\<[`PurchaseRecord`](PurchaseRecord.md) \| `undefined`\> #### Parameters ##### purchaseId `string` #### Returns `Promise`\<[`PurchaseRecord`](PurchaseRecord.md) \| `undefined`\> *** ### listRecoverable()? > `optional` **listRecoverable**(): `Promise`\<[`PurchaseRecord`](PurchaseRecord.md)[]\> #### Returns `Promise`\<[`PurchaseRecord`](PurchaseRecord.md)[]\> --- ## Page: ReconcileInferenceAccountingOptions URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/ReconcileInferenceAccountingOptions [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / ReconcileInferenceAccountingOptions # Interface: ReconcileInferenceAccountingOptions ## Properties ### authority > **authority**: [`InferenceAccountingAuthority`](InferenceAccountingAuthority.md) *** ### journal > **journal**: `Journal`\<[`InferenceAuditEvent`](../type-aliases/InferenceAuditEvent.md)\> *** ### mandateId > **mandateId**: `string` *** ### stepIdOf? > `optional` **stepIdOf?**: (`entry`) => `string` \| `undefined` Map a journal event to the step a host tuned into `context.metadata` at dispatch time. Defaults to reading `context.metadata.stepId`. #### Parameters ##### entry [`InferenceReadEvent`](../type-aliases/InferenceReadEvent.md) #### Returns `string` \| `undefined` --- ## Page: ReplayLedger URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/ReplayLedger [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / ReplayLedger # Interface: ReplayLedger Replay ledger — persists enough information to answer "have I already processed this exact signed message?" The `claim` operation is ATOMIC: two identical messages arriving concurrently cannot both observe "not present" before either records the result. Exactly one caller wins the claim; the other takes the replay path. If a claim is PROCESSING past its lease, a subsequent claim reclaims it (safe because the engine's negotiate CAS is idempotency-protected). ## Methods ### claim() > **claim**(`messageId`, `receivedAt`, `leaseMs?`): `Promise`\<\{ `claimed`: `true`; `reclaimed?`: `boolean`; \} \| \{ `claimed`: `false`; `entry?`: [`ReplayEntry`](../type-aliases/ReplayEntry.md); \}\> Atomically claim a message for processing. Returns `{ claimed: true }` when this caller won the claim, `{ claimed: false, outcome }` when the message was already completed, or `{ claimed: true, reclaimed: true }` when a stale lease was reclaimed. #### Parameters ##### messageId `string` ##### receivedAt `number` ##### leaseMs? `number` #### Returns `Promise`\<\{ `claimed`: `true`; `reclaimed?`: `boolean`; \} \| \{ `claimed`: `false`; `entry?`: [`ReplayEntry`](../type-aliases/ReplayEntry.md); \}\> *** ### complete() > **complete**(`messageId`, `outcome`): `Promise`\<`void`\> Mark a claimed message as durably processed with its outcome. #### Parameters ##### messageId `string` ##### outcome [`ReplayOutcome`](ReplayOutcome.md) #### Returns `Promise`\<`void`\> *** ### get() > **get**(`messageId`): `Promise`\<[`ReplayEntry`](../type-aliases/ReplayEntry.md) \| `undefined`\> Look up a previously processed message. #### Parameters ##### messageId `string` #### Returns `Promise`\<[`ReplayEntry`](../type-aliases/ReplayEntry.md) \| `undefined`\> --- ## Page: ReplayOutcome URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/ReplayOutcome [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / ReplayOutcome # Interface: ReplayOutcome Replay outcome — the durable result of processing a message. ## Properties ### error? > `optional` **error?**: `string` *** ### ok > **ok**: `boolean` *** ### result? > `optional` **result?**: `string` --- ## Page: ResourceAdapter URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/ResourceAdapter [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / ResourceAdapter # Interface: ResourceAdapter Resource adapter boundary — purchasing core must not know how every resource executes. ## Methods ### close()? > `optional` **close**(`handle`): `Promise`\<`void`\> #### Parameters ##### handle [`ResourceHandle`](ResourceHandle.md) #### Returns `Promise`\<`void`\> *** ### meter()? > `optional` **meter**(`handle`): `AsyncIterable`\<[`UsageEvent`](UsageEvent.md)\> #### Parameters ##### handle [`ResourceHandle`](ResourceHandle.md) #### Returns `AsyncIterable`\<[`UsageEvent`](UsageEvent.md)\> *** ### recover()? > `optional` **recover**(`reference`, `agreement`, `context`): `Promise`\<\{ `handle`: [`ResourceHandle`](ResourceHandle.md); `state`: `"ACTIVE"`; \} \| \{ `result?`: `unknown`; `state`: `"COMPLETED"`; \} \| \{ `state`: `"MISSING"`; \} \| \{ `state`: `"UNKNOWN"`; \}\> Recover a resource that may have been started before a crash. `reference` is the stable external identity persisted in the purchase record (e.g. compute job ID, container ID, storage lease ID, robot task ID). The adapter must NOT start another identical resource — it reconnects to the existing one. Returns: ACTIVE — the resource is running; a usable handle is returned. COMPLETED — the resource already finished; no handle needed. MISSING — the resource no longer exists; safe to treat as not started. UNKNOWN — cannot determine state; block automatic duplicate execution. #### Parameters ##### reference `PersistedResourceReference` ##### agreement [`TradeAgreement`](TradeAgreement.md) ##### context `Record`\<`string`, `unknown`\> #### Returns `Promise`\<\{ `handle`: [`ResourceHandle`](ResourceHandle.md); `state`: `"ACTIVE"`; \} \| \{ `result?`: `unknown`; `state`: `"COMPLETED"`; \} \| \{ `state`: `"MISSING"`; \} \| \{ `state`: `"UNKNOWN"`; \}\> *** ### start() > **start**(`agreement`, `context`): `Promise`\<[`ResourceHandle`](ResourceHandle.md)\> #### Parameters ##### agreement [`TradeAgreement`](TradeAgreement.md) ##### context `Record`\<`string`, `unknown`\> #### Returns `Promise`\<[`ResourceHandle`](ResourceHandle.md)\> *** ### supports() > **supports**(`resource`, `manifest`): `boolean` #### Parameters ##### resource `string` ##### manifest `SignedManifest` #### Returns `boolean` --- ## Page: ResourceHandle URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/ResourceHandle [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / ResourceHandle # Interface: ResourceHandle ## Properties ### agreementId > **agreementId**: `string` *** ### id > **id**: `string` *** ### resource > **resource**: `string` --- ## Page: SellerServiceOptions URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/SellerServiceOptions [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / SellerServiceOptions # Interface: SellerServiceOptions ## Properties ### limits? > `optional` **limits?**: `Partial`\<[`NegotiationLimits`](NegotiationLimits.md)\> Default negotiation limits. *** ### manifest? > `optional` **manifest?**: `SignedManifest`\<`Manifest`\> Standing service manifest (for computing manifestId when opening a negotiation). *** ### negotiationStore > **negotiationStore**: [`NegotiationStore`](NegotiationStore.md) Durable negotiation store. *** ### now? > `optional` **now?**: () => `number` Current time (for deterministic tests). #### Returns `number` *** ### onEvent? > `optional` **onEvent?**: (`event`) => `void` Event sink. #### Parameters ##### event [`PurchaseEvent`](../type-aliases/PurchaseEvent.md) #### Returns `void` *** ### onOutboundEnqueued? > `optional` **onOutboundEnqueued?**: () => `Promise`\<`void`\> Optional hook invoked after a message is enqueued to the durable outbox. The runtime uses this to trigger an immediate outbox drain over the wire. #### Returns `Promise`\<`void`\> *** ### outboxStore > **outboxStore**: [`OutboxStore`](OutboxStore.md) Durable outbox store. *** ### principal > **principal**: `string` Authenticated principal (root identity) that owns this seller service. *** ### principalStore > **principalStore**: [`PrincipalNegotiationStore`](PrincipalNegotiationStore.md) Durable principal anti-abuse store. *** ### replayLedger > **replayLedger**: [`ReplayLedger`](ReplayLedger.md) Durable replay ledger. *** ### sign > **sign**: `Signer` Signature creation (WOTS). *** ### strategy > **strategy**: [`SellerStrategy`](SellerStrategy.md) Seller bargaining strategy. *** ### txpow > **txpow**: [`EdgeTxPowAdapter`](../classes/EdgeTxPowAdapter.md) TxPoW adapter (work admission). *** ### usageStatementLog? > `optional` **usageStatementLog?**: `UsageStatementLogStore` Optional durable log of reconciled usage statements (Phase 3a accounting fold). When provided, an inbound `usage.statement` is recorded exactly once per `statementId`. When absent, the seller refuses to reconcile statements (no silent accounting). *** ### verifySignature > **verifySignature**: `SignatureVerifier` Signature verification (WOTS). *** ### verifyUsageStatementAgreement? > `optional` **verifyUsageStatementAgreement?**: (`params`) => `boolean` \| `Promise`\<`boolean`\> Optional agreement cross-check for inbound usage statements: return true when `agreementId` was negotiated by this seller with `buyer`. When absent, statements are recorded without an agreement cross-check (the fold is advisory; reimbursement/settlement stays per the agreement). #### Parameters ##### params ###### agreementId `string` ###### buyer `string` ###### requestId `string` #### Returns `boolean` \| `Promise`\<`boolean`\> *** ### workPolicy > **workPolicy**: [`EdgeWorkPolicy`](../classes/EdgeWorkPolicy.md) Edge work policy. --- ## Page: SellerStrategy URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/SellerStrategy [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / SellerStrategy # Interface: SellerStrategy Applications supply seller-side bargaining intelligence. The input proposal is the *current head from the buyer's perspective*. The seller may accept it, reject it, or counter with new terms. ## Methods ### evaluate() > **evaluate**(`context`): `Promise`\<\{ `action`: `"accept"`; \} \| \{ `action`: `"reject"`; `reason?`: `string`; \} \| \{ `action`: `"counter"`; `terms`: [`TradeTerms`](TradeTerms.md); \}\> #### Parameters ##### context ###### history [`TradeProposal`](TradeProposal.md)[] ###### negotiationId `string` ###### proposal [`TradeProposal`](TradeProposal.md) ###### termsHashes `string`[] #### Returns `Promise`\<\{ `action`: `"accept"`; \} \| \{ `action`: `"reject"`; `reason?`: `string`; \} \| \{ `action`: `"counter"`; `terms`: [`TradeTerms`](TradeTerms.md); \}\> --- ## Page: SessionOptions URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/SessionOptions [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / SessionOptions # Interface: SessionOptions ## Properties ### agreement > **agreement**: [`TradeAgreement`](TradeAgreement.md) *** ### id > **id**: `string` *** ### onClose? > `optional` **onClose?**: () => `void` #### Returns `void` *** ### onUsage? > `optional` **onUsage?**: (`event`) => `void` #### Parameters ##### event [`UsageEvent`](UsageEvent.md) #### Returns `void` *** ### usageEvents? > `optional` **usageEvents?**: [`UsageEvent`](UsageEvent.md)[] --- ## Page: TradeAgreement URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/TradeAgreement [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / TradeAgreement # Interface: TradeAgreement An accepted proposal becomes a distinct immutable agreement. ## Properties ### acceptedProposalId > **acceptedProposalId**: `string` *** ### agreedAt > **agreedAt**: `number` *** ### agreementId > **agreementId**: `string` *** ### buyer > **buyer**: `string` *** ### buyerSignature > **buyerSignature**: `string` *** ### expiresAt? > `optional` **expiresAt?**: `number` *** ### manifestId > **manifestId**: `string` *** ### negotiationId > **negotiationId**: `string` *** ### seller > **seller**: `string` *** ### sellerSignature > **sellerSignature**: `string` *** ### terms > **terms**: [`TradeTerms`](TradeTerms.md) *** ### version > **version**: `number` --- ## Page: TradeProposal URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/TradeProposal [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / TradeProposal # Interface: TradeProposal A role-neutral signed proposal used for: - initial buyer proposal - seller quote - buyer counter - seller counter A counteroffer is NOT a separate protocol object — it is a TradeProposal with `parentProposalId` set and `round = parent.round + 1`. ## Properties ### createdAt > **createdAt**: `number` *** ### expiresAt > **expiresAt**: `number` *** ### manifestId > **manifestId**: `string` *** ### negotiationId > **negotiationId**: `string` *** ### parentProposalId? > `optional` **parentProposalId?**: `string` *** ### proposalId > **proposalId**: `string` *** ### proposer > **proposer**: `string` *** ### recipient > **recipient**: `string` *** ### round > **round**: `number` *** ### signature > **signature**: `string` WOTS signature over the canonical proposal digest. *** ### signerPublicKey > **signerPublicKey**: `string` WOTS public-key digest (hex) of the proposer — for verification. *** ### terms > **terms**: [`TradeTerms`](TradeTerms.md) *** ### version > **version**: `number` *** ### workAdmission? > `optional` **workAdmission?**: `MachineWorkAdmissionProof` Optional Machine Work Admission proof bound to this proposal. --- ## Page: TradeTerms URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/TradeTerms [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / TradeTerms # Interface: TradeTerms Resource-generic trade terms. Supports machine negotiations over price, quantity, duration, unit, latency, location, payment asset, payment method, settlement interval, proof requirements, SLA, priority, availability window, quality, and cancellation. Uses typed extensibility via `extras` rather than an unrestricted giant Record. ## Properties ### availabilityWindowMs? > `optional` **availabilityWindowMs?**: \[`number`, `number`\] Availability window [startMs, endMs]. *** ### cancellationPolicy? > `optional` **cancellationPolicy?**: `string` Cancellation policy label. *** ### durationMs? > `optional` **durationMs?**: `number` Duration in milliseconds. *** ### extras? > `optional` **extras?**: `Record`\<`string`, `string`\> Typed extensibility — domain-specific terms. *** ### location? > `optional` **location?**: `string` Geographic region / location constraint. *** ### maxLatencyMs? > `optional` **maxLatencyMs?**: `number` Maximum acceptable latency in milliseconds. *** ### paymentMethod? > `optional` **paymentMethod?**: `string` Payment method (e.g. 'omnia', 'onchain', 'invoice', 'free'). *** ### price > **price**: `string` Price in the token's native unit (string to preserve precision). *** ### priority? > `optional` **priority?**: `number` Priority level. *** ### proofRequirements? > `optional` **proofRequirements?**: `string`[] Proof requirements (e.g. 'location-proof', 'none'). *** ### quality? > `optional` **quality?**: `string` Quality level. *** ### quantity? > `optional` **quantity?**: `object` #### amount > **amount**: `string` #### unit > **unit**: `string` *** ### settlementIntervalMs? > `optional` **settlementIntervalMs?**: `number` Settlement interval in milliseconds. *** ### sla? > `optional` **sla?**: `string` Service-level agreement label. *** ### tokenId? > `optional` **tokenId?**: `string` Minima tokenId, or '0x00' for native Minima. --- ## Page: TransportMessageContext URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/TransportMessageContext [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / TransportMessageContext # Interface: TransportMessageContext Context passed to the transport handler for an inbound message. ## Properties ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> Transport-level metadata (e.g. topic, connection id). *** ### recipient > **recipient**: `string` The local recipient address. *** ### sender > **sender**: `string` The authenticated sender address (resolved by the transport). --- ## Page: UsageAgreementReference URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/UsageAgreementReference [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / UsageAgreementReference # Interface: UsageAgreementReference Approval:// billing reference resolved for a purchase-bound dispatch. ## Properties ### agreementId > **agreementId**: `string` *** ### manifestId > **manifestId**: `string` *** ### negotiationId? > `optional` **negotiationId?**: `string` *** ### seller > **seller**: `string` The principal being billed (the seller). --- ## Page: UsageEvent URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/UsageEvent [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / UsageEvent # Interface: UsageEvent ## Properties ### amount > **amount**: `string` *** ### at > **at**: `number` *** ### unit > **unit**: `string` --- ## Page: UsageFoldContext URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/UsageFoldContext [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / UsageFoldContext # Interface: UsageFoldContext Dispatcher-side view of the inference invocation that completed. ## Properties ### context > **context**: `Record`\<`string`, `unknown`\> \| `undefined` *** ### requestId > **requestId**: `string` *** ### usage > **usage**: [`InferenceRecordedUsage`](InferenceRecordedUsage.md) \| `undefined` --- ## Page: WorkDifficultyPolicy URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/WorkDifficultyPolicy [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / WorkDifficultyPolicy # Interface: WorkDifficultyPolicy Progressive counteroffer work difficulty policy. Bounds difficulty growth through local policy — never hard-coded exponential semantics in the protocol. ## Properties ### baseTarget > **baseTarget**: `string` Base difficulty target (hex) for round 0. *** ### maxTarget > **maxTarget**: `string` Maximum allowed difficulty (hex) — a harder target than this is refused. *** ### roundTargets? > `optional` **roundTargets?**: `string`[] Optional per-round difficulty targets. When provided, the target for a given round is looked up here (clamped to the last entry). When omitted, the base target is used for every round. --- ## Page: WorkRequired URL: https://docs.totem.ing/api/totemsdk-edge/interfaces/WorkRequired [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / WorkRequired # Interface: WorkRequired A signed Edge protocol message wrapping a WorkChallenge. WorkChallenge itself is intentionally unsigned generic TxPoW data. Edge authenticates the challenge issuer by wrapping it in a signed message. ## Properties ### challenge > **challenge**: `WorkChallenge` *** ### negotiationId > **negotiationId**: `string` *** ### proposalId? > `optional` **proposalId?**: `string` *** ### reason > **reason**: `"initial-proposal"` \| `"counterproposal"` \| `"resource-admission"` *** ### recipient > **recipient**: `string` *** ### sender > **sender**: `string` *** ### signature > **signature**: `string` *** ### signerPublicKey > **signerPublicKey**: `string` *** ### version > **version**: `number` --- ## Page: EdgeActionEffect URL: https://docs.totem.ing/api/totemsdk-edge/type-aliases/EdgeActionEffect [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / EdgeActionEffect # Type Alias: EdgeActionEffect > **EdgeActionEffect** = `"read"` \| `"write"` \| `"sign"` \| `"spend"` \| `"publish"` \| `"admin"` --- ## Page: EdgeCapability URL: https://docs.totem.ing/api/totemsdk-edge/type-aliases/EdgeCapability [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / EdgeCapability # Type Alias: EdgeCapability > **EdgeCapability** = `"wallet:self-custody"` \| `"wallet:wots-tree-key"` \| `"wallet:root-identity"` \| `"wallet:seed-export"` \| `"account:multi-address"` \| `"account:switcher"` \| `"chain:hosted-provider"` \| `"chain:pure-rpc"` \| `"chain:lookup-node"` \| `"chain:local-proof-verify"` \| `"chain:pear-runtime"` \| `"chain:hyperswarm"` \| `"txpow:local-mining"` \| `"txpow:progress-events"` \| `"omnia:channels"` \| `"omnia:routing"` \| `"omnia:multi-hop"` \| `"omnia:cross-token-swap"` \| `"omnia:factory"` \| `"omnia:virtual-channels"` \| `"omnia:splicing"` \| `"omnia:hyperswarm"` \| `"statechain:supported"` \| `"statechain:blind-se"` \| `"scripting:kissvm"` \| `"qvac:payment-intents"` \| `"qvac:explanations"` \| `"intelligence:llm"` \| `"intelligence:embed"` \| `"intelligence:rag"` \| `"intelligence:asr"` \| `"intelligence:translate"` \| `"intelligence:tts"` \| `"intelligence:diffusion"` \| `"intelligence:ocr"` \| `"intelligence:classify"` \| `"intelligence:audiogen"` \| `"intelligence:video"` \| `"intelligence:vla"` \| `"intelligence:world"` \| `"intelligence:models"` \| `"intelligence:system"` \| `"intelligence:plugins"` \| `` `intelligence:${string}` `` \| `"proof:create"` \| `"proof:verify"` \| `"lookup:watch"` \| `"identity:resolve"` \| `"manifest:sign"` \| `"manifest:verify"` \| `"payment:send"` \| `"policy:check"` \| `"location:claim"` \| `"location:trail"` \| `"location:proof"` \| `"transport:stream"` \| `"transport:pubsub"` \| `"transport:websocket"` \| `"transport:hyperswarm"` \| `"transport:webrtc"` \| `"transport:stdio"` \| `"transport:modbus"` \| `"transport:grpc"` \| `"transport:coap"` \| `"transport:can"` \| `"transport:ble"` \| `"transport:lorawan"` \| `"transport:ros2"` \| `"transport:opcua"` \| `"transport:bacnet"` \| `"transport:matter"` --- ## Page: EdgeCapabilitySet URL: https://docs.totem.ing/api/totemsdk-edge/type-aliases/EdgeCapabilitySet [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / EdgeCapabilitySet # Type Alias: EdgeCapabilitySet > **EdgeCapabilitySet** = `Set`\<[`EdgeCapability`](EdgeCapability.md)\> --- ## Page: EdgeDeviceKind URL: https://docs.totem.ing/api/totemsdk-edge/type-aliases/EdgeDeviceKind [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / EdgeDeviceKind # Type Alias: EdgeDeviceKind > **EdgeDeviceKind** = `"device"` \| `"app"` \| `"agent"` \| `"sensor"` \| `"robot"` \| `"gateway"` \| `"service"` --- ## Page: InferenceAuditEvent URL: https://docs.totem.ing/api/totemsdk-edge/type-aliases/InferenceAuditEvent [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / InferenceAuditEvent # Type Alias: InferenceAuditEvent > **InferenceAuditEvent** = \{ `agentId?`: `string`; `context?`: `Record`\<`string`, `unknown`\>; `event`: `"started"`; `principal?`: `string`; `proposalId?`: `string`; `providerId`: `string`; `requestId`: `string`; `runId?`: `string`; `startedAt`: `number`; `workflow`: \{ `domain`: `string`; `op`: `string`; \}; \} \| \{ `context?`: `Record`\<`string`, `unknown`\>; `errorCode?`: `string`; `errorMessage?`: `string`; `event`: `"finished"`; `finishedAt`: `number`; `outcome`: `"completed"` \| `"failed"` \| `"outcome-unknown"`; `requestId`: `string`; `usage?`: [`InferenceRecordedUsage`](../interfaces/InferenceRecordedUsage.md); \} Journaled inference usage/execution event. Two events per dispatched call, joined by `requestId`. The journal is append-only: outcomes are never mutated in place, a `finished` event is appended when the outcome is known (or deliberately recorded unknown). ## Union Members ### Type Literal \{ `agentId?`: `string`; `context?`: `Record`\<`string`, `unknown`\>; `event`: `"started"`; `principal?`: `string`; `proposalId?`: `string`; `providerId`: `string`; `requestId`: `string`; `runId?`: `string`; `startedAt`: `number`; `workflow`: \{ `domain`: `string`; `op`: `string`; \}; \} #### agentId? > `readonly` `optional` **agentId?**: `string` #### context? > `readonly` `optional` **context?**: `Record`\<`string`, `unknown`\> Verbatim invocation context (governance linkage for reconciliation). #### event > `readonly` **event**: `"started"` #### principal? > `readonly` `optional` **principal?**: `string` #### proposalId? > `readonly` `optional` **proposalId?**: `string` #### providerId > `readonly` **providerId**: `string` #### requestId > `readonly` **requestId**: `string` #### runId? > `readonly` `optional` **runId?**: `string` #### startedAt > `readonly` **startedAt**: `number` #### workflow > `readonly` **workflow**: `object` ##### workflow.domain > `readonly` **domain**: `string` ##### workflow.op > `readonly` **op**: `string` *** ### Type Literal \{ `context?`: `Record`\<`string`, `unknown`\>; `errorCode?`: `string`; `errorMessage?`: `string`; `event`: `"finished"`; `finishedAt`: `number`; `outcome`: `"completed"` \| `"failed"` \| `"outcome-unknown"`; `requestId`: `string`; `usage?`: [`InferenceRecordedUsage`](../interfaces/InferenceRecordedUsage.md); \} #### context? > `readonly` `optional` **context?**: `Record`\<`string`, `unknown`\> Verbatim invocation context, mirrored from the paired `started` event. #### errorCode? > `readonly` `optional` **errorCode?**: `string` #### errorMessage? > `readonly` `optional` **errorMessage?**: `string` #### event > `readonly` **event**: `"finished"` #### finishedAt > `readonly` **finishedAt**: `number` #### outcome > `readonly` **outcome**: `"completed"` \| `"failed"` \| `"outcome-unknown"` #### requestId > `readonly` **requestId**: `string` #### usage? > `readonly` `optional` **usage?**: [`InferenceRecordedUsage`](../interfaces/InferenceRecordedUsage.md) --- ## Page: InferenceReadEvent URL: https://docs.totem.ing/api/totemsdk-edge/type-aliases/InferenceReadEvent [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / InferenceReadEvent # Type Alias: InferenceReadEvent > **InferenceReadEvent** = `JournalEntry`\<[`InferenceAuditEvent`](InferenceAuditEvent.md)\> --- ## Page: NegotiationMessage URL: https://docs.totem.ing/api/totemsdk-edge/type-aliases/NegotiationMessage [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / NegotiationMessage # Type Alias: NegotiationMessage > **NegotiationMessage** = [`NegotiationRequest`](../interfaces/NegotiationRequest.md) \| [`WorkRequired`](../interfaces/WorkRequired.md) \| [`TradeProposal`](../interfaces/TradeProposal.md) \| [`ProposalAcceptance`](../interfaces/ProposalAcceptance.md) \| [`ProposalRejection`](../interfaces/ProposalRejection.md) \| [`NegotiationCancellation`](../interfaces/NegotiationCancellation.md) \| `UsageStatement` The minimum set of peer-to-peer negotiation messages. --- ## Page: NegotiationState URL: https://docs.totem.ing/api/totemsdk-edge/type-aliases/NegotiationState [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / NegotiationState # Type Alias: NegotiationState > **NegotiationState** = `"OPEN"` \| `"NEGOTIATING"` \| `"AGREED"` \| `"REJECTED"` \| `"CANCELLED"` \| `"EXHAUSTED"` \| `"EXPIRED"` Negotiation state machine states. --- ## Page: OutboxDrainer URL: https://docs.totem.ing/api/totemsdk-edge/type-aliases/OutboxDrainer [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / OutboxDrainer # Type Alias: OutboxDrainer > **OutboxDrainer** = `ReturnType`\<*typeof* [`createOutboxDrainer`](../functions/createOutboxDrainer.md)\> --- ## Page: PurchaseEvent URL: https://docs.totem.ing/api/totemsdk-edge/type-aliases/PurchaseEvent [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / PurchaseEvent # Type Alias: PurchaseEvent > **PurchaseEvent** = \{ `type`: `"runtime.persistence_ephemeral"`; \} \| \{ `intent`: [`PurchaseIntent`](../interfaces/PurchaseIntent.md); `type`: `"purchase.requested"`; \} \| \{ `manifestId`: `string`; `type`: `"purchase.discovered"`; \} \| \{ `negotiationId`: `string`; `type`: `"negotiation.opened"`; \} \| \{ `negotiationId`: `string`; `round`: `number`; `type`: `"negotiation.work_required"`; \} \| \{ `negotiationId`: `string`; `reason`: `string`; `type`: `"negotiation.work_challenge_refused"`; \} \| \{ `negotiationId`: `string`; `round`: `number`; `type`: `"negotiation.proposed"`; \} \| \{ `negotiationId`: `string`; `round`: `number`; `type`: `"negotiation.countered"`; \} \| \{ `negotiationId`: `string`; `proposalId`: `string`; `type`: `"negotiation.accepted"`; \} \| \{ `negotiationId`: `string`; `proposalId`: `string`; `type`: `"negotiation.rejected"`; \} \| \{ `negotiationId`: `string`; `type`: `"negotiation.exhausted"`; \} \| \{ `negotiationId`: `string`; `type`: `"negotiation.expired"`; \} \| \{ `superLevel`: `number`; `type`: `"work.block_found"`; \} \| \{ `agreementId`: `string`; `type`: `"purchase.authorized"`; \} \| \{ `sessionId`: `string`; `type`: `"purchase.started"`; \} \| \{ `amount`: `string`; `sessionId`: `string`; `type`: `"purchase.usage"`; `unit`: `string`; \} \| \{ `agreementId`: `string`; `recipient`: `string`; `statementId`: `string`; `type`: `"purchase.usage_statement"`; \} \| \{ `sessionId`: `string`; `type`: `"purchase.settling"`; \} \| \{ `sessionId`: `string`; `type`: `"purchase.completed"`; \} \| \{ `reason`: `string`; `sessionId`: `string`; `type`: `"purchase.failed"`; \} Events emitted by the purchasing engine. --- ## Page: PurchaseStatus URL: https://docs.totem.ing/api/totemsdk-edge/type-aliases/PurchaseStatus [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / PurchaseStatus # Type Alias: PurchaseStatus > **PurchaseStatus** = `"REQUESTED"` \| `"DISCOVERING"` \| `"NEGOTIATING"` \| `"AGREED"` \| `"AUTHORIZING"` \| `"AUTHORIZED"` \| `"PAYING"` \| `"PAID"` \| `"STARTING_RESOURCE"` \| `"ACTIVE"` \| `"SETTLING"` \| `"COMPLETED"` \| `"FAILED"` \| `"CANCELLED"` Purchase lifecycle phases. --- ## Page: ReplayEntry URL: https://docs.totem.ing/api/totemsdk-edge/type-aliases/ReplayEntry [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / ReplayEntry # Type Alias: ReplayEntry > **ReplayEntry** = \{ `claimedAt`: `number`; `leaseUntil?`: `number`; `state`: `"PROCESSING"`; \} \| \{ `completedAt`: `number`; `outcome`: [`ReplayOutcome`](../interfaces/ReplayOutcome.md); `state`: `"COMPLETED"`; \} A durable replay entry. Processing claims are recoverable: if a claim is never completed (process crash), the lease expires and the message may be reclaimed safely. The engine's CAS/idempotency protection makes reclamation safe. ## Union Members ### Type Literal \{ `claimedAt`: `number`; `leaseUntil?`: `number`; `state`: `"PROCESSING"`; \} #### claimedAt > **claimedAt**: `number` #### leaseUntil? > `optional` **leaseUntil?**: `number` When the processing lease expires. After this, the claim may be reclaimed. #### state > **state**: `"PROCESSING"` *** ### Type Literal \{ `completedAt`: `number`; `outcome`: [`ReplayOutcome`](../interfaces/ReplayOutcome.md); `state`: `"COMPLETED"`; \} --- ## Page: UsageAgreementResolver URL: https://docs.totem.ing/api/totemsdk-edge/type-aliases/UsageAgreementResolver [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / UsageAgreementResolver # Type Alias: UsageAgreementResolver > **UsageAgreementResolver** = (`input`) => `Promise`\<[`UsageAgreementReference`](../interfaces/UsageAgreementReference.md) \| `undefined`\> \| [`UsageAgreementReference`](../interfaces/UsageAgreementReference.md) \| `undefined` Resolve the agreement a completed dispatch bills against. Return undefined when the dispatch is not purchase-bound or the agreement cannot be found (the fold skips it — nothing is billed by guessing). ## Parameters ### input [`UsageFoldContext`](../interfaces/UsageFoldContext.md) ## Returns `Promise`\<[`UsageAgreementReference`](../interfaces/UsageAgreementReference.md) \| `undefined`\> \| [`UsageAgreementReference`](../interfaces/UsageAgreementReference.md) \| `undefined` --- ## Page: WorkMode URL: https://docs.totem.ing/api/totemsdk-edge/type-aliases/WorkMode [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / WorkMode # Type Alias: WorkMode > **WorkMode** = `"disabled"` \| `"admission-only"` \| `"minima-backed"` Work modes. --- ## Page: DEFAULT_MAX_CONCURRENT_NEGOTIATIONS URL: https://docs.totem.ing/api/totemsdk-edge/variables/DEFAULT_MAX_CONCURRENT_NEGOTIATIONS [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / DEFAULT\_MAX\_CONCURRENT\_NEGOTIATIONS # Variable: DEFAULT\_MAX\_CONCURRENT\_NEGOTIATIONS > `const` **DEFAULT\_MAX\_CONCURRENT\_NEGOTIATIONS**: `4` = `4` Default per-principal concurrency limit. --- ## Page: DEFAULT_MAX_NEGOTIATIONS_PER_WINDOW URL: https://docs.totem.ing/api/totemsdk-edge/variables/DEFAULT_MAX_NEGOTIATIONS_PER_WINDOW [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / DEFAULT\_MAX\_NEGOTIATIONS\_PER\_WINDOW # Variable: DEFAULT\_MAX\_NEGOTIATIONS\_PER\_WINDOW > `const` **DEFAULT\_MAX\_NEGOTIATIONS\_PER\_WINDOW**: `20` = `20` Default max negotiations per rolling window. --- ## Page: DEFAULT_MAX_ROUNDS URL: https://docs.totem.ing/api/totemsdk-edge/variables/DEFAULT_MAX_ROUNDS [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / DEFAULT\_MAX\_ROUNDS # Variable: DEFAULT\_MAX\_ROUNDS > `const` **DEFAULT\_MAX\_ROUNDS**: `5` = `5` Default maximum negotiation rounds (rounds 0..maxRounds-1 are allowed). --- ## Page: DEFAULT_NEGOTIATION_COOLDOWN_MS URL: https://docs.totem.ing/api/totemsdk-edge/variables/DEFAULT_NEGOTIATION_COOLDOWN_MS [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / DEFAULT\_NEGOTIATION\_COOLDOWN\_MS # Variable: DEFAULT\_NEGOTIATION\_COOLDOWN\_MS > `const` **DEFAULT\_NEGOTIATION\_COOLDOWN\_MS**: `30000` = `30_000` Default cooldown after a terminal negotiation (ms). --- ## Page: DEFAULT_NEGOTIATION_TTL_MS URL: https://docs.totem.ing/api/totemsdk-edge/variables/DEFAULT_NEGOTIATION_TTL_MS [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / DEFAULT\_NEGOTIATION\_TTL\_MS # Variable: DEFAULT\_NEGOTIATION\_TTL\_MS > `const` **DEFAULT\_NEGOTIATION\_TTL\_MS**: `number` Default negotiation TTL (ms). --- ## Page: DEFAULT_NEGOTIATION_WINDOW_MS URL: https://docs.totem.ing/api/totemsdk-edge/variables/DEFAULT_NEGOTIATION_WINDOW_MS [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / DEFAULT\_NEGOTIATION\_WINDOW\_MS # Variable: DEFAULT\_NEGOTIATION\_WINDOW\_MS > `const` **DEFAULT\_NEGOTIATION\_WINDOW\_MS**: `number` Default rolling window (ms). --- ## Page: EDGE_INTELLIGENCE_CAPABILITIES URL: https://docs.totem.ing/api/totemsdk-edge/variables/EDGE_INTELLIGENCE_CAPABILITIES [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / EDGE\_INTELLIGENCE\_CAPABILITIES # Variable: EDGE\_INTELLIGENCE\_CAPABILITIES > `const` **EDGE\_INTELLIGENCE\_CAPABILITIES**: readonly `string`[] All intelligence domain capability strings (intelligence:). Used for discovery, gating, and documentation. --- ## Page: EDGE_VERSION URL: https://docs.totem.ing/api/totemsdk-edge/variables/EDGE_VERSION [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / EDGE\_VERSION # Variable: EDGE\_VERSION > `const` **EDGE\_VERSION**: `1` --- ## Page: MAX_NEGOTIATION_MESSAGE_BYTES URL: https://docs.totem.ing/api/totemsdk-edge/variables/MAX_NEGOTIATION_MESSAGE_BYTES [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / MAX\_NEGOTIATION\_MESSAGE\_BYTES # Variable: MAX\_NEGOTIATION\_MESSAGE\_BYTES > `const` **MAX\_NEGOTIATION\_MESSAGE\_BYTES**: `number` Maximum wire message size (bytes). --- ## Page: PURCHASE_ERROR_CODES URL: https://docs.totem.ing/api/totemsdk-edge/variables/PURCHASE_ERROR_CODES [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / PURCHASE\_ERROR\_CODES # Variable: PURCHASE\_ERROR\_CODES > `const` **PURCHASE\_ERROR\_CODES**: `object` Error codes for the purchasing module. ## Type Declaration ### CHALLENGE\_ALREADY\_CONSUMED > `readonly` **CHALLENGE\_ALREADY\_CONSUMED**: `"CHALLENGE_ALREADY_CONSUMED"` = `'CHALLENGE_ALREADY_CONSUMED'` ### INVALID\_SIGNATURE > `readonly` **INVALID\_SIGNATURE**: `"INVALID_SIGNATURE"` = `'INVALID_SIGNATURE'` ### NEGOTIATION\_EXPIRED > `readonly` **NEGOTIATION\_EXPIRED**: `"NEGOTIATION_EXPIRED"` = `'NEGOTIATION_EXPIRED'` ### PAYMENT\_STATE\_UNKNOWN > `readonly` **PAYMENT\_STATE\_UNKNOWN**: `"PAYMENT_STATE_UNKNOWN"` = `'PAYMENT_STATE_UNKNOWN'` ### PURCHASE\_DEADLINE\_EXPIRED > `readonly` **PURCHASE\_DEADLINE\_EXPIRED**: `"PURCHASE_DEADLINE_EXPIRED"` = `'PURCHASE_DEADLINE_EXPIRED'` ### REPLAYED\_MESSAGE > `readonly` **REPLAYED\_MESSAGE**: `"REPLAYED_MESSAGE"` = `'REPLAYED_MESSAGE'` ### RESOURCE\_RECOVERY\_REQUIRED > `readonly` **RESOURCE\_RECOVERY\_REQUIRED**: `"RESOURCE_RECOVERY_REQUIRED"` = `'RESOURCE_RECOVERY_REQUIRED'` ### STALE\_PROPOSAL > `readonly` **STALE\_PROPOSAL**: `"STALE_PROPOSAL"` = `'STALE_PROPOSAL'` ### STALE\_REVISION > `readonly` **STALE\_REVISION**: `"STALE_REVISION"` = `'STALE_REVISION'` ### TERMINAL\_NEGOTIATION > `readonly` **TERMINAL\_NEGOTIATION**: `"TERMINAL_NEGOTIATION"` = `'TERMINAL_NEGOTIATION'` ### TRANSPORT\_UNAVAILABLE > `readonly` **TRANSPORT\_UNAVAILABLE**: `"TRANSPORT_UNAVAILABLE"` = `'TRANSPORT_UNAVAILABLE'` ### WORK\_BUDGET\_EXHAUSTED > `readonly` **WORK\_BUDGET\_EXHAUSTED**: `"WORK_BUDGET_EXHAUSTED"` = `'WORK_BUDGET_EXHAUSTED'` ### WORK\_DISABLED > `readonly` **WORK\_DISABLED**: `"WORK_DISABLED"` = `'WORK_DISABLED'` ### WRONG\_HEAD > `readonly` **WRONG\_HEAD**: `"WRONG_HEAD"` = `'WRONG_HEAD'` ### WRONG\_RECIPIENT > `readonly` **WRONG\_RECIPIENT**: `"WRONG_RECIPIENT"` = `'WRONG_RECIPIENT'` --- ## Page: PURCHASING_VERSION URL: https://docs.totem.ing/api/totemsdk-edge/variables/PURCHASING_VERSION [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / PURCHASING\_VERSION # Variable: PURCHASING\_VERSION > `const` **PURCHASING\_VERSION**: `1` = `1` Current purchasing protocol version. --- ## Page: TERMINAL_NEGOTIATION_STATES URL: https://docs.totem.ing/api/totemsdk-edge/variables/TERMINAL_NEGOTIATION_STATES [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / TERMINAL\_NEGOTIATION\_STATES # Variable: TERMINAL\_NEGOTIATION\_STATES > `const` **TERMINAL\_NEGOTIATION\_STATES**: `ReadonlySet`\<[`NegotiationState`](../type-aliases/NegotiationState.md)\> All terminal states. --- ## Page: TERMINAL_PURCHASE_STATUSES URL: https://docs.totem.ing/api/totemsdk-edge/variables/TERMINAL_PURCHASE_STATUSES [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / TERMINAL\_PURCHASE\_STATUSES # Variable: TERMINAL\_PURCHASE\_STATUSES > `const` **TERMINAL\_PURCHASE\_STATUSES**: `ReadonlySet`\<[`PurchaseStatus`](../type-aliases/PurchaseStatus.md)\> Terminal purchase statuses. --- ## Page: UNGRANTABLE_ACTIONS URL: https://docs.totem.ing/api/totemsdk-edge/variables/UNGRANTABLE_ACTIONS [**@totemsdk/edge**](../index.md) *** [@totemsdk/edge](../index.md) / UNGRANTABLE\_ACTIONS # Variable: UNGRANTABLE\_ACTIONS > `const` **UNGRANTABLE\_ACTIONS**: readonly `string`[] Activities the agent must never invoke directly. Key-lease operations remain internal consequences of an authorized signing action, not agent-callable actions. Identity-root rotation is routed through a dedicated governance flow. --- ## Page: SQLiteCommerceStore URL: https://docs.totem.ing/api/totemsdk-edge-adapters/classes/SQLiteCommerceStore [**@totemsdk/edge-adapters**](../index.md) *** [@totemsdk/edge-adapters](../index.md) / SQLiteCommerceStore # Class: SQLiteCommerceStore Aggregated durable commerce store. ## Implements - [`CommerceStore`](../interfaces/CommerceStore.md) ## Constructors ### Constructor > **new SQLiteCommerceStore**(`config`): `SQLiteCommerceStore` #### Parameters ##### config [`SQLiteCommerceStoreConfig`](../interfaces/SQLiteCommerceStoreConfig.md) #### Returns `SQLiteCommerceStore` ## Properties ### negotiations > `readonly` **negotiations**: `NegotiationStore` #### Implementation of [`CommerceStore`](../interfaces/CommerceStore.md).[`negotiations`](../interfaces/CommerceStore.md#negotiations) *** ### outbox > `readonly` **outbox**: `OutboxStore` #### Implementation of [`CommerceStore`](../interfaces/CommerceStore.md).[`outbox`](../interfaces/CommerceStore.md#outbox) *** ### principals > `readonly` **principals**: `PrincipalNegotiationStore` #### Implementation of [`CommerceStore`](../interfaces/CommerceStore.md).[`principals`](../interfaces/CommerceStore.md#principals) *** ### purchases > `readonly` **purchases**: `PurchaseStore` #### Implementation of [`CommerceStore`](../interfaces/CommerceStore.md).[`purchases`](../interfaces/CommerceStore.md#purchases) *** ### replay > `readonly` **replay**: `ReplayLedger` #### Implementation of [`CommerceStore`](../interfaces/CommerceStore.md).[`replay`](../interfaces/CommerceStore.md#replay) ## Methods ### close() > **close**(): `void` #### Returns `void` --- ## Page: createIdentityPortAdapter URL: https://docs.totem.ing/api/totemsdk-edge-adapters/functions/createIdentityPortAdapter [**@totemsdk/edge-adapters**](../index.md) *** [@totemsdk/edge-adapters](../index.md) / createIdentityPortAdapter # Function: createIdentityPortAdapter() > **createIdentityPortAdapter**(`config`): `EdgeIdentityPort` Wraps an IdentityGraph (from @totemsdk/identity) as an EdgeIdentityPort. resolve: returns the resolved identity when identityId matches graph.document.id, otherwise returns ok:false. For multi-identity setups, compose multiple adapters or use a router above this layer. verify: delegates to verifyIdentityClaim() for SignedIdentityClaim values. Returns ok:false for unrecognised proof shapes. ## Parameters ### config [`IdentityPortConfig`](../interfaces/IdentityPortConfig.md) ## Returns `EdgeIdentityPort` --- ## Page: createLiquidityPortAdapter URL: https://docs.totem.ing/api/totemsdk-edge-adapters/functions/createLiquidityPortAdapter [**@totemsdk/edge-adapters**](../index.md) *** [@totemsdk/edge-adapters](../index.md) / createLiquidityPortAdapter # Function: createLiquidityPortAdapter() > **createLiquidityPortAdapter**(`config`): `EdgeLiquidityPort` Wraps a ChainStateProvider (chain-provider, minima-rpc, lookup-client) as an EdgeLiquidityPort. getBalance sums sendable coins for the given address and tokenId. getUtxos returns all coins as raw UTXOs (typed as unknown[] per the port contract). ## Parameters ### config [`LiquidityPortConfig`](../interfaces/LiquidityPortConfig.md) ## Returns `EdgeLiquidityPort` --- ## Page: createLocationPortAdapter URL: https://docs.totem.ing/api/totemsdk-edge-adapters/functions/createLocationPortAdapter [**@totemsdk/edge-adapters**](../index.md) *** [@totemsdk/edge-adapters](../index.md) / createLocationPortAdapter # Function: createLocationPortAdapter() > **createLocationPortAdapter**(`config?`): `EdgeLocationPort` Wraps @totemsdk/location-proof as an EdgeLocationPort. createClaim/createTrail build content-derived Totem-location claims/trails. createProof returns a SignedProof when config.seed is set; otherwise it returns an UnsignedProof that MUST NOT be presented as a completed proof. ## Parameters ### config? [`LocationPortConfig`](../interfaces/LocationPortConfig.md) = `{}` ## Returns `EdgeLocationPort` --- ## Page: createLookupPortAdapter URL: https://docs.totem.ing/api/totemsdk-edge-adapters/functions/createLookupPortAdapter [**@totemsdk/edge-adapters**](../index.md) *** [@totemsdk/edge-adapters](../index.md) / createLookupPortAdapter # Function: createLookupPortAdapter() > **createLookupPortAdapter**(`client`): `EdgeLookupPort` Wraps a LookupClient as an EdgeLookupPort. lookup: queries coins by address, or a single coin by ID when kind === 'coin'. watch: registers for real-time coin-update push events. announce: encodes the caller's WOTS-signed manifest to bytes, then hands off to announceApp() or announceAgent() on the client. The client signs those bytes with its session Ed25519 keypair — no WOTS key index is consumed. Fire-and-forget: the lookup node sends no ACK. ## Parameters ### client `LookupClient` ## Returns `EdgeLookupPort` --- ## Page: createManifestPortAdapter URL: https://docs.totem.ing/api/totemsdk-edge-adapters/functions/createManifestPortAdapter [**@totemsdk/edge-adapters**](../index.md) *** [@totemsdk/edge-adapters](../index.md) / createManifestPortAdapter # Function: createManifestPortAdapter() > **createManifestPortAdapter**(): `EdgeManifestPort` Wraps @totemsdk/manifest's signManifest / verifyManifest as an EdgeManifestPort. The port interface already carries seed and keyIndex at call time, so this adapter has no constructor config — it is purely a thin type bridge. Callers are responsible for key-lease reservation before calling sign(). This adapter does not interact with @totemsdk/wots-lease. ## Returns `EdgeManifestPort` --- ## Page: createMinimaL1PaymentPort URL: https://docs.totem.ing/api/totemsdk-edge-adapters/functions/createMinimaL1PaymentPort [**@totemsdk/edge-adapters**](../index.md) *** [@totemsdk/edge-adapters](../index.md) / createMinimaL1PaymentPort # Function: createMinimaL1PaymentPort() > **createMinimaL1PaymentPort**(`config`): `EdgePaymentPort` Minima L1 payment adapter. Delegates transaction construction and signing to the injected `sign` function, then broadcasts the result via the ChainStateProvider. This keeps key material out of the adapter entirely. For a batteries-included L1 adapter backed by @totemsdk/server's sendTransaction, wrap sendTransaction in the sign callback: createMinimaL1PaymentPort({ provider: new PureMinimaRpcProvider(rpcConfig), sign: ({ toAddress, amount, tokenId }) => sendTransaction({ seed, addressIndex, toAddress, amount, tokenId, ... }) .then(r => r.minedHex), }) ## Parameters ### config [`MinimaL1PaymentPortConfig`](../interfaces/MinimaL1PaymentPortConfig.md) ## Returns `EdgePaymentPort` --- ## Page: createOmniaHostPort URL: https://docs.totem.ing/api/totemsdk-edge-adapters/functions/createOmniaHostPort [**@totemsdk/edge-adapters**](../index.md) *** [@totemsdk/edge-adapters](../index.md) / createOmniaHostPort # Function: createOmniaHostPort() > **createOmniaHostPort**(`config`): `EdgeOmniaPort` ## Parameters ### config [`OmniaHostPortConfig`](../interfaces/OmniaHostPortConfig.md) ## Returns `EdgeOmniaPort` --- ## Page: createOmniaL2PaymentPort URL: https://docs.totem.ing/api/totemsdk-edge-adapters/functions/createOmniaL2PaymentPort [**@totemsdk/edge-adapters**](../index.md) *** [@totemsdk/edge-adapters](../index.md) / createOmniaL2PaymentPort # Function: createOmniaL2PaymentPort() > **createOmniaL2PaymentPort**(`config`): `EdgePaymentPort` Omnia L2 payment adapter. Routes payments over Omnia payment channels using multi-hop HTLC execution. The local node must already have open channels forming a path to the recipient. pay() finds a route, builds a PaymentRequest, and executes atomically: 1. Forward phase — locks HTLCs across each hop. 2. Reveal phase — reveals the preimage in reverse to settle all hops. Rollback (best-effort timeoutHTLC) fires on any failure. ## Parameters ### config [`OmniaL2PaymentPortConfig`](../interfaces/OmniaL2PaymentPortConfig.md) ## Returns `EdgePaymentPort` --- ## Page: createPolicyPortAdapter URL: https://docs.totem.ing/api/totemsdk-edge-adapters/functions/createPolicyPortAdapter [**@totemsdk/edge-adapters**](../index.md) *** [@totemsdk/edge-adapters](../index.md) / createPolicyPortAdapter # Function: createPolicyPortAdapter() > **createPolicyPortAdapter**(`policy`): `EdgePolicyPort` Wraps an AgentPolicy or PolicyMiddleware as an EdgePolicyPort. When the EdgePolicyPort receives a full `proposal` object, it delegates directly to the policy without lossy reconstruction. When only flat `action`/`subject` params are provided, it builds a minimal AgentProposal (legacy path). ## Parameters ### policy `PolicyLike` ## Returns `EdgePolicyPort` --- ## Page: createProofPortAdapter URL: https://docs.totem.ing/api/totemsdk-edge-adapters/functions/createProofPortAdapter [**@totemsdk/edge-adapters**](../index.md) *** [@totemsdk/edge-adapters](../index.md) / createProofPortAdapter # Function: createProofPortAdapter() > **createProofPortAdapter**(`config`): `EdgeProofPort` Wraps a ProofProvider (e.g. proof-integritas) as an EdgeProofPort. When config.seed is provided the returned proof is a SignedProof; without seed only an UnsignedProof is returned and MUST NOT be presented as a completed proof. ## Parameters ### config [`ProofPortConfig`](../interfaces/ProofPortConfig.md) ## Returns `EdgeProofPort` --- ## Page: createPubSubNegotiationTransport URL: https://docs.totem.ing/api/totemsdk-edge-adapters/functions/createPubSubNegotiationTransport [**@totemsdk/edge-adapters**](../index.md) *** [@totemsdk/edge-adapters](../index.md) / createPubSubNegotiationTransport # Function: createPubSubNegotiationTransport() > **createPubSubNegotiationTransport**(`config`): `NegotiationTransport` Create a NegotiationTransport over a pub/sub transport. Each negotiation uses a topic derived from its negotiationId. The sender address is carried in the envelope (a `sender` field on the message), so the ingress pipeline can authenticate it. ## Parameters ### config [`PubSubNegotiationTransportConfig`](../interfaces/PubSubNegotiationTransportConfig.md) ## Returns `NegotiationTransport` --- ## Page: createPubSubPortAdapter URL: https://docs.totem.ing/api/totemsdk-edge-adapters/functions/createPubSubPortAdapter [**@totemsdk/edge-adapters**](../index.md) *** [@totemsdk/edge-adapters](../index.md) / createPubSubPortAdapter # Function: createPubSubPortAdapter() > **createPubSubPortAdapter**(`transport`): `EdgePubSubPort` ## Parameters ### transport `IPubSubTransport` ## Returns `EdgePubSubPort` --- ## Page: createPurchaseAuthorityAdapter URL: https://docs.totem.ing/api/totemsdk-edge-adapters/functions/createPurchaseAuthorityAdapter [**@totemsdk/edge-adapters**](../index.md) *** [@totemsdk/edge-adapters](../index.md) / createPurchaseAuthorityAdapter # Function: createPurchaseAuthorityAdapter() > **createPurchaseAuthorityAdapter**(`config`): `object` Create an AuthorityPort adapter over an agent-policy. approve() builds an AgentProposal from the agreement + intent and evaluates it through the policy. Returns `{ allowed, reason }`. ## Parameters ### config [`PurchaseAuthorityAdapterConfig`](../interfaces/PurchaseAuthorityAdapterConfig.md) ## Returns `object` ### approve() > **approve**(`params`): `Promise`\<`EdgeOperationResult`\<\{ `allowed`: `boolean`; `reason?`: `string`; \}\>\> #### Parameters ##### params ###### agreement `TradeAgreement` ###### intent `PurchaseIntent` #### Returns `Promise`\<`EdgeOperationResult`\<\{ `allowed`: `boolean`; `reason?`: `string`; \}\>\> --- ## Page: createPurchaseLookupAdapter URL: https://docs.totem.ing/api/totemsdk-edge-adapters/functions/createPurchaseLookupAdapter [**@totemsdk/edge-adapters**](../index.md) *** [@totemsdk/edge-adapters](../index.md) / createPurchaseLookupAdapter # Function: createPurchaseLookupAdapter() > **createPurchaseLookupAdapter**(`config`): `object` Create a PurchaseLookupPort adapter over a LookupClient. `resource` is treated as a capability name for agent manifests (the machine-commerce case). If the resource matches a known app category, it falls back to app queries. Returns `{ id, manifest: Uint8Array, nodeId }` candidates for the buyer's manifest-verification pipeline. ## Parameters ### config [`PurchaseLookupAdapterConfig`](../interfaces/PurchaseLookupAdapterConfig.md) ## Returns `object` ### query() > **query**(`params`): `Promise`\<`EdgeOperationResult`\<\{ `results`: `object`[]; \}\>\> #### Parameters ##### params ###### provider? `string` ###### resource `string` #### Returns `Promise`\<`EdgeOperationResult`\<\{ `results`: `object`[]; \}\>\> --- ## Page: createPurchasePaymentAdapter URL: https://docs.totem.ing/api/totemsdk-edge-adapters/functions/createPurchasePaymentAdapter [**@totemsdk/edge-adapters**](../index.md) *** [@totemsdk/edge-adapters](../index.md) / createPurchasePaymentAdapter # Function: createPurchasePaymentAdapter() > **createPurchasePaymentAdapter**(`config`): `object` Create a PurchasePaymentPort with an atomic idempotency-key claim. ## Parameters ### config [`PurchasePaymentAdapterConfig`](../interfaces/PurchasePaymentAdapterConfig.md) ## Returns `object` ### pay() > **pay**(`params`): `Promise`\<`EdgeOperationResult`\<`PaymentResult`\>\> #### Parameters ##### params ###### amount `string` ###### idempotencyKey? `string` ###### memo? `string` ###### recipient `string` ###### tokenId? `string` #### Returns `Promise`\<`EdgeOperationResult`\<`PaymentResult`\>\> --- ## Page: createSQLiteCommerceStore URL: https://docs.totem.ing/api/totemsdk-edge-adapters/functions/createSQLiteCommerceStore [**@totemsdk/edge-adapters**](../index.md) *** [@totemsdk/edge-adapters](../index.md) / createSQLiteCommerceStore # Function: createSQLiteCommerceStore() > **createSQLiteCommerceStore**(`config`): [`SQLiteCommerceStore`](../classes/SQLiteCommerceStore.md) Create a SQLite-backed CommerceStore. ## Parameters ### config [`SQLiteCommerceStoreConfig`](../interfaces/SQLiteCommerceStoreConfig.md) filename (or ':memory:') + WAL/busy options. ## Returns [`SQLiteCommerceStore`](../classes/SQLiteCommerceStore.md) --- ## Page: createStreamNegotiationTransport URL: https://docs.totem.ing/api/totemsdk-edge-adapters/functions/createStreamNegotiationTransport [**@totemsdk/edge-adapters**](../index.md) *** [@totemsdk/edge-adapters](../index.md) / createStreamNegotiationTransport # Function: createStreamNegotiationTransport() > **createStreamNegotiationTransport**(`config`): `NegotiationTransport` Create a NegotiationTransport over a raw byte stream. Messages are framed as `[4-byte BE length][JSON bytes]`. The stream is assumed to be a single authenticated peer connection, so the sender address is fixed by the caller. ## Parameters ### config [`StreamNegotiationTransportConfig`](../interfaces/StreamNegotiationTransportConfig.md) ## Returns `NegotiationTransport` --- ## Page: createStreamPortAdapter URL: https://docs.totem.ing/api/totemsdk-edge-adapters/functions/createStreamPortAdapter [**@totemsdk/edge-adapters**](../index.md) *** [@totemsdk/edge-adapters](../index.md) / createStreamPortAdapter # Function: createStreamPortAdapter() > **createStreamPortAdapter**(`transport`): `EdgeStreamPort` ## Parameters ### transport `IStreamTransport` ## Returns `EdgeStreamPort` --- ## Page: CommerceStore URL: https://docs.totem.ing/api/totemsdk-edge-adapters/interfaces/CommerceStore [**@totemsdk/edge-adapters**](../index.md) *** [@totemsdk/edge-adapters](../index.md) / CommerceStore # Interface: CommerceStore Aggregated durable commerce store. ## Properties ### negotiations > **negotiations**: `NegotiationStore` *** ### outbox > **outbox**: `OutboxStore` *** ### principals > **principals**: `PrincipalNegotiationStore` *** ### purchases > **purchases**: `PurchaseStore` *** ### replay > **replay**: `ReplayLedger` --- ## Page: IdentityPortConfig URL: https://docs.totem.ing/api/totemsdk-edge-adapters/interfaces/IdentityPortConfig [**@totemsdk/edge-adapters**](../index.md) *** [@totemsdk/edge-adapters](../index.md) / IdentityPortConfig # Interface: IdentityPortConfig ## Properties ### graph > **graph**: `IdentityGraph` The identity graph this adapter can resolve. Callers holding multiple identities should create one adapter per graph. --- ## Page: LiquidityPortConfig URL: https://docs.totem.ing/api/totemsdk-edge-adapters/interfaces/LiquidityPortConfig [**@totemsdk/edge-adapters**](../index.md) *** [@totemsdk/edge-adapters](../index.md) / LiquidityPortConfig # Interface: LiquidityPortConfig ## Properties ### defaultTokenId? > `optional` **defaultTokenId?**: `string` Token to sum when getBalance is called without an explicit tokenId. Defaults to '0x00' (native Minima). *** ### provider > **provider**: `ChainStateProvider` --- ## Page: LocationPortConfig URL: https://docs.totem.ing/api/totemsdk-edge-adapters/interfaces/LocationPortConfig [**@totemsdk/edge-adapters**](../index.md) *** [@totemsdk/edge-adapters](../index.md) / LocationPortConfig # Interface: LocationPortConfig ## Properties ### issuer? > `optional` **issuer?**: `string` Default issuer stamped onto created location proofs. When unset, the claim's subjectId is used. *** ### keyIndex? > `optional` **keyIndex?**: `number` TreeKey index for direct signing (used when no leaseProvider is given). Ignored when leaseProvider is set. *** ### leaseProvider? > `optional` **leaseProvider?**: `object` WOTS lease provider for coordinated key-index reservation. When set, keyIndex is ignored and the index is reserved via the provider. #### burnReservation() > **burnReservation**(`reservationId`, `reason`): `Promise`\<`void`\> ##### Parameters ###### reservationId `string` ###### reason `string` ##### Returns `Promise`\<`void`\> #### commitKeyUse() > **commitKeyUse**(`reservationId`, `txId`): `Promise`\<`void`\> ##### Parameters ###### reservationId `string` ###### txId `string` ##### Returns `Promise`\<`void`\> #### reserveKeyUse() > **reserveKeyUse**(`params`): `Promise`\<\{ `indices`: \{ `addressIndex`: `number`; `l1`: `number`; `l2`: `number`; \}; `reservationId`: `string`; \}\> ##### Parameters ###### params ###### payloadHash? `string` ###### treeId `string` ###### ttlMs? `number` ##### Returns `Promise`\<\{ `indices`: \{ `addressIndex`: `number`; `l1`: `number`; `l2`: `number`; \}; `reservationId`: `string`; \}\> *** ### leaseTreeId? > `optional` **leaseTreeId?**: `string` *** ### seed? > `optional` **seed?**: `Uint8Array`\<`ArrayBufferLike`\> 32-byte WOTS seed. Required for signing; without it only unsigned location proofs are returned, which MUST NOT be presented as completed proofs. --- ## Page: MinimaL1PaymentPortConfig URL: https://docs.totem.ing/api/totemsdk-edge-adapters/interfaces/MinimaL1PaymentPortConfig [**@totemsdk/edge-adapters**](../index.md) *** [@totemsdk/edge-adapters](../index.md) / MinimaL1PaymentPortConfig # Interface: MinimaL1PaymentPortConfig ## Properties ### provider > **provider**: `ChainStateProvider` ChainStateProvider used to broadcast the signed TxPoW. ## Methods ### sign() > **sign**(`params`): `Promise`\<`string`\> Injected signing function. Receives the payment intent and returns a fully mined TxPoW hex string ready for broadcast. This keeps the adapter agnostic to key management — callers wire in their own signer (e.g. @totemsdk/server's sendTransaction, a hardware wallet bridge, or a minima-rpc command sequence). #### Parameters ##### params ###### amount `string` ###### memo? `string` ###### toAddress `string` ###### tokenId `string` #### Returns `Promise`\<`string`\> --- ## Page: OmniaHostPortConfig URL: https://docs.totem.ing/api/totemsdk-edge-adapters/interfaces/OmniaHostPortConfig [**@totemsdk/edge-adapters**](../index.md) *** [@totemsdk/edge-adapters](../index.md) / OmniaHostPortConfig # Interface: OmniaHostPortConfig ## Properties ### endpoint > **endpoint**: `string` *** ### fetch? > `optional` **fetch?**: (`input`, `init?`) => `Promise`\<`Response`\> #### Parameters ##### input `string` \| `URL` \| `Request` ##### init? `RequestInit` #### Returns `Promise`\<`Response`\> *** ### headers? > `optional` **headers?**: `Record`\<`string`, `string`\> --- ## Page: OmniaL2PaymentPortConfig URL: https://docs.totem.ing/api/totemsdk-edge-adapters/interfaces/OmniaL2PaymentPortConfig [**@totemsdk/edge-adapters**](../index.md) *** [@totemsdk/edge-adapters](../index.md) / OmniaL2PaymentPortConfig # Interface: OmniaL2PaymentPortConfig ## Properties ### channels > **channels**: `Map`\<`string`, `RouterChannel`\> Live channel state keyed by channelId. executeMultiHopPayment mutates this map in-place as HTLCs are added/settled. Callers are responsible for keeping it in sync with the on-chain state. *** ### graph > **graph**: `ChannelGraph` Routing graph (edges + swap index). Updated externally as channels open/close. *** ### htlcTimeoutBlocks? > `optional` **htlcTimeoutBlocks?**: `bigint` HTLC timeout in blocks past the current tip. Defaults to 144 (≈24h on Minima). *** ### leaseProviders > **leaseProviders**: `Map`\<`string`, `unknown`\> WOTS lease providers keyed by channelId — required for HTLC signing. *** ### localPublicKeyDigest > **localPublicKeyDigest**: `string` Public key digest identifying the local party in each channel. *** ### ops > **ops**: `ChannelOps` HTLC operations (addHTLC, fulfillHTLC, timeoutHTLC) for each channel. *** ### routeOptions? > `optional` **routeOptions?**: `RouteOptions` Optional pathfinding overrides forwarded to findRoute. ## Methods ### getCurrentBlock() > **getCurrentBlock**(): `Promise`\<`bigint`\> Returns the current chain block height. Used to compute HTLC expiry. Typically: `async () => BigInt((await provider.getTip()).block)`. #### Returns `Promise`\<`bigint`\> --- ## Page: ProofPortConfig URL: https://docs.totem.ing/api/totemsdk-edge-adapters/interfaces/ProofPortConfig [**@totemsdk/edge-adapters**](../index.md) *** [@totemsdk/edge-adapters](../index.md) / ProofPortConfig # Interface: ProofPortConfig ## Properties ### defaultKind? > `optional` **defaultKind?**: `ProofKind` Default proof kind when callers don't specify one via context. *** ### issuer > **issuer**: `string` Issuer address or identifier stamped onto created proofs. *** ### keyIndex? > `optional` **keyIndex?**: `number` TreeKey index for direct signing (used when no leaseProvider is given). Ignored when leaseProvider is set. *** ### leaseProvider? > `optional` **leaseProvider?**: `object` WOTS lease provider for coordinated key-index reservation. When set, keyIndex is ignored and the index is reserved via the provider. #### burnReservation() > **burnReservation**(`reservationId`, `reason`): `Promise`\<`void`\> ##### Parameters ###### reservationId `string` ###### reason `string` ##### Returns `Promise`\<`void`\> #### commitKeyUse() > **commitKeyUse**(`reservationId`, `txId`): `Promise`\<`void`\> ##### Parameters ###### reservationId `string` ###### txId `string` ##### Returns `Promise`\<`void`\> #### reserveKeyUse() > **reserveKeyUse**(`params`): `Promise`\<\{ `indices`: \{ `addressIndex`: `number`; `l1`: `number`; `l2`: `number`; \}; `reservationId`: `string`; \}\> ##### Parameters ###### params ###### payloadHash? `string` ###### treeId `string` ###### ttlMs? `number` ##### Returns `Promise`\<\{ `indices`: \{ `addressIndex`: `number`; `l1`: `number`; `l2`: `number`; \}; `reservationId`: `string`; \}\> *** ### leaseTreeId? > `optional` **leaseTreeId?**: `string` *** ### provider > **provider**: `ProofProvider` *** ### seed? > `optional` **seed?**: `Uint8Array`\<`ArrayBufferLike`\> 32-byte WOTS seed. Required for signing; without it only unsigned proofs are returned, which MUST NOT be presented as completed proofs. --- ## Page: PubSubNegotiationTransportConfig URL: https://docs.totem.ing/api/totemsdk-edge-adapters/interfaces/PubSubNegotiationTransportConfig [**@totemsdk/edge-adapters**](../index.md) *** [@totemsdk/edge-adapters](../index.md) / PubSubNegotiationTransportConfig # Interface: PubSubNegotiationTransportConfig ## Properties ### maxBytes? > `optional` **maxBytes?**: `number` Max message size in bytes (default 64 KiB). *** ### pubsub > **pubsub**: `EdgePubSubPort` *** ### recipient > **recipient**: `string` The local recipient address. *** ### topicPrefix? > `optional` **topicPrefix?**: `string` Topic prefix (default 'totem.negotiation'). --- ## Page: PurchaseAuthorityAdapterConfig URL: https://docs.totem.ing/api/totemsdk-edge-adapters/interfaces/PurchaseAuthorityAdapterConfig [**@totemsdk/edge-adapters**](../index.md) *** [@totemsdk/edge-adapters](../index.md) / PurchaseAuthorityAdapterConfig # Interface: PurchaseAuthorityAdapterConfig ## Properties ### agentId? > `optional` **agentId?**: `string` Agent identifier used in the AgentProposal (e.g. 'edge-purchase-agent'). *** ### policy > **policy**: `PolicyLike` The local policy (ComposablePolicy, AgentPolicy, or PolicyMiddleware). *** ### risk? > `optional` **risk?**: `"low"` \| `"medium"` \| `"high"` Optional risk level for the proposal. --- ## Page: PurchaseLookupAdapterConfig URL: https://docs.totem.ing/api/totemsdk-edge-adapters/interfaces/PurchaseLookupAdapterConfig [**@totemsdk/edge-adapters**](../index.md) *** [@totemsdk/edge-adapters](../index.md) / PurchaseLookupAdapterConfig # Interface: PurchaseLookupAdapterConfig ## Properties ### client > **client**: `LookupClient` *** ### limit? > `optional` **limit?**: `number` Optional result limit. *** ### maxLatencyMs? > `optional` **maxLatencyMs?**: `number` Optional max latency filter (agents). *** ### maxPricePerCall? > `optional` **maxPricePerCall?**: `number` Optional max price filter (agents). *** ### provider? > `optional` **provider?**: `string` Optional provider address filter (authorAddress for apps). --- ## Page: PurchasePaymentAdapterConfig URL: https://docs.totem.ing/api/totemsdk-edge-adapters/interfaces/PurchasePaymentAdapterConfig [**@totemsdk/edge-adapters**](../index.md) *** [@totemsdk/edge-adapters](../index.md) / PurchasePaymentAdapterConfig # Interface: PurchasePaymentAdapterConfig ## Properties ### namespace? > `optional` **namespace?**: `string` Key namespace prefix; default `totem_payment:v1:`. *** ### port > **port**: `PaymentPortLike` The underlying payment port (L1/L2/hosted). *** ### requireAckMode? > `optional` **requireAckMode?**: `"volatile"` \| `"buffered"` \| `"durably-acknowledged"` Required write acknowledgment for a supplied store; default `durably-acknowledged`. *** ### store? > `optional` **store?**: [`PurchasePaymentStore`](../type-aliases/PurchasePaymentStore.md) Optional claim store. When omitted, a dev in-memory store is used (no crash guarantees and no cross-instance dedup). A durable CAS-capable store (e.g. a `@totemsdk/storage` FileStore/SqliteStore) makes retries safe across restarts and processes. No silent downgrade: a supplied store is asserted CAS-capable and `durably-acknowledged` unless `requireAckMode` opts into a weaker acknowledgment. --- ## Page: SQLiteCommerceStoreConfig URL: https://docs.totem.ing/api/totemsdk-edge-adapters/interfaces/SQLiteCommerceStoreConfig [**@totemsdk/edge-adapters**](../index.md) *** [@totemsdk/edge-adapters](../index.md) / SQLiteCommerceStoreConfig # Interface: SQLiteCommerceStoreConfig ## Properties ### busyTimeoutMs? > `optional` **busyTimeoutMs?**: `number` Busy timeout ms (default 5000). *** ### filename > **filename**: `string` File path, or ':memory:' for ephemeral. *** ### wal? > `optional` **wal?**: `boolean` WAL mode (default true). --- ## Page: StreamNegotiationTransportConfig URL: https://docs.totem.ing/api/totemsdk-edge-adapters/interfaces/StreamNegotiationTransportConfig [**@totemsdk/edge-adapters**](../index.md) *** [@totemsdk/edge-adapters](../index.md) / StreamNegotiationTransportConfig # Interface: StreamNegotiationTransportConfig ## Properties ### maxBytes? > `optional` **maxBytes?**: `number` Max message size in bytes (default 64 KiB). *** ### recipient > **recipient**: `string` The local recipient address. *** ### sender > **sender**: `string` The authenticated sender address for this stream (resolved by caller). *** ### stream > **stream**: `EdgeStreamPort` --- ## Page: PurchasePaymentClaimRecord URL: https://docs.totem.ing/api/totemsdk-edge-adapters/type-aliases/PurchasePaymentClaimRecord [**@totemsdk/edge-adapters**](../index.md) *** [@totemsdk/edge-adapters](../index.md) / PurchasePaymentClaimRecord # Type Alias: PurchasePaymentClaimRecord > **PurchasePaymentClaimRecord** = \{ `claimedAt`: `number`; `phase`: `"pending"`; \} \| \{ `completedAt`: `number`; `phase`: `"completed"`; `result`: `EdgeOperationResult`\<`PaymentResult`\>; \} Idempotency claim record. `pending` is written atomically before the port call; `completed` records the outcome. A `pending` key is never re-claimed automatically — that is the double-pay guard. --- ## Page: PurchasePaymentStore URL: https://docs.totem.ing/api/totemsdk-edge-adapters/type-aliases/PurchasePaymentStore [**@totemsdk/edge-adapters**](../index.md) *** [@totemsdk/edge-adapters](../index.md) / PurchasePaymentStore # Type Alias: PurchasePaymentStore > **PurchasePaymentStore** = `StorageAdapterWithCapabilities` & `CasStore` The durable idempotency store must support conditional (CAS) writes. --- ## Page: createBacnetGateway URL: https://docs.totem.ing/api/totemsdk-edge-bacnet/functions/createBacnetGateway [**@totemsdk/edge-bacnet**](../index.md) *** [@totemsdk/edge-bacnet](../index.md) / createBacnetGateway # Function: createBacnetGateway() > **createBacnetGateway**(`config`): [`BacnetGateway`](../interfaces/BacnetGateway.md) ## Parameters ### config [`BacnetGatewayConfig`](../interfaces/BacnetGatewayConfig.md) ## Returns [`BacnetGateway`](../interfaces/BacnetGateway.md) --- ## Page: createBacnetSensorBridge URL: https://docs.totem.ing/api/totemsdk-edge-bacnet/functions/createBacnetSensorBridge [**@totemsdk/edge-bacnet**](../index.md) *** [@totemsdk/edge-bacnet](../index.md) / createBacnetSensorBridge # Function: createBacnetSensorBridge() > **createBacnetSensorBridge**(`config`): [`BacnetSensorBridge`](../interfaces/BacnetSensorBridge.md) ## Parameters ### config [`BacnetSensorBridgeConfig`](../interfaces/BacnetSensorBridgeConfig.md) ## Returns [`BacnetSensorBridge`](../interfaces/BacnetSensorBridge.md) --- ## Page: BacnetCovBinding URL: https://docs.totem.ing/api/totemsdk-edge-bacnet/interfaces/BacnetCovBinding [**@totemsdk/edge-bacnet**](../index.md) *** [@totemsdk/edge-bacnet](../index.md) / BacnetCovBinding # Interface: BacnetCovBinding ## Properties ### deviceId > **deviceId**: `number` *** ### lifetime? > `optional` **lifetime?**: `number` *** ### objectInstance > **objectInstance**: `number` *** ### objectType > **objectType**: `string` *** ### sensorId? > `optional` **sensorId?**: `string` --- ## Page: BacnetCovNotification URL: https://docs.totem.ing/api/totemsdk-edge-bacnet/interfaces/BacnetCovNotification [**@totemsdk/edge-bacnet**](../index.md) *** [@totemsdk/edge-bacnet](../index.md) / BacnetCovNotification # Interface: BacnetCovNotification ## Properties ### deviceId > **deviceId**: `number` *** ### newValue > **newValue**: `unknown` *** ### objectInstance > **objectInstance**: `number` *** ### objectType > **objectType**: `string` *** ### propertyId > **propertyId**: `number` *** ### receivedAt > **receivedAt**: `number` --- ## Page: BacnetDevice URL: https://docs.totem.ing/api/totemsdk-edge-bacnet/interfaces/BacnetDevice [**@totemsdk/edge-bacnet**](../index.md) *** [@totemsdk/edge-bacnet](../index.md) / BacnetDevice # Interface: BacnetDevice ## Properties ### address > **address**: `string` *** ### deviceId > **deviceId**: `number` *** ### deviceName > **deviceName**: `string` *** ### segmentsSupported? > `optional` **segmentsSupported?**: `string`[] *** ### vendorId > **vendorId**: `number` *** ### vendorName? > `optional` **vendorName?**: `string` --- ## Page: BacnetGateway URL: https://docs.totem.ing/api/totemsdk-edge-bacnet/interfaces/BacnetGateway [**@totemsdk/edge-bacnet**](../index.md) *** [@totemsdk/edge-bacnet](../index.md) / BacnetGateway # Interface: BacnetGateway ## Properties ### status > `readonly` **status**: `"stopped"` \| `"running"` \| `"error"` ## Methods ### discoverDevices() > **discoverDevices**(): `Promise`\<`EdgeOperationResult`\<\{ `devices`: [`BacnetDevice`](BacnetDevice.md)[]; \}\>\> Discover devices on the network. #### Returns `Promise`\<`EdgeOperationResult`\<\{ `devices`: [`BacnetDevice`](BacnetDevice.md)[]; \}\>\> *** ### readProperty() > **readProperty**(`deviceId`, `objectType`, `objectInstance`, `propertyId`): `Promise`\<`EdgeOperationResult`\<\{ `value`: [`BacnetPropertyValue`](BacnetPropertyValue.md); \}\>\> Read a property from a remote device. #### Parameters ##### deviceId `number` ##### objectType `string` ##### objectInstance `number` ##### propertyId `number` #### Returns `Promise`\<`EdgeOperationResult`\<\{ `value`: [`BacnetPropertyValue`](BacnetPropertyValue.md); \}\>\> *** ### start() > **start**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### stop() > **stop**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### writeProperty() > **writeProperty**(`deviceId`, `objectType`, `objectInstance`, `propertyId`, `value`, `priority?`): `Promise`\<`EdgeOperationResult`\<`unknown`\>\> Write a property to a remote device. #### Parameters ##### deviceId `number` ##### objectType `string` ##### objectInstance `number` ##### propertyId `number` ##### value `unknown` ##### priority? `number` #### Returns `Promise`\<`EdgeOperationResult`\<`unknown`\>\> --- ## Page: BacnetGatewayConfig URL: https://docs.totem.ing/api/totemsdk-edge-bacnet/interfaces/BacnetGatewayConfig [**@totemsdk/edge-bacnet**](../index.md) *** [@totemsdk/edge-bacnet](../index.md) / BacnetGatewayConfig # Interface: BacnetGatewayConfig ## Properties ### covSubscriptions? > `optional` **covSubscriptions?**: [`BacnetCovBinding`](BacnetCovBinding.md)[] Objects to subscribe to COV on start. *** ### deviceId > **deviceId**: `number` *** ### deviceName > **deviceName**: `string` *** ### runtime > **runtime**: `EdgeRuntime` *** ### transport > **transport**: [`BacnetTransportPort`](BacnetTransportPort.md) --- ## Page: BacnetPropertyValue URL: https://docs.totem.ing/api/totemsdk-edge-bacnet/interfaces/BacnetPropertyValue [**@totemsdk/edge-bacnet**](../index.md) *** [@totemsdk/edge-bacnet](../index.md) / BacnetPropertyValue # Interface: BacnetPropertyValue ## Properties ### dataType > **dataType**: `string` *** ### objectInstance > **objectInstance**: `number` *** ### objectType > **objectType**: `string` *** ### propertyId > **propertyId**: `number` *** ### propertyName > **propertyName**: `string` *** ### value > **value**: `unknown` --- ## Page: BacnetSensorBinding URL: https://docs.totem.ing/api/totemsdk-edge-bacnet/interfaces/BacnetSensorBinding [**@totemsdk/edge-bacnet**](../index.md) *** [@totemsdk/edge-bacnet](../index.md) / BacnetSensorBinding # Interface: BacnetSensorBinding ## Properties ### dataType? > `optional` **dataType?**: `string` *** ### deviceId > **deviceId**: `number` *** ### intervalMs > **intervalMs**: `number` *** ### objectInstance > **objectInstance**: `number` *** ### objectType > **objectType**: `string` *** ### propertyId > **propertyId**: `number` *** ### sensorId > **sensorId**: `string` *** ### unit? > `optional` **unit?**: `string` --- ## Page: BacnetSensorBridge URL: https://docs.totem.ing/api/totemsdk-edge-bacnet/interfaces/BacnetSensorBridge [**@totemsdk/edge-bacnet**](../index.md) *** [@totemsdk/edge-bacnet](../index.md) / BacnetSensorBridge # Interface: BacnetSensorBridge ## Methods ### poll() > **poll**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### start() > **start**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### stop() > **stop**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> --- ## Page: BacnetSensorBridgeConfig URL: https://docs.totem.ing/api/totemsdk-edge-bacnet/interfaces/BacnetSensorBridgeConfig [**@totemsdk/edge-bacnet**](../index.md) *** [@totemsdk/edge-bacnet](../index.md) / BacnetSensorBridgeConfig # Interface: BacnetSensorBridgeConfig ## Properties ### bindings > **bindings**: [`BacnetSensorBinding`](BacnetSensorBinding.md)[] *** ### gateway? > `optional` **gateway?**: [`BacnetGateway`](BacnetGateway.md) *** ### runtime > **runtime**: `EdgeRuntime` *** ### transport > **transport**: [`BacnetTransportPort`](BacnetTransportPort.md) --- ## Page: BacnetSubscription URL: https://docs.totem.ing/api/totemsdk-edge-bacnet/interfaces/BacnetSubscription [**@totemsdk/edge-bacnet**](../index.md) *** [@totemsdk/edge-bacnet](../index.md) / BacnetSubscription # Interface: BacnetSubscription ## Methods ### cancel() > **cancel**(): `Promise`\<`void`\> Cancel the subscription. #### Returns `Promise`\<`void`\> *** ### onChange() > **onChange**(`handler`): () => `void` Register handler for COV notifications. #### Parameters ##### handler (`event`) => `void` #### Returns () => `void` --- ## Page: BacnetTransportPort URL: https://docs.totem.ing/api/totemsdk-edge-bacnet/interfaces/BacnetTransportPort [**@totemsdk/edge-bacnet**](../index.md) *** [@totemsdk/edge-bacnet](../index.md) / BacnetTransportPort # Interface: BacnetTransportPort BACnet transport port — injected by the caller. BACnet (ASHRAE 135) is a building automation protocol. Supports BACnet/IP (UDP 47808) and BACnet/MSTP (RS-485). The caller provides the BACnet stack. ## Methods ### close() > **close**(): `Promise`\<`void`\> Shutdown the BACnet stack. #### Returns `Promise`\<`void`\> *** ### discoverDevices() > **discoverDevices**(): `Promise`\<[`BacnetDevice`](BacnetDevice.md)[]\> Discover devices on the network (Who-Is). #### Returns `Promise`\<[`BacnetDevice`](BacnetDevice.md)[]\> *** ### init() > **init**(`deviceId`, `deviceName`): `Promise`\<`void`\> Initialise the BACnet stack. #### Parameters ##### deviceId `number` ##### deviceName `string` #### Returns `Promise`\<`void`\> *** ### onDeviceDiscovered() > **onDeviceDiscovered**(`handler`): () => `void` Register handler for I-Am responses. #### Parameters ##### handler (`device`) => `void` #### Returns () => `void` *** ### onError() > **onError**(`handler`): () => `void` Register handler for errors. #### Parameters ##### handler (`err`) => `void` #### Returns () => `void` *** ### readProperty() > **readProperty**(`deviceId`, `objectType`, `objectInstance`, `propertyId`): `Promise`\<[`BacnetPropertyValue`](BacnetPropertyValue.md)\> Read a property from a remote device. #### Parameters ##### deviceId `number` ##### objectType `string` ##### objectInstance `number` ##### propertyId `number` #### Returns `Promise`\<[`BacnetPropertyValue`](BacnetPropertyValue.md)\> *** ### subscribeCov() > **subscribeCov**(`deviceId`, `objectType`, `objectInstance`, `lifetime?`): `Promise`\<[`BacnetSubscription`](BacnetSubscription.md)\> Subscribe to COV (Change of Value) notifications. #### Parameters ##### deviceId `number` ##### objectType `string` ##### objectInstance `number` ##### lifetime? `number` #### Returns `Promise`\<[`BacnetSubscription`](BacnetSubscription.md)\> *** ### writeProperty() > **writeProperty**(`deviceId`, `objectType`, `objectInstance`, `propertyId`, `value`, `priority?`): `Promise`\<`void`\> Write a property to a remote device. #### Parameters ##### deviceId `number` ##### objectType `string` ##### objectInstance `number` ##### propertyId `number` ##### value `unknown` ##### priority? `number` #### Returns `Promise`\<`void`\> --- ## Page: createBleGateway URL: https://docs.totem.ing/api/totemsdk-edge-ble/functions/createBleGateway [**@totemsdk/edge-ble**](../index.md) *** [@totemsdk/edge-ble](../index.md) / createBleGateway # Function: createBleGateway() > **createBleGateway**(`config`): [`BleGateway`](../interfaces/BleGateway.md) ## Parameters ### config [`BleGatewayConfig`](../interfaces/BleGatewayConfig.md) ## Returns [`BleGateway`](../interfaces/BleGateway.md) --- ## Page: createBleSensorBridge URL: https://docs.totem.ing/api/totemsdk-edge-ble/functions/createBleSensorBridge [**@totemsdk/edge-ble**](../index.md) *** [@totemsdk/edge-ble](../index.md) / createBleSensorBridge # Function: createBleSensorBridge() > **createBleSensorBridge**(`config`): [`BleSensorBridge`](../interfaces/BleSensorBridge.md) ## Parameters ### config [`BleSensorBridgeConfig`](../interfaces/BleSensorBridgeConfig.md) ## Returns [`BleSensorBridge`](../interfaces/BleSensorBridge.md) --- ## Page: BleCharacteristic URL: https://docs.totem.ing/api/totemsdk-edge-ble/interfaces/BleCharacteristic [**@totemsdk/edge-ble**](../index.md) *** [@totemsdk/edge-ble](../index.md) / BleCharacteristic # Interface: BleCharacteristic ## Properties ### properties > **properties**: `string`[] *** ### uuid > **uuid**: `string` --- ## Page: BleGateway URL: https://docs.totem.ing/api/totemsdk-edge-ble/interfaces/BleGateway [**@totemsdk/edge-ble**](../index.md) *** [@totemsdk/edge-ble](../index.md) / BleGateway # Interface: BleGateway ## Properties ### peripherals > `readonly` **peripherals**: [`BlePeripheral`](BlePeripheral.md)[] Discovered peripherals. *** ### status > `readonly` **status**: `"stopped"` \| `"running"` \| `"error"` ## Methods ### connect() > **connect**(`peripheralId`): `Promise`\<`void`\> Connect to a peripheral. #### Parameters ##### peripheralId `string` #### Returns `Promise`\<`void`\> *** ### disconnect() > **disconnect**(`peripheralId`): `Promise`\<`void`\> Disconnect from a peripheral. #### Parameters ##### peripheralId `string` #### Returns `Promise`\<`void`\> *** ### read() > **read**(`peripheralId`, `serviceUuid`, `characteristicUuid`): `Promise`\<`EdgeOperationResult`\<\{ `value`: `Uint8Array`; \}\>\> Read a characteristic. #### Parameters ##### peripheralId `string` ##### serviceUuid `string` ##### characteristicUuid `string` #### Returns `Promise`\<`EdgeOperationResult`\<\{ `value`: `Uint8Array`; \}\>\> *** ### start() > **start**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### stop() > **stop**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### subscribe() > **subscribe**(`peripheralId`, `serviceUuid`, `characteristicUuid`): `Promise`\<`EdgeOperationResult`\<`unknown`\>\> Subscribe to notifications. #### Parameters ##### peripheralId `string` ##### serviceUuid `string` ##### characteristicUuid `string` #### Returns `Promise`\<`EdgeOperationResult`\<`unknown`\>\> *** ### write() > **write**(`peripheralId`, `serviceUuid`, `characteristicUuid`, `data`): `Promise`\<`EdgeOperationResult`\<`unknown`\>\> Write a characteristic. #### Parameters ##### peripheralId `string` ##### serviceUuid `string` ##### characteristicUuid `string` ##### data `Uint8Array` #### Returns `Promise`\<`EdgeOperationResult`\<`unknown`\>\> --- ## Page: BleGatewayConfig URL: https://docs.totem.ing/api/totemsdk-edge-ble/interfaces/BleGatewayConfig [**@totemsdk/edge-ble**](../index.md) *** [@totemsdk/edge-ble](../index.md) / BleGatewayConfig # Interface: BleGatewayConfig ## Properties ### runtime > **runtime**: `EdgeRuntime` *** ### scanServices? > `optional` **scanServices?**: `string`[] Service UUIDs to scan for. *** ### transport > **transport**: [`BleTransportPort`](BleTransportPort.md) --- ## Page: BleNotification URL: https://docs.totem.ing/api/totemsdk-edge-ble/interfaces/BleNotification [**@totemsdk/edge-ble**](../index.md) *** [@totemsdk/edge-ble](../index.md) / BleNotification # Interface: BleNotification ## Properties ### characteristicUuid > **characteristicUuid**: `string` *** ### peripheralId > **peripheralId**: `string` *** ### receivedAt > **receivedAt**: `number` *** ### serviceUuid > **serviceUuid**: `string` *** ### value > **value**: `Uint8Array` --- ## Page: BlePeripheral URL: https://docs.totem.ing/api/totemsdk-edge-ble/interfaces/BlePeripheral [**@totemsdk/edge-ble**](../index.md) *** [@totemsdk/edge-ble](../index.md) / BlePeripheral # Interface: BlePeripheral ## Properties ### address > **address**: `string` *** ### id > **id**: `string` *** ### name? > `optional` **name?**: `string` *** ### rssi > **rssi**: `number` *** ### services > **services**: `string`[] --- ## Page: BleSensorBinding URL: https://docs.totem.ing/api/totemsdk-edge-ble/interfaces/BleSensorBinding [**@totemsdk/edge-ble**](../index.md) *** [@totemsdk/edge-ble](../index.md) / BleSensorBinding # Interface: BleSensorBinding ## Properties ### characteristicUuid > **characteristicUuid**: `string` *** ### dataType? > `optional` **dataType?**: `string` *** ### peripheralId > **peripheralId**: `string` *** ### sensorId > **sensorId**: `string` *** ### serviceUuid > **serviceUuid**: `string` *** ### unit? > `optional` **unit?**: `string` --- ## Page: BleSensorBridge URL: https://docs.totem.ing/api/totemsdk-edge-ble/interfaces/BleSensorBridge [**@totemsdk/edge-ble**](../index.md) *** [@totemsdk/edge-ble](../index.md) / BleSensorBridge # Interface: BleSensorBridge ## Methods ### poll() > **poll**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### start() > **start**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### stop() > **stop**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> --- ## Page: BleSensorBridgeConfig URL: https://docs.totem.ing/api/totemsdk-edge-ble/interfaces/BleSensorBridgeConfig [**@totemsdk/edge-ble**](../index.md) *** [@totemsdk/edge-ble](../index.md) / BleSensorBridgeConfig # Interface: BleSensorBridgeConfig ## Properties ### bindings > **bindings**: [`BleSensorBinding`](BleSensorBinding.md)[] *** ### gateway? > `optional` **gateway?**: [`BleGateway`](BleGateway.md) *** ### runtime > **runtime**: `EdgeRuntime` *** ### transport > **transport**: [`BleTransportPort`](BleTransportPort.md) --- ## Page: BleService URL: https://docs.totem.ing/api/totemsdk-edge-ble/interfaces/BleService [**@totemsdk/edge-ble**](../index.md) *** [@totemsdk/edge-ble](../index.md) / BleService # Interface: BleService ## Properties ### characteristics > **characteristics**: [`BleCharacteristic`](BleCharacteristic.md)[] *** ### uuid > **uuid**: `string` --- ## Page: BleTransportPort URL: https://docs.totem.ing/api/totemsdk-edge-ble/interfaces/BleTransportPort [**@totemsdk/edge-ble**](../index.md) *** [@totemsdk/edge-ble](../index.md) / BleTransportPort # Interface: BleTransportPort BLE transport port — injected by the caller. Platform-agnostic BLE interface. Works with noble (Node.js), Web Bluetooth API (browser), or platform-native stacks. ## Methods ### connect() > **connect**(`peripheralId`): `Promise`\<`void`\> Connect to a peripheral by ID or address. #### Parameters ##### peripheralId `string` #### Returns `Promise`\<`void`\> *** ### disconnect() > **disconnect**(`peripheralId`): `Promise`\<`void`\> Disconnect from a peripheral. #### Parameters ##### peripheralId `string` #### Returns `Promise`\<`void`\> *** ### discover() > **discover**(`peripheralId`): `Promise`\<[`BleService`](BleService.md)[]\> Discover services and characteristics. #### Parameters ##### peripheralId `string` #### Returns `Promise`\<[`BleService`](BleService.md)[]\> *** ### onDisconnect() > **onDisconnect**(`handler`): () => `void` Register handler for disconnection. #### Parameters ##### handler (`peripheralId`) => `void` #### Returns () => `void` *** ### onDiscover() > **onDiscover**(`handler`): () => `void` Register handler for discovered peripherals. #### Parameters ##### handler (`peripheral`) => `void` #### Returns () => `void` *** ### onError() > **onError**(`handler`): () => `void` Register handler for errors. #### Parameters ##### handler (`err`) => `void` #### Returns () => `void` *** ### onNotification() > **onNotification**(`handler`): () => `void` Register handler for characteristic notifications. #### Parameters ##### handler (`event`) => `void` #### Returns () => `void` *** ### read() > **read**(`peripheralId`, `serviceUuid`, `characteristicUuid`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> Read a characteristic value. #### Parameters ##### peripheralId `string` ##### serviceUuid `string` ##### characteristicUuid `string` #### Returns `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> *** ### startScanning() > **startScanning**(`serviceUUIDs?`): `Promise`\<`void`\> Start scanning for peripherals. #### Parameters ##### serviceUUIDs? `string`[] #### Returns `Promise`\<`void`\> *** ### stopScanning() > **stopScanning**(): `Promise`\<`void`\> Stop scanning. #### Returns `Promise`\<`void`\> *** ### subscribe() > **subscribe**(`peripheralId`, `serviceUuid`, `characteristicUuid`): `Promise`\<`void`\> Subscribe to characteristic notifications. #### Parameters ##### peripheralId `string` ##### serviceUuid `string` ##### characteristicUuid `string` #### Returns `Promise`\<`void`\> *** ### unsubscribe() > **unsubscribe**(`peripheralId`, `serviceUuid`, `characteristicUuid`): `Promise`\<`void`\> Unsubscribe from characteristic notifications. #### Parameters ##### peripheralId `string` ##### serviceUuid `string` ##### characteristicUuid `string` #### Returns `Promise`\<`void`\> *** ### write() > **write**(`peripheralId`, `serviceUuid`, `characteristicUuid`, `data`): `Promise`\<`void`\> Write a characteristic value. #### Parameters ##### peripheralId `string` ##### serviceUuid `string` ##### characteristicUuid `string` ##### data `Uint8Array` #### Returns `Promise`\<`void`\> --- ## Page: NativeCanTransport URL: https://docs.totem.ing/api/totemsdk-edge-can/classes/NativeCanTransport [**@totemsdk/edge-can**](../index.md) *** [@totemsdk/edge-can](../index.md) / NativeCanTransport # Class: NativeCanTransport CAN bus transport port — injected by the caller. Supports socketcan (Linux), PCAN, or any CAN interface. Frames use 11-bit or 29-bit arbitration IDs. ## Implements - [`CanTransportPort`](../interfaces/CanTransportPort.md) ## Constructors ### Constructor > **new NativeCanTransport**(`config?`): `NativeCanTransport` #### Parameters ##### config? [`NativeCanConfig`](../interfaces/NativeCanConfig.md) = `{}` #### Returns `NativeCanTransport` ## Methods ### close() > **close**(): `Promise`\<`void`\> Close the CAN interface. #### Returns `Promise`\<`void`\> #### Implementation of [`CanTransportPort`](../interfaces/CanTransportPort.md).[`close`](../interfaces/CanTransportPort.md#close) *** ### onError() > **onError**(`handler`): () => `void` Register a handler for interface errors. #### Parameters ##### handler (`err`) => `void` #### Returns () => `void` #### Implementation of [`CanTransportPort`](../interfaces/CanTransportPort.md).[`onError`](../interfaces/CanTransportPort.md#onerror) *** ### onFrame() > **onFrame**(`handler`): () => `void` Register a handler for received CAN frames. #### Parameters ##### handler (`frame`) => `void` #### Returns () => `void` #### Implementation of [`CanTransportPort`](../interfaces/CanTransportPort.md).[`onFrame`](../interfaces/CanTransportPort.md#onframe) *** ### open() > **open**(`interfaceName`): `Promise`\<`void`\> Open the CAN interface. #### Parameters ##### interfaceName `string` #### Returns `Promise`\<`void`\> #### Implementation of [`CanTransportPort`](../interfaces/CanTransportPort.md).[`open`](../interfaces/CanTransportPort.md#open) *** ### send() > **send**(`id`, `data`, `isExtended`): `Promise`\<`void`\> Send a CAN frame. #### Parameters ##### id `number` ##### data `Uint8Array` ##### isExtended `boolean` #### Returns `Promise`\<`void`\> #### Implementation of [`CanTransportPort`](../interfaces/CanTransportPort.md).[`send`](../interfaces/CanTransportPort.md#send) --- ## Page: createCanGateway URL: https://docs.totem.ing/api/totemsdk-edge-can/functions/createCanGateway [**@totemsdk/edge-can**](../index.md) *** [@totemsdk/edge-can](../index.md) / createCanGateway # Function: createCanGateway() > **createCanGateway**(`config`): [`CanGateway`](../interfaces/CanGateway.md) ## Parameters ### config [`CanGatewayConfig`](../interfaces/CanGatewayConfig.md) ## Returns [`CanGateway`](../interfaces/CanGateway.md) --- ## Page: createCanSensorBridge URL: https://docs.totem.ing/api/totemsdk-edge-can/functions/createCanSensorBridge [**@totemsdk/edge-can**](../index.md) *** [@totemsdk/edge-can](../index.md) / createCanSensorBridge # Function: createCanSensorBridge() > **createCanSensorBridge**(`config`): [`CanSensorBridge`](../interfaces/CanSensorBridge.md) ## Parameters ### config [`CanSensorBridgeConfig`](../interfaces/CanSensorBridgeConfig.md) ## Returns [`CanSensorBridge`](../interfaces/CanSensorBridge.md) --- ## Page: CanFrame URL: https://docs.totem.ing/api/totemsdk-edge-can/interfaces/CanFrame [**@totemsdk/edge-can**](../index.md) *** [@totemsdk/edge-can](../index.md) / CanFrame # Interface: CanFrame ## Properties ### data > **data**: `Uint8Array` Data bytes (0-8). *** ### dlc > **dlc**: `number` Data length code. *** ### id > **id**: `number` 11-bit or 29-bit arbitration ID. *** ### isExtended > **isExtended**: `boolean` Whether this is an extended (29-bit) frame. *** ### isRtr > **isRtr**: `boolean` Whether this is a remote transmission request. *** ### receivedAt > **receivedAt**: `number` Timestamp of receipt. --- ## Page: CanGateway URL: https://docs.totem.ing/api/totemsdk-edge-can/interfaces/CanGateway [**@totemsdk/edge-can**](../index.md) *** [@totemsdk/edge-can](../index.md) / CanGateway # Interface: CanGateway ## Properties ### status > `readonly` **status**: `"stopped"` \| `"running"` \| `"error"` ## Methods ### send() > **send**(`id`, `data`, `isExtended?`): `Promise`\<`void`\> #### Parameters ##### id `number` ##### data `Uint8Array` ##### isExtended? `boolean` #### Returns `Promise`\<`void`\> *** ### start() > **start**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### stop() > **stop**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> --- ## Page: CanGatewayConfig URL: https://docs.totem.ing/api/totemsdk-edge-can/interfaces/CanGatewayConfig [**@totemsdk/edge-can**](../index.md) *** [@totemsdk/edge-can](../index.md) / CanGatewayConfig # Interface: CanGatewayConfig ## Properties ### interfaceName > **interfaceName**: `string` *** ### runtime > **runtime**: `EdgeRuntime` *** ### signals? > `optional` **signals?**: [`CanSignalDef`](CanSignalDef.md)[] Optional DBC signal definitions for decoding. *** ### transport > **transport**: [`CanTransportPort`](CanTransportPort.md) --- ## Page: CanSensorBinding URL: https://docs.totem.ing/api/totemsdk-edge-can/interfaces/CanSensorBinding [**@totemsdk/edge-can**](../index.md) *** [@totemsdk/edge-can](../index.md) / CanSensorBinding # Interface: CanSensorBinding ## Properties ### canId > **canId**: `number` *** ### dataType? > `optional` **dataType?**: `string` *** ### isExtended > **isExtended**: `boolean` *** ### sensorId > **sensorId**: `string` *** ### signalName > **signalName**: `string` --- ## Page: CanSensorBridge URL: https://docs.totem.ing/api/totemsdk-edge-can/interfaces/CanSensorBridge [**@totemsdk/edge-can**](../index.md) *** [@totemsdk/edge-can](../index.md) / CanSensorBridge # Interface: CanSensorBridge ## Methods ### start() > **start**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### stop() > **stop**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> --- ## Page: CanSensorBridgeConfig URL: https://docs.totem.ing/api/totemsdk-edge-can/interfaces/CanSensorBridgeConfig [**@totemsdk/edge-can**](../index.md) *** [@totemsdk/edge-can](../index.md) / CanSensorBridgeConfig # Interface: CanSensorBridgeConfig ## Properties ### bindings > **bindings**: [`CanSensorBinding`](CanSensorBinding.md)[] *** ### gateway? > `optional` **gateway?**: [`CanGateway`](CanGateway.md) *** ### runtime > **runtime**: `EdgeRuntime` *** ### transport > **transport**: [`CanTransportPort`](CanTransportPort.md) --- ## Page: CanSignal URL: https://docs.totem.ing/api/totemsdk-edge-can/interfaces/CanSignal [**@totemsdk/edge-can**](../index.md) *** [@totemsdk/edge-can](../index.md) / CanSignal # Interface: CanSignal ## Properties ### name > **name**: `string` Signal name from DBC file. *** ### raw > **raw**: `Uint8Array` Raw bytes. *** ### unit? > `optional` **unit?**: `string` Unit string (e.g. "rpm", "°C"). *** ### value > **value**: `number` Decoded value. --- ## Page: CanSignalDef URL: https://docs.totem.ing/api/totemsdk-edge-can/interfaces/CanSignalDef [**@totemsdk/edge-can**](../index.md) *** [@totemsdk/edge-can](../index.md) / CanSignalDef # Interface: CanSignalDef ## Properties ### canId > **canId**: `number` *** ### isBigEndian > **isBigEndian**: `boolean` *** ### isExtended > **isExtended**: `boolean` *** ### isSigned > **isSigned**: `boolean` *** ### length > **length**: `number` *** ### name > **name**: `string` *** ### offset > **offset**: `number` *** ### scale > **scale**: `number` *** ### startBit > **startBit**: `number` *** ### unit? > `optional` **unit?**: `string` --- ## Page: CanTransportPort URL: https://docs.totem.ing/api/totemsdk-edge-can/interfaces/CanTransportPort [**@totemsdk/edge-can**](../index.md) *** [@totemsdk/edge-can](../index.md) / CanTransportPort # Interface: CanTransportPort CAN bus transport port — injected by the caller. Supports socketcan (Linux), PCAN, or any CAN interface. Frames use 11-bit or 29-bit arbitration IDs. ## Methods ### close() > **close**(): `Promise`\<`void`\> Close the CAN interface. #### Returns `Promise`\<`void`\> *** ### onError() > **onError**(`handler`): () => `void` Register a handler for interface errors. #### Parameters ##### handler (`err`) => `void` #### Returns () => `void` *** ### onFrame() > **onFrame**(`handler`): () => `void` Register a handler for received CAN frames. #### Parameters ##### handler (`frame`) => `void` #### Returns () => `void` *** ### open() > **open**(`interfaceName`): `Promise`\<`void`\> Open the CAN interface. #### Parameters ##### interfaceName `string` #### Returns `Promise`\<`void`\> *** ### send() > **send**(`id`, `data`, `isExtended`): `Promise`\<`void`\> Send a CAN frame. #### Parameters ##### id `number` ##### data `Uint8Array` ##### isExtended `boolean` #### Returns `Promise`\<`void`\> --- ## Page: NativeCanConfig URL: https://docs.totem.ing/api/totemsdk-edge-can/interfaces/NativeCanConfig [**@totemsdk/edge-can**](../index.md) *** [@totemsdk/edge-can](../index.md) / NativeCanConfig # Interface: NativeCanConfig ## Properties ### connectTimeoutMs? > `optional` **connectTimeoutMs?**: `number` *** ### host? > `optional` **host?**: `string` *** ### port? > `optional` **port?**: `number` *** ### requestTimeoutMs? > `optional` **requestTimeoutMs?**: `number` --- ## Page: NativeCoapTransport URL: https://docs.totem.ing/api/totemsdk-edge-coap/classes/NativeCoapTransport [**@totemsdk/edge-coap**](../index.md) *** [@totemsdk/edge-coap](../index.md) / NativeCoapTransport # Class: NativeCoapTransport CoAP transport port — injected by the caller. CoAP (RFC 7252) runs over UDP. The caller provides the socket. Messages are confirmable (CON), non-confirmable (NON), acknowledgement (ACK), or reset (RST). ## Implements - [`CoapTransportPort`](../interfaces/CoapTransportPort.md) ## Constructors ### Constructor > **new NativeCoapTransport**(`config?`): `NativeCoapTransport` #### Parameters ##### config? [`NativeCoapConfig`](../interfaces/NativeCoapConfig.md) = `{}` #### Returns `NativeCoapTransport` ## Methods ### bind() > **bind**(`_port`): `Promise`\<`void`\> Bind to a local port. #### Parameters ##### \_port `number` #### Returns `Promise`\<`void`\> #### Implementation of [`CoapTransportPort`](../interfaces/CoapTransportPort.md).[`bind`](../interfaces/CoapTransportPort.md#bind) *** ### close() > **close**(): `Promise`\<`void`\> Close the socket. #### Returns `Promise`\<`void`\> #### Implementation of [`CoapTransportPort`](../interfaces/CoapTransportPort.md).[`close`](../interfaces/CoapTransportPort.md#close) *** ### onError() > **onError**(`handler`): () => `void` Register a handler for socket errors. #### Parameters ##### handler (`err`) => `void` #### Returns () => `void` #### Implementation of [`CoapTransportPort`](../interfaces/CoapTransportPort.md).[`onError`](../interfaces/CoapTransportPort.md#onerror) *** ### onMessage() > **onMessage**(`handler`): () => `void` Register a handler for inbound CoAP messages. #### Parameters ##### handler (`message`, `remote`) => `void` #### Returns () => `void` #### Implementation of [`CoapTransportPort`](../interfaces/CoapTransportPort.md).[`onMessage`](../interfaces/CoapTransportPort.md#onmessage) *** ### send() > **send**(`host`, `port`, `message`): `Promise`\<`void`\> Send a CoAP message to a remote endpoint. #### Parameters ##### host `string` ##### port `number` ##### message `Uint8Array` #### Returns `Promise`\<`void`\> #### Implementation of [`CoapTransportPort`](../interfaces/CoapTransportPort.md).[`send`](../interfaces/CoapTransportPort.md#send) --- ## Page: createCoapGateway URL: https://docs.totem.ing/api/totemsdk-edge-coap/functions/createCoapGateway [**@totemsdk/edge-coap**](../index.md) *** [@totemsdk/edge-coap](../index.md) / createCoapGateway # Function: createCoapGateway() > **createCoapGateway**(`config`): [`CoapGateway`](../interfaces/CoapGateway.md) ## Parameters ### config [`CoapGatewayConfig`](../interfaces/CoapGatewayConfig.md) ## Returns [`CoapGateway`](../interfaces/CoapGateway.md) --- ## Page: createCoapSensorBridge URL: https://docs.totem.ing/api/totemsdk-edge-coap/functions/createCoapSensorBridge [**@totemsdk/edge-coap**](../index.md) *** [@totemsdk/edge-coap](../index.md) / createCoapSensorBridge # Function: createCoapSensorBridge() > **createCoapSensorBridge**(`config`): [`CoapSensorBridge`](../interfaces/CoapSensorBridge.md) ## Parameters ### config [`CoapSensorBridgeConfig`](../interfaces/CoapSensorBridgeConfig.md) ## Returns [`CoapSensorBridge`](../interfaces/CoapSensorBridge.md) --- ## Page: CoapGateway URL: https://docs.totem.ing/api/totemsdk-edge-coap/interfaces/CoapGateway [**@totemsdk/edge-coap**](../index.md) *** [@totemsdk/edge-coap](../index.md) / CoapGateway # Interface: CoapGateway ## Properties ### status > `readonly` **status**: `"stopped"` \| `"running"` \| `"error"` ## Methods ### get() > **get**(`path`, `host`, `port`): `Promise`\<`EdgeOperationResult`\<\{ `payload`: `Uint8Array`; \}\>\> #### Parameters ##### path `string`[] ##### host `string` ##### port `number` #### Returns `Promise`\<`EdgeOperationResult`\<\{ `payload`: `Uint8Array`; \}\>\> *** ### post() > **post**(`path`, `payload`, `host`, `port`): `Promise`\<`EdgeOperationResult`\<\{ `payload`: `Uint8Array`; \}\>\> #### Parameters ##### path `string`[] ##### payload `Uint8Array` ##### host `string` ##### port `number` #### Returns `Promise`\<`EdgeOperationResult`\<\{ `payload`: `Uint8Array`; \}\>\> *** ### start() > **start**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### stop() > **stop**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> --- ## Page: CoapGatewayConfig URL: https://docs.totem.ing/api/totemsdk-edge-coap/interfaces/CoapGatewayConfig [**@totemsdk/edge-coap**](../index.md) *** [@totemsdk/edge-coap](../index.md) / CoapGatewayConfig # Interface: CoapGatewayConfig ## Properties ### localPort > **localPort**: `number` *** ### runtime > **runtime**: `EdgeRuntime` *** ### transport > **transport**: [`CoapTransportPort`](CoapTransportPort.md) --- ## Page: CoapMessage URL: https://docs.totem.ing/api/totemsdk-edge-coap/interfaces/CoapMessage [**@totemsdk/edge-coap**](../index.md) *** [@totemsdk/edge-coap](../index.md) / CoapMessage # Interface: CoapMessage ## Properties ### messageId > **messageId**: `number` Message ID for deduplication. *** ### method? > `optional` **method?**: [`CoapMethod`](../type-aliases/CoapMethod.md) Request method (only for CON/NON requests). *** ### path > **path**: `string`[] URI path (e.g. ["sensors", "temperature"]). *** ### payload > **payload**: `Uint8Array` Payload bytes. *** ### receivedAt > **receivedAt**: `number` Timestamp of receipt. *** ### remote > **remote**: `object` Remote endpoint. #### host > **host**: `string` #### port > **port**: `number` *** ### responseCode? > `optional` **responseCode?**: `string` Response code (only for ACK responses). *** ### token > **token**: `Uint8Array` Token for request/response matching. *** ### type > **type**: [`CoapMessageType`](../type-aliases/CoapMessageType.md) Message type. --- ## Page: CoapSensorBinding URL: https://docs.totem.ing/api/totemsdk-edge-coap/interfaces/CoapSensorBinding [**@totemsdk/edge-coap**](../index.md) *** [@totemsdk/edge-coap](../index.md) / CoapSensorBinding # Interface: CoapSensorBinding ## Properties ### dataType? > `optional` **dataType?**: `string` *** ### host > **host**: `string` *** ### intervalMs > **intervalMs**: `number` *** ### path > **path**: `string`[] *** ### port > **port**: `number` *** ### sensorId > **sensorId**: `string` --- ## Page: CoapSensorBridge URL: https://docs.totem.ing/api/totemsdk-edge-coap/interfaces/CoapSensorBridge [**@totemsdk/edge-coap**](../index.md) *** [@totemsdk/edge-coap](../index.md) / CoapSensorBridge # Interface: CoapSensorBridge ## Methods ### poll() > **poll**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### start() > **start**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### stop() > **stop**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> --- ## Page: CoapSensorBridgeConfig URL: https://docs.totem.ing/api/totemsdk-edge-coap/interfaces/CoapSensorBridgeConfig [**@totemsdk/edge-coap**](../index.md) *** [@totemsdk/edge-coap](../index.md) / CoapSensorBridgeConfig # Interface: CoapSensorBridgeConfig ## Properties ### bindings > **bindings**: [`CoapSensorBinding`](CoapSensorBinding.md)[] *** ### gateway? > `optional` **gateway?**: [`CoapGateway`](CoapGateway.md) *** ### runtime > **runtime**: `EdgeRuntime` *** ### transport > **transport**: [`CoapTransportPort`](CoapTransportPort.md) --- ## Page: CoapTransportPort URL: https://docs.totem.ing/api/totemsdk-edge-coap/interfaces/CoapTransportPort [**@totemsdk/edge-coap**](../index.md) *** [@totemsdk/edge-coap](../index.md) / CoapTransportPort # Interface: CoapTransportPort CoAP transport port — injected by the caller. CoAP (RFC 7252) runs over UDP. The caller provides the socket. Messages are confirmable (CON), non-confirmable (NON), acknowledgement (ACK), or reset (RST). ## Methods ### bind() > **bind**(`port`): `Promise`\<`void`\> Bind to a local port. #### Parameters ##### port `number` #### Returns `Promise`\<`void`\> *** ### close() > **close**(): `Promise`\<`void`\> Close the socket. #### Returns `Promise`\<`void`\> *** ### onError() > **onError**(`handler`): () => `void` Register a handler for socket errors. #### Parameters ##### handler (`err`) => `void` #### Returns () => `void` *** ### onMessage() > **onMessage**(`handler`): () => `void` Register a handler for inbound CoAP messages. #### Parameters ##### handler (`message`, `remote`) => `void` #### Returns () => `void` *** ### send() > **send**(`host`, `port`, `message`): `Promise`\<`void`\> Send a CoAP message to a remote endpoint. #### Parameters ##### host `string` ##### port `number` ##### message `Uint8Array` #### Returns `Promise`\<`void`\> --- ## Page: NativeCoapConfig URL: https://docs.totem.ing/api/totemsdk-edge-coap/interfaces/NativeCoapConfig [**@totemsdk/edge-coap**](../index.md) *** [@totemsdk/edge-coap](../index.md) / NativeCoapConfig # Interface: NativeCoapConfig ## Properties ### connectTimeoutMs? > `optional` **connectTimeoutMs?**: `number` *** ### host? > `optional` **host?**: `string` *** ### port? > `optional` **port?**: `number` *** ### requestTimeoutMs? > `optional` **requestTimeoutMs?**: `number` --- ## Page: CoapMessageType URL: https://docs.totem.ing/api/totemsdk-edge-coap/type-aliases/CoapMessageType [**@totemsdk/edge-coap**](../index.md) *** [@totemsdk/edge-coap](../index.md) / CoapMessageType # Type Alias: CoapMessageType > **CoapMessageType** = `"CON"` \| `"NON"` \| `"ACK"` \| `"RST"` --- ## Page: CoapMethod URL: https://docs.totem.ing/api/totemsdk-edge-coap/type-aliases/CoapMethod [**@totemsdk/edge-coap**](../index.md) *** [@totemsdk/edge-coap](../index.md) / CoapMethod # Type Alias: CoapMethod > **CoapMethod** = `"GET"` \| `"POST"` \| `"PUT"` \| `"DELETE"` --- ## Page: createEmailGateway URL: https://docs.totem.ing/api/totemsdk-edge-email/functions/createEmailGateway [**@totemsdk/edge-email**](../index.md) *** [@totemsdk/edge-email](../index.md) / createEmailGateway # Function: createEmailGateway() > **createEmailGateway**(`config`): [`EmailGateway`](../interfaces/EmailGateway.md) ## Parameters ### config [`EmailGatewayConfig`](../interfaces/EmailGatewayConfig.md) ## Returns [`EmailGateway`](../interfaces/EmailGateway.md) --- ## Page: createEmailSensorBridge URL: https://docs.totem.ing/api/totemsdk-edge-email/functions/createEmailSensorBridge [**@totemsdk/edge-email**](../index.md) *** [@totemsdk/edge-email](../index.md) / createEmailSensorBridge # Function: createEmailSensorBridge() > **createEmailSensorBridge**(`config`): [`EmailSensorBridge`](../interfaces/EmailSensorBridge.md) ## Parameters ### config [`EmailSensorBridgeConfig`](../interfaces/EmailSensorBridgeConfig.md) ## Returns [`EmailSensorBridge`](../interfaces/EmailSensorBridge.md) --- ## Page: EmailAttachment URL: https://docs.totem.ing/api/totemsdk-edge-email/interfaces/EmailAttachment [**@totemsdk/edge-email**](../index.md) *** [@totemsdk/edge-email](../index.md) / EmailAttachment # Interface: EmailAttachment ## Properties ### content > **content**: `Uint8Array` *** ### filename > **filename**: `string` *** ### mimeType > **mimeType**: `string` *** ### size > **size**: `number` --- ## Page: EmailGateway URL: https://docs.totem.ing/api/totemsdk-edge-email/interfaces/EmailGateway [**@totemsdk/edge-email**](../index.md) *** [@totemsdk/edge-email](../index.md) / EmailGateway # Interface: EmailGateway ## Properties ### status > `readonly` **status**: `"stopped"` \| `"running"` \| `"error"` ## Methods ### deleteMessage() > **deleteMessage**(`mailbox`, `id`): `Promise`\<`EdgeOperationResult`\<`unknown`\>\> #### Parameters ##### mailbox `string` ##### id `string` #### Returns `Promise`\<`EdgeOperationResult`\<`unknown`\>\> *** ### listMailboxes() > **listMailboxes**(): `Promise`\<`EdgeOperationResult`\<\{ `mailboxes`: `object`[]; \}\>\> #### Returns `Promise`\<`EdgeOperationResult`\<\{ `mailboxes`: `object`[]; \}\>\> *** ### markAsRead() > **markAsRead**(`mailbox`, `id`): `Promise`\<`EdgeOperationResult`\<`unknown`\>\> #### Parameters ##### mailbox `string` ##### id `string` #### Returns `Promise`\<`EdgeOperationResult`\<`unknown`\>\> *** ### moveMessage() > **moveMessage**(`mailbox`, `id`, `destination`): `Promise`\<`EdgeOperationResult`\<`unknown`\>\> #### Parameters ##### mailbox `string` ##### id `string` ##### destination `string` #### Returns `Promise`\<`EdgeOperationResult`\<`unknown`\>\> *** ### readMessage() > **readMessage**(`mailbox`, `id`): `Promise`\<`EdgeOperationResult`\<\{ `message`: [`EmailMessage`](EmailMessage.md); \}\>\> #### Parameters ##### mailbox `string` ##### id `string` #### Returns `Promise`\<`EdgeOperationResult`\<\{ `message`: [`EmailMessage`](EmailMessage.md); \}\>\> *** ### searchMessages() > **searchMessages**(`options`): `Promise`\<`EdgeOperationResult`\<\{ `messages`: [`EmailMessage`](EmailMessage.md)[]; `total`: `number`; \}\>\> #### Parameters ##### options ###### before? `Date` ###### from? `string` ###### limit? `number` ###### mailbox? `string` ###### query? `string` ###### since? `Date` ###### subject? `string` ###### unreadOnly? `boolean` #### Returns `Promise`\<`EdgeOperationResult`\<\{ `messages`: [`EmailMessage`](EmailMessage.md)[]; `total`: `number`; \}\>\> *** ### sendMail() > **sendMail**(`options`): `Promise`\<`EdgeOperationResult`\<\{ `messageId`: `string`; \}\>\> #### Parameters ##### options [`SendOptions`](SendOptions.md) #### Returns `Promise`\<`EdgeOperationResult`\<\{ `messageId`: `string`; \}\>\> *** ### start() > **start**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### stop() > **stop**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> --- ## Page: EmailGatewayConfig URL: https://docs.totem.ing/api/totemsdk-edge-email/interfaces/EmailGatewayConfig [**@totemsdk/edge-email**](../index.md) *** [@totemsdk/edge-email](../index.md) / EmailGatewayConfig # Interface: EmailGatewayConfig ## Properties ### defaultMailbox? > `optional` **defaultMailbox?**: `string` *** ### mailboxPollIntervalMs? > `optional` **mailboxPollIntervalMs?**: `number` *** ### runtime > **runtime**: `EdgeRuntime` *** ### transport > **transport**: [`EmailTransportPort`](EmailTransportPort.md) --- ## Page: EmailMessage URL: https://docs.totem.ing/api/totemsdk-edge-email/interfaces/EmailMessage [**@totemsdk/edge-email**](../index.md) *** [@totemsdk/edge-email](../index.md) / EmailMessage # Interface: EmailMessage ## Properties ### attachments > **attachments**: [`EmailAttachment`](EmailAttachment.md)[] *** ### bodyHtml? > `optional` **bodyHtml?**: `string` *** ### bodyText > **bodyText**: `string` *** ### flags > **flags**: `string`[] *** ### from > **from**: `object` #### email > **email**: `string` #### name > **name**: `string` *** ### id > **id**: `string` *** ### messageId > **messageId**: `string` *** ### receivedAt > **receivedAt**: `Date` *** ### subject > **subject**: `string` *** ### to > **to**: `object`[] #### email > **email**: `string` #### name > **name**: `string` --- ## Page: EmailPollBinding URL: https://docs.totem.ing/api/totemsdk-edge-email/interfaces/EmailPollBinding [**@totemsdk/edge-email**](../index.md) *** [@totemsdk/edge-email](../index.md) / EmailPollBinding # Interface: EmailPollBinding ## Properties ### from? > `optional` **from?**: `string` *** ### intervalMs > **intervalMs**: `number` *** ### mailbox > **mailbox**: `string` *** ### query? > `optional` **query?**: `string` *** ### sensorId > **sensorId**: `string` *** ### subject? > `optional` **subject?**: `string` --- ## Page: EmailSensorBridge URL: https://docs.totem.ing/api/totemsdk-edge-email/interfaces/EmailSensorBridge [**@totemsdk/edge-email**](../index.md) *** [@totemsdk/edge-email](../index.md) / EmailSensorBridge # Interface: EmailSensorBridge ## Methods ### pollOnce() > **pollOnce**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### start() > **start**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### stop() > **stop**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> --- ## Page: EmailSensorBridgeConfig URL: https://docs.totem.ing/api/totemsdk-edge-email/interfaces/EmailSensorBridgeConfig [**@totemsdk/edge-email**](../index.md) *** [@totemsdk/edge-email](../index.md) / EmailSensorBridgeConfig # Interface: EmailSensorBridgeConfig ## Properties ### bindings > **bindings**: [`EmailPollBinding`](EmailPollBinding.md)[] *** ### runtime > **runtime**: `EdgeRuntime` *** ### transport > **transport**: [`EmailTransportPort`](EmailTransportPort.md) --- ## Page: EmailTransportPort URL: https://docs.totem.ing/api/totemsdk-edge-email/interfaces/EmailTransportPort [**@totemsdk/edge-email**](../index.md) *** [@totemsdk/edge-email](../index.md) / EmailTransportPort # Interface: EmailTransportPort ## Methods ### close() > **close**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### connect() > **connect**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### deleteMessage() > **deleteMessage**(`mailbox`, `id`): `Promise`\<`void`\> #### Parameters ##### mailbox `string` ##### id `string` #### Returns `Promise`\<`void`\> *** ### listMailboxes() > **listMailboxes**(): `Promise`\<`object`[]\> #### Returns `Promise`\<`object`[]\> *** ### markAsRead() > **markAsRead**(`mailbox`, `id`): `Promise`\<`void`\> #### Parameters ##### mailbox `string` ##### id `string` #### Returns `Promise`\<`void`\> *** ### moveMessage() > **moveMessage**(`mailbox`, `id`, `destinationMailbox`): `Promise`\<`void`\> #### Parameters ##### mailbox `string` ##### id `string` ##### destinationMailbox `string` #### Returns `Promise`\<`void`\> *** ### onError() > **onError**(`handler`): () => `void` #### Parameters ##### handler (`err`) => `void` #### Returns () => `void` *** ### onNewMessage() > **onNewMessage**(`handler`): () => `void` #### Parameters ##### handler (`mailbox`, `message`) => `void` #### Returns () => `void` *** ### readMessage() > **readMessage**(`mailbox`, `id`): `Promise`\<[`EmailMessage`](EmailMessage.md)\> #### Parameters ##### mailbox `string` ##### id `string` #### Returns `Promise`\<[`EmailMessage`](EmailMessage.md)\> *** ### searchMessages() > **searchMessages**(`options`): `Promise`\<\{ `messages`: [`EmailMessage`](EmailMessage.md)[]; `total`: `number`; \}\> #### Parameters ##### options ###### before? `Date` ###### from? `string` ###### limit? `number` ###### mailbox? `string` ###### page? `number` ###### query? `string` ###### since? `Date` ###### subject? `string` ###### to? `string` ###### unreadOnly? `boolean` #### Returns `Promise`\<\{ `messages`: [`EmailMessage`](EmailMessage.md)[]; `total`: `number`; \}\> *** ### sendMail() > **sendMail**(`options`): `Promise`\<\{ `messageId`: `string`; \}\> #### Parameters ##### options [`SendOptions`](SendOptions.md) #### Returns `Promise`\<\{ `messageId`: `string`; \}\> --- ## Page: SendOptions URL: https://docs.totem.ing/api/totemsdk-edge-email/interfaces/SendOptions [**@totemsdk/edge-email**](../index.md) *** [@totemsdk/edge-email](../index.md) / SendOptions # Interface: SendOptions ## Properties ### attachments? > `optional` **attachments?**: `object`[] #### content > **content**: `Uint8Array` #### filename > **filename**: `string` #### mimeType > **mimeType**: `string` *** ### bcc? > `optional` **bcc?**: `object`[] #### email > **email**: `string` #### name > **name**: `string` *** ### bodyHtml? > `optional` **bodyHtml?**: `string` *** ### bodyText > **bodyText**: `string` *** ### cc? > `optional` **cc?**: `object`[] #### email > **email**: `string` #### name > **name**: `string` *** ### from > **from**: `object` #### email > **email**: `string` #### name > **name**: `string` *** ### references? > `optional` **references?**: `string`[] *** ### subject > **subject**: `string` *** ### to > **to**: `object`[] #### email > **email**: `string` #### name > **name**: `string` --- ## Page: NativeGrpcTransport URL: https://docs.totem.ing/api/totemsdk-edge-grpc/classes/NativeGrpcTransport [**@totemsdk/edge-grpc**](../index.md) *** [@totemsdk/edge-grpc](../index.md) / NativeGrpcTransport # Class: NativeGrpcTransport ## Implements - `IStreamTransport` ## Constructors ### Constructor > **new NativeGrpcTransport**(`config?`): `NativeGrpcTransport` #### Parameters ##### config? [`NativeGrpcConfig`](../interfaces/NativeGrpcConfig.md) = `{}` #### Returns `NativeGrpcTransport` ## Accessors ### state #### Get Signature > **get** **state**(): `"connecting"` \| `"open"` \| `"closing"` \| `"closed"` Explicit connection state. ##### Returns `"connecting"` \| `"open"` \| `"closing"` \| `"closed"` #### Implementation of `IStreamTransport.state` ## Methods ### bidiStream() > **bidiStream**(`path`, `deadlineMs?`): `Promise`\<[`GrpcStreamHandle`](../interfaces/GrpcStreamHandle.md)\> #### Parameters ##### path `string` ##### deadlineMs? `number` #### Returns `Promise`\<[`GrpcStreamHandle`](../interfaces/GrpcStreamHandle.md)\> *** ### clientStream() > **clientStream**(`path`, `deadlineMs?`): `Promise`\<[`GrpcStreamHandle`](../interfaces/GrpcStreamHandle.md)\> #### Parameters ##### path `string` ##### deadlineMs? `number` #### Returns `Promise`\<[`GrpcStreamHandle`](../interfaces/GrpcStreamHandle.md)\> *** ### close() > **close**(): `Promise`\<`void`\> Close the transport. After the returned promise resolves, no further data or close deliveries occur. Calling close() more than once is safe (the second call resolves immediately). #### Returns `Promise`\<`void`\> #### Implementation of `IStreamTransport.close` *** ### connect() > **connect**(`address?`): `Promise`\<`void`\> Optional async connect. Implementations that construct an already-connected transport may omit it. #### Parameters ##### address? `string` #### Returns `Promise`\<`void`\> #### Implementation of `IStreamTransport.connect` *** ### disconnect() > **disconnect**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### onClose() > **onClose**(`handler`): () => `void` Subscribe to connection close. Returns an unsubscribe function. #### Parameters ##### handler `CloseHandler` #### Returns () => `void` #### Implementation of `IStreamTransport.onClose` *** ### onData() > **onData**(`handler`): () => `void` Subscribe to data chunks. Returns an unsubscribe function. #### Parameters ##### handler `DataHandler` #### Returns () => `void` #### Implementation of `IStreamTransport.onData` *** ### onError() > **onError**(`handler`): () => `void` Subscribe to transport errors. Returns an unsubscribe function. #### Parameters ##### handler `ErrorHandler` #### Returns () => `void` #### Implementation of `IStreamTransport.onError` *** ### send() > **send**(`data`): `Promise`\<`void`\> Send bytes to the remote peer. - Returns a promise that resolves once the bytes are accepted by the underlying transport (or after the documented backpressure policy). - Rejects with `ClosedTransportError` if the transport is closed. - Rejects with the underlying error if delivery fails. #### Parameters ##### data `Uint8Array` #### Returns `Promise`\<`void`\> #### Implementation of `IStreamTransport.send` *** ### serverStream() > **serverStream**(`path`, `payload`, `deadlineMs?`): `Promise`\<[`GrpcStreamHandle`](../interfaces/GrpcStreamHandle.md)\> #### Parameters ##### path `string` ##### payload `Uint8Array` ##### deadlineMs? `number` #### Returns `Promise`\<[`GrpcStreamHandle`](../interfaces/GrpcStreamHandle.md)\> *** ### streamClose() > **streamClose**(`streamId`): `Promise`\<`void`\> #### Parameters ##### streamId `string` #### Returns `Promise`\<`void`\> *** ### streamSend() > **streamSend**(`streamId`, `payload`): `Promise`\<`void`\> #### Parameters ##### streamId `string` ##### payload `Uint8Array` #### Returns `Promise`\<`void`\> *** ### unaryCall() > **unaryCall**(`path`, `payload`, `deadlineMs?`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> #### Parameters ##### path `string` ##### payload `Uint8Array` ##### deadlineMs? `number` #### Returns `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> --- ## Page: createGrpcGateway URL: https://docs.totem.ing/api/totemsdk-edge-grpc/functions/createGrpcGateway [**@totemsdk/edge-grpc**](../index.md) *** [@totemsdk/edge-grpc](../index.md) / createGrpcGateway # Function: createGrpcGateway() > **createGrpcGateway**(`config`): [`GrpcGateway`](../interfaces/GrpcGateway.md) ## Parameters ### config [`GrpcGatewayConfig`](../interfaces/GrpcGatewayConfig.md) ## Returns [`GrpcGateway`](../interfaces/GrpcGateway.md) --- ## Page: createGrpcSensorBridge URL: https://docs.totem.ing/api/totemsdk-edge-grpc/functions/createGrpcSensorBridge [**@totemsdk/edge-grpc**](../index.md) *** [@totemsdk/edge-grpc](../index.md) / createGrpcSensorBridge # Function: createGrpcSensorBridge() > **createGrpcSensorBridge**(`config`): [`GrpcSensorBridge`](../interfaces/GrpcSensorBridge.md) ## Parameters ### config [`GrpcSensorBridgeConfig`](../interfaces/GrpcSensorBridgeConfig.md) ## Returns [`GrpcSensorBridge`](../interfaces/GrpcSensorBridge.md) --- ## Page: GrpcClient URL: https://docs.totem.ing/api/totemsdk-edge-grpc/interfaces/GrpcClient [**@totemsdk/edge-grpc**](../index.md) *** [@totemsdk/edge-grpc](../index.md) / GrpcClient # Interface: GrpcClient ## Methods ### bidiStream() > **bidiStream**(`path`, `deadlineMs?`): `Promise`\<[`GrpcStreamHandle`](GrpcStreamHandle.md)\> #### Parameters ##### path `string` ##### deadlineMs? `number` #### Returns `Promise`\<[`GrpcStreamHandle`](GrpcStreamHandle.md)\> *** ### clientStream() > **clientStream**(`path`, `deadlineMs?`): `Promise`\<[`GrpcStreamHandle`](GrpcStreamHandle.md)\> #### Parameters ##### path `string` ##### deadlineMs? `number` #### Returns `Promise`\<[`GrpcStreamHandle`](GrpcStreamHandle.md)\> *** ### serverStream() > **serverStream**(`path`, `payload`, `deadlineMs?`): `Promise`\<[`GrpcStreamHandle`](GrpcStreamHandle.md)\> #### Parameters ##### path `string` ##### payload `Uint8Array` ##### deadlineMs? `number` #### Returns `Promise`\<[`GrpcStreamHandle`](GrpcStreamHandle.md)\> *** ### unaryCall() > **unaryCall**(`path`, `payload`, `deadlineMs?`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> #### Parameters ##### path `string` ##### payload `Uint8Array` ##### deadlineMs? `number` #### Returns `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> --- ## Page: GrpcGateway URL: https://docs.totem.ing/api/totemsdk-edge-grpc/interfaces/GrpcGateway [**@totemsdk/edge-grpc**](../index.md) *** [@totemsdk/edge-grpc](../index.md) / GrpcGateway # Interface: GrpcGateway ## Properties ### status > `readonly` **status**: `"stopped"` \| `"running"` \| `"error"` ## Methods ### call() > **call**(`path`, `payload`, `timeoutMs?`): `Promise`\<`EdgeOperationResult`\<\{ `payload`: `Uint8Array`; \}\>\> #### Parameters ##### path `string` ##### payload `Uint8Array` ##### timeoutMs? `number` #### Returns `Promise`\<`EdgeOperationResult`\<\{ `payload`: `Uint8Array`; \}\>\> *** ### openBidiStream() > **openBidiStream**(`path`, `timeoutMs?`): `Promise`\<`EdgeOperationResult`\<[`GrpcStreamHandle`](GrpcStreamHandle.md)\>\> #### Parameters ##### path `string` ##### timeoutMs? `number` #### Returns `Promise`\<`EdgeOperationResult`\<[`GrpcStreamHandle`](GrpcStreamHandle.md)\>\> *** ### openClientStream() > **openClientStream**(`path`, `timeoutMs?`): `Promise`\<`EdgeOperationResult`\<[`GrpcStreamHandle`](GrpcStreamHandle.md)\>\> #### Parameters ##### path `string` ##### timeoutMs? `number` #### Returns `Promise`\<`EdgeOperationResult`\<[`GrpcStreamHandle`](GrpcStreamHandle.md)\>\> *** ### openServerStream() > **openServerStream**(`path`, `payload`, `timeoutMs?`): `Promise`\<`EdgeOperationResult`\<[`GrpcStreamHandle`](GrpcStreamHandle.md)\>\> #### Parameters ##### path `string` ##### payload `Uint8Array` ##### timeoutMs? `number` #### Returns `Promise`\<`EdgeOperationResult`\<[`GrpcStreamHandle`](GrpcStreamHandle.md)\>\> *** ### start() > **start**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### stop() > **stop**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> --- ## Page: GrpcGatewayConfig URL: https://docs.totem.ing/api/totemsdk-edge-grpc/interfaces/GrpcGatewayConfig [**@totemsdk/edge-grpc**](../index.md) *** [@totemsdk/edge-grpc](../index.md) / GrpcGatewayConfig # Interface: GrpcGatewayConfig ## Properties ### client > **client**: [`GrpcClient`](GrpcClient.md) *** ### runtime > **runtime**: `EdgeRuntime` --- ## Page: GrpcMessage URL: https://docs.totem.ing/api/totemsdk-edge-grpc/interfaces/GrpcMessage [**@totemsdk/edge-grpc**](../index.md) *** [@totemsdk/edge-grpc](../index.md) / GrpcMessage # Interface: GrpcMessage ## Properties ### isResponse > **isResponse**: `boolean` *** ### path > **path**: `string` *** ### payload > **payload**: `Uint8Array` *** ### receivedAt > **receivedAt**: `number` *** ### requestId? > `optional` **requestId?**: `string` --- ## Page: GrpcSensorBinding URL: https://docs.totem.ing/api/totemsdk-edge-grpc/interfaces/GrpcSensorBinding [**@totemsdk/edge-grpc**](../index.md) *** [@totemsdk/edge-grpc](../index.md) / GrpcSensorBinding # Interface: GrpcSensorBinding ## Properties ### dataType? > `optional` **dataType?**: `string` *** ### intervalMs > **intervalMs**: `number` *** ### path > **path**: `string` *** ### requestPayload? > `optional` **requestPayload?**: `Uint8Array`\<`ArrayBufferLike`\> *** ### sensorId > **sensorId**: `string` --- ## Page: GrpcSensorBridge URL: https://docs.totem.ing/api/totemsdk-edge-grpc/interfaces/GrpcSensorBridge [**@totemsdk/edge-grpc**](../index.md) *** [@totemsdk/edge-grpc](../index.md) / GrpcSensorBridge # Interface: GrpcSensorBridge ## Methods ### poll() > **poll**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### start() > **start**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### stop() > **stop**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> --- ## Page: GrpcSensorBridgeConfig URL: https://docs.totem.ing/api/totemsdk-edge-grpc/interfaces/GrpcSensorBridgeConfig [**@totemsdk/edge-grpc**](../index.md) *** [@totemsdk/edge-grpc](../index.md) / GrpcSensorBridgeConfig # Interface: GrpcSensorBridgeConfig ## Properties ### bindings > **bindings**: [`GrpcSensorBinding`](GrpcSensorBinding.md)[] *** ### gateway? > `optional` **gateway?**: [`GrpcGateway`](GrpcGateway.md) *** ### runtime > **runtime**: `EdgeRuntime` *** ### transport > **transport**: `IStreamTransport` --- ## Page: GrpcStreamHandle URL: https://docs.totem.ing/api/totemsdk-edge-grpc/interfaces/GrpcStreamHandle [**@totemsdk/edge-grpc**](../index.md) *** [@totemsdk/edge-grpc](../index.md) / GrpcStreamHandle # Interface: GrpcStreamHandle ## Properties ### streamId > `readonly` **streamId**: `string` ## Methods ### close() > **close**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### onData() > **onData**(`handler`): () => `void` #### Parameters ##### handler (`payload`) => `void` #### Returns () => `void` *** ### onEnd() > **onEnd**(`handler`): () => `void` #### Parameters ##### handler () => `void` #### Returns () => `void` *** ### onError() > **onError**(`handler`): () => `void` #### Parameters ##### handler (`err`) => `void` #### Returns () => `void` *** ### send() > **send**(`payload`): `Promise`\<`void`\> #### Parameters ##### payload `Uint8Array` #### Returns `Promise`\<`void`\> --- ## Page: NativeGrpcConfig URL: https://docs.totem.ing/api/totemsdk-edge-grpc/interfaces/NativeGrpcConfig [**@totemsdk/edge-grpc**](../index.md) *** [@totemsdk/edge-grpc](../index.md) / NativeGrpcConfig # Interface: NativeGrpcConfig ## Properties ### connectTimeoutMs? > `optional` **connectTimeoutMs?**: `number` *** ### host? > `optional` **host?**: `string` *** ### port? > `optional` **port?**: `number` *** ### requestTimeoutMs? > `optional` **requestTimeoutMs?**: `number` --- ## Page: GrpcTransportPort URL: https://docs.totem.ing/api/totemsdk-edge-grpc/type-aliases/GrpcTransportPort [**@totemsdk/edge-grpc**](../index.md) *** [@totemsdk/edge-grpc](../index.md) / GrpcTransportPort # Type Alias: GrpcTransportPort > **GrpcTransportPort** = `IStreamTransport` --- ## Page: createLorawanGateway URL: https://docs.totem.ing/api/totemsdk-edge-lorawan/functions/createLorawanGateway [**@totemsdk/edge-lorawan**](../index.md) *** [@totemsdk/edge-lorawan](../index.md) / createLorawanGateway # Function: createLorawanGateway() > **createLorawanGateway**(`config`): [`LorawanGateway`](../interfaces/LorawanGateway.md) ## Parameters ### config [`LorawanGatewayConfig`](../interfaces/LorawanGatewayConfig.md) ## Returns [`LorawanGateway`](../interfaces/LorawanGateway.md) --- ## Page: createLorawanSensorBridge URL: https://docs.totem.ing/api/totemsdk-edge-lorawan/functions/createLorawanSensorBridge [**@totemsdk/edge-lorawan**](../index.md) *** [@totemsdk/edge-lorawan](../index.md) / createLorawanSensorBridge # Function: createLorawanSensorBridge() > **createLorawanSensorBridge**(`config`): [`LorawanSensorBridge`](../interfaces/LorawanSensorBridge.md) ## Parameters ### config [`LorawanSensorBridgeConfig`](../interfaces/LorawanSensorBridgeConfig.md) ## Returns [`LorawanSensorBridge`](../interfaces/LorawanSensorBridge.md) --- ## Page: LorawanGateway URL: https://docs.totem.ing/api/totemsdk-edge-lorawan/interfaces/LorawanGateway [**@totemsdk/edge-lorawan**](../index.md) *** [@totemsdk/edge-lorawan](../index.md) / LorawanGateway # Interface: LorawanGateway ## Properties ### status > `readonly` **status**: `"stopped"` \| `"running"` \| `"error"` ## Methods ### sendConfirmed() > **sendConfirmed**(`port`, `data`): `Promise`\<`void`\> Send a confirmed uplink. #### Parameters ##### port `number` ##### data `Uint8Array` #### Returns `Promise`\<`void`\> *** ### sendUnconfirmed() > **sendUnconfirmed**(`port`, `data`): `Promise`\<`void`\> Send an unconfirmed uplink. #### Parameters ##### port `number` ##### data `Uint8Array` #### Returns `Promise`\<`void`\> *** ### start() > **start**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### stop() > **stop**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> --- ## Page: LorawanGatewayConfig URL: https://docs.totem.ing/api/totemsdk-edge-lorawan/interfaces/LorawanGatewayConfig [**@totemsdk/edge-lorawan**](../index.md) *** [@totemsdk/edge-lorawan](../index.md) / LorawanGatewayConfig # Interface: LorawanGatewayConfig ## Properties ### abp? > `optional` **abp?**: `object` ABP credentials. #### appSKey > **appSKey**: `string` #### devAddr > **devAddr**: `string` #### nwkSKey > **nwkSKey**: `string` *** ### otaa? > `optional` **otaa?**: `object` OTAA credentials. #### appEui > **appEui**: `string` #### appKey > **appKey**: `string` #### devEui > **devEui**: `string` *** ### runtime > **runtime**: `EdgeRuntime` *** ### transport > **transport**: [`LorawanTransportPort`](LorawanTransportPort.md) --- ## Page: LorawanMessage URL: https://docs.totem.ing/api/totemsdk-edge-lorawan/interfaces/LorawanMessage [**@totemsdk/edge-lorawan**](../index.md) *** [@totemsdk/edge-lorawan](../index.md) / LorawanMessage # Interface: LorawanMessage ## Properties ### confirmed > **confirmed**: `boolean` Whether this was a confirmed message. *** ### frameCounter > **frameCounter**: `number` Frame counter. *** ### payload > **payload**: `Uint8Array` Payload bytes. *** ### port > **port**: `number` Application port (1-223). *** ### receivedAt > **receivedAt**: `number` Timestamp of receipt. *** ### rssi > **rssi**: `number` Received signal strength in dBm. *** ### snr > **snr**: `number` Signal-to-noise ratio in dB. --- ## Page: LorawanSensorBinding URL: https://docs.totem.ing/api/totemsdk-edge-lorawan/interfaces/LorawanSensorBinding [**@totemsdk/edge-lorawan**](../index.md) *** [@totemsdk/edge-lorawan](../index.md) / LorawanSensorBinding # Interface: LorawanSensorBinding ## Properties ### dataType? > `optional` **dataType?**: `string` *** ### intervalMs > **intervalMs**: `number` *** ### port > **port**: `number` *** ### sensorId > **sensorId**: `string` *** ### unit? > `optional` **unit?**: `string` --- ## Page: LorawanSensorBridge URL: https://docs.totem.ing/api/totemsdk-edge-lorawan/interfaces/LorawanSensorBridge [**@totemsdk/edge-lorawan**](../index.md) *** [@totemsdk/edge-lorawan](../index.md) / LorawanSensorBridge # Interface: LorawanSensorBridge ## Methods ### poll() > **poll**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### start() > **start**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### stop() > **stop**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> --- ## Page: LorawanSensorBridgeConfig URL: https://docs.totem.ing/api/totemsdk-edge-lorawan/interfaces/LorawanSensorBridgeConfig [**@totemsdk/edge-lorawan**](../index.md) *** [@totemsdk/edge-lorawan](../index.md) / LorawanSensorBridgeConfig # Interface: LorawanSensorBridgeConfig ## Properties ### bindings > **bindings**: [`LorawanSensorBinding`](LorawanSensorBinding.md)[] *** ### gateway? > `optional` **gateway?**: [`LorawanGateway`](LorawanGateway.md) *** ### runtime > **runtime**: `EdgeRuntime` *** ### transport > **transport**: [`LorawanTransportPort`](LorawanTransportPort.md) --- ## Page: LorawanTransportPort URL: https://docs.totem.ing/api/totemsdk-edge-lorawan/interfaces/LorawanTransportPort [**@totemsdk/edge-lorawan**](../index.md) *** [@totemsdk/edge-lorawan](../index.md) / LorawanTransportPort # Interface: LorawanTransportPort LoRaWAN transport port — injected by the caller. Supports OTAA (Over-The-Air Activation) and ABP (Activation By Personalization). The caller provides the radio or network server. ## Methods ### activateAbp() > **activateAbp**(`devAddr`, `nwkSKey`, `appSKey`): `Promise`\<`void`\> Activate via ABP with pre-provisioned keys. #### Parameters ##### devAddr `string` ##### nwkSKey `string` ##### appSKey `string` #### Returns `Promise`\<`void`\> *** ### joinOtaa() > **joinOtaa**(`devEui`, `appEui`, `appKey`): `Promise`\<`void`\> Join the network via OTAA. #### Parameters ##### devEui `string` ##### appEui `string` ##### appKey `string` #### Returns `Promise`\<`void`\> *** ### onDownlink() > **onDownlink**(`handler`): () => `void` Register handler for downlink messages. #### Parameters ##### handler (`message`) => `void` #### Returns () => `void` *** ### onError() > **onError**(`handler`): () => `void` Register handler for errors. #### Parameters ##### handler (`err`) => `void` #### Returns () => `void` *** ### onJoin() > **onJoin**(`handler`): () => `void` Register handler for join/activation events. #### Parameters ##### handler (`devAddr`) => `void` #### Returns () => `void` *** ### sendConfirmed() > **sendConfirmed**(`port`, `data`): `Promise`\<`void`\> Send a confirmed uplink (requires ACK). #### Parameters ##### port `number` ##### data `Uint8Array` #### Returns `Promise`\<`void`\> *** ### sendUnconfirmed() > **sendUnconfirmed**(`port`, `data`): `Promise`\<`void`\> Send an unconfirmed uplink (no ACK). #### Parameters ##### port `number` ##### data `Uint8Array` #### Returns `Promise`\<`void`\> --- ## Page: createMatterGateway URL: https://docs.totem.ing/api/totemsdk-edge-matter/functions/createMatterGateway [**@totemsdk/edge-matter**](../index.md) *** [@totemsdk/edge-matter](../index.md) / createMatterGateway # Function: createMatterGateway() > **createMatterGateway**(`config`): [`MatterGateway`](../interfaces/MatterGateway.md) ## Parameters ### config [`MatterGatewayConfig`](../interfaces/MatterGatewayConfig.md) ## Returns [`MatterGateway`](../interfaces/MatterGateway.md) --- ## Page: createMatterSensorBridge URL: https://docs.totem.ing/api/totemsdk-edge-matter/functions/createMatterSensorBridge [**@totemsdk/edge-matter**](../index.md) *** [@totemsdk/edge-matter](../index.md) / createMatterSensorBridge # Function: createMatterSensorBridge() > **createMatterSensorBridge**(`config`): [`MatterSensorBridge`](../interfaces/MatterSensorBridge.md) ## Parameters ### config [`MatterSensorBridgeConfig`](../interfaces/MatterSensorBridgeConfig.md) ## Returns [`MatterSensorBridge`](../interfaces/MatterSensorBridge.md) --- ## Page: MatterAttribute URL: https://docs.totem.ing/api/totemsdk-edge-matter/interfaces/MatterAttribute [**@totemsdk/edge-matter**](../index.md) *** [@totemsdk/edge-matter](../index.md) / MatterAttribute # Interface: MatterAttribute ## Properties ### attributeId > **attributeId**: `number` *** ### attributeName? > `optional` **attributeName?**: `string` *** ### dataType > **dataType**: `string` *** ### value > **value**: `unknown` --- ## Page: MatterAttributeBinding URL: https://docs.totem.ing/api/totemsdk-edge-matter/interfaces/MatterAttributeBinding [**@totemsdk/edge-matter**](../index.md) *** [@totemsdk/edge-matter](../index.md) / MatterAttributeBinding # Interface: MatterAttributeBinding ## Properties ### attributeIds > **attributeIds**: `number`[] *** ### clusterId > **clusterId**: `number` *** ### endpointId > **endpointId**: `number` *** ### maxInterval > **maxInterval**: `number` *** ### minInterval > **minInterval**: `number` *** ### nodeId > **nodeId**: `string` *** ### sensorId? > `optional` **sensorId?**: `string` --- ## Page: MatterAttributeValue URL: https://docs.totem.ing/api/totemsdk-edge-matter/interfaces/MatterAttributeValue [**@totemsdk/edge-matter**](../index.md) *** [@totemsdk/edge-matter](../index.md) / MatterAttributeValue # Interface: MatterAttributeValue ## Properties ### attributeId > **attributeId**: `number` *** ### clusterId > **clusterId**: `number` *** ### dataType > **dataType**: `string` *** ### endpointId > **endpointId**: `number` *** ### nodeId > **nodeId**: `string` *** ### receivedAt > **receivedAt**: `number` *** ### value > **value**: `unknown` --- ## Page: MatterCluster URL: https://docs.totem.ing/api/totemsdk-edge-matter/interfaces/MatterCluster [**@totemsdk/edge-matter**](../index.md) *** [@totemsdk/edge-matter](../index.md) / MatterCluster # Interface: MatterCluster ## Properties ### attributes > **attributes**: [`MatterAttribute`](MatterAttribute.md)[] *** ### clusterId > **clusterId**: `number` *** ### clusterName? > `optional` **clusterName?**: `string` *** ### commands > **commands**: [`MatterCommand`](MatterCommand.md)[] --- ## Page: MatterCommand URL: https://docs.totem.ing/api/totemsdk-edge-matter/interfaces/MatterCommand [**@totemsdk/edge-matter**](../index.md) *** [@totemsdk/edge-matter](../index.md) / MatterCommand # Interface: MatterCommand ## Properties ### commandId > **commandId**: `number` *** ### commandName? > `optional` **commandName?**: `string` *** ### direction > **direction**: `"client_to_server"` \| `"server_to_client"` --- ## Page: MatterCommissionableDevice URL: https://docs.totem.ing/api/totemsdk-edge-matter/interfaces/MatterCommissionableDevice [**@totemsdk/edge-matter**](../index.md) *** [@totemsdk/edge-matter](../index.md) / MatterCommissionableDevice # Interface: MatterCommissionableDevice ## Properties ### discriminator > **discriminator**: `number` *** ### pairingHint? > `optional` **pairingHint?**: `number` *** ### pairingInstruction? > `optional` **pairingInstruction?**: `string` *** ### productId > **productId**: `number` *** ### vendorId > **vendorId**: `number` --- ## Page: MatterEndpoint URL: https://docs.totem.ing/api/totemsdk-edge-matter/interfaces/MatterEndpoint [**@totemsdk/edge-matter**](../index.md) *** [@totemsdk/edge-matter](../index.md) / MatterEndpoint # Interface: MatterEndpoint ## Properties ### clusters > **clusters**: [`MatterCluster`](MatterCluster.md)[] *** ### deviceType > **deviceType**: `number` *** ### deviceTypeName? > `optional` **deviceTypeName?**: `string` *** ### endpointId > **endpointId**: `number` --- ## Page: MatterGateway URL: https://docs.totem.ing/api/totemsdk-edge-matter/interfaces/MatterGateway [**@totemsdk/edge-matter**](../index.md) *** [@totemsdk/edge-matter](../index.md) / MatterGateway # Interface: MatterGateway ## Properties ### status > `readonly` **status**: `"stopped"` \| `"running"` \| `"error"` ## Methods ### commission() > **commission**(`discriminator`, `setupCode`): `Promise`\<`EdgeOperationResult`\<\{ `node`: [`MatterNode`](MatterNode.md); \}\>\> Commission a device onto the fabric. #### Parameters ##### discriminator `number` ##### setupCode `string` #### Returns `Promise`\<`EdgeOperationResult`\<\{ `node`: [`MatterNode`](MatterNode.md); \}\>\> *** ### invokeCommand() > **invokeCommand**(`nodeId`, `endpointId`, `clusterId`, `commandId`, `args`): `Promise`\<`EdgeOperationResult`\<\{ `result`: `unknown`; \}\>\> Invoke a command on a node. #### Parameters ##### nodeId `string` ##### endpointId `number` ##### clusterId `number` ##### commandId `number` ##### args `unknown` #### Returns `Promise`\<`EdgeOperationResult`\<\{ `result`: `unknown`; \}\>\> *** ### readAttribute() > **readAttribute**(`nodeId`, `endpointId`, `clusterId`, `attributeId`): `Promise`\<`EdgeOperationResult`\<\{ `value`: [`MatterAttributeValue`](MatterAttributeValue.md); \}\>\> Read an attribute from a node. #### Parameters ##### nodeId `string` ##### endpointId `number` ##### clusterId `number` ##### attributeId `number` #### Returns `Promise`\<`EdgeOperationResult`\<\{ `value`: [`MatterAttributeValue`](MatterAttributeValue.md); \}\>\> *** ### start() > **start**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### stop() > **stop**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### writeAttribute() > **writeAttribute**(`nodeId`, `endpointId`, `clusterId`, `attributeId`, `value`): `Promise`\<`EdgeOperationResult`\<`unknown`\>\> Write an attribute to a node. #### Parameters ##### nodeId `string` ##### endpointId `number` ##### clusterId `number` ##### attributeId `number` ##### value `unknown` #### Returns `Promise`\<`EdgeOperationResult`\<`unknown`\>\> --- ## Page: MatterGatewayConfig URL: https://docs.totem.ing/api/totemsdk-edge-matter/interfaces/MatterGatewayConfig [**@totemsdk/edge-matter**](../index.md) *** [@totemsdk/edge-matter](../index.md) / MatterGatewayConfig # Interface: MatterGatewayConfig ## Properties ### productId > **productId**: `number` *** ### runtime > **runtime**: `EdgeRuntime` *** ### subscriptions? > `optional` **subscriptions?**: [`MatterAttributeBinding`](MatterAttributeBinding.md)[] Attributes to subscribe to on start. *** ### transport > **transport**: [`MatterTransportPort`](MatterTransportPort.md) *** ### vendorId > **vendorId**: `number` --- ## Page: MatterNode URL: https://docs.totem.ing/api/totemsdk-edge-matter/interfaces/MatterNode [**@totemsdk/edge-matter**](../index.md) *** [@totemsdk/edge-matter](../index.md) / MatterNode # Interface: MatterNode ## Properties ### endpoints > **endpoints**: [`MatterEndpoint`](MatterEndpoint.md)[] *** ### nodeId > **nodeId**: `string` *** ### productId > **productId**: `number` *** ### productName? > `optional` **productName?**: `string` *** ### vendorId > **vendorId**: `number` *** ### vendorName? > `optional` **vendorName?**: `string` --- ## Page: MatterSensorBinding URL: https://docs.totem.ing/api/totemsdk-edge-matter/interfaces/MatterSensorBinding [**@totemsdk/edge-matter**](../index.md) *** [@totemsdk/edge-matter](../index.md) / MatterSensorBinding # Interface: MatterSensorBinding ## Properties ### attributeId > **attributeId**: `number` *** ### clusterId > **clusterId**: `number` *** ### dataType? > `optional` **dataType?**: `string` *** ### endpointId > **endpointId**: `number` *** ### intervalMs > **intervalMs**: `number` *** ### nodeId > **nodeId**: `string` *** ### sensorId > **sensorId**: `string` *** ### unit? > `optional` **unit?**: `string` --- ## Page: MatterSensorBridge URL: https://docs.totem.ing/api/totemsdk-edge-matter/interfaces/MatterSensorBridge [**@totemsdk/edge-matter**](../index.md) *** [@totemsdk/edge-matter](../index.md) / MatterSensorBridge # Interface: MatterSensorBridge ## Methods ### poll() > **poll**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### start() > **start**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### stop() > **stop**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> --- ## Page: MatterSensorBridgeConfig URL: https://docs.totem.ing/api/totemsdk-edge-matter/interfaces/MatterSensorBridgeConfig [**@totemsdk/edge-matter**](../index.md) *** [@totemsdk/edge-matter](../index.md) / MatterSensorBridgeConfig # Interface: MatterSensorBridgeConfig ## Properties ### bindings > **bindings**: [`MatterSensorBinding`](MatterSensorBinding.md)[] *** ### gateway? > `optional` **gateway?**: [`MatterGateway`](MatterGateway.md) *** ### runtime > **runtime**: `EdgeRuntime` *** ### transport > **transport**: [`MatterTransportPort`](MatterTransportPort.md) --- ## Page: MatterSubscription URL: https://docs.totem.ing/api/totemsdk-edge-matter/interfaces/MatterSubscription [**@totemsdk/edge-matter**](../index.md) *** [@totemsdk/edge-matter](../index.md) / MatterSubscription # Interface: MatterSubscription ## Methods ### cancel() > **cancel**(): `Promise`\<`void`\> Cancel the subscription. #### Returns `Promise`\<`void`\> *** ### onChange() > **onChange**(`handler`): () => `void` Register handler for attribute change reports. #### Parameters ##### handler (`reports`) => `void` #### Returns () => `void` --- ## Page: MatterTransportPort URL: https://docs.totem.ing/api/totemsdk-edge-matter/interfaces/MatterTransportPort [**@totemsdk/edge-matter**](../index.md) *** [@totemsdk/edge-matter](../index.md) / MatterTransportPort # Interface: MatterTransportPort Matter transport port — injected by the caller. Matter (formerly Project CHIP) is a smart home standard supporting BLE, WiFi, and Thread transports. The caller provides the Matter SDK. ## Methods ### commission() > **commission**(`device`, `setupCode`): `Promise`\<[`MatterNode`](MatterNode.md)\> Commission a device onto the fabric. #### Parameters ##### device [`MatterCommissionableDevice`](MatterCommissionableDevice.md) ##### setupCode `string` #### Returns `Promise`\<[`MatterNode`](MatterNode.md)\> *** ### decommission() > **decommission**(`nodeId`): `Promise`\<`void`\> Remove a device from the fabric. #### Parameters ##### nodeId `string` #### Returns `Promise`\<`void`\> *** ### init() > **init**(`vendorId`, `productId`): `Promise`\<`void`\> Initialise the Matter stack. #### Parameters ##### vendorId `number` ##### productId `number` #### Returns `Promise`\<`void`\> *** ### invokeCommand() > **invokeCommand**(`nodeId`, `endpointId`, `clusterId`, `commandId`, `args`): `Promise`\<`unknown`\> Invoke a command on a node. #### Parameters ##### nodeId `string` ##### endpointId `number` ##### clusterId `number` ##### commandId `number` ##### args `unknown` #### Returns `Promise`\<`unknown`\> *** ### onCommissioned() > **onCommissioned**(`handler`): () => `void` Register handler for commissioning events. #### Parameters ##### handler (`node`) => `void` #### Returns () => `void` *** ### onError() > **onError**(`handler`): () => `void` Register handler for errors. #### Parameters ##### handler (`err`) => `void` #### Returns () => `void` *** ### readAttribute() > **readAttribute**(`nodeId`, `endpointId`, `clusterId`, `attributeId`): `Promise`\<[`MatterAttributeValue`](MatterAttributeValue.md)\> Read an attribute from a node. #### Parameters ##### nodeId `string` ##### endpointId `number` ##### clusterId `number` ##### attributeId `number` #### Returns `Promise`\<[`MatterAttributeValue`](MatterAttributeValue.md)\> *** ### shutdown() > **shutdown**(): `Promise`\<`void`\> Shutdown the Matter stack. #### Returns `Promise`\<`void`\> *** ### subscribe() > **subscribe**(`nodeId`, `endpointId`, `clusterId`, `attributeIds`, `minInterval`, `maxInterval`): `Promise`\<[`MatterSubscription`](MatterSubscription.md)\> Subscribe to attribute changes. #### Parameters ##### nodeId `string` ##### endpointId `number` ##### clusterId `number` ##### attributeIds `number`[] ##### minInterval `number` ##### maxInterval `number` #### Returns `Promise`\<[`MatterSubscription`](MatterSubscription.md)\> *** ### writeAttribute() > **writeAttribute**(`nodeId`, `endpointId`, `clusterId`, `attributeId`, `value`): `Promise`\<`void`\> Write an attribute to a node. #### Parameters ##### nodeId `string` ##### endpointId `number` ##### clusterId `number` ##### attributeId `number` ##### value `unknown` #### Returns `Promise`\<`void`\> --- ## Page: NativeModbusTransport URL: https://docs.totem.ing/api/totemsdk-edge-modbus/classes/NativeModbusTransport [**@totemsdk/edge-modbus**](../index.md) *** [@totemsdk/edge-modbus](../index.md) / NativeModbusTransport # Class: NativeModbusTransport Modbus transport port — injected by the caller. Supports Modbus TCP (port 502) and Modbus RTU (serial). The caller provides the actual socket/serial implementation. ## Implements - [`ModbusTransportPort`](../interfaces/ModbusTransportPort.md) ## Constructors ### Constructor > **new NativeModbusTransport**(`config?`): `NativeModbusTransport` #### Parameters ##### config? [`NativeModbusConfig`](../interfaces/NativeModbusConfig.md) = `{}` #### Returns `NativeModbusTransport` ## Methods ### connect() > **connect**(): `Promise`\<`void`\> Open the connection. #### Returns `Promise`\<`void`\> #### Implementation of [`ModbusTransportPort`](../interfaces/ModbusTransportPort.md).[`connect`](../interfaces/ModbusTransportPort.md#connect) *** ### disconnect() > **disconnect**(): `Promise`\<`void`\> Close the connection. #### Returns `Promise`\<`void`\> #### Implementation of [`ModbusTransportPort`](../interfaces/ModbusTransportPort.md).[`disconnect`](../interfaces/ModbusTransportPort.md#disconnect) *** ### onError() > **onError**(`handler`): () => `void` Register a handler for connection errors. #### Parameters ##### handler (`err`) => `void` #### Returns () => `void` #### Implementation of [`ModbusTransportPort`](../interfaces/ModbusTransportPort.md).[`onError`](../interfaces/ModbusTransportPort.md#onerror) *** ### onFrame() > **onFrame**(`handler`): () => `void` Register a handler for unsolicited/inbound frames. #### Parameters ##### handler (`frame`) => `void` #### Returns () => `void` #### Implementation of [`ModbusTransportPort`](../interfaces/ModbusTransportPort.md).[`onFrame`](../interfaces/ModbusTransportPort.md#onframe) *** ### sendFrame() > **sendFrame**(`frame`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> Send a raw Modbus frame and receive the response. #### Parameters ##### frame `Uint8Array` #### Returns `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> #### Implementation of [`ModbusTransportPort`](../interfaces/ModbusTransportPort.md).[`sendFrame`](../interfaces/ModbusTransportPort.md#sendframe) --- ## Page: createModbusGateway URL: https://docs.totem.ing/api/totemsdk-edge-modbus/functions/createModbusGateway [**@totemsdk/edge-modbus**](../index.md) *** [@totemsdk/edge-modbus](../index.md) / createModbusGateway # Function: createModbusGateway() > **createModbusGateway**(`config`): [`ModbusGateway`](../interfaces/ModbusGateway.md) ## Parameters ### config [`ModbusGatewayConfig`](../interfaces/ModbusGatewayConfig.md) ## Returns [`ModbusGateway`](../interfaces/ModbusGateway.md) --- ## Page: createModbusSensorBridge URL: https://docs.totem.ing/api/totemsdk-edge-modbus/functions/createModbusSensorBridge [**@totemsdk/edge-modbus**](../index.md) *** [@totemsdk/edge-modbus](../index.md) / createModbusSensorBridge # Function: createModbusSensorBridge() > **createModbusSensorBridge**(`config`): [`ModbusSensorBridge`](../interfaces/ModbusSensorBridge.md) ## Parameters ### config [`ModbusSensorBridgeConfig`](../interfaces/ModbusSensorBridgeConfig.md) ## Returns [`ModbusSensorBridge`](../interfaces/ModbusSensorBridge.md) --- ## Page: ModbusGateway URL: https://docs.totem.ing/api/totemsdk-edge-modbus/interfaces/ModbusGateway [**@totemsdk/edge-modbus**](../index.md) *** [@totemsdk/edge-modbus](../index.md) / ModbusGateway # Interface: ModbusGateway ## Properties ### status > `readonly` **status**: `"stopped"` \| `"running"` \| `"error"` ## Methods ### readCoils() > **readCoils**(`unitId`, `address`, `count`): `Promise`\<`EdgeOperationResult`\<\{ `values`: `boolean`[]; \}\>\> #### Parameters ##### unitId `number` ##### address `number` ##### count `number` #### Returns `Promise`\<`EdgeOperationResult`\<\{ `values`: `boolean`[]; \}\>\> *** ### readDiscreteInputs() > **readDiscreteInputs**(`unitId`, `address`, `count`): `Promise`\<`EdgeOperationResult`\<\{ `values`: `boolean`[]; \}\>\> #### Parameters ##### unitId `number` ##### address `number` ##### count `number` #### Returns `Promise`\<`EdgeOperationResult`\<\{ `values`: `boolean`[]; \}\>\> *** ### readHoldingRegisters() > **readHoldingRegisters**(`unitId`, `address`, `count`): `Promise`\<`EdgeOperationResult`\<\{ `values`: `number`[]; \}\>\> #### Parameters ##### unitId `number` ##### address `number` ##### count `number` #### Returns `Promise`\<`EdgeOperationResult`\<\{ `values`: `number`[]; \}\>\> *** ### readInputRegisters() > **readInputRegisters**(`unitId`, `address`, `count`): `Promise`\<`EdgeOperationResult`\<\{ `values`: `number`[]; \}\>\> #### Parameters ##### unitId `number` ##### address `number` ##### count `number` #### Returns `Promise`\<`EdgeOperationResult`\<\{ `values`: `number`[]; \}\>\> *** ### start() > **start**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### stop() > **stop**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### writeMultipleCoils() > **writeMultipleCoils**(`unitId`, `address`, `values`): `Promise`\<`EdgeOperationResult`\<`void`\>\> #### Parameters ##### unitId `number` ##### address `number` ##### values `boolean`[] #### Returns `Promise`\<`EdgeOperationResult`\<`void`\>\> *** ### writeMultipleRegisters() > **writeMultipleRegisters**(`unitId`, `address`, `values`): `Promise`\<`EdgeOperationResult`\<`void`\>\> #### Parameters ##### unitId `number` ##### address `number` ##### values `number`[] #### Returns `Promise`\<`EdgeOperationResult`\<`void`\>\> *** ### writeSingleCoil() > **writeSingleCoil**(`unitId`, `address`, `value`): `Promise`\<`EdgeOperationResult`\<`void`\>\> #### Parameters ##### unitId `number` ##### address `number` ##### value `boolean` #### Returns `Promise`\<`EdgeOperationResult`\<`void`\>\> *** ### writeSingleRegister() > **writeSingleRegister**(`unitId`, `address`, `value`): `Promise`\<`EdgeOperationResult`\<`void`\>\> #### Parameters ##### unitId `number` ##### address `number` ##### value `number` #### Returns `Promise`\<`EdgeOperationResult`\<`void`\>\> --- ## Page: ModbusGatewayConfig URL: https://docs.totem.ing/api/totemsdk-edge-modbus/interfaces/ModbusGatewayConfig [**@totemsdk/edge-modbus**](../index.md) *** [@totemsdk/edge-modbus](../index.md) / ModbusGatewayConfig # Interface: ModbusGatewayConfig ## Properties ### runtime > **runtime**: `EdgeRuntime` *** ### transport > **transport**: [`ModbusTransportPort`](ModbusTransportPort.md) *** ### unitMap? > `optional` **unitMap?**: `Record`\<`number`, `string`\> --- ## Page: ModbusMessage URL: https://docs.totem.ing/api/totemsdk-edge-modbus/interfaces/ModbusMessage [**@totemsdk/edge-modbus**](../index.md) *** [@totemsdk/edge-modbus](../index.md) / ModbusMessage # Interface: ModbusMessage ## Properties ### address > **address**: `number` Starting address (0-based). *** ### functionCode > **functionCode**: `number` Modbus function code (1-6, 15, 16). *** ### raw > **raw**: `Uint8Array` Raw frame bytes. *** ### receivedAt > **receivedAt**: `number` Timestamp of receipt. *** ### unitId > **unitId**: `number` Unit/slave ID (1-247). *** ### value > **value**: `number` \| `number`[] Register/coil count or value. --- ## Page: ModbusSensorBinding URL: https://docs.totem.ing/api/totemsdk-edge-modbus/interfaces/ModbusSensorBinding [**@totemsdk/edge-modbus**](../index.md) *** [@totemsdk/edge-modbus](../index.md) / ModbusSensorBinding # Interface: ModbusSensorBinding ## Properties ### address > **address**: `number` *** ### count > **count**: `number` *** ### dataType > **dataType**: `"coil"` \| `"register"` \| `"input"` *** ### functionCode > **functionCode**: `number` *** ### intervalMs > **intervalMs**: `number` *** ### sensorId > **sensorId**: `string` *** ### unit? > `optional` **unit?**: `string` *** ### unitId > **unitId**: `number` --- ## Page: ModbusSensorBridge URL: https://docs.totem.ing/api/totemsdk-edge-modbus/interfaces/ModbusSensorBridge [**@totemsdk/edge-modbus**](../index.md) *** [@totemsdk/edge-modbus](../index.md) / ModbusSensorBridge # Interface: ModbusSensorBridge ## Methods ### poll() > **poll**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### start() > **start**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### stop() > **stop**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> --- ## Page: ModbusSensorBridgeConfig URL: https://docs.totem.ing/api/totemsdk-edge-modbus/interfaces/ModbusSensorBridgeConfig [**@totemsdk/edge-modbus**](../index.md) *** [@totemsdk/edge-modbus](../index.md) / ModbusSensorBridgeConfig # Interface: ModbusSensorBridgeConfig ## Properties ### bindings > **bindings**: [`ModbusSensorBinding`](ModbusSensorBinding.md)[] *** ### gateway? > `optional` **gateway?**: [`ModbusGateway`](ModbusGateway.md) *** ### runtime > **runtime**: `EdgeRuntime` *** ### transport > **transport**: [`ModbusTransportPort`](ModbusTransportPort.md) --- ## Page: ModbusTransportPort URL: https://docs.totem.ing/api/totemsdk-edge-modbus/interfaces/ModbusTransportPort [**@totemsdk/edge-modbus**](../index.md) *** [@totemsdk/edge-modbus](../index.md) / ModbusTransportPort # Interface: ModbusTransportPort Modbus transport port — injected by the caller. Supports Modbus TCP (port 502) and Modbus RTU (serial). The caller provides the actual socket/serial implementation. ## Methods ### connect() > **connect**(): `Promise`\<`void`\> Open the connection. #### Returns `Promise`\<`void`\> *** ### disconnect() > **disconnect**(): `Promise`\<`void`\> Close the connection. #### Returns `Promise`\<`void`\> *** ### onError() > **onError**(`handler`): () => `void` Register a handler for connection errors. #### Parameters ##### handler (`err`) => `void` #### Returns () => `void` *** ### onFrame() > **onFrame**(`handler`): () => `void` Register a handler for unsolicited/inbound frames. #### Parameters ##### handler (`frame`) => `void` #### Returns () => `void` *** ### sendFrame() > **sendFrame**(`frame`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> Send a raw Modbus frame and receive the response. #### Parameters ##### frame `Uint8Array` #### Returns `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> --- ## Page: NativeModbusConfig URL: https://docs.totem.ing/api/totemsdk-edge-modbus/interfaces/NativeModbusConfig [**@totemsdk/edge-modbus**](../index.md) *** [@totemsdk/edge-modbus](../index.md) / NativeModbusConfig # Interface: NativeModbusConfig ## Properties ### connectTimeoutMs? > `optional` **connectTimeoutMs?**: `number` Connection timeout in ms. Default 5000. *** ### host? > `optional` **host?**: `string` *** ### port? > `optional` **port?**: `number` *** ### requestTimeoutMs? > `optional` **requestTimeoutMs?**: `number` Per-request timeout in ms. Default 10000. --- ## Page: MqttClientUnavailableError URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/classes/MqttClientUnavailableError [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttClientUnavailableError # Class: MqttClientUnavailableError Typed error classes for @totemsdk/edge-mqtt. Public methods prefer EdgeOperationResult where practical. These errors are thrown only for programmer/configuration mistakes. ## Extends - [`MqttEdgeError`](MqttEdgeError.md) ## Constructors ### Constructor > **new MqttClientUnavailableError**(`message?`): `MqttClientUnavailableError` #### Parameters ##### message? `string` = `'MQTT client is not available'` #### Returns `MqttClientUnavailableError` #### Overrides [`MqttEdgeError`](MqttEdgeError.md).[`constructor`](MqttEdgeError.md#constructor) ## Properties ### code > `readonly` **code**: `string` #### Inherited from [`MqttEdgeError`](MqttEdgeError.md).[`code`](MqttEdgeError.md#code) *** ### message > **message**: `string` #### Inherited from [`MqttEdgeError`](MqttEdgeError.md).[`message`](MqttEdgeError.md#message) *** ### name > **name**: `string` #### Inherited from [`MqttEdgeError`](MqttEdgeError.md).[`name`](MqttEdgeError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`MqttEdgeError`](MqttEdgeError.md).[`stack`](MqttEdgeError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`MqttEdgeError`](MqttEdgeError.md).[`stackTraceLimit`](MqttEdgeError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`MqttEdgeError`](MqttEdgeError.md).[`captureStackTrace`](MqttEdgeError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`MqttEdgeError`](MqttEdgeError.md).[`prepareStackTrace`](MqttEdgeError.md#preparestacktrace) --- ## Page: MqttCreditExceededError URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/classes/MqttCreditExceededError [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttCreditExceededError # Class: MqttCreditExceededError Typed error classes for @totemsdk/edge-mqtt. Public methods prefer EdgeOperationResult where practical. These errors are thrown only for programmer/configuration mistakes. ## Extends - [`MqttEdgeError`](MqttEdgeError.md) ## Constructors ### Constructor > **new MqttCreditExceededError**(`message?`): `MqttCreditExceededError` #### Parameters ##### message? `string` = `'Unpaid credit limit exceeded'` #### Returns `MqttCreditExceededError` #### Overrides [`MqttEdgeError`](MqttEdgeError.md).[`constructor`](MqttEdgeError.md#constructor) ## Properties ### code > `readonly` **code**: `string` #### Inherited from [`MqttEdgeError`](MqttEdgeError.md).[`code`](MqttEdgeError.md#code) *** ### message > **message**: `string` #### Inherited from [`MqttEdgeError`](MqttEdgeError.md).[`message`](MqttEdgeError.md#message) *** ### name > **name**: `string` #### Inherited from [`MqttEdgeError`](MqttEdgeError.md).[`name`](MqttEdgeError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`MqttEdgeError`](MqttEdgeError.md).[`stack`](MqttEdgeError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`MqttEdgeError`](MqttEdgeError.md).[`stackTraceLimit`](MqttEdgeError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`MqttEdgeError`](MqttEdgeError.md).[`captureStackTrace`](MqttEdgeError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`MqttEdgeError`](MqttEdgeError.md).[`prepareStackTrace`](MqttEdgeError.md#preparestacktrace) --- ## Page: MqttEdgeError URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/classes/MqttEdgeError [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttEdgeError # Class: MqttEdgeError Typed error classes for @totemsdk/edge-mqtt. Public methods prefer EdgeOperationResult where practical. These errors are thrown only for programmer/configuration mistakes. ## Extends - `Error` ## Extended by - [`MqttClientUnavailableError`](MqttClientUnavailableError.md) - [`MqttPolicyRejectedError`](MqttPolicyRejectedError.md) - [`MqttPaymentRequiredError`](MqttPaymentRequiredError.md) - [`MqttCreditExceededError`](MqttCreditExceededError.md) - [`MqttProofCreationError`](MqttProofCreationError.md) - [`MqttQueueError`](MqttQueueError.md) ## Constructors ### Constructor > **new MqttEdgeError**(`message`, `code?`): `MqttEdgeError` #### Parameters ##### message `string` ##### code? `string` = `'MQTT_EDGE_ERROR'` #### Returns `MqttEdgeError` #### Overrides `Error.constructor` ## Properties ### code > `readonly` **code**: `string` *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: MqttPaymentRequiredError URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/classes/MqttPaymentRequiredError [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttPaymentRequiredError # Class: MqttPaymentRequiredError Typed error classes for @totemsdk/edge-mqtt. Public methods prefer EdgeOperationResult where practical. These errors are thrown only for programmer/configuration mistakes. ## Extends - [`MqttEdgeError`](MqttEdgeError.md) ## Constructors ### Constructor > **new MqttPaymentRequiredError**(`message?`): `MqttPaymentRequiredError` #### Parameters ##### message? `string` = `'Payment required to process this message'` #### Returns `MqttPaymentRequiredError` #### Overrides [`MqttEdgeError`](MqttEdgeError.md).[`constructor`](MqttEdgeError.md#constructor) ## Properties ### code > `readonly` **code**: `string` #### Inherited from [`MqttEdgeError`](MqttEdgeError.md).[`code`](MqttEdgeError.md#code) *** ### message > **message**: `string` #### Inherited from [`MqttEdgeError`](MqttEdgeError.md).[`message`](MqttEdgeError.md#message) *** ### name > **name**: `string` #### Inherited from [`MqttEdgeError`](MqttEdgeError.md).[`name`](MqttEdgeError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`MqttEdgeError`](MqttEdgeError.md).[`stack`](MqttEdgeError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`MqttEdgeError`](MqttEdgeError.md).[`stackTraceLimit`](MqttEdgeError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`MqttEdgeError`](MqttEdgeError.md).[`captureStackTrace`](MqttEdgeError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`MqttEdgeError`](MqttEdgeError.md).[`prepareStackTrace`](MqttEdgeError.md#preparestacktrace) --- ## Page: MqttPolicyRejectedError URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/classes/MqttPolicyRejectedError [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttPolicyRejectedError # Class: MqttPolicyRejectedError Typed error classes for @totemsdk/edge-mqtt. Public methods prefer EdgeOperationResult where practical. These errors are thrown only for programmer/configuration mistakes. ## Extends - [`MqttEdgeError`](MqttEdgeError.md) ## Constructors ### Constructor > **new MqttPolicyRejectedError**(`message?`): `MqttPolicyRejectedError` #### Parameters ##### message? `string` = `'Command rejected by policy'` #### Returns `MqttPolicyRejectedError` #### Overrides [`MqttEdgeError`](MqttEdgeError.md).[`constructor`](MqttEdgeError.md#constructor) ## Properties ### code > `readonly` **code**: `string` #### Inherited from [`MqttEdgeError`](MqttEdgeError.md).[`code`](MqttEdgeError.md#code) *** ### message > **message**: `string` #### Inherited from [`MqttEdgeError`](MqttEdgeError.md).[`message`](MqttEdgeError.md#message) *** ### name > **name**: `string` #### Inherited from [`MqttEdgeError`](MqttEdgeError.md).[`name`](MqttEdgeError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`MqttEdgeError`](MqttEdgeError.md).[`stack`](MqttEdgeError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`MqttEdgeError`](MqttEdgeError.md).[`stackTraceLimit`](MqttEdgeError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`MqttEdgeError`](MqttEdgeError.md).[`captureStackTrace`](MqttEdgeError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`MqttEdgeError`](MqttEdgeError.md).[`prepareStackTrace`](MqttEdgeError.md#preparestacktrace) --- ## Page: MqttProofCreationError URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/classes/MqttProofCreationError [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttProofCreationError # Class: MqttProofCreationError Typed error classes for @totemsdk/edge-mqtt. Public methods prefer EdgeOperationResult where practical. These errors are thrown only for programmer/configuration mistakes. ## Extends - [`MqttEdgeError`](MqttEdgeError.md) ## Constructors ### Constructor > **new MqttProofCreationError**(`message?`): `MqttProofCreationError` #### Parameters ##### message? `string` = `'Failed to create proof from MQTT message'` #### Returns `MqttProofCreationError` #### Overrides [`MqttEdgeError`](MqttEdgeError.md).[`constructor`](MqttEdgeError.md#constructor) ## Properties ### code > `readonly` **code**: `string` #### Inherited from [`MqttEdgeError`](MqttEdgeError.md).[`code`](MqttEdgeError.md#code) *** ### message > **message**: `string` #### Inherited from [`MqttEdgeError`](MqttEdgeError.md).[`message`](MqttEdgeError.md#message) *** ### name > **name**: `string` #### Inherited from [`MqttEdgeError`](MqttEdgeError.md).[`name`](MqttEdgeError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`MqttEdgeError`](MqttEdgeError.md).[`stack`](MqttEdgeError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`MqttEdgeError`](MqttEdgeError.md).[`stackTraceLimit`](MqttEdgeError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`MqttEdgeError`](MqttEdgeError.md).[`captureStackTrace`](MqttEdgeError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`MqttEdgeError`](MqttEdgeError.md).[`prepareStackTrace`](MqttEdgeError.md#preparestacktrace) --- ## Page: MqttQueueError URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/classes/MqttQueueError [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttQueueError # Class: MqttQueueError Typed error classes for @totemsdk/edge-mqtt. Public methods prefer EdgeOperationResult where practical. These errors are thrown only for programmer/configuration mistakes. ## Extends - [`MqttEdgeError`](MqttEdgeError.md) ## Constructors ### Constructor > **new MqttQueueError**(`message?`): `MqttQueueError` #### Parameters ##### message? `string` = `'MQTT queue operation failed'` #### Returns `MqttQueueError` #### Overrides [`MqttEdgeError`](MqttEdgeError.md).[`constructor`](MqttEdgeError.md#constructor) ## Properties ### code > `readonly` **code**: `string` #### Inherited from [`MqttEdgeError`](MqttEdgeError.md).[`code`](MqttEdgeError.md#code) *** ### message > **message**: `string` #### Inherited from [`MqttEdgeError`](MqttEdgeError.md).[`message`](MqttEdgeError.md#message) *** ### name > **name**: `string` #### Inherited from [`MqttEdgeError`](MqttEdgeError.md).[`name`](MqttEdgeError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`MqttEdgeError`](MqttEdgeError.md).[`stack`](MqttEdgeError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`MqttEdgeError`](MqttEdgeError.md).[`stackTraceLimit`](MqttEdgeError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`MqttEdgeError`](MqttEdgeError.md).[`captureStackTrace`](MqttEdgeError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`MqttEdgeError`](MqttEdgeError.md).[`prepareStackTrace`](MqttEdgeError.md#preparestacktrace) --- ## Page: announceMqttService URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/functions/announceMqttService [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / announceMqttService # Function: announceMqttService() > **announceMqttService**(`runtime`, `params`): `Promise`\<`EdgeOperationResult`\<`unknown`\>\> Announce to a single runtime's lookup port. ## Parameters ### runtime `EdgeRuntime` ### params `AnnounceParams` ## Returns `Promise`\<`EdgeOperationResult`\<`unknown`\>\> --- ## Page: announceToAll URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/functions/announceToAll [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / announceToAll # Function: announceToAll() > **announceToAll**(`runtimes`, `params`): `Promise`\<`EdgeOperationResult`\<`unknown`\>[]\> Announce to every lookup port in the provided list of runtimes. Each announce is attempted independently — a failure on one runtime does not block the others. Returns an array of results in the same order as `runtimes`. Typical use: a gateway that is connected to multiple lookup nodes and wants to be discoverable on all of them without multiple call sites. ## Parameters ### runtimes `EdgeRuntime`[] ### params `AnnounceParams` ## Returns `Promise`\<`EdgeOperationResult`\<`unknown`\>[]\> --- ## Page: canonicalJson URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/functions/canonicalJson [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / canonicalJson # Function: canonicalJson() > **canonicalJson**(`value`): `string` ## Parameters ### value `unknown` ## Returns `string` --- ## Page: computeMqttEventId URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/functions/computeMqttEventId [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / computeMqttEventId # Function: computeMqttEventId() > **computeMqttEventId**(`event`): `string` ## Parameters ### event `unknown` ## Returns `string` --- ## Page: createDeadLetterEvent URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/functions/createDeadLetterEvent [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / createDeadLetterEvent # Function: createDeadLetterEvent() > **createDeadLetterEvent**(`event`, `reason`): [`MqttQueuedEvent`](../interfaces/MqttQueuedEvent.md) ## Parameters ### event [`MqttQueuedEvent`](../interfaces/MqttQueuedEvent.md) ### reason `string` ## Returns [`MqttQueuedEvent`](../interfaces/MqttQueuedEvent.md) --- ## Page: createDurableMqttEdgeQueue URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/functions/createDurableMqttEdgeQueue [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / createDurableMqttEdgeQueue # Function: createDurableMqttEdgeQueue() > **createDurableMqttEdgeQueue**(`adapter`, `options?`): [`DurableMqttEdgeQueue`](../type-aliases/DurableMqttEdgeQueue.md) Create a durable, at-least-once MQTT offline queue over a CAS-capable adapter (`CasStore.conditionalUpdate`). After a restart, call `recoverInFlight()` before `dequeue()` to re-deliver events that were claimed but never acked (the RFC-007 crash window). Pending events are eligible for delivery again automatically on restart. ## Parameters ### adapter `StorageAdapter` ### options? [`DurableMqttEdgeQueueOptions`](../interfaces/DurableMqttEdgeQueueOptions.md) = `{}` ## Returns [`DurableMqttEdgeQueue`](../type-aliases/DurableMqttEdgeQueue.md) --- ## Page: createEdgeReceipt URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/functions/createEdgeReceipt [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / createEdgeReceipt # Function: createEdgeReceipt() > **createEdgeReceipt**(`opts`): `EdgeReceipt` ## Parameters ### opts #### issuedAt? `number` #### kind `string` #### payload `Record`\<`string`, `unknown`\> #### relatedIdentityId? `string` #### relatedManifestId? `string` ## Returns `EdgeReceipt` --- ## Page: createEdgeRuntime URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/functions/createEdgeRuntime [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / createEdgeRuntime # Function: createEdgeRuntime() > **createEdgeRuntime**(`opts`): `EdgeRuntime` ## Parameters ### opts #### capabilities `EdgeCapabilitySet` #### deviceId `string` #### ports `EdgeRuntimePorts` ## Returns `EdgeRuntime` --- ## Page: createMemoryMqttEdgeQueue URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/functions/createMemoryMqttEdgeQueue [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / createMemoryMqttEdgeQueue # Function: createMemoryMqttEdgeQueue() > **createMemoryMqttEdgeQueue**(): [`MqttEdgeQueue`](../interfaces/MqttEdgeQueue.md) ## Returns [`MqttEdgeQueue`](../interfaces/MqttEdgeQueue.md) --- ## Page: createMqttCommandHandler URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/functions/createMqttCommandHandler [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / createMqttCommandHandler # Function: createMqttCommandHandler() > **createMqttCommandHandler**(`config`): [`MqttCommandHandler`](../interfaces/MqttCommandHandler.md) ## Parameters ### config [`MqttCommandHandlerConfig`](../interfaces/MqttCommandHandlerConfig.md) ## Returns [`MqttCommandHandler`](../interfaces/MqttCommandHandler.md) --- ## Page: createMqttCreditGate URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/functions/createMqttCreditGate [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / createMqttCreditGate # Function: createMqttCreditGate() > **createMqttCreditGate**(`config`): [`MqttCreditGate`](../interfaces/MqttCreditGate.md) ## Parameters ### config [`MqttCreditGateConfig`](../interfaces/MqttCreditGateConfig.md) ## Returns [`MqttCreditGate`](../interfaces/MqttCreditGate.md) --- ## Page: createMqttEdgeGateway URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/functions/createMqttEdgeGateway [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / createMqttEdgeGateway # Function: createMqttEdgeGateway() > **createMqttEdgeGateway**(`config`): [`MqttEdgeGateway`](../interfaces/MqttEdgeGateway.md) ## Parameters ### config [`MqttEdgeGatewayConfig`](../interfaces/MqttEdgeGatewayConfig.md) ## Returns [`MqttEdgeGateway`](../interfaces/MqttEdgeGateway.md) --- ## Page: createMqttEdgeServiceManifest URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/functions/createMqttEdgeServiceManifest [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / createMqttEdgeServiceManifest # Function: createMqttEdgeServiceManifest() > **createMqttEdgeServiceManifest**(`input`): `EdgeServiceManifest` ## Parameters ### input [`MqttEdgeServiceManifestInput`](../interfaces/MqttEdgeServiceManifestInput.md) ## Returns `EdgeServiceManifest` --- ## Page: createMqttProofPublisher URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/functions/createMqttProofPublisher [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / createMqttProofPublisher # Function: createMqttProofPublisher() > **createMqttProofPublisher**(`config`): [`MqttProofPublisher`](../interfaces/MqttProofPublisher.md) ## Parameters ### config [`MqttProofPublisherConfig`](../interfaces/MqttProofPublisherConfig.md) ## Returns [`MqttProofPublisher`](../interfaces/MqttProofPublisher.md) --- ## Page: createMqttReceipt URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/functions/createMqttReceipt [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / createMqttReceipt # Function: createMqttReceipt() > **createMqttReceipt**(`input`): `EdgeReceipt` ## Parameters ### input [`MqttReceiptInput`](../interfaces/MqttReceiptInput.md) ## Returns `EdgeReceipt` --- ## Page: createMqttRuleEngine URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/functions/createMqttRuleEngine [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / createMqttRuleEngine # Function: createMqttRuleEngine() > **createMqttRuleEngine**(`rules`): [`MqttRuleEngine`](../interfaces/MqttRuleEngine.md) ## Parameters ### rules [`MqttTopicRule`](../interfaces/MqttTopicRule.md)[] ## Returns [`MqttRuleEngine`](../interfaces/MqttRuleEngine.md) --- ## Page: createMqttSensorBridge URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/functions/createMqttSensorBridge [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / createMqttSensorBridge # Function: createMqttSensorBridge() > **createMqttSensorBridge**(`config`): [`MqttSensorBridge`](../interfaces/MqttSensorBridge.md) ## Parameters ### config [`MqttSensorBridgeConfig`](../interfaces/MqttSensorBridgeConfig.md) ## Returns [`MqttSensorBridge`](../interfaces/MqttSensorBridge.md) --- ## Page: createMqttUsageMeter URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/functions/createMqttUsageMeter [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / createMqttUsageMeter # Function: createMqttUsageMeter() > **createMqttUsageMeter**(`config`): [`MqttUsageMeter`](../interfaces/MqttUsageMeter.md) ## Parameters ### config [`MqttUsageMeterConfig`](../interfaces/MqttUsageMeterConfig.md) ## Returns [`MqttUsageMeter`](../interfaces/MqttUsageMeter.md) --- ## Page: decodeMqttEdgeMessage URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/functions/decodeMqttEdgeMessage [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / decodeMqttEdgeMessage # Function: decodeMqttEdgeMessage() > **decodeMqttEdgeMessage**(`bytes`): `any` ## Parameters ### bytes `Uint8Array` ## Returns `any` --- ## Page: encodeMqttEdgeMessage URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/functions/encodeMqttEdgeMessage [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / encodeMqttEdgeMessage # Function: encodeMqttEdgeMessage() > **encodeMqttEdgeMessage**(`message`): `Uint8Array` ## Parameters ### message #### payload `string` \| `Uint8Array`\<`ArrayBufferLike`\> #### properties? `Record`\<`string`, `unknown`\> #### qos? `0` \| `1` \| `2` #### receivedAt `number` #### retain? `boolean` #### topic `string` ## Returns `Uint8Array` --- ## Page: findMatchingRules URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/functions/findMatchingRules [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / findMatchingRules # Function: findMatchingRules() > **findMatchingRules**(`engine`, `topic`): [`MqttTopicRule`](../interfaces/MqttTopicRule.md)[] ## Parameters ### engine [`MqttRuleEngine`](../interfaces/MqttRuleEngine.md) ### topic `string` ## Returns [`MqttTopicRule`](../interfaces/MqttTopicRule.md)[] --- ## Page: flushQueuedEvents URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/functions/flushQueuedEvents [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / flushQueuedEvents # Function: flushQueuedEvents() > **flushQueuedEvents**(`client`, `queue`, `options?`): `Promise`\<`EdgeOperationResult`\<`unknown`\>\> ## Parameters ### client [`MqttClientPort`](../interfaces/MqttClientPort.md) ### queue [`MqttEdgeQueue`](../interfaces/MqttEdgeQueue.md) ### options? `FlushQueueOptions` = `{}` ## Returns `Promise`\<`EdgeOperationResult`\<`unknown`\>\> --- ## Page: mirrorMqttToRealtime URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/functions/mirrorMqttToRealtime [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / mirrorMqttToRealtime # Function: mirrorMqttToRealtime() > **mirrorMqttToRealtime**(`message`, `realtimePort`): `Promise`\<`EdgeOperationResult`\<`unknown`\>\> ## Parameters ### message [`MqttMessage`](../interfaces/MqttMessage.md) ### realtimePort [`RealtimePort`](../interfaces/RealtimePort.md) ## Returns `Promise`\<`EdgeOperationResult`\<`unknown`\>\> --- ## Page: publishMqttManifest URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/functions/publishMqttManifest [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / publishMqttManifest # Function: publishMqttManifest() > **publishMqttManifest**(`client`, `manifest`, `topic`): `Promise`\<`void`\> ## Parameters ### client [`MqttClientPort`](../interfaces/MqttClientPort.md) ### manifest `Record`\<`string`, `unknown`\> \| `EdgeServiceManifest` ### topic `string` ## Returns `Promise`\<`void`\> --- ## Page: publishMqttReceipt URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/functions/publishMqttReceipt [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / publishMqttReceipt # Function: publishMqttReceipt() > **publishMqttReceipt**(`client`, `receipt`, `topic`): `Promise`\<`void`\> ## Parameters ### client [`MqttClientPort`](../interfaces/MqttClientPort.md) ### receipt `EdgeReceipt` ### topic `string` ## Returns `Promise`\<`void`\> --- ## Page: routeMqttMessage URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/functions/routeMqttMessage [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / routeMqttMessage # Function: routeMqttMessage() > **routeMqttMessage**(`engine`, `message`): [`MqttRouteDecision`](../interfaces/MqttRouteDecision.md)[] ## Parameters ### engine [`MqttRuleEngine`](../interfaces/MqttRuleEngine.md) ### message [`MqttMessage`](../interfaces/MqttMessage.md) ## Returns [`MqttRouteDecision`](../interfaces/MqttRouteDecision.md)[] --- ## Page: verifyEdgeReceipt URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/functions/verifyEdgeReceipt [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / verifyEdgeReceipt # Function: verifyEdgeReceipt() > **verifyEdgeReceipt**(`receipt`): `EdgeOperationResult`\<\{ `receipt`: `EdgeReceipt`; \}\> ## Parameters ### receipt `unknown` ## Returns `EdgeOperationResult`\<\{ `receipt`: `EdgeReceipt`; \}\> --- ## Page: DurableEventRecord URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/DurableEventRecord [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / DurableEventRecord # Interface: DurableEventRecord ## Properties ### attempts > **attempts**: `number` *** ### deadAt? > `optional` **deadAt?**: `number` *** ### deadReason? > `optional` **deadReason?**: `string` *** ### event > **event**: [`MqttQueuedEvent`](MqttQueuedEvent.md) *** ### nextAttemptAt? > `optional` **nextAttemptAt?**: `number` *** ### status > **status**: `QueueStatus` --- ## Page: DurableMqttEdgeQueueOptions URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/DurableMqttEdgeQueueOptions [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / DurableMqttEdgeQueueOptions # Interface: DurableMqttEdgeQueueOptions ## Properties ### namespace? > `optional` **namespace?**: `string` Namespace prefix for the queue keys (default 'mqtt'). *** ### requireAckMode? > `optional` **requireAckMode?**: `"volatile"` \| `"buffered"` \| `"durably-acknowledged"` Required write-ack level the backing adapter must satisfy (default 'durably-acknowledged'). --- ## Page: MqttClientPort URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttClientPort [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttClientPort # Interface: MqttClientPort ## Methods ### connect()? > `optional` **connect**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### disconnect()? > `optional` **disconnect**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### onMessage() > **onMessage**(`handler`): () => `void` #### Parameters ##### handler (`message`) => `void` \| `Promise`\<`void`\> #### Returns () => `void` *** ### publish() > **publish**(`topic`, `payload`, `options?`): `Promise`\<`void`\> #### Parameters ##### topic `string` ##### payload `string` \| `Uint8Array`\<`ArrayBufferLike`\> ##### options? [`MqttPublishOptions`](MqttPublishOptions.md) #### Returns `Promise`\<`void`\> *** ### subscribe() > **subscribe**(`topic`, `options?`): `Promise`\<[`MqttSubscription`](MqttSubscription.md)\> #### Parameters ##### topic `string` ##### options? [`MqttSubscribeOptions`](MqttSubscribeOptions.md) #### Returns `Promise`\<[`MqttSubscription`](MqttSubscription.md)\> *** ### unsubscribe()? > `optional` **unsubscribe**(`topic`): `Promise`\<`void`\> #### Parameters ##### topic `string` #### Returns `Promise`\<`void`\> --- ## Page: MqttCommand URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttCommand [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttCommand # Interface: MqttCommand ## Properties ### command > **command**: `string` *** ### commandId > **commandId**: `string` *** ### createdAt > **createdAt**: `number` *** ### payload? > `optional` **payload?**: `unknown` *** ### requestedBy? > `optional` **requestedBy?**: `string` --- ## Page: MqttCommandExecutor URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttCommandExecutor [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttCommandExecutor # Interface: MqttCommandExecutor ## Methods ### execute() > **execute**(`command`): `Promise`\<`EdgeOperationResult`\<`unknown`\>\> #### Parameters ##### command [`MqttCommand`](MqttCommand.md) #### Returns `Promise`\<`EdgeOperationResult`\<`unknown`\>\> --- ## Page: MqttCommandHandler URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttCommandHandler [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttCommandHandler # Interface: MqttCommandHandler ## Methods ### handleCommand() > **handleCommand**(`message`): `Promise`\<`EdgeOperationResult`\<`unknown`\>\> #### Parameters ##### message [`MqttMessage`](MqttMessage.md) #### Returns `Promise`\<`EdgeOperationResult`\<`unknown`\>\> --- ## Page: MqttCommandHandlerConfig URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttCommandHandlerConfig [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttCommandHandlerConfig # Interface: MqttCommandHandlerConfig ## Properties ### client > **client**: [`MqttClientPort`](MqttClientPort.md) *** ### commandTopic? > `optional` **commandTopic?**: `string` *** ### executor? > `optional` **executor?**: [`MqttCommandExecutor`](MqttCommandExecutor.md) *** ### maxCommandAgeMs? > `optional` **maxCommandAgeMs?**: `number` Maximum age of a command in milliseconds (default 60_000). *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### receiptTopic? > `optional` **receiptTopic?**: `string` *** ### replayStore? > `optional` **replayStore?**: `ReplayLedgerStore` Durable store for the replay ledger. When provided, processed command IDs survive restarts (RFC-007 G4); otherwise an in-memory freshness window is used. *** ### runtime > **runtime**: `EdgeRuntime` *** ### verifyCommandSignature? > `optional` **verifyCommandSignature?**: (`envelope`) => `Promise`\<`boolean`\> Function to verify a command signature. #### Parameters ##### envelope `SignedCommandEnvelope` #### Returns `Promise`\<`boolean`\> --- ## Page: MqttCommandRule URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttCommandRule [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttCommandRule # Interface: MqttCommandRule ## Extends - [`MqttTopicRule`](MqttTopicRule.md) ## Properties ### allowedCommands? > `optional` **allowedCommands?**: `string`[] *** ### enabled? > `optional` **enabled?**: `boolean` #### Inherited from [`MqttTopicRule`](MqttTopicRule.md).[`enabled`](MqttTopicRule.md#enabled) *** ### id > **id**: `string` #### Inherited from [`MqttTopicRule`](MqttTopicRule.md).[`id`](MqttTopicRule.md#id) *** ### kind > **kind**: `"command"` #### Overrides [`MqttTopicRule`](MqttTopicRule.md).[`kind`](MqttTopicRule.md#kind) *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> #### Inherited from [`MqttTopicRule`](MqttTopicRule.md).[`metadata`](MqttTopicRule.md#metadata) *** ### requiresPolicy? > `optional` **requiresPolicy?**: `boolean` *** ### topicPattern > **topicPattern**: `string` #### Inherited from [`MqttTopicRule`](MqttTopicRule.md).[`topicPattern`](MqttTopicRule.md#topicpattern) --- ## Page: MqttCreditDecision URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttCreditDecision [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttCreditDecision # Interface: MqttCreditDecision ## Properties ### allowed > **allowed**: `boolean` *** ### reason? > `optional` **reason?**: `string` *** ### unpaidUsage? > `optional` **unpaidUsage?**: `string` --- ## Page: MqttCreditGate URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttCreditGate [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttCreditGate # Interface: MqttCreditGate ## Methods ### checkCredit() > **checkCredit**(): `Promise`\<[`MqttCreditDecision`](MqttCreditDecision.md)\> #### Returns `Promise`\<[`MqttCreditDecision`](MqttCreditDecision.md)\> *** ### gatePublish() > **gatePublish**(`topic`, `payload`, `options?`): `Promise`\<`EdgeOperationResult`\<`unknown`\>\> #### Parameters ##### topic `string` ##### payload `string` \| `Uint8Array`\<`ArrayBufferLike`\> ##### options? [`MqttPublishOptions`](MqttPublishOptions.md) #### Returns `Promise`\<`EdgeOperationResult`\<`unknown`\>\> *** ### getUnpaidUsage() > **getUnpaidUsage**(): `string` #### Returns `string` *** ### publishShutdownNotice() > **publishShutdownNotice**(`reason`): `Promise`\<`void`\> #### Parameters ##### reason `string` #### Returns `Promise`\<`void`\> *** ### recordUsage() > **recordUsage**(`quantity`): `void` Record usage directly on the gate, accumulating toward the limit. Call this when not using an external usage meter via config.getUsage. #### Parameters ##### quantity `string` #### Returns `void` --- ## Page: MqttCreditGateConfig URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttCreditGateConfig [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttCreditGateConfig # Interface: MqttCreditGateConfig ## Properties ### client > **client**: [`MqttClientPort`](MqttClientPort.md) *** ### deviceId > **deviceId**: `string` *** ### getUsage? > `optional` **getUsage?**: () => `string` Optional hook to read accumulated unpaid usage from an external source (e.g. a linked MqttUsageMeter). When provided, this overrides the gate's internal usage counter. Useful when usage and credit are tracked separately. #### Returns `string` *** ### mode? > `optional` **mode?**: `"block"` \| `"warn"` \| `"shutdown"` *** ### runtime > **runtime**: `EdgeRuntime` *** ### shutdownTopic? > `optional` **shutdownTopic?**: `string` *** ### statusTopic? > `optional` **statusTopic?**: `string` *** ### unpaidLimit? > `optional` **unpaidLimit?**: `string` --- ## Page: MqttEdgeGateway URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttEdgeGateway [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttEdgeGateway # Interface: MqttEdgeGateway ## Methods ### handleMessage() > **handleMessage**(`message`): `Promise`\<`void`\> #### Parameters ##### message [`MqttMessage`](MqttMessage.md) #### Returns `Promise`\<`void`\> *** ### publishManifest() > **publishManifest**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### publishStatus() > **publishStatus**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### start() > **start**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### status() > **status**(): [`MqttGatewayStatus`](MqttGatewayStatus.md) #### Returns [`MqttGatewayStatus`](MqttGatewayStatus.md) *** ### stop() > **stop**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> --- ## Page: MqttEdgeGatewayConfig URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttEdgeGatewayConfig [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttEdgeGatewayConfig # Interface: MqttEdgeGatewayConfig ## Properties ### client > **client**: [`MqttClientPort`](MqttClientPort.md) *** ### commandHandler? > `optional` **commandHandler?**: [`MqttCommandHandler`](MqttCommandHandler.md) *** ### deviceId > **deviceId**: `string` *** ### identity? > `optional` **identity?**: `TotemIdentityDocument` *** ### manifest? > `optional` **manifest?**: `SignedManifest`\<`EdgeServiceManifest`\> *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### proofPublisher? > `optional` **proofPublisher?**: [`MqttProofPublisher`](MqttProofPublisher.md) *** ### queue? > `optional` **queue?**: [`MqttEdgeQueue`](MqttEdgeQueue.md) *** ### rules? > `optional` **rules?**: [`MqttTopicRule`](MqttTopicRule.md)[] *** ### runtime > **runtime**: `EdgeRuntime` *** ### sensorBridge? > `optional` **sensorBridge?**: [`MqttSensorBridge`](MqttSensorBridge.md) *** ### topics? > `optional` **topics?**: `Partial`\<[`MqttTopicSet`](MqttTopicSet.md)\> *** ### transport? > `optional` **transport?**: [`MqttTransportInfo`](MqttTransportInfo.md) --- ## Page: MqttEdgeQueue URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttEdgeQueue [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttEdgeQueue # Interface: MqttEdgeQueue Claim/ack/retry queue contract (RFC-007 G4). `dequeue()` claims an event; the event is only forgotten after `ack()`. `release()` returns a claimed event to pending for retry, and `deadLetter()` removes a claimed event from the active queue while durably recording it. A crash between `dequeue()` and `ack()` leaves the claim durable, so `recoverInFlight()` on startup re-delivers rather than loses. ## Methods ### ack()? > `optional` **ack**(`id`): `Promise`\<`void`\> Durable acknowledgment — forget the event after it has been published. #### Parameters ##### id `string` #### Returns `Promise`\<`void`\> *** ### clear() > **clear**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### deadLetter()? > `optional` **deadLetter**(`id`, `reason?`): `Promise`\<`void`\> Move a claimed event into the durable dead-letter set (never re-delivered). #### Parameters ##### id `string` ##### reason? `string` #### Returns `Promise`\<`void`\> *** ### dequeue() > **dequeue**(): `Promise`\<[`MqttQueuedEvent`](MqttQueuedEvent.md) \| `undefined`\> #### Returns `Promise`\<[`MqttQueuedEvent`](MqttQueuedEvent.md) \| `undefined`\> *** ### enqueue() > **enqueue**(`event`): `Promise`\<`void`\> #### Parameters ##### event [`MqttQueuedEvent`](MqttQueuedEvent.md) #### Returns `Promise`\<`void`\> *** ### peek() > **peek**(): `Promise`\<[`MqttQueuedEvent`](MqttQueuedEvent.md) \| `undefined`\> #### Returns `Promise`\<[`MqttQueuedEvent`](MqttQueuedEvent.md) \| `undefined`\> *** ### recoverInFlight()? > `optional` **recoverInFlight**(`maxAgeMs?`): `Promise`\<`number`\> Reset any in-flight (claimed-but-unacked) events back to pending so they re-deliver after a crash. Returns the number recovered. #### Parameters ##### maxAgeMs? `number` #### Returns `Promise`\<`number`\> *** ### release()? > `optional` **release**(`id`, `options?`): `Promise`\<`void`\> Return a claimed event to pending for a later retry attempt. #### Parameters ##### id `string` ##### options? `MqttQueueReleaseOptions` #### Returns `Promise`\<`void`\> *** ### size() > **size**(): `Promise`\<`number`\> #### Returns `Promise`\<`number`\> --- ## Page: MqttEdgeServiceManifestInput URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttEdgeServiceManifestInput [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttEdgeServiceManifestInput # Interface: MqttEdgeServiceManifestInput ## Properties ### capabilities? > `optional` **capabilities?**: `string`[] *** ### description? > `optional` **description?**: `string` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### name > **name**: `string` *** ### operatorAddress > **operatorAddress**: `string` *** ### serviceId > **serviceId**: `string` *** ### serviceType? > `optional` **serviceType?**: [`MqttServiceType`](../type-aliases/MqttServiceType.md) *** ### tags? > `optional` **tags?**: `string`[] *** ### version? > `optional` **version?**: `string` --- ## Page: MqttGatewayStatus URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttGatewayStatus [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttGatewayStatus # Interface: MqttGatewayStatus ## Properties ### connectedAt? > `optional` **connectedAt?**: `number` *** ### deviceId > **deviceId**: `string` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### running > **running**: `boolean` *** ### stoppedAt? > `optional` **stoppedAt?**: `number` *** ### transport? > `optional` **transport?**: [`MqttTransportInfo`](MqttTransportInfo.md) --- ## Page: MqttMessage URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttMessage [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttMessage # Interface: MqttMessage MqttClientPort — transport-agnostic MQTT port interface. This package does NOT import mqtt.js, net, tls, ws, http, fs, or browser APIs. All network behavior is injected via MqttClientPort. ## Properties ### payload > **payload**: `string` \| `Uint8Array`\<`ArrayBufferLike`\> *** ### properties? > `optional` **properties?**: `Record`\<`string`, `unknown`\> *** ### qos? > `optional` **qos?**: `0` \| `1` \| `2` *** ### receivedAt > **receivedAt**: `number` *** ### retain? > `optional` **retain?**: `boolean` *** ### topic > **topic**: `string` --- ## Page: MqttPaymentRule URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttPaymentRule [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttPaymentRule # Interface: MqttPaymentRule ## Extends - [`MqttTopicRule`](MqttTopicRule.md) ## Properties ### enabled? > `optional` **enabled?**: `boolean` #### Inherited from [`MqttTopicRule`](MqttTopicRule.md).[`enabled`](MqttTopicRule.md#enabled) *** ### id > **id**: `string` #### Inherited from [`MqttTopicRule`](MqttTopicRule.md).[`id`](MqttTopicRule.md#id) *** ### kind > **kind**: `"payment"` #### Overrides [`MqttTopicRule`](MqttTopicRule.md).[`kind`](MqttTopicRule.md#kind) *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> #### Inherited from [`MqttTopicRule`](MqttTopicRule.md).[`metadata`](MqttTopicRule.md#metadata) *** ### paymentRequired? > `optional` **paymentRequired?**: `boolean` *** ### price? > `optional` **price?**: `string` *** ### tokenId? > `optional` **tokenId?**: `string` *** ### topicPattern > **topicPattern**: `string` #### Inherited from [`MqttTopicRule`](MqttTopicRule.md).[`topicPattern`](MqttTopicRule.md#topicpattern) --- ## Page: MqttProofEnvelope URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttProofEnvelope [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttProofEnvelope # Interface: MqttProofEnvelope ## Properties ### createdAt > **createdAt**: `number` *** ### envelopeId > **envelopeId**: `string` *** ### message > **message**: [`MqttMessage`](MqttMessage.md) *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### proof? > `optional` **proof?**: `unknown` *** ### proofId? > `optional` **proofId?**: `string` *** ### topic > **topic**: `string` --- ## Page: MqttProofOptions URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttProofOptions [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttProofOptions # Interface: MqttProofOptions ## Properties ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### proofKind? > `optional` **proofKind?**: `string` *** ### subjectId? > `optional` **subjectId?**: `string` *** ### subjectKind? > `optional` **subjectKind?**: `string` --- ## Page: MqttProofPublisher URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttProofPublisher [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttProofPublisher # Interface: MqttProofPublisher ## Methods ### createProofFromMessage() > **createProofFromMessage**(`message`, `options?`): `Promise`\<[`MqttProofEnvelope`](MqttProofEnvelope.md)\> #### Parameters ##### message [`MqttMessage`](MqttMessage.md) ##### options? [`MqttProofOptions`](MqttProofOptions.md) #### Returns `Promise`\<[`MqttProofEnvelope`](MqttProofEnvelope.md)\> *** ### publishProof() > **publishProof**(`envelope`, `topic?`): `Promise`\<`void`\> #### Parameters ##### envelope [`MqttProofEnvelope`](MqttProofEnvelope.md) ##### topic? `string` #### Returns `Promise`\<`void`\> *** ### publishProofReceipt() > **publishProofReceipt**(`envelope`, `topic?`): `Promise`\<`void`\> #### Parameters ##### envelope [`MqttProofEnvelope`](MqttProofEnvelope.md) ##### topic? `string` #### Returns `Promise`\<`void`\> --- ## Page: MqttProofPublisherConfig URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttProofPublisherConfig [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttProofPublisherConfig # Interface: MqttProofPublisherConfig ## Properties ### client > **client**: [`MqttClientPort`](MqttClientPort.md) *** ### defaultProofTopic > **defaultProofTopic**: `string` *** ### defaultReceiptTopic? > `optional` **defaultReceiptTopic?**: `string` *** ### issuer? > `optional` **issuer?**: `string` Issuer identity used in proof-package mode. Falls back to runtime.deviceId then 'unknown'. *** ### leaseProvider? > `optional` **leaseProvider?**: `object` WOTS lease provider for coordinated key-index reservation. When set, key indices are reserved via the provider. #### burnReservation() > **burnReservation**(`reservationId`, `reason`): `Promise`\<`void`\> ##### Parameters ###### reservationId `string` ###### reason `string` ##### Returns `Promise`\<`void`\> #### commitKeyUse() > **commitKeyUse**(`reservationId`, `txId`): `Promise`\<`void`\> ##### Parameters ###### reservationId `string` ###### txId `string` ##### Returns `Promise`\<`void`\> #### reserveKeyUse() > **reserveKeyUse**(`params`): `Promise`\<\{ `indices`: \{ `addressIndex`: `number`; `l1`: `number`; `l2`: `number`; \}; `reservationId`: `string`; \}\> ##### Parameters ###### params ###### payloadHash? `string` ###### treeId `string` ###### ttlMs? `number` ##### Returns `Promise`\<\{ `indices`: \{ `addressIndex`: `number`; `l1`: `number`; `l2`: `number`; \}; `reservationId`: `string`; \}\> *** ### leaseTreeId? > `optional` **leaseTreeId?**: `string` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### proofMode? > `optional` **proofMode?**: `"edge-port"` \| `"proof-package"` *** ### runtime > **runtime**: `EdgeRuntime` *** ### seed? > `optional` **seed?**: `Uint8Array`\<`ArrayBufferLike`\> 32-byte WOTS seed for signing proofs in proof-package mode. --- ## Page: MqttProofRule URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttProofRule [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttProofRule # Interface: MqttProofRule ## Extends - [`MqttTopicRule`](MqttTopicRule.md) ## Properties ### enabled? > `optional` **enabled?**: `boolean` #### Inherited from [`MqttTopicRule`](MqttTopicRule.md).[`enabled`](MqttTopicRule.md#enabled) *** ### id > **id**: `string` #### Inherited from [`MqttTopicRule`](MqttTopicRule.md).[`id`](MqttTopicRule.md#id) *** ### kind > **kind**: `"proof"` #### Overrides [`MqttTopicRule`](MqttTopicRule.md).[`kind`](MqttTopicRule.md#kind) *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> #### Inherited from [`MqttTopicRule`](MqttTopicRule.md).[`metadata`](MqttTopicRule.md#metadata) *** ### proofKind? > `optional` **proofKind?**: `string` *** ### sensorIdFromTopic? > `optional` **sensorIdFromTopic?**: `boolean` *** ### subjectFromTopic? > `optional` **subjectFromTopic?**: `boolean` *** ### topicPattern > **topicPattern**: `string` #### Inherited from [`MqttTopicRule`](MqttTopicRule.md).[`topicPattern`](MqttTopicRule.md#topicpattern) --- ## Page: MqttPublishOptions URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttPublishOptions [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttPublishOptions # Interface: MqttPublishOptions ## Properties ### properties? > `optional` **properties?**: `Record`\<`string`, `unknown`\> *** ### qos? > `optional` **qos?**: `0` \| `1` \| `2` *** ### retain? > `optional` **retain?**: `boolean` --- ## Page: MqttQueuedEvent URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttQueuedEvent [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttQueuedEvent # Interface: MqttQueuedEvent ## Properties ### attempts > **attempts**: `number` *** ### createdAt > **createdAt**: `number` *** ### id > **id**: `string` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### nextAttemptAt? > `optional` **nextAttemptAt?**: `number` *** ### payload > **payload**: `string` \| `Uint8Array`\<`ArrayBufferLike`\> *** ### topic > **topic**: `string` *** ### type > **type**: `"proof"` \| `"receipt"` \| `"status"` \| `"message"` \| `"error"` --- ## Page: MqttReceiptInput URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttReceiptInput [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttReceiptInput # Interface: MqttReceiptInput ## Properties ### issuedAt? > `optional` **issuedAt?**: `number` *** ### kind > **kind**: `string` *** ### payload > **payload**: `Record`\<`string`, `unknown`\> *** ### relatedIdentityId? > `optional` **relatedIdentityId?**: `string` *** ### relatedManifestId? > `optional` **relatedManifestId?**: `string` --- ## Page: MqttRouteDecision URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttRouteDecision [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttRouteDecision # Interface: MqttRouteDecision ## Properties ### message > **message**: [`MqttMessage`](MqttMessage.md) *** ### outputTopic? > `optional` **outputTopic?**: `string` *** ### rule > **rule**: [`MqttTopicRule`](MqttTopicRule.md) --- ## Page: MqttRouteRule URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttRouteRule [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttRouteRule # Interface: MqttRouteRule ## Extends - [`MqttTopicRule`](MqttTopicRule.md) ## Properties ### enabled? > `optional` **enabled?**: `boolean` #### Inherited from [`MqttTopicRule`](MqttTopicRule.md).[`enabled`](MqttTopicRule.md#enabled) *** ### id > **id**: `string` #### Inherited from [`MqttTopicRule`](MqttTopicRule.md).[`id`](MqttTopicRule.md#id) *** ### kind > **kind**: [`MqttRuleKind`](../type-aliases/MqttRuleKind.md) #### Inherited from [`MqttTopicRule`](MqttTopicRule.md).[`kind`](MqttTopicRule.md#kind) *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> #### Inherited from [`MqttTopicRule`](MqttTopicRule.md).[`metadata`](MqttTopicRule.md#metadata) *** ### outputTopic > **outputTopic**: `string` *** ### topicPattern > **topicPattern**: `string` #### Inherited from [`MqttTopicRule`](MqttTopicRule.md).[`topicPattern`](MqttTopicRule.md#topicpattern) --- ## Page: MqttRuleEngine URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttRuleEngine [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttRuleEngine # Interface: MqttRuleEngine ## Properties ### rules > **rules**: [`MqttTopicRule`](MqttTopicRule.md)[] --- ## Page: MqttSensorBinding URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttSensorBinding [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttSensorBinding # Interface: MqttSensorBinding ## Properties ### dataType? > `optional` **dataType?**: `string` *** ### inputTopic > **inputTopic**: `string` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### proofTopic? > `optional` **proofTopic?**: `string` *** ### receiptTopic? > `optional` **receiptTopic?**: `string` *** ### sensorId > **sensorId**: `string` *** ### subjectType? > `optional` **subjectType?**: `string` --- ## Page: MqttSensorBridge URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttSensorBridge [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttSensorBridge # Interface: MqttSensorBridge ## Methods ### handleMessage() > **handleMessage**(`message`): `Promise`\<`void`\> #### Parameters ##### message [`MqttMessage`](MqttMessage.md) #### Returns `Promise`\<`void`\> *** ### handleSensorMessage() > **handleSensorMessage**(`binding`, `message`): `Promise`\<`void`\> #### Parameters ##### binding [`MqttSensorBinding`](MqttSensorBinding.md) ##### message [`MqttMessage`](MqttMessage.md) #### Returns `Promise`\<`void`\> *** ### start() > **start**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### stop() > **stop**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> --- ## Page: MqttSensorBridgeConfig URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttSensorBridgeConfig [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttSensorBridgeConfig # Interface: MqttSensorBridgeConfig ## Properties ### bindings > **bindings**: [`MqttSensorBinding`](MqttSensorBinding.md)[] *** ### client? > `optional` **client?**: [`MqttClientPort`](MqttClientPort.md) *** ### deadLetterQueue? > `optional` **deadLetterQueue?**: [`MqttEdgeQueue`](MqttEdgeQueue.md) Queue that receives failed proof events instead of silently dropping them. When set, any error thrown by proofPublisher.createProofFromMessage or publishProof is caught and the raw message is enqueued for later retry or inspection, rather than being lost. *** ### gateway > **gateway**: [`MqttEdgeGateway`](MqttEdgeGateway.md) *** ### proofPublisher? > `optional` **proofPublisher?**: [`MqttProofPublisher`](MqttProofPublisher.md) --- ## Page: MqttSubscribeOptions URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttSubscribeOptions [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttSubscribeOptions # Interface: MqttSubscribeOptions ## Properties ### qos? > `optional` **qos?**: `0` \| `1` \| `2` --- ## Page: MqttSubscription URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttSubscription [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttSubscription # Interface: MqttSubscription ## Properties ### topic > **topic**: `string` ## Methods ### unsubscribe() > **unsubscribe**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> --- ## Page: MqttTopicMatch URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttTopicMatch [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttTopicMatch # Interface: MqttTopicMatch ## Properties ### matched > **matched**: `boolean` *** ### params? > `optional` **params?**: `Record`\<`string`, `string`\> --- ## Page: MqttTopicRule URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttTopicRule [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttTopicRule # Interface: MqttTopicRule ## Extended by - [`MqttProofRule`](MqttProofRule.md) - [`MqttPaymentRule`](MqttPaymentRule.md) - [`MqttCommandRule`](MqttCommandRule.md) - [`MqttRouteRule`](MqttRouteRule.md) ## Properties ### enabled? > `optional` **enabled?**: `boolean` *** ### id > **id**: `string` *** ### kind > **kind**: [`MqttRuleKind`](../type-aliases/MqttRuleKind.md) *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### topicPattern > **topicPattern**: `string` --- ## Page: MqttTopicSet URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttTopicSet [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttTopicSet # Interface: MqttTopicSet ## Properties ### commands > **commands**: `string` *** ### errors > **errors**: `string` *** ### manifest > **manifest**: `string` *** ### payments > **payments**: `string` *** ### proofs > **proofs**: `string` *** ### receipts > **receipts**: `string` *** ### status > **status**: `string` --- ## Page: MqttTransportInfo URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttTransportInfo [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttTransportInfo # Interface: MqttTransportInfo ## Properties ### brokerUrl? > `optional` **brokerUrl?**: `string` *** ### kind > **kind**: [`MqttTransportKind`](../type-aliases/MqttTransportKind.md) *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### peerId? > `optional` **peerId?**: `string` *** ### swarmTopic? > `optional` **swarmTopic?**: `string` *** ### topic? > `optional` **topic?**: `string` --- ## Page: MqttUsageEvent URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttUsageEvent [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttUsageEvent # Interface: MqttUsageEvent ## Properties ### createdAt > **createdAt**: `number` *** ### deviceId > **deviceId**: `string` *** ### eventId > **eventId**: `string` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### quantity > **quantity**: `string` *** ### topic? > `optional` **topic?**: `string` *** ### unit > **unit**: [`MqttUsageUnit`](../type-aliases/MqttUsageUnit.md) --- ## Page: MqttUsageMeter URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttUsageMeter [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttUsageMeter # Interface: MqttUsageMeter ## Methods ### createUsageReceipt() > **createUsageReceipt**(`event`): `EdgeReceipt` #### Parameters ##### event [`MqttUsageEvent`](MqttUsageEvent.md) #### Returns `EdgeReceipt` *** ### getUnpaidUsage() > **getUnpaidUsage**(): `string` #### Returns `string` *** ### recordUsage() > **recordUsage**(`event`): `Promise`\<`EdgeOperationResult`\<`unknown`\>\> #### Parameters ##### event [`MqttUsageEvent`](MqttUsageEvent.md) #### Returns `Promise`\<`EdgeOperationResult`\<`unknown`\>\> *** ### resetUsage() > **resetUsage**(): `void` #### Returns `void` *** ### settle() > **settle**(`recipient`): `Promise`\<`EdgeOperationResult`\<\{ `settled`: `string`; `txpowId?`: `string`; \}\>\> Pay the accumulated unpaid usage to `recipient` via runtime.ports.payment. Resets the usage counter on success. No-ops (ok:true) when usage is zero. Returns ok:false when no payment port is configured. #### Parameters ##### recipient `string` #### Returns `Promise`\<`EdgeOperationResult`\<\{ `settled`: `string`; `txpowId?`: `string`; \}\>\> --- ## Page: MqttUsageMeterConfig URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/MqttUsageMeterConfig [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttUsageMeterConfig # Interface: MqttUsageMeterConfig ## Properties ### deviceId > **deviceId**: `string` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### pricePerUnit? > `optional` **pricePerUnit?**: `string` *** ### runtime > **runtime**: `EdgeRuntime` *** ### tokenId? > `optional` **tokenId?**: `string` *** ### unpaidLimit? > `optional` **unpaidLimit?**: `string` --- ## Page: RealtimePort URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/interfaces/RealtimePort [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / RealtimePort # Interface: RealtimePort ## Methods ### publish() > **publish**(`topic`, `payload`): `Promise`\<`void`\> #### Parameters ##### topic `string` ##### payload `unknown` #### Returns `Promise`\<`void`\> --- ## Page: DurableMqttEdgeQueue URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/type-aliases/DurableMqttEdgeQueue [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / DurableMqttEdgeQueue # Type Alias: DurableMqttEdgeQueue > **DurableMqttEdgeQueue** = [`MqttEdgeQueue`](../interfaces/MqttEdgeQueue.md) & `object` Durable queue surface plus dead-letter observability. ## Type Declaration ### ack() > **ack**(`id`): `Promise`\<`void`\> #### Parameters ##### id `string` #### Returns `Promise`\<`void`\> ### deadLetter() > **deadLetter**(`id`, `reason?`): `Promise`\<`void`\> #### Parameters ##### id `string` ##### reason? `string` #### Returns `Promise`\<`void`\> ### deadLetterCount() > **deadLetterCount**(): `Promise`\<`number`\> #### Returns `Promise`\<`number`\> ### recoverInFlight() > **recoverInFlight**(`maxAgeMs?`): `Promise`\<`number`\> #### Parameters ##### maxAgeMs? `number` #### Returns `Promise`\<`number`\> ### release() > **release**(`id`, `options?`): `Promise`\<`void`\> #### Parameters ##### id `string` ##### options? `MqttQueueReleaseOptions` #### Returns `Promise`\<`void`\> --- ## Page: MqttRuleKind URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/type-aliases/MqttRuleKind [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttRuleKind # Type Alias: MqttRuleKind > **MqttRuleKind** = `"proof"` \| `"payment"` \| `"command"` \| `"receipt"` \| `"lookup"` \| `"realtime"` \| `"custom"` --- ## Page: MqttServiceType URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/type-aliases/MqttServiceType [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttServiceType # Type Alias: MqttServiceType > **MqttServiceType** = `"sensor"` \| `"mqtt-feed"` \| `"machine-service"` \| `"verifier"` \| `"other"` --- ## Page: MqttTransportKind URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/type-aliases/MqttTransportKind [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttTransportKind # Type Alias: MqttTransportKind > **MqttTransportKind** = `"broker"` \| `"websocket"` \| `"embedded"` \| `"hyperswarm"` \| `"pear"` \| `"mock"` \| `"custom"` --- ## Page: MqttUsageUnit URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/type-aliases/MqttUsageUnit [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / MqttUsageUnit # Type Alias: MqttUsageUnit > **MqttUsageUnit** = `"message"` \| `"byte"` \| `"second"` \| `"minute"` \| `"kwh"` \| `"reading"` \| `"command"` \| `"custom"` --- ## Page: createDefaultMqttTopics URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/variables/createDefaultMqttTopics [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / createDefaultMqttTopics # Variable: createDefaultMqttTopics > `const` **createDefaultMqttTopics**: (`device_id`) => `any` = `create_default_mqtt_topics` Create default MQTT topic set for a device. ## Parameters ### device\_id `string` ## Returns `any` --- ## Page: createSensorTopic URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/variables/createSensorTopic [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / createSensorTopic # Variable: createSensorTopic > `const` **createSensorTopic**: (`device_id`, `sensor_id`, `kind`) => `string` = `create_sensor_topic` Create a sensor topic string. ## Parameters ### device\_id `string` ### sensor\_id `string` ### kind `string` ## Returns `string` --- ## Page: matchMqttTopic URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/variables/matchMqttTopic [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / matchMqttTopic # Variable: matchMqttTopic > `const` **matchMqttTopic**: (`pattern`, `topic`) => `any` = `match_mqtt_topic` Match an MQTT topic pattern against a concrete topic. Supports + (single-level) and # (multi-level, must be last segment). Returns { matched: boolean, params: Record } ## Parameters ### pattern `string` ### topic `string` ## Returns `any` --- ## Page: toHex URL: https://docs.totem.ing/api/totemsdk-edge-mqtt/variables/toHex [**@totemsdk/edge-mqtt**](../index.md) *** [@totemsdk/edge-mqtt](../index.md) / toHex # Variable: toHex > `const` **toHex**: (`bytes`) => `string` = `to_hex` Convert bytes to lowercase hex string. ## Parameters ### bytes `Uint8Array` ## Returns `string` --- ## Page: createNfcGateway URL: https://docs.totem.ing/api/totemsdk-edge-nfc/functions/createNfcGateway [**@totemsdk/edge-nfc**](../index.md) *** [@totemsdk/edge-nfc](../index.md) / createNfcGateway # Function: createNfcGateway() > **createNfcGateway**(`config`): [`NfcGateway`](../interfaces/NfcGateway.md) ## Parameters ### config [`NfcGatewayConfig`](../interfaces/NfcGatewayConfig.md) ## Returns [`NfcGateway`](../interfaces/NfcGateway.md) --- ## Page: decodeNdefMessage URL: https://docs.totem.ing/api/totemsdk-edge-nfc/functions/decodeNdefMessage [**@totemsdk/edge-nfc**](../index.md) *** [@totemsdk/edge-nfc](../index.md) / decodeNdefMessage # Function: decodeNdefMessage() > **decodeNdefMessage**(`bytes`): [`NdefRecord`](../interfaces/NdefRecord.md)[] Parse an NDEF message byte stream into records. ## Parameters ### bytes `Uint8Array` ## Returns [`NdefRecord`](../interfaces/NdefRecord.md)[] --- ## Page: encodeNdefMessage URL: https://docs.totem.ing/api/totemsdk-edge-nfc/functions/encodeNdefMessage [**@totemsdk/edge-nfc**](../index.md) *** [@totemsdk/edge-nfc](../index.md) / encodeNdefMessage # Function: encodeNdefMessage() > **encodeNdefMessage**(`records`): `Uint8Array` Encode a list of records into an NDEF message byte stream. ## Parameters ### records [`NdefRecord`](../interfaces/NdefRecord.md)[] ## Returns `Uint8Array` --- ## Page: NdefRecord URL: https://docs.totem.ing/api/totemsdk-edge-nfc/interfaces/NdefRecord [**@totemsdk/edge-nfc**](../index.md) *** [@totemsdk/edge-nfc](../index.md) / NdefRecord # Interface: NdefRecord An NDEF record (TNF + type + payload). ## Properties ### id? > `optional` **id?**: `string` Optional record identifier. *** ### payload > **payload**: `Uint8Array` *** ### tnf > **tnf**: `number` Type Name Format: 0x01 well-known, 0x02 mime, 0x03 uri, 0x04 external. *** ### type > **type**: `string` Record type, e.g. "U", "T", "text/plain". --- ## Page: NfcGateway URL: https://docs.totem.ing/api/totemsdk-edge-nfc/interfaces/NfcGateway [**@totemsdk/edge-nfc**](../index.md) *** [@totemsdk/edge-nfc](../index.md) / NfcGateway # Interface: NfcGateway ## Properties ### status > `readonly` **status**: `"stopped"` \| `"running"` \| `"error"` *** ### tags > `readonly` **tags**: [`NfcTag`](NfcTag.md)[] Currently-visible tags. ## Methods ### eraseNdef() > **eraseNdef**(`tagId`): `Promise`\<`EdgeOperationResult`\<`unknown`\>\> Erase NDEF data from a present tag. #### Parameters ##### tagId `string` #### Returns `Promise`\<`EdgeOperationResult`\<`unknown`\>\> *** ### getTag() > **getTag**(`tagId`): [`NfcTag`](NfcTag.md) \| `null` Resolve a tag by handle (id) or uid; returns null if not present. #### Parameters ##### tagId `string` #### Returns [`NfcTag`](NfcTag.md) \| `null` *** ### onMessage() > **onMessage**(`handler`): () => `void` Register a handler for inbound peer-to-peer NDEF messages. #### Parameters ##### handler (`records`) => `void` #### Returns () => `void` *** ### putMessage() > **putMessage**(`records`): `Promise`\<`EdgeOperationResult`\<`unknown`\>\> Send an NDEF message to a peer NFC-DEP target. #### Parameters ##### records [`NdefRecord`](NdefRecord.md)[] #### Returns `Promise`\<`EdgeOperationResult`\<`unknown`\>\> *** ### readNdef() > **readNdef**(`tagId`): `Promise`\<`EdgeOperationResult`\<\{ `records`: [`NdefRecord`](NdefRecord.md)[]; \}\>\> Read NDEF records off a present tag. #### Parameters ##### tagId `string` #### Returns `Promise`\<`EdgeOperationResult`\<\{ `records`: [`NdefRecord`](NdefRecord.md)[]; \}\>\> *** ### registerHceApduHandler() > **registerHceApduHandler**(`handler`): `Promise`\<`void`\> Serve an HCE APDU handler to an external reader. #### Parameters ##### handler [`HceApduHandler`](../type-aliases/HceApduHandler.md) #### Returns `Promise`\<`void`\> *** ### start() > **start**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### stop() > **stop**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### transceive() > **transceive**(`tagId`, `apdu`): `Promise`\<`EdgeOperationResult`\<\{ `response`: `Uint8Array`; \}\>\> ISO 7816-4 APDU exchange (secure element). #### Parameters ##### tagId `string` ##### apdu `Uint8Array` #### Returns `Promise`\<`EdgeOperationResult`\<\{ `response`: `Uint8Array`; \}\>\> *** ### unregisterHceApduHandler() > **unregisterHceApduHandler**(): `Promise`\<`void`\> Stop serving HCE APDUs. #### Returns `Promise`\<`void`\> *** ### writeNdef() > **writeNdef**(`tagId`, `records`): `Promise`\<`EdgeOperationResult`\<`unknown`\>\> Write NDEF records to a present tag. #### Parameters ##### tagId `string` ##### records [`NdefRecord`](NdefRecord.md)[] #### Returns `Promise`\<`EdgeOperationResult`\<`unknown`\>\> --- ## Page: NfcGatewayConfig URL: https://docs.totem.ing/api/totemsdk-edge-nfc/interfaces/NfcGatewayConfig [**@totemsdk/edge-nfc**](../index.md) *** [@totemsdk/edge-nfc](../index.md) / NfcGatewayConfig # Interface: NfcGatewayConfig ## Properties ### runtime > **runtime**: `EdgeRuntime` *** ### techs? > `optional` **techs?**: `string`[] Restrict tags to these technologies, e.g. ["iso14443a"]. *** ### transport > **transport**: [`NfcTransportPort`](NfcTransportPort.md) --- ## Page: NfcTag URL: https://docs.totem.ing/api/totemsdk-edge-nfc/interfaces/NfcTag [**@totemsdk/edge-nfc**](../index.md) *** [@totemsdk/edge-nfc](../index.md) / NfcTag # Interface: NfcTag A detected NFC tag/card. ## Properties ### detectedAt > **detectedAt**: `number` Time the tag was first detected (ms epoch). *** ### id > **id**: `string` Stable handle for this tag while it is present. *** ### tech > **tech**: `string` Technology family, e.g. "iso14443a", "iso14443b", "felica". *** ### uid > **uid**: `string` Tag UID as hex string. --- ## Page: NfcTagEvent URL: https://docs.totem.ing/api/totemsdk-edge-nfc/interfaces/NfcTagEvent [**@totemsdk/edge-nfc**](../index.md) *** [@totemsdk/edge-nfc](../index.md) / NfcTagEvent # Interface: NfcTagEvent A tag tap / presence event. ## Properties ### id > **id**: `string` *** ### proximity > **proximity**: `number` Signal quality, 0..1 (1 = strongest / closest). *** ### timestamp > **timestamp**: `number` *** ### uid > **uid**: `string` --- ## Page: NfcTransportPort URL: https://docs.totem.ing/api/totemsdk-edge-nfc/interfaces/NfcTransportPort [**@totemsdk/edge-nfc**](../index.md) *** [@totemsdk/edge-nfc](../index.md) / NfcTransportPort # Interface: NfcTransportPort ## Methods ### eraseNdef() > **eraseNdef**(`tagId`): `Promise`\<`void`\> Erase NDEF data from a present tag. #### Parameters ##### tagId `string` #### Returns `Promise`\<`void`\> *** ### onError() > **onError**(`handler`): () => `void` Register handler for errors. #### Parameters ##### handler (`err`) => `void` #### Returns () => `void` *** ### onMessage() > **onMessage**(`handler`): () => `void` Register handler for inbound peer-to-peer messages. #### Parameters ##### handler (`records`) => `void` #### Returns () => `void` *** ### onTag() > **onTag**(`handler`): () => `void` Register handler for new tag detection. #### Parameters ##### handler (`event`) => `void` #### Returns () => `void` *** ### onTagLost() > **onTagLost**(`handler`): () => `void` Register handler for tag removal. #### Parameters ##### handler (`event`) => `void` #### Returns () => `void` *** ### putMessage() > **putMessage**(`record`): `Promise`\<`void`\> Peer-to-peer: put a message to a peer P2P target (NFC-DEP / SNEP LLCP). #### Parameters ##### record [`NdefRecord`](NdefRecord.md)[] #### Returns `Promise`\<`void`\> *** ### readNdef() > **readNdef**(`tagId`): `Promise`\<[`NdefRecord`](NdefRecord.md)[]\> Read NDEF messages off a present tag. #### Parameters ##### tagId `string` #### Returns `Promise`\<[`NdefRecord`](NdefRecord.md)[]\> *** ### registerHceApduHandler() > **registerHceApduHandler**(`handler`): `Promise`\<`void`\> Host Card Emulation: serve an APDU handler to an external reader. #### Parameters ##### handler [`HceApduHandler`](../type-aliases/HceApduHandler.md) #### Returns `Promise`\<`void`\> *** ### startPolling() > **startPolling**(`options?`): `Promise`\<`void`\> Begin reader polling for tags. #### Parameters ##### options? ###### techs? `string`[] #### Returns `Promise`\<`void`\> *** ### stopPolling() > **stopPolling**(): `Promise`\<`void`\> Stop reader polling. #### Returns `Promise`\<`void`\> *** ### transceive() > **transceive**(`tagId`, `apdu`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> ISO 7816-4 APDU exchange with a secure-element tag (Type 4 capable). #### Parameters ##### tagId `string` ##### apdu `Uint8Array` #### Returns `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> *** ### unregisterHceApduHandler() > **unregisterHceApduHandler**(): `Promise`\<`void`\> Stop serving host-card-emulation APDUs. #### Returns `Promise`\<`void`\> *** ### waitForTag() > **waitForTag**(`timeoutMs?`): `Promise`\<[`NfcTag`](NfcTag.md) \| `null`\> Block until a tag appears, or timeoutMs elapses (returns null on timeout). #### Parameters ##### timeoutMs? `number` #### Returns `Promise`\<[`NfcTag`](NfcTag.md) \| `null`\> *** ### writeNdef() > **writeNdef**(`tagId`, `records`): `Promise`\<`void`\> Write an NDEF message to a present tag (contactless / re-writable tags). #### Parameters ##### tagId `string` ##### records [`NdefRecord`](NdefRecord.md)[] #### Returns `Promise`\<`void`\> --- ## Page: HceApduHandler URL: https://docs.totem.ing/api/totemsdk-edge-nfc/type-aliases/HceApduHandler [**@totemsdk/edge-nfc**](../index.md) *** [@totemsdk/edge-nfc](../index.md) / HceApduHandler # Type Alias: HceApduHandler > **HceApduHandler** = (`apdu`) => `Promise`\<`Uint8Array`\> Host Card Emulation callback — respond to an ISO 7816-4 APDU sent by an external reader. ## Parameters ### apdu `Uint8Array` ## Returns `Promise`\<`Uint8Array`\> --- ## Page: TNF_ABSOLUTE_URI URL: https://docs.totem.ing/api/totemsdk-edge-nfc/variables/TNF_ABSOLUTE_URI [**@totemsdk/edge-nfc**](../index.md) *** [@totemsdk/edge-nfc](../index.md) / TNF\_ABSOLUTE\_URI # Variable: TNF\_ABSOLUTE\_URI > `const` **TNF\_ABSOLUTE\_URI**: `3` = `0x03` --- ## Page: TNF_EXTERNAL URL: https://docs.totem.ing/api/totemsdk-edge-nfc/variables/TNF_EXTERNAL [**@totemsdk/edge-nfc**](../index.md) *** [@totemsdk/edge-nfc](../index.md) / TNF\_EXTERNAL # Variable: TNF\_EXTERNAL > `const` **TNF\_EXTERNAL**: `4` = `0x04` --- ## Page: TNF_MIME URL: https://docs.totem.ing/api/totemsdk-edge-nfc/variables/TNF_MIME [**@totemsdk/edge-nfc**](../index.md) *** [@totemsdk/edge-nfc](../index.md) / TNF\_MIME # Variable: TNF\_MIME > `const` **TNF\_MIME**: `2` = `0x02` --- ## Page: TNF_WELL_KNOWN URL: https://docs.totem.ing/api/totemsdk-edge-nfc/variables/TNF_WELL_KNOWN [**@totemsdk/edge-nfc**](../index.md) *** [@totemsdk/edge-nfc](../index.md) / TNF\_WELL\_KNOWN # Variable: TNF\_WELL\_KNOWN > `const` **TNF\_WELL\_KNOWN**: `1` = `0x01` --- ## Page: NativeOpcuaTransport URL: https://docs.totem.ing/api/totemsdk-edge-opcua/classes/NativeOpcuaTransport [**@totemsdk/edge-opcua**](../index.md) *** [@totemsdk/edge-opcua](../index.md) / NativeOpcuaTransport # Class: NativeOpcuaTransport OPC-UA transport port — injected by the caller. OPC-UA (IEC 62541) is a binary protocol for industrial automation. Supports secure channels, sessions, node browsing, subscriptions, and method calls. The caller provides the OPC-UA stack. ## Implements - [`OpcuaTransportPort`](../interfaces/OpcuaTransportPort.md) ## Constructors ### Constructor > **new NativeOpcuaTransport**(`config?`): `NativeOpcuaTransport` #### Parameters ##### config? [`NativeOpcuaConfig`](../interfaces/NativeOpcuaConfig.md) = `{}` #### Returns `NativeOpcuaTransport` ## Methods ### browse() > **browse**(`nodeId`): `Promise`\<[`OpcuaNode`](../interfaces/OpcuaNode.md)[]\> Browse the server's address space. #### Parameters ##### nodeId `string` #### Returns `Promise`\<[`OpcuaNode`](../interfaces/OpcuaNode.md)[]\> #### Implementation of [`OpcuaTransportPort`](../interfaces/OpcuaTransportPort.md).[`browse`](../interfaces/OpcuaTransportPort.md#browse) *** ### call() > **call**(`objectId`, `methodId`, `args`): `Promise`\<[`OpcuaValue`](../interfaces/OpcuaValue.md)[]\> Call a method on an object node. #### Parameters ##### objectId `string` ##### methodId `string` ##### args [`OpcuaValue`](../interfaces/OpcuaValue.md)[] #### Returns `Promise`\<[`OpcuaValue`](../interfaces/OpcuaValue.md)[]\> #### Implementation of [`OpcuaTransportPort`](../interfaces/OpcuaTransportPort.md).[`call`](../interfaces/OpcuaTransportPort.md#call) *** ### connect() > **connect**(`endpointUrl`): `Promise`\<`void`\> Connect to an OPC-UA server endpoint. #### Parameters ##### endpointUrl `string` #### Returns `Promise`\<`void`\> #### Implementation of [`OpcuaTransportPort`](../interfaces/OpcuaTransportPort.md).[`connect`](../interfaces/OpcuaTransportPort.md#connect) *** ### disconnect() > **disconnect**(): `Promise`\<`void`\> Disconnect and close the session. #### Returns `Promise`\<`void`\> #### Implementation of [`OpcuaTransportPort`](../interfaces/OpcuaTransportPort.md).[`disconnect`](../interfaces/OpcuaTransportPort.md#disconnect) *** ### onError() > **onError**(`handler`): () => `void` Register handler for session errors. #### Parameters ##### handler (`err`) => `void` #### Returns () => `void` #### Implementation of [`OpcuaTransportPort`](../interfaces/OpcuaTransportPort.md).[`onError`](../interfaces/OpcuaTransportPort.md#onerror) *** ### read() > **read**(`nodeId`): `Promise`\<[`OpcuaValue`](../interfaces/OpcuaValue.md)\> Read the value of a node. #### Parameters ##### nodeId `string` #### Returns `Promise`\<[`OpcuaValue`](../interfaces/OpcuaValue.md)\> #### Implementation of [`OpcuaTransportPort`](../interfaces/OpcuaTransportPort.md).[`read`](../interfaces/OpcuaTransportPort.md#read) *** ### subscribe() > **subscribe**(`nodeIds`, `samplingInterval`): `Promise`\<[`OpcuaSubscription`](../interfaces/OpcuaSubscription.md)\> Create a monitored item subscription. #### Parameters ##### nodeIds `string`[] ##### samplingInterval `number` #### Returns `Promise`\<[`OpcuaSubscription`](../interfaces/OpcuaSubscription.md)\> #### Implementation of [`OpcuaTransportPort`](../interfaces/OpcuaTransportPort.md).[`subscribe`](../interfaces/OpcuaTransportPort.md#subscribe) *** ### write() > **write**(`nodeId`, `value`): `Promise`\<`void`\> Write a value to a node. #### Parameters ##### nodeId `string` ##### value [`OpcuaValue`](../interfaces/OpcuaValue.md) #### Returns `Promise`\<`void`\> #### Implementation of [`OpcuaTransportPort`](../interfaces/OpcuaTransportPort.md).[`write`](../interfaces/OpcuaTransportPort.md#write) --- ## Page: createOpcuaGateway URL: https://docs.totem.ing/api/totemsdk-edge-opcua/functions/createOpcuaGateway [**@totemsdk/edge-opcua**](../index.md) *** [@totemsdk/edge-opcua](../index.md) / createOpcuaGateway # Function: createOpcuaGateway() > **createOpcuaGateway**(`config`): [`OpcuaGateway`](../interfaces/OpcuaGateway.md) ## Parameters ### config [`OpcuaGatewayConfig`](../interfaces/OpcuaGatewayConfig.md) ## Returns [`OpcuaGateway`](../interfaces/OpcuaGateway.md) --- ## Page: createOpcuaSensorBridge URL: https://docs.totem.ing/api/totemsdk-edge-opcua/functions/createOpcuaSensorBridge [**@totemsdk/edge-opcua**](../index.md) *** [@totemsdk/edge-opcua](../index.md) / createOpcuaSensorBridge # Function: createOpcuaSensorBridge() > **createOpcuaSensorBridge**(`config`): [`OpcuaSensorBridge`](../interfaces/OpcuaSensorBridge.md) ## Parameters ### config [`OpcuaSensorBridgeConfig`](../interfaces/OpcuaSensorBridgeConfig.md) ## Returns [`OpcuaSensorBridge`](../interfaces/OpcuaSensorBridge.md) --- ## Page: NativeOpcuaConfig URL: https://docs.totem.ing/api/totemsdk-edge-opcua/interfaces/NativeOpcuaConfig [**@totemsdk/edge-opcua**](../index.md) *** [@totemsdk/edge-opcua](../index.md) / NativeOpcuaConfig # Interface: NativeOpcuaConfig ## Properties ### connectTimeoutMs? > `optional` **connectTimeoutMs?**: `number` *** ### host? > `optional` **host?**: `string` *** ### port? > `optional` **port?**: `number` *** ### requestTimeoutMs? > `optional` **requestTimeoutMs?**: `number` --- ## Page: OpcuaGateway URL: https://docs.totem.ing/api/totemsdk-edge-opcua/interfaces/OpcuaGateway [**@totemsdk/edge-opcua**](../index.md) *** [@totemsdk/edge-opcua](../index.md) / OpcuaGateway # Interface: OpcuaGateway ## Properties ### status > `readonly` **status**: `"stopped"` \| `"running"` \| `"error"` ## Methods ### browse() > **browse**(`nodeId`): `Promise`\<`EdgeOperationResult`\<\{ `nodes`: [`OpcuaNode`](OpcuaNode.md)[]; \}\>\> #### Parameters ##### nodeId `string` #### Returns `Promise`\<`EdgeOperationResult`\<\{ `nodes`: [`OpcuaNode`](OpcuaNode.md)[]; \}\>\> *** ### call() > **call**(`objectId`, `methodId`, `args`): `Promise`\<`EdgeOperationResult`\<\{ `results`: [`OpcuaValue`](OpcuaValue.md)[]; \}\>\> #### Parameters ##### objectId `string` ##### methodId `string` ##### args [`OpcuaValue`](OpcuaValue.md)[] #### Returns `Promise`\<`EdgeOperationResult`\<\{ `results`: [`OpcuaValue`](OpcuaValue.md)[]; \}\>\> *** ### read() > **read**(`nodeId`): `Promise`\<`EdgeOperationResult`\<\{ `value`: [`OpcuaValue`](OpcuaValue.md); \}\>\> #### Parameters ##### nodeId `string` #### Returns `Promise`\<`EdgeOperationResult`\<\{ `value`: [`OpcuaValue`](OpcuaValue.md); \}\>\> *** ### start() > **start**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### stop() > **stop**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### write() > **write**(`nodeId`, `value`): `Promise`\<`EdgeOperationResult`\<`unknown`\>\> #### Parameters ##### nodeId `string` ##### value [`OpcuaValue`](OpcuaValue.md) #### Returns `Promise`\<`EdgeOperationResult`\<`unknown`\>\> --- ## Page: OpcuaGatewayConfig URL: https://docs.totem.ing/api/totemsdk-edge-opcua/interfaces/OpcuaGatewayConfig [**@totemsdk/edge-opcua**](../index.md) *** [@totemsdk/edge-opcua](../index.md) / OpcuaGatewayConfig # Interface: OpcuaGatewayConfig ## Properties ### endpointUrl > **endpointUrl**: `string` *** ### runtime > **runtime**: `EdgeRuntime` *** ### subscriptions? > `optional` **subscriptions?**: [`OpcuaNodeBinding`](OpcuaNodeBinding.md)[] Nodes to subscribe to on start. *** ### transport > **transport**: [`OpcuaTransportPort`](OpcuaTransportPort.md) --- ## Page: OpcuaNode URL: https://docs.totem.ing/api/totemsdk-edge-opcua/interfaces/OpcuaNode [**@totemsdk/edge-opcua**](../index.md) *** [@totemsdk/edge-opcua](../index.md) / OpcuaNode # Interface: OpcuaNode ## Properties ### browseName > **browseName**: `string` *** ### children? > `optional` **children?**: `OpcuaNode`[] *** ### dataType? > `optional` **dataType?**: `string` *** ### displayName > **displayName**: `string` *** ### nodeClass > **nodeClass**: `string` *** ### nodeId > **nodeId**: `string` *** ### valueRank? > `optional` **valueRank?**: `number` --- ## Page: OpcuaNodeBinding URL: https://docs.totem.ing/api/totemsdk-edge-opcua/interfaces/OpcuaNodeBinding [**@totemsdk/edge-opcua**](../index.md) *** [@totemsdk/edge-opcua](../index.md) / OpcuaNodeBinding # Interface: OpcuaNodeBinding ## Properties ### nodeId > **nodeId**: `string` *** ### samplingInterval > **samplingInterval**: `number` *** ### sensorId? > `optional` **sensorId?**: `string` --- ## Page: OpcuaSensorBinding URL: https://docs.totem.ing/api/totemsdk-edge-opcua/interfaces/OpcuaSensorBinding [**@totemsdk/edge-opcua**](../index.md) *** [@totemsdk/edge-opcua](../index.md) / OpcuaSensorBinding # Interface: OpcuaSensorBinding ## Properties ### dataType? > `optional` **dataType?**: `string` *** ### intervalMs > **intervalMs**: `number` *** ### nodeId > **nodeId**: `string` *** ### sensorId > **sensorId**: `string` *** ### unit? > `optional` **unit?**: `string` --- ## Page: OpcuaSensorBridge URL: https://docs.totem.ing/api/totemsdk-edge-opcua/interfaces/OpcuaSensorBridge [**@totemsdk/edge-opcua**](../index.md) *** [@totemsdk/edge-opcua](../index.md) / OpcuaSensorBridge # Interface: OpcuaSensorBridge ## Methods ### poll() > **poll**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### start() > **start**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### stop() > **stop**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> --- ## Page: OpcuaSensorBridgeConfig URL: https://docs.totem.ing/api/totemsdk-edge-opcua/interfaces/OpcuaSensorBridgeConfig [**@totemsdk/edge-opcua**](../index.md) *** [@totemsdk/edge-opcua](../index.md) / OpcuaSensorBridgeConfig # Interface: OpcuaSensorBridgeConfig ## Properties ### bindings > **bindings**: [`OpcuaSensorBinding`](OpcuaSensorBinding.md)[] *** ### gateway? > `optional` **gateway?**: [`OpcuaGateway`](OpcuaGateway.md) *** ### runtime > **runtime**: `EdgeRuntime` *** ### transport > **transport**: [`OpcuaTransportPort`](OpcuaTransportPort.md) --- ## Page: OpcuaSubscription URL: https://docs.totem.ing/api/totemsdk-edge-opcua/interfaces/OpcuaSubscription [**@totemsdk/edge-opcua**](../index.md) *** [@totemsdk/edge-opcua](../index.md) / OpcuaSubscription # Interface: OpcuaSubscription ## Methods ### addNodes() > **addNodes**(`nodeIds`): `Promise`\<`void`\> Add nodes to the subscription. #### Parameters ##### nodeIds `string`[] #### Returns `Promise`\<`void`\> *** ### destroy() > **destroy**(): `Promise`\<`void`\> Destroy the subscription. #### Returns `Promise`\<`void`\> *** ### onChange() > **onChange**(`handler`): () => `void` Register handler for value changes. #### Parameters ##### handler (`events`) => `void` #### Returns () => `void` *** ### removeNodes() > **removeNodes**(`nodeIds`): `Promise`\<`void`\> Remove nodes from the subscription. #### Parameters ##### nodeIds `string`[] #### Returns `Promise`\<`void`\> --- ## Page: OpcuaTransportPort URL: https://docs.totem.ing/api/totemsdk-edge-opcua/interfaces/OpcuaTransportPort [**@totemsdk/edge-opcua**](../index.md) *** [@totemsdk/edge-opcua](../index.md) / OpcuaTransportPort # Interface: OpcuaTransportPort OPC-UA transport port — injected by the caller. OPC-UA (IEC 62541) is a binary protocol for industrial automation. Supports secure channels, sessions, node browsing, subscriptions, and method calls. The caller provides the OPC-UA stack. ## Methods ### browse() > **browse**(`nodeId`): `Promise`\<[`OpcuaNode`](OpcuaNode.md)[]\> Browse the server's address space. #### Parameters ##### nodeId `string` #### Returns `Promise`\<[`OpcuaNode`](OpcuaNode.md)[]\> *** ### call() > **call**(`objectId`, `methodId`, `args`): `Promise`\<[`OpcuaValue`](OpcuaValue.md)[]\> Call a method on an object node. #### Parameters ##### objectId `string` ##### methodId `string` ##### args [`OpcuaValue`](OpcuaValue.md)[] #### Returns `Promise`\<[`OpcuaValue`](OpcuaValue.md)[]\> *** ### connect() > **connect**(`endpointUrl`): `Promise`\<`void`\> Connect to an OPC-UA server endpoint. #### Parameters ##### endpointUrl `string` #### Returns `Promise`\<`void`\> *** ### disconnect() > **disconnect**(): `Promise`\<`void`\> Disconnect and close the session. #### Returns `Promise`\<`void`\> *** ### onError() > **onError**(`handler`): () => `void` Register handler for session errors. #### Parameters ##### handler (`err`) => `void` #### Returns () => `void` *** ### read() > **read**(`nodeId`): `Promise`\<[`OpcuaValue`](OpcuaValue.md)\> Read the value of a node. #### Parameters ##### nodeId `string` #### Returns `Promise`\<[`OpcuaValue`](OpcuaValue.md)\> *** ### subscribe() > **subscribe**(`nodeIds`, `samplingInterval`): `Promise`\<[`OpcuaSubscription`](OpcuaSubscription.md)\> Create a monitored item subscription. #### Parameters ##### nodeIds `string`[] ##### samplingInterval `number` #### Returns `Promise`\<[`OpcuaSubscription`](OpcuaSubscription.md)\> *** ### write() > **write**(`nodeId`, `value`): `Promise`\<`void`\> Write a value to a node. #### Parameters ##### nodeId `string` ##### value [`OpcuaValue`](OpcuaValue.md) #### Returns `Promise`\<`void`\> --- ## Page: OpcuaValue URL: https://docs.totem.ing/api/totemsdk-edge-opcua/interfaces/OpcuaValue [**@totemsdk/edge-opcua**](../index.md) *** [@totemsdk/edge-opcua](../index.md) / OpcuaValue # Interface: OpcuaValue ## Properties ### dataType > **dataType**: `string` *** ### serverTimestamp? > `optional` **serverTimestamp?**: `number` *** ### sourceTimestamp? > `optional` **sourceTimestamp?**: `number` *** ### statusCode? > `optional` **statusCode?**: `number` *** ### value > **value**: `unknown` --- ## Page: OpcuaValueChange URL: https://docs.totem.ing/api/totemsdk-edge-opcua/interfaces/OpcuaValueChange [**@totemsdk/edge-opcua**](../index.md) *** [@totemsdk/edge-opcua](../index.md) / OpcuaValueChange # Interface: OpcuaValueChange ## Properties ### nodeId > **nodeId**: `string` *** ### receivedAt > **receivedAt**: `number` *** ### value > **value**: [`OpcuaValue`](OpcuaValue.md) --- ## Page: createRos2Gateway URL: https://docs.totem.ing/api/totemsdk-edge-ros2/functions/createRos2Gateway [**@totemsdk/edge-ros2**](../index.md) *** [@totemsdk/edge-ros2](../index.md) / createRos2Gateway # Function: createRos2Gateway() > **createRos2Gateway**(`config`): [`Ros2Gateway`](../interfaces/Ros2Gateway.md) ## Parameters ### config [`Ros2GatewayConfig`](../interfaces/Ros2GatewayConfig.md) ## Returns [`Ros2Gateway`](../interfaces/Ros2Gateway.md) --- ## Page: createRos2SensorBridge URL: https://docs.totem.ing/api/totemsdk-edge-ros2/functions/createRos2SensorBridge [**@totemsdk/edge-ros2**](../index.md) *** [@totemsdk/edge-ros2](../index.md) / createRos2SensorBridge # Function: createRos2SensorBridge() > **createRos2SensorBridge**(`config`): [`Ros2SensorBridge`](../interfaces/Ros2SensorBridge.md) ## Parameters ### config [`Ros2SensorBridgeConfig`](../interfaces/Ros2SensorBridgeConfig.md) ## Returns [`Ros2SensorBridge`](../interfaces/Ros2SensorBridge.md) --- ## Page: Ros2Client URL: https://docs.totem.ing/api/totemsdk-edge-ros2/interfaces/Ros2Client [**@totemsdk/edge-ros2**](../index.md) *** [@totemsdk/edge-ros2](../index.md) / Ros2Client # Interface: Ros2Client ## Methods ### call() > **call**(`request`, `timeoutMs?`): `Promise`\<[`Ros2Message`](Ros2Message.md)\> #### Parameters ##### request [`Ros2Message`](Ros2Message.md) ##### timeoutMs? `number` #### Returns `Promise`\<[`Ros2Message`](Ros2Message.md)\> *** ### destroy() > **destroy**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> --- ## Page: Ros2Gateway URL: https://docs.totem.ing/api/totemsdk-edge-ros2/interfaces/Ros2Gateway [**@totemsdk/edge-ros2**](../index.md) *** [@totemsdk/edge-ros2](../index.md) / Ros2Gateway # Interface: Ros2Gateway ## Properties ### status > `readonly` **status**: `"stopped"` \| `"running"` \| `"error"` ## Methods ### callService() > **callService**(`service`, `serviceType`, `request`, `timeoutMs?`): `Promise`\<`EdgeOperationResult`\<\{ `response`: [`Ros2Message`](Ros2Message.md); \}\>\> Call a service. #### Parameters ##### service `string` ##### serviceType `string` ##### request [`Ros2Message`](Ros2Message.md) ##### timeoutMs? `number` #### Returns `Promise`\<`EdgeOperationResult`\<\{ `response`: [`Ros2Message`](Ros2Message.md); \}\>\> *** ### createPublisher() > **createPublisher**(`topic`, `messageType`): `Promise`\<[`Ros2Publisher`](Ros2Publisher.md)\> Create a publisher on a typed topic. #### Parameters ##### topic `string` ##### messageType `string` #### Returns `Promise`\<[`Ros2Publisher`](Ros2Publisher.md)\> *** ### createSubscription() > **createSubscription**(`topic`, `messageType`, `handler`): `Promise`\<[`Ros2Subscription`](Ros2Subscription.md)\> Create a subscription on a typed topic. #### Parameters ##### topic `string` ##### messageType `string` ##### handler (`msg`) => `void` #### Returns `Promise`\<[`Ros2Subscription`](Ros2Subscription.md)\> *** ### start() > **start**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### stop() > **stop**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> --- ## Page: Ros2GatewayConfig URL: https://docs.totem.ing/api/totemsdk-edge-ros2/interfaces/Ros2GatewayConfig [**@totemsdk/edge-ros2**](../index.md) *** [@totemsdk/edge-ros2](../index.md) / Ros2GatewayConfig # Interface: Ros2GatewayConfig ## Properties ### nodeName > **nodeName**: `string` *** ### runtime > **runtime**: `EdgeRuntime` *** ### subscriptions? > `optional` **subscriptions?**: [`Ros2TopicBinding`](Ros2TopicBinding.md)[] Topics to subscribe to on start. *** ### transport > **transport**: [`Ros2TransportPort`](Ros2TransportPort.md) --- ## Page: Ros2Message URL: https://docs.totem.ing/api/totemsdk-edge-ros2/interfaces/Ros2Message [**@totemsdk/edge-ros2**](../index.md) *** [@totemsdk/edge-ros2](../index.md) / Ros2Message # Interface: Ros2Message ## Properties ### data > **data**: `Uint8Array` Serialised message bytes (CDR or custom serialisation). *** ### frameId? > `optional` **frameId?**: `string` Frame ID for TF transforms. *** ### receivedAt > **receivedAt**: `number` Timestamp of receipt. *** ### sourceNode? > `optional` **sourceNode?**: `string` Source node name. *** ### timestamp? > `optional` **timestamp?**: `bigint` ROS timestamp (nanoseconds since epoch). *** ### type > **type**: `string` Message type name (e.g. "sensor_msgs/msg/Image"). --- ## Page: Ros2Publisher URL: https://docs.totem.ing/api/totemsdk-edge-ros2/interfaces/Ros2Publisher [**@totemsdk/edge-ros2**](../index.md) *** [@totemsdk/edge-ros2](../index.md) / Ros2Publisher # Interface: Ros2Publisher ## Methods ### destroy() > **destroy**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### publish() > **publish**(`message`): `Promise`\<`void`\> #### Parameters ##### message [`Ros2Message`](Ros2Message.md) #### Returns `Promise`\<`void`\> --- ## Page: Ros2SensorBinding URL: https://docs.totem.ing/api/totemsdk-edge-ros2/interfaces/Ros2SensorBinding [**@totemsdk/edge-ros2**](../index.md) *** [@totemsdk/edge-ros2](../index.md) / Ros2SensorBinding # Interface: Ros2SensorBinding ## Properties ### dataType? > `optional` **dataType?**: `string` *** ### fieldExtractor? > `optional` **fieldExtractor?**: (`msg`) => `unknown` Optional field extraction from serialised message. #### Parameters ##### msg [`Ros2Message`](Ros2Message.md) #### Returns `unknown` *** ### messageType > **messageType**: `string` *** ### sensorId > **sensorId**: `string` *** ### topic > **topic**: `string` *** ### unit? > `optional` **unit?**: `string` --- ## Page: Ros2SensorBridge URL: https://docs.totem.ing/api/totemsdk-edge-ros2/interfaces/Ros2SensorBridge [**@totemsdk/edge-ros2**](../index.md) *** [@totemsdk/edge-ros2](../index.md) / Ros2SensorBridge # Interface: Ros2SensorBridge ## Methods ### start() > **start**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### stop() > **stop**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> --- ## Page: Ros2SensorBridgeConfig URL: https://docs.totem.ing/api/totemsdk-edge-ros2/interfaces/Ros2SensorBridgeConfig [**@totemsdk/edge-ros2**](../index.md) *** [@totemsdk/edge-ros2](../index.md) / Ros2SensorBridgeConfig # Interface: Ros2SensorBridgeConfig ## Properties ### bindings > **bindings**: [`Ros2SensorBinding`](Ros2SensorBinding.md)[] *** ### gateway? > `optional` **gateway?**: [`Ros2Gateway`](Ros2Gateway.md) *** ### runtime > **runtime**: `EdgeRuntime` *** ### transport > **transport**: [`Ros2TransportPort`](Ros2TransportPort.md) --- ## Page: Ros2Server URL: https://docs.totem.ing/api/totemsdk-edge-ros2/interfaces/Ros2Server [**@totemsdk/edge-ros2**](../index.md) *** [@totemsdk/edge-ros2](../index.md) / Ros2Server # Interface: Ros2Server ## Methods ### destroy() > **destroy**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> --- ## Page: Ros2Subscription URL: https://docs.totem.ing/api/totemsdk-edge-ros2/interfaces/Ros2Subscription [**@totemsdk/edge-ros2**](../index.md) *** [@totemsdk/edge-ros2](../index.md) / Ros2Subscription # Interface: Ros2Subscription ## Methods ### destroy() > **destroy**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> --- ## Page: Ros2TopicBinding URL: https://docs.totem.ing/api/totemsdk-edge-ros2/interfaces/Ros2TopicBinding [**@totemsdk/edge-ros2**](../index.md) *** [@totemsdk/edge-ros2](../index.md) / Ros2TopicBinding # Interface: Ros2TopicBinding ## Properties ### messageType > **messageType**: `string` *** ### sensorId? > `optional` **sensorId?**: `string` *** ### topic > **topic**: `string` --- ## Page: Ros2TransportPort URL: https://docs.totem.ing/api/totemsdk-edge-ros2/interfaces/Ros2TransportPort [**@totemsdk/edge-ros2**](../index.md) *** [@totemsdk/edge-ros2](../index.md) / Ros2TransportPort # Interface: Ros2TransportPort ROS 2 transport port — injected by the caller. ROS 2 uses DDS (Data Distribution Service) middleware for discovery, publish/subscribe, and service calls. The caller provides the DDS implementation (eProsima Fast DDS, Cyclone DDS, or rmw layer). ## Methods ### createClient() > **createClient**(`service`, `serviceType`): `Promise`\<[`Ros2Client`](Ros2Client.md)\> Create a service client. #### Parameters ##### service `string` ##### serviceType `string` #### Returns `Promise`\<[`Ros2Client`](Ros2Client.md)\> *** ### createPublisher() > **createPublisher**(`topic`, `messageType`): `Promise`\<[`Ros2Publisher`](Ros2Publisher.md)\> Create a publisher on a typed topic. #### Parameters ##### topic `string` ##### messageType `string` #### Returns `Promise`\<[`Ros2Publisher`](Ros2Publisher.md)\> *** ### createService() > **createService**(`service`, `serviceType`, `handler`): `Promise`\<[`Ros2Server`](Ros2Server.md)\> Create a service server. #### Parameters ##### service `string` ##### serviceType `string` ##### handler (`request`) => `Promise`\<[`Ros2Message`](Ros2Message.md)\> #### Returns `Promise`\<[`Ros2Server`](Ros2Server.md)\> *** ### createSubscription() > **createSubscription**(`topic`, `messageType`, `handler`): `Promise`\<[`Ros2Subscription`](Ros2Subscription.md)\> Create a subscription on a typed topic. #### Parameters ##### topic `string` ##### messageType `string` ##### handler (`msg`) => `void` #### Returns `Promise`\<[`Ros2Subscription`](Ros2Subscription.md)\> *** ### init() > **init**(`args?`): `Promise`\<`void`\> Initialise the ROS 2 context. #### Parameters ##### args? `string`[] #### Returns `Promise`\<`void`\> *** ### onError() > **onError**(`handler`): () => `void` Register handler for node errors. #### Parameters ##### handler (`err`) => `void` #### Returns () => `void` *** ### shutdown() > **shutdown**(): `Promise`\<`void`\> Shutdown the ROS 2 context. #### Returns `Promise`\<`void`\> --- ## Page: UsageStore URL: https://docs.totem.ing/api/totemsdk-governance/classes/UsageStore [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / UsageStore # Class: UsageStore ## Constructors ### Constructor > **new UsageStore**(): `UsageStore` #### Returns `UsageStore` ## Methods ### abortMandateUse() > **abortMandateUse**(`reservationId`, `_reason?`): `boolean` #### Parameters ##### reservationId `string` ##### \_reason? `string` #### Returns `boolean` *** ### commitMandateUse() > **commitMandateUse**(`reservationId`, `receiptParams`): `string` \| [`MandateReceipt`](../interfaces/MandateReceipt.md) #### Parameters ##### reservationId `string` ##### receiptParams ###### actionIndex `number` ###### actionType [`ProposalActionType`](../type-aliases/ProposalActionType.md) ###### proofId? `string` ###### proposalId `string` #### Returns `string` \| [`MandateReceipt`](../interfaces/MandateReceipt.md) *** ### getReceipt() > **getReceipt**(`receiptId`): [`MandateReceipt`](../interfaces/MandateReceipt.md) \| `undefined` #### Parameters ##### receiptId `string` #### Returns [`MandateReceipt`](../interfaces/MandateReceipt.md) \| `undefined` *** ### getReceiptsByMandate() > **getReceiptsByMandate**(`mandateProofId`): [`MandateReceipt`](../interfaces/MandateReceipt.md)[] #### Parameters ##### mandateProofId `string` #### Returns [`MandateReceipt`](../interfaces/MandateReceipt.md)[] *** ### getReservation() > **getReservation**(`reservationId`): [`UsageReservation`](../interfaces/UsageReservation.md) \| `undefined` #### Parameters ##### reservationId `string` #### Returns [`UsageReservation`](../interfaces/UsageReservation.md) \| `undefined` *** ### getReservationsByMandate() > **getReservationsByMandate**(`mandateProofId`): [`UsageReservation`](../interfaces/UsageReservation.md)[] #### Parameters ##### mandateProofId `string` #### Returns [`UsageReservation`](../interfaces/UsageReservation.md)[] *** ### reserveMandateUse() > **reserveMandateUse**(`mandateProofId`, `intentId`, `ttlMs?`): [`UsageReservation`](../interfaces/UsageReservation.md) #### Parameters ##### mandateProofId `string` ##### intentId `string` ##### ttlMs? `number` #### Returns [`UsageReservation`](../interfaces/UsageReservation.md) --- ## Page: activateProposal URL: https://docs.totem.ing/api/totemsdk-governance/functions/activateProposal [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / activateProposal # Function: activateProposal() > **activateProposal**(`proposal`, `now?`): [`GovernanceResult`](../type-aliases/GovernanceResult.md)\<[`Proposal`](../interfaces/Proposal.md)\> ## Parameters ### proposal [`Proposal`](../interfaces/Proposal.md) ### now? `number` = `...` ## Returns [`GovernanceResult`](../type-aliases/GovernanceResult.md)\<[`Proposal`](../interfaces/Proposal.md)\> --- ## Page: cancelProposal URL: https://docs.totem.ing/api/totemsdk-governance/functions/cancelProposal [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / cancelProposal # Function: cancelProposal() > **cancelProposal**(`proposal`): [`GovernanceResult`](../type-aliases/GovernanceResult.md)\<[`Proposal`](../interfaces/Proposal.md)\> ## Parameters ### proposal [`Proposal`](../interfaces/Proposal.md) ## Returns [`GovernanceResult`](../type-aliases/GovernanceResult.md)\<[`Proposal`](../interfaces/Proposal.md)\> --- ## Page: canonicalJson URL: https://docs.totem.ing/api/totemsdk-governance/functions/canonicalJson [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / canonicalJson # Function: canonicalJson() > **canonicalJson**(`value`): `string` ## Parameters ### value `unknown` ## Returns `string` --- ## Page: computeDelegationId URL: https://docs.totem.ing/api/totemsdk-governance/functions/computeDelegationId [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / computeDelegationId # Function: computeDelegationId() > **computeDelegationId**(`delegator`, `delegate`, `daoId`, `castAt`): `string` ## Parameters ### delegator `string` ### delegate `string` ### daoId `string` ### castAt `number` ## Returns `string` --- ## Page: computeOutcomeId URL: https://docs.totem.ing/api/totemsdk-governance/functions/computeOutcomeId [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / computeOutcomeId # Function: computeOutcomeId() > **computeOutcomeId**(`proposalId`, `tallyHash`, `determinedAt`): `string` ## Parameters ### proposalId `string` ### tallyHash `string` ### determinedAt `number` ## Returns `string` --- ## Page: computeProposalId URL: https://docs.totem.ing/api/totemsdk-governance/functions/computeProposalId [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / computeProposalId # Function: computeProposalId() > **computeProposalId**(`daoId`, `proposer`, `createdAt`, `actions`): `string` ## Parameters ### daoId `string` ### proposer `string` ### createdAt `number` ### actions `number` ## Returns `string` --- ## Page: computeSnapshotHash URL: https://docs.totem.ing/api/totemsdk-governance/functions/computeSnapshotHash [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / computeSnapshotHash # Function: computeSnapshotHash() > **computeSnapshotHash**(`daoId`, `frozenAt`, `entries`): `string` Canonical snapshot hash. Covers every field that determines voting eligibility: `memberId`, `role`, `weight`, `addedAt`, `addedBy`, and `expiresAt`. Omitting any of these would let an attacker mutate eligibility metadata (e.g. grant a role, extend an expiry, or backdate an `addedAt`) without invalidating the snapshot hash. ## Parameters ### daoId `string` ### frozenAt `number` ### entries [`MembershipEntry`](../interfaces/MembershipEntry.md)[] ## Returns `string` --- ## Page: computeTallyHash URL: https://docs.totem.ing/api/totemsdk-governance/functions/computeTallyHash [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / computeTallyHash # Function: computeTallyHash() > **computeTallyHash**(`tally`): `string` ## Parameters ### tally [`VoteTally`](../interfaces/VoteTally.md) ## Returns `string` --- ## Page: computeTallyProofHash URL: https://docs.totem.ing/api/totemsdk-governance/functions/computeTallyProofHash [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / computeTallyProofHash # Function: computeTallyProofHash() > **computeTallyProofHash**(`tally`): `string` ## Parameters ### tally [`VoteTally`](../interfaces/VoteTally.md) ## Returns `string` --- ## Page: computeVoteId URL: https://docs.totem.ing/api/totemsdk-governance/functions/computeVoteId [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / computeVoteId # Function: computeVoteId() > **computeVoteId**(`proposalId`, `voter`, `choice`, `castAt`): `string` ## Parameters ### proposalId `string` ### voter `string` ### choice `string` ### castAt `number` ## Returns `string` --- ## Page: createDelegatedVote URL: https://docs.totem.ing/api/totemsdk-governance/functions/createDelegatedVote [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / createDelegatedVote # Function: createDelegatedVote() > **createDelegatedVote**(`params`): [`GovernanceResult`](../type-aliases/GovernanceResult.md)\<[`Vote`](../interfaces/Vote.md)[]\> ## Parameters ### params #### castAt? `number` #### choice `"yes"` \| `"no"` \| `"abstain"` #### delegate `string` #### delegations [`Delegation`](../interfaces/Delegation.md)[] #### proposal [`Proposal`](../interfaces/Proposal.md) #### snapshot [`MembershipSnapshot`](../interfaces/MembershipSnapshot.md) ## Returns [`GovernanceResult`](../type-aliases/GovernanceResult.md)\<[`Vote`](../interfaces/Vote.md)[]\> --- ## Page: createDelegation URL: https://docs.totem.ing/api/totemsdk-governance/functions/createDelegation [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / createDelegation # Function: createDelegation() > **createDelegation**(`params`): [`Delegation`](../interfaces/Delegation.md) ## Parameters ### params #### castAt? `number` #### daoId `string` #### delegate `string` #### delegator `string` #### expiresAt? `number` #### previousDelegationId? `string` #### scope? `string` #### weight? `number` ## Returns [`Delegation`](../interfaces/Delegation.md) --- ## Page: createGovernanceConfig URL: https://docs.totem.ing/api/totemsdk-governance/functions/createGovernanceConfig [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / createGovernanceConfig # Function: createGovernanceConfig() > **createGovernanceConfig**(`params`): [`GovernanceConfig`](../interfaces/GovernanceConfig.md) ## Parameters ### params #### authorityResolver `string` #### authorityScope `string` #### daoId `string` #### membership \{ `defaultWeight?`: `number`; `minWeightToPropose?`: `number`; \} #### membership.defaultWeight? `number` #### membership.minWeightToPropose? `number` #### name `string` #### voting \{ `algorithm`: `"linear"` \| `"quadratic"` \| `"liquid"`; `allowAbstain?`: `boolean`; `delayBeforeVotingMs?`: `number`; `delegation?`: [`DelegationConfig`](../interfaces/DelegationConfig.md); `executionDelayMs?`: `number`; `passThresholdBps`: `number`; `quadratic?`: [`QuadraticConfig`](../interfaces/QuadraticConfig.md); `quorumBps`: `number`; `votingPeriodMs`: `number`; \} #### voting.algorithm `"linear"` \| `"quadratic"` \| `"liquid"` #### voting.allowAbstain? `boolean` #### voting.delayBeforeVotingMs? `number` #### voting.delegation? [`DelegationConfig`](../interfaces/DelegationConfig.md) #### voting.executionDelayMs? `number` #### voting.passThresholdBps `number` #### voting.quadratic? [`QuadraticConfig`](../interfaces/QuadraticConfig.md) #### voting.quorumBps `number` #### voting.votingPeriodMs `number` ## Returns [`GovernanceConfig`](../interfaces/GovernanceConfig.md) --- ## Page: createGovernedMandate URL: https://docs.totem.ing/api/totemsdk-governance/functions/createGovernedMandate [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / createGovernedMandate # Function: createGovernedMandate() > **createGovernedMandate**(`outcome`, `action`, `actionIndex`, `governanceIdentity`, `executor`, `params`): `MandateBody` ## Parameters ### outcome [`ProposalOutcome`](../interfaces/ProposalOutcome.md) ### action [`ProposalAction`](../interfaces/ProposalAction.md) ### actionIndex `number` ### governanceIdentity `string` ### executor `string` ### params #### membershipSnapshotHash `string` #### outcomeProofId `string` #### voteTallyHash `string` ## Returns `MandateBody` --- ## Page: createOutcome URL: https://docs.totem.ing/api/totemsdk-governance/functions/createOutcome [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / createOutcome # Function: createOutcome() > **createOutcome**(`params`): [`ProposalOutcome`](../interfaces/ProposalOutcome.md) ## Parameters ### params #### determinedAt? `number` #### determinedBy `string` #### proposal [`Proposal`](../interfaces/Proposal.md) #### tally [`VoteTally`](../interfaces/VoteTally.md) ## Returns [`ProposalOutcome`](../interfaces/ProposalOutcome.md) --- ## Page: createOutcomeProofDraft URL: https://docs.totem.ing/api/totemsdk-governance/functions/createOutcomeProofDraft [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / createOutcomeProofDraft # Function: createOutcomeProofDraft() > **createOutcomeProofDraft**(`outcome`, `issuer`): `UnsignedProof` ## Parameters ### outcome [`ProposalOutcome`](../interfaces/ProposalOutcome.md) ### issuer `string` ## Returns `UnsignedProof` --- ## Page: createProposal URL: https://docs.totem.ing/api/totemsdk-governance/functions/createProposal [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / createProposal # Function: createProposal() > **createProposal**(`params`): [`GovernanceResult`](../type-aliases/GovernanceResult.md)\<[`Proposal`](../interfaces/Proposal.md)\> ## Parameters ### params #### actions [`ProposalAction`](../interfaces/ProposalAction.md)[] #### config [`GovernanceConfig`](../interfaces/GovernanceConfig.md) #### createdAt? `number` #### description `string` #### proposer `string` #### snapshot [`MembershipSnapshot`](../interfaces/MembershipSnapshot.md) #### title `string` ## Returns [`GovernanceResult`](../type-aliases/GovernanceResult.md)\<[`Proposal`](../interfaces/Proposal.md)\> --- ## Page: createProposalProofDraft URL: https://docs.totem.ing/api/totemsdk-governance/functions/createProposalProofDraft [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / createProposalProofDraft # Function: createProposalProofDraft() > **createProposalProofDraft**(`proposal`, `issuer`): `UnsignedProof` ## Parameters ### proposal [`Proposal`](../interfaces/Proposal.md) ### issuer `string` ## Returns `UnsignedProof` --- ## Page: createQuadraticVote URL: https://docs.totem.ing/api/totemsdk-governance/functions/createQuadraticVote [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / createQuadraticVote # Function: createQuadraticVote() > **createQuadraticVote**(`params`): [`GovernanceResult`](../type-aliases/GovernanceResult.md)\<[`Vote`](../interfaces/Vote.md)[]\> ## Parameters ### params #### allocations `object`[] #### castAt? `number` #### config? [`GovernanceConfig`](../interfaces/GovernanceConfig.md) #### credits? [`QuadraticCredits`](../interfaces/QuadraticCredits.md) #### proposal [`Proposal`](../interfaces/Proposal.md) #### snapshot [`MembershipSnapshot`](../interfaces/MembershipSnapshot.md) #### voter `string` ## Returns [`GovernanceResult`](../type-aliases/GovernanceResult.md)\<[`Vote`](../interfaces/Vote.md)[]\> --- ## Page: createVote URL: https://docs.totem.ing/api/totemsdk-governance/functions/createVote [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / createVote # Function: createVote() > **createVote**(`params`): [`GovernanceResult`](../type-aliases/GovernanceResult.md)\<[`Vote`](../interfaces/Vote.md)\> ## Parameters ### params #### castAt? `number` #### choice `"yes"` \| `"no"` \| `"abstain"` #### config? [`GovernanceConfig`](../interfaces/GovernanceConfig.md) #### delegations? [`Delegation`](../interfaces/Delegation.md)[] #### proposal [`Proposal`](../interfaces/Proposal.md) #### snapshot [`MembershipSnapshot`](../interfaces/MembershipSnapshot.md) #### voter `string` ## Returns [`GovernanceResult`](../type-aliases/GovernanceResult.md)\<[`Vote`](../interfaces/Vote.md)\> --- ## Page: createVoteProofDraft URL: https://docs.totem.ing/api/totemsdk-governance/functions/createVoteProofDraft [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / createVoteProofDraft # Function: createVoteProofDraft() > **createVoteProofDraft**(`vote`, `issuer`): `UnsignedProof` ## Parameters ### vote [`Vote`](../interfaces/Vote.md) ### issuer `string` ## Returns `UnsignedProof` --- ## Page: executeProposal URL: https://docs.totem.ing/api/totemsdk-governance/functions/executeProposal [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / executeProposal # Function: executeProposal() > **executeProposal**(`proposal`, `tally`, `outcomeProofId`, `governanceIdentity`, `executor`, `now?`): `object`[] ## Parameters ### proposal [`Proposal`](../interfaces/Proposal.md) ### tally [`VoteTally`](../interfaces/VoteTally.md) ### outcomeProofId `string` ### governanceIdentity `string` ### executor `string` ### now? `number` = `...` ## Returns `object`[] --- ## Page: finalizeProposal URL: https://docs.totem.ing/api/totemsdk-governance/functions/finalizeProposal [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / finalizeProposal # Function: finalizeProposal() > **finalizeProposal**(`proposal`, `tally`): [`Proposal`](../interfaces/Proposal.md) ## Parameters ### proposal [`Proposal`](../interfaces/Proposal.md) ### tally [`VoteTally`](../interfaces/VoteTally.md) ## Returns [`Proposal`](../interfaces/Proposal.md) --- ## Page: finalizeProposalExecution URL: https://docs.totem.ing/api/totemsdk-governance/functions/finalizeProposalExecution [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / finalizeProposalExecution # Function: finalizeProposalExecution() > **finalizeProposalExecution**(`proposal`, `outcomeProofSigned`, `txId`): [`Proposal`](../interfaces/Proposal.md) ## Parameters ### proposal [`Proposal`](../interfaces/Proposal.md) ### outcomeProofSigned `SignedProof` ### txId `string` ## Returns [`Proposal`](../interfaces/Proposal.md) --- ## Page: freezeMembershipSnapshot URL: https://docs.totem.ing/api/totemsdk-governance/functions/freezeMembershipSnapshot [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / freezeMembershipSnapshot # Function: freezeMembershipSnapshot() > **freezeMembershipSnapshot**(`daoId`, `entries`, `frozenAt?`): [`MembershipSnapshot`](../interfaces/MembershipSnapshot.md) ## Parameters ### daoId `string` ### entries [`MembershipEntry`](../interfaces/MembershipEntry.md)[] ### frozenAt? `number` ## Returns [`MembershipSnapshot`](../interfaces/MembershipSnapshot.md) --- ## Page: getActiveDelegations URL: https://docs.totem.ing/api/totemsdk-governance/functions/getActiveDelegations [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / getActiveDelegations # Function: getActiveDelegations() > **getActiveDelegations**(`delegations`, `daoId`, `now?`): [`Delegation`](../interfaces/Delegation.md)[] ## Parameters ### delegations [`Delegation`](../interfaces/Delegation.md)[] ### daoId `string` ### now? `number` ## Returns [`Delegation`](../interfaces/Delegation.md)[] --- ## Page: getMemberWeight URL: https://docs.totem.ing/api/totemsdk-governance/functions/getMemberWeight [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / getMemberWeight # Function: getMemberWeight() > **getMemberWeight**(`snapshot`, `memberId`, `at?`): `number` ## Parameters ### snapshot [`MembershipSnapshot`](../interfaces/MembershipSnapshot.md) ### memberId `string` ### at? `number` = `...` ## Returns `number` --- ## Page: getTotalWeight URL: https://docs.totem.ing/api/totemsdk-governance/functions/getTotalWeight [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / getTotalWeight # Function: getTotalWeight() > **getTotalWeight**(`snapshot`, `at?`): `number` ## Parameters ### snapshot [`MembershipSnapshot`](../interfaces/MembershipSnapshot.md) ### at? `number` = `...` ## Returns `number` --- ## Page: getWeightToDelegate URL: https://docs.totem.ing/api/totemsdk-governance/functions/getWeightToDelegate [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / getWeightToDelegate # Function: getWeightToDelegate() > **getWeightToDelegate**(`memberId`, `snapshot`, `delegations`, `daoId`): `number` ## Parameters ### memberId `string` ### snapshot [`MembershipSnapshot`](../interfaces/MembershipSnapshot.md) ### delegations [`Delegation`](../interfaces/Delegation.md)[] ### daoId `string` ## Returns `number` --- ## Page: hashCanonical URL: https://docs.totem.ing/api/totemsdk-governance/functions/hashCanonical [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / hashCanonical # Function: hashCanonical() > **hashCanonical**(`domain`, `value`): `string` ## Parameters ### domain `string` ### value `unknown` ## Returns `string` --- ## Page: isExecutionReady URL: https://docs.totem.ing/api/totemsdk-governance/functions/isExecutionReady [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / isExecutionReady # Function: isExecutionReady() > **isExecutionReady**(`proposal`, `_config?`, `now?`): `boolean` ## Parameters ### proposal [`Proposal`](../interfaces/Proposal.md) ### \_config? [`GovernanceConfig`](../interfaces/GovernanceConfig.md) ### now? `number` = `...` ## Returns `boolean` --- ## Page: isGovernanceError URL: https://docs.totem.ing/api/totemsdk-governance/functions/isGovernanceError [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / isGovernanceError # Function: isGovernanceError() > **isGovernanceError**\<`T`\>(`result`): `result is GovernanceError` ## Type Parameters ### T `T` ## Parameters ### result [`GovernanceResult`](../type-aliases/GovernanceResult.md)\<`T`\> ## Returns `result is GovernanceError` --- ## Page: recallDelegation URL: https://docs.totem.ing/api/totemsdk-governance/functions/recallDelegation [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / recallDelegation # Function: recallDelegation() > **recallDelegation**(`delegation`, `revokedAt?`): [`Delegation`](../interfaces/Delegation.md) ## Parameters ### delegation [`Delegation`](../interfaces/Delegation.md) ### revokedAt? `number` ## Returns [`Delegation`](../interfaces/Delegation.md) --- ## Page: resolveDelegation URL: https://docs.totem.ing/api/totemsdk-governance/functions/resolveDelegation [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / resolveDelegation # Function: resolveDelegation() > **resolveDelegation**(`memberId`, `daoId`, `snapshot`, `delegations`, `options?`): [`DelegationResolution`](../interfaces/DelegationResolution.md) ## Parameters ### memberId `string` ### daoId `string` ### snapshot [`MembershipSnapshot`](../interfaces/MembershipSnapshot.md) ### delegations [`Delegation`](../interfaces/Delegation.md)[] ### options? #### maxDepth? `number` #### proposalId? `string` ## Returns [`DelegationResolution`](../interfaces/DelegationResolution.md) --- ## Page: resolveVotingPower URL: https://docs.totem.ing/api/totemsdk-governance/functions/resolveVotingPower [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / resolveVotingPower # Function: resolveVotingPower() > **resolveVotingPower**(`memberId`, `daoId`, `snapshot`, `delegations`, `options?`): `object` ## Parameters ### memberId `string` ### daoId `string` ### snapshot [`MembershipSnapshot`](../interfaces/MembershipSnapshot.md) ### delegations [`Delegation`](../interfaces/Delegation.md)[] ### options? #### maxDepth? `number` #### processedDelegators? `Set`\<`string`\> #### proposalId? `string` ## Returns `object` ### delegatedFrom > **delegatedFrom**: `object`[] ### directWeight > **directWeight**: `number` ### totalWeight > **totalWeight**: `number` --- ## Page: tallyVotes URL: https://docs.totem.ing/api/totemsdk-governance/functions/tallyVotes [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / tallyVotes # Function: tallyVotes() > **tallyVotes**(`params`): [`GovernanceResult`](../type-aliases/GovernanceResult.md)\<[`VoteTally`](../interfaces/VoteTally.md)\> ## Parameters ### params #### config? [`GovernanceConfig`](../interfaces/GovernanceConfig.md) #### delegations? [`Delegation`](../interfaces/Delegation.md)[] #### now? `number` #### proposal [`Proposal`](../interfaces/Proposal.md) #### snapshot [`MembershipSnapshot`](../interfaces/MembershipSnapshot.md) #### votes [`Vote`](../interfaces/Vote.md)[] ## Returns [`GovernanceResult`](../type-aliases/GovernanceResult.md)\<[`VoteTally`](../interfaces/VoteTally.md)\> --- ## Page: toHex URL: https://docs.totem.ing/api/totemsdk-governance/functions/toHex [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / toHex # Function: toHex() > **toHex**(`bytes`): `string` ## Parameters ### bytes `Uint8Array` ## Returns `string` --- ## Page: validateGovernanceConfig URL: https://docs.totem.ing/api/totemsdk-governance/functions/validateGovernanceConfig [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / validateGovernanceConfig # Function: validateGovernanceConfig() > **validateGovernanceConfig**(`config`): `string`[] ## Parameters ### config [`GovernanceConfig`](../interfaces/GovernanceConfig.md) ## Returns `string`[] --- ## Page: verifyMembershipSnapshot URL: https://docs.totem.ing/api/totemsdk-governance/functions/verifyMembershipSnapshot [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / verifyMembershipSnapshot # Function: verifyMembershipSnapshot() > **verifyMembershipSnapshot**(`snapshot`): `boolean` ## Parameters ### snapshot [`MembershipSnapshot`](../interfaces/MembershipSnapshot.md) ## Returns `boolean` --- ## Page: Delegation URL: https://docs.totem.ing/api/totemsdk-governance/interfaces/Delegation [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / Delegation # Interface: Delegation ## Properties ### castAt > **castAt**: `number` *** ### daoId > **daoId**: `string` *** ### delegate > **delegate**: `string` *** ### delegator > **delegator**: `string` *** ### expiresAt? > `optional` **expiresAt?**: `number` *** ### id > **id**: `string` *** ### previousDelegationId? > `optional` **previousDelegationId?**: `string` *** ### revokedAt? > `optional` **revokedAt?**: `number` *** ### scope? > `optional` **scope?**: `string` *** ### weight > **weight**: `number` --- ## Page: DelegationConfig URL: https://docs.totem.ing/api/totemsdk-governance/interfaces/DelegationConfig [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / DelegationConfig # Interface: DelegationConfig ## Properties ### allowPartialDelegation > **allowPartialDelegation**: `boolean` *** ### allowRecall > **allowRecall**: `boolean` *** ### allowScopeRestricted > **allowScopeRestricted**: `boolean` *** ### enabled > **enabled**: `boolean` *** ### maxChainDepth > **maxChainDepth**: `number` *** ### recallThresholdBps? > `optional` **recallThresholdBps?**: `number` --- ## Page: DelegationResolution URL: https://docs.totem.ing/api/totemsdk-governance/interfaces/DelegationResolution [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / DelegationResolution # Interface: DelegationResolution ## Properties ### chain > **chain**: `string`[] *** ### depth > **depth**: `number` *** ### finalVoter > **finalVoter**: `string` *** ### weight > **weight**: `number` --- ## Page: GovernanceConfig URL: https://docs.totem.ing/api/totemsdk-governance/interfaces/GovernanceConfig [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / GovernanceConfig # Interface: GovernanceConfig ## Properties ### authorityResolver > **authorityResolver**: `string` *** ### authorityScope > **authorityScope**: `string` *** ### daoId > **daoId**: `string` *** ### membership > **membership**: `object` #### defaultWeight > **defaultWeight**: `number` #### minWeightToPropose > **minWeightToPropose**: `number` *** ### name > **name**: `string` *** ### voting > **voting**: [`VotingConfig`](VotingConfig.md) --- ## Page: GovernanceError URL: https://docs.totem.ing/api/totemsdk-governance/interfaces/GovernanceError [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / GovernanceError # Interface: GovernanceError ## Properties ### error > **error**: `string` --- ## Page: MandateReceipt URL: https://docs.totem.ing/api/totemsdk-governance/interfaces/MandateReceipt [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / MandateReceipt # Interface: MandateReceipt ## Properties ### actionIndex > **actionIndex**: `number` *** ### actionType > **actionType**: [`ProposalActionType`](../type-aliases/ProposalActionType.md) *** ### committedAt > **committedAt**: `number` *** ### id > **id**: `string` *** ### intentId > **intentId**: `string` *** ### mandateProofId > **mandateProofId**: `string` *** ### proofId? > `optional` **proofId?**: `string` *** ### proposalId > **proposalId**: `string` --- ## Page: MembershipEntry URL: https://docs.totem.ing/api/totemsdk-governance/interfaces/MembershipEntry [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / MembershipEntry # Interface: MembershipEntry ## Properties ### addedAt > **addedAt**: `number` *** ### addedBy > **addedBy**: `string` *** ### expiresAt? > `optional` **expiresAt?**: `number` *** ### memberId > **memberId**: `string` *** ### role > **role**: `string` *** ### weight > **weight**: `number` --- ## Page: MembershipSnapshot URL: https://docs.totem.ing/api/totemsdk-governance/interfaces/MembershipSnapshot [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / MembershipSnapshot # Interface: MembershipSnapshot ## Properties ### daoId > **daoId**: `string` *** ### entries > **entries**: `Map`\<`string`, [`MembershipEntry`](MembershipEntry.md)\> *** ### frozenAt > **frozenAt**: `number` *** ### hash > **hash**: `string` --- ## Page: Proposal URL: https://docs.totem.ing/api/totemsdk-governance/interfaces/Proposal [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / Proposal # Interface: Proposal ## Properties ### actions > **actions**: [`ProposalAction`](ProposalAction.md)[] *** ### createdAt > **createdAt**: `number` *** ### daoId > **daoId**: `string` *** ### description > **description**: `string` *** ### executedAt? > `optional` **executedAt?**: `number` *** ### executionDelay > **executionDelay**: `number` *** ### executionTxId? > `optional` **executionTxId?**: `string` *** ### id > **id**: `string` *** ### membershipSnapshotHash > **membershipSnapshotHash**: `string` *** ### proposer > **proposer**: `string` *** ### status > **status**: [`ProposalStatus`](../type-aliases/ProposalStatus.md) *** ### title > **title**: `string` *** ### voteTally? > `optional` **voteTally?**: [`VoteTally`](VoteTally.md) *** ### votingEndsAt > **votingEndsAt**: `number` *** ### votingStartsAt > **votingStartsAt**: `number` --- ## Page: ProposalAction URL: https://docs.totem.ing/api/totemsdk-governance/interfaces/ProposalAction [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / ProposalAction # Interface: ProposalAction ## Properties ### description > **description**: `string` *** ### payload > **payload**: `Record`\<`string`, `unknown`\> *** ### target? > `optional` **target?**: `string` *** ### type > **type**: [`ProposalActionType`](../type-aliases/ProposalActionType.md) --- ## Page: ProposalOutcome URL: https://docs.totem.ing/api/totemsdk-governance/interfaces/ProposalOutcome [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / ProposalOutcome # Interface: ProposalOutcome ## Properties ### determinedAt > **determinedAt**: `number` *** ### determinedBy > **determinedBy**: `string` *** ### passed > **passed**: `boolean` *** ### proofId? > `optional` **proofId?**: `string` *** ### proposalId > **proposalId**: `string` *** ### status > **status**: [`ProposalStatus`](../type-aliases/ProposalStatus.md) *** ### tallyHash > **tallyHash**: `string` --- ## Page: QuadraticConfig URL: https://docs.totem.ing/api/totemsdk-governance/interfaces/QuadraticConfig [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / QuadraticConfig # Interface: QuadraticConfig ## Properties ### creditSource > **creditSource**: `"weight"` \| `"fixed"` *** ### enabled > **enabled**: `boolean` *** ### maxCreditsPerMember? > `optional` **maxCreditsPerMember?**: `number` --- ## Page: QuadraticCredits URL: https://docs.totem.ing/api/totemsdk-governance/interfaces/QuadraticCredits [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / QuadraticCredits # Interface: QuadraticCredits ## Properties ### creditSource > **creditSource**: `"weight"` \| `"fixed"` *** ### memberId > **memberId**: `string` *** ### spentCredits > **spentCredits**: `number` *** ### totalCredits > **totalCredits**: `number` --- ## Page: QuadraticVoteAllocation URL: https://docs.totem.ing/api/totemsdk-governance/interfaces/QuadraticVoteAllocation [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / QuadraticVoteAllocation # Interface: QuadraticVoteAllocation ## Properties ### creditsSpent > **creditsSpent**: `number` *** ### directedTo > **directedTo**: `string` *** ### memberId > **memberId**: `string` *** ### proposalId > **proposalId**: `string` *** ### votesCast > **votesCast**: `number` --- ## Page: UsageReservation URL: https://docs.totem.ing/api/totemsdk-governance/interfaces/UsageReservation [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / UsageReservation # Interface: UsageReservation ## Properties ### expiresAt > **expiresAt**: `number` *** ### id > **id**: `string` *** ### intentId > **intentId**: `string` *** ### mandateProofId > **mandateProofId**: `string` *** ### reservedAt > **reservedAt**: `number` *** ### status > **status**: `"reserved"` \| `"committed"` \| `"aborted"` --- ## Page: Vote URL: https://docs.totem.ing/api/totemsdk-governance/interfaces/Vote [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / Vote # Interface: Vote ## Properties ### castAt > **castAt**: `number` *** ### choice > **choice**: `"yes"` \| `"no"` \| `"abstain"` *** ### delegationChain? > `optional` **delegationChain?**: `string`[] *** ### id > **id**: `string` *** ### proposalId > **proposalId**: `string` *** ### quadraticCredits? > `optional` **quadraticCredits?**: `number` *** ### voter > **voter**: `string` *** ### weight > **weight**: `number` --- ## Page: VoteTally URL: https://docs.totem.ing/api/totemsdk-governance/interfaces/VoteTally [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / VoteTally # Interface: VoteTally ## Properties ### abstain > **abstain**: `number` *** ### algorithm > **algorithm**: [`TallyAlgorithm`](../type-aliases/TallyAlgorithm.md) *** ### no > **no**: `number` *** ### passed > **passed**: `boolean` *** ### proposalId > **proposalId**: `string` *** ### quorumReached > **quorumReached**: `boolean` *** ### quorumWeight > **quorumWeight**: `number` *** ### thresholdBps > **thresholdBps**: `number` *** ### totalWeight > **totalWeight**: `number` *** ### yes > **yes**: `number` --- ## Page: VotingConfig URL: https://docs.totem.ing/api/totemsdk-governance/interfaces/VotingConfig [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / VotingConfig # Interface: VotingConfig ## Properties ### algorithm > **algorithm**: `"linear"` \| `"quadratic"` \| `"liquid"` *** ### allowAbstain > **allowAbstain**: `boolean` *** ### delayBeforeVotingMs > **delayBeforeVotingMs**: `number` *** ### delegation? > `optional` **delegation?**: [`DelegationConfig`](DelegationConfig.md) *** ### executionDelayMs > **executionDelayMs**: `number` *** ### passThresholdBps > **passThresholdBps**: `number` *** ### quadratic? > `optional` **quadratic?**: [`QuadraticConfig`](QuadraticConfig.md) *** ### quorumBps > **quorumBps**: `number` *** ### votingPeriodMs > **votingPeriodMs**: `number` --- ## Page: GovernanceResult URL: https://docs.totem.ing/api/totemsdk-governance/type-aliases/GovernanceResult [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / GovernanceResult # Type Alias: GovernanceResult\ > **GovernanceResult**\<`T`\> = `T` \| [`GovernanceError`](../interfaces/GovernanceError.md) ## Type Parameters ### T `T` --- ## Page: ProposalActionType URL: https://docs.totem.ing/api/totemsdk-governance/type-aliases/ProposalActionType [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / ProposalActionType # Type Alias: ProposalActionType > **ProposalActionType** = `"rotate_root"` \| `"advance_epoch"` \| `"treasury_spend"` \| `"budget_allocate"` \| `"member_add"` \| `"member_remove"` \| `"policy_update"` \| `"custom"` --- ## Page: ProposalStatus URL: https://docs.totem.ing/api/totemsdk-governance/type-aliases/ProposalStatus [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / ProposalStatus # Type Alias: ProposalStatus > **ProposalStatus** = `"draft"` \| `"active"` \| `"passed"` \| `"failed"` \| `"executed"` \| `"cancelled"` \| `"expired"` --- ## Page: TallyAlgorithm URL: https://docs.totem.ing/api/totemsdk-governance/type-aliases/TallyAlgorithm [**@totemsdk/governance**](../index.md) *** [@totemsdk/governance](../index.md) / TallyAlgorithm # Type Alias: TallyAlgorithm > **TallyAlgorithm** = `"linear"` \| `"quadratic"` --- ## Page: bindManifestToIdentity URL: https://docs.totem.ing/api/totemsdk-identity/functions/bindManifestToIdentity [**@totemsdk/identity**](../index.md) *** [@totemsdk/identity](../index.md) / bindManifestToIdentity # Function: bindManifestToIdentity() > **bindManifestToIdentity**(`signedManifest`, `identityGraph`, `options?`): `Promise`\<[`ManifestIdentityBinding`](../interfaces/ManifestIdentityBinding.md)\> ## Parameters ### signedManifest `SignedManifest`\<`any`\> ### identityGraph [`IdentityGraph`](../interfaces/IdentityGraph.md) ### options? #### proofVerifiers? `Record`\<`string`, [`IdentityProofVerifier`](../interfaces/IdentityProofVerifier.md)\> ## Returns `Promise`\<[`ManifestIdentityBinding`](../interfaces/ManifestIdentityBinding.md)\> --- ## Page: computeIdentityId URL: https://docs.totem.ing/api/totemsdk-identity/functions/computeIdentityId [**@totemsdk/identity**](../index.md) *** [@totemsdk/identity](../index.md) / computeIdentityId # Function: computeIdentityId() > **computeIdentityId**(`kind`, `rootAddress`): `string` ## Parameters ### kind [`IdentityKind`](../type-aliases/IdentityKind.md) ### rootAddress `string` ## Returns `string` --- ## Page: createDelegationClaim URL: https://docs.totem.ing/api/totemsdk-identity/functions/createDelegationClaim [**@totemsdk/identity**](../index.md) *** [@totemsdk/identity](../index.md) / createDelegationClaim # Function: createDelegationClaim() > **createDelegationClaim**(`opts`): [`IdentityClaim`](../interfaces/IdentityClaim.md) ## Parameters ### opts #### delegatedAddress `string` #### expiresAt? `number` #### issuedAt? `number` #### issuer `string` #### scopes `string`[] #### subject `string` ## Returns [`IdentityClaim`](../interfaces/IdentityClaim.md) --- ## Page: createIdentityClaim URL: https://docs.totem.ing/api/totemsdk-identity/functions/createIdentityClaim [**@totemsdk/identity**](../index.md) *** [@totemsdk/identity](../index.md) / createIdentityClaim # Function: createIdentityClaim() > **createIdentityClaim**(`opts`): [`IdentityClaim`](../interfaces/IdentityClaim.md) ## Parameters ### opts #### expiresAt? `number` #### issuedAt? `number` #### issuer `string` #### object `string` #### payload `Record`\<`string`, `unknown`\> #### subject `string` #### type [`IdentityClaimType`](../type-aliases/IdentityClaimType.md) ## Returns [`IdentityClaim`](../interfaces/IdentityClaim.md) --- ## Page: createIdentityDocument URL: https://docs.totem.ing/api/totemsdk-identity/functions/createIdentityDocument [**@totemsdk/identity**](../index.md) *** [@totemsdk/identity](../index.md) / createIdentityDocument # Function: createIdentityDocument() > **createIdentityDocument**(`opts`): [`TotemIdentityDocument`](../interfaces/TotemIdentityDocument.md) ## Parameters ### opts #### controllerAddress `string` #### kind [`IdentityKind`](../type-aliases/IdentityKind.md) #### metadata? `Record`\<`string`, `unknown`\> #### rootAddress `string` ## Returns [`TotemIdentityDocument`](../interfaces/TotemIdentityDocument.md) --- ## Page: createPaymentRecipientClaim URL: https://docs.totem.ing/api/totemsdk-identity/functions/createPaymentRecipientClaim [**@totemsdk/identity**](../index.md) *** [@totemsdk/identity](../index.md) / createPaymentRecipientClaim # Function: createPaymentRecipientClaim() > **createPaymentRecipientClaim**(`opts`): [`IdentityClaim`](../interfaces/IdentityClaim.md) ## Parameters ### opts #### address `string` #### expiresAt? `number` #### issuedAt? `number` #### issuer `string` #### label? `string` #### subject `string` ## Returns [`IdentityClaim`](../interfaces/IdentityClaim.md) --- ## Page: createServiceEndpointClaim URL: https://docs.totem.ing/api/totemsdk-identity/functions/createServiceEndpointClaim [**@totemsdk/identity**](../index.md) *** [@totemsdk/identity](../index.md) / createServiceEndpointClaim # Function: createServiceEndpointClaim() > **createServiceEndpointClaim**(`opts`): [`IdentityClaim`](../interfaces/IdentityClaim.md) ## Parameters ### opts #### endpointType `string` #### expiresAt? `number` #### issuedAt? `number` #### issuer `string` #### subject `string` #### uri `string` ## Returns [`IdentityClaim`](../interfaces/IdentityClaim.md) --- ## Page: isIdentityClaim URL: https://docs.totem.ing/api/totemsdk-identity/functions/isIdentityClaim [**@totemsdk/identity**](../index.md) *** [@totemsdk/identity](../index.md) / isIdentityClaim # Function: isIdentityClaim() > **isIdentityClaim**(`value`): `value is IdentityClaim` ## Parameters ### value `unknown` ## Returns `value is IdentityClaim` --- ## Page: isRevocationClaim URL: https://docs.totem.ing/api/totemsdk-identity/functions/isRevocationClaim [**@totemsdk/identity**](../index.md) *** [@totemsdk/identity](../index.md) / isRevocationClaim # Function: isRevocationClaim() > **isRevocationClaim**(`value`): `value is RevocationClaim` ## Parameters ### value `unknown` ## Returns `value is RevocationClaim` --- ## Page: isRotationClaim URL: https://docs.totem.ing/api/totemsdk-identity/functions/isRotationClaim [**@totemsdk/identity**](../index.md) *** [@totemsdk/identity](../index.md) / isRotationClaim # Function: isRotationClaim() > **isRotationClaim**(`value`): `value is RotationClaim` ## Parameters ### value `unknown` ## Returns `value is RotationClaim` --- ## Page: isSignedIdentityClaim URL: https://docs.totem.ing/api/totemsdk-identity/functions/isSignedIdentityClaim [**@totemsdk/identity**](../index.md) *** [@totemsdk/identity](../index.md) / isSignedIdentityClaim # Function: isSignedIdentityClaim() > **isSignedIdentityClaim**(`value`): `value is SignedIdentityClaim` ## Parameters ### value `unknown` ## Returns `value is SignedIdentityClaim` --- ## Page: isTotemIdentityDocument URL: https://docs.totem.ing/api/totemsdk-identity/functions/isTotemIdentityDocument [**@totemsdk/identity**](../index.md) *** [@totemsdk/identity](../index.md) / isTotemIdentityDocument # Function: isTotemIdentityDocument() > **isTotemIdentityDocument**(`value`): `value is TotemIdentityDocument` ## Parameters ### value `unknown` ## Returns `value is TotemIdentityDocument` --- ## Page: resolveIdentityGraph URL: https://docs.totem.ing/api/totemsdk-identity/functions/resolveIdentityGraph [**@totemsdk/identity**](../index.md) *** [@totemsdk/identity](../index.md) / resolveIdentityGraph # Function: resolveIdentityGraph() > **resolveIdentityGraph**(`graph`): [`IdentityResolutionResult`](../interfaces/IdentityResolutionResult.md) ## Parameters ### graph [`IdentityGraph`](../interfaces/IdentityGraph.md) ## Returns [`IdentityResolutionResult`](../interfaces/IdentityResolutionResult.md) --- ## Page: revokeIdentity URL: https://docs.totem.ing/api/totemsdk-identity/functions/revokeIdentity [**@totemsdk/identity**](../index.md) *** [@totemsdk/identity](../index.md) / revokeIdentity # Function: revokeIdentity() > **revokeIdentity**(`opts`): [`IdentityClaim`](../interfaces/IdentityClaim.md) ## Parameters ### opts #### issuedAt? `number` #### issuer `string` #### reason? `string` #### subject `string` ## Returns [`IdentityClaim`](../interfaces/IdentityClaim.md) --- ## Page: rotateIdentity URL: https://docs.totem.ing/api/totemsdk-identity/functions/rotateIdentity [**@totemsdk/identity**](../index.md) *** [@totemsdk/identity](../index.md) / rotateIdentity # Function: rotateIdentity() > **rotateIdentity**(`opts`): [`IdentityClaim`](../interfaces/IdentityClaim.md) ## Parameters ### opts #### issuedAt? `number` #### issuer `string` #### newAddress `string` #### subject `string` ## Returns [`IdentityClaim`](../interfaces/IdentityClaim.md) --- ## Page: signIdentityClaim URL: https://docs.totem.ing/api/totemsdk-identity/functions/signIdentityClaim [**@totemsdk/identity**](../index.md) *** [@totemsdk/identity](../index.md) / signIdentityClaim # Function: signIdentityClaim() > **signIdentityClaim**(`claim`, `seed`, `keyIndex`): `Promise`\<[`SignedIdentityClaim`](../interfaces/SignedIdentityClaim.md)\> ## Parameters ### claim [`IdentityClaim`](../interfaces/IdentityClaim.md) ### seed `Uint8Array` ### keyIndex `number` ## Returns `Promise`\<[`SignedIdentityClaim`](../interfaces/SignedIdentityClaim.md)\> --- ## Page: verifyIdentityClaim URL: https://docs.totem.ing/api/totemsdk-identity/functions/verifyIdentityClaim [**@totemsdk/identity**](../index.md) *** [@totemsdk/identity](../index.md) / verifyIdentityClaim # Function: verifyIdentityClaim() > **verifyIdentityClaim**(`signed`): [`IdentityVerifyResult`](../interfaces/IdentityVerifyResult.md) ## Parameters ### signed [`SignedIdentityClaim`](../interfaces/SignedIdentityClaim.md) ## Returns [`IdentityVerifyResult`](../interfaces/IdentityVerifyResult.md) --- ## Page: verifyManifestIdentity URL: https://docs.totem.ing/api/totemsdk-identity/functions/verifyManifestIdentity [**@totemsdk/identity**](../index.md) *** [@totemsdk/identity](../index.md) / verifyManifestIdentity # Function: verifyManifestIdentity() > **verifyManifestIdentity**(`signedManifest`, `identityGraph`, `options?`): `Promise`\<[`ManifestIdentityBinding`](../interfaces/ManifestIdentityBinding.md)\> ## Parameters ### signedManifest `SignedManifest`\<`any`\> ### identityGraph [`IdentityGraph`](../interfaces/IdentityGraph.md) ### options? #### proofVerifiers? `Record`\<`string`, [`IdentityProofVerifier`](../interfaces/IdentityProofVerifier.md)\> ## Returns `Promise`\<[`ManifestIdentityBinding`](../interfaces/ManifestIdentityBinding.md)\> --- ## Page: DelegationClaim URL: https://docs.totem.ing/api/totemsdk-identity/interfaces/DelegationClaim [**@totemsdk/identity**](../index.md) *** [@totemsdk/identity](../index.md) / DelegationClaim # Interface: DelegationClaim ## Properties ### claimId > **claimId**: `string` *** ### delegatedAddress > **delegatedAddress**: `string` *** ### expiresAt? > `optional` **expiresAt?**: `number` *** ### issuedAt > **issuedAt**: `number` *** ### issuer > **issuer**: `string` *** ### scopes > **scopes**: `string`[] *** ### subject > **subject**: `string` --- ## Page: IdentityClaim URL: https://docs.totem.ing/api/totemsdk-identity/interfaces/IdentityClaim [**@totemsdk/identity**](../index.md) *** [@totemsdk/identity](../index.md) / IdentityClaim # Interface: IdentityClaim ## Properties ### expiresAt? > `optional` **expiresAt?**: `number` *** ### id > **id**: `string` *** ### issuedAt > **issuedAt**: `number` *** ### issuer > **issuer**: `string` *** ### object > **object**: `string` *** ### payload > **payload**: `Record`\<`string`, `unknown`\> *** ### subject > **subject**: `string` *** ### type > **type**: [`IdentityClaimType`](../type-aliases/IdentityClaimType.md) --- ## Page: IdentityGraph URL: https://docs.totem.ing/api/totemsdk-identity/interfaces/IdentityGraph [**@totemsdk/identity**](../index.md) *** [@totemsdk/identity](../index.md) / IdentityGraph # Interface: IdentityGraph ## Properties ### claims > **claims**: [`SignedIdentityClaim`](SignedIdentityClaim.md)[] *** ### document > **document**: [`TotemIdentityDocument`](TotemIdentityDocument.md) --- ## Page: IdentityProofVerifier URL: https://docs.totem.ing/api/totemsdk-identity/interfaces/IdentityProofVerifier [**@totemsdk/identity**](../index.md) *** [@totemsdk/identity](../index.md) / IdentityProofVerifier # Interface: IdentityProofVerifier ## Properties ### type > **type**: `string` ## Methods ### verify() > **verify**(`proof`): `Promise`\<[`IdentityVerifyResult`](IdentityVerifyResult.md)\> #### Parameters ##### proof `unknown` #### Returns `Promise`\<[`IdentityVerifyResult`](IdentityVerifyResult.md)\> --- ## Page: IdentityResolutionResult URL: https://docs.totem.ing/api/totemsdk-identity/interfaces/IdentityResolutionResult [**@totemsdk/identity**](../index.md) *** [@totemsdk/identity](../index.md) / IdentityResolutionResult # Interface: IdentityResolutionResult ## Properties ### errors > **errors**: `string`[] *** ### resolved > **resolved**: [`ResolvedIdentity`](ResolvedIdentity.md) \| `null` --- ## Page: IdentityVerifyResult URL: https://docs.totem.ing/api/totemsdk-identity/interfaces/IdentityVerifyResult [**@totemsdk/identity**](../index.md) *** [@totemsdk/identity](../index.md) / IdentityVerifyResult # Interface: IdentityVerifyResult ## Properties ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### provenAddresses? > `optional` **provenAddresses?**: `string`[] *** ### reason? > `optional` **reason?**: `string` *** ### rootAddress? > `optional` **rootAddress?**: `string` *** ### signerAddress? > `optional` **signerAddress?**: `string` *** ### valid > **valid**: `boolean` --- ## Page: ManifestIdentityBinding URL: https://docs.totem.ing/api/totemsdk-identity/interfaces/ManifestIdentityBinding [**@totemsdk/identity**](../index.md) *** [@totemsdk/identity](../index.md) / ManifestIdentityBinding # Interface: ManifestIdentityBinding ## Properties ### identityId > **identityId**: `string` *** ### manifestId > **manifestId**: `string` *** ### reason? > `optional` **reason?**: `string` *** ### resolvedStatus > **resolvedStatus**: [`IdentityStatus`](../type-aliases/IdentityStatus.md) *** ### signerAddress > **signerAddress**: `string` *** ### valid > **valid**: `boolean` --- ## Page: PaymentRecipientClaim URL: https://docs.totem.ing/api/totemsdk-identity/interfaces/PaymentRecipientClaim [**@totemsdk/identity**](../index.md) *** [@totemsdk/identity](../index.md) / PaymentRecipientClaim # Interface: PaymentRecipientClaim ## Properties ### address > **address**: `string` *** ### claimId > **claimId**: `string` *** ### expiresAt? > `optional` **expiresAt?**: `number` *** ### issuedAt > **issuedAt**: `number` *** ### issuer > **issuer**: `string` *** ### label? > `optional` **label?**: `string` --- ## Page: ResolvedIdentity URL: https://docs.totem.ing/api/totemsdk-identity/interfaces/ResolvedIdentity [**@totemsdk/identity**](../index.md) *** [@totemsdk/identity](../index.md) / ResolvedIdentity # Interface: ResolvedIdentity ## Properties ### authorizedAddresses > **authorizedAddresses**: `string`[] *** ### controlledAddresses > **controlledAddresses**: `string`[] *** ### controllerAddress > **controllerAddress**: `string` *** ### delegates > **delegates**: [`DelegationClaim`](DelegationClaim.md)[] *** ### document > **document**: [`TotemIdentityDocument`](TotemIdentityDocument.md) *** ### paymentRecipients > **paymentRecipients**: [`PaymentRecipientClaim`](PaymentRecipientClaim.md)[] *** ### revokedAt? > `optional` **revokedAt?**: `number` *** ### rootAddress > **rootAddress**: `string` *** ### rotationTarget? > `optional` **rotationTarget?**: `string` *** ### serviceEndpoints > **serviceEndpoints**: [`ServiceEndpointClaim`](ServiceEndpointClaim.md)[] *** ### status > **status**: [`IdentityStatus`](../type-aliases/IdentityStatus.md) --- ## Page: RevocationClaim URL: https://docs.totem.ing/api/totemsdk-identity/interfaces/RevocationClaim [**@totemsdk/identity**](../index.md) *** [@totemsdk/identity](../index.md) / RevocationClaim # Interface: RevocationClaim ## Properties ### claimId > **claimId**: `string` *** ### issuedAt > **issuedAt**: `number` *** ### issuer > **issuer**: `string` *** ### reason? > `optional` **reason?**: `string` *** ### subject > **subject**: `string` --- ## Page: RotationClaim URL: https://docs.totem.ing/api/totemsdk-identity/interfaces/RotationClaim [**@totemsdk/identity**](../index.md) *** [@totemsdk/identity](../index.md) / RotationClaim # Interface: RotationClaim ## Properties ### claimId > **claimId**: `string` *** ### issuedAt > **issuedAt**: `number` *** ### issuer > **issuer**: `string` *** ### newAddress > **newAddress**: `string` *** ### subject > **subject**: `string` --- ## Page: ServiceEndpointClaim URL: https://docs.totem.ing/api/totemsdk-identity/interfaces/ServiceEndpointClaim [**@totemsdk/identity**](../index.md) *** [@totemsdk/identity](../index.md) / ServiceEndpointClaim # Interface: ServiceEndpointClaim ## Properties ### claimId > **claimId**: `string` *** ### endpointType > **endpointType**: `string` *** ### expiresAt? > `optional` **expiresAt?**: `number` *** ### issuedAt > **issuedAt**: `number` *** ### issuer > **issuer**: `string` *** ### uri > **uri**: `string` --- ## Page: SignedIdentityClaim URL: https://docs.totem.ing/api/totemsdk-identity/interfaces/SignedIdentityClaim [**@totemsdk/identity**](../index.md) *** [@totemsdk/identity](../index.md) / SignedIdentityClaim # Interface: SignedIdentityClaim ## Properties ### claim > **claim**: [`IdentityClaim`](IdentityClaim.md) *** ### proof > **proof**: `object` #### address > **address**: `string` #### message? > `optional` **message?**: `string` #### publicKey > **publicKey**: `string` #### signature > **signature**: `string` *** ### rootIdentityProof? > `optional` **rootIdentityProof?**: `string` --- ## Page: TotemIdentityDocument URL: https://docs.totem.ing/api/totemsdk-identity/interfaces/TotemIdentityDocument [**@totemsdk/identity**](../index.md) *** [@totemsdk/identity](../index.md) / TotemIdentityDocument # Interface: TotemIdentityDocument ## Properties ### controllerAddress > **controllerAddress**: `string` *** ### createdAt > **createdAt**: `number` *** ### id > **id**: `string` *** ### kind > **kind**: [`IdentityKind`](../type-aliases/IdentityKind.md) *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### rootAddress > **rootAddress**: `string` *** ### version > **version**: `number` --- ## Page: IdentityClaimType URL: https://docs.totem.ing/api/totemsdk-identity/type-aliases/IdentityClaimType [**@totemsdk/identity**](../index.md) *** [@totemsdk/identity](../index.md) / IdentityClaimType # Type Alias: IdentityClaimType > **IdentityClaimType** = `"delegates_to"` \| `"payment_recipient"` \| `"service_endpoint"` \| `"rotates_to"` \| `"revokes"` --- ## Page: IdentityKind URL: https://docs.totem.ing/api/totemsdk-identity/type-aliases/IdentityKind [**@totemsdk/identity**](../index.md) *** [@totemsdk/identity](../index.md) / IdentityKind # Type Alias: IdentityKind > **IdentityKind** = `"person"` \| `"device"` \| `"agent"` \| `"service"` \| `"organization"` \| `"sensor"` \| `"robot"` \| `"gateway"` @totemsdk/identity — Type definitions Pure schema — no network, no DHT, no blockchain submission. --- ## Page: IdentityStatus URL: https://docs.totem.ing/api/totemsdk-identity/type-aliases/IdentityStatus [**@totemsdk/identity**](../index.md) *** [@totemsdk/identity](../index.md) / IdentityStatus # Type Alias: IdentityStatus > **IdentityStatus** = `"active"` \| `"rotated"` \| `"revoked"` --- ## Page: IDENTITY_VERSION URL: https://docs.totem.ing/api/totemsdk-identity/variables/IDENTITY_VERSION [**@totemsdk/identity**](../index.md) *** [@totemsdk/identity](../index.md) / IDENTITY\_VERSION # Variable: IDENTITY\_VERSION > `const` **IDENTITY\_VERSION**: `1` --- ## Page: ActionCommitmentError URL: https://docs.totem.ing/api/totemsdk-industrial-action/classes/ActionCommitmentError [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / ActionCommitmentError # Class: ActionCommitmentError ## Extends - [`IndustrialActionError`](IndustrialActionError.md) ## Constructors ### Constructor > **new ActionCommitmentError**(`message`): `ActionCommitmentError` #### Parameters ##### message `string` #### Returns `ActionCommitmentError` #### Overrides [`IndustrialActionError`](IndustrialActionError.md).[`constructor`](IndustrialActionError.md#constructor) ## Properties ### code > `readonly` **code**: `string` #### Inherited from [`IndustrialActionError`](IndustrialActionError.md).[`code`](IndustrialActionError.md#code) *** ### message > **message**: `string` #### Inherited from [`IndustrialActionError`](IndustrialActionError.md).[`message`](IndustrialActionError.md#message) *** ### name > **name**: `string` #### Inherited from [`IndustrialActionError`](IndustrialActionError.md).[`name`](IndustrialActionError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`IndustrialActionError`](IndustrialActionError.md).[`stack`](IndustrialActionError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`IndustrialActionError`](IndustrialActionError.md).[`stackTraceLimit`](IndustrialActionError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`IndustrialActionError`](IndustrialActionError.md).[`captureStackTrace`](IndustrialActionError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`IndustrialActionError`](IndustrialActionError.md).[`prepareStackTrace`](IndustrialActionError.md#preparestacktrace) --- ## Page: ActionConditionError URL: https://docs.totem.ing/api/totemsdk-industrial-action/classes/ActionConditionError [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / ActionConditionError # Class: ActionConditionError ## Extends - [`IndustrialActionError`](IndustrialActionError.md) ## Constructors ### Constructor > **new ActionConditionError**(`message`): `ActionConditionError` #### Parameters ##### message `string` #### Returns `ActionConditionError` #### Overrides [`IndustrialActionError`](IndustrialActionError.md).[`constructor`](IndustrialActionError.md#constructor) ## Properties ### code > `readonly` **code**: `string` #### Inherited from [`IndustrialActionError`](IndustrialActionError.md).[`code`](IndustrialActionError.md#code) *** ### message > **message**: `string` #### Inherited from [`IndustrialActionError`](IndustrialActionError.md).[`message`](IndustrialActionError.md#message) *** ### name > **name**: `string` #### Inherited from [`IndustrialActionError`](IndustrialActionError.md).[`name`](IndustrialActionError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`IndustrialActionError`](IndustrialActionError.md).[`stack`](IndustrialActionError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`IndustrialActionError`](IndustrialActionError.md).[`stackTraceLimit`](IndustrialActionError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`IndustrialActionError`](IndustrialActionError.md).[`captureStackTrace`](IndustrialActionError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`IndustrialActionError`](IndustrialActionError.md).[`prepareStackTrace`](IndustrialActionError.md#preparestacktrace) --- ## Page: ActionDefinitionError URL: https://docs.totem.ing/api/totemsdk-industrial-action/classes/ActionDefinitionError [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / ActionDefinitionError # Class: ActionDefinitionError ## Extends - [`IndustrialActionError`](IndustrialActionError.md) ## Constructors ### Constructor > **new ActionDefinitionError**(`message`): `ActionDefinitionError` #### Parameters ##### message `string` #### Returns `ActionDefinitionError` #### Overrides [`IndustrialActionError`](IndustrialActionError.md).[`constructor`](IndustrialActionError.md#constructor) ## Properties ### code > `readonly` **code**: `string` #### Inherited from [`IndustrialActionError`](IndustrialActionError.md).[`code`](IndustrialActionError.md#code) *** ### message > **message**: `string` #### Inherited from [`IndustrialActionError`](IndustrialActionError.md).[`message`](IndustrialActionError.md#message) *** ### name > **name**: `string` #### Inherited from [`IndustrialActionError`](IndustrialActionError.md).[`name`](IndustrialActionError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`IndustrialActionError`](IndustrialActionError.md).[`stack`](IndustrialActionError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`IndustrialActionError`](IndustrialActionError.md).[`stackTraceLimit`](IndustrialActionError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`IndustrialActionError`](IndustrialActionError.md).[`captureStackTrace`](IndustrialActionError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`IndustrialActionError`](IndustrialActionError.md).[`prepareStackTrace`](IndustrialActionError.md#preparestacktrace) --- ## Page: ActionExecutionError URL: https://docs.totem.ing/api/totemsdk-industrial-action/classes/ActionExecutionError [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / ActionExecutionError # Class: ActionExecutionError ## Extends - [`IndustrialActionError`](IndustrialActionError.md) ## Constructors ### Constructor > **new ActionExecutionError**(`message`): `ActionExecutionError` #### Parameters ##### message `string` #### Returns `ActionExecutionError` #### Overrides [`IndustrialActionError`](IndustrialActionError.md).[`constructor`](IndustrialActionError.md#constructor) ## Properties ### code > `readonly` **code**: `string` #### Inherited from [`IndustrialActionError`](IndustrialActionError.md).[`code`](IndustrialActionError.md#code) *** ### message > **message**: `string` #### Inherited from [`IndustrialActionError`](IndustrialActionError.md).[`message`](IndustrialActionError.md#message) *** ### name > **name**: `string` #### Inherited from [`IndustrialActionError`](IndustrialActionError.md).[`name`](IndustrialActionError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`IndustrialActionError`](IndustrialActionError.md).[`stack`](IndustrialActionError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`IndustrialActionError`](IndustrialActionError.md).[`stackTraceLimit`](IndustrialActionError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`IndustrialActionError`](IndustrialActionError.md).[`captureStackTrace`](IndustrialActionError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`IndustrialActionError`](IndustrialActionError.md).[`prepareStackTrace`](IndustrialActionError.md#preparestacktrace) --- ## Page: ActionGovernanceError URL: https://docs.totem.ing/api/totemsdk-industrial-action/classes/ActionGovernanceError [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / ActionGovernanceError # Class: ActionGovernanceError ## Extends - [`IndustrialActionError`](IndustrialActionError.md) ## Constructors ### Constructor > **new ActionGovernanceError**(`message`): `ActionGovernanceError` #### Parameters ##### message `string` #### Returns `ActionGovernanceError` #### Overrides [`IndustrialActionError`](IndustrialActionError.md).[`constructor`](IndustrialActionError.md#constructor) ## Properties ### code > `readonly` **code**: `string` #### Inherited from [`IndustrialActionError`](IndustrialActionError.md).[`code`](IndustrialActionError.md#code) *** ### message > **message**: `string` #### Inherited from [`IndustrialActionError`](IndustrialActionError.md).[`message`](IndustrialActionError.md#message) *** ### name > **name**: `string` #### Inherited from [`IndustrialActionError`](IndustrialActionError.md).[`name`](IndustrialActionError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`IndustrialActionError`](IndustrialActionError.md).[`stack`](IndustrialActionError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`IndustrialActionError`](IndustrialActionError.md).[`stackTraceLimit`](IndustrialActionError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`IndustrialActionError`](IndustrialActionError.md).[`captureStackTrace`](IndustrialActionError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`IndustrialActionError`](IndustrialActionError.md).[`prepareStackTrace`](IndustrialActionError.md#preparestacktrace) --- ## Page: ActionRegistry URL: https://docs.totem.ing/api/totemsdk-industrial-action/classes/ActionRegistry [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / ActionRegistry # Class: ActionRegistry ## Constructors ### Constructor > **new ActionRegistry**(): `ActionRegistry` #### Returns `ActionRegistry` ## Methods ### getDefinition() > **getDefinition**(`kind`): [`IndustrialActionDefinition`](../interfaces/IndustrialActionDefinition.md)\<`unknown`, `unknown`\> \| `undefined` #### Parameters ##### kind `string` #### Returns [`IndustrialActionDefinition`](../interfaces/IndustrialActionDefinition.md)\<`unknown`, `unknown`\> \| `undefined` *** ### getDefinitionOrThrow() > **getDefinitionOrThrow**(`kind`): [`IndustrialActionDefinition`](../interfaces/IndustrialActionDefinition.md) #### Parameters ##### kind `string` #### Returns [`IndustrialActionDefinition`](../interfaces/IndustrialActionDefinition.md) *** ### getExecutor() > **getExecutor**(`kind`): [`ActionExecutor`](../interfaces/ActionExecutor.md)\<`unknown`, `unknown`\> \| `undefined` #### Parameters ##### kind `string` #### Returns [`ActionExecutor`](../interfaces/ActionExecutor.md)\<`unknown`, `unknown`\> \| `undefined` *** ### getExecutorOrThrow() > **getExecutorOrThrow**(`kind`): [`ActionExecutor`](../interfaces/ActionExecutor.md) #### Parameters ##### kind `string` #### Returns [`ActionExecutor`](../interfaces/ActionExecutor.md) *** ### hasDefinition() > **hasDefinition**(`kind`): `boolean` #### Parameters ##### kind `string` #### Returns `boolean` *** ### hasExecutor() > **hasExecutor**(`kind`): `boolean` #### Parameters ##### kind `string` #### Returns `boolean` *** ### listKinds() > **listKinds**(): `string`[] #### Returns `string`[] *** ### registerDefinition() > **registerDefinition**(`definition`): `void` #### Parameters ##### definition [`IndustrialActionDefinition`](../interfaces/IndustrialActionDefinition.md) #### Returns `void` *** ### registerExecutor() > **registerExecutor**(`executor`): `void` #### Parameters ##### executor [`ActionExecutor`](../interfaces/ActionExecutor.md) #### Returns `void` --- ## Page: ActionValidationError URL: https://docs.totem.ing/api/totemsdk-industrial-action/classes/ActionValidationError [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / ActionValidationError # Class: ActionValidationError ## Extends - [`IndustrialActionError`](IndustrialActionError.md) ## Constructors ### Constructor > **new ActionValidationError**(`message`, `details?`): `ActionValidationError` #### Parameters ##### message `string` ##### details? `Record`\<`string`, `unknown`\> #### Returns `ActionValidationError` #### Overrides [`IndustrialActionError`](IndustrialActionError.md).[`constructor`](IndustrialActionError.md#constructor) ## Properties ### code > `readonly` **code**: `string` #### Inherited from [`IndustrialActionError`](IndustrialActionError.md).[`code`](IndustrialActionError.md#code) *** ### details > `readonly` **details**: `Record`\<`string`, `unknown`\> *** ### message > **message**: `string` #### Inherited from [`IndustrialActionError`](IndustrialActionError.md).[`message`](IndustrialActionError.md#message) *** ### name > **name**: `string` #### Inherited from [`IndustrialActionError`](IndustrialActionError.md).[`name`](IndustrialActionError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`IndustrialActionError`](IndustrialActionError.md).[`stack`](IndustrialActionError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`IndustrialActionError`](IndustrialActionError.md).[`stackTraceLimit`](IndustrialActionError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`IndustrialActionError`](IndustrialActionError.md).[`captureStackTrace`](IndustrialActionError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`IndustrialActionError`](IndustrialActionError.md).[`prepareStackTrace`](IndustrialActionError.md#preparestacktrace) --- ## Page: IndustrialActionError URL: https://docs.totem.ing/api/totemsdk-industrial-action/classes/IndustrialActionError [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / IndustrialActionError # Class: IndustrialActionError ## Extends - `Error` ## Extended by - [`ActionDefinitionError`](ActionDefinitionError.md) - [`ActionValidationError`](ActionValidationError.md) - [`ActionExecutionError`](ActionExecutionError.md) - [`ActionConditionError`](ActionConditionError.md) - [`ActionGovernanceError`](ActionGovernanceError.md) - [`ActionCommitmentError`](ActionCommitmentError.md) ## Constructors ### Constructor > **new IndustrialActionError**(`code`, `message`): `IndustrialActionError` #### Parameters ##### code `string` ##### message `string` #### Returns `IndustrialActionError` #### Overrides `Error.constructor` ## Properties ### code > `readonly` **code**: `string` *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: assertValidContext URL: https://docs.totem.ing/api/totemsdk-industrial-action/functions/assertValidContext [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / assertValidContext # Function: assertValidContext() > **assertValidContext**(`schema`, `context`, `now`): `void` ## Parameters ### schema [`ActionSchema`](../interfaces/ActionSchema.md) ### context `Record`\<`string`, `unknown`\> ### now `number` ## Returns `void` --- ## Page: assertValidParameters URL: https://docs.totem.ing/api/totemsdk-industrial-action/functions/assertValidParameters [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / assertValidParameters # Function: assertValidParameters() > **assertValidParameters**(`schema`, `parameters`): `void` ## Parameters ### schema [`ActionSchema`](../interfaces/ActionSchema.md) ### parameters `Record`\<`string`, `unknown`\> ## Returns `void` --- ## Page: assertValidProposal URL: https://docs.totem.ing/api/totemsdk-industrial-action/functions/assertValidProposal [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / assertValidProposal # Function: assertValidProposal() > **assertValidProposal**(`proposal`): `void` ## Parameters ### proposal [`ActionProposal`](../interfaces/ActionProposal.md) ## Returns `void` --- ## Page: canonicalJson URL: https://docs.totem.ing/api/totemsdk-industrial-action/functions/canonicalJson [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / canonicalJson # Function: canonicalJson() > **canonicalJson**(`value`): `string` ## Parameters ### value `unknown` ## Returns `string` --- ## Page: checkGovernanceConstraints URL: https://docs.totem.ing/api/totemsdk-industrial-action/functions/checkGovernanceConstraints [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / checkGovernanceConstraints # Function: checkGovernanceConstraints() > **checkGovernanceConstraints**(`proposal`, `now`): `string`[] ## Parameters ### proposal [`ActionProposal`](../interfaces/ActionProposal.md) ### now `number` ## Returns `string`[] --- ## Page: computeActionExecutionId URL: https://docs.totem.ing/api/totemsdk-industrial-action/functions/computeActionExecutionId [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / computeActionExecutionId # Function: computeActionExecutionId() > **computeActionExecutionId**(`proposalId`): `string` ## Parameters ### proposalId `string` ## Returns `string` --- ## Page: computeActionProposalId URL: https://docs.totem.ing/api/totemsdk-industrial-action/functions/computeActionProposalId [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / computeActionProposalId # Function: computeActionProposalId() > **computeActionProposalId**(`params`): `string` ## Parameters ### params #### context `Record`\<`string`, `unknown`\> #### kind `string` #### parameters `Record`\<`string`, `unknown`\> #### proposedAt `number` ## Returns `string` --- ## Page: computeCommitmentHash URL: https://docs.totem.ing/api/totemsdk-industrial-action/functions/computeCommitmentHash [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / computeCommitmentHash # Function: computeCommitmentHash() > **computeCommitmentHash**(`proposal`): `string` ## Parameters ### proposal #### context `Record`\<`string`, `unknown`\> #### kind `string` #### parameters `Record`\<`string`, `unknown`\> ## Returns `string` --- ## Page: computeReceiptId URL: https://docs.totem.ing/api/totemsdk-industrial-action/functions/computeReceiptId [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / computeReceiptId # Function: computeReceiptId() > **computeReceiptId**(`executionId`, `proposalId`): `string` ## Parameters ### executionId `string` ### proposalId `string` ## Returns `string` --- ## Page: createActionDefinition URL: https://docs.totem.ing/api/totemsdk-industrial-action/functions/createActionDefinition [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / createActionDefinition # Function: createActionDefinition() > **createActionDefinition**\<`TParameters`, `TResult`\>(`kind`, `description`, `schema`, `handler`): [`IndustrialActionDefinition`](../interfaces/IndustrialActionDefinition.md)\<`TParameters`, `TResult`\> ## Type Parameters ### TParameters `TParameters` = `unknown` ### TResult `TResult` = `unknown` ## Parameters ### kind `string` ### description `string` ### schema [`ActionSchema`](../interfaces/ActionSchema.md) ### handler #### execute ## Returns [`IndustrialActionDefinition`](../interfaces/IndustrialActionDefinition.md)\<`TParameters`, `TResult`\> --- ## Page: createCommitment URL: https://docs.totem.ing/api/totemsdk-industrial-action/functions/createCommitment [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / createCommitment # Function: createCommitment() > **createCommitment**(`proposal`): `string` ## Parameters ### proposal #### context `Record`\<`string`, `unknown`\> #### kind `string` #### parameters `Record`\<`string`, `unknown`\> ## Returns `string` --- ## Page: createCondition URL: https://docs.totem.ing/api/totemsdk-industrial-action/functions/createCondition [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / createCondition # Function: createCondition() > **createCondition**(`params`): [`Condition`](../interfaces/Condition.md) ## Parameters ### params `Pick`\<[`Condition`](../interfaces/Condition.md), `"type"` \| `"field"` \| `"operator"` \| `"value"`\> & `object` ## Returns [`Condition`](../interfaces/Condition.md) --- ## Page: createDurableActionStorage URL: https://docs.totem.ing/api/totemsdk-industrial-action/functions/createDurableActionStorage [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / createDurableActionStorage # Function: createDurableActionStorage() > **createDurableActionStorage**(`adapter`, `options?`): [`DurableActionStorage`](../interfaces/DurableActionStorage.md) ## Parameters ### adapter `StorageAdapterWithCapabilities` & `CasStore` ### options? [`DurableActionStorageOptions`](../interfaces/DurableActionStorageOptions.md) = `{}` ## Returns [`DurableActionStorage`](../interfaces/DurableActionStorage.md) --- ## Page: createGovernanceBridge URL: https://docs.totem.ing/api/totemsdk-industrial-action/functions/createGovernanceBridge [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / createGovernanceBridge # Function: createGovernanceBridge() > **createGovernanceBridge**(`reserveFn`): [`GovernanceBridge`](../interfaces/GovernanceBridge.md) ## Parameters ### reserveFn (`proposal`, `mandateProofId`) => `Promise`\<`EdgeOperationResult`\<\{ `reservationId`: `string`; \}\>\> ## Returns [`GovernanceBridge`](../interfaces/GovernanceBridge.md) --- ## Page: createProposal URL: https://docs.totem.ing/api/totemsdk-industrial-action/functions/createProposal [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / createProposal # Function: createProposal() > **createProposal**(`params`): [`ActionProposal`](../interfaces/ActionProposal.md) ## Parameters ### params [`CreateProposalParams`](../interfaces/CreateProposalParams.md) ## Returns [`ActionProposal`](../interfaces/ActionProposal.md) --- ## Page: createReceipt URL: https://docs.totem.ing/api/totemsdk-industrial-action/functions/createReceipt [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / createReceipt # Function: createReceipt() > **createReceipt**(`params`): [`ActionReceipt`](../interfaces/ActionReceipt.md) ## Parameters ### params #### actionId `string` #### commitmentHash `string` #### error? \{ `code`: `string`; `details?`: `Record`\<`string`, `unknown`\>; `message`: `string`; \} #### error.code `string` #### error.details? `Record`\<`string`, `unknown`\> #### error.message `string` #### issuedAt? `number` #### kind `string` #### parameters `Record`\<`string`, `unknown`\> #### proposalId `string` #### result? `unknown` #### status [`ActionStatus`](../type-aliases/ActionStatus.md) ## Returns [`ActionReceipt`](../interfaces/ActionReceipt.md) --- ## Page: evaluateConditions URL: https://docs.totem.ing/api/totemsdk-industrial-action/functions/evaluateConditions [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / evaluateConditions # Function: evaluateConditions() > **evaluateConditions**(`conditions`, `params`, `context`): [`ConditionResult`](../interfaces/ConditionResult.md) ## Parameters ### conditions [`Condition`](../interfaces/Condition.md)[] ### params `Record`\<`string`, `unknown`\> ### context `Record`\<`string`, `unknown`\> ## Returns [`ConditionResult`](../interfaces/ConditionResult.md) --- ## Page: executeAction URL: https://docs.totem.ing/api/totemsdk-industrial-action/functions/executeAction [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / executeAction # Function: executeAction() > **executeAction**(`proposal`, `executor`, `context`, `now?`): `Promise`\<[`ExecuteActionResult`](../interfaces/ExecuteActionResult.md)\<`unknown`\>\> ## Parameters ### proposal [`ActionProposal`](../interfaces/ActionProposal.md) ### executor [`ActionExecutor`](../interfaces/ActionExecutor.md) ### context `Record`\<`string`, `unknown`\> ### now? `number` ## Returns `Promise`\<[`ExecuteActionResult`](../interfaces/ExecuteActionResult.md)\<`unknown`\>\> --- ## Page: hashCanonical URL: https://docs.totem.ing/api/totemsdk-industrial-action/functions/hashCanonical [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / hashCanonical # Function: hashCanonical() > **hashCanonical**(`domain`, `value`): `string` ## Parameters ### domain `string` ### value `unknown` ## Returns `string` --- ## Page: isProposalExecutable URL: https://docs.totem.ing/api/totemsdk-industrial-action/functions/isProposalExecutable [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / isProposalExecutable # Function: isProposalExecutable() > **isProposalExecutable**(`proposal`, `now`): `boolean` ## Parameters ### proposal [`ActionProposal`](../interfaces/ActionProposal.md) ### now `number` ## Returns `boolean` --- ## Page: isProposalExpired URL: https://docs.totem.ing/api/totemsdk-industrial-action/functions/isProposalExpired [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / isProposalExpired # Function: isProposalExpired() > **isProposalExpired**(`proposal`, `now`): `boolean` ## Parameters ### proposal [`ActionProposal`](../interfaces/ActionProposal.md) ### now `number` ## Returns `boolean` --- ## Page: serializeCommitmentPayload URL: https://docs.totem.ing/api/totemsdk-industrial-action/functions/serializeCommitmentPayload [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / serializeCommitmentPayload # Function: serializeCommitmentPayload() > **serializeCommitmentPayload**(`proposal`): `string` ## Parameters ### proposal [`ActionProposal`](../interfaces/ActionProposal.md) ## Returns `string` --- ## Page: toHex URL: https://docs.totem.ing/api/totemsdk-industrial-action/functions/toHex [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / toHex # Function: toHex() > **toHex**(`bytes`): `string` ## Parameters ### bytes `Uint8Array` ## Returns `string` --- ## Page: validateContext URL: https://docs.totem.ing/api/totemsdk-industrial-action/functions/validateContext [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / validateContext # Function: validateContext() > **validateContext**(`schema`, `context`, `now`): `string`[] ## Parameters ### schema [`ActionSchema`](../interfaces/ActionSchema.md) ### context `Record`\<`string`, `unknown`\> ### now `number` ## Returns `string`[] --- ## Page: validateParameters URL: https://docs.totem.ing/api/totemsdk-industrial-action/functions/validateParameters [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / validateParameters # Function: validateParameters() > **validateParameters**(`schema`, `parameters`): `string`[] ## Parameters ### schema [`ActionSchema`](../interfaces/ActionSchema.md) ### parameters `Record`\<`string`, `unknown`\> ## Returns `string`[] --- ## Page: verifyCommitment URL: https://docs.totem.ing/api/totemsdk-industrial-action/functions/verifyCommitment [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / verifyCommitment # Function: verifyCommitment() > **verifyCommitment**(`proposal`): `boolean` ## Parameters ### proposal [`ActionProposal`](../interfaces/ActionProposal.md) ## Returns `boolean` --- ## Page: verifyCommitmentBinding URL: https://docs.totem.ing/api/totemsdk-industrial-action/functions/verifyCommitmentBinding [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / verifyCommitmentBinding # Function: verifyCommitmentBinding() > **verifyCommitmentBinding**(`proposal`): `boolean` ## Parameters ### proposal [`ActionProposal`](../interfaces/ActionProposal.md) ## Returns `boolean` --- ## Page: verifyReceiptIntegrity URL: https://docs.totem.ing/api/totemsdk-industrial-action/functions/verifyReceiptIntegrity [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / verifyReceiptIntegrity # Function: verifyReceiptIntegrity() > **verifyReceiptIntegrity**(`receipt`): `boolean` ## Parameters ### receipt [`ActionReceipt`](../interfaces/ActionReceipt.md) ## Returns `boolean` --- ## Page: ActionError URL: https://docs.totem.ing/api/totemsdk-industrial-action/interfaces/ActionError [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / ActionError # Interface: ActionError ## Properties ### code > **code**: `string` *** ### details? > `optional` **details?**: `Record`\<`string`, `unknown`\> *** ### message > **message**: `string` --- ## Page: ActionExecution URL: https://docs.totem.ing/api/totemsdk-industrial-action/interfaces/ActionExecution [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / ActionExecution # Interface: ActionExecution ## Properties ### completedAt? > `optional` **completedAt?**: `number` *** ### error? > `optional` **error?**: [`ActionError`](ActionError.md) *** ### id > **id**: `string` *** ### proposalId > **proposalId**: `string` *** ### receipt? > `optional` **receipt?**: [`ActionReceipt`](ActionReceipt.md) *** ### result? > `optional` **result?**: `unknown` *** ### startedAt > **startedAt**: `number` *** ### status > **status**: [`ExecutionStatus`](../type-aliases/ExecutionStatus.md) --- ## Page: ActionExecutor URL: https://docs.totem.ing/api/totemsdk-industrial-action/interfaces/ActionExecutor [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / ActionExecutor # Interface: ActionExecutor\ ## Type Parameters ### TParameters `TParameters` = `unknown` ### TResult `TResult` = `unknown` ## Properties ### kind > **kind**: `string` ## Methods ### execute() > **execute**(`proposal`, `params`, `context`): `Promise`\<`EdgeOperationResult`\<`TResult`\>\> #### Parameters ##### proposal [`ActionProposal`](ActionProposal.md) ##### params `TParameters` ##### context `Record`\<`string`, `unknown`\> #### Returns `Promise`\<`EdgeOperationResult`\<`TResult`\>\> --- ## Page: ActionHandler URL: https://docs.totem.ing/api/totemsdk-industrial-action/interfaces/ActionHandler [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / ActionHandler # Interface: ActionHandler\ ## Type Parameters ### TParameters `TParameters` = `unknown` ### TResult `TResult` = `unknown` ## Methods ### execute() > **execute**(`params`, `context`): `Promise`\<`EdgeOperationResult`\<`TResult`\>\> #### Parameters ##### params `TParameters` ##### context `Record`\<`string`, `unknown`\> #### Returns `Promise`\<`EdgeOperationResult`\<`TResult`\>\> --- ## Page: ActionProposal URL: https://docs.totem.ing/api/totemsdk-industrial-action/interfaces/ActionProposal [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / ActionProposal # Interface: ActionProposal ## Properties ### authorityDecision? > `optional` **authorityDecision?**: `AuthorityDecision` *** ### commitmentHash > **commitmentHash**: `string` *** ### context > **context**: `Record`\<`string`, `unknown`\> *** ### expiresAt? > `optional` **expiresAt?**: `number` *** ### id > **id**: `string` *** ### kind > **kind**: `string` *** ### mandateProofId? > `optional` **mandateProofId?**: `string` *** ### parameters > **parameters**: `Record`\<`string`, `unknown`\> *** ### proposedAt > **proposedAt**: `number` --- ## Page: ActionReceipt URL: https://docs.totem.ing/api/totemsdk-industrial-action/interfaces/ActionReceipt [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / ActionReceipt # Interface: ActionReceipt ## Properties ### actionId > **actionId**: `string` *** ### commitmentHash > **commitmentHash**: `string` *** ### error? > `optional` **error?**: [`ActionError`](ActionError.md) *** ### issuedAt > **issuedAt**: `number` *** ### kind > **kind**: `string` *** ### parameters > **parameters**: `Record`\<`string`, `unknown`\> *** ### proposalId > **proposalId**: `string` *** ### receiptId > **receiptId**: `string` *** ### result? > `optional` **result?**: `unknown` *** ### status > **status**: [`ActionStatus`](../type-aliases/ActionStatus.md) --- ## Page: ActionRegistryState URL: https://docs.totem.ing/api/totemsdk-industrial-action/interfaces/ActionRegistryState [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / ActionRegistryState # Interface: ActionRegistryState ## Properties ### executions > **executions**: `Record`\<`string`, [`ActionExecution`](ActionExecution.md)\> *** ### proposals > **proposals**: `Record`\<`string`, [`ActionProposal`](ActionProposal.md)\> *** ### receipts > **receipts**: `Record`\<`string`, [`ActionReceipt`](ActionReceipt.md)\> --- ## Page: ActionSchema URL: https://docs.totem.ing/api/totemsdk-industrial-action/interfaces/ActionSchema [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / ActionSchema # Interface: ActionSchema ## Properties ### context > **context**: [`ContextSchema`](ContextSchema.md)[] *** ### parameters > **parameters**: [`ParameterSchema`](ParameterSchema.md)[] --- ## Page: ActionStorage URL: https://docs.totem.ing/api/totemsdk-industrial-action/interfaces/ActionStorage [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / ActionStorage # Interface: ActionStorage ## Extended by - [`DurableActionStorage`](DurableActionStorage.md) ## Methods ### getExecution() > **getExecution**(`id`): `Promise`\<`EdgeOperationResult`\<[`ActionExecution`](ActionExecution.md)\>\> #### Parameters ##### id `string` #### Returns `Promise`\<`EdgeOperationResult`\<[`ActionExecution`](ActionExecution.md)\>\> *** ### getProposal() > **getProposal**(`id`): `Promise`\<`EdgeOperationResult`\<[`ActionProposal`](ActionProposal.md)\>\> #### Parameters ##### id `string` #### Returns `Promise`\<`EdgeOperationResult`\<[`ActionProposal`](ActionProposal.md)\>\> *** ### saveExecution() > **saveExecution**(`execution`): `Promise`\<`EdgeOperationResult`\<`void`\>\> #### Parameters ##### execution [`ActionExecution`](ActionExecution.md) #### Returns `Promise`\<`EdgeOperationResult`\<`void`\>\> *** ### saveProposal() > **saveProposal**(`proposal`): `Promise`\<`EdgeOperationResult`\<`void`\>\> #### Parameters ##### proposal [`ActionProposal`](ActionProposal.md) #### Returns `Promise`\<`EdgeOperationResult`\<`void`\>\> *** ### saveReceipt() > **saveReceipt**(`receipt`): `Promise`\<`EdgeOperationResult`\<`void`\>\> #### Parameters ##### receipt [`ActionReceipt`](ActionReceipt.md) #### Returns `Promise`\<`EdgeOperationResult`\<`void`\>\> --- ## Page: Condition URL: https://docs.totem.ing/api/totemsdk-industrial-action/interfaces/Condition [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / Condition # Interface: Condition ## Properties ### evaluate? > `optional` **evaluate?**: (`params`, `context`) => `string` \| `null` #### Parameters ##### params `Record`\<`string`, `unknown`\> ##### context `Record`\<`string`, `unknown`\> #### Returns `string` \| `null` *** ### field? > `optional` **field?**: `string` *** ### operator? > `optional` **operator?**: `"eq"` \| `"neq"` \| `"gt"` \| `"gte"` \| `"lt"` \| `"lte"` \| `"in"` \| `"not_in"` *** ### type > **type**: `"parameter_range"` \| `"context_match"` \| `"time_window"` \| `"custom"` *** ### value? > `optional` **value?**: `unknown` --- ## Page: ConditionResult URL: https://docs.totem.ing/api/totemsdk-industrial-action/interfaces/ConditionResult [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / ConditionResult # Interface: ConditionResult ## Properties ### failed > **failed**: `object`[] #### condition > **condition**: [`Condition`](Condition.md) #### reason > **reason**: `string` *** ### passed > **passed**: `boolean` --- ## Page: ContextField URL: https://docs.totem.ing/api/totemsdk-industrial-action/interfaces/ContextField [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / ContextField # Interface: ContextField ## Properties ### name > **name**: `string` *** ### source? > `optional` **source?**: `string` *** ### timestamp > **timestamp**: `number` *** ### value > **value**: `unknown` --- ## Page: ContextSchema URL: https://docs.totem.ing/api/totemsdk-industrial-action/interfaces/ContextSchema [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / ContextSchema # Interface: ContextSchema ## Properties ### description? > `optional` **description?**: `string` *** ### maxAgeMs? > `optional` **maxAgeMs?**: `number` *** ### name > **name**: `string` *** ### required > **required**: `boolean` *** ### type > **type**: `"string"` \| `"number"` \| `"boolean"` \| `"object"` --- ## Page: CreateProposalParams URL: https://docs.totem.ing/api/totemsdk-industrial-action/interfaces/CreateProposalParams [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / CreateProposalParams # Interface: CreateProposalParams ## Properties ### context > **context**: `Record`\<`string`, `unknown`\> *** ### expiresAt? > `optional` **expiresAt?**: `number` *** ### kind > **kind**: `string` *** ### mandateProofId? > `optional` **mandateProofId?**: `string` *** ### parameters > **parameters**: `Record`\<`string`, `unknown`\> *** ### proposedAt? > `optional` **proposedAt?**: `number` --- ## Page: DurableActionStorage URL: https://docs.totem.ing/api/totemsdk-industrial-action/interfaces/DurableActionStorage [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / DurableActionStorage # Interface: DurableActionStorage ## Extends - [`ActionStorage`](ActionStorage.md) ## Methods ### getExecution() > **getExecution**(`id`): `Promise`\<`EdgeOperationResult`\<[`ActionExecution`](ActionExecution.md)\>\> #### Parameters ##### id `string` #### Returns `Promise`\<`EdgeOperationResult`\<[`ActionExecution`](ActionExecution.md)\>\> #### Inherited from [`ActionStorage`](ActionStorage.md).[`getExecution`](ActionStorage.md#getexecution) *** ### getProposal() > **getProposal**(`id`): `Promise`\<`EdgeOperationResult`\<[`ActionProposal`](ActionProposal.md)\>\> #### Parameters ##### id `string` #### Returns `Promise`\<`EdgeOperationResult`\<[`ActionProposal`](ActionProposal.md)\>\> #### Inherited from [`ActionStorage`](ActionStorage.md).[`getProposal`](ActionStorage.md#getproposal) *** ### getReceipt() > **getReceipt**(`receiptId`): `Promise`\<`EdgeOperationResult`\<[`ActionReceipt`](ActionReceipt.md)\>\> #### Parameters ##### receiptId `string` #### Returns `Promise`\<`EdgeOperationResult`\<[`ActionReceipt`](ActionReceipt.md)\>\> *** ### getRevision() > **getRevision**(): `Promise`\<`number`\> Current registry transition counter (0 before the first write). #### Returns `Promise`\<`number`\> *** ### getSnapshot() > **getSnapshot**(): `Promise`\<[`ActionRegistryState`](ActionRegistryState.md)\> Current persisted snapshot state. #### Returns `Promise`\<[`ActionRegistryState`](ActionRegistryState.md)\> *** ### hasState() > **hasState**(): `Promise`\<`boolean`\> True once any snapshot record has been persisted. #### Returns `Promise`\<`boolean`\> *** ### saveExecution() > **saveExecution**(`execution`): `Promise`\<`EdgeOperationResult`\<`void`\>\> #### Parameters ##### execution [`ActionExecution`](ActionExecution.md) #### Returns `Promise`\<`EdgeOperationResult`\<`void`\>\> #### Inherited from [`ActionStorage`](ActionStorage.md).[`saveExecution`](ActionStorage.md#saveexecution) *** ### saveProposal() > **saveProposal**(`proposal`): `Promise`\<`EdgeOperationResult`\<`void`\>\> #### Parameters ##### proposal [`ActionProposal`](ActionProposal.md) #### Returns `Promise`\<`EdgeOperationResult`\<`void`\>\> #### Inherited from [`ActionStorage`](ActionStorage.md).[`saveProposal`](ActionStorage.md#saveproposal) *** ### saveReceipt() > **saveReceipt**(`receipt`): `Promise`\<`EdgeOperationResult`\<`void`\>\> #### Parameters ##### receipt [`ActionReceipt`](ActionReceipt.md) #### Returns `Promise`\<`EdgeOperationResult`\<`void`\>\> #### Inherited from [`ActionStorage`](ActionStorage.md).[`saveReceipt`](ActionStorage.md#savereceipt) --- ## Page: DurableActionStorageOptions URL: https://docs.totem.ing/api/totemsdk-industrial-action/interfaces/DurableActionStorageOptions [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / DurableActionStorageOptions # Interface: DurableActionStorageOptions ## Properties ### namespace? > `readonly` `optional` **namespace?**: `string` Key namespace prefix; default `totem_action:v1:`. *** ### requireAckMode? > `readonly` `optional` **requireAckMode?**: `"volatile"` \| `"buffered"` \| `"durably-acknowledged"` Required write acknowledgment; default `durably-acknowledged`. Pass `volatile` only for tests/scratch adapters (e.g. `MemoryStore`). --- ## Page: ExecuteActionResult URL: https://docs.totem.ing/api/totemsdk-industrial-action/interfaces/ExecuteActionResult [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / ExecuteActionResult # Interface: ExecuteActionResult\ ## Type Parameters ### TResult `TResult` = `unknown` ## Properties ### execution > **execution**: [`ActionExecution`](ActionExecution.md) *** ### receipt? > `optional` **receipt?**: [`ActionReceipt`](ActionReceipt.md) --- ## Page: GovernanceBridge URL: https://docs.totem.ing/api/totemsdk-industrial-action/interfaces/GovernanceBridge [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / GovernanceBridge # Interface: GovernanceBridge ## Methods ### abort() > **abort**(`reservationId`, `error`): `Promise`\<`EdgeOperationResult`\<`void`\>\> #### Parameters ##### reservationId `string` ##### error [`ActionError`](ActionError.md) #### Returns `Promise`\<`EdgeOperationResult`\<`void`\>\> *** ### commit() > **commit**(`reservationId`, `execution`): `Promise`\<`EdgeOperationResult`\<`void`\>\> #### Parameters ##### reservationId `string` ##### execution [`ActionExecution`](ActionExecution.md) #### Returns `Promise`\<`EdgeOperationResult`\<`void`\>\> *** ### reserve() > **reserve**(`proposal`, `mandateProofId`): `Promise`\<`EdgeOperationResult`\<\{ `reservationId`: `string`; \}\>\> #### Parameters ##### proposal [`ActionProposal`](ActionProposal.md) ##### mandateProofId `string` #### Returns `Promise`\<`EdgeOperationResult`\<\{ `reservationId`: `string`; \}\>\> --- ## Page: IndustrialActionDefinition URL: https://docs.totem.ing/api/totemsdk-industrial-action/interfaces/IndustrialActionDefinition [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / IndustrialActionDefinition # Interface: IndustrialActionDefinition\ ## Type Parameters ### TParameters `TParameters` = `unknown` ### TResult `TResult` = `unknown` ## Properties ### description > **description**: `string` *** ### handler > **handler**: [`ActionHandler`](ActionHandler.md)\<`TParameters`, `TResult`\> *** ### kind > **kind**: `string` *** ### schema > **schema**: [`ActionSchema`](ActionSchema.md) --- ## Page: ParameterSchema URL: https://docs.totem.ing/api/totemsdk-industrial-action/interfaces/ParameterSchema [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / ParameterSchema # Interface: ParameterSchema ## Properties ### defaultValue? > `optional` **defaultValue?**: `unknown` *** ### description? > `optional` **description?**: `string` *** ### name > **name**: `string` *** ### required > **required**: `boolean` *** ### type > **type**: [`ParameterType`](../type-aliases/ParameterType.md) *** ### validation? > `optional` **validation?**: (`value`) => `string` \| `null` #### Parameters ##### value `unknown` #### Returns `string` \| `null` --- ## Page: ActionStatus URL: https://docs.totem.ing/api/totemsdk-industrial-action/type-aliases/ActionStatus [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / ActionStatus # Type Alias: ActionStatus > **ActionStatus** = `"proposed"` \| `"approved"` \| `"reserved"` \| `"executing"` \| `"confirmed"` \| `"failed"` \| `"unknown"` \| `"cancelled"` --- ## Page: ExecutionStatus URL: https://docs.totem.ing/api/totemsdk-industrial-action/type-aliases/ExecutionStatus [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / ExecutionStatus # Type Alias: ExecutionStatus > **ExecutionStatus** = `"pending"` \| `"executing"` \| `"confirmed"` \| `"failed"` \| `"unknown"` --- ## Page: ParameterType URL: https://docs.totem.ing/api/totemsdk-industrial-action/type-aliases/ParameterType [**@totemsdk/industrial-action**](../index.md) *** [@totemsdk/industrial-action](../index.md) / ParameterType # Type Alias: ParameterType > **ParameterType** = `"string"` \| `"number"` \| `"boolean"` \| `"object"` \| `"array"` --- ## Page: IntelligenceError URL: https://docs.totem.ing/api/totemsdk-intelligence/classes/IntelligenceError [**@totemsdk/intelligence**](../index.md) *** [@totemsdk/intelligence](../index.md) / IntelligenceError # Class: IntelligenceError Base error for the intelligence surface. ## Extends - `Error` ## Constructors ### Constructor > **new IntelligenceError**(`code`, `message?`, `options?`): `IntelligenceError` #### Parameters ##### code [`IntelligenceErrorCode`](../type-aliases/IntelligenceErrorCode.md) ##### message? `string` ##### options? ###### cause? `unknown` ###### details? `unknown` ###### retryable? `boolean` #### Returns `IntelligenceError` #### Overrides `Error.constructor` ## Properties ### code > `readonly` **code**: [`IntelligenceErrorCode`](../type-aliases/IntelligenceErrorCode.md) *** ### details? > `readonly` `optional` **details?**: `unknown` *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### retryable > `readonly` **retryable**: `boolean` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### isIntelligenceError() > `static` **isIntelligenceError**(`err`): `err is IntelligenceError` #### Parameters ##### err `unknown` #### Returns `err is IntelligenceError` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: createContentAccessGatedProvider URL: https://docs.totem.ing/api/totemsdk-intelligence/functions/createContentAccessGatedProvider [**@totemsdk/intelligence**](../index.md) *** [@totemsdk/intelligence](../index.md) / createContentAccessGatedProvider # Function: createContentAccessGatedProvider() > **createContentAccessGatedProvider**(`policy`, `provider`): [`IntelligenceProvider`](../interfaces/IntelligenceProvider.md) Wrap a provider with workspace-scoped content gating (RFC-007 §5). The returned provider keeps the host provider's id/capabilities/cancel/close and forwards only gated RAG operations. Denials are returned as `POLICY_REJECTED` results — never by touching provider storage. ## Parameters ### policy [`ContentAccessPolicy`](../interfaces/ContentAccessPolicy.md) ### provider [`IntelligenceProvider`](../interfaces/IntelligenceProvider.md) ## Returns [`IntelligenceProvider`](../interfaces/IntelligenceProvider.md) ## Example ```ts const gated = createContentAccessGatedProvider( { entitlements: [{ principal: 'P1', workspaceIds: ['ws-Fleet'] }], freshnessMs: 60_000 }, createQvacIntelligenceProvider({ sdk }), ); ``` --- ## Page: createEdgeIntelligencePort URL: https://docs.totem.ing/api/totemsdk-intelligence/functions/createEdgeIntelligencePort [**@totemsdk/intelligence**](../index.md) *** [@totemsdk/intelligence](../index.md) / createEdgeIntelligencePort # Function: createEdgeIntelligencePort() > **createEdgeIntelligencePort**(`provider`): [`EdgeIntelligencePort`](../interfaces/EdgeIntelligencePort.md) Bind a provider-neutral [IntelligenceProvider](../interfaces/IntelligenceProvider.md) to an [EdgeIntelligencePort](../interfaces/EdgeIntelligencePort.md). The port exposes the provider's `intelligence:*` capability strings and translates provider-neutral operations/results into the port result shape. ## Parameters ### provider [`IntelligenceProvider`](../interfaces/IntelligenceProvider.md) ## Returns [`EdgeIntelligencePort`](../interfaces/EdgeIntelligencePort.md) ## Example ```ts import { createEdgeIntelligencePort } from '@totemsdk/intelligence'; import { createQvacIntelligenceProvider } from '@totemsdk/qvac'; const port = createEdgeIntelligencePort( createQvacIntelligenceProvider({ sdk }), ); ``` --- ## Page: evaluateContentAccess URL: https://docs.totem.ing/api/totemsdk-intelligence/functions/evaluateContentAccess [**@totemsdk/intelligence**](../index.md) *** [@totemsdk/intelligence](../index.md) / evaluateContentAccess # Function: evaluateContentAccess() > **evaluateContentAccess**(`policy`, `domain`, `op`, `params`, `context`): [`ContentAccessDecision`](../interfaces/ContentAccessDecision.md) Decide whether a RAG operation may proceed for the calling principal. Purely a policy function — no provider interaction. Returns the effective params (with `workspaceId` rewritten when the caller left it unset and has exactly one entitled workspace, so the provider never sees an un-scoped retrieval) or a denial. ## Parameters ### policy [`ContentAccessPolicy`](../interfaces/ContentAccessPolicy.md) ### domain `string` ### op `string` ### params `Record`\<`string`, `unknown`\> ### context [`IntelligenceContext`](../interfaces/IntelligenceContext.md) \| `undefined` ## Returns [`ContentAccessDecision`](../interfaces/ContentAccessDecision.md) --- ## Page: ContentAccessDecision URL: https://docs.totem.ing/api/totemsdk-intelligence/interfaces/ContentAccessDecision [**@totemsdk/intelligence**](../index.md) *** [@totemsdk/intelligence](../index.md) / ContentAccessDecision # Interface: ContentAccessDecision ## Properties ### allowed > **allowed**: `boolean` *** ### params? > `optional` **params?**: `Record`\<`string`, `unknown`\> Ops to forward to the provider with workspace scoping applied. *** ### reason? > `optional` **reason?**: `string` *** ### workspaceId? > `optional` **workspaceId?**: `string` The effective `workspaceId` (rewritten when the op left it unset). --- ## Page: ContentAccessPolicy URL: https://docs.totem.ing/api/totemsdk-intelligence/interfaces/ContentAccessPolicy [**@totemsdk/intelligence**](../index.md) *** [@totemsdk/intelligence](../index.md) / ContentAccessPolicy # Interface: ContentAccessPolicy ## Properties ### entitlements > **entitlements**: readonly [`ContentWorkspaceEntitlement`](ContentWorkspaceEntitlement.md)[] Latest authoritative entitlement snapshot. Change this to revoke — retrieval is gated once the change is observed; no cleanup follows. *** ### freshnessMs? > `optional` **freshnessMs?**: `number` Freshness/offline policy: how stale the snapshot may be before denial. When `freshnessMs` is set and `now - observedAt > freshnessMs`, protected ops are denied (fail-closed while offline/stale). *** ### now? > `optional` **now?**: () => `number` Injectable clock (defaults to `Date.now`). #### Returns `number` *** ### observedAt? > `optional` **observedAt?**: `number` Wall-clock time `entitlements` was observed (defaults to `now` at use). *** ### onDeny? > `optional` **onDeny?**: (`principal`, `op`, `reason`) => `void` Diagnostic hook invoked on every denial. #### Parameters ##### principal `string` \| `undefined` ##### op `string` ##### reason `string` #### Returns `void` --- ## Page: ContentWorkspaceEntitlement URL: https://docs.totem.ing/api/totemsdk-intelligence/interfaces/ContentWorkspaceEntitlement [**@totemsdk/intelligence**](../index.md) *** [@totemsdk/intelligence](../index.md) / ContentWorkspaceEntitlement # Interface: ContentWorkspaceEntitlement A principal's entitlement to content. Content is addressed by workspace: a principal may search/ingest/lifecycle exactly the workspaces listed, and nothing else. ## Properties ### principal > **principal**: `string` Principal identifier (account, agent id, purchase key). *** ### workspaceIds > **workspaceIds**: readonly `string`[] Workspace ids the principal may read and write. --- ## Page: EdgeIntelligencePort URL: https://docs.totem.ing/api/totemsdk-intelligence/interfaces/EdgeIntelligencePort [**@totemsdk/intelligence**](../index.md) *** [@totemsdk/intelligence](../index.md) / EdgeIntelligencePort # Interface: EdgeIntelligencePort Edge-compatible intelligence port contract. Lives in @totemsdk/intelligence (not @totemsdk/edge) so that adapters like `@totemsdk/qvac/edge` can implement a port for @totemsdk/edge without depending on edge itself. @totemsdk/edge re-exports this type and hosts implementations via `EdgeRuntimePorts.intelligence`. ## Properties ### capabilities > `readonly` **capabilities**: readonly `string`[] Capability strings advertised (e.g. ['intelligence:llm', …]). *** ### providerId > `readonly` **providerId**: `string` Stable provider id (e.g. 'qvac'). ## Methods ### cancel()? > `optional` **cancel**(`requestId`): `Promise`\<[`IntelligencePortResult`](IntelligencePortResult.md)\<`unknown`\>\> #### Parameters ##### requestId `string` #### Returns `Promise`\<[`IntelligencePortResult`](IntelligencePortResult.md)\<`unknown`\>\> *** ### close()? > `optional` **close**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### invoke() > **invoke**(`params`): `Promise`\<[`IntelligencePortResult`](IntelligencePortResult.md)\<\{ `data`: `unknown`; `receipt?`: `unknown`; `usage?`: `Record`\<`string`, `unknown`\>; \}\>\> #### Parameters ##### params ###### context? `Record`\<`string`, `unknown`\> ###### domain `string` ###### op `string` ###### params `Record`\<`string`, `unknown`\> ###### requestId? `string` ###### signal? `AbortSignal` #### Returns `Promise`\<[`IntelligencePortResult`](IntelligencePortResult.md)\<\{ `data`: `unknown`; `receipt?`: `unknown`; `usage?`: `Record`\<`string`, `unknown`\>; \}\>\> --- ## Page: IntelligenceContext URL: https://docs.totem.ing/api/totemsdk-intelligence/interfaces/IntelligenceContext [**@totemsdk/intelligence**](../index.md) *** [@totemsdk/intelligence](../index.md) / IntelligenceContext # Interface: IntelligenceContext Operation context — ties an inference call back to the governance layer. ## Properties ### agentId? > `readonly` `optional` **agentId?**: `string` *** ### metadata? > `readonly` `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### principal? > `readonly` `optional` **principal?**: `string` *** ### proposalId? > `readonly` `optional` **proposalId?**: `string` *** ### runId? > `readonly` `optional` **runId?**: `string` --- ## Page: IntelligenceErrorResult URL: https://docs.totem.ing/api/totemsdk-intelligence/interfaces/IntelligenceErrorResult [**@totemsdk/intelligence**](../index.md) *** [@totemsdk/intelligence](../index.md) / IntelligenceErrorResult # Interface: IntelligenceErrorResult Failed result of an intelligence operation (soft-fail path — no throw). ## Properties ### code > `readonly` **code**: [`IntelligenceErrorCode`](../type-aliases/IntelligenceErrorCode.md) *** ### message > `readonly` **message**: `string` *** ### ok > `readonly` **ok**: `false` *** ### requestId > `readonly` **requestId**: `string` *** ### retryable > `readonly` **retryable**: `boolean` --- ## Page: IntelligenceOperation URL: https://docs.totem.ing/api/totemsdk-intelligence/interfaces/IntelligenceOperation [**@totemsdk/intelligence**](../index.md) *** [@totemsdk/intelligence](../index.md) / IntelligenceOperation # Interface: IntelligenceOperation\ A single provider-neutral inference operation. `params` is intentionally `Record` at the contract level; each provider adapter narrows it to its domain's typed parameter set. ## Type Parameters ### T `T` = `unknown` ## Properties ### context? > `readonly` `optional` **context?**: [`IntelligenceContext`](IntelligenceContext.md) *** ### domain > `readonly` **domain**: [`IntelligenceDomainOrString`](../type-aliases/IntelligenceDomainOrString.md) *** ### op > `readonly` **op**: `string` *** ### params > `readonly` **params**: `Record`\<`string`, `unknown`\> *** ### requestId? > `readonly` `optional` **requestId?**: `string` *** ### signal? > `readonly` `optional` **signal?**: `AbortSignal` --- ## Page: IntelligencePortResult URL: https://docs.totem.ing/api/totemsdk-intelligence/interfaces/IntelligencePortResult [**@totemsdk/intelligence**](../index.md) *** [@totemsdk/intelligence](../index.md) / IntelligencePortResult # Interface: IntelligencePortResult\ Port-facing result shape used by [EdgeIntelligencePort](EdgeIntelligencePort.md). Mirrors @totemsdk/edge's `EdgeOperationResult` so the port stays host-agnostic; created by ../port.ts!createEdgeIntelligencePort. ## Type Parameters ### T `T` = `unknown` ## Properties ### data? > `optional` **data?**: `T` *** ### error? > `optional` **error?**: `string` *** ### errorCode? > `optional` **errorCode?**: `string` *** ### ok > **ok**: `boolean` --- ## Page: IntelligenceProvider URL: https://docs.totem.ing/api/totemsdk-intelligence/interfaces/IntelligenceProvider [**@totemsdk/intelligence**](../index.md) *** [@totemsdk/intelligence](../index.md) / IntelligenceProvider # Interface: IntelligenceProvider Provider-neutral intelligence interface. Implementors wrap a concrete inference runtime (QVAC, remote LLM gateway, embedded model host, …). The provider is compute-only: it cannot sign, cannot move value, and must never hold private keys. ## Properties ### capabilities > `readonly` **capabilities**: readonly `` `intelligence:${string}` ``[] Domains the provider currently supports. *** ### displayName > `readonly` **displayName**: `string` Human-readable provider name, e.g. 'QVAC In-situ Inference'. *** ### id > `readonly` **id**: `string` Stable provider identifier, e.g. 'qvac'. *** ### isReady > `readonly` **isReady**: `boolean` True if the provider is connected / ready. *** ### version > `readonly` **version**: `string` Wrapped provider runtime version. ## Methods ### cancel() > **cancel**(`requestId`): `Promise`\<[`IntelligenceOutcome`](../type-aliases/IntelligenceOutcome.md)\<`void`\>\> Cancel an in-flight operation by request id. #### Parameters ##### requestId `string` #### Returns `Promise`\<[`IntelligenceOutcome`](../type-aliases/IntelligenceOutcome.md)\<`void`\>\> *** ### close() > **close**(): `Promise`\<`void`\> Release provider resources. Further invoke calls should reject. #### Returns `Promise`\<`void`\> *** ### invoke() > **invoke**\<`T`\>(`op`): `Promise`\<[`IntelligenceOutcome`](../type-aliases/IntelligenceOutcome.md)\<`T`\>\> Execute a single inference operation. Implementations MAY throw IntelligenceError for hard failures but should prefer returning IntelligenceErrorResult for operational failures so the caller can inspect code/retryable without try/catch. #### Type Parameters ##### T `T` = `unknown` #### Parameters ##### op [`IntelligenceOperation`](IntelligenceOperation.md)\<`T`\> #### Returns `Promise`\<[`IntelligenceOutcome`](../type-aliases/IntelligenceOutcome.md)\<`T`\>\> *** ### invokeStream() > **invokeStream**(`op`): `AsyncIterable`\<[`IntelligenceStreamChunk`](../type-aliases/IntelligenceStreamChunk.md)\> Execute a streaming inference operation. Returns an async iterable of stream chunks. If the operation is not stream-capable, the implementation must throw NOT_IMPLEMENTED. #### Parameters ##### op [`IntelligenceStreamOperation`](IntelligenceStreamOperation.md) #### Returns `AsyncIterable`\<[`IntelligenceStreamChunk`](../type-aliases/IntelligenceStreamChunk.md)\> --- ## Page: IntelligenceProviderInfo URL: https://docs.totem.ing/api/totemsdk-intelligence/interfaces/IntelligenceProviderInfo [**@totemsdk/intelligence**](../index.md) *** [@totemsdk/intelligence](../index.md) / IntelligenceProviderInfo # Interface: IntelligenceProviderInfo Capability advertisement for discovery — a snapshot of a provider's supported surface at a point in time. ## Properties ### capabilities > `readonly` **capabilities**: readonly `` `intelligence:${string}` ``[] *** ### displayName > `readonly` **displayName**: `string` *** ### domains > `readonly` **domains**: readonly [`IntelligenceDomain`](../type-aliases/IntelligenceDomain.md)[] *** ### id > `readonly` **id**: `string` *** ### isReady > `readonly` **isReady**: `boolean` *** ### version > `readonly` **version**: `string` --- ## Page: IntelligenceProviderOptions URL: https://docs.totem.ing/api/totemsdk-intelligence/interfaces/IntelligenceProviderOptions [**@totemsdk/intelligence**](../index.md) *** [@totemsdk/intelligence](../index.md) / IntelligenceProviderOptions # Interface: IntelligenceProviderOptions Constructor options shared by provider adapters. ## Properties ### defaultTimeoutMs? > `readonly` `optional` **defaultTimeoutMs?**: `number` Timeout for individual operations (ms). Default provider-specific. *** ### lazyConnect? > `readonly` `optional` **lazyConnect?**: `boolean` Auto-connect on construction. Defaults to true. *** ### onLog? > `readonly` `optional` **onLog?**: (`level`, `message`, `context?`) => `void` Logger hook receiving operational diagnostics. #### Parameters ##### level `string` ##### message `string` ##### context? `unknown` #### Returns `void` --- ## Page: IntelligenceReceipt URL: https://docs.totem.ing/api/totemsdk-intelligence/interfaces/IntelligenceReceipt [**@totemsdk/intelligence**](../index.md) *** [@totemsdk/intelligence](../index.md) / IntelligenceReceipt # Interface: IntelligenceReceipt Receipt for an executed inference operation. v1 receipts are unsigned advisories produced by the provider adapter. WOTS-signed inference receipts are a documented follow-up in the wallet/ authority layer (`signedBy` anticipates that attestation). ## Properties ### domain > `readonly` **domain**: [`IntelligenceDomainOrString`](../type-aliases/IntelligenceDomainOrString.md) *** ### issuedAt > `readonly` **issuedAt**: `number` *** ### model? > `readonly` `optional` **model?**: `string` *** ### op > `readonly` **op**: `string` *** ### proposalId? > `readonly` `optional` **proposalId?**: `string` *** ### provider > `readonly` **provider**: `string` *** ### receiptId > `readonly` **receiptId**: `string` *** ### requestId > `readonly` **requestId**: `string` *** ### runId? > `readonly` `optional` **runId?**: `string` *** ### signedBy? > `readonly` `optional` **signedBy?**: `string` *** ### usage > `readonly` **usage**: `object` #### durationMs > `readonly` **durationMs**: `number` #### tokensIn > `readonly` **tokensIn**: `number` #### tokensOut > `readonly` **tokensOut**: `number` --- ## Page: IntelligenceResult URL: https://docs.totem.ing/api/totemsdk-intelligence/interfaces/IntelligenceResult [**@totemsdk/intelligence**](../index.md) *** [@totemsdk/intelligence](../index.md) / IntelligenceResult # Interface: IntelligenceResult\ Successful result of an intelligence operation. ## Type Parameters ### T `T` = `unknown` ## Properties ### data > `readonly` **data**: `T` *** ### ok > `readonly` **ok**: `true` *** ### receipt? > `readonly` `optional` **receipt?**: `unknown` *** ### requestId > `readonly` **requestId**: `string` *** ### upstreamRequestId? > `readonly` `optional` **upstreamRequestId?**: `string` The provider-side (upstream) request id, when the wrapped runtime is cancellable by id — e.g. `@qvac/sdk` decorates promises/run objects with a `requestId` that its own `cancel({ requestId })` targets. *** ### usage? > `readonly` `optional` **usage?**: [`IntelligenceUsage`](IntelligenceUsage.md) --- ## Page: IntelligenceStreamOperation URL: https://docs.totem.ing/api/totemsdk-intelligence/interfaces/IntelligenceStreamOperation [**@totemsdk/intelligence**](../index.md) *** [@totemsdk/intelligence](../index.md) / IntelligenceStreamOperation # Interface: IntelligenceStreamOperation Streaming operation shape — the provider decides the chunk vocabulary. ## Properties ### context? > `readonly` `optional` **context?**: [`IntelligenceContext`](IntelligenceContext.md) *** ### domain > `readonly` **domain**: [`IntelligenceDomainOrString`](../type-aliases/IntelligenceDomainOrString.md) *** ### onChunk? > `readonly` `optional` **onChunk?**: ((`chunk`) => `void`) \| ((`partial`, `kind?`) => `void`) *** ### op > `readonly` **op**: `string` *** ### params > `readonly` **params**: `Record`\<`string`, `unknown`\> *** ### requestId? > `readonly` `optional` **requestId?**: `string` *** ### signal? > `readonly` `optional` **signal?**: `AbortSignal` --- ## Page: IntelligenceUsage URL: https://docs.totem.ing/api/totemsdk-intelligence/interfaces/IntelligenceUsage [**@totemsdk/intelligence**](../index.md) *** [@totemsdk/intelligence](../index.md) / IntelligenceUsage # Interface: IntelligenceUsage Usage metering for a single inference operation. The unit of consumption is provider-specific. `@totemsdk/qvac` reports tokens and milliseconds; other providers may report their own units. Policy layers convert this into budget spend. ## Properties ### domain > `readonly` **domain**: [`IntelligenceDomainOrString`](../type-aliases/IntelligenceDomainOrString.md) *** ### durationMs? > `readonly` `optional` **durationMs?**: `number` *** ### metadata? > `readonly` `optional` **metadata?**: `Record`\<`string`, `string` \| `number`\> *** ### model? > `readonly` `optional` **model?**: `string` *** ### op > `readonly` **op**: `string` *** ### tokensIn? > `readonly` `optional` **tokensIn?**: `number` *** ### tokensOut? > `readonly` `optional` **tokensOut?**: `number` --- ## Page: IntelligenceCapability URL: https://docs.totem.ing/api/totemsdk-intelligence/type-aliases/IntelligenceCapability [**@totemsdk/intelligence**](../index.md) *** [@totemsdk/intelligence](../index.md) / IntelligenceCapability # Type Alias: IntelligenceCapability > **IntelligenceCapability** = `KnownIntelligenceCapability` \| `` `intelligence:${string}` `` --- ## Page: IntelligenceDomain URL: https://docs.totem.ing/api/totemsdk-intelligence/type-aliases/IntelligenceDomain [**@totemsdk/intelligence**](../index.md) *** [@totemsdk/intelligence](../index.md) / IntelligenceDomain # Type Alias: IntelligenceDomain > **IntelligenceDomain** = `"llm"` \| `"embed"` \| `"rag"` \| `"asr"` \| `"translate"` \| `"tts"` \| `"diffusion"` \| `"ocr"` \| `"classify"` \| `"audiogen"` \| `"video"` \| `"vla"` \| `"world"` \| `"models"` \| `"system"` \| `"plugins"` Intelligence domains — mirrors @qvac/sdk plugin categories. Each domain maps to a family of operations. --- ## Page: IntelligenceDomainOrString URL: https://docs.totem.ing/api/totemsdk-intelligence/type-aliases/IntelligenceDomainOrString [**@totemsdk/intelligence**](../index.md) *** [@totemsdk/intelligence](../index.md) / IntelligenceDomainOrString # Type Alias: IntelligenceDomainOrString > **IntelligenceDomainOrString** = [`IntelligenceDomain`](IntelligenceDomain.md) \| `string` & `object` Domain discriminator for operations and usages. `IntelligenceDomain` is the canonical closed set; `(string & {})` lets providers advertise extension domains while IDE autocomplete still surfaces the canonical literals first. --- ## Page: IntelligenceErrorCode URL: https://docs.totem.ing/api/totemsdk-intelligence/type-aliases/IntelligenceErrorCode [**@totemsdk/intelligence**](../index.md) *** [@totemsdk/intelligence](../index.md) / IntelligenceErrorCode # Type Alias: IntelligenceErrorCode > **IntelligenceErrorCode** = `"NOT_IMPLEMENTED"` \| `"NOT_LOADED"` \| `"NOT_FOUND"` \| `"UNAVAILABLE"` \| `"TIMEOUT"` \| `"CANCELLED"` \| `"INVALID_REQUEST"` \| `"CONTEXT_OVERFLOW"` \| `"POLICY_REJECTED"` \| `"BUDGET_EXCEEDED"` \| `"INTERNAL"` Error codes shared across intelligence providers. --- ## Page: IntelligenceOp URL: https://docs.totem.ing/api/totemsdk-intelligence/type-aliases/IntelligenceOp [**@totemsdk/intelligence**](../index.md) *** [@totemsdk/intelligence](../index.md) / IntelligenceOp # Type Alias: IntelligenceOp > **IntelligenceOp** = *typeof* [`INTELLIGENCE_OPS`](../variables/INTELLIGENCE_OPS.md)\[keyof *typeof* [`INTELLIGENCE_OPS`](../variables/INTELLIGENCE_OPS.md)\]\[`number`\] Union of all well-known operation names. --- ## Page: IntelligenceOutcome URL: https://docs.totem.ing/api/totemsdk-intelligence/type-aliases/IntelligenceOutcome [**@totemsdk/intelligence**](../index.md) *** [@totemsdk/intelligence](../index.md) / IntelligenceOutcome # Type Alias: IntelligenceOutcome\ > **IntelligenceOutcome**\<`T`\> = [`IntelligenceResult`](../interfaces/IntelligenceResult.md)\<`T`\> \| [`IntelligenceErrorResult`](../interfaces/IntelligenceErrorResult.md) ## Type Parameters ### T `T` = `unknown` --- ## Page: IntelligenceStreamChunk URL: https://docs.totem.ing/api/totemsdk-intelligence/type-aliases/IntelligenceStreamChunk [**@totemsdk/intelligence**](../index.md) *** [@totemsdk/intelligence](../index.md) / IntelligenceStreamChunk # Type Alias: IntelligenceStreamChunk > **IntelligenceStreamChunk** = \{ `text`: `string`; `type`: `"token"`; \} \| \{ `index?`: `number`; `text`: `string`; `type`: `"segment"`; \} \| \{ `data`: `unknown`; `mimeType?`: `string`; `type`: `"audio"`; \} \| \{ `data`: `unknown`; `mimeType?`: `string`; `type`: `"image"`; \} \| \{ `message?`: `string`; `percent?`: `number`; `step?`: `string`; `type`: `"progress"`; \} \| \{ `data`: `Record`\<`string`, `unknown`\>; `type`: `"delta"`; \} \| \{ `type`: `"done"`; `usage?`: [`IntelligenceUsage`](../interfaces/IntelligenceUsage.md); \} Stream chunk types surfaced by intelligence providers. --- ## Page: RagWorkspaceOp URL: https://docs.totem.ing/api/totemsdk-intelligence/type-aliases/RagWorkspaceOp [**@totemsdk/intelligence**](../index.md) *** [@totemsdk/intelligence](../index.md) / RagWorkspaceOp # Type Alias: RagWorkspaceOp > **RagWorkspaceOp** = *typeof* [`RAG_WORKSPACE_OPS`](../variables/RAG_WORKSPACE_OPS.md)\[`number`\] --- ## Page: CONTENT_DENY_CODE URL: https://docs.totem.ing/api/totemsdk-intelligence/variables/CONTENT_DENY_CODE [**@totemsdk/intelligence**](../index.md) *** [@totemsdk/intelligence](../index.md) / CONTENT\_DENY\_CODE # Variable: CONTENT\_DENY\_CODE > `const` **CONTENT\_DENY\_CODE**: [`IntelligenceErrorCode`](../type-aliases/IntelligenceErrorCode.md) = `'POLICY_REJECTED'` Code for content-access denials. --- ## Page: INTELLIGENCE_CAPABILITIES URL: https://docs.totem.ing/api/totemsdk-intelligence/variables/INTELLIGENCE_CAPABILITIES [**@totemsdk/intelligence**](../index.md) *** [@totemsdk/intelligence](../index.md) / INTELLIGENCE\_CAPABILITIES # Variable: INTELLIGENCE\_CAPABILITIES > `const` **INTELLIGENCE\_CAPABILITIES**: readonly [`IntelligenceCapability`](../type-aliases/IntelligenceCapability.md)[] --- ## Page: INTELLIGENCE_DOMAINS URL: https://docs.totem.ing/api/totemsdk-intelligence/variables/INTELLIGENCE_DOMAINS [**@totemsdk/intelligence**](../index.md) *** [@totemsdk/intelligence](../index.md) / INTELLIGENCE\_DOMAINS # Variable: INTELLIGENCE\_DOMAINS > `const` **INTELLIGENCE\_DOMAINS**: readonly [`IntelligenceDomain`](../type-aliases/IntelligenceDomain.md)[] All valid intelligence domain literals. --- ## Page: INTELLIGENCE_ERROR_MESSAGES URL: https://docs.totem.ing/api/totemsdk-intelligence/variables/INTELLIGENCE_ERROR_MESSAGES [**@totemsdk/intelligence**](../index.md) *** [@totemsdk/intelligence](../index.md) / INTELLIGENCE\_ERROR\_MESSAGES # Variable: INTELLIGENCE\_ERROR\_MESSAGES > `const` **INTELLIGENCE\_ERROR\_MESSAGES**: `Record`\<[`IntelligenceErrorCode`](../type-aliases/IntelligenceErrorCode.md), `string`\> Human-readable descriptions for each error code. --- ## Page: INTELLIGENCE_OPS URL: https://docs.totem.ing/api/totemsdk-intelligence/variables/INTELLIGENCE_OPS [**@totemsdk/intelligence**](../index.md) *** [@totemsdk/intelligence](../index.md) / INTELLIGENCE\_OPS # Variable: INTELLIGENCE\_OPS > `const` **INTELLIGENCE\_OPS**: `object` Well-known operation identifiers per domain. Callers may use any string — these are the canonical set shipped by @totemsdk/qvac. ## Type Declaration ### asr > `readonly` **asr**: readonly \[`"transcribe"`, `"transcribeStream"`, `"bciTranscribe"`, `"bciTranscribeStream"`\] ### audiogen > `readonly` **audiogen**: readonly \[`"audioGen"`\] ### classify > `readonly` **classify**: readonly \[`"classify"`\] ### diffusion > `readonly` **diffusion**: readonly \[`"diffusion"`, `"upscale"`\] ### embed > `readonly` **embed**: readonly \[`"embed"`\] ### llm > `readonly` **llm**: readonly \[`"completion"`, `"batchCompletion"`, `"finetune"`\] ### models > `readonly` **models**: readonly \[`"loadModel"`, `"unloadModel"`, `"getModelInfo"`, `"getLoadedModelInfo"`, `"deleteCache"`, `"downloadAsset"`, `"assessModelFit"`, `"modelRegistryList"`, `"modelRegistrySearch"`, `"modelRegistryGetModel"`, `"suspend"`, `"resume"`, `"state"`\] ### ocr > `readonly` **ocr**: readonly \[`"ocr"`\] ### plugins > `readonly` **plugins**: readonly \[`"invokePlugin"`, `"invokePluginStream"`\] ### rag > `readonly` **rag**: readonly \[`"ragChunk"`, `"ragIngest"`, `"ragSearch"`, `"ragSaveEmbeddings"`, `"ragDeleteEmbeddings"`, `"ragReindex"`, `"ragListWorkspaces"`, `"ragCloseWorkspace"`, `"ragDeleteWorkspace"`\] ### system > `readonly` **system**: readonly \[`"heartbeat"`, `"getSystemResources"`, `"loggingStream"`, `"subscribeServerLogs"`, `"cancel"`, `"close"`\] ### translate > `readonly` **translate**: readonly \[`"translate"`\] ### tts > `readonly` **tts**: readonly \[`"textToSpeech"`, `"textToSpeechStream"`\] ### video > `readonly` **video**: readonly \[`"video"`\] ### vla > `readonly` **vla**: readonly \[`"vla"`, `"vlaHparams"`, `"vlaSetEmbodiment"`, `"vlaPreprocessImage"`, `"vlaPadState"`\] ### world > `readonly` **world**: readonly \[`"worldCreateScene"`, `"worldStep"`\] --- ## Page: INTELLIGENCE_VERSION URL: https://docs.totem.ing/api/totemsdk-intelligence/variables/INTELLIGENCE_VERSION [**@totemsdk/intelligence**](../index.md) *** [@totemsdk/intelligence](../index.md) / INTELLIGENCE\_VERSION # Variable: INTELLIGENCE\_VERSION > `const` **INTELLIGENCE\_VERSION**: `"0.1.0"` = `'0.1.0'` --- ## Page: RAG_DESTRUCTIVE_OPS URL: https://docs.totem.ing/api/totemsdk-intelligence/variables/RAG_DESTRUCTIVE_OPS [**@totemsdk/intelligence**](../index.md) *** [@totemsdk/intelligence](../index.md) / RAG\_DESTRUCTIVE\_OPS # Variable: RAG\_DESTRUCTIVE\_OPS > `const` **RAG\_DESTRUCTIVE\_OPS**: readonly \[`"ragDeleteEmbeddings"`, `"ragDeleteWorkspace"`, `"ragCloseWorkspace"`, `"ragReindex"`\] Delete-family ops — revoked entitlements must never trigger these. --- ## Page: RAG_WORKSPACE_OPS URL: https://docs.totem.ing/api/totemsdk-intelligence/variables/RAG_WORKSPACE_OPS [**@totemsdk/intelligence**](../index.md) *** [@totemsdk/intelligence](../index.md) / RAG\_WORKSPACE\_OPS # Variable: RAG\_WORKSPACE\_OPS > `const` **RAG\_WORKSPACE\_OPS**: readonly \[`"ragSearch"`, `"ragIngest"`, `"ragSaveEmbeddings"`, `"ragDeleteEmbeddings"`, `"ragReindex"`, `"ragListWorkspaces"`, `"ragCloseWorkspace"`, `"ragDeleteWorkspace"`\] Workspace-scoped RAG operations the content gate governs. --- ## Page: KissvmLimitError URL: https://docs.totem.ing/api/totemsdk-kissvm/classes/KissvmLimitError [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / KissvmLimitError # Class: KissvmLimitError ## Extends - `Error` ## Constructors ### Constructor > **new KissvmLimitError**(`message`): `KissvmLimitError` #### Parameters ##### message `string` #### Returns `KissvmLimitError` #### Overrides `Error.constructor` ## Properties ### cause? > `optional` **cause?**: `unknown` #### Inherited from `Error.cause` *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### type > `readonly` **type**: `"limit"` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: KissvmRuntimeError URL: https://docs.totem.ing/api/totemsdk-kissvm/classes/KissvmRuntimeError [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / KissvmRuntimeError # Class: KissvmRuntimeError ## Extends - `Error` ## Constructors ### Constructor > **new KissvmRuntimeError**(`message`): `KissvmRuntimeError` #### Parameters ##### message `string` #### Returns `KissvmRuntimeError` #### Overrides `Error.constructor` ## Properties ### cause? > `optional` **cause?**: `unknown` #### Inherited from `Error.cause` *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### type > `readonly` **type**: `"runtime"` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: MiniNumber URL: https://docs.totem.ing/api/totemsdk-kissvm/classes/MiniNumber [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / MiniNumber # Class: MiniNumber ## Constructors ### Constructor > **new MiniNumber**(`value`): `MiniNumber` #### Parameters ##### value `string` \| `number` \| `bigint` \| `MiniNumber` #### Returns `MiniNumber` ## Properties ### scale > `readonly` **scale**: `number` *** ### unscaled > `readonly` **unscaled**: `bigint` *** ### EIGHT > `readonly` `static` **EIGHT**: `MiniNumber` *** ### FIFTY > `readonly` `static` **FIFTY**: `MiniNumber` *** ### FIVEONE12 > `readonly` `static` **FIVEONE12**: `MiniNumber` *** ### FOUR > `readonly` `static` **FOUR**: `MiniNumber` *** ### MINUSONE > `readonly` `static` **MINUSONE**: `MiniNumber` *** ### ONE > `readonly` `static` **ONE**: `MiniNumber` *** ### SIXTEEN > `readonly` `static` **SIXTEEN**: `MiniNumber` *** ### SIXTYFOUR > `readonly` `static` **SIXTYFOUR**: `MiniNumber` *** ### THIRTYTWO > `readonly` `static` **THIRTYTWO**: `MiniNumber` *** ### THOUSAND24 > `readonly` `static` **THOUSAND24**: `MiniNumber` *** ### THREE > `readonly` `static` **THREE**: `MiniNumber` *** ### TWELVE > `readonly` `static` **TWELVE**: `MiniNumber` *** ### TWENTY > `readonly` `static` **TWENTY**: `MiniNumber` *** ### TWO > `readonly` `static` **TWO**: `MiniNumber` *** ### TWOFIVESIX > `readonly` `static` **TWOFIVESIX**: `MiniNumber` *** ### ZERO > `readonly` `static` **ZERO**: `MiniNumber` ## Methods ### abs() > **abs**(): `MiniNumber` #### Returns `MiniNumber` *** ### add() > **add**(`other`): `MiniNumber` #### Parameters ##### other `MiniNumber` #### Returns `MiniNumber` *** ### ceil() > **ceil**(): `MiniNumber` #### Returns `MiniNumber` *** ### compareTo() > **compareTo**(`other`): `number` #### Parameters ##### other `MiniNumber` #### Returns `number` *** ### decimalPlaces() > **decimalPlaces**(): `number` #### Returns `number` *** ### decrement() > **decrement**(): `MiniNumber` #### Returns `MiniNumber` *** ### div() > **div**(`other`): `MiniNumber` #### Parameters ##### other `MiniNumber` #### Returns `MiniNumber` *** ### floor() > **floor**(): `MiniNumber` #### Returns `MiniNumber` *** ### getAsBigDecimal() > **getAsBigDecimal**(): `string` #### Returns `string` *** ### getAsBigInteger() > **getAsBigInteger**(): `string` #### Returns `string` *** ### increment() > **increment**(): `MiniNumber` #### Returns `MiniNumber` *** ### isEqual() > **isEqual**(`other`): `boolean` #### Parameters ##### other `MiniNumber` #### Returns `boolean` *** ### isLess() > **isLess**(`other`): `boolean` #### Parameters ##### other `MiniNumber` #### Returns `boolean` *** ### isLessEqual() > **isLessEqual**(`other`): `boolean` #### Parameters ##### other `MiniNumber` #### Returns `boolean` *** ### isMore() > **isMore**(`other`): `boolean` #### Parameters ##### other `MiniNumber` #### Returns `boolean` *** ### isMoreEqual() > **isMoreEqual**(`other`): `boolean` #### Parameters ##### other `MiniNumber` #### Returns `boolean` *** ### modulo() > **modulo**(`other`): `MiniNumber` #### Parameters ##### other `MiniNumber` #### Returns `MiniNumber` *** ### mult() > **mult**(`other`): `MiniNumber` #### Parameters ##### other `MiniNumber` #### Returns `MiniNumber` *** ### negate() > **negate**(): `MiniNumber` #### Returns `MiniNumber` *** ### pow() > **pow**(`n`): `MiniNumber` #### Parameters ##### n `number` #### Returns `MiniNumber` *** ### setSignificantDigits() > **setSignificantDigits**(`d`): `MiniNumber` #### Parameters ##### d `number` #### Returns `MiniNumber` *** ### sqrt() > **sqrt**(): `MiniNumber` #### Returns `MiniNumber` *** ### sub() > **sub**(`other`): `MiniNumber` #### Parameters ##### other `MiniNumber` #### Returns `MiniNumber` *** ### toNumber() > **toNumber**(): `number` #### Returns `number` *** ### toString() > **toString**(): `string` #### Returns `string` --- ## Page: buildActionAuthorizationScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildActionAuthorizationScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildActionAuthorizationScript # Function: buildActionAuthorizationScript() > **buildActionAuthorizationScript**(`config`): `string` ## Parameters ### config [`ActionAuthorizationConfig`](../interfaces/ActionAuthorizationConfig.md) ## Returns `string` --- ## Page: buildActionStateMachineScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildActionStateMachineScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildActionStateMachineScript # Function: buildActionStateMachineScript() > **buildActionStateMachineScript**(`config`): `string` Build an industrial action state machine script that enforces: proposed → noticed (require >= minNoticeBlocks from noticePort) noticed → active (require >= minNotice and <= maxDuration from noticePort) noticed → resolved (authority sig) active → resolved (authority sig) active → escalated (authority sig) noticed → expired (block > expiry) ## Parameters ### config [`ActionStateMachineConfig`](../interfaces/ActionStateMachineConfig.md) ## Returns `string` --- ## Page: buildAgentProposalScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildAgentProposalScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildAgentProposalScript # Function: buildAgentProposalScript() > **buildAgentProposalScript**(`config`): `string` ## Parameters ### config [`AgentProposalConfig`](../interfaces/AgentProposalConfig.md) ## Returns `string` --- ## Page: buildAuthorityRevocationScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildAuthorityRevocationScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildAuthorityRevocationScript # Function: buildAuthorityRevocationScript() > **buildAuthorityRevocationScript**(`config`): `string` Build a revocation script that enforces: 1. Authority signed the revocation 2. Current epoch matches the expected revocation epoch 3. Epoch state is unchanged by this transaction ## Parameters ### config [`AuthorityRevocationConfig`](../interfaces/AuthorityRevocationConfig.md) ## Returns `string` --- ## Page: buildBondLockupScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildBondLockupScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildBondLockupScript # Function: buildBondLockupScript() > **buildBondLockupScript**(`config`): `string` ## Parameters ### config [`ProviderBondConfig`](../interfaces/ProviderBondConfig.md) ## Returns `string` --- ## Page: buildBondReleaseScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildBondReleaseScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildBondReleaseScript # Function: buildBondReleaseScript() > **buildBondReleaseScript**(`config`): `string` ## Parameters ### config [`ProviderBondConfig`](../interfaces/ProviderBondConfig.md) ## Returns `string` --- ## Page: buildBondStateMachineScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildBondStateMachineScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildBondStateMachineScript # Function: buildBondStateMachineScript() > **buildBondStateMachineScript**(`config`): `string` Build a bond state machine script enforcing the 7-status lifecycle: declared → pending → active → expiring → expired ↘ disputed → invalid Port layout: 0 — bond status 1 — bond amount 2 — expiresAt block 3 — heartbeat block 4 — SLA port 5 — probe signer pk 6 — current block ## Parameters ### config [`ProviderBondConfig`](../interfaces/ProviderBondConfig.md) ## Returns `string` --- ## Page: buildCapabilityProofScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildCapabilityProofScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildCapabilityProofScript # Function: buildCapabilityProofScript() > **buildCapabilityProofScript**(`config`): `string` ## Parameters ### config [`ProofConfig`](../interfaces/ProofConfig.md) ## Returns `string` --- ## Page: buildCapabilityScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildCapabilityScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildCapabilityScript # Function: buildCapabilityScript() > **buildCapabilityScript**(`config`): `string` ## Parameters ### config [`CapabilityConfig`](../interfaces/CapabilityConfig.md) ## Returns `string` --- ## Page: buildChallengeScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildChallengeScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildChallengeScript # Function: buildChallengeScript() > **buildChallengeScript**(`config`): `string` Build a challenge/slash script that enforces: 1. Only a challenger can file during the challenge window 2. Challenger must post a dispute bond 3. Governor adjudicates (uphold → slash bond, dismiss → return bond) 4. Slashed funds are distributed (challenger reward + treasury) Port layout: 0 — challenge status (0=none, 1=filed, 2=upheld, 3=dismissed) 1 — challenger pk hex 2 — dispute bond amount 3 — adjudication deadline block 4 — challenger reward share (basis points) ## Parameters ### config #### adjudicationBlocks `bigint` #### challengerRewardBps `number` #### disputeBondAmount `string` #### governancePk `string` #### treasuryPk `string` ## Returns `string` --- ## Page: buildCliffRelease URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildCliffRelease [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildCliffRelease # Function: buildCliffRelease() > **buildCliffRelease**(`config`): `string` Cliff release: nothing until cliffBlock, then linear from cliff to end. ## Parameters ### config [`TemporalConfig`](../interfaces/TemporalConfig.md) ## Returns `string` --- ## Page: buildCoinUpdateScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildCoinUpdateScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildCoinUpdateScript # Function: buildCoinUpdateScript() > **buildCoinUpdateScript**(`config`): `string` ## Parameters ### config [`CoinUpdateConfig`](../interfaces/CoinUpdateConfig.md) ## Returns `string` --- ## Page: buildCommitScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildCommitScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildCommitScript # Function: buildCommitScript() > **buildCommitScript**(`config`): `string` Build a commit script that verifies: 1. The commitment hash matches the config 2. Nonce increases monotonically Port layout: commitmentPort — pre-computed SHA3 commit noncePort — monotonic counter ## Parameters ### config [`CommitConfig`](../interfaces/CommitConfig.md) ## Returns `string` --- ## Page: buildDeadlineScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildDeadlineScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildDeadlineScript # Function: buildDeadlineScript() > **buildDeadlineScript**(`config`): `string` ## Parameters ### config [`TemporalConfig`](../interfaces/TemporalConfig.md) ## Returns `string` --- ## Page: buildDecayScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildDecayScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildDecayScript # Function: buildDecayScript() > **buildDecayScript**(`config`): `string` ## Parameters ### config [`TemporalConfig`](../interfaces/TemporalConfig.md) ## Returns `string` --- ## Page: buildDelegationProofScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildDelegationProofScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildDelegationProofScript # Function: buildDelegationProofScript() > **buildDelegationProofScript**(`config`): `string` ## Parameters ### config [`DelegationProofConfig`](../interfaces/DelegationProofConfig.md) ## Returns `string` --- ## Page: buildEltooChannelScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildEltooChannelScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildEltooChannelScript # Function: buildEltooChannelScript() > **buildEltooChannelScript**(`config`): `string` ## Parameters ### config [`EltooConfig`](../interfaces/EltooConfig.md) ## Returns `string` --- ## Page: buildEltooFundingScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildEltooFundingScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildEltooFundingScript # Function: buildEltooFundingScript() > **buildEltooFundingScript**(`config`): `string` ## Parameters ### config [`EltooConfig`](../interfaces/EltooConfig.md) ## Returns `string` --- ## Page: buildEltooSettlementScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildEltooSettlementScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildEltooSettlementScript # Function: buildEltooSettlementScript() > **buildEltooSettlementScript**(`config`): `string` ## Parameters ### config [`EltooConfig`](../interfaces/EltooConfig.md) ## Returns `string` --- ## Page: buildEpochAdvancementScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildEpochAdvancementScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildEpochAdvancementScript # Function: buildEpochAdvancementScript() > **buildEpochAdvancementScript**(`config`, `newEpoch`, `authorizerPkd`): `string` ## Parameters ### config [`PolicyAnchorConfig`](../interfaces/PolicyAnchorConfig.md) ### newEpoch `number` ### authorizerPkd `string` ## Returns `string` --- ## Page: buildEscrowEnforcementScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildEscrowEnforcementScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildEscrowEnforcementScript # Function: buildEscrowEnforcementScript() > **buildEscrowEnforcementScript**(`config`): `string` Build an escrow enforcement script that checks: 1. Condition hash matches committed condition 2. Amount matches committed amount 3. Escrow state is unchanged ## Parameters ### config [`EscrowEnforcementConfig`](../interfaces/EscrowEnforcementConfig.md) ## Returns `string` --- ## Page: buildExecutionMandateScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildExecutionMandateScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildExecutionMandateScript # Function: buildExecutionMandateScript() > **buildExecutionMandateScript**(`config`): `string` Build an execution-mandate script that enforces: 1. Timelock: current block > votingEndsAt + executionDelay 2. Outcome proof committed and verified on-chain 3. Vote tally hash matches the committed outcome 4. Membership snapshot hash matches the proposal 5. Governance multisig threshold must authorize execution 6. Single-use enforcement via INC nonce Port layout: 0 — execution nonce (for single-use replay protection) 1 — outcomeProofId (committed hash bytes) 2 — voteTallyHash (committed hash bytes) 3 — membershipSnapshotHash (committed hash bytes) 4 — votingEndsAt (block, from proposal anchor) 5 — executionDelay (blocks, from proposal anchor) ## Parameters ### config [`ExecutionMandateConfig`](../interfaces/ExecutionMandateConfig.md) ## Returns `string` --- ## Page: buildFactoryFundingScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildFactoryFundingScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildFactoryFundingScript # Function: buildFactoryFundingScript() > **buildFactoryFundingScript**(`config`): `string` ## Parameters ### config [`FactoryConfig`](../interfaces/FactoryConfig.md) ## Returns `string` --- ## Page: buildFeeAccrualScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildFeeAccrualScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildFeeAccrualScript # Function: buildFeeAccrualScript() > **buildFeeAccrualScript**(`config`): `string` Build a fee accrual script that enforces: 1. Fee accrual is within the window: startBlock <= ## Parameters ### config [`LiquidityLockConfig`](../interfaces/LiquidityLockConfig.md) ## Returns `string` ## BLOCK <= endBlock 2. Fee = rate * elapsed / totalPeriod (pro-rata) 3. Claimable = accrued - prevClaimed (no double claim) 4. Fee goes to governance/fee recipient Port layout (same coin, higher ports for fee data): 10 — fee start block 11 — fee end block 12 — fee accrued so far 13 — rate (amount per period) --- ## Page: buildHeartbeatScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildHeartbeatScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildHeartbeatScript # Function: buildHeartbeatScript() > **buildHeartbeatScript**(`config`): `string` ## Parameters ### config [`ProviderBondConfig`](../interfaces/ProviderBondConfig.md) ## Returns `string` --- ## Page: buildIdentityVerificationScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildIdentityVerificationScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildIdentityVerificationScript # Function: buildIdentityVerificationScript() > **buildIdentityVerificationScript**(`config`): `string` ## Parameters ### config [`IdentityVerificationConfig`](../interfaces/IdentityVerificationConfig.md) ## Returns `string` --- ## Page: buildLayerSubset URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildLayerSubset [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildLayerSubset # Function: buildLayerSubset() > **buildLayerSubset**(`config`, `include`): `object` Build a subset of layers — useful when some layers are optional. Only includes layers that are present in the `include` array. ## Parameters ### config [`LayeredPolicyConfig`](../interfaces/LayeredPolicyConfig.md) ### include `string`[] ## Returns `object` ### proofChain > **proofChain**: [`ProofChain`](../interfaces/ProofChain.md) ### tree > **tree**: [`PolicyTree`](../interfaces/PolicyTree.md) --- ## Page: buildLayeredMastScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildLayeredMastScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildLayeredMastScript # Function: buildLayeredMastScript() > **buildLayeredMastScript**(`config`): `string` Build the nested MAST KISSVM script for a layered policy. Each layer delegates to the next via MAST. ## Parameters ### config [`LayeredPolicyConfig`](../interfaces/LayeredPolicyConfig.md) ## Returns `string` --- ## Page: buildLayeredPolicy URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildLayeredPolicy [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildLayeredPolicy # Function: buildLayeredPolicy() > **buildLayeredPolicy**(`config`): `object` Build a layered policy tree from a config. Returns a PolicyTree where each layer is a node, plus a proof chain that can be used for nested MAST execution. ## Parameters ### config [`LayeredPolicyConfig`](../interfaces/LayeredPolicyConfig.md) ## Returns `object` ### mastScript > **mastScript**: `string` ### proofChain > **proofChain**: [`ProofChain`](../interfaces/ProofChain.md) ### tree > **tree**: [`PolicyTree`](../interfaces/PolicyTree.md) ## Example ```ts const { tree, proofChain } = buildLayeredPolicy({ assetId: 'robot-arm-001', assetName: 'Robot Arm', layers: [ { id: 'manufacturer', name: 'Robot Corp', script: mfgScript, authorityPkd: mfgPk }, { id: 'regulatory', name: 'EU Machinery Directive', script: regScript, authorityPkd: regPk }, { id: 'owner', name: 'Factory GmbH', script: ownerScript, authorityPkd: ownerPk }, { id: 'site', name: 'Plant A', script: siteScript, authorityPkd: sitePk }, { id: 'operator', name: 'Technician', script: opScript, authorityPkd: opPk }, ], }); ``` --- ## Page: buildLeaseCertificateScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildLeaseCertificateScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildLeaseCertificateScript # Function: buildLeaseCertificateScript() > **buildLeaseCertificateScript**(`config`): `string` Build a lease certificate verification script that checks: 1. Authority signed the certificate 2. Certificate fields (treeId, deviceId, branchId, purpose, payload) match committed state 3. Current block < expiresAt (not expired) 4. State is unchanged (SAMESTATE) ## Parameters ### config [`LeaseCertificateConfig`](../interfaces/LeaseCertificateConfig.md) ## Returns `string` --- ## Page: buildLeaseMessageScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildLeaseMessageScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildLeaseMessageScript # Function: buildLeaseMessageScript() > **buildLeaseMessageScript**(`config`): `string` ## Parameters ### config [`LeaseMessageConfig`](../interfaces/LeaseMessageConfig.md) ## Returns `string` --- ## Page: buildLeaseStateMachineScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildLeaseStateMachineScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildLeaseStateMachineScript # Function: buildLeaseStateMachineScript() > **buildLeaseStateMachineScript**(`config`): `string` Build a lease state machine script enforcing the 5-status lifecycle: pending → active → expired ↘ finalised ↘ cancelled Port 0 holds the status. ## Parameters ### config [`LeaseCertificateConfig`](../interfaces/LeaseCertificateConfig.md) ## Returns `string` --- ## Page: buildLinearRelease URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildLinearRelease [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildLinearRelease # Function: buildLinearRelease() > **buildLinearRelease**(`config`): `string` Linear release: vested = total * elapsed / duration, where duration = STATE(endPort) - STATE(startPort). ## Parameters ### config [`TemporalConfig`](../interfaces/TemporalConfig.md) ## Returns `string` --- ## Page: buildLiquidityLockScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildLiquidityLockScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildLiquidityLockScript # Function: buildLiquidityLockScript() > **buildLiquidityLockScript**(`config`): `string` Build a liquidity lock script that enforces: 1. Position status is committed or active (not depleted/invalid/expired) 2. Current block >= unlockBlock 3. Amount matches committed value 4. Provider must sign Port layout: 0 — amount 1 — unlockBlock 2 — status 3 — fee recipient pk hex ## Parameters ### config [`LiquidityLockConfig`](../interfaces/LiquidityLockConfig.md) ## Returns `string` --- ## Page: buildMagicConstantsScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildMagicConstantsScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildMagicConstantsScript # Function: buildMagicConstantsScript() > **buildMagicConstantsScript**(`config`): `string` ## Parameters ### config [`TxPoWValidationConfig`](../interfaces/TxPoWValidationConfig.md) ## Returns `string` --- ## Page: buildMandateEnforcementScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildMandateEnforcementScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildMandateEnforcementScript # Function: buildMandateEnforcementScript() > **buildMandateEnforcementScript**(`config`): `string` Build a mandate enforcement script that checks: 1. Grantor signed the transaction 2. Mandate scope matches the committed scope 3. Mandate is not expired (@BLOCK <= expiresAtBlock) 4. Mandate is not revoked (current epoch <= revocationEpoch) 5. Nonce-based replay protection Port layout: 0 — scope match hash 1 — revocation epoch 2 — expiresAt block 3 — nonce ## Parameters ### config [`MandateEnforcementConfig`](../interfaces/MandateEnforcementConfig.md) ## Returns `string` --- ## Page: buildManifestBindingScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildManifestBindingScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildManifestBindingScript # Function: buildManifestBindingScript() > **buildManifestBindingScript**(`config`): `string` ## Parameters ### config [`ManifestBindingConfig`](../interfaces/ManifestBindingConfig.md) ## Returns `string` --- ## Page: buildManifestExpiryScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildManifestExpiryScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildManifestExpiryScript # Function: buildManifestExpiryScript() > **buildManifestExpiryScript**(`config`): `string` ## Parameters ### config [`ManifestExpiryConfig`](../interfaces/ManifestExpiryConfig.md) ## Returns `string` --- ## Page: buildPaymentIntentScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildPaymentIntentScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildPaymentIntentScript # Function: buildPaymentIntentScript() > **buildPaymentIntentScript**(`config`): `string` ## Parameters ### config [`PaymentIntentConfig`](../interfaces/PaymentIntentConfig.md) ## Returns `string` --- ## Page: buildPolicyAnchorScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildPolicyAnchorScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildPolicyAnchorScript # Function: buildPolicyAnchorScript() > **buildPolicyAnchorScript**(`config`): `string` ## Parameters ### config [`PolicyAnchorConfig`](../interfaces/PolicyAnchorConfig.md) ## Returns `string` --- ## Page: buildPolicyAnchorState URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildPolicyAnchorState [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildPolicyAnchorState # Function: buildPolicyAnchorState() > **buildPolicyAnchorState**(`config`, `initialRoots`): `Record`\<`number`, `string`\> ## Parameters ### config [`PolicyAnchorConfig`](../interfaces/PolicyAnchorConfig.md) ### initialRoots #### emergencyRoot? `string` #### firmwareApprovalRoot? `string` #### manifestHash? `string` #### ownerRoot? `string` #### recoveryRoot? `string` #### regulatorRoot? `string` #### serviceProviderRoot? `string` ## Returns `Record`\<`number`, `string`\> --- ## Page: buildPolicyEnforcementScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildPolicyEnforcementScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildPolicyEnforcementScript # Function: buildPolicyEnforcementScript() > **buildPolicyEnforcementScript**(`config`): `string` ## Parameters ### config [`PolicyEnforcementConfig`](../interfaces/PolicyEnforcementConfig.md) ## Returns `string` --- ## Page: buildPolicyTree URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildPolicyTree [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildPolicyTree # Function: buildPolicyTree() > **buildPolicyTree**(`nodes`): [`PolicyTree`](../interfaces/PolicyTree.md) Build a policy tree from a flat list of nodes. Nodes reference parents by `parentId`. The root is the node with no parent. ## Parameters ### nodes [`PolicyNodeInput`](../interfaces/PolicyNodeInput.md)[] ## Returns [`PolicyTree`](../interfaces/PolicyTree.md) ## Example ```ts const tree = buildPolicyTree([ { id: 'root', name: 'National', script: 'RETURN TRUE' }, { id: 'regional', name: 'Regional', script: 'ASSERT SIGNEDBY(STATE(0)) RETURN TRUE', parentId: 'root' }, { id: 'local', name: 'Local', script: 'ASSERT SIGNEDBY(PREVSTATE(0)) RETURN TRUE', parentId: 'regional' }, ]); ``` --- ## Page: buildPositionStateMachineScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildPositionStateMachineScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildPositionStateMachineScript # Function: buildPositionStateMachineScript() > **buildPositionStateMachineScript**(`config`): `string` Build a position state machine script enforcing the position lifecycle: draft → committed → active → quiescing → withdrawn ↘ depleted ↘ depleted ↘ invalid ↘ invalid ↘ disputed Port 0 holds the status. ## Parameters ### config #### governancePk `string` ## Returns `string` --- ## Page: buildPrevStateWorkflow URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildPrevStateWorkflow [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildPrevStateWorkflow # Function: buildPrevStateWorkflow() > **buildPrevStateWorkflow**(`id`, `name`, `transitions`, `additionalScript?`): [`PrevStateWorkflow`](../interfaces/PrevStateWorkflow.md) Build a complete PREVSTATE workflow from a list of transitions. ## Parameters ### id `string` Workflow identifier. ### name `string` Human-readable name. ### transitions [`StateTransition`](../interfaces/StateTransition.md)[] Ordered list of state transitions. ### additionalScript? `string` = `''` Additional KISSVM script logic (assertions, verifications). ## Returns [`PrevStateWorkflow`](../interfaces/PrevStateWorkflow.md) --- ## Page: buildProofAnchorScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildProofAnchorScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildProofAnchorScript # Function: buildProofAnchorScript() > **buildProofAnchorScript**(`config`): `string` ## Parameters ### config [`ProofConfig`](../interfaces/ProofConfig.md) ## Returns `string` --- ## Page: buildProofChain URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildProofChain [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildProofChain # Function: buildProofChain() > **buildProofChain**(`links`): [`ProofChain`](../interfaces/ProofChain.md) ## Parameters ### links [`ProofLink`](../interfaces/ProofLink.md)[] ## Returns [`ProofChain`](../interfaces/ProofChain.md) --- ## Page: buildProofDelegationScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildProofDelegationScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildProofDelegationScript # Function: buildProofDelegationScript() > **buildProofDelegationScript**(`config`): `string` ## Parameters ### config [`ProofConfig`](../interfaces/ProofConfig.md) ## Returns `string` --- ## Page: buildProposalStateMachineScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildProposalStateMachineScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildProposalStateMachineScript # Function: buildProposalStateMachineScript() > **buildProposalStateMachineScript**(`config`): `string` Build a proposal state-machine script that enforces the full 7-status lifecycle: draft → active → passed → failed → executed ↘ cancelled (from any except executed) ↘ expired (from active, after votingEndsAt) Port layout (STATE / PREVSTATE): 0 — status 1 — votingStartsAt (block) 2 — votingEndsAt (block) 3 — executionDelay (blocks) 4 — proposer pk hex ## Parameters ### config [`ProposalConfig`](../interfaces/ProposalConfig.md) ## Returns `string` --- ## Page: buildRateLimitScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildRateLimitScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildRateLimitScript # Function: buildRateLimitScript() > **buildRateLimitScript**(`config`): `string` ## Parameters ### config [`TemporalConfig`](../interfaces/TemporalConfig.md) ## Returns `string` --- ## Page: buildRevealScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildRevealScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildRevealScript # Function: buildRevealScript() > **buildRevealScript**(`config`): `string` Build a reveal script that verifies: SHA3(preimage) == PREVSTATE(commitmentPort) ## Parameters ### config [`RevealConfig`](../interfaces/RevealConfig.md) ## Returns `string` --- ## Page: buildRevocationProofScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildRevocationProofScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildRevocationProofScript # Function: buildRevocationProofScript() > **buildRevocationProofScript**(`config`): `string` ## Parameters ### config [`ProofConfig`](../interfaces/ProofConfig.md) ## Returns `string` --- ## Page: buildRevocationScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildRevocationScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildRevocationScript # Function: buildRevocationScript() > **buildRevocationScript**(`config`): `string` ## Parameters ### config [`RevocationConfig`](../interfaces/RevocationConfig.md) ## Returns `string` --- ## Page: buildRootRotationScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildRootRotationScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildRootRotationScript # Function: buildRootRotationScript() > **buildRootRotationScript**(`port`, `newRoot`, `authorizerPkd`, `reason`): `string` ## Parameters ### port `number` ### newRoot `string` ### authorizerPkd `string` ### reason `string` ## Returns `string` --- ## Page: buildRotationScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildRotationScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildRotationScript # Function: buildRotationScript() > **buildRotationScript**(`config`): `string` ## Parameters ### config [`RotationConfig`](../interfaces/RotationConfig.md) ## Returns `string` --- ## Page: buildStateTransition URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildStateTransition [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildStateTransition # Function: buildStateTransition() > **buildStateTransition**(`port`, `name`, `currentValue`, `previousValue`, `transition`): [`StateTransition`](../interfaces/StateTransition.md) Build a single state transition definition. ## Parameters ### port `number` STATE/PREVSTATE port number. ### name `string` Human-readable name. ### currentValue `string` Current state value. ### previousValue `string` Previous state value (from PREVSTATE). ### transition `string` Description of the transition function. ## Returns [`StateTransition`](../interfaces/StateTransition.md) --- ## Page: buildStatechainOwnerRotationScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildStatechainOwnerRotationScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildStatechainOwnerRotationScript # Function: buildStatechainOwnerRotationScript() > **buildStatechainOwnerRotationScript**(`config`): `string` ## Parameters ### config [`StateChainConfig`](../interfaces/StateChainConfig.md) ## Returns `string` --- ## Page: buildStatechainScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildStatechainScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildStatechainScript # Function: buildStatechainScript() > **buildStatechainScript**(`config`): `string` ## Parameters ### config [`StateChainConfig`](../interfaces/StateChainConfig.md) ## Returns `string` --- ## Page: buildTemporalScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildTemporalScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildTemporalScript # Function: buildTemporalScript() > **buildTemporalScript**(`config`): `string` ## Parameters ### config [`TemporalConfig`](../interfaces/TemporalConfig.md) ## Returns `string` --- ## Page: buildTreasuryExecutionScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildTreasuryExecutionScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildTreasuryExecutionScript # Function: buildTreasuryExecutionScript() > **buildTreasuryExecutionScript**(`config`): `string` Build a treasury execution script that enforces: 1. Timelock (block > committed execution block) 2. Mandate constraint verification (proposalId, actionIndex, actionType) 3. Governance multisig threshold 4. Exact output verification (recipient, amount, token) Port layout: 0 — executionTimelockBlock (must be < @BLOCK) 1 — proposalId hash (commitment) 2 — actionIndex 3 — actionType hash 4 — mandateNonce (for single-use replay protection) ## Parameters ### config [`TreasuryExecutionConfig`](../interfaces/TreasuryExecutionConfig.md) ## Returns `string` --- ## Page: buildTrustMessageScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildTrustMessageScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildTrustMessageScript # Function: buildTrustMessageScript() > **buildTrustMessageScript**(`config`): `string` ## Parameters ### config [`TrustMessageConfig`](../interfaces/TrustMessageConfig.md) ## Returns `string` --- ## Page: buildTxPoWValidationScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildTxPoWValidationScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildTxPoWValidationScript # Function: buildTxPoWValidationScript() > **buildTxPoWValidationScript**(`config`): `string` ## Parameters ### config [`TxPoWValidationConfig`](../interfaces/TxPoWValidationConfig.md) ## Returns `string` --- ## Page: buildUsageTrackingScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildUsageTrackingScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildUsageTrackingScript # Function: buildUsageTrackingScript() > **buildUsageTrackingScript**(`config`): `string` Build a usage tracking script that enforces: 1. If past window end, reset count/amount to current values 2. Otherwise, check count <= maxCount and amount <= maxAmount 3. Nonce-based replay protection Port layout: 0 — count 1 — amount 2 — window end block 3 — nonce ## Parameters ### config [`UsageTrackingConfig`](../interfaces/UsageTrackingConfig.md) ## Returns `string` --- ## Page: buildVoteSubmissionScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildVoteSubmissionScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildVoteSubmissionScript # Function: buildVoteSubmissionScript() > **buildVoteSubmissionScript**(`config`): `string` Build a vote-submission script that enforces: 1. Voting window is open (block between votingStartsAt and votingEndsAt) 2. Voter is in the membership snapshot (weight > 0) 3. No double vote (nonce spent via INC) 4. Vote weight matches attested membership weight 5. Choice is valid (yes/no/abstain, mutually exclusive) Port layout (STATE / PREVSTATE): 0 — voter pk (hex, committed on first vote submit) 1 — nonce (incremented each vote to prevent replay) 2 — attested membership weight 3 — choice (0=yes, 1=no, 2=abstain) 4 — vote weight submitted 5 — membership snapshot hash anchor ## Parameters ### config [`VoteSubmissionConfig`](../interfaces/VoteSubmissionConfig.md) ## Returns `string` --- ## Page: buildVoteTallyScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildVoteTallyScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildVoteTallyScript # Function: buildVoteTallyScript() > **buildVoteTallyScript**(`config`): `string` ## Parameters ### config [`VoteTallyConfig`](../interfaces/VoteTallyConfig.md) ## Returns `string` --- ## Page: buildWatermarkTrackingScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildWatermarkTrackingScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildWatermarkTrackingScript # Function: buildWatermarkTrackingScript() > **buildWatermarkTrackingScript**(`config`): `string` Build a watermark tracking script that enforces: 1. Watermark cursor increases monotonically (cur > prev) 2. TTL: elapsed blocks since previous watermark >= minInterval 3. State range unchanged (SAMESTATE on watermarkPort range) Port layout: 0 — watermark cursor value 1 — last watermark block 2 — min interval (blocks between watermarks) ## Parameters ### config [`LeaseCertificateConfig`](../interfaces/LeaseCertificateConfig.md) ## Returns `string` --- ## Page: buildWindowScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildWindowScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildWindowScript # Function: buildWindowScript() > **buildWindowScript**(`config`): `string` ## Parameters ### config [`TemporalConfig`](../interfaces/TemporalConfig.md) ## Returns `string` --- ## Page: buildWithdrawalScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildWithdrawalScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildWithdrawalScript # Function: buildWithdrawalScript() > **buildWithdrawalScript**(`config`): `string` Build a withdrawal script that enforces: 1. Status is quiescing or active (not locked) 2. Current block >= unlockBlock 3. Provider must sign 4. Output must be a valid withdrawal (LP receives funds) 5. Withdrawal count tracked (max 10) Port layout: 0 — amount 1 — unlockBlock 2 — status 3 — fee recipient pk hex 4 — withdrawal count ## Parameters ### config [`LiquidityLockConfig`](../interfaces/LiquidityLockConfig.md) ## Returns `string` --- ## Page: buildWitness URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/buildWitness [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / buildWitness # Function: buildWitness() > **buildWitness**(`inputs`): [`ScriptWitness`](../interfaces/ScriptWitness.md) buildWitness — constructs a ScriptWitness from a list of signed inputs. Each entry provides the public-key digest and the corresponding WOTS signature over the transaction digest. The evaluator uses this witness when verifying SIGNEDBY / MULTISIG opcodes. For convenience, a `{ signatures }` map (pubkey hex → signature bytes or hex string) is also accepted — used by the canonical example suite. ## Parameters ### inputs [`WitnessInput`](../interfaces/WitnessInput.md)[] \| \{ `signatures`: `Record`\<`string`, `Uint8Array` \| `string`\>; \} ## Returns [`ScriptWitness`](../interfaces/ScriptWitness.md) --- ## Page: compileMastTree URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/compileMastTree [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / compileMastTree # Function: compileMastTree() > **compileMastTree**(`scripts`): [`CompiledMast`](../interfaces/CompiledMast.md) ## Parameters ### scripts `string`[] ## Returns [`CompiledMast`](../interfaces/CompiledMast.md) --- ## Page: compilePolicyGraph URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/compilePolicyGraph [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / compilePolicyGraph # Function: compilePolicyGraph() > **compilePolicyGraph**(`policy`): [`CompiledRecursivePolicy`](../interfaces/CompiledRecursivePolicy.md) ## Parameters ### policy [`PolicyGraph`](../interfaces/PolicyGraph.md) ## Returns [`CompiledRecursivePolicy`](../interfaces/CompiledRecursivePolicy.md) --- ## Page: computeCanonicalScriptAddress URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/computeCanonicalScriptAddress [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / computeCanonicalScriptAddress # Function: computeCanonicalScriptAddress() > **computeCanonicalScriptAddress**(`script`): `string` ## Parameters ### script `string` ## Returns `string` --- ## Page: computeCanonicalScriptHash URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/computeCanonicalScriptHash [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / computeCanonicalScriptHash # Function: computeCanonicalScriptHash() > **computeCanonicalScriptHash**(`script`): `string` ## Parameters ### script `string` ## Returns `string` --- ## Page: computeRelease URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/computeRelease [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / computeRelease # Function: computeRelease() > **computeRelease**(`config`, `block`, `state`): `bigint` ## Parameters ### config [`TemporalConfig`](../interfaces/TemporalConfig.md) ### block `bigint` ### state `Map`\<`number`, `bigint`\> ## Returns `bigint` --- ## Page: computeScriptHash URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/computeScriptHash [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / computeScriptHash # Function: computeScriptHash() > **computeScriptHash**(`script`): `string` ## Parameters ### script `string` ## Returns `string` --- ## Page: counterWorkflow URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/counterWorkflow [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / counterWorkflow # Function: counterWorkflow() > **counterWorkflow**(`port`, `maxValue?`): [`PrevStateWorkflow`](../interfaces/PrevStateWorkflow.md) Generate a KISSVM script for a counter that increments on each transaction. ## Parameters ### port `number` STATE port for the counter. ### maxValue? `number` Optional maximum value (inclusive). ## Returns [`PrevStateWorkflow`](../interfaces/PrevStateWorkflow.md) --- ## Page: evaluateScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/evaluateScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / evaluateScript # Function: evaluateScript() > **evaluateScript**(`script`, `witness`, `txCtx`): [`EvalResult`](../interfaces/EvalResult.md) Evaluate a KISSVM script. Returns `EvalResult` for normal termination (RETURN, ASSERT failure, runtime errors). **Throws `KissvmLimitError`** if any safety limit (instructions, stack depth, shift size) is exceeded — callers must handle this case separately. ## Parameters ### script `string` ### witness [`ScriptWitness`](../interfaces/ScriptWitness.md) ### txCtx [`TxContext`](../interfaces/TxContext.md) ## Returns [`EvalResult`](../interfaces/EvalResult.md) --- ## Page: evaluateScriptWasm URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/evaluateScriptWasm [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / evaluateScriptWasm # Function: evaluateScriptWasm() > **evaluateScriptWasm**(`script`, `witness`, `txCtx`): `any` ## Parameters ### script `string` ### witness `any` ### txCtx `any` ## Returns `any` --- ## Page: findPolicyNode URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/findPolicyNode [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / findPolicyNode # Function: findPolicyNode() > **findPolicyNode**(`tree`, `id`): [`PolicyNode`](../interfaces/PolicyNode.md) \| `undefined` Find a policy node by ID in the tree. ## Parameters ### tree [`PolicyTree`](../interfaces/PolicyTree.md) ### id `string` ## Returns [`PolicyNode`](../interfaces/PolicyNode.md) \| `undefined` --- ## Page: getPolicyLeaves URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/getPolicyLeaves [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / getPolicyLeaves # Function: getPolicyLeaves() > **getPolicyLeaves**(`tree`): [`PolicyNode`](../interfaces/PolicyNode.md)[] Get all leaf nodes (nodes with no children). ## Parameters ### tree [`PolicyTree`](../interfaces/PolicyTree.md) ## Returns [`PolicyNode`](../interfaces/PolicyNode.md)[] --- ## Page: getPolicyPath URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/getPolicyPath [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / getPolicyPath # Function: getPolicyPath() > **getPolicyPath**(`tree`, `targetId`): [`PolicyNode`](../interfaces/PolicyNode.md)[] Get the path from root to a specific node. ## Parameters ### tree [`PolicyTree`](../interfaces/PolicyTree.md) ### targetId `string` ## Returns [`PolicyNode`](../interfaces/PolicyNode.md)[] --- ## Page: parseScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/parseScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / parseScript # Function: parseScript() > **parseScript**(`source`): [`ASTNode`](../type-aliases/ASTNode.md)[] ## Parameters ### source `string` ## Returns [`ASTNode`](../type-aliases/ASTNode.md)[] --- ## Page: parseScriptWasm URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/parseScriptWasm [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / parseScriptWasm # Function: parseScriptWasm() > **parseScriptWasm**(`source`): `any` ## Parameters ### source `string` ## Returns `any` --- ## Page: roundBasedWorkflow URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/roundBasedWorkflow [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / roundBasedWorkflow # Function: roundBasedWorkflow() > **roundBasedWorkflow**(`roundPort`, `pk1`, `pk2`): [`PrevStateWorkflow`](../interfaces/PrevStateWorkflow.md) Generate a KISSVM script for a round-based game or voting system. ## Parameters ### roundPort `number` STATE port for the current round number. ### pk1 `string` First participant's public key. ### pk2 `string` Second participant's public key. ## Returns [`PrevStateWorkflow`](../interfaces/PrevStateWorkflow.md) --- ## Page: sigdig URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/sigdig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / sigdig # Function: sigdig() > **sigdig**(`value`, `n`): `number` Public utility: round `value` to `n` significant digits. ## Parameters ### value `number` ### n `number` ## Returns `number` --- ## Page: simulateSpend URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/simulateSpend [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / simulateSpend # Function: simulateSpend() > **simulateSpend**(`scriptStr`, `coinData`, `txContext`, `witness?`): `Promise`\<[`EvalResult`](../interfaces/EvalResult.md)\> simulateSpend — simulate a KISSVM coin-spend. Populates the evaluator context from `coinData` (used as the input coin at inputIndex 0) unless the caller has already provided `txContext.inputs`. This ensures @ADDRESS, @AMOUNT, @TOKENID, ## Parameters ### scriptStr `string` ### coinData [`CoinData`](../interfaces/CoinData.md) ### txContext [`TxContext`](../interfaces/TxContext.md) ### witness? [`ScriptWitness`](../interfaces/ScriptWitness.md) ## Returns `Promise`\<[`EvalResult`](../interfaces/EvalResult.md)\> ## COINAGE and ## SCRIPT resolve correctly during evaluation. Always computes (or forwards) a `txDigest` so SIGNEDBY/CHECKSIG perform real WOTS signature verification. Never uses simulationMode — callers who need presence-only checks for script-logic unit tests must pass `simulationMode: true` in `txContext` directly to `evaluateScript`. Returns a Promise so callers can uniformly await it even though the evaluation itself is synchronous. --- ## Page: timelockWorkflow URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/timelockWorkflow [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / timelockWorkflow # Function: timelockWorkflow() > **timelockWorkflow**(`lockPort`, `ownerPk`): [`PrevStateWorkflow`](../interfaces/PrevStateWorkflow.md) Generate a KISSVM script for a time-locked withdrawal. ## Parameters ### lockPort `number` STATE port for the lock expiry block. ### ownerPk `string` Public key of the owner. ## Returns [`PrevStateWorkflow`](../interfaces/PrevStateWorkflow.md) --- ## Page: toMinimaProofExpression URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/toMinimaProofExpression [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / toMinimaProofExpression # Function: toMinimaProofExpression() > **toMinimaProofExpression**(`link`): `string` Generate a canonical Minima 5-argument PROOF expression. Canonical Minima syntax: PROOF(data, leafSum, rootHash, rootSum, proofHex) ## Parameters ### link [`ProofLink`](../interfaces/ProofLink.md) ## Returns `string` Minima expression: `PROOF(0x 0x 0x)` --- ## Page: toNestedMastScript URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/toNestedMastScript [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / toNestedMastScript # Function: toNestedMastScript() > **toNestedMastScript**(`chain`): `string` Generate the full nested MAST KISSVM script for a proof chain. Each level uses `MAST 0x` to auto-load the next script from the transaction witness. The VM looks up the witness ScriptProof whose calculated address equals the given root, parses it, and executes it in the same contract context. VM limits: 64 stack depth, 1,024 instructions shared across all frames. ## Parameters ### chain [`ProofChain`](../interfaces/ProofChain.md) ## Returns `string` KISSVM script with nested MAST expressions. --- ## Page: toProofExpression URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/toProofExpression [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / toProofExpression # ~~Function: toProofExpression()~~ > **toProofExpression**(`link`): `string` ## Parameters ### link [`ProofLink`](../interfaces/ProofLink.md) ## Returns `string` ## Deprecated Use toMinimaProofExpression(). Canonical Minima PROOF takes five arguments: data, leafSum, rootHash, rootSum, proofHex. --- ## Page: toTotemProofExpression URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/toTotemProofExpression [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / toTotemProofExpression # ~~Function: toTotemProofExpression()~~ > **toTotemProofExpression**(`link`): `string` ## Parameters ### link [`ProofLink`](../interfaces/ProofLink.md) ## Returns `string` ## Deprecated Use toMinimaProofExpression(). Canonical Minima PROOF takes five arguments: data, leafSum, rootHash, rootSum, proofHex. --- ## Page: verifyProofChain URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/verifyProofChain [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / verifyProofChain # Function: verifyProofChain() > **verifyProofChain**(`chain`, `expectedLeafScriptHash?`): [`VerificationResult`](../interfaces/VerificationResult.md) ## Parameters ### chain [`ProofChain`](../interfaces/ProofChain.md) ### expectedLeafScriptHash? `string` ## Returns [`VerificationResult`](../interfaces/VerificationResult.md) --- ## Page: verifyScriptMembership URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/verifyScriptMembership [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / verifyScriptMembership # Function: verifyScriptMembership() > **verifyScriptMembership**(`script`, `proofHex`, `expectedRoot`): `object` ## Parameters ### script `string` ### proofHex `string` ### expectedRoot `string` ## Returns `object` ### reason? > `optional` **reason?**: `string` ### valid > **valid**: `boolean` --- ## Page: vestingWorkflow URL: https://docs.totem.ing/api/totemsdk-kissvm/functions/vestingWorkflow [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / vestingWorkflow # Function: vestingWorkflow() > **vestingWorkflow**(`startPort`, `totalPort`, `claimedPort`, `beneficiaryPk`): [`PrevStateWorkflow`](../interfaces/PrevStateWorkflow.md) Generate a KISSVM script for a vesting schedule. ## Parameters ### startPort `number` STATE port for vesting start block. ### totalPort `number` STATE port for total vested amount. ### claimedPort `number` STATE port for previously claimed amount. ### beneficiaryPk `string` Public key of the beneficiary. ## Returns [`PrevStateWorkflow`](../interfaces/PrevStateWorkflow.md) --- ## Page: ActionAuthorizationConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/ActionAuthorizationConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / ActionAuthorizationConfig # Interface: ActionAuthorizationConfig ## Properties ### actionHash > **actionHash**: `string` *** ### actionPort > **actionPort**: `number` *** ### noncePort > **noncePort**: `number` *** ### windowEnd > **windowEnd**: `bigint` *** ### windowEndPort > **windowEndPort**: `number` --- ## Page: ActionStateMachineConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/ActionStateMachineConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / ActionStateMachineConfig # Interface: ActionStateMachineConfig ## Properties ### authorityPk > **authorityPk**: `string` *** ### durationPort > **durationPort**: `number` *** ### maxDurationBlocks > **maxDurationBlocks**: `bigint` *** ### minNoticeBlocks > **minNoticeBlocks**: `bigint` *** ### noticePort > **noticePort**: `number` --- ## Page: AgentProposalConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/AgentProposalConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / AgentProposalConfig # Interface: AgentProposalConfig ## Properties ### allowedTransitions > **allowedTransitions**: `Record`\<`string`, `string`[]\> *** ### expiresAt > **expiresAt**: `bigint` *** ### minConfidence > **minConfidence**: `number` --- ## Page: AuthorityRevocationConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/AuthorityRevocationConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / AuthorityRevocationConfig # Interface: AuthorityRevocationConfig ## Properties ### authorityPk > **authorityPk**: `string` *** ### epochPort > **epochPort**: `number` *** ### revocationEpoch > **revocationEpoch**: `bigint` --- ## Page: CapabilityConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/CapabilityConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / CapabilityConfig # Interface: CapabilityConfig ## Properties ### agentPk > **agentPk**: `string` *** ### expiresAt > **expiresAt**: `bigint` *** ### permissions > **permissions**: `string`[] --- ## Page: CoinData URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/CoinData [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / CoinData # Interface: CoinData A single input coin ## Properties ### address > **address**: `string` *** ### amount > **amount**: `number` *** ### coinCreatedBlock? > `optional` **coinCreatedBlock?**: `number` Block when this coin was created (for #### COINAGE = #### BLOCK − coinCreatedBlock) *** ### coinId > **coinId**: `string` *** ### scriptHash? > `optional` **scriptHash?**: `string` Hash of the coin's locking script (for @SCRIPT) *** ### tokenId > **tokenId**: `string` --- ## Page: CoinUpdateConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/CoinUpdateConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / CoinUpdateConfig # Interface: CoinUpdateConfig ## Properties ### authorityPk > **authorityPk**: `string` *** ### blockWindowPort > **blockWindowPort**: `number` *** ### coinId > **coinId**: `string` *** ### minConfirmations > **minConfirmations**: `bigint` *** ### statePort > **statePort**: `number` *** ### tokenId > **tokenId**: `string` --- ## Page: CommitConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/CommitConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / CommitConfig # Interface: CommitConfig ## Properties ### commitmentPort > **commitmentPort**: `number` *** ### committedHash > **committedHash**: `string` *** ### noncePort > **noncePort**: `number` --- ## Page: CompiledMast URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/CompiledMast [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / CompiledMast # Interface: CompiledMast ## Properties ### leafCount > **leafCount**: `number` *** ### rootAddress > **rootAddress**: `string` *** ### rootHex > **rootHex**: `string` *** ### scripts > **scripts**: [`MinimaScriptProof`](MinimaScriptProof.md)[] --- ## Page: CompiledPolicyNode URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/CompiledPolicyNode [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / CompiledPolicyNode # Interface: CompiledPolicyNode ## Properties ### logicalNodeId > **logicalNodeId**: `string` *** ### mast > **mast**: [`CompiledMast`](CompiledMast.md) --- ## Page: CompiledRecursivePolicy URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/CompiledRecursivePolicy [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / CompiledRecursivePolicy # Interface: CompiledRecursivePolicy ## Properties ### anchorAddress > **anchorAddress**: `string` *** ### anchorRoot > **anchorRoot**: `string` *** ### compiledNodes > **compiledNodes**: `Map`\<`string`, [`CompiledPolicyNode`](CompiledPolicyNode.md)\> *** ### graph > **graph**: [`PolicyGraph`](PolicyGraph.md) --- ## Page: DelegationProofConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/DelegationProofConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / DelegationProofConfig # Interface: DelegationProofConfig ## Properties ### delegatePk > **delegatePk**: `string` *** ### delegationRoot? > `optional` **delegationRoot?**: `string` *** ### delegatorPk > **delegatorPk**: `string` *** ### expiryBlock? > `optional` **expiryBlock?**: `bigint` --- ## Page: EltooConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/EltooConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / EltooConfig # Interface: EltooConfig ## Properties ### partyPks > **partyPks**: \[`string`, `string`\] *** ### reclaimTimelock? > `optional` **reclaimTimelock?**: `bigint` *** ### sequencePort? > `optional` **sequencePort?**: `number` *** ### settlementPort? > `optional` **settlementPort?**: `number` --- ## Page: EscrowEnforcementConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/EscrowEnforcementConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / EscrowEnforcementConfig # Interface: EscrowEnforcementConfig ## Properties ### amount > **amount**: `string` *** ### amountPort > **amountPort**: `number` *** ### conditionHash > **conditionHash**: `string` *** ### conditionPort > **conditionPort**: `number` --- ## Page: EvalResult URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/EvalResult [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / EvalResult # Interface: EvalResult EvalResult returned from evaluateScript / simulateSpend ## Properties ### error? > `optional` **error?**: `string` *** ### instructionsUsed > **instructionsUsed**: `number` *** ### passed > **passed**: `boolean` *** ### success > **success**: `boolean` Alias of `passed` for template callers. *** ### trace > **trace**: `string`[] --- ## Page: ExecutionMandateConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/ExecutionMandateConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / ExecutionMandateConfig # Interface: ExecutionMandateConfig ## Properties ### executionDelayBlocks > **executionDelayBlocks**: `bigint` *** ### governancePks > **governancePks**: `string`[] *** ### multisigThreshold > **multisigThreshold**: `number` *** ### outcomeProofPort > **outcomeProofPort**: `number` Port storing the outcome proof ID (commitment). *** ### snapshotPort > **snapshotPort**: `number` Port storing the membership snapshot hash for the proposal. *** ### tallyHashPort > **tallyHashPort**: `number` Port storing the vote tally hash that anchors the outcome. --- ## Page: FactoryConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/FactoryConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / FactoryConfig # Interface: FactoryConfig ## Properties ### participantPks > **participantPks**: `string`[] *** ### settlementCoinage? > `optional` **settlementCoinage?**: `bigint` *** ### settlementPort? > `optional` **settlementPort?**: `number` --- ## Page: IdentityVerificationConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/IdentityVerificationConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / IdentityVerificationConfig # Interface: IdentityVerificationConfig ## Properties ### claimHash > **claimHash**: `string` *** ### identityPk > **identityPk**: `string` *** ### policyRoot? > `optional` **policyRoot?**: `string` --- ## Page: LayeredPolicyConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/LayeredPolicyConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / LayeredPolicyConfig # Interface: LayeredPolicyConfig ## Properties ### assetId > **assetId**: `string` Asset root identifier (e.g. device serial, fleet ID, site ID). *** ### assetName > **assetName**: `string` Asset root name. *** ### layers > **layers**: [`PolicyLayer`](PolicyLayer.md)[] Ordered layers from root to action. *** ### maxDepth? > `optional` **maxDepth?**: `number` Optional: maximum allowed depth (default 7). --- ## Page: LeaseCertificateConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/LeaseCertificateConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / LeaseCertificateConfig # Interface: LeaseCertificateConfig ## Properties ### authorityPk > **authorityPk**: `string` *** ### branchId > **branchId**: `string` *** ### deviceId > **deviceId**: `string` *** ### expiresAt > **expiresAt**: `bigint` *** ### indices > **indices**: `string` *** ### issuedAt > **issuedAt**: `bigint` *** ### payloadHash > **payloadHash**: `string` *** ### purpose > **purpose**: `string` *** ### signature > **signature**: `string` *** ### statePort > **statePort**: `number` *** ### treeId > **treeId**: `string` *** ### watermarkPort > **watermarkPort**: `number` --- ## Page: LeaseMessageConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/LeaseMessageConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / LeaseMessageConfig # Interface: LeaseMessageConfig ## Properties ### authorityPk > **authorityPk**: `string` *** ### branchId? > `optional` **branchId?**: `string` *** ### commissionPort? > `optional` **commissionPort?**: `number` *** ### deviceId? > `optional` **deviceId?**: `string` *** ### leaseId > **leaseId**: `string` *** ### leaseStatePort? > `optional` **leaseStatePort?**: `number` *** ### maxTtlBlocks > **maxTtlBlocks**: `bigint` *** ### treeId > **treeId**: `string` --- ## Page: LiquidityLockConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/LiquidityLockConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / LiquidityLockConfig # Interface: LiquidityLockConfig ## Properties ### amount > **amount**: `string` *** ### amountPort? > `optional` **amountPort?**: `number` Port for the lock amount (default 0). *** ### governancePort? > `optional` **governancePort?**: `number` Port for the fee recipient address (default 3). *** ### providerPk > **providerPk**: `string` *** ### statusPort? > `optional` **statusPort?**: `number` Port for position status (default 2). *** ### tokenId > **tokenId**: `string` *** ### unlockBlock > **unlockBlock**: `bigint` Unlock block (pre-computed as cliffBlock + unlockAfterBlock). *** ### unlockPort? > `optional` **unlockPort?**: `number` Port for the unlock block (default 1). --- ## Page: MandateEnforcementConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/MandateEnforcementConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / MandateEnforcementConfig # Interface: MandateEnforcementConfig ## Properties ### expiresAtBlock > **expiresAtBlock**: `bigint` Expiry block for the mandate. *** ### expiryPort? > `optional` **expiryPort?**: `number` Port for expiresAt block (default 4). *** ### grantor > **grantor**: `string` *** ### noncePort? > `optional` **noncePort?**: `number` Nonce port for replay protection (default 5). *** ### revocationEpoch > **revocationEpoch**: `bigint` *** ### revocationEpochPort > **revocationEpochPort**: `number` *** ### scope > **scope**: `string` Scope as a hex string (e.g., 'totem:gov:vote' encoded to hex). *** ### scopePort > **scopePort**: `number` --- ## Page: ManifestBindingConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/ManifestBindingConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / ManifestBindingConfig # Interface: ManifestBindingConfig ## Properties ### manifestHash > **manifestHash**: `string` *** ### publisherPk > **publisherPk**: `string` --- ## Page: ManifestExpiryConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/ManifestExpiryConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / ManifestExpiryConfig # Interface: ManifestExpiryConfig ## Properties ### expiresAt > **expiresAt**: `bigint` *** ### signedAt > **signedAt**: `bigint` *** ### subscriptionInterval > **subscriptionInterval**: `bigint` --- ## Page: MinimaScriptProof URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/MinimaScriptProof [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / MinimaScriptProof # Interface: MinimaScriptProof ## Properties ### address > **address**: `string` *** ### proofHex > **proofHex**: `string` *** ### script > **script**: `string` --- ## Page: OutputData URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/OutputData [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / OutputData # Interface: OutputData A transaction output ## Properties ### address > **address**: `string` *** ### amount > **amount**: `number` *** ### keepState > **keepState**: `boolean` *** ### tokenId > **tokenId**: `string` --- ## Page: PaymentIntentConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/PaymentIntentConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / PaymentIntentConfig # Interface: PaymentIntentConfig ## Properties ### allowedRecipient > **allowedRecipient**: `string` *** ### expiresAt > **expiresAt**: `bigint` *** ### riskLimit > **riskLimit**: `string` *** ### tokenId? > `optional` **tokenId?**: `string` --- ## Page: PolicyAnchorConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/PolicyAnchorConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / PolicyAnchorConfig # Interface: PolicyAnchorConfig ## Properties ### emergencyRoot? > `optional` **emergencyRoot?**: `string` *** ### initialEpoch > **initialEpoch**: `number` *** ### institutionalRoot > **institutionalRoot**: `string` *** ### ports > **ports**: `object` #### actionRoot > **actionRoot**: `number` #### emergencyRoot > **emergencyRoot**: `number` #### epoch > **epoch**: `number` #### firmwareApprovalRoot > **firmwareApprovalRoot**: `number` #### manifestHash > **manifestHash**: `number` #### ownerRoot > **ownerRoot**: `number` #### recoveryRoot > **recoveryRoot**: `number` #### regulatorRoot > **regulatorRoot**: `number` #### serviceProviderRoot > **serviceProviderRoot**: `number` *** ### recoveryRoot? > `optional` **recoveryRoot?**: `string` *** ### subjectId > **subjectId**: `string` *** ### subjectType > **subjectType**: `"site"` \| `"vehicle"` \| `"machine"` \| `"device"` \| `"fleet"` \| `"building"` --- ## Page: PolicyDelegationEdge URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/PolicyDelegationEdge [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / PolicyDelegationEdge # Interface: PolicyDelegationEdge ## Properties ### constraints? > `optional` **constraints?**: `Record`\<`string`, `unknown`\> *** ### from > **from**: `string` *** ### to > **to**: `string` --- ## Page: PolicyEnforcementConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/PolicyEnforcementConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / PolicyEnforcementConfig # Interface: PolicyEnforcementConfig ## Properties ### authorityPk > **authorityPk**: `string` *** ### expiresAt > **expiresAt**: `bigint` *** ### policyRules > **policyRules**: `string`[] *** ### riskThreshold > **riskThreshold**: `string` --- ## Page: PolicyGraph URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/PolicyGraph [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / PolicyGraph # Interface: PolicyGraph ## Properties ### edges > **edges**: [`PolicyDelegationEdge`](PolicyDelegationEdge.md)[] *** ### nodes > **nodes**: [`PolicyGraphNode`](PolicyGraphNode.md)[] --- ## Page: PolicyGraphNode URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/PolicyGraphNode [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / PolicyGraphNode # Interface: PolicyGraphNode ## Properties ### id > **id**: `string` *** ### name > **name**: `string` *** ### parentId? > `optional` **parentId?**: `string` *** ### scripts > **scripts**: `string`[] --- ## Page: PolicyLayer URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/PolicyLayer [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / PolicyLayer # Interface: PolicyLayer ## Properties ### authorityPkd > **authorityPkd**: `string` The public key digest of the authority controlling this layer. *** ### constraints? > `optional` **constraints?**: `Record`\<`string`, `unknown`\> Optional: constraints specific to this layer. *** ### id > **id**: `string` Unique identifier for this layer. *** ### name > **name**: `string` Human-readable layer name. *** ### script > **script**: `string` The KISSVM script for this layer. --- ## Page: PolicyNode URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/PolicyNode [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / PolicyNode # Interface: PolicyNode ## Properties ### children > **children**: `PolicyNode`[] *** ### id > **id**: `string` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### name > **name**: `string` *** ### parentId? > `optional` **parentId?**: `string` *** ### policyRoot > **policyRoot**: `string` *** ### script > **script**: `string` *** ### scriptHash > **scriptHash**: `string` --- ## Page: PolicyNodeInput URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/PolicyNodeInput [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / PolicyNodeInput # Interface: PolicyNodeInput ## Properties ### id > **id**: `string` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### name > **name**: `string` *** ### parentId? > `optional` **parentId?**: `string` *** ### script > **script**: `string` --- ## Page: PolicyTree URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/PolicyTree [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / PolicyTree # Interface: PolicyTree ## Properties ### depth > **depth**: `number` *** ### nodeCount > **nodeCount**: `number` *** ### nodeMap > **nodeMap**: `Map`\<`string`, [`PolicyNode`](PolicyNode.md)\> *** ### root > **root**: [`PolicyNode`](PolicyNode.md) --- ## Page: PrevStateWorkflow URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/PrevStateWorkflow [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / PrevStateWorkflow # Interface: PrevStateWorkflow ## Properties ### id > **id**: `string` *** ### name > **name**: `string` *** ### script > **script**: `string` *** ### scriptHash > **scriptHash**: `string` *** ### transitions > **transitions**: [`StateTransition`](StateTransition.md)[] --- ## Page: ProofChain URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/ProofChain [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / ProofChain # Interface: ProofChain ## Properties ### depth > **depth**: `number` *** ### leafScriptHash > **leafScriptHash**: `string` *** ### links > **links**: [`ProofLink`](ProofLink.md)[] *** ### verified > **verified**: `boolean` --- ## Page: ProofConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/ProofConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / ProofConfig # Interface: ProofConfig ## Properties ### anchorBlock > **anchorBlock**: `bigint` *** ### authorityPk > **authorityPk**: `string` *** ### confirmedAtPort > **confirmedAtPort**: `number` *** ### expiresAt > **expiresAt**: `bigint` *** ### proofKind > **proofKind**: `"capability"` \| `"revocation"` \| `"delegation"` --- ## Page: ProofLink URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/ProofLink [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / ProofLink # Interface: ProofLink ## Properties ### label? > `optional` **label?**: `string` *** ### leafSum? > `optional` **leafSum?**: [`MiniNumber`](../classes/MiniNumber.md) *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### policyRoot > **policyRoot**: `string` *** ### proof > **proof**: `string` *** ### rootSum? > `optional` **rootSum?**: [`MiniNumber`](../classes/MiniNumber.md) *** ### script > **script**: `string` *** ### scriptHash > **scriptHash**: `string` --- ## Page: ProposalConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/ProposalConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / ProposalConfig # Interface: ProposalConfig ## Properties ### executionDelayBlocks > **executionDelayBlocks**: `bigint` Execution delay in blocks (applied after votingEndsAt). *** ### governancePks > **governancePks**: `string`[] *** ### multisigThreshold > **multisigThreshold**: `number` Number of governance keys required to sign execution (passed→executed). *** ### proposerPort? > `optional` **proposerPort?**: `number` Port storing the proposer's public key (default 4). *** ### snapshotPort? > `optional` **snapshotPort?**: `number` Port storing the membership snapshot hash (default 5). --- ## Page: ProviderBondConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/ProviderBondConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / ProviderBondConfig # Interface: ProviderBondConfig ## Properties ### amount > **amount**: `string` *** ### bondPort > **bondPort**: `number` *** ### challengeDeadlineBlock > **challengeDeadlineBlock**: `bigint` *** ### claimedPort > **claimedPort**: `number` *** ### cliffBlock > **cliffBlock**: `bigint` *** ### expiresAtBlock > **expiresAtBlock**: `bigint` *** ### expiryPort > **expiryPort**: `number` *** ### governancePk > **governancePk**: `string` *** ### heartbeatPort > **heartbeatPort**: `number` *** ### maxHeartbeatBlocks > **maxHeartbeatBlocks**: `bigint` *** ### probeSignerPk? > `optional` **probeSignerPk?**: `string` Public key of the probe signer. *** ### probeSignerPort? > `optional` **probeSignerPort?**: `number` Port holding the probe signer public key (default 6). *** ### providerPk > **providerPk**: `string` *** ### releaseRequestPort > **releaseRequestPort**: `number` *** ### slaPort > **slaPort**: `number` *** ### statusPort? > `optional` **statusPort?**: `number` Port holding the current bond status (default 5). *** ### tokenId > **tokenId**: `string` *** ### unbondingDurationBlocks > **unbondingDurationBlocks**: `bigint` --- ## Page: RevealConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/RevealConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / RevealConfig # Interface: RevealConfig ## Properties ### commitmentPort > **commitmentPort**: `number` *** ### preimagePort > **preimagePort**: `number` --- ## Page: RevocationConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/RevocationConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / RevocationConfig # Interface: RevocationConfig ## Properties ### authorityPk > **authorityPk**: `string` *** ### revocationEpoch > **revocationEpoch**: `number` --- ## Page: RotationConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/RotationConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / RotationConfig # Interface: RotationConfig ## Properties ### newPk > **newPk**: `string` *** ### oldPk > **oldPk**: `string` *** ### rotationDelayBlocks > **rotationDelayBlocks**: `bigint` --- ## Page: ScriptProof URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/ScriptProof [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / ScriptProof # Interface: ScriptProof A canonical Minima ScriptProof: script + MMR proof + computed root address ## Properties ### address > **address**: `string` *** ### proofHex > **proofHex**: `string` *** ### script > **script**: `string` --- ## Page: ScriptWitness URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/ScriptWitness [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / ScriptWitness # Interface: ScriptWitness Witness supplied for signature and MAST verification ## Properties ### preimages? > `optional` **preimages?**: `Map`\<`string`, `string`\> HTLC: hash hex → preimage hex *** ### scriptProofs? > `optional` **scriptProofs?**: [`ScriptProof`](ScriptProof.md)[] Canonical ScriptProofs for MAST branch revelation. The evaluator verifies each proof against the MAST root before executing. *** ### signatures > **signatures**: `Map`\<`string`, `Uint8Array`\<`ArrayBufferLike`\>\> pubkey-hex (lowercase, no 0x) → flat 1088-byte WOTS signature --- ## Page: StateChainConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/StateChainConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / StateChainConfig # Interface: StateChainConfig ## Properties ### ownerPort? > `optional` **ownerPort?**: `number` *** ### reclaimTimelock > **reclaimTimelock**: `bigint` *** ### sePk > **sePk**: `string` --- ## Page: StateTransition URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/StateTransition [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / StateTransition # Interface: StateTransition ## Properties ### currentValue > **currentValue**: `string` *** ### name > **name**: `string` *** ### port > **port**: `number` *** ### previousValue > **previousValue**: `string` *** ### transition > **transition**: `string` *** ### valid > **valid**: `boolean` --- ## Page: TemporalConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/TemporalConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / TemporalConfig # Interface: TemporalConfig ## Properties ### beneficiary? > `optional` **beneficiary?**: `string` *** ### beneficiaryPort? > `optional` **beneficiaryPort?**: `number` *** ### cliffBlock? > `optional` **cliffBlock?**: `bigint` *** ### cliffPort? > `optional` **cliffPort?**: `number` *** ### curve > **curve**: [`ReleaseCurve`](../type-aliases/ReleaseCurve.md) *** ### deadlineBlock? > `optional` **deadlineBlock?**: `bigint` *** ### decayConstant? > `optional` **decayConstant?**: `bigint` *** ### endPort? > `optional` **endPort?**: `number` *** ### governancePort? > `optional` **governancePort?**: `number` *** ### maxPerPeriod? > `optional` **maxPerPeriod?**: `bigint` *** ### periodBlocks? > `optional` **periodBlocks?**: `bigint` *** ### startPort > **startPort**: `number` *** ### tokenId? > `optional` **tokenId?**: `string` *** ### totalPort? > `optional` **totalPort?**: `number` *** ### windowEndBlock? > `optional` **windowEndBlock?**: `bigint` *** ### windowStartBlock? > `optional` **windowStartBlock?**: `bigint` --- ## Page: TreasuryExecutionConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/TreasuryExecutionConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / TreasuryExecutionConfig # Interface: TreasuryExecutionConfig ## Properties ### amount > **amount**: `string` *** ### governancePks > **governancePks**: `string`[] *** ### multisigThreshold > **multisigThreshold**: `number` *** ### recipientPk > **recipientPk**: `string` *** ### tokenId > **tokenId**: `string` *** ### treasuryPk > **treasuryPk**: `string` --- ## Page: TrustMessageConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/TrustMessageConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / TrustMessageConfig # Interface: TrustMessageConfig ## Properties ### authorityPk > **authorityPk**: `string` *** ### expiryWindow > **expiryWindow**: `bigint` *** ### maxRating > **maxRating**: `number` *** ### minReviewerStake? > `optional` **minReviewerStake?**: `bigint` *** ### subjectId > **subjectId**: `string` *** ### subjectType > **subjectType**: `string` *** ### trustId > **trustId**: `string` --- ## Page: TxContext URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/TxContext [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / TxContext # Interface: TxContext Context supplied to the evaluator describing the spend transaction ## Properties ### block > **block**: `number` Current block height *** ### blockMilli? > `optional` **blockMilli?**: `number` Current block timestamp in milliseconds *** ### inputIndex > **inputIndex**: `number` Index of the input coin being evaluated *** ### inputs > **inputs**: [`CoinData`](CoinData.md)[] All input coins *** ### mastBranches? > `optional` **mastBranches?**: `Map`\<`string`, `string`\> MAST branch resolution: maps hashHex (lowercase, 0x-prefixed) → scriptText. The spender reveals the branch they are executing here. Key = `'0x' + sha3_256(UPPER(trim(scriptText)))` *** ### outputs > **outputs**: [`OutputData`](OutputData.md)[] All output coins *** ### prevCoins? > `optional` **prevCoins?**: [`CoinData`](CoinData.md)[] Previous input coins for SAMECOINS check. If not provided SAMECOINS returns true (simulation default). *** ### prevState > **prevState**: `Record`\<`number`, `string`\> Previous state from the spent coin *** ### simulationMode? > `optional` **simulationMode?**: `boolean` When true, SIGNEDBY/CHECKSIG accept signature *presence* without verifying against a txDigest. Use ONLY for unit-testing script logic. Never set in production or in simulateSpend — those paths always compute a real txDigest and run full WOTS verification. *** ### state > **state**: `Record`\<`number`, `string`\> Current state (port → encoded string value) *** ### txDigest? > `optional` **txDigest?**: `Uint8Array`\<`ArrayBufferLike`\> 32-byte transaction digest for signature verification --- ## Page: TxPoWValidationConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/TxPoWValidationConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / TxPoWValidationConfig # Interface: TxPoWValidationConfig ## Properties ### magicPort > **magicPort**: `number` *** ### maxKISSVMOps > **maxKISSVMOps**: `bigint` *** ### maxTxPoWSize > **maxTxPoWSize**: `bigint` *** ### minTxPoWWork > **minTxPoWWork**: `bigint` *** ### opsPort > **opsPort**: `number` *** ### workPort > **workPort**: `number` --- ## Page: UsageTrackingConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/UsageTrackingConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / UsageTrackingConfig # Interface: UsageTrackingConfig ## Properties ### amountPort > **amountPort**: `number` *** ### countPort > **countPort**: `number` *** ### maxAmount > **maxAmount**: `string` *** ### maxCount > **maxCount**: `bigint` *** ### noncePort? > `optional` **noncePort?**: `number` Port for a nonce to prevent replay (default 10). *** ### windowBlocks > **windowBlocks**: `bigint` *** ### windowEndPort > **windowEndPort**: `number` --- ## Page: VerificationResult URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/VerificationResult [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / VerificationResult # Interface: VerificationResult ## Properties ### chain? > `optional` **chain?**: [`ProofChain`](ProofChain.md) *** ### failedAt? > `optional` **failedAt?**: `number` *** ### reason? > `optional` **reason?**: `string` *** ### valid > **valid**: `boolean` --- ## Page: VoteSubmissionConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/VoteSubmissionConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / VoteSubmissionConfig # Interface: VoteSubmissionConfig ## Properties ### governancePk > **governancePk**: `string` *** ### noncePort > **noncePort**: `number` Port storing the per-voter nonce to prevent double voting. *** ### snapshotPort > **snapshotPort**: `number` Port storing the frozen membership snapshot hash. *** ### votingEndBlock > **votingEndBlock**: `bigint` Voting window end block (baked in as constant). *** ### votingStartBlock > **votingStartBlock**: `bigint` Voting window start block (baked in as constant). *** ### weightPort > **weightPort**: `number` Port storing the voter's attested membership weight. --- ## Page: VoteTallyConfig URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/VoteTallyConfig [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / VoteTallyConfig # Interface: VoteTallyConfig ## Properties ### abstainPort? > `optional` **abstainPort?**: `number` *** ### governancePk > **governancePk**: `string` *** ### minVoteBlocks > **minVoteBlocks**: `bigint` *** ### noPort? > `optional` **noPort?**: `number` *** ### quorumPct > **quorumPct**: `number` *** ### totalPort? > `optional` **totalPort?**: `number` *** ### votingEndPort? > `optional` **votingEndPort?**: `number` *** ### votingStartPort? > `optional` **votingStartPort?**: `number` Ports for the voting window (must NOT overlap with yes/no/abstain/total ports). *** ### yesPort? > `optional` **yesPort?**: `number` Ports for yes/no/abstain/total vote counts (default 0-3). --- ## Page: WitnessInput URL: https://docs.totem.ing/api/totemsdk-kissvm/interfaces/WitnessInput [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / WitnessInput # Interface: WitnessInput ## Properties ### pubkeyHex > **pubkeyHex**: `string` Public key digest hex (32 bytes, with or without 0x prefix) *** ### signature > **signature**: `Uint8Array` 1088-byte flat WOTS signature --- ## Page: ASTNode URL: https://docs.totem.ing/api/totemsdk-kissvm/type-aliases/ASTNode [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / ASTNode # Type Alias: ASTNode > **ASTNode** = `ReturnNode` \| `AssertNode` \| `LetNode` \| `StoreStateNode` \| `StoreTupleNode` \| `IfNode` \| `WhileNode` \| `ForNode` \| `ForeachNode` \| `SwitchNode` \| `FuncDefNode` \| `CallStmtNode` \| `ExecNode` \| `ExecMastNode` \| `MastStmtNode` \| `MastBlockNode` \| `LiteralNode` \| `BuiltinVarNode` \| `IdentNode` \| `BinaryNode` \| `UnaryNode` \| `CallExprNode` \| `StateNode` \| `PrevStateNode` \| `SamestateNode` \| `SamecoinsNode` \| `CoindataNode` \| `SignedbyNode` \| `MultisigNode` \| `ChecksigNode` \| `HashNode` \| `VerifyoutNode` \| `GetoutNode` \| `SigdigNode` \| `MastExprNode` \| `ProofNode` --- ## Page: ReleaseCurve URL: https://docs.totem.ing/api/totemsdk-kissvm/type-aliases/ReleaseCurve [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / ReleaseCurve # Type Alias: ReleaseCurve > **ReleaseCurve** = `"linear"` \| `"cliff"` \| `"deadline"` \| `"window"` \| `"rate-limit"` \| `"decay"` --- ## Page: Value URL: https://docs.totem.ing/api/totemsdk-kissvm/type-aliases/Value [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / Value # Type Alias: Value > **Value** = [`MiniNumber`](../classes/MiniNumber.md) \| `string` \| `boolean` \| `Uint8Array` KISSVM v1 public value type. MiniNumber — numeric values (matches Java MiniNumber / BigDecimal) string — hex literals (0x…), text strings [...] boolean — TRUE / FALSE Uint8Array — raw byte arrays (hash digests, raw data) NOTE: `number` (IEEE-754 float) is intentionally excluded from the public type to prevent callers from relying on non-deterministic float arithmetic. --- ## Page: BOND_STATUS URL: https://docs.totem.ing/api/totemsdk-kissvm/variables/BOND_STATUS [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / BOND\_STATUS # Variable: BOND\_STATUS > `const` **BOND\_STATUS**: `object` ## Type Declaration ### ACTIVE > `readonly` **ACTIVE**: `2` = `2` ### DECLARED > `readonly` **DECLARED**: `0` = `0` ### DISPUTED > `readonly` **DISPUTED**: `5` = `5` ### EXPIRED > `readonly` **EXPIRED**: `4` = `4` ### EXPIRING > `readonly` **EXPIRING**: `3` = `3` ### INVALID > `readonly` **INVALID**: `6` = `6` ### PENDING > `readonly` **PENDING**: `1` = `1` --- ## Page: IA_STATUS URL: https://docs.totem.ing/api/totemsdk-kissvm/variables/IA_STATUS [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / IA\_STATUS # Variable: IA\_STATUS > `const` **IA\_STATUS**: `object` ## Type Declaration ### ACTIVE > `readonly` **ACTIVE**: `2` = `2` ### ESCALATED > `readonly` **ESCALATED**: `4` = `4` ### EXPIRED > `readonly` **EXPIRED**: `5` = `5` ### NOTICED > `readonly` **NOTICED**: `1` = `1` ### PROPOSED > `readonly` **PROPOSED**: `0` = `0` ### RESOLVED > `readonly` **RESOLVED**: `3` = `3` --- ## Page: MAX_DECIMAL URL: https://docs.totem.ing/api/totemsdk-kissvm/variables/MAX_DECIMAL [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / MAX\_DECIMAL # Variable: MAX\_DECIMAL > `const` **MAX\_DECIMAL**: `1000000n` = `1000000n` --- ## Page: POSITION_STATUS URL: https://docs.totem.ing/api/totemsdk-kissvm/variables/POSITION_STATUS [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / POSITION\_STATUS # Variable: POSITION\_STATUS > `const` **POSITION\_STATUS**: `object` ## Type Declaration ### ACTIVE > `readonly` **ACTIVE**: `2` = `2` ### COMMITTED > `readonly` **COMMITTED**: `1` = `1` ### DEPLETED > `readonly` **DEPLETED**: `5` = `5` ### DISPUTED > `readonly` **DISPUTED**: `6` = `6` ### DRAFT > `readonly` **DRAFT**: `0` = `0` ### EXPIRED > `readonly` **EXPIRED**: `8` = `8` ### INVALID > `readonly` **INVALID**: `7` = `7` ### QUIESCING > `readonly` **QUIESCING**: `3` = `3` ### WITHDRAWN > `readonly` **WITHDRAWN**: `4` = `4` --- ## Page: STANDARD_LAYERS URL: https://docs.totem.ing/api/totemsdk-kissvm/variables/STANDARD_LAYERS [**@totemsdk/kissvm**](../index.md) *** [@totemsdk/kissvm](../index.md) / STANDARD\_LAYERS # Variable: STANDARD\_LAYERS > `const` **STANDARD\_LAYERS**: `object` Standard layer IDs for the canonical 7-layer chain. ## Type Declaration ### ASSET > `readonly` **ASSET**: `"asset"` = `'asset'` ### MANUFACTURER > `readonly` **MANUFACTURER**: `"manufacturer"` = `'manufacturer'` ### OPERATOR > `readonly` **OPERATOR**: `"operator"` = `'operator'` ### OWNER > `readonly` **OWNER**: `"owner"` = `'owner'` ### PRODUCT > `readonly` **PRODUCT**: `"product"` = `'product'` ### REGULATORY > `readonly` **REGULATORY**: `"regulatory"` = `'regulatory'` ### SITE > `readonly` **SITE**: `"site"` = `'site'` --- ## Page: LiquidityAllocationError URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/classes/LiquidityAllocationError [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / LiquidityAllocationError # Class: LiquidityAllocationError ## Extends - [`LiquidityBondError`](LiquidityBondError.md) ## Constructors ### Constructor > **new LiquidityAllocationError**(`message`, `code?`, `details?`): `LiquidityAllocationError` #### Parameters ##### message `string` ##### code? `string` ##### details? `unknown` #### Returns `LiquidityAllocationError` #### Overrides [`LiquidityBondError`](LiquidityBondError.md).[`constructor`](LiquidityBondError.md#constructor) ## Properties ### code? > `optional` **code?**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`code`](LiquidityBondError.md#code) *** ### details? > `optional` **details?**: `unknown` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`details`](LiquidityBondError.md#details) *** ### message > **message**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`message`](LiquidityBondError.md#message) *** ### name > **name**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`name`](LiquidityBondError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`stack`](LiquidityBondError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`LiquidityBondError`](LiquidityBondError.md).[`stackTraceLimit`](LiquidityBondError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`LiquidityBondError`](LiquidityBondError.md).[`captureStackTrace`](LiquidityBondError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`prepareStackTrace`](LiquidityBondError.md#preparestacktrace) --- ## Page: LiquidityBondError URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/classes/LiquidityBondError [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / LiquidityBondError # Class: LiquidityBondError ## Extends - `Error` ## Extended by - [`LiquidityPoolManifestError`](LiquidityPoolManifestError.md) - [`LiquidityIdentityError`](LiquidityIdentityError.md) - [`LiquidityCommitmentError`](LiquidityCommitmentError.md) - [`LiquidityPositionError`](LiquidityPositionError.md) - [`LiquidityReceiptError`](LiquidityReceiptError.md) - [`LiquidityAllocationError`](LiquidityAllocationError.md) - [`LiquidityFeeError`](LiquidityFeeError.md) - [`LiquidityWithdrawalError`](LiquidityWithdrawalError.md) - [`LiquidityRiskError`](LiquidityRiskError.md) - [`LiquidityPolicyError`](LiquidityPolicyError.md) - [`LiquidityRegistryError`](LiquidityRegistryError.md) - [`LiquiditySerializationError`](LiquiditySerializationError.md) ## Constructors ### Constructor > **new LiquidityBondError**(`message`, `code?`, `details?`): `LiquidityBondError` #### Parameters ##### message `string` ##### code? `string` ##### details? `unknown` #### Returns `LiquidityBondError` #### Overrides `Error.constructor` ## Properties ### code? > `optional` **code?**: `string` *** ### details? > `optional` **details?**: `unknown` *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: LiquidityCommitmentError URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/classes/LiquidityCommitmentError [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / LiquidityCommitmentError # Class: LiquidityCommitmentError ## Extends - [`LiquidityBondError`](LiquidityBondError.md) ## Constructors ### Constructor > **new LiquidityCommitmentError**(`message`, `code?`, `details?`): `LiquidityCommitmentError` #### Parameters ##### message `string` ##### code? `string` ##### details? `unknown` #### Returns `LiquidityCommitmentError` #### Overrides [`LiquidityBondError`](LiquidityBondError.md).[`constructor`](LiquidityBondError.md#constructor) ## Properties ### code? > `optional` **code?**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`code`](LiquidityBondError.md#code) *** ### details? > `optional` **details?**: `unknown` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`details`](LiquidityBondError.md#details) *** ### message > **message**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`message`](LiquidityBondError.md#message) *** ### name > **name**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`name`](LiquidityBondError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`stack`](LiquidityBondError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`LiquidityBondError`](LiquidityBondError.md).[`stackTraceLimit`](LiquidityBondError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`LiquidityBondError`](LiquidityBondError.md).[`captureStackTrace`](LiquidityBondError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`prepareStackTrace`](LiquidityBondError.md#preparestacktrace) --- ## Page: LiquidityFeeError URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/classes/LiquidityFeeError [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / LiquidityFeeError # Class: LiquidityFeeError ## Extends - [`LiquidityBondError`](LiquidityBondError.md) ## Constructors ### Constructor > **new LiquidityFeeError**(`message`, `code?`, `details?`): `LiquidityFeeError` #### Parameters ##### message `string` ##### code? `string` ##### details? `unknown` #### Returns `LiquidityFeeError` #### Overrides [`LiquidityBondError`](LiquidityBondError.md).[`constructor`](LiquidityBondError.md#constructor) ## Properties ### code? > `optional` **code?**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`code`](LiquidityBondError.md#code) *** ### details? > `optional` **details?**: `unknown` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`details`](LiquidityBondError.md#details) *** ### message > **message**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`message`](LiquidityBondError.md#message) *** ### name > **name**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`name`](LiquidityBondError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`stack`](LiquidityBondError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`LiquidityBondError`](LiquidityBondError.md).[`stackTraceLimit`](LiquidityBondError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`LiquidityBondError`](LiquidityBondError.md).[`captureStackTrace`](LiquidityBondError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`prepareStackTrace`](LiquidityBondError.md#preparestacktrace) --- ## Page: LiquidityIdentityError URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/classes/LiquidityIdentityError [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / LiquidityIdentityError # Class: LiquidityIdentityError ## Extends - [`LiquidityBondError`](LiquidityBondError.md) ## Constructors ### Constructor > **new LiquidityIdentityError**(`message`, `code?`, `details?`): `LiquidityIdentityError` #### Parameters ##### message `string` ##### code? `string` ##### details? `unknown` #### Returns `LiquidityIdentityError` #### Overrides [`LiquidityBondError`](LiquidityBondError.md).[`constructor`](LiquidityBondError.md#constructor) ## Properties ### code? > `optional` **code?**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`code`](LiquidityBondError.md#code) *** ### details? > `optional` **details?**: `unknown` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`details`](LiquidityBondError.md#details) *** ### message > **message**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`message`](LiquidityBondError.md#message) *** ### name > **name**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`name`](LiquidityBondError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`stack`](LiquidityBondError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`LiquidityBondError`](LiquidityBondError.md).[`stackTraceLimit`](LiquidityBondError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`LiquidityBondError`](LiquidityBondError.md).[`captureStackTrace`](LiquidityBondError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`prepareStackTrace`](LiquidityBondError.md#preparestacktrace) --- ## Page: LiquidityPolicyError URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/classes/LiquidityPolicyError [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / LiquidityPolicyError # Class: LiquidityPolicyError ## Extends - [`LiquidityBondError`](LiquidityBondError.md) ## Constructors ### Constructor > **new LiquidityPolicyError**(`message`, `code?`, `details?`): `LiquidityPolicyError` #### Parameters ##### message `string` ##### code? `string` ##### details? `unknown` #### Returns `LiquidityPolicyError` #### Overrides [`LiquidityBondError`](LiquidityBondError.md).[`constructor`](LiquidityBondError.md#constructor) ## Properties ### code? > `optional` **code?**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`code`](LiquidityBondError.md#code) *** ### details? > `optional` **details?**: `unknown` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`details`](LiquidityBondError.md#details) *** ### message > **message**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`message`](LiquidityBondError.md#message) *** ### name > **name**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`name`](LiquidityBondError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`stack`](LiquidityBondError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`LiquidityBondError`](LiquidityBondError.md).[`stackTraceLimit`](LiquidityBondError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`LiquidityBondError`](LiquidityBondError.md).[`captureStackTrace`](LiquidityBondError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`prepareStackTrace`](LiquidityBondError.md#preparestacktrace) --- ## Page: LiquidityPoolManifestError URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/classes/LiquidityPoolManifestError [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / LiquidityPoolManifestError # Class: LiquidityPoolManifestError ## Extends - [`LiquidityBondError`](LiquidityBondError.md) ## Constructors ### Constructor > **new LiquidityPoolManifestError**(`message`, `code?`, `details?`): `LiquidityPoolManifestError` #### Parameters ##### message `string` ##### code? `string` ##### details? `unknown` #### Returns `LiquidityPoolManifestError` #### Overrides [`LiquidityBondError`](LiquidityBondError.md).[`constructor`](LiquidityBondError.md#constructor) ## Properties ### code? > `optional` **code?**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`code`](LiquidityBondError.md#code) *** ### details? > `optional` **details?**: `unknown` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`details`](LiquidityBondError.md#details) *** ### message > **message**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`message`](LiquidityBondError.md#message) *** ### name > **name**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`name`](LiquidityBondError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`stack`](LiquidityBondError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`LiquidityBondError`](LiquidityBondError.md).[`stackTraceLimit`](LiquidityBondError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`LiquidityBondError`](LiquidityBondError.md).[`captureStackTrace`](LiquidityBondError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`prepareStackTrace`](LiquidityBondError.md#preparestacktrace) --- ## Page: LiquidityPositionError URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/classes/LiquidityPositionError [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / LiquidityPositionError # Class: LiquidityPositionError ## Extends - [`LiquidityBondError`](LiquidityBondError.md) ## Constructors ### Constructor > **new LiquidityPositionError**(`message`, `code?`, `details?`): `LiquidityPositionError` #### Parameters ##### message `string` ##### code? `string` ##### details? `unknown` #### Returns `LiquidityPositionError` #### Overrides [`LiquidityBondError`](LiquidityBondError.md).[`constructor`](LiquidityBondError.md#constructor) ## Properties ### code? > `optional` **code?**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`code`](LiquidityBondError.md#code) *** ### details? > `optional` **details?**: `unknown` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`details`](LiquidityBondError.md#details) *** ### message > **message**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`message`](LiquidityBondError.md#message) *** ### name > **name**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`name`](LiquidityBondError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`stack`](LiquidityBondError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`LiquidityBondError`](LiquidityBondError.md).[`stackTraceLimit`](LiquidityBondError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`LiquidityBondError`](LiquidityBondError.md).[`captureStackTrace`](LiquidityBondError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`prepareStackTrace`](LiquidityBondError.md#preparestacktrace) --- ## Page: LiquidityReceiptError URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/classes/LiquidityReceiptError [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / LiquidityReceiptError # Class: LiquidityReceiptError ## Extends - [`LiquidityBondError`](LiquidityBondError.md) ## Constructors ### Constructor > **new LiquidityReceiptError**(`message`, `code?`, `details?`): `LiquidityReceiptError` #### Parameters ##### message `string` ##### code? `string` ##### details? `unknown` #### Returns `LiquidityReceiptError` #### Overrides [`LiquidityBondError`](LiquidityBondError.md).[`constructor`](LiquidityBondError.md#constructor) ## Properties ### code? > `optional` **code?**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`code`](LiquidityBondError.md#code) *** ### details? > `optional` **details?**: `unknown` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`details`](LiquidityBondError.md#details) *** ### message > **message**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`message`](LiquidityBondError.md#message) *** ### name > **name**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`name`](LiquidityBondError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`stack`](LiquidityBondError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`LiquidityBondError`](LiquidityBondError.md).[`stackTraceLimit`](LiquidityBondError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`LiquidityBondError`](LiquidityBondError.md).[`captureStackTrace`](LiquidityBondError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`prepareStackTrace`](LiquidityBondError.md#preparestacktrace) --- ## Page: LiquidityRegistryError URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/classes/LiquidityRegistryError [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / LiquidityRegistryError # Class: LiquidityRegistryError ## Extends - [`LiquidityBondError`](LiquidityBondError.md) ## Constructors ### Constructor > **new LiquidityRegistryError**(`message`, `code?`, `details?`): `LiquidityRegistryError` #### Parameters ##### message `string` ##### code? `string` ##### details? `unknown` #### Returns `LiquidityRegistryError` #### Overrides [`LiquidityBondError`](LiquidityBondError.md).[`constructor`](LiquidityBondError.md#constructor) ## Properties ### code? > `optional` **code?**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`code`](LiquidityBondError.md#code) *** ### details? > `optional` **details?**: `unknown` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`details`](LiquidityBondError.md#details) *** ### message > **message**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`message`](LiquidityBondError.md#message) *** ### name > **name**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`name`](LiquidityBondError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`stack`](LiquidityBondError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`LiquidityBondError`](LiquidityBondError.md).[`stackTraceLimit`](LiquidityBondError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`LiquidityBondError`](LiquidityBondError.md).[`captureStackTrace`](LiquidityBondError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`prepareStackTrace`](LiquidityBondError.md#preparestacktrace) --- ## Page: LiquidityRiskError URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/classes/LiquidityRiskError [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / LiquidityRiskError # Class: LiquidityRiskError ## Extends - [`LiquidityBondError`](LiquidityBondError.md) ## Constructors ### Constructor > **new LiquidityRiskError**(`message`, `code?`, `details?`): `LiquidityRiskError` #### Parameters ##### message `string` ##### code? `string` ##### details? `unknown` #### Returns `LiquidityRiskError` #### Overrides [`LiquidityBondError`](LiquidityBondError.md).[`constructor`](LiquidityBondError.md#constructor) ## Properties ### code? > `optional` **code?**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`code`](LiquidityBondError.md#code) *** ### details? > `optional` **details?**: `unknown` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`details`](LiquidityBondError.md#details) *** ### message > **message**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`message`](LiquidityBondError.md#message) *** ### name > **name**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`name`](LiquidityBondError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`stack`](LiquidityBondError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`LiquidityBondError`](LiquidityBondError.md).[`stackTraceLimit`](LiquidityBondError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`LiquidityBondError`](LiquidityBondError.md).[`captureStackTrace`](LiquidityBondError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`prepareStackTrace`](LiquidityBondError.md#preparestacktrace) --- ## Page: LiquiditySerializationError URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/classes/LiquiditySerializationError [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / LiquiditySerializationError # Class: LiquiditySerializationError ## Extends - [`LiquidityBondError`](LiquidityBondError.md) ## Constructors ### Constructor > **new LiquiditySerializationError**(`message`, `code?`, `details?`): `LiquiditySerializationError` #### Parameters ##### message `string` ##### code? `string` ##### details? `unknown` #### Returns `LiquiditySerializationError` #### Overrides [`LiquidityBondError`](LiquidityBondError.md).[`constructor`](LiquidityBondError.md#constructor) ## Properties ### code? > `optional` **code?**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`code`](LiquidityBondError.md#code) *** ### details? > `optional` **details?**: `unknown` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`details`](LiquidityBondError.md#details) *** ### message > **message**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`message`](LiquidityBondError.md#message) *** ### name > **name**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`name`](LiquidityBondError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`stack`](LiquidityBondError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`LiquidityBondError`](LiquidityBondError.md).[`stackTraceLimit`](LiquidityBondError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`LiquidityBondError`](LiquidityBondError.md).[`captureStackTrace`](LiquidityBondError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`prepareStackTrace`](LiquidityBondError.md#preparestacktrace) --- ## Page: LiquidityWithdrawalError URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/classes/LiquidityWithdrawalError [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / LiquidityWithdrawalError # Class: LiquidityWithdrawalError ## Extends - [`LiquidityBondError`](LiquidityBondError.md) ## Constructors ### Constructor > **new LiquidityWithdrawalError**(`message`, `code?`, `details?`): `LiquidityWithdrawalError` #### Parameters ##### message `string` ##### code? `string` ##### details? `unknown` #### Returns `LiquidityWithdrawalError` #### Overrides [`LiquidityBondError`](LiquidityBondError.md).[`constructor`](LiquidityBondError.md#constructor) ## Properties ### code? > `optional` **code?**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`code`](LiquidityBondError.md#code) *** ### details? > `optional` **details?**: `unknown` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`details`](LiquidityBondError.md#details) *** ### message > **message**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`message`](LiquidityBondError.md#message) *** ### name > **name**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`name`](LiquidityBondError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`stack`](LiquidityBondError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`LiquidityBondError`](LiquidityBondError.md).[`stackTraceLimit`](LiquidityBondError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`LiquidityBondError`](LiquidityBondError.md).[`captureStackTrace`](LiquidityBondError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`LiquidityBondError`](LiquidityBondError.md).[`prepareStackTrace`](LiquidityBondError.md#preparestacktrace) --- ## Page: MemoryLiquidityBondStore URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/classes/MemoryLiquidityBondStore [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / MemoryLiquidityBondStore # Class: MemoryLiquidityBondStore ## Constructors ### Constructor > **new MemoryLiquidityBondStore**(): `MemoryLiquidityBondStore` #### Returns `MemoryLiquidityBondStore` ## Methods ### attachAllocation() > **attachAllocation**(`allocation`): `Promise`\<`void`\> #### Parameters ##### allocation [`LiquidityAllocation`](../interfaces/LiquidityAllocation.md) #### Returns `Promise`\<`void`\> *** ### attachFeeRecord() > **attachFeeRecord**(`record`): `Promise`\<`void`\> #### Parameters ##### record [`LiquidityFeeRecord`](../interfaces/LiquidityFeeRecord.md) #### Returns `Promise`\<`void`\> *** ### attachReceipt() > **attachReceipt**(`receipt`): `Promise`\<`void`\> #### Parameters ##### receipt [`LiquidityReceipt`](../interfaces/LiquidityReceipt.md) #### Returns `Promise`\<`void`\> *** ### attachWithdrawalIntent() > **attachWithdrawalIntent**(`intent`): `Promise`\<`void`\> #### Parameters ##### intent [`WithdrawalIntent`](../interfaces/WithdrawalIntent.md) #### Returns `Promise`\<`void`\> *** ### getPool() > **getPool**(`poolId`): `Promise`\<[`LiquidityPoolManifest`](../interfaces/LiquidityPoolManifest.md) \| `undefined`\> #### Parameters ##### poolId `string` #### Returns `Promise`\<[`LiquidityPoolManifest`](../interfaces/LiquidityPoolManifest.md) \| `undefined`\> *** ### getPosition() > **getPosition**(`positionId`): `Promise`\<[`LiquidityPosition`](../interfaces/LiquidityPosition.md) \| `undefined`\> #### Parameters ##### positionId `string` #### Returns `Promise`\<[`LiquidityPosition`](../interfaces/LiquidityPosition.md) \| `undefined`\> *** ### getReceipt() > **getReceipt**(`receiptId`): `Promise`\<[`LiquidityReceipt`](../interfaces/LiquidityReceipt.md) \| `undefined`\> #### Parameters ##### receiptId `string` #### Returns `Promise`\<[`LiquidityReceipt`](../interfaces/LiquidityReceipt.md) \| `undefined`\> *** ### getSnapshot() > **getSnapshot**(): `Promise`\<[`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md)\> #### Returns `Promise`\<[`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md)\> *** ### listActivePositions() > **listActivePositions**(): `Promise`\<[`LiquidityPosition`](../interfaces/LiquidityPosition.md)[]\> #### Returns `Promise`\<[`LiquidityPosition`](../interfaces/LiquidityPosition.md)[]\> *** ### listPools() > **listPools**(): `Promise`\<[`LiquidityPoolManifest`](../interfaces/LiquidityPoolManifest.md)[]\> #### Returns `Promise`\<[`LiquidityPoolManifest`](../interfaces/LiquidityPoolManifest.md)[]\> *** ### listPositionsByLp() > **listPositionsByLp**(`lpAddress`): `Promise`\<[`LiquidityPosition`](../interfaces/LiquidityPosition.md)[]\> #### Parameters ##### lpAddress `string` #### Returns `Promise`\<[`LiquidityPosition`](../interfaces/LiquidityPosition.md)[]\> *** ### listPositionsByPool() > **listPositionsByPool**(`poolId`): `Promise`\<[`LiquidityPosition`](../interfaces/LiquidityPosition.md)[]\> #### Parameters ##### poolId `string` #### Returns `Promise`\<[`LiquidityPosition`](../interfaces/LiquidityPosition.md)[]\> *** ### listWithdrawablePositions() > **listWithdrawablePositions**(`now`): `Promise`\<[`LiquidityPosition`](../interfaces/LiquidityPosition.md)[]\> #### Parameters ##### now `number` #### Returns `Promise`\<[`LiquidityPosition`](../interfaces/LiquidityPosition.md)[]\> *** ### registerCommitment() > **registerCommitment**(`commitment`): `Promise`\<`void`\> #### Parameters ##### commitment [`LiquidityCommitment`](../interfaces/LiquidityCommitment.md) #### Returns `Promise`\<`void`\> *** ### registerPool() > **registerPool**(`pool`): `Promise`\<`void`\> #### Parameters ##### pool [`LiquidityPoolManifest`](../interfaces/LiquidityPoolManifest.md) #### Returns `Promise`\<`void`\> *** ### registerPosition() > **registerPosition**(`position`): `Promise`\<`void`\> #### Parameters ##### position [`LiquidityPosition`](../interfaces/LiquidityPosition.md) #### Returns `Promise`\<`void`\> *** ### updatePool() > **updatePool**(`pool`): `Promise`\<`void`\> #### Parameters ##### pool [`LiquidityPoolManifest`](../interfaces/LiquidityPoolManifest.md) #### Returns `Promise`\<`void`\> --- ## Page: acceptLiquidityCommitment URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/acceptLiquidityCommitment [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / acceptLiquidityCommitment # Function: acceptLiquidityCommitment() > **acceptLiquidityCommitment**(`commitment`, `opts?`): `Promise`\<[`LiquidityCommitment`](../interfaces/LiquidityCommitment.md)\> Accept a commitment. Only a commitment whose funding is chain-confirmed is acceptable — a draft/signed commitment has only self-declared funding. When `chainProvider` and a confirmed funding are passed in, the on-chain gate is re-checked here; otherwise acceptance refuses the phantom-deposit path. ## Parameters ### commitment [`LiquidityCommitment`](../interfaces/LiquidityCommitment.md) ### opts? #### chainProvider? [`LiquidityChainFundingVerifier`](../interfaces/LiquidityChainFundingVerifier.md) #### now? `number` ## Returns `Promise`\<[`LiquidityCommitment`](../interfaces/LiquidityCommitment.md)\> --- ## Page: activateLiquidityPosition URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/activateLiquidityPosition [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / activateLiquidityPosition # Function: activateLiquidityPosition() > **activateLiquidityPosition**(`position`, `now?`): [`LiquidityPosition`](../interfaces/LiquidityPosition.md) Activate a position only after its funding is chain-confirmed. A position whose proof is merely declared/signed must not reach active liquidity — that is the phantom-deposit seam. ## Parameters ### position [`LiquidityPosition`](../interfaces/LiquidityPosition.md) ### now? `number` ## Returns [`LiquidityPosition`](../interfaces/LiquidityPosition.md) --- ## Page: applyLiquidityHaircut URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/applyLiquidityHaircut [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / applyLiquidityHaircut # Function: applyLiquidityHaircut() > **applyLiquidityHaircut**(`amount`, `haircutBps?`): `bigint` ## Parameters ### amount `bigint` ### haircutBps? `number` ## Returns `bigint` --- ## Page: applyRegistryTransition URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/applyRegistryTransition [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / applyRegistryTransition # Function: applyRegistryTransition() > **applyRegistryTransition**(`state`, `next`, `transition`, `verifier`, `opts?`): `Promise`\<[`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md)\> Apply a signed transition to a registry (#6/#34): a mutation is only applied when its signature verifies, its `previousRoot` extends the registry's current anchor root, and its `sequence` strictly advances the registry's sequence (anti-reorg — a `previousRoot` resubmission after a rollback is rejected). When `writers` is provided, every pool the transition touches must be signed by that pool's authorized writer. Returns a new state with `root` and `sequence` advanced. Without this gate anyone could fabricate a `LiquidityBondRegistryState`. ## Parameters ### state [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) ### next [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) ### transition [`RegistrySignedTransition`](../interfaces/RegistrySignedTransition.md) ### verifier [`RegistryRootVerifier`](../interfaces/RegistryRootVerifier.md) ### opts? [`RegistryRootOptions`](../interfaces/RegistryRootOptions.md) & `object` ## Returns `Promise`\<[`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md)\> --- ## Page: approveWithdrawalIntent URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/approveWithdrawalIntent [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / approveWithdrawalIntent # Function: approveWithdrawalIntent() > **approveWithdrawalIntent**(`intent`, `now?`): [`WithdrawalIntent`](../interfaces/WithdrawalIntent.md) ## Parameters ### intent [`WithdrawalIntent`](../interfaces/WithdrawalIntent.md) ### now? `number` ## Returns [`WithdrawalIntent`](../interfaces/WithdrawalIntent.md) --- ## Page: assertLiquidityPoolManifestNotExpired URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/assertLiquidityPoolManifestNotExpired [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / assertLiquidityPoolManifestNotExpired # Function: assertLiquidityPoolManifestNotExpired() > **assertLiquidityPoolManifestNotExpired**(`manifest`, `now?`): `void` ## Parameters ### manifest [`LiquidityPoolManifest`](../interfaces/LiquidityPoolManifest.md) ### now? `number` ## Returns `void` --- ## Page: assetToTokenId URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/assetToTokenId [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / assetToTokenId # Function: assetToTokenId() > **assetToTokenId**(`asset`): `string` Map a pool asset to the on-chain token id a funding check should match. ## Parameters ### asset `string` ## Returns `string` --- ## Page: attachLiquidityAllocation URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/attachLiquidityAllocation [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / attachLiquidityAllocation # Function: attachLiquidityAllocation() > **attachLiquidityAllocation**(`state`, `allocation`): [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) ## Parameters ### state [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) ### allocation [`LiquidityAllocation`](../interfaces/LiquidityAllocation.md) ## Returns [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) --- ## Page: attachLiquidityFeeRecord URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/attachLiquidityFeeRecord [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / attachLiquidityFeeRecord # Function: attachLiquidityFeeRecord() > **attachLiquidityFeeRecord**(`state`, `record`): [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) ## Parameters ### state [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) ### record [`LiquidityFeeRecord`](../interfaces/LiquidityFeeRecord.md) ## Returns [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) --- ## Page: attachLiquidityReceipt URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/attachLiquidityReceipt [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / attachLiquidityReceipt # Function: attachLiquidityReceipt() > **attachLiquidityReceipt**(`state`, `receipt`): [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) ## Parameters ### state [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) ### receipt [`LiquidityReceipt`](../interfaces/LiquidityReceipt.md) ## Returns [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) --- ## Page: attachWithdrawalIntent URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/attachWithdrawalIntent [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / attachWithdrawalIntent # Function: attachWithdrawalIntent() > **attachWithdrawalIntent**(`state`, `intent`): [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) ## Parameters ### state [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) ### intent [`WithdrawalIntent`](../interfaces/WithdrawalIntent.md) ## Returns [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) --- ## Page: buildOperatorAutobond URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/buildOperatorAutobond [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / buildOperatorAutobond # Function: buildOperatorAutobond() > **buildOperatorAutobond**(`manifest`, `signer`, `now?`): `Promise`\<[`OperatorAutobond`](../interfaces/OperatorAutobond.md)\> ## Parameters ### manifest [`LiquidityPoolManifest`](../interfaces/LiquidityPoolManifest.md) ### signer `OperatorAutobondSigner` ### now? `number` ## Returns `Promise`\<[`OperatorAutobond`](../interfaces/OperatorAutobond.md)\> --- ## Page: cancelLiquidityCommitment URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/cancelLiquidityCommitment [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / cancelLiquidityCommitment # Function: cancelLiquidityCommitment() > **cancelLiquidityCommitment**(`commitment`, `now?`): [`LiquidityCommitment`](../interfaces/LiquidityCommitment.md) ## Parameters ### commitment [`LiquidityCommitment`](../interfaces/LiquidityCommitment.md) ### now? `number` ## Returns [`LiquidityCommitment`](../interfaces/LiquidityCommitment.md) --- ## Page: cancelWithdrawalIntent URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/cancelWithdrawalIntent [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / cancelWithdrawalIntent # Function: cancelWithdrawalIntent() > **cancelWithdrawalIntent**(`intent`, `now?`): [`WithdrawalIntent`](../interfaces/WithdrawalIntent.md) ## Parameters ### intent [`WithdrawalIntent`](../interfaces/WithdrawalIntent.md) ### now? `number` ## Returns [`WithdrawalIntent`](../interfaces/WithdrawalIntent.md) --- ## Page: computeAvailableLiquidity URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/computeAvailableLiquidity [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / computeAvailableLiquidity # Function: computeAvailableLiquidity() > **computeAvailableLiquidity**(`position`): `bigint` ## Parameters ### position [`LiquidityPosition`](../interfaces/LiquidityPosition.md) ## Returns `bigint` --- ## Page: computeEffectiveLiquidityAmount URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/computeEffectiveLiquidityAmount [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / computeEffectiveLiquidityAmount # Function: computeEffectiveLiquidityAmount() > **computeEffectiveLiquidityAmount**(`position`, `riskPolicy?`): `bigint` ## Parameters ### position [`LiquidityPosition`](../interfaces/LiquidityPosition.md) ### riskPolicy? [`LiquidityRiskPolicy`](../interfaces/LiquidityRiskPolicy.md) ## Returns `bigint` --- ## Page: computeIdentityChallenge URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/computeIdentityChallenge [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / computeIdentityChallenge # Function: computeIdentityChallenge() > **computeIdentityChallenge**(`entityId`, `address`): `string` Domain-separated challenge for an identity claim (#33): scoped to the entity (poolId / positionId / receiptId) so a signature on one record cannot replay against another. ## Parameters ### entityId `string` ### address `string` ## Returns `string` --- ## Page: computeLiquidityPoolManifestHash URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/computeLiquidityPoolManifestHash [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / computeLiquidityPoolManifestHash # Function: computeLiquidityPoolManifestHash() > **computeLiquidityPoolManifestHash**(`manifest`): `string` ## Parameters ### manifest [`LiquidityPoolManifest`](../interfaces/LiquidityPoolManifest.md) ## Returns `string` --- ## Page: computeLiquidityReceiptHash URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/computeLiquidityReceiptHash [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / computeLiquidityReceiptHash # Function: computeLiquidityReceiptHash() > **computeLiquidityReceiptHash**(`receipt`): `string` Domain-separated receipt hash (#33): scoped to the receipt domain so a hash computed over one record cannot replay against another. ## Parameters ### receipt [`LiquidityReceipt`](../interfaces/LiquidityReceipt.md) ## Returns `string` --- ## Page: computeOperatorAutobondPayloadHash URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/computeOperatorAutobondPayloadHash [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / computeOperatorAutobondPayloadHash # Function: computeOperatorAutobondPayloadHash() > **computeOperatorAutobondPayloadHash**(`manifest`): `string` The payload the pool operator signs: a canonical, domain-separated commitment to the load-bearing pool parameters. Signing binds the operator to these parameters — an operator cannot later silently change the capacity, fees, or lock terms of a pool they autobonded. ## Parameters ### manifest [`LiquidityPoolManifest`](../interfaces/LiquidityPoolManifest.md) ## Returns `string` --- ## Page: computePoolUtilisation URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/computePoolUtilisation [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / computePoolUtilisation # Function: computePoolUtilisation() > **computePoolUtilisation**(`params`): `number` ## Parameters ### params [`ComputePoolUtilisationParams`](../interfaces/ComputePoolUtilisationParams.md) ## Returns `number` --- ## Page: computePositionRiskScore URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/computePositionRiskScore [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / computePositionRiskScore # Function: computePositionRiskScore() > **computePositionRiskScore**(`params`): `number` ## Parameters ### params [`ComputePositionRiskScoreParams`](../interfaces/ComputePositionRiskScoreParams.md) ## Returns `number` --- ## Page: computeRegistryRoot URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/computeRegistryRoot [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / computeRegistryRoot # Function: computeRegistryRoot() > **computeRegistryRoot**(`registry`, `opts?`): `string` SHA3-256 commitment over the canonical registry serialization, domain-scoped. ## Parameters ### registry [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) ### opts? [`RegistryRootOptions`](../interfaces/RegistryRootOptions.md) ## Returns `string` --- ## Page: computeWithdrawalId URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/computeWithdrawalId [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / computeWithdrawalId # Function: computeWithdrawalId() > **computeWithdrawalId**(`positionId`, `nonce`): `string` Non-replayable withdrawal ID (#9): a domain hash over positionId + nonce, so `wdrw-${Date.now()}-${counter}`-style forgeability in the same millisecond is gone — the same position+nonce always yields the same ID, and a replayed intent is detectable. ## Parameters ### positionId `string` ### nonce `string` ## Returns `string` --- ## Page: confirmLiquidityCommitment URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/confirmLiquidityCommitment [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / confirmLiquidityCommitment # Function: confirmLiquidityCommitment() > **confirmLiquidityCommitment**(`commitment`, `chainProvider`, `now?`): `Promise`\<[`LiquidityCommitment`](../interfaces/LiquidityCommitment.md)\> Confirm a commitment's funding on-chain and mark it chain-confirmed. Returns REQUIRES_LIVE_VERIFIER when no funding/verifier is present so the caller can refuse to proceed rather than trusting a declared string. ## Parameters ### commitment [`LiquidityCommitment`](../interfaces/LiquidityCommitment.md) ### chainProvider [`LiquidityChainFundingVerifier`](../interfaces/LiquidityChainFundingVerifier.md) ### now? `number` ## Returns `Promise`\<[`LiquidityCommitment`](../interfaces/LiquidityCommitment.md)\> --- ## Page: consumeLiquidityReceipt URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/consumeLiquidityReceipt [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / consumeLiquidityReceipt # Function: consumeLiquidityReceipt() > **consumeLiquidityReceipt**(`receipt`, `intentId`, `now?`): [`LiquidityReceipt`](../interfaces/LiquidityReceipt.md) Consume a receipt for a withdrawal — single-spend (#8). A consumed receipt can never be replayed against another withdrawal. ## Parameters ### receipt [`LiquidityReceipt`](../interfaces/LiquidityReceipt.md) ### intentId `string` ### now? `number` ## Returns [`LiquidityReceipt`](../interfaces/LiquidityReceipt.md) --- ## Page: createDurableLiquidityBondStore URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/createDurableLiquidityBondStore [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / createDurableLiquidityBondStore # Function: createDurableLiquidityBondStore() > **createDurableLiquidityBondStore**(`adapter`, `options?`): [`DurableLiquidityBondStore`](../interfaces/DurableLiquidityBondStore.md) ## Parameters ### adapter `StorageAdapterWithCapabilities` & `CasStore` ### options? [`DurableLiquidityBondStoreOptions`](../interfaces/DurableLiquidityBondStoreOptions.md) = `{}` ## Returns [`DurableLiquidityBondStore`](../interfaces/DurableLiquidityBondStore.md) --- ## Page: createEmptyLiquidityBondRegistryState URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/createEmptyLiquidityBondRegistryState [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / createEmptyLiquidityBondRegistryState # Function: createEmptyLiquidityBondRegistryState() > **createEmptyLiquidityBondRegistryState**(): [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) ## Returns [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) --- ## Page: createLiquidityAllocation URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/createLiquidityAllocation [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / createLiquidityAllocation # Function: createLiquidityAllocation() > **createLiquidityAllocation**(`params`): [`LiquidityAllocation`](../interfaces/LiquidityAllocation.md) ## Parameters ### params [`CreateLiquidityAllocationParams`](../interfaces/CreateLiquidityAllocationParams.md) ## Returns [`LiquidityAllocation`](../interfaces/LiquidityAllocation.md) --- ## Page: createLiquidityCommitment URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/createLiquidityCommitment [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / createLiquidityCommitment # Function: createLiquidityCommitment() > **createLiquidityCommitment**(`params`): [`LiquidityCommitment`](../interfaces/LiquidityCommitment.md) ## Parameters ### params [`CreateLiquidityCommitmentParams`](../interfaces/CreateLiquidityCommitmentParams.md) ## Returns [`LiquidityCommitment`](../interfaces/LiquidityCommitment.md) --- ## Page: createLiquidityPoolManifest URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/createLiquidityPoolManifest [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / createLiquidityPoolManifest # Function: createLiquidityPoolManifest() > **createLiquidityPoolManifest**(`params`): [`LiquidityPoolManifest`](../interfaces/LiquidityPoolManifest.md) ## Parameters ### params [`CreateLiquidityPoolManifestParams`](../interfaces/CreateLiquidityPoolManifestParams.md) ## Returns [`LiquidityPoolManifest`](../interfaces/LiquidityPoolManifest.md) --- ## Page: createLiquidityPosition URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/createLiquidityPosition [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / createLiquidityPosition # Function: createLiquidityPosition() > **createLiquidityPosition**(`params`): [`LiquidityPosition`](../interfaces/LiquidityPosition.md) ## Parameters ### params [`CreateLiquidityPositionParams`](../interfaces/CreateLiquidityPositionParams.md) ## Returns [`LiquidityPosition`](../interfaces/LiquidityPosition.md) --- ## Page: createWithdrawalIntent URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/createWithdrawalIntent [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / createWithdrawalIntent # Function: createWithdrawalIntent() > **createWithdrawalIntent**(`params`): [`WithdrawalIntent`](../interfaces/WithdrawalIntent.md) ## Parameters ### params [`CreateWithdrawalIntentParams`](../interfaces/CreateWithdrawalIntentParams.md) ## Returns [`WithdrawalIntent`](../interfaces/WithdrawalIntent.md) --- ## Page: detectDoubleCountedLiquidity URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/detectDoubleCountedLiquidity [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / detectDoubleCountedLiquidity # Function: detectDoubleCountedLiquidity() > **detectDoubleCountedLiquidity**(`positions`): [`LiquidityBondVerifyResult`](../interfaces/LiquidityBondVerifyResult.md) ## Parameters ### positions [`LiquidityPosition`](../interfaces/LiquidityPosition.md)[] ## Returns [`LiquidityBondVerifyResult`](../interfaces/LiquidityBondVerifyResult.md) --- ## Page: explainLiquidityPolicyFailure URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/explainLiquidityPolicyFailure [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / explainLiquidityPolicyFailure # Function: explainLiquidityPolicyFailure() > **explainLiquidityPolicyFailure**(`result`): `string`[] ## Parameters ### result [`LiquidityBondVerifyResult`](../interfaces/LiquidityBondVerifyResult.md) ## Returns `string`[] --- ## Page: filterLiquidityPositionsByPolicy URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/filterLiquidityPositionsByPolicy [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / filterLiquidityPositionsByPolicy # Function: filterLiquidityPositionsByPolicy() > **filterLiquidityPositionsByPolicy**(`state`, `policy`): [`LiquidityPosition`](../interfaces/LiquidityPosition.md)[] ## Parameters ### state [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) ### policy [`LiquidityBondPolicy`](../interfaces/LiquidityBondPolicy.md) ## Returns [`LiquidityPosition`](../interfaces/LiquidityPosition.md)[] --- ## Page: getLiquidityPool URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/getLiquidityPool [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / getLiquidityPool # Function: getLiquidityPool() > **getLiquidityPool**(`state`, `poolId`): [`LiquidityPoolManifest`](../interfaces/LiquidityPoolManifest.md) \| `undefined` ## Parameters ### state [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) ### poolId `string` ## Returns [`LiquidityPoolManifest`](../interfaces/LiquidityPoolManifest.md) \| `undefined` --- ## Page: getLiquidityPosition URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/getLiquidityPosition [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / getLiquidityPosition # Function: getLiquidityPosition() > **getLiquidityPosition**(`state`, `positionId`): [`LiquidityPosition`](../interfaces/LiquidityPosition.md) \| `undefined` ## Parameters ### state [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) ### positionId `string` ## Returns [`LiquidityPosition`](../interfaces/LiquidityPosition.md) \| `undefined` --- ## Page: getLiquidityReceipt URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/getLiquidityReceipt [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / getLiquidityReceipt # Function: getLiquidityReceipt() > **getLiquidityReceipt**(`state`, `receiptId`): [`LiquidityReceipt`](../interfaces/LiquidityReceipt.md) \| `undefined` ## Parameters ### state [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) ### receiptId `string` ## Returns [`LiquidityReceipt`](../interfaces/LiquidityReceipt.md) \| `undefined` --- ## Page: issueLiquidityReceipt URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/issueLiquidityReceipt [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / issueLiquidityReceipt # Function: issueLiquidityReceipt() > **issueLiquidityReceipt**(`params`): [`LiquidityReceipt`](../interfaces/LiquidityReceipt.md) ## Parameters ### params [`IssueLiquidityReceiptParams`](../interfaces/IssueLiquidityReceiptParams.md) ## Returns [`LiquidityReceipt`](../interfaces/LiquidityReceipt.md) --- ## Page: listActivePositions URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/listActivePositions [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / listActivePositions # Function: listActivePositions() > **listActivePositions**(`state`): [`LiquidityPosition`](../interfaces/LiquidityPosition.md)[] ## Parameters ### state [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) ## Returns [`LiquidityPosition`](../interfaces/LiquidityPosition.md)[] --- ## Page: listLiquidityPools URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/listLiquidityPools [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / listLiquidityPools # Function: listLiquidityPools() > **listLiquidityPools**(`state`): [`LiquidityPoolManifest`](../interfaces/LiquidityPoolManifest.md)[] ## Parameters ### state [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) ## Returns [`LiquidityPoolManifest`](../interfaces/LiquidityPoolManifest.md)[] --- ## Page: listPositionsByLp URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/listPositionsByLp [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / listPositionsByLp # Function: listPositionsByLp() > **listPositionsByLp**(`state`, `lpAddress`): [`LiquidityPosition`](../interfaces/LiquidityPosition.md)[] ## Parameters ### state [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) ### lpAddress `string` ## Returns [`LiquidityPosition`](../interfaces/LiquidityPosition.md)[] --- ## Page: listPositionsByPool URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/listPositionsByPool [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / listPositionsByPool # Function: listPositionsByPool() > **listPositionsByPool**(`state`, `poolId`): [`LiquidityPosition`](../interfaces/LiquidityPosition.md)[] ## Parameters ### state [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) ### poolId `string` ## Returns [`LiquidityPosition`](../interfaces/LiquidityPosition.md)[] --- ## Page: listWithdrawablePositions URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/listWithdrawablePositions [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / listWithdrawablePositions # Function: listWithdrawablePositions() > **listWithdrawablePositions**(`state`, `now`): [`LiquidityPosition`](../interfaces/LiquidityPosition.md)[] Withdrawable means the holder can pull real funded liquidity. A position whose funding is not chain-confirmed must never appear — a phantom position must not be withdrawable. ## Parameters ### state [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) ### now `number` ## Returns [`LiquidityPosition`](../interfaces/LiquidityPosition.md)[] --- ## Page: markAllocationDepleted URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/markAllocationDepleted [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / markAllocationDepleted # Function: markAllocationDepleted() > **markAllocationDepleted**(`allocation`, `now?`): [`LiquidityAllocation`](../interfaces/LiquidityAllocation.md) ## Parameters ### allocation [`LiquidityAllocation`](../interfaces/LiquidityAllocation.md) ### now? `number` ## Returns [`LiquidityAllocation`](../interfaces/LiquidityAllocation.md) --- ## Page: markLiquidityPositionDepleted URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/markLiquidityPositionDepleted [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / markLiquidityPositionDepleted # Function: markLiquidityPositionDepleted() > **markLiquidityPositionDepleted**(`position`, `now?`): [`LiquidityPosition`](../interfaces/LiquidityPosition.md) ## Parameters ### position [`LiquidityPosition`](../interfaces/LiquidityPosition.md) ### now? `number` ## Returns [`LiquidityPosition`](../interfaces/LiquidityPosition.md) --- ## Page: markLiquidityPositionInvalid URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/markLiquidityPositionInvalid [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / markLiquidityPositionInvalid # Function: markLiquidityPositionInvalid() > **markLiquidityPositionInvalid**(`position`, `reason`, `now?`): [`LiquidityPosition`](../interfaces/LiquidityPosition.md) ## Parameters ### position [`LiquidityPosition`](../interfaces/LiquidityPosition.md) ### reason `string` ### now? `number` ## Returns [`LiquidityPosition`](../interfaces/LiquidityPosition.md) --- ## Page: markLiquidityPositionQuiescing URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/markLiquidityPositionQuiescing [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / markLiquidityPositionQuiescing # Function: markLiquidityPositionQuiescing() > **markLiquidityPositionQuiescing**(`position`, `now?`): [`LiquidityPosition`](../interfaces/LiquidityPosition.md) ## Parameters ### position [`LiquidityPosition`](../interfaces/LiquidityPosition.md) ### now? `number` ## Returns [`LiquidityPosition`](../interfaces/LiquidityPosition.md) --- ## Page: parseLiquidityBondRecord URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/parseLiquidityBondRecord [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / parseLiquidityBondRecord # Function: parseLiquidityBondRecord() > **parseLiquidityBondRecord**\<`T`\>(`json`): `T` ## Type Parameters ### T `T` = `unknown` ## Parameters ### json `string` ## Returns `T` --- ## Page: parseLiquidityBondState URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/parseLiquidityBondState [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / parseLiquidityBondState # Function: parseLiquidityBondState() > **parseLiquidityBondState**\<`T`\>(`json`): `T` ## Type Parameters ### T `T` = `unknown` ## Parameters ### json `string` ## Returns `T` --- ## Page: rankLiquidityPositionsByRisk URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/rankLiquidityPositionsByRisk [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / rankLiquidityPositionsByRisk # Function: rankLiquidityPositionsByRisk() > **rankLiquidityPositionsByRisk**(`positions`): [`LiquidityPosition`](../interfaces/LiquidityPosition.md)[] ## Parameters ### positions [`LiquidityPosition`](../interfaces/LiquidityPosition.md)[] ## Returns [`LiquidityPosition`](../interfaces/LiquidityPosition.md)[] --- ## Page: recordLiquidityFee URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/recordLiquidityFee [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / recordLiquidityFee # Function: recordLiquidityFee() > **recordLiquidityFee**(`params`): [`LiquidityFeeRecord`](../interfaces/LiquidityFeeRecord.md) ## Parameters ### params [`RecordLiquidityFeeParams`](../interfaces/RecordLiquidityFeeParams.md) ## Returns [`LiquidityFeeRecord`](../interfaces/LiquidityFeeRecord.md) --- ## Page: registerLiquidityCommitment URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/registerLiquidityCommitment [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / registerLiquidityCommitment # Function: registerLiquidityCommitment() > **registerLiquidityCommitment**(`state`, `commitment`): [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) ## Parameters ### state [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) ### commitment [`LiquidityCommitment`](../interfaces/LiquidityCommitment.md) ## Returns [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) --- ## Page: registerLiquidityPool URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/registerLiquidityPool [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / registerLiquidityPool # Function: registerLiquidityPool() > **registerLiquidityPool**(`state`, `pool`): [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) ## Parameters ### state [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) ### pool [`LiquidityPoolManifest`](../interfaces/LiquidityPoolManifest.md) ## Returns [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) --- ## Page: registerLiquidityPosition URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/registerLiquidityPosition [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / registerLiquidityPosition # Function: registerLiquidityPosition() > **registerLiquidityPosition**(`state`, `position`): [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) ## Parameters ### state [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) ### position [`LiquidityPosition`](../interfaces/LiquidityPosition.md) ## Returns [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) --- ## Page: registerPoolWriter URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/registerPoolWriter [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / registerPoolWriter # Function: registerPoolWriter() > **registerPoolWriter**(`writers`, `poolId`, `signerPublicKeyDigest`): [`PoolWriterRegistry`](../type-aliases/PoolWriterRegistry.md) ## Parameters ### writers [`PoolWriterRegistry`](../type-aliases/PoolWriterRegistry.md) ### poolId `string` ### signerPublicKeyDigest `string` ## Returns [`PoolWriterRegistry`](../type-aliases/PoolWriterRegistry.md) --- ## Page: registryRootPayload URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/registryRootPayload [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / registryRootPayload # Function: registryRootPayload() > **registryRootPayload**(`root`, `opts?`): `Uint8Array` The exact bytes a signer signs to authorize a root: SHA3-256(domain|root|root). ## Parameters ### root `string` ### opts? [`RegistryRootOptions`](../interfaces/RegistryRootOptions.md) ## Returns `Uint8Array` --- ## Page: rejectLiquidityCommitment URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/rejectLiquidityCommitment [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / rejectLiquidityCommitment # Function: rejectLiquidityCommitment() > **rejectLiquidityCommitment**(`commitment`, `reason`, `now?`): [`LiquidityCommitment`](../interfaces/LiquidityCommitment.md) ## Parameters ### commitment [`LiquidityCommitment`](../interfaces/LiquidityCommitment.md) ### reason `string` ### now? `number` ## Returns [`LiquidityCommitment`](../interfaces/LiquidityCommitment.md) --- ## Page: rejectWithdrawalIntent URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/rejectWithdrawalIntent [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / rejectWithdrawalIntent # Function: rejectWithdrawalIntent() > **rejectWithdrawalIntent**(`intent`, `reason`, `now?`): [`WithdrawalIntent`](../interfaces/WithdrawalIntent.md) ## Parameters ### intent [`WithdrawalIntent`](../interfaces/WithdrawalIntent.md) ### reason `string` ### now? `number` ## Returns [`WithdrawalIntent`](../interfaces/WithdrawalIntent.md) --- ## Page: releaseLiquidityAllocation URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/releaseLiquidityAllocation [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / releaseLiquidityAllocation # Function: releaseLiquidityAllocation() > **releaseLiquidityAllocation**(`allocation`, `now?`): [`LiquidityAllocation`](../interfaces/LiquidityAllocation.md) ## Parameters ### allocation [`LiquidityAllocation`](../interfaces/LiquidityAllocation.md) ### now? `number` ## Returns [`LiquidityAllocation`](../interfaces/LiquidityAllocation.md) --- ## Page: serializeLiquidityBondRecord URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/serializeLiquidityBondRecord [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / serializeLiquidityBondRecord # Function: serializeLiquidityBondRecord() > **serializeLiquidityBondRecord**(`record`): `string` ## Parameters ### record `unknown` ## Returns `string` --- ## Page: serializeLiquidityBondState URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/serializeLiquidityBondState [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / serializeLiquidityBondState # Function: serializeLiquidityBondState() > **serializeLiquidityBondState**(`state`): `string` ## Parameters ### state `unknown` ## Returns `string` --- ## Page: serializeRegistryState URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/serializeRegistryState [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / serializeRegistryState # Function: serializeRegistryState() > **serializeRegistryState**(`registry`): `string` Canonical serialization of a registry state. Excludes the volatile `updatedAt` stamp AND the anchor `root`/`sequence` so identical content (and the chain position) always serializes identically and a root depends only on the state it commits. ## Parameters ### registry [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) ## Returns `string` --- ## Page: signRegistryTransition URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/signRegistryTransition [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / signRegistryTransition # Function: signRegistryTransition() > **signRegistryTransition**(`registry`, `op`, `signer`, `opts?`): `Promise`\<[`RegistrySignedTransition`](../interfaces/RegistrySignedTransition.md)\> Sign a registry transition: binds the resulting state (via `root`), the mutation (`op`), and the prior anchor (`previousRoot`) into one signed record. ## Parameters ### registry [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) ### op [`RegistryOperation`](../interfaces/RegistryOperation.md) ### signer [`RegistryTransitionSigner`](../interfaces/RegistryTransitionSigner.md) ### opts? [`RegistryRootOptions`](../interfaces/RegistryRootOptions.md) ## Returns `Promise`\<[`RegistrySignedTransition`](../interfaces/RegistrySignedTransition.md)\> --- ## Page: sumActiveAllocations URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/sumActiveAllocations [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / sumActiveAllocations # Function: sumActiveAllocations() > **sumActiveAllocations**(`allocations`): `bigint` ## Parameters ### allocations [`LiquidityAllocation`](../interfaces/LiquidityAllocation.md)[] ## Returns `bigint` --- ## Page: sumFeesForPosition URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/sumFeesForPosition [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / sumFeesForPosition # Function: sumFeesForPosition() > **sumFeesForPosition**(`records`, `positionId`): `bigint` ## Parameters ### records [`LiquidityFeeRecord`](../interfaces/LiquidityFeeRecord.md)[] ### positionId `string` ## Returns `bigint` --- ## Page: sumLpFeesForPosition URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/sumLpFeesForPosition [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / sumLpFeesForPosition # Function: sumLpFeesForPosition() > **sumLpFeesForPosition**(`records`, `positionId`): `bigint` Sum LP fees for a position, counting only records whose earnings are verified (or non-earnable adjustments). An unverified earnable record must never inflate an LP's entitlement. ## Parameters ### records [`LiquidityFeeRecord`](../interfaces/LiquidityFeeRecord.md)[] ### positionId `string` ## Returns `bigint` --- ## Page: updateLiquidityPool URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/updateLiquidityPool [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / updateLiquidityPool # Function: updateLiquidityPool() > **updateLiquidityPool**(`state`, `pool`): [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) ## Parameters ### state [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) ### pool [`LiquidityPoolManifest`](../interfaces/LiquidityPoolManifest.md) ## Returns [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) --- ## Page: validateLiquidityAgainstPolicy URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/validateLiquidityAgainstPolicy [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / validateLiquidityAgainstPolicy # Function: validateLiquidityAgainstPolicy() > **validateLiquidityAgainstPolicy**(`params`): [`LiquidityBondVerifyResult`](../interfaces/LiquidityBondVerifyResult.md) ## Parameters ### params [`ValidateLiquidityAgainstPolicyParams`](../interfaces/ValidateLiquidityAgainstPolicyParams.md) ## Returns [`LiquidityBondVerifyResult`](../interfaces/LiquidityBondVerifyResult.md) --- ## Page: verifyIdentityChallengeProof URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/verifyIdentityChallengeProof [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / verifyIdentityChallengeProof # Function: verifyIdentityChallengeProof() > **verifyIdentityChallengeProof**(`proof`, `claimedAddress`, `entityId`): `boolean` Verify a signature-backed identity proof against a claimed address. All gates must hold: 1. the proof's address matches the claimed address; 2. the public key digest actually owns that address; 3. the challenge is the domain-separated challenge for this entity+address; 4. the WOTS signature verifies over the challenge. ## Parameters ### proof [`IdentityChallengeProof`](../interfaces/IdentityChallengeProof.md) ### claimedAddress `string` ### entityId `string` ## Returns `boolean` --- ## Page: verifyLiquidityAllocation URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/verifyLiquidityAllocation [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / verifyLiquidityAllocation # Function: verifyLiquidityAllocation() > **verifyLiquidityAllocation**(`params`): [`LiquidityBondVerifyResult`](../interfaces/LiquidityBondVerifyResult.md) ## Parameters ### params [`VerifyLiquidityAllocationParams`](../interfaces/VerifyLiquidityAllocationParams.md) ## Returns [`LiquidityBondVerifyResult`](../interfaces/LiquidityBondVerifyResult.md) --- ## Page: verifyLiquidityCommitment URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/verifyLiquidityCommitment [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / verifyLiquidityCommitment # Function: verifyLiquidityCommitment() > **verifyLiquidityCommitment**(`params`): `Promise`\<[`LiquidityBondVerifyResult`](../interfaces/LiquidityBondVerifyResult.md)\> ## Parameters ### params [`VerifyLiquidityCommitmentParams`](../interfaces/VerifyLiquidityCommitmentParams.md) ## Returns `Promise`\<[`LiquidityBondVerifyResult`](../interfaces/LiquidityBondVerifyResult.md)\> --- ## Page: verifyLiquidityFeeRecord URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/verifyLiquidityFeeRecord [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / verifyLiquidityFeeRecord # Function: verifyLiquidityFeeRecord() > **verifyLiquidityFeeRecord**(`params`): `Promise`\<[`LiquidityBondVerifyResult`](../interfaces/LiquidityBondVerifyResult.md)\> ## Parameters ### params [`VerifyLiquidityFeeRecordParams`](../interfaces/VerifyLiquidityFeeRecordParams.md) ## Returns `Promise`\<[`LiquidityBondVerifyResult`](../interfaces/LiquidityBondVerifyResult.md)\> --- ## Page: verifyLiquidityPoolManifest URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/verifyLiquidityPoolManifest [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / verifyLiquidityPoolManifest # Function: verifyLiquidityPoolManifest() > **verifyLiquidityPoolManifest**(`params`): [`LiquidityBondVerifyResult`](../interfaces/LiquidityBondVerifyResult.md) ## Parameters ### params [`VerifyLiquidityPoolManifestParams`](../interfaces/VerifyLiquidityPoolManifestParams.md) ## Returns [`LiquidityBondVerifyResult`](../interfaces/LiquidityBondVerifyResult.md) --- ## Page: verifyLiquidityPosition URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/verifyLiquidityPosition [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / verifyLiquidityPosition # Function: verifyLiquidityPosition() > **verifyLiquidityPosition**(`params`): [`LiquidityBondVerifyResult`](../interfaces/LiquidityBondVerifyResult.md) ## Parameters ### params [`VerifyLiquidityPositionParams`](../interfaces/VerifyLiquidityPositionParams.md) ## Returns [`LiquidityBondVerifyResult`](../interfaces/LiquidityBondVerifyResult.md) --- ## Page: verifyLiquidityReceipt URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/verifyLiquidityReceipt [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / verifyLiquidityReceipt # Function: verifyLiquidityReceipt() > **verifyLiquidityReceipt**(`params`): [`LiquidityBondVerifyResult`](../interfaces/LiquidityBondVerifyResult.md) ## Parameters ### params [`VerifyLiquidityReceiptParams`](../interfaces/VerifyLiquidityReceiptParams.md) ## Returns [`LiquidityBondVerifyResult`](../interfaces/LiquidityBondVerifyResult.md) --- ## Page: verifyLpIdentity URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/verifyLpIdentity [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / verifyLpIdentity # Function: verifyLpIdentity() > **verifyLpIdentity**(`params`): [`LiquidityBondVerifyResult`](../interfaces/LiquidityBondVerifyResult.md) ## Parameters ### params [`VerifyLpIdentityParams`](../interfaces/VerifyLpIdentityParams.md) ## Returns [`LiquidityBondVerifyResult`](../interfaces/LiquidityBondVerifyResult.md) --- ## Page: verifyOperatorAutobond URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/verifyOperatorAutobond [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / verifyOperatorAutobond # Function: verifyOperatorAutobond() > **verifyOperatorAutobond**(`bond`, `manifest`): `boolean` Verify an operator autobond: payload binding, address ownership, and the WOTS signature over the payload. "Verified" means cryptographic checking — never a declared string on the manifest. ## Parameters ### bond [`OperatorAutobond`](../interfaces/OperatorAutobond.md) ### manifest [`LiquidityPoolManifest`](../interfaces/LiquidityPoolManifest.md) ## Returns `boolean` --- ## Page: verifyPoolOperatorIdentity URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/verifyPoolOperatorIdentity [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / verifyPoolOperatorIdentity # Function: verifyPoolOperatorIdentity() > **verifyPoolOperatorIdentity**(`params`): [`LiquidityBondVerifyResult`](../interfaces/LiquidityBondVerifyResult.md) ## Parameters ### params [`VerifyPoolOperatorIdentityParams`](../interfaces/VerifyPoolOperatorIdentityParams.md) ## Returns [`LiquidityBondVerifyResult`](../interfaces/LiquidityBondVerifyResult.md) --- ## Page: verifyReceiptOwnerIdentity URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/verifyReceiptOwnerIdentity [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / verifyReceiptOwnerIdentity # Function: verifyReceiptOwnerIdentity() > **verifyReceiptOwnerIdentity**(`params`): [`LiquidityBondVerifyResult`](../interfaces/LiquidityBondVerifyResult.md) ## Parameters ### params [`VerifyReceiptOwnerIdentityParams`](../interfaces/VerifyReceiptOwnerIdentityParams.md) ## Returns [`LiquidityBondVerifyResult`](../interfaces/LiquidityBondVerifyResult.md) --- ## Page: verifyRegistryRoot URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/verifyRegistryRoot [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / verifyRegistryRoot # Function: verifyRegistryRoot() > **verifyRegistryRoot**(`registry`, `root`, `signature`, `verifier`, `opts?`): `Promise`\<`boolean`\> Verify a root against a registry (boolean form of the transition check): 1. recompute the root from the registry and require it to equal `root`; 2. when the verifier exposes `verify`, also check the signature over the root. ## Parameters ### registry [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) ### root `string` ### signature `Uint8Array` ### verifier [`RegistryRootVerifier`](../interfaces/RegistryRootVerifier.md) ### opts? [`RegistryRootOptions`](../interfaces/RegistryRootOptions.md) ## Returns `Promise`\<`boolean`\> --- ## Page: verifyRegistryTransition URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/verifyRegistryTransition [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / verifyRegistryTransition # Function: verifyRegistryTransition() > **verifyRegistryTransition**(`registry`, `transition`, `verifier`, `opts?`): `Promise`\<\{ `reasons`: `string`[]; `valid`: `boolean`; \}\> Root-based transition verification (#6): recompute root, then (when the verifier exposes `verify`) check the signature and signer identity. ## Parameters ### registry [`LiquidityBondRegistryState`](../interfaces/LiquidityBondRegistryState.md) ### transition [`RegistrySignedTransition`](../interfaces/RegistrySignedTransition.md) ### verifier [`RegistryRootVerifier`](../interfaces/RegistryRootVerifier.md) ### opts? [`RegistryRootOptions`](../interfaces/RegistryRootOptions.md) ## Returns `Promise`\<\{ `reasons`: `string`[]; `valid`: `boolean`; \}\> --- ## Page: verifyWithdrawalAllowed URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/functions/verifyWithdrawalAllowed [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / verifyWithdrawalAllowed # Function: verifyWithdrawalAllowed() > **verifyWithdrawalAllowed**(`params`): [`LiquidityBondVerifyResult`](../interfaces/LiquidityBondVerifyResult.md) ## Parameters ### params [`VerifyWithdrawalAllowedParams`](../interfaces/VerifyWithdrawalAllowedParams.md) ## Returns [`LiquidityBondVerifyResult`](../interfaces/LiquidityBondVerifyResult.md) --- ## Page: ComputePoolUtilisationParams URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/ComputePoolUtilisationParams [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / ComputePoolUtilisationParams # Interface: ComputePoolUtilisationParams ## Properties ### pool > **pool**: [`LiquidityPoolManifest`](LiquidityPoolManifest.md) *** ### positions > **positions**: [`LiquidityPosition`](LiquidityPosition.md)[] --- ## Page: ComputePositionRiskScoreParams URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/ComputePositionRiskScoreParams [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / ComputePositionRiskScoreParams # Interface: ComputePositionRiskScoreParams ## Properties ### now? > `optional` **now?**: `number` *** ### pool > **pool**: [`LiquidityPoolManifest`](LiquidityPoolManifest.md) *** ### position > **position**: [`LiquidityPosition`](LiquidityPosition.md) --- ## Page: CreateLiquidityAllocationParams URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/CreateLiquidityAllocationParams [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / CreateLiquidityAllocationParams # Interface: CreateLiquidityAllocationParams ## Properties ### allocationType > **allocationType**: [`AllocationType`](../type-aliases/AllocationType.md) *** ### amount > **amount**: `bigint` *** ### createdAt? > `optional` **createdAt?**: `number` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### poolId > **poolId**: `string` *** ### positionId > **positionId**: `string` *** ### purpose > **purpose**: [`LiquidityPurpose`](../type-aliases/LiquidityPurpose.md) --- ## Page: CreateLiquidityCommitmentParams URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/CreateLiquidityCommitmentParams [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / CreateLiquidityCommitmentParams # Interface: CreateLiquidityCommitmentParams ## Properties ### amount > **amount**: `bigint` *** ### asset > **asset**: `string` *** ### createdAt? > `optional` **createdAt?**: `number` *** ### expiresAt? > `optional` **expiresAt?**: `number` *** ### funding? > `optional` **funding?**: [`LiquidityFunding`](LiquidityFunding.md) *** ### lpAddress > **lpAddress**: `string` *** ### lpIdentityId? > `optional` **lpIdentityId?**: `string` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### poolId > **poolId**: `string` *** ### proofRef? > `optional` **proofRef?**: [`LiquidityProofRef`](LiquidityProofRef.md) *** ### purpose > **purpose**: [`LiquidityPurpose`](../type-aliases/LiquidityPurpose.md) *** ### terms > **terms**: [`LiquidityLockTerms`](LiquidityLockTerms.md) --- ## Page: CreateLiquidityPoolManifestParams URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/CreateLiquidityPoolManifestParams [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / CreateLiquidityPoolManifestParams # Interface: CreateLiquidityPoolManifestParams ## Properties ### asset > **asset**: `string` *** ### createdAt? > `optional` **createdAt?**: `number` *** ### edgeService? > `optional` **edgeService?**: `EdgeServiceManifest` *** ### expiresAt? > `optional` **expiresAt?**: `number` *** ### feePolicy? > `optional` **feePolicy?**: [`LiquidityFeePolicy`](LiquidityFeePolicy.md) *** ### lockTerms > **lockTerms**: [`LiquidityLockTerms`](LiquidityLockTerms.md) *** ### maxCommitment? > `optional` **maxCommitment?**: `bigint` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### minCommitment? > `optional` **minCommitment?**: `bigint` *** ### operatorAddress? > `optional` **operatorAddress?**: `string` *** ### operatorBond? > `optional` **operatorBond?**: [`OperatorAutobond`](OperatorAutobond.md) *** ### operatorIdentityId? > `optional` **operatorIdentityId?**: `string` *** ### poolId > **poolId**: `string` *** ### poolType > **poolType**: [`LiquidityPoolType`](../type-aliases/LiquidityPoolType.md) *** ### providerBondRef? > `optional` **providerBondRef?**: [`ProviderBondRef`](ProviderBondRef.md) *** ### purpose > **purpose**: [`LiquidityPurpose`](../type-aliases/LiquidityPurpose.md) *** ### riskPolicy? > `optional` **riskPolicy?**: [`LiquidityRiskPolicy`](LiquidityRiskPolicy.md) *** ### signedEdgeService? > `optional` **signedEdgeService?**: `SignedManifest`\<`EdgeServiceManifest`\> *** ### totalCapacity? > `optional` **totalCapacity?**: `bigint` --- ## Page: CreateLiquidityPositionParams URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/CreateLiquidityPositionParams [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / CreateLiquidityPositionParams # Interface: CreateLiquidityPositionParams ## Properties ### commitment > **commitment**: [`LiquidityCommitment`](LiquidityCommitment.md) *** ### createdAt? > `optional` **createdAt?**: `number` *** ### expiresAt? > `optional` **expiresAt?**: `number` *** ### factoryId? > `optional` **factoryId?**: `string` *** ### funding? > `optional` **funding?**: [`LiquidityFunding`](LiquidityFunding.md) *** ### merchantSettlementId? > `optional` **merchantSettlementId?**: `string` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### omniaChannelId? > `optional` **omniaChannelId?**: `string` *** ### poolId > **poolId**: `string` *** ### providerBondRef? > `optional` **providerBondRef?**: [`ProviderBondRef`](ProviderBondRef.md) *** ### rfqInventoryId? > `optional` **rfqInventoryId?**: `string` *** ### routerId? > `optional` **routerId?**: `string` *** ### statechainId? > `optional` **statechainId?**: `string` *** ### vtxoPoolId? > `optional` **vtxoPoolId?**: `string` --- ## Page: CreateWithdrawalIntentParams URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/CreateWithdrawalIntentParams [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / CreateWithdrawalIntentParams # Interface: CreateWithdrawalIntentParams ## Properties ### amount > **amount**: `bigint` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### nonce? > `optional` **nonce?**: `string` Per-position nonce — the withdrawal ID is a domain hash over it (non-replayable). *** ### ownerAddress > **ownerAddress**: `string` *** ### poolId > **poolId**: `string` *** ### positionId > **positionId**: `string` *** ### requestedAt? > `optional` **requestedAt?**: `number` --- ## Page: DurableLiquidityBondStore URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/DurableLiquidityBondStore [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / DurableLiquidityBondStore # Interface: DurableLiquidityBondStore ## Methods ### attachAllocation() > **attachAllocation**(`allocation`): `Promise`\<`void`\> #### Parameters ##### allocation [`LiquidityAllocation`](LiquidityAllocation.md) #### Returns `Promise`\<`void`\> *** ### attachFeeRecord() > **attachFeeRecord**(`record`): `Promise`\<`void`\> #### Parameters ##### record [`LiquidityFeeRecord`](LiquidityFeeRecord.md) #### Returns `Promise`\<`void`\> *** ### attachReceipt() > **attachReceipt**(`receipt`): `Promise`\<`void`\> #### Parameters ##### receipt [`LiquidityReceipt`](LiquidityReceipt.md) #### Returns `Promise`\<`void`\> *** ### attachWithdrawalIntent() > **attachWithdrawalIntent**(`intent`): `Promise`\<`void`\> #### Parameters ##### intent [`WithdrawalIntent`](WithdrawalIntent.md) #### Returns `Promise`\<`void`\> *** ### getPool() > **getPool**(`poolId`): `Promise`\<[`LiquidityPoolManifest`](LiquidityPoolManifest.md) \| `undefined`\> #### Parameters ##### poolId `string` #### Returns `Promise`\<[`LiquidityPoolManifest`](LiquidityPoolManifest.md) \| `undefined`\> *** ### getPosition() > **getPosition**(`positionId`): `Promise`\<[`LiquidityPosition`](LiquidityPosition.md) \| `undefined`\> #### Parameters ##### positionId `string` #### Returns `Promise`\<[`LiquidityPosition`](LiquidityPosition.md) \| `undefined`\> *** ### getReceipt() > **getReceipt**(`receiptId`): `Promise`\<[`LiquidityReceipt`](LiquidityReceipt.md) \| `undefined`\> #### Parameters ##### receiptId `string` #### Returns `Promise`\<[`LiquidityReceipt`](LiquidityReceipt.md) \| `undefined`\> *** ### getRevision() > **getRevision**(): `Promise`\<`number`\> Current registry transition counter (0 before the first write). #### Returns `Promise`\<`number`\> *** ### getSnapshot() > **getSnapshot**(): `Promise`\<[`LiquidityBondRegistryState`](LiquidityBondRegistryState.md)\> #### Returns `Promise`\<[`LiquidityBondRegistryState`](LiquidityBondRegistryState.md)\> *** ### hasState() > **hasState**(): `Promise`\<`boolean`\> True once any registry record has been persisted. #### Returns `Promise`\<`boolean`\> *** ### listActivePositions() > **listActivePositions**(): `Promise`\<[`LiquidityPosition`](LiquidityPosition.md)[]\> #### Returns `Promise`\<[`LiquidityPosition`](LiquidityPosition.md)[]\> *** ### listPools() > **listPools**(): `Promise`\<[`LiquidityPoolManifest`](LiquidityPoolManifest.md)[]\> #### Returns `Promise`\<[`LiquidityPoolManifest`](LiquidityPoolManifest.md)[]\> *** ### listPositionsByLp() > **listPositionsByLp**(`lpAddress`): `Promise`\<[`LiquidityPosition`](LiquidityPosition.md)[]\> #### Parameters ##### lpAddress `string` #### Returns `Promise`\<[`LiquidityPosition`](LiquidityPosition.md)[]\> *** ### listPositionsByPool() > **listPositionsByPool**(`poolId`): `Promise`\<[`LiquidityPosition`](LiquidityPosition.md)[]\> #### Parameters ##### poolId `string` #### Returns `Promise`\<[`LiquidityPosition`](LiquidityPosition.md)[]\> *** ### listWithdrawablePositions() > **listWithdrawablePositions**(`now`): `Promise`\<[`LiquidityPosition`](LiquidityPosition.md)[]\> #### Parameters ##### now `number` #### Returns `Promise`\<[`LiquidityPosition`](LiquidityPosition.md)[]\> *** ### registerCommitment() > **registerCommitment**(`commitment`): `Promise`\<`void`\> #### Parameters ##### commitment [`LiquidityCommitment`](LiquidityCommitment.md) #### Returns `Promise`\<`void`\> *** ### registerPool() > **registerPool**(`pool`): `Promise`\<`void`\> #### Parameters ##### pool [`LiquidityPoolManifest`](LiquidityPoolManifest.md) #### Returns `Promise`\<`void`\> *** ### registerPosition() > **registerPosition**(`position`): `Promise`\<`void`\> #### Parameters ##### position [`LiquidityPosition`](LiquidityPosition.md) #### Returns `Promise`\<`void`\> *** ### updatePool() > **updatePool**(`pool`): `Promise`\<`void`\> #### Parameters ##### pool [`LiquidityPoolManifest`](LiquidityPoolManifest.md) #### Returns `Promise`\<`void`\> --- ## Page: DurableLiquidityBondStoreOptions URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/DurableLiquidityBondStoreOptions [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / DurableLiquidityBondStoreOptions # Interface: DurableLiquidityBondStoreOptions ## Properties ### namespace? > `readonly` `optional` **namespace?**: `string` Key namespace prefix; default `totem_liquidity_bond:v1:`. *** ### requireAckMode? > `readonly` `optional` **requireAckMode?**: `"volatile"` \| `"buffered"` \| `"durably-acknowledged"` Required write acknowledgment; default `durably-acknowledged`. Pass `volatile` only for tests/scratch adapters (e.g. `MemoryStore`). --- ## Page: FeePayoutRef URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/FeePayoutRef [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / FeePayoutRef # Interface: FeePayoutRef A settled payout that a claim/compound is bound to (prevents claim-then-fail). ## Properties ### kind > **kind**: `"vtxo-mint"` \| `"channel-settlement"` \| `"external"` *** ### nonce > **nonce**: `string` *** ### payoutId > **payoutId**: `string` --- ## Page: FeeProofVerifier URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/FeeProofVerifier [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / FeeProofVerifier # Interface: FeeProofVerifier Verifier for a fee's earn-proof. "Verified" means a checked payment proof. ## Methods ### verifyFeeProof() > **verifyFeeProof**(`params`): `Promise`\<\{ `reason?`: `string`; `valid`: `boolean`; \}\> #### Parameters ##### params ###### grossAmount `bigint` ###### poolId `string` ###### positionId `string` ###### proof `unknown` ###### source [`EarnableFeeSource`](../type-aliases/EarnableFeeSource.md) #### Returns `Promise`\<\{ `reason?`: `string`; `valid`: `boolean`; \}\> --- ## Page: IdentityChallengeProof URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/IdentityChallengeProof [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / IdentityChallengeProof # Interface: IdentityChallengeProof A signature-backed identity proof (#10/#32): the claimed address proves control by signing a domain-separated challenge with its WOTS key. The advisory `identityGraph` is no longer the load-bearing check — a signature from the address-derived public key is. ## Properties ### address > **address**: `string` *** ### challenge > **challenge**: `string` Hex of the challenge bytes that were signed. *** ### publicKeyDigest > **publicKeyDigest**: `string` Hex of the 32-byte WOTS public key digest. *** ### signature > **signature**: `string` Hex WOTS signature over the challenge. --- ## Page: IssueLiquidityReceiptParams URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/IssueLiquidityReceiptParams [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / IssueLiquidityReceiptParams # Interface: IssueLiquidityReceiptParams ## Properties ### expiresAt? > `optional` **expiresAt?**: `number` *** ### issuedAt? > `optional` **issuedAt?**: `number` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### ownerAddress > **ownerAddress**: `string` *** ### ownerIdentityId? > `optional` **ownerIdentityId?**: `string` *** ### poolId > **poolId**: `string` *** ### position > **position**: [`LiquidityPosition`](LiquidityPosition.md) *** ### proofRef? > `optional` **proofRef?**: [`LiquidityProofRef`](LiquidityProofRef.md) --- ## Page: LiquidityAllocation URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/LiquidityAllocation [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / LiquidityAllocation # Interface: LiquidityAllocation ## Properties ### allocationId > **allocationId**: `string` *** ### allocationType > **allocationType**: [`AllocationType`](../type-aliases/AllocationType.md) *** ### amount > **amount**: `bigint` *** ### createdAt > **createdAt**: `number` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### poolId > **poolId**: `string` *** ### positionId > **positionId**: `string` *** ### purpose > **purpose**: [`LiquidityPurpose`](../type-aliases/LiquidityPurpose.md) *** ### releasedAt? > `optional` **releasedAt?**: `number` *** ### status > **status**: [`AllocationStatus`](../type-aliases/AllocationStatus.md) --- ## Page: LiquidityBondPolicy URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/LiquidityBondPolicy [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / LiquidityBondPolicy # Interface: LiquidityBondPolicy ## Properties ### acceptedAssets? > `optional` **acceptedAssets?**: `string`[] *** ### acceptedPurposes? > `optional` **acceptedPurposes?**: [`LiquidityPurpose`](../type-aliases/LiquidityPurpose.md)[] *** ### allowWithdrawablePositions? > `optional` **allowWithdrawablePositions?**: `boolean` *** ### maxHaircutBps? > `optional` **maxHaircutBps?**: `number` *** ### minAmount? > `optional` **minAmount?**: `bigint` *** ### minProviderScore? > `optional` **minProviderScore?**: `number` *** ### now? > `optional` **now?**: `number` *** ### rejectDepleted? > `optional` **rejectDepleted?**: `boolean` *** ### rejectExpired? > `optional` **rejectExpired?**: `boolean` *** ### requireIdentity? > `optional` **requireIdentity?**: `boolean` *** ### requireProviderBond? > `optional` **requireProviderBond?**: `boolean` --- ## Page: LiquidityBondRegistryState URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/LiquidityBondRegistryState [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / LiquidityBondRegistryState # Interface: LiquidityBondRegistryState ## Properties ### allocations > **allocations**: `Record`\<`string`, [`LiquidityAllocation`](LiquidityAllocation.md)[]\> *** ### commitments > **commitments**: `Record`\<`string`, [`LiquidityCommitment`](LiquidityCommitment.md)\> *** ### feeRecords > **feeRecords**: `Record`\<`string`, [`LiquidityFeeRecord`](LiquidityFeeRecord.md)[]\> *** ### pools > **pools**: `Record`\<`string`, [`LiquidityPoolManifest`](LiquidityPoolManifest.md)\> *** ### positions > **positions**: `Record`\<`string`, [`LiquidityPosition`](LiquidityPosition.md)\> *** ### receipts > **receipts**: `Record`\<`string`, [`LiquidityReceipt`](LiquidityReceipt.md)\> *** ### root? > `optional` **root?**: `string` The accepted registry anchor root — advanced only through signed transitions (`applyRegistryTransition`). Verifiers require the next transition's `previousRoot` to match it, so a fabricated registry without the anchor chain is rejected. Excluded from `serializeRegistryState`/`computeRegistryRoot`. *** ### sequence? > `optional` **sequence?**: `number` Monotonic anti-reorg sequence (#34): each applied transition must advance it, so a `previousRoot` resubmission after a rollback is rejected. Excluded from the root commitment. *** ### updatedAt? > `optional` **updatedAt?**: `number` *** ### withdrawals > **withdrawals**: `Record`\<`string`, [`WithdrawalIntent`](WithdrawalIntent.md)[]\> --- ## Page: LiquidityBondVerifyResult URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/LiquidityBondVerifyResult [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / LiquidityBondVerifyResult # Interface: LiquidityBondVerifyResult ## Properties ### code? > `optional` **code?**: `string` *** ### ok > **ok**: `boolean` *** ### reason? > `optional` **reason?**: `string` *** ### requiresLiveVerifier? > `optional` **requiresLiveVerifier?**: `boolean` --- ## Page: LiquidityChainFundingVerifier URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/LiquidityChainFundingVerifier [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / LiquidityChainFundingVerifier # Interface: LiquidityChainFundingVerifier Minimal on-chain funding verifier. Structurally satisfied by `@totemsdk/chain-provider`'s `DepositVerifier` (extra fields are fine), so a pool backend can pass the same provider both places without forcing a hard dependency on chain-provider here. ## Methods ### verifyDeposit() > **verifyDeposit**(`params`): `Promise`\<\{ `error?`: `unknown`; `reason?`: `string`; `valid`: `boolean`; \}\> #### Parameters ##### params ###### claimedAmount? `string` ###### coinId `string` ###### ownerAddress `string` ###### tokenId? `string` #### Returns `Promise`\<\{ `error?`: `unknown`; `reason?`: `string`; `valid`: `boolean`; \}\> --- ## Page: LiquidityCommitment URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/LiquidityCommitment [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / LiquidityCommitment # Interface: LiquidityCommitment ## Properties ### amount > **amount**: `bigint` *** ### asset > **asset**: `string` *** ### commitmentId > **commitmentId**: `string` *** ### createdAt > **createdAt**: `number` *** ### expiresAt? > `optional` **expiresAt?**: `number` *** ### funding? > `optional` **funding?**: [`LiquidityFunding`](LiquidityFunding.md) *** ### lpAddress > **lpAddress**: `string` *** ### lpIdentityId? > `optional` **lpIdentityId?**: `string` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### poolId > **poolId**: `string` *** ### proofRef? > `optional` **proofRef?**: [`LiquidityProofRef`](LiquidityProofRef.md) *** ### purpose > **purpose**: [`LiquidityPurpose`](../type-aliases/LiquidityPurpose.md) *** ### status > **status**: [`CommitmentStatus`](../type-aliases/CommitmentStatus.md) *** ### terms > **terms**: [`LiquidityLockTerms`](LiquidityLockTerms.md) --- ## Page: LiquidityFeePolicy URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/LiquidityFeePolicy [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / LiquidityFeePolicy # Interface: LiquidityFeePolicy ## Properties ### feeAsset? > `optional` **feeAsset?**: `string` *** ### feeBps? > `optional` **feeBps?**: `number` *** ### feeModel > **feeModel**: [`FeeModel`](../type-aliases/FeeModel.md) *** ### lpFeeBps? > `optional` **lpFeeBps?**: `number` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### operatorFeeBps? > `optional` **operatorFeeBps?**: `number` --- ## Page: LiquidityFeeRecord URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/LiquidityFeeRecord [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / LiquidityFeeRecord # Interface: LiquidityFeeRecord ## Properties ### earnProof? > `optional` **earnProof?**: `unknown` The raw payment proof backing an earnable fee (HTLC fulfillment / route record). *** ### feeAsset > **feeAsset**: `string` *** ### feeRecordId > **feeRecordId**: `string` *** ### grossFeeAmount > **grossFeeAmount**: `bigint` *** ### lpFeeAmount? > `optional` **lpFeeAmount?**: `bigint` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### operatorFeeAmount? > `optional` **operatorFeeAmount?**: `bigint` *** ### payoutRef? > `optional` **payoutRef?**: [`FeePayoutRef`](FeePayoutRef.md) Bound payout for claim/compound reductions (prevents claim-then-fail). *** ### poolId > **poolId**: `string` *** ### positionId > **positionId**: `string` *** ### proofRef? > `optional` **proofRef?**: [`LiquidityProofRef`](LiquidityProofRef.md) *** ### recordedAt > **recordedAt**: `number` *** ### source > **source**: [`FeeSource`](../type-aliases/FeeSource.md) *** ### verified? > `optional` **verified?**: `boolean` Set only when the earn-proof was verified on-chain/against a payment record. --- ## Page: LiquidityFunding URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/LiquidityFunding [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / LiquidityFunding # Interface: LiquidityFunding Structured funding proof. "Verified" here means an on-chain check, never a declared string: a coin that exists, is unspent, is owned by the LP, and covers the claimed token+amount. `chain-confirmed` is set only by `confirmLiquidityCommitment` after `verifyDeposit` passes. ## Properties ### amount > **amount**: `bigint` *** ### confirmedAt? > `optional` **confirmedAt?**: `number` *** ### mmrProof? > `optional` **mmrProof?**: `unknown` *** ### status > **status**: `"declared"` \| `"chain-confirmed"` \| `"invalid"` *** ### tokenId > **tokenId**: `string` *** ### txpowId? > `optional` **txpowId?**: `string` *** ### utxoRef > **utxoRef**: `string` --- ## Page: LiquidityLockTerms URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/LiquidityLockTerms [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / LiquidityLockTerms # Interface: LiquidityLockTerms ## Properties ### earlyWithdrawalAllowed? > `optional` **earlyWithdrawalAllowed?**: `boolean` *** ### earlyWithdrawalPenaltyBps? > `optional` **earlyWithdrawalPenaltyBps?**: `number` *** ### lockType > **lockType**: [`LockType`](../type-aliases/LockType.md) *** ### minLockMs? > `optional` **minLockMs?**: `number` *** ### noticePeriodMs? > `optional` **noticePeriodMs?**: `number` *** ### unlockAfterBlock? > `optional` **unlockAfterBlock?**: `bigint` *** ### unlockAfterMs? > `optional` **unlockAfterMs?**: `number` --- ## Page: LiquidityPoolManifest URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/LiquidityPoolManifest [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / LiquidityPoolManifest # Interface: LiquidityPoolManifest ## Properties ### asset > **asset**: `string` *** ### createdAt > **createdAt**: `number` *** ### edgeService? > `optional` **edgeService?**: `EdgeServiceManifest` *** ### edgeServiceManifestId? > `optional` **edgeServiceManifestId?**: `string` *** ### expiresAt? > `optional` **expiresAt?**: `number` *** ### feePolicy? > `optional` **feePolicy?**: [`LiquidityFeePolicy`](LiquidityFeePolicy.md) *** ### lockTerms > **lockTerms**: [`LiquidityLockTerms`](LiquidityLockTerms.md) *** ### maxCommitment? > `optional` **maxCommitment?**: `bigint` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### minCommitment? > `optional` **minCommitment?**: `bigint` *** ### operatorAddress? > `optional` **operatorAddress?**: `string` *** ### operatorBond? > `optional` **operatorBond?**: [`OperatorAutobond`](OperatorAutobond.md) *** ### operatorIdentityId? > `optional` **operatorIdentityId?**: `string` *** ### poolId > **poolId**: `string` *** ### poolType > **poolType**: [`LiquidityPoolType`](../type-aliases/LiquidityPoolType.md) *** ### providerBondRef? > `optional` **providerBondRef?**: [`ProviderBondRef`](ProviderBondRef.md) *** ### purpose > **purpose**: [`LiquidityPurpose`](../type-aliases/LiquidityPurpose.md) *** ### riskPolicy? > `optional` **riskPolicy?**: [`LiquidityRiskPolicy`](LiquidityRiskPolicy.md) *** ### signedEdgeService? > `optional` **signedEdgeService?**: `SignedManifest`\<`EdgeServiceManifest`\> *** ### totalCapacity? > `optional` **totalCapacity?**: `bigint` --- ## Page: LiquidityPosition URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/LiquidityPosition [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / LiquidityPosition # Interface: LiquidityPosition ## Properties ### allocatedAmount? > `optional` **allocatedAmount?**: `bigint` *** ### amount > **amount**: `bigint` *** ### asset > **asset**: `string` *** ### availableAmount? > `optional` **availableAmount?**: `bigint` *** ### commitmentId? > `optional` **commitmentId?**: `string` *** ### createdAt > **createdAt**: `number` *** ### effectiveAmount? > `optional` **effectiveAmount?**: `bigint` *** ### expiresAt? > `optional` **expiresAt?**: `number` *** ### factoryId? > `optional` **factoryId?**: `string` *** ### funding? > `optional` **funding?**: [`LiquidityFunding`](LiquidityFunding.md) *** ### lockTerms > **lockTerms**: [`LiquidityLockTerms`](LiquidityLockTerms.md) *** ### lpAddress > **lpAddress**: `string` *** ### lpIdentityId? > `optional` **lpIdentityId?**: `string` *** ### merchantSettlementId? > `optional` **merchantSettlementId?**: `string` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### omniaChannelId? > `optional` **omniaChannelId?**: `string` *** ### poolId > **poolId**: `string` *** ### positionId > **positionId**: `string` *** ### providerBondRef? > `optional` **providerBondRef?**: [`ProviderBondRef`](ProviderBondRef.md) *** ### purpose > **purpose**: [`LiquidityPurpose`](../type-aliases/LiquidityPurpose.md) *** ### receiptId? > `optional` **receiptId?**: `string` *** ### reservedAmount? > `optional` **reservedAmount?**: `bigint` *** ### rfqInventoryId? > `optional` **rfqInventoryId?**: `string` *** ### routerId? > `optional` **routerId?**: `string` *** ### statechainId? > `optional` **statechainId?**: `string` *** ### status > **status**: [`LiquidityPositionStatus`](../type-aliases/LiquidityPositionStatus.md) *** ### updatedAt? > `optional` **updatedAt?**: `number` *** ### vtxoPoolId? > `optional` **vtxoPoolId?**: `string` --- ## Page: LiquidityProofRef URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/LiquidityProofRef [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / LiquidityProofRef # Interface: LiquidityProofRef ## Properties ### createdAt > **createdAt**: `number` *** ### expiresAt? > `optional` **expiresAt?**: `number` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### proof? > `optional` **proof?**: `unknown` *** ### proofId > **proofId**: `string` *** ### proofType > **proofType**: [`ProofRefType`](../type-aliases/ProofRefType.md) --- ## Page: LiquidityProviderBondVerifier URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/LiquidityProviderBondVerifier [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / LiquidityProviderBondVerifier # Interface: LiquidityProviderBondVerifier Verifier that confirms a provider's bond coin exists and is unspent on-chain. ## Methods ### verifyBond() > **verifyBond**(`params`): `Promise`\<\{ `reason?`: `string`; `valid`: `boolean`; \}\> #### Parameters ##### params ###### bondCoinId `string` ###### ownerProviderId `string` #### Returns `Promise`\<\{ `reason?`: `string`; `valid`: `boolean`; \}\> --- ## Page: LiquidityReceipt URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/LiquidityReceipt [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / LiquidityReceipt # Interface: LiquidityReceipt ## Properties ### amount > **amount**: `bigint` *** ### asset > **asset**: `string` *** ### consumedAt? > `optional` **consumedAt?**: `number` Set when the receipt was consumed by a withdrawal (single-spend). *** ### consumedIntentId? > `optional` **consumedIntentId?**: `string` *** ### effectiveAmount? > `optional` **effectiveAmount?**: `bigint` *** ### expiresAt? > `optional` **expiresAt?**: `number` *** ### issuedAt > **issuedAt**: `number` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### nonce > **nonce**: `string` Per-position nonce — makes the receipt single-spend and non-replayable. *** ### ownerAddress > **ownerAddress**: `string` *** ### ownerIdentityId? > `optional` **ownerIdentityId?**: `string` *** ### poolId > **poolId**: `string` *** ### positionId > **positionId**: `string` *** ### proofRef? > `optional` **proofRef?**: [`LiquidityProofRef`](LiquidityProofRef.md) *** ### receiptHash > **receiptHash**: `string` *** ### receiptId > **receiptId**: `string` --- ## Page: LiquidityRiskPolicy URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/LiquidityRiskPolicy [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / LiquidityRiskPolicy # Interface: LiquidityRiskPolicy ## Properties ### acceptedAssets? > `optional` **acceptedAssets?**: `string`[] *** ### acceptedPurposes? > `optional` **acceptedPurposes?**: [`LiquidityPurpose`](../type-aliases/LiquidityPurpose.md)[] *** ### allowProviderScoreBelow? > `optional` **allowProviderScoreBelow?**: `number` *** ### haircutBps? > `optional` **haircutBps?**: `number` *** ### maxAllocationBps? > `optional` **maxAllocationBps?**: `number` *** ### requireIdentity? > `optional` **requireIdentity?**: `boolean` *** ### requireProviderBond? > `optional` **requireProviderBond?**: `boolean` --- ## Page: OperatorAutobond URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/OperatorAutobond [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / OperatorAutobond # Interface: OperatorAutobond Operator autobond (#5): a WOTS signature by the pool operator over the load-bearing pool parameters (poolId, asset, totalCapacity, lockTerms, feePolicy). Signed manifests are the anchor of truth — an operator cannot forge a pool they never committed to. ## Properties ### address > **address**: `string` Address derived from the signer's public key digest. *** ### autobondId > **autobondId**: `string` *** ### createdAt > **createdAt**: `number` *** ### payloadHash > **payloadHash**: `string` sha3_256(domain | canonicalJson({poolId, asset, totalCapacity, lockTerms, feePolicy})) *** ### publicKeyDigest > **publicKeyDigest**: `string` *** ### signature > **signature**: `string` --- ## Page: ProviderBondRef URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/ProviderBondRef [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / ProviderBondRef # Interface: ProviderBondRef ## Properties ### bondCoinId? > `optional` **bondCoinId?**: `string` An audited on-chain bond coin (utxo id), not free text. *** ### manifestId? > `optional` **manifestId?**: `string` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### providerBondId? > `optional` **providerBondId?**: `string` *** ### providerId > **providerId**: `string` *** ### providerScore? > `optional` **providerScore?**: `number` --- ## Page: RecordLiquidityFeeParams URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/RecordLiquidityFeeParams [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / RecordLiquidityFeeParams # Interface: RecordLiquidityFeeParams ## Properties ### earnProof? > `optional` **earnProof?**: `unknown` Required for earnable sources — the payment proof that backs the fee. *** ### feeAsset > **feeAsset**: `string` *** ### grossFeeAmount > **grossFeeAmount**: `bigint` *** ### lpFeeAmount? > `optional` **lpFeeAmount?**: `bigint` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### operatorFeeAmount? > `optional` **operatorFeeAmount?**: `bigint` *** ### payoutRef? > `optional` **payoutRef?**: [`FeePayoutRef`](FeePayoutRef.md) *** ### poolId > **poolId**: `string` *** ### positionId > **positionId**: `string` *** ### proofRef? > `optional` **proofRef?**: [`LiquidityProofRef`](LiquidityProofRef.md) *** ### recordedAt? > `optional` **recordedAt?**: `number` *** ### source > **source**: [`FeeSource`](../type-aliases/FeeSource.md) *** ### verified? > `optional` **verified?**: `boolean` When set, the earn-proof was verified (see `verifyLiquidityFeeRecord`). --- ## Page: RegistryOperation URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/RegistryOperation [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / RegistryOperation # Interface: RegistryOperation Description of what changed in a registry transition. ## Properties ### allocationId? > `optional` **allocationId?**: `string` *** ### amount? > `optional` **amount?**: `bigint` *** ### commitmentId? > `optional` **commitmentId?**: `string` *** ### entity? > `optional` **entity?**: `unknown` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### poolId? > `optional` **poolId?**: `string` *** ### positionId? > `optional` **positionId?**: `string` *** ### receiptId? > `optional` **receiptId?**: `string` *** ### type > **type**: `string` *** ### withdrawalId? > `optional` **withdrawalId?**: `string` --- ## Page: RegistryRootOptions URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/RegistryRootOptions [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / RegistryRootOptions # Interface: RegistryRootOptions ## Properties ### domain? > `optional` **domain?**: `string` *** ### filter? > `optional` **filter?**: (`registry`) => [`LiquidityBondRegistryState`](LiquidityBondRegistryState.md) When set, the root is computed over a filtered view of the registry — e.g. verified-only positions/fees — so an attacker's signed root cannot look clean over phantom state (#12). #### Parameters ##### registry [`LiquidityBondRegistryState`](LiquidityBondRegistryState.md) #### Returns [`LiquidityBondRegistryState`](LiquidityBondRegistryState.md) *** ### previousRoot? > `optional` **previousRoot?**: `string` *** ### reason? > `optional` **reason?**: `string` *** ### sequence? > `optional` **sequence?**: `number` Monotonic anti-reorg sequence (#34) — must advance on every applied transition. *** ### signedAt? > `optional` **signedAt?**: `number` *** ### signIndices? > `optional` **signIndices?**: `SigningIndices` Signing indices bound into the signature (defaults to genesis indices). --- ## Page: RegistryRootPort URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/RegistryRootPort [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / RegistryRootPort # Interface: RegistryRootPort A channel program can carry a `RegistryRootPort` so an on-chain program can recompute/verify the pool anchor without pulling the full registry in. ## Methods ### applyRegistryTransition() > **applyRegistryTransition**(`state`, `next`, `transition`, `verifier`, `opts?`): `Promise`\<[`LiquidityBondRegistryState`](LiquidityBondRegistryState.md)\> #### Parameters ##### state [`LiquidityBondRegistryState`](LiquidityBondRegistryState.md) ##### next [`LiquidityBondRegistryState`](LiquidityBondRegistryState.md) ##### transition [`RegistrySignedTransition`](RegistrySignedTransition.md) ##### verifier [`RegistryRootVerifier`](RegistryRootVerifier.md) ##### opts? [`RegistryRootOptions`](RegistryRootOptions.md) #### Returns `Promise`\<[`LiquidityBondRegistryState`](LiquidityBondRegistryState.md)\> *** ### computeRegistryRoot() > **computeRegistryRoot**(`registry`, `opts?`): `string` #### Parameters ##### registry [`LiquidityBondRegistryState`](LiquidityBondRegistryState.md) ##### opts? [`RegistryRootOptions`](RegistryRootOptions.md) #### Returns `string` *** ### serializeRegistryState() > **serializeRegistryState**(`registry`): `string` #### Parameters ##### registry [`LiquidityBondRegistryState`](LiquidityBondRegistryState.md) #### Returns `string` *** ### signRegistryTransition() > **signRegistryTransition**(`registry`, `op`, `signer`, `opts?`): `Promise`\<[`RegistrySignedTransition`](RegistrySignedTransition.md)\> #### Parameters ##### registry [`LiquidityBondRegistryState`](LiquidityBondRegistryState.md) ##### op [`RegistryOperation`](RegistryOperation.md) ##### signer [`RegistryTransitionSigner`](RegistryTransitionSigner.md) ##### opts? [`RegistryRootOptions`](RegistryRootOptions.md) #### Returns `Promise`\<[`RegistrySignedTransition`](RegistrySignedTransition.md)\> *** ### verifyRegistryTransition() > **verifyRegistryTransition**(`registry`, `transition`, `verifier`, `opts?`): `Promise`\<\{ `reasons`: `string`[]; `valid`: `boolean`; \}\> #### Parameters ##### registry [`LiquidityBondRegistryState`](LiquidityBondRegistryState.md) ##### transition [`RegistrySignedTransition`](RegistrySignedTransition.md) ##### verifier [`RegistryRootVerifier`](RegistryRootVerifier.md) ##### opts? [`RegistryRootOptions`](RegistryRootOptions.md) #### Returns `Promise`\<\{ `reasons`: `string`[]; `valid`: `boolean`; \}\> --- ## Page: RegistryRootVerifier URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/RegistryRootVerifier [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / RegistryRootVerifier # Interface: RegistryRootVerifier Verifier used to check a registry root signature. ## Properties ### publicKeyDigest > **publicKeyDigest**: `string` ## Methods ### verify()? > `optional` **verify**(`payload`, `signature`, `indices?`): `boolean` \| `Promise`\<`boolean`\> #### Parameters ##### payload `Uint8Array` ##### signature `Uint8Array` ##### indices? `SigningIndices` #### Returns `boolean` \| `Promise`\<`boolean`\> --- ## Page: RegistrySignedTransition URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/RegistrySignedTransition [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / RegistrySignedTransition # Interface: RegistrySignedTransition ## Properties ### delta > **delta**: [`RegistryTransitionDelta`](RegistryTransitionDelta.md) *** ### root > **root**: `string` *** ### signature > **signature**: `Uint8Array` *** ### signedAt > **signedAt**: `number` *** ### signerPublicKey > **signerPublicKey**: `string` --- ## Page: RegistryTransitionDelta URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/RegistryTransitionDelta [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / RegistryTransitionDelta # Interface: RegistryTransitionDelta ## Properties ### op > **op**: [`RegistryOperation`](RegistryOperation.md) *** ### opHash > **opHash**: `string` *** ### previousRoot? > `optional` **previousRoot?**: `string` *** ### reason? > `optional` **reason?**: `string` *** ### root > **root**: `string` *** ### sequence? > `optional` **sequence?**: `number` Monotonic anti-reorg sequence (#34) — must advance on every applied transition. *** ### signedAt > **signedAt**: `number` --- ## Page: RegistryTransitionSigner URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/RegistryTransitionSigner [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / RegistryTransitionSigner # Interface: RegistryTransitionSigner Signer used to authorize registry transitions. Aligned with Omnia's `ChannelSigner` (#31): `sign(payload, indices)` so WOTS key-indices are bound at signing time and a single leased key is never reused across records. ## Properties ### publicKeyDigest > **publicKeyDigest**: `string` ## Methods ### sign() > **sign**(`payload`, `indices`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> #### Parameters ##### payload `Uint8Array` ##### indices `SigningIndices` #### Returns `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> --- ## Page: ValidateLiquidityAgainstPolicyParams URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/ValidateLiquidityAgainstPolicyParams [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / ValidateLiquidityAgainstPolicyParams # Interface: ValidateLiquidityAgainstPolicyParams ## Properties ### policy > **policy**: [`LiquidityBondPolicy`](LiquidityBondPolicy.md) *** ### pool > **pool**: [`LiquidityPoolManifest`](LiquidityPoolManifest.md) *** ### position > **position**: [`LiquidityPosition`](LiquidityPosition.md) --- ## Page: VerifyLiquidityAllocationParams URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/VerifyLiquidityAllocationParams [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / VerifyLiquidityAllocationParams # Interface: VerifyLiquidityAllocationParams ## Properties ### allocation > **allocation**: [`LiquidityAllocation`](LiquidityAllocation.md) *** ### position > **position**: [`LiquidityPosition`](LiquidityPosition.md) --- ## Page: VerifyLiquidityCommitmentParams URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/VerifyLiquidityCommitmentParams [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / VerifyLiquidityCommitmentParams # Interface: VerifyLiquidityCommitmentParams ## Properties ### chainProvider? > `optional` **chainProvider?**: [`LiquidityChainFundingVerifier`](LiquidityChainFundingVerifier.md) On-chain funding verifier. Without it, verified commits return REQUIRES_LIVE_VERIFIER. *** ### commitment > **commitment**: [`LiquidityCommitment`](LiquidityCommitment.md) *** ### now? > `optional` **now?**: `number` *** ### pool > **pool**: [`LiquidityPoolManifest`](LiquidityPoolManifest.md) --- ## Page: VerifyLiquidityFeeRecordParams URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/VerifyLiquidityFeeRecordParams [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / VerifyLiquidityFeeRecordParams # Interface: VerifyLiquidityFeeRecordParams ## Properties ### feeProofVerifier? > `optional` **feeProofVerifier?**: [`FeeProofVerifier`](FeeProofVerifier.md) Verifier for earnable sources; absent => earnable records fail verification. *** ### position > **position**: [`LiquidityPosition`](LiquidityPosition.md) *** ### record > **record**: [`LiquidityFeeRecord`](LiquidityFeeRecord.md) --- ## Page: VerifyLiquidityPoolManifestParams URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/VerifyLiquidityPoolManifestParams [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / VerifyLiquidityPoolManifestParams # Interface: VerifyLiquidityPoolManifestParams ## Properties ### manifest > **manifest**: [`LiquidityPoolManifest`](LiquidityPoolManifest.md) *** ### now? > `optional` **now?**: `number` *** ### requireOperatorBond? > `optional` **requireOperatorBond?**: `boolean` When true, a cryptographically valid operator autobond is required. --- ## Page: VerifyLiquidityPositionParams URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/VerifyLiquidityPositionParams [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / VerifyLiquidityPositionParams # Interface: VerifyLiquidityPositionParams ## Properties ### now? > `optional` **now?**: `number` *** ### pool > **pool**: [`LiquidityPoolManifest`](LiquidityPoolManifest.md) *** ### position > **position**: [`LiquidityPosition`](LiquidityPosition.md) --- ## Page: VerifyLiquidityReceiptParams URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/VerifyLiquidityReceiptParams [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / VerifyLiquidityReceiptParams # Interface: VerifyLiquidityReceiptParams ## Properties ### position > **position**: [`LiquidityPosition`](LiquidityPosition.md) *** ### receipt > **receipt**: [`LiquidityReceipt`](LiquidityReceipt.md) --- ## Page: VerifyLpIdentityParams URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/VerifyLpIdentityParams [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / VerifyLpIdentityParams # Interface: VerifyLpIdentityParams ## Properties ### commitment > **commitment**: [`LiquidityCommitment`](LiquidityCommitment.md) *** ### identityGraph? > `optional` **identityGraph?**: `unknown` *** ### proof? > `optional` **proof?**: [`IdentityChallengeProof`](IdentityChallengeProof.md) --- ## Page: VerifyPoolOperatorIdentityParams URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/VerifyPoolOperatorIdentityParams [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / VerifyPoolOperatorIdentityParams # Interface: VerifyPoolOperatorIdentityParams ## Properties ### identityGraph? > `optional` **identityGraph?**: `unknown` *** ### manifest > **manifest**: [`LiquidityPoolManifest`](LiquidityPoolManifest.md) *** ### proof? > `optional` **proof?**: [`IdentityChallengeProof`](IdentityChallengeProof.md) Signature-backed challenge proof — the load-bearing identity check. --- ## Page: VerifyReceiptOwnerIdentityParams URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/VerifyReceiptOwnerIdentityParams [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / VerifyReceiptOwnerIdentityParams # Interface: VerifyReceiptOwnerIdentityParams ## Properties ### identityGraph? > `optional` **identityGraph?**: `unknown` *** ### proof? > `optional` **proof?**: [`IdentityChallengeProof`](IdentityChallengeProof.md) *** ### receipt > **receipt**: [`LiquidityReceipt`](LiquidityReceipt.md) --- ## Page: VerifyWithdrawalAllowedParams URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/VerifyWithdrawalAllowedParams [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / VerifyWithdrawalAllowedParams # Interface: VerifyWithdrawalAllowedParams ## Properties ### intent > **intent**: [`WithdrawalIntent`](WithdrawalIntent.md) *** ### now? > `optional` **now?**: `number` *** ### pool > **pool**: [`LiquidityPoolManifest`](LiquidityPoolManifest.md) *** ### position > **position**: [`LiquidityPosition`](LiquidityPosition.md) --- ## Page: WithdrawalIntent URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/interfaces/WithdrawalIntent [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / WithdrawalIntent # Interface: WithdrawalIntent ## Properties ### amount > **amount**: `bigint` *** ### approvedAt? > `optional` **approvedAt?**: `number` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### ownerAddress > **ownerAddress**: `string` *** ### poolId > **poolId**: `string` *** ### positionId > **positionId**: `string` *** ### reason? > `optional` **reason?**: `string` *** ### rejectedAt? > `optional` **rejectedAt?**: `number` *** ### requestedAt > **requestedAt**: `number` *** ### status > **status**: [`WithdrawalStatus`](../type-aliases/WithdrawalStatus.md) *** ### withdrawalId > **withdrawalId**: `string` --- ## Page: AllocationStatus URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/type-aliases/AllocationStatus [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / AllocationStatus # Type Alias: AllocationStatus > **AllocationStatus** = `"active"` \| `"reserved"` \| `"released"` \| `"depleted"` \| `"invalid"` --- ## Page: AllocationType URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/type-aliases/AllocationType [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / AllocationType # Type Alias: AllocationType > **AllocationType** = `"route-reserve"` \| `"channel-capital"` \| `"factory-capital"` \| `"rfq-inventory"` \| `"settlement-reserve"` \| `"vtxo-backing"` \| `"manual-reserve"` --- ## Page: CommitmentStatus URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/type-aliases/CommitmentStatus [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / CommitmentStatus # Type Alias: CommitmentStatus > **CommitmentStatus** = `"draft"` \| `"signed"` \| `"accepted"` \| `"rejected"` \| `"expired"` \| `"cancelled"` --- ## Page: EarnableFeeSource URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/type-aliases/EarnableFeeSource [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / EarnableFeeSource # Type Alias: EarnableFeeSource > **EarnableFeeSource** = `"route-fee"` \| `"rfq-spread"` \| `"merchant-fee"` Fee sources that must prove real earnings (HTLC fulfillment / signed route record). --- ## Page: FeeModel URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/type-aliases/FeeModel [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / FeeModel # Type Alias: FeeModel > **FeeModel** = `"none"` \| `"record-only"` \| `"pro-rata"` \| `"fixed-bps"` \| `"external"` --- ## Page: FeeSource URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/type-aliases/FeeSource [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / FeeSource # Type Alias: FeeSource > **FeeSource** = `"route-fee"` \| `"rfq-spread"` \| `"merchant-fee"` \| `"manual-adjustment"` \| `"external-record"` --- ## Page: LiquidityAsset URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/type-aliases/LiquidityAsset [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / LiquidityAsset # Type Alias: LiquidityAsset > **LiquidityAsset** = `"MINIMA"` \| `"USDT"` \| `"TOTEM"` \| `string` --- ## Page: LiquidityBondVerifyCode URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/type-aliases/LiquidityBondVerifyCode [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / LiquidityBondVerifyCode # Type Alias: LiquidityBondVerifyCode > **LiquidityBondVerifyCode** = `"OK"` \| `"POOL_MANIFEST_INVALID"` \| `"POOL_MANIFEST_EXPIRED"` \| `"POOL_IDENTITY_NOT_AUTHORISED"` \| `"LP_IDENTITY_NOT_AUTHORISED"` \| `"PROVIDER_REF_INVALID"` \| `"COMMITMENT_INVALID"` \| `"COMMITMENT_EXPIRED"` \| `"POSITION_INVALID"` \| `"POSITION_NOT_ACTIVE"` \| `"POSITION_LOCKED"` \| `"POSITION_DEPLETED"` \| `"RECEIPT_INVALID"` \| `"RECEIPT_OWNER_NOT_AUTHORISED"` \| `"ASSET_NOT_ACCEPTED"` \| `"AMOUNT_TOO_SMALL"` \| `"LOCK_TERMS_INVALID"` \| `"ALLOCATION_INVALID"` \| `"ALLOCATION_EXCEEDS_POSITION"` \| `"FEE_RECORD_INVALID"` \| `"WITHDRAWAL_NOT_ALLOWED"` \| `"DOUBLE_COUNTED_LIQUIDITY"` \| `"REQUIRES_LIVE_VERIFIER"` \| `"UNSUPPORTED_PROOF_TYPE"` --- ## Page: LiquidityPoolType URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/type-aliases/LiquidityPoolType [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / LiquidityPoolType # Type Alias: LiquidityPoolType > **LiquidityPoolType** = `"omnia-router"` \| `"omnia-channel"` \| `"omnia-factory"` \| `"vtxo-pool"` \| `"statechain-exit-reserve"` \| `"rfq-inventory"` \| `"merchant-settlement"` \| `"community-pool"` \| `"sandbox"` --- ## Page: LiquidityPositionStatus URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/type-aliases/LiquidityPositionStatus [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / LiquidityPositionStatus # Type Alias: LiquidityPositionStatus > **LiquidityPositionStatus** = `"draft"` \| `"committed"` \| `"active"` \| `"allocated"` \| `"partially-reserved"` \| `"fully-reserved"` \| `"quiescing"` \| `"withdrawal-requested"` \| `"withdrawn"` \| `"depleted"` \| `"disputed"` \| `"invalid"` \| `"expired"` --- ## Page: LiquidityPurpose URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/type-aliases/LiquidityPurpose [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / LiquidityPurpose # Type Alias: LiquidityPurpose > **LiquidityPurpose** = `"omnia-router-liquidity"` \| `"omnia-channel-capital"` \| `"omnia-factory-capital"` \| `"vtxo-pool-backing"` \| `"statechain-exit-reserve"` \| `"rfq-inventory"` \| `"merchant-settlement-reserve"` \| `"community-liquidity"` \| `"sandbox-liquidity"` --- ## Page: LockType URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/type-aliases/LockType [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / LockType # Type Alias: LockType > **LockType** = `"none"` \| `"fixed-duration"` \| `"until-block"` \| `"until-epoch"` \| `"manual-release"` \| `"future-covenant"` --- ## Page: PoolWriterRegistry URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/type-aliases/PoolWriterRegistry [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / PoolWriterRegistry # Type Alias: PoolWriterRegistry > **PoolWriterRegistry** = `Record`\<`string`, `string`\> Per-pool writer registry (#34): each pool has exactly one authorized signer. A transition touching a pool must be signed by that pool's writer — an operator cannot mutate another pool's state. --- ## Page: ProofRefType URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/type-aliases/ProofRefType [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / ProofRefType # Type Alias: ProofRefType > **ProofRefType** = `"manual"` \| `"declared"` \| `"totem-proof"` \| `"future-live-chain"` \| `"future-omnia-state"` --- ## Page: WithdrawalStatus URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/type-aliases/WithdrawalStatus [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / WithdrawalStatus # Type Alias: WithdrawalStatus > **WithdrawalStatus** = `"requested"` \| `"approved"` \| `"rejected"` \| `"cancelled"` \| `"settled-externally"` --- ## Page: DEFAULT_LIQUIDITY_BOND_TOPIC_PREFIX URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/variables/DEFAULT_LIQUIDITY_BOND_TOPIC_PREFIX [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / DEFAULT\_LIQUIDITY\_BOND\_TOPIC\_PREFIX # Variable: DEFAULT\_LIQUIDITY\_BOND\_TOPIC\_PREFIX > `const` **DEFAULT\_LIQUIDITY\_BOND\_TOPIC\_PREFIX**: `"totem.liquidity-bond.v1"` = `'totem.liquidity-bond.v1'` --- ## Page: DEFAULT_LIQUIDITY_RISK_POLICY URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/variables/DEFAULT_LIQUIDITY_RISK_POLICY [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / DEFAULT\_LIQUIDITY\_RISK\_POLICY # Variable: DEFAULT\_LIQUIDITY\_RISK\_POLICY > `const` **DEFAULT\_LIQUIDITY\_RISK\_POLICY**: `object` ## Type Declaration ### haircutBps > `readonly` **haircutBps**: `2000` = `2000` ### maxAllocationBps > `readonly` **maxAllocationBps**: `8000` = `8000` ### requireIdentity > `readonly` **requireIdentity**: `true` = `true` ### requireProviderBond > `readonly` **requireProviderBond**: `false` = `false` --- ## Page: DEFAULT_MINIMA_TOKEN_ID URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/variables/DEFAULT_MINIMA_TOKEN_ID [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / DEFAULT\_MINIMA\_TOKEN\_ID # Variable: DEFAULT\_MINIMA\_TOKEN\_ID > `const` **DEFAULT\_MINIMA\_TOKEN\_ID**: `"0x00"` = `'0x00'` --- ## Page: DEFAULT_REGISTRY_ROOT_DOMAIN URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/variables/DEFAULT_REGISTRY_ROOT_DOMAIN [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / DEFAULT\_REGISTRY\_ROOT\_DOMAIN # Variable: DEFAULT\_REGISTRY\_ROOT\_DOMAIN > `const` **DEFAULT\_REGISTRY\_ROOT\_DOMAIN**: `"totemsdk/liquidity-bond/registry/v1"` = `'totemsdk/liquidity-bond/registry/v1'` --- ## Page: IDENTITY_CHALLENGE_DOMAIN URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/variables/IDENTITY_CHALLENGE_DOMAIN [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / IDENTITY\_CHALLENGE\_DOMAIN # Variable: IDENTITY\_CHALLENGE\_DOMAIN > `const` **IDENTITY\_CHALLENGE\_DOMAIN**: `"totemsdk/liquidity-bond/identity/v1"` = `'totemsdk/liquidity-bond/identity/v1'` --- ## Page: OPERATOR_AUTOBOND_DOMAIN URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/variables/OPERATOR_AUTOBOND_DOMAIN [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / OPERATOR\_AUTOBOND\_DOMAIN # Variable: OPERATOR\_AUTOBOND\_DOMAIN > `const` **OPERATOR\_AUTOBOND\_DOMAIN**: `"totemsdk/liquidity-bond/pool-operator/v1"` = `'totemsdk/liquidity-bond/pool-operator/v1'` --- ## Page: RECEIPT_HASH_DOMAIN URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/variables/RECEIPT_HASH_DOMAIN [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / RECEIPT\_HASH\_DOMAIN # Variable: RECEIPT\_HASH\_DOMAIN > `const` **RECEIPT\_HASH\_DOMAIN**: `"totemsdk/liquidity-bond/receipt/v1"` = `'totemsdk/liquidity-bond/receipt/v1'` --- ## Page: WITHDRAWAL_ID_DOMAIN URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/variables/WITHDRAWAL_ID_DOMAIN [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / WITHDRAWAL\_ID\_DOMAIN # Variable: WITHDRAWAL\_ID\_DOMAIN > `const` **WITHDRAWAL\_ID\_DOMAIN**: `"totemsdk/liquidity-bond/withdrawal/v1"` = `'totemsdk/liquidity-bond/withdrawal/v1'` --- ## Page: registryRootPort URL: https://docs.totem.ing/api/totemsdk-liquidity-bond/variables/registryRootPort [**@totemsdk/liquidity-bond**](../index.md) *** [@totemsdk/liquidity-bond](../index.md) / registryRootPort # Variable: registryRootPort > `const` **registryRootPort**: [`RegistryRootPort`](../interfaces/RegistryRootPort.md) --- ## Page: addLocationClaimToGraph URL: https://docs.totem.ing/api/totemsdk-location-proof/functions/addLocationClaimToGraph [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / addLocationClaimToGraph # Function: addLocationClaimToGraph() > **addLocationClaimToGraph**(`graph`, `claim`): `ProofGraph` Add a location claim as a 'custom' node to a proof graph (immutable — returns a new graph). ## Parameters ### graph `ProofGraph` ### claim [`LocationClaim`](../interfaces/LocationClaim.md) ## Returns `ProofGraph` --- ## Page: addLocationProofToGraph URL: https://docs.totem.ing/api/totemsdk-location-proof/functions/addLocationProofToGraph [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / addLocationProofToGraph # Function: addLocationProofToGraph() > **addLocationProofToGraph**(`graph`, `signed`): `ProofGraph` Index a signed location proof into a proof graph (immutable — returns a new graph). Delegates to @totemsdk/proofgraph's addProof, which creates the proof / identity / subject / evidence nodes and proves / issued_by / about / references edges. ## Parameters ### graph `ProofGraph` ### signed `SignedProof` ## Returns `ProofGraph` --- ## Page: canonicalJson URL: https://docs.totem.ing/api/totemsdk-location-proof/functions/canonicalJson [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / canonicalJson # Function: canonicalJson() > **canonicalJson**(`value`): `string` Deterministic canonical JSON with recursively sorted keys. Never use bare JSON.stringify on objects passed to hash or sign operations. ## Parameters ### value `unknown` ## Returns `string` --- ## Page: computeLocationClaimId URL: https://docs.totem.ing/api/totemsdk-location-proof/functions/computeLocationClaimId [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / computeLocationClaimId # Function: computeLocationClaimId() > **computeLocationClaimId**(`input`): `string` Compute a stable URI-style claim ID: "totem:location:". Callers pass the claim minus claimId; mutable fields are excluded internally. ## Parameters ### input `Omit`\<[`LocationClaim`](../interfaces/LocationClaim.md), `"claimId"`\> ## Returns `string` --- ## Page: computeMovementTrailId URL: https://docs.totem.ing/api/totemsdk-location-proof/functions/computeMovementTrailId [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / computeMovementTrailId # Function: computeMovementTrailId() > **computeMovementTrailId**(`input`): `string` Compute a stable URI-style movement trail ID: "totem:movement:". Derived fields (maxComputedSpeedMps, impossibleJumpDetected) and metadata are excluded so the ID depends only on the trail content. ## Parameters ### input `Omit`\<[`MovementTrail`](../interfaces/MovementTrail.md), `"trailId"`\> ## Returns `string` --- ## Page: computeSpeedMps URL: https://docs.totem.ing/api/totemsdk-location-proof/functions/computeSpeedMps [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / computeSpeedMps # Function: computeSpeedMps() > **computeSpeedMps**(`a`, `b`): `number` Average speed between two samples in m/s. Returns 0 when the timestamps do not advance (avoiding division by zero). ## Parameters ### a [`MotionSample`](../interfaces/MotionSample.md) ### b [`MotionSample`](../interfaces/MotionSample.md) ## Returns `number` --- ## Page: createLocationClaim URL: https://docs.totem.ing/api/totemsdk-location-proof/functions/createLocationClaim [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / createLocationClaim # Function: createLocationClaim() > **createLocationClaim**(`input`): [`LocationClaim`](../interfaces/LocationClaim.md) Create a LocationClaim with a content-derived claimId. The claimId is computed from the stable fields (receivedAt, confidenceScore, and metadata are excluded from the hash). ## Parameters ### input `Omit`\<[`LocationClaim`](../interfaces/LocationClaim.md), `"claimId"`\> ## Returns [`LocationClaim`](../interfaces/LocationClaim.md) --- ## Page: createMovementTrail URL: https://docs.totem.ing/api/totemsdk-location-proof/functions/createMovementTrail [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / createMovementTrail # Function: createMovementTrail() > **createMovementTrail**(`params`): [`MovementTrail`](../interfaces/MovementTrail.md) Build a MovementTrail from a set of samples. Samples are sorted by observedAt, and startedAt/endedAt are derived from the sorted range. maxComputedSpeedMps and impossibleJumpDetected are computed from the samples. The trailId is content-derived (see computeMovementTrailId) unless explicitly provided. ## Parameters ### params [`CreateMovementTrailParams`](../interfaces/CreateMovementTrailParams.md) ## Returns [`MovementTrail`](../interfaces/MovementTrail.md) --- ## Page: createUnsignedLocationProof URL: https://docs.totem.ing/api/totemsdk-location-proof/functions/createUnsignedLocationProof [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / createUnsignedLocationProof # Function: createUnsignedLocationProof() > **createUnsignedLocationProof**(`params`): `UnsignedProof` Create an unsigned attestation proof for a location claim. The proof claims: "this device identity claimed this position, at this time, with this source context, optionally linked to a challenge and corroboration." It does NOT claim absolute or legally conclusive truth. ## Parameters ### params [`CreateLocationProofParams`](../interfaces/CreateLocationProofParams.md) ## Returns `UnsignedProof` --- ## Page: detectImpossibleJumps URL: https://docs.totem.ing/api/totemsdk-location-proof/functions/detectImpossibleJumps [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / detectImpossibleJumps # Function: detectImpossibleJumps() > **detectImpossibleJumps**(`samples`, `options?`): [`ImpossibleJumpResult`](../interfaces/ImpossibleJumpResult.md) Scan consecutive samples for segments faster than the threshold. maxSpeedMps always reports the maximum observed consecutive-pair speed regardless of the threshold. ## Parameters ### samples [`MotionSample`](../interfaces/MotionSample.md)[] ### options? [`MotionOptions`](../interfaces/MotionOptions.md) = `{}` ## Returns [`ImpossibleJumpResult`](../interfaces/ImpossibleJumpResult.md) --- ## Page: distanceMeters URL: https://docs.totem.ing/api/totemsdk-location-proof/functions/distanceMeters [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / distanceMeters # Function: distanceMeters() > **distanceMeters**(`a`, `b`): `number` Great-circle distance between two points using the Haversine formula. ## Parameters ### a [`GeoPoint`](../interfaces/GeoPoint.md) ### b [`GeoPoint`](../interfaces/GeoPoint.md) ## Returns `number` --- ## Page: hashLocationClaim URL: https://docs.totem.ing/api/totemsdk-location-proof/functions/hashLocationClaim [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / hashLocationClaim # Function: hashLocationClaim() > **hashLocationClaim**(`claim`): `string` Hash a complete LocationClaim (excluding claimId and mutable fields) to lowercase SHA3-256 hex without a 0x prefix. ## Parameters ### claim [`LocationClaim`](../interfaces/LocationClaim.md) ## Returns `string` --- ## Page: hashMovementTrail URL: https://docs.totem.ing/api/totemsdk-location-proof/functions/hashMovementTrail [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / hashMovementTrail # Function: hashMovementTrail() > **hashMovementTrail**(`trail`): `string` Hash a complete MovementTrail (excluding trailId and derived fields) to lowercase SHA3-256 hex without a 0x prefix. ## Parameters ### trail [`MovementTrail`](../interfaces/MovementTrail.md) ## Returns `string` --- ## Page: isChallengeExpired URL: https://docs.totem.ing/api/totemsdk-location-proof/functions/isChallengeExpired [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / isChallengeExpired # Function: isChallengeExpired() > **isChallengeExpired**(`challenge`, `now`): `boolean` ## Parameters ### challenge [`LocationChallenge`](../interfaces/LocationChallenge.md) ### now `number` ## Returns `boolean` --- ## Page: locationClaimToEvidenceRef URL: https://docs.totem.ing/api/totemsdk-location-proof/functions/locationClaimToEvidenceRef [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / locationClaimToEvidenceRef # Function: locationClaimToEvidenceRef() > **locationClaimToEvidenceRef**(`claim`): `EvidenceRef` Convert a LocationClaim into an EvidenceRef for inclusion in a proof. ## Parameters ### claim [`LocationClaim`](../interfaces/LocationClaim.md) ## Returns `EvidenceRef` --- ## Page: locationClaimToProofGraphNode URL: https://docs.totem.ing/api/totemsdk-location-proof/functions/locationClaimToProofGraphNode [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / locationClaimToProofGraphNode # Function: locationClaimToProofGraphNode() > **locationClaimToProofGraphNode**(`claim`): `ProofGraphNode` Build a ProofGraphNode for a location claim. Uses the 'custom' node type (no native proofgraph node type fits a location claim). Node ID is deterministic: "custom:". ## Parameters ### claim [`LocationClaim`](../interfaces/LocationClaim.md) ## Returns `ProofGraphNode` --- ## Page: locationProofToGraphEdges URL: https://docs.totem.ing/api/totemsdk-location-proof/functions/locationProofToGraphEdges [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / locationProofToGraphEdges # Function: locationProofToGraphEdges() > **locationProofToGraphEdges**(`signed`): `ProofGraphEdge`[] Build ProofGraphEdges for a signed location proof: about proof → subject references proof → each evidence ref supports each evidence ref → proof Edge IDs are deterministic (content-derived in @totemsdk/proofgraph). ## Parameters ### signed `SignedProof` ## Returns `ProofGraphEdge`[] --- ## Page: movementTrailToEvidenceRef URL: https://docs.totem.ing/api/totemsdk-location-proof/functions/movementTrailToEvidenceRef [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / movementTrailToEvidenceRef # Function: movementTrailToEvidenceRef() > **movementTrailToEvidenceRef**(`trail`): `EvidenceRef` Convert a MovementTrail into an EvidenceRef for inclusion in a proof. ## Parameters ### trail [`MovementTrail`](../interfaces/MovementTrail.md) ## Returns `EvidenceRef` --- ## Page: scoreLocationClaim URL: https://docs.totem.ing/api/totemsdk-location-proof/functions/scoreLocationClaim [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / scoreLocationClaim # Function: scoreLocationClaim() > **scoreLocationClaim**(`claim`, `options?`): [`LocationConfidenceResult`](../interfaces/LocationConfidenceResult.md) ## Parameters ### claim [`LocationClaim`](../interfaces/LocationClaim.md) ### options? [`LocationConfidenceOptions`](../interfaces/LocationConfidenceOptions.md) = `{}` ## Returns [`LocationConfidenceResult`](../interfaces/LocationConfidenceResult.md) --- ## Page: signLocationProof URL: https://docs.totem.ing/api/totemsdk-location-proof/functions/signLocationProof [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / signLocationProof # Function: signLocationProof() > **signLocationProof**(`unsigned`, `seed`, `keyIndex`): `SignedProof` Sign an unsigned location proof with a WOTS key. The caller is responsible for reserving the WOTS key index (see @totemsdk/wots-lease) before calling — one-time key warning applies. ## Parameters ### unsigned `UnsignedProof` ### seed `Uint8Array` ### keyIndex `number` ## Returns `SignedProof` --- ## Page: signLocationProofWithLease URL: https://docs.totem.ing/api/totemsdk-location-proof/functions/signLocationProofWithLease [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / signLocationProofWithLease # Function: signLocationProofWithLease() > **signLocationProofWithLease**(`unsigned`, `seed`, `leaseProvider`, `options?`): `Promise`\<`SignedProof`\> Sign an unsigned location proof using a WOTS lease provider to reserve the key index, preventing concurrent-use or restart-reuse of one-time WOTS keys. The lease provider must satisfy a minimal signature compatible with @totemsdk/wots-lease's WotsLeaseProvider (see @totemsdk/proof.signWithLease). Callers who manage key indices directly should use signLocationProof(). On success the reservation is committed. On failure it is burned so the index can be marked unavailable rather than silently lost. ## Parameters ### unsigned `UnsignedProof` ### seed `Uint8Array` ### leaseProvider #### burnReservation #### commitKeyUse #### reserveKeyUse ### options? #### treeId? `string` #### ttlMs? `number` ## Returns `Promise`\<`SignedProof`\> --- ## Page: toHex URL: https://docs.totem.ing/api/totemsdk-location-proof/functions/toHex [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / toHex # Function: toHex() > **toHex**(`bytes`): `string` ## Parameters ### bytes `Uint8Array` ## Returns `string` --- ## Page: validateGeoPoint URL: https://docs.totem.ing/api/totemsdk-location-proof/functions/validateGeoPoint [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / validateGeoPoint # Function: validateGeoPoint() > **validateGeoPoint**(`point`): [`LocationValidationResult`](../interfaces/LocationValidationResult.md) ## Parameters ### point [`GeoPoint`](../interfaces/GeoPoint.md) ## Returns [`LocationValidationResult`](../interfaces/LocationValidationResult.md) --- ## Page: validateLocationClaim URL: https://docs.totem.ing/api/totemsdk-location-proof/functions/validateLocationClaim [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / validateLocationClaim # Function: validateLocationClaim() > **validateLocationClaim**(`claim`): [`LocationValidationResult`](../interfaces/LocationValidationResult.md) ## Parameters ### claim [`LocationClaim`](../interfaces/LocationClaim.md) ## Returns [`LocationValidationResult`](../interfaces/LocationValidationResult.md) --- ## Page: validateMovementTrail URL: https://docs.totem.ing/api/totemsdk-location-proof/functions/validateMovementTrail [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / validateMovementTrail # Function: validateMovementTrail() > **validateMovementTrail**(`trail`): [`LocationValidationResult`](../interfaces/LocationValidationResult.md) ## Parameters ### trail [`MovementTrail`](../interfaces/MovementTrail.md) ## Returns [`LocationValidationResult`](../interfaces/LocationValidationResult.md) --- ## Page: verifyLocationProof URL: https://docs.totem.ing/api/totemsdk-location-proof/functions/verifyLocationProof [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / verifyLocationProof # Function: verifyLocationProof() > **verifyLocationProof**(`signed`, `options?`): [`LocationProofVerifyResult`](../interfaces/LocationProofVerifyResult.md) Verify a signed location proof end to end. Checks: 1. the underlying @totemsdk/proof verification (signature, proofId, expiry) 2. payload contains a structurally valid LocationClaim 3. the claim's claimId matches a recomputation from its stable fields 4. the location-claim evidence hash matches the payload claim 5. the challenge (if present) has not expired Anchoring is not required. ## Parameters ### signed `SignedProof` ### options? #### now? `number` ## Returns [`LocationProofVerifyResult`](../interfaces/LocationProofVerifyResult.md) --- ## Page: CreateLocationProofParams URL: https://docs.totem.ing/api/totemsdk-location-proof/interfaces/CreateLocationProofParams [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / CreateLocationProofParams # Interface: CreateLocationProofParams ## Properties ### claim > **claim**: [`LocationClaim`](LocationClaim.md) *** ### expiresAt? > `optional` **expiresAt?**: `number` *** ### issuedAt? > `optional` **issuedAt?**: `number` *** ### issuer? > `optional` **issuer?**: `string` proof issuer; defaults to claim.subjectId --- ## Page: CreateMovementTrailParams URL: https://docs.totem.ing/api/totemsdk-location-proof/interfaces/CreateMovementTrailParams [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / CreateMovementTrailParams # Interface: CreateMovementTrailParams ## Properties ### deviceId > **deviceId**: `string` *** ### maxSpeedMps? > `optional` **maxSpeedMps?**: `number` override for the impossible-jump speed threshold in m/s (default 100) *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### samples > **samples**: [`MotionSample`](MotionSample.md)[] *** ### subjectId > **subjectId**: `string` *** ### trailId? > `optional` **trailId?**: `string` --- ## Page: GeoPoint URL: https://docs.totem.ing/api/totemsdk-location-proof/interfaces/GeoPoint [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / GeoPoint # Interface: GeoPoint ## Properties ### accuracyM? > `optional` **accuracyM?**: `number` *** ### altitudeM? > `optional` **altitudeM?**: `number` *** ### lat > **lat**: `number` *** ### lon > **lon**: `number` --- ## Page: ImpossibleJumpResult URL: https://docs.totem.ing/api/totemsdk-location-proof/interfaces/ImpossibleJumpResult [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / ImpossibleJumpResult # Interface: ImpossibleJumpResult ## Properties ### impossible > **impossible**: `boolean` *** ### jumps > **jumps**: `object`[] #### deltaSeconds > **deltaSeconds**: `number` #### distanceM > **distanceM**: `number` #### fromIndex > **fromIndex**: `number` #### speedMps > **speedMps**: `number` #### toIndex > **toIndex**: `number` *** ### maxSpeedMps > **maxSpeedMps**: `number` --- ## Page: LocationChallenge URL: https://docs.totem.ing/api/totemsdk-location-proof/interfaces/LocationChallenge [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / LocationChallenge # Interface: LocationChallenge ## Properties ### expiresAt? > `optional` **expiresAt?**: `number` *** ### issuedAt > **issuedAt**: `number` *** ### nonce > **nonce**: `string` *** ### verifierId > **verifierId**: `string` --- ## Page: LocationClaim URL: https://docs.totem.ing/api/totemsdk-location-proof/interfaces/LocationClaim [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / LocationClaim # Interface: LocationClaim ## Properties ### challenge? > `optional` **challenge?**: [`LocationChallenge`](LocationChallenge.md) *** ### claimId > **claimId**: `string` *** ### confidenceScore? > `optional` **confidenceScore?**: `number` *** ### corroboration? > `optional` **corroboration?**: [`LocationCorroboration`](LocationCorroboration.md) *** ### deviceClass? > `optional` **deviceClass?**: [`DeviceClass`](../type-aliases/DeviceClass.md) *** ### deviceId > **deviceId**: `string` *** ### location > **location**: [`GeoPoint`](GeoPoint.md) *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### observedAt > **observedAt**: `number` *** ### operatorId? > `optional` **operatorId?**: `string` *** ### receivedAt? > `optional` **receivedAt?**: `number` *** ### source > **source**: [`LocationSource`](LocationSource.md) *** ### subjectId > **subjectId**: `string` *** ### uncertainty? > `optional` **uncertainty?**: `string`[] --- ## Page: LocationConfidenceOptions URL: https://docs.totem.ing/api/totemsdk-location-proof/interfaces/LocationConfidenceOptions [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / LocationConfidenceOptions # Interface: LocationConfidenceOptions ## Properties ### accuracyThresholdM? > `optional` **accuracyThresholdM?**: `number` accuracyM at or below this value is considered strong (default 10m) *** ### maxAgeMs? > `optional` **maxAgeMs?**: `number` a claim older than maxAgeMs is considered stale (default 300_000) *** ### now? > `optional` **now?**: `number` explicit "now" timestamp for deterministic scoring (default Date.now()) *** ### strongHdop? > `optional` **strongHdop?**: `number` HDOP at or below this value is considered low (default 2) *** ### strongSatellites? > `optional` **strongSatellites?**: `number` satellite count at or above this value is considered strong (default 8) *** ### weakAccuracyThresholdM? > `optional` **weakAccuracyThresholdM?**: `number` accuracyM above this value is considered weak (default 3x accuracyThresholdM) --- ## Page: LocationConfidenceResult URL: https://docs.totem.ing/api/totemsdk-location-proof/interfaces/LocationConfidenceResult [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / LocationConfidenceResult # Interface: LocationConfidenceResult ## Properties ### level > **level**: `"none"` \| `"weak"` \| `"moderate"` \| `"strong"` \| `"high"` *** ### negativeSignals > **negativeSignals**: `string`[] *** ### positiveSignals > **positiveSignals**: `string`[] *** ### score > **score**: `number` --- ## Page: LocationCorroboration URL: https://docs.totem.ing/api/totemsdk-location-proof/interfaces/LocationCorroboration [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / LocationCorroboration # Interface: LocationCorroboration ## Properties ### beaconsSeen? > `optional` **beaconsSeen?**: `string`[] *** ### cellTowers? > `optional` **cellTowers?**: `string`[] *** ### lorawanGateways? > `optional` **lorawanGateways?**: `string`[] *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### nearbyDeviceProofIds? > `optional` **nearbyDeviceProofIds?**: `string`[] *** ### networkProfileId? > `optional` **networkProfileId?**: `string` *** ### wifiFingerprints? > `optional` **wifiFingerprints?**: `string`[] --- ## Page: LocationProofVerifyResult URL: https://docs.totem.ing/api/totemsdk-location-proof/interfaces/LocationProofVerifyResult [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / LocationProofVerifyResult # Interface: LocationProofVerifyResult ## Properties ### claimId? > `optional` **claimId?**: `string` *** ### evidenceHashValid? > `optional` **evidenceHashValid?**: `boolean` *** ### expired? > `optional` **expired?**: `boolean` *** ### payloadValid? > `optional` **payloadValid?**: `boolean` *** ### reason? > `optional` **reason?**: `string` *** ### signerAddress? > `optional` **signerAddress?**: `string` *** ### valid > **valid**: `boolean` --- ## Page: LocationSource URL: https://docs.totem.ing/api/totemsdk-location-proof/interfaces/LocationSource [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / LocationSource # Interface: LocationSource ## Properties ### fixType? > `optional` **fixType?**: `string` *** ### hdop? > `optional` **hdop?**: `number` *** ### jammingFlag? > `optional` **jammingFlag?**: `boolean` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### nmeaPayloadHash? > `optional` **nmeaPayloadHash?**: `string` *** ### pdop? > `optional` **pdop?**: `number` *** ### rawPayloadHash? > `optional` **rawPayloadHash?**: `string` *** ### satellitesUsed? > `optional` **satellitesUsed?**: `number` *** ### spoofingFlag? > `optional` **spoofingFlag?**: `boolean` *** ### type > **type**: [`LocationSourceType`](../type-aliases/LocationSourceType.md) *** ### vdop? > `optional` **vdop?**: `number` --- ## Page: LocationValidationResult URL: https://docs.totem.ing/api/totemsdk-location-proof/interfaces/LocationValidationResult [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / LocationValidationResult # Interface: LocationValidationResult ## Properties ### errors > **errors**: `string`[] *** ### valid > **valid**: `boolean` *** ### warnings > **warnings**: `string`[] --- ## Page: MotionOptions URL: https://docs.totem.ing/api/totemsdk-location-proof/interfaces/MotionOptions [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / MotionOptions # Interface: MotionOptions ## Properties ### maxSpeedMps? > `optional` **maxSpeedMps?**: `number` speed threshold in m/s above which a segment is an impossible jump (default 100) --- ## Page: MotionSample URL: https://docs.totem.ing/api/totemsdk-location-proof/interfaces/MotionSample [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / MotionSample # Interface: MotionSample ## Properties ### accuracyM? > `optional` **accuracyM?**: `number` *** ### headingDeg? > `optional` **headingDeg?**: `number` *** ### location > **location**: [`GeoPoint`](GeoPoint.md) *** ### observedAt > **observedAt**: `number` *** ### source? > `optional` **source?**: [`LocationSource`](LocationSource.md) *** ### speedMps? > `optional` **speedMps?**: `number` --- ## Page: MovementTrail URL: https://docs.totem.ing/api/totemsdk-location-proof/interfaces/MovementTrail [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / MovementTrail # Interface: MovementTrail ## Properties ### deviceId > **deviceId**: `string` *** ### endedAt > **endedAt**: `number` *** ### impossibleJumpDetected? > `optional` **impossibleJumpDetected?**: `boolean` *** ### maxComputedSpeedMps? > `optional` **maxComputedSpeedMps?**: `number` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### samples > **samples**: [`MotionSample`](MotionSample.md)[] *** ### startedAt > **startedAt**: `number` *** ### subjectId > **subjectId**: `string` *** ### trailId > **trailId**: `string` --- ## Page: DeviceClass URL: https://docs.totem.ing/api/totemsdk-location-proof/type-aliases/DeviceClass [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / DeviceClass # Type Alias: DeviceClass > **DeviceClass** = `"drone"` \| `"vehicle"` \| `"robot"` \| `"ship"` \| `"tractor"` \| `"phone"` \| `"sensor"` \| `"gateway"` \| `"camera"` \| `"weather-station"` \| `"security-device"` \| `"other"` --- ## Page: LocationSourceType URL: https://docs.totem.ing/api/totemsdk-location-proof/type-aliases/LocationSourceType [**@totemsdk/location-proof**](../index.md) *** [@totemsdk/location-proof](../index.md) / LocationSourceType # Type Alias: LocationSourceType > **LocationSourceType** = `"gnss"` \| `"gps"` \| `"rtk"` \| `"cell"` \| `"wifi"` \| `"ble"` \| `"lorawan"` \| `"gateway"` \| `"network"` \| `"manual"` \| `"derived"` \| `"other"` @totemsdk/location-proof — Type definitions Pure schema — device-neutral signed location and movement claims. No hardware drivers, no network, no storage. --- ## Page: FrameParser URL: https://docs.totem.ing/api/totemsdk-lookup-client/classes/FrameParser [**@totemsdk/lookup-client**](../index.md) *** [@totemsdk/lookup-client](../index.md) / FrameParser # Class: FrameParser Accumulates raw incoming bytes and slices out complete length-prefixed frames. Compatible with the 4-byte big-endian uint32 header from @totemsdk/lookup-protocol. ## Constructors ### Constructor > **new FrameParser**(): `FrameParser` #### Returns `FrameParser` ## Methods ### push() > **push**(`chunk`): `LookupMessage`[] #### Parameters ##### chunk `Uint8Array` #### Returns `LookupMessage`[] *** ### reset() > **reset**(): `void` #### Returns `void` --- ## Page: LookupClient URL: https://docs.totem.ing/api/totemsdk-lookup-client/classes/LookupClient [**@totemsdk/lookup-client**](../index.md) *** [@totemsdk/lookup-client](../index.md) / LookupClient # Class: LookupClient ## Constructors ### Constructor > **new LookupClient**(`_config`): `LookupClient` #### Parameters ##### \_config [`LookupClientConfig`](../interfaces/LookupClientConfig.md) #### Returns `LookupClient` ## Methods ### \_connect() > **\_connect**(`transport`): `Promise`\<`void`\> #### Parameters ##### transport [`ITransport`](../interfaces/ITransport.md) #### Returns `Promise`\<`void`\> *** ### announceAgent() > **announceAgent**(`params`): `Promise`\<`void`\> #### Parameters ##### params ###### capabilityId `string` ###### expiresAt `number` ###### latencyMs? `number` ###### manifest `Uint8Array` Encoded SignedManifest bytes — call encodeManifest(signedManifest) first. ###### pricePerCall? `number` ###### tags? `string`[] #### Returns `Promise`\<`void`\> *** ### announceApp() > **announceApp**(`params`): `Promise`\<`void`\> #### Parameters ##### params ###### appId `string` ###### authorAddress? `string` ###### expiresAt `number` ###### isFree? `boolean` ###### manifest `Uint8Array` Encoded SignedManifest bytes — call encodeManifest(signedManifest) first. #### Returns `Promise`\<`void`\> *** ### broadcastTxPoW() > **broadcastTxPoW**(`txpowHex`): `Promise`\<`BroadcastResult`\> #### Parameters ##### txpowHex `string` #### Returns `Promise`\<`BroadcastResult`\> *** ### disconnect() > **disconnect**(): `void` #### Returns `void` *** ### getCoin() > **getCoin**(`coinId`): `Promise`\<`Coin` \| `null`\> #### Parameters ##### coinId `string` #### Returns `Promise`\<`Coin` \| `null`\> *** ### getCoins() > **getCoins**(`query`): `Promise`\<`Coin`[]\> #### Parameters ##### query `CoinsQuery` #### Returns `Promise`\<`Coin`[]\> *** ### getProof() > **getProof**(`coinId`): `Promise`\<`MMRProof`\> #### Parameters ##### coinId `string` #### Returns `Promise`\<`MMRProof`\> *** ### getTip() > **getTip**(): `Promise`\<`ChainTip`\> #### Returns `Promise`\<`ChainTip`\> *** ### getToken() > **getToken**(`tokenId`): `Promise`\<`TokenInfo`\> #### Parameters ##### tokenId `string` #### Returns `Promise`\<`TokenInfo`\> *** ### getTokensByCreator() > **getTokensByCreator**(`_address`): `Promise`\<`TokenInfo`[]\> #### Parameters ##### \_address `string` #### Returns `Promise`\<`TokenInfo`[]\> *** ### leaseBurn() > **leaseBurn**(`reservationId`, `reason`, `indices`): `Promise`\<`void`\> #### Parameters ##### reservationId `string` ##### reason `string` ##### indices ###### addressIndex `number` ###### l1 `number` ###### l2 `number` #### Returns `Promise`\<`void`\> *** ### leaseCommit() > **leaseCommit**(`reservationId`, `txId`, `indices`): `Promise`\<`void`\> #### Parameters ##### reservationId `string` ##### txId `string` ##### indices ###### addressIndex `number` ###### l1 `number` ###### l2 `number` #### Returns `Promise`\<`void`\> *** ### leaseReserve() > **leaseReserve**(`params`): `Promise`\<\{ `certificate?`: `unknown`; `reservation`: `unknown`; \}\> #### Parameters ##### params ###### branchId? `string` ###### deviceId? `string` ###### payloadHash? `string` ###### purpose? `string` ###### treeId `string` ###### ttlMs? `number` #### Returns `Promise`\<\{ `certificate?`: `unknown`; `reservation`: `unknown`; \}\> *** ### on() > **on**(`event`, `handler`): [`Unsubscribe`](../type-aliases/Unsubscribe.md) #### Parameters ##### event `"reconnecting"` \| `"reconnected"` ##### handler `EventHandler` #### Returns [`Unsubscribe`](../type-aliases/Unsubscribe.md) *** ### queryAgents() > **queryAgents**(`params?`): `Promise`\<`object`[]\> #### Parameters ##### params? ###### capabilityName? `string` ###### limit? `number` ###### maxLatencyMs? `number` ###### maxPricePerCall? `number` ###### tags? `string`[] #### Returns `Promise`\<`object`[]\> *** ### queryApps() > **queryApps**(`params?`): `Promise`\<`object`[]\> #### Parameters ##### params? ###### authorAddress? `string` ###### category? `string`[] ###### freeOnly? `boolean` ###### limit? `number` ###### minVersion? `number` #### Returns `Promise`\<`object`[]\> *** ### searchTokens() > **searchTokens**(`_query`): `Promise`\<`TokenInfo`[]\> #### Parameters ##### \_query `TokenSearchQuery` #### Returns `Promise`\<`TokenInfo`[]\> *** ### subscribeCoinUpdates() > **subscribeCoinUpdates**(`cb`): [`Unsubscribe`](../type-aliases/Unsubscribe.md) #### Parameters ##### cb [`CoinUpdateCallback`](../type-aliases/CoinUpdateCallback.md) #### Returns [`Unsubscribe`](../type-aliases/Unsubscribe.md) *** ### watchAddress() > **watchAddress**(`address`): `Promise`\<`void`\> #### Parameters ##### address `string` #### Returns `Promise`\<`void`\> *** ### watchCoin() > **watchCoin**(`coinId`): `Promise`\<`void`\> #### Parameters ##### coinId `string` #### Returns `Promise`\<`void`\> *** ### watchScript() > **watchScript**(`script`): `Promise`\<`void`\> #### Parameters ##### script `string` #### Returns `Promise`\<`void`\> --- ## Page: LookupClientError URL: https://docs.totem.ing/api/totemsdk-lookup-client/classes/LookupClientError [**@totemsdk/lookup-client**](../index.md) *** [@totemsdk/lookup-client](../index.md) / LookupClientError # Class: LookupClientError ## Extends - `Error` ## Constructors ### Constructor > **new LookupClientError**(`code`, `message`): `LookupClientError` #### Parameters ##### code `string` ##### message `string` #### Returns `LookupClientError` #### Overrides `Error.constructor` ## Properties ### code > `readonly` **code**: `string` *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: LookupClientProvider URL: https://docs.totem.ing/api/totemsdk-lookup-client/classes/LookupClientProvider [**@totemsdk/lookup-client**](../index.md) *** [@totemsdk/lookup-client](../index.md) / LookupClientProvider # Class: LookupClientProvider ## Implements - `ChainStateProvider` ## Constructors ### Constructor > **new LookupClientProvider**(`_client`): `LookupClientProvider` #### Parameters ##### \_client [`LookupClient`](LookupClient.md) #### Returns `LookupClientProvider` ## Methods ### broadcastTxPoW() > **broadcastTxPoW**(`txpowHex`): `Promise`\<`BroadcastResult`\> #### Parameters ##### txpowHex `string` #### Returns `Promise`\<`BroadcastResult`\> #### Implementation of `ChainStateProvider.broadcastTxPoW` *** ### getCoin() > **getCoin**(`coinId`): `Promise`\<`Coin` \| `null`\> #### Parameters ##### coinId `string` #### Returns `Promise`\<`Coin` \| `null`\> #### Implementation of `ChainStateProvider.getCoin` *** ### getCoins() > **getCoins**(`query`): `Promise`\<`Coin`[]\> #### Parameters ##### query `CoinsQuery` #### Returns `Promise`\<`Coin`[]\> #### Implementation of `ChainStateProvider.getCoins` *** ### getProof() > **getProof**(`coinId`): `Promise`\<`MMRProof`\> #### Parameters ##### coinId `string` #### Returns `Promise`\<`MMRProof`\> #### Implementation of `ChainStateProvider.getProof` *** ### getTip() > **getTip**(): `Promise`\<`ChainTip`\> #### Returns `Promise`\<`ChainTip`\> #### Implementation of `ChainStateProvider.getTip` *** ### getToken() > **getToken**(`tokenId`): `Promise`\<`TokenInfo`\> #### Parameters ##### tokenId `string` #### Returns `Promise`\<`TokenInfo`\> #### Implementation of `ChainStateProvider.getToken` *** ### getTokensByCreator() > **getTokensByCreator**(`address`): `Promise`\<`TokenInfo`[]\> #### Parameters ##### address `string` #### Returns `Promise`\<`TokenInfo`[]\> #### Implementation of `ChainStateProvider.getTokensByCreator` *** ### searchTokens() > **searchTokens**(`query`): `Promise`\<`TokenInfo`[]\> #### Parameters ##### query `TokenSearchQuery` #### Returns `Promise`\<`TokenInfo`[]\> #### Implementation of `ChainStateProvider.searchTokens` --- ## Page: connectLookupNode URL: https://docs.totem.ing/api/totemsdk-lookup-client/functions/connectLookupNode [**@totemsdk/lookup-client**](../index.md) *** [@totemsdk/lookup-client](../index.md) / connectLookupNode # Function: connectLookupNode() > **connectLookupNode**(`config`): `Promise`\<[`LookupClient`](../classes/LookupClient.md)\> Create and connect a LookupClient to a personal lookup node. ## Parameters ### config [`LookupClientConfig`](../interfaces/LookupClientConfig.md) ## Returns `Promise`\<[`LookupClient`](../classes/LookupClient.md)\> ## Example ```ts // P2P via Hyperswarm (Pear/Bare/Node) const client = await connectLookupNode({ hyperswarmTopic: 'deadbeef...' }); const coins = await client.getCoins({ address: '0xMx...' }); // Subscribe to real-time coin updates const unsub = client.subscribeCoinUpdates(ev => console.log('coin event', ev)); await client.watchAddress('0xMx...'); // Clean up unsub(); client.disconnect(); ``` --- ## Page: createInMemoryPair URL: https://docs.totem.ing/api/totemsdk-lookup-client/functions/createInMemoryPair [**@totemsdk/lookup-client**](../index.md) *** [@totemsdk/lookup-client](../index.md) / createInMemoryPair # Function: createInMemoryPair() > **createInMemoryPair**(): \[`InMemoryTransport`, `InMemoryTransport`\] Create a linked pair of in-memory transports. Returns [clientSide, serverSide] — messages sent from one arrive at the other. ## Returns \[`InMemoryTransport`, `InMemoryTransport`\] --- ## Page: CoinUpdateEvent URL: https://docs.totem.ing/api/totemsdk-lookup-client/interfaces/CoinUpdateEvent [**@totemsdk/lookup-client**](../index.md) *** [@totemsdk/lookup-client](../index.md) / CoinUpdateEvent # Interface: CoinUpdateEvent ## Properties ### block > **block**: `number` *** ### coin > **coin**: `unknown` *** ### eventType > **eventType**: `"new"` \| `"spent"` \| `"confirmed"` --- ## Page: ITransport URL: https://docs.totem.ing/api/totemsdk-lookup-client/interfaces/ITransport [**@totemsdk/lookup-client**](../index.md) *** [@totemsdk/lookup-client](../index.md) / ITransport # Interface: ITransport Canonical bidirectional byte-stream transport contract. Every transport exposes the same subscription API; each `on*` method returns an unsubscribe function so handlers can always be removed. There is a single connection state machine and a single `send` signature. This replaces the old `on(event, handler)` API which could not express unsubscription, backpressure or connection state. ## Properties ### state > `readonly` **state**: `TransportState` Explicit connection state. ## Methods ### close() > **close**(): `Promise`\<`void`\> Close the transport. After the returned promise resolves, no further data or close deliveries occur. Calling close() more than once is safe (the second call resolves immediately). #### Returns `Promise`\<`void`\> *** ### connect()? > `optional` **connect**(): `Promise`\<`void`\> Optional async connect. Implementations that construct an already-connected transport may omit it. #### Returns `Promise`\<`void`\> *** ### onClose() > **onClose**(`handler`): () => `void` Subscribe to connection close. Returns an unsubscribe function. #### Parameters ##### handler `CloseHandler` #### Returns () => `void` *** ### onData() > **onData**(`handler`): () => `void` Subscribe to data chunks. Returns an unsubscribe function. #### Parameters ##### handler `DataHandler` #### Returns () => `void` *** ### onError() > **onError**(`handler`): () => `void` Subscribe to transport errors. Returns an unsubscribe function. #### Parameters ##### handler `ErrorHandler` #### Returns () => `void` *** ### send() > **send**(`data`): `Promise`\<`void`\> Send bytes to the remote peer. - Returns a promise that resolves once the bytes are accepted by the underlying transport (or after the documented backpressure policy). - Rejects with `ClosedTransportError` if the transport is closed. - Rejects with the underlying error if delivery fails. #### Parameters ##### data `Uint8Array` #### Returns `Promise`\<`void`\> --- ## Page: LookupClientConfig URL: https://docs.totem.ing/api/totemsdk-lookup-client/interfaces/LookupClientConfig [**@totemsdk/lookup-client**](../index.md) *** [@totemsdk/lookup-client](../index.md) / LookupClientConfig # Interface: LookupClientConfig ## Properties ### hyperswarmTopic? > `optional` **hyperswarmTopic?**: `string` Hex-encoded 32-byte Hyperswarm topic key (64 hex chars). Primary P2P transport. *** ### nodeUrl? > `optional` **nodeUrl?**: `string` Direct HTTP/WS URL fallback — used when Hyperswarm is unavailable. The client will convert http(s):// to ws(s):// automatically. *** ### reconnectBaseMs? > `optional` **reconnectBaseMs?**: `number` Initial reconnect backoff delay in ms. Default: 1_000. *** ### reconnectMaxMs? > `optional` **reconnectMaxMs?**: `number` Maximum reconnect backoff delay in ms. Default: 30_000. *** ### timeoutMs? > `optional` **timeoutMs?**: `number` Per-request timeout in milliseconds. Default: 10_000. --- ## Page: CoinUpdateCallback URL: https://docs.totem.ing/api/totemsdk-lookup-client/type-aliases/CoinUpdateCallback [**@totemsdk/lookup-client**](../index.md) *** [@totemsdk/lookup-client](../index.md) / CoinUpdateCallback # Type Alias: CoinUpdateCallback > **CoinUpdateCallback** = (`event`) => `void` ## Parameters ### event [`CoinUpdateEvent`](../interfaces/CoinUpdateEvent.md) ## Returns `void` --- ## Page: Unsubscribe URL: https://docs.totem.ing/api/totemsdk-lookup-client/type-aliases/Unsubscribe [**@totemsdk/lookup-client**](../index.md) *** [@totemsdk/lookup-client](../index.md) / Unsubscribe # Type Alias: Unsubscribe > **Unsubscribe** = () => `void` ## Returns `void` --- ## Page: AgentRegistry URL: https://docs.totem.ing/api/totemsdk-lookup-node/classes/AgentRegistry [**@totemsdk/lookup-node**](../index.md) *** [@totemsdk/lookup-node](../index.md) / AgentRegistry # Class: AgentRegistry ## Constructors ### Constructor > **new AgentRegistry**(`store`, `requireSignature?`): `AgentRegistry` #### Parameters ##### store [`SqliteStore`](SqliteStore.md) SQLite backing store ##### requireSignature? `boolean` = `true` When true (default), announcements without a valid Ed25519 signature are silently rejected. #### Returns `AgentRegistry` ## Methods ### announce() > **announce**(`msg`, `nodeId`): `Promise`\<`void`\> #### Parameters ##### msg `AgentAnnounceMessage` ##### nodeId `string` #### Returns `Promise`\<`void`\> *** ### query() > **query**(`msg`, `sendFn`): `void` #### Parameters ##### msg `AgentQueryMessage` ##### sendFn `SendFn` #### Returns `void` *** ### removeExpired() > **removeExpired**(): `void` #### Returns `void` *** ### size() > **size**(): `number` #### Returns `number` *** ### startExpiryLoop() > **startExpiryLoop**(`intervalMs`): `void` #### Parameters ##### intervalMs `number` #### Returns `void` *** ### stopExpiryLoop() > **stopExpiryLoop**(): `void` #### Returns `void` --- ## Page: AppRegistry URL: https://docs.totem.ing/api/totemsdk-lookup-node/classes/AppRegistry [**@totemsdk/lookup-node**](../index.md) *** [@totemsdk/lookup-node](../index.md) / AppRegistry # Class: AppRegistry ## Constructors ### Constructor > **new AppRegistry**(`store`, `requireSignature?`): `AppRegistry` #### Parameters ##### store [`SqliteStore`](SqliteStore.md) SQLite backing store ##### requireSignature? `boolean` = `true` When true (default), announcements without a valid Ed25519 signature are silently rejected. Set false only for development or private trusted networks. #### Returns `AppRegistry` ## Methods ### announce() > **announce**(`msg`, `nodeId`): `Promise`\<`void`\> #### Parameters ##### msg `AppAnnounceMessage` ##### nodeId `string` #### Returns `Promise`\<`void`\> *** ### query() > **query**(`msg`, `sendFn`): `void` #### Parameters ##### msg `AppQueryMessage` ##### sendFn `SendFn` #### Returns `void` *** ### removeExpired() > **removeExpired**(): `void` #### Returns `void` *** ### size() > **size**(): `number` #### Returns `number` --- ## Page: HyperswarmManager URL: https://docs.totem.ing/api/totemsdk-lookup-node/classes/HyperswarmManager [**@totemsdk/lookup-node**](../index.md) *** [@totemsdk/lookup-node](../index.md) / HyperswarmManager # Class: HyperswarmManager ## Constructors ### Constructor > **new HyperswarmManager**(`node`, `config`): `HyperswarmManager` #### Parameters ##### node [`LookupNode`](LookupNode.md) ##### config [`HyperswarmManagerConfig`](../interfaces/HyperswarmManagerConfig.md) #### Returns `HyperswarmManager` ## Accessors ### connectionCount #### Get Signature > **get** **connectionCount**(): `number` ##### Returns `number` ## Methods ### start() > **start**(): `Promise`\<`void`\> Joins the Hyperswarm topic and begins accepting connections. Each incoming connection is wrapped in a HyperswarmTransport and handed to LookupNode.handleConnection(). #### Returns `Promise`\<`void`\> *** ### stop() > **stop**(): `Promise`\<`void`\> Leave the topic and destroy the Hyperswarm instance. Call node.stop() separately to shut down the LookupNode. #### Returns `Promise`\<`void`\> --- ## Page: HyperswarmTransport URL: https://docs.totem.ing/api/totemsdk-lookup-node/classes/HyperswarmTransport [**@totemsdk/lookup-node**](../index.md) *** [@totemsdk/lookup-node](../index.md) / HyperswarmTransport # Class: HyperswarmTransport Adapts a Node.js Duplex stream (Hyperswarm connection) to the ITransport interface used by ClientSession. Buffers binary frames and emits 'data' events with raw Uint8Array chunks. ## Implements - [`ITransport`](../interfaces/ITransport.md) ## Constructors ### Constructor > **new HyperswarmTransport**(`_stream`): `HyperswarmTransport` #### Parameters ##### \_stream `Duplex` #### Returns `HyperswarmTransport` ## Methods ### close() > **close**(): `void` #### Returns `void` #### Implementation of [`ITransport`](../interfaces/ITransport.md).[`close`](../interfaces/ITransport.md#close) *** ### on() #### Call Signature > **on**(`event`, `handler`): `void` ##### Parameters ###### event `"data"` ###### handler (`chunk`) => `void` ##### Returns `void` ##### Implementation of [`ITransport`](../interfaces/ITransport.md).[`on`](../interfaces/ITransport.md#on) #### Call Signature > **on**(`event`, `handler`): `void` ##### Parameters ###### event `"close"` ###### handler () => `void` ##### Returns `void` ##### Implementation of [`ITransport`](../interfaces/ITransport.md).[`on`](../interfaces/ITransport.md#on) #### Call Signature > **on**(`event`, `handler`): `void` ##### Parameters ###### event `"error"` ###### handler (`err`) => `void` ##### Returns `void` ##### Implementation of [`ITransport`](../interfaces/ITransport.md).[`on`](../interfaces/ITransport.md#on) *** ### send() > **send**(`data`): `void` #### Parameters ##### data `Uint8Array` #### Returns `void` #### Implementation of [`ITransport`](../interfaces/ITransport.md).[`send`](../interfaces/ITransport.md#send) --- ## Page: LeaseCoordinator URL: https://docs.totem.ing/api/totemsdk-lookup-node/classes/LeaseCoordinator [**@totemsdk/lookup-node**](../index.md) *** [@totemsdk/lookup-node](../index.md) / LeaseCoordinator # Class: LeaseCoordinator ## Constructors ### Constructor > **new LeaseCoordinator**(`nodeId`, `config`): `LeaseCoordinator` #### Parameters ##### nodeId `string` ##### config [`LeaseConfig`](../interfaces/LeaseConfig.md) #### Returns `LeaseCoordinator` ## Methods ### handleBurn() > **handleBurn**(`msg`, `sendFn`, `controllerPublicKeyHex?`): `Promise`\<`void`\> #### Parameters ##### msg `LeaseBurnMessage` ##### sendFn `SendFn` ##### controllerPublicKeyHex? `string` #### Returns `Promise`\<`void`\> *** ### handleCommit() > **handleCommit**(`msg`, `sendFn`, `controllerPublicKeyHex?`): `Promise`\<`void`\> #### Parameters ##### msg `LeaseCommitMessage` ##### sendFn `SendFn` ##### controllerPublicKeyHex? `string` #### Returns `Promise`\<`void`\> *** ### handleReserve() > **handleReserve**(`msg`, `sendFn`, `controllerPublicKeyHex?`): `Promise`\<`void`\> #### Parameters ##### msg `LeaseReserveMessage` ##### sendFn `SendFn` ##### controllerPublicKeyHex? `string` #### Returns `Promise`\<`void`\> *** ### initialize() > **initialize**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### registerTreeOwner() > **registerTreeOwner**(`treeId`, `controllerPublicKeyHex`): `void` Register a tree as owned by a specific authenticated controller. Called on first LEASE_RESERVE for a tree, or externally during setup. #### Parameters ##### treeId `string` ##### controllerPublicKeyHex `string` #### Returns `void` --- ## Page: LookupNode URL: https://docs.totem.ing/api/totemsdk-lookup-node/classes/LookupNode [**@totemsdk/lookup-node**](../index.md) *** [@totemsdk/lookup-node](../index.md) / LookupNode # Class: LookupNode @totemsdk/lookup-node — public API ## Implements - [`NodeDispatcher`](../interfaces/NodeDispatcher.md) ## Constructors ### Constructor > **new LookupNode**(`config`): `LookupNode` #### Parameters ##### config [`LookupNodeConfig`](../interfaces/LookupNodeConfig.md) #### Returns `LookupNode` ## Properties ### agentRegistry? > `readonly` `optional` **agentRegistry?**: [`AgentRegistry`](AgentRegistry.md) #### Implementation of [`NodeDispatcher`](../interfaces/NodeDispatcher.md).[`agentRegistry`](../interfaces/NodeDispatcher.md#agentregistry) *** ### appRegistry? > `readonly` `optional` **appRegistry?**: [`AppRegistry`](AppRegistry.md) #### Implementation of [`NodeDispatcher`](../interfaces/NodeDispatcher.md).[`appRegistry`](../interfaces/NodeDispatcher.md#appregistry) *** ### config > `readonly` **config**: [`LookupNodeConfig`](../interfaces/LookupNodeConfig.md) #### Implementation of [`NodeDispatcher`](../interfaces/NodeDispatcher.md).[`config`](../interfaces/NodeDispatcher.md#config) *** ### lease? > `readonly` `optional` **lease?**: [`LeaseCoordinator`](LeaseCoordinator.md) #### Implementation of [`NodeDispatcher`](../interfaces/NodeDispatcher.md).[`lease`](../interfaces/NodeDispatcher.md#lease) *** ### nodeId > **nodeId**: `string` #### Implementation of [`NodeDispatcher`](../interfaces/NodeDispatcher.md).[`nodeId`](../interfaces/NodeDispatcher.md#nodeid) *** ### provider > `readonly` **provider**: `ChainStateProvider` #### Implementation of [`NodeDispatcher`](../interfaces/NodeDispatcher.md).[`provider`](../interfaces/NodeDispatcher.md#provider) *** ### relay? > `readonly` `optional` **relay?**: [`TxPoWRelay`](TxPoWRelay.md) #### Implementation of [`NodeDispatcher`](../interfaces/NodeDispatcher.md).[`relay`](../interfaces/NodeDispatcher.md#relay) *** ### store > `readonly` **store**: [`SqliteStore`](SqliteStore.md) #### Implementation of [`NodeDispatcher`](../interfaces/NodeDispatcher.md).[`store`](../interfaces/NodeDispatcher.md#store) *** ### trustIndex? > `readonly` `optional` **trustIndex?**: [`TrustIndex`](TrustIndex.md) #### Implementation of [`NodeDispatcher`](../interfaces/NodeDispatcher.md).[`trustIndex`](../interfaces/NodeDispatcher.md#trustindex) *** ### watchlist > `readonly` **watchlist**: [`WatchlistManager`](WatchlistManager.md) #### Implementation of [`NodeDispatcher`](../interfaces/NodeDispatcher.md).[`watchlist`](../interfaces/NodeDispatcher.md#watchlist) ## Accessors ### isMegaMMRMode #### Get Signature > **get** **isMegaMMRMode**(): `boolean` Whether this node is running in MegaMMR/indexer mode. When true, the provider is expected to support wider chain-state queries such as full balance indexing and chain-wide analytics endpoints. The provider's `getCoins()` may be called without an address filter to retrieve all coins from the indexer. ##### Returns `boolean` #### Implementation of [`NodeDispatcher`](../interfaces/NodeDispatcher.md).[`isMegaMMRMode`](../interfaces/NodeDispatcher.md#ismegammrmode) *** ### sessionCount #### Get Signature > **get** **sessionCount**(): `number` ##### Returns `number` ## Methods ### getSessions() > **getSessions**(): `ClientSession`[] #### Returns `ClientSession`[] *** ### handleConnection() > **handleConnection**(`transport`): `ClientSession` Register a new client connection. In production: called for each Hyperswarm connection. In tests: inject a TestTransport (see __tests__/helpers.ts). #### Parameters ##### transport [`ITransport`](../interfaces/ITransport.md) #### Returns `ClientSession` *** ### onSessionClosed() > **onSessionClosed**(`sessionId`): `void` #### Parameters ##### sessionId `string` #### Returns `void` #### Implementation of [`NodeDispatcher`](../interfaces/NodeDispatcher.md).[`onSessionClosed`](../interfaces/NodeDispatcher.md#onsessionclosed) *** ### start() > **start**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### stop() > **stop**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> --- ## Page: SqliteStorageAdapter URL: https://docs.totem.ing/api/totemsdk-lookup-node/classes/SqliteStorageAdapter [**@totemsdk/lookup-node**](../index.md) *** [@totemsdk/lookup-node](../index.md) / SqliteStorageAdapter # Class: SqliteStorageAdapter Wraps SqliteStore's durable KV store to implement the `StorageAdapter` interface expected by `LocalLeaseProvider` and other @totemsdk/core consumers. All methods are async for interface compliance but execute synchronously against the SQLite backend (better-sqlite3 is synchronous). ## Implements - `StorageAdapter` ## Constructors ### Constructor > **new SqliteStorageAdapter**(`_store`): `SqliteStorageAdapter` #### Parameters ##### \_store [`SqliteStore`](SqliteStore.md) #### Returns `SqliteStorageAdapter` ## Methods ### clear() > **clear**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> #### Implementation of `StorageAdapter.clear` *** ### get() > **get**\<`T`\>(`key`): `Promise`\<`T` \| `null`\> #### Type Parameters ##### T `T` #### Parameters ##### key `string` #### Returns `Promise`\<`T` \| `null`\> #### Implementation of `StorageAdapter.get` *** ### has() > **has**(`key`): `Promise`\<`boolean`\> #### Parameters ##### key `string` #### Returns `Promise`\<`boolean`\> #### Implementation of `StorageAdapter.has` *** ### keys() > **keys**(): `Promise`\<`string`[]\> #### Returns `Promise`\<`string`[]\> #### Implementation of `StorageAdapter.keys` *** ### remove() > **remove**(`key`): `Promise`\<`boolean`\> #### Parameters ##### key `string` #### Returns `Promise`\<`boolean`\> #### Implementation of `StorageAdapter.remove` *** ### set() > **set**\<`T`\>(`key`, `value`): `Promise`\<`void`\> #### Type Parameters ##### T `T` #### Parameters ##### key `string` ##### value `T` #### Returns `Promise`\<`void`\> #### Implementation of `StorageAdapter.set` --- ## Page: SqliteStore URL: https://docs.totem.ing/api/totemsdk-lookup-node/classes/SqliteStore [**@totemsdk/lookup-node**](../index.md) *** [@totemsdk/lookup-node](../index.md) / SqliteStore # Class: SqliteStore ## Constructors ### Constructor > **new SqliteStore**(`dbPath`): `SqliteStore` #### Parameters ##### dbPath `string` #### Returns `SqliteStore` ## Methods ### agentDeleteExpired() > **agentDeleteExpired**(`now`): `void` #### Parameters ##### now `number` #### Returns `void` *** ### agentQuery() > **agentQuery**(`now`): [`AgentRow`](../interfaces/AgentRow.md)[] #### Parameters ##### now `number` #### Returns [`AgentRow`](../interfaces/AgentRow.md)[] *** ### agentUpsert() > **agentUpsert**(`row`): `void` #### Parameters ##### row [`AgentRow`](../interfaces/AgentRow.md) #### Returns `void` *** ### appDeleteExpired() > **appDeleteExpired**(`now`): `void` #### Parameters ##### now `number` #### Returns `void` *** ### appQuery() > **appQuery**(`now`, `authorAddress?`, `isFree?`): [`AppRow`](../interfaces/AppRow.md)[] #### Parameters ##### now `number` ##### authorAddress? `string` ##### isFree? `boolean` #### Returns [`AppRow`](../interfaces/AppRow.md)[] *** ### appUpsert() > **appUpsert**(`row`): `void` #### Parameters ##### row [`AppRow`](../interfaces/AppRow.md) #### Returns `void` *** ### cacheEvictExpired() > **cacheEvictExpired**(): `void` #### Returns `void` *** ### cacheGet() > **cacheGet**(`key`): `string` \| `null` #### Parameters ##### key `string` #### Returns `string` \| `null` *** ### cacheSet() > **cacheSet**(`key`, `data`, `ttlMs`): `void` #### Parameters ##### key `string` ##### data `string` ##### ttlMs `number` #### Returns `void` *** ### close() > **close**(): `void` #### Returns `void` *** ### kvClear() > **kvClear**(): `void` #### Returns `void` *** ### kvGet() > **kvGet**(`key`): `string` \| `null` #### Parameters ##### key `string` #### Returns `string` \| `null` *** ### kvHas() > **kvHas**(`key`): `boolean` #### Parameters ##### key `string` #### Returns `boolean` *** ### kvKeys() > **kvKeys**(`prefix?`): `string`[] #### Parameters ##### prefix? `string` #### Returns `string`[] *** ### kvRemove() > **kvRemove**(`key`): `boolean` #### Parameters ##### key `string` #### Returns `boolean` *** ### kvSet() > **kvSet**(`key`, `value`): `void` #### Parameters ##### key `string` ##### value `string` #### Returns `void` *** ### relayEvictOldest() > **relayEvictOldest**(`maxCount`): `void` Keep only the newest `maxCount` entries (evict oldest). #### Parameters ##### maxCount `number` #### Returns `void` *** ### relayHasSeen() > **relayHasSeen**(`key`): `boolean` #### Parameters ##### key `string` #### Returns `boolean` *** ### relayMarkSeen() > **relayMarkSeen**(`key`): `void` #### Parameters ##### key `string` #### Returns `void` *** ### trustQuery() > **trustQuery**(`subjectId`): [`TrustRow`](../interfaces/TrustRow.md)[] #### Parameters ##### subjectId `string` #### Returns [`TrustRow`](../interfaces/TrustRow.md)[] *** ### trustUpsert() > **trustUpsert**(`row`): `void` #### Parameters ##### row [`TrustRow`](../interfaces/TrustRow.md) #### Returns `void` *** ### watchlistAdd() > **watchlistAdd**(`sessionId`, `addresses`): `void` #### Parameters ##### sessionId `string` ##### addresses `string`[] #### Returns `void` *** ### watchlistGetAll() > **watchlistGetAll**(): `object`[] All (sessionId, address) pairs (to rebuild in-memory map on restart). #### Returns `object`[] *** ### watchlistGetAllAddresses() > **watchlistGetAllAddresses**(): `string`[] All unique addresses currently being watched (for recovery polling after restart). #### Returns `string`[] *** ### watchlistRemove() > **watchlistRemove**(`sessionId`, `addresses`): `void` #### Parameters ##### sessionId `string` ##### addresses `string`[] #### Returns `void` *** ### watchlistRemoveSession() > **watchlistRemoveSession**(`sessionId`): `void` #### Parameters ##### sessionId `string` #### Returns `void` --- ## Page: TrustIndex URL: https://docs.totem.ing/api/totemsdk-lookup-node/classes/TrustIndex [**@totemsdk/lookup-node**](../index.md) *** [@totemsdk/lookup-node](../index.md) / TrustIndex # Class: TrustIndex ## Constructors ### Constructor > **new TrustIndex**(`store`, `config?`): `TrustIndex` #### Parameters ##### store [`SqliteStore`](SqliteStore.md) SQLite backing store ##### config? [`TrustIndexConfig`](../interfaces/TrustIndexConfig.md) Trust index configuration #### Returns `TrustIndex` ## Methods ### query() > **query**(`msg`, `sendFn`): `void` #### Parameters ##### msg `TrustQueryMessage` ##### sendFn `SendFn` #### Returns `void` *** ### record() > **record**(`msg`): `void` #### Parameters ##### msg `TrustRecordMessage` #### Returns `void` --- ## Page: TxPoWRelay URL: https://docs.totem.ing/api/totemsdk-lookup-node/classes/TxPoWRelay [**@totemsdk/lookup-node**](../index.md) *** [@totemsdk/lookup-node](../index.md) / TxPoWRelay # Class: TxPoWRelay ## Constructors ### Constructor > **new TxPoWRelay**(`provider`, `config`, `store?`): `TxPoWRelay` #### Parameters ##### provider `ChainStateProvider` ##### config [`RelayConfig`](../interfaces/RelayConfig.md) ##### store? [`SqliteStore`](SqliteStore.md) #### Returns `TxPoWRelay` ## Methods ### process() > **process**(`txpowHex`): `Promise`\<`BroadcastResult`\> #### Parameters ##### txpowHex `string` #### Returns `Promise`\<`BroadcastResult`\> --- ## Page: WatchlistManager URL: https://docs.totem.ing/api/totemsdk-lookup-node/classes/WatchlistManager [**@totemsdk/lookup-node**](../index.md) *** [@totemsdk/lookup-node](../index.md) / WatchlistManager # Class: WatchlistManager ## Constructors ### Constructor > **new WatchlistManager**(`_config`): `WatchlistManager` #### Parameters ##### \_config `WatchlistManagerConfig` #### Returns `WatchlistManager` ## Methods ### forcePoll() > **forcePoll**(): `Promise`\<`void`\> Exposed for testing: trigger a poll manually. #### Returns `Promise`\<`void`\> *** ### getWatchedAddresses() > **getWatchedAddresses**(): `string`[] #### Returns `string`[] *** ### register() > **register**(`sessionId`, `addresses`, `transport`): `void` #### Parameters ##### sessionId `string` ##### addresses `string`[] ##### transport [`ITransport`](../interfaces/ITransport.md) #### Returns `void` *** ### remove() > **remove**(`sessionId`, `addresses`): `void` #### Parameters ##### sessionId `string` ##### addresses `string`[] #### Returns `void` *** ### removeSession() > **removeSession**(`sessionId`): `void` #### Parameters ##### sessionId `string` #### Returns `void` *** ### start() > **start**(): `void` #### Returns `void` *** ### stop() > **stop**(): `void` #### Returns `void` --- ## Page: createLookupNode URL: https://docs.totem.ing/api/totemsdk-lookup-node/functions/createLookupNode [**@totemsdk/lookup-node**](../index.md) *** [@totemsdk/lookup-node](../index.md) / createLookupNode # Function: createLookupNode() > **createLookupNode**(`config`): [`LookupNode`](../classes/LookupNode.md) ## Parameters ### config [`LookupNodeConfig`](../interfaces/LookupNodeConfig.md) ## Returns [`LookupNode`](../classes/LookupNode.md) --- ## Page: AgentRegistryConfig URL: https://docs.totem.ing/api/totemsdk-lookup-node/interfaces/AgentRegistryConfig [**@totemsdk/lookup-node**](../index.md) *** [@totemsdk/lookup-node](../index.md) / AgentRegistryConfig # Interface: AgentRegistryConfig ## Properties ### enabled > **enabled**: `true` *** ### expiryCheckIntervalMs? > `optional` **expiryCheckIntervalMs?**: `number` *** ### requireSignature? > `optional` **requireSignature?**: `boolean` Require a valid Ed25519 signature on every AGENT_ANNOUNCE. Default: true (secure by default — rejects unsigned or invalidly-signed announcements). Set to false only on private/trusted networks. --- ## Page: AgentRow URL: https://docs.totem.ing/api/totemsdk-lookup-node/interfaces/AgentRow [**@totemsdk/lookup-node**](../index.md) *** [@totemsdk/lookup-node](../index.md) / AgentRow # Interface: AgentRow ## Properties ### capabilityId > **capabilityId**: `string` *** ### expiresAt > **expiresAt**: `number` *** ### latencyMs? > `optional` **latencyMs?**: `number` *** ### manifest > **manifest**: `Buffer` *** ### nodeId > **nodeId**: `string` *** ### pricePerCall? > `optional` **pricePerCall?**: `number` *** ### publicKey? > `optional` **publicKey?**: `string` *** ### signature? > `optional` **signature?**: `string` *** ### tags? > `optional` **tags?**: `string` --- ## Page: AppRegistryConfig URL: https://docs.totem.ing/api/totemsdk-lookup-node/interfaces/AppRegistryConfig [**@totemsdk/lookup-node**](../index.md) *** [@totemsdk/lookup-node](../index.md) / AppRegistryConfig # Interface: AppRegistryConfig ## Properties ### enabled > **enabled**: `true` *** ### requireSignature? > `optional` **requireSignature?**: `boolean` Require a valid Ed25519 signature on every APP_ANNOUNCE. Default: true (secure by default — rejects unsigned or invalidly-signed announcements). Set to false only on private/trusted networks. --- ## Page: AppRow URL: https://docs.totem.ing/api/totemsdk-lookup-node/interfaces/AppRow [**@totemsdk/lookup-node**](../index.md) *** [@totemsdk/lookup-node](../index.md) / AppRow # Interface: AppRow ## Properties ### appId > **appId**: `string` *** ### authorAddress? > `optional` **authorAddress?**: `string` *** ### expiresAt > **expiresAt**: `number` *** ### isFree? > `optional` **isFree?**: `number` SQLite boolean: 1 = free, 0 = paid, null = unknown *** ### manifest > **manifest**: `Buffer` *** ### nodeId > **nodeId**: `string` *** ### publicKey? > `optional` **publicKey?**: `string` *** ### signature? > `optional` **signature?**: `string` --- ## Page: HyperswarmManagerConfig URL: https://docs.totem.ing/api/totemsdk-lookup-node/interfaces/HyperswarmManagerConfig [**@totemsdk/lookup-node**](../index.md) *** [@totemsdk/lookup-node](../index.md) / HyperswarmManagerConfig # Interface: HyperswarmManagerConfig ## Properties ### announce? > `optional` **announce?**: `boolean` If true, the manager also announces on the topic (server mode). If false, it only joins to discover peers (client mode). Default: true *** ### lookup? > `optional` **lookup?**: `boolean` If true, the manager looks up peers on the topic. Default: true *** ### swarm > **swarm**: `any` Hyperswarm instance to use. Must be created by the caller so that key material and DHT configuration remain under application control. ```ts import Hyperswarm from 'hyperswarm'; const swarm = new Hyperswarm(); ``` *** ### topic > **topic**: `string` \| `Buffer`\<`ArrayBufferLike`\> Topic to announce and join. Should be a 32-byte Buffer derived from a well-known string (e.g. `crypto.createHash('sha256').update('totem-lookup-v1').digest()`). --- ## Page: ITransport URL: https://docs.totem.ing/api/totemsdk-lookup-node/interfaces/ITransport [**@totemsdk/lookup-node**](../index.md) *** [@totemsdk/lookup-node](../index.md) / ITransport # Interface: ITransport ## Methods ### close() > **close**(): `void` #### Returns `void` *** ### on() #### Call Signature > **on**(`event`, `handler`): `void` ##### Parameters ###### event `"data"` ###### handler (`chunk`) => `void` ##### Returns `void` #### Call Signature > **on**(`event`, `handler`): `void` ##### Parameters ###### event `"close"` ###### handler () => `void` ##### Returns `void` #### Call Signature > **on**(`event`, `handler`): `void` ##### Parameters ###### event `"error"` ###### handler (`err`) => `void` ##### Returns `void` *** ### send() > **send**(`data`): `void` #### Parameters ##### data `Uint8Array` #### Returns `void` --- ## Page: LeaseConfig URL: https://docs.totem.ing/api/totemsdk-lookup-node/interfaces/LeaseConfig [**@totemsdk/lookup-node**](../index.md) *** [@totemsdk/lookup-node](../index.md) / LeaseConfig # Interface: LeaseConfig ## Properties ### enabled > **enabled**: `true` *** ### storage? > `optional` **storage?**: `StorageAdapter` --- ## Page: LookupNodeConfig URL: https://docs.totem.ing/api/totemsdk-lookup-node/interfaces/LookupNodeConfig [**@totemsdk/lookup-node**](../index.md) *** [@totemsdk/lookup-node](../index.md) / LookupNodeConfig # Interface: LookupNodeConfig ## Properties ### agentRegistry? > `optional` **agentRegistry?**: [`AgentRegistryConfig`](AgentRegistryConfig.md) *** ### appRegistry? > `optional` **appRegistry?**: [`AppRegistryConfig`](AppRegistryConfig.md) *** ### challengeTtlMs? > `optional` **challengeTtlMs?**: `number` Auth challenge TTL in ms. Default: 30_000 *** ### lease? > `optional` **lease?**: [`LeaseConfig`](LeaseConfig.md) *** ### megammr? > `optional` **megammr?**: [`MegaMMRConfig`](MegaMMRConfig.md) MegaMMR / indexer mode — enables chain-wide GET_COINS without address filter. *** ### nodeId? > `optional` **nodeId?**: `string` Unique node identifier (hex string). Generated randomly if omitted. *** ### pollIntervalMs? > `optional` **pollIntervalMs?**: `number` Block polling interval in ms. Default: 5_000 *** ### provider > **provider**: `ChainStateProvider` Chain state source — MinimaRpcProvider or any ChainStateProvider *** ### rateLimitRpm? > `optional` **rateLimitRpm?**: `number` Max authenticated requests per minute per client. Default: 120 *** ### relay? > `optional` **relay?**: [`RelayConfig`](RelayConfig.md) *** ### sqlite? > `optional` **sqlite?**: [`SqliteConfig`](SqliteConfig.md) SQLite persistence. Defaults to ':memory:' (always SQLite, never plain Maps). *** ### trustIndex? > `optional` **trustIndex?**: [`TrustIndexConfig`](TrustIndexConfig.md) --- ## Page: MegaMMRConfig URL: https://docs.totem.ing/api/totemsdk-lookup-node/interfaces/MegaMMRConfig [**@totemsdk/lookup-node**](../index.md) *** [@totemsdk/lookup-node](../index.md) / MegaMMRConfig # Interface: MegaMMRConfig MegaMMR / indexer mode configuration. When enabled: - GET_COINS requests without an `address` filter are accepted (chain-wide indexer). - The provider is expected to implement full UTXO index queries (e.g. MinimaRpcProvider connected to a MegaMMR-enabled node). - Standard nodes reject unfiltered GET_COINS requests to prevent unbounded scans. ## Properties ### enabled > **enabled**: `true` --- ## Page: NodeDispatcher URL: https://docs.totem.ing/api/totemsdk-lookup-node/interfaces/NodeDispatcher [**@totemsdk/lookup-node**](../index.md) *** [@totemsdk/lookup-node](../index.md) / NodeDispatcher # Interface: NodeDispatcher ## Properties ### agentRegistry? > `readonly` `optional` **agentRegistry?**: [`AgentRegistry`](../classes/AgentRegistry.md) *** ### appRegistry? > `readonly` `optional` **appRegistry?**: [`AppRegistry`](../classes/AppRegistry.md) *** ### config > `readonly` **config**: [`LookupNodeConfig`](LookupNodeConfig.md) *** ### isMegaMMRMode > **isMegaMMRMode**: `boolean` *** ### lease? > `readonly` `optional` **lease?**: [`LeaseCoordinator`](../classes/LeaseCoordinator.md) *** ### nodeId > **nodeId**: `string` *** ### provider > `readonly` **provider**: `ChainStateProvider` *** ### relay? > `readonly` `optional` **relay?**: [`TxPoWRelay`](../classes/TxPoWRelay.md) *** ### store? > `readonly` `optional` **store?**: [`SqliteStore`](../classes/SqliteStore.md) *** ### trustIndex? > `readonly` `optional` **trustIndex?**: [`TrustIndex`](../classes/TrustIndex.md) *** ### watchlist > `readonly` **watchlist**: [`WatchlistManager`](../classes/WatchlistManager.md) ## Methods ### onSessionClosed() > **onSessionClosed**(`sessionId`): `void` #### Parameters ##### sessionId `string` #### Returns `void` --- ## Page: RelayConfig URL: https://docs.totem.ing/api/totemsdk-lookup-node/interfaces/RelayConfig [**@totemsdk/lookup-node**](../index.md) *** [@totemsdk/lookup-node](../index.md) / RelayConfig # Interface: RelayConfig ## Properties ### enabled > **enabled**: `true` *** ### maxDedupSize? > `optional` **maxDedupSize?**: `number` Max entries in the relay dedup table before oldest are evicted. Default: 10_000 *** ### spamMinBytes? > `optional` **spamMinBytes?**: `number` Minimum byte length to accept (spam filter). Default: 100 bytes *** ### verifyWorkFn? > `optional` **verifyWorkFn?**: (`txpowHex`) => `boolean` \| `Promise`\<`boolean`\> Optional work verifier override. When omitted, `verifyTxPoWWork` from `@totemsdk/txpow` is used. #### Parameters ##### txpowHex `string` #### Returns `boolean` \| `Promise`\<`boolean`\> --- ## Page: SqliteConfig URL: https://docs.totem.ing/api/totemsdk-lookup-node/interfaces/SqliteConfig [**@totemsdk/lookup-node**](../index.md) *** [@totemsdk/lookup-node](../index.md) / SqliteConfig # Interface: SqliteConfig SQLite storage configuration. Defaults to ':memory:' if omitted. ## Properties ### cacheTtlMs? > `optional` **cacheTtlMs?**: `number` TTL for result cache entries in ms. Default: 30_000 *** ### dbPath > **dbPath**: `string` Path to the SQLite database file. Use ':memory:' for ephemeral storage. --- ## Page: TrustIndexConfig URL: https://docs.totem.ing/api/totemsdk-lookup-node/interfaces/TrustIndexConfig [**@totemsdk/lookup-node**](../index.md) *** [@totemsdk/lookup-node](../index.md) / TrustIndexConfig # Interface: TrustIndexConfig ## Properties ### enabled > **enabled**: `true` *** ### requireVerifiedSignature? > `optional` **requireVerifiedSignature?**: `boolean` Require at minimum a well-formed hex signature on TRUST_RECORD messages. Default: true. Full WOTS cryptographic verification is a future hardening pass (requires chain RPC lookup of the reviewer's public key). Set to false only for development/testing. --- ## Page: TrustRow URL: https://docs.totem.ing/api/totemsdk-lookup-node/interfaces/TrustRow [**@totemsdk/lookup-node**](../index.md) *** [@totemsdk/lookup-node](../index.md) / TrustRow # Interface: TrustRow ## Properties ### comment? > `optional` **comment?**: `string` *** ### rating > **rating**: `number` *** ### recordedAt > **recordedAt**: `number` *** ### reviewerAddress > **reviewerAddress**: `string` *** ### signature > **signature**: `string` *** ### subjectId > **subjectId**: `string` --- ## Page: FramingError URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/classes/FramingError [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / FramingError # Class: FramingError ## Extends - `Error` ## Constructors ### Constructor > **new FramingError**(`message`): `FramingError` #### Parameters ##### message `string` #### Returns `FramingError` #### Overrides `Error.constructor` ## Properties ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: checkVersion URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/functions/checkVersion [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / checkVersion # Function: checkVersion() > **checkVersion**(`incomingVersion`): [`VersionCheckResult`](../interfaces/VersionCheckResult.md) Check whether a received message's version is compatible with this build. Returns compatible=true if versions match, or a structured VERSION_MISMATCH error message otherwise. ## Parameters ### incomingVersion `number` ## Returns [`VersionCheckResult`](../interfaces/VersionCheckResult.md) --- ## Page: decodeMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/functions/decodeMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / decodeMessage # Function: decodeMessage() > **decodeMessage**(`buf`): [`LookupMessage`](../type-aliases/LookupMessage.md) Decode a framed buffer to a LookupMessage. Expects exactly one framed message in the buffer. ## Parameters ### buf `Uint8Array` ## Returns [`LookupMessage`](../type-aliases/LookupMessage.md) --- ## Page: encodeMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/functions/encodeMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / encodeMessage # Function: encodeMessage() > **encodeMessage**(`msg`): `Uint8Array` Encode a LookupMessage to a framed Uint8Array. Stamps `version` onto the message if not already set. ## Parameters ### msg [`LookupMessage`](../type-aliases/LookupMessage.md) ## Returns `Uint8Array` --- ## Page: messageDigest URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/functions/messageDigest [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / messageDigest # Function: messageDigest() > **messageDigest**(`msg`): `Uint8Array` Compute a canonical digest over the message for signing/verification. Excludes the `sig` field so the digest is stable. ## Parameters ### msg [`LookupMessage`](../type-aliases/LookupMessage.md) ## Returns `Uint8Array` --- ## Page: peekFrameLength URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/functions/peekFrameLength [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / peekFrameLength # Function: peekFrameLength() > **peekFrameLength**(`buf`): `number` \| `null` Read the declared body length from the first 4 bytes of a stream buffer. Returns null if fewer than 4 bytes are available. Useful for incremental stream parsers. ## Parameters ### buf `Uint8Array` ## Returns `number` \| `null` --- ## Page: signMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/functions/signMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / signMessage # Function: signMessage() > **signMessage**\<`T`\>(`msg`, `sign`): `Promise`\<`T` & `object`\> Attach a signature to a message. Returns a new message object with the `sig` field set. ## Type Parameters ### T `T` *extends* [`LookupMessage`](../type-aliases/LookupMessage.md) ## Parameters ### msg `T` ### sign [`SignFn`](../interfaces/SignFn.md) ## Returns `Promise`\<`T` & `object`\> --- ## Page: verifyMessageAuth URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/functions/verifyMessageAuth [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / verifyMessageAuth # Function: verifyMessageAuth() > **verifyMessageAuth**(`msg`, `publicKey`, `verify`): `Promise`\<`boolean`\> Verify the `sig` field of a message against a known public key. Returns false if `sig` is absent. ## Parameters ### msg [`LookupMessage`](../type-aliases/LookupMessage.md) ### publicKey `Uint8Array` ### verify [`VerifyFn`](../interfaces/VerifyFn.md) ## Returns `Promise`\<`boolean`\> --- ## Page: AgentAnnounceMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/AgentAnnounceMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / AgentAnnounceMessage # Interface: AgentAnnounceMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `object` #### capabilityId > **capabilityId**: `string` #### expiresAt > **expiresAt**: `number` #### latencyMs? > `optional` **latencyMs?**: `number` Expected latency in milliseconds (for maxLatencyMs filter) #### manifest > **manifest**: `Uint8Array` #### pricePerCall? > `optional` **pricePerCall?**: `number` Price per RPC call in smallest unit (for maxPricePerCall filter) #### publicKey? > `optional` **publicKey?**: `string` Hex-encoded Ed25519 public key of the signer #### signature? > `optional` **signature?**: `string` Hex-encoded Ed25519 signature over manifest bytes #### tags? > `optional` **tags?**: `string`[] Capability tags for filtering (e.g. ['translation', 'gpt-4']) *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"AGENT_ANNOUNCE"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: AgentQueryMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/AgentQueryMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / AgentQueryMessage # Interface: AgentQueryMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `object` #### capabilityName? > `optional` **capabilityName?**: `string` #### limit? > `optional` **limit?**: `number` #### maxLatencyMs? > `optional` **maxLatencyMs?**: `number` #### maxPricePerCall? > `optional` **maxPricePerCall?**: `number` #### tags? > `optional` **tags?**: `string`[] *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"AGENT_QUERY"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: AgentResultMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/AgentResultMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / AgentResultMessage # Interface: AgentResultMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `object` #### agents > **agents**: `object`[] *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"AGENT_RESULT"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: AppAnnounceMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/AppAnnounceMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / AppAnnounceMessage # Interface: AppAnnounceMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `object` #### appId > **appId**: `string` #### authorAddress? > `optional` **authorAddress?**: `string` Minima address of the app author — stored as a filterable column for APP_QUERY. Authoritative source is inside the manifest; this top-level field enables discovery before a full AppManifest parser is available. #### expiresAt > **expiresAt**: `number` #### isFree? > `optional` **isFree?**: `boolean` If true the app charges no fees — used for freeOnly filter in APP_QUERY. #### manifest > **manifest**: `Uint8Array` #### publicKey? > `optional` **publicKey?**: `string` Hex-encoded Ed25519 public key of the signer (required for signature verification) #### signature? > `optional` **signature?**: `string` Hex-encoded Ed25519 signature over manifest bytes *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"APP_ANNOUNCE"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: AppQueryMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/AppQueryMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / AppQueryMessage # Interface: AppQueryMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `object` #### authorAddress? > `optional` **authorAddress?**: `string` #### category? > `optional` **category?**: `string`[] #### freeOnly? > `optional` **freeOnly?**: `boolean` #### limit? > `optional` **limit?**: `number` #### minVersion? > `optional` **minVersion?**: `number` *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"APP_QUERY"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: AppResultMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/AppResultMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / AppResultMessage # Interface: AppResultMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `object` #### apps > **apps**: `object`[] *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"APP_RESULT"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: AuthChallengeMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/AuthChallengeMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / AuthChallengeMessage # Interface: AuthChallengeMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `object` #### challenge > **challenge**: `string` #### expiresAt > **expiresAt**: `number` *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"AUTH_CHALLENGE"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: AuthResponseMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/AuthResponseMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / AuthResponseMessage # Interface: AuthResponseMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `object` #### challenge > **challenge**: `string` #### publicKey > **publicKey**: `string` #### signature > **signature**: `string` *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"AUTH_RESPONSE"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: BroadcastTxPoWMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/BroadcastTxPoWMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / BroadcastTxPoWMessage # Interface: BroadcastTxPoWMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `object` #### txpowHex > **txpowHex**: `string` *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"BROADCAST_TXPOW"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: CoinUpdateMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/CoinUpdateMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / CoinUpdateMessage # Interface: CoinUpdateMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `object` #### block > **block**: `number` #### coin > **coin**: `unknown` #### eventType > **eventType**: `"new"` \| `"spent"` \| `"confirmed"` *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"COIN_UPDATE"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: ErrorMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/ErrorMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / ErrorMessage # Interface: ErrorMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `object` #### code > **code**: `string` #### message > **message**: `string` #### requestId? > `optional` **requestId?**: `string` *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"ERROR"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: GetCoinMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/GetCoinMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / GetCoinMessage # Interface: GetCoinMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `object` #### coinId > **coinId**: `string` *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"GET_COIN"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: GetCoinsMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/GetCoinsMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / GetCoinsMessage # Interface: GetCoinsMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `object` #### address? > `optional` **address?**: `string` #### relevant? > `optional` **relevant?**: `boolean` #### sendable? > `optional` **sendable?**: `boolean` #### tokenId? > `optional` **tokenId?**: `string` *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"GET_COINS"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: GetProofMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/GetProofMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / GetProofMessage # Interface: GetProofMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `object` #### coinId > **coinId**: `string` *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"GET_PROOF"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: GetTipMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/GetTipMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / GetTipMessage # Interface: GetTipMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `Record`\<`string`, `never`\> *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"GET_TIP"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: GetTokenMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/GetTokenMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / GetTokenMessage # Interface: GetTokenMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `object` #### tokenId > **tokenId**: `string` *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"GET_TOKEN"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: HelloMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/HelloMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / HelloMessage # Interface: HelloMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `object` #### clientVersion > **clientVersion**: `number` #### nodeId? > `optional` **nodeId?**: `string` *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"HELLO"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: LeaseBurnMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/LeaseBurnMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / LeaseBurnMessage # Interface: LeaseBurnMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `object` #### indices > **indices**: `WotsIndices` #### reason > **reason**: `string` #### reservationId > **reservationId**: `string` *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"LEASE_BURN"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: LeaseCommitMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/LeaseCommitMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / LeaseCommitMessage # Interface: LeaseCommitMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `object` #### indices > **indices**: `WotsIndices` #### reservationId > **reservationId**: `string` #### txId > **txId**: `string` *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"LEASE_COMMIT"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: LeaseReserveMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/LeaseReserveMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / LeaseReserveMessage # Interface: LeaseReserveMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `object` #### branchId? > `optional` **branchId?**: `string` #### deviceId? > `optional` **deviceId?**: `string` #### indices? > `optional` **indices?**: `WotsIndices` Optional — when present, the node must reserve these exact indices (quorum attestation) instead of allocating the next free slot. #### payloadHash? > `optional` **payloadHash?**: `string` #### purpose? > `optional` **purpose?**: `string` #### treeId > **treeId**: `string` #### ttlMs? > `optional` **ttlMs?**: `number` *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"LEASE_RESERVE"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: LeaseWatermarkMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/LeaseWatermarkMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / LeaseWatermarkMessage # Interface: LeaseWatermarkMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `object` #### addressCursor > **addressCursor**: `number` #### l1Cursor > **l1Cursor**: `number` #### l2Cursor > **l2Cursor**: `number` #### lastSyncTimestamp > **lastSyncTimestamp**: `number` #### treeId > **treeId**: `string` #### unavailableCount > **unavailableCount**: `number` *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"LEASE_WATERMARK"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: PingMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/PingMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / PingMessage # Interface: PingMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `object` #### ts > **ts**: `number` *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"PING"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: PolicyAnnounceMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/PolicyAnnounceMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / PolicyAnnounceMessage # Interface: PolicyAnnounceMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `object` #### authorityIdentityId > **authorityIdentityId**: `string` #### capabilities > **capabilities**: `string`[] #### expiresAt > **expiresAt**: `number` #### manifest > **manifest**: `Uint8Array` #### policyEpoch > **policyEpoch**: `number` #### policyId > **policyId**: `string` #### policyRoot > **policyRoot**: `string` #### policyVersion > **policyVersion**: `number` #### retrievalEndpoints? > `optional` **retrievalEndpoints?**: `object`[] #### subjectId > **subjectId**: `string` *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"POLICY_ANNOUNCE"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: PolicyQueryMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/PolicyQueryMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / PolicyQueryMessage # Interface: PolicyQueryMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `object` #### activeOnly? > `optional` **activeOnly?**: `boolean` #### authorityIdentityId? > `optional` **authorityIdentityId?**: `string` #### capability? > `optional` **capability?**: `string` #### limit? > `optional` **limit?**: `number` #### minEpoch? > `optional` **minEpoch?**: `number` #### minVersion? > `optional` **minVersion?**: `number` #### policyId? > `optional` **policyId?**: `string` #### policyRoot? > `optional` **policyRoot?**: `string` #### subjectId? > `optional` **subjectId?**: `string` *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"POLICY_QUERY"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: PolicyResultMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/PolicyResultMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / PolicyResultMessage # Interface: PolicyResultMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `object` #### results > **results**: `object`[] *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"POLICY_RESULT"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: PolicySignCancelMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/PolicySignCancelMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / PolicySignCancelMessage # Interface: PolicySignCancelMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `object` #### policyId > **policyId**: `string` #### reason? > `optional` **reason?**: `string` #### requestId > **requestId**: `string` *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"POLICY_SIGN_CANCEL"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: PolicySignRequestMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/PolicySignRequestMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / PolicySignRequestMessage # Interface: PolicySignRequestMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `object` #### request > **request**: `Uint8Array` *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"POLICY_SIGN_REQUEST"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: PolicySignResponseMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/PolicySignResponseMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / PolicySignResponseMessage # Interface: PolicySignResponseMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `object` #### response > **response**: `Uint8Array` *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"POLICY_SIGN_RESPONSE"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: PolicyUpdateMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/PolicyUpdateMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / PolicyUpdateMessage # Interface: PolicyUpdateMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `object` #### currentRoot > **currentRoot**: `string` #### manifest > **manifest**: `Uint8Array` #### policyEpoch > **policyEpoch**: `number` #### policyId > **policyId**: `string` #### policyVersion > **policyVersion**: `number` #### previousRoot? > `optional` **previousRoot?**: `string` *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"POLICY_UPDATE"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: PolicyWatchMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/PolicyWatchMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / PolicyWatchMessage # Interface: PolicyWatchMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `object` #### afterEpoch? > `optional` **afterEpoch?**: `number` #### policyId > **policyId**: `string` *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"POLICY_WATCH"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: PongMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/PongMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / PongMessage # Interface: PongMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `object` #### echo > **echo**: `number` #### ts > **ts**: `number` *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"PONG"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: ProofResponseMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/ProofResponseMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / ProofResponseMessage # Interface: ProofResponseMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `object` #### coinId > **coinId**: `string` #### proof > **proof**: `unknown` *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"PROOF_RESPONSE"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: SignFn URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/SignFn [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / SignFn # Interface: SignFn() > **SignFn**(`digest`): `Uint8Array`\<`ArrayBufferLike`\> \| `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> ## Parameters ### digest `Uint8Array` ## Returns `Uint8Array`\<`ArrayBufferLike`\> \| `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> --- ## Page: TrustQueryMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/TrustQueryMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / TrustQueryMessage # Interface: TrustQueryMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `object` #### subjectId > **subjectId**: `string` #### subjectType > **subjectType**: `"app"` \| `"agent"` \| `"node"` *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"TRUST_QUERY"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: TrustRecordMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/TrustRecordMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / TrustRecordMessage # Interface: TrustRecordMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `object` #### comment? > `optional` **comment?**: `string` #### rating > **rating**: `number` #### reviewerAddress > **reviewerAddress**: `string` #### signature > **signature**: `string` #### subjectId > **subjectId**: `string` *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"TRUST_RECORD"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: VerifyFn URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/VerifyFn [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / VerifyFn # Interface: VerifyFn() > **VerifyFn**(`digest`, `signature`, `publicKey`): `boolean` \| `Promise`\<`boolean`\> ## Parameters ### digest `Uint8Array` ### signature `Uint8Array` ### publicKey `Uint8Array` ## Returns `boolean` \| `Promise`\<`boolean`\> --- ## Page: VersionCheckResult URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/VersionCheckResult [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / VersionCheckResult # Interface: VersionCheckResult ## Properties ### compatible > **compatible**: `boolean` *** ### mismatch? > `optional` **mismatch?**: [`VersionMismatchMessage`](VersionMismatchMessage.md) --- ## Page: VersionMismatchMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/VersionMismatchMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / VersionMismatchMessage # Interface: VersionMismatchMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `object` #### clientVersion > **clientVersion**: `number` #### message > **message**: `string` #### serverVersion > **serverVersion**: `number` *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"VERSION_MISMATCH"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: WatchRegisterMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/WatchRegisterMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / WatchRegisterMessage # Interface: WatchRegisterMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `object` #### addresses > **addresses**: `string`[] #### tokenIds? > `optional` **tokenIds?**: `string`[] *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"WATCH_REGISTER"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: WatchRemoveMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/interfaces/WatchRemoveMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / WatchRemoveMessage # Interface: WatchRemoveMessage ## Extends - `BaseMessage` ## Properties ### id? > `optional` **id?**: `string` #### Inherited from `BaseMessage.id` *** ### payload > **payload**: `object` #### addresses > **addresses**: `string`[] *** ### sig? > `optional` **sig?**: `string` #### Inherited from `BaseMessage.sig` *** ### type > **type**: `"WATCH_REMOVE"` #### Overrides `BaseMessage.type` *** ### version > **version**: `number` #### Inherited from `BaseMessage.version` --- ## Page: LookupMessage URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/type-aliases/LookupMessage [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / LookupMessage # Type Alias: LookupMessage > **LookupMessage** = [`HelloMessage`](../interfaces/HelloMessage.md) \| [`AuthChallengeMessage`](../interfaces/AuthChallengeMessage.md) \| [`AuthResponseMessage`](../interfaces/AuthResponseMessage.md) \| [`WatchRegisterMessage`](../interfaces/WatchRegisterMessage.md) \| [`WatchRemoveMessage`](../interfaces/WatchRemoveMessage.md) \| [`GetCoinsMessage`](../interfaces/GetCoinsMessage.md) \| [`GetCoinMessage`](../interfaces/GetCoinMessage.md) \| [`GetProofMessage`](../interfaces/GetProofMessage.md) \| [`GetTipMessage`](../interfaces/GetTipMessage.md) \| [`GetTokenMessage`](../interfaces/GetTokenMessage.md) \| [`BroadcastTxPoWMessage`](../interfaces/BroadcastTxPoWMessage.md) \| [`CoinUpdateMessage`](../interfaces/CoinUpdateMessage.md) \| [`ProofResponseMessage`](../interfaces/ProofResponseMessage.md) \| `CoinsResponseMessage` \| `CoinResponseMessage` \| `TipResponseMessage` \| `TokenResponseMessage` \| `BroadcastResponseMessage` \| [`LeaseReserveMessage`](../interfaces/LeaseReserveMessage.md) \| [`LeaseCommitMessage`](../interfaces/LeaseCommitMessage.md) \| [`LeaseBurnMessage`](../interfaces/LeaseBurnMessage.md) \| [`LeaseWatermarkMessage`](../interfaces/LeaseWatermarkMessage.md) \| `LeaseResponseMessage` \| [`AppAnnounceMessage`](../interfaces/AppAnnounceMessage.md) \| [`AppQueryMessage`](../interfaces/AppQueryMessage.md) \| [`AppResultMessage`](../interfaces/AppResultMessage.md) \| [`AgentAnnounceMessage`](../interfaces/AgentAnnounceMessage.md) \| [`AgentQueryMessage`](../interfaces/AgentQueryMessage.md) \| [`AgentResultMessage`](../interfaces/AgentResultMessage.md) \| [`TrustRecordMessage`](../interfaces/TrustRecordMessage.md) \| [`TrustQueryMessage`](../interfaces/TrustQueryMessage.md) \| `TrustResponseMessage` \| [`PolicyAnnounceMessage`](../interfaces/PolicyAnnounceMessage.md) \| [`PolicyQueryMessage`](../interfaces/PolicyQueryMessage.md) \| [`PolicyResultMessage`](../interfaces/PolicyResultMessage.md) \| [`PolicyWatchMessage`](../interfaces/PolicyWatchMessage.md) \| [`PolicyUpdateMessage`](../interfaces/PolicyUpdateMessage.md) \| [`PolicySignRequestMessage`](../interfaces/PolicySignRequestMessage.md) \| [`PolicySignResponseMessage`](../interfaces/PolicySignResponseMessage.md) \| [`PolicySignCancelMessage`](../interfaces/PolicySignCancelMessage.md) \| [`VersionMismatchMessage`](../interfaces/VersionMismatchMessage.md) \| [`ErrorMessage`](../interfaces/ErrorMessage.md) \| [`PingMessage`](../interfaces/PingMessage.md) \| [`PongMessage`](../interfaces/PongMessage.md) --- ## Page: MessageType URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/type-aliases/MessageType [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / MessageType # Type Alias: MessageType > **MessageType** = `"HELLO"` \| `"AUTH_CHALLENGE"` \| `"AUTH_RESPONSE"` \| `"WATCH_REGISTER"` \| `"WATCH_REMOVE"` \| `"GET_COINS"` \| `"GET_COIN"` \| `"GET_PROOF"` \| `"GET_TIP"` \| `"GET_TOKEN"` \| `"BROADCAST_TXPOW"` \| `"COIN_UPDATE"` \| `"PROOF_RESPONSE"` \| `"COINS_RESPONSE"` \| `"COIN_RESPONSE"` \| `"TIP_RESPONSE"` \| `"TOKEN_RESPONSE"` \| `"BROADCAST_RESPONSE"` \| `"LEASE_RESERVE"` \| `"LEASE_COMMIT"` \| `"LEASE_BURN"` \| `"LEASE_WATERMARK"` \| `"LEASE_RESPONSE"` \| `"APP_ANNOUNCE"` \| `"APP_QUERY"` \| `"APP_RESULT"` \| `"AGENT_ANNOUNCE"` \| `"AGENT_QUERY"` \| `"AGENT_RESULT"` \| `"TRUST_RECORD"` \| `"TRUST_QUERY"` \| `"TRUST_RESPONSE"` \| `"POLICY_ANNOUNCE"` \| `"POLICY_QUERY"` \| `"POLICY_RESULT"` \| `"POLICY_WATCH"` \| `"POLICY_UPDATE"` \| `"POLICY_SIGN_REQUEST"` \| `"POLICY_SIGN_RESPONSE"` \| `"POLICY_SIGN_CANCEL"` \| `"VERSION_MISMATCH"` \| `"ERROR"` \| `"PING"` \| `"PONG"` --- ## Page: MAX_FRAME_BODY_LENGTH URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/variables/MAX_FRAME_BODY_LENGTH [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / MAX\_FRAME\_BODY\_LENGTH # Variable: MAX\_FRAME\_BODY\_LENGTH > `const` **MAX\_FRAME\_BODY\_LENGTH**: `4194304` = `4_194_304` --- ## Page: PROTOCOL_VERSION URL: https://docs.totem.ing/api/totemsdk-lookup-protocol/variables/PROTOCOL_VERSION [**@totemsdk/lookup-protocol**](../index.md) *** [@totemsdk/lookup-protocol](../index.md) / PROTOCOL\_VERSION # Variable: PROTOCOL\_VERSION > `const` **PROTOCOL\_VERSION**: `1` = `1` --- ## Page: computeManifestId URL: https://docs.totem.ing/api/totemsdk-manifest/functions/computeManifestId [**@totemsdk/manifest**](../index.md) *** [@totemsdk/manifest](../index.md) / computeManifestId # Function: computeManifestId() > **computeManifestId**(`manifest`): `string` ## Parameters ### manifest [`Manifest`](../type-aliases/Manifest.md) ## Returns `string` --- ## Page: decodeManifest URL: https://docs.totem.ing/api/totemsdk-manifest/functions/decodeManifest [**@totemsdk/manifest**](../index.md) *** [@totemsdk/manifest](../index.md) / decodeManifest # Function: decodeManifest() > **decodeManifest**(`bytes`): [`SignedManifest`](../interfaces/SignedManifest.md) ## Parameters ### bytes `Uint8Array` ## Returns [`SignedManifest`](../interfaces/SignedManifest.md) --- ## Page: encodeManifest URL: https://docs.totem.ing/api/totemsdk-manifest/functions/encodeManifest [**@totemsdk/manifest**](../index.md) *** [@totemsdk/manifest](../index.md) / encodeManifest # Function: encodeManifest() > **encodeManifest**(`signed`): `Uint8Array` ## Parameters ### signed [`SignedManifest`](../interfaces/SignedManifest.md) ## Returns `Uint8Array` --- ## Page: isAppManifest URL: https://docs.totem.ing/api/totemsdk-manifest/functions/isAppManifest [**@totemsdk/manifest**](../index.md) *** [@totemsdk/manifest](../index.md) / isAppManifest # Function: isAppManifest() > **isAppManifest**(`input`): input is AppManifest \| SignedManifest\ ## Parameters ### input `MaybeSignedOrRaw` ## Returns input is AppManifest \| SignedManifest\ --- ## Page: isCapabilityManifest URL: https://docs.totem.ing/api/totemsdk-manifest/functions/isCapabilityManifest [**@totemsdk/manifest**](../index.md) *** [@totemsdk/manifest](../index.md) / isCapabilityManifest # Function: isCapabilityManifest() > **isCapabilityManifest**(`input`): input is CapabilityManifest \| SignedManifest\ ## Parameters ### input `MaybeSignedOrRaw` ## Returns input is CapabilityManifest \| SignedManifest\ --- ## Page: isDAppManifest URL: https://docs.totem.ing/api/totemsdk-manifest/functions/isDAppManifest [**@totemsdk/manifest**](../index.md) *** [@totemsdk/manifest](../index.md) / isDAppManifest # Function: isDAppManifest() > **isDAppManifest**(`input`): input is DAppManifest \| SignedManifest\ ## Parameters ### input `MaybeSignedOrRaw` ## Returns input is DAppManifest \| SignedManifest\ --- ## Page: isEdgeServiceManifest URL: https://docs.totem.ing/api/totemsdk-manifest/functions/isEdgeServiceManifest [**@totemsdk/manifest**](../index.md) *** [@totemsdk/manifest](../index.md) / isEdgeServiceManifest # Function: isEdgeServiceManifest() > **isEdgeServiceManifest**(`input`): input is EdgeServiceManifest \| SignedManifest\ ## Parameters ### input `MaybeSignedOrRaw` ## Returns input is EdgeServiceManifest \| SignedManifest\ --- ## Page: signManifest URL: https://docs.totem.ing/api/totemsdk-manifest/functions/signManifest [**@totemsdk/manifest**](../index.md) *** [@totemsdk/manifest](../index.md) / signManifest # Function: signManifest() > **signManifest**\<`T`\>(`manifest`, `seed`, `keyIndex`): `Promise`\<[`SignedManifest`](../interfaces/SignedManifest.md)\<`T`\>\> ## Type Parameters ### T `T` *extends* [`Manifest`](../type-aliases/Manifest.md) ## Parameters ### manifest `T` ### seed `Uint8Array` ### keyIndex `number` ## Returns `Promise`\<[`SignedManifest`](../interfaces/SignedManifest.md)\<`T`\>\> --- ## Page: verifyManifest URL: https://docs.totem.ing/api/totemsdk-manifest/functions/verifyManifest [**@totemsdk/manifest**](../index.md) *** [@totemsdk/manifest](../index.md) / verifyManifest # Function: verifyManifest() > **verifyManifest**(`signed`): [`VerifyResult`](../interfaces/VerifyResult.md) ## Parameters ### signed [`SignedManifest`](../interfaces/SignedManifest.md) ## Returns [`VerifyResult`](../interfaces/VerifyResult.md) --- ## Page: AppManifest URL: https://docs.totem.ing/api/totemsdk-manifest/interfaces/AppManifest [**@totemsdk/manifest**](../index.md) *** [@totemsdk/manifest](../index.md) / AppManifest # Interface: AppManifest ## Properties ### appId > **appId**: `string` *** ### authorAddress > **authorAddress**: `string` *** ### category > **category**: `string`[] *** ### description > **description**: `string` *** ### iconCid? > `optional` **iconCid?**: `string` *** ### minTotemVersion > **minTotemVersion**: `string` *** ### name > **name**: `string` *** ### pearTopicKey > **pearTopicKey**: `string` *** ### permissions > **permissions**: [`AppPermission`](../type-aliases/AppPermission.md)[] *** ### price > **price**: `string` *** ### priceToken? > `optional` **priceToken?**: `string` *** ### repoUrl? > `optional` **repoUrl?**: `string` *** ### subscriptionInterval? > `optional` **subscriptionInterval?**: `number` *** ### type > **type**: `"app"` *** ### version > **version**: `string` --- ## Page: CapabilityManifest URL: https://docs.totem.ing/api/totemsdk-manifest/interfaces/CapabilityManifest [**@totemsdk/manifest**](../index.md) *** [@totemsdk/manifest](../index.md) / CapabilityManifest # Interface: CapabilityManifest ## Properties ### agentAddress > **agentAddress**: `string` *** ### agentIdentityKey > **agentIdentityKey**: `string` *** ### capabilityId > **capabilityId**: `string` *** ### capabilityName > **capabilityName**: `string` *** ### description > **description**: `string` *** ### expiresAt > **expiresAt**: `number` *** ### inputSchema > **inputSchema**: `object` *** ### maxCallsPerMinute? > `optional` **maxCallsPerMinute?**: `number` *** ### maxLatencyMs? > `optional` **maxLatencyMs?**: `number` *** ### outputSchema > **outputSchema**: `object` *** ### paymentChannel? > `optional` **paymentChannel?**: `"omnia"` \| `"onchain"` *** ### pricePerCall > **pricePerCall**: `string` *** ### priceToken? > `optional` **priceToken?**: `string` *** ### tags > **tags**: `string`[] *** ### type > **type**: `"capability"` --- ## Page: DAppAbiEntry URL: https://docs.totem.ing/api/totemsdk-manifest/interfaces/DAppAbiEntry [**@totemsdk/manifest**](../index.md) *** [@totemsdk/manifest](../index.md) / DAppAbiEntry # Interface: DAppAbiEntry ## Properties ### description > **description**: `string` *** ### name > **name**: `string` *** ### params > **params**: `object`[] #### description? > `optional` **description?**: `string` #### name > **name**: `string` #### type > **type**: `string` --- ## Page: DAppManifest URL: https://docs.totem.ing/api/totemsdk-manifest/interfaces/DAppManifest [**@totemsdk/manifest**](../index.md) *** [@totemsdk/manifest](../index.md) / DAppManifest # Interface: DAppManifest ## Properties ### abi > **abi**: [`DAppAbiEntry`](DAppAbiEntry.md)[] *** ### auditReport? > `optional` **auditReport?**: `string` *** ### authorAddress > **authorAddress**: `string` *** ### category > **category**: `string`[] *** ### contractHash > **contractHash**: `string` *** ### contractSource? > `optional` **contractSource?**: `string` *** ### dappId > **dappId**: `string` *** ### description > **description**: `string` *** ### name > **name**: `string` *** ### price > **price**: `string` *** ### priceToken? > `optional` **priceToken?**: `string` *** ### type > **type**: `"dapp"` *** ### version > **version**: `string` --- ## Page: EdgeServiceManifest URL: https://docs.totem.ing/api/totemsdk-manifest/interfaces/EdgeServiceManifest [**@totemsdk/manifest**](../index.md) *** [@totemsdk/manifest](../index.md) / EdgeServiceManifest # Interface: EdgeServiceManifest ## Properties ### capabilities > **capabilities**: `string`[] *** ### description > **description**: `string` *** ### endpoints? > `optional` **endpoints?**: `object`[] #### type > **type**: `"other"` \| `"https"` \| `"mqtt"` \| `"hyperswarm"` \| `"websocket"` #### uri > **uri**: `string` *** ### expiresAt? > `optional` **expiresAt?**: `number` *** ### minTotemVersion? > `optional` **minTotemVersion?**: `string` *** ### name > **name**: `string` *** ### operatorAddress > **operatorAddress**: `string` *** ### paymentMethods? > `optional` **paymentMethods?**: (`"omnia"` \| `"onchain"` \| `"invoice"` \| `"free"`)[] *** ### price? > `optional` **price?**: `string` *** ### priceToken? > `optional` **priceToken?**: `string` *** ### serviceId > **serviceId**: `string` *** ### serviceType > **serviceType**: [`EdgeServiceType`](../type-aliases/EdgeServiceType.md) *** ### tags > **tags**: `string`[] *** ### type > **type**: `"edge-service"` *** ### version > **version**: `string` --- ## Page: SignedManifest URL: https://docs.totem.ing/api/totemsdk-manifest/interfaces/SignedManifest [**@totemsdk/manifest**](../index.md) *** [@totemsdk/manifest](../index.md) / SignedManifest # Interface: SignedManifest\ Wraps any manifest with a WOTS signature. `signerPublicKey` — hex of the full WOTS public key (required for self-contained verification via verifyManifest). `authorAddress` — the Minima address of the signer, derived at sign time and stored for quick policy checks without re-deriving from the public key. ## Type Parameters ### T `T` *extends* [`Manifest`](../type-aliases/Manifest.md) = [`Manifest`](../type-aliases/Manifest.md) ## Properties ### authorAddress > **authorAddress**: `string` *** ### manifest > **manifest**: `T` *** ### rootIdentityProof? > `optional` **rootIdentityProof?**: `string` *** ### signature > **signature**: `string` *** ### signedAt > **signedAt**: `number` *** ### signerPublicKey > **signerPublicKey**: `string` --- ## Page: VerifyResult URL: https://docs.totem.ing/api/totemsdk-manifest/interfaces/VerifyResult [**@totemsdk/manifest**](../index.md) *** [@totemsdk/manifest](../index.md) / VerifyResult # Interface: VerifyResult ## Properties ### reason? > `optional` **reason?**: `string` *** ### signerAddress > **signerAddress**: `string` *** ### valid > **valid**: `boolean` --- ## Page: AppPermission URL: https://docs.totem.ing/api/totemsdk-manifest/type-aliases/AppPermission [**@totemsdk/manifest**](../index.md) *** [@totemsdk/manifest](../index.md) / AppPermission # Type Alias: AppPermission > **AppPermission** = `"wallet:read-balance"` \| `"wallet:request-payment"` \| `"omnia:open-channel"` \| `"omnia:update-channel"` \| `"lookup:watch-address"` \| `"kissvm:evaluate"` \| `"qvac:call-agent"` @totemsdk/manifest — Manifest type definitions Four manifest categories for the MVP: AppManifest — human-facing Pear app CapabilityManifest — ephemeral AI/agent service DAppManifest — KISSVM contract / covenant EdgeServiceManifest — any persistent Totem Edge service No network, no blockchain, no Hyperswarm — pure schema. --- ## Page: EdgeServiceType URL: https://docs.totem.ing/api/totemsdk-manifest/type-aliases/EdgeServiceType [**@totemsdk/manifest**](../index.md) *** [@totemsdk/manifest](../index.md) / EdgeServiceType # Type Alias: EdgeServiceType > **EdgeServiceType** = `"sensor"` \| `"robot"` \| `"mqtt-feed"` \| `"proof-index"` \| `"lookup-provider"` \| `"omnia-router"` \| `"calibration-authority"` \| `"verifier"` \| `"machine-service"` \| `"other"` --- ## Page: Manifest URL: https://docs.totem.ing/api/totemsdk-manifest/type-aliases/Manifest [**@totemsdk/manifest**](../index.md) *** [@totemsdk/manifest](../index.md) / Manifest # Type Alias: Manifest > **Manifest** = [`AppManifest`](../interfaces/AppManifest.md) \| [`CapabilityManifest`](../interfaces/CapabilityManifest.md) \| [`DAppManifest`](../interfaces/DAppManifest.md) \| [`EdgeServiceManifest`](../interfaces/EdgeServiceManifest.md) --- ## Page: MANIFEST_VERSION URL: https://docs.totem.ing/api/totemsdk-manifest/variables/MANIFEST_VERSION [**@totemsdk/manifest**](../index.md) *** [@totemsdk/manifest](../index.md) / MANIFEST\_VERSION # Variable: MANIFEST\_VERSION > `const` **MANIFEST\_VERSION**: `1` --- ## Page: SERVER_INFO URL: https://docs.totem.ing/api/totemsdk-mcp-server/variables/SERVER_INFO [**@totemsdk/mcp-server**](../index.md) *** [@totemsdk/mcp-server](../index.md) / SERVER\_INFO # Variable: SERVER\_INFO > `const` **SERVER\_INFO**: `object` ## Type Declaration ### capabilities > `readonly` **capabilities**: `object` #### capabilities.prompts > `readonly` **prompts**: `object` = `{}` #### capabilities.resources > `readonly` **resources**: `object` = `{}` #### capabilities.tools > `readonly` **tools**: `object` = `{}` ### name > `readonly` **name**: `"@totemsdk/mcp-server"` = `'@totemsdk/mcp-server'` ### version > `readonly` **version**: `"0.2.0"` = `'0.2.0'` --- ## Page: sdkIndex URL: https://docs.totem.ing/api/totemsdk-mcp-server/variables/sdkIndex [**@totemsdk/mcp-server**](../index.md) *** [@totemsdk/mcp-server](../index.md) / sdkIndex # Variable: sdkIndex > `const` **sdkIndex**: `SdkIndex` --- ## Page: MinimaRpcError URL: https://docs.totem.ing/api/totemsdk-minima-rpc/classes/MinimaRpcError [**@totemsdk/minima-rpc**](../index.md) *** [@totemsdk/minima-rpc](../index.md) / MinimaRpcError # Class: MinimaRpcError ## Extends - `Error` ## Constructors ### Constructor > **new MinimaRpcError**(`message`, `command`, `minimaError?`, `httpStatus?`): `MinimaRpcError` #### Parameters ##### message `string` ##### command `string` ##### minimaError? `string` ##### httpStatus? `number` #### Returns `MinimaRpcError` #### Overrides `Error.constructor` ## Properties ### command > `readonly` **command**: `string` *** ### httpStatus? > `readonly` `optional` **httpStatus?**: `number` *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### minimaError? > `readonly` `optional` **minimaError?**: `string` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: buildCommandString URL: https://docs.totem.ing/api/totemsdk-minima-rpc/functions/buildCommandString [**@totemsdk/minima-rpc**](../index.md) *** [@totemsdk/minima-rpc](../index.md) / buildCommandString # Function: buildCommandString() > **buildCommandString**(`method`, `params?`): `string` Build the Minima command string from a method name + params object. Ported from MinimaRpcAdapter.translateToMinimaCommand() with Gap 1 + Gap 2 fixes applied. ## Parameters ### method `string` ### params? `Record`\<`string`, `unknown`\> ## Returns `string` --- ## Page: createMinimaRpcClient URL: https://docs.totem.ing/api/totemsdk-minima-rpc/functions/createMinimaRpcClient [**@totemsdk/minima-rpc**](../index.md) *** [@totemsdk/minima-rpc](../index.md) / createMinimaRpcClient # Function: createMinimaRpcClient() > **createMinimaRpcClient**(`config`): [`MinimaRpcClient`](../interfaces/MinimaRpcClient.md) ## Parameters ### config [`MinimaRpcConfig`](../interfaces/MinimaRpcConfig.md) ## Returns [`MinimaRpcClient`](../interfaces/MinimaRpcClient.md) --- ## Page: postCommand URL: https://docs.totem.ing/api/totemsdk-minima-rpc/functions/postCommand [**@totemsdk/minima-rpc**](../index.md) *** [@totemsdk/minima-rpc](../index.md) / postCommand # Function: postCommand() > **postCommand**(`config`, `commandString`): `Promise`\<`unknown`\> Send a single POST to the Minima RPC endpoint and return the parsed envelope. Throws MinimaRpcError on HTTP errors or Minima status:false. ## Parameters ### config [`MinimaRpcConfig`](../interfaces/MinimaRpcConfig.md) ### commandString `string` ## Returns `Promise`\<`unknown`\> --- ## Page: AddressInfo URL: https://docs.totem.ing/api/totemsdk-minima-rpc/interfaces/AddressInfo [**@totemsdk/minima-rpc**](../index.md) *** [@totemsdk/minima-rpc](../index.md) / AddressInfo # Interface: AddressInfo ## Properties ### address > **address**: `string` *** ### default > **default**: `boolean` *** ### miniaddress > **miniaddress**: `string` *** ### publickey > **publickey**: `string` *** ### script > **script**: `string` *** ### simple > **simple**: `boolean` *** ### track > **track**: `boolean` --- ## Page: Balance URL: https://docs.totem.ing/api/totemsdk-minima-rpc/interfaces/Balance [**@totemsdk/minima-rpc**](../index.md) *** [@totemsdk/minima-rpc](../index.md) / Balance # Interface: Balance ## Properties ### coins > **coins**: `number` *** ### confirmed > **confirmed**: `string` *** ### details? > `optional` **details?**: `unknown` *** ### sendable > **sendable**: `string` *** ### token > **token**: `string` *** ### tokenid > **tokenid**: `string` *** ### total? > `optional` **total?**: `string` *** ### unconfirmed > **unconfirmed**: `string` --- ## Page: BalanceQuery URL: https://docs.totem.ing/api/totemsdk-minima-rpc/interfaces/BalanceQuery [**@totemsdk/minima-rpc**](../index.md) *** [@totemsdk/minima-rpc](../index.md) / BalanceQuery # Interface: BalanceQuery ## Properties ### address? > `optional` **address?**: `string` *** ### megammr? > `optional` **megammr?**: `boolean` *** ### tokendetails? > `optional` **tokendetails?**: `boolean` --- ## Page: BurnInfo URL: https://docs.totem.ing/api/totemsdk-minima-rpc/interfaces/BurnInfo [**@totemsdk/minima-rpc**](../index.md) *** [@totemsdk/minima-rpc](../index.md) / BurnInfo # Interface: BurnInfo ## Properties ### avg > **avg**: `string` *** ### median > **median**: `string` *** ### recommended > **recommended**: `string` *** ### txpow > **txpow**: `unknown` --- ## Page: ChainTip URL: https://docs.totem.ing/api/totemsdk-minima-rpc/interfaces/ChainTip [**@totemsdk/minima-rpc**](../index.md) *** [@totemsdk/minima-rpc](../index.md) / ChainTip # Interface: ChainTip ## Properties ### block > **block**: `number` *** ### hash > **hash**: `string` *** ### time > **time**: `string` *** ### txpow? > `optional` **txpow?**: `unknown` --- ## Page: Coin URL: https://docs.totem.ing/api/totemsdk-minima-rpc/interfaces/Coin [**@totemsdk/minima-rpc**](../index.md) *** [@totemsdk/minima-rpc](../index.md) / Coin # Interface: Coin ## Properties ### address > **address**: `string` *** ### amount > **amount**: `string` *** ### coinid > **coinid**: `string` *** ### created > **created**: `string` *** ### miniaddress > **miniaddress**: `string` *** ### mmrentry > **mmrentry**: `string` *** ### spent > **spent**: `boolean` *** ### state > **state**: `unknown`[] *** ### storestate > **storestate**: `boolean` *** ### token > **token**: `unknown` *** ### tokenid > **tokenid**: `string` --- ## Page: CoinCheckResult URL: https://docs.totem.ing/api/totemsdk-minima-rpc/interfaces/CoinCheckResult [**@totemsdk/minima-rpc**](../index.md) *** [@totemsdk/minima-rpc](../index.md) / CoinCheckResult # Interface: CoinCheckResult ## Properties ### coin? > `optional` **coin?**: [`Coin`](Coin.md) *** ### found > **found**: `boolean` *** ### mmrentry? > `optional` **mmrentry?**: `string` *** ### spent > **spent**: `boolean` --- ## Page: CoinExportResult URL: https://docs.totem.ing/api/totemsdk-minima-rpc/interfaces/CoinExportResult [**@totemsdk/minima-rpc**](../index.md) *** [@totemsdk/minima-rpc](../index.md) / CoinExportResult # Interface: CoinExportResult ## Properties ### coinid > **coinid**: `string` *** ### coinproof? > `optional` **coinproof?**: `object` Full coin + MMR proof payload (totem-node `coinexport` shape). #### coin? > `optional` **coin?**: [`Coin`](Coin.md) #### proof? > `optional` **proof?**: `unknown` *** ### data > **data**: `string` --- ## Page: CoinsQuery URL: https://docs.totem.ing/api/totemsdk-minima-rpc/interfaces/CoinsQuery [**@totemsdk/minima-rpc**](../index.md) *** [@totemsdk/minima-rpc](../index.md) / CoinsQuery # Interface: CoinsQuery ## Properties ### address? > `optional` **address?**: `string` *** ### amount? > `optional` **amount?**: `string` *** ### coinage? > `optional` **coinage?**: `number` *** ### coinid? > `optional` **coinid?**: `string` *** ### megammr? > `optional` **megammr?**: `boolean` *** ### relevant? > `optional` **relevant?**: `boolean` *** ### sendable? > `optional` **sendable?**: `boolean` *** ### tokenid? > `optional` **tokenid?**: `string` --- ## Page: HistoryEntry URL: https://docs.totem.ing/api/totemsdk-minima-rpc/interfaces/HistoryEntry [**@totemsdk/minima-rpc**](../index.md) *** [@totemsdk/minima-rpc](../index.md) / HistoryEntry # Interface: HistoryEntry ## Properties ### burn > **burn**: `string` *** ### hasbody > **hasbody**: `boolean` *** ### header > **header**: `unknown` *** ### size > **size**: `number` *** ### superblock > **superblock**: `number` *** ### txbody? > `optional` **txbody?**: `unknown` *** ### txpowid > **txpowid**: `string` --- ## Page: HistoryQuery URL: https://docs.totem.ing/api/totemsdk-minima-rpc/interfaces/HistoryQuery [**@totemsdk/minima-rpc**](../index.md) *** [@totemsdk/minima-rpc](../index.md) / HistoryQuery # Interface: HistoryQuery ## Properties ### action? > `optional` **action?**: `string` *** ### address? > `optional` **address?**: `string` *** ### max? > `optional` **max?**: `number` *** ### offset? > `optional` **offset?**: `number` *** ### relevant? > `optional` **relevant?**: `boolean` --- ## Page: MMRProof URL: https://docs.totem.ing/api/totemsdk-minima-rpc/interfaces/MMRProof [**@totemsdk/minima-rpc**](../index.md) *** [@totemsdk/minima-rpc](../index.md) / MMRProof # Interface: MMRProof ## Properties ### coinid > **coinid**: `string` *** ### data > **data**: `object` #### coin > **coin**: `unknown` #### proof > **proof**: `object` ##### proof.blocktime > **blocktime**: `unknown` ##### proof.chainsha > **chainsha**: `string` ##### proof.proofchain > **proofchain**: `unknown`[] --- ## Page: MegaMMRInfo URL: https://docs.totem.ing/api/totemsdk-minima-rpc/interfaces/MegaMMRInfo [**@totemsdk/minima-rpc**](../index.md) *** [@totemsdk/minima-rpc](../index.md) / MegaMMRInfo # Interface: MegaMMRInfo ## Properties ### block > **block**: `number` *** ### hash > **hash**: `string` *** ### size > **size**: `string` --- ## Page: MinimaEnvelope URL: https://docs.totem.ing/api/totemsdk-minima-rpc/interfaces/MinimaEnvelope [**@totemsdk/minima-rpc**](../index.md) *** [@totemsdk/minima-rpc](../index.md) / MinimaEnvelope # Interface: MinimaEnvelope ## Properties ### command > **command**: `string` *** ### error? > `optional` **error?**: `string` *** ### pending > **pending**: `boolean` *** ### response? > `optional` **response?**: `unknown` *** ### status > **status**: `boolean` --- ## Page: MinimaRpcClient URL: https://docs.totem.ing/api/totemsdk-minima-rpc/interfaces/MinimaRpcClient [**@totemsdk/minima-rpc**](../index.md) *** [@totemsdk/minima-rpc](../index.md) / MinimaRpcClient # Interface: MinimaRpcClient ## Methods ### balance() > **balance**(`params?`): `Promise`\<[`Balance`](Balance.md)[]\> #### Parameters ##### params? [`BalanceQuery`](BalanceQuery.md) #### Returns `Promise`\<[`Balance`](Balance.md)[]\> *** ### burn() > **burn**(`last?`): `Promise`\<[`BurnInfo`](BurnInfo.md)\> #### Parameters ##### last? `number` #### Returns `Promise`\<[`BurnInfo`](BurnInfo.md)\> *** ### coinCheck() > **coinCheck**(`coinId`): `Promise`\<[`CoinCheckResult`](CoinCheckResult.md)\> #### Parameters ##### coinId `string` #### Returns `Promise`\<[`CoinCheckResult`](CoinCheckResult.md)\> *** ### coinExport() > **coinExport**(`coinId`): `Promise`\<[`CoinExportResult`](CoinExportResult.md)\> #### Parameters ##### coinId `string` #### Returns `Promise`\<[`CoinExportResult`](CoinExportResult.md)\> *** ### coins() > **coins**(`query?`): `Promise`\<[`Coin`](Coin.md)[]\> #### Parameters ##### query? [`CoinsQuery`](CoinsQuery.md) #### Returns `Promise`\<[`Coin`](Coin.md)[]\> *** ### getAddress() > **getAddress**(): `Promise`\<[`AddressInfo`](AddressInfo.md)\> #### Returns `Promise`\<[`AddressInfo`](AddressInfo.md)\> *** ### getTip() > **getTip**(): `Promise`\<[`ChainTip`](ChainTip.md)\> #### Returns `Promise`\<[`ChainTip`](ChainTip.md)\> *** ### history() > **history**(`params?`): `Promise`\<[`HistoryEntry`](HistoryEntry.md)[]\> #### Parameters ##### params? [`HistoryQuery`](HistoryQuery.md) #### Returns `Promise`\<[`HistoryEntry`](HistoryEntry.md)[]\> *** ### megammr() > **megammr**(): `Promise`\<[`MegaMMRInfo`](MegaMMRInfo.md)\> #### Returns `Promise`\<[`MegaMMRInfo`](MegaMMRInfo.md)\> *** ### mmrProof() > **mmrProof**(`coinId`): `Promise`\<[`MMRProof`](MMRProof.md)\> #### Parameters ##### coinId `string` #### Returns `Promise`\<[`MMRProof`](MMRProof.md)\> *** ### runCommand() > **runCommand**(`cmd`, `params?`): `Promise`\<`unknown`\> #### Parameters ##### cmd `string` ##### params? `Record`\<`string`, `unknown`\> #### Returns `Promise`\<`unknown`\> *** ### send() > **send**(`params`): `Promise`\<[`TxnPostResult`](TxnPostResult.md)\> #### Parameters ##### params [`SendParams`](SendParams.md) #### Returns `Promise`\<[`TxnPostResult`](TxnPostResult.md)\> *** ### status() > **status**(): `Promise`\<[`NodeStatus`](NodeStatus.md)\> #### Returns `Promise`\<[`NodeStatus`](NodeStatus.md)\> *** ### tokens() > **tokens**(`tokenId?`, `action?`): `Promise`\<[`TokenInfo`](TokenInfo.md)[]\> #### Parameters ##### tokenId? `string` ##### action? `string` #### Returns `Promise`\<[`TokenInfo`](TokenInfo.md)[]\> *** ### txnBasics() > **txnBasics**(`id`): `Promise`\<`void`\> #### Parameters ##### id `string` #### Returns `Promise`\<`void`\> *** ### txnCheck() > **txnCheck**(`id`): `Promise`\<[`TxnCheckResult`](TxnCheckResult.md)\> #### Parameters ##### id `string` #### Returns `Promise`\<[`TxnCheckResult`](TxnCheckResult.md)\> *** ### txnClear() > **txnClear**(`id`): `Promise`\<`void`\> #### Parameters ##### id `string` #### Returns `Promise`\<`void`\> *** ### txnCreate() > **txnCreate**(`id`): `Promise`\<`void`\> #### Parameters ##### id `string` #### Returns `Promise`\<`void`\> *** ### txnDelete() > **txnDelete**(`id`): `Promise`\<`void`\> #### Parameters ##### id `string` #### Returns `Promise`\<`void`\> *** ### txnExport() > **txnExport**(`id`): `Promise`\<`string`\> #### Parameters ##### id `string` #### Returns `Promise`\<`string`\> *** ### txnImport() > **txnImport**(`data`, `id?`): `Promise`\<`void`\> #### Parameters ##### data `string` ##### id? `string` #### Returns `Promise`\<`void`\> *** ### txnInput() > **txnInput**(`params`): `Promise`\<`void`\> #### Parameters ##### params [`TxnInputParams`](TxnInputParams.md) #### Returns `Promise`\<`void`\> *** ### txnList() > **txnList**(`id?`, `transactionOnly?`): `Promise`\<[`TxnListResult`](TxnListResult.md)\> #### Parameters ##### id? `string` ##### transactionOnly? `boolean` #### Returns `Promise`\<[`TxnListResult`](TxnListResult.md)\> *** ### txnMine() > **txnMine**(`params`): `Promise`\<`void`\> #### Parameters ##### params [`TxnMineParams`](TxnMineParams.md) #### Returns `Promise`\<`void`\> *** ### txnMinePost() > **txnMinePost**(`data`): `Promise`\<[`TxnPostResult`](TxnPostResult.md)\> #### Parameters ##### data `string` #### Returns `Promise`\<[`TxnPostResult`](TxnPostResult.md)\> *** ### txnOutput() > **txnOutput**(`params`): `Promise`\<`void`\> #### Parameters ##### params [`TxnOutputParams`](TxnOutputParams.md) #### Returns `Promise`\<`void`\> *** ### txnPost() > **txnPost**(`params`): `Promise`\<[`TxnPostResult`](TxnPostResult.md)\> #### Parameters ##### params [`TxnPostParams`](TxnPostParams.md) #### Returns `Promise`\<[`TxnPostResult`](TxnPostResult.md)\> *** ### txnScript() > **txnScript**(`params`): `Promise`\<`void`\> #### Parameters ##### params [`TxnScriptParams`](TxnScriptParams.md) #### Returns `Promise`\<`void`\> *** ### txnSign() > **txnSign**(`params`): `Promise`\<`void`\> #### Parameters ##### params [`TxnSignParams`](TxnSignParams.md) #### Returns `Promise`\<`void`\> *** ### txnState() > **txnState**(`params`): `Promise`\<`void`\> #### Parameters ##### params [`TxnStateParams`](TxnStateParams.md) #### Returns `Promise`\<`void`\> *** ### verify() > **verify**(`publicKey`, `data`, `signature`): `Promise`\<`boolean`\> #### Parameters ##### publicKey `string` ##### data `string` ##### signature `string` #### Returns `Promise`\<`boolean`\> *** ### webhooks() #### Call Signature > **webhooks**(`action`): `Promise`\<[`WebhookEntry`](WebhookEntry.md)[]\> ##### Parameters ###### action `"list"` ##### Returns `Promise`\<[`WebhookEntry`](WebhookEntry.md)[]\> #### Call Signature > **webhooks**(`action`, `hook`, `filter`): `Promise`\<`void`\> ##### Parameters ###### action `"add"` ###### hook `string` ###### filter `"NEWTXPOW"` \| `"NEWBLOCK"` ##### Returns `Promise`\<`void`\> #### Call Signature > **webhooks**(`action`, `hook`): `Promise`\<`void`\> ##### Parameters ###### action `"remove"` ###### hook `string` ##### Returns `Promise`\<`void`\> --- ## Page: MinimaRpcConfig URL: https://docs.totem.ing/api/totemsdk-minima-rpc/interfaces/MinimaRpcConfig [**@totemsdk/minima-rpc**](../index.md) *** [@totemsdk/minima-rpc](../index.md) / MinimaRpcConfig # Interface: MinimaRpcConfig Totem/Minima RPC types Minima node HTTP RPC response shapes and client config. ## Properties ### host > **host**: `string` *** ### maxRetries? > `optional` **maxRetries?**: `number` *** ### password? > `optional` **password?**: `string` *** ### port > **port**: `number` *** ### ssl? > `optional` **ssl?**: `boolean` *** ### timeoutMs? > `optional` **timeoutMs?**: `number` *** ### username? > `optional` **username?**: `string` RPC username. Defaults to 'minima' — the totem-node's only auto-available RPC account, which authenticates against the global -rpcpassword. --- ## Page: NodeStatus URL: https://docs.totem.ing/api/totemsdk-minima-rpc/interfaces/NodeStatus [**@totemsdk/minima-rpc**](../index.md) *** [@totemsdk/minima-rpc](../index.md) / NodeStatus # Interface: NodeStatus ## Properties ### chain > **chain**: `object` #### block > **block**: `number` #### branches > **branches**: `number` #### difficulty > **difficulty**: `string` #### hash > **hash**: `string` #### length > **length**: `number` #### size > **size**: `number` #### speed > **speed**: `string` #### time > **time**: `string` #### weight > **weight**: `string` *** ### coins > **coins**: `number` *** ### data > **data**: `string` *** ### length > **length**: `number` *** ### locked > **locked**: `boolean` *** ### memory > **memory**: `object` #### disk > **disk**: `string` #### files > **files**: `object` ##### files.archivedb > **archivedb**: `string` ##### files.cascade > **cascade**: `string` ##### files.chaintree > **chaintree**: `string` ##### files.p2pdb > **p2pdb**: `string` ##### files.txpowdb > **txpowdb**: `string` ##### files.userdb > **userdb**: `string` ##### files.wallet > **wallet**: `string` #### ram > **ram**: `string` *** ### minima > **minima**: `string` *** ### network > **network**: `object` #### connected > **connected**: `number` #### connecting > **connecting**: `number` #### host > **host**: `string` #### p2p > **p2p**: `string` #### port > **port**: `number` #### rpc > **rpc**: `boolean` #### traffic > **traffic**: `object` ##### traffic.from > **from**: `string` ##### traffic.read > **read**: `string` ##### traffic.to > **to**: `string` ##### traffic.write > **write**: `string` *** ### time > **time**: `string` *** ### txpow > **txpow**: `object` #### archivedb > **archivedb**: `number` #### mempool > **mempool**: `number` #### ramdb > **ramdb**: `number` #### txpowdb > **txpowdb**: `number` *** ### version > **version**: `string` *** ### weight > **weight**: `string` --- ## Page: SendParams URL: https://docs.totem.ing/api/totemsdk-minima-rpc/interfaces/SendParams [**@totemsdk/minima-rpc**](../index.md) *** [@totemsdk/minima-rpc](../index.md) / SendParams # Interface: SendParams ## Properties ### address > **address**: `string` *** ### amount > **amount**: `string` *** ### burn? > `optional` **burn?**: `string` *** ### split? > `optional` **split?**: `number` *** ### tokenid? > `optional` **tokenid?**: `string` --- ## Page: TokenInfo URL: https://docs.totem.ing/api/totemsdk-minima-rpc/interfaces/TokenInfo [**@totemsdk/minima-rpc**](../index.md) *** [@totemsdk/minima-rpc](../index.md) / TokenInfo # Interface: TokenInfo ## Properties ### coins > **coins**: `number` *** ### confirmed > **confirmed**: `string` *** ### description? > `optional` **description?**: `unknown` *** ### mempool > **mempool**: `string` *** ### name > **name**: `Record`\<`string`, `unknown`\> *** ### scale? > `optional` **scale?**: `number` *** ### script? > `optional` **script?**: `string` *** ### sendable > **sendable**: `string` *** ### tokenid > **tokenid**: `string` *** ### total > **total**: `string` *** ### totalamount? > `optional` **totalamount?**: `string` *** ### unconfirmed > **unconfirmed**: `string` --- ## Page: TxnCheckResult URL: https://docs.totem.ing/api/totemsdk-minima-rpc/interfaces/TxnCheckResult [**@totemsdk/minima-rpc**](../index.md) *** [@totemsdk/minima-rpc](../index.md) / TxnCheckResult # Interface: TxnCheckResult ## Properties ### signatures? > `optional` **signatures?**: `unknown` *** ### txpow? > `optional` **txpow?**: `unknown` *** ### valid > **valid**: `boolean` --- ## Page: TxnInputParams URL: https://docs.totem.ing/api/totemsdk-minima-rpc/interfaces/TxnInputParams [**@totemsdk/minima-rpc**](../index.md) *** [@totemsdk/minima-rpc](../index.md) / TxnInputParams # Interface: TxnInputParams ## Properties ### address? > `optional` **address?**: `string` *** ### amount? > `optional` **amount?**: `string` *** ### coinid? > `optional` **coinid?**: `string` *** ### floating? > `optional` **floating?**: `boolean` *** ### id > **id**: `string` *** ### tokenid? > `optional` **tokenid?**: `string` --- ## Page: TxnListResult URL: https://docs.totem.ing/api/totemsdk-minima-rpc/interfaces/TxnListResult [**@totemsdk/minima-rpc**](../index.md) *** [@totemsdk/minima-rpc](../index.md) / TxnListResult # Interface: TxnListResult ## Properties ### transaction? > `optional` **transaction?**: `unknown` *** ### txns? > `optional` **txns?**: `unknown`[] *** ### txpow? > `optional` **txpow?**: `unknown` --- ## Page: TxnMineParams URL: https://docs.totem.ing/api/totemsdk-minima-rpc/interfaces/TxnMineParams [**@totemsdk/minima-rpc**](../index.md) *** [@totemsdk/minima-rpc](../index.md) / TxnMineParams # Interface: TxnMineParams ## Properties ### data? > `optional` **data?**: `string` *** ### id > **id**: `string` --- ## Page: TxnOutputParams URL: https://docs.totem.ing/api/totemsdk-minima-rpc/interfaces/TxnOutputParams [**@totemsdk/minima-rpc**](../index.md) *** [@totemsdk/minima-rpc](../index.md) / TxnOutputParams # Interface: TxnOutputParams ## Properties ### address > **address**: `string` *** ### amount > **amount**: `string` *** ### id > **id**: `string` *** ### storestate? > `optional` **storestate?**: `boolean` *** ### tokenid? > `optional` **tokenid?**: `string` --- ## Page: TxnPostParams URL: https://docs.totem.ing/api/totemsdk-minima-rpc/interfaces/TxnPostParams [**@totemsdk/minima-rpc**](../index.md) *** [@totemsdk/minima-rpc](../index.md) / TxnPostParams # Interface: TxnPostParams ## Properties ### auto? > `optional` **auto?**: `boolean` *** ### burn? > `optional` **burn?**: `string` *** ### data? > `optional` **data?**: `string` *** ### id > **id**: `string` *** ### mine? > `optional` **mine?**: `boolean` *** ### txndelete? > `optional` **txndelete?**: `boolean` --- ## Page: TxnPostResult URL: https://docs.totem.ing/api/totemsdk-minima-rpc/interfaces/TxnPostResult [**@totemsdk/minima-rpc**](../index.md) *** [@totemsdk/minima-rpc](../index.md) / TxnPostResult # Interface: TxnPostResult ## Properties ### hasproof? > `optional` **hasproof?**: `boolean` *** ### isblock? > `optional` **isblock?**: `boolean` *** ### istransaction? > `optional` **istransaction?**: `boolean` *** ### size? > `optional` **size?**: `number` *** ### txpow? > `optional` **txpow?**: `unknown` *** ### txpowid? > `optional` **txpowid?**: `string` --- ## Page: TxnScriptParams URL: https://docs.totem.ing/api/totemsdk-minima-rpc/interfaces/TxnScriptParams [**@totemsdk/minima-rpc**](../index.md) *** [@totemsdk/minima-rpc](../index.md) / TxnScriptParams # Interface: TxnScriptParams ## Properties ### id > **id**: `string` *** ### scripts > **scripts**: `string` --- ## Page: TxnSignParams URL: https://docs.totem.ing/api/totemsdk-minima-rpc/interfaces/TxnSignParams [**@totemsdk/minima-rpc**](../index.md) *** [@totemsdk/minima-rpc](../index.md) / TxnSignParams # Interface: TxnSignParams ## Properties ### id > **id**: `string` *** ### publickey? > `optional` **publickey?**: `string` *** ### txndata? > `optional` **txndata?**: `string` --- ## Page: TxnStateParams URL: https://docs.totem.ing/api/totemsdk-minima-rpc/interfaces/TxnStateParams [**@totemsdk/minima-rpc**](../index.md) *** [@totemsdk/minima-rpc](../index.md) / TxnStateParams # Interface: TxnStateParams ## Properties ### id > **id**: `string` *** ### port > **port**: `number` *** ### value > **value**: `string` --- ## Page: WebhookEntry URL: https://docs.totem.ing/api/totemsdk-minima-rpc/interfaces/WebhookEntry [**@totemsdk/minima-rpc**](../index.md) *** [@totemsdk/minima-rpc](../index.md) / WebhookEntry # Interface: WebhookEntry ## Properties ### filter? > `optional` **filter?**: `string` *** ### hook > **hook**: `string` --- ## Page: BalanceConservationError URL: https://docs.totem.ing/api/totemsdk-omnia/classes/BalanceConservationError [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / BalanceConservationError # Class: BalanceConservationError ## Extends - `Error` ## Constructors ### Constructor > **new BalanceConservationError**(`expected`, `got`): `BalanceConservationError` #### Parameters ##### expected `bigint` ##### got `bigint` #### Returns `BalanceConservationError` #### Overrides `Error.constructor` ## Properties ### expected > `readonly` **expected**: `bigint` *** ### got > `readonly` **got**: `bigint` *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: ChannelCapacityError URL: https://docs.totem.ing/api/totemsdk-omnia/classes/ChannelCapacityError [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / ChannelCapacityError # Class: ChannelCapacityError ## Extends - `Error` ## Constructors ### Constructor > **new ChannelCapacityError**(`used`, `capacity`): `ChannelCapacityError` #### Parameters ##### used `number` ##### capacity `number` #### Returns `ChannelCapacityError` #### Overrides `Error.constructor` ## Properties ### capacity > `readonly` **capacity**: `number` *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### used > `readonly` **used**: `number` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: ChannelStatusError URL: https://docs.totem.ing/api/totemsdk-omnia/classes/ChannelStatusError [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / ChannelStatusError # Class: ChannelStatusError ## Extends - `Error` ## Constructors ### Constructor > **new ChannelStatusError**(`expected`, `actual`): `ChannelStatusError` #### Parameters ##### expected `string` \| `string`[] ##### actual `string` #### Returns `ChannelStatusError` #### Overrides `Error.constructor` ## Properties ### actual > `readonly` **actual**: `string` *** ### expected > `readonly` **expected**: `string` \| `string`[] *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: DoubleSignError URL: https://docs.totem.ing/api/totemsdk-omnia/classes/DoubleSignError [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / DoubleSignError # Class: DoubleSignError ## Extends - `Error` ## Constructors ### Constructor > **new DoubleSignError**(`sequence`): `DoubleSignError` #### Parameters ##### sequence `number` #### Returns `DoubleSignError` #### Overrides `Error.constructor` ## Properties ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### sequence > `readonly` **sequence**: `number` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: FramingError URL: https://docs.totem.ing/api/totemsdk-omnia/classes/FramingError [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / FramingError # Class: FramingError ## Extends - `Error` ## Constructors ### Constructor > **new FramingError**(`message`): `FramingError` #### Parameters ##### message `string` #### Returns `FramingError` #### Overrides `Error.constructor` ## Properties ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: HostedRelaySwarmImpl URL: https://docs.totem.ing/api/totemsdk-omnia/classes/HostedRelaySwarmImpl [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / HostedRelaySwarmImpl # Class: HostedRelaySwarmImpl ## Implements - [`OmniaSwarm`](../interfaces/OmniaSwarm.md) ## Constructors ### Constructor > **new HostedRelaySwarmImpl**(`_relayUrl`, `_config?`): `HostedRelaySwarmImpl` #### Parameters ##### \_relayUrl `string` ##### \_config? [`OmniaSwarmConfig`](../interfaces/OmniaSwarmConfig.md) = `{}` #### Returns `HostedRelaySwarmImpl` ## Methods ### advertise() > **advertise**(`localPubkey`): `void` #### Parameters ##### localPubkey `string` #### Returns `void` #### Implementation of [`OmniaSwarm`](../interfaces/OmniaSwarm.md).[`advertise`](../interfaces/OmniaSwarm.md#advertise) *** ### broadcast() > **broadcast**(`topic`, `msg`): `Promise`\<`void`\> #### Parameters ##### topic `string` ##### msg [`OmniaMessage`](../interfaces/OmniaMessage.md) #### Returns `Promise`\<`void`\> #### Implementation of [`OmniaSwarm`](../interfaces/OmniaSwarm.md).[`broadcast`](../interfaces/OmniaSwarm.md#broadcast) *** ### close() > **close**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> #### Implementation of [`OmniaSwarm`](../interfaces/OmniaSwarm.md).[`close`](../interfaces/OmniaSwarm.md#close) *** ### connectToPeer() > **connectToPeer**(`pubkey`, `channelId?`): `Promise`\<[`OmniaPeer`](../interfaces/OmniaPeer.md)\> #### Parameters ##### pubkey `string` ##### channelId? `string` #### Returns `Promise`\<[`OmniaPeer`](../interfaces/OmniaPeer.md)\> #### Implementation of [`OmniaSwarm`](../interfaces/OmniaSwarm.md).[`connectToPeer`](../interfaces/OmniaSwarm.md#connecttopeer) *** ### listenForChannels() > **listenForChannels**(`onProposal`): [`Unsubscribe`](../type-aliases/Unsubscribe.md) #### Parameters ##### onProposal (`peer`, `proposal`) => `void` #### Returns [`Unsubscribe`](../type-aliases/Unsubscribe.md) #### Implementation of [`OmniaSwarm`](../interfaces/OmniaSwarm.md).[`listenForChannels`](../interfaces/OmniaSwarm.md#listenforchannels) --- ## Page: OmniaFrameParser URL: https://docs.totem.ing/api/totemsdk-omnia/classes/OmniaFrameParser [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / OmniaFrameParser # Class: OmniaFrameParser Accumulates raw incoming bytes and slices out complete length-prefixed OmniaMessage frames. Not thread-safe — use one parser per stream. ## Constructors ### Constructor > **new OmniaFrameParser**(): `OmniaFrameParser` #### Returns `OmniaFrameParser` ## Methods ### push() > **push**(`chunk`): [`OmniaMessage`](../interfaces/OmniaMessage.md)[] #### Parameters ##### chunk `Uint8Array` #### Returns [`OmniaMessage`](../interfaces/OmniaMessage.md)[] *** ### reset() > **reset**(): `void` #### Returns `void` --- ## Page: OmniaPeerImpl URL: https://docs.totem.ing/api/totemsdk-omnia/classes/OmniaPeerImpl [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / OmniaPeerImpl # Class: OmniaPeerImpl ## Implements - [`OmniaPeer`](../interfaces/OmniaPeer.md) ## Constructors ### Constructor > **new OmniaPeerImpl**(`stream`, `opts`): `OmniaPeerImpl` #### Parameters ##### stream `IStreamTransport` ##### opts [`OmniaPeerOptions`](../interfaces/OmniaPeerOptions.md) #### Returns `OmniaPeerImpl` ## Properties ### channelId > `readonly` **channelId**: `string` \| `undefined` #### Implementation of [`OmniaPeer`](../interfaces/OmniaPeer.md).[`channelId`](../interfaces/OmniaPeer.md#channelid) *** ### pubkey > `readonly` **pubkey**: `string` #### Implementation of [`OmniaPeer`](../interfaces/OmniaPeer.md).[`pubkey`](../interfaces/OmniaPeer.md#pubkey) ## Methods ### disconnect() > **disconnect**(): `void` #### Returns `void` #### Implementation of [`OmniaPeer`](../interfaces/OmniaPeer.md).[`disconnect`](../interfaces/OmniaPeer.md#disconnect) *** ### onMessage() > **onMessage**(`cb`): [`Unsubscribe`](../type-aliases/Unsubscribe.md) #### Parameters ##### cb (`msg`) => `void` #### Returns [`Unsubscribe`](../type-aliases/Unsubscribe.md) #### Implementation of [`OmniaPeer`](../interfaces/OmniaPeer.md).[`onMessage`](../interfaces/OmniaPeer.md#onmessage) *** ### onReconnected() > **onReconnected**(`cb`): [`Unsubscribe`](../type-aliases/Unsubscribe.md) #### Parameters ##### cb () => `void` #### Returns [`Unsubscribe`](../type-aliases/Unsubscribe.md) #### Implementation of [`OmniaPeer`](../interfaces/OmniaPeer.md).[`onReconnected`](../interfaces/OmniaPeer.md#onreconnected) *** ### onReconnecting() > **onReconnecting**(`cb`): [`Unsubscribe`](../type-aliases/Unsubscribe.md) #### Parameters ##### cb (`attempt`) => `void` #### Returns [`Unsubscribe`](../type-aliases/Unsubscribe.md) #### Implementation of [`OmniaPeer`](../interfaces/OmniaPeer.md).[`onReconnecting`](../interfaces/OmniaPeer.md#onreconnecting) *** ### rebindStream() > **rebindStream**(`raw`): `void` #### Parameters ##### raw `IStreamTransport` #### Returns `void` *** ### sendMessage() > **sendMessage**(`msg`): `Promise`\<`void`\> #### Parameters ##### msg [`OmniaMessage`](../interfaces/OmniaMessage.md) #### Returns `Promise`\<`void`\> #### Implementation of [`OmniaPeer`](../interfaces/OmniaPeer.md).[`sendMessage`](../interfaces/OmniaPeer.md#sendmessage) --- ## Page: OmniaStream URL: https://docs.totem.ing/api/totemsdk-omnia/classes/OmniaStream [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / OmniaStream # Class: OmniaStream ## Constructors ### Constructor > **new OmniaStream**(`_stream`): `OmniaStream` #### Parameters ##### \_stream `IStreamTransport` #### Returns `OmniaStream` ## Methods ### destroy() > **destroy**(): `void` #### Returns `void` *** ### onClose() > **onClose**(`cb`): [`Unsubscribe`](../type-aliases/Unsubscribe.md) #### Parameters ##### cb () => `void` #### Returns [`Unsubscribe`](../type-aliases/Unsubscribe.md) *** ### onError() > **onError**(`cb`): [`Unsubscribe`](../type-aliases/Unsubscribe.md) #### Parameters ##### cb (`err`) => `void` #### Returns [`Unsubscribe`](../type-aliases/Unsubscribe.md) *** ### onMessage() > **onMessage**(`cb`): [`Unsubscribe`](../type-aliases/Unsubscribe.md) #### Parameters ##### cb (`msg`) => `void` #### Returns [`Unsubscribe`](../type-aliases/Unsubscribe.md) *** ### reset() > **reset**(): `void` #### Returns `void` *** ### send() > **send**(`msg`): `Promise`\<`void`\> #### Parameters ##### msg [`OmniaMessage`](../interfaces/OmniaMessage.md) #### Returns `Promise`\<`void`\> --- ## Page: OmniaSwarmImpl URL: https://docs.totem.ing/api/totemsdk-omnia/classes/OmniaSwarmImpl [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / OmniaSwarmImpl # Class: OmniaSwarmImpl ## Implements - [`OmniaSwarm`](../interfaces/OmniaSwarm.md) ## Constructors ### Constructor > **new OmniaSwarmImpl**(`swarm`, `config?`): `OmniaSwarmImpl` #### Parameters ##### swarm `any` ##### config? [`OmniaSwarmConfig`](../interfaces/OmniaSwarmConfig.md) = `{}` #### Returns `OmniaSwarmImpl` ## Methods ### advertise() > **advertise**(`localPubkey`): `void` #### Parameters ##### localPubkey `string` #### Returns `void` #### Implementation of [`OmniaSwarm`](../interfaces/OmniaSwarm.md).[`advertise`](../interfaces/OmniaSwarm.md#advertise) *** ### broadcast() > **broadcast**(`topic`, `msg`): `Promise`\<`void`\> #### Parameters ##### topic `string` ##### msg [`OmniaMessage`](../interfaces/OmniaMessage.md) #### Returns `Promise`\<`void`\> #### Implementation of [`OmniaSwarm`](../interfaces/OmniaSwarm.md).[`broadcast`](../interfaces/OmniaSwarm.md#broadcast) *** ### close() > **close**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> #### Implementation of [`OmniaSwarm`](../interfaces/OmniaSwarm.md).[`close`](../interfaces/OmniaSwarm.md#close) *** ### connectToPeer() > **connectToPeer**(`pubkey`, `channelId?`): `Promise`\<[`OmniaPeer`](../interfaces/OmniaPeer.md)\> #### Parameters ##### pubkey `string` ##### channelId? `string` #### Returns `Promise`\<[`OmniaPeer`](../interfaces/OmniaPeer.md)\> #### Implementation of [`OmniaSwarm`](../interfaces/OmniaSwarm.md).[`connectToPeer`](../interfaces/OmniaSwarm.md#connecttopeer) *** ### listenForChannels() > **listenForChannels**(`onProposal`): [`Unsubscribe`](../type-aliases/Unsubscribe.md) #### Parameters ##### onProposal (`peer`, `proposal`) => `void` #### Returns [`Unsubscribe`](../type-aliases/Unsubscribe.md) #### Implementation of [`OmniaSwarm`](../interfaces/OmniaSwarm.md).[`listenForChannels`](../interfaces/OmniaSwarm.md#listenforchannels) --- ## Page: SequenceError URL: https://docs.totem.ing/api/totemsdk-omnia/classes/SequenceError [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / SequenceError # Class: SequenceError ## Extends - `Error` ## Constructors ### Constructor > **new SequenceError**(`current`, `proposed`): `SequenceError` #### Parameters ##### current `number` ##### proposed `number` #### Returns `SequenceError` #### Overrides `Error.constructor` ## Properties ### current > `readonly` **current**: `number` *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### proposed > `readonly` **proposed**: `number` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: SigningIndexMonotonicityError URL: https://docs.totem.ing/api/totemsdk-omnia/classes/SigningIndexMonotonicityError [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / SigningIndexMonotonicityError # Class: SigningIndexMonotonicityError ## Extends - `Error` ## Constructors ### Constructor > **new SigningIndexMonotonicityError**(`partyId`, `flatIndex`, `previousFlatIndex`): `SigningIndexMonotonicityError` #### Parameters ##### partyId `string` ##### flatIndex `number` ##### previousFlatIndex `number` #### Returns `SigningIndexMonotonicityError` #### Overrides `Error.constructor` ## Properties ### flatIndex > `readonly` **flatIndex**: `number` *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### partyId > `readonly` **partyId**: `string` *** ### previousFlatIndex > `readonly` **previousFlatIndex**: `number` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: acceptChannel URL: https://docs.totem.ing/api/totemsdk-omnia/functions/acceptChannel [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / acceptChannel # Function: acceptChannel() > **acceptChannel**(`proposal`, `provider?`, `minConfirmations?`): `Promise`\<[`OmniaChannel`](../interfaces/OmniaChannel.md)\> Bob's side: validates an inbound channel proposal and returns a channel. If a chain provider is supplied, the funding coin is verified on-chain. The channel is returned with status 'funding_pending' — call `activateChannel()` after the funding transaction reaches the required confirmation depth. ## Parameters ### proposal [`ChannelProposal`](../interfaces/ChannelProposal.md) Inbound channel proposal from the initiating party. ### provider? `ChainStateProvider` Optional chain provider for on-chain funding TX validation. ### minConfirmations? `number` = `1` Minimum confirmations required (default 1). ## Returns `Promise`\<[`OmniaChannel`](../interfaces/OmniaChannel.md)\> --- ## Page: activateChannel URL: https://docs.totem.ing/api/totemsdk-omnia/functions/activateChannel [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / activateChannel # Function: activateChannel() > **activateChannel**(`channel`): [`OmniaChannel`](../interfaces/OmniaChannel.md) ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ## Returns [`OmniaChannel`](../interfaces/OmniaChannel.md) --- ## Page: addClosePackageSignature URL: https://docs.totem.ing/api/totemsdk-omnia/functions/addClosePackageSignature [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / addClosePackageSignature # Function: addClosePackageSignature() > **addClosePackageSignature**(`closePackage`, `partyId`, `updateSignature`, `updateIndices`, `settlementSignature`, `settlementIndices`): [`SignedClosePackage`](../interfaces/SignedClosePackage.md) ## Parameters ### closePackage [`SignedClosePackage`](../interfaces/SignedClosePackage.md) ### partyId `string` ### updateSignature [`ChannelSignature`](../type-aliases/ChannelSignature.md) ### updateIndices `SigningIndices` ### settlementSignature [`ChannelSignature`](../type-aliases/ChannelSignature.md) ### settlementIndices `SigningIndices` ## Returns [`SignedClosePackage`](../interfaces/SignedClosePackage.md) --- ## Page: addHTLC URL: https://docs.totem.ing/api/totemsdk-omnia/functions/addHTLC [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / addHTLC # Function: addHTLC() > **addHTLC**(`channel`, `params`, `leaseProvider`, `signer?`): `Promise`\<\{ `channel`: [`OmniaChannel`](../interfaces/OmniaChannel.md); `error?`: `string`; `htlcId`: `string`; `partialState`: `Partial`\<[`SignedChannelState`](../interfaces/SignedChannelState.md)\>; \}\> Adds a Hash Time-Locked Contract as a conditional output in the next state update. Spec: `addHTLC(channel, htlcParams, leaseProvider)` — signer is optional, falls back to `channel.localSigner`. ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ### params [`AddHTLCParams`](../interfaces/AddHTLCParams.md) ### leaseProvider `WotsLeaseProvider` ### signer? [`ChannelSigner`](../interfaces/ChannelSigner.md) ## Returns `Promise`\<\{ `channel`: [`OmniaChannel`](../interfaces/OmniaChannel.md); `error?`: `string`; `htlcId`: `string`; `partialState`: `Partial`\<[`SignedChannelState`](../interfaces/SignedChannelState.md)\>; \}\> --- ## Page: applyProgramTransition URL: https://docs.totem.ing/api/totemsdk-omnia/functions/applyProgramTransition [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / applyProgramTransition # Function: applyProgramTransition() > **applyProgramTransition**(`channel`, `params`, `leaseProvider`, `signer?`): `Promise`\<[`UpdateStateResult`](../interfaces/UpdateStateResult.md)\> ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ### params [`ApplyProgramTransitionParams`](../interfaces/ApplyProgramTransitionParams.md) ### leaseProvider `WotsLeaseProvider` ### signer? [`ChannelSigner`](../interfaces/ChannelSigner.md) ## Returns `Promise`\<[`UpdateStateResult`](../interfaces/UpdateStateResult.md)\> --- ## Page: assertBroadcastProofs URL: https://docs.totem.ing/api/totemsdk-omnia/functions/assertBroadcastProofs [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / assertBroadcastProofs # Function: assertBroadcastProofs() > **assertBroadcastProofs**(`proofs?`): `asserts proofs is OmniaWitnessProofs` ## Parameters ### proofs? `Partial`\<[`OmniaWitnessProofs`](../interfaces/OmniaWitnessProofs.md)\> ## Returns `asserts proofs is OmniaWitnessProofs` --- ## Page: assertProgramStatePort URL: https://docs.totem.ing/api/totemsdk-omnia/functions/assertProgramStatePort [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / assertProgramStatePort # Function: assertProgramStatePort() > **assertProgramStatePort**(`port`): `void` ## Parameters ### port `number` ## Returns `void` --- ## Page: assessCapacity URL: https://docs.totem.ing/api/totemsdk-omnia/functions/assessCapacity [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / assessCapacity # Function: assessCapacity() > **assessCapacity**(`used`): `object` ## Parameters ### used `number` ## Returns `object` ### nearExhaustion > **nearExhaustion**: `boolean` ### warning? > `optional` **warning?**: [`CapacityWarning`](../type-aliases/CapacityWarning.md) --- ## Page: attachCounterpartySignature URL: https://docs.totem.ing/api/totemsdk-omnia/functions/attachCounterpartySignature [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / attachCounterpartySignature # Function: attachCounterpartySignature() > **attachCounterpartySignature**(`channel`, `partialState`, `counterPartyId`, `counterSignature`, `counterIndices`, `counterClosePackage?`): `object` ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ### partialState `Partial`\<[`SignedChannelState`](../interfaces/SignedChannelState.md)\> ### counterPartyId `string` ### counterSignature [`ChannelSignature`](../type-aliases/ChannelSignature.md) ### counterIndices `SigningIndices` ### counterClosePackage? [`SignedClosePackage`](../interfaces/SignedClosePackage.md) ## Returns `object` ### channel > **channel**: [`OmniaChannel`](../interfaces/OmniaChannel.md) ### signedState > **signedState**: [`SignedChannelState`](../interfaces/SignedChannelState.md) --- ## Page: bindPeerIntegration URL: https://docs.totem.ing/api/totemsdk-omnia/functions/bindPeerIntegration [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / bindPeerIntegration # Function: bindPeerIntegration() > **bindPeerIntegration**(`peer`, `store`, `config?`, `__namedParameters?`): [`Unsubscribe`](../type-aliases/Unsubscribe.md) Register a per-peer message handler on an already-connected peer. ## Parameters ### peer [`OmniaPeer`](../interfaces/OmniaPeer.md) ### store [`ChannelStore`](../type-aliases/ChannelStore.md) ### config? [`OmniaIntegrationConfig`](../interfaces/OmniaIntegrationConfig.md) = `{}` ### \_\_namedParameters? [`BindPeerOptions`](../interfaces/BindPeerOptions.md) = `{}` ## Returns [`Unsubscribe`](../type-aliases/Unsubscribe.md) --- ## Page: broadcastTopic URL: https://docs.totem.ing/api/totemsdk-omnia/functions/broadcastTopic [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / broadcastTopic # Function: broadcastTopic() > **broadcastTopic**(`topic`): `Buffer` Derive a 32-byte Hyperswarm topic Buffer from an arbitrary topic string. Used by `broadcast(topic, msg)`. ## Parameters ### topic `string` ## Returns `Buffer` --- ## Page: buildAndHashEltooScript URL: https://docs.totem.ing/api/totemsdk-omnia/functions/buildAndHashEltooScript [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / buildAndHashEltooScript # Function: buildAndHashEltooScript() > **buildAndHashEltooScript**(`parties`): `object` ## Parameters ### parties [`ChannelParticipant`](../interfaces/ChannelParticipant.md)[] ## Returns `object` ### address > **address**: `string` ### script > **script**: `string` --- ## Page: buildDisputePayload URL: https://docs.totem.ing/api/totemsdk-omnia/functions/buildDisputePayload [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / buildDisputePayload # Function: buildDisputePayload() > **buildDisputePayload**(`channel`, `evidence?`): [`DisputePayload`](../interfaces/DisputePayload.md) ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ### evidence? `string` ## Returns [`DisputePayload`](../interfaces/DisputePayload.md) --- ## Page: buildEltooScript URL: https://docs.totem.ing/api/totemsdk-omnia/functions/buildEltooScript [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / buildEltooScript # Function: buildEltooScript() > **buildEltooScript**(`parties`): `string` ## Parameters ### parties [`ChannelParticipant`](../interfaces/ChannelParticipant.md)[] ## Returns `string` --- ## Page: buildFundingTx URL: https://docs.totem.ing/api/totemsdk-omnia/functions/buildFundingTx [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / buildFundingTx # Function: buildFundingTx() > **buildFundingTx**(`fundingScript`, `fundingScriptAddress`, `totalValue`, `tokenId`, `tokenScale`, `inputCoinIds`, `inputAmounts`, `inputAddresses`): [`OmniaTxDraft`](../interfaces/OmniaTxDraft.md) ## Parameters ### fundingScript `string` ### fundingScriptAddress `string` ### totalValue `bigint` ### tokenId `string` ### tokenScale `number` ### inputCoinIds `string`[] ### inputAmounts `bigint`[] ### inputAddresses `string`[] ## Returns [`OmniaTxDraft`](../interfaces/OmniaTxDraft.md) --- ## Page: buildHtlcFulfillmentReceipt URL: https://docs.totem.ing/api/totemsdk-omnia/functions/buildHtlcFulfillmentReceipt [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / buildHtlcFulfillmentReceipt # Function: buildHtlcFulfillmentReceipt() > **buildHtlcFulfillmentReceipt**(`channel`, `htlc`, `sequence`, `fulfilledAt?`): [`HtlcFulfillmentReceipt`](../interfaces/HtlcFulfillmentReceipt.md) ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ### htlc [`HTLCRecord`](../interfaces/HTLCRecord.md) ### sequence `number` ### fulfilledAt? `number` ## Returns [`HtlcFulfillmentReceipt`](../interfaces/HtlcFulfillmentReceipt.md) --- ## Page: buildProgramTransitionStateUpdateMessage URL: https://docs.totem.ing/api/totemsdk-omnia/functions/buildProgramTransitionStateUpdateMessage [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / buildProgramTransitionStateUpdateMessage # Function: buildProgramTransitionStateUpdateMessage() > **buildProgramTransitionStateUpdateMessage**(`channel`, `signedState`, `nonce`): [`OmniaMessage`](../interfaces/OmniaMessage.md) ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ### signedState `Partial`\<[`SignedChannelState`](../interfaces/SignedChannelState.md)\> ### nonce `number` ## Returns [`OmniaMessage`](../interfaces/OmniaMessage.md) --- ## Page: buildProgramUpdateTx URL: https://docs.totem.ing/api/totemsdk-omnia/functions/buildProgramUpdateTx [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / buildProgramUpdateTx # Function: buildProgramUpdateTx() > **buildProgramUpdateTx**(`channel`, `sequence`, `balances`, `pendingHTLCs`, `transition?`): [`OmniaTxDraft`](../interfaces/OmniaTxDraft.md) ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ### sequence `number` ### balances `Record`\<`string`, `bigint`\> ### pendingHTLCs [`HTLCRecord`](../interfaces/HTLCRecord.md)[] ### transition? [`ProgramTransition`](../interfaces/ProgramTransition.md) ## Returns [`OmniaTxDraft`](../interfaces/OmniaTxDraft.md) --- ## Page: buildRegistryRootTransition URL: https://docs.totem.ing/api/totemsdk-omnia/functions/buildRegistryRootTransition [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / buildRegistryRootTransition # Function: buildRegistryRootTransition() > **buildRegistryRootTransition**(`input`): [`ProgramTransition`](../interfaces/ProgramTransition.md) Build a `ProgramTransition` that carries the registry root into channel state. Co-signers read this from the signed state and verify it against the pool anchor before co-signing. ## Parameters ### input [`RegistryRootTransitionInputs`](../interfaces/RegistryRootTransitionInputs.md) ## Returns [`ProgramTransition`](../interfaces/ProgramTransition.md) --- ## Page: buildSettlementTx URL: https://docs.totem.ing/api/totemsdk-omnia/functions/buildSettlementTx [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / buildSettlementTx # Function: buildSettlementTx() > **buildSettlementTx**(`channel`, `state`, `partyAddresses`, `opts?`): [`OmniaTxDraft`](../interfaces/OmniaTxDraft.md) ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ### state [`SignedChannelState`](../interfaces/SignedChannelState.md) ### partyAddresses `Record`\<`string`, `string`\> ### opts? #### floatingInput? `boolean` #### programStateVariables? [`StateValue`](../interfaces/StateValue.md)[] ## Returns [`OmniaTxDraft`](../interfaces/OmniaTxDraft.md) --- ## Page: buildTxPoWPayload URL: https://docs.totem.ing/api/totemsdk-omnia/functions/buildTxPoWPayload [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / buildTxPoWPayload # Function: buildTxPoWPayload() > **buildTxPoWPayload**(`txBytes`, `witnessBytes`): `Uint8Array` Wrap pre-serialized Minima TX + witness bytes in a `@totemsdk/txpow` body ready for PoW mining and chain broadcast. Architecture: ``` OmniaTxDraft → toEnhancedBuildParams() (@totemsdk/tx-builder types) → @totemsdk/core serializeTransaction() (Minima binary TX bytes) → buildTxPoWPayload(txBytes, witnessBytes) → serializeTxBody() → mineTxPoW() / broadcastTxPoW() ``` ## Parameters ### txBytes `Uint8Array` Pre-serialized Minima Transaction bytes from `@totemsdk/core`. ### witnessBytes `Uint8Array` Pre-serialized Minima Witness bytes (WOTS signatures). ## Returns `Uint8Array` TxPoW body bytes ready for PoW mining. --- ## Page: buildUnsignedClosePackage URL: https://docs.totem.ing/api/totemsdk-omnia/functions/buildUnsignedClosePackage [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / buildUnsignedClosePackage # Function: buildUnsignedClosePackage() > **buildUnsignedClosePackage**(`channel`, `state`, `partyAddresses?`): [`SignedClosePackage`](../interfaces/SignedClosePackage.md) ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ### state `Pick`\<[`SignedChannelState`](../interfaces/SignedChannelState.md), `"sequence"` \| `"balances"` \| `"pendingHTLCs"` \| `"stateVariables"` \| `"programTransition"`\> ### partyAddresses? `Record`\<`string`, `string`\> = `...` ## Returns [`SignedClosePackage`](../interfaces/SignedClosePackage.md) --- ## Page: buildUpdateTx URL: https://docs.totem.ing/api/totemsdk-omnia/functions/buildUpdateTx [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / buildUpdateTx # Function: buildUpdateTx() > **buildUpdateTx**(`channel`, `newSequence`, `newBalances`, `pendingHTLCs`, `programStateVariables?`): [`OmniaTxDraft`](../interfaces/OmniaTxDraft.md) ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ### newSequence `number` ### newBalances `Record`\<`string`, `bigint`\> ### pendingHTLCs [`HTLCRecord`](../interfaces/HTLCRecord.md)[] ### programStateVariables? [`StateValue`](../interfaces/StateValue.md)[] = `[]` ## Returns [`OmniaTxDraft`](../interfaces/OmniaTxDraft.md) --- ## Page: canonicalizeProgramTransition URL: https://docs.totem.ing/api/totemsdk-omnia/functions/canonicalizeProgramTransition [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / canonicalizeProgramTransition # Function: canonicalizeProgramTransition() > **canonicalizeProgramTransition**(`transition?`): [`ProgramTransition`](../interfaces/ProgramTransition.md) \| `undefined` ## Parameters ### transition? [`ProgramTransition`](../interfaces/ProgramTransition.md) ## Returns [`ProgramTransition`](../interfaces/ProgramTransition.md) \| `undefined` --- ## Page: channelTopic URL: https://docs.totem.ing/api/totemsdk-omnia/functions/channelTopic [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / channelTopic # Function: channelTopic() > **channelTopic**(`channelId`): `Buffer` Derive the 32-byte Hyperswarm topic Buffer for a given channel ID. ## Parameters ### channelId `string` ## Returns `Buffer` --- ## Page: closePackageSignatureBytes URL: https://docs.totem.ing/api/totemsdk-omnia/functions/closePackageSignatureBytes [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / closePackageSignatureBytes # Function: closePackageSignatureBytes() > **closePackageSignatureBytes**(`state`, `tx`): `Uint8Array`\<`ArrayBufferLike`\>[] ## Parameters ### state [`SignedChannelState`](../interfaces/SignedChannelState.md) ### tx `"update"` \| `"settlement"` ## Returns `Uint8Array`\<`ArrayBufferLike`\>[] --- ## Page: computeHtlcFulfillmentReceiptHash URL: https://docs.totem.ing/api/totemsdk-omnia/functions/computeHtlcFulfillmentReceiptHash [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / computeHtlcFulfillmentReceiptHash # Function: computeHtlcFulfillmentReceiptHash() > **computeHtlcFulfillmentReceiptHash**(`receipt`): `string` ## Parameters ### receipt [`HtlcFulfillmentReceipt`](../interfaces/HtlcFulfillmentReceipt.md) ## Returns `string` --- ## Page: computeOmniaTxDigest URL: https://docs.totem.ing/api/totemsdk-omnia/functions/computeOmniaTxDigest [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / computeOmniaTxDigest # Function: computeOmniaTxDigest() > **computeOmniaTxDigest**(`draft`): `Uint8Array` ## Parameters ### draft [`OmniaTxDraft`](../interfaces/OmniaTxDraft.md) ## Returns `Uint8Array` --- ## Page: computeProgramUpdateDigest URL: https://docs.totem.ing/api/totemsdk-omnia/functions/computeProgramUpdateDigest [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / computeProgramUpdateDigest # Function: computeProgramUpdateDigest() > **computeProgramUpdateDigest**(`channel`, `sequence`, `balances`, `pendingHTLCs`, `transition?`): `Uint8Array` ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ### sequence `number` ### balances `Record`\<`string`, `bigint`\> ### pendingHTLCs [`HTLCRecord`](../interfaces/HTLCRecord.md)[] ### transition? [`ProgramTransition`](../interfaces/ProgramTransition.md) ## Returns `Uint8Array` --- ## Page: computeProgramUpdateDigestHex URL: https://docs.totem.ing/api/totemsdk-omnia/functions/computeProgramUpdateDigestHex [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / computeProgramUpdateDigestHex # Function: computeProgramUpdateDigestHex() > **computeProgramUpdateDigestHex**(`channel`, `sequence`, `balances`, `pendingHTLCs`, `transition?`): `string` ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ### sequence `number` ### balances `Record`\<`string`, `bigint`\> ### pendingHTLCs [`HTLCRecord`](../interfaces/HTLCRecord.md)[] ### transition? [`ProgramTransition`](../interfaces/ProgramTransition.md) ## Returns `string` --- ## Page: computeStateCommitment URL: https://docs.totem.ing/api/totemsdk-omnia/functions/computeStateCommitment [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / computeStateCommitment # Function: computeStateCommitment() > **computeStateCommitment**(`sequence`, `balances`, `pendingHTLCs`): `Uint8Array` Canonical state commitment — the 32-byte digest that is WOTS-signed and WOTS-verified for every channel update. Covers the FULL off-chain state: sequence number, per-party balance split, and all pending HTLCs. This ensures signatures are cryptographically bound to balances and HTLC content and cannot be repurposed for a tampered state. NOTE: `buildUpdateTx` intentionally encodes only the UTXO total on-chain (eltoo design). The per-party split is off-chain. Without this commitment, a signer could sign a state and an adversary could swap the balances while keeping the WOTS signature valid — breaking the dispute trust model. Sorted lexicographically by key to ensure determinism regardless of the order in which balance/HTLC entries appear in the caller's object. ## Parameters ### sequence `number` ### balances `Record`\<`string`, `bigint`\> ### pendingHTLCs [`HTLCRecord`](../interfaces/HTLCRecord.md)[] ## Returns `Uint8Array` --- ## Page: computeStateCommitmentV2 URL: https://docs.totem.ing/api/totemsdk-omnia/functions/computeStateCommitmentV2 [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / computeStateCommitmentV2 # Function: computeStateCommitmentV2() > **computeStateCommitmentV2**(`channel`, `sequence`, `balances`, `pendingHTLCs`, `opts?`): `Uint8Array` ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ### sequence `number` ### balances `Record`\<`string`, `bigint`\> ### pendingHTLCs [`HTLCRecord`](../interfaces/HTLCRecord.md)[] ### opts? #### programStateVariables? [`StateValue`](../interfaces/StateValue.md)[] #### settlement? `boolean` ## Returns `Uint8Array` --- ## Page: computeTxDraftDigest URL: https://docs.totem.ing/api/totemsdk-omnia/functions/computeTxDraftDigest [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / computeTxDraftDigest # Function: computeTxDraftDigest() > **computeTxDraftDigest**(`draft`): `Uint8Array` ## Parameters ### draft [`OmniaTxDraft`](../interfaces/OmniaTxDraft.md) ## Returns `Uint8Array` --- ## Page: createChannel URL: https://docs.totem.ing/api/totemsdk-omnia/functions/createChannel [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / createChannel # Function: createChannel() > **createChannel**(`params`, `chainProvider`): `Promise`\<\{ `channel`: [`OmniaChannel`](../interfaces/OmniaChannel.md); `proposal`: [`ChannelProposal`](../interfaces/ChannelProposal.md); \}\> ## Parameters ### params [`CreateChannelParams`](../interfaces/CreateChannelParams.md) ### chainProvider `ChainStateProvider` ## Returns `Promise`\<\{ `channel`: [`OmniaChannel`](../interfaces/OmniaChannel.md); `proposal`: [`ChannelProposal`](../interfaces/ChannelProposal.md); \}\> --- ## Page: createOmniaIntegration URL: https://docs.totem.ing/api/totemsdk-omnia/functions/createOmniaIntegration [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / createOmniaIntegration # Function: createOmniaIntegration() > **createOmniaIntegration**(`swarm`, `store`, `config?`): [`Unsubscribe`](../type-aliases/Unsubscribe.md) Wire an OmniaSwarm to @totemsdk/omnia function calls for the full channel lifecycle. ## Parameters ### swarm [`OmniaSwarm`](../interfaces/OmniaSwarm.md) ### store [`ChannelStore`](../type-aliases/ChannelStore.md) ### config? [`OmniaIntegrationConfig`](../interfaces/OmniaIntegrationConfig.md) = `{}` ## Returns [`Unsubscribe`](../type-aliases/Unsubscribe.md) --- ## Page: createOmniaSwarm URL: https://docs.totem.ing/api/totemsdk-omnia/functions/createOmniaSwarm [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / createOmniaSwarm # Function: createOmniaSwarm() > **createOmniaSwarm**(`config?`): `Promise`\<[`OmniaSwarm`](../interfaces/OmniaSwarm.md)\> Create an OmniaSwarm. Transport is determined by `config.relay`: - `{ mode: 'native' }` (default) — Raw Hyperswarm P2P. - `{ mode: 'hosted', apiKey }` — Axia-managed relay. - `{ mode: 'self-hosted', relayUrl }` — Your own relay node. ## Parameters ### config? [`OmniaSwarmConfig`](../interfaces/OmniaSwarmConfig.md) = `{}` ## Returns `Promise`\<[`OmniaSwarm`](../interfaces/OmniaSwarm.md)\> --- ## Page: createOmniaSwarmFromInstance URL: https://docs.totem.ing/api/totemsdk-omnia/functions/createOmniaSwarmFromInstance [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / createOmniaSwarmFromInstance # Function: createOmniaSwarmFromInstance() > **createOmniaSwarmFromInstance**(`swarm`, `config?`): [`OmniaSwarm`](../interfaces/OmniaSwarm.md) Create an OmniaSwarm from an existing Hyperswarm instance. ## Parameters ### swarm `any` ### config? [`OmniaSwarmConfig`](../interfaces/OmniaSwarmConfig.md) = `{}` ## Returns [`OmniaSwarm`](../interfaces/OmniaSwarm.md) --- ## Page: createOmniaSwarmFromRelayUrl URL: https://docs.totem.ing/api/totemsdk-omnia/functions/createOmniaSwarmFromRelayUrl [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / createOmniaSwarmFromRelayUrl # Function: createOmniaSwarmFromRelayUrl() > **createOmniaSwarmFromRelayUrl**(`relayUrl`, `config?`): [`HostedRelaySwarmImpl`](../classes/HostedRelaySwarmImpl.md) Create an OmniaSwarm connected to a relay at the given WebSocket URL. ## Parameters ### relayUrl `string` ### config? [`OmniaSwarmConfig`](../interfaces/OmniaSwarmConfig.md) = `{}` ## Returns [`HostedRelaySwarmImpl`](../classes/HostedRelaySwarmImpl.md) --- ## Page: decrementCounter URL: https://docs.totem.ing/api/totemsdk-omnia/functions/decrementCounter [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / decrementCounter # Function: decrementCounter() > **decrementCounter**(`channel`, `by`, `leaseProvider`, `signer?`): `Promise`\<[`UpdateStateResult`](../interfaces/UpdateStateResult.md)\> ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ### by `bigint` ### leaseProvider `WotsLeaseProvider` ### signer? [`ChannelSigner`](../interfaces/ChannelSigner.md) ## Returns `Promise`\<[`UpdateStateResult`](../interfaces/UpdateStateResult.md)\> --- ## Page: deserializeChannelSnapshot URL: https://docs.totem.ing/api/totemsdk-omnia/functions/deserializeChannelSnapshot [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / deserializeChannelSnapshot # Function: deserializeChannelSnapshot() > **deserializeChannelSnapshot**(`json`): [`OmniaChannelSnapshot`](../interfaces/OmniaChannelSnapshot.md) ## Parameters ### json `string` ## Returns [`OmniaChannelSnapshot`](../interfaces/OmniaChannelSnapshot.md) --- ## Page: deserializeTxDraft URL: https://docs.totem.ing/api/totemsdk-omnia/functions/deserializeTxDraft [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / deserializeTxDraft # Function: deserializeTxDraft() > **deserializeTxDraft**(`hex`): [`OmniaTxDraft`](../interfaces/OmniaTxDraft.md) ## Parameters ### hex `string` ## Returns [`OmniaTxDraft`](../interfaces/OmniaTxDraft.md) --- ## Page: encodeOmniaMessage URL: https://docs.totem.ing/api/totemsdk-omnia/functions/encodeOmniaMessage [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / encodeOmniaMessage # Function: encodeOmniaMessage() > **encodeOmniaMessage**(`msg`): `Uint8Array` Encode an OmniaMessage to a length-prefixed frame. Sentinel encoding rules (applied recursively via JSON replacer): - `bigint` → `{ __bigint: "" }` - `Uint8Array` → `{ __uint8array: "" }` ## Parameters ### msg [`OmniaMessage`](../interfaces/OmniaMessage.md) ## Returns `Uint8Array` --- ## Page: enforceUpdateGuards URL: https://docs.totem.ing/api/totemsdk-omnia/functions/enforceUpdateGuards [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / enforceUpdateGuards # Function: enforceUpdateGuards() > **enforceUpdateGuards**(`channelId`, `newSequence`, `payloadHash`, `pendingProposal?`): `"CAPACITY_NEAR_EXHAUSTION"` \| `null` Enforce all per-update invariants that must hold for every state transition regardless of whether the caller is `updateState`, `addHTLC`, `fulfillHTLC`, or `timeoutHTLC`. Specifically: 1. WOTS capacity check: throws `ChannelCapacityError` at 100%, returns `'CAPACITY_NEAR_EXHAUSTION'` at 95% (caller must NOT advance watermark). 2. Stale-sequence guard (SequenceError): rejects any attempt to sign a sequence that is behind the module-level watermark. 3. Double-sign guard (DoubleSignError): rejects a different payload at a sequence already committed by this process. 4. Watermark advance: after all guards pass, records `(newSequence, payloadHash)` synchronously — before any async work — so no concurrent call can slip in between the guard and the WOTS reservation. ## Parameters ### channelId `string` Channel identifier for the watermark map key. ### newSequence `number` Proposed next sequence number. ### payloadHash `string` Hex-encoded SHA3-256 of the full off-chain state commitment (sequence + balances + pending HTLCs). ### pendingProposal? #### payloadHash `string` #### sequence `number` ## Returns `"CAPACITY_NEAR_EXHAUSTION"` \| `null` `'CAPACITY_NEAR_EXHAUSTION'` when signing is blocked at the 95% threshold; `null` when signing may proceed. --- ## Page: executeIntent URL: https://docs.totem.ing/api/totemsdk-omnia/functions/executeIntent [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / executeIntent # Function: executeIntent() > **executeIntent**(`channel`, `intent`, `policy`, `leaseProvider`, `signer?`, `options?`): `Promise`\<[`IntentResult`](../interfaces/IntentResult.md)\> Agent entry point for channel payment execution. Spec: `executeIntent(channel, intent, policy, leaseProvider)` — signer is optional and falls back to `channel.localSigner`. Evaluates `policy.canAutoApprove(proposal)`. If approved, calls `updateState` and returns an `AgentReceipt`. If approval is required, returns `{ status: 'pending_user' }` without signing. `canAutoApprove` is the primary and only gate — no bypass path exists. When the policy implements the reservation lifecycle, quota is reserved immediately before execution, committed on success, and released on any non-success path. Stateful policies are never mutated by the read-only `canAutoApprove` check. ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ### intent [`PaymentIntent`](../interfaces/PaymentIntent.md) ### policy [`AgentPolicy`](../interfaces/AgentPolicy.md) ### leaseProvider `WotsLeaseProvider` ### signer? [`ChannelSigner`](../interfaces/ChannelSigner.md) ### options? `ExecuteIntentOptions` ## Returns `Promise`\<[`IntentResult`](../interfaces/IntentResult.md)\> --- ## Page: finalizeUnilateralClose URL: https://docs.totem.ing/api/totemsdk-omnia/functions/finalizeUnilateralClose [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / finalizeUnilateralClose # Function: finalizeUnilateralClose() > **finalizeUnilateralClose**(`channel`, `chainProvider`, `broadcastProofs?`): `Promise`\<[`UnilateralCloseFinalizeResult`](../interfaces/UnilateralCloseFinalizeResult.md)\> ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ### chainProvider `ChainStateProvider` ### broadcastProofs? [`OmniaWitnessProofs`](../interfaces/OmniaWitnessProofs.md) ## Returns `Promise`\<[`UnilateralCloseFinalizeResult`](../interfaces/UnilateralCloseFinalizeResult.md)\> --- ## Page: flatSigningIndex URL: https://docs.totem.ing/api/totemsdk-omnia/functions/flatSigningIndex [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / flatSigningIndex # Function: flatSigningIndex() > **flatSigningIndex**(`l1`, `l2`): `number` ## Parameters ### l1 `number` ### l2 `number` ## Returns `number` --- ## Page: fulfillHTLC URL: https://docs.totem.ing/api/totemsdk-omnia/functions/fulfillHTLC [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / fulfillHTLC # Function: fulfillHTLC() > **fulfillHTLC**(`channel`, `htlcId`, `preimage`, `leaseProvider`, `signer?`): `Promise`\<\{ `channel`: [`OmniaChannel`](../interfaces/OmniaChannel.md); `error?`: `string`; `partialState`: `Partial`\<[`SignedChannelState`](../interfaces/SignedChannelState.md)\>; \}\> Recipient reveals preimage; HTLC amount moves to recipient balance in new state. Spec: `fulfillHTLC(channel, htlcId, preimage, leaseProvider)` — signer optional. ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ### htlcId `string` ### preimage `string` ### leaseProvider `WotsLeaseProvider` ### signer? [`ChannelSigner`](../interfaces/ChannelSigner.md) ## Returns `Promise`\<\{ `channel`: [`OmniaChannel`](../interfaces/OmniaChannel.md); `error?`: `string`; `partialState`: `Partial`\<[`SignedChannelState`](../interfaces/SignedChannelState.md)\>; \}\> --- ## Page: getChannelReceipt URL: https://docs.totem.ing/api/totemsdk-omnia/functions/getChannelReceipt [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / getChannelReceipt # Function: getChannelReceipt() > **getChannelReceipt**(`channel`, `state`): [`ChannelReceipt`](../interfaces/ChannelReceipt.md) ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ### state [`SignedChannelState`](../interfaces/SignedChannelState.md) ## Returns [`ChannelReceipt`](../interfaces/ChannelReceipt.md) --- ## Page: getStateBigInt URL: https://docs.totem.ing/api/totemsdk-omnia/functions/getStateBigInt [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / getStateBigInt # Function: getStateBigInt() > **getStateBigInt**(`state`, `port`, `fallback?`): `bigint` ## Parameters ### state `Pick`\<[`SignedChannelState`](../interfaces/SignedChannelState.md), `"stateVariables"`\> \| `null` \| `undefined` ### port `number` ### fallback? `bigint` = `0n` ## Returns `bigint` --- ## Page: getStateValue URL: https://docs.totem.ing/api/totemsdk-omnia/functions/getStateValue [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / getStateValue # Function: getStateValue() > **getStateValue**(`state`, `port`): [`StateValue`](../interfaces/StateValue.md) \| `undefined` ## Parameters ### state `Pick`\<[`SignedChannelState`](../interfaces/SignedChannelState.md), `"stateVariables"`\> \| `null` \| `undefined` ### port `number` ## Returns [`StateValue`](../interfaces/StateValue.md) \| `undefined` --- ## Page: incrementCounter URL: https://docs.totem.ing/api/totemsdk-omnia/functions/incrementCounter [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / incrementCounter # Function: incrementCounter() > **incrementCounter**(`channel`, `by`, `leaseProvider`, `signer?`): `Promise`\<[`UpdateStateResult`](../interfaces/UpdateStateResult.md)\> ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ### by `bigint` ### leaseProvider `WotsLeaseProvider` ### signer? [`ChannelSigner`](../interfaces/ChannelSigner.md) ## Returns `Promise`\<[`UpdateStateResult`](../interfaces/UpdateStateResult.md)\> --- ## Page: markChannelClosed URL: https://docs.totem.ing/api/totemsdk-omnia/functions/markChannelClosed [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / markChannelClosed # Function: markChannelClosed() > **markChannelClosed**(`channel`): [`OmniaChannel`](../interfaces/OmniaChannel.md) ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ## Returns [`OmniaChannel`](../interfaces/OmniaChannel.md) --- ## Page: markChannelClosing URL: https://docs.totem.ing/api/totemsdk-omnia/functions/markChannelClosing [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / markChannelClosing # Function: markChannelClosing() > **markChannelClosing**(`channel`, `mode`): [`OmniaChannel`](../interfaces/OmniaChannel.md) ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ### mode `"mutual"` \| `"unilateral"` ## Returns [`OmniaChannel`](../interfaces/OmniaChannel.md) --- ## Page: mergeClosePackages URL: https://docs.totem.ing/api/totemsdk-omnia/functions/mergeClosePackages [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / mergeClosePackages # Function: mergeClosePackages() > **mergeClosePackages**(`localPackage`, `counterpartyPackage`): [`SignedClosePackage`](../interfaces/SignedClosePackage.md) ## Parameters ### localPackage [`SignedClosePackage`](../interfaces/SignedClosePackage.md) ### counterpartyPackage [`SignedClosePackage`](../interfaces/SignedClosePackage.md) ## Returns [`SignedClosePackage`](../interfaces/SignedClosePackage.md) --- ## Page: minimaOutputCoinIdsForDraft URL: https://docs.totem.ing/api/totemsdk-omnia/functions/minimaOutputCoinIdsForDraft [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / minimaOutputCoinIdsForDraft # Function: minimaOutputCoinIdsForDraft() > **minimaOutputCoinIdsForDraft**(`draft`): `string`[] ## Parameters ### draft [`OmniaTxDraft`](../interfaces/OmniaTxDraft.md) ## Returns `string`[] --- ## Page: normalizeScript URL: https://docs.totem.ing/api/totemsdk-omnia/functions/normalizeScript [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / normalizeScript # Function: normalizeScript() > **normalizeScript**(`script`): `string` ## Parameters ### script `string` ## Returns `string` --- ## Page: omniaDraftToCanonicalMinimaBytes URL: https://docs.totem.ing/api/totemsdk-omnia/functions/omniaDraftToCanonicalMinimaBytes [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / omniaDraftToCanonicalMinimaBytes # Function: omniaDraftToCanonicalMinimaBytes() > **omniaDraftToCanonicalMinimaBytes**(`draft`): `Uint8Array` ## Parameters ### draft [`OmniaTxDraft`](../interfaces/OmniaTxDraft.md) ## Returns `Uint8Array` --- ## Page: omniaDraftToMinimaBytes URL: https://docs.totem.ing/api/totemsdk-omnia/functions/omniaDraftToMinimaBytes [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / omniaDraftToMinimaBytes # Function: omniaDraftToMinimaBytes() > **omniaDraftToMinimaBytes**(`draft`): `Uint8Array` Convert an `OmniaTxDraft` to canonical Minima binary TX bytes using `@totemsdk/core`'s `serializeTransaction`. This replaces JSON-encoded draft bytes in the TxPoW mining/broadcast path, ensuring settlement transactions are byte-exact Minima protocol messages rather than an internal representation. Call site pattern: ``` const txBytes = omniaDraftToMinimaBytes(draft); const txBody = serializeTxBody(txBytes, witnessBytes); const mined = await mineTxPoW(txBody, difficulty); const fullTxPoW = concatBytes(mined.minedHeaderBytes, new Uint8Array([0x01]), txBody); await chainProvider.broadcastTxPoW(Buffer.from(fullTxPoW).toString('hex')); ``` ## Parameters ### draft [`OmniaTxDraft`](../interfaces/OmniaTxDraft.md) ## Returns `Uint8Array` --- ## Page: peerTopic URL: https://docs.totem.ing/api/totemsdk-omnia/functions/peerTopic [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / peerTopic # Function: peerTopic() > **peerTopic**(`pubkey`): `Buffer` Derive a 32-byte Hyperswarm topic Buffer for peer-to-peer rendezvous. ## Parameters ### pubkey `string` ## Returns `Buffer` --- ## Page: programNumberState URL: https://docs.totem.ing/api/totemsdk-omnia/functions/programNumberState [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / programNumberState # Function: programNumberState() > **programNumberState**(`port`, `value`): [`StateValue`](../interfaces/StateValue.md) ## Parameters ### port `number` ### value `bigint` ## Returns [`StateValue`](../interfaces/StateValue.md) --- ## Page: proposeSettlement URL: https://docs.totem.ing/api/totemsdk-omnia/functions/proposeSettlement [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / proposeSettlement # Function: proposeSettlement() > **proposeSettlement**(`channel`, `leaseProvider`, `opts?`): `Promise`\<\{ `partialState`: `Partial`\<[`SignedChannelState`](../interfaces/SignedChannelState.md)\>; `settlementPayload`: [`SettlementPayload`](../interfaces/SettlementPayload.md); \}\> Builds the cooperative settlement TX (`STATE(100)=TRUE`) and signs it with the settlement TX digest — critical for on-chain correctness. Full chain path (when `opts.chainProvider` is provided): 1. Build settlement draft (STATE(100)=TRUE, per-party outputs). 2. Sign the settlement TX digest via the WOTS lease. 3. Serialize draft bytes + witness bytes → `serializeTxBody()` (txpow TxBody). 4. Mine PoW via `mineTxPoW()` using `TX_POW_MIN_DIFFICULTY`. 5. Assemble full TxPoW: `minedHeaderBytes || 0x01 || txBody`. 6. Broadcast via `chainProvider.broadcastTxPoW()`. Spec: `proposeSettlement(channel, leaseProvider)` — signer and partyAddresses are optional via the opts argument and fall back to channel fields. ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ### leaseProvider `WotsLeaseProvider` ### opts? `ProposeSettlementOptions` ## Returns `Promise`\<\{ `partialState`: `Partial`\<[`SignedChannelState`](../interfaces/SignedChannelState.md)\>; `settlementPayload`: [`SettlementPayload`](../interfaces/SettlementPayload.md); \}\> --- ## Page: recordMeterReading URL: https://docs.totem.ing/api/totemsdk-omnia/functions/recordMeterReading [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / recordMeterReading # Function: recordMeterReading() > **recordMeterReading**(`channel`, `reading`, `unitPrice`, `leaseProvider`, `signer?`): `Promise`\<[`UpdateStateResult`](../interfaces/UpdateStateResult.md)\> ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ### reading `bigint` ### unitPrice `bigint` ### leaseProvider `WotsLeaseProvider` ### signer? [`ChannelSigner`](../interfaces/ChannelSigner.md) ## Returns `Promise`\<[`UpdateStateResult`](../interfaces/UpdateStateResult.md)\> --- ## Page: recoverChannel URL: https://docs.totem.ing/api/totemsdk-omnia/functions/recoverChannel [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / recoverChannel # Function: recoverChannel() > **recoverChannel**(`jsonOrSnapshot`): [`OmniaChannel`](../interfaces/OmniaChannel.md) ## Parameters ### jsonOrSnapshot `string` \| [`OmniaChannelSnapshot`](../interfaces/OmniaChannelSnapshot.md) ## Returns [`OmniaChannel`](../interfaces/OmniaChannel.md) --- ## Page: recoverChannelSnapshot URL: https://docs.totem.ing/api/totemsdk-omnia/functions/recoverChannelSnapshot [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / recoverChannelSnapshot # Function: recoverChannelSnapshot() > **recoverChannelSnapshot**(`jsonOrSnapshot`): [`ChannelRecoveryResult`](../interfaces/ChannelRecoveryResult.md) ## Parameters ### jsonOrSnapshot `string` \| [`OmniaChannelSnapshot`](../interfaces/OmniaChannelSnapshot.md) ## Returns [`ChannelRecoveryResult`](../interfaces/ChannelRecoveryResult.md) --- ## Page: registerChannelProgram URL: https://docs.totem.ing/api/totemsdk-omnia/functions/registerChannelProgram [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / registerChannelProgram # Function: registerChannelProgram() > **registerChannelProgram**(`program`): `void` ## Parameters ### program [`ChannelProgram`](../interfaces/ChannelProgram.md) ## Returns `void` --- ## Page: replaceUnilateralCloseState URL: https://docs.totem.ing/api/totemsdk-omnia/functions/replaceUnilateralCloseState [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / replaceUnilateralCloseState # Function: replaceUnilateralCloseState() > **replaceUnilateralCloseState**(`channel`, `newerState`): [`OmniaChannel`](../interfaces/OmniaChannel.md) ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ### newerState [`SignedChannelState`](../interfaces/SignedChannelState.md) ## Returns [`OmniaChannel`](../interfaces/OmniaChannel.md) --- ## Page: resetChannelWatermarks URL: https://docs.totem.ing/api/totemsdk-omnia/functions/resetChannelWatermarks [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / \_resetChannelWatermarks # Function: \_resetChannelWatermarks() > **\_resetChannelWatermarks**(): `void` Reset all channel sequence watermarks. Intended only for test isolation — call in `beforeEach` to prevent watermarks from bleeding between tests that share a fixed `channelId`. ## Returns `void` --- ## Page: resolveChannelProgram URL: https://docs.totem.ing/api/totemsdk-omnia/functions/resolveChannelProgram [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / resolveChannelProgram # Function: resolveChannelProgram() > **resolveChannelProgram**(`program?`): [`ChannelProgram`](../interfaces/ChannelProgram.md) ## Parameters ### program? [`ChannelProgram`](../interfaces/ChannelProgram.md) \| \{ `id?`: `string`; `version?`: `number`; \} ## Returns [`ChannelProgram`](../interfaces/ChannelProgram.md) --- ## Page: scriptAddress URL: https://docs.totem.ing/api/totemsdk-omnia/functions/scriptAddress [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / scriptAddress # Function: scriptAddress() > **scriptAddress**(`script`): `string` ## Parameters ### script `string` ## Returns `string` --- ## Page: sendProgramTransitionStateUpdate URL: https://docs.totem.ing/api/totemsdk-omnia/functions/sendProgramTransitionStateUpdate [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / sendProgramTransitionStateUpdate # Function: sendProgramTransitionStateUpdate() > **sendProgramTransitionStateUpdate**(`peer`, `channel`, `signedState`, `nonce`): `Promise`\<`void`\> ## Parameters ### peer [`OmniaPeer`](../interfaces/OmniaPeer.md) ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ### signedState `Partial`\<[`SignedChannelState`](../interfaces/SignedChannelState.md)\> ### nonce `number` ## Returns `Promise`\<`void`\> --- ## Page: serializeChannelSnapshot URL: https://docs.totem.ing/api/totemsdk-omnia/functions/serializeChannelSnapshot [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / serializeChannelSnapshot # Function: serializeChannelSnapshot() > **serializeChannelSnapshot**(`channelOrSnapshot`): `string` ## Parameters ### channelOrSnapshot [`OmniaChannel`](../interfaces/OmniaChannel.md) \| [`OmniaChannelSnapshot`](../interfaces/OmniaChannelSnapshot.md) ## Returns `string` --- ## Page: serializeOmniaWitness URL: https://docs.totem.ing/api/totemsdk-omnia/functions/serializeOmniaWitness [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / serializeOmniaWitness # Function: serializeOmniaWitness() > **serializeOmniaWitness**(`options`): `Uint8Array` ## Parameters ### options [`OmniaWitnessOptions`](../interfaces/OmniaWitnessOptions.md) ## Returns `Uint8Array` --- ## Page: serializeProgramTransition URL: https://docs.totem.ing/api/totemsdk-omnia/functions/serializeProgramTransition [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / serializeProgramTransition # Function: serializeProgramTransition() > **serializeProgramTransition**(`transition`): `string` ## Parameters ### transition [`ProgramTransition`](../interfaces/ProgramTransition.md) ## Returns `string` --- ## Page: serializeTxDraft URL: https://docs.totem.ing/api/totemsdk-omnia/functions/serializeTxDraft [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / serializeTxDraft # Function: serializeTxDraft() > **serializeTxDraft**(`draft`): `string` ## Parameters ### draft [`OmniaTxDraft`](../interfaces/OmniaTxDraft.md) ## Returns `string` --- ## Page: setCounter URL: https://docs.totem.ing/api/totemsdk-omnia/functions/setCounter [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / setCounter # Function: setCounter() > **setCounter**(`channel`, `value`, `leaseProvider`, `signer?`): `Promise`\<[`UpdateStateResult`](../interfaces/UpdateStateResult.md)\> ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ### value `bigint` ### leaseProvider `WotsLeaseProvider` ### signer? [`ChannelSigner`](../interfaces/ChannelSigner.md) ## Returns `Promise`\<[`UpdateStateResult`](../interfaces/UpdateStateResult.md)\> --- ## Page: signState URL: https://docs.totem.ing/api/totemsdk-omnia/functions/signState [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / signState # Function: signState() > **signState**(`channel`, `update`, `leaseProvider`, `signer?`): `Promise`\<`Partial`\<[`SignedChannelState`](../interfaces/SignedChannelState.md)\>\> Signs a channel update state and returns the full partial `SignedChannelState`. Signs the canonical Minima update transaction digest. The full off-chain state is bound through StateCommitmentV2 embedded in STATE(102), making the digest both L1-visible and KISSVM-visible. Executes the full reserve → sign → commit WOTS lease cycle and returns a `Partial` with `signatures` and `signingIndices` keyed by the signer's `partyId`, ready to be forwarded to the counterparty for co-signing. ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) The channel context (used for treeId, localSigner fallback, pendingHTLCs). ### update New sequence number and balance split for this state. #### newBalances `Record`\<`string`, `bigint`\> #### newSequence `number` #### programTransition? [`ProgramTransition`](../interfaces/ProgramTransition.md) ### leaseProvider `WotsLeaseProvider` WOTS lease provider. ### signer? [`ChannelSigner`](../interfaces/ChannelSigner.md) Optional explicit signer; falls back to channel.localSigner. ## Returns `Promise`\<`Partial`\<[`SignedChannelState`](../interfaces/SignedChannelState.md)\>\> --- ## Page: signTxDraft URL: https://docs.totem.ing/api/totemsdk-omnia/functions/signTxDraft [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / signTxDraft # Function: signTxDraft() > **signTxDraft**(`channel`, `draft`, `purpose`, `leaseProvider`, `signer?`): `Promise`\<\{ `indices`: `SigningIndices`; `signature`: [`ChannelSignature`](../type-aliases/ChannelSignature.md); `transactionHex`: `string`; \}\> Core signing primitive used by both update and settlement paths. Handles the full wots-lease reserve → sign → commit cycle for any OmniaTxDraft. The signed digest is the canonical Minima transaction digest, matching the domain Minima validates in TxPoWChecker.checkSignatures(). ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) The channel context (used for treeId and localSigner fallback). ### draft [`OmniaTxDraft`](../interfaces/OmniaTxDraft.md) Pre-built TX draft to sign (update TX or settlement TX). ### purpose `string` Human-readable purpose label stored with the lease reservation. ### leaseProvider `WotsLeaseProvider` WOTS lease provider for key slot reservation/commit. ### signer? [`ChannelSigner`](../interfaces/ChannelSigner.md) Optional explicit signer; falls back to channel.localSigner. ## Returns `Promise`\<\{ `indices`: `SigningIndices`; `signature`: [`ChannelSignature`](../type-aliases/ChannelSignature.md); `transactionHex`: `string`; \}\> --- ## Page: snapshotChannel URL: https://docs.totem.ing/api/totemsdk-omnia/functions/snapshotChannel [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / snapshotChannel # Function: snapshotChannel() > **snapshotChannel**(`channel`, `savedAt?`): [`OmniaChannelSnapshot`](../interfaces/OmniaChannelSnapshot.md) ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ### savedAt? `number` = `...` ## Returns [`OmniaChannelSnapshot`](../interfaces/OmniaChannelSnapshot.md) --- ## Page: startUnilateralClose URL: https://docs.totem.ing/api/totemsdk-omnia/functions/startUnilateralClose [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / startUnilateralClose # Function: startUnilateralClose() > **startUnilateralClose**(`channel`, `chainProvider`, `broadcastProofs?`): `Promise`\<[`UnilateralCloseStartResult`](../interfaces/UnilateralCloseStartResult.md)\> ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ### chainProvider `ChainStateProvider` ### broadcastProofs? [`OmniaWitnessProofs`](../interfaces/OmniaWitnessProofs.md) ## Returns `Promise`\<[`UnilateralCloseStartResult`](../interfaces/UnilateralCloseStartResult.md)\> --- ## Page: stateCommitmentV2Matches URL: https://docs.totem.ing/api/totemsdk-omnia/functions/stateCommitmentV2Matches [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / stateCommitmentV2Matches # Function: stateCommitmentV2Matches() > **stateCommitmentV2Matches**(`channel`, `state`, `settlement?`): `boolean` ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ### state [`SignedChannelState`](../interfaces/SignedChannelState.md) ### settlement? `boolean` = `false` ## Returns `boolean` --- ## Page: timeoutHTLC URL: https://docs.totem.ing/api/totemsdk-omnia/functions/timeoutHTLC [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / timeoutHTLC # Function: timeoutHTLC() > **timeoutHTLC**(`channel`, `htlcId`, `leaseProvider`, `chainProvider`, `signer?`): `Promise`\<\{ `channel`: [`OmniaChannel`](../interfaces/OmniaChannel.md); `error?`: `string`; `partialState`: `Partial`\<[`SignedChannelState`](../interfaces/SignedChannelState.md)\>; \}\> After `timeoutBlock`, HTLC amount returns to sender balance in new state. Spec: `timeoutHTLC(channel, htlcId, leaseProvider, chainProvider)` — signer is optional. The current block height is fetched from `chainProvider.getTip()` — the caller cannot supply an untrusted height. This prevents premature timeout attacks. ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ### htlcId `string` ### leaseProvider `WotsLeaseProvider` ### chainProvider `ChainStateProvider` ### signer? [`ChannelSigner`](../interfaces/ChannelSigner.md) ## Returns `Promise`\<\{ `channel`: [`OmniaChannel`](../interfaces/OmniaChannel.md); `error?`: `string`; `partialState`: `Partial`\<[`SignedChannelState`](../interfaces/SignedChannelState.md)\>; \}\> --- ## Page: toEnhancedBuildParams URL: https://docs.totem.ing/api/totemsdk-omnia/functions/toEnhancedBuildParams [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / toEnhancedBuildParams # Function: toEnhancedBuildParams() > **toEnhancedBuildParams**(`draft`): `EnhancedBuildParams` Convert an `OmniaTxDraft` to `@totemsdk/tx-builder`'s `EnhancedBuildParams`. This is the bridge between the Omnia state-machine draft format and the canonical Minima TX representation used by the tx-builder. Amounts are converted from `bigint` to decimal string as required by `EnhancedCoinInput` and `EnhancedCoinOutput`. To produce real Minima binary TX bytes, pass the returned `EnhancedBuildParams` to `@totemsdk/core`'s `serializeTransaction()`, then use `buildTxPoWPayload()` to wrap the result in a TxPoW body for mining and broadcast. ## Parameters ### draft [`OmniaTxDraft`](../interfaces/OmniaTxDraft.md) ## Returns `EnhancedBuildParams` --- ## Page: toRawMinima URL: https://docs.totem.ing/api/totemsdk-omnia/functions/toRawMinima [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / toRawMinima # Function: toRawMinima() > **toRawMinima**(`scaledAmount`, `tokenScale`): `bigint` Convert a scaled token amount back to raw Minima units. `rawAmount = scaledAmount / 10^tokenScale` For native Minima (tokenScale=0), no conversion is needed. ## Parameters ### scaledAmount `bigint` ### tokenScale `number` ## Returns `bigint` --- ## Page: updateState URL: https://docs.totem.ing/api/totemsdk-omnia/functions/updateState [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / updateState # Function: updateState() > **updateState**(`channel`, `delta`, `leaseProvider`, `signer?`): `Promise`\<[`UpdateStateResult`](../interfaces/UpdateStateResult.md)\> Produce a new partial SignedChannelState with incremented sequence. Spec: `updateState(channel, delta, leaseProvider)` — signer is optional and falls back to `channel.localSigner` when not provided. ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) Current channel state (must be 'active'). ### delta [`UpdateDelta`](../interfaces/UpdateDelta.md) Balance delta: `{ newBalances, memo? }`. ### leaseProvider `WotsLeaseProvider` WOTS lease provider for key slot management. ### signer? [`ChannelSigner`](../interfaces/ChannelSigner.md) Optional explicit signer; falls back to channel.localSigner. ## Returns `Promise`\<[`UpdateStateResult`](../interfaces/UpdateStateResult.md)\> --- ## Page: validateChannelStateWithKissvm URL: https://docs.totem.ing/api/totemsdk-omnia/functions/validateChannelStateWithKissvm [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / validateChannelStateWithKissvm # Function: validateChannelStateWithKissvm() > **validateChannelStateWithKissvm**(`channel`, `state`, `opts?`): `object` ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ### state [`SignedChannelState`](../interfaces/SignedChannelState.md) ### opts? [`KissvmValidationOptions`](../interfaces/KissvmValidationOptions.md) ## Returns `object` ### error? > `optional` **error?**: `string` ### valid > **valid**: `boolean` --- ## Page: validateStateTransition URL: https://docs.totem.ing/api/totemsdk-omnia/functions/validateStateTransition [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / validateStateTransition # Function: validateStateTransition() > **validateStateTransition**(`channel`, `newSequence`, `newBalances`, `pendingHTLCDelta`): `void` Validates a proposed state transition without requiring signing indices. Checks: sequence monotonicity, balance conservation. Double-sign detection is handled at the updateState level using pendingProposal. ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ### newSequence `number` ### newBalances `Record`\<`string`, `bigint`\> ### pendingHTLCDelta `bigint` ## Returns `void` --- ## Page: verifyClosePackage URL: https://docs.totem.ing/api/totemsdk-omnia/functions/verifyClosePackage [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / verifyClosePackage # Function: verifyClosePackage() > **verifyClosePackage**(`channel`, `state`): `object` ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ### state [`SignedChannelState`](../interfaces/SignedChannelState.md) ## Returns `object` ### errors > **errors**: `string`[] ### valid > **valid**: `boolean` --- ## Page: verifyPartialClosePackage URL: https://docs.totem.ing/api/totemsdk-omnia/functions/verifyPartialClosePackage [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / verifyPartialClosePackage # Function: verifyPartialClosePackage() > **verifyPartialClosePackage**(`channel`, `state`): `object` Verify close-package artifacts before adding this node's co-signature. This accepts packages that are incomplete for unsigned parties, but every party already present in `state.signatures` must also have matching update and settlement close-artifact signatures. Use `verifyClosePackage()` after both parties have signed the final state. ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ### state [`SignedChannelState`](../interfaces/SignedChannelState.md) ## Returns `object` ### errors > **errors**: `string`[] ### valid > **valid**: `boolean` --- ## Page: verifyRegistryRootInState URL: https://docs.totem.ing/api/totemsdk-omnia/functions/verifyRegistryRootInState [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / verifyRegistryRootInState # Function: verifyRegistryRootInState() > **verifyRegistryRootInState**(`state`, `expectedRoot`): `object` Verify that a signed channel state announces the expected registry root. Returns the failure reason when the root is missing or mismatched. ## Parameters ### state [`SignedChannelState`](../interfaces/SignedChannelState.md) ### expectedRoot `string` ## Returns `object` ### error? > `optional` **error?**: `string` ### valid > **valid**: `boolean` --- ## Page: verifyState URL: https://docs.totem.ing/api/totemsdk-omnia/functions/verifyState [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / verifyState # Function: verifyState() > **verifyState**(`channel`, `state`, `opts?`): `Promise`\<\{ `errors`: `string`[]; `valid`: `boolean`; \}\> ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ### state [`SignedChannelState`](../interfaces/SignedChannelState.md) ### opts? [`VerifyStateOptions`](../interfaces/VerifyStateOptions.md) ## Returns `Promise`\<\{ `errors`: `string`[]; `valid`: `boolean`; \}\> --- ## Page: verifyStateForCoSign URL: https://docs.totem.ing/api/totemsdk-omnia/functions/verifyStateForCoSign [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / verifyStateForCoSign # Function: verifyStateForCoSign() > **verifyStateForCoSign**(`channel`, `state`): `Promise`\<\{ `errors`: `string`[]; `valid`: `boolean`; \}\> Validate a one-party state update before this node adds its co-signature. This performs the sequence, conservation, V2 commitment, program-hook, partial close-package, and present-signature checks needed by the co-sign path. It intentionally does not require every channel party to have signed. After co-signing and merging, use `verifyState()` on the completed state. ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ### state [`SignedChannelState`](../interfaces/SignedChannelState.md) ## Returns `Promise`\<\{ `errors`: `string`[]; `valid`: `boolean`; \}\> --- ## Page: verifyStateSignature URL: https://docs.totem.ing/api/totemsdk-omnia/functions/verifyStateSignature [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / verifyStateSignature # Function: verifyStateSignature() > **verifyStateSignature**(`channel`, `state`, `partyId`, `publicKeyDigest`): `boolean` Verify a channel state signature using off-chain WOTS verification. * Rebuilds the canonical Minima update transaction digest and uses * `wotsVerifyDigest` to compare it against the party's stored public key digest. Because the commitment covers the full off-chain state (sequence + balance split + pending HTLCs), any tampering with these fields after signing will cause verification to fail, preserving the integrity of dispute evidence. ## Parameters ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) ### state [`SignedChannelState`](../interfaces/SignedChannelState.md) ### partyId `string` ### publicKeyDigest `string` ## Returns `boolean` --- ## Page: AddHTLCParams URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/AddHTLCParams [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / AddHTLCParams # Interface: AddHTLCParams ## Properties ### amount > **amount**: `bigint` *** ### counterpartPublicKeyDigest > **counterpartPublicKeyDigest**: `string` *** ### direction > **direction**: `"offered"` \| `"received"` *** ### hashlock > **hashlock**: `string` *** ### timeoutBlock > **timeoutBlock**: `bigint` --- ## Page: AgentPolicy URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/AgentPolicy [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / AgentPolicy # Interface: AgentPolicy Policy evaluated by the Totem wallet layer — NEVER by the agent. The wallet implements this interface to decide whether to auto-sign or route to the user. The AI never has access to the policy implementation. ## Methods ### canAutoApprove() > **canAutoApprove**(`proposal`): `Promise`\<`boolean`\> Return true if the wallet should sign the intent without user interaction. Implementations typically check risk, amount thresholds, and known agents. #### Parameters ##### proposal `AgentProposal` #### Returns `Promise`\<`boolean`\> *** ### commit()? > `optional` **commit**(`operationId`): `Promise`\<`void`\> #### Parameters ##### operationId `string` #### Returns `Promise`\<`void`\> *** ### release()? > `optional` **release**(`operationId`): `Promise`\<`void`\> #### Parameters ##### operationId `string` #### Returns `Promise`\<`void`\> *** ### requiresUserApproval() > **requiresUserApproval**(`proposal`): `Promise`\<`boolean`\> Return true if the wallet must show a user-approval UI before signing. Generally the complement of canAutoApprove, but may have independent logic (e.g. always require approval for settlements regardless of risk). #### Parameters ##### proposal `AgentProposal` #### Returns `Promise`\<`boolean`\> *** ### reserve()? > `optional` **reserve**(`proposal`): `Promise`\<`PolicyEvalResult`\> Optional reservation lifecycle for stateful policies. The execution boundary calls `reserve` before executing, then `commit` after a successful execution or `release` on any failure path. When implemented, quota is only consumed through reserve/commit — a read-only `evaluate` / `canAutoApprove` never touches the limits. #### Parameters ##### proposal `AgentProposal` #### Returns `Promise`\<`PolicyEvalResult`\> --- ## Page: AgentReceipt URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/AgentReceipt [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / AgentReceipt # Interface: AgentReceipt Result returned to the agent after Totem has processed the intent. The agent uses this to learn whether its proposal was executed. ## Properties ### channelState? > `optional` **channelState?**: `string` Serialised Omnia channel state, set when an off-chain channel was updated. *** ### inferenceReceipt? > `optional` **inferenceReceipt?**: `IntelligenceReceipt` Consumption receipt for inference intents (`type: 'inference'`), when the wallet/authority layer attested execution. *** ### proposalId > **proposalId**: `string` Matches AgentProposal.id — ties the receipt back to the original proposal. *** ### rejectionReason? > `optional` **rejectionReason?**: `string` Human-readable reason, set when status is 'rejected'. *** ### settledAt? > `optional` **settledAt?**: `number` Unix timestamp (ms) when the intent was settled (signed/rejected). *** ### status > **status**: `"approved"` \| `"pending_user"` \| `"rejected"` - 'approved' — wallet signed and broadcast the transaction - 'rejected' — wallet or policy rejected the proposal - 'pending_user' — waiting for explicit user approval in the UI *** ### txpowId? > `optional` **txpowId?**: `string` TxPoW ID, set when a transaction was successfully mined and broadcast. --- ## Page: ApplyProgramTransitionParams URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/ApplyProgramTransitionParams [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / ApplyProgramTransitionParams # Interface: ApplyProgramTransitionParams ## Properties ### balances? > `optional` **balances?**: `Record`\<`string`, `bigint`\> *** ### memo? > `optional` **memo?**: `string` *** ### transition > **transition**: [`ProgramTransition`](ProgramTransition.md) --- ## Page: BindPeerOptions URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/BindPeerOptions [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / BindPeerOptions # Interface: BindPeerOptions ## Properties ### routeChannelProposal? > `optional` **routeChannelProposal?**: `boolean` --- ## Page: ChannelLogEntry URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/ChannelLogEntry [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / ChannelLogEntry # Interface: ChannelLogEntry ## Properties ### balances > **balances**: `Record`\<[`partyId`](../type-aliases/partyId.md), `bigint`\> *** ### event > **event**: `"update"` \| `"htlc_add"` \| `"htlc_fulfill"` \| `"htlc_timeout"` \| `"open"` \| `"settle"` *** ### htlcCount > **htlcCount**: `number` *** ### sequence > **sequence**: `number` *** ### timestamp > **timestamp**: `number` --- ## Page: ChannelParticipant URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/ChannelParticipant [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / ChannelParticipant # Interface: ChannelParticipant ## Properties ### addressIndex > **addressIndex**: `number` *** ### partyId > **partyId**: `string` *** ### publicKeyDigest > **publicKeyDigest**: `string` *** ### relayEndpoint? > `optional` **relayEndpoint?**: `string` *** ### settlementAddress? > `optional` **settlementAddress?**: `string` Address to receive funds on cooperative settlement. Derived from publicKeyDigest when not set. --- ## Page: ChannelProgram URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/ChannelProgram [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / ChannelProgram # Interface: ChannelProgram ## Properties ### id > **id**: `string` *** ### version > **version**: `number` ## Methods ### buildScript() > **buildScript**(`parties`): `string` #### Parameters ##### parties [`ChannelParticipant`](ChannelParticipant.md)[] #### Returns `string` *** ### buildStateVariables() > **buildStateVariables**(`input`): [`StateValue`](StateValue.md)[] #### Parameters ##### input [`ChannelProgramBuildStateInput`](ChannelProgramBuildStateInput.md) #### Returns [`StateValue`](StateValue.md)[] *** ### validateTransition()? > `optional` **validateTransition**(`input`): [`ChannelProgramValidationResult`](ChannelProgramValidationResult.md) #### Parameters ##### input [`ChannelProgramValidateTransitionInput`](ChannelProgramValidateTransitionInput.md) #### Returns [`ChannelProgramValidationResult`](ChannelProgramValidationResult.md) --- ## Page: ChannelProgramBuildStateInput URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/ChannelProgramBuildStateInput [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / ChannelProgramBuildStateInput # Interface: ChannelProgramBuildStateInput ## Properties ### balances > **balances**: `Record`\<[`partyId`](../type-aliases/partyId.md), `bigint`\> *** ### channel > **channel**: [`OmniaChannel`](OmniaChannel.md) *** ### pendingHTLCs > **pendingHTLCs**: [`HTLCRecord`](HTLCRecord.md)[] *** ### previousState? > `optional` **previousState?**: [`SignedChannelState`](SignedChannelState.md) \| `null` *** ### sequence > **sequence**: `number` *** ### settlement > **settlement**: `boolean` *** ### transition? > `optional` **transition?**: [`ProgramTransition`](ProgramTransition.md) --- ## Page: ChannelProgramValidateTransitionInput URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/ChannelProgramValidateTransitionInput [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / ChannelProgramValidateTransitionInput # Interface: ChannelProgramValidateTransitionInput ## Properties ### channel > **channel**: [`OmniaChannel`](OmniaChannel.md) *** ### nextState > **nextState**: [`SignedChannelState`](SignedChannelState.md) *** ### previousState? > `optional` **previousState?**: [`SignedChannelState`](SignedChannelState.md) \| `null` *** ### transition? > `optional` **transition?**: [`ProgramTransition`](ProgramTransition.md) --- ## Page: ChannelProgramValidationResult URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/ChannelProgramValidationResult [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / ChannelProgramValidationResult # Interface: ChannelProgramValidationResult ## Properties ### error? > `optional` **error?**: `string` *** ### valid > **valid**: `boolean` --- ## Page: ChannelProposal URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/ChannelProposal [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / ChannelProposal # Interface: ChannelProposal ## Properties ### channelId > **channelId**: `string` *** ### fundingAddress? > `optional` **fundingAddress?**: `string` *** ### fundingCoinId > **fundingCoinId**: `string` *** ### fundingScript > **fundingScript**: `string` *** ### fundingTxId > **fundingTxId**: `string` *** ### localAmount > **localAmount**: `bigint` *** ### localParty > **localParty**: [`ChannelParticipant`](ChannelParticipant.md) *** ### programId? > `optional` **programId?**: `string` *** ### programVersion? > `optional` **programVersion?**: `number` *** ### remoteAmount > **remoteAmount**: `bigint` *** ### remoteParty > **remoteParty**: [`ChannelParticipant`](ChannelParticipant.md) *** ### tokenId > **tokenId**: `string` *** ### tokenScale? > `optional` **tokenScale?**: `number` --- ## Page: ChannelReceipt URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/ChannelReceipt [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / ChannelReceipt # Interface: ChannelReceipt ## Properties ### balances > **balances**: `Record`\<[`partyId`](../type-aliases/partyId.md), `bigint`\> *** ### capacityTotal > **capacityTotal**: `number` *** ### capacityUsed > **capacityUsed**: `number` *** ### capacityWarning? > `optional` **capacityWarning?**: [`CapacityWarning`](../type-aliases/CapacityWarning.md) *** ### channelId > **channelId**: `string` *** ### sequence > **sequence**: `number` *** ### timestamp > **timestamp**: `number` --- ## Page: ChannelRecoveryResult URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/ChannelRecoveryResult [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / ChannelRecoveryResult # Interface: ChannelRecoveryResult ## Properties ### channel > **channel**: [`OmniaChannel`](OmniaChannel.md) *** ### latestSignedState? > `optional` **latestSignedState?**: [`SignedChannelState`](SignedChannelState.md) *** ### warnings > **warnings**: `string`[] --- ## Page: ChannelSigner URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/ChannelSigner [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / ChannelSigner # Interface: ChannelSigner ## Properties ### publicKeyDigest > **publicKeyDigest**: `string` ## Methods ### sign() > **sign**(`payload`, `indices`): `Promise`\<[`ChannelSignature`](../type-aliases/ChannelSignature.md)\> Returns flat WOTS signature bytes (output of wotsSign). #### Parameters ##### payload `Uint8Array` ##### indices `SigningIndices` #### Returns `Promise`\<[`ChannelSignature`](../type-aliases/ChannelSignature.md)\> --- ## Page: ChannelWatermark URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/ChannelWatermark [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / ChannelWatermark # Interface: ChannelWatermark ## Properties ### addressIndex > **addressIndex**: `number` *** ### channelId > **channelId**: `string` *** ### nextL1 > **nextL1**: `number` *** ### nextL2 > **nextL2**: `number` *** ### totalUsed > **totalUsed**: `number` --- ## Page: ClosePackageArtifact URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/ClosePackageArtifact [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / ClosePackageArtifact # Interface: ClosePackageArtifact ## Properties ### signatures > **signatures**: `Record`\<[`partyId`](../type-aliases/partyId.md), [`ChannelSignature`](../type-aliases/ChannelSignature.md)\> *** ### signingIndices > **signingIndices**: `Record`\<[`partyId`](../type-aliases/partyId.md), `SigningIndices`\> *** ### txDigest > **txDigest**: `string` *** ### txHex > **txHex**: `string` --- ## Page: CreateChannelParams URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/CreateChannelParams [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / CreateChannelParams # Interface: CreateChannelParams ## Properties ### channelType? > `optional` **channelType?**: `"direct"` \| `"virtual"` *** ### factoryRef? > `optional` **factoryRef?**: `string` *** ### fundingCoinId > **fundingCoinId**: `string` *** ### fundingWitnessBytes? > `optional` **fundingWitnessBytes?**: `Uint8Array`\<`ArrayBufferLike`\> Serialized Minima witness for the funding transaction input(s). Required for createChannel broadcast. *** ### localAmount > **localAmount**: `bigint` *** ### localParty > **localParty**: [`ChannelParticipant`](ChannelParticipant.md) *** ### program? > `optional` **program?**: [`ChannelProgram`](ChannelProgram.md) *** ### remoteAmount > **remoteAmount**: `bigint` *** ### remoteParty > **remoteParty**: [`ChannelParticipant`](ChannelParticipant.md) *** ### tokenId? > `optional` **tokenId?**: `string` *** ### tokenScale? > `optional` **tokenScale?**: `number` Scale factor for coloured coins. 0 = native Minima. Default: 0. --- ## Page: DisputePayload URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/DisputePayload [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / DisputePayload # Interface: DisputePayload ## Properties ### channelId > **channelId**: `string` *** ### evidence > **evidence**: `string` *** ### latestSequence > **latestSequence**: `number` *** ### stateLog > **stateLog**: [`ChannelLogEntry`](ChannelLogEntry.md)[] *** ### updateTxHex > **updateTxHex**: `string` --- ## Page: HTLCRecord URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/HTLCRecord [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / HTLCRecord # Interface: HTLCRecord ## Properties ### amount > **amount**: `bigint` *** ### direction > **direction**: `"offered"` \| `"received"` *** ### hashlock > **hashlock**: `string` *** ### htlcAddress > **htlcAddress**: `string` *** ### htlcId > **htlcId**: `string` *** ### recipientPublicKeyDigest > **recipientPublicKeyDigest**: `string` *** ### senderPublicKeyDigest > **senderPublicKeyDigest**: `string` *** ### status > **status**: `"pending"` \| `"fulfilled"` \| `"timed_out"` *** ### timeoutBlock > **timeoutBlock**: `bigint` --- ## Page: HtlcFulfillmentReceipt URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/HtlcFulfillmentReceipt [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / HtlcFulfillmentReceipt # Interface: HtlcFulfillmentReceipt A verifiable fee-provenance record for a fulfilled HTLC (#27): the exact artifact a pool's `recordPoolFee` earn-proof consumes. It binds the channel, the HTLC, the recipient, and the amount so a fee record can be traced to a real fulfilled payment — never a declared string. ## Properties ### amount > **amount**: `bigint` *** ### channelId > **channelId**: `string` *** ### fulfilledAt > **fulfilledAt**: `number` *** ### htlcId > **htlcId**: `string` *** ### receiptHash > **receiptHash**: `string` *** ### recipientPublicKeyDigest > **recipientPublicKeyDigest**: `string` *** ### sequence > **sequence**: `number` *** ### tokenId > **tokenId**: `string` --- ## Page: IntentResult URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/IntentResult [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / IntentResult # Interface: IntentResult ## Properties ### channel? > `optional` **channel?**: [`OmniaChannel`](OmniaChannel.md) *** ### idempotentReplay? > `optional` **idempotentReplay?**: `boolean` True when a stable operation ID was already committed. *** ### receipt? > `optional` **receipt?**: [`AgentReceipt`](AgentReceipt.md) *** ### status > **status**: `"approved"` \| `"pending_user"` \| `"rejected"` --- ## Page: KissvmValidationOptions URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/KissvmValidationOptions [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / KissvmValidationOptions # Interface: KissvmValidationOptions ## Properties ### block? > `optional` **block?**: `number` *** ### partyAddresses? > `optional` **partyAddresses?**: `Record`\<`string`, `string`\> *** ### previousCreatedBlock? > `optional` **previousCreatedBlock?**: `number` *** ### settlement? > `optional` **settlement?**: `boolean` --- ## Page: OmniaChannel URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/OmniaChannel [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / OmniaChannel # Interface: OmniaChannel ## Properties ### balances > **balances**: `Record`\<[`partyId`](../type-aliases/partyId.md), `bigint`\> *** ### channelId > **channelId**: `string` *** ### channelType > **channelType**: `"direct"` \| `"virtual"` *** ### createdAt > **createdAt**: `number` *** ### currentSequence > **currentSequence**: `number` *** ### factoryRef? > `optional` **factoryRef?**: `string` *** ### fundingAddress > **fundingAddress**: `string` SHA3-256 script-hash address for the eltoo script — used as input/output address in update/settlement TXs. *** ### fundingCoinId > **fundingCoinId**: `string` *** ### fundingScript > **fundingScript**: `string` *** ### fundingTxId > **fundingTxId**: `string` *** ### latestCoinId? > `optional` **latestCoinId?**: `string` The coin ID of the most recently confirmed on-chain channel output. Starts as `fundingCoinId`; callers should update this after each mined update TX is confirmed on-chain so subsequent update/settlement inputs reference the real spendable coin rather than the funding output. *** ### latestState > **latestState**: [`SignedChannelState`](SignedChannelState.md) \| `null` *** ### localSigner? > `optional` **localSigner?**: [`ChannelSigner`](ChannelSigner.md) Local party signer — stored on the channel so callers can omit the signer param from public functions (updateState, addHTLC, proposeSettlement, executeIntent, etc.). Explicit signer params always take precedence over this field. *** ### parties > **parties**: [`ChannelParticipant`](ChannelParticipant.md)[] *** ### pendingHTLCs > **pendingHTLCs**: [`HTLCRecord`](HTLCRecord.md)[] *** ### pendingProposal? > `optional` **pendingProposal?**: `object` Tracks the most recent in-flight proposal at a given sequence number. Used for double-sign detection: same sequence + different payload → DoubleSignError. #### payloadHash > **payloadHash**: `string` #### sequence > **sequence**: `number` *** ### programId > **programId**: `string` *** ### programVersion > **programVersion**: `number` *** ### stateLog > **stateLog**: [`ChannelLogEntry`](ChannelLogEntry.md)[] *** ### status > **status**: [`ChannelStatus`](../type-aliases/ChannelStatus.md) *** ### tokenId > **tokenId**: `string` *** ### tokenScale > **tokenScale**: `number` Scale factor for coloured coins: `tokenAmount = minimaRawAmount × 10^tokenScale`. For native Minima (tokenId=0x00) this is always 0. Balances are stored in scaled token units; TX builders convert to raw Minima. *** ### totalValue > **totalValue**: `bigint` *** ### unilateralClose? > `optional` **unilateralClose?**: `UnilateralCloseState` *** ### updatedAt > **updatedAt**: `number` --- ## Page: OmniaChannelSnapshot URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/OmniaChannelSnapshot [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / OmniaChannelSnapshot # Interface: OmniaChannelSnapshot ## Properties ### channel > **channel**: [`OmniaChannel`](OmniaChannel.md) *** ### savedAt > **savedAt**: `number` *** ### version > **version**: `1` --- ## Page: OmniaIntegrationConfig URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/OmniaIntegrationConfig [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / OmniaIntegrationConfig # Interface: OmniaIntegrationConfig ## Properties ### chainProvider? > `optional` **chainProvider?**: `any` *** ### leaseProvider? > `optional` **leaseProvider?**: `any` *** ### onChannelAccepted? > `optional` **onChannelAccepted?**: (`channel`, `peer`) => `void` #### Parameters ##### channel [`OmniaChannel`](OmniaChannel.md) ##### peer [`OmniaPeer`](OmniaPeer.md) #### Returns `void` *** ### onSettlementProposed? > `optional` **onSettlementProposed?**: (`payload`, `peer`) => `void` #### Parameters ##### payload `unknown` ##### peer [`OmniaPeer`](OmniaPeer.md) #### Returns `void` *** ### onStateUpdated? > `optional` **onStateUpdated?**: (`channel`, `peer`) => `void` #### Parameters ##### channel [`OmniaChannel`](OmniaChannel.md) ##### peer [`OmniaPeer`](OmniaPeer.md) #### Returns `void` *** ### signer? > `optional` **signer?**: [`ChannelSigner`](ChannelSigner.md) --- ## Page: OmniaMessage URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/OmniaMessage [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / OmniaMessage # Interface: OmniaMessage ## Properties ### channelId > **channelId**: `string` *** ### nonce > **nonce**: `number` *** ### payload > **payload**: `unknown` *** ### type > **type**: [`OmniaMessageType`](../type-aliases/OmniaMessageType.md) *** ### version? > `optional` **version?**: `number` --- ## Page: OmniaPeer URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/OmniaPeer [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / OmniaPeer # Interface: OmniaPeer ## Properties ### channelId > `readonly` **channelId**: `string` \| `undefined` *** ### pubkey > `readonly` **pubkey**: `string` ## Methods ### disconnect() > **disconnect**(): `void` #### Returns `void` *** ### onMessage() > **onMessage**(`cb`): [`Unsubscribe`](../type-aliases/Unsubscribe.md) #### Parameters ##### cb (`msg`) => `void` #### Returns [`Unsubscribe`](../type-aliases/Unsubscribe.md) *** ### onReconnected() > **onReconnected**(`cb`): [`Unsubscribe`](../type-aliases/Unsubscribe.md) #### Parameters ##### cb () => `void` #### Returns [`Unsubscribe`](../type-aliases/Unsubscribe.md) *** ### onReconnecting() > **onReconnecting**(`cb`): [`Unsubscribe`](../type-aliases/Unsubscribe.md) #### Parameters ##### cb (`attempt`) => `void` #### Returns [`Unsubscribe`](../type-aliases/Unsubscribe.md) *** ### sendMessage() > **sendMessage**(`msg`): `Promise`\<`void`\> #### Parameters ##### msg [`OmniaMessage`](OmniaMessage.md) #### Returns `Promise`\<`void`\> --- ## Page: OmniaPeerOptions URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/OmniaPeerOptions [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / OmniaPeerOptions # Interface: OmniaPeerOptions ## Properties ### channelId? > `optional` **channelId?**: `string` *** ### maxReconnectAttempts? > `optional` **maxReconnectAttempts?**: `number` *** ### pubkey > **pubkey**: `string` *** ### reconnectBaseDelayMs? > `optional` **reconnectBaseDelayMs?**: `number` *** ### reconnectFactory? > `optional` **reconnectFactory?**: () => `Promise`\<`IStreamTransport`\> #### Returns `Promise`\<`IStreamTransport`\> --- ## Page: OmniaSwarm URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/OmniaSwarm [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / OmniaSwarm # Interface: OmniaSwarm ## Methods ### advertise() > **advertise**(`localPubkey`): `void` #### Parameters ##### localPubkey `string` #### Returns `void` *** ### broadcast() > **broadcast**(`topic`, `msg`): `Promise`\<`void`\> #### Parameters ##### topic `string` ##### msg [`OmniaMessage`](OmniaMessage.md) #### Returns `Promise`\<`void`\> *** ### close() > **close**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### connectToPeer() > **connectToPeer**(`pubkey`, `channelId?`): `Promise`\<[`OmniaPeer`](OmniaPeer.md)\> #### Parameters ##### pubkey `string` ##### channelId? `string` #### Returns `Promise`\<[`OmniaPeer`](OmniaPeer.md)\> *** ### listenForChannels() > **listenForChannels**(`onProposal`): [`Unsubscribe`](../type-aliases/Unsubscribe.md) #### Parameters ##### onProposal (`peer`, `proposal`) => `void` #### Returns [`Unsubscribe`](../type-aliases/Unsubscribe.md) --- ## Page: OmniaSwarmConfig URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/OmniaSwarmConfig [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / OmniaSwarmConfig # Interface: OmniaSwarmConfig ## Properties ### localPubkey? > `optional` **localPubkey?**: `string` *** ### maxReconnectAttempts? > `optional` **maxReconnectAttempts?**: `number` *** ### reconnectBaseDelayMs? > `optional` **reconnectBaseDelayMs?**: `number` *** ### relay? > `optional` **relay?**: [`RelayConfig`](../type-aliases/RelayConfig.md) --- ## Page: OmniaTxDraft URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/OmniaTxDraft [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / OmniaTxDraft # Interface: OmniaTxDraft ## Properties ### inputs > **inputs**: [`TxInputDraft`](TxInputDraft.md)[] *** ### outputs > **outputs**: [`TxOutputDraft`](TxOutputDraft.md)[] *** ### stateVariables > **stateVariables**: [`StateValue`](StateValue.md)[] *** ### storeState > **storeState**: `boolean` *** ### type > **type**: `"update"` \| `"funding"` \| `"settlement"` --- ## Page: OmniaWitnessOptions URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/OmniaWitnessOptions [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / OmniaWitnessOptions # Interface: OmniaWitnessOptions ## Extends - [`OmniaWitnessProofs`](OmniaWitnessProofs.md) ## Properties ### coinProofs > **coinProofs**: `Uint8Array`\<`ArrayBufferLike`\>[] Serialized Minima CoinProof bytes, one per spending input. #### Inherited from [`OmniaWitnessProofs`](OmniaWitnessProofs.md).[`coinProofs`](OmniaWitnessProofs.md#coinproofs) *** ### scriptProofs > **scriptProofs**: `Uint8Array`\<`ArrayBufferLike`\>[] Serialized Minima ScriptProof bytes required by the input scripts. #### Inherited from [`OmniaWitnessProofs`](OmniaWitnessProofs.md).[`scriptProofs`](OmniaWitnessProofs.md#scriptproofs) *** ### signatures > **signatures**: `Uint8Array`\<`ArrayBufferLike`\>[] Serialized Minima Signature objects. Must match the transaction digest being broadcast. --- ## Page: OmniaWitnessProofs URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/OmniaWitnessProofs [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / OmniaWitnessProofs # Interface: OmniaWitnessProofs ## Extended by - [`OmniaWitnessOptions`](OmniaWitnessOptions.md) ## Properties ### coinProofs > **coinProofs**: `Uint8Array`\<`ArrayBufferLike`\>[] Serialized Minima CoinProof bytes, one per spending input. *** ### scriptProofs > **scriptProofs**: `Uint8Array`\<`ArrayBufferLike`\>[] Serialized Minima ScriptProof bytes required by the input scripts. --- ## Page: PaymentIntent URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/PaymentIntent [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / PaymentIntent # Interface: PaymentIntent The action an agent wants the wallet to take. Agents produce intents; they do not execute them. ## Properties ### amount? > `optional` **amount?**: `string` Amount in the token's native unit (string to preserve precision). *** ### inference? > `optional` **inference?**: `object` Inference block — present when `type === 'inference'` and describes the compute the agent wants authorized. Its `usage` output is the metering unit budget/cap policies convert into spend. #### budgetTokenId? > `optional` **budgetTokenId?**: `string` Token id the provider meters in, if inference is token-denominated. #### domain > **domain**: `InferenceDomain` #### input? > `optional` **input?**: `unknown` Prompt / audio / image reference to compute over. #### maxTokens? > `optional` **maxTokens?**: `number` Upper bound on output tokens, used by budget policies. #### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> #### model? > `optional` **model?**: `string` Requested model, when the intent targets a specific one. #### op > **op**: `string` Provider-neutral operation name, e.g. 'completion', 'ragSearch'. *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> Arbitrary extra context the agent wants to attach (e.g. invoice ref). *** ### reason? > `optional` **reason?**: `string` Human-readable reason for the payment (shown to user in approval UI). *** ### recipient? > `optional` **recipient?**: `string` Recipient Minima address (Mx… or hex). *** ### risk? > `optional` **risk?**: `"low"` \| `"medium"` \| `"high"` Agent's self-assessed risk level — used by AgentPolicy routing. *** ### tokenId? > `optional` **tokenId?**: `string` Minima tokenId, or '0x00' for native Minima. *** ### type > **type**: `"settlement"` \| `"payment"` \| `"channel_update"` \| `"lookup"` \| `"receipt"` \| `"inference"` Discriminator — what kind of operation this intent represents. --- ## Page: ProgramTransition URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/ProgramTransition [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / ProgramTransition # Interface: ProgramTransition ## Properties ### action > **action**: `string` *** ### inputs? > `optional` **inputs?**: `Record`\<`string`, `string` \| `bigint` \| `boolean`\> *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `string`\> *** ### witness? > `optional` **witness?**: `Record`\<`string`, `string`\> --- ## Page: RegistryRootTransitionInputs URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/RegistryRootTransitionInputs [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / RegistryRootTransitionInputs # Interface: RegistryRootTransitionInputs ## Properties ### domain? > `optional` **domain?**: `string` *** ### poolId > **poolId**: `string` *** ### root > **root**: `string` --- ## Page: SettlementPayload URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/SettlementPayload [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / SettlementPayload # Interface: SettlementPayload ## Properties ### balances > **balances**: `Record`\<[`partyId`](../type-aliases/partyId.md), `bigint`\> *** ### channelId > **channelId**: `string` *** ### htlcOutputs > **htlcOutputs**: `HTLCOutputRecord`[] *** ### sequence > **sequence**: `number` *** ### settlementTxHex > **settlementTxHex**: `string` *** ### txpowId? > `optional` **txpowId?**: `string` SHA3-256 TxPoW ID (hex) from mineTxPoW — populated when proposeSettlement is given a chainProvider. --- ## Page: SignedChannelState URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/SignedChannelState [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / SignedChannelState # Interface: SignedChannelState ## Properties ### balances > **balances**: `Record`\<[`partyId`](../type-aliases/partyId.md), `bigint`\> *** ### closePackage? > `optional` **closePackage?**: [`SignedClosePackage`](SignedClosePackage.md) *** ### pendingHTLCs > **pendingHTLCs**: [`HTLCRecord`](HTLCRecord.md)[] *** ### programTransition? > `optional` **programTransition?**: [`ProgramTransition`](ProgramTransition.md) *** ### sequence > **sequence**: `number` *** ### signatures > **signatures**: `Record`\<[`partyId`](../type-aliases/partyId.md), [`ChannelSignature`](../type-aliases/ChannelSignature.md)\> *** ### signingIndices > **signingIndices**: `Record`\<[`partyId`](../type-aliases/partyId.md), `SigningIndices`\> *** ### stateVariables > **stateVariables**: [`StateValue`](StateValue.md)[] *** ### transactionHex > **transactionHex**: `string` --- ## Page: SignedClosePackage URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/SignedClosePackage [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / SignedClosePackage # Interface: SignedClosePackage ## Properties ### channelId > **channelId**: `string` *** ### sequence > **sequence**: `number` *** ### settlement > **settlement**: [`ClosePackageArtifact`](ClosePackageArtifact.md) *** ### stateCommitmentV2 > **stateCommitmentV2**: `string` *** ### update > **update**: [`ClosePackageArtifact`](ClosePackageArtifact.md) *** ### version > **version**: `1` --- ## Page: StateValue URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/StateValue [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / StateValue # Interface: StateValue ## Properties ### port > **port**: `number` *** ### type > **type**: `"string"` \| `"number"` \| `"bool"` \| `"hex"` *** ### value > **value**: `string` \| `bigint` \| `boolean` --- ## Page: TxInputDraft URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/TxInputDraft [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / TxInputDraft # Interface: TxInputDraft ## Properties ### address > **address**: `string` *** ### amount > **amount**: `bigint` *** ### coinId > **coinId**: `string` *** ### scriptHex > **scriptHex**: `string` *** ### tokenId > **tokenId**: `string` --- ## Page: TxOutputDraft URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/TxOutputDraft [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / TxOutputDraft # Interface: TxOutputDraft ## Properties ### address > **address**: `string` *** ### amount > **amount**: `bigint` *** ### stateVariables > **stateVariables**: [`StateValue`](StateValue.md)[] *** ### storeState > **storeState**: `boolean` *** ### tokenId > **tokenId**: `string` --- ## Page: UnilateralCloseFinalizeResult URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/UnilateralCloseFinalizeResult [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / UnilateralCloseFinalizeResult # Interface: UnilateralCloseFinalizeResult ## Properties ### channel > **channel**: [`OmniaChannel`](OmniaChannel.md) *** ### settlementPayload > **settlementPayload**: [`SettlementPayload`](SettlementPayload.md) --- ## Page: UnilateralCloseStartResult URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/UnilateralCloseStartResult [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / UnilateralCloseStartResult # Interface: UnilateralCloseStartResult ## Properties ### channel > **channel**: [`OmniaChannel`](OmniaChannel.md) *** ### contestDeadlineBlock > **contestDeadlineBlock**: `number` *** ### contestStartBlock > **contestStartBlock**: `number` *** ### disputePayload > **disputePayload**: [`DisputePayload`](DisputePayload.md) *** ### updateTxpowId? > `optional` **updateTxpowId?**: `string` --- ## Page: UpdateDelta URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/UpdateDelta [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / UpdateDelta # Interface: UpdateDelta ## Properties ### memo? > `optional` **memo?**: `string` *** ### newBalances > **newBalances**: `Record`\<[`partyId`](../type-aliases/partyId.md), `bigint`\> *** ### programTransition? > `optional` **programTransition?**: [`ProgramTransition`](ProgramTransition.md) --- ## Page: UpdateStateResult URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/UpdateStateResult [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / UpdateStateResult # Interface: UpdateStateResult Return type of `updateState`. Normal case: `{ channel, signedState }`. Near-exhaustion case (≥95% of 4096 WOTS slots used): `{ channel, signedState, error: 'CAPACITY_NEAR_EXHAUSTION' }`. At 100% `updateState` throws `ChannelCapacityError` instead. The `channel` field is always present to allow callers to inspect the unchanged channel object even when the update was blocked. ## Properties ### channel > **channel**: [`OmniaChannel`](OmniaChannel.md) *** ### error? > `optional` **error?**: `"CAPACITY_NEAR_EXHAUSTION"` *** ### signedState > **signedState**: `Partial`\<[`SignedChannelState`](SignedChannelState.md)\> --- ## Page: VerifyStateOptions URL: https://docs.totem.ing/api/totemsdk-omnia/interfaces/VerifyStateOptions [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / VerifyStateOptions # Interface: VerifyStateOptions ## Properties ### kissvm? > `optional` **kissvm?**: `boolean` \| [`KissvmValidationOptions`](KissvmValidationOptions.md) --- ## Page: CapacityWarning URL: https://docs.totem.ing/api/totemsdk-omnia/type-aliases/CapacityWarning [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / CapacityWarning # Type Alias: CapacityWarning > **CapacityWarning** = `"approaching"` \| `"critical"` --- ## Page: ChannelSignature URL: https://docs.totem.ing/api/totemsdk-omnia/type-aliases/ChannelSignature [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / ChannelSignature # Type Alias: ChannelSignature > **ChannelSignature** = `Uint8Array` Flat WOTS signature bytes — output of wotsSign(). --- ## Page: ChannelStatus URL: https://docs.totem.ing/api/totemsdk-omnia/type-aliases/ChannelStatus [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / ChannelStatus # Type Alias: ChannelStatus > **ChannelStatus** = `"opening"` \| `"funding_pending"` \| `"active"` \| `"closing_mutual"` \| `"closing_unilateral"` \| `"disputing"` \| `"closed"` \| `"spliced"` --- ## Page: ChannelStore URL: https://docs.totem.ing/api/totemsdk-omnia/type-aliases/ChannelStore [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / ChannelStore # Type Alias: ChannelStore > **ChannelStore** = `Map`\<`string`, [`OmniaChannel`](../interfaces/OmniaChannel.md)\> --- ## Page: MinimalChainProvider URL: https://docs.totem.ing/api/totemsdk-omnia/type-aliases/MinimalChainProvider [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / MinimalChainProvider # Type Alias: MinimalChainProvider > **MinimalChainProvider** = `any` --- ## Page: OmniaMessageType URL: https://docs.totem.ing/api/totemsdk-omnia/type-aliases/OmniaMessageType [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / OmniaMessageType # Type Alias: OmniaMessageType > **OmniaMessageType** = `"CHANNEL_PROPOSAL"` \| `"STATE_UPDATE"` \| `"SETTLEMENT_PROPOSAL"` \| `"ACK"` \| `"ERROR"` Messaging protocol types for Omnia P2P transport layer. These types are used by framing.ts, stream.ts, peer.ts, swarm.ts, relay.ts, and integration.ts. They are exported from omnia's main index.ts for external consumers (e.g. @totemsdk/omnia-router, @totemsdk/omnia-factory). IDuplexStream is kept as an internal private type (not exported from index.ts) for backward compatibility with relay.ts's RelayBackedStream. --- ## Page: RelayConfig URL: https://docs.totem.ing/api/totemsdk-omnia/type-aliases/RelayConfig [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / RelayConfig # Type Alias: RelayConfig > **RelayConfig** = \{ `mode`: `"native"`; \} \| \{ `apiKey`: `string`; `endpoint?`: `string`; `mode`: `"hosted"`; \} \| \{ `mode`: `"self-hosted"`; `relayUrl`: `string`; \} --- ## Page: Unsubscribe URL: https://docs.totem.ing/api/totemsdk-omnia/type-aliases/Unsubscribe [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / Unsubscribe # Type Alias: Unsubscribe > **Unsubscribe** = () => `void` ## Returns `void` --- ## Page: WotsLeaseProviderLike URL: https://docs.totem.ing/api/totemsdk-omnia/type-aliases/WotsLeaseProviderLike [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / WotsLeaseProviderLike # Type Alias: WotsLeaseProviderLike > **WotsLeaseProviderLike** = `any` --- ## Page: partyId URL: https://docs.totem.ing/api/totemsdk-omnia/type-aliases/partyId [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / partyId # Type Alias: partyId > **partyId** = `string` --- ## Page: ASSET_HOLDER_A_BALANCE_PORT URL: https://docs.totem.ing/api/totemsdk-omnia/variables/ASSET_HOLDER_A_BALANCE_PORT [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / ASSET\_HOLDER\_A\_BALANCE\_PORT # Variable: ASSET\_HOLDER\_A\_BALANCE\_PORT > `const` **ASSET\_HOLDER\_A\_BALANCE\_PORT**: `181` = `181` --- ## Page: ASSET_HOLDER_B_BALANCE_PORT URL: https://docs.totem.ing/api/totemsdk-omnia/variables/ASSET_HOLDER_B_BALANCE_PORT [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / ASSET\_HOLDER\_B\_BALANCE\_PORT # Variable: ASSET\_HOLDER\_B\_BALANCE\_PORT > `const` **ASSET\_HOLDER\_B\_BALANCE\_PORT**: `182` = `182` --- ## Page: ASSET_PROGRAM_ID URL: https://docs.totem.ing/api/totemsdk-omnia/variables/ASSET_PROGRAM_ID [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / ASSET\_PROGRAM\_ID # Variable: ASSET\_PROGRAM\_ID > `const` **ASSET\_PROGRAM\_ID**: `"asset"` = `'asset'` --- ## Page: ASSET_TOKEN_ID_PORT URL: https://docs.totem.ing/api/totemsdk-omnia/variables/ASSET_TOKEN_ID_PORT [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / ASSET\_TOKEN\_ID\_PORT # Variable: ASSET\_TOKEN\_ID\_PORT > `const` **ASSET\_TOKEN\_ID\_PORT**: `180` = `180` --- ## Page: ASSET_TOTAL_PORT URL: https://docs.totem.ing/api/totemsdk-omnia/variables/ASSET_TOTAL_PORT [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / ASSET\_TOTAL\_PORT # Variable: ASSET\_TOTAL\_PORT > `const` **ASSET\_TOTAL\_PORT**: `183` = `183` --- ## Page: AssetProgram URL: https://docs.totem.ing/api/totemsdk-omnia/variables/AssetProgram [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / AssetProgram # Variable: AssetProgram > `const` **AssetProgram**: [`ChannelProgram`](../interfaces/ChannelProgram.md) --- ## Page: CAPACITY_NEAR_EXHAUSTION URL: https://docs.totem.ing/api/totemsdk-omnia/variables/CAPACITY_NEAR_EXHAUSTION [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / CAPACITY\_NEAR\_EXHAUSTION # Variable: CAPACITY\_NEAR\_EXHAUSTION > `const` **CAPACITY\_NEAR\_EXHAUSTION**: `number` --- ## Page: CAPACITY_WARNING_APPROACHING URL: https://docs.totem.ing/api/totemsdk-omnia/variables/CAPACITY_WARNING_APPROACHING [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / CAPACITY\_WARNING\_APPROACHING # Variable: CAPACITY\_WARNING\_APPROACHING > `const` **CAPACITY\_WARNING\_APPROACHING**: `number` --- ## Page: CAPACITY_WARNING_CRITICAL URL: https://docs.totem.ing/api/totemsdk-omnia/variables/CAPACITY_WARNING_CRITICAL [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / CAPACITY\_WARNING\_CRITICAL # Variable: CAPACITY\_WARNING\_CRITICAL > `const` **CAPACITY\_WARNING\_CRITICAL**: `number` --- ## Page: COINID_ELTOO URL: https://docs.totem.ing/api/totemsdk-omnia/variables/COINID_ELTOO [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / COINID\_ELTOO # Variable: COINID\_ELTOO > `const` **COINID\_ELTOO**: `"0x01"` = `'0x01'` --- ## Page: COINID_OUTPUT URL: https://docs.totem.ing/api/totemsdk-omnia/variables/COINID_OUTPUT [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / COINID\_OUTPUT # Variable: COINID\_OUTPUT > `const` **COINID\_OUTPUT**: `"0x00"` = `'0x00'` --- ## Page: COUNTER_ACTION_DECREMENT URL: https://docs.totem.ing/api/totemsdk-omnia/variables/COUNTER_ACTION_DECREMENT [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / COUNTER\_ACTION\_DECREMENT # Variable: COUNTER\_ACTION\_DECREMENT > `const` **COUNTER\_ACTION\_DECREMENT**: `2n` = `2n` --- ## Page: COUNTER_ACTION_INCREMENT URL: https://docs.totem.ing/api/totemsdk-omnia/variables/COUNTER_ACTION_INCREMENT [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / COUNTER\_ACTION\_INCREMENT # Variable: COUNTER\_ACTION\_INCREMENT > `const` **COUNTER\_ACTION\_INCREMENT**: `1n` = `1n` --- ## Page: COUNTER_ACTION_NONE URL: https://docs.totem.ing/api/totemsdk-omnia/variables/COUNTER_ACTION_NONE [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / COUNTER\_ACTION\_NONE # Variable: COUNTER\_ACTION\_NONE > `const` **COUNTER\_ACTION\_NONE**: `0n` = `0n` --- ## Page: COUNTER_ACTION_PORT URL: https://docs.totem.ing/api/totemsdk-omnia/variables/COUNTER_ACTION_PORT [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / COUNTER\_ACTION\_PORT # Variable: COUNTER\_ACTION\_PORT > `const` **COUNTER\_ACTION\_PORT**: `121` = `121` --- ## Page: COUNTER_ACTION_SET URL: https://docs.totem.ing/api/totemsdk-omnia/variables/COUNTER_ACTION_SET [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / COUNTER\_ACTION\_SET # Variable: COUNTER\_ACTION\_SET > `const` **COUNTER\_ACTION\_SET**: `3n` = `3n` --- ## Page: COUNTER_OPERAND_PORT URL: https://docs.totem.ing/api/totemsdk-omnia/variables/COUNTER_OPERAND_PORT [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / COUNTER\_OPERAND\_PORT # Variable: COUNTER\_OPERAND\_PORT > `const` **COUNTER\_OPERAND\_PORT**: `122` = `122` --- ## Page: COUNTER_PROGRAM_ID URL: https://docs.totem.ing/api/totemsdk-omnia/variables/COUNTER_PROGRAM_ID [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / COUNTER\_PROGRAM\_ID # Variable: COUNTER\_PROGRAM\_ID > `const` **COUNTER\_PROGRAM\_ID**: `"counter"` = `'counter'` --- ## Page: COUNTER_STATE_PORT URL: https://docs.totem.ing/api/totemsdk-omnia/variables/COUNTER_STATE_PORT [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / COUNTER\_STATE\_PORT # Variable: COUNTER\_STATE\_PORT > `const` **COUNTER\_STATE\_PORT**: `120` = `120` --- ## Page: CounterProgram URL: https://docs.totem.ing/api/totemsdk-omnia/variables/CounterProgram [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / CounterProgram # Variable: CounterProgram > `const` **CounterProgram**: [`ChannelProgram`](../interfaces/ChannelProgram.md) --- ## Page: DefaultEltooPaymentProgram URL: https://docs.totem.ing/api/totemsdk-omnia/variables/DefaultEltooPaymentProgram [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / DefaultEltooPaymentProgram # Variable: DefaultEltooPaymentProgram > `const` **DefaultEltooPaymentProgram**: [`ChannelProgram`](../interfaces/ChannelProgram.md) --- ## Page: ELTOO_CONTEST_DELAY_BLOCKS URL: https://docs.totem.ing/api/totemsdk-omnia/variables/ELTOO_CONTEST_DELAY_BLOCKS [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / ELTOO\_CONTEST\_DELAY\_BLOCKS # Variable: ELTOO\_CONTEST\_DELAY\_BLOCKS > `const` **ELTOO\_CONTEST\_DELAY\_BLOCKS**: `256` = `256` --- ## Page: ELTOO_PAYMENT_PROGRAM_ID URL: https://docs.totem.ing/api/totemsdk-omnia/variables/ELTOO_PAYMENT_PROGRAM_ID [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / ELTOO\_PAYMENT\_PROGRAM\_ID # Variable: ELTOO\_PAYMENT\_PROGRAM\_ID > `const` **ELTOO\_PAYMENT\_PROGRAM\_ID**: `"eltoo-payment"` = `'eltoo-payment'` --- ## Page: HTLCPaymentProgram URL: https://docs.totem.ing/api/totemsdk-omnia/variables/HTLCPaymentProgram [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / HTLCPaymentProgram # Variable: HTLCPaymentProgram > `const` **HTLCPaymentProgram**: [`ChannelProgram`](../interfaces/ChannelProgram.md) --- ## Page: HTLC_CLAIMED_PORT URL: https://docs.totem.ing/api/totemsdk-omnia/variables/HTLC_CLAIMED_PORT [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / HTLC\_CLAIMED\_PORT # Variable: HTLC\_CLAIMED\_PORT > `const` **HTLC\_CLAIMED\_PORT**: `143` = `143` --- ## Page: HTLC_FEE_PROOF_DOMAIN URL: https://docs.totem.ing/api/totemsdk-omnia/variables/HTLC_FEE_PROOF_DOMAIN [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / HTLC\_FEE\_PROOF\_DOMAIN # Variable: HTLC\_FEE\_PROOF\_DOMAIN > `const` **HTLC\_FEE\_PROOF\_DOMAIN**: `"totemsdk/omnia/htlc-fulfillment/v1"` = `'totemsdk/omnia/htlc-fulfillment/v1'` --- ## Page: HTLC_HASHLOCK_PORT URL: https://docs.totem.ing/api/totemsdk-omnia/variables/HTLC_HASHLOCK_PORT [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / HTLC\_HASHLOCK\_PORT # Variable: HTLC\_HASHLOCK\_PORT > `const` **HTLC\_HASHLOCK\_PORT**: `140` = `140` --- ## Page: HTLC_LOCKED_AMOUNT_PORT URL: https://docs.totem.ing/api/totemsdk-omnia/variables/HTLC_LOCKED_AMOUNT_PORT [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / HTLC\_LOCKED\_AMOUNT\_PORT # Variable: HTLC\_LOCKED\_AMOUNT\_PORT > `const` **HTLC\_LOCKED\_AMOUNT\_PORT**: `141` = `141` --- ## Page: HTLC_PREIMAGE_PORT URL: https://docs.totem.ing/api/totemsdk-omnia/variables/HTLC_PREIMAGE_PORT [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / HTLC\_PREIMAGE\_PORT # Variable: HTLC\_PREIMAGE\_PORT > `const` **HTLC\_PREIMAGE\_PORT**: `144` = `144` --- ## Page: HTLC_PROGRAM_ID URL: https://docs.totem.ing/api/totemsdk-omnia/variables/HTLC_PROGRAM_ID [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / HTLC\_PROGRAM\_ID # Variable: HTLC\_PROGRAM\_ID > `const` **HTLC\_PROGRAM\_ID**: `"htlc-payment"` = `'htlc-payment'` --- ## Page: HTLC_TIMEOUT_BLOCK_PORT URL: https://docs.totem.ing/api/totemsdk-omnia/variables/HTLC_TIMEOUT_BLOCK_PORT [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / HTLC\_TIMEOUT\_BLOCK\_PORT # Variable: HTLC\_TIMEOUT\_BLOCK\_PORT > `const` **HTLC\_TIMEOUT\_BLOCK\_PORT**: `142` = `142` --- ## Page: MEMBERSHIP_DIVIDEND_POOL_PORT URL: https://docs.totem.ing/api/totemsdk-omnia/variables/MEMBERSHIP_DIVIDEND_POOL_PORT [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / MEMBERSHIP\_DIVIDEND\_POOL\_PORT # Variable: MEMBERSHIP\_DIVIDEND\_POOL\_PORT > `const` **MEMBERSHIP\_DIVIDEND\_POOL\_PORT**: `171` = `171` --- ## Page: MEMBERSHIP_MEMBER_ROOT_PORT URL: https://docs.totem.ing/api/totemsdk-omnia/variables/MEMBERSHIP_MEMBER_ROOT_PORT [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / MEMBERSHIP\_MEMBER\_ROOT\_PORT # Variable: MEMBERSHIP\_MEMBER\_ROOT\_PORT > `const` **MEMBERSHIP\_MEMBER\_ROOT\_PORT**: `170` = `170` --- ## Page: MEMBERSHIP_PAYOUT_SEQUENCE_PORT URL: https://docs.totem.ing/api/totemsdk-omnia/variables/MEMBERSHIP_PAYOUT_SEQUENCE_PORT [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / MEMBERSHIP\_PAYOUT\_SEQUENCE\_PORT # Variable: MEMBERSHIP\_PAYOUT\_SEQUENCE\_PORT > `const` **MEMBERSHIP\_PAYOUT\_SEQUENCE\_PORT**: `172` = `172` --- ## Page: MEMBERSHIP_PROGRAM_ID URL: https://docs.totem.ing/api/totemsdk-omnia/variables/MEMBERSHIP_PROGRAM_ID [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / MEMBERSHIP\_PROGRAM\_ID # Variable: MEMBERSHIP\_PROGRAM\_ID > `const` **MEMBERSHIP\_PROGRAM\_ID**: `"membership"` = `'membership'` --- ## Page: METER_PAYMENT_PORT URL: https://docs.totem.ing/api/totemsdk-omnia/variables/METER_PAYMENT_PORT [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / METER\_PAYMENT\_PORT # Variable: METER\_PAYMENT\_PORT > `const` **METER\_PAYMENT\_PORT**: `133` = `133` --- ## Page: METER_PROGRAM_ID URL: https://docs.totem.ing/api/totemsdk-omnia/variables/METER_PROGRAM_ID [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / METER\_PROGRAM\_ID # Variable: METER\_PROGRAM\_ID > `const` **METER\_PROGRAM\_ID**: `"meter"` = `'meter'` --- ## Page: METER_READING_PORT URL: https://docs.totem.ing/api/totemsdk-omnia/variables/METER_READING_PORT [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / METER\_READING\_PORT # Variable: METER\_READING\_PORT > `const` **METER\_READING\_PORT**: `130` = `130` --- ## Page: METER_UNIT_PRICE_PORT URL: https://docs.totem.ing/api/totemsdk-omnia/variables/METER_UNIT_PRICE_PORT [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / METER\_UNIT\_PRICE\_PORT # Variable: METER\_UNIT\_PRICE\_PORT > `const` **METER\_UNIT\_PRICE\_PORT**: `132` = `132` --- ## Page: METER_USAGE_DELTA_PORT URL: https://docs.totem.ing/api/totemsdk-omnia/variables/METER_USAGE_DELTA_PORT [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / METER\_USAGE\_DELTA\_PORT # Variable: METER\_USAGE\_DELTA\_PORT > `const` **METER\_USAGE\_DELTA\_PORT**: `131` = `131` --- ## Page: MembershipProgram URL: https://docs.totem.ing/api/totemsdk-omnia/variables/MembershipProgram [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / MembershipProgram # Variable: MembershipProgram > `const` **MembershipProgram**: [`ChannelProgram`](../interfaces/ChannelProgram.md) --- ## Page: MeterProgram URL: https://docs.totem.ing/api/totemsdk-omnia/variables/MeterProgram [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / MeterProgram # Variable: MeterProgram > `const` **MeterProgram**: [`ChannelProgram`](../interfaces/ChannelProgram.md) --- ## Page: PROGRAM_STATE_PORT_MIN URL: https://docs.totem.ing/api/totemsdk-omnia/variables/PROGRAM_STATE_PORT_MIN [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / PROGRAM\_STATE\_PORT\_MIN # Variable: PROGRAM\_STATE\_PORT\_MIN > `const` **PROGRAM\_STATE\_PORT\_MIN**: `120` = `120` --- ## Page: REGISTRY_ROOT_ACTION URL: https://docs.totem.ing/api/totemsdk-omnia/variables/REGISTRY_ROOT_ACTION [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / REGISTRY\_ROOT\_ACTION # Variable: REGISTRY\_ROOT\_ACTION > `const` **REGISTRY\_ROOT\_ACTION**: `"registry_root"` = `'registry_root'` --- ## Page: STATE_COMMITMENT_V2_PORT URL: https://docs.totem.ing/api/totemsdk-omnia/variables/STATE_COMMITMENT_V2_PORT [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / STATE\_COMMITMENT\_V2\_PORT # Variable: STATE\_COMMITMENT\_V2\_PORT > `const` **STATE\_COMMITMENT\_V2\_PORT**: `102` = `102` --- ## Page: STATE_SEQUENCE_PORT URL: https://docs.totem.ing/api/totemsdk-omnia/variables/STATE_SEQUENCE_PORT [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / STATE\_SEQUENCE\_PORT # Variable: STATE\_SEQUENCE\_PORT > `const` **STATE\_SEQUENCE\_PORT**: `101` = `101` --- ## Page: STATE_SETTLEMENT_PORT URL: https://docs.totem.ing/api/totemsdk-omnia/variables/STATE_SETTLEMENT_PORT [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / STATE\_SETTLEMENT\_PORT # Variable: STATE\_SETTLEMENT\_PORT > `const` **STATE\_SETTLEMENT\_PORT**: `100` = `100` --- ## Page: TREASURY_MEMBERSHIP_SNAPSHOT_HASH_PORT URL: https://docs.totem.ing/api/totemsdk-omnia/variables/TREASURY_MEMBERSHIP_SNAPSHOT_HASH_PORT [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / TREASURY\_MEMBERSHIP\_SNAPSHOT\_HASH\_PORT # Variable: TREASURY\_MEMBERSHIP\_SNAPSHOT\_HASH\_PORT > `const` **TREASURY\_MEMBERSHIP\_SNAPSHOT\_HASH\_PORT**: `160` = `160` --- ## Page: TREASURY_OUTCOME_PROOF_ID_PORT URL: https://docs.totem.ing/api/totemsdk-omnia/variables/TREASURY_OUTCOME_PROOF_ID_PORT [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / TREASURY\_OUTCOME\_PROOF\_ID\_PORT # Variable: TREASURY\_OUTCOME\_PROOF\_ID\_PORT > `const` **TREASURY\_OUTCOME\_PROOF\_ID\_PORT**: `164` = `164` --- ## Page: TREASURY_PROGRAM_ID URL: https://docs.totem.ing/api/totemsdk-omnia/variables/TREASURY_PROGRAM_ID [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / TREASURY\_PROGRAM\_ID # Variable: TREASURY\_PROGRAM\_ID > `const` **TREASURY\_PROGRAM\_ID**: `"treasury"` = `'treasury'` --- ## Page: TREASURY_SPEND_CAP_PORT URL: https://docs.totem.ing/api/totemsdk-omnia/variables/TREASURY_SPEND_CAP_PORT [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / TREASURY\_SPEND\_CAP\_PORT # Variable: TREASURY\_SPEND\_CAP\_PORT > `const` **TREASURY\_SPEND\_CAP\_PORT**: `162` = `162` --- ## Page: TREASURY_SPENT_PORT URL: https://docs.totem.ing/api/totemsdk-omnia/variables/TREASURY_SPENT_PORT [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / TREASURY\_SPENT\_PORT # Variable: TREASURY\_SPENT\_PORT > `const` **TREASURY\_SPENT\_PORT**: `163` = `163` --- ## Page: TREASURY_VOTE_TALLY_HASH_PORT URL: https://docs.totem.ing/api/totemsdk-omnia/variables/TREASURY_VOTE_TALLY_HASH_PORT [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / TREASURY\_VOTE\_TALLY\_HASH\_PORT # Variable: TREASURY\_VOTE\_TALLY\_HASH\_PORT > `const` **TREASURY\_VOTE\_TALLY\_HASH\_PORT**: `161` = `161` --- ## Page: TreasuryProgram URL: https://docs.totem.ing/api/totemsdk-omnia/variables/TreasuryProgram [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / TreasuryProgram # Variable: TreasuryProgram > `const` **TreasuryProgram**: [`ChannelProgram`](../interfaces/ChannelProgram.md) --- ## Page: VAULT_LOCKED_VALUE_PORT URL: https://docs.totem.ing/api/totemsdk-omnia/variables/VAULT_LOCKED_VALUE_PORT [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / VAULT\_LOCKED\_VALUE\_PORT # Variable: VAULT\_LOCKED\_VALUE\_PORT > `const` **VAULT\_LOCKED\_VALUE\_PORT**: `150` = `150` --- ## Page: VAULT_PROGRAM_ID URL: https://docs.totem.ing/api/totemsdk-omnia/variables/VAULT_PROGRAM_ID [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / VAULT\_PROGRAM\_ID # Variable: VAULT\_PROGRAM\_ID > `const` **VAULT\_PROGRAM\_ID**: `"vault"` = `'vault'` --- ## Page: VAULT_RELEASE_SEQUENCE_PORT URL: https://docs.totem.ing/api/totemsdk-omnia/variables/VAULT_RELEASE_SEQUENCE_PORT [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / VAULT\_RELEASE\_SEQUENCE\_PORT # Variable: VAULT\_RELEASE\_SEQUENCE\_PORT > `const` **VAULT\_RELEASE\_SEQUENCE\_PORT**: `151` = `151` --- ## Page: VAULT_SWEPT_PORT URL: https://docs.totem.ing/api/totemsdk-omnia/variables/VAULT_SWEPT_PORT [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / VAULT\_SWEPT\_PORT # Variable: VAULT\_SWEPT\_PORT > `const` **VAULT\_SWEPT\_PORT**: `152` = `152` --- ## Page: VaultProgram URL: https://docs.totem.ing/api/totemsdk-omnia/variables/VaultProgram [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / VaultProgram # Variable: VaultProgram > `const` **VaultProgram**: [`ChannelProgram`](../interfaces/ChannelProgram.md) --- ## Page: WOTS_CAPACITY_TOTAL URL: https://docs.totem.ing/api/totemsdk-omnia/variables/WOTS_CAPACITY_TOTAL [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / WOTS\_CAPACITY\_TOTAL # Variable: WOTS\_CAPACITY\_TOTAL > `const` **WOTS\_CAPACITY\_TOTAL**: `4096` = `4096` --- ## Page: computeLegacyTxDraftDigest URL: https://docs.totem.ing/api/totemsdk-omnia/variables/computeLegacyTxDraftDigest [**@totemsdk/omnia**](../index.md) *** [@totemsdk/omnia](../index.md) / computeLegacyTxDraftDigest # Variable: computeLegacyTxDraftDigest > `const` **computeLegacyTxDraftDigest**: (`draft`) => `Uint8Array` = `computeTxDraftDigest` Legacy/test-only JSON draft digest. Production signatures must use computeOmniaTxDigest(). ## Parameters ### draft [`OmniaTxDraft`](../interfaces/OmniaTxDraft.md) ## Returns `Uint8Array` --- ## Page: acceptFactory URL: https://docs.totem.ing/api/totemsdk-omnia-factory/functions/acceptFactory [**@totemsdk/omnia-factory**](../index.md) *** [@totemsdk/omnia-factory](../index.md) / acceptFactory # Function: acceptFactory() > **acceptFactory**(`factory`, `bundle`): `Promise`\<[`ChannelFactory`](../interfaces/ChannelFactory.md)\> Counterparty co-signs the factory proposal. Each non-proposing participant calls this once. When ALL N parties have signed (proposer via `createFactory` + N-1 counterparties via `acceptFactory`), the factory transitions from `'opening'` to `'active'`. Uses the full WOTS lease cycle: reserve → sign → verify → commit. ## Parameters ### factory [`ChannelFactory`](../interfaces/ChannelFactory.md) Factory in `'opening'` status returned by `createFactory`. ### bundle [`WotsLeaseBundle`](../interfaces/WotsLeaseBundle.md) ## Returns `Promise`\<[`ChannelFactory`](../interfaces/ChannelFactory.md)\> --- ## Page: buildAndHashFactoryScript URL: https://docs.totem.ing/api/totemsdk-omnia-factory/functions/buildAndHashFactoryScript [**@totemsdk/omnia-factory**](../index.md) *** [@totemsdk/omnia-factory](../index.md) / buildAndHashFactoryScript # Function: buildAndHashFactoryScript() > **buildAndHashFactoryScript**(`participants`): `object` Build the factory script and compute its canonical address in one step. The address is used as the output address of the factory funding TX. ## Parameters ### participants [`FactoryParticipant`](../interfaces/FactoryParticipant.md)[] ## Returns `object` ### address > **address**: `string` ### script > **script**: `string` --- ## Page: buildDisputePayload URL: https://docs.totem.ing/api/totemsdk-omnia-factory/functions/buildDisputePayload [**@totemsdk/omnia-factory**](../index.md) *** [@totemsdk/omnia-factory](../index.md) / buildDisputePayload # Function: buildDisputePayload() > **buildDisputePayload**(`factory`, `evidence`): [`FactoryDisputePayload`](../interfaces/FactoryDisputePayload.md) Build a unilateral factory close (dispute) payload. Includes the full `stateLog` (with monotonically increasing `sequence` entries) for on-chain or arbitration verification. Virtual channels still open at dispute time are included by ID so the dispute resolver can adjudicate their balances independently. ## Parameters ### factory [`ChannelFactory`](../interfaces/ChannelFactory.md) ### evidence `string` ## Returns [`FactoryDisputePayload`](../interfaces/FactoryDisputePayload.md) --- ## Page: buildFactoryScript URL: https://docs.totem.ing/api/totemsdk-omnia-factory/functions/buildFactoryScript [**@totemsdk/omnia-factory**](../index.md) *** [@totemsdk/omnia-factory](../index.md) / buildFactoryScript # Function: buildFactoryScript() > **buildFactoryScript**(`participants`): `string` Build the N-of-N MULTISIG MAST funding script for a channel factory. Spending rules: - Any cooperative close (SETTLEMENT=true): all N parties sign, spend after minimal coinage (1 block) so the factory can be closed immediately after a confirmed update. - Non-settlement path: all N parties must still sign (ASSERT MULTISIG(N ...)) but can spend in the same block (no coinage requirement) — used for future optimistic factory updates if desired. `storestate=true` is achieved by encoding STATE(100) in the output state variables of every factory TX. Minimum 2 participants required. ## Parameters ### participants [`FactoryParticipant`](../interfaces/FactoryParticipant.md)[] ## Returns `string` --- ## Page: closeFactory URL: https://docs.totem.ing/api/totemsdk-omnia-factory/functions/closeFactory [**@totemsdk/omnia-factory**](../index.md) *** [@totemsdk/omnia-factory](../index.md) / closeFactory # Function: closeFactory() > **closeFactory**(`factory`, `leaseProviders`, `chainProvider?`): `Promise`\<[`FactorySettlementPayload`](../interfaces/FactorySettlementPayload.md)\> Cooperative N-of-N factory close. Flow: 1. Fail fast if `factory.fundingCoinId` is not set — settlement TX requires a concrete input coin. 2. Build the settlement OmniaTxDraft (N outputs, one per participant with a positive allocation) spending the factory's N-of-N MULTISIG input. 3. Compute the TX draft digest via `computeTxDraftDigest` from `@totemsdk/omnia`. 4. Collect N-of-N signatures — all participants sign + verify the TX digest via the full WOTS lease cycle (reserve → sign → verify → commit). 5. Encode the concatenated WOTS signatures as the settlement TX witness. 6. When `chainProvider` is supplied: mine via `@totemsdk/txpow`'s `mineTxPoW`, assemble the full TxPoW blob, and broadcast. ## Parameters ### factory [`ChannelFactory`](../interfaces/ChannelFactory.md) Active factory with no open virtual channels. ### leaseProviders `Record`\<`string`, [`WotsLeaseBundle`](../interfaces/WotsLeaseBundle.md)\> WOTS lease bundles for ALL N factory participants. ### chainProvider? `ChainStateProvider` Optional: mine + broadcast the settlement TX. ## Returns `Promise`\<[`FactorySettlementPayload`](../interfaces/FactorySettlementPayload.md)\> --- ## Page: closeVirtualChannel URL: https://docs.totem.ing/api/totemsdk-omnia-factory/functions/closeVirtualChannel [**@totemsdk/omnia-factory**](../index.md) *** [@totemsdk/omnia-factory](../index.md) / closeVirtualChannel # Function: closeVirtualChannel() > **closeVirtualChannel**(`factory`, `channel`, `leaseProviders`): `Promise`\<[`ChannelFactory`](../interfaces/ChannelFactory.md)\> Close a virtual channel and return its final balances to factory allocations. ALL N factory participants must agree (N-of-N WOTS signature collection). The commitment is bound to `currentSequence + 1`. Final balances are taken from `channel.latestState.balances` (the last agreed off-chain state from `@totemsdk/omnia`'s state machine) or fall back to `channel.balances` (the initial opening split) if no state updates have occurred. No on-chain TX is needed: the factory's shared UTXO remains intact. ## Parameters ### factory [`ChannelFactory`](../interfaces/ChannelFactory.md) Active factory. ### channel [`OmniaChannel`](../interfaces/OmniaChannel.md) The virtual `OmniaChannel` to close (with `latestState` set if updated). ### leaseProviders `Record`\<`string`, [`WotsLeaseBundle`](../interfaces/WotsLeaseBundle.md)\> WOTS lease bundles for ALL N factory participants. ## Returns `Promise`\<[`ChannelFactory`](../interfaces/ChannelFactory.md)\> --- ## Page: computeFactoryStateCommitment URL: https://docs.totem.ing/api/totemsdk-omnia-factory/functions/computeFactoryStateCommitment [**@totemsdk/omnia-factory**](../index.md) *** [@totemsdk/omnia-factory](../index.md) / computeFactoryStateCommitment # Function: computeFactoryStateCommitment() > **computeFactoryStateCommitment**(`factoryId`, `sequence`, `pendingAllocations`, `virtualChannelIds`): `Uint8Array` Compute the canonical 32-byte state commitment for N-of-N factory signing. Covers: - factoryId (factory context isolation) - sequence (monotonicity; prevents replay of old state) - pendingAllocations (the proposed allocation split being signed) - virtualChannelIds (list of currently open VCs; prevents forgery of VC state) All fields are sorted lexicographically for determinism regardless of the order in which keys appear in the caller's objects. This commitment is what every party signs via `FactorySignerOps.sign`, and what `FactorySignerOps.verify` checks against each stored signature. ## Parameters ### factoryId `string` ### sequence `number` ### pendingAllocations `Record`\<`string`, `bigint`\> ### virtualChannelIds `string`[] ## Returns `Uint8Array` --- ## Page: createDurableFactoryStore URL: https://docs.totem.ing/api/totemsdk-omnia-factory/functions/createDurableFactoryStore [**@totemsdk/omnia-factory**](../index.md) *** [@totemsdk/omnia-factory](../index.md) / createDurableFactoryStore # Function: createDurableFactoryStore() > **createDurableFactoryStore**(`adapter`, `options?`): [`DurableFactoryStore`](../interfaces/DurableFactoryStore.md) ## Parameters ### adapter `StorageAdapterWithCapabilities` & `CasStore` ### options? [`DurableFactoryStoreOptions`](../interfaces/DurableFactoryStoreOptions.md) = `{}` ## Returns [`DurableFactoryStore`](../interfaces/DurableFactoryStore.md) --- ## Page: createFactory URL: https://docs.totem.ing/api/totemsdk-omnia-factory/functions/createFactory [**@totemsdk/omnia-factory**](../index.md) *** [@totemsdk/omnia-factory](../index.md) / createFactory # Function: createFactory() > **createFactory**(`participants`, `tokenId`, `bundle`, `chainProvider?`, `tokenScale?`): `Promise`\<[`ChannelFactory`](../interfaces/ChannelFactory.md)\> Create a factory proposal (proposer step). The calling party (`signer.publicKeyDigest` matches one of `participants`) signs the factory opening commitment via `leaseProvider`, performing the full WOTS reserve → sign → verify → commit cycle. When ALL participants supply `fundingCoinId` and `chainProvider` is given, the N-input → 1-output funding TX is built (via `@totemsdk/omnia`'s `buildFundingTx`), mined (via `@totemsdk/txpow`'s `mineTxPoW`), and broadcast. The TX draft digest is used as the factory opening commitment so that all parties are co-signing the EXACT on-chain TX structure. Without `fundingCoinId`s or `chainProvider`, the factory is in-memory only (useful for testing and off-chain simulation); the commitment falls back to the factory state commitment hash. The returned factory is in `'opening'` status. Every other participant must call `acceptFactory(factory, leaseProvider, signer)` before the factory transitions to `'active'`. ## Parameters ### participants [`FactoryParticipant`](../interfaces/FactoryParticipant.md)[] All N factory participants with their contribution amounts. ### tokenId `string` Token ID (e.g. `'0x00'` for native Minima). ### bundle [`WotsLeaseBundle`](../interfaces/WotsLeaseBundle.md) ### chainProvider? `ChainStateProvider` Optional: build + mine + broadcast the factory funding TX. ### tokenScale? `number` = `0` Token scale exponent (Minima `Token.mTokenScale`). Native Minima is 0; coloured coins use `tokenAmount = minimaRawAmount × 10^scale`. Defaults to 0. ## Returns `Promise`\<[`ChannelFactory`](../interfaces/ChannelFactory.md)\> --- ## Page: enforceConservation URL: https://docs.totem.ing/api/totemsdk-omnia-factory/functions/enforceConservation [**@totemsdk/omnia-factory**](../index.md) *** [@totemsdk/omnia-factory](../index.md) / enforceConservation # Function: enforceConservation() > **enforceConservation**(`factory`): `void` Enforce the factory's balance conservation invariant: sum(allocations) + sum(virtualChannel.totalValue) === totalValue Throws on violation. Called after every committed state transition. ## Parameters ### factory [`ChannelFactory`](../interfaces/ChannelFactory.md) ## Returns `void` --- ## Page: normalizeScript URL: https://docs.totem.ing/api/totemsdk-omnia-factory/functions/normalizeScript [**@totemsdk/omnia-factory**](../index.md) *** [@totemsdk/omnia-factory](../index.md) / normalizeScript # Function: normalizeScript() > **normalizeScript**(`script`): `string` ## Parameters ### script `string` ## Returns `string` --- ## Page: openVirtualChannel URL: https://docs.totem.ing/api/totemsdk-omnia-factory/functions/openVirtualChannel [**@totemsdk/omnia-factory**](../index.md) *** [@totemsdk/omnia-factory](../index.md) / openVirtualChannel # Function: openVirtualChannel() > **openVirtualChannel**(`factory`, `parties`, `amounts`, `leaseProviders`, `channelId?`): `Promise`\<\{ `channel`: [`OmniaChannel`](../interfaces/OmniaChannel.md); `factory`: [`ChannelFactory`](../interfaces/ChannelFactory.md); \}\> Open a virtual channel between two factory participants. ALL N factory participants must agree (N-of-N WOTS signature collection) before the virtual channel is committed and allocations deducted. This ensures the shared factory UTXO's off-chain state is consistent and dispute-provable. The commitment is bound to `currentSequence + 1` — the post-commit sequence — preventing replay of the same openVC commitment against a future factory state. The returned `OmniaChannel` has `channelType: 'virtual'` and `factoryRef` set. Its `fundingTxId`/`fundingCoinId` reference the factory's shared UTXO. It is ready for off-chain state updates via `@totemsdk/omnia` primitives (`updateState`, `addHTLC`, `signState`, etc.). ## Parameters ### factory [`ChannelFactory`](../interfaces/ChannelFactory.md) Active factory. ### parties \[`string`, `string`\] Tuple `[partyAId, partyBId]` of the two channel parties. ### amounts `Record`\<`string`, `bigint`\> Capacity per party: `Record`. ### leaseProviders `Record`\<`string`, [`WotsLeaseBundle`](../interfaces/WotsLeaseBundle.md)\> WOTS lease bundles for ALL N factory participants. ### channelId? `string` Optional explicit channel ID; auto-generated if omitted. ## Returns `Promise`\<\{ `channel`: [`OmniaChannel`](../interfaces/OmniaChannel.md); `factory`: [`ChannelFactory`](../interfaces/ChannelFactory.md); \}\> --- ## Page: reallocate URL: https://docs.totem.ing/api/totemsdk-omnia-factory/functions/reallocate [**@totemsdk/omnia-factory**](../index.md) *** [@totemsdk/omnia-factory](../index.md) / reallocate # Function: reallocate() > **reallocate**(`factory`, `fromPartyId`, `toPartyId`, `amount`, `leaseProviders`): `Promise`\<[`ChannelFactory`](../interfaces/ChannelFactory.md)\> Move factory allocation between two participants (atomic N-of-N). All N leaseProviders must be supplied; each party signs the new state commitment in turn. The state commits atomically — no intermediate "pending" object is returned. ## Parameters ### factory [`ChannelFactory`](../interfaces/ChannelFactory.md) Active factory. ### fromPartyId `string` Party giving up allocation. ### toPartyId `string` Party receiving allocation. ### amount `bigint` Amount to transfer (must be positive and within `fromPartyId`'s balance). ### leaseProviders `Record`\<`string`, [`WotsLeaseBundle`](../interfaces/WotsLeaseBundle.md)\> WOTS lease bundles for ALL N factory participants. ## Returns `Promise`\<[`ChannelFactory`](../interfaces/ChannelFactory.md)\> --- ## Page: scriptAddress URL: https://docs.totem.ing/api/totemsdk-omnia-factory/functions/scriptAddress [**@totemsdk/omnia-factory**](../index.md) *** [@totemsdk/omnia-factory](../index.md) / scriptAddress # Function: scriptAddress() > **scriptAddress**(`script`): `string` Compute the SHA3-256 script-hash address for a factory script. ## Parameters ### script `string` ## Returns `string` --- ## Page: ChannelFactory URL: https://docs.totem.ing/api/totemsdk-omnia-factory/interfaces/ChannelFactory [**@totemsdk/omnia-factory**](../index.md) *** [@totemsdk/omnia-factory](../index.md) / ChannelFactory # Interface: ChannelFactory ## Properties ### allocations > **allocations**: `Record`\<`string`, `bigint`\> Current committed allocations: sum must equal `totalValue − sum(vc.totalValue)`. *** ### currentSequence > **currentSequence**: `number` Monotonically increasing. Incremented on every committed state transition. *** ### factoryId > **factoryId**: `string` *** ### fundingAddress > **fundingAddress**: `string` Script address (SHA3-256 of normalised script). *** ### fundingCoinId? > `optional` **fundingCoinId?**: `string` CoinID of the factory's shared UTXO — required for settlement and dispute. *** ### fundingScript > **fundingScript**: `string` N-of-N MULTISIG KISSVM script for the factory's on-chain UTXO. *** ### fundingTxId? > `optional` **fundingTxId?**: `string` TxPoW ID of the factory funding TX (hex) — set after createFactory mines the TX. *** ### participants > **participants**: [`FactoryParticipant`](FactoryParticipant.md)[] *** ### pendingCommitment? > `optional` **pendingCommitment?**: `string` Hex-encoded commitment (TX draft digest or state hash) that all participants must sign during the current opening or signing round. Set by `createFactory`; cleared when the factory becomes 'active'. *** ### pendingSignatures > **pendingSignatures**: `Record`\<`string`, [`FactorySignature`](../type-aliases/FactorySignature.md)\> Partial signatures collected so far for the pending commitment. Keyed by `partyId`. Cleared when all N parties have signed. *** ### stateLog > **stateLog**: [`FactoryLogEntry`](FactoryLogEntry.md)[] *** ### status > **status**: [`FactoryStatus`](../type-aliases/FactoryStatus.md) *** ### tokenId > **tokenId**: `string` *** ### tokenScale > **tokenScale**: `number` Token scale exponent, matching Minima's `Token.mTokenScale`: `tokenAmount = minimaRawAmount × 10^scale`. Native Minima (tokenId `0x00`) has scale 0. Coloured coins use `MINIMA_MAX_DECIMAL_PLACES − scale` (44 − scale) decimal places. All factory amounts are held in scaled token units; TX builders convert to raw Minima via `toRawMinima()`. *** ### totalValue > **totalValue**: `bigint` *** ### virtualChannels > **virtualChannels**: [`OmniaChannel`](OmniaChannel.md)[] Currently open virtual channels backed by this factory's shared UTXO. --- ## Page: DurableFactoryStore URL: https://docs.totem.ing/api/totemsdk-omnia-factory/interfaces/DurableFactoryStore [**@totemsdk/omnia-factory**](../index.md) *** [@totemsdk/omnia-factory](../index.md) / DurableFactoryStore # Interface: DurableFactoryStore ## Methods ### getFactory() > **getFactory**(`factoryId`): `Promise`\<[`ChannelFactory`](ChannelFactory.md) \| `undefined`\> #### Parameters ##### factoryId `string` #### Returns `Promise`\<[`ChannelFactory`](ChannelFactory.md) \| `undefined`\> *** ### getRevision() > **getRevision**(): `Promise`\<`number`\> Current registry transition counter (0 before the first write). #### Returns `Promise`\<`number`\> *** ### getSnapshot() > **getSnapshot**(): `Promise`\<[`FactoryRegistryState`](FactoryRegistryState.md)\> Current persisted registry state. #### Returns `Promise`\<[`FactoryRegistryState`](FactoryRegistryState.md)\> *** ### hasState() > **hasState**(): `Promise`\<`boolean`\> True once any factory record has been persisted. #### Returns `Promise`\<`boolean`\> *** ### listFactories() > **listFactories**(): `Promise`\<[`ChannelFactory`](ChannelFactory.md)[]\> All factories known to the registry. #### Returns `Promise`\<[`ChannelFactory`](ChannelFactory.md)[]\> *** ### saveFactory() > **saveFactory**(`factory`): `Promise`\<`void`\> Persist a factory (create/accept/reallocate state transition). #### Parameters ##### factory [`ChannelFactory`](ChannelFactory.md) #### Returns `Promise`\<`void`\> --- ## Page: DurableFactoryStoreOptions URL: https://docs.totem.ing/api/totemsdk-omnia-factory/interfaces/DurableFactoryStoreOptions [**@totemsdk/omnia-factory**](../index.md) *** [@totemsdk/omnia-factory](../index.md) / DurableFactoryStoreOptions # Interface: DurableFactoryStoreOptions ## Properties ### namespace? > `readonly` `optional` **namespace?**: `string` Key namespace prefix; default `totem_omnia_factory:v1:`. *** ### requireAckMode? > `readonly` `optional` **requireAckMode?**: `"volatile"` \| `"buffered"` \| `"durably-acknowledged"` Required write acknowledgment; default `durably-acknowledged`. Pass `volatile` only for tests/scratch adapters (e.g. `MemoryStore`). --- ## Page: FactoryDisputePayload URL: https://docs.totem.ing/api/totemsdk-omnia-factory/interfaces/FactoryDisputePayload [**@totemsdk/omnia-factory**](../index.md) *** [@totemsdk/omnia-factory](../index.md) / FactoryDisputePayload # Interface: FactoryDisputePayload ## Properties ### allocations > **allocations**: `Record`\<`string`, `bigint`\> *** ### evidence > **evidence**: `string` *** ### factoryId > **factoryId**: `string` *** ### fundingTxId > **fundingTxId**: `string` *** ### latestSequence > **latestSequence**: `number` *** ### stateLog > **stateLog**: [`FactoryLogEntry`](FactoryLogEntry.md)[] *** ### virtualChannelIds > **virtualChannelIds**: `string`[] --- ## Page: FactoryLeaseOps URL: https://docs.totem.ing/api/totemsdk-omnia-factory/interfaces/FactoryLeaseOps [**@totemsdk/omnia-factory**](../index.md) *** [@totemsdk/omnia-factory](../index.md) / FactoryLeaseOps # Interface: FactoryLeaseOps Minimal lease operations required by the factory signing cycle. This is a structural subset of `WotsLeaseProvider` from `@totemsdk/wots-lease`. Any real `WotsLeaseProvider` satisfies this interface. In tests, only these three methods need to be mocked — no other watermark or sync methods required. ## Methods ### burnReservation() > **burnReservation**(`reservationId`, `reason`): `Promise`\<`void`\> #### Parameters ##### reservationId `string` ##### reason `string` #### Returns `Promise`\<`void`\> *** ### commitKeyUse() > **commitKeyUse**(`reservationId`, `txId`): `Promise`\<`void`\> #### Parameters ##### reservationId `string` ##### txId `string` #### Returns `Promise`\<`void`\> *** ### reserveKeyUse() > **reserveKeyUse**(`params`): `Promise`\<\{ `expiresAt`: `number`; `indices`: `SigningIndices`; `reservationId`: `string`; \}\> #### Parameters ##### params ###### payloadHash? `string` ###### purpose? `string` ###### treeId `string` ###### ttlMs? `number` #### Returns `Promise`\<\{ `expiresAt`: `number`; `indices`: `SigningIndices`; `reservationId`: `string`; \}\> --- ## Page: FactoryLogEntry URL: https://docs.totem.ing/api/totemsdk-omnia-factory/interfaces/FactoryLogEntry [**@totemsdk/omnia-factory**](../index.md) *** [@totemsdk/omnia-factory](../index.md) / FactoryLogEntry # Interface: FactoryLogEntry ## Properties ### allocations > **allocations**: `Record`\<`string`, `bigint`\> *** ### event > **event**: `"create"` \| `"accept"` \| `"reallocate"` \| `"virtual_open"` \| `"virtual_close"` \| `"dispute"` *** ### sequence > **sequence**: `number` *** ### timestamp > **timestamp**: `number` *** ### virtualChannelIds > **virtualChannelIds**: `string`[] --- ## Page: FactoryParticipant URL: https://docs.totem.ing/api/totemsdk-omnia-factory/interfaces/FactoryParticipant [**@totemsdk/omnia-factory**](../index.md) *** [@totemsdk/omnia-factory](../index.md) / FactoryParticipant # Interface: FactoryParticipant ## Properties ### addressIndex > **addressIndex**: `number` *** ### contributionAmount > **contributionAmount**: `bigint` Amount this participant contributes to the factory. *** ### fundingCoinId? > `optional` **fundingCoinId?**: `string` UTXO coin ID this participant contributes to the factory funding TX. When ALL participants supply a fundingCoinId and a chainProvider is given to `createFactory`, the N-input → 1-output funding TX is built, mined, and broadcast on-chain. Omit for in-memory / test-only factories. *** ### partyId > **partyId**: `string` *** ### publicKeyDigest > **publicKeyDigest**: `string` *** ### settlementAddress? > `optional` **settlementAddress?**: `string` Address to receive funds on cooperative settlement. Falls back to publicKeyDigest. --- ## Page: FactoryRegistryState URL: https://docs.totem.ing/api/totemsdk-omnia-factory/interfaces/FactoryRegistryState [**@totemsdk/omnia-factory**](../index.md) *** [@totemsdk/omnia-factory](../index.md) / FactoryRegistryState # Interface: FactoryRegistryState ## Properties ### factories > **factories**: `Record`\<`string`, [`ChannelFactory`](ChannelFactory.md)\> --- ## Page: FactorySettlementPayload URL: https://docs.totem.ing/api/totemsdk-omnia-factory/interfaces/FactorySettlementPayload [**@totemsdk/omnia-factory**](../index.md) *** [@totemsdk/omnia-factory](../index.md) / FactorySettlementPayload # Interface: FactorySettlementPayload ## Properties ### factoryId > **factoryId**: `string` *** ### finalAllocations > **finalAllocations**: `Record`\<`string`, `bigint`\> *** ### sequence > **sequence**: `number` *** ### settlementTxHex > **settlementTxHex**: `string` Serialized settlement OmniaTxDraft (hex) — built by `serializeTxDraft` from @totemsdk/omnia. *** ### txpowId? > `optional` **txpowId?**: `string` SHA3-256 TxPoW ID (hex) — populated when closeFactory is given a chainProvider. --- ## Page: OmniaChannel URL: https://docs.totem.ing/api/totemsdk-omnia-factory/interfaces/OmniaChannel [**@totemsdk/omnia-factory**](../index.md) *** [@totemsdk/omnia-factory](../index.md) / OmniaChannel # Interface: OmniaChannel ## Properties ### balances > **balances**: `Record`\<`partyId`, `bigint`\> *** ### channelId > **channelId**: `string` *** ### channelType > **channelType**: `"direct"` \| `"virtual"` *** ### createdAt > **createdAt**: `number` *** ### currentSequence > **currentSequence**: `number` *** ### factoryRef? > `optional` **factoryRef?**: `string` *** ### fundingAddress > **fundingAddress**: `string` SHA3-256 script-hash address for the eltoo script — used as input/output address in update/settlement TXs. *** ### fundingCoinId > **fundingCoinId**: `string` *** ### fundingScript > **fundingScript**: `string` *** ### fundingTxId > **fundingTxId**: `string` *** ### latestCoinId? > `optional` **latestCoinId?**: `string` The coin ID of the most recently confirmed on-chain channel output. Starts as `fundingCoinId`; callers should update this after each mined update TX is confirmed on-chain so subsequent update/settlement inputs reference the real spendable coin rather than the funding output. *** ### latestState > **latestState**: `SignedChannelState` \| `null` *** ### localSigner? > `optional` **localSigner?**: `ChannelSigner` Local party signer — stored on the channel so callers can omit the signer param from public functions (updateState, addHTLC, proposeSettlement, executeIntent, etc.). Explicit signer params always take precedence over this field. *** ### parties > **parties**: `ChannelParticipant`[] *** ### pendingHTLCs > **pendingHTLCs**: `HTLCRecord`[] *** ### pendingProposal? > `optional` **pendingProposal?**: `object` Tracks the most recent in-flight proposal at a given sequence number. Used for double-sign detection: same sequence + different payload → DoubleSignError. #### payloadHash > **payloadHash**: `string` #### sequence > **sequence**: `number` *** ### programId > **programId**: `string` *** ### programVersion > **programVersion**: `number` *** ### stateLog > **stateLog**: `ChannelLogEntry`[] *** ### status > **status**: `ChannelStatus` *** ### tokenId > **tokenId**: `string` *** ### tokenScale > **tokenScale**: `number` Scale factor for coloured coins: `tokenAmount = minimaRawAmount × 10^tokenScale`. For native Minima (tokenId=0x00) this is always 0. Balances are stored in scaled token units; TX builders convert to raw Minima. *** ### totalValue > **totalValue**: `bigint` *** ### unilateralClose? > `optional` **unilateralClose?**: `UnilateralCloseState` *** ### updatedAt > **updatedAt**: `number` --- ## Page: WotsLeaseBundle URL: https://docs.totem.ing/api/totemsdk-omnia-factory/interfaces/WotsLeaseBundle [**@totemsdk/omnia-factory**](../index.md) *** [@totemsdk/omnia-factory](../index.md) / WotsLeaseBundle # Interface: WotsLeaseBundle Bundle of `FactoryLeaseOps` + `ChannelSigner` for one factory participant. In production, wire a real `WotsLeaseProvider` (which satisfies `FactoryLeaseOps` structurally) and a `ChannelSigner` backed by the participant's WOTS tree key. In tests, provide mock implementations of all three methods on `leaseProvider`. The optional `verify` callback overrides the default `wotsVerifyDigest` from `@totemsdk/core`, allowing test code to inject a no-op verifier without requiring real WOTS key material. ## Properties ### leaseProvider > **leaseProvider**: [`FactoryLeaseOps`](FactoryLeaseOps.md) *** ### signer > **signer**: `ChannelSigner` *** ### verify? > `optional` **verify?**: (`sig`, `commitment`, `pkdHex`) => `boolean` Optional verify override. When absent, the implementation falls back to `wotsVerifyDigest(sig, commitment, fromHex(pkd))` from `@totemsdk/core`. Signature: `(sig, commitment, pkd_hex) => boolean` #### Parameters ##### sig `Uint8Array` ##### commitment `Uint8Array` ##### pkdHex `string` #### Returns `boolean` --- ## Page: FactorySignature URL: https://docs.totem.ing/api/totemsdk-omnia-factory/type-aliases/FactorySignature [**@totemsdk/omnia-factory**](../index.md) *** [@totemsdk/omnia-factory](../index.md) / FactorySignature # Type Alias: FactorySignature > **FactorySignature** = `Uint8Array` --- ## Page: FactoryStatus URL: https://docs.totem.ing/api/totemsdk-omnia-factory/type-aliases/FactoryStatus [**@totemsdk/omnia-factory**](../index.md) *** [@totemsdk/omnia-factory](../index.md) / FactoryStatus # Type Alias: FactoryStatus > **FactoryStatus** = `"opening"` \| `"active"` \| `"closing"` \| `"closed"` --- ## Page: DisabledAnalyticsStore URL: https://docs.totem.ing/api/totemsdk-omnia-host/classes/DisabledAnalyticsStore [**@totemsdk/omnia-host**](../index.md) *** [@totemsdk/omnia-host](../index.md) / DisabledAnalyticsStore # Class: DisabledAnalyticsStore No-op analytics backend for phase 9 deployments without DuckDB enabled. The interface keeps analytics off the channel critical path. ## Implements - [`AnalyticsStore`](../interfaces/AnalyticsStore.md) ## Constructors ### Constructor > **new DisabledAnalyticsStore**(): `DisabledAnalyticsStore` #### Returns `DisabledAnalyticsStore` ## Methods ### append() > **append**(`_event`): `Promise`\<`void`\> #### Parameters ##### \_event [`AnalyticsEvent`](../interfaces/AnalyticsEvent.md) #### Returns `Promise`\<`void`\> #### Implementation of [`AnalyticsStore`](../interfaces/AnalyticsStore.md).[`append`](../interfaces/AnalyticsStore.md#append) *** ### close() > **close**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> #### Implementation of [`AnalyticsStore`](../interfaces/AnalyticsStore.md).[`close`](../interfaces/AnalyticsStore.md#close) *** ### query() > **query**(`_kind?`, `_limit?`): `Promise`\<[`AnalyticsEvent`](../interfaces/AnalyticsEvent.md)[]\> #### Parameters ##### \_kind? `string` ##### \_limit? `number` #### Returns `Promise`\<[`AnalyticsEvent`](../interfaces/AnalyticsEvent.md)[]\> #### Implementation of [`AnalyticsStore`](../interfaces/AnalyticsStore.md).[`query`](../interfaces/AnalyticsStore.md#query) --- ## Page: DuckDbAnalyticsStore URL: https://docs.totem.ing/api/totemsdk-omnia-host/classes/DuckDbAnalyticsStore [**@totemsdk/omnia-host**](../index.md) *** [@totemsdk/omnia-host](../index.md) / DuckDbAnalyticsStore # Class: DuckDbAnalyticsStore ## Implements - [`AnalyticsStore`](../interfaces/AnalyticsStore.md) ## Constructors ### Constructor > **new DuckDbAnalyticsStore**(`db`): `DuckDbAnalyticsStore` #### Parameters ##### db [`DuckDbConnection`](../interfaces/DuckDbConnection.md) #### Returns `DuckDbAnalyticsStore` ## Methods ### append() > **append**(`event`): `Promise`\<`void`\> #### Parameters ##### event [`AnalyticsEvent`](../interfaces/AnalyticsEvent.md) #### Returns `Promise`\<`void`\> #### Implementation of [`AnalyticsStore`](../interfaces/AnalyticsStore.md).[`append`](../interfaces/AnalyticsStore.md#append) *** ### close() > **close**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> #### Implementation of [`AnalyticsStore`](../interfaces/AnalyticsStore.md).[`close`](../interfaces/AnalyticsStore.md#close) *** ### query() > **query**(`kind?`, `limit?`): `Promise`\<[`AnalyticsEvent`](../interfaces/AnalyticsEvent.md)[]\> #### Parameters ##### kind? `string` ##### limit? `number` = `100` #### Returns `Promise`\<[`AnalyticsEvent`](../interfaces/AnalyticsEvent.md)[]\> #### Implementation of [`AnalyticsStore`](../interfaces/AnalyticsStore.md).[`query`](../interfaces/AnalyticsStore.md#query) --- ## Page: GoRoutingProvider URL: https://docs.totem.ing/api/totemsdk-omnia-host/classes/GoRoutingProvider [**@totemsdk/omnia-host**](../index.md) *** [@totemsdk/omnia-host](../index.md) / GoRoutingProvider # Class: GoRoutingProvider Optional phase-10 provider for a compiled Go router speaking JSONL over stdio. ## Implements - [`RoutingProvider`](../interfaces/RoutingProvider.md) ## Constructors ### Constructor > **new GoRoutingProvider**(`binaryPath?`): `GoRoutingProvider` #### Parameters ##### binaryPath? `string` = `'omnia-router'` #### Returns `GoRoutingProvider` ## Methods ### close() > **close**(): `void` #### Returns `void` *** ### getRoute() > **getRoute**(`query`): `Promise`\<`Route` \| `CrossTokenRoute` \| `null`\> #### Parameters ##### query [`RouteQuery`](../interfaces/RouteQuery.md) #### Returns `Promise`\<`Route` \| `CrossTokenRoute` \| `null`\> #### Implementation of [`RoutingProvider`](../interfaces/RoutingProvider.md).[`getRoute`](../interfaces/RoutingProvider.md#getroute) *** ### rebuild() > **rebuild**(`edges`): `void` #### Parameters ##### edges `Iterable`\<`ChannelGraphEdge`\> #### Returns `void` #### Implementation of [`RoutingProvider`](../interfaces/RoutingProvider.md).[`rebuild`](../interfaces/RoutingProvider.md#rebuild) --- ## Page: InProcessRoutingProvider URL: https://docs.totem.ing/api/totemsdk-omnia-host/classes/InProcessRoutingProvider [**@totemsdk/omnia-host**](../index.md) *** [@totemsdk/omnia-host](../index.md) / InProcessRoutingProvider # Class: InProcessRoutingProvider Default in-process TypeScript routing engine. ## Implements - [`RoutingProvider`](../interfaces/RoutingProvider.md) ## Constructors ### Constructor > **new InProcessRoutingProvider**(): `InProcessRoutingProvider` #### Returns `InProcessRoutingProvider` ## Methods ### getRoute() > **getRoute**(`query`): `Route` \| `CrossTokenRoute` \| `null` #### Parameters ##### query [`RouteQuery`](../interfaces/RouteQuery.md) #### Returns `Route` \| `CrossTokenRoute` \| `null` #### Implementation of [`RoutingProvider`](../interfaces/RoutingProvider.md).[`getRoute`](../interfaces/RoutingProvider.md#getroute) *** ### rebuild() > **rebuild**(`edges`): `void` #### Parameters ##### edges `Iterable`\<`ChannelGraphEdge`\> #### Returns `void` #### Implementation of [`RoutingProvider`](../interfaces/RoutingProvider.md).[`rebuild`](../interfaces/RoutingProvider.md#rebuild) --- ## Page: JsonFileStorageAdapter URL: https://docs.totem.ing/api/totemsdk-omnia-host/classes/JsonFileStorageAdapter [**@totemsdk/omnia-host**](../index.md) *** [@totemsdk/omnia-host](../index.md) / JsonFileStorageAdapter # Class: JsonFileStorageAdapter JSON-file-backed StorageAdapter rooted at a directory next to the channel DB. Delegates to the hardened shared `FileStore` from `@totemsdk/storage/fs` (RFC-007): one versioned codec record per key written temp+rename with an fsync; corrupt records surface as `StorageError` (`corrupt`) rather than silently returning JSON `null`. The directory is created on first write. ## Implements - `StorageAdapter` ## Constructors ### Constructor > **new JsonFileStorageAdapter**(`dir`): `JsonFileStorageAdapter` #### Parameters ##### dir `string` #### Returns `JsonFileStorageAdapter` ## Methods ### clear() > **clear**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> #### Implementation of `StorageAdapter.clear` *** ### get() > **get**\<`T`\>(`key`): `Promise`\<`T` \| `null`\> #### Type Parameters ##### T `T` #### Parameters ##### key `string` #### Returns `Promise`\<`T` \| `null`\> #### Implementation of `StorageAdapter.get` *** ### has() > **has**(`key`): `Promise`\<`boolean`\> #### Parameters ##### key `string` #### Returns `Promise`\<`boolean`\> #### Implementation of `StorageAdapter.has` *** ### keys() > **keys**(): `Promise`\<`string`[]\> #### Returns `Promise`\<`string`[]\> #### Implementation of `StorageAdapter.keys` *** ### remove() > **remove**(`key`): `Promise`\<`boolean`\> #### Parameters ##### key `string` #### Returns `Promise`\<`boolean`\> #### Implementation of `StorageAdapter.remove` *** ### set() > **set**\<`T`\>(`key`, `value`): `Promise`\<`void`\> #### Type Parameters ##### T `T` #### Parameters ##### key `string` ##### value `T` #### Returns `Promise`\<`void`\> #### Implementation of `StorageAdapter.set` --- ## Page: OperationStore URL: https://docs.totem.ing/api/totemsdk-omnia-host/classes/OperationStore [**@totemsdk/omnia-host**](../index.md) *** [@totemsdk/omnia-host](../index.md) / OperationStore # Class: OperationStore Durable operation journal with atomic status transitions. ## Constructors ### Constructor > **new OperationStore**(`dbPath`): `OperationStore` #### Parameters ##### dbPath `string` #### Returns `OperationStore` ## Methods ### close() > **close**(): `void` #### Returns `void` *** ### create() > **create**(`operationId`, `request?`, `now?`): [`OperationRecord`](../interfaces/OperationRecord.md) #### Parameters ##### operationId `string` ##### request? `unknown` ##### now? `number` = `...` #### Returns [`OperationRecord`](../interfaces/OperationRecord.md) *** ### get() > **get**(`operationId`): [`OperationRecord`](../interfaces/OperationRecord.md) \| `undefined` #### Parameters ##### operationId `string` #### Returns [`OperationRecord`](../interfaces/OperationRecord.md) \| `undefined` *** ### listByStatus() > **listByStatus**(`status`): [`OperationRecord`](../interfaces/OperationRecord.md)[] #### Parameters ##### status [`OperationStatus`](../type-aliases/OperationStatus.md) #### Returns [`OperationRecord`](../interfaces/OperationRecord.md)[] *** ### transition() > **transition**(`operationId`, `from`, `to`, `patch?`, `now?`): [`OperationRecord`](../interfaces/OperationRecord.md) #### Parameters ##### operationId `string` ##### from [`OperationStatus`](../type-aliases/OperationStatus.md) ##### to [`OperationStatus`](../type-aliases/OperationStatus.md) ##### patch? ###### error? `string` ###### result? `unknown` ##### now? `number` = `...` #### Returns [`OperationRecord`](../interfaces/OperationRecord.md) *** ### verifyRequest() > **verifyRequest**(`operationId`, `request`): `boolean` #### Parameters ##### operationId `string` ##### request `unknown` #### Returns `boolean` --- ## Page: SqliteChannelStore URL: https://docs.totem.ing/api/totemsdk-omnia-host/classes/SqliteChannelStore [**@totemsdk/omnia-host**](../index.md) *** [@totemsdk/omnia-host](../index.md) / SqliteChannelStore # Class: SqliteChannelStore SQLite-backed Map facade accepted by @totemsdk/omnia's ChannelStore type. ## Extends - `Map`\<`string`, `OmniaChannel`\> ## Constructors ### Constructor > **new SqliteChannelStore**(`dbPath`): `SqliteChannelStore` #### Parameters ##### dbPath `string` #### Returns `SqliteChannelStore` #### Overrides `Map.constructor` ## Properties ### \[toStringTag\] > `readonly` **\[toStringTag\]**: `string` #### Inherited from `Map.[toStringTag]` *** ### \[species\] > `readonly` `static` **\[species\]**: `MapConstructor` #### Inherited from `Map.[species]` ## Accessors ### size #### Get Signature > **get** **size**(): `number` ##### Returns `number` the number of elements in the Map. #### Overrides `Map.size` ## Methods ### \[iterator\]() > **\[iterator\]**(): `MapIterator`\<\[`string`, `OmniaChannel`\]\> #### Returns `MapIterator`\<\[`string`, `OmniaChannel`\]\> #### Overrides `Map.[iterator]` *** ### clear() > **clear**(): `void` #### Returns `void` #### Overrides `Map.clear` *** ### close() > **close**(): `void` #### Returns `void` *** ### delete() > **delete**(`channelId`): `boolean` #### Parameters ##### channelId `string` #### Returns `boolean` true if an element in the Map existed and has been removed, or false if the element does not exist. #### Overrides `Map.delete` *** ### entries() > **entries**(): `MapIterator`\<\[`string`, `OmniaChannel`\]\> Returns an iterable of key, value pairs for every entry in the map. #### Returns `MapIterator`\<\[`string`, `OmniaChannel`\]\> #### Overrides `Map.entries` *** ### forEach() > **forEach**(`callbackfn`): `void` Executes a provided function once per each key/value pair in the Map, in insertion order. #### Parameters ##### callbackfn (`value`, `key`, `map`) => `void` #### Returns `void` #### Overrides `Map.forEach` *** ### get() > **get**(`channelId`): `OmniaChannel` \| `undefined` Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map. #### Parameters ##### channelId `string` #### Returns `OmniaChannel` \| `undefined` Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned. #### Overrides `Map.get` *** ### has() > **has**(`channelId`): `boolean` #### Parameters ##### channelId `string` #### Returns `boolean` boolean indicating whether an element with the specified key exists or not. #### Overrides `Map.has` *** ### keys() > **keys**(): `MapIterator`\<`string`\> Returns an iterable of keys in the map #### Returns `MapIterator`\<`string`\> #### Overrides `Map.keys` *** ### set() > **set**(`channelId`, `channel`): `this` Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated. #### Parameters ##### channelId `string` ##### channel `OmniaChannel` #### Returns `this` #### Overrides `Map.set` *** ### values() > **values**(): `MapIterator`\<`OmniaChannel`\> Returns an iterable of values in the map #### Returns `MapIterator`\<`OmniaChannel`\> #### Overrides `Map.values` --- ## Page: createHostIdentityAndManifest URL: https://docs.totem.ing/api/totemsdk-omnia-host/functions/createHostIdentityAndManifest [**@totemsdk/omnia-host**](../index.md) *** [@totemsdk/omnia-host](../index.md) / createHostIdentityAndManifest # Function: createHostIdentityAndManifest() > **createHostIdentityAndManifest**(`config`, `signing`): `Promise`\<[`HostIdentityAndManifest`](../interfaces/HostIdentityAndManifest.md)\> Boot-time identity + manifest assembly. ## Parameters ### config [`OmniaHostConfig`](../interfaces/OmniaHostConfig.md) ### signing [`HostSigning`](../interfaces/HostSigning.md) ## Returns `Promise`\<[`HostIdentityAndManifest`](../interfaces/HostIdentityAndManifest.md)\> --- ## Page: createHostManifest URL: https://docs.totem.ing/api/totemsdk-omnia-host/functions/createHostManifest [**@totemsdk/omnia-host**](../index.md) *** [@totemsdk/omnia-host](../index.md) / createHostManifest # Function: createHostManifest() > **createHostManifest**(`config`, `signing`, `identity?`): `Promise`\<`SignedManifest`\<`EdgeServiceManifest`\>\> Sign the boot-time EdgeServiceManifest with the host signing path. ## Parameters ### config [`OmniaHostConfig`](../interfaces/OmniaHostConfig.md) ### signing [`HostSigning`](../interfaces/HostSigning.md) ### identity? [`HostIdentity`](../interfaces/HostIdentity.md) ## Returns `Promise`\<`SignedManifest`\<`EdgeServiceManifest`\>\> --- ## Page: createHostMethods URL: https://docs.totem.ing/api/totemsdk-omnia-host/functions/createHostMethods [**@totemsdk/omnia-host**](../index.md) *** [@totemsdk/omnia-host](../index.md) / createHostMethods # Function: createHostMethods() > **createHostMethods**(`context`): `Map`\<`string`, `JsonRpcHandler`\> ## Parameters ### context [`HostApiContext`](../interfaces/HostApiContext.md) ## Returns `Map`\<`string`, `JsonRpcHandler`\> --- ## Page: createHostSigning URL: https://docs.totem.ing/api/totemsdk-omnia-host/functions/createHostSigning [**@totemsdk/omnia-host**](../index.md) *** [@totemsdk/omnia-host](../index.md) / createHostSigning # Function: createHostSigning() > **createHostSigning**(`config`): [`HostSigning`](../interfaces/HostSigning.md) Derive the host's signing stack from config. Throws when no key material is configured. Callers gate this behind `config.readOnly` / key presence checks. ## Parameters ### config [`OmniaHostConfig`](../interfaces/OmniaHostConfig.md) ## Returns [`HostSigning`](../interfaces/HostSigning.md) --- ## Page: createOmniaHost URL: https://docs.totem.ing/api/totemsdk-omnia-host/functions/createOmniaHost [**@totemsdk/omnia-host**](../index.md) *** [@totemsdk/omnia-host](../index.md) / createOmniaHost # Function: createOmniaHost() > **createOmniaHost**(`config`, `dependencies?`): [`OmniaHost`](../interfaces/OmniaHost.md) Phase-1 lifecycle shell. Subsystems will be attached in later phases while preserving idempotent startup and shutdown for the CLI and embedding users. ## Parameters ### config [`OmniaHostConfig`](../interfaces/OmniaHostConfig.md) ### dependencies? `OmniaHostDependencies` = `{}` ## Returns [`OmniaHost`](../interfaces/OmniaHost.md) --- ## Page: createTotemNodeAdapter URL: https://docs.totem.ing/api/totemsdk-omnia-host/functions/createTotemNodeAdapter [**@totemsdk/omnia-host**](../index.md) *** [@totemsdk/omnia-host](../index.md) / createTotemNodeAdapter # Function: createTotemNodeAdapter() > **createTotemNodeAdapter**(`options`): [`TotemNodeAdapter`](../interfaces/TotemNodeAdapter.md) ## Parameters ### options [`TotemNodeAdapterOptions`](../interfaces/TotemNodeAdapterOptions.md) ## Returns [`TotemNodeAdapter`](../interfaces/TotemNodeAdapter.md) --- ## Page: encryptSeedForKeyfile URL: https://docs.totem.ing/api/totemsdk-omnia-host/functions/encryptSeedForKeyfile [**@totemsdk/omnia-host**](../index.md) *** [@totemsdk/omnia-host](../index.md) / encryptSeedForKeyfile # Function: encryptSeedForKeyfile() > **encryptSeedForKeyfile**(`seed`, `passphrase`): `KeyfilePayload` Encrypt a 32-byte seed into a keyfile payload (used by tooling/tests). ## Parameters ### seed `Uint8Array` ### passphrase `string` ## Returns `KeyfilePayload` --- ## Page: hasSigningMaterial URL: https://docs.totem.ing/api/totemsdk-omnia-host/functions/hasSigningMaterial [**@totemsdk/omnia-host**](../index.md) *** [@totemsdk/omnia-host](../index.md) / hasSigningMaterial # Function: hasSigningMaterial() > **hasSigningMaterial**(`config`): `boolean` True when the config carries signing material (seed or keyfile). ## Parameters ### config [`OmniaHostConfig`](../interfaces/OmniaHostConfig.md) ## Returns `boolean` --- ## Page: initializeDuckDb URL: https://docs.totem.ing/api/totemsdk-omnia-host/functions/initializeDuckDb [**@totemsdk/omnia-host**](../index.md) *** [@totemsdk/omnia-host](../index.md) / initializeDuckDb # Function: initializeDuckDb() > **initializeDuckDb**(`db`): `Promise`\<`void`\> ## Parameters ### db [`DuckDbConnection`](../interfaces/DuckDbConnection.md) ## Returns `Promise`\<`void`\> --- ## Page: leaseStorageDir URL: https://docs.totem.ing/api/totemsdk-omnia-host/functions/leaseStorageDir [**@totemsdk/omnia-host**](../index.md) *** [@totemsdk/omnia-host](../index.md) / leaseStorageDir # Function: leaseStorageDir() > **leaseStorageDir**(`dbPath`): `string` Directory holding the lease journal/watermark next to the channel DB. ## Parameters ### dbPath `string` ## Returns `string` --- ## Page: loadConfigFromEnv URL: https://docs.totem.ing/api/totemsdk-omnia-host/functions/loadConfigFromEnv [**@totemsdk/omnia-host**](../index.md) *** [@totemsdk/omnia-host](../index.md) / loadConfigFromEnv # Function: loadConfigFromEnv() > **loadConfigFromEnv**(`env?`): [`OmniaHostConfig`](../interfaces/OmniaHostConfig.md) Load the daemon configuration from the documented OMNIA_* environment. ## Parameters ### env? `ProcessEnv` = `process.env` ## Returns [`OmniaHostConfig`](../interfaces/OmniaHostConfig.md) --- ## Page: loadHostIdentity URL: https://docs.totem.ing/api/totemsdk-omnia-host/functions/loadHostIdentity [**@totemsdk/omnia-host**](../index.md) *** [@totemsdk/omnia-host](../index.md) / loadHostIdentity # Function: loadHostIdentity() > **loadHostIdentity**(`config`, `signing`): [`HostIdentity`](../interfaces/HostIdentity.md) \| `undefined` Load and validate the delegated identity claim file (if configured). ## Parameters ### config [`OmniaHostConfig`](../interfaces/OmniaHostConfig.md) ### signing [`HostSigning`](../interfaces/HostSigning.md) ## Returns [`HostIdentity`](../interfaces/HostIdentity.md) \| `undefined` --- ## Page: AnalyticsEvent URL: https://docs.totem.ing/api/totemsdk-omnia-host/interfaces/AnalyticsEvent [**@totemsdk/omnia-host**](../index.md) *** [@totemsdk/omnia-host](../index.md) / AnalyticsEvent # Interface: AnalyticsEvent ## Properties ### channelId? > `optional` **channelId?**: `string` *** ### eventId > **eventId**: `string` *** ### kind > **kind**: `string` *** ### occurredAt > **occurredAt**: `number` *** ### operationId? > `optional` **operationId?**: `string` *** ### payload > **payload**: `Record`\<`string`, `unknown`\> --- ## Page: AnalyticsStore URL: https://docs.totem.ing/api/totemsdk-omnia-host/interfaces/AnalyticsStore [**@totemsdk/omnia-host**](../index.md) *** [@totemsdk/omnia-host](../index.md) / AnalyticsStore # Interface: AnalyticsStore ## Methods ### append() > **append**(`event`): `Promise`\<`void`\> #### Parameters ##### event [`AnalyticsEvent`](AnalyticsEvent.md) #### Returns `Promise`\<`void`\> *** ### close() > **close**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### query() > **query**(`kind?`, `limit?`): `Promise`\<[`AnalyticsEvent`](AnalyticsEvent.md)[]\> #### Parameters ##### kind? `string` ##### limit? `number` #### Returns `Promise`\<[`AnalyticsEvent`](AnalyticsEvent.md)[]\> --- ## Page: ConfirmationOptions URL: https://docs.totem.ing/api/totemsdk-omnia-host/interfaces/ConfirmationOptions [**@totemsdk/omnia-host**](../index.md) *** [@totemsdk/omnia-host](../index.md) / ConfirmationOptions # Interface: ConfirmationOptions ## Properties ### minConfirmations? > `optional` **minConfirmations?**: `number` *** ### pollIntervalMs? > `optional` **pollIntervalMs?**: `number` *** ### timeoutMs? > `optional` **timeoutMs?**: `number` --- ## Page: DuckDbConnection URL: https://docs.totem.ing/api/totemsdk-omnia-host/interfaces/DuckDbConnection [**@totemsdk/omnia-host**](../index.md) *** [@totemsdk/omnia-host](../index.md) / DuckDbConnection # Interface: DuckDbConnection Adapter boundary for the optional DuckDB implementation. ## Methods ### all() > **all**\<`T`\>(`sql`, ...`params`): `Promise`\<`T`[]\> #### Type Parameters ##### T `T` #### Parameters ##### sql `string` ##### params ...`unknown`[] #### Returns `Promise`\<`T`[]\> *** ### close() > **close**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### run() > **run**(`sql`, ...`params`): `Promise`\<`void`\> #### Parameters ##### sql `string` ##### params ...`unknown`[] #### Returns `Promise`\<`void`\> --- ## Page: HostApiContext URL: https://docs.totem.ing/api/totemsdk-omnia-host/interfaces/HostApiContext [**@totemsdk/omnia-host**](../index.md) *** [@totemsdk/omnia-host](../index.md) / HostApiContext # Interface: HostApiContext ## Properties ### chainProvider? > `optional` **chainProvider?**: `ChainStateProvider` *** ### channels > **channels**: `Map`\<`string`, `OmniaChannel`\> *** ### factories? > `optional` **factories?**: `Map`\<`string`, `ChannelFactory`\> *** ### factoryBundles? > `optional` **factoryBundles?**: `Record`\<`string`, `WotsLeaseBundle`\> *** ### identity? > `optional` **identity?**: `object` Opt-in host identity (address, publicKeyDigest, optional delegation). #### address > **address**: `string` #### delegation? > `optional` **delegation?**: `unknown` #### identityId? > `optional` **identityId?**: `string` #### publicKeyDigest > **publicKeyDigest**: `string` *** ### leaseProvider? > `optional` **leaseProvider?**: `WotsLeaseProvider` *** ### localParticipant? > `optional` **localParticipant?**: `ChannelParticipant` *** ### manifest? > `optional` **manifest?**: `unknown` Boot-time signed EdgeServiceManifest. *** ### operations? > `optional` **operations?**: [`OperationStoreLike`](../type-aliases/OperationStoreLike.md) *** ### readOnly? > `optional` **readOnly?**: `boolean` When true, only read-only methods are registered (no signer material). *** ### refreshRouting? > `optional` **refreshRouting?**: () => `void` #### Returns `void` *** ### routing > **routing**: [`RoutingProvider`](RoutingProvider.md) *** ### signer? > `optional` **signer?**: `ChannelSigner` *** ### spliceAcceptances? > `optional` **spliceAcceptances?**: `Map`\<`string`, `SpliceAcceptance`\> *** ### spliceLeaseProvider? > `optional` **spliceLeaseProvider?**: `SpliceLeaseProvider` *** ### spliceProposals? > `optional` **spliceProposals?**: `Map`\<`string`, `SpliceProposal`\> *** ### swarm? > `optional` **swarm?**: `OmniaSwarm` --- ## Page: HostIdentity URL: https://docs.totem.ing/api/totemsdk-omnia-host/interfaces/HostIdentity [**@totemsdk/omnia-host**](../index.md) *** [@totemsdk/omnia-host](../index.md) / HostIdentity # Interface: HostIdentity ## Properties ### delegation? > `optional` **delegation?**: `SignedIdentityClaim` *** ### document > **document**: `TotemIdentityDocument` --- ## Page: HostIdentityAndManifest URL: https://docs.totem.ing/api/totemsdk-omnia-host/interfaces/HostIdentityAndManifest [**@totemsdk/omnia-host**](../index.md) *** [@totemsdk/omnia-host](../index.md) / HostIdentityAndManifest # Interface: HostIdentityAndManifest ## Properties ### identity? > `optional` **identity?**: [`HostIdentity`](HostIdentity.md) *** ### manifest > **manifest**: `SignedManifest`\<`EdgeServiceManifest`\> --- ## Page: HostSigning URL: https://docs.totem.ing/api/totemsdk-omnia-host/interfaces/HostSigning [**@totemsdk/omnia-host**](../index.md) *** [@totemsdk/omnia-host](../index.md) / HostSigning # Interface: HostSigning ## Properties ### address > **address**: `string` *** ### addressIndex > **addressIndex**: `number` *** ### baseSeed > **baseSeed**: `Uint8Array` 32-byte base seed (used by the identity/manifest layer). *** ### deviceId > **deviceId**: `string` *** ### leaseProvider > **leaseProvider**: `WotsLeaseProvider` *** ### perAddressSeed > **perAddressSeed**: `Uint8Array` Per-address seed used for channel signing (key index 0). *** ### publicKeyDigest > **publicKeyDigest**: `string` *** ### signer > **signer**: `ChannelSigner` --- ## Page: OmniaHost URL: https://docs.totem.ing/api/totemsdk-omnia-host/interfaces/OmniaHost [**@totemsdk/omnia-host**](../index.md) *** [@totemsdk/omnia-host](../index.md) / OmniaHost # Interface: OmniaHost ## Properties ### channels? > `readonly` `optional` **channels?**: `Map`\<`string`, `OmniaChannel`\> *** ### config > `readonly` **config**: [`OmniaHostConfig`](OmniaHostConfig.md) *** ### swarm? > `readonly` `optional` **swarm?**: `OmniaSwarm` ## Methods ### close() > **close**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### isStarted() > **isStarted**(): `boolean` #### Returns `boolean` *** ### start() > **start**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> --- ## Page: OmniaHostConfig URL: https://docs.totem.ing/api/totemsdk-omnia-host/interfaces/OmniaHostConfig [**@totemsdk/omnia-host**](../index.md) *** [@totemsdk/omnia-host](../index.md) / OmniaHostConfig # Interface: OmniaHostConfig ## Properties ### analyticsDbPath? > `optional` **analyticsDbPath?**: `string` *** ### chainRpcPassword? > `optional` **chainRpcPassword?**: `string` *** ### chainRpcUrl > **chainRpcUrl**: `string` *** ### dbPath > **dbPath**: `string` *** ### deviceId? > `optional` **deviceId?**: `string` Stable device id for the lease journal. *** ### host > **host**: `string` *** ### identityFile? > `optional` **identityFile?**: `string` Identity file containing a delegated identity claim (operator root → service delegate). *** ### keyfile? > `optional` **keyfile?**: `string` Path to a keyfile JSON (resolved against cwd). *** ### keyfilePassphrase? > `optional` **keyfilePassphrase?**: `string` Keyfile decryption passphrase. *** ### localAddressIndex? > `optional` **localAddressIndex?**: `number` *** ### localPartyId? > `optional` **localPartyId?**: `string` *** ### localPubkey? > `optional` **localPubkey?**: `string` *** ### localSettlementAddress? > `optional` **localSettlementAddress?**: `string` *** ### nodeMode? > `optional` **nodeMode?**: `string` *** ### port > **port**: `number` *** ### readOnly > **readOnly**: `boolean` "1" forces read-only mode even with keys present. *** ### relay? > `optional` **relay?**: `string` *** ### seed? > `optional` **seed?**: `string` BIP39 mnemonic or hex seed (same formats @totemsdk/core accepts). *** ### serviceType > **serviceType**: `string` EdgeServiceManifest serviceType (default "omnia-router"). *** ### wsPath > **wsPath**: `string` --- ## Page: OperationRecord URL: https://docs.totem.ing/api/totemsdk-omnia-host/interfaces/OperationRecord [**@totemsdk/omnia-host**](../index.md) *** [@totemsdk/omnia-host](../index.md) / OperationRecord # Interface: OperationRecord ## Properties ### createdAt > **createdAt**: `number` *** ### error? > `optional` **error?**: `string` *** ### operationId > **operationId**: `string` *** ### request? > `optional` **request?**: `unknown` *** ### requestDigest? > `optional` **requestDigest?**: `string` *** ### result? > `optional` **result?**: `unknown` *** ### status > **status**: [`OperationStatus`](../type-aliases/OperationStatus.md) *** ### updatedAt > **updatedAt**: `number` --- ## Page: RouteQuery URL: https://docs.totem.ing/api/totemsdk-omnia-host/interfaces/RouteQuery [**@totemsdk/omnia-host**](../index.md) *** [@totemsdk/omnia-host](../index.md) / RouteQuery # Interface: RouteQuery ## Properties ### amount > **amount**: `bigint` *** ### from > **from**: `string` *** ### maxHops? > `optional` **maxHops?**: `number` *** ### targetTokenId? > `optional` **targetTokenId?**: `string` *** ### to > **to**: `string` *** ### tokenId > **tokenId**: `string` --- ## Page: RoutingProvider URL: https://docs.totem.ing/api/totemsdk-omnia-host/interfaces/RoutingProvider [**@totemsdk/omnia-host**](../index.md) *** [@totemsdk/omnia-host](../index.md) / RoutingProvider # Interface: RoutingProvider ## Methods ### getRoute() > **getRoute**(`query`): `Route` \| `CrossTokenRoute` \| `Promise`\<`Route` \| `CrossTokenRoute` \| `null`\> \| `null` #### Parameters ##### query [`RouteQuery`](RouteQuery.md) #### Returns `Route` \| `CrossTokenRoute` \| `Promise`\<`Route` \| `CrossTokenRoute` \| `null`\> \| `null` *** ### rebuild() > **rebuild**(`edges`): `void` #### Parameters ##### edges `Iterable`\<`ChannelGraphEdge`\> #### Returns `void` --- ## Page: TotemNodeAdapter URL: https://docs.totem.ing/api/totemsdk-omnia-host/interfaces/TotemNodeAdapter [**@totemsdk/omnia-host**](../index.md) *** [@totemsdk/omnia-host](../index.md) / TotemNodeAdapter # Interface: TotemNodeAdapter ## Extends - `ChainStateProvider` ## Methods ### broadcastTxPoW() > **broadcastTxPoW**(`txpowHex`): `Promise`\<`BroadcastResult`\> #### Parameters ##### txpowHex `string` #### Returns `Promise`\<`BroadcastResult`\> #### Inherited from `ChainStateProvider.broadcastTxPoW` *** ### close() > **close**(): `void` #### Returns `void` *** ### getCoin() > **getCoin**(`coinId`): `Promise`\<`Coin` \| `null`\> #### Parameters ##### coinId `string` #### Returns `Promise`\<`Coin` \| `null`\> #### Inherited from `ChainStateProvider.getCoin` *** ### getCoins() > **getCoins**(`query`): `Promise`\<`Coin`[]\> #### Parameters ##### query `CoinsQuery` #### Returns `Promise`\<`Coin`[]\> #### Inherited from `ChainStateProvider.getCoins` *** ### getMode() > **getMode**(): `Promise`\<`string` \| `undefined`\> #### Returns `Promise`\<`string` \| `undefined`\> *** ### getProof() > **getProof**(`coinId`): `Promise`\<`MMRProof`\> #### Parameters ##### coinId `string` #### Returns `Promise`\<`MMRProof`\> #### Inherited from `ChainStateProvider.getProof` *** ### getTip() > **getTip**(): `Promise`\<`ChainTip`\> #### Returns `Promise`\<`ChainTip`\> #### Inherited from `ChainStateProvider.getTip` *** ### getToken() > **getToken**(`tokenId`): `Promise`\<`TokenInfo`\> #### Parameters ##### tokenId `string` #### Returns `Promise`\<`TokenInfo`\> #### Inherited from `ChainStateProvider.getToken` *** ### getTokensByCreator() > **getTokensByCreator**(`address`): `Promise`\<`TokenInfo`[]\> #### Parameters ##### address `string` #### Returns `Promise`\<`TokenInfo`[]\> #### Inherited from `ChainStateProvider.getTokensByCreator` *** ### searchTokens() > **searchTokens**(`query`): `Promise`\<`TokenInfo`[]\> #### Parameters ##### query `TokenSearchQuery` #### Returns `Promise`\<`TokenInfo`[]\> #### Inherited from `ChainStateProvider.searchTokens` *** ### subscribe() > **subscribe**(`listener`): () => `void` #### Parameters ##### listener (`tip`) => `void` #### Returns () => `void` *** ### waitForConfirmation() > **waitForConfirmation**(`coinId`, `options?`): `Promise`\<`void`\> #### Parameters ##### coinId `string` ##### options? [`ConfirmationOptions`](ConfirmationOptions.md) #### Returns `Promise`\<`void`\> --- ## Page: TotemNodeAdapterOptions URL: https://docs.totem.ing/api/totemsdk-omnia-host/interfaces/TotemNodeAdapterOptions [**@totemsdk/omnia-host**](../index.md) *** [@totemsdk/omnia-host](../index.md) / TotemNodeAdapterOptions # Interface: TotemNodeAdapterOptions ## Properties ### client? > `optional` **client?**: `MinimaRpcClient` *** ### host > **host**: `string` *** ### password? > `optional` **password?**: `string` *** ### pollIntervalMs? > `optional` **pollIntervalMs?**: `number` *** ### port > **port**: `number` *** ### provider? > `optional` **provider?**: `ChainStateProvider` *** ### ssl? > `optional` **ssl?**: `boolean` --- ## Page: OperationStatus URL: https://docs.totem.ing/api/totemsdk-omnia-host/type-aliases/OperationStatus [**@totemsdk/omnia-host**](../index.md) *** [@totemsdk/omnia-host](../index.md) / OperationStatus # Type Alias: OperationStatus > **OperationStatus** = `"pending"` \| `"reserved"` \| `"executing"` \| `"committed"` \| `"failed"` \| `"unknown"` --- ## Page: OperationStoreLike URL: https://docs.totem.ing/api/totemsdk-omnia-host/type-aliases/OperationStoreLike [**@totemsdk/omnia-host**](../index.md) *** [@totemsdk/omnia-host](../index.md) / OperationStoreLike # Type Alias: OperationStoreLike > **OperationStoreLike** = `Pick`\<[`OperationStore`](../classes/OperationStore.md), `"get"` \| `"create"` \| `"transition"` \| `"listByStatus"`\> --- ## Page: acceptCommitment URL: https://docs.totem.ing/api/totemsdk-omnia-pool/functions/acceptCommitment [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / acceptCommitment # Function: acceptCommitment() > **acceptCommitment**(`params`): `Promise`\<\{ `commitment`: `LiquidityCommitment`; `registry`: `LiquidityBondRegistryState`; \}\> Accept an LP commitment and register it — only after on-chain verification confirms the funding. Throws when the funding is missing, declared-only, or fails the chain check (an attacker cannot fake an accepted commitment). ## Parameters ### params `AcceptCommitmentParams` ## Returns `Promise`\<\{ `commitment`: `LiquidityCommitment`; `registry`: `LiquidityBondRegistryState`; \}\> --- ## Page: allocatePositionCapital URL: https://docs.totem.ing/api/totemsdk-omnia-pool/functions/allocatePositionCapital [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / allocatePositionCapital # Function: allocatePositionCapital() > **allocatePositionCapital**(`params`, `registry`): `Promise`\<[`AllocationResult`](../type-aliases/AllocationResult.md)\> Allocate capital from a position to a specific Omnia execution backend. ## Parameters ### params [`AllocatePositionCapitalParams`](../type-aliases/AllocatePositionCapitalParams.md) ### registry `LiquidityBondRegistryState` ## Returns `Promise`\<[`AllocationResult`](../type-aliases/AllocationResult.md)\> --- ## Page: approveWithdrawal URL: https://docs.totem.ing/api/totemsdk-omnia-pool/functions/approveWithdrawal [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / approveWithdrawal # Function: approveWithdrawal() > **approveWithdrawal**(`intent`, `position`, `registry`): `object` Approve a withdrawal intent. Returns the approved intent and updated position. ## Parameters ### intent `WithdrawalIntent` ### position `LiquidityPosition` ### registry `LiquidityBondRegistryState` ## Returns `object` ### intent > **intent**: `WithdrawalIntent` ### registry > **registry**: `LiquidityBondRegistryState` --- ## Page: claimFees URL: https://docs.totem.ing/api/totemsdk-omnia-pool/functions/claimFees [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / claimFees # Function: claimFees() > **claimFees**(`pool`, `position`, `registry`, `opts`): `object` Claim accrued LP fees. The claim is bound to a settled payout (`payoutRef`): the LP fee balance is only reduced once a real payout (VTXO mint / channel settlement) exists — preventing "claim then fail to pay" and double-claim. ## Parameters ### pool `LiquidityPoolManifest` ### position `LiquidityPosition` ### registry `LiquidityBondRegistryState` ### opts [`ClaimFeesOptions`](../interfaces/ClaimFeesOptions.md) ## Returns `object` ### claimedAmount > **claimedAmount**: `bigint` ### registry > **registry**: `LiquidityBondRegistryState` --- ## Page: commitRegistryTransition URL: https://docs.totem.ing/api/totemsdk-omnia-pool/functions/commitRegistryTransition [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / commitRegistryTransition # Function: commitRegistryTransition() > **commitRegistryTransition**(`params`): `Promise`\<`RegistrySignedTransition`\> One-shot helper for transitions that do not carry their own rooting context (e.g. sync mutations like `depositToPool`). Provide the mutated registry plus an op description and get a signed, anchorable transition record. ## Parameters ### params #### op `RegistryOperation` #### registry `LiquidityBondRegistryState` #### rooting [`RegistryRootingContext`](../interfaces/RegistryRootingContext.md) ## Returns `Promise`\<`RegistrySignedTransition`\> --- ## Page: commitToPool URL: https://docs.totem.ing/api/totemsdk-omnia-pool/functions/commitToPool [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / commitToPool # Function: commitToPool() > **commitToPool**(`params`): `object` Create a signed LP commitment carrying the funding coin as `declared`. Nothing here is trusted on-chain — acceptance is what proves it. ## Parameters ### params `CommitToPoolParams` ## Returns `object` ### commitment > **commitment**: `LiquidityCommitment` --- ## Page: compoundFees URL: https://docs.totem.ing/api/totemsdk-omnia-pool/functions/compoundFees [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / compoundFees # Function: compoundFees() > **compoundFees**(`pool`, `position`, `registry`, `opts`): `object` Compound accrued LP fees back into the position's principal. Like claims, compounding is bound to a settled payout so the entitlement is only zeroed against a real execution. ## Parameters ### pool `LiquidityPoolManifest` ### position `LiquidityPosition` ### registry `LiquidityBondRegistryState` ### opts [`CompoundFeesOptions`](../interfaces/CompoundFeesOptions.md) ## Returns `object` ### compoundedAmount > **compoundedAmount**: `bigint` ### position > **position**: `LiquidityPosition` ### registry > **registry**: `LiquidityBondRegistryState` --- ## Page: computePoolNAV URL: https://docs.totem.ing/api/totemsdk-omnia-pool/functions/computePoolNAV [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / computePoolNAV # Function: computePoolNAV() > **computePoolNAV**(`pool`, `registry`, `filter?`): [`PoolNAV`](../interfaces/PoolNAV.md) Compute the net asset value of a pool from its registry state. NAV is the number PIPE broadcasts as POOL_NAV, so it must be spoof-proof: only positions whose funding is chain-confirmed contribute, and only fee records whose earnings are verified (or non-earnable adjustments) accrue. An optional `filter` narrows which positions contribute further. ## Parameters ### pool `LiquidityPoolManifest` ### registry `LiquidityBondRegistryState` ### filter? (`position`) => `boolean` ## Returns [`PoolNAV`](../interfaces/PoolNAV.md) --- ## Page: computePoolRiskScore URL: https://docs.totem.ing/api/totemsdk-omnia-pool/functions/computePoolRiskScore [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / computePoolRiskScore # Function: computePoolRiskScore() > **computePoolRiskScore**(`pool`, `registry`): `number` Compute aggregate pool risk score as the average of active position scores. ## Parameters ### pool `LiquidityPoolManifest` ### registry `LiquidityBondRegistryState` ## Returns `number` --- ## Page: computeUnclaimedFees URL: https://docs.totem.ing/api/totemsdk-omnia-pool/functions/computeUnclaimedFees [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / computeUnclaimedFees # Function: computeUnclaimedFees() > **computeUnclaimedFees**(`position`, `registry`): `bigint` Compute the total unclaimed LP fee entitlement for a position. ## Parameters ### position `LiquidityPosition` ### registry `LiquidityBondRegistryState` ## Returns `bigint` --- ## Page: createChannelLoader URL: https://docs.totem.ing/api/totemsdk-omnia-pool/functions/createChannelLoader [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / createChannelLoader # Function: createChannelLoader() > **createChannelLoader**(`store`): (`channelId`) => `Promise`\<`OmniaChannel`\> Build a `loadChannel(channelId)` port that reads a persisted channel snapshot and recovers the live `OmniaChannel` object. ## Parameters ### store [`ChannelSnapshotStore`](../interfaces/ChannelSnapshotStore.md) ## Returns (`channelId`) => `Promise`\<`OmniaChannel`\> --- ## Page: createDurableChannelSnapshotStore URL: https://docs.totem.ing/api/totemsdk-omnia-pool/functions/createDurableChannelSnapshotStore [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / createDurableChannelSnapshotStore # Function: createDurableChannelSnapshotStore() > **createDurableChannelSnapshotStore**(`adapter`, `options?`): [`DurableChannelSnapshotStore`](../interfaces/DurableChannelSnapshotStore.md) ## Parameters ### adapter `StorageAdapterWithCapabilities` ### options? [`DurableChannelSnapshotStoreOptions`](../interfaces/DurableChannelSnapshotStoreOptions.md) = `{}` ## Returns [`DurableChannelSnapshotStore`](../interfaces/DurableChannelSnapshotStore.md) --- ## Page: createOmniaPool URL: https://docs.totem.ing/api/totemsdk-omnia-pool/functions/createOmniaPool [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / createOmniaPool # Function: createOmniaPool() > **createOmniaPool**(`params`, `state`): [`OmniaPool`](../interfaces/OmniaPool.md) Create an Omnia-style liquidity pool manifest and register it in a registry. ## Parameters ### params [`CreateOmniaPoolParams`](../interfaces/CreateOmniaPoolParams.md) ### state `LiquidityBondRegistryState` ## Returns [`OmniaPool`](../interfaces/OmniaPool.md) --- ## Page: createPositionFromCommitment URL: https://docs.totem.ing/api/totemsdk-omnia-pool/functions/createPositionFromCommitment [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / createPositionFromCommitment # Function: createPositionFromCommitment() > **createPositionFromCommitment**(`commitment`, `pool`, `registry`, `underlyingRefs?`, `metadata?`): `object` Create and register a `LiquidityPosition` from an accepted (chain-confirmed) commitment. The position derives its amount from the confirmed funding, never from a self-declared number. ## Parameters ### commitment `LiquidityCommitment` ### pool `LiquidityPoolManifest` ### registry `LiquidityBondRegistryState` ### underlyingRefs? #### factoryId? `string` #### omniaChannelId? `string` #### routerId? `string` #### vtxoPoolId? `string` ### metadata? `Record`\<`string`, `unknown`\> ## Returns `object` ### position > **position**: `LiquidityPosition` ### registry > **registry**: `LiquidityBondRegistryState` --- ## Page: depositToPool URL: https://docs.totem.ing/api/totemsdk-omnia-pool/functions/depositToPool [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / depositToPool # Function: depositToPool() > **depositToPool**(`params`, `registry`): `Promise`\<[`DepositToPoolResult`](../interfaces/DepositToPoolResult.md)\> Full deposit flow: commit (declared funding) → verify on-chain → accept → create position from confirmed funding → issue receipt → anchor the registry transition. Async because acceptance is an on-chain gate. ## Parameters ### params `DepositToPoolParams` ### registry `LiquidityBondRegistryState` ## Returns `Promise`\<[`DepositToPoolResult`](../interfaces/DepositToPoolResult.md)\> --- ## Page: executeAutonomousRebalanceStep URL: https://docs.totem.ing/api/totemsdk-omnia-pool/functions/executeAutonomousRebalanceStep [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / executeAutonomousRebalanceStep # Function: executeAutonomousRebalanceStep() > **executeAutonomousRebalanceStep**(`options`, `step`): `Promise`\<[`AutonomousRebalanceResult`](../interfaces/AutonomousRebalanceResult.md)\> Execute one autonomous rebalance step end-to-end: prepare → reduce → authorize → execute → commit / abort. On approval the step is executed against the live port (channel update and/or pool allocation), then the reservation is committed with the tx digest as the execution proof. On failure the reservation is aborted and the error rethrown so the caller can apply its failure budget. ## Parameters ### options [`AutonomousRebalanceOptions`](../interfaces/AutonomousRebalanceOptions.md) ### step [`PreparedRebalanceStep`](../interfaces/PreparedRebalanceStep.md) ## Returns `Promise`\<[`AutonomousRebalanceResult`](../interfaces/AutonomousRebalanceResult.md)\> --- ## Page: executePoolPayout URL: https://docs.totem.ing/api/totemsdk-omnia-pool/functions/executePoolPayout [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / executePoolPayout # Function: executePoolPayout() > **executePoolPayout**(`params`, `registry`): `Promise`\<\{ `execution?`: `unknown`; `intent`: `WithdrawalIntent`; `position`: `LiquidityPosition`; `registry`: `LiquidityBondRegistryState`; `signedTransition?`: `RegistrySignedTransition`; \}\> Execute a payout for an approved withdrawal intent. For VTXO-backed positions this creates an exit draft; for channel-backed positions it requests a settlement payload. Pure-record positions return the intent only and expect the caller to handle settlement externally. ## Parameters ### params `ExecutePoolPayoutParams` ### registry `LiquidityBondRegistryState` ## Returns `Promise`\<\{ `execution?`: `unknown`; `intent`: `WithdrawalIntent`; `position`: `LiquidityPosition`; `registry`: `LiquidityBondRegistryState`; `signedTransition?`: `RegistrySignedTransition`; \}\> --- ## Page: getUtilisation URL: https://docs.totem.ing/api/totemsdk-omnia-pool/functions/getUtilisation [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / getUtilisation # Function: getUtilisation() > **getUtilisation**(`pool`, `registry`): `number` Get pool utilisation from the liquidity-bond registry. ## Parameters ### pool `LiquidityPoolManifest` ### registry `LiquidityBondRegistryState` ## Returns `number` --- ## Page: issueLpReceipt URL: https://docs.totem.ing/api/totemsdk-omnia-pool/functions/issueLpReceipt [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / issueLpReceipt # Function: issueLpReceipt() > **issueLpReceipt**(`position`, `pool`, `registry`): `object` Issue a non-custodial LP receipt for a position. ## Parameters ### position `LiquidityPosition` ### pool `LiquidityPoolManifest` ### registry `LiquidityBondRegistryState` ## Returns `object` ### receipt > **receipt**: `LiquidityReceipt` ### registry > **registry**: `LiquidityBondRegistryState` --- ## Page: loadChannelFromSnapshotStore URL: https://docs.totem.ing/api/totemsdk-omnia-pool/functions/loadChannelFromSnapshotStore [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / loadChannelFromSnapshotStore # Function: loadChannelFromSnapshotStore() > **loadChannelFromSnapshotStore**(`store`, `channelId`): `Promise`\<`OmniaChannel`\> Load a channel from a snapshot store by id (see `createChannelLoader`). ## Parameters ### store [`ChannelSnapshotStore`](../interfaces/ChannelSnapshotStore.md) ### channelId `string` ## Returns `Promise`\<`OmniaChannel`\> --- ## Page: loadOmniaPool URL: https://docs.totem.ing/api/totemsdk-omnia-pool/functions/loadOmniaPool [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / loadOmniaPool # Function: loadOmniaPool() > **loadOmniaPool**(`poolId`, `state`): [`OmniaPool`](../interfaces/OmniaPool.md) \| `undefined` Load an existing pool from a registry by poolId. ## Parameters ### poolId `string` ### state `LiquidityBondRegistryState` ## Returns [`OmniaPool`](../interfaces/OmniaPool.md) \| `undefined` --- ## Page: makeOmniaFeePolicy URL: https://docs.totem.ing/api/totemsdk-omnia-pool/functions/makeOmniaFeePolicy [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / makeOmniaFeePolicy # Function: makeOmniaFeePolicy() > **makeOmniaFeePolicy**(`lpFeeBps?`, `operatorFeeBps?`, `feeModel?`): `LiquidityFeePolicy` Convenience helper to build a default Omnia fee policy. ## Parameters ### lpFeeBps? `number` = `50` ### operatorFeeBps? `number` = `10` ### feeModel? `"pro-rata"` \| `"record-only"` \| `"none"` ## Returns `LiquidityFeePolicy` --- ## Page: makeOmniaLockTerms URL: https://docs.totem.ing/api/totemsdk-omnia-pool/functions/makeOmniaLockTerms [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / makeOmniaLockTerms # Function: makeOmniaLockTerms() > **makeOmniaLockTerms**(`minLockMs?`, `earlyWithdrawalAllowed?`, `earlyWithdrawalPenaltyBps?`): `LiquidityLockTerms` Convenience helper to build a default Omnia pool lock terms. ## Parameters ### minLockMs? `number` = `0` ### earlyWithdrawalAllowed? `boolean` = `true` ### earlyWithdrawalPenaltyBps? `number` = `0` ## Returns `LiquidityLockTerms` --- ## Page: maybeSignTransition URL: https://docs.totem.ing/api/totemsdk-omnia-pool/functions/maybeSignTransition [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / maybeSignTransition # Function: maybeSignTransition() > **maybeSignTransition**(`rooting`, `registry`, `op`, `previousRoot?`): `Promise`\<`RegistrySignedTransition` \| `undefined`\> Sign the resulting registry when a rooting context is provided, otherwise return `undefined` (pure-record mode, no anchoring). ## Parameters ### rooting [`RegistryRootingContext`](../interfaces/RegistryRootingContext.md) \| `undefined` ### registry `LiquidityBondRegistryState` ### op `RegistryOperation` ### previousRoot? `string` ## Returns `Promise`\<`RegistrySignedTransition` \| `undefined`\> --- ## Page: prepareRebalanceStep URL: https://docs.totem.ing/api/totemsdk-omnia-pool/functions/prepareRebalanceStep [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / prepareRebalanceStep # Function: prepareRebalanceStep() > **prepareRebalanceStep**(`runId`, `principal`, `agentId`, `step`): `object` Reduce a prepared rebalance step to a canonical action and authorize it. The wallet's tx draft is the source of truth for spends/fees/channel effects. ## Parameters ### runId `string` ### principal `string` ### agentId `string` ### step [`PreparedRebalanceStep`](../interfaces/PreparedRebalanceStep.md) ## Returns `object` ### canonical > **canonical**: `CanonicalAgentAction` ### prepared > **prepared**: `PreparedStep` --- ## Page: quiescePosition URL: https://docs.totem.ing/api/totemsdk-omnia-pool/functions/quiescePosition [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / quiescePosition # Function: quiescePosition() > **quiescePosition**(`position`, `registry`): `object` Mark a position and its active allocations as quiescing, preparing for splice-out/close. ## Parameters ### position `LiquidityPosition` ### registry `LiquidityBondRegistryState` ## Returns `object` ### position > **position**: `LiquidityPosition` ### registry > **registry**: `LiquidityBondRegistryState` --- ## Page: rebalancePoolCapital URL: https://docs.totem.ing/api/totemsdk-omnia-pool/functions/rebalancePoolCapital [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / rebalancePoolCapital # Function: rebalancePoolCapital() > **rebalancePoolCapital**(`params`, `position`, `registry`): `Promise`\<\{ `newAllocation`: `LiquidityAllocation`; `position`: `LiquidityPosition`; `registry`: `LiquidityBondRegistryState`; `released`: `LiquidityAllocation`; \}\> Rebalance capital from one allocation to another target/backend. ## Parameters ### params [`RebalanceAllocationParams`](../type-aliases/RebalanceAllocationParams.md) ### position `LiquidityPosition` ### registry `LiquidityBondRegistryState` ## Returns `Promise`\<\{ `newAllocation`: `LiquidityAllocation`; `position`: `LiquidityPosition`; `registry`: `LiquidityBondRegistryState`; `released`: `LiquidityAllocation`; \}\> --- ## Page: recordPoolFee URL: https://docs.totem.ing/api/totemsdk-omnia-pool/functions/recordPoolFee [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / recordPoolFee # Function: recordPoolFee() > **recordPoolFee**(`params`, `registry`): `object` Record a fee against a pool position, splitting between LP and operator. ## Parameters ### params [`RecordPoolFeeParams`](../type-aliases/RecordPoolFeeParams.md) ### registry `LiquidityBondRegistryState` ## Returns `object` ### feeRecord > **feeRecord**: `LiquidityFeeRecord` ### registry > **registry**: `LiquidityBondRegistryState` --- ## Page: releaseAllocation URL: https://docs.totem.ing/api/totemsdk-omnia-pool/functions/releaseAllocation [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / releaseAllocation # Function: releaseAllocation() > **releaseAllocation**(`params`, `registry`): `object` Release an allocation and restore its position's available liquidity. ## Parameters ### params [`ReleaseAllocationParams`](../type-aliases/ReleaseAllocationParams.md) ### registry `LiquidityBondRegistryState` ## Returns `object` ### allocation > **allocation**: `LiquidityAllocation` ### position > **position**: `LiquidityPosition` ### registry > **registry**: `LiquidityBondRegistryState` --- ## Page: saveChannelSnapshot URL: https://docs.totem.ing/api/totemsdk-omnia-pool/functions/saveChannelSnapshot [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / saveChannelSnapshot # Function: saveChannelSnapshot() > **saveChannelSnapshot**(`store`, `channel`): `Promise`\<`void`\> Persist a channel's snapshot so it can be recovered later by id. ## Parameters ### store [`ChannelSnapshotStore`](../interfaces/ChannelSnapshotStore.md) ### channel `OmniaChannel` ## Returns `Promise`\<`void`\> --- ## Page: toOmniaPoolFeeRecord URL: https://docs.totem.ing/api/totemsdk-omnia-pool/functions/toOmniaPoolFeeRecord [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / toOmniaPoolFeeRecord # Function: toOmniaPoolFeeRecord() > **toOmniaPoolFeeRecord**(`record`): [`OmniaPoolFeeRecord`](../interfaces/OmniaPoolFeeRecord.md) Convenience: record a fee and return the `OmniaPoolFeeRecord` view. ## Parameters ### record `LiquidityFeeRecord` ## Returns [`OmniaPoolFeeRecord`](../interfaces/OmniaPoolFeeRecord.md) --- ## Page: withdrawLiquidity URL: https://docs.totem.ing/api/totemsdk-omnia-pool/functions/withdrawLiquidity [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / withdrawLiquidity # Function: withdrawLiquidity() > **withdrawLiquidity**(`pool`, `position`, `opts`, `registry`): [`OmniaPoolWithdrawalResult`](../interfaces/OmniaPoolWithdrawalResult.md) Create a withdrawal intent and mark the position as requesting withdrawal. ## Parameters ### pool `LiquidityPoolManifest` ### position `LiquidityPosition` ### opts [`WithdrawLiquidityOptions`](../interfaces/WithdrawLiquidityOptions.md) ### registry `LiquidityBondRegistryState` ## Returns [`OmniaPoolWithdrawalResult`](../interfaces/OmniaPoolWithdrawalResult.md) --- ## Page: AutonomousRebalanceOptions URL: https://docs.totem.ing/api/totemsdk-omnia-pool/interfaces/AutonomousRebalanceOptions [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / AutonomousRebalanceOptions # Interface: AutonomousRebalanceOptions ## Properties ### agentId > **agentId**: `string` *** ### ctx? > `optional` **ctx?**: [`OmniaPoolAllocationContext`](OmniaPoolAllocationContext.md) Execution port for live Omnia operations. *** ### policy > **policy**: `GrantBoundAutonomyPolicy` *** ### principal > **principal**: `string` *** ### runId > **runId**: `string` --- ## Page: AutonomousRebalanceResult URL: https://docs.totem.ing/api/totemsdk-omnia-pool/interfaces/AutonomousRebalanceResult [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / AutonomousRebalanceResult # Interface: AutonomousRebalanceResult ## Properties ### allocation? > `optional` **allocation?**: `object` The executed pool allocation mutation. #### newAllocation > **newAllocation**: `LiquidityAllocation` #### position > **position**: `LiquidityPosition` #### registry > **registry**: `LiquidityBondRegistryState` #### released > **released**: `LiquidityAllocation` *** ### authorization? > `optional` **authorization?**: `RunAuthorization` *** ### canonical? > `optional` **canonical?**: `CanonicalAgentAction` The canonical action that was authorized (for the receipt graph). *** ### channelUpdate? > `optional` **channelUpdate?**: [`RebalanceChannelUpdate`](RebalanceChannelUpdate.md) The executed channel update (when the step performed one). *** ### outcome > **outcome**: `"approved"` \| `"requires_human"` \| `"rejected"` *** ### rejection? > `optional` **rejection?**: `RunAuthorizationRejected` *** ### txDigest? > `optional` **txDigest?**: `string` The tx digest the execution proof is bound to. --- ## Page: ChannelCloseResult URL: https://docs.totem.ing/api/totemsdk-omnia-pool/interfaces/ChannelCloseResult [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / ChannelCloseResult # Interface: ChannelCloseResult Result of closing a pool-backed Omnia channel. ## Properties ### channel > **channel**: `OmniaChannel` *** ### settlementPayload > **settlementPayload**: `SettlementPayload` --- ## Page: ChannelSnapshotStore URL: https://docs.totem.ing/api/totemsdk-omnia-pool/interfaces/ChannelSnapshotStore [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / ChannelSnapshotStore # Interface: ChannelSnapshotStore Minimal keyed snapshot store for channel persistence. ## Extended by - [`DurableChannelSnapshotStore`](DurableChannelSnapshotStore.md) ## Methods ### get() > **get**(`channelId`): `string` \| `Promise`\<`string` \| `undefined`\> \| `undefined` #### Parameters ##### channelId `string` #### Returns `string` \| `Promise`\<`string` \| `undefined`\> \| `undefined` *** ### set()? > `optional` **set**(`channelId`, `snapshot`): `void` \| `Promise`\<`void`\> #### Parameters ##### channelId `string` ##### snapshot `string` #### Returns `void` \| `Promise`\<`void`\> --- ## Page: ClaimFeesOptions URL: https://docs.totem.ing/api/totemsdk-omnia-pool/interfaces/ClaimFeesOptions [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / ClaimFeesOptions # Interface: ClaimFeesOptions Options for fee operations. ## Properties ### amount? > `optional` **amount?**: `string` *** ### payoutRef? > `optional` **payoutRef?**: `FeePayoutRef` Required: the settled payout (VTXO mint / channel settlement) the claim is bound to. *** ### positionId > **positionId**: `string` *** ### recipientAddress? > `optional` **recipientAddress?**: `string` --- ## Page: CompoundFeesOptions URL: https://docs.totem.ing/api/totemsdk-omnia-pool/interfaces/CompoundFeesOptions [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / CompoundFeesOptions # Interface: CompoundFeesOptions ## Properties ### payoutRef? > `optional` **payoutRef?**: `FeePayoutRef` Required: the settled payout the compound is bound to. *** ### positionId > **positionId**: `string` --- ## Page: CreateOmniaPoolParams URL: https://docs.totem.ing/api/totemsdk-omnia-pool/interfaces/CreateOmniaPoolParams [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / CreateOmniaPoolParams # Interface: CreateOmniaPoolParams ## Properties ### capacity > **capacity**: `string` *** ### feePolicy > **feePolicy**: `LiquidityFeePolicy` *** ### lockTerms? > `optional` **lockTerms?**: `LiquidityLockTerms` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### operatorAddress > **operatorAddress**: `string` *** ### operatorBond? > `optional` **operatorBond?**: `OperatorAutobond` *** ### operatorSigner? > `optional` **operatorSigner?**: [`PoolSigner`](PoolSigner.md) *** ### poolId > **poolId**: `string` *** ### poolType > **poolType**: `LiquidityPoolType` *** ### purpose > **purpose**: `LiquidityPurpose` *** ### riskPolicy? > `optional` **riskPolicy?**: `LiquidityRiskPolicy` *** ### tokenId > **tokenId**: `string` --- ## Page: DepositToPoolResult URL: https://docs.totem.ing/api/totemsdk-omnia-pool/interfaces/DepositToPoolResult [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / DepositToPoolResult # Interface: DepositToPoolResult ## Properties ### pool > **pool**: `LiquidityPoolManifest` *** ### poolId > **poolId**: `string` *** ### position > **position**: `LiquidityPosition` *** ### receipt > **receipt**: `LiquidityReceipt` *** ### signedTransition? > `optional` **signedTransition?**: `RegistrySignedTransition` *** ### state > **state**: `LiquidityBondRegistryState` --- ## Page: DurableChannelSnapshotStore URL: https://docs.totem.ing/api/totemsdk-omnia-pool/interfaces/DurableChannelSnapshotStore [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / DurableChannelSnapshotStore # Interface: DurableChannelSnapshotStore Minimal keyed snapshot store for channel persistence. ## Extends - [`ChannelSnapshotStore`](ChannelSnapshotStore.md) ## Methods ### get() > **get**(`channelId`): `string` \| `Promise`\<`string` \| `undefined`\> \| `undefined` #### Parameters ##### channelId `string` #### Returns `string` \| `Promise`\<`string` \| `undefined`\> \| `undefined` #### Inherited from [`ChannelSnapshotStore`](ChannelSnapshotStore.md).[`get`](ChannelSnapshotStore.md#get) *** ### has() > **has**(`channelId`): `Promise`\<`boolean`\> #### Parameters ##### channelId `string` #### Returns `Promise`\<`boolean`\> *** ### keys() > **keys**(): `Promise`\<`string`[]\> Channel ids that currently have a persisted snapshot. #### Returns `Promise`\<`string`[]\> *** ### remove() > **remove**(`channelId`): `Promise`\<`boolean`\> #### Parameters ##### channelId `string` #### Returns `Promise`\<`boolean`\> *** ### set() > **set**(`channelId`, `snapshot`): `Promise`\<`void`\> #### Parameters ##### channelId `string` ##### snapshot `string` #### Returns `Promise`\<`void`\> #### Overrides [`ChannelSnapshotStore`](ChannelSnapshotStore.md).[`set`](ChannelSnapshotStore.md#set) --- ## Page: DurableChannelSnapshotStoreOptions URL: https://docs.totem.ing/api/totemsdk-omnia-pool/interfaces/DurableChannelSnapshotStoreOptions [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / DurableChannelSnapshotStoreOptions # Interface: DurableChannelSnapshotStoreOptions ## Properties ### namespace? > `readonly` `optional` **namespace?**: `string` Key namespace prefix; default `totem_omnia_pool:v1:`. *** ### requireAckMode? > `readonly` `optional` **requireAckMode?**: `"volatile"` \| `"buffered"` \| `"durably-acknowledged"` Required write acknowledgment; default `durably-acknowledged`. Pass `volatile` only for tests/scratch adapters (e.g. `MemoryStore`). --- ## Page: FactoryExecutionPort URL: https://docs.totem.ing/api/totemsdk-omnia-pool/interfaces/FactoryExecutionPort [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / FactoryExecutionPort # Interface: FactoryExecutionPort Minimal port wrapping live channel factory operations. ## Methods ### closeFactory() > **closeFactory**(`factory`): `Promise`\<`FactorySettlementPayload`\> #### Parameters ##### factory `ChannelFactory` #### Returns `Promise`\<`FactorySettlementPayload`\> *** ### closeVirtualChannel() > **closeVirtualChannel**(`factory`, `channelId`): `Promise`\<`ChannelFactory`\> #### Parameters ##### factory `ChannelFactory` ##### channelId `string` #### Returns `Promise`\<`ChannelFactory`\> *** ### createFactory() > **createFactory**(`params`): `Promise`\<`ChannelFactory`\> #### Parameters ##### params `FactoryCreationParams` #### Returns `Promise`\<`ChannelFactory`\> *** ### openVirtualChannel() > **openVirtualChannel**(`factory`, `params`): `Promise`\<\{ `channel`: `OmniaChannel`; `factory`: `ChannelFactory`; \}\> #### Parameters ##### factory `ChannelFactory` ##### params `FactoryVirtualChannelParams` #### Returns `Promise`\<\{ `channel`: `OmniaChannel`; `factory`: `ChannelFactory`; \}\> *** ### reallocate() > **reallocate**(`factory`, `allocation`): `Promise`\<`ChannelFactory`\> #### Parameters ##### factory `ChannelFactory` ##### allocation `Record`\<`string`, `string`\> #### Returns `Promise`\<`ChannelFactory`\> --- ## Page: OmniaExecutionPort URL: https://docs.totem.ing/api/totemsdk-omnia-pool/interfaces/OmniaExecutionPort [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / OmniaExecutionPort # Interface: OmniaExecutionPort Minimal port wrapping live Omnia channel operations. ## Methods ### addHTLC() > **addHTLC**(`channel`, `params`): `Promise`\<`OmniaChannel`\> #### Parameters ##### channel `OmniaChannel` ##### params `AddHTLCParams` #### Returns `Promise`\<`OmniaChannel`\> *** ### closeChannel() > **closeChannel**(`channel`): `Promise`\<[`ChannelCloseResult`](ChannelCloseResult.md)\> Close a channel and return its final close artifact. #### Parameters ##### channel `OmniaChannel` #### Returns `Promise`\<[`ChannelCloseResult`](ChannelCloseResult.md)\> *** ### createChannel() > **createChannel**(`params`): `Promise`\<`OmniaChannel`\> #### Parameters ##### params `CreateChannelParams` #### Returns `Promise`\<`OmniaChannel`\> *** ### fulfillHTLC() > **fulfillHTLC**(`channel`, `htlcId`, `preimage`): `Promise`\<`OmniaChannel`\> #### Parameters ##### channel `OmniaChannel` ##### htlcId `string` ##### preimage `Uint8Array` #### Returns `Promise`\<`OmniaChannel`\> *** ### proposeSettlement() > **proposeSettlement**(`channel`): `Promise`\<`SettlementPayload`\> #### Parameters ##### channel `OmniaChannel` #### Returns `Promise`\<`SettlementPayload`\> *** ### updateState() > **updateState**(`channel`, `delta`): `Promise`\<`SignedChannelState`\> #### Parameters ##### channel `OmniaChannel` ##### delta `UpdateDelta` #### Returns `Promise`\<`SignedChannelState`\> *** ### verifyStateForCoSign() > **verifyStateForCoSign**(`channel`, `state`): `Promise`\<\{ `errors`: `string`[]; `valid`: `boolean`; \}\> Validate a one-party state update before this node adds its co-signature. The co-sign verification boundary is load-bearing — it prevents a taker from attaching a signature to a bad state — so it is a port, not caller-side boilerplate. #### Parameters ##### channel `OmniaChannel` ##### state `SignedChannelState` #### Returns `Promise`\<\{ `errors`: `string`[]; `valid`: `boolean`; \}\> --- ## Page: OmniaPool URL: https://docs.totem.ing/api/totemsdk-omnia-pool/interfaces/OmniaPool [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / OmniaPool # Interface: OmniaPool ## Properties ### deploymentContext? > `optional` **deploymentContext?**: [`OmniaPoolDeploymentContext`](OmniaPoolDeploymentContext.md) *** ### manifest > **manifest**: `LiquidityPoolManifest` *** ### poolId > **poolId**: `string` *** ### registry > **registry**: `LiquidityBondRegistryState` --- ## Page: OmniaPoolAllocationContext URL: https://docs.totem.ing/api/totemsdk-omnia-pool/interfaces/OmniaPoolAllocationContext [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / OmniaPoolAllocationContext # Interface: OmniaPoolAllocationContext ## Properties ### factory? > `optional` **factory?**: [`FactoryExecutionPort`](FactoryExecutionPort.md) Execute channel factory operations. *** ### leaseProvider? > `optional` **leaseProvider?**: `WotsLeaseProvider` WOTS lease provider used for per-signing key reservations. *** ### loadChannel? > `optional` **loadChannel?**: (`channelId`) => `Promise`\<`OmniaChannel`\> Materialize a live Omnia channel from its id. Default impl reads a stored channel snapshot via `recoverChannel(deserializeChannelSnapshot(snapshot))` — see `createChannelLoader`. The allocation/withdrawal path calls `loadChannel(position.omniaChannelId)` instead of requiring the caller to inject the live object. #### Parameters ##### channelId `string` #### Returns `Promise`\<`OmniaChannel`\> *** ### omnia? > `optional` **omnia?**: [`OmniaExecutionPort`](OmniaExecutionPort.md) Execute direct Omnia channel operations. *** ### router? > `optional` **router?**: [`RouterExecutionPort`](RouterExecutionPort.md) Execute router channel graph operations. *** ### saveChannelSnapshot? > `optional` **saveChannelSnapshot?**: (`channel`) => `void` \| `Promise`\<`void`\> Persist a channel snapshot after create/update/close so it can be reloaded later. #### Parameters ##### channel `OmniaChannel` #### Returns `void` \| `Promise`\<`void`\> *** ### signer? > `optional` **signer?**: [`PoolSigner`](PoolSigner.md) Lease-backed signer aligned with Omnia's `ChannelSigner` (WOTS + signing indices). *** ### splice? > `optional` **splice?**: [`SpliceExecutionPort`](SpliceExecutionPort.md) Execute splice operations. *** ### vtxo? > `optional` **vtxo?**: [`VtxoExecutionPort`](VtxoExecutionPort.md) Execute VTXO pool operations. --- ## Page: OmniaPoolDeploymentContext URL: https://docs.totem.ing/api/totemsdk-omnia-pool/interfaces/OmniaPoolDeploymentContext [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / OmniaPoolDeploymentContext # Interface: OmniaPoolDeploymentContext ## Properties ### chainProvider? > `optional` **chainProvider?**: `ChainStateProvider` Chain state provider for coin lookup and broadcast. *** ### fundingVerifier? > `optional` **fundingVerifier?**: `LiquidityChainFundingVerifier` On-chain funding verifier — required to confirm LP deposits. *** ### leaseBundle? > `optional` **leaseBundle?**: `WotsLeaseBundle` WOTS lease bundle for pool-level signing. *** ### signer? > `optional` **signer?**: [`PoolSigner`](PoolSigner.md) Optional signer for pool-level operations. --- ## Page: OmniaPoolFeeRecord URL: https://docs.totem.ing/api/totemsdk-omnia-pool/interfaces/OmniaPoolFeeRecord [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / OmniaPoolFeeRecord # Interface: OmniaPoolFeeRecord ## Properties ### amount > **amount**: `string` *** ### feeRecordId > **feeRecordId**: `string` *** ### positionId > **positionId**: `string` *** ### recordedAt > **recordedAt**: `number` *** ### source > **source**: `FeeSource` *** ### tokenId > **tokenId**: `string` --- ## Page: OmniaPoolWithdrawalResult URL: https://docs.totem.ing/api/totemsdk-omnia-pool/interfaces/OmniaPoolWithdrawalResult [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / OmniaPoolWithdrawalResult # Interface: OmniaPoolWithdrawalResult ## Properties ### execution? > `optional` **execution?**: `unknown` Optional live execution artifact (e.g. settlement payload, exit draft). *** ### intent > **intent**: `WithdrawalIntent` *** ### position > **position**: `LiquidityPosition` *** ### state > **state**: `LiquidityBondRegistryState` --- ## Page: PoolNAV URL: https://docs.totem.ing/api/totemsdk-omnia-pool/interfaces/PoolNAV [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / PoolNAV # Interface: PoolNAV ## Properties ### accruedFees > **accruedFees**: `bigint` Sum of recorded but unclaimed LP fees. *** ### nav > **nav**: `bigint` Net asset value = totalCommitted + accruedFees. *** ### totalAllocated > **totalAllocated**: `bigint` Capital currently allocated to live execution backends. *** ### totalAvailable > **totalAvailable**: `bigint` Capital available for new allocations. *** ### totalCommitted > **totalCommitted**: `bigint` Total committed capital across all positions. *** ### totalReserved > **totalReserved**: `bigint` Capital reserved but not yet allocated. --- ## Page: PoolSigner URL: https://docs.totem.ing/api/totemsdk-omnia-pool/interfaces/PoolSigner [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / PoolSigner # Interface: PoolSigner Signer aligned with `@totemsdk/omnia` `ChannelSigner`: lease-backed WOTS with signing indices — `sign(digest)` alone is too thin for Omnia. A `PoolSigner` is structurally a `ChannelSigner` (plus an optional convenience reader). ## Extends - `ChannelSigner` ## Properties ### publicKeyDigest > **publicKeyDigest**: `string` #### Inherited from `ChannelSigner.publicKeyDigest` ## Methods ### getPublicKey()? > `optional` **getPublicKey**(): `Promise`\<`string`\> #### Returns `Promise`\<`string`\> *** ### sign() > **sign**(`payload`, `indices`): `Promise`\<`ChannelSignature`\> Returns flat WOTS signature bytes (output of wotsSign). #### Parameters ##### payload `Uint8Array` ##### indices `SigningIndices` #### Returns `Promise`\<`ChannelSignature`\> #### Inherited from `ChannelSigner.sign` --- ## Page: PreparedRebalanceStep URL: https://docs.totem.ing/api/totemsdk-omnia-pool/interfaces/PreparedRebalanceStep [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / PreparedRebalanceStep # Interface: PreparedRebalanceStep A prepared rebalance step: the wallet-built tx draft + its canonical facts. ## Properties ### action > **action**: `string` *** ### allocation? > `optional` **allocation?**: `object` The pool allocation mutation the rebalance performs. #### params > **params**: [`RebalanceAllocationParams`](../type-aliases/RebalanceAllocationParams.md) #### position > **position**: `LiquidityPosition` #### registry > **registry**: `LiquidityBondRegistryState` *** ### channelUpdate? > `optional` **channelUpdate?**: [`RebalanceChannelUpdate`](RebalanceChannelUpdate.md) The channel update the rebalance performs (for execution). *** ### draft? > `optional` **draft?**: `OmniaTxDraft` The Omnia tx draft the wallet built (or simulated). Optional for pure pool mutations. *** ### executionReceipt? > `optional` **executionReceipt?**: `unknown` *** ### nonce > **nonce**: `string` *** ### postconditionsVerified? > `optional` **postconditionsVerified?**: `boolean` *** ### quoteTimestamp? > `optional` **quoteTimestamp?**: `number` *** ### simulation? > `optional` **simulation?**: `unknown` Quote/simulation evidence captured by the wallet. *** ### stepId > **stepId**: `string` --- ## Page: RebalanceChannelUpdate URL: https://docs.totem.ing/api/totemsdk-omnia-pool/interfaces/RebalanceChannelUpdate [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / RebalanceChannelUpdate # Interface: RebalanceChannelUpdate The channel state update a rebalance performs on a live channel. ## Properties ### channel > **channel**: `OmniaChannel` *** ### newBalances > **newBalances**: `Record`\<`string`, `bigint`\> *** ### operation > **operation**: `string` The channel operation string recorded in the canonical action. --- ## Page: RegistryRootingContext URL: https://docs.totem.ing/api/totemsdk-omnia-pool/interfaces/RegistryRootingContext [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / RegistryRootingContext # Interface: RegistryRootingContext Optional signing context that makes a registry transition anchorable. ## Properties ### op? > `optional` **op?**: `RegistryOperation` *** ### previousRoot? > `optional` **previousRoot?**: `string` *** ### reason? > `optional` **reason?**: `string` *** ### signer > **signer**: `RegistryTransitionSigner` --- ## Page: RouterExecutionPort URL: https://docs.totem.ing/api/totemsdk-omnia-pool/interfaces/RouterExecutionPort [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / RouterExecutionPort # Interface: RouterExecutionPort Minimal port wrapping live router operations. ## Methods ### addChannel() > **addChannel**(`graph`, `channel`): `ChannelGraph` #### Parameters ##### graph `ChannelGraph` ##### channel `RouterChannel` #### Returns `ChannelGraph` *** ### createChannelGraph() > **createChannelGraph**(): `ChannelGraph` #### Returns `ChannelGraph` *** ### executeMultiHopPayment() > **executeMultiHopPayment**(`graph`, `route`, `channelOps`): `Promise`\<`PaymentResult`\> #### Parameters ##### graph `ChannelGraph` ##### route `Route` ##### channelOps `ChannelOps` #### Returns `Promise`\<`PaymentResult`\> *** ### findRoute() > **findRoute**(`graph`, `request`): `Route` \| `undefined` #### Parameters ##### graph `ChannelGraph` ##### request `PaymentRequest` #### Returns `Route` \| `undefined` --- ## Page: SpliceExecutionPort URL: https://docs.totem.ing/api/totemsdk-omnia-pool/interfaces/SpliceExecutionPort [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / SpliceExecutionPort # Interface: SpliceExecutionPort Minimal port wrapping live splice operations. ## Methods ### acceptSplice() > **acceptSplice**(`proposal`): `Promise`\<`SpliceAcceptance`\> #### Parameters ##### proposal `SpliceProposal` #### Returns `Promise`\<`SpliceAcceptance`\> *** ### finalizeSplice() > **finalizeSplice**(`acceptance`): `Promise`\<`SplicedChannel`\> #### Parameters ##### acceptance `SpliceAcceptance` #### Returns `Promise`\<`SplicedChannel`\> *** ### proposeSpliceOut() > **proposeSpliceOut**(`params`): `Promise`\<`SpliceProposal`\> #### Parameters ##### params `SpliceParams` #### Returns `Promise`\<`SpliceProposal`\> *** ### quiesceChannel() > **quiesceChannel**(`channel`): `Promise`\<`QuiescedChannel`\> #### Parameters ##### channel `OmniaChannel` #### Returns `Promise`\<`QuiescedChannel`\> --- ## Page: VtxoExecutionPort URL: https://docs.totem.ing/api/totemsdk-omnia-pool/interfaces/VtxoExecutionPort [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / VtxoExecutionPort # Interface: VtxoExecutionPort Minimal port wrapping live VTXO pool operations. ## Methods ### createExitDraft() > **createExitDraft**(`vtxo`): `Promise`\<`ExitDraft`\> #### Parameters ##### vtxo `OmniaVtxo` #### Returns `Promise`\<`ExitDraft`\> *** ### createPool() > **createPool**(`params`): `Promise`\<`OmniaVtxoPool`\> #### Parameters ##### params ###### nonce `string` ###### operator `string` ###### policy? `unknown` ###### poolId `string` ###### tokenId `string` ###### totalCapacity `string` #### Returns `Promise`\<`OmniaVtxoPool`\> *** ### markExited() > **markExited**(`pool`, `vtxoId`, `txpowId`): `Promise`\<`OmniaVtxoPool`\> #### Parameters ##### pool `OmniaVtxoPool` ##### vtxoId `string` ##### txpowId `string` #### Returns `Promise`\<`OmniaVtxoPool`\> *** ### markExiting() > **markExiting**(`pool`, `vtxoId`): `Promise`\<`OmniaVtxoPool`\> #### Parameters ##### pool `OmniaVtxoPool` ##### vtxoId `string` #### Returns `Promise`\<`OmniaVtxoPool`\> *** ### mintVtxo() > **mintVtxo**(`pool`, `params`): `Promise`\<\{ `pool`: `OmniaVtxoPool`; `vtxo`: `OmniaVtxo`; \}\> #### Parameters ##### pool `OmniaVtxoPool` ##### params `MintVtxoParams` #### Returns `Promise`\<\{ `pool`: `OmniaVtxoPool`; `vtxo`: `OmniaVtxo`; \}\> --- ## Page: WithdrawLiquidityOptions URL: https://docs.totem.ing/api/totemsdk-omnia-pool/interfaces/WithdrawLiquidityOptions [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / WithdrawLiquidityOptions # Interface: WithdrawLiquidityOptions Options for creating a withdrawal intent. ## Properties ### amount > **amount**: `string` *** ### positionId > **positionId**: `string` *** ### reason? > `optional` **reason?**: `string` *** ### recipientAddress > **recipientAddress**: `string` --- ## Page: AllocatePositionCapitalParams URL: https://docs.totem.ing/api/totemsdk-omnia-pool/type-aliases/AllocatePositionCapitalParams [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / AllocatePositionCapitalParams # Type Alias: AllocatePositionCapitalParams > **AllocatePositionCapitalParams** = `object` Params exported from allocate.ts for the public index. ## Properties ### allocationType > **allocationType**: `AllocationType` *** ### amount > **amount**: `string` *** ### anchorRoot? > `optional` **anchorRoot?**: `string` Pool registry anchor root — verified against the channel's program state at co-sign (#26). *** ### ctx? > `optional` **ctx?**: [`OmniaPoolAllocationContext`](../interfaces/OmniaPoolAllocationContext.md) *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### position > **position**: `LiquidityPosition` *** ### purpose > **purpose**: `LiquidityPurpose` *** ### rooting? > `optional` **rooting?**: [`RegistryRootingContext`](../interfaces/RegistryRootingContext.md) When set, the produced registry transition is signed and anchored. *** ### target > **target**: [`AllocationTarget`](AllocationTarget.md) --- ## Page: AllocationResult URL: https://docs.totem.ing/api/totemsdk-omnia-pool/type-aliases/AllocationResult [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / AllocationResult # Type Alias: AllocationResult > **AllocationResult** = `object` ## Properties ### allocation > **allocation**: `LiquidityAllocation` *** ### execution? > `optional` **execution?**: `unknown` *** ### position > **position**: `LiquidityPosition` *** ### registry > **registry**: `LiquidityBondRegistryState` *** ### signedTransition? > `optional` **signedTransition?**: `RegistrySignedTransition` --- ## Page: AllocationTarget URL: https://docs.totem.ing/api/totemsdk-omnia-pool/type-aliases/AllocationTarget [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / AllocationTarget # Type Alias: AllocationTarget > **AllocationTarget** = \{ `params`: `CreateChannelParams`; `type`: `"channel"`; \} \| \{ `params`: `FactoryCreationParams`; `type`: `"factory"`; \} \| \{ `channel`: `RouterChannel`; `type`: `"router"`; \} \| \{ `params`: `MintVtxoParams`; `pool`: `OmniaVtxoPool`; `type`: `"vtxo"`; \} \| \{ `purpose`: `string`; `type`: `"reserve"`; \} Convenience type for allocation targets. --- ## Page: ExecutePoolPayoutParams URL: https://docs.totem.ing/api/totemsdk-omnia-pool/type-aliases/ExecutePoolPayoutParams [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / ExecutePoolPayoutParams # Type Alias: ExecutePoolPayoutParams > **ExecutePoolPayoutParams** = `object` ## Properties ### ctx? > `optional` **ctx?**: [`OmniaPoolAllocationContext`](../interfaces/OmniaPoolAllocationContext.md) *** ### intent > **intent**: `WithdrawalIntent` *** ### pool > **pool**: `LiquidityPoolManifest` *** ### position > **position**: `LiquidityPosition` *** ### recipientAddress > **recipientAddress**: `string` *** ### rooting? > `optional` **rooting?**: [`RegistryRootingContext`](../interfaces/RegistryRootingContext.md) --- ## Page: RebalanceAllocationParams URL: https://docs.totem.ing/api/totemsdk-omnia-pool/type-aliases/RebalanceAllocationParams [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / RebalanceAllocationParams # Type Alias: RebalanceAllocationParams > **RebalanceAllocationParams** = `object` ## Properties ### amount > **amount**: `string` *** ### ctx? > `optional` **ctx?**: [`OmniaPoolAllocationContext`](../interfaces/OmniaPoolAllocationContext.md) *** ### from > **from**: `LiquidityAllocation` *** ### rooting? > `optional` **rooting?**: [`RegistryRootingContext`](../interfaces/RegistryRootingContext.md) *** ### toTarget > **toTarget**: [`AllocationTarget`](AllocationTarget.md) --- ## Page: RecordPoolFeeParams URL: https://docs.totem.ing/api/totemsdk-omnia-pool/type-aliases/RecordPoolFeeParams [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / RecordPoolFeeParams # Type Alias: RecordPoolFeeParams > **RecordPoolFeeParams** = `object` ## Properties ### earnProof? > `optional` **earnProof?**: `unknown` Required for earnable sources — the payment proof backing the fee. *** ### grossAmount > **grossAmount**: `string` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### pool > **pool**: `LiquidityPoolManifest` *** ### position > **position**: `LiquidityPosition` *** ### source > **source**: `FeeSource` *** ### verified? > `optional` **verified?**: `boolean` Set when the earn-proof was verified (see liquidity-bond verifyLiquidityFeeRecord). --- ## Page: ReleaseAllocationParams URL: https://docs.totem.ing/api/totemsdk-omnia-pool/type-aliases/ReleaseAllocationParams [**@totemsdk/omnia-pool**](../index.md) *** [@totemsdk/omnia-pool](../index.md) / ReleaseAllocationParams # Type Alias: ReleaseAllocationParams > **ReleaseAllocationParams** = `object` ## Properties ### allocation > **allocation**: `LiquidityAllocation` *** ### position > **position**: `LiquidityPosition` --- ## Page: addChannel URL: https://docs.totem.ing/api/totemsdk-omnia-router/functions/addChannel [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / addChannel # Function: addChannel() > **addChannel**(`graph`, `edge`): `void` Add a directed channel edge to the graph. A single logical channel between two parties has two directed edges — one per direction of flow. Both may be added independently using the same `channelId` because they are keyed by `(channelId, from)`. Calling `addChannel` twice with the same `(channelId, from)` replaces the first entry (balance update semantics). ## Parameters ### graph [`ChannelGraph`](../interfaces/ChannelGraph.md) ### edge [`ChannelGraphEdge`](../interfaces/ChannelGraphEdge.md) ## Returns `void` --- ## Page: announceSwap URL: https://docs.totem.ing/api/totemsdk-omnia-router/functions/announceSwap [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / announceSwap # Function: announceSwap() > **announceSwap**(`graph`, `announcement`): `void` Register a swap announcement from a bridging intermediary. Validates that the rate is a positive finite decimal before storing. Throws `Error` if the rate is zero or negative. Duplicate announcements (same `intermediaryPubKey` + `inboundChannelId`) are replaced to prevent stale rate data. ## Parameters ### graph [`ChannelGraph`](../interfaces/ChannelGraph.md) ### announcement [`SwapAnnouncement`](../interfaces/SwapAnnouncement.md) ## Returns `void` --- ## Page: applyRate URL: https://docs.totem.ing/api/totemsdk-omnia-router/functions/applyRate [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / applyRate # Function: applyRate() > **applyRate**(`amountIn`, `rate`): `bigint` Apply rate to amount: amountOut = amountIn × rateScaled / SCALE ## Parameters ### amountIn `bigint` ### rate `string` ## Returns `bigint` --- ## Page: buildCrossTokenRequest URL: https://docs.totem.ing/api/totemsdk-omnia-router/functions/buildCrossTokenRequest [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / buildCrossTokenRequest # Function: buildCrossTokenRequest() > **buildCrossTokenRequest**(`amountOut`, `tokenOut`, `expiryBlock`, `description?`): [`PaymentRequest`](../interfaces/PaymentRequest.md) Recipient-side variant: generates a payment request for the token they want to receive. The API is identical to buildPaymentRequest — the distinction is conceptual (recipient generates hashlock; sender sources liquidity). ## Parameters ### amountOut `bigint` ### tokenOut `string` ### expiryBlock `bigint` ### description? `string` ## Returns [`PaymentRequest`](../interfaces/PaymentRequest.md) --- ## Page: buildPaymentRequest URL: https://docs.totem.ing/api/totemsdk-omnia-router/functions/buildPaymentRequest [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / buildPaymentRequest # Function: buildPaymentRequest() > **buildPaymentRequest**(`amount`, `tokenId`, `expiryBlock`, `description?`): [`PaymentRequest`](../interfaces/PaymentRequest.md) Generate a random 32-byte preimage, compute SHA3-256(preimage) as the hashlock, and return a PaymentRequest that is ready to share. The returned PaymentRequest includes the `preimage` field so the payer can call executeMultiHopPayment. Strip `preimage` before forwarding the request to intermediaries. Compatible with Bare/Pear environments: uses globalThis.crypto.getRandomValues (Web Crypto API, available in Node ≥18, browsers, and Pear/Bare runtimes). ## Parameters ### amount `bigint` ### tokenId `string` ### expiryBlock `bigint` ### description? `string` ## Returns [`PaymentRequest`](../interfaces/PaymentRequest.md) --- ## Page: buildRouterFeeProof URL: https://docs.totem.ing/api/totemsdk-omnia-router/functions/buildRouterFeeProof [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / buildRouterFeeProof # Function: buildRouterFeeProof() > **buildRouterFeeProof**(`channel`, `htlc`, `settledAt?`): [`RouterFeeProof`](../interfaces/RouterFeeProof.md) Build a verifiable fee-provenance record for a settled hop (#29). The pool's `recordPoolFee` earn-proof consumes this — a fee record can be traced to a real fulfilled payment, never a declared string. ## Parameters ### channel [`RouterChannel`](../interfaces/RouterChannel.md) ### htlc [`ChannelHTLC`](../interfaces/ChannelHTLC.md) ### settledAt? `number` ## Returns [`RouterFeeProof`](../interfaces/RouterFeeProof.md) --- ## Page: cancelPayment URL: https://docs.totem.ing/api/totemsdk-omnia-router/functions/cancelPayment [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / cancelPayment # Function: cancelPayment() > **cancelPayment**(`ops`, `channels`, `route`, `leaseProviders`): `Promise`\<`void`\> Cancel all pending HTLCs on a route by calling timeoutHTLC on each hop. Call this explicitly to roll back before or without attempting execution. ## Parameters ### ops [`ChannelOps`](../interfaces/ChannelOps.md) ### channels `Map`\<`string`, [`RouterChannel`](../interfaces/RouterChannel.md)\> ### route [`Route`](../interfaces/Route.md) ### leaseProviders `Map`\<`string`, `unknown`\> ## Returns `Promise`\<`void`\> --- ## Page: computeRouterFeeProofHash URL: https://docs.totem.ing/api/totemsdk-omnia-router/functions/computeRouterFeeProofHash [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / computeRouterFeeProofHash # Function: computeRouterFeeProofHash() > **computeRouterFeeProofHash**(`proof`): `string` ## Parameters ### proof [`RouterFeeProof`](../interfaces/RouterFeeProof.md) ## Returns `string` --- ## Page: createChannelGraph URL: https://docs.totem.ing/api/totemsdk-omnia-router/functions/createChannelGraph [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / createChannelGraph # Function: createChannelGraph() > **createChannelGraph**(): [`ChannelGraph`](../interfaces/ChannelGraph.md) Create an empty ChannelGraph. ## Returns [`ChannelGraph`](../interfaces/ChannelGraph.md) --- ## Page: createDurableRouterLedger URL: https://docs.totem.ing/api/totemsdk-omnia-router/functions/createDurableRouterLedger [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / createDurableRouterLedger # Function: createDurableRouterLedger() > **createDurableRouterLedger**(`adapter`, `options?`): [`DurableRouterLedger`](../interfaces/DurableRouterLedger.md) ## Parameters ### adapter `StorageAdapterWithCapabilities` & `CasStore` ### options? [`DurableRouterLedgerOptions`](../interfaces/DurableRouterLedgerOptions.md) = `{}` ## Returns [`DurableRouterLedger`](../interfaces/DurableRouterLedger.md) --- ## Page: executeCrossTokenPayment URL: https://docs.totem.ing/api/totemsdk-omnia-router/functions/executeCrossTokenPayment [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / executeCrossTokenPayment # Function: executeCrossTokenPayment() > **executeCrossTokenPayment**(`ops`, `channels`, `route`, `paymentRequest`, `leaseProviders`): `Promise`\<[`PaymentResult`](../interfaces/PaymentResult.md)\> Execute a cross-token payment atomically. For each SwapHop: 1. Lock the inbound HTLC (tokenIn side). 2. Lock the outbound HTLC (tokenOut side). Both use the same hashlock — the intermediary can only claim by revealing the preimage on both sides simultaneously. Then forward-locks all remaining non-swap hops, and reveals the preimage backwards across all locked channels. Rollback fires on ANY failure (forward OR backward phase) by timing out all still-pending locked HTLCs. ## Parameters ### ops [`ChannelOps`](../interfaces/ChannelOps.md) ### channels `Map`\<`string`, [`RouterChannel`](../interfaces/RouterChannel.md)\> ### route [`CrossTokenRoute`](../interfaces/CrossTokenRoute.md) ### paymentRequest [`PaymentRequest`](../interfaces/PaymentRequest.md) ### leaseProviders `Map`\<`string`, `unknown`\> ## Returns `Promise`\<[`PaymentResult`](../interfaces/PaymentResult.md)\> --- ## Page: executeMultiHopPayment URL: https://docs.totem.ing/api/totemsdk-omnia-router/functions/executeMultiHopPayment [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / executeMultiHopPayment # Function: executeMultiHopPayment() > **executeMultiHopPayment**(`ops`, `channels`, `route`, `paymentRequest`, `leaseProviders`): `Promise`\<[`PaymentResult`](../interfaces/PaymentResult.md)\> Execute a single-token multi-hop payment atomically: 1. Forward phase — lock HTLCs across each hop in route.hops. 2. Reveal phase — reveal preimage via fulfillHTLC in reverse order. Rollback (best-effort timeoutHTLC on all still-pending locks) fires on ANY failure, including failures that occur during the reveal phase — so stranded HTLCs are never left behind silently. `paymentRequest.preimage` MUST be set (buildPaymentRequest sets it). The `channels` map is updated in-place after each HTLC operation. ## Parameters ### ops [`ChannelOps`](../interfaces/ChannelOps.md) ### channels `Map`\<`string`, [`RouterChannel`](../interfaces/RouterChannel.md)\> ### route [`Route`](../interfaces/Route.md) ### paymentRequest [`PaymentRequest`](../interfaces/PaymentRequest.md) ### leaseProviders `Map`\<`string`, `unknown`\> ## Returns `Promise`\<[`PaymentResult`](../interfaces/PaymentResult.md)\> --- ## Page: findCrossTokenRoute URL: https://docs.totem.ing/api/totemsdk-omnia-router/functions/findCrossTokenRoute [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / findCrossTokenRoute # Function: findCrossTokenRoute() > **findCrossTokenRoute**(`graph`, `from`, `to`, `amountIn`, `tokenIn`, `tokenOut`, `opts?`): [`CrossTokenRoute`](../interfaces/CrossTokenRoute.md) \| `null` Find a cross-token route where the sender spends `tokenIn` and the recipient receives `tokenOut`. The path may include one or more swap hops provided by bridging intermediaries registered via announceSwap. Selection criteria: lowest total fee (including swap fee), then fewest hops, then fewest swap hops. ## Parameters ### graph [`ChannelGraph`](../interfaces/ChannelGraph.md) ### from `string` ### to `string` ### amountIn `bigint` ### tokenIn `string` ### tokenOut `string` ### opts? [`RouteOptions`](../interfaces/RouteOptions.md) ## Returns [`CrossTokenRoute`](../interfaces/CrossTokenRoute.md) \| `null` --- ## Page: findRoute URL: https://docs.totem.ing/api/totemsdk-omnia-router/functions/findRoute [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / findRoute # Function: findRoute() > **findRoute**(`graph`, `from`, `to`, `amount`, `tokenId`, `opts?`): [`Route`](../interfaces/Route.md) \| `null` Find the cheapest route (lowest total fee, then fewest hops) from `from` to `to` carrying `amount` of `tokenId`. Edges are filtered by tokenId and availableBalance. Returns null if no path exists within maxHops. ## Parameters ### graph [`ChannelGraph`](../interfaces/ChannelGraph.md) ### from `string` ### to `string` ### amount `bigint` ### tokenId `string` ### opts? [`RouteOptions`](../interfaces/RouteOptions.md) ## Returns [`Route`](../interfaces/Route.md) \| `null` --- ## Page: getSwapAnnouncements URL: https://docs.totem.ing/api/totemsdk-omnia-router/functions/getSwapAnnouncements [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / getSwapAnnouncements # Function: getSwapAnnouncements() > **getSwapAnnouncements**(`graph`, `tokenIn`, `tokenOut`): [`SwapAnnouncement`](../interfaces/SwapAnnouncement.md)[] Return all swap announcements for a given token pair, or an empty array. ## Parameters ### graph [`ChannelGraph`](../interfaces/ChannelGraph.md) ### tokenIn `string` ### tokenOut `string` ## Returns [`SwapAnnouncement`](../interfaces/SwapAnnouncement.md)[] --- ## Page: parseRateToScaled URL: https://docs.totem.ing/api/totemsdk-omnia-router/functions/parseRateToScaled [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / parseRateToScaled # Function: parseRateToScaled() > **parseRateToScaled**(`rate`): `bigint` Parse a decimal rate string to a scaled bigint (SCALE = 10^8). "0.95" → 95_000_000n, "1.5" → 150_000_000n, "2" → 200_000_000n. ## Parameters ### rate `string` ## Returns `bigint` --- ## Page: removeChannel URL: https://docs.totem.ing/api/totemsdk-omnia-router/functions/removeChannel [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / removeChannel # Function: removeChannel() > **removeChannel**(`graph`, `channelId`): `void` Remove ALL directed edges for `channelId` (i.e. both directions). No-op if the channelId is not present. ## Parameters ### graph [`ChannelGraph`](../interfaces/ChannelGraph.md) ### channelId `string` ## Returns `void` --- ## Page: ChannelGraph URL: https://docs.totem.ing/api/totemsdk-omnia-router/interfaces/ChannelGraph [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / ChannelGraph # Interface: ChannelGraph In-memory channel graph with a swap announcement index. A single logical channel may have up to two directed edges (one per direction of flow, e.g. Alice→Bob and Bob→Alice). Both edges share the same `channelId` and are stored together in `edgesByChannel`. ## Properties ### edgesByChannel > **edgesByChannel**: `Map`\<`string`, [`ChannelGraphEdge`](ChannelGraphEdge.md)[]\> All directed edges for a channel, keyed by channelId. Value is an array because a bidirectional channel has two directed edges. *** ### nodeEdges > **nodeEdges**: `Map`\<`string`, [`ChannelGraphEdge`](ChannelGraphEdge.md)[]\> Directed edges keyed by sender pubkey *** ### swapIndex > **swapIndex**: `Map`\<`string`, [`SwapAnnouncement`](SwapAnnouncement.md)[]\> Swap announcements keyed by `${tokenIn}:${tokenOut}` --- ## Page: ChannelGraphEdge URL: https://docs.totem.ing/api/totemsdk-omnia-router/interfaces/ChannelGraphEdge [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / ChannelGraphEdge # Interface: ChannelGraphEdge A directed edge in the channel graph. For a bidirectional channel, add two edges (one per direction). ## Properties ### availableBalance > **availableBalance**: `bigint` Sender's available balance in scaled units *** ### channelId > **channelId**: `string` *** ### feeRate > **feeRate**: `bigint` Fee per SCALE units of amount (e.g. 100_000n = 0.1%) *** ### from > **from**: `string` Sender's public key digest *** ### htlcCapacity > **htlcCapacity**: `bigint` Maximum additional HTLC capacity in scaled units *** ### to > **to**: `string` Recipient's public key digest *** ### tokenId > **tokenId**: `string` --- ## Page: ChannelHTLC URL: https://docs.totem.ing/api/totemsdk-omnia-router/interfaces/ChannelHTLC [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / ChannelHTLC # Interface: ChannelHTLC ## Properties ### amount > **amount**: `bigint` *** ### direction > **direction**: `"offered"` \| `"received"` *** ### hashlock > **hashlock**: `string` *** ### htlcAddress > **htlcAddress**: `string` *** ### htlcId > **htlcId**: `string` *** ### recipientPublicKeyDigest > **recipientPublicKeyDigest**: `string` *** ### senderPublicKeyDigest > **senderPublicKeyDigest**: `string` *** ### status > **status**: [`HTLCStatus`](../type-aliases/HTLCStatus.md) *** ### timeoutBlock > **timeoutBlock**: `bigint` --- ## Page: ChannelOps URL: https://docs.totem.ing/api/totemsdk-omnia-router/interfaces/ChannelOps [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / ChannelOps # Interface: ChannelOps Dependency-injected HTLC operations. In production, wire in the real functions from @totemsdk/omnia: import { addHTLC, fulfillHTLC, timeoutHTLC } from '@totemsdk/omnia'; const ops: ChannelOps = { addHTLC, fulfillHTLC, timeoutHTLC }; In tests, pass mocks directly — no jest.mock() needed. ## Methods ### addHTLC() > **addHTLC**(`channel`, `params`, `leaseProvider`): `Promise`\<\{ `channel`: [`RouterChannel`](RouterChannel.md); `error?`: `string`; `htlcId`: `string`; \}\> #### Parameters ##### channel [`RouterChannel`](RouterChannel.md) ##### params [`HTLCParams`](HTLCParams.md) ##### leaseProvider `unknown` #### Returns `Promise`\<\{ `channel`: [`RouterChannel`](RouterChannel.md); `error?`: `string`; `htlcId`: `string`; \}\> *** ### fulfillHTLC() > **fulfillHTLC**(`channel`, `htlcId`, `preimage`, `leaseProvider`): `Promise`\<\{ `channel`: [`RouterChannel`](RouterChannel.md); `error?`: `string`; \}\> #### Parameters ##### channel [`RouterChannel`](RouterChannel.md) ##### htlcId `string` ##### preimage `string` ##### leaseProvider `unknown` #### Returns `Promise`\<\{ `channel`: [`RouterChannel`](RouterChannel.md); `error?`: `string`; \}\> *** ### timeoutHTLC() > **timeoutHTLC**(`channel`, `htlcId`, `leaseProvider`): `Promise`\<\{ `channel`: [`RouterChannel`](RouterChannel.md); `error?`: `string`; \}\> #### Parameters ##### channel [`RouterChannel`](RouterChannel.md) ##### htlcId `string` ##### leaseProvider `unknown` #### Returns `Promise`\<\{ `channel`: [`RouterChannel`](RouterChannel.md); `error?`: `string`; \}\> --- ## Page: ChannelParty URL: https://docs.totem.ing/api/totemsdk-omnia-router/interfaces/ChannelParty [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / ChannelParty # Interface: ChannelParty @totemsdk/omnia-router — public types All monetary values are scaled bigints (SCALE = 10^8). The router uses local mirrors of OmniaChannel/HTLCRecord so the package has no hard runtime dependency on @totemsdk/omnia — callers pass the real objects (structural typing ensures compatibility). ## Properties ### addressIndex > **addressIndex**: `number` *** ### partyId > **partyId**: `string` *** ### publicKeyDigest > **publicKeyDigest**: `string` --- ## Page: ChannelSigner URL: https://docs.totem.ing/api/totemsdk-omnia-router/interfaces/ChannelSigner [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / ChannelSigner # Interface: ChannelSigner ## Properties ### publicKeyDigest > **publicKeyDigest**: `string` --- ## Page: CrossTokenRoute URL: https://docs.totem.ing/api/totemsdk-omnia-router/interfaces/CrossTokenRoute [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / CrossTokenRoute # Interface: CrossTokenRoute ## Extends - [`Route`](Route.md) ## Properties ### estimatedBlocks > **estimatedBlocks**: `number` #### Inherited from [`Route`](Route.md).[`estimatedBlocks`](Route.md#estimatedblocks) *** ### hops > **hops**: ([`RoutingHop`](RoutingHop.md) \| [`SwapHop`](SwapHop.md))[] #### Inherited from [`Route`](Route.md).[`hops`](Route.md#hops) *** ### swapHops > **swapHops**: [`SwapHop`](SwapHop.md)[] *** ### tokenIn > **tokenIn**: `string` #### Inherited from [`Route`](Route.md).[`tokenIn`](Route.md#tokenin) *** ### tokenOut > **tokenOut**: `string` #### Inherited from [`Route`](Route.md).[`tokenOut`](Route.md#tokenout) *** ### totalFees > **totalFees**: `bigint` #### Inherited from [`Route`](Route.md).[`totalFees`](Route.md#totalfees) --- ## Page: DurableRouterLedger URL: https://docs.totem.ing/api/totemsdk-omnia-router/interfaces/DurableRouterLedger [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / DurableRouterLedger # Interface: DurableRouterLedger ## Methods ### getRevision() > **getRevision**(): `Promise`\<`number`\> #### Returns `Promise`\<`number`\> *** ### getSettled() > **getSettled**(`channelId`, `htlcId`): `Promise`\<[`SettledSegment`](SettledSegment.md) \| `undefined`\> Retrieve a previously settled segment. #### Parameters ##### channelId `string` ##### htlcId `string` #### Returns `Promise`\<[`SettledSegment`](SettledSegment.md) \| `undefined`\> *** ### getSnapshot() > **getSnapshot**(): `Promise`\<[`RouterLedgerState`](RouterLedgerState.md)\> #### Returns `Promise`\<[`RouterLedgerState`](RouterLedgerState.md)\> *** ### hasState() > **hasState**(): `Promise`\<`boolean`\> #### Returns `Promise`\<`boolean`\> *** ### isSettled() > **isSettled**(`channelId`, `htlcId`): `Promise`\<`boolean`\> True when the given channel+HTLC already settled. #### Parameters ##### channelId `string` ##### htlcId `string` #### Returns `Promise`\<`boolean`\> *** ### listSettled() > **listSettled**(`channelId?`): `Promise`\<[`SettledSegment`](SettledSegment.md)[]\> All settled segments, optionally filtered by channel. #### Parameters ##### channelId? `string` #### Returns `Promise`\<[`SettledSegment`](SettledSegment.md)[]\> *** ### markReconciled() > **markReconciled**(`channelId`, `htlcId`): `Promise`\<`void`\> Mark a settled segment as reconciled with the route state. #### Parameters ##### channelId `string` ##### htlcId `string` #### Returns `Promise`\<`void`\> *** ### recordSettled() > **recordSettled**(`segment`): `Promise`\<`void`\> Idempotently record a settled segment. Re-recording the same segment is a no-op. #### Parameters ##### segment [`SettledSegment`](SettledSegment.md) #### Returns `Promise`\<`void`\> --- ## Page: DurableRouterLedgerOptions URL: https://docs.totem.ing/api/totemsdk-omnia-router/interfaces/DurableRouterLedgerOptions [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / DurableRouterLedgerOptions # Interface: DurableRouterLedgerOptions ## Properties ### namespace? > `readonly` `optional` **namespace?**: `string` Key namespace prefix; default `totem_omnia_router:v1:`. *** ### requireAckMode? > `readonly` `optional` **requireAckMode?**: `"volatile"` \| `"buffered"` \| `"durably-acknowledged"` Required write acknowledgment; default `durably-acknowledged`. Pass `volatile` only for tests/scratch adapters (e.g. `MemoryStore`). --- ## Page: HTLCParams URL: https://docs.totem.ing/api/totemsdk-omnia-router/interfaces/HTLCParams [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / HTLCParams # Interface: HTLCParams Parameters for adding an HTLC — mirrors @totemsdk/omnia's AddHTLCParams. ## Properties ### amount > **amount**: `bigint` *** ### counterpartPublicKeyDigest > **counterpartPublicKeyDigest**: `string` *** ### direction > **direction**: `"offered"` \| `"received"` *** ### hashlock > **hashlock**: `string` *** ### timeoutBlock > **timeoutBlock**: `bigint` --- ## Page: PaymentRequest URL: https://docs.totem.ing/api/totemsdk-omnia-router/interfaces/PaymentRequest [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / PaymentRequest # Interface: PaymentRequest ## Properties ### amount > **amount**: `bigint` *** ### description? > `optional` **description?**: `string` *** ### expiryBlock > **expiryBlock**: `bigint` *** ### hashlock > **hashlock**: `string` SHA3-256 hex of preimage *** ### preimage? > `optional` **preimage?**: `string` Known to the payer (returned by buildPaymentRequest). Strip this before sharing the request with intermediaries. *** ### tokenId > **tokenId**: `string` --- ## Page: PaymentResult URL: https://docs.totem.ing/api/totemsdk-omnia-router/interfaces/PaymentResult [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / PaymentResult # Interface: PaymentResult ## Properties ### error? > `optional` **error?**: `string` *** ### feeProofs? > `optional` **feeProofs?**: [`RouterFeeProof`](RouterFeeProof.md)[] Verifiable fee proofs for each settled hop — feeds recordPoolFee earn-proofs. *** ### preimage? > `optional` **preimage?**: `string` Hex preimage revealed during settlement (present on success) *** ### settledHops > **settledHops**: `string`[] htlcIds that were successfully settled *** ### success > **success**: `boolean` --- ## Page: Route URL: https://docs.totem.ing/api/totemsdk-omnia-router/interfaces/Route [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / Route # Interface: Route ## Extended by - [`CrossTokenRoute`](CrossTokenRoute.md) ## Properties ### estimatedBlocks > **estimatedBlocks**: `number` *** ### hops > **hops**: ([`RoutingHop`](RoutingHop.md) \| [`SwapHop`](SwapHop.md))[] *** ### tokenIn > **tokenIn**: `string` *** ### tokenOut > **tokenOut**: `string` *** ### totalFees > **totalFees**: `bigint` --- ## Page: RouteOptions URL: https://docs.totem.ing/api/totemsdk-omnia-router/interfaces/RouteOptions [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / RouteOptions # Interface: RouteOptions ## Properties ### maxHops? > `optional` **maxHops?**: `number` Maximum number of hops (default: 8) --- ## Page: RouterChannel URL: https://docs.totem.ing/api/totemsdk-omnia-router/interfaces/RouterChannel [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / RouterChannel # Interface: RouterChannel Minimal mirror of OmniaChannel — the fields the router actually reads. Structurally compatible with @totemsdk/omnia's OmniaChannel so callers can pass real channel objects without an adapter. ## Properties ### balances > **balances**: `Record`\<`string`, `bigint`\> *** ### channelId > **channelId**: `string` *** ### currentSequence > **currentSequence**: `number` *** ### localSigner? > `optional` **localSigner?**: [`ChannelSigner`](ChannelSigner.md) *** ### parties > **parties**: [`ChannelParty`](ChannelParty.md)[] *** ### pendingHTLCs > **pendingHTLCs**: [`ChannelHTLC`](ChannelHTLC.md)[] *** ### status > **status**: `string` *** ### tokenId > **tokenId**: `string` *** ### totalValue > **totalValue**: `bigint` --- ## Page: RouterFeeProof URL: https://docs.totem.ing/api/totemsdk-omnia-router/interfaces/RouterFeeProof [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / RouterFeeProof # Interface: RouterFeeProof A verifiable fee-provenance record for a settled hop (#29): the artifact a pool's `recordPoolFee` earn-proof consumes. Binds channel + HTLC + recipient + amount so a fee record traces to a real fulfilled payment. ## Properties ### amount > **amount**: `bigint` *** ### channelId > **channelId**: `string` *** ### htlcId > **htlcId**: `string` *** ### proofHash > **proofHash**: `string` *** ### recipientPublicKeyDigest > **recipientPublicKeyDigest**: `string` *** ### settledAt > **settledAt**: `number` *** ### tokenId > **tokenId**: `string` --- ## Page: RouterLedgerState URL: https://docs.totem.ing/api/totemsdk-omnia-router/interfaces/RouterLedgerState [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / RouterLedgerState # Interface: RouterLedgerState ## Properties ### segments > **segments**: `Record`\<`string`, [`SettledSegment`](SettledSegment.md)\> `channelId:htlcId` → settled segment. --- ## Page: RoutingHop URL: https://docs.totem.ing/api/totemsdk-omnia-router/interfaces/RoutingHop [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / RoutingHop # Interface: RoutingHop ## Extended by - [`SwapHop`](SwapHop.md) ## Properties ### amount > **amount**: `bigint` *** ### channelId > **channelId**: `string` *** ### from > **from**: `string` *** ### htlcId? > `optional` **htlcId?**: `string` Populated during payment execution *** ### to > **to**: `string` *** ### tokenId > **tokenId**: `string` --- ## Page: SettledSegment URL: https://docs.totem.ing/api/totemsdk-omnia-router/interfaces/SettledSegment [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / SettledSegment # Interface: SettledSegment A payment segment that has been irrevocably settled by preimage reveal. ## Properties ### channelId > **channelId**: `string` *** ### htlcId > **htlcId**: `string` *** ### preimage > **preimage**: `string` Preimage revealed during settlement — must survive a mid-route restart. *** ### recipientPublicKeyDigest? > `optional` **recipientPublicKeyDigest?**: `string` *** ### reconciled? > `optional` **reconciled?**: `boolean` Set once a segment is fully reconciled against the node's route state. *** ### senderPublicKeyDigest? > `optional` **senderPublicKeyDigest?**: `string` *** ### settledAt > **settledAt**: `number` Monotonic settlement timestamp. *** ### tokenId? > `optional` **tokenId?**: `string` Optional hop-level detail for reconciliation (amount, counterpart, digest). --- ## Page: SwapAnnouncement URL: https://docs.totem.ing/api/totemsdk-omnia-router/interfaces/SwapAnnouncement [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / SwapAnnouncement # Interface: SwapAnnouncement ## Properties ### inboundChannelId > **inboundChannelId**: `string` *** ### intermediaryPubKey > **intermediaryPubKey**: `string` *** ### maxAmountIn > **maxAmountIn**: `bigint` *** ### outboundChannelId > **outboundChannelId**: `string` *** ### rate > **rate**: `string` How many tokenOut scaled units per tokenIn scaled unit *** ### tokenIn > **tokenIn**: `string` *** ### tokenOut > **tokenOut**: `string` --- ## Page: SwapHop URL: https://docs.totem.ing/api/totemsdk-omnia-router/interfaces/SwapHop [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / SwapHop # Interface: SwapHop ## Extends - [`RoutingHop`](RoutingHop.md) ## Properties ### amount > **amount**: `bigint` #### Inherited from [`RoutingHop`](RoutingHop.md).[`amount`](RoutingHop.md#amount) *** ### amountIn > **amountIn**: `bigint` *** ### amountOut > **amountOut**: `bigint` *** ### channelId > **channelId**: `string` #### Inherited from [`RoutingHop`](RoutingHop.md).[`channelId`](RoutingHop.md#channelid) *** ### from > **from**: `string` #### Inherited from [`RoutingHop`](RoutingHop.md).[`from`](RoutingHop.md#from) *** ### htlcId? > `optional` **htlcId?**: `string` Populated during payment execution #### Inherited from [`RoutingHop`](RoutingHop.md).[`htlcId`](RoutingHop.md#htlcid) *** ### inboundChannelId > **inboundChannelId**: `string` *** ### isSwap > **isSwap**: `true` *** ### outboundChannelId > **outboundChannelId**: `string` *** ### rate > **rate**: `string` "amountOut per amountIn" expressed as decimal string, e.g. "0.95" *** ### to > **to**: `string` #### Inherited from [`RoutingHop`](RoutingHop.md).[`to`](RoutingHop.md#to) *** ### tokenId > **tokenId**: `string` #### Inherited from [`RoutingHop`](RoutingHop.md).[`tokenId`](RoutingHop.md#tokenid) *** ### tokenIn > **tokenIn**: `string` *** ### tokenOut > **tokenOut**: `string` --- ## Page: HTLCStatus URL: https://docs.totem.ing/api/totemsdk-omnia-router/type-aliases/HTLCStatus [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / HTLCStatus # Type Alias: HTLCStatus > **HTLCStatus** = `"pending"` \| `"fulfilled"` \| `"timed_out"` --- ## Page: LeaseProvider URL: https://docs.totem.ing/api/totemsdk-omnia-router/type-aliases/LeaseProvider [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / LeaseProvider # Type Alias: LeaseProvider > **LeaseProvider** = `unknown` Opaque lease-provider handle — the router passes it through to the underlying HTLC operations but never inspects it. --- ## Page: ROUTER_FEE_PROOF_DOMAIN URL: https://docs.totem.ing/api/totemsdk-omnia-router/variables/ROUTER_FEE_PROOF_DOMAIN [**@totemsdk/omnia-router**](../index.md) *** [@totemsdk/omnia-router](../index.md) / ROUTER\_FEE\_PROOF\_DOMAIN # Variable: ROUTER\_FEE\_PROOF\_DOMAIN > `const` **ROUTER\_FEE\_PROOF\_DOMAIN**: `"totemsdk/omnia-router/fee-proof/v1"` = `'totemsdk/omnia-router/fee-proof/v1'` --- ## Page: PendingHTLCError URL: https://docs.totem.ing/api/totemsdk-omnia-splice/classes/PendingHTLCError [**@totemsdk/omnia-splice**](../index.md) *** [@totemsdk/omnia-splice](../index.md) / PendingHTLCError # Class: PendingHTLCError ## Extends - [`SpliceError`](SpliceError.md) ## Constructors ### Constructor > **new PendingHTLCError**(`pendingCount`): `PendingHTLCError` #### Parameters ##### pendingCount `number` #### Returns `PendingHTLCError` #### Overrides [`SpliceError`](SpliceError.md).[`constructor`](SpliceError.md#constructor) ## Properties ### code > `readonly` **code**: `string` #### Inherited from [`SpliceError`](SpliceError.md).[`code`](SpliceError.md#code) *** ### message > **message**: `string` #### Inherited from [`SpliceError`](SpliceError.md).[`message`](SpliceError.md#message) *** ### name > **name**: `string` #### Inherited from [`SpliceError`](SpliceError.md).[`name`](SpliceError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`SpliceError`](SpliceError.md).[`stack`](SpliceError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`SpliceError`](SpliceError.md).[`stackTraceLimit`](SpliceError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`SpliceError`](SpliceError.md).[`captureStackTrace`](SpliceError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`SpliceError`](SpliceError.md).[`prepareStackTrace`](SpliceError.md#preparestacktrace) --- ## Page: SpliceBalanceConservationError URL: https://docs.totem.ing/api/totemsdk-omnia-splice/classes/SpliceBalanceConservationError [**@totemsdk/omnia-splice**](../index.md) *** [@totemsdk/omnia-splice](../index.md) / SpliceBalanceConservationError # Class: SpliceBalanceConservationError ## Extends - [`SpliceError`](SpliceError.md) ## Constructors ### Constructor > **new SpliceBalanceConservationError**(`expected`, `actual`): `SpliceBalanceConservationError` #### Parameters ##### expected `bigint` ##### actual `bigint` #### Returns `SpliceBalanceConservationError` #### Overrides [`SpliceError`](SpliceError.md).[`constructor`](SpliceError.md#constructor) ## Properties ### code > `readonly` **code**: `string` #### Inherited from [`SpliceError`](SpliceError.md).[`code`](SpliceError.md#code) *** ### message > **message**: `string` #### Inherited from [`SpliceError`](SpliceError.md).[`message`](SpliceError.md#message) *** ### name > **name**: `string` #### Inherited from [`SpliceError`](SpliceError.md).[`name`](SpliceError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`SpliceError`](SpliceError.md).[`stack`](SpliceError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`SpliceError`](SpliceError.md).[`stackTraceLimit`](SpliceError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`SpliceError`](SpliceError.md).[`captureStackTrace`](SpliceError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`SpliceError`](SpliceError.md).[`prepareStackTrace`](SpliceError.md#preparestacktrace) --- ## Page: SpliceChannelStatusError URL: https://docs.totem.ing/api/totemsdk-omnia-splice/classes/SpliceChannelStatusError [**@totemsdk/omnia-splice**](../index.md) *** [@totemsdk/omnia-splice](../index.md) / SpliceChannelStatusError # Class: SpliceChannelStatusError ## Extends - [`SpliceError`](SpliceError.md) ## Constructors ### Constructor > **new SpliceChannelStatusError**(`required`, `actual`): `SpliceChannelStatusError` #### Parameters ##### required `string` ##### actual `string` #### Returns `SpliceChannelStatusError` #### Overrides [`SpliceError`](SpliceError.md).[`constructor`](SpliceError.md#constructor) ## Properties ### code > `readonly` **code**: `string` #### Inherited from [`SpliceError`](SpliceError.md).[`code`](SpliceError.md#code) *** ### message > **message**: `string` #### Inherited from [`SpliceError`](SpliceError.md).[`message`](SpliceError.md#message) *** ### name > **name**: `string` #### Inherited from [`SpliceError`](SpliceError.md).[`name`](SpliceError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`SpliceError`](SpliceError.md).[`stack`](SpliceError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`SpliceError`](SpliceError.md).[`stackTraceLimit`](SpliceError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`SpliceError`](SpliceError.md).[`captureStackTrace`](SpliceError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`SpliceError`](SpliceError.md).[`prepareStackTrace`](SpliceError.md#preparestacktrace) --- ## Page: SpliceError URL: https://docs.totem.ing/api/totemsdk-omnia-splice/classes/SpliceError [**@totemsdk/omnia-splice**](../index.md) *** [@totemsdk/omnia-splice](../index.md) / SpliceError # Class: SpliceError ## Extends - `Error` ## Extended by - [`PendingHTLCError`](PendingHTLCError.md) - [`SpliceChannelStatusError`](SpliceChannelStatusError.md) - [`SpliceBalanceConservationError`](SpliceBalanceConservationError.md) - [`SpliceSignatureMismatchError`](SpliceSignatureMismatchError.md) - [`SpliceMissingPartyError`](SpliceMissingPartyError.md) - [`SpliceInsufficientFundsError`](SpliceInsufficientFundsError.md) ## Constructors ### Constructor > **new SpliceError**(`code`, `message`): `SpliceError` #### Parameters ##### code `string` ##### message `string` #### Returns `SpliceError` #### Overrides `Error.constructor` ## Properties ### code > `readonly` **code**: `string` *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: SpliceInsufficientFundsError URL: https://docs.totem.ing/api/totemsdk-omnia-splice/classes/SpliceInsufficientFundsError [**@totemsdk/omnia-splice**](../index.md) *** [@totemsdk/omnia-splice](../index.md) / SpliceInsufficientFundsError # Class: SpliceInsufficientFundsError ## Extends - [`SpliceError`](SpliceError.md) ## Constructors ### Constructor > **new SpliceInsufficientFundsError**(`available`, `requested`): `SpliceInsufficientFundsError` #### Parameters ##### available `bigint` ##### requested `bigint` #### Returns `SpliceInsufficientFundsError` #### Overrides [`SpliceError`](SpliceError.md).[`constructor`](SpliceError.md#constructor) ## Properties ### code > `readonly` **code**: `string` #### Inherited from [`SpliceError`](SpliceError.md).[`code`](SpliceError.md#code) *** ### message > **message**: `string` #### Inherited from [`SpliceError`](SpliceError.md).[`message`](SpliceError.md#message) *** ### name > **name**: `string` #### Inherited from [`SpliceError`](SpliceError.md).[`name`](SpliceError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`SpliceError`](SpliceError.md).[`stack`](SpliceError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`SpliceError`](SpliceError.md).[`stackTraceLimit`](SpliceError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`SpliceError`](SpliceError.md).[`captureStackTrace`](SpliceError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`SpliceError`](SpliceError.md).[`prepareStackTrace`](SpliceError.md#preparestacktrace) --- ## Page: SpliceMissingPartyError URL: https://docs.totem.ing/api/totemsdk-omnia-splice/classes/SpliceMissingPartyError [**@totemsdk/omnia-splice**](../index.md) *** [@totemsdk/omnia-splice](../index.md) / SpliceMissingPartyError # Class: SpliceMissingPartyError ## Extends - [`SpliceError`](SpliceError.md) ## Constructors ### Constructor > **new SpliceMissingPartyError**(`partyId`): `SpliceMissingPartyError` #### Parameters ##### partyId `string` #### Returns `SpliceMissingPartyError` #### Overrides [`SpliceError`](SpliceError.md).[`constructor`](SpliceError.md#constructor) ## Properties ### code > `readonly` **code**: `string` #### Inherited from [`SpliceError`](SpliceError.md).[`code`](SpliceError.md#code) *** ### message > **message**: `string` #### Inherited from [`SpliceError`](SpliceError.md).[`message`](SpliceError.md#message) *** ### name > **name**: `string` #### Inherited from [`SpliceError`](SpliceError.md).[`name`](SpliceError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`SpliceError`](SpliceError.md).[`stack`](SpliceError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`SpliceError`](SpliceError.md).[`stackTraceLimit`](SpliceError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`SpliceError`](SpliceError.md).[`captureStackTrace`](SpliceError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`SpliceError`](SpliceError.md).[`prepareStackTrace`](SpliceError.md#preparestacktrace) --- ## Page: SpliceSignatureMismatchError URL: https://docs.totem.ing/api/totemsdk-omnia-splice/classes/SpliceSignatureMismatchError [**@totemsdk/omnia-splice**](../index.md) *** [@totemsdk/omnia-splice](../index.md) / SpliceSignatureMismatchError # Class: SpliceSignatureMismatchError ## Extends - [`SpliceError`](SpliceError.md) ## Constructors ### Constructor > **new SpliceSignatureMismatchError**(`detail`): `SpliceSignatureMismatchError` #### Parameters ##### detail `string` #### Returns `SpliceSignatureMismatchError` #### Overrides [`SpliceError`](SpliceError.md).[`constructor`](SpliceError.md#constructor) ## Properties ### code > `readonly` **code**: `string` #### Inherited from [`SpliceError`](SpliceError.md).[`code`](SpliceError.md#code) *** ### message > **message**: `string` #### Inherited from [`SpliceError`](SpliceError.md).[`message`](SpliceError.md#message) *** ### name > **name**: `string` #### Inherited from [`SpliceError`](SpliceError.md).[`name`](SpliceError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`SpliceError`](SpliceError.md).[`stack`](SpliceError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`SpliceError`](SpliceError.md).[`stackTraceLimit`](SpliceError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`SpliceError`](SpliceError.md).[`captureStackTrace`](SpliceError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`SpliceError`](SpliceError.md).[`prepareStackTrace`](SpliceError.md#preparestacktrace) --- ## Page: acceptSplice URL: https://docs.totem.ing/api/totemsdk-omnia-splice/functions/acceptSplice [**@totemsdk/omnia-splice**](../index.md) *** [@totemsdk/omnia-splice](../index.md) / acceptSplice # Function: acceptSplice() > **acceptSplice**(`channel`, `proposal`, `leaseProvider`): `Promise`\<[`SpliceAcceptance`](../interfaces/SpliceAcceptance.md)\> Counterparty accepts a splice proposal by co-signing the splice TX digest. Requires the channel to be in 'quiesced' state. WOTS lease safety: reserves a key slot before signing. The returned `acceptorReservationId` and `acceptorSigningIndices` are embedded in the `SpliceAcceptance` and consumed by `finalizeSplice` to commit or burn the acceptor's key-slot reservation. The acceptor independently: 1. Validates party membership (proposer and acceptor both in channel). 2. Validates proposal balance conservation and amount constraints. 3. Cryptographically binds the signed draft to the proposal params by recomputing the expected draft from `params + channel` and comparing digests — rejects if they differ (tamper detection). 4. Reserves a WOTS key slot via `leaseProvider.wotsLease`. 5. Signs the splice TX digest with reserved indices. ## Parameters ### channel `OmniaChannel` \| [`QuiescedChannel`](../type-aliases/QuiescedChannel.md) Quiesced channel. ### proposal [`SpliceProposal`](../interfaces/SpliceProposal.md) Splice proposal from the initiating party. ### leaseProvider [`SpliceLeaseProvider`](../interfaces/SpliceLeaseProvider.md) Provides the acceptor signer and WOTS lease. ## Returns `Promise`\<[`SpliceAcceptance`](../interfaces/SpliceAcceptance.md)\> SpliceAcceptance containing acceptor co-signature and lease data. --- ## Page: buildSpliceTx URL: https://docs.totem.ing/api/totemsdk-omnia-splice/functions/buildSpliceTx [**@totemsdk/omnia-splice**](../index.md) *** [@totemsdk/omnia-splice](../index.md) / buildSpliceTx # Function: buildSpliceTx() > **buildSpliceTx**(`channel`, `params`): [`SpliceTxDraft`](../interfaces/SpliceTxDraft.md) Build a validated SpliceTxDraft from channel + splice params. For splice-in: inputs = [channel coin (latestCoinId), additional coin] outputs = [new channel coin at fundingAddress, sequence=0, settlement=false] For splice-out: inputs = [channel coin (latestCoinId)] outputs = [new channel coin at fundingAddress, sequence=0, settlement=false] [withdrawal coin at withdrawAddress] [any extra outputs] The output channel coin always resets STATE(101)=0 so the new channel starts from sequence 0 with a full WOTS signing budget. ## Parameters ### channel `OmniaChannel` Quiesced or active channel to splice. ### params [`SpliceParams`](../interfaces/SpliceParams.md) Splice parameters (type, amounts, addresses). ## Returns [`SpliceTxDraft`](../interfaces/SpliceTxDraft.md) Validated SpliceTxDraft. ## Throws If output amounts do not sum to newTotalValue. ## Throws If splice-out exceeds channel holdings. --- ## Page: computeSpliceTxDigest URL: https://docs.totem.ing/api/totemsdk-omnia-splice/functions/computeSpliceTxDigest [**@totemsdk/omnia-splice**](../index.md) *** [@totemsdk/omnia-splice](../index.md) / computeSpliceTxDigest # Function: computeSpliceTxDigest() > **computeSpliceTxDigest**(`draft`): `Uint8Array` Compute a 32-byte digest over the splice TX draft for WOTS signing. This is the canonical message both parties sign to authorize the splice. ## Parameters ### draft [`SpliceTxDraft`](../interfaces/SpliceTxDraft.md) ## Returns `Uint8Array` --- ## Page: createDurableSpliceStore URL: https://docs.totem.ing/api/totemsdk-omnia-splice/functions/createDurableSpliceStore [**@totemsdk/omnia-splice**](../index.md) *** [@totemsdk/omnia-splice](../index.md) / createDurableSpliceStore # Function: createDurableSpliceStore() > **createDurableSpliceStore**(`adapter`, `options?`): [`DurableSpliceStore`](../interfaces/DurableSpliceStore.md) ## Parameters ### adapter `StorageAdapterWithCapabilities` & `CasStore` ### options? [`DurableSpliceStoreOptions`](../interfaces/DurableSpliceStoreOptions.md) = `{}` ## Returns [`DurableSpliceStore`](../interfaces/DurableSpliceStore.md) --- ## Page: finalizeSplice URL: https://docs.totem.ing/api/totemsdk-omnia-splice/functions/finalizeSplice [**@totemsdk/omnia-splice**](../index.md) *** [@totemsdk/omnia-splice](../index.md) / finalizeSplice # Function: finalizeSplice() > **finalizeSplice**(`channel`, `proposal`, `acceptance`, `options?`): `Promise`\<[`SplicedChannel`](../type-aliases/SplicedChannel.md)\> Finalize a splice by assembling both parties' signatures, mining PoW, optionally broadcasting the TX, and returning the new active channel. **Quiesce gate**: the channel must be in `'quiesced'` state. Call `quiesceChannel` first to settle all HTLCs and sign the pre-splice state. **Security checks** (all verified before mining): 1. `channel.status === 'quiesced'` 2. `proposal.spliceId === acceptance.spliceId` 3. `proposal.channelId` and `acceptance.channelId` match `channel.channelId` 4. Proposer and acceptor are distinct, non-empty-keyed channel parties 5. Both signatures are non-empty byte arrays 6. Both signatures pass cryptographic verification against the splice TX digest (WOTS by default; override with `options.verifySignature` in tests) 7. `spliceTxDraft` digest matches what `buildSpliceTx(channel, params)` produces **WOTS lease lifecycle**: - If `options.proposerLeaseProvider` is supplied: `commitKeyUse` is called after a confirmed splice TX, or `burnReservation` on failure. - Same for `options.acceptorLeaseProvider`. - Reservations are tracked independently; only uncommitted ones are burned. **Broadcast failure**: if `broadcast()` returns `{ success: false }` without a `txpowid`, `finalizeSplice` throws and burns any open reservations. **Side effect**: the `channel` object passed in is mutated to `status: 'spliced'` after a successful finalize. This marks the old quiesced channel as invalid; only the returned `SplicedChannel` is live. **Returned SplicedChannel**: - `status: 'active'` — ready for new payments immediately - `totalValue` — updated to `proposal.params.newTotalValue` - `balances` — updated to `proposal.params.newBalances` - `currentSequence: 0` — fresh WOTS budget - `latestState: null` — no cosigned state yet - `splicedFrom` — old channel's `channelId` - `spliceFundingTxId` — mined (or broadcast) TX ID - `spliceFundingCoinId` — `-0` ## Parameters ### channel `OmniaChannel` \| [`QuiescedChannel`](../type-aliases/QuiescedChannel.md) Quiesced channel (mutated to 'spliced' on success). ### proposal [`SpliceProposal`](../interfaces/SpliceProposal.md) Splice proposal from the initiating party. ### acceptance [`SpliceAcceptance`](../interfaces/SpliceAcceptance.md) Co-signature from the accepting party. ### options? [`FinalizeSpliceOptions`](../interfaces/FinalizeSpliceOptions.md) Broadcast, difficulty, verifier, and lease providers. ## Returns `Promise`\<[`SplicedChannel`](../type-aliases/SplicedChannel.md)\> SplicedChannel (`status: 'active'`) with updated value and provenance. --- ## Page: proposeSpliceIn URL: https://docs.totem.ing/api/totemsdk-omnia-splice/functions/proposeSpliceIn [**@totemsdk/omnia-splice**](../index.md) *** [@totemsdk/omnia-splice](../index.md) / proposeSpliceIn # Function: proposeSpliceIn() > **proposeSpliceIn**(`channel`, `additionalCoinId`, `additionalAmount`, `leaseProvider`, `newBalances?`): `Promise`\<[`SpliceProposal`](../interfaces/SpliceProposal.md)\> Initiating party proposes a splice-in: add external funds to the channel. Requires the channel to be in 'quiesced' state (see quiesceChannel). WOTS lease safety: a key slot is reserved via `leaseProvider.wotsLease` before signing. The returned `proposerReservationId` and `proposerSigningIndices` must be passed through to `finalizeSplice` (embedded in the `SpliceProposal`) so the reservation is committed on success or burned on failure, preventing one-time-key reuse. ## Parameters ### channel `OmniaChannel` \| [`QuiescedChannel`](../type-aliases/QuiescedChannel.md) Quiesced channel to splice. ### additionalCoinId `string` CoinId of the external coin being spliced in. ### additionalAmount `bigint` Amount of the additional coin. ### leaseProvider [`SpliceLeaseProvider`](../interfaces/SpliceLeaseProvider.md) Provides the proposer signer and WOTS lease. ### newBalances? `Record`\<`string`, `bigint`\> How the new total should be split after splice. When omitted, existing balances are scaled proportionally to the new total value so that `sum(newBalances) === newTotalValue` is preserved. ## Returns `Promise`\<[`SpliceProposal`](../interfaces/SpliceProposal.md)\> SpliceProposal signed by the proposer with lease reservation data. --- ## Page: proposeSpliceOut URL: https://docs.totem.ing/api/totemsdk-omnia-splice/functions/proposeSpliceOut [**@totemsdk/omnia-splice**](../index.md) *** [@totemsdk/omnia-splice](../index.md) / proposeSpliceOut # Function: proposeSpliceOut() > **proposeSpliceOut**(`channel`, `withdrawAmount`, `withdrawAddress`, `leaseProvider`, `newBalances?`, `extraOutputs?`): `Promise`\<[`SpliceProposal`](../interfaces/SpliceProposal.md)\> Initiating party proposes a splice-out: withdraw funds from the channel on-chain. Requires the channel to be in 'quiesced' state (see quiesceChannel). WOTS lease safety: reserves a key slot before signing (same semantics as proposeSpliceIn). The `proposerReservationId` in the returned `SpliceProposal` must be committed/burned by `finalizeSplice`. ## Parameters ### channel `OmniaChannel` \| [`QuiescedChannel`](../type-aliases/QuiescedChannel.md) Quiesced channel. ### withdrawAmount `bigint` Amount to remove from the channel. ### withdrawAddress `string` On-chain destination for the withdrawn funds. ### leaseProvider [`SpliceLeaseProvider`](../interfaces/SpliceLeaseProvider.md) Provides the proposer signer and WOTS lease. ### newBalances? `Record`\<`string`, `bigint`\> How the remaining total should be split after splice. ### extraOutputs? `object`[] Optional additional on-chain outputs (third-party payments). ## Returns `Promise`\<[`SpliceProposal`](../interfaces/SpliceProposal.md)\> SpliceProposal signed by the proposer with lease reservation data. --- ## Page: quiesceChannel URL: https://docs.totem.ing/api/totemsdk-omnia-splice/functions/quiesceChannel [**@totemsdk/omnia-splice**](../index.md) *** [@totemsdk/omnia-splice](../index.md) / quiesceChannel # Function: quiesceChannel() > **quiesceChannel**(`channel`, `leaseProvider`, `options?`): `Promise`\<[`QuiescedChannel`](../type-aliases/QuiescedChannel.md)\> Quiesce a channel before splicing. Quiescing is mandatory before a splice can be proposed or accepted. It: 1. Validates the channel is `'active'`. 2. Ensures all in-flight HTLCs have reached a terminal state (`fulfilled` or `timed_out`). If pending HTLCs exist and `options.awaitResolution` is provided, the callback is invoked so the caller can drive/await resolution (submit preimages, wait for timeouts, poll a node). After the callback the channel is re-checked. If HTLCs remain pending, `PendingHTLCError` is thrown. If the option is absent and pending HTLCs exist, `PendingHTLCError` is thrown immediately. 3. Signs a final state update (via `updateState`) that captures the settled balance split at `currentSequence + 1`. This produces a WOTS-signed `Partial` binding both parties to the pre-splice balance before the splice TX resets the sequence to 0. 4. Returns a `QuiescedChannel` with `status: 'quiesced'`, `pendingHTLCs: []` (all resolved HTLCs cleared), and `quiesceSignedState` containing the local party's partial signature over the final balance state. The caller must exchange `quiesceSignedState` with the counterparty to obtain their co-signature, providing a fully signed record of the last pre-splice balance for any future dispute resolution. ## Parameters ### channel `OmniaChannel` The active channel to quiesce. ### leaseProvider [`SpliceLeaseProvider`](../interfaces/SpliceLeaseProvider.md) Provides the local party's signer and WOTS lease. ### options? [`QuiesceOptions`](../interfaces/QuiesceOptions.md) Optional: `awaitResolution` callback for HTLC settlement. ## Returns `Promise`\<[`QuiescedChannel`](../type-aliases/QuiescedChannel.md)\> A QuiescedChannel with `status: 'quiesced'`, cleared `pendingHTLCs`, and the local party's partial signature over the final balance state. ## Throws If channel is not active. ## Throws If HTLCs remain pending after resolution. --- ## Page: spliceDraftToMinimaBytes URL: https://docs.totem.ing/api/totemsdk-omnia-splice/functions/spliceDraftToMinimaBytes [**@totemsdk/omnia-splice**](../index.md) *** [@totemsdk/omnia-splice](../index.md) / spliceDraftToMinimaBytes # Function: spliceDraftToMinimaBytes() > **spliceDraftToMinimaBytes**(`draft`): `Uint8Array` Convert a SpliceTxDraft to canonical Minima binary TX bytes. The resulting bytes cover inputs, outputs, and state variables and are suitable for WOTS signing. Both parties sign the same bytes independently; the final splice TX assembles both signatures into the witness. ## Parameters ### draft [`SpliceTxDraft`](../interfaces/SpliceTxDraft.md) ## Returns `Uint8Array` --- ## Page: DurableSpliceStore URL: https://docs.totem.ing/api/totemsdk-omnia-splice/interfaces/DurableSpliceStore [**@totemsdk/omnia-splice**](../index.md) *** [@totemsdk/omnia-splice](../index.md) / DurableSpliceStore # Interface: DurableSpliceStore ## Methods ### getRevision() > **getRevision**(): `Promise`\<`number`\> #### Returns `Promise`\<`number`\> *** ### getSnapshot() > **getSnapshot**(): `Promise`\<[`SpliceStoreState`](SpliceStoreState.md)\> #### Returns `Promise`\<[`SpliceStoreState`](SpliceStoreState.md)\> *** ### getSplice() > **getSplice**(`spliceId`): `Promise`\<[`SpliceRecord`](SpliceRecord.md) \| `undefined`\> Retrieve a splice record by spliceId. #### Parameters ##### spliceId `string` #### Returns `Promise`\<[`SpliceRecord`](SpliceRecord.md) \| `undefined`\> *** ### hasState() > **hasState**(): `Promise`\<`boolean`\> #### Returns `Promise`\<`boolean`\> *** ### listPending() > **listPending**(): `Promise`\<[`SpliceRecord`](SpliceRecord.md)[]\> Pending (proposed but not yet accepted) splices — reconcilable after restart. #### Returns `Promise`\<[`SpliceRecord`](SpliceRecord.md)[]\> *** ### listSplices() > **listSplices**(`channelId?`): `Promise`\<[`SpliceRecord`](SpliceRecord.md)[]\> All records, optionally filtered by channel. #### Parameters ##### channelId? `string` #### Returns `Promise`\<[`SpliceRecord`](SpliceRecord.md)[]\> *** ### markFinalized() > **markFinalized**(`spliceId`): `Promise`\<`void`\> Mark a splice finalized (splice TX confirmed on-chain). #### Parameters ##### spliceId `string` #### Returns `Promise`\<`void`\> *** ### saveAcceptance() > **saveAcceptance**(`acceptance`): `Promise`\<`void`\> Attach an acceptance; updates status to `accepted`. #### Parameters ##### acceptance [`SpliceAcceptance`](SpliceAcceptance.md) #### Returns `Promise`\<`void`\> *** ### saveProposal() > **saveProposal**(`proposal`): `Promise`\<`void`\> Persist a freshly created splice proposal (pending, pre-acceptance). #### Parameters ##### proposal [`SpliceProposal`](SpliceProposal.md) #### Returns `Promise`\<`void`\> --- ## Page: DurableSpliceStoreOptions URL: https://docs.totem.ing/api/totemsdk-omnia-splice/interfaces/DurableSpliceStoreOptions [**@totemsdk/omnia-splice**](../index.md) *** [@totemsdk/omnia-splice](../index.md) / DurableSpliceStoreOptions # Interface: DurableSpliceStoreOptions ## Properties ### namespace? > `readonly` `optional` **namespace?**: `string` Key namespace prefix; default `totem_omnia_splice:v1:`. *** ### requireAckMode? > `readonly` `optional` **requireAckMode?**: `"volatile"` \| `"buffered"` \| `"durably-acknowledged"` Required write acknowledgment; default `durably-acknowledged`. Pass `volatile` only for tests/scratch adapters (e.g. `MemoryStore`). --- ## Page: FinalizeSpliceOptions URL: https://docs.totem.ing/api/totemsdk-omnia-splice/interfaces/FinalizeSpliceOptions [**@totemsdk/omnia-splice**](../index.md) *** [@totemsdk/omnia-splice](../index.md) / FinalizeSpliceOptions # Interface: FinalizeSpliceOptions Options for `finalizeSplice`. ## Properties ### acceptorLeaseProvider? > `optional` **acceptorLeaseProvider?**: `WotsLeaseProvider` Acceptor's WOTS lease provider. Same commit/burn semantics as `proposerLeaseProvider`. *** ### broadcast? > `optional` **broadcast?**: (`txHex`) => `Promise`\<\{ `success?`: `boolean`; `txpowid?`: `string`; \}\> Broadcast the mined TxPoW hex to the network. `finalizeSplice` throws if `broadcast` returns `{ success: false }` without a `txpowid`. #### Parameters ##### txHex `string` #### Returns `Promise`\<\{ `success?`: `boolean`; `txpowid?`: `string`; \}\> *** ### mineDifficulty? > `optional` **mineDifficulty?**: `Uint8Array`\<`ArrayBufferLike`\> Override PoW difficulty (pass `MAX_HASH` in tests). *** ### proposerLeaseProvider? > `optional` **proposerLeaseProvider?**: `WotsLeaseProvider` Proposer's WOTS lease provider. If supplied, `finalizeSplice` will call `commitKeyUse` on the proposer's reservation after a confirmed splice TX, or `burnReservation` if finalization fails after security checks pass. Prevents one-time-key reuse. *** ### verifySignature? > `optional` **verifySignature?**: (`signature`, `digest`, `publicKeyDigest`) => `boolean` Custom signature verifier called for both the proposer and acceptor signatures before state transition. Defaults to `wotsVerifyDigest`. **Override in test environments** that use mock signers (mock signatures are not real WOTS sigs and will not pass the default verifier). ```ts // Example test helper: verifySignature: (sig, digest, pkd) => { const expected = sha3_256(concatBytes(hexToBytes(pkd), digest)); return expected.length === sig.length && expected.every((b, i) => b === sig[i]); } ``` #### Parameters ##### signature `Uint8Array` ##### digest `Uint8Array` ##### publicKeyDigest `string` #### Returns `boolean` --- ## Page: QuiesceOptions URL: https://docs.totem.ing/api/totemsdk-omnia-splice/interfaces/QuiesceOptions [**@totemsdk/omnia-splice**](../index.md) *** [@totemsdk/omnia-splice](../index.md) / QuiesceOptions # Interface: QuiesceOptions Options for `quiesceChannel`. ## Properties ### awaitResolution? > `optional` **awaitResolution?**: (`pending`) => `Promise`\<`void`\> Called when the channel has pending HTLCs that have not yet reached a terminal state (`fulfilled` or `timed_out`). If provided, `quiesceChannel` invokes this callback with the still-pending HTLCs, giving the caller an opportunity to drive resolution — e.g. submit preimage reveals, wait for timeout blocks, or poll a Minima node — before the quiesce is retried. After the callback resolves, `channel.pendingHTLCs` is re-inspected. If all HTLCs have moved to a terminal state the quiesce proceeds; if any are still pending, `PendingHTLCError` is thrown. If this option is not provided, `PendingHTLCError` is thrown immediately when pending HTLCs are found. #### Parameters ##### pending `HTLCRecord`[] The HTLCs that still need resolution. #### Returns `Promise`\<`void`\> --- ## Page: SpliceAcceptance URL: https://docs.totem.ing/api/totemsdk-omnia-splice/interfaces/SpliceAcceptance [**@totemsdk/omnia-splice**](../index.md) *** [@totemsdk/omnia-splice](../index.md) / SpliceAcceptance # Interface: SpliceAcceptance `acceptorReservationId` and `acceptorSigningIndices` carry the WOTS lease reservation used when producing `acceptorSignature`. Consumed by `finalizeSplice` to commit or burn the acceptor's key-slot reservation. ## Properties ### acceptedAt > **acceptedAt**: `number` *** ### acceptorPublicKeyDigest > **acceptorPublicKeyDigest**: `string` *** ### acceptorReservationId > **acceptorReservationId**: `string` *** ### acceptorSignature > **acceptorSignature**: [`WotsSignature`](../type-aliases/WotsSignature.md) *** ### acceptorSigningIndices > **acceptorSigningIndices**: `SigningIndices` *** ### channelId > **channelId**: `string` *** ### spliceId > **spliceId**: `string` --- ## Page: SpliceLeaseProvider URL: https://docs.totem.ing/api/totemsdk-omnia-splice/interfaces/SpliceLeaseProvider [**@totemsdk/omnia-splice**](../index.md) *** [@totemsdk/omnia-splice](../index.md) / SpliceLeaseProvider # Interface: SpliceLeaseProvider ## Properties ### broadcast? > `optional` **broadcast?**: (`txHex`) => `Promise`\<\{ `success?`: `boolean`; `txpowid?`: `string`; \}\> Optional function to broadcast the mined splice TxPoW to the chain. #### Parameters ##### txHex `string` #### Returns `Promise`\<\{ `success?`: `boolean`; `txpowid?`: `string`; \}\> *** ### signer > **signer**: `ChannelSigner` Local party's WOTS signer. *** ### wotsLease > **wotsLease**: `WotsLeaseProvider` WOTS lease provider for key slot reservation/commit (required for quiesceChannel). --- ## Page: SpliceParams URL: https://docs.totem.ing/api/totemsdk-omnia-splice/interfaces/SpliceParams [**@totemsdk/omnia-splice**](../index.md) *** [@totemsdk/omnia-splice](../index.md) / SpliceParams # Interface: SpliceParams ## Properties ### additionalAmount? > `optional` **additionalAmount?**: `bigint` *** ### additionalCoinAddress? > `optional` **additionalCoinAddress?**: `string` *** ### additionalCoinId? > `optional` **additionalCoinId?**: `string` *** ### extraOutputs? > `optional` **extraOutputs?**: `object`[] #### address > **address**: `string` #### amount > **amount**: `bigint` #### tokenId? > `optional` **tokenId?**: `string` *** ### newBalances > **newBalances**: `Record`\<`string`, `bigint`\> *** ### newTotalValue > **newTotalValue**: `bigint` *** ### type > **type**: [`SpliceType`](../type-aliases/SpliceType.md) *** ### withdrawAddress? > `optional` **withdrawAddress?**: `string` *** ### withdrawAmount? > `optional` **withdrawAmount?**: `bigint` --- ## Page: SpliceProposal URL: https://docs.totem.ing/api/totemsdk-omnia-splice/interfaces/SpliceProposal [**@totemsdk/omnia-splice**](../index.md) *** [@totemsdk/omnia-splice](../index.md) / SpliceProposal # Interface: SpliceProposal Splice proposal produced by the initiating party. `spliceTxHex` contains the canonical Minima TX bytes (hex) that both parties independently verify before signing. `spliceTxDraft` retains the structured representation needed for digest computation and output inspection by the acceptor; it is NOT sent over the wire in production but is included here for the v0.1.0 in-process protocol. Future relay integration will transmit only `spliceTxHex` + `params`. `proposerReservationId` and `proposerSigningIndices` carry the WOTS lease reservation used when producing `proposerSignature`. They are consumed by `finalizeSplice` to commit or burn the reservation after the splice TX is settled, preserving key-slot accounting and preventing one-time-key reuse. ## Properties ### channelId > **channelId**: `string` *** ### params > **params**: [`SpliceParams`](SpliceParams.md) *** ### proposedAt > **proposedAt**: `number` *** ### proposerPublicKeyDigest > **proposerPublicKeyDigest**: `string` *** ### proposerReservationId > **proposerReservationId**: `string` *** ### proposerSignature > **proposerSignature**: [`WotsSignature`](../type-aliases/WotsSignature.md) *** ### proposerSigningIndices > **proposerSigningIndices**: `SigningIndices` *** ### spliceId > **spliceId**: `string` *** ### spliceTxDraft > **spliceTxDraft**: [`SpliceTxDraft`](SpliceTxDraft.md) *** ### spliceTxHex > **spliceTxHex**: `string` --- ## Page: SpliceRecord URL: https://docs.totem.ing/api/totemsdk-omnia-splice/interfaces/SpliceRecord [**@totemsdk/omnia-splice**](../index.md) *** [@totemsdk/omnia-splice](../index.md) / SpliceRecord # Interface: SpliceRecord One in-progress splice: proposal persisted first, acceptance added later. ## Properties ### acceptance? > `optional` **acceptance?**: [`SpliceAcceptance`](SpliceAcceptance.md) *** ### channelId > **channelId**: `string` *** ### proposal > **proposal**: [`SpliceProposal`](SpliceProposal.md) *** ### spliceId > **spliceId**: `string` *** ### status > **status**: [`SpliceRecordStatus`](../type-aliases/SpliceRecordStatus.md) *** ### updatedAt > **updatedAt**: `number` --- ## Page: SpliceSigningIndices URL: https://docs.totem.ing/api/totemsdk-omnia-splice/interfaces/SpliceSigningIndices [**@totemsdk/omnia-splice**](../index.md) *** [@totemsdk/omnia-splice](../index.md) / SpliceSigningIndices # Interface: SpliceSigningIndices ## Properties ### addressIndex > **addressIndex**: `number` *** ### l1 > **l1**: `number` *** ### l2 > **l2**: `number` --- ## Page: SpliceStoreState URL: https://docs.totem.ing/api/totemsdk-omnia-splice/interfaces/SpliceStoreState [**@totemsdk/omnia-splice**](../index.md) *** [@totemsdk/omnia-splice](../index.md) / SpliceStoreState # Interface: SpliceStoreState ## Properties ### splices > **splices**: `Record`\<`string`, [`SpliceRecord`](SpliceRecord.md)\> spliceId → splice record. --- ## Page: SpliceTxDraft URL: https://docs.totem.ing/api/totemsdk-omnia-splice/interfaces/SpliceTxDraft [**@totemsdk/omnia-splice**](../index.md) *** [@totemsdk/omnia-splice](../index.md) / SpliceTxDraft # Interface: SpliceTxDraft ## Properties ### channelId > **channelId**: `string` *** ### inputs > **inputs**: [`SpliceTxInput`](SpliceTxInput.md)[] *** ### outputs > **outputs**: [`SpliceTxOutput`](SpliceTxOutput.md)[] *** ### params > **params**: [`SpliceParams`](SpliceParams.md) --- ## Page: SpliceTxInput URL: https://docs.totem.ing/api/totemsdk-omnia-splice/interfaces/SpliceTxInput [**@totemsdk/omnia-splice**](../index.md) *** [@totemsdk/omnia-splice](../index.md) / SpliceTxInput # Interface: SpliceTxInput ## Properties ### address > **address**: `string` *** ### amount > **amount**: `bigint` *** ### coinId > **coinId**: `string` *** ### tokenId > **tokenId**: `string` --- ## Page: SpliceTxOutput URL: https://docs.totem.ing/api/totemsdk-omnia-splice/interfaces/SpliceTxOutput [**@totemsdk/omnia-splice**](../index.md) *** [@totemsdk/omnia-splice](../index.md) / SpliceTxOutput # Interface: SpliceTxOutput ## Properties ### address > **address**: `string` *** ### amount > **amount**: `bigint` *** ### stateVarSequence > **stateVarSequence**: `number` *** ### stateVarSettlement > **stateVarSettlement**: `boolean` *** ### storeState > **storeState**: `boolean` *** ### tokenId > **tokenId**: `string` --- ## Page: QuiescedChannel URL: https://docs.totem.ing/api/totemsdk-omnia-splice/type-aliases/QuiescedChannel [**@totemsdk/omnia-splice**](../index.md) *** [@totemsdk/omnia-splice](../index.md) / QuiescedChannel # Type Alias: QuiescedChannel > **QuiescedChannel** = `Omit`\<`OmniaChannel`, `"status"`\> & `object` A channel returned by `quiesceChannel`. - `status: 'quiesced'` — no new HTLCs may be added until the splice confirms. - `pendingHTLCs: []` — all resolved HTLCs are cleared from the active list. - `quiesceSignedState` — the local party's partial signed state over the final pre-splice balance split (sequence incremented by one). Exchange this with the counterparty to obtain their co-signature before finalizing the splice. ## Type Declaration ### quiesceSignedState > **quiesceSignedState**: `Partial`\<`SignedChannelState`\> ### status > **status**: `"quiesced"` --- ## Page: SpliceRecordStatus URL: https://docs.totem.ing/api/totemsdk-omnia-splice/type-aliases/SpliceRecordStatus [**@totemsdk/omnia-splice**](../index.md) *** [@totemsdk/omnia-splice](../index.md) / SpliceRecordStatus # Type Alias: SpliceRecordStatus > **SpliceRecordStatus** = `"pending"` \| `"accepted"` \| `"finalized"` --- ## Page: SpliceType URL: https://docs.totem.ing/api/totemsdk-omnia-splice/type-aliases/SpliceType [**@totemsdk/omnia-splice**](../index.md) *** [@totemsdk/omnia-splice](../index.md) / SpliceType # Type Alias: SpliceType > **SpliceType** = `"splice_in"` \| `"splice_out"` --- ## Page: SplicedChannel URL: https://docs.totem.ing/api/totemsdk-omnia-splice/type-aliases/SplicedChannel [**@totemsdk/omnia-splice**](../index.md) *** [@totemsdk/omnia-splice](../index.md) / SplicedChannel # Type Alias: SplicedChannel > **SplicedChannel** = `OmniaChannel` & `object` A channel returned by `finalizeSplice`. Extends OmniaChannel with splice provenance fields. The returned channel is immediately usable for new payments: `status: 'active'`, `currentSequence: 0`, fresh WOTS budget. `splicedFrom` identifies the old channel and `spliceFundingCoinId` is the new on-chain UTXO. **Mutation side effect**: `finalizeSplice` mutates the `channel` argument (the `QuiescedChannel` passed in) by setting `status: 'spliced'` after the splice TX is confirmed. This invalidates the old channel in-place; the returned `SplicedChannel` (status: 'active') is the only valid live channel. ## Type Declaration ### splicedFrom > **splicedFrom**: `string` ### spliceFundingCoinId > **spliceFundingCoinId**: `string` ### spliceFundingTxId > **spliceFundingTxId**: `string` ### spliceType > **spliceType**: [`SpliceType`](SpliceType.md) --- ## Page: WotsSignature URL: https://docs.totem.ing/api/totemsdk-omnia-splice/type-aliases/WotsSignature [**@totemsdk/omnia-splice**](../index.md) *** [@totemsdk/omnia-splice](../index.md) / WotsSignature # Type Alias: WotsSignature > **WotsSignature** = `Uint8Array` --- ## Page: MemoryOmniaVtxoStore URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/classes/MemoryOmniaVtxoStore [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / MemoryOmniaVtxoStore # Class: MemoryOmniaVtxoStore ## Implements - [`OmniaVtxoStore`](../interfaces/OmniaVtxoStore.md) ## Constructors ### Constructor > **new MemoryOmniaVtxoStore**(): `MemoryOmniaVtxoStore` #### Returns `MemoryOmniaVtxoStore` ## Methods ### getPool() > **getPool**(`poolId`): `Promise`\<[`OmniaVtxoPool`](../interfaces/OmniaVtxoPool.md) \| `undefined`\> #### Parameters ##### poolId `string` #### Returns `Promise`\<[`OmniaVtxoPool`](../interfaces/OmniaVtxoPool.md) \| `undefined`\> #### Implementation of [`OmniaVtxoStore`](../interfaces/OmniaVtxoStore.md).[`getPool`](../interfaces/OmniaVtxoStore.md#getpool) *** ### getVtxo() > **getVtxo**(`vtxoId`): `Promise`\<[`OmniaVtxo`](../interfaces/OmniaVtxo.md) \| `undefined`\> #### Parameters ##### vtxoId `string` #### Returns `Promise`\<[`OmniaVtxo`](../interfaces/OmniaVtxo.md) \| `undefined`\> #### Implementation of [`OmniaVtxoStore`](../interfaces/OmniaVtxoStore.md).[`getVtxo`](../interfaces/OmniaVtxoStore.md#getvtxo) *** ### listVtxos() > **listVtxos**(`poolId?`): `Promise`\<[`OmniaVtxo`](../interfaces/OmniaVtxo.md)[]\> #### Parameters ##### poolId? `string` #### Returns `Promise`\<[`OmniaVtxo`](../interfaces/OmniaVtxo.md)[]\> #### Implementation of [`OmniaVtxoStore`](../interfaces/OmniaVtxoStore.md).[`listVtxos`](../interfaces/OmniaVtxoStore.md#listvtxos) *** ### markVtxoSpent() > **markVtxoSpent**(`vtxoId`, `now?`): `Promise`\<`void`\> Marks a VTXO as spent. Accepts an optional `now` timestamp for deterministic testing. When `now` is omitted the store falls back to `Date.now()` — this is intentional and explicitly documented: the store is a persistence layer, not a pure function, so wall-clock time is an acceptable default for production use. Pass `now` in tests. #### Parameters ##### vtxoId `string` ##### now? `number` #### Returns `Promise`\<`void`\> #### Implementation of [`OmniaVtxoStore`](../interfaces/OmniaVtxoStore.md).[`markVtxoSpent`](../interfaces/OmniaVtxoStore.md#markvtxospent) *** ### savePool() > **savePool**(`pool`): `Promise`\<`void`\> #### Parameters ##### pool [`OmniaVtxoPool`](../interfaces/OmniaVtxoPool.md) #### Returns `Promise`\<`void`\> #### Implementation of [`OmniaVtxoStore`](../interfaces/OmniaVtxoStore.md).[`savePool`](../interfaces/OmniaVtxoStore.md#savepool) *** ### saveVtxo() > **saveVtxo**(`vtxo`): `Promise`\<`void`\> #### Parameters ##### vtxo [`OmniaVtxo`](../interfaces/OmniaVtxo.md) #### Returns `Promise`\<`void`\> #### Implementation of [`OmniaVtxoStore`](../interfaces/OmniaVtxoStore.md).[`saveVtxo`](../interfaces/OmniaVtxoStore.md#savevtxo) --- ## Page: OmniaVtxoError URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/classes/OmniaVtxoError [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / OmniaVtxoError # Class: OmniaVtxoError ## Extends - `Error` ## Extended by - [`VtxoAmountError`](VtxoAmountError.md) - [`VtxoStatusError`](VtxoStatusError.md) - [`VtxoOwnershipError`](VtxoOwnershipError.md) - [`VtxoProofError`](VtxoProofError.md) - [`VtxoPoolCapacityError`](VtxoPoolCapacityError.md) - [`VtxoPolicyError`](VtxoPolicyError.md) - [`VtxoMergeError`](VtxoMergeError.md) - [`VtxoSplitError`](VtxoSplitError.md) - [`VtxoExitError`](VtxoExitError.md) ## Constructors ### Constructor > **new OmniaVtxoError**(`message`): `OmniaVtxoError` #### Parameters ##### message `string` #### Returns `OmniaVtxoError` #### Overrides `Error.constructor` ## Properties ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: VtxoAmountError URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/classes/VtxoAmountError [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / VtxoAmountError # Class: VtxoAmountError ## Extends - [`OmniaVtxoError`](OmniaVtxoError.md) ## Constructors ### Constructor > **new VtxoAmountError**(`message`): `VtxoAmountError` #### Parameters ##### message `string` #### Returns `VtxoAmountError` #### Overrides [`OmniaVtxoError`](OmniaVtxoError.md).[`constructor`](OmniaVtxoError.md#constructor) ## Properties ### message > **message**: `string` #### Inherited from [`OmniaVtxoError`](OmniaVtxoError.md).[`message`](OmniaVtxoError.md#message) *** ### name > **name**: `string` #### Inherited from [`OmniaVtxoError`](OmniaVtxoError.md).[`name`](OmniaVtxoError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`OmniaVtxoError`](OmniaVtxoError.md).[`stack`](OmniaVtxoError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`OmniaVtxoError`](OmniaVtxoError.md).[`stackTraceLimit`](OmniaVtxoError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`OmniaVtxoError`](OmniaVtxoError.md).[`captureStackTrace`](OmniaVtxoError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`OmniaVtxoError`](OmniaVtxoError.md).[`prepareStackTrace`](OmniaVtxoError.md#preparestacktrace) --- ## Page: VtxoExitError URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/classes/VtxoExitError [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / VtxoExitError # Class: VtxoExitError ## Extends - [`OmniaVtxoError`](OmniaVtxoError.md) ## Constructors ### Constructor > **new VtxoExitError**(`message`): `VtxoExitError` #### Parameters ##### message `string` #### Returns `VtxoExitError` #### Overrides [`OmniaVtxoError`](OmniaVtxoError.md).[`constructor`](OmniaVtxoError.md#constructor) ## Properties ### message > **message**: `string` #### Inherited from [`OmniaVtxoError`](OmniaVtxoError.md).[`message`](OmniaVtxoError.md#message) *** ### name > **name**: `string` #### Inherited from [`OmniaVtxoError`](OmniaVtxoError.md).[`name`](OmniaVtxoError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`OmniaVtxoError`](OmniaVtxoError.md).[`stack`](OmniaVtxoError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`OmniaVtxoError`](OmniaVtxoError.md).[`stackTraceLimit`](OmniaVtxoError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`OmniaVtxoError`](OmniaVtxoError.md).[`captureStackTrace`](OmniaVtxoError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`OmniaVtxoError`](OmniaVtxoError.md).[`prepareStackTrace`](OmniaVtxoError.md#preparestacktrace) --- ## Page: VtxoMergeError URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/classes/VtxoMergeError [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / VtxoMergeError # Class: VtxoMergeError ## Extends - [`OmniaVtxoError`](OmniaVtxoError.md) ## Constructors ### Constructor > **new VtxoMergeError**(`message`): `VtxoMergeError` #### Parameters ##### message `string` #### Returns `VtxoMergeError` #### Overrides [`OmniaVtxoError`](OmniaVtxoError.md).[`constructor`](OmniaVtxoError.md#constructor) ## Properties ### message > **message**: `string` #### Inherited from [`OmniaVtxoError`](OmniaVtxoError.md).[`message`](OmniaVtxoError.md#message) *** ### name > **name**: `string` #### Inherited from [`OmniaVtxoError`](OmniaVtxoError.md).[`name`](OmniaVtxoError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`OmniaVtxoError`](OmniaVtxoError.md).[`stack`](OmniaVtxoError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`OmniaVtxoError`](OmniaVtxoError.md).[`stackTraceLimit`](OmniaVtxoError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`OmniaVtxoError`](OmniaVtxoError.md).[`captureStackTrace`](OmniaVtxoError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`OmniaVtxoError`](OmniaVtxoError.md).[`prepareStackTrace`](OmniaVtxoError.md#preparestacktrace) --- ## Page: VtxoOwnershipError URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/classes/VtxoOwnershipError [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / VtxoOwnershipError # Class: VtxoOwnershipError ## Extends - [`OmniaVtxoError`](OmniaVtxoError.md) ## Constructors ### Constructor > **new VtxoOwnershipError**(`message`): `VtxoOwnershipError` #### Parameters ##### message `string` #### Returns `VtxoOwnershipError` #### Overrides [`OmniaVtxoError`](OmniaVtxoError.md).[`constructor`](OmniaVtxoError.md#constructor) ## Properties ### message > **message**: `string` #### Inherited from [`OmniaVtxoError`](OmniaVtxoError.md).[`message`](OmniaVtxoError.md#message) *** ### name > **name**: `string` #### Inherited from [`OmniaVtxoError`](OmniaVtxoError.md).[`name`](OmniaVtxoError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`OmniaVtxoError`](OmniaVtxoError.md).[`stack`](OmniaVtxoError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`OmniaVtxoError`](OmniaVtxoError.md).[`stackTraceLimit`](OmniaVtxoError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`OmniaVtxoError`](OmniaVtxoError.md).[`captureStackTrace`](OmniaVtxoError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`OmniaVtxoError`](OmniaVtxoError.md).[`prepareStackTrace`](OmniaVtxoError.md#preparestacktrace) --- ## Page: VtxoPolicyError URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/classes/VtxoPolicyError [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / VtxoPolicyError # Class: VtxoPolicyError ## Extends - [`OmniaVtxoError`](OmniaVtxoError.md) ## Constructors ### Constructor > **new VtxoPolicyError**(`message`): `VtxoPolicyError` #### Parameters ##### message `string` #### Returns `VtxoPolicyError` #### Overrides [`OmniaVtxoError`](OmniaVtxoError.md).[`constructor`](OmniaVtxoError.md#constructor) ## Properties ### message > **message**: `string` #### Inherited from [`OmniaVtxoError`](OmniaVtxoError.md).[`message`](OmniaVtxoError.md#message) *** ### name > **name**: `string` #### Inherited from [`OmniaVtxoError`](OmniaVtxoError.md).[`name`](OmniaVtxoError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`OmniaVtxoError`](OmniaVtxoError.md).[`stack`](OmniaVtxoError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`OmniaVtxoError`](OmniaVtxoError.md).[`stackTraceLimit`](OmniaVtxoError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`OmniaVtxoError`](OmniaVtxoError.md).[`captureStackTrace`](OmniaVtxoError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`OmniaVtxoError`](OmniaVtxoError.md).[`prepareStackTrace`](OmniaVtxoError.md#preparestacktrace) --- ## Page: VtxoPoolCapacityError URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/classes/VtxoPoolCapacityError [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / VtxoPoolCapacityError # Class: VtxoPoolCapacityError ## Extends - [`OmniaVtxoError`](OmniaVtxoError.md) ## Constructors ### Constructor > **new VtxoPoolCapacityError**(`message`, `requested`, `available`): `VtxoPoolCapacityError` #### Parameters ##### message `string` ##### requested `bigint` ##### available `bigint` #### Returns `VtxoPoolCapacityError` #### Overrides [`OmniaVtxoError`](OmniaVtxoError.md).[`constructor`](OmniaVtxoError.md#constructor) ## Properties ### available > `readonly` **available**: `bigint` *** ### message > **message**: `string` #### Inherited from [`OmniaVtxoError`](OmniaVtxoError.md).[`message`](OmniaVtxoError.md#message) *** ### name > **name**: `string` #### Inherited from [`OmniaVtxoError`](OmniaVtxoError.md).[`name`](OmniaVtxoError.md#name) *** ### requested > `readonly` **requested**: `bigint` *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`OmniaVtxoError`](OmniaVtxoError.md).[`stack`](OmniaVtxoError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`OmniaVtxoError`](OmniaVtxoError.md).[`stackTraceLimit`](OmniaVtxoError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`OmniaVtxoError`](OmniaVtxoError.md).[`captureStackTrace`](OmniaVtxoError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`OmniaVtxoError`](OmniaVtxoError.md).[`prepareStackTrace`](OmniaVtxoError.md#preparestacktrace) --- ## Page: VtxoProofError URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/classes/VtxoProofError [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / VtxoProofError # Class: VtxoProofError ## Extends - [`OmniaVtxoError`](OmniaVtxoError.md) ## Constructors ### Constructor > **new VtxoProofError**(`message`): `VtxoProofError` #### Parameters ##### message `string` #### Returns `VtxoProofError` #### Overrides [`OmniaVtxoError`](OmniaVtxoError.md).[`constructor`](OmniaVtxoError.md#constructor) ## Properties ### message > **message**: `string` #### Inherited from [`OmniaVtxoError`](OmniaVtxoError.md).[`message`](OmniaVtxoError.md#message) *** ### name > **name**: `string` #### Inherited from [`OmniaVtxoError`](OmniaVtxoError.md).[`name`](OmniaVtxoError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`OmniaVtxoError`](OmniaVtxoError.md).[`stack`](OmniaVtxoError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`OmniaVtxoError`](OmniaVtxoError.md).[`stackTraceLimit`](OmniaVtxoError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`OmniaVtxoError`](OmniaVtxoError.md).[`captureStackTrace`](OmniaVtxoError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`OmniaVtxoError`](OmniaVtxoError.md).[`prepareStackTrace`](OmniaVtxoError.md#preparestacktrace) --- ## Page: VtxoSplitError URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/classes/VtxoSplitError [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / VtxoSplitError # Class: VtxoSplitError ## Extends - [`OmniaVtxoError`](OmniaVtxoError.md) ## Constructors ### Constructor > **new VtxoSplitError**(`message`): `VtxoSplitError` #### Parameters ##### message `string` #### Returns `VtxoSplitError` #### Overrides [`OmniaVtxoError`](OmniaVtxoError.md).[`constructor`](OmniaVtxoError.md#constructor) ## Properties ### message > **message**: `string` #### Inherited from [`OmniaVtxoError`](OmniaVtxoError.md).[`message`](OmniaVtxoError.md#message) *** ### name > **name**: `string` #### Inherited from [`OmniaVtxoError`](OmniaVtxoError.md).[`name`](OmniaVtxoError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`OmniaVtxoError`](OmniaVtxoError.md).[`stack`](OmniaVtxoError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`OmniaVtxoError`](OmniaVtxoError.md).[`stackTraceLimit`](OmniaVtxoError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`OmniaVtxoError`](OmniaVtxoError.md).[`captureStackTrace`](OmniaVtxoError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`OmniaVtxoError`](OmniaVtxoError.md).[`prepareStackTrace`](OmniaVtxoError.md#preparestacktrace) --- ## Page: VtxoStatusError URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/classes/VtxoStatusError [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / VtxoStatusError # Class: VtxoStatusError ## Extends - [`OmniaVtxoError`](OmniaVtxoError.md) ## Constructors ### Constructor > **new VtxoStatusError**(`message`, `currentStatus`): `VtxoStatusError` #### Parameters ##### message `string` ##### currentStatus `string` #### Returns `VtxoStatusError` #### Overrides [`OmniaVtxoError`](OmniaVtxoError.md).[`constructor`](OmniaVtxoError.md#constructor) ## Properties ### currentStatus > `readonly` **currentStatus**: `string` *** ### message > **message**: `string` #### Inherited from [`OmniaVtxoError`](OmniaVtxoError.md).[`message`](OmniaVtxoError.md#message) *** ### name > **name**: `string` #### Inherited from [`OmniaVtxoError`](OmniaVtxoError.md).[`name`](OmniaVtxoError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`OmniaVtxoError`](OmniaVtxoError.md).[`stack`](OmniaVtxoError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`OmniaVtxoError`](OmniaVtxoError.md).[`stackTraceLimit`](OmniaVtxoError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`OmniaVtxoError`](OmniaVtxoError.md).[`captureStackTrace`](OmniaVtxoError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`OmniaVtxoError`](OmniaVtxoError.md).[`prepareStackTrace`](OmniaVtxoError.md#preparestacktrace) --- ## Page: advancePoolEpoch URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/functions/advancePoolEpoch [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / advancePoolEpoch # Function: advancePoolEpoch() > **advancePoolEpoch**(`pool`, `newEpoch`): [`OmniaVtxoPool`](../interfaces/OmniaVtxoPool.md) ## Parameters ### pool [`OmniaVtxoPool`](../interfaces/OmniaVtxoPool.md) ### newEpoch `number` ## Returns [`OmniaVtxoPool`](../interfaces/OmniaVtxoPool.md) --- ## Page: assertPoolCanMint URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/functions/assertPoolCanMint [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / assertPoolCanMint # Function: assertPoolCanMint() > **assertPoolCanMint**(`pool`, `amount`): `void` ## Parameters ### pool [`OmniaVtxoPool`](../interfaces/OmniaVtxoPool.md) ### amount `bigint` ## Returns `void` --- ## Page: buildVtxoExitIntent URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/functions/buildVtxoExitIntent [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / buildVtxoExitIntent # Function: buildVtxoExitIntent() > **buildVtxoExitIntent**(`vtxo`): [`VtxoExitIntent`](../interfaces/VtxoExitIntent.md) ## Parameters ### vtxo [`OmniaVtxo`](../interfaces/OmniaVtxo.md) ## Returns [`VtxoExitIntent`](../interfaces/VtxoExitIntent.md) --- ## Page: buildVtxoProofSet URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/functions/buildVtxoProofSet [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / buildVtxoProofSet # Function: buildVtxoProofSet() > **buildVtxoProofSet**(`vtxos`): [`VtxoProofSet`](../interfaces/VtxoProofSet.md) ## Parameters ### vtxos [`OmniaVtxo`](../interfaces/OmniaVtxo.md)[] ## Returns [`VtxoProofSet`](../interfaces/VtxoProofSet.md) --- ## Page: buildVtxoTransferIntent URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/functions/buildVtxoTransferIntent [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / buildVtxoTransferIntent # Function: buildVtxoTransferIntent() > **buildVtxoTransferIntent**(`vtxo`, `recipient`, `amount`, `nonce`, `changeNonce?`): [`VtxoTransferIntent`](../interfaces/VtxoTransferIntent.md) ## Parameters ### vtxo [`OmniaVtxo`](../interfaces/OmniaVtxo.md) ### recipient `string` ### amount `bigint` ### nonce `string` ### changeNonce? `string` ## Returns [`VtxoTransferIntent`](../interfaces/VtxoTransferIntent.md) --- ## Page: computeCommitmentRoot URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/functions/computeCommitmentRoot [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / computeCommitmentRoot # Function: computeCommitmentRoot() > **computeCommitmentRoot**(`leaves`): `string` ## Parameters ### leaves `string`[] ## Returns `string` --- ## Page: computePoolId URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/functions/computePoolId [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / computePoolId # Function: computePoolId() > **computePoolId**(`params`): `string` ## Parameters ### params [`ComputePoolIdParams`](../interfaces/ComputePoolIdParams.md) ## Returns `string` --- ## Page: computeReceiptId URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/functions/computeReceiptId [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / computeReceiptId # Function: computeReceiptId() > **computeReceiptId**(`poolId`, `op`, `inputIds`, `outputIds`, `at`): `string` ## Parameters ### poolId `string` ### op `string` ### inputIds `string`[] ### outputIds `string`[] ### at `number` ## Returns `string` --- ## Page: computeVtxoId URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/functions/computeVtxoId [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / computeVtxoId # Function: computeVtxoId() > **computeVtxoId**(`params`): `string` ## Parameters ### params [`ComputeVtxoIdParams`](../interfaces/ComputeVtxoIdParams.md) ## Returns `string` --- ## Page: computeVtxoLeaf URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/functions/computeVtxoLeaf [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / computeVtxoLeaf # Function: computeVtxoLeaf() > **computeVtxoLeaf**(`vtxo`): `string` ## Parameters ### vtxo [`OmniaVtxo`](../interfaces/OmniaVtxo.md) ## Returns `string` --- ## Page: consumeExitReceipt URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/functions/consumeExitReceipt [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / consumeExitReceipt # Function: consumeExitReceipt() > **consumeExitReceipt**(`vtxo`, `receiptId`, `now?`): [`OmniaVtxo`](../interfaces/OmniaVtxo.md) Consume a VTXO's exit receipt — the single-spend marker that prevents a second exit draft for the same VTXO. Returns the updated VTXO. ## Parameters ### vtxo [`OmniaVtxo`](../interfaces/OmniaVtxo.md) ### receiptId `string` ### now? `number` ## Returns [`OmniaVtxo`](../interfaces/OmniaVtxo.md) --- ## Page: createDurableOmniaVtxoStore URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/functions/createDurableOmniaVtxoStore [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / createDurableOmniaVtxoStore # Function: createDurableOmniaVtxoStore() > **createDurableOmniaVtxoStore**(`adapter`, `options?`): [`DurableOmniaVtxoStore`](../interfaces/DurableOmniaVtxoStore.md) ## Parameters ### adapter `StorageAdapterWithCapabilities` & `CasStore` ### options? [`DurableOmniaVtxoStoreOptions`](../interfaces/DurableOmniaVtxoStoreOptions.md) = `{}` ## Returns [`DurableOmniaVtxoStore`](../interfaces/DurableOmniaVtxoStore.md) --- ## Page: createExitDraft URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/functions/createExitDraft [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / createExitDraft # Function: createExitDraft() > **createExitDraft**(`vtxo`, `now?`): `object` Creates a mock exit draft for a VTXO. Validates the proof leaf before drafting, caps the exit at the verified share, and consumes the VTXO's receipt so a second exit draft is refused (double-exit prevention, #28). ## Parameters ### vtxo [`OmniaVtxo`](../interfaces/OmniaVtxo.md) ### now? `number` Timestamp in ms. Defaults to Date.now() if omitted — pass explicitly for determinism. ## Returns `object` ### draft > **draft**: [`ExitDraft`](../interfaces/ExitDraft.md) ### receipt > **receipt**: [`VtxoOperatorReceipt`](../interfaces/VtxoOperatorReceipt.md) --- ## Page: createPool URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/functions/createPool [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / createPool # Function: createPool() > **createPool**(`params`, `now`): [`OmniaVtxoPool`](../interfaces/OmniaVtxoPool.md) ## Parameters ### params [`CreatePoolParams`](../interfaces/CreatePoolParams.md) ### now `number` ## Returns [`OmniaVtxoPool`](../interfaces/OmniaVtxoPool.md) --- ## Page: deserializePool URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/functions/deserializePool [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / deserializePool # Function: deserializePool() > **deserializePool**(`json`): [`OmniaVtxoPool`](../interfaces/OmniaVtxoPool.md) ## Parameters ### json `string` ## Returns [`OmniaVtxoPool`](../interfaces/OmniaVtxoPool.md) --- ## Page: deserializeVtxo URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/functions/deserializeVtxo [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / deserializeVtxo # Function: deserializeVtxo() > **deserializeVtxo**(`json`): [`OmniaVtxo`](../interfaces/OmniaVtxo.md) ## Parameters ### json `string` ## Returns [`OmniaVtxo`](../interfaces/OmniaVtxo.md) --- ## Page: isVtxoActive URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/functions/isVtxoActive [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / isVtxoActive # Function: isVtxoActive() > **isVtxoActive**(`vtxo`): `boolean` ## Parameters ### vtxo [`OmniaVtxo`](../interfaces/OmniaVtxo.md) ## Returns `boolean` --- ## Page: markExited URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/functions/markExited [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / markExited # Function: markExited() > **markExited**(`vtxo`, `now?`): [`OmniaVtxo`](../interfaces/OmniaVtxo.md) Transitions an exiting VTXO to 'exited' status. ## Parameters ### vtxo [`OmniaVtxo`](../interfaces/OmniaVtxo.md) ### now? `number` Timestamp in ms. Defaults to Date.now() if omitted — pass explicitly for determinism. ## Returns [`OmniaVtxo`](../interfaces/OmniaVtxo.md) --- ## Page: markExiting URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/functions/markExiting [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / markExiting # Function: markExiting() > **markExiting**(`vtxo`, `now?`): [`OmniaVtxo`](../interfaces/OmniaVtxo.md) Transitions an active VTXO to 'exiting' status. ## Parameters ### vtxo [`OmniaVtxo`](../interfaces/OmniaVtxo.md) ### now? `number` Timestamp in ms. Defaults to Date.now() if omitted — pass explicitly for determinism. ## Returns [`OmniaVtxo`](../interfaces/OmniaVtxo.md) --- ## Page: markVtxoSpent URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/functions/markVtxoSpent [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / markVtxoSpent # Function: markVtxoSpent() > **markVtxoSpent**(`vtxo`, `now?`): [`OmniaVtxo`](../interfaces/OmniaVtxo.md) Marks an active VTXO as spent. ## Parameters ### vtxo [`OmniaVtxo`](../interfaces/OmniaVtxo.md) ### now? `number` Timestamp in ms. Defaults to Date.now() if omitted — pass explicitly for determinism. ## Returns [`OmniaVtxo`](../interfaces/OmniaVtxo.md) --- ## Page: mergeVtxos URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/functions/mergeVtxos [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / mergeVtxos # Function: mergeVtxos() > **mergeVtxos**(`vtxos`, `params`, `now?`): [`MergeResult`](../interfaces/MergeResult.md) & `object` Merges multiple VTXOs into one. ## Parameters ### vtxos [`OmniaVtxo`](../interfaces/OmniaVtxo.md)[] ### params [`MergeVtxosParams`](../interfaces/MergeVtxosParams.md) ### now? `number` Timestamp in ms. Defaults to Date.now() if omitted — pass explicitly for determinism. ## Returns [`MergeResult`](../interfaces/MergeResult.md) & `object` --- ## Page: mintVtxo URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/functions/mintVtxo [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / mintVtxo # Function: mintVtxo() > **mintVtxo**(`pool`, `params`, `now?`): [`MintResult`](../interfaces/MintResult.md) Mints a new VTXO against a pool. ## Parameters ### pool [`OmniaVtxoPool`](../interfaces/OmniaVtxoPool.md) The pool to mint from. ### params [`MintVtxoParams`](../interfaces/MintVtxoParams.md) Mint parameters (owner, amount, nonce). ### now? `number` Timestamp in ms. Defaults to Date.now() if omitted — pass explicitly for determinism. ## Returns [`MintResult`](../interfaces/MintResult.md) --- ## Page: refreshVtxo URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/functions/refreshVtxo [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / refreshVtxo # Function: refreshVtxo() > **refreshVtxo**(`vtxo`, `params`, `now?`): [`RefreshResult`](../interfaces/RefreshResult.md) & `object` Refreshes a VTXO to a new epoch. ## Parameters ### vtxo [`OmniaVtxo`](../interfaces/OmniaVtxo.md) ### params [`RefreshVtxoParams`](../interfaces/RefreshVtxoParams.md) ### now? `number` Timestamp in ms. Defaults to Date.now() if omitted — pass explicitly for determinism. ## Returns [`RefreshResult`](../interfaces/RefreshResult.md) & `object` --- ## Page: serializePool URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/functions/serializePool [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / serializePool # Function: serializePool() > **serializePool**(`pool`): `string` ## Parameters ### pool [`OmniaVtxoPool`](../interfaces/OmniaVtxoPool.md) ## Returns `string` --- ## Page: serializeVtxo URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/functions/serializeVtxo [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / serializeVtxo # Function: serializeVtxo() > **serializeVtxo**(`vtxo`): `string` ## Parameters ### vtxo [`OmniaVtxo`](../interfaces/OmniaVtxo.md) ## Returns `string` --- ## Page: splitVtxo URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/functions/splitVtxo [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / splitVtxo # Function: splitVtxo() > **splitVtxo**(`vtxo`, `params`, `now?`): [`SplitResult`](../interfaces/SplitResult.md) & `object` Splits a VTXO into multiple outputs. ## Parameters ### vtxo [`OmniaVtxo`](../interfaces/OmniaVtxo.md) ### params [`SplitVtxoParams`](../interfaces/SplitVtxoParams.md) ### now? `number` Timestamp in ms. Defaults to Date.now() if omitted — pass explicitly for determinism. ## Returns [`SplitResult`](../interfaces/SplitResult.md) & `object` --- ## Page: transferVtxo URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/functions/transferVtxo [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / transferVtxo # Function: transferVtxo() > **transferVtxo**(`vtxo`, `params`, `now?`): [`TransferResult`](../interfaces/TransferResult.md) & `object` Transfers a VTXO (fully or partially) to a recipient. ## Parameters ### vtxo [`OmniaVtxo`](../interfaces/OmniaVtxo.md) ### params [`TransferVtxoParams`](../interfaces/TransferVtxoParams.md) ### now? `number` Timestamp in ms. Defaults to Date.now() if omitted — pass explicitly for determinism. ## Returns [`TransferResult`](../interfaces/TransferResult.md) & `object` --- ## Page: updatePoolRoot URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/functions/updatePoolRoot [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / updatePoolRoot # Function: updatePoolRoot() > **updatePoolRoot**(`pool`, `root`): [`OmniaVtxoPool`](../interfaces/OmniaVtxoPool.md) ## Parameters ### pool [`OmniaVtxoPool`](../interfaces/OmniaVtxoPool.md) ### root `string` ## Returns [`OmniaVtxoPool`](../interfaces/OmniaVtxoPool.md) --- ## Page: verifyConservation URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/functions/verifyConservation [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / verifyConservation # Function: verifyConservation() > **verifyConservation**(`params`): [`VerifyVtxoResult`](../interfaces/VerifyVtxoResult.md) Verifies amount conservation across a set of inputs and outputs. Default mode (`'lte'`): `sum(outputs) <= sum(inputs)` — allows exits, fees, and burn flows. Strict mode (`'strict'`): `sum(outputs) === sum(inputs)` — required for transfer, split, merge. Always requires: same `poolId` and `tokenId` across all inputs and outputs. ## Parameters ### params [`ConservationInput`](../interfaces/ConservationInput.md) ## Returns [`VerifyVtxoResult`](../interfaces/VerifyVtxoResult.md) --- ## Page: verifyMerkleProof URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/functions/verifyMerkleProof [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / verifyMerkleProof # Function: verifyMerkleProof() > **verifyMerkleProof**(`leaf`, `proof`, `root`): `boolean` ## Parameters ### leaf `string` ### proof [`MerkleProofNode`](../interfaces/MerkleProofNode.md)[] ### root `string` ## Returns `boolean` --- ## Page: verifyVtxo URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/functions/verifyVtxo [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / verifyVtxo # Function: verifyVtxo() > **verifyVtxo**(`vtxo`): [`VerifyVtxoResult`](../interfaces/VerifyVtxoResult.md) ## Parameters ### vtxo [`OmniaVtxo`](../interfaces/OmniaVtxo.md) ## Returns [`VerifyVtxoResult`](../interfaces/VerifyVtxoResult.md) --- ## Page: verifyVtxoProof URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/functions/verifyVtxoProof [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / verifyVtxoProof # Function: verifyVtxoProof() > **verifyVtxoProof**(`vtxo`, `proof`): [`VerifyVtxoResult`](../interfaces/VerifyVtxoResult.md) ## Parameters ### vtxo [`OmniaVtxo`](../interfaces/OmniaVtxo.md) ### proof [`VtxoProof`](../interfaces/VtxoProof.md) ## Returns [`VerifyVtxoResult`](../interfaces/VerifyVtxoResult.md) --- ## Page: verifyVtxoTransfer URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/functions/verifyVtxoTransfer [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / verifyVtxoTransfer # Function: verifyVtxoTransfer() > **verifyVtxoTransfer**(`input`, `output`, `transfer`): [`VerifyVtxoResult`](../interfaces/VerifyVtxoResult.md) ## Parameters ### input [`OmniaVtxo`](../interfaces/OmniaVtxo.md) ### output [`OmniaVtxo`](../interfaces/OmniaVtxo.md) ### transfer [`VtxoTransfer`](../interfaces/VtxoTransfer.md) ## Returns [`VerifyVtxoResult`](../interfaces/VerifyVtxoResult.md) --- ## Page: ComputePoolIdParams URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/interfaces/ComputePoolIdParams [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / ComputePoolIdParams # Interface: ComputePoolIdParams ## Properties ### nonce > **nonce**: `string` *** ### operator > **operator**: `string` *** ### tokenId > **tokenId**: `string` --- ## Page: ComputeVtxoIdParams URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/interfaces/ComputeVtxoIdParams [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / ComputeVtxoIdParams # Interface: ComputeVtxoIdParams ## Properties ### amount > **amount**: `bigint` *** ### nonce > **nonce**: `string` *** ### owner > **owner**: `string` *** ### poolId > **poolId**: `string` *** ### tokenId > **tokenId**: `string` --- ## Page: ConservationInput URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/interfaces/ConservationInput [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / ConservationInput # Interface: ConservationInput ## Properties ### inputs > **inputs**: [`OmniaVtxo`](OmniaVtxo.md)[] *** ### mode? > `optional` **mode?**: `"lte"` \| `"strict"` Conservation mode: - `'lte'` (default) — outputs may be less than or equal to inputs (allows exit/fee/burn flows) - `'strict'` — outputs must equal inputs exactly (required for transfer, split, merge) *** ### outputs > **outputs**: [`OmniaVtxo`](OmniaVtxo.md)[] --- ## Page: CreatePoolParams URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/interfaces/CreatePoolParams [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / CreatePoolParams # Interface: CreatePoolParams ## Properties ### nonce > **nonce**: `string` *** ### operator > **operator**: `string` *** ### policy? > `optional` **policy?**: `Partial`\<[`VtxoPoolPolicy`](VtxoPoolPolicy.md)\> *** ### tokenId > **tokenId**: `string` *** ### totalCapacity > **totalCapacity**: `bigint` --- ## Page: DurableOmniaVtxoStore URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/interfaces/DurableOmniaVtxoStore [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / DurableOmniaVtxoStore # Interface: DurableOmniaVtxoStore ## Extends - [`OmniaVtxoStore`](OmniaVtxoStore.md) ## Methods ### getPool() > **getPool**(`poolId`): `Promise`\<[`OmniaVtxoPool`](OmniaVtxoPool.md) \| `undefined`\> #### Parameters ##### poolId `string` #### Returns `Promise`\<[`OmniaVtxoPool`](OmniaVtxoPool.md) \| `undefined`\> #### Inherited from [`OmniaVtxoStore`](OmniaVtxoStore.md).[`getPool`](OmniaVtxoStore.md#getpool) *** ### getRevision() > **getRevision**(): `Promise`\<`number`\> Current registry transition counter (0 before the first write). #### Returns `Promise`\<`number`\> *** ### getSnapshot() > **getSnapshot**(): `Promise`\<[`OmniaVtxoRegistryState`](OmniaVtxoRegistryState.md)\> Current persisted snapshot state (pool + vtxo maps). #### Returns `Promise`\<[`OmniaVtxoRegistryState`](OmniaVtxoRegistryState.md)\> *** ### getVtxo() > **getVtxo**(`vtxoId`): `Promise`\<[`OmniaVtxo`](OmniaVtxo.md) \| `undefined`\> #### Parameters ##### vtxoId `string` #### Returns `Promise`\<[`OmniaVtxo`](OmniaVtxo.md) \| `undefined`\> #### Inherited from [`OmniaVtxoStore`](OmniaVtxoStore.md).[`getVtxo`](OmniaVtxoStore.md#getvtxo) *** ### hasState() > **hasState**(): `Promise`\<`boolean`\> True once any snapshot record has been persisted. #### Returns `Promise`\<`boolean`\> *** ### listVtxos() > **listVtxos**(`poolId?`): `Promise`\<[`OmniaVtxo`](OmniaVtxo.md)[]\> #### Parameters ##### poolId? `string` #### Returns `Promise`\<[`OmniaVtxo`](OmniaVtxo.md)[]\> #### Inherited from [`OmniaVtxoStore`](OmniaVtxoStore.md).[`listVtxos`](OmniaVtxoStore.md#listvtxos) *** ### markVtxoSpent() > **markVtxoSpent**(`vtxoId`, `now?`): `Promise`\<`void`\> #### Parameters ##### vtxoId `string` ##### now? `number` #### Returns `Promise`\<`void`\> #### Inherited from [`OmniaVtxoStore`](OmniaVtxoStore.md).[`markVtxoSpent`](OmniaVtxoStore.md#markvtxospent) *** ### savePool() > **savePool**(`pool`): `Promise`\<`void`\> #### Parameters ##### pool [`OmniaVtxoPool`](OmniaVtxoPool.md) #### Returns `Promise`\<`void`\> #### Inherited from [`OmniaVtxoStore`](OmniaVtxoStore.md).[`savePool`](OmniaVtxoStore.md#savepool) *** ### saveVtxo() > **saveVtxo**(`vtxo`): `Promise`\<`void`\> #### Parameters ##### vtxo [`OmniaVtxo`](OmniaVtxo.md) #### Returns `Promise`\<`void`\> #### Inherited from [`OmniaVtxoStore`](OmniaVtxoStore.md).[`saveVtxo`](OmniaVtxoStore.md#savevtxo) --- ## Page: DurableOmniaVtxoStoreOptions URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/interfaces/DurableOmniaVtxoStoreOptions [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / DurableOmniaVtxoStoreOptions # Interface: DurableOmniaVtxoStoreOptions ## Properties ### namespace? > `readonly` `optional` **namespace?**: `string` Key namespace prefix; default `totem_omnia_vtxo:v1:`. *** ### requireAckMode? > `readonly` `optional` **requireAckMode?**: `"volatile"` \| `"buffered"` \| `"durably-acknowledged"` Required write acknowledgment; default `durably-acknowledged`. Pass `volatile` only for tests/scratch adapters (e.g. `MemoryStore`). --- ## Page: ExitDraft URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/interfaces/ExitDraft [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / ExitDraft # Interface: ExitDraft ## Properties ### amount > **amount**: `bigint` *** ### createdAt > **createdAt**: `number` *** ### draftType > **draftType**: `"mock-exit"` *** ### owner > **owner**: `string` *** ### poolId > **poolId**: `string` *** ### timelockSeconds > **timelockSeconds**: `number` *** ### tokenId > **tokenId**: `string` *** ### verifiedShare > **verifiedShare**: `bigint` The verified share this exit is capped at (the VTXO's amount). *** ### vtxoId > **vtxoId**: `string` --- ## Page: MergeResult URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/interfaces/MergeResult [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / MergeResult # Interface: MergeResult ## Properties ### inputs > **inputs**: [`OmniaVtxo`](OmniaVtxo.md)[] *** ### output > **output**: [`OmniaVtxo`](OmniaVtxo.md) --- ## Page: MergeVtxosParams URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/interfaces/MergeVtxosParams [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / MergeVtxosParams # Interface: MergeVtxosParams ## Properties ### nonce > **nonce**: `string` *** ### owner > **owner**: `string` --- ## Page: MerkleProofNode URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/interfaces/MerkleProofNode [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / MerkleProofNode # Interface: MerkleProofNode ## Properties ### position > **position**: `"left"` \| `"right"` *** ### sibling > **sibling**: `string` --- ## Page: MintResult URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/interfaces/MintResult [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / MintResult # Interface: MintResult ## Properties ### pool > **pool**: [`OmniaVtxoPool`](OmniaVtxoPool.md) *** ### receipt > **receipt**: [`VtxoOperatorReceipt`](VtxoOperatorReceipt.md) *** ### vtxo > **vtxo**: [`OmniaVtxo`](OmniaVtxo.md) --- ## Page: MintVtxoParams URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/interfaces/MintVtxoParams [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / MintVtxoParams # Interface: MintVtxoParams ## Properties ### amount > **amount**: `bigint` *** ### expiresAt? > `optional` **expiresAt?**: `number` *** ### fundingProof? > `optional` **fundingProof?**: `unknown` The on-chain funding proof (deep proof) recorded at mint. *** ### nonce > **nonce**: `string` *** ### owner > **owner**: `string` --- ## Page: OmniaVtxo URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/interfaces/OmniaVtxo [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / OmniaVtxo # Interface: OmniaVtxo ## Properties ### amount > **amount**: `bigint` *** ### createdAt > **createdAt**: `number` *** ### epoch > **epoch**: `number` *** ### exitConsumedAt? > `optional` **exitConsumedAt?**: `number` Set when an exit draft consumed this VTXO — prevents double-exit. *** ### exitReceiptId? > `optional` **exitReceiptId?**: `string` *** ### expiresAt? > `optional` **expiresAt?**: `number` *** ### fundingProof? > `optional` **fundingProof?**: `unknown` The on-chain funding proof recorded at mint (deep proof, #28). *** ### history > **history**: [`VtxoHistoryEntry`](VtxoHistoryEntry.md)[] *** ### owner > **owner**: `string` *** ### poolId > **poolId**: `string` *** ### proof > **proof**: [`VtxoProof`](VtxoProof.md) *** ### status > **status**: [`VtxoStatus`](../type-aliases/VtxoStatus.md) *** ### tokenId > **tokenId**: `string` *** ### updatedAt > **updatedAt**: `number` *** ### vtxoId > **vtxoId**: `string` --- ## Page: OmniaVtxoOperator URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/interfaces/OmniaVtxoOperator [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / OmniaVtxoOperator # Interface: OmniaVtxoOperator ## Properties ### poolId > **poolId**: `string` ## Methods ### sign() > **sign**(`data`): `Promise`\<`string`\> #### Parameters ##### data `Uint8Array` #### Returns `Promise`\<`string`\> *** ### verify() > **verify**(`data`, `sig`): `Promise`\<`boolean`\> #### Parameters ##### data `Uint8Array` ##### sig `string` #### Returns `Promise`\<`boolean`\> --- ## Page: OmniaVtxoPool URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/interfaces/OmniaVtxoPool [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / OmniaVtxoPool # Interface: OmniaVtxoPool ## Properties ### availableCapacity > **availableCapacity**: `bigint` *** ### commitmentRoot > **commitmentRoot**: `string` *** ### createdAt > **createdAt**: `number` *** ### epoch > **epoch**: `number` *** ### operator > **operator**: `string` *** ### policy > **policy**: [`VtxoPoolPolicy`](VtxoPoolPolicy.md) *** ### poolId > **poolId**: `string` *** ### tokenId > **tokenId**: `string` *** ### totalCapacity > **totalCapacity**: `bigint` --- ## Page: OmniaVtxoRegistryState URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/interfaces/OmniaVtxoRegistryState [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / OmniaVtxoRegistryState # Interface: OmniaVtxoRegistryState ## Properties ### pools > **pools**: `Record`\<`string`, [`OmniaVtxoPool`](OmniaVtxoPool.md)\> *** ### vtxos > **vtxos**: `Record`\<`string`, [`OmniaVtxo`](OmniaVtxo.md)\> --- ## Page: OmniaVtxoStore URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/interfaces/OmniaVtxoStore [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / OmniaVtxoStore # Interface: OmniaVtxoStore ## Extended by - [`DurableOmniaVtxoStore`](DurableOmniaVtxoStore.md) ## Methods ### getPool() > **getPool**(`poolId`): `Promise`\<[`OmniaVtxoPool`](OmniaVtxoPool.md) \| `undefined`\> #### Parameters ##### poolId `string` #### Returns `Promise`\<[`OmniaVtxoPool`](OmniaVtxoPool.md) \| `undefined`\> *** ### getVtxo() > **getVtxo**(`vtxoId`): `Promise`\<[`OmniaVtxo`](OmniaVtxo.md) \| `undefined`\> #### Parameters ##### vtxoId `string` #### Returns `Promise`\<[`OmniaVtxo`](OmniaVtxo.md) \| `undefined`\> *** ### listVtxos() > **listVtxos**(`poolId?`): `Promise`\<[`OmniaVtxo`](OmniaVtxo.md)[]\> #### Parameters ##### poolId? `string` #### Returns `Promise`\<[`OmniaVtxo`](OmniaVtxo.md)[]\> *** ### markVtxoSpent() > **markVtxoSpent**(`vtxoId`, `now?`): `Promise`\<`void`\> #### Parameters ##### vtxoId `string` ##### now? `number` #### Returns `Promise`\<`void`\> *** ### savePool() > **savePool**(`pool`): `Promise`\<`void`\> #### Parameters ##### pool [`OmniaVtxoPool`](OmniaVtxoPool.md) #### Returns `Promise`\<`void`\> *** ### saveVtxo() > **saveVtxo**(`vtxo`): `Promise`\<`void`\> #### Parameters ##### vtxo [`OmniaVtxo`](OmniaVtxo.md) #### Returns `Promise`\<`void`\> --- ## Page: RefreshResult URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/interfaces/RefreshResult [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / RefreshResult # Interface: RefreshResult ## Properties ### old > **old**: [`OmniaVtxo`](OmniaVtxo.md) *** ### refreshed > **refreshed**: [`OmniaVtxo`](OmniaVtxo.md) --- ## Page: RefreshVtxoParams URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/interfaces/RefreshVtxoParams [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / RefreshVtxoParams # Interface: RefreshVtxoParams ## Properties ### newEpoch > **newEpoch**: `number` *** ### nonce > **nonce**: `string` --- ## Page: SplitResult URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/interfaces/SplitResult [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / SplitResult # Interface: SplitResult ## Properties ### input > **input**: [`OmniaVtxo`](OmniaVtxo.md) *** ### outputs > **outputs**: [`OmniaVtxo`](OmniaVtxo.md)[] --- ## Page: SplitVtxoParams URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/interfaces/SplitVtxoParams [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / SplitVtxoParams # Interface: SplitVtxoParams ## Properties ### amounts > **amounts**: `bigint`[] *** ### nonces > **nonces**: `string`[] --- ## Page: TransferResult URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/interfaces/TransferResult [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / TransferResult # Interface: TransferResult ## Properties ### change? > `optional` **change?**: [`OmniaVtxo`](OmniaVtxo.md) *** ### input > **input**: [`OmniaVtxo`](OmniaVtxo.md) *** ### output > **output**: [`OmniaVtxo`](OmniaVtxo.md) *** ### transfer > **transfer**: [`VtxoTransfer`](VtxoTransfer.md) --- ## Page: TransferVtxoParams URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/interfaces/TransferVtxoParams [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / TransferVtxoParams # Interface: TransferVtxoParams ## Properties ### amount > **amount**: `bigint` *** ### changeNonce? > `optional` **changeNonce?**: `string` *** ### nonce > **nonce**: `string` *** ### recipient > **recipient**: `string` --- ## Page: VerifyVtxoResult URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/interfaces/VerifyVtxoResult [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / VerifyVtxoResult # Interface: VerifyVtxoResult ## Properties ### errors > **errors**: `string`[] *** ### valid > **valid**: `boolean` --- ## Page: VtxoExitIntent URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/interfaces/VtxoExitIntent [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / VtxoExitIntent # Interface: VtxoExitIntent ## Properties ### amount > **amount**: `bigint` *** ### draftType > **draftType**: `"mock-exit"` *** ### owner > **owner**: `string` *** ### poolId > **poolId**: `string` *** ### tokenId > **tokenId**: `string` *** ### type > **type**: `"vtxo-exit"` *** ### vtxoId > **vtxoId**: `string` --- ## Page: VtxoHistoryEntry URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/interfaces/VtxoHistoryEntry [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / VtxoHistoryEntry # Interface: VtxoHistoryEntry ## Properties ### at > **at**: `number` *** ### from? > `optional` **from?**: `string` *** ### meta? > `optional` **meta?**: `Record`\<`string`, `unknown`\> *** ### op > **op**: [`VtxoOp`](../type-aliases/VtxoOp.md) *** ### relatedIds? > `optional` **relatedIds?**: `string`[] *** ### to? > `optional` **to?**: `string` --- ## Page: VtxoOperatorReceipt URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/interfaces/VtxoOperatorReceipt [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / VtxoOperatorReceipt # Interface: VtxoOperatorReceipt ## Properties ### at > **at**: `number` *** ### draftType? > `optional` **draftType?**: `string` *** ### epoch > **epoch**: `number` *** ### inputIds > **inputIds**: `string`[] *** ### op > **op**: [`VtxoOp`](../type-aliases/VtxoOp.md) *** ### outputIds > **outputIds**: `string`[] *** ### poolId > **poolId**: `string` *** ### receiptId > **receiptId**: `string` *** ### signature > **signature**: `string` --- ## Page: VtxoPoolPolicy URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/interfaces/VtxoPoolPolicy [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / VtxoPoolPolicy # Interface: VtxoPoolPolicy ## Properties ### exitTimelockSeconds > **exitTimelockSeconds**: `number` *** ### maxAmount > **maxAmount**: `bigint` *** ### maxMergeInputs > **maxMergeInputs**: `number` *** ### maxSplitOutputs > **maxSplitOutputs**: `number` *** ### minAmount > **minAmount**: `bigint` --- ## Page: VtxoProof URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/interfaces/VtxoProof [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / VtxoProof # Interface: VtxoProof ## Properties ### batchId > **batchId**: `string` *** ### epoch > **epoch**: `number` *** ### leaf > **leaf**: `string` *** ### positions > **positions**: (`"left"` \| `"right"`)[] *** ### root > **root**: `string` *** ### siblings > **siblings**: `string`[] --- ## Page: VtxoProofSet URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/interfaces/VtxoProofSet [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / VtxoProofSet # Interface: VtxoProofSet ## Properties ### proofs > **proofs**: `Record`\<[`VtxoId`](../type-aliases/VtxoId.md), [`VtxoProof`](VtxoProof.md)\> *** ### root > **root**: `string` --- ## Page: VtxoTransfer URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/interfaces/VtxoTransfer [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / VtxoTransfer # Interface: VtxoTransfer ## Properties ### amount > **amount**: `bigint` *** ### at > **at**: `number` *** ### changeAmount? > `optional` **changeAmount?**: `bigint` *** ### changeId? > `optional` **changeId?**: `string` *** ### from > **from**: `string` *** ### inputId > **inputId**: `string` *** ### outputId > **outputId**: `string` *** ### poolId > **poolId**: `string` *** ### to > **to**: `string` *** ### tokenId > **tokenId**: `string` --- ## Page: VtxoTransferIntent URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/interfaces/VtxoTransferIntent [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / VtxoTransferIntent # Interface: VtxoTransferIntent ## Properties ### amount > **amount**: `bigint` *** ### changeNonce? > `optional` **changeNonce?**: `string` *** ### inputId > **inputId**: `string` *** ### nonce > **nonce**: `string` *** ### poolId > **poolId**: `string` *** ### recipient > **recipient**: `string` *** ### tokenId > **tokenId**: `string` *** ### type > **type**: `"vtxo-transfer"` --- ## Page: VtxoId URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/type-aliases/VtxoId [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / VtxoId # Type Alias: VtxoId > **VtxoId** = `string` --- ## Page: VtxoOp URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/type-aliases/VtxoOp [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / VtxoOp # Type Alias: VtxoOp > **VtxoOp** = `"mint"` \| `"transfer"` \| `"split"` \| `"merge"` \| `"refresh"` \| `"exit_initiated"` \| `"exit_complete"` \| `"spent"` --- ## Page: VtxoStatus URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/type-aliases/VtxoStatus [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / VtxoStatus # Type Alias: VtxoStatus > **VtxoStatus** = `"active"` \| `"transferred"` \| `"split"` \| `"merged"` \| `"refreshed"` \| `"exiting"` \| `"exited"` \| `"spent"` \| `"expired"` \| `"invalid"` --- ## Page: DEFAULT_POLICY URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/variables/DEFAULT_POLICY [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / DEFAULT\_POLICY # Variable: DEFAULT\_POLICY > `const` **DEFAULT\_POLICY**: `object` ## Type Declaration ### exitTimelockSeconds > `readonly` **exitTimelockSeconds**: `86400` = `86400` ### maxAmount > `readonly` **maxAmount**: `bigint` ### maxMergeInputs > `readonly` **maxMergeInputs**: `8` = `8` ### maxSplitOutputs > `readonly` **maxSplitOutputs**: `8` = `8` ### minAmount > `readonly` **minAmount**: `bigint` --- ## Page: EMPTY_LEAF URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/variables/EMPTY_LEAF [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / EMPTY\_LEAF # Variable: EMPTY\_LEAF > `const` **EMPTY\_LEAF**: `"0000000000000000000000000000000000000000000000000000000000000000"` = `'0000000000000000000000000000000000000000000000000000000000000000'` --- ## Page: EMPTY_TREE_ROOT URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/variables/EMPTY_TREE_ROOT [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / EMPTY\_TREE\_ROOT # Variable: EMPTY\_TREE\_ROOT > `const` **EMPTY\_TREE\_ROOT**: `"0000000000000000000000000000000000000000000000000000000000000000"` = `'0000000000000000000000000000000000000000000000000000000000000000'` --- ## Page: EPOCH_ZERO URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/variables/EPOCH_ZERO [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / EPOCH\_ZERO # Variable: EPOCH\_ZERO > `const` **EPOCH\_ZERO**: `0` = `0` --- ## Page: MOCK_BATCH_ID URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/variables/MOCK_BATCH_ID [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / MOCK\_BATCH\_ID # Variable: MOCK\_BATCH\_ID > `const` **MOCK\_BATCH\_ID**: `"batch-local-mvp"` = `'batch-local-mvp'` --- ## Page: MOCK_OPERATOR_SIGNATURE URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/variables/MOCK_OPERATOR_SIGNATURE [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / MOCK\_OPERATOR\_SIGNATURE # Variable: MOCK\_OPERATOR\_SIGNATURE > `const` **MOCK\_OPERATOR\_SIGNATURE**: `"mock-operator-sig-v0"` = `'mock-operator-sig-v0'` --- ## Page: VTXO_ID_DOMAIN URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/variables/VTXO_ID_DOMAIN [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / VTXO\_ID\_DOMAIN # Variable: VTXO\_ID\_DOMAIN > `const` **VTXO\_ID\_DOMAIN**: `"totemsdk/omnia-vtxo/vtxo/v1"` = `'totemsdk/omnia-vtxo/vtxo/v1'` Domain-separated hash prefixes (#33) — a hash on one record cannot replay against another. --- ## Page: VTXO_LEAF_DOMAIN URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/variables/VTXO_LEAF_DOMAIN [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / VTXO\_LEAF\_DOMAIN # Variable: VTXO\_LEAF\_DOMAIN > `const` **VTXO\_LEAF\_DOMAIN**: `"totemsdk/omnia-vtxo/leaf/v1"` = `'totemsdk/omnia-vtxo/leaf/v1'` --- ## Page: VTXO_POOL_ID_DOMAIN URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/variables/VTXO_POOL_ID_DOMAIN [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / VTXO\_POOL\_ID\_DOMAIN # Variable: VTXO\_POOL\_ID\_DOMAIN > `const` **VTXO\_POOL\_ID\_DOMAIN**: `"totemsdk/omnia-vtxo/pool/v1"` = `'totemsdk/omnia-vtxo/pool/v1'` --- ## Page: VTXO_RECEIPT_DOMAIN URL: https://docs.totem.ing/api/totemsdk-omnia-vtxo/variables/VTXO_RECEIPT_DOMAIN [**@totemsdk/omnia-vtxo**](../index.md) *** [@totemsdk/omnia-vtxo](../index.md) / VTXO\_RECEIPT\_DOMAIN # Variable: VTXO\_RECEIPT\_DOMAIN > `const` **VTXO\_RECEIPT\_DOMAIN**: `"totemsdk/omnia-vtxo/receipt/v1"` = `'totemsdk/omnia-vtxo/receipt/v1'` --- ## Page: BareFileStore URL: https://docs.totem.ing/api/totemsdk-pear/classes/BareFileStore [**@totemsdk/pear**](../index.md) *** [@totemsdk/pear](../index.md) / BareFileStore # Class: BareFileStore @totemsdk/pear — KVStore interface Structurally identical to `StorageAdapter` from `@totemsdk/core` so that both `BareKVStore` and `BareFileStore` can be passed directly to `LocalLeaseProvider`, `WotsWatermarkStore`, and `lookup-client` storage slots without any adapter glue. No import from @totemsdk/core is used here to keep this package dependency-free. ## Implements - [`KVStore`](../interfaces/KVStore.md) ## Constructors ### Constructor > **new BareFileStore**(`options`): `BareFileStore` #### Parameters ##### options [`BareFileStoreOptions`](../interfaces/BareFileStoreOptions.md) #### Returns `BareFileStore` ## Methods ### clear() > **clear**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> #### Implementation of [`KVStore`](../interfaces/KVStore.md).[`clear`](../interfaces/KVStore.md#clear) *** ### flush() > **flush**(): `Promise`\<`void`\> Writes are already durable; retained for shutdown-call compatibility. #### Returns `Promise`\<`void`\> *** ### get() > **get**\<`T`\>(`key`): `Promise`\<`T` \| `null`\> #### Type Parameters ##### T `T` #### Parameters ##### key `string` #### Returns `Promise`\<`T` \| `null`\> #### Implementation of [`KVStore`](../interfaces/KVStore.md).[`get`](../interfaces/KVStore.md#get) *** ### has() > **has**(`key`): `Promise`\<`boolean`\> #### Parameters ##### key `string` #### Returns `Promise`\<`boolean`\> #### Implementation of [`KVStore`](../interfaces/KVStore.md).[`has`](../interfaces/KVStore.md#has) *** ### keys() > **keys**(): `Promise`\<`string`[]\> #### Returns `Promise`\<`string`[]\> #### Implementation of [`KVStore`](../interfaces/KVStore.md).[`keys`](../interfaces/KVStore.md#keys) *** ### remove() > **remove**(`key`): `Promise`\<`boolean`\> #### Parameters ##### key `string` #### Returns `Promise`\<`boolean`\> #### Implementation of [`KVStore`](../interfaces/KVStore.md).[`remove`](../interfaces/KVStore.md#remove) *** ### set() > **set**\<`T`\>(`key`, `value`): `Promise`\<`void`\> #### Type Parameters ##### T `T` #### Parameters ##### key `string` ##### value `T` #### Returns `Promise`\<`void`\> #### Implementation of [`KVStore`](../interfaces/KVStore.md).[`set`](../interfaces/KVStore.md#set) --- ## Page: BareHyperdriveAdapter URL: https://docs.totem.ing/api/totemsdk-pear/classes/BareHyperdriveAdapter [**@totemsdk/pear**](../index.md) *** [@totemsdk/pear](../index.md) / BareHyperdriveAdapter # Class: BareHyperdriveAdapter Wraps a real Hyperdrive instance (from the `hyperdrive` npm package) or any duck-typed object as a `HyperdriveAdapter`. Constructor accepts any Hyperdrive-like object so tests can inject mocks. ## Implements - [`HyperdriveAdapter`](../interfaces/HyperdriveAdapter.md) ## Constructors ### Constructor > **new BareHyperdriveAdapter**(`_drive`): `BareHyperdriveAdapter` #### Parameters ##### \_drive `any` #### Returns `BareHyperdriveAdapter` ## Methods ### list() > **list**(`path?`): `Promise`\<`string`[]\> List files under a prefix path. #### Parameters ##### path? `string` = `'/'` — directory prefix (default: '/') #### Returns `Promise`\<`string`[]\> #### Implementation of [`HyperdriveAdapter`](../interfaces/HyperdriveAdapter.md).[`list`](../interfaces/HyperdriveAdapter.md#list) *** ### readFile() > **readFile**(`path`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> Read a file from the drive. #### Parameters ##### path `string` — absolute path within the drive, e.g. `/manifest.json` #### Returns `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> #### Implementation of [`HyperdriveAdapter`](../interfaces/HyperdriveAdapter.md).[`readFile`](../interfaces/HyperdriveAdapter.md#readfile) *** ### watch() > **watch**(`path`, `cb`): () => `void` Watch a path for changes. #### Parameters ##### path `string` ##### cb (`changedPath`) => `void` #### Returns Unsubscribe function () => `void` #### Implementation of [`HyperdriveAdapter`](../interfaces/HyperdriveAdapter.md).[`watch`](../interfaces/HyperdriveAdapter.md#watch) *** ### writeFile() > **writeFile**(`path`, `data`): `Promise`\<`void`\> Write or overwrite a file in the drive. #### Parameters ##### path `string` — absolute path within the drive ##### data `Uint8Array` — raw bytes to write #### Returns `Promise`\<`void`\> #### Implementation of [`HyperdriveAdapter`](../interfaces/HyperdriveAdapter.md).[`writeFile`](../interfaces/HyperdriveAdapter.md#writefile) --- ## Page: BareHyperswarm URL: https://docs.totem.ing/api/totemsdk-pear/classes/BareHyperswarm [**@totemsdk/pear**](../index.md) *** [@totemsdk/pear](../index.md) / BareHyperswarm # Class: BareHyperswarm ## Constructors ### Constructor > **new BareHyperswarm**(): `BareHyperswarm` #### Returns `BareHyperswarm` ## Methods ### close() > **close**(): `Promise`\<`void`\> Destroy the underlying Hyperswarm instance. #### Returns `Promise`\<`void`\> *** ### connect() > **connect**(`topic`, `options?`): `Promise`\<[`IStreamTransport`](../interfaces/IStreamTransport.md)\> Join a Hyperswarm topic and wait for the first inbound connection. Returns an `IStreamTransport` wrapping that connection. #### Parameters ##### topic `string` \| `Uint8Array`\<`ArrayBufferLike`\> ##### options? [`SwarmConnectOptions`](../interfaces/SwarmConnectOptions.md) = `{}` #### Returns `Promise`\<[`IStreamTransport`](../interfaces/IStreamTransport.md)\> --- ## Page: BareKVStore URL: https://docs.totem.ing/api/totemsdk-pear/classes/BareKVStore [**@totemsdk/pear**](../index.md) *** [@totemsdk/pear](../index.md) / BareKVStore # Class: BareKVStore @totemsdk/pear — KVStore interface Structurally identical to `StorageAdapter` from `@totemsdk/core` so that both `BareKVStore` and `BareFileStore` can be passed directly to `LocalLeaseProvider`, `WotsWatermarkStore`, and `lookup-client` storage slots without any adapter glue. No import from @totemsdk/core is used here to keep this package dependency-free. ## Implements - [`KVStore`](../interfaces/KVStore.md) ## Constructors ### Constructor > **new BareKVStore**(`_options?`): `BareKVStore` #### Parameters ##### \_options? [`BareKVStoreOptions`](../interfaces/BareKVStoreOptions.md) = `{}` #### Returns `BareKVStore` ## Methods ### clear() > **clear**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> #### Implementation of [`KVStore`](../interfaces/KVStore.md).[`clear`](../interfaces/KVStore.md#clear) *** ### close() > **close**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### get() > **get**\<`T`\>(`key`): `Promise`\<`T` \| `null`\> #### Type Parameters ##### T `T` #### Parameters ##### key `string` #### Returns `Promise`\<`T` \| `null`\> #### Implementation of [`KVStore`](../interfaces/KVStore.md).[`get`](../interfaces/KVStore.md#get) *** ### has() > **has**(`key`): `Promise`\<`boolean`\> #### Parameters ##### key `string` #### Returns `Promise`\<`boolean`\> #### Implementation of [`KVStore`](../interfaces/KVStore.md).[`has`](../interfaces/KVStore.md#has) *** ### keys() > **keys**(): `Promise`\<`string`[]\> #### Returns `Promise`\<`string`[]\> #### Implementation of [`KVStore`](../interfaces/KVStore.md).[`keys`](../interfaces/KVStore.md#keys) *** ### remove() > **remove**(`key`): `Promise`\<`boolean`\> #### Parameters ##### key `string` #### Returns `Promise`\<`boolean`\> #### Implementation of [`KVStore`](../interfaces/KVStore.md).[`remove`](../interfaces/KVStore.md#remove) *** ### set() > **set**\<`T`\>(`key`, `value`): `Promise`\<`void`\> #### Type Parameters ##### T `T` #### Parameters ##### key `string` ##### value `T` #### Returns `Promise`\<`void`\> #### Implementation of [`KVStore`](../interfaces/KVStore.md).[`set`](../interfaces/KVStore.md#set) --- ## Page: bareFetch URL: https://docs.totem.ing/api/totemsdk-pear/functions/bareFetch [**@totemsdk/pear**](../index.md) *** [@totemsdk/pear](../index.md) / bareFetch # Function: bareFetch() > **bareFetch**(`url`, `init?`): `Promise`\<[`FetchResponse`](../interfaces/FetchResponse.md)\> Polyfill-aware fetch. - In environments where `globalThis.fetch` exists: delegates to it. - Otherwise: uses `bare-http1` (dynamic import) for HTTP/1.1 requests. ## Parameters ### url `string` ### init? [`FetchInit`](../interfaces/FetchInit.md) = `{}` ## Returns `Promise`\<[`FetchResponse`](../interfaces/FetchResponse.md)\> --- ## Page: createLogger URL: https://docs.totem.ing/api/totemsdk-pear/functions/createLogger [**@totemsdk/pear**](../index.md) *** [@totemsdk/pear](../index.md) / createLogger # Function: createLogger() > **createLogger**(`name`): [`Logger`](../interfaces/Logger.md) Create a named logger scoped to a component. ## Parameters ### name `string` — Component name shown in every log line, e.g. 'BareKVStore' ## Returns [`Logger`](../interfaces/Logger.md) --- ## Page: createPearApp URL: https://docs.totem.ing/api/totemsdk-pear/functions/createPearApp [**@totemsdk/pear**](../index.md) *** [@totemsdk/pear](../index.md) / createPearApp # Function: createPearApp() > **createPearApp**(`config?`): [`PearApp`](../interfaces/PearApp.md) Initialise the Pear runtime integration. - Registers `runExitHandlers` with `globalThis.Pear.teardown` **once** (idempotent; safe to call on every app init). - Registers the `onUpdate` handler **every time** a non-null handler is provided — the handler is not guarded so it can be refreshed. - Safe to call in environments without `globalThis.Pear` (Node.js, bare without Pear) — no-op for the Pear-specific parts. ## Parameters ### config? [`PearAppConfig`](../interfaces/PearAppConfig.md) = `{}` ## Returns [`PearApp`](../interfaces/PearApp.md) --- ## Page: defaultSwarmConfig URL: https://docs.totem.ing/api/totemsdk-pear/functions/defaultSwarmConfig [**@totemsdk/pear**](../index.md) *** [@totemsdk/pear](../index.md) / defaultSwarmConfig # Function: defaultSwarmConfig() > **defaultSwarmConfig**(): [`SwarmConfig`](../interfaces/SwarmConfig.md) Safe defaults for Hyperswarm join options. ## Returns [`SwarmConfig`](../interfaces/SwarmConfig.md) --- ## Page: loadConfig URL: https://docs.totem.ing/api/totemsdk-pear/functions/loadConfig [**@totemsdk/pear**](../index.md) *** [@totemsdk/pear](../index.md) / loadConfig # Function: loadConfig() > **loadConfig**(`appName`, `configPath?`): `Promise`\<[`AppConfig`](../interfaces/AppConfig.md)\> Load app configuration. Resolution order: 1. `globalThis.Pear.config` — Pear-runtime-injected config object 2. `pear://config/` — looked up in `globalThis.Pear.storage` (Pear's local persistent KV store for the app) 3. `configPath` — JSON file on disk (bare-fs → node:fs fallback) 4. Default: `{ appName }` ## Parameters ### appName `string` ### configPath? `string` ## Returns `Promise`\<[`AppConfig`](../interfaces/AppConfig.md)\> --- ## Page: loadManifest URL: https://docs.totem.ing/api/totemsdk-pear/functions/loadManifest [**@totemsdk/pear**](../index.md) *** [@totemsdk/pear](../index.md) / loadManifest # Function: loadManifest() > **loadManifest**(`pearTopicKey`, `adapter?`, `options?`): `Promise`\<[`SignedManifest`](../interfaces/SignedManifest.md)\> Load and parse `manifest.json` from a remote Hyperdrive identified by its 64-hex `pearTopicKey`. - Joins Hyperswarm to locate peers for the given topic key. - Reads `/manifest.json` from the replicated drive. - If `@totemsdk/app-manifest` is installed its `decodeManifest` is used for schema validation; otherwise the raw JSON is returned. Pass a pre-opened `adapter` to skip the network join (useful in tests). ## Parameters ### pearTopicKey `string` ### adapter? [`HyperdriveAdapter`](../interfaces/HyperdriveAdapter.md) ### options? [`RemoteDriveOptions`](../interfaces/RemoteDriveOptions.md) ## Returns `Promise`\<[`SignedManifest`](../interfaces/SignedManifest.md)\> --- ## Page: onExit URL: https://docs.totem.ing/api/totemsdk-pear/functions/onExit [**@totemsdk/pear**](../index.md) *** [@totemsdk/pear](../index.md) / onExit # Function: onExit() > **onExit**(`cb`): [`Unsubscribe`](../type-aliases/Unsubscribe.md) Register a cleanup callback to be called on app shutdown. Callbacks are called in **LIFO** (last-in-first-out) order so that higher-level clients are torn down before lower-level transports. Returns an unsubscribe function that removes the callback. ## Parameters ### cb [`ExitCallback`](../type-aliases/ExitCallback.md) ## Returns [`Unsubscribe`](../type-aliases/Unsubscribe.md) --- ## Page: openLocalDrive URL: https://docs.totem.ing/api/totemsdk-pear/functions/openLocalDrive [**@totemsdk/pear**](../index.md) *** [@totemsdk/pear](../index.md) / openLocalDrive # Function: openLocalDrive() > **openLocalDrive**(`storagePath`): `Promise`\<[`BareHyperdriveAdapter`](../classes/BareHyperdriveAdapter.md)\> Open a **local** Hyperdrive from a Corestore path (no network required). Useful when the drive content is already replicated locally or when the caller manages replication separately. ## Parameters ### storagePath `string` ## Returns `Promise`\<[`BareHyperdriveAdapter`](../classes/BareHyperdriveAdapter.md)\> --- ## Page: openRemoteDrive URL: https://docs.totem.ing/api/totemsdk-pear/functions/openRemoteDrive [**@totemsdk/pear**](../index.md) *** [@totemsdk/pear](../index.md) / openRemoteDrive # Function: openRemoteDrive() > **openRemoteDrive**(`pearTopicKey`, `options?`): `Promise`\<[`BareHyperdriveAdapter`](../classes/BareHyperdriveAdapter.md) & `object`\> Open a **remote** Hyperdrive identified by its 64-hex `pearTopicKey`. Steps: 1. Creates a Corestore for local block caching. 2. Creates a Hyperswarm and joins the topic derived from `pearTopicKey`. 3. Plumbs each swarm connection into Corestore's replication stream. 4. Opens a Hyperdrive seeded with the public key derived from `pearTopicKey`. 5. Waits for the drive to become `ready` (blocks are fetched from peers). ## Parameters ### pearTopicKey `string` — 64-hex public key of the Hyperdrive's root Hypercore ### options? [`RemoteDriveOptions`](../interfaces/RemoteDriveOptions.md) = `{}` — optional storage path + connect timeout overrides ## Returns `Promise`\<[`BareHyperdriveAdapter`](../classes/BareHyperdriveAdapter.md) & `object`\> --- ## Page: runExitHandlers URL: https://docs.totem.ing/api/totemsdk-pear/functions/runExitHandlers [**@totemsdk/pear**](../index.md) *** [@totemsdk/pear](../index.md) / runExitHandlers # Function: runExitHandlers() > **runExitHandlers**(): `Promise`\<`void`\> Run all registered exit callbacks in LIFO order. Called automatically by Pear teardown when inside a Pear app. Can also be called manually (e.g. on SIGTERM in standalone Node.js). ## Returns `Promise`\<`void`\> --- ## Page: AppConfig URL: https://docs.totem.ing/api/totemsdk-pear/interfaces/AppConfig [**@totemsdk/pear**](../index.md) *** [@totemsdk/pear](../index.md) / AppConfig # Interface: AppConfig ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### appName > **appName**: `string` *** ### swarm? > `optional` **swarm?**: `Partial`\<[`SwarmConfig`](SwarmConfig.md)\> --- ## Page: BareFileStoreOptions URL: https://docs.totem.ing/api/totemsdk-pear/interfaces/BareFileStoreOptions [**@totemsdk/pear**](../index.md) *** [@totemsdk/pear](../index.md) / BareFileStoreOptions # Interface: BareFileStoreOptions ## Properties ### failurePolicy? > `optional` **failurePolicy?**: `"strict"` \| `"lenient"` `strict` (default) surfaces corrupt data; `lenient` treats it as empty. *** ### filePath > **filePath**: `string` Absolute path to the codec file backing this store. *** ### fs? > `optional` **fs?**: [`FsLike`](FsLike.md) Optional fs shim. Pass `bare-fs` inside a Bare/Pear app. --- ## Page: BareKVStoreOptions URL: https://docs.totem.ing/api/totemsdk-pear/interfaces/BareKVStoreOptions [**@totemsdk/pear**](../index.md) *** [@totemsdk/pear](../index.md) / BareKVStoreOptions # Interface: BareKVStoreOptions ## Properties ### \_bee? > `optional` **\_bee?**: [`HypebeeLike`](HypebeeLike.md) Pre-constructed Hyperbee instance — for testing or when the caller manages the Hypercore lifecycle. *** ### storagePath? > `optional` **storagePath?**: `string` Path on disk for the Hypercore that backs this Hyperbee. Ignored when `_bee` is provided. --- ## Page: FetchInit URL: https://docs.totem.ing/api/totemsdk-pear/interfaces/FetchInit [**@totemsdk/pear**](../index.md) *** [@totemsdk/pear](../index.md) / FetchInit # Interface: FetchInit ## Properties ### body? > `optional` **body?**: `string` \| `Uint8Array`\<`ArrayBufferLike`\> *** ### headers? > `optional` **headers?**: `Record`\<`string`, `string`\> *** ### method? > `optional` **method?**: `string` *** ### timeoutMs? > `optional` **timeoutMs?**: `number` --- ## Page: FetchResponse URL: https://docs.totem.ing/api/totemsdk-pear/interfaces/FetchResponse [**@totemsdk/pear**](../index.md) *** [@totemsdk/pear](../index.md) / FetchResponse # Interface: FetchResponse BareFetch — thin fetch-compatible polyfill for Bare/Pear environments. In Pear/Bare, native `fetch` may be absent. This module provides a `fetch`-compatible function backed by `bare-http1` (or `bare-http2`). Usage: import { bareFetch as fetch } from '@totemsdk/pear/network'; const res = await fetch('https://api.example.com/data'); const json = await res.json(); When native `globalThis.fetch` is present (Node 18+, browsers) it is used directly. The polyfill is only activated when `fetch` is absent. Bare-compatible: no `process.env`, no `__dirname`, no `require`. ## Properties ### headers > **headers**: `Record`\<`string`, `string`\> *** ### ok > **ok**: `boolean` *** ### status > **status**: `number` *** ### statusText > **statusText**: `string` ## Methods ### arrayBuffer() > **arrayBuffer**(): `Promise`\<`ArrayBuffer`\> #### Returns `Promise`\<`ArrayBuffer`\> *** ### json() > **json**\<`T`\>(): `Promise`\<`T`\> #### Type Parameters ##### T `T` = `unknown` #### Returns `Promise`\<`T`\> *** ### text() > **text**(): `Promise`\<`string`\> #### Returns `Promise`\<`string`\> --- ## Page: FsLike URL: https://docs.totem.ing/api/totemsdk-pear/interfaces/FsLike [**@totemsdk/pear**](../index.md) *** [@totemsdk/pear](../index.md) / FsLike # Interface: FsLike ## Methods ### closeSync()? > `optional` **closeSync**(`fd`): `void` #### Parameters ##### fd `number` #### Returns `void` *** ### existsSync() > **existsSync**(`path`): `boolean` #### Parameters ##### path `string` #### Returns `boolean` *** ### fsyncSync()? > `optional` **fsyncSync**(`fd`): `void` #### Parameters ##### fd `number` #### Returns `void` *** ### mkdirSync() > **mkdirSync**(`path`, `options?`): `void` #### Parameters ##### path `string` ##### options? ###### recursive? `boolean` #### Returns `void` *** ### openSync()? > `optional` **openSync**(`path`, `flags`): `number` #### Parameters ##### path `string` ##### flags `string` #### Returns `number` *** ### readFileSync() > **readFileSync**(`path`): `Uint8Array` #### Parameters ##### path `string` #### Returns `Uint8Array` *** ### renameSync() > **renameSync**(`from`, `to`): `void` #### Parameters ##### from `string` ##### to `string` #### Returns `void` *** ### unlinkSync() > **unlinkSync**(`path`): `void` #### Parameters ##### path `string` #### Returns `void` *** ### writeFileSync() > **writeFileSync**(`path`, `data`): `void` #### Parameters ##### path `string` ##### data `Uint8Array` #### Returns `void` --- ## Page: HypebeeLike URL: https://docs.totem.ing/api/totemsdk-pear/interfaces/HypebeeLike [**@totemsdk/pear**](../index.md) *** [@totemsdk/pear](../index.md) / HypebeeLike # Interface: HypebeeLike ## Methods ### close() > **close**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### createReadStream() > **createReadStream**(`options?`): `AsyncIterable`\<\{ `key`: `string`; \}\> #### Parameters ##### options? ###### gt? `string` ###### lt? `string` #### Returns `AsyncIterable`\<\{ `key`: `string`; \}\> *** ### del() > **del**(`key`): `Promise`\<`void`\> #### Parameters ##### key `string` #### Returns `Promise`\<`void`\> *** ### get() > **get**(`key`): `Promise`\<\{ `value`: `unknown`; \} \| `null`\> #### Parameters ##### key `string` #### Returns `Promise`\<\{ `value`: `unknown`; \} \| `null`\> *** ### put() > **put**(`key`, `value`): `Promise`\<`void`\> #### Parameters ##### key `string` ##### value `unknown` #### Returns `Promise`\<`void`\> *** ### ready() > **ready**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> --- ## Page: HyperdriveAdapter URL: https://docs.totem.ing/api/totemsdk-pear/interfaces/HyperdriveAdapter [**@totemsdk/pear**](../index.md) *** [@totemsdk/pear](../index.md) / HyperdriveAdapter # Interface: HyperdriveAdapter @totemsdk/pear — Hyperdrive adapter + manifest loading `HyperdriveAdapter` is the interface Totem marketplace code uses to read app bundles from a Pear topic key. `BareHyperdriveAdapter` wraps a real Hyperdrive instance. `loadManifest` reads `manifest.json` from a remote Hyperdrive identified by its 64-hex `pearTopicKey` public key. How remote drive access works: 1. A Hyperswarm instance joins the topic derived from `pearTopicKey`. 2. Incoming connections are plumbed into a Corestore replication stream. 3. Hyperdrive is opened from the Corestore with the topic key as its root core public key — it replicates lazily from swarm peers. 4. After the drive is `ready` the caller can read files normally. Bare-compatible: no `process.env`, no `__dirname`, no `require`. All Holepunch packages (hyperswarm, hyperdrive, corestore) are loaded via dynamic import so the module is importable in environments where they are absent (error surfaces lazily, only when the drive is first opened). ## Methods ### list() > **list**(`path?`): `Promise`\<`string`[]\> List files under a prefix path. #### Parameters ##### path? `string` — directory prefix (default: '/') #### Returns `Promise`\<`string`[]\> *** ### readFile() > **readFile**(`path`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> Read a file from the drive. #### Parameters ##### path `string` — absolute path within the drive, e.g. `/manifest.json` #### Returns `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> *** ### watch() > **watch**(`path`, `cb`): () => `void` Watch a path for changes. #### Parameters ##### path `string` ##### cb (`changedPath`) => `void` #### Returns Unsubscribe function () => `void` *** ### writeFile() > **writeFile**(`path`, `data`): `Promise`\<`void`\> Write or overwrite a file in the drive. #### Parameters ##### path `string` — absolute path within the drive ##### data `Uint8Array` — raw bytes to write #### Returns `Promise`\<`void`\> --- ## Page: IStreamTransport URL: https://docs.totem.ing/api/totemsdk-pear/interfaces/IStreamTransport [**@totemsdk/pear**](../index.md) *** [@totemsdk/pear](../index.md) / IStreamTransport # Interface: IStreamTransport Canonical bidirectional byte-stream transport contract. Every transport exposes the same subscription API; each `on*` method returns an unsubscribe function so handlers can always be removed. There is a single connection state machine and a single `send` signature. This replaces the old `on(event, handler)` API which could not express unsubscription, backpressure or connection state. ## Properties ### state > `readonly` **state**: `TransportState` Explicit connection state. ## Methods ### close() > **close**(): `Promise`\<`void`\> Close the transport. After the returned promise resolves, no further data or close deliveries occur. Calling close() more than once is safe (the second call resolves immediately). #### Returns `Promise`\<`void`\> *** ### connect()? > `optional` **connect**(): `Promise`\<`void`\> Optional async connect. Implementations that construct an already-connected transport may omit it. #### Returns `Promise`\<`void`\> *** ### onClose() > **onClose**(`handler`): () => `void` Subscribe to connection close. Returns an unsubscribe function. #### Parameters ##### handler `CloseHandler` #### Returns () => `void` *** ### onData() > **onData**(`handler`): () => `void` Subscribe to data chunks. Returns an unsubscribe function. #### Parameters ##### handler `DataHandler` #### Returns () => `void` *** ### onError() > **onError**(`handler`): () => `void` Subscribe to transport errors. Returns an unsubscribe function. #### Parameters ##### handler `ErrorHandler` #### Returns () => `void` *** ### send() > **send**(`data`): `Promise`\<`void`\> Send bytes to the remote peer. - Returns a promise that resolves once the bytes are accepted by the underlying transport (or after the documented backpressure policy). - Rejects with `ClosedTransportError` if the transport is closed. - Rejects with the underlying error if delivery fails. #### Parameters ##### data `Uint8Array` #### Returns `Promise`\<`void`\> --- ## Page: KVStore URL: https://docs.totem.ing/api/totemsdk-pear/interfaces/KVStore [**@totemsdk/pear**](../index.md) *** [@totemsdk/pear](../index.md) / KVStore # Interface: KVStore @totemsdk/pear — KVStore interface Structurally identical to `StorageAdapter` from `@totemsdk/core` so that both `BareKVStore` and `BareFileStore` can be passed directly to `LocalLeaseProvider`, `WotsWatermarkStore`, and `lookup-client` storage slots without any adapter glue. No import from @totemsdk/core is used here to keep this package dependency-free. ## Methods ### clear() > **clear**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### get() > **get**\<`T`\>(`key`): `Promise`\<`T` \| `null`\> #### Type Parameters ##### T `T` #### Parameters ##### key `string` #### Returns `Promise`\<`T` \| `null`\> *** ### has() > **has**(`key`): `Promise`\<`boolean`\> #### Parameters ##### key `string` #### Returns `Promise`\<`boolean`\> *** ### keys() > **keys**(): `Promise`\<`string`[]\> #### Returns `Promise`\<`string`[]\> *** ### remove() > **remove**(`key`): `Promise`\<`boolean`\> #### Parameters ##### key `string` #### Returns `Promise`\<`boolean`\> *** ### set() > **set**\<`T`\>(`key`, `value`): `Promise`\<`void`\> #### Type Parameters ##### T `T` #### Parameters ##### key `string` ##### value `T` #### Returns `Promise`\<`void`\> --- ## Page: Logger URL: https://docs.totem.ing/api/totemsdk-pear/interfaces/Logger [**@totemsdk/pear**](../index.md) *** [@totemsdk/pear](../index.md) / Logger # Interface: Logger @totemsdk/pear — Logger `createLogger(name)` returns a simple logger that routes output to: - Pear's built-in debug channel (`globalThis.Pear.debug`) when running inside a Pear app - `globalThis.console` (stderr on Node.js/Bare) otherwise Bare-compatible: no `process.env`, no `__dirname`, no `require`. ## Methods ### debug() > **debug**(`message`, ...`args`): `void` #### Parameters ##### message `string` ##### args ...`unknown`[] #### Returns `void` *** ### error() > **error**(`message`, ...`args`): `void` #### Parameters ##### message `string` ##### args ...`unknown`[] #### Returns `void` *** ### info() > **info**(`message`, ...`args`): `void` #### Parameters ##### message `string` ##### args ...`unknown`[] #### Returns `void` *** ### warn() > **warn**(`message`, ...`args`): `void` #### Parameters ##### message `string` ##### args ...`unknown`[] #### Returns `void` --- ## Page: PearApp URL: https://docs.totem.ing/api/totemsdk-pear/interfaces/PearApp [**@totemsdk/pear**](../index.md) *** [@totemsdk/pear](../index.md) / PearApp # Interface: PearApp ## Properties ### onExit > **onExit**: (`cb`) => [`Unsubscribe`](../type-aliases/Unsubscribe.md) Register a cleanup callback. Shorthand for the module-level `onExit`. Register a cleanup callback to be called on app shutdown. Callbacks are called in **LIFO** (last-in-first-out) order so that higher-level clients are torn down before lower-level transports. Returns an unsubscribe function that removes the callback. #### Parameters ##### cb [`ExitCallback`](../type-aliases/ExitCallback.md) #### Returns [`Unsubscribe`](../type-aliases/Unsubscribe.md) *** ### runExitHandlers > **runExitHandlers**: () => `Promise`\<`void`\> Manually trigger all registered exit handlers. Run all registered exit callbacks in LIFO order. Called automatically by Pear teardown when inside a Pear app. Can also be called manually (e.g. on SIGTERM in standalone Node.js). #### Returns `Promise`\<`void`\> --- ## Page: PearAppConfig URL: https://docs.totem.ing/api/totemsdk-pear/interfaces/PearAppConfig [**@totemsdk/pear**](../index.md) *** [@totemsdk/pear](../index.md) / PearAppConfig # Interface: PearAppConfig ## Properties ### onUpdate? > `optional` **onUpdate?**: () => `void` \| `Promise`\<`void`\> Called when Pear signals the app should update (swap to a new version). This callback is registered on every `createPearApp` call that supplies it, allowing the handler to be refreshed across hot-reloads. If absent, the default Pear behaviour applies. #### Returns `void` \| `Promise`\<`void`\> --- ## Page: RemoteDriveOptions URL: https://docs.totem.ing/api/totemsdk-pear/interfaces/RemoteDriveOptions [**@totemsdk/pear**](../index.md) *** [@totemsdk/pear](../index.md) / RemoteDriveOptions # Interface: RemoteDriveOptions ## Properties ### connectTimeoutMs? > `optional` **connectTimeoutMs?**: `number` How long to wait (ms) for at least one peer to join the topic before giving up. Default: 20_000. *** ### storagePath? > `optional` **storagePath?**: `string` Corestore base directory for persisting replicated blocks locally. Defaults to `'./.pear-drives/'`. --- ## Page: SignedManifest URL: https://docs.totem.ing/api/totemsdk-pear/interfaces/SignedManifest [**@totemsdk/pear**](../index.md) *** [@totemsdk/pear](../index.md) / SignedManifest # Interface: SignedManifest A minimal `SignedManifest` shape. The full type is provided by `@totemsdk/app-manifest` when installed. This local definition avoids a hard dependency. ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### description? > `optional` **description?**: `string` *** ### name > **name**: `string` *** ### pearTopicKey? > `optional` **pearTopicKey?**: `string` *** ### version > **version**: `string` --- ## Page: SwarmConfig URL: https://docs.totem.ing/api/totemsdk-pear/interfaces/SwarmConfig [**@totemsdk/pear**](../index.md) *** [@totemsdk/pear](../index.md) / SwarmConfig # Interface: SwarmConfig @totemsdk/pear — Config loading utilities `loadConfig` reads app configuration in the following order: 1. `globalThis.Pear.config` — structured data injected by the Pear runtime when the app is launched from a Pear link (pear:///). This is the authoritative Pear config source; no additional network call is made. 2. `pear://config/` — conventional key name checked inside `globalThis.Pear.storage` (Pear's local app KV store) when the Pear runtime is present but `Pear.config` does not carry the app config. 3. `configPath` (file on disk, JSON) — explicit override for non-Pear environments (Node.js scripts, local dev server, Bare without Pear). 4. Empty default config `{ appName }`. `defaultSwarmConfig()` returns safe defaults for Hyperswarm join options. Bare-compatible: no `process.env`, no `__dirname`, no `require`. ## Properties ### client > **client**: `boolean` *** ### maxPeers > **maxPeers**: `number` *** ### server > **server**: `boolean` *** ### timeoutMs > **timeoutMs**: `number` --- ## Page: SwarmConnectOptions URL: https://docs.totem.ing/api/totemsdk-pear/interfaces/SwarmConnectOptions [**@totemsdk/pear**](../index.md) *** [@totemsdk/pear](../index.md) / SwarmConnectOptions # Interface: SwarmConnectOptions ## Properties ### client? > `optional` **client?**: `boolean` *** ### server? > `optional` **server?**: `boolean` *** ### timeoutMs? > `optional` **timeoutMs?**: `number` Connection timeout in ms. Default: 15_000. --- ## Page: ExitCallback URL: https://docs.totem.ing/api/totemsdk-pear/type-aliases/ExitCallback [**@totemsdk/pear**](../index.md) *** [@totemsdk/pear](../index.md) / ExitCallback # Type Alias: ExitCallback > **ExitCallback** = () => `void` \| `Promise`\<`void`\> @totemsdk/pear — App lifecycle `createPearApp` registers teardown handlers with the Pear runtime (when present). `onExit` queues cleanup callbacks invoked in LIFO order on shutdown. In non-Pear environments (Node.js, Bare without Pear), callers can trigger shutdown manually via `runExitHandlers()`. Bare-compatible: no `process.env`, no `__dirname`, no `require`. Guards against `globalThis.Pear` being absent (tests, Node.js CI). Registration semantics: - `teardown` callback (`runExitHandlers`) is registered **once** with `Pear.teardown` — Pear only supports a single teardown hook, so multiple `createPearApp` calls do not double-register it. - `onUpdate` callbacks are registered **every time** `createPearApp` is called with a non-null `onUpdate` — callers may legitimately update the handler between Pear hot-reloads and registering again is safe. ## Returns `void` \| `Promise`\<`void`\> --- ## Page: Unsubscribe URL: https://docs.totem.ing/api/totemsdk-pear/type-aliases/Unsubscribe [**@totemsdk/pear**](../index.md) *** [@totemsdk/pear](../index.md) / Unsubscribe # Type Alias: Unsubscribe > **Unsubscribe** = () => `void` ## Returns `void` --- ## Page: attachAnchor URL: https://docs.totem.ing/api/totemsdk-proof/functions/attachAnchor [**@totemsdk/proof**](../index.md) *** [@totemsdk/proof](../index.md) / attachAnchor # Function: attachAnchor() > **attachAnchor**(`signedProof`, `anchorRef`): [`SignedProof`](../interfaces/SignedProof.md) Attach an AnchorRef to a SignedProof. The proofId MUST remain unchanged — anchor is mutable metadata outside the signed region. ## Parameters ### signedProof [`SignedProof`](../interfaces/SignedProof.md) ### anchorRef [`AnchorRef`](../interfaces/AnchorRef.md) ## Returns [`SignedProof`](../interfaces/SignedProof.md) --- ## Page: canonicalJson URL: https://docs.totem.ing/api/totemsdk-proof/functions/canonicalJson [**@totemsdk/proof**](../index.md) *** [@totemsdk/proof](../index.md) / canonicalJson # Function: canonicalJson() > **canonicalJson**(`value`): `string` Deterministic canonical JSON with recursively sorted keys. Never use bare JSON.stringify on objects passed to hash or sign operations. ## Parameters ### value `unknown` ## Returns `string` --- ## Page: computeProofId URL: https://docs.totem.ing/api/totemsdk-proof/functions/computeProofId [**@totemsdk/proof**](../index.md) *** [@totemsdk/proof](../index.md) / computeProofId # Function: computeProofId() > **computeProofId**(`input`): `string` Compute a deterministic proof ID from the core unsigned fields (excluding proofId). This is the primary ID rule — callers must strip `proofId` before passing in. ## Parameters ### input `Omit`\<[`UnsignedProof`](../interfaces/UnsignedProof.md), `"proofId"`\> ## Returns `string` --- ## Page: createAnchorCommitment URL: https://docs.totem.ing/api/totemsdk-proof/functions/createAnchorCommitment [**@totemsdk/proof**](../index.md) *** [@totemsdk/proof](../index.md) / createAnchorCommitment # Function: createAnchorCommitment() > **createAnchorCommitment**(`signedProof`): `string` Compute a deterministic anchor commitment for a SignedProof. Used as the hash submitted to an anchoring provider (e.g. Integritas). ## Parameters ### signedProof [`SignedProof`](../interfaces/SignedProof.md) ## Returns `string` --- ## Page: createIdentityProof URL: https://docs.totem.ing/api/totemsdk-proof/functions/createIdentityProof [**@totemsdk/proof**](../index.md) *** [@totemsdk/proof](../index.md) / createIdentityProof # Function: createIdentityProof() > **createIdentityProof**(`params`): [`UnsignedProof`](../interfaces/UnsignedProof.md) ## Parameters ### params [`CreateIdentityProofParams`](../interfaces/CreateIdentityProofParams.md) ## Returns [`UnsignedProof`](../interfaces/UnsignedProof.md) --- ## Page: createManifestProof URL: https://docs.totem.ing/api/totemsdk-proof/functions/createManifestProof [**@totemsdk/proof**](../index.md) *** [@totemsdk/proof](../index.md) / createManifestProof # Function: createManifestProof() > **createManifestProof**(`params`): [`UnsignedProof`](../interfaces/UnsignedProof.md) ## Parameters ### params [`CreateManifestProofParams`](../interfaces/CreateManifestProofParams.md) ## Returns [`UnsignedProof`](../interfaces/UnsignedProof.md) --- ## Page: createProof URL: https://docs.totem.ing/api/totemsdk-proof/functions/createProof [**@totemsdk/proof**](../index.md) *** [@totemsdk/proof](../index.md) / createProof # Function: createProof() > **createProof**(`params`): [`UnsignedProof`](../interfaces/UnsignedProof.md) Create an UnsignedProof with a computed proofId. Optional fields are only included when provided, keeping the canonical form stable across callers. ## Parameters ### params [`CreateProofParams`](../interfaces/CreateProofParams.md) ## Returns [`UnsignedProof`](../interfaces/UnsignedProof.md) --- ## Page: hashEvidence URL: https://docs.totem.ing/api/totemsdk-proof/functions/hashEvidence [**@totemsdk/proof**](../index.md) *** [@totemsdk/proof](../index.md) / hashEvidence # Function: hashEvidence() > **hashEvidence**(`evidence`): `string` Hash a single EvidenceRef for integrity checks. ## Parameters ### evidence [`EvidenceRef`](../interfaces/EvidenceRef.md) ## Returns `string` --- ## Page: hashProofPayload URL: https://docs.totem.ing/api/totemsdk-proof/functions/hashProofPayload [**@totemsdk/proof**](../index.md) *** [@totemsdk/proof](../index.md) / hashProofPayload # Function: hashProofPayload() > **hashProofPayload**(`unsignedProof`): `string` Hash a complete UnsignedProof (including proofId) for external consumers. ## Parameters ### unsignedProof [`UnsignedProof`](../interfaces/UnsignedProof.md) ## Returns `string` --- ## Page: signProof URL: https://docs.totem.ing/api/totemsdk-proof/functions/signProof [**@totemsdk/proof**](../index.md) *** [@totemsdk/proof](../index.md) / signProof # Function: signProof() > **signProof**(`unsignedProof`, `seed`, `keyIndex`): [`SignedProof`](../interfaces/SignedProof.md) Sign an UnsignedProof with a WOTS key. The digest is SHA3-256 of the canonical JSON of the full UnsignedProof (including proofId). signature.message is NOT set — it is optional debug-only. The caller is responsible for reserving the WOTS key index before calling this function. This package does NOT depend on @totemsdk/wots-lease. ## Parameters ### unsignedProof [`UnsignedProof`](../interfaces/UnsignedProof.md) ### seed `Uint8Array` ### keyIndex `number` ## Returns [`SignedProof`](../interfaces/SignedProof.md) --- ## Page: signWithLease URL: https://docs.totem.ing/api/totemsdk-proof/functions/signWithLease [**@totemsdk/proof**](../index.md) *** [@totemsdk/proof](../index.md) / signWithLease # Function: signWithLease() > **signWithLease**(`unsignedProof`, `seed`, `leaseProvider`, `options?`): `Promise`\<[`SignedProof`](../interfaces/SignedProof.md)\> Sign an UnsignedProof using a WOTS lease provider to reserve the key index, preventing concurrent-use or restart-reuse of one-time WOTS keys. The lease provider must satisfy a minimal signature compatible with @totemsdk/wots-lease's WotsLeaseProvider. Callers who manage key indices directly should continue using signProof(). On success the reservation is committed. On failure it is burned so the index can be marked unavailable rather than silently lost. ## Parameters ### unsignedProof [`UnsignedProof`](../interfaces/UnsignedProof.md) ### seed `Uint8Array` ### leaseProvider #### burnReservation #### commitKeyUse #### reserveKeyUse ### options? #### treeId? `string` #### ttlMs? `number` ## Returns `Promise`\<[`SignedProof`](../interfaces/SignedProof.md)\> --- ## Page: toHex URL: https://docs.totem.ing/api/totemsdk-proof/functions/toHex [**@totemsdk/proof**](../index.md) *** [@totemsdk/proof](../index.md) / toHex # Function: toHex() > **toHex**(`bytes`): `string` ## Parameters ### bytes `Uint8Array` ## Returns `string` --- ## Page: verifyAnchorRef URL: https://docs.totem.ing/api/totemsdk-proof/functions/verifyAnchorRef [**@totemsdk/proof**](../index.md) *** [@totemsdk/proof](../index.md) / verifyAnchorRef # Function: verifyAnchorRef() > **verifyAnchorRef**(`signedProof`, `anchorRef`): `boolean` Verify that an AnchorRef.hash matches the expected commitment for this proof. ## Parameters ### signedProof [`SignedProof`](../interfaces/SignedProof.md) ### anchorRef [`AnchorRef`](../interfaces/AnchorRef.md) ## Returns `boolean` --- ## Page: verifyIdentityProof URL: https://docs.totem.ing/api/totemsdk-proof/functions/verifyIdentityProof [**@totemsdk/proof**](../index.md) *** [@totemsdk/proof](../index.md) / verifyIdentityProof # Function: verifyIdentityProof() > **verifyIdentityProof**(`signedProof`, `signedClaim`): [`ProofVerifyResult`](../interfaces/ProofVerifyResult.md) ## Parameters ### signedProof [`SignedProof`](../interfaces/SignedProof.md) ### signedClaim `SignedIdentityClaim` ## Returns [`ProofVerifyResult`](../interfaces/ProofVerifyResult.md) --- ## Page: verifyManifestProof URL: https://docs.totem.ing/api/totemsdk-proof/functions/verifyManifestProof [**@totemsdk/proof**](../index.md) *** [@totemsdk/proof](../index.md) / verifyManifestProof # Function: verifyManifestProof() > **verifyManifestProof**(`signedProof`, `signedManifest`): [`ProofVerifyResult`](../interfaces/ProofVerifyResult.md) ## Parameters ### signedProof [`SignedProof`](../interfaces/SignedProof.md) ### signedManifest `SignedManifest`\<`any`\> ## Returns [`ProofVerifyResult`](../interfaces/ProofVerifyResult.md) --- ## Page: verifyProof URL: https://docs.totem.ing/api/totemsdk-proof/functions/verifyProof [**@totemsdk/proof**](../index.md) *** [@totemsdk/proof](../index.md) / verifyProof # Function: verifyProof() > **verifyProof**(`signedProof`, `options?`): [`ProofVerifyResult`](../interfaces/ProofVerifyResult.md) Full combined proof verification: signature + payload constraints. Checks performed: 1. signature object is present with address, publicKey, signature fields 2. proofId matches a recomputation from the unsigned fields 3. WOTS signature is valid over the canonical unsigned proof 4. expiresAt is not in the past (with configurable graceMs) ## Parameters ### signedProof [`SignedProof`](../interfaces/SignedProof.md) ### options? #### graceMs? `number` #### now? `number` ## Returns [`ProofVerifyResult`](../interfaces/ProofVerifyResult.md) --- ## Page: verifyProofIdIntegrity URL: https://docs.totem.ing/api/totemsdk-proof/functions/verifyProofIdIntegrity [**@totemsdk/proof**](../index.md) *** [@totemsdk/proof](../index.md) / verifyProofIdIntegrity # Function: verifyProofIdIntegrity() > **verifyProofIdIntegrity**(`signedProof`): `boolean` Verify that the proofId in a SignedProof matches a recomputation from its unsigned fields. This prevents callers from replacing the proofId after signing and relying on a stale identifier. ## Parameters ### signedProof [`SignedProof`](../interfaces/SignedProof.md) ## Returns `boolean` --- ## Page: verifyProofPayload URL: https://docs.totem.ing/api/totemsdk-proof/functions/verifyProofPayload [**@totemsdk/proof**](../index.md) *** [@totemsdk/proof](../index.md) / verifyProofPayload # Function: verifyProofPayload() > **verifyProofPayload**(`signedProof`, `graceMs?`, `now?`): `boolean` Check the payload constraints of a SignedProof (expiry only). Returns false if expiresAt is in the past. ## Parameters ### signedProof [`SignedProof`](../interfaces/SignedProof.md) ### graceMs? `number` = `0` optional tolerance in ms for clock skew (default 0). ### now? `number` optional explicit timestamp (ms). When provided, the check is deterministic and does NOT call Date.now(). If omitted, Date.now() is used. ## Returns `boolean` --- ## Page: verifyProofSignature URL: https://docs.totem.ing/api/totemsdk-proof/functions/verifyProofSignature [**@totemsdk/proof**](../index.md) *** [@totemsdk/proof](../index.md) / verifyProofSignature # Function: verifyProofSignature() > **verifyProofSignature**(`signedProof`): `boolean` Verify the WOTS signature of a SignedProof. Recomputes the digest from the unsigned proof fields (stripping signature, anchor, rootIdentityProof). Does NOT use signature.message. Security: cryptographically derives the expected Minima address from the WOTS public-key digest and compares it with the declared signature.address. Rejects the proof when the addresses do not match, preventing an attacker from setting a privileged address while signing with a different key. ## Parameters ### signedProof [`SignedProof`](../interfaces/SignedProof.md) ## Returns `boolean` --- ## Page: AnchorRef URL: https://docs.totem.ing/api/totemsdk-proof/interfaces/AnchorRef [**@totemsdk/proof**](../index.md) *** [@totemsdk/proof](../index.md) / AnchorRef # Interface: AnchorRef ## Properties ### confirmedAt? > `optional` **confirmedAt?**: `number` *** ### hash > **hash**: `string` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### provider > **provider**: `string` *** ### txId? > `optional` **txId?**: `string` --- ## Page: CreateIdentityProofParams URL: https://docs.totem.ing/api/totemsdk-proof/interfaces/CreateIdentityProofParams [**@totemsdk/proof**](../index.md) *** [@totemsdk/proof](../index.md) / CreateIdentityProofParams # Interface: CreateIdentityProofParams ## Properties ### evidence? > `optional` **evidence?**: [`EvidenceRef`](EvidenceRef.md)[] *** ### expiresAt? > `optional` **expiresAt?**: `number` *** ### identityId > **identityId**: `string` *** ### issuedAt? > `optional` **issuedAt?**: `number` *** ### issuer > **issuer**: `string` *** ### subject > **subject**: [`ProofSubject`](ProofSubject.md) --- ## Page: CreateManifestProofParams URL: https://docs.totem.ing/api/totemsdk-proof/interfaces/CreateManifestProofParams [**@totemsdk/proof**](../index.md) *** [@totemsdk/proof](../index.md) / CreateManifestProofParams # Interface: CreateManifestProofParams ## Properties ### evidence? > `optional` **evidence?**: [`EvidenceRef`](EvidenceRef.md)[] *** ### expiresAt? > `optional` **expiresAt?**: `number` *** ### issuedAt? > `optional` **issuedAt?**: `number` *** ### issuer > **issuer**: `string` *** ### manifestId > **manifestId**: `string` *** ### subject > **subject**: [`ProofSubject`](ProofSubject.md) --- ## Page: CreateProofParams URL: https://docs.totem.ing/api/totemsdk-proof/interfaces/CreateProofParams [**@totemsdk/proof**](../index.md) *** [@totemsdk/proof](../index.md) / CreateProofParams # Interface: CreateProofParams ## Properties ### evidence? > `optional` **evidence?**: [`EvidenceRef`](EvidenceRef.md)[] *** ### expiresAt? > `optional` **expiresAt?**: `number` *** ### issuedAt? > `optional` **issuedAt?**: `number` *** ### issuer > **issuer**: `string` *** ### kind > **kind**: [`ProofKind`](../type-aliases/ProofKind.md) *** ### links? > `optional` **links?**: [`ProofLink`](ProofLink.md)[] *** ### payload? > `optional` **payload?**: `Record`\<`string`, `unknown`\> *** ### subject > **subject**: [`ProofSubject`](ProofSubject.md) --- ## Page: EvidenceRef URL: https://docs.totem.ing/api/totemsdk-proof/interfaces/EvidenceRef [**@totemsdk/proof**](../index.md) *** [@totemsdk/proof](../index.md) / EvidenceRef # Interface: EvidenceRef ## Properties ### hash > **hash**: `string` *** ### id > **id**: `string` *** ### kind > **kind**: `string` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> --- ## Page: ProofLink URL: https://docs.totem.ing/api/totemsdk-proof/interfaces/ProofLink [**@totemsdk/proof**](../index.md) *** [@totemsdk/proof](../index.md) / ProofLink # Interface: ProofLink ## Properties ### kind > **kind**: `string` *** ### proofId > **proofId**: `string` --- ## Page: ProofOperationResult URL: https://docs.totem.ing/api/totemsdk-proof/interfaces/ProofOperationResult [**@totemsdk/proof**](../index.md) *** [@totemsdk/proof](../index.md) / ProofOperationResult # Interface: ProofOperationResult ## Properties ### data? > `optional` **data?**: `unknown` *** ### error? > `optional` **error?**: `string` *** ### ok > **ok**: `boolean` *** ### providerRef? > `optional` **providerRef?**: `string` --- ## Page: ProofProvider URL: https://docs.totem.ing/api/totemsdk-proof/interfaces/ProofProvider [**@totemsdk/proof**](../index.md) *** [@totemsdk/proof](../index.md) / ProofProvider # Interface: ProofProvider ## Properties ### capabilities > `readonly` **capabilities**: [`ProofProviderCapability`](../type-aliases/ProofProviderCapability.md)[] ## Methods ### anchorProof()? > `optional` **anchorProof**(`signedProof`): `Promise`\<[`ProofOperationResult`](ProofOperationResult.md)\> #### Parameters ##### signedProof [`SignedProof`](SignedProof.md) #### Returns `Promise`\<[`ProofOperationResult`](ProofOperationResult.md)\> *** ### checkHash()? > `optional` **checkHash**(`params`): `Promise`\<[`ProofOperationResult`](ProofOperationResult.md)\> #### Parameters ##### params ###### hash `string` #### Returns `Promise`\<[`ProofOperationResult`](ProofOperationResult.md)\> *** ### checkProof()? > `optional` **checkProof**(`signedProof`): `Promise`\<[`ProofOperationResult`](ProofOperationResult.md)\> #### Parameters ##### signedProof [`SignedProof`](SignedProof.md) #### Returns `Promise`\<[`ProofOperationResult`](ProofOperationResult.md)\> *** ### stampHash()? > `optional` **stampHash**(`params`): `Promise`\<[`ProofOperationResult`](ProofOperationResult.md)\> #### Parameters ##### params ###### hash `string` #### Returns `Promise`\<[`ProofOperationResult`](ProofOperationResult.md)\> *** ### verifyHash()? > `optional` **verifyHash**(`params`): `Promise`\<[`ProofVerifyResult`](ProofVerifyResult.md)\> #### Parameters ##### params ###### hash `string` ###### reportRequired? `boolean` #### Returns `Promise`\<[`ProofVerifyResult`](ProofVerifyResult.md)\> *** ### verifyProof()? > `optional` **verifyProof**(`signedProof`, `options?`): `Promise`\<[`ProofVerifyResult`](ProofVerifyResult.md)\> #### Parameters ##### signedProof [`SignedProof`](SignedProof.md) ##### options? ###### skipLocalVerification? `boolean` #### Returns `Promise`\<[`ProofVerifyResult`](ProofVerifyResult.md)\> --- ## Page: ProofSubject URL: https://docs.totem.ing/api/totemsdk-proof/interfaces/ProofSubject [**@totemsdk/proof**](../index.md) *** [@totemsdk/proof](../index.md) / ProofSubject # Interface: ProofSubject ## Properties ### address? > `optional` **address?**: `string` *** ### id > **id**: `string` *** ### kind > **kind**: `string` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> --- ## Page: ProofVerifyResult URL: https://docs.totem.ing/api/totemsdk-proof/interfaces/ProofVerifyResult [**@totemsdk/proof**](../index.md) *** [@totemsdk/proof](../index.md) / ProofVerifyResult # Interface: ProofVerifyResult ## Properties ### expired? > `optional` **expired?**: `boolean` *** ### reason? > `optional` **reason?**: `string` *** ### signerAddress? > `optional` **signerAddress?**: `string` *** ### valid > **valid**: `boolean` --- ## Page: SignedProof URL: https://docs.totem.ing/api/totemsdk-proof/interfaces/SignedProof [**@totemsdk/proof**](../index.md) *** [@totemsdk/proof](../index.md) / SignedProof # Interface: SignedProof A proof after WOTS signing. `signature.message` is optional debug-only metadata — it is NEVER used as the source of truth during verification. The digest is always recomputed from the canonical JSON of the unsigned proof fields. ## Extends - [`UnsignedProof`](UnsignedProof.md) ## Properties ### anchor? > `optional` **anchor?**: [`AnchorRef`](AnchorRef.md) *** ### evidence? > `optional` **evidence?**: [`EvidenceRef`](EvidenceRef.md)[] #### Inherited from [`UnsignedProof`](UnsignedProof.md).[`evidence`](UnsignedProof.md#evidence) *** ### expiresAt? > `optional` **expiresAt?**: `number` #### Inherited from [`UnsignedProof`](UnsignedProof.md).[`expiresAt`](UnsignedProof.md#expiresat) *** ### issuedAt > **issuedAt**: `number` #### Inherited from [`UnsignedProof`](UnsignedProof.md).[`issuedAt`](UnsignedProof.md#issuedat) *** ### issuer > **issuer**: `string` #### Inherited from [`UnsignedProof`](UnsignedProof.md).[`issuer`](UnsignedProof.md#issuer) *** ### kind > **kind**: [`ProofKind`](../type-aliases/ProofKind.md) #### Inherited from [`UnsignedProof`](UnsignedProof.md).[`kind`](UnsignedProof.md#kind) *** ### links? > `optional` **links?**: [`ProofLink`](ProofLink.md)[] #### Inherited from [`UnsignedProof`](UnsignedProof.md).[`links`](UnsignedProof.md#links) *** ### payload? > `optional` **payload?**: `Record`\<`string`, `unknown`\> #### Inherited from [`UnsignedProof`](UnsignedProof.md).[`payload`](UnsignedProof.md#payload) *** ### proofId > **proofId**: `string` #### Inherited from [`UnsignedProof`](UnsignedProof.md).[`proofId`](UnsignedProof.md#proofid) *** ### rootIdentityProof? > `optional` **rootIdentityProof?**: `string` *** ### signature > **signature**: `object` #### address > **address**: `string` #### message? > `optional` **message?**: `string` #### publicKey > **publicKey**: `string` #### signature > **signature**: `string` *** ### subject > **subject**: [`ProofSubject`](ProofSubject.md) #### Inherited from [`UnsignedProof`](UnsignedProof.md).[`subject`](UnsignedProof.md#subject) --- ## Page: SigningIndices URL: https://docs.totem.ing/api/totemsdk-proof/interfaces/SigningIndices [**@totemsdk/proof**](../index.md) *** [@totemsdk/proof](../index.md) / SigningIndices # Interface: SigningIndices Minimal signing indices matching @totemsdk/wots-lease's SigningIndices. Kept here so signWithLease can accept any structurally compatible provider without a hard dependency on @totemsdk/wots-lease. ## Properties ### addressIndex > **addressIndex**: `number` *** ### l1 > **l1**: `number` *** ### l2 > **l2**: `number` --- ## Page: UnsignedProof URL: https://docs.totem.ing/api/totemsdk-proof/interfaces/UnsignedProof [**@totemsdk/proof**](../index.md) *** [@totemsdk/proof](../index.md) / UnsignedProof # Interface: UnsignedProof ## Extended by - [`SignedProof`](SignedProof.md) ## Properties ### evidence? > `optional` **evidence?**: [`EvidenceRef`](EvidenceRef.md)[] *** ### expiresAt? > `optional` **expiresAt?**: `number` *** ### issuedAt > **issuedAt**: `number` *** ### issuer > **issuer**: `string` *** ### kind > **kind**: [`ProofKind`](../type-aliases/ProofKind.md) *** ### links? > `optional` **links?**: [`ProofLink`](ProofLink.md)[] *** ### payload? > `optional` **payload?**: `Record`\<`string`, `unknown`\> *** ### proofId > **proofId**: `string` *** ### subject > **subject**: [`ProofSubject`](ProofSubject.md) --- ## Page: ProofKind URL: https://docs.totem.ing/api/totemsdk-proof/type-aliases/ProofKind [**@totemsdk/proof**](../index.md) *** [@totemsdk/proof](../index.md) / ProofKind # Type Alias: ProofKind > **ProofKind** = `"attestation"` \| `"ownership"` \| `"capability"` \| `"revocation"` \| `"delegation"` \| `"manifest"` \| `"identity"` \| `"custom"` --- ## Page: ProofProviderCapability URL: https://docs.totem.ing/api/totemsdk-proof/type-aliases/ProofProviderCapability [**@totemsdk/proof**](../index.md) *** [@totemsdk/proof](../index.md) / ProofProviderCapability # Type Alias: ProofProviderCapability > **ProofProviderCapability** = `"hash:stamp"` \| `"hash:check"` \| `"hash:verify"` \| `"proof:anchor"` \| `"proof:check"` \| `"proof:verify"` --- ## Page: sha3_256 URL: https://docs.totem.ing/api/totemsdk-proof/variables/sha3_256 [**@totemsdk/proof**](../index.md) *** [@totemsdk/proof](../index.md) / sha3\_256 # Variable: sha3\_256 > `const` **sha3\_256**: *typeof* `sha3_256_wasm` --- ## Page: createIntegritasProofProvider URL: https://docs.totem.ing/api/totemsdk-proof-integritas/functions/createIntegritasProofProvider [**@totemsdk/proof-integritas**](../index.md) *** [@totemsdk/proof-integritas](../index.md) / createIntegritasProofProvider # Function: createIntegritasProofProvider() > **createIntegritasProofProvider**(`config?`): `ProofProvider` ## Parameters ### config? [`IntegritasConfig`](../interfaces/IntegritasConfig.md) = `{}` ## Returns `ProofProvider` --- ## Page: integritasAnchorRefFromResponse URL: https://docs.totem.ing/api/totemsdk-proof-integritas/functions/integritasAnchorRefFromResponse [**@totemsdk/proof-integritas**](../index.md) *** [@totemsdk/proof-integritas](../index.md) / integritasAnchorRefFromResponse # Function: integritasAnchorRefFromResponse() > **integritasAnchorRefFromResponse**(`response`): `AnchorRef` Map a successful Integritas stamp response to an AnchorRef suitable for attaching to a SignedProof via attachAnchor. ## Parameters ### response [`IntegritasStampResponse`](../interfaces/IntegritasStampResponse.md) ## Returns `AnchorRef` --- ## Page: integritasHashFromProof URL: https://docs.totem.ing/api/totemsdk-proof-integritas/functions/integritasHashFromProof [**@totemsdk/proof-integritas**](../index.md) *** [@totemsdk/proof-integritas](../index.md) / integritasHashFromProof # Function: integritasHashFromProof() > **integritasHashFromProof**(`signedProof`): `string` Compute the canonical hash submitted to Integritas for a given SignedProof. Uses createAnchorCommitment so the hash is deterministic and tied to the proof's identity — same proof always produces the same hash. ## Parameters ### signedProof `SignedProof` ## Returns `string` --- ## Page: normalizeIntegritasCheckResponse URL: https://docs.totem.ing/api/totemsdk-proof-integritas/functions/normalizeIntegritasCheckResponse [**@totemsdk/proof-integritas**](../index.md) *** [@totemsdk/proof-integritas](../index.md) / normalizeIntegritasCheckResponse # Function: normalizeIntegritasCheckResponse() > **normalizeIntegritasCheckResponse**(`raw`): `ProofOperationResult` ## Parameters ### raw [`IntegritasCheckResponse`](../interfaces/IntegritasCheckResponse.md) ## Returns `ProofOperationResult` --- ## Page: normalizeIntegritasStampResponse URL: https://docs.totem.ing/api/totemsdk-proof-integritas/functions/normalizeIntegritasStampResponse [**@totemsdk/proof-integritas**](../index.md) *** [@totemsdk/proof-integritas](../index.md) / normalizeIntegritasStampResponse # Function: normalizeIntegritasStampResponse() > **normalizeIntegritasStampResponse**(`raw`): `ProofOperationResult` ## Parameters ### raw [`IntegritasStampResponse`](../interfaces/IntegritasStampResponse.md) ## Returns `ProofOperationResult` --- ## Page: normalizeIntegritasVerifyResponse URL: https://docs.totem.ing/api/totemsdk-proof-integritas/functions/normalizeIntegritasVerifyResponse [**@totemsdk/proof-integritas**](../index.md) *** [@totemsdk/proof-integritas](../index.md) / normalizeIntegritasVerifyResponse # Function: normalizeIntegritasVerifyResponse() > **normalizeIntegritasVerifyResponse**(`raw`): `ProofVerifyResult` ## Parameters ### raw [`IntegritasVerifyResponse`](../interfaces/IntegritasVerifyResponse.md) ## Returns `ProofVerifyResult` --- ## Page: IntegritasCheckResponse URL: https://docs.totem.ing/api/totemsdk-proof-integritas/interfaces/IntegritasCheckResponse [**@totemsdk/proof-integritas**](../index.md) *** [@totemsdk/proof-integritas](../index.md) / IntegritasCheckResponse # Interface: IntegritasCheckResponse Raw shape returned by POST /core/v2/file/check ## Properties ### hash? > `optional` **hash?**: `string` *** ### message? > `optional` **message?**: `string` *** ### status > **status**: `string` *** ### timestamp? > `optional` **timestamp?**: `number` *** ### txId? > `optional` **txId?**: `string` --- ## Page: IntegritasConfig URL: https://docs.totem.ing/api/totemsdk-proof-integritas/interfaces/IntegritasConfig [**@totemsdk/proof-integritas**](../index.md) *** [@totemsdk/proof-integritas](../index.md) / IntegritasConfig # Interface: IntegritasConfig Configuration for the Integritas proof provider. ## Properties ### apiKey? > `optional` **apiKey?**: `string` *** ### baseUrl? > `optional` **baseUrl?**: `string` *** ### fetch? > `optional` **fetch?**: \{(`input`, `init?`): `Promise`\<`Response`\>; (`input`, `init?`): `Promise`\<`Response`\>; \} #### Call Signature > (`input`, `init?`): `Promise`\<`Response`\> [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) ##### Parameters ###### input `RequestInfo` \| `URL` ###### init? `RequestInit` ##### Returns `Promise`\<`Response`\> #### Call Signature > (`input`, `init?`): `Promise`\<`Response`\> [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) ##### Parameters ###### input `string` \| `Request` \| `URL` ###### init? `RequestInit` ##### Returns `Promise`\<`Response`\> *** ### requestIdFactory? > `optional` **requestIdFactory?**: () => `string` #### Returns `string` --- ## Page: IntegritasStampResponse URL: https://docs.totem.ing/api/totemsdk-proof-integritas/interfaces/IntegritasStampResponse [**@totemsdk/proof-integritas**](../index.md) *** [@totemsdk/proof-integritas](../index.md) / IntegritasStampResponse # Interface: IntegritasStampResponse Raw shape returned by POST /core/v2/timestamp/post ## Properties ### hash? > `optional` **hash?**: `string` *** ### message? > `optional` **message?**: `string` *** ### status > **status**: `string` *** ### timestamp? > `optional` **timestamp?**: `number` *** ### txId? > `optional` **txId?**: `string` --- ## Page: IntegritasVerifyResponse URL: https://docs.totem.ing/api/totemsdk-proof-integritas/interfaces/IntegritasVerifyResponse [**@totemsdk/proof-integritas**](../index.md) *** [@totemsdk/proof-integritas](../index.md) / IntegritasVerifyResponse # Interface: IntegritasVerifyResponse Raw shape returned by POST /core/v2/verify/file ## Properties ### hash? > `optional` **hash?**: `string` *** ### message? > `optional` **message?**: `string` *** ### report? > `optional` **report?**: `string` *** ### status > **status**: `string` *** ### timestamp? > `optional` **timestamp?**: `number` *** ### txId? > `optional` **txId?**: `string` --- ## Page: IntegritasCapability URL: https://docs.totem.ing/api/totemsdk-proof-integritas/type-aliases/IntegritasCapability [**@totemsdk/proof-integritas**](../index.md) *** [@totemsdk/proof-integritas](../index.md) / IntegritasCapability # Type Alias: IntegritasCapability > **IntegritasCapability** = `ProofProviderCapability` \| [`IntegritasExtendedCapability`](IntegritasExtendedCapability.md) --- ## Page: IntegritasExtendedCapability URL: https://docs.totem.ing/api/totemsdk-proof-integritas/type-aliases/IntegritasExtendedCapability [**@totemsdk/proof-integritas**](../index.md) *** [@totemsdk/proof-integritas](../index.md) / IntegritasExtendedCapability # Type Alias: IntegritasExtendedCapability > **IntegritasExtendedCapability** = `"report:pdf"` \| `"nft:trace"` \| `"minima:onchain"` Integritas-specific capabilities beyond the base ProofProviderCapability set. The full set covers Integritas v2 extended operations. --- ## Page: addAnchor URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/addAnchor [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / addAnchor # Function: addAnchor() > **addAnchor**(`graph`, `anchor`): [`ProofGraph`](../interfaces/ProofGraph.md) Add a standalone anchor node. If anchor.proofId is set, adds an 'anchored_to' edge from the proof to this anchor. ## Parameters ### graph [`ProofGraph`](../interfaces/ProofGraph.md) ### anchor [`AnchorInput`](../interfaces/AnchorInput.md) ## Returns [`ProofGraph`](../interfaces/ProofGraph.md) --- ## Page: addEdge URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/addEdge [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / addEdge # Function: addEdge() > **addEdge**(`graph`, `edge`): [`ProofGraph`](../interfaces/ProofGraph.md) Append a ProofGraphEdge and recompute graphId. Idempotent by edge ID. Spec API: addEdge(graph, edge). Use buildEdge() to construct the edge object. ## Parameters ### graph [`ProofGraph`](../interfaces/ProofGraph.md) ### edge [`ProofGraphEdge`](../interfaces/ProofGraphEdge.md) ## Returns [`ProofGraph`](../interfaces/ProofGraph.md) --- ## Page: addIdentityClaim URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/addIdentityClaim [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / addIdentityClaim # Function: addIdentityClaim() > **addIdentityClaim**(`graph`, `signedClaim`): [`ProofGraph`](../interfaces/ProofGraph.md) Index a SignedIdentityClaim into the graph. Nodes created: identity-claim — claim.id (stores the full signed claim in .data) address — issuer address address/identity — target address (for delegates_to / rotates_to / revokes) Edges created based on claim.type: all types → issued_by (claim-node → issuer address) delegates_to → delegates_to edge (claim-node → delegated address) revokes → revokes edge (claim-node → subject identity) rotates_to → controls edge (claim-node → new address) ## Parameters ### graph [`ProofGraph`](../interfaces/ProofGraph.md) ### signedClaim `SignedIdentityClaim` ## Returns [`ProofGraph`](../interfaces/ProofGraph.md) --- ## Page: addIdentityDocument URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/addIdentityDocument [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / addIdentityDocument # Function: addIdentityDocument() > **addIdentityDocument**(`graph`, `doc`): [`ProofGraph`](../interfaces/ProofGraph.md) Index a TotemIdentityDocument into the graph. Creates an 'identity' node with refId = doc.id. ## Parameters ### graph [`ProofGraph`](../interfaces/ProofGraph.md) ### doc `TotemIdentityDocument` ## Returns [`ProofGraph`](../interfaces/ProofGraph.md) --- ## Page: addManifest URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/addManifest [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / addManifest # Function: addManifest() > **addManifest**(`graph`, `signedManifest`): [`ProofGraph`](../interfaces/ProofGraph.md) Index a SignedManifest into the graph. Nodes created: manifest — computed manifest ID (stores manifest content in .data) address — resolved author/agent/operator address Edge created: manifests_as manifest → address ## Parameters ### graph [`ProofGraph`](../interfaces/ProofGraph.md) ### signedManifest `SignedManifest` ## Returns [`ProofGraph`](../interfaces/ProofGraph.md) --- ## Page: addNode URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/addNode [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / addNode # Function: addNode() > **addNode**(`graph`, `type`, `refId`, `data?`): [`ProofGraph`](../interfaces/ProofGraph.md) Add a node directly (type + refId pair). Idempotent — skipped if the node already exists. ## Parameters ### graph [`ProofGraph`](../interfaces/ProofGraph.md) ### type [`ProofGraphNodeType`](../type-aliases/ProofGraphNodeType.md) ### refId `string` ### data? `Record`\<`string`, `unknown`\> ## Returns [`ProofGraph`](../interfaces/ProofGraph.md) --- ## Page: addProof URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/addProof [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / addProof # Function: addProof() > **addProof**(`graph`, `signedProof`): [`ProofGraph`](../interfaces/ProofGraph.md) Index a SignedProof into the graph. Nodes created: proof — proofId (stores the full SignedProof in .data) identity — signature.address (issuer key address) subject — proof.subject.id evidence — ev.id (one per evidence ref) anchor — anchor.hash (if present) Edges created (all referencing the proofId): proves proof → subject issued_by proof → identity (signer) about proof → subject references proof → evidence (one per evidence ref, in array order) anchored_to proof → anchor (if present) ## Parameters ### graph [`ProofGraph`](../interfaces/ProofGraph.md) ### signedProof `SignedProof` ## Returns [`ProofGraph`](../interfaces/ProofGraph.md) --- ## Page: addReceiptLike URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/addReceiptLike [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / addReceiptLike # Function: addReceiptLike() > **addReceiptLike**(`graph`, `receipt`): [`ProofGraph`](../interfaces/ProofGraph.md) Add a receipt-like node (payment, subscription, claim receipt) to the graph. If receipt.proofId is set, adds a 'supports' edge from the receipt to that proof. ## Parameters ### graph [`ProofGraph`](../interfaces/ProofGraph.md) ### receipt [`ReceiptLikeInput`](../interfaces/ReceiptLikeInput.md) ## Returns [`ProofGraph`](../interfaces/ProofGraph.md) --- ## Page: buildEdge URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/buildEdge [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / buildEdge # Function: buildEdge() > **buildEdge**(`type`, `from`, `to`, `proofId?`, `data?`): [`ProofGraphEdge`](../interfaces/ProofGraphEdge.md) Build a ProofGraphEdge with a deterministic ID from its fields. Convenience helper so callers don't need to import computeEdgeId. ## Parameters ### type [`ProofGraphEdgeType`](../type-aliases/ProofGraphEdgeType.md) ### from `string` ### to `string` ### proofId? `string` ### data? `Record`\<`string`, `unknown`\> ## Returns [`ProofGraphEdge`](../interfaces/ProofGraphEdge.md) --- ## Page: canonicalJson URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/canonicalJson [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / canonicalJson # Function: canonicalJson() > **canonicalJson**(`value`): `string` Deterministic canonical JSON with recursively sorted keys. Never use bare JSON.stringify on objects passed to hash or sign operations. ## Parameters ### value `unknown` ## Returns `string` --- ## Page: computeEdgeId URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/computeEdgeId [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / computeEdgeId # Function: computeEdgeId() > **computeEdgeId**(`type`, `from`, `to`, `proofId`, `data`): `string` ## Parameters ### type `string` ### from `string` ### to `string` ### proofId `string` \| `undefined` ### data `Record`\<`string`, `unknown`\> \| `undefined` ## Returns `string` --- ## Page: computeNodeId URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/computeNodeId [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / computeNodeId # Function: computeNodeId() > **computeNodeId**(`type`, `refId`): `string` ## Parameters ### type `string` ### refId `string` ## Returns `string` --- ## Page: computeProofGraphId URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/computeProofGraphId [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / computeProofGraphId # Function: computeProofGraphId() > **computeProofGraphId**(`nodes`, `edges`): `string` ## Parameters ### nodes [`ProofGraphNode`](../interfaces/ProofGraphNode.md)[] ### edges [`ProofGraphEdge`](../interfaces/ProofGraphEdge.md)[] ## Returns `string` --- ## Page: createDurableProofGraphStore URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/createDurableProofGraphStore [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / createDurableProofGraphStore # Function: createDurableProofGraphStore() > **createDurableProofGraphStore**(`adapter`, `options?`): [`DurableProofGraphStore`](../type-aliases/DurableProofGraphStore.md) Create a durable `ProofGraphStoragePort` over a CAS-capable adapter. The head pointer and every reverse-index entry are guarded with the adapter's `conditionalUpdate`, and all mutations run serialized per adapter, so concurrent saves never clobber a newer graph. A non-CAS or low-durability adapter is rejected at construction (RFC-007 §4.2 no-silent-downgrade). ## Parameters ### adapter `StorageAdapter` ### options? [`DurableProofGraphStoreOptions`](../interfaces/DurableProofGraphStoreOptions.md) = `{}` ## Returns [`DurableProofGraphStore`](../type-aliases/DurableProofGraphStore.md) --- ## Page: createProofGraph URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/createProofGraph [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / createProofGraph # Function: createProofGraph() > **createProofGraph**(`metadata?`): [`ProofGraph`](../interfaces/ProofGraph.md) Create an empty ProofGraph. ## Parameters ### metadata? `Record`\<`string`, `unknown`\> ## Returns [`ProofGraph`](../interfaces/ProofGraph.md) --- ## Page: createProofGraphEvidenceStore URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/createProofGraphEvidenceStore [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / createProofGraphEvidenceStore # Function: createProofGraphEvidenceStore() > **createProofGraphEvidenceStore**(`artifacts`, `index`, `options?`): [`ProofGraphEvidenceStore`](../interfaces/ProofGraphEvidenceStore.md) ## Parameters ### artifacts `ArtifactStore` ### index `StorageAdapter` ### options? [`ProofGraphEvidenceStoreOptions`](../interfaces/ProofGraphEvidenceStoreOptions.md) = `{}` ## Returns [`ProofGraphEvidenceStore`](../interfaces/ProofGraphEvidenceStore.md) --- ## Page: exportProofGraph URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/exportProofGraph [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / exportProofGraph # Function: exportProofGraph() > **exportProofGraph**(`graph`): `string` Serialize a ProofGraph to a JSON string. The stored graphId was computed at mutation time and is included as-is. ## Parameters ### graph [`ProofGraph`](../interfaces/ProofGraph.md) ## Returns `string` --- ## Page: findAnchorsForProof URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/findAnchorsForProof [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / findAnchorsForProof # Function: findAnchorsForProof() > **findAnchorsForProof**(`graph`, `proofId`): [`ProofGraphNode`](../interfaces/ProofGraphNode.md)[] Find all 'anchor' nodes linked to a proof via 'anchored_to' edges. ## Parameters ### graph [`ProofGraph`](../interfaces/ProofGraph.md) ### proofId `string` ## Returns [`ProofGraphNode`](../interfaces/ProofGraphNode.md)[] --- ## Page: findConflicts URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/findConflicts [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / findConflicts # Function: findConflicts() > **findConflicts**(`graph`, `proofId`): [`ProofGraphEdge`](../interfaces/ProofGraphEdge.md)[] Find all 'conflicts_with' edges involving the given proof node (in either direction). ## Parameters ### graph [`ProofGraph`](../interfaces/ProofGraph.md) ### proofId `string` ## Returns [`ProofGraphEdge`](../interfaces/ProofGraphEdge.md)[] --- ## Page: findNode URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/findNode [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / findNode # Function: findNode() > **findNode**(`graph`, `id`): [`ProofGraphNode`](../interfaces/ProofGraphNode.md) \| `undefined` Find a node by its composed node ID (type:refId) or by refId alone. ## Parameters ### graph [`ProofGraph`](../interfaces/ProofGraph.md) ### id `string` ## Returns [`ProofGraphNode`](../interfaces/ProofGraphNode.md) \| `undefined` --- ## Page: findProofsByIssuer URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/findProofsByIssuer [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / findProofsByIssuer # Function: findProofsByIssuer() > **findProofsByIssuer**(`graph`, `issuerId`): [`ProofGraphNode`](../interfaces/ProofGraphNode.md)[] Find all 'proof' nodes issued by a given address (via 'issued_by' edges). ## Parameters ### graph [`ProofGraph`](../interfaces/ProofGraph.md) ### issuerId `string` ## Returns [`ProofGraphNode`](../interfaces/ProofGraphNode.md)[] --- ## Page: findProofsBySubject URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/findProofsBySubject [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / findProofsBySubject # Function: findProofsBySubject() > **findProofsBySubject**(`graph`, `subjectId`): [`ProofGraphNode`](../interfaces/ProofGraphNode.md)[] Find all 'proof' nodes connected to a subject via 'about' OR 'proves' edges. ## Parameters ### graph [`ProofGraph`](../interfaces/ProofGraph.md) ### subjectId `string` ## Returns [`ProofGraphNode`](../interfaces/ProofGraphNode.md)[] --- ## Page: findRevocations URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/findRevocations [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / findRevocations # Function: findRevocations() > **findRevocations**(`graph`, `proofId`): [`ProofGraphEdge`](../interfaces/ProofGraphEdge.md)[] Find all 'revokes' edges whose target is the given proof node. ## Parameters ### graph [`ProofGraph`](../interfaces/ProofGraph.md) ### proofId `string` ## Returns [`ProofGraphEdge`](../interfaces/ProofGraphEdge.md)[] --- ## Page: findSupersessions URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/findSupersessions [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / findSupersessions # Function: findSupersessions() > **findSupersessions**(`graph`, `proofId`): [`ProofGraphEdge`](../interfaces/ProofGraphEdge.md)[] Find all 'supersedes' edges whose target is the given proof node. ## Parameters ### graph [`ProofGraph`](../interfaces/ProofGraph.md) ### proofId `string` ## Returns [`ProofGraphEdge`](../interfaces/ProofGraphEdge.md)[] --- ## Page: getEdgesBetween URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/getEdgesBetween [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / getEdgesBetween # Function: getEdgesBetween() > **getEdgesBetween**(`graph`, `refIdA`, `refIdB`): [`ProofGraphEdge`](../interfaces/ProofGraphEdge.md)[] Return all edges between two nodes (in either direction). ## Parameters ### graph [`ProofGraph`](../interfaces/ProofGraph.md) ### refIdA `string` ### refIdB `string` ## Returns [`ProofGraphEdge`](../interfaces/ProofGraphEdge.md)[] --- ## Page: getEdgesByType URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/getEdgesByType [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / getEdgesByType # Function: getEdgesByType() > **getEdgesByType**(`graph`, `type`): [`ProofGraphEdge`](../interfaces/ProofGraphEdge.md)[] Return all edges of a given type. ## Parameters ### graph [`ProofGraph`](../interfaces/ProofGraph.md) ### type [`ProofGraphEdgeType`](../type-aliases/ProofGraphEdgeType.md) ## Returns [`ProofGraphEdge`](../interfaces/ProofGraphEdge.md)[] --- ## Page: getEdgesFrom URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/getEdgesFrom [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / getEdgesFrom # Function: getEdgesFrom() > **getEdgesFrom**(`graph`, `nodeIdOrRefId`): [`ProofGraphEdge`](../interfaces/ProofGraphEdge.md)[] Return all outgoing edges from a node (identified by node ID or refId). ## Parameters ### graph [`ProofGraph`](../interfaces/ProofGraph.md) ### nodeIdOrRefId `string` ## Returns [`ProofGraphEdge`](../interfaces/ProofGraphEdge.md)[] --- ## Page: getEdgesTo URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/getEdgesTo [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / getEdgesTo # Function: getEdgesTo() > **getEdgesTo**(`graph`, `nodeIdOrRefId`): [`ProofGraphEdge`](../interfaces/ProofGraphEdge.md)[] Return all incoming edges to a node (identified by node ID or refId). ## Parameters ### graph [`ProofGraph`](../interfaces/ProofGraph.md) ### nodeIdOrRefId `string` ## Returns [`ProofGraphEdge`](../interfaces/ProofGraphEdge.md)[] --- ## Page: getEvidenceTrail URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/getEvidenceTrail [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / getEvidenceTrail # Function: getEvidenceTrail() > **getEvidenceTrail**(`graph`, `proofId`): [`ProofGraphNode`](../interfaces/ProofGraphNode.md)[] Traverse 'references' edges from a proof to its evidence nodes. Returns nodes in insertion order (the order edges were added, which matches the original evidence array order from addProof). ## Parameters ### graph [`ProofGraph`](../interfaces/ProofGraph.md) ### proofId `string` ## Returns [`ProofGraphNode`](../interfaces/ProofGraphNode.md)[] --- ## Page: getManifestsForAddress URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/getManifestsForAddress [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / getManifestsForAddress # Function: getManifestsForAddress() > **getManifestsForAddress**(`graph`, `address`): [`ProofGraphNode`](../interfaces/ProofGraphNode.md)[] Return all manifest nodes linked to a given address via 'manifests_as' edges. ## Parameters ### graph [`ProofGraph`](../interfaces/ProofGraph.md) ### address `string` ## Returns [`ProofGraphNode`](../interfaces/ProofGraphNode.md)[] --- ## Page: getProofLineage URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/getProofLineage [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / getProofLineage # Function: getProofLineage() > **getProofLineage**(`graph`, `proofId`, `_visited?`): [`ProofGraphNode`](../interfaces/ProofGraphNode.md)[] Recursively traverse 'derived_from' edges from a proof node. Returns the ordered chain of ancestor proof nodes (closest ancestor first). Terminates on cycle detection. ## Parameters ### graph [`ProofGraph`](../interfaces/ProofGraph.md) ### proofId `string` ### \_visited? `Set`\<`string`\> = `...` ## Returns [`ProofGraphNode`](../interfaces/ProofGraphNode.md)[] --- ## Page: getProofNodes URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/getProofNodes [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / getProofNodes # Function: getProofNodes() > **getProofNodes**(`graph`): [`ProofGraphNode`](../interfaces/ProofGraphNode.md)[] Return all proof nodes in the graph. ## Parameters ### graph [`ProofGraph`](../interfaces/ProofGraph.md) ## Returns [`ProofGraphNode`](../interfaces/ProofGraphNode.md)[] --- ## Page: importProofGraph URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/importProofGraph [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / importProofGraph # Function: importProofGraph() > **importProofGraph**(`json`): [`ProofGraph`](../interfaces/ProofGraph.md) Deserialize a ProofGraph from a JSON string. Validates every node and edge against structural constraints, then recomputes the graphId from nodes + edges. Throws if any constraint is violated or if the recomputed graphId does not match the stored value. ## Parameters ### json `string` ## Returns [`ProofGraph`](../interfaces/ProofGraph.md) ## Throws Error if parsing, validation, or graphId verification fails. --- ## Page: reachableFrom URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/reachableFrom [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / reachableFrom # Function: reachableFrom() > **reachableFrom**(`graph`, `startRefId`, `_visited?`): `Set`\<`string`\> Return the set of all node refIds reachable from a given node via directed edges. Includes the start node itself. ## Parameters ### graph [`ProofGraph`](../interfaces/ProofGraph.md) ### startRefId `string` ### \_visited? `Set`\<`string`\> = `...` ## Returns `Set`\<`string`\> --- ## Page: recomputeGraphId URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/recomputeGraphId [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / recomputeGraphId # Function: recomputeGraphId() > **recomputeGraphId**(`graph`): `string` ## Parameters ### graph #### edges [`ProofGraphEdge`](../interfaces/ProofGraphEdge.md)[] #### nodes [`ProofGraphNode`](../interfaces/ProofGraphNode.md)[] ## Returns `string` --- ## Page: resolveCurrentProofSet URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/resolveCurrentProofSet [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / resolveCurrentProofSet # Function: resolveCurrentProofSet() > **resolveCurrentProofSet**(`graph`): [`ProofGraphNode`](../interfaces/ProofGraphNode.md)[] Return all proof nodes that are NOT the target of any 'revokes' or 'supersedes' edge. These are the current / active proofs in the graph. ## Parameters ### graph [`ProofGraph`](../interfaces/ProofGraph.md) ## Returns [`ProofGraphNode`](../interfaces/ProofGraphNode.md)[] --- ## Page: setGraphMetadata URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/setGraphMetadata [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / setGraphMetadata # Function: setGraphMetadata() > **setGraphMetadata**(`graph`, `metadata`): [`ProofGraph`](../interfaces/ProofGraph.md) Attach or replace mutable metadata. Does NOT affect graphId. ## Parameters ### graph [`ProofGraph`](../interfaces/ProofGraph.md) ### metadata `Record`\<`string`, `unknown`\> ## Returns [`ProofGraph`](../interfaces/ProofGraph.md) --- ## Page: toHex URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/toHex [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / toHex # Function: toHex() > **toHex**(`bytes`): `string` ## Parameters ### bytes `Uint8Array` ## Returns `string` --- ## Page: verifyGraphProofs URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/verifyGraphProofs [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / verifyGraphProofs # Function: verifyGraphProofs() > **verifyGraphProofs**(`graph`): `string`[] Returns the list of invalid proof IDs in the graph. Equivalent to verifyProofGraph(graph).invalidProofs. ## Parameters ### graph [`ProofGraph`](../interfaces/ProofGraph.md) ## Returns `string`[] --- ## Page: verifyProofGraph URL: https://docs.totem.ing/api/totemsdk-proofgraph/functions/verifyProofGraph [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / verifyProofGraph # Function: verifyProofGraph() > **verifyProofGraph**(`graph`, `_options?`): [`ProofGraphVerifyResult`](../interfaces/ProofGraphVerifyResult.md) Verify every proof node stored in the graph. Iterates nodes of type 'proof', casts node.data back to SignedProof, and calls proofModule.verifyProof() from @totemsdk/proof. Returns { valid: true } if ALL proofs pass; otherwise lists the failing proofIds. ## Parameters ### graph [`ProofGraph`](../interfaces/ProofGraph.md) ### \_options? `Record`\<`string`, `unknown`\> ## Returns [`ProofGraphVerifyResult`](../interfaces/ProofGraphVerifyResult.md) --- ## Page: AnchorInput URL: https://docs.totem.ing/api/totemsdk-proofgraph/interfaces/AnchorInput [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / AnchorInput # Interface: AnchorInput Input object for addAnchor. ## Properties ### confirmedAt? > `optional` **confirmedAt?**: `number` *** ### hash > **hash**: `string` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### proofId? > `optional` **proofId?**: `string` *** ### provider? > `optional` **provider?**: `string` *** ### txId? > `optional` **txId?**: `string` --- ## Page: DurableProofGraphStoreOptions URL: https://docs.totem.ing/api/totemsdk-proofgraph/interfaces/DurableProofGraphStoreOptions [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / DurableProofGraphStoreOptions # Interface: DurableProofGraphStoreOptions ## Properties ### namespace? > `optional` **namespace?**: `string` Key prefix (default 'totem_proofgraph:v1:'). *** ### requireAckMode? > `optional` **requireAckMode?**: `"volatile"` \| `"buffered"` \| `"durably-acknowledged"` Required write-ack level the backing adapter must satisfy (default 'durably-acknowledged'). --- ## Page: ProofGraph URL: https://docs.totem.ing/api/totemsdk-proofgraph/interfaces/ProofGraph [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / ProofGraph # Interface: ProofGraph ## Properties ### createdAt > **createdAt**: `number` *** ### edges > **edges**: [`ProofGraphEdge`](ProofGraphEdge.md)[] *** ### graphId > **graphId**: `string` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### nodes > **nodes**: [`ProofGraphNode`](ProofGraphNode.md)[] --- ## Page: ProofGraphEdge URL: https://docs.totem.ing/api/totemsdk-proofgraph/interfaces/ProofGraphEdge [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / ProofGraphEdge # Interface: ProofGraphEdge ## Properties ### data? > `optional` **data?**: `Record`\<`string`, `unknown`\> *** ### from > **from**: `string` *** ### id > **id**: `string` *** ### proofId? > `optional` **proofId?**: `string` *** ### to > **to**: `string` *** ### type > **type**: [`ProofGraphEdgeType`](../type-aliases/ProofGraphEdgeType.md) --- ## Page: ProofGraphEvidenceResult URL: https://docs.totem.ing/api/totemsdk-proofgraph/interfaces/ProofGraphEvidenceResult [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / ProofGraphEvidenceResult # Interface: ProofGraphEvidenceResult Per-evidence-node restore result. ## Properties ### bytes? > `optional` **bytes?**: `Uint8Array`\<`ArrayBufferLike`\> *** ### message? > `optional` **message?**: `string` *** ### nodeId > **nodeId**: `string` *** ### ref? > `optional` **ref?**: `ArtifactRef` *** ### status > **status**: `"ok"` \| `"not-found"` \| `"corrupt"` \| `"unavailable"` --- ## Page: ProofGraphEvidenceStore URL: https://docs.totem.ing/api/totemsdk-proofgraph/interfaces/ProofGraphEvidenceStore [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / ProofGraphEvidenceStore # Interface: ProofGraphEvidenceStore ## Methods ### listCount() > **listCount**(): `Promise`\<`number`\> Count of local index entries (persisted evidence mappings). #### Returns `Promise`\<`number`\> *** ### putEvidence() > **putEvidence**(`graph`, `bytesFor`): `Promise`\<`ArtifactRef`[]\> Persist evidence bytes for every `evidence` node of `graph`. `bytesFor` maps a node id to the bytes to store; nodes with no bytes are skipped. Returns the refs persisted, in graph node order. #### Parameters ##### graph [`ProofGraph`](ProofGraph.md) ##### bytesFor (`nodeId`) => `Uint8Array`\<`ArrayBufferLike`\> \| `undefined` #### Returns `Promise`\<`ArtifactRef`[]\> *** ### restoreEvidence() > **restoreEvidence**(`graph`): `Promise`\<[`ProofGraphEvidenceResult`](ProofGraphEvidenceResult.md)[]\> Restore evidence bytes for every `evidence` node of `graph`, verifying each artifact's committed digest on read. With `strict` (default), corrupt or unavailable reads throw; otherwise a per-node result is returned. #### Parameters ##### graph [`ProofGraph`](ProofGraph.md) #### Returns `Promise`\<[`ProofGraphEvidenceResult`](ProofGraphEvidenceResult.md)[]\> --- ## Page: ProofGraphEvidenceStoreOptions URL: https://docs.totem.ing/api/totemsdk-proofgraph/interfaces/ProofGraphEvidenceStoreOptions [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / ProofGraphEvidenceStoreOptions # Interface: ProofGraphEvidenceStoreOptions ## Properties ### namespace? > `optional` **namespace?**: `string` Namespace the ArtifactStore writes artifact bytes under. *** ### strict? > `optional` **strict?**: `boolean` true (default) — a `corrupt` or `unavailable` evidence read throws `StorageError` (never fail-open). `not-found` is always returned as a result, never thrown. Set false to return audit-able results instead. --- ## Page: ProofGraphNode URL: https://docs.totem.ing/api/totemsdk-proofgraph/interfaces/ProofGraphNode [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / ProofGraphNode # Interface: ProofGraphNode ## Properties ### createdAt > **createdAt**: `number` *** ### data? > `optional` **data?**: `Record`\<`string`, `unknown`\> *** ### id > **id**: `string` *** ### refId > **refId**: `string` *** ### type > **type**: [`ProofGraphNodeType`](../type-aliases/ProofGraphNodeType.md) --- ## Page: ProofGraphRecoveryReport URL: https://docs.totem.ing/api/totemsdk-proofgraph/interfaces/ProofGraphRecoveryReport [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / ProofGraphRecoveryReport # Interface: ProofGraphRecoveryReport ## Properties ### cleanedIndexKeys > **cleanedIndexKeys**: `number` *** ### recoveredHead > **recoveredHead**: `boolean` --- ## Page: ProofGraphStoragePort URL: https://docs.totem.ing/api/totemsdk-proofgraph/interfaces/ProofGraphStoragePort [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / ProofGraphStoragePort # Interface: ProofGraphStoragePort Storage port — interface only, no concrete implementation in this package. Adapters (SQLite, LevelDB, in-memory) live in consumer packages. ## Methods ### findByNodeId() > **findByNodeId**(`id`): `Promise`\<[`ProofGraph`](ProofGraph.md) \| `null`\> #### Parameters ##### id `string` #### Returns `Promise`\<[`ProofGraph`](ProofGraph.md) \| `null`\> *** ### load() > **load**(`graphId`): `Promise`\<[`ProofGraph`](ProofGraph.md) \| `null`\> #### Parameters ##### graphId `string` #### Returns `Promise`\<[`ProofGraph`](ProofGraph.md) \| `null`\> *** ### save() > **save**(`graph`): `Promise`\<`void`\> #### Parameters ##### graph [`ProofGraph`](ProofGraph.md) #### Returns `Promise`\<`void`\> --- ## Page: ProofGraphVerifyResult URL: https://docs.totem.ing/api/totemsdk-proofgraph/interfaces/ProofGraphVerifyResult [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / ProofGraphVerifyResult # Interface: ProofGraphVerifyResult ## Properties ### invalidProofs > **invalidProofs**: `string`[] *** ### reason? > `optional` **reason?**: `string` *** ### valid > **valid**: `boolean` --- ## Page: ReceiptLikeInput URL: https://docs.totem.ing/api/totemsdk-proofgraph/interfaces/ReceiptLikeInput [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / ReceiptLikeInput # Interface: ReceiptLikeInput Input object for addReceiptLike. ## Properties ### data? > `optional` **data?**: `Record`\<`string`, `unknown`\> *** ### id > **id**: `string` *** ### proofId? > `optional` **proofId?**: `string` --- ## Page: DurableProofGraphStore URL: https://docs.totem.ing/api/totemsdk-proofgraph/type-aliases/DurableProofGraphStore [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / DurableProofGraphStore # Type Alias: DurableProofGraphStore > **DurableProofGraphStore** = [`ProofGraphStoragePort`](../interfaces/ProofGraphStoragePort.md) & `object` ## Type Declaration ### latest() > **latest**(): `Promise`\<[`ProofGraph`](../interfaces/ProofGraph.md) \| `null`\> Load the most-recent saved graph (the head). #### Returns `Promise`\<[`ProofGraph`](../interfaces/ProofGraph.md) \| `null`\> ### listGraphIds() > **listGraphIds**(): `Promise`\<`string`[]\> List all persisted graphIds. #### Returns `Promise`\<`string`[]\> ### recover() > **recover**(): `Promise`\<[`ProofGraphRecoveryReport`](../interfaces/ProofGraphRecoveryReport.md)\> Reconcile head + index after a crash/interruption. #### Returns `Promise`\<[`ProofGraphRecoveryReport`](../interfaces/ProofGraphRecoveryReport.md)\> --- ## Page: ProofGraphEdgeType URL: https://docs.totem.ing/api/totemsdk-proofgraph/type-aliases/ProofGraphEdgeType [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / ProofGraphEdgeType # Type Alias: ProofGraphEdgeType > **ProofGraphEdgeType** = `"proves"` \| `"issued_by"` \| `"signed_by"` \| `"about"` \| `"references"` \| `"derived_from"` \| `"supports"` \| `"contradicts"` \| `"supersedes"` \| `"revokes"` \| `"anchored_to"` \| `"delegates_to"` \| `"controls"` \| `"depends_on"` \| `"manifests_as"` \| `"conflicts_with"` --- ## Page: ProofGraphNodeType URL: https://docs.totem.ing/api/totemsdk-proofgraph/type-aliases/ProofGraphNodeType [**@totemsdk/proofgraph**](../index.md) *** [@totemsdk/proofgraph](../index.md) / ProofGraphNodeType # Type Alias: ProofGraphNodeType > **ProofGraphNodeType** = `"proof"` \| `"identity"` \| `"identity-claim"` \| `"manifest"` \| `"address"` \| `"subject"` \| `"evidence"` \| `"anchor"` \| `"receipt"` \| `"payment"` \| `"device"` \| `"service"` \| `"policy"` \| `"custom"` @totemsdk/proofgraph — Type definitions Pure schema — no network, no DHT, no blockchain submission, no crypto. --- ## Page: BondProofError URL: https://docs.totem.ing/api/totemsdk-provider-bond/classes/BondProofError [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / BondProofError # Class: BondProofError ## Extends - [`ProviderBondError`](ProviderBondError.md) ## Constructors ### Constructor > **new BondProofError**(`message`, `code?`, `details?`): `BondProofError` #### Parameters ##### message `string` ##### code? `string` ##### details? `unknown` #### Returns `BondProofError` #### Overrides [`ProviderBondError`](ProviderBondError.md).[`constructor`](ProviderBondError.md#constructor) ## Properties ### code? > `optional` **code?**: `string` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`code`](ProviderBondError.md#code) *** ### details? > `optional` **details?**: `unknown` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`details`](ProviderBondError.md#details) *** ### message > **message**: `string` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`message`](ProviderBondError.md#message) *** ### name > **name**: `string` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`name`](ProviderBondError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`stack`](ProviderBondError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`ProviderBondError`](ProviderBondError.md).[`stackTraceLimit`](ProviderBondError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`ProviderBondError`](ProviderBondError.md).[`captureStackTrace`](ProviderBondError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`prepareStackTrace`](ProviderBondError.md#preparestacktrace) --- ## Page: IncidentError URL: https://docs.totem.ing/api/totemsdk-provider-bond/classes/IncidentError [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / IncidentError # Class: IncidentError ## Extends - [`ProviderBondError`](ProviderBondError.md) ## Constructors ### Constructor > **new IncidentError**(`message`, `code?`, `details?`): `IncidentError` #### Parameters ##### message `string` ##### code? `string` ##### details? `unknown` #### Returns `IncidentError` #### Overrides [`ProviderBondError`](ProviderBondError.md).[`constructor`](ProviderBondError.md#constructor) ## Properties ### code? > `optional` **code?**: `string` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`code`](ProviderBondError.md#code) *** ### details? > `optional` **details?**: `unknown` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`details`](ProviderBondError.md#details) *** ### message > **message**: `string` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`message`](ProviderBondError.md#message) *** ### name > **name**: `string` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`name`](ProviderBondError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`stack`](ProviderBondError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`ProviderBondError`](ProviderBondError.md).[`stackTraceLimit`](ProviderBondError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`ProviderBondError`](ProviderBondError.md).[`captureStackTrace`](ProviderBondError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`prepareStackTrace`](ProviderBondError.md#preparestacktrace) --- ## Page: MemoryProviderBondStore URL: https://docs.totem.ing/api/totemsdk-provider-bond/classes/MemoryProviderBondStore [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / MemoryProviderBondStore # Class: MemoryProviderBondStore ## Constructors ### Constructor > **new MemoryProviderBondStore**(): `MemoryProviderBondStore` #### Returns `MemoryProviderBondStore` ## Methods ### attachBondProof() > **attachBondProof**(`providerId`, `proof`): `Promise`\<`void`\> #### Parameters ##### providerId `string` ##### proof [`BondProofRef`](../interfaces/BondProofRef.md) #### Returns `Promise`\<`void`\> *** ### getProvider() > **getProvider**(`providerId`): `Promise`\<[`ProviderBondManifest`](../interfaces/ProviderBondManifest.md) \| `undefined`\> #### Parameters ##### providerId `string` #### Returns `Promise`\<[`ProviderBondManifest`](../interfaces/ProviderBondManifest.md) \| `undefined`\> *** ### getSnapshot() > **getSnapshot**(): `Promise`\<[`ProviderBondRegistryState`](../interfaces/ProviderBondRegistryState.md)\> #### Returns `Promise`\<[`ProviderBondRegistryState`](../interfaces/ProviderBondRegistryState.md)\> *** ### listOfflineProviders() > **listOfflineProviders**(`maxHeartbeatAgeMs`, `now`): `Promise`\<[`ProviderBondManifest`](../interfaces/ProviderBondManifest.md)[]\> #### Parameters ##### maxHeartbeatAgeMs `number` ##### now `number` #### Returns `Promise`\<[`ProviderBondManifest`](../interfaces/ProviderBondManifest.md)[]\> *** ### listProviders() > **listProviders**(): `Promise`\<[`ProviderBondManifest`](../interfaces/ProviderBondManifest.md)[]\> #### Returns `Promise`\<[`ProviderBondManifest`](../interfaces/ProviderBondManifest.md)[]\> *** ### listProvidersByServiceType() > **listProvidersByServiceType**(`serviceType`): `Promise`\<[`ProviderBondManifest`](../interfaces/ProviderBondManifest.md)[]\> #### Parameters ##### serviceType `string` #### Returns `Promise`\<[`ProviderBondManifest`](../interfaces/ProviderBondManifest.md)[]\> *** ### listRiskyProviders() > **listRiskyProviders**(`threshold`): `Promise`\<[`ProviderBondManifest`](../interfaces/ProviderBondManifest.md)[]\> #### Parameters ##### threshold `number` #### Returns `Promise`\<[`ProviderBondManifest`](../interfaces/ProviderBondManifest.md)[]\> *** ### recordIncident() > **recordIncident**(`providerId`, `incident`): `Promise`\<`void`\> #### Parameters ##### providerId `string` ##### incident [`IncidentRecord`](../interfaces/IncidentRecord.md) #### Returns `Promise`\<`void`\> *** ### recordProbe() > **recordProbe**(`providerId`, `probe`): `Promise`\<`void`\> #### Parameters ##### providerId `string` ##### probe [`ProbeResult`](../interfaces/ProbeResult.md) #### Returns `Promise`\<`void`\> *** ### registerProvider() > **registerProvider**(`manifest`): `Promise`\<`void`\> #### Parameters ##### manifest [`ProviderBondManifest`](../interfaces/ProviderBondManifest.md) #### Returns `Promise`\<`void`\> *** ### updateProviderManifest() > **updateProviderManifest**(`manifest`): `Promise`\<`void`\> #### Parameters ##### manifest [`ProviderBondManifest`](../interfaces/ProviderBondManifest.md) #### Returns `Promise`\<`void`\> *** ### updateScore() > **updateScore**(`providerId`, `score`): `Promise`\<`void`\> #### Parameters ##### providerId `string` ##### score [`ProviderScore`](../interfaces/ProviderScore.md) #### Returns `Promise`\<`void`\> --- ## Page: ProbeError URL: https://docs.totem.ing/api/totemsdk-provider-bond/classes/ProbeError [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / ProbeError # Class: ProbeError ## Extends - [`ProviderBondError`](ProviderBondError.md) ## Constructors ### Constructor > **new ProbeError**(`message`, `code?`, `details?`): `ProbeError` #### Parameters ##### message `string` ##### code? `string` ##### details? `unknown` #### Returns `ProbeError` #### Overrides [`ProviderBondError`](ProviderBondError.md).[`constructor`](ProviderBondError.md#constructor) ## Properties ### code? > `optional` **code?**: `string` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`code`](ProviderBondError.md#code) *** ### details? > `optional` **details?**: `unknown` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`details`](ProviderBondError.md#details) *** ### message > **message**: `string` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`message`](ProviderBondError.md#message) *** ### name > **name**: `string` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`name`](ProviderBondError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`stack`](ProviderBondError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`ProviderBondError`](ProviderBondError.md).[`stackTraceLimit`](ProviderBondError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`ProviderBondError`](ProviderBondError.md).[`captureStackTrace`](ProviderBondError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`prepareStackTrace`](ProviderBondError.md#preparestacktrace) --- ## Page: ProviderBondError URL: https://docs.totem.ing/api/totemsdk-provider-bond/classes/ProviderBondError [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / ProviderBondError # Class: ProviderBondError ## Extends - `Error` ## Extended by - [`ProviderManifestError`](ProviderManifestError.md) - [`ProviderIdentityError`](ProviderIdentityError.md) - [`BondProofError`](BondProofError.md) - [`ProbeError`](ProbeError.md) - [`IncidentError`](IncidentError.md) - [`ProviderScoreError`](ProviderScoreError.md) - [`ProviderPolicyError`](ProviderPolicyError.md) - [`ProviderRegistryError`](ProviderRegistryError.md) - [`ProviderSerializationError`](ProviderSerializationError.md) ## Constructors ### Constructor > **new ProviderBondError**(`message`, `code?`, `details?`): `ProviderBondError` #### Parameters ##### message `string` ##### code? `string` ##### details? `unknown` #### Returns `ProviderBondError` #### Overrides `Error.constructor` ## Properties ### code? > `optional` **code?**: `string` *** ### details? > `optional` **details?**: `unknown` *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: ProviderIdentityError URL: https://docs.totem.ing/api/totemsdk-provider-bond/classes/ProviderIdentityError [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / ProviderIdentityError # Class: ProviderIdentityError ## Extends - [`ProviderBondError`](ProviderBondError.md) ## Constructors ### Constructor > **new ProviderIdentityError**(`message`, `code?`, `details?`): `ProviderIdentityError` #### Parameters ##### message `string` ##### code? `string` ##### details? `unknown` #### Returns `ProviderIdentityError` #### Overrides [`ProviderBondError`](ProviderBondError.md).[`constructor`](ProviderBondError.md#constructor) ## Properties ### code? > `optional` **code?**: `string` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`code`](ProviderBondError.md#code) *** ### details? > `optional` **details?**: `unknown` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`details`](ProviderBondError.md#details) *** ### message > **message**: `string` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`message`](ProviderBondError.md#message) *** ### name > **name**: `string` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`name`](ProviderBondError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`stack`](ProviderBondError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`ProviderBondError`](ProviderBondError.md).[`stackTraceLimit`](ProviderBondError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`ProviderBondError`](ProviderBondError.md).[`captureStackTrace`](ProviderBondError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`prepareStackTrace`](ProviderBondError.md#preparestacktrace) --- ## Page: ProviderManifestError URL: https://docs.totem.ing/api/totemsdk-provider-bond/classes/ProviderManifestError [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / ProviderManifestError # Class: ProviderManifestError ## Extends - [`ProviderBondError`](ProviderBondError.md) ## Constructors ### Constructor > **new ProviderManifestError**(`message`, `code?`, `details?`): `ProviderManifestError` #### Parameters ##### message `string` ##### code? `string` ##### details? `unknown` #### Returns `ProviderManifestError` #### Overrides [`ProviderBondError`](ProviderBondError.md).[`constructor`](ProviderBondError.md#constructor) ## Properties ### code? > `optional` **code?**: `string` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`code`](ProviderBondError.md#code) *** ### details? > `optional` **details?**: `unknown` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`details`](ProviderBondError.md#details) *** ### message > **message**: `string` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`message`](ProviderBondError.md#message) *** ### name > **name**: `string` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`name`](ProviderBondError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`stack`](ProviderBondError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`ProviderBondError`](ProviderBondError.md).[`stackTraceLimit`](ProviderBondError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`ProviderBondError`](ProviderBondError.md).[`captureStackTrace`](ProviderBondError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`prepareStackTrace`](ProviderBondError.md#preparestacktrace) --- ## Page: ProviderPolicyError URL: https://docs.totem.ing/api/totemsdk-provider-bond/classes/ProviderPolicyError [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / ProviderPolicyError # Class: ProviderPolicyError ## Extends - [`ProviderBondError`](ProviderBondError.md) ## Constructors ### Constructor > **new ProviderPolicyError**(`message`, `code?`, `details?`): `ProviderPolicyError` #### Parameters ##### message `string` ##### code? `string` ##### details? `unknown` #### Returns `ProviderPolicyError` #### Overrides [`ProviderBondError`](ProviderBondError.md).[`constructor`](ProviderBondError.md#constructor) ## Properties ### code? > `optional` **code?**: `string` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`code`](ProviderBondError.md#code) *** ### details? > `optional` **details?**: `unknown` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`details`](ProviderBondError.md#details) *** ### message > **message**: `string` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`message`](ProviderBondError.md#message) *** ### name > **name**: `string` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`name`](ProviderBondError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`stack`](ProviderBondError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`ProviderBondError`](ProviderBondError.md).[`stackTraceLimit`](ProviderBondError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`ProviderBondError`](ProviderBondError.md).[`captureStackTrace`](ProviderBondError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`prepareStackTrace`](ProviderBondError.md#preparestacktrace) --- ## Page: ProviderRegistryError URL: https://docs.totem.ing/api/totemsdk-provider-bond/classes/ProviderRegistryError [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / ProviderRegistryError # Class: ProviderRegistryError ## Extends - [`ProviderBondError`](ProviderBondError.md) ## Constructors ### Constructor > **new ProviderRegistryError**(`message`, `code?`, `details?`): `ProviderRegistryError` #### Parameters ##### message `string` ##### code? `string` ##### details? `unknown` #### Returns `ProviderRegistryError` #### Overrides [`ProviderBondError`](ProviderBondError.md).[`constructor`](ProviderBondError.md#constructor) ## Properties ### code? > `optional` **code?**: `string` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`code`](ProviderBondError.md#code) *** ### details? > `optional` **details?**: `unknown` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`details`](ProviderBondError.md#details) *** ### message > **message**: `string` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`message`](ProviderBondError.md#message) *** ### name > **name**: `string` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`name`](ProviderBondError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`stack`](ProviderBondError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`ProviderBondError`](ProviderBondError.md).[`stackTraceLimit`](ProviderBondError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`ProviderBondError`](ProviderBondError.md).[`captureStackTrace`](ProviderBondError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`prepareStackTrace`](ProviderBondError.md#preparestacktrace) --- ## Page: ProviderScoreError URL: https://docs.totem.ing/api/totemsdk-provider-bond/classes/ProviderScoreError [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / ProviderScoreError # Class: ProviderScoreError ## Extends - [`ProviderBondError`](ProviderBondError.md) ## Constructors ### Constructor > **new ProviderScoreError**(`message`, `code?`, `details?`): `ProviderScoreError` #### Parameters ##### message `string` ##### code? `string` ##### details? `unknown` #### Returns `ProviderScoreError` #### Overrides [`ProviderBondError`](ProviderBondError.md).[`constructor`](ProviderBondError.md#constructor) ## Properties ### code? > `optional` **code?**: `string` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`code`](ProviderBondError.md#code) *** ### details? > `optional` **details?**: `unknown` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`details`](ProviderBondError.md#details) *** ### message > **message**: `string` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`message`](ProviderBondError.md#message) *** ### name > **name**: `string` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`name`](ProviderBondError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`stack`](ProviderBondError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`ProviderBondError`](ProviderBondError.md).[`stackTraceLimit`](ProviderBondError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`ProviderBondError`](ProviderBondError.md).[`captureStackTrace`](ProviderBondError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`prepareStackTrace`](ProviderBondError.md#preparestacktrace) --- ## Page: ProviderSerializationError URL: https://docs.totem.ing/api/totemsdk-provider-bond/classes/ProviderSerializationError [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / ProviderSerializationError # Class: ProviderSerializationError ## Extends - [`ProviderBondError`](ProviderBondError.md) ## Constructors ### Constructor > **new ProviderSerializationError**(`message`, `code?`, `details?`): `ProviderSerializationError` #### Parameters ##### message `string` ##### code? `string` ##### details? `unknown` #### Returns `ProviderSerializationError` #### Overrides [`ProviderBondError`](ProviderBondError.md).[`constructor`](ProviderBondError.md#constructor) ## Properties ### code? > `optional` **code?**: `string` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`code`](ProviderBondError.md#code) *** ### details? > `optional` **details?**: `unknown` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`details`](ProviderBondError.md#details) *** ### message > **message**: `string` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`message`](ProviderBondError.md#message) *** ### name > **name**: `string` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`name`](ProviderBondError.md#name) *** ### stack? > `optional` **stack?**: `string` #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`stack`](ProviderBondError.md#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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 [`ProviderBondError`](ProviderBondError.md).[`stackTraceLimit`](ProviderBondError.md#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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 [`ProviderBondError`](ProviderBondError.md).[`captureStackTrace`](ProviderBondError.md#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`ProviderBondError`](ProviderBondError.md).[`prepareStackTrace`](ProviderBondError.md#preparestacktrace) --- ## Page: acknowledgeIncident URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/acknowledgeIncident [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / acknowledgeIncident # Function: acknowledgeIncident() > **acknowledgeIncident**(`incident`, `now?`): [`IncidentRecord`](../interfaces/IncidentRecord.md) ## Parameters ### incident [`IncidentRecord`](../interfaces/IncidentRecord.md) ### now? `number` ## Returns [`IncidentRecord`](../interfaces/IncidentRecord.md) --- ## Page: assertBondMeetsMinimum URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/assertBondMeetsMinimum [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / assertBondMeetsMinimum # Function: assertBondMeetsMinimum() > **assertBondMeetsMinimum**(`proof`, `minAmount`): [`ProviderBondVerifyResult`](../interfaces/ProviderBondVerifyResult.md) ## Parameters ### proof [`BondProofRef`](../interfaces/BondProofRef.md) ### minAmount `bigint` ## Returns [`ProviderBondVerifyResult`](../interfaces/ProviderBondVerifyResult.md) --- ## Page: assertManifestNotExpired URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/assertManifestNotExpired [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / assertManifestNotExpired # Function: assertManifestNotExpired() > **assertManifestNotExpired**(`manifest`, `now?`): `void` ## Parameters ### manifest [`ProviderBondManifest`](../interfaces/ProviderBondManifest.md) ### now? `number` ## Returns `void` --- ## Page: assertProviderControlsAddress URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/assertProviderControlsAddress [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / assertProviderControlsAddress # Function: assertProviderControlsAddress() > **assertProviderControlsAddress**(`params`): [`ProviderBondVerifyResult`](../interfaces/ProviderBondVerifyResult.md) ## Parameters ### params [`AssertProviderControlsAddressParams`](../interfaces/AssertProviderControlsAddressParams.md) ## Returns [`ProviderBondVerifyResult`](../interfaces/ProviderBondVerifyResult.md) --- ## Page: attachBondProof URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/attachBondProof [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / attachBondProof # Function: attachBondProof() > **attachBondProof**(`state`, `providerId`, `proof`): [`ProviderBondRegistryState`](../interfaces/ProviderBondRegistryState.md) ## Parameters ### state [`ProviderBondRegistryState`](../interfaces/ProviderBondRegistryState.md) ### providerId `string` ### proof [`BondProofRef`](../interfaces/BondProofRef.md) ## Returns [`ProviderBondRegistryState`](../interfaces/ProviderBondRegistryState.md) --- ## Page: bindProviderManifestToIdentity URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/bindProviderManifestToIdentity [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / bindProviderManifestToIdentity # Function: bindProviderManifestToIdentity() > **bindProviderManifestToIdentity**(`params`): `unknown` ## Parameters ### params [`BindProviderManifestToIdentityParams`](../interfaces/BindProviderManifestToIdentityParams.md) ## Returns `unknown` --- ## Page: computeProviderBondExtensionHash URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/computeProviderBondExtensionHash [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / computeProviderBondExtensionHash # Function: computeProviderBondExtensionHash() > **computeProviderBondExtensionHash**(`extension`): `string` ## Parameters ### extension [`ProviderBondExtension`](../interfaces/ProviderBondExtension.md) ## Returns `string` --- ## Page: computeProviderBondManifestHash URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/computeProviderBondManifestHash [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / computeProviderBondManifestHash # Function: computeProviderBondManifestHash() > **computeProviderBondManifestHash**(`manifest`): `string` ## Parameters ### manifest [`ProviderBondManifest`](../interfaces/ProviderBondManifest.md) ## Returns `string` --- ## Page: computeProviderRecommendation URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/computeProviderRecommendation [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / computeProviderRecommendation # Function: computeProviderRecommendation() > **computeProviderRecommendation**(`score`): [`ProviderRecommendation`](../type-aliases/ProviderRecommendation.md) ## Parameters ### score `number` ## Returns [`ProviderRecommendation`](../type-aliases/ProviderRecommendation.md) --- ## Page: computeProviderScore URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/computeProviderScore [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / computeProviderScore # Function: computeProviderScore() > **computeProviderScore**(`params`): [`ProviderScore`](../interfaces/ProviderScore.md) ## Parameters ### params [`ComputeProviderScoreParams`](../interfaces/ComputeProviderScoreParams.md) ## Returns [`ProviderScore`](../interfaces/ProviderScore.md) --- ## Page: createDurableProviderBondStore URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/createDurableProviderBondStore [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / createDurableProviderBondStore # Function: createDurableProviderBondStore() > **createDurableProviderBondStore**(`adapter`, `options?`): [`DurableProviderBondStore`](../interfaces/DurableProviderBondStore.md) ## Parameters ### adapter `StorageAdapterWithCapabilities` & `CasStore` ### options? [`DurableProviderBondStoreOptions`](../interfaces/DurableProviderBondStoreOptions.md) = `{}` ## Returns [`DurableProviderBondStore`](../interfaces/DurableProviderBondStore.md) --- ## Page: createEmptyProviderBondRegistryState URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/createEmptyProviderBondRegistryState [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / createEmptyProviderBondRegistryState # Function: createEmptyProviderBondRegistryState() > **createEmptyProviderBondRegistryState**(): [`ProviderBondRegistryState`](../interfaces/ProviderBondRegistryState.md) ## Returns [`ProviderBondRegistryState`](../interfaces/ProviderBondRegistryState.md) --- ## Page: createProviderBondManifest URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/createProviderBondManifest [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / createProviderBondManifest # Function: createProviderBondManifest() > **createProviderBondManifest**(`params`): [`ProviderBondManifest`](../interfaces/ProviderBondManifest.md) ## Parameters ### params [`CreateProviderBondManifestParams`](../interfaces/CreateProviderBondManifestParams.md) ## Returns [`ProviderBondManifest`](../interfaces/ProviderBondManifest.md) --- ## Page: explainProviderPolicyMatch URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/explainProviderPolicyMatch [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / explainProviderPolicyMatch # Function: explainProviderPolicyMatch() > **explainProviderPolicyMatch**(`match`): `string`[] ## Parameters ### match [`PolicyMatch`](../interfaces/PolicyMatch.md) ## Returns `string`[] --- ## Page: filterProvidersByPolicy URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/filterProvidersByPolicy [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / filterProvidersByPolicy # Function: filterProvidersByPolicy() > **filterProvidersByPolicy**(`state`, `policy`): [`PolicyMatch`](../interfaces/PolicyMatch.md)[] ## Parameters ### state [`ProviderBondRegistryState`](../interfaces/ProviderBondRegistryState.md) ### policy [`ProviderPolicy`](../interfaces/ProviderPolicy.md) ## Returns [`PolicyMatch`](../interfaces/PolicyMatch.md)[] --- ## Page: getProvider URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/getProvider [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / getProvider # Function: getProvider() > **getProvider**(`state`, `providerId`): [`ProviderBondManifest`](../interfaces/ProviderBondManifest.md) \| `undefined` ## Parameters ### state [`ProviderBondRegistryState`](../interfaces/ProviderBondRegistryState.md) ### providerId `string` ## Returns [`ProviderBondManifest`](../interfaces/ProviderBondManifest.md) \| `undefined` --- ## Page: listOfflineProviders URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/listOfflineProviders [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / listOfflineProviders # Function: listOfflineProviders() > **listOfflineProviders**(`state`, `maxHeartbeatAgeMs`, `now`): [`ProviderBondManifest`](../interfaces/ProviderBondManifest.md)[] ## Parameters ### state [`ProviderBondRegistryState`](../interfaces/ProviderBondRegistryState.md) ### maxHeartbeatAgeMs `number` ### now `number` ## Returns [`ProviderBondManifest`](../interfaces/ProviderBondManifest.md)[] --- ## Page: listProviders URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/listProviders [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / listProviders # Function: listProviders() > **listProviders**(`state`): [`ProviderBondManifest`](../interfaces/ProviderBondManifest.md)[] ## Parameters ### state [`ProviderBondRegistryState`](../interfaces/ProviderBondRegistryState.md) ## Returns [`ProviderBondManifest`](../interfaces/ProviderBondManifest.md)[] --- ## Page: listProvidersByServiceType URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/listProvidersByServiceType [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / listProvidersByServiceType # Function: listProvidersByServiceType() > **listProvidersByServiceType**(`state`, `serviceType`): [`ProviderBondManifest`](../interfaces/ProviderBondManifest.md)[] ## Parameters ### state [`ProviderBondRegistryState`](../interfaces/ProviderBondRegistryState.md) ### serviceType `string` ## Returns [`ProviderBondManifest`](../interfaces/ProviderBondManifest.md)[] --- ## Page: listRiskyProviders URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/listRiskyProviders [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / listRiskyProviders # Function: listRiskyProviders() > **listRiskyProviders**(`state`, `threshold`): [`ProviderBondManifest`](../interfaces/ProviderBondManifest.md)[] ## Parameters ### state [`ProviderBondRegistryState`](../interfaces/ProviderBondRegistryState.md) ### threshold `number` ## Returns [`ProviderBondManifest`](../interfaces/ProviderBondManifest.md)[] --- ## Page: parseProviderBondRecord URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/parseProviderBondRecord [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / parseProviderBondRecord # Function: parseProviderBondRecord() > **parseProviderBondRecord**\<`T`\>(`json`): `T` ## Type Parameters ### T `T` = `unknown` ## Parameters ### json `string` ## Returns `T` --- ## Page: parseProviderBondState URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/parseProviderBondState [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / parseProviderBondState # Function: parseProviderBondState() > **parseProviderBondState**\<`T`\>(`json`): `T` ## Type Parameters ### T `T` = `unknown` ## Parameters ### json `string` ## Returns `T` --- ## Page: rankProvidersByPolicy URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/rankProvidersByPolicy [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / rankProvidersByPolicy # Function: rankProvidersByPolicy() > **rankProvidersByPolicy**(`matches`): [`PolicyMatch`](../interfaces/PolicyMatch.md)[] ## Parameters ### matches [`PolicyMatch`](../interfaces/PolicyMatch.md)[] ## Returns [`PolicyMatch`](../interfaces/PolicyMatch.md)[] --- ## Page: recordHeartbeat URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/recordHeartbeat [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / recordHeartbeat # Function: recordHeartbeat() > **recordHeartbeat**(`providerId`, `now?`): [`ProbeResult`](../interfaces/ProbeResult.md) ## Parameters ### providerId `string` ### now? `number` ## Returns [`ProbeResult`](../interfaces/ProbeResult.md) --- ## Page: recordIncident URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/recordIncident [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / recordIncident # Function: recordIncident() > **recordIncident**(`params`): [`IncidentRecord`](../interfaces/IncidentRecord.md) ## Parameters ### params [`RecordIncidentParams`](../interfaces/RecordIncidentParams.md) ## Returns [`IncidentRecord`](../interfaces/IncidentRecord.md) --- ## Page: recordProbe URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/recordProbe [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / recordProbe # Function: recordProbe() > **recordProbe**(`params`): [`ProbeResult`](../interfaces/ProbeResult.md) ## Parameters ### params [`RecordProbeParams`](../interfaces/RecordProbeParams.md) ## Returns [`ProbeResult`](../interfaces/ProbeResult.md) --- ## Page: recordProviderIncident URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/recordProviderIncident [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / recordProviderIncident # Function: recordProviderIncident() > **recordProviderIncident**(`state`, `providerId`, `incident`): [`ProviderBondRegistryState`](../interfaces/ProviderBondRegistryState.md) ## Parameters ### state [`ProviderBondRegistryState`](../interfaces/ProviderBondRegistryState.md) ### providerId `string` ### incident [`IncidentRecord`](../interfaces/IncidentRecord.md) ## Returns [`ProviderBondRegistryState`](../interfaces/ProviderBondRegistryState.md) --- ## Page: recordProviderProbe URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/recordProviderProbe [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / recordProviderProbe # Function: recordProviderProbe() > **recordProviderProbe**(`state`, `providerId`, `probe`): [`ProviderBondRegistryState`](../interfaces/ProviderBondRegistryState.md) ## Parameters ### state [`ProviderBondRegistryState`](../interfaces/ProviderBondRegistryState.md) ### providerId `string` ### probe [`ProbeResult`](../interfaces/ProbeResult.md) ## Returns [`ProviderBondRegistryState`](../interfaces/ProviderBondRegistryState.md) --- ## Page: registerProvider URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/registerProvider [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / registerProvider # Function: registerProvider() > **registerProvider**(`state`, `manifest`): [`ProviderBondRegistryState`](../interfaces/ProviderBondRegistryState.md) ## Parameters ### state [`ProviderBondRegistryState`](../interfaces/ProviderBondRegistryState.md) ### manifest [`ProviderBondManifest`](../interfaces/ProviderBondManifest.md) ## Returns [`ProviderBondRegistryState`](../interfaces/ProviderBondRegistryState.md) --- ## Page: rejectIncident URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/rejectIncident [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / rejectIncident # Function: rejectIncident() > **rejectIncident**(`incident`, `reason`, `now?`): [`IncidentRecord`](../interfaces/IncidentRecord.md) ## Parameters ### incident [`IncidentRecord`](../interfaces/IncidentRecord.md) ### reason `string` ### now? `number` ## Returns [`IncidentRecord`](../interfaces/IncidentRecord.md) --- ## Page: resolveIncident URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/resolveIncident [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / resolveIncident # Function: resolveIncident() > **resolveIncident**(`incident`, `now?`): [`IncidentRecord`](../interfaces/IncidentRecord.md) ## Parameters ### incident [`IncidentRecord`](../interfaces/IncidentRecord.md) ### now? `number` ## Returns [`IncidentRecord`](../interfaces/IncidentRecord.md) --- ## Page: serializeProviderBondRecord URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/serializeProviderBondRecord [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / serializeProviderBondRecord # Function: serializeProviderBondRecord() > **serializeProviderBondRecord**(`record`): `string` ## Parameters ### record `unknown` ## Returns `string` --- ## Page: serializeProviderBondState URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/serializeProviderBondState [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / serializeProviderBondState # Function: serializeProviderBondState() > **serializeProviderBondState**(`state`): `string` ## Parameters ### state `unknown` ## Returns `string` --- ## Page: updateProviderManifest URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/updateProviderManifest [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / updateProviderManifest # Function: updateProviderManifest() > **updateProviderManifest**(`state`, `manifest`): [`ProviderBondRegistryState`](../interfaces/ProviderBondRegistryState.md) ## Parameters ### state [`ProviderBondRegistryState`](../interfaces/ProviderBondRegistryState.md) ### manifest [`ProviderBondManifest`](../interfaces/ProviderBondManifest.md) ## Returns [`ProviderBondRegistryState`](../interfaces/ProviderBondRegistryState.md) --- ## Page: updateProviderScore URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/updateProviderScore [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / updateProviderScore # Function: updateProviderScore() > **updateProviderScore**(`state`, `providerId`, `score`): [`ProviderBondRegistryState`](../interfaces/ProviderBondRegistryState.md) ## Parameters ### state [`ProviderBondRegistryState`](../interfaces/ProviderBondRegistryState.md) ### providerId `string` ### score [`ProviderScore`](../interfaces/ProviderScore.md) ## Returns [`ProviderBondRegistryState`](../interfaces/ProviderBondRegistryState.md) --- ## Page: verifyBondProof URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/verifyBondProof [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / verifyBondProof # Function: verifyBondProof() > **verifyBondProof**(`proof`, `verifier?`): [`ProviderBondVerifyResult`](../interfaces/ProviderBondVerifyResult.md) ## Parameters ### proof [`BondProofRef`](../interfaces/BondProofRef.md) ### verifier? [`BondProofVerifier`](../interfaces/BondProofVerifier.md) ## Returns [`ProviderBondVerifyResult`](../interfaces/ProviderBondVerifyResult.md) --- ## Page: verifyBondStack URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/verifyBondStack [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / verifyBondStack # Function: verifyBondStack() > **verifyBondStack**(`params`): [`ProviderBondVerifyResult`](../interfaces/ProviderBondVerifyResult.md) ## Parameters ### params [`VerifyBondStackParams`](../interfaces/VerifyBondStackParams.md) ## Returns [`ProviderBondVerifyResult`](../interfaces/ProviderBondVerifyResult.md) --- ## Page: verifyProviderBondAddresses URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/verifyProviderBondAddresses [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / verifyProviderBondAddresses # Function: verifyProviderBondAddresses() > **verifyProviderBondAddresses**(`params`): [`ProviderBondVerifyResult`](../interfaces/ProviderBondVerifyResult.md) ## Parameters ### params [`VerifyProviderBondAddressesParams`](../interfaces/VerifyProviderBondAddressesParams.md) ## Returns [`ProviderBondVerifyResult`](../interfaces/ProviderBondVerifyResult.md) --- ## Page: verifyProviderBondManifest URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/verifyProviderBondManifest [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / verifyProviderBondManifest # Function: verifyProviderBondManifest() > **verifyProviderBondManifest**(`params`): [`ProviderBondVerifyResult`](../interfaces/ProviderBondVerifyResult.md) ## Parameters ### params [`VerifyProviderBondManifestParams`](../interfaces/VerifyProviderBondManifestParams.md) ## Returns [`ProviderBondVerifyResult`](../interfaces/ProviderBondVerifyResult.md) --- ## Page: verifyProviderManifestIdentity URL: https://docs.totem.ing/api/totemsdk-provider-bond/functions/verifyProviderManifestIdentity [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / verifyProviderManifestIdentity # Function: verifyProviderManifestIdentity() > **verifyProviderManifestIdentity**(`params`): [`ProviderBondVerifyResult`](../interfaces/ProviderBondVerifyResult.md) ## Parameters ### params [`VerifyProviderManifestIdentityParams`](../interfaces/VerifyProviderManifestIdentityParams.md) ## Returns [`ProviderBondVerifyResult`](../interfaces/ProviderBondVerifyResult.md) --- ## Page: AssertProviderControlsAddressParams URL: https://docs.totem.ing/api/totemsdk-provider-bond/interfaces/AssertProviderControlsAddressParams [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / AssertProviderControlsAddressParams # Interface: AssertProviderControlsAddressParams ## Properties ### address > **address**: `string` *** ### identityGraph > **identityGraph**: `unknown` *** ### manifest > **manifest**: [`ProviderBondManifest`](ProviderBondManifest.md) --- ## Page: BindProviderManifestToIdentityParams URL: https://docs.totem.ing/api/totemsdk-provider-bond/interfaces/BindProviderManifestToIdentityParams [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / BindProviderManifestToIdentityParams # Interface: BindProviderManifestToIdentityParams ## Properties ### identityGraph > **identityGraph**: `unknown` *** ### manifest > **manifest**: [`ProviderBondManifest`](ProviderBondManifest.md) --- ## Page: BondProofRef URL: https://docs.totem.ing/api/totemsdk-provider-bond/interfaces/BondProofRef [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / BondProofRef # Interface: BondProofRef ## Properties ### amount? > `optional` **amount?**: `bigint` *** ### asset > **asset**: `string` *** ### bondId > **bondId**: `string` *** ### createdAt? > `optional` **createdAt?**: `number` *** ### expiresAt? > `optional` **expiresAt?**: `number` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### proof? > `optional` **proof?**: `unknown` *** ### proofId > **proofId**: `string` *** ### proofType > **proofType**: [`BondProofType`](../type-aliases/BondProofType.md) *** ### providerId > **providerId**: `string` --- ## Page: BondProofVerifier URL: https://docs.totem.ing/api/totemsdk-provider-bond/interfaces/BondProofVerifier [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / BondProofVerifier # Interface: BondProofVerifier ## Methods ### verify() > **verify**(`proof`): `Promise`\<[`ProviderBondVerifyResult`](ProviderBondVerifyResult.md)\> #### Parameters ##### proof [`BondProofRef`](BondProofRef.md) #### Returns `Promise`\<[`ProviderBondVerifyResult`](ProviderBondVerifyResult.md)\> --- ## Page: BondStatusContext URL: https://docs.totem.ing/api/totemsdk-provider-bond/interfaces/BondStatusContext [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / BondStatusContext # Interface: BondStatusContext ## Properties ### currentHeight? > `optional` **currentHeight?**: `bigint` *** ### expiringThresholdBlocks? > `optional` **expiringThresholdBlocks?**: `bigint` *** ### now? > `optional` **now?**: `number` --- ## Page: ComputeProviderScoreParams URL: https://docs.totem.ing/api/totemsdk-provider-bond/interfaces/ComputeProviderScoreParams [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / ComputeProviderScoreParams # Interface: ComputeProviderScoreParams ## Properties ### bondProofs? > `optional` **bondProofs?**: [`BondProofRef`](BondProofRef.md)[] *** ### currentHeight? > `optional` **currentHeight?**: `bigint` *** ### incidents? > `optional` **incidents?**: [`IncidentRecord`](IncidentRecord.md)[] *** ### now? > `optional` **now?**: `number` *** ### probes? > `optional` **probes?**: [`ProbeResult`](ProbeResult.md)[] *** ### provider > **provider**: [`ProviderBondManifest`](ProviderBondManifest.md) *** ### weights? > `optional` **weights?**: [`ProviderScoringWeights`](ProviderScoringWeights.md) --- ## Page: CreateProviderBondManifestParams URL: https://docs.totem.ing/api/totemsdk-provider-bond/interfaces/CreateProviderBondManifestParams [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / CreateProviderBondManifestParams # Interface: CreateProviderBondManifestParams ## Properties ### edgeService > **edgeService**: `EdgeServiceManifest` *** ### providerBond > **providerBond**: [`ProviderBondExtension`](ProviderBondExtension.md) *** ### signedEdgeService? > `optional` **signedEdgeService?**: `SignedManifest`\<`EdgeServiceManifest`\> --- ## Page: DurableProviderBondStore URL: https://docs.totem.ing/api/totemsdk-provider-bond/interfaces/DurableProviderBondStore [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / DurableProviderBondStore # Interface: DurableProviderBondStore ## Methods ### attachBondProof() > **attachBondProof**(`providerId`, `proof`): `Promise`\<`void`\> #### Parameters ##### providerId `string` ##### proof [`BondProofRef`](BondProofRef.md) #### Returns `Promise`\<`void`\> *** ### getProvider() > **getProvider**(`providerId`): `Promise`\<[`ProviderBondManifest`](ProviderBondManifest.md) \| `undefined`\> #### Parameters ##### providerId `string` #### Returns `Promise`\<[`ProviderBondManifest`](ProviderBondManifest.md) \| `undefined`\> *** ### getRevision() > **getRevision**(): `Promise`\<`number`\> Current registry transition counter (0 before the first write). #### Returns `Promise`\<`number`\> *** ### getSnapshot() > **getSnapshot**(): `Promise`\<[`ProviderBondRegistryState`](ProviderBondRegistryState.md)\> #### Returns `Promise`\<[`ProviderBondRegistryState`](ProviderBondRegistryState.md)\> *** ### hasState() > **hasState**(): `Promise`\<`boolean`\> True once any registry record has been persisted. #### Returns `Promise`\<`boolean`\> *** ### listOfflineProviders() > **listOfflineProviders**(`maxHeartbeatAgeMs`, `now`): `Promise`\<[`ProviderBondManifest`](ProviderBondManifest.md)[]\> #### Parameters ##### maxHeartbeatAgeMs `number` ##### now `number` #### Returns `Promise`\<[`ProviderBondManifest`](ProviderBondManifest.md)[]\> *** ### listProviders() > **listProviders**(): `Promise`\<[`ProviderBondManifest`](ProviderBondManifest.md)[]\> #### Returns `Promise`\<[`ProviderBondManifest`](ProviderBondManifest.md)[]\> *** ### listProvidersByServiceType() > **listProvidersByServiceType**(`serviceType`): `Promise`\<[`ProviderBondManifest`](ProviderBondManifest.md)[]\> #### Parameters ##### serviceType `string` #### Returns `Promise`\<[`ProviderBondManifest`](ProviderBondManifest.md)[]\> *** ### listRiskyProviders() > **listRiskyProviders**(`threshold`): `Promise`\<[`ProviderBondManifest`](ProviderBondManifest.md)[]\> #### Parameters ##### threshold `number` #### Returns `Promise`\<[`ProviderBondManifest`](ProviderBondManifest.md)[]\> *** ### recordIncident() > **recordIncident**(`providerId`, `incident`): `Promise`\<`void`\> #### Parameters ##### providerId `string` ##### incident [`IncidentRecord`](IncidentRecord.md) #### Returns `Promise`\<`void`\> *** ### recordProbe() > **recordProbe**(`providerId`, `probe`): `Promise`\<`void`\> #### Parameters ##### providerId `string` ##### probe [`ProbeResult`](ProbeResult.md) #### Returns `Promise`\<`void`\> *** ### registerProvider() > **registerProvider**(`manifest`): `Promise`\<`void`\> #### Parameters ##### manifest [`ProviderBondManifest`](ProviderBondManifest.md) #### Returns `Promise`\<`void`\> *** ### updateProviderManifest() > **updateProviderManifest**(`manifest`): `Promise`\<`void`\> #### Parameters ##### manifest [`ProviderBondManifest`](ProviderBondManifest.md) #### Returns `Promise`\<`void`\> *** ### updateScore() > **updateScore**(`providerId`, `score`): `Promise`\<`void`\> #### Parameters ##### providerId `string` ##### score [`ProviderScore`](ProviderScore.md) #### Returns `Promise`\<`void`\> --- ## Page: DurableProviderBondStoreOptions URL: https://docs.totem.ing/api/totemsdk-provider-bond/interfaces/DurableProviderBondStoreOptions [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / DurableProviderBondStoreOptions # Interface: DurableProviderBondStoreOptions ## Properties ### namespace? > `readonly` `optional` **namespace?**: `string` Key namespace prefix; default `totem_bond:v1:`. *** ### requireAckMode? > `readonly` `optional` **requireAckMode?**: `"volatile"` \| `"buffered"` \| `"durably-acknowledged"` Required write acknowledgment; default `durably-acknowledged`. Pass `volatile` only for tests/scratch adapters (e.g. `MemoryStore`). --- ## Page: IncidentRecord URL: https://docs.totem.ing/api/totemsdk-provider-bond/interfaces/IncidentRecord [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / IncidentRecord # Interface: IncidentRecord ## Properties ### createdAt > **createdAt**: `number` *** ### incidentId > **incidentId**: `string` *** ### message? > `optional` **message?**: `string` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### providerId > **providerId**: `string` *** ### resolvedAt? > `optional` **resolvedAt?**: `number` *** ### severity > **severity**: [`IncidentSeverity`](../type-aliases/IncidentSeverity.md) *** ### status > **status**: [`IncidentStatus`](../type-aliases/IncidentStatus.md) *** ### type > **type**: [`IncidentType`](../type-aliases/IncidentType.md) --- ## Page: IncidentSummary URL: https://docs.totem.ing/api/totemsdk-provider-bond/interfaces/IncidentSummary [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / IncidentSummary # Interface: IncidentSummary ## Properties ### critical > **critical**: `number` *** ### high > **high**: `number` *** ### lastIncidentAt? > `optional` **lastIncidentAt?**: `number` *** ### low > **low**: `number` *** ### medium > **medium**: `number` *** ### open > **open**: `number` *** ### total > **total**: `number` --- ## Page: PolicyMatch URL: https://docs.totem.ing/api/totemsdk-provider-bond/interfaces/PolicyMatch [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / PolicyMatch # Interface: PolicyMatch ## Properties ### failures > **failures**: `string`[] *** ### matched > **matched**: `boolean` *** ### provider > **provider**: [`ProviderBondManifest`](ProviderBondManifest.md) *** ### providerId > **providerId**: `string` *** ### reasons > **reasons**: `string`[] *** ### score? > `optional` **score?**: [`ProviderScore`](ProviderScore.md) --- ## Page: ProbeResult URL: https://docs.totem.ing/api/totemsdk-provider-bond/interfaces/ProbeResult [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / ProbeResult # Interface: ProbeResult ## Properties ### latencyMs? > `optional` **latencyMs?**: `number` *** ### message? > `optional` **message?**: `string` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### observedAt > **observedAt**: `number` *** ### ok > **ok**: `boolean` *** ### probeId > **probeId**: `string` *** ### providerId > **providerId**: `string` *** ### type > **type**: [`ProbeType`](../type-aliases/ProbeType.md) --- ## Page: ProviderBondAssetDeclaration URL: https://docs.totem.ing/api/totemsdk-provider-bond/interfaces/ProviderBondAssetDeclaration [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / ProviderBondAssetDeclaration # Interface: ProviderBondAssetDeclaration ## Properties ### amount > **amount**: `bigint` *** ### asset > **asset**: `string` *** ### bondId > **bondId**: `string` *** ### createdAt? > `optional` **createdAt?**: `number` *** ### expiresAtBlock? > `optional` **expiresAtBlock?**: `bigint` *** ### lockType > **lockType**: [`BondLockType`](../type-aliases/BondLockType.md) *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### purpose > **purpose**: [`BondPurpose`](../type-aliases/BondPurpose.md) *** ### status > **status**: [`BondStatus`](../type-aliases/BondStatus.md) --- ## Page: ProviderBondExtension URL: https://docs.totem.ing/api/totemsdk-provider-bond/interfaces/ProviderBondExtension [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / ProviderBondExtension # Interface: ProviderBondExtension ## Properties ### bondId? > `optional` **bondId?**: `string` *** ### bondOwnerAddress? > `optional` **bondOwnerAddress?**: `string` *** ### bondProofs? > `optional` **bondProofs?**: [`BondProofRef`](BondProofRef.md)[] *** ### bondRecoveryAddress? > `optional` **bondRecoveryAddress?**: `string` *** ### bondStack? > `optional` **bondStack?**: [`ProviderBondAssetDeclaration`](ProviderBondAssetDeclaration.md)[] *** ### extensionHash? > `optional` **extensionHash?**: `string` *** ### incidentSignerAddress? > `optional` **incidentSignerAddress?**: `string` *** ### incidentSummary? > `optional` **incidentSummary?**: [`IncidentSummary`](IncidentSummary.md) *** ### liquidityBondRefs? > `optional` **liquidityBondRefs?**: `string`[] *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### probeSignerAddress? > `optional` **probeSignerAddress?**: `string` *** ### providerId > **providerId**: `string` *** ### score? > `optional` **score?**: [`ProviderScore`](ProviderScore.md) *** ### scoreSignerAddress? > `optional` **scoreSignerAddress?**: `string` --- ## Page: ProviderBondManifest URL: https://docs.totem.ing/api/totemsdk-provider-bond/interfaces/ProviderBondManifest [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / ProviderBondManifest # Interface: ProviderBondManifest ## Properties ### edgeService > **edgeService**: `EdgeServiceManifest` *** ### edgeServiceManifestId > **edgeServiceManifestId**: `string` *** ### providerBond > **providerBond**: [`ProviderBondExtension`](ProviderBondExtension.md) *** ### signedEdgeService? > `optional` **signedEdgeService?**: `SignedManifest`\<`EdgeServiceManifest`\> --- ## Page: ProviderBondRegistryState URL: https://docs.totem.ing/api/totemsdk-provider-bond/interfaces/ProviderBondRegistryState [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / ProviderBondRegistryState # Interface: ProviderBondRegistryState ## Properties ### bondProofs > **bondProofs**: `Record`\<`string`, [`BondProofRef`](BondProofRef.md)[]\> *** ### incidents > **incidents**: `Record`\<`string`, [`IncidentRecord`](IncidentRecord.md)[]\> *** ### probes > **probes**: `Record`\<`string`, [`ProbeResult`](ProbeResult.md)[]\> *** ### providers > **providers**: `Record`\<`string`, [`ProviderBondManifest`](ProviderBondManifest.md)\> *** ### scores > **scores**: `Record`\<`string`, [`ProviderScore`](ProviderScore.md)\> *** ### updatedAt? > `optional` **updatedAt?**: `number` --- ## Page: ProviderBondVerifyResult URL: https://docs.totem.ing/api/totemsdk-provider-bond/interfaces/ProviderBondVerifyResult [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / ProviderBondVerifyResult # Interface: ProviderBondVerifyResult ## Properties ### code? > `optional` **code?**: `string` *** ### ok > **ok**: `boolean` *** ### reason? > `optional` **reason?**: `string` *** ### requiresLiveVerifier? > `optional` **requiresLiveVerifier?**: `boolean` --- ## Page: ProviderPolicy URL: https://docs.totem.ing/api/totemsdk-provider-bond/interfaces/ProviderPolicy [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / ProviderPolicy # Interface: ProviderPolicy ## Properties ### acceptedAssets? > `optional` **acceptedAssets?**: `string`[] *** ### acceptedPurposes? > `optional` **acceptedPurposes?**: [`BondPurpose`](../type-aliases/BondPurpose.md)[] *** ### maxHeartbeatAgeMs? > `optional` **maxHeartbeatAgeMs?**: `number` *** ### maxIncidentSeverity? > `optional` **maxIncidentSeverity?**: [`IncidentSeverity`](../type-aliases/IncidentSeverity.md) *** ### minBondAmount? > `optional` **minBondAmount?**: `bigint` *** ### minScore? > `optional` **minScore?**: `number` *** ### now? > `optional` **now?**: `number` *** ### requireActiveBond? > `optional` **requireActiveBond?**: `boolean` *** ### requireIdentity? > `optional` **requireIdentity?**: `boolean` *** ### requireMinimaHardCollateral? > `optional` **requireMinimaHardCollateral?**: `boolean` *** ### serviceType? > `optional` **serviceType?**: `string` --- ## Page: ProviderScore URL: https://docs.totem.ing/api/totemsdk-provider-bond/interfaces/ProviderScore [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / ProviderScore # Interface: ProviderScore ## Properties ### bondScore > **bondScore**: `number` *** ### computedAt > **computedAt**: `number` *** ### identityScore > **identityScore**: `number` *** ### incidentScore > **incidentScore**: `number` *** ### providerId > **providerId**: `string` *** ### reasons > **reasons**: `string`[] *** ### recommendation > **recommendation**: [`ProviderRecommendation`](../type-aliases/ProviderRecommendation.md) *** ### reliabilityScore > **reliabilityScore**: `number` *** ### score > **score**: `number` --- ## Page: ProviderScoringWeights URL: https://docs.totem.ing/api/totemsdk-provider-bond/interfaces/ProviderScoringWeights [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / ProviderScoringWeights # Interface: ProviderScoringWeights ## Properties ### bond > **bond**: `number` *** ### identity > **identity**: `number` *** ### incidents > **incidents**: `number` *** ### reliability > **reliability**: `number` --- ## Page: RecordIncidentParams URL: https://docs.totem.ing/api/totemsdk-provider-bond/interfaces/RecordIncidentParams [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / RecordIncidentParams # Interface: RecordIncidentParams ## Properties ### message? > `optional` **message?**: `string` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### now? > `optional` **now?**: `number` *** ### providerId > **providerId**: `string` *** ### severity > **severity**: [`IncidentSeverity`](../type-aliases/IncidentSeverity.md) *** ### type > **type**: [`IncidentType`](../type-aliases/IncidentType.md) --- ## Page: RecordProbeParams URL: https://docs.totem.ing/api/totemsdk-provider-bond/interfaces/RecordProbeParams [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / RecordProbeParams # Interface: RecordProbeParams ## Properties ### latencyMs? > `optional` **latencyMs?**: `number` *** ### message? > `optional` **message?**: `string` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### now? > `optional` **now?**: `number` *** ### ok > **ok**: `boolean` *** ### providerId > **providerId**: `string` *** ### type > **type**: [`ProbeType`](../type-aliases/ProbeType.md) --- ## Page: VerifyBondStackParams URL: https://docs.totem.ing/api/totemsdk-provider-bond/interfaces/VerifyBondStackParams [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / VerifyBondStackParams # Interface: VerifyBondStackParams ## Properties ### bondProofs? > `optional` **bondProofs?**: [`BondProofRef`](BondProofRef.md)[] *** ### bondStack > **bondStack**: [`ProviderBondAssetDeclaration`](ProviderBondAssetDeclaration.md)[] *** ### verifier? > `optional` **verifier?**: [`BondProofVerifier`](BondProofVerifier.md) --- ## Page: VerifyProviderBondAddressesParams URL: https://docs.totem.ing/api/totemsdk-provider-bond/interfaces/VerifyProviderBondAddressesParams [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / VerifyProviderBondAddressesParams # Interface: VerifyProviderBondAddressesParams ## Properties ### identityGraph > **identityGraph**: `unknown` *** ### manifest > **manifest**: [`ProviderBondManifest`](ProviderBondManifest.md) --- ## Page: VerifyProviderBondManifestParams URL: https://docs.totem.ing/api/totemsdk-provider-bond/interfaces/VerifyProviderBondManifestParams [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / VerifyProviderBondManifestParams # Interface: VerifyProviderBondManifestParams ## Properties ### identityGraph? > `optional` **identityGraph?**: `unknown` *** ### manifest > **manifest**: [`ProviderBondManifest`](ProviderBondManifest.md) *** ### now? > `optional` **now?**: `number` --- ## Page: VerifyProviderManifestIdentityParams URL: https://docs.totem.ing/api/totemsdk-provider-bond/interfaces/VerifyProviderManifestIdentityParams [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / VerifyProviderManifestIdentityParams # Interface: VerifyProviderManifestIdentityParams ## Properties ### identityGraph > **identityGraph**: `unknown` *** ### manifest > **manifest**: [`ProviderBondManifest`](ProviderBondManifest.md) --- ## Page: BondAsset URL: https://docs.totem.ing/api/totemsdk-provider-bond/type-aliases/BondAsset [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / BondAsset # Type Alias: BondAsset > **BondAsset** = `"MINIMA"` \| `"TOTEM"` \| `string` --- ## Page: BondLockType URL: https://docs.totem.ing/api/totemsdk-provider-bond/type-aliases/BondLockType [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / BondLockType # Type Alias: BondLockType > **BondLockType** = `"manual-attestation"` \| `"visible-balance"` \| `"declared-reserve"` \| `"future-l1-lock"` \| `"future-covenant"` --- ## Page: BondProofType URL: https://docs.totem.ing/api/totemsdk-provider-bond/type-aliases/BondProofType [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / BondProofType # Type Alias: BondProofType > **BondProofType** = `"manual"` \| `"declared"` \| `"visible-balance"` \| `"totem-proof"` \| `"future-live-chain"` --- ## Page: BondPurpose URL: https://docs.totem.ing/api/totemsdk-provider-bond/type-aliases/BondPurpose [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / BondPurpose # Type Alias: BondPurpose > **BondPurpose** = `"hard-collateral"` \| `"service-level"` \| `"reputation"` \| `"governance"` \| `"marketplace-access"` \| `"dispute-bond"` \| `"grant-accountability"` \| `"app-specific"` \| `"community-specific"` --- ## Page: BondStatus URL: https://docs.totem.ing/api/totemsdk-provider-bond/type-aliases/BondStatus [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / BondStatus # Type Alias: BondStatus > **BondStatus** = `"declared"` \| `"pending"` \| `"active"` \| `"expiring"` \| `"expired"` \| `"invalid"` \| `"disputed"` --- ## Page: IncidentSeverity URL: https://docs.totem.ing/api/totemsdk-provider-bond/type-aliases/IncidentSeverity [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / IncidentSeverity # Type Alias: IncidentSeverity > **IncidentSeverity** = `"low"` \| `"medium"` \| `"high"` \| `"critical"` --- ## Page: IncidentStatus URL: https://docs.totem.ing/api/totemsdk-provider-bond/type-aliases/IncidentStatus [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / IncidentStatus # Type Alias: IncidentStatus > **IncidentStatus** = `"open"` \| `"acknowledged"` \| `"resolved"` \| `"rejected"` --- ## Page: IncidentType URL: https://docs.totem.ing/api/totemsdk-provider-bond/type-aliases/IncidentType [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / IncidentType # Type Alias: IncidentType > **IncidentType** = `"downtime"` \| `"high-latency"` \| `"failed-probe"` \| `"invalid-response"` \| `"invalid-bond-proof"` \| `"manual-dispute"` --- ## Page: ProbeType URL: https://docs.totem.ing/api/totemsdk-provider-bond/type-aliases/ProbeType [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / ProbeType # Type Alias: ProbeType > **ProbeType** = `"heartbeat"` \| `"endpoint"` \| `"latency"` \| `"service-capability"` \| `"bond-proof-freshness"` \| `"manual-observation"` --- ## Page: ProviderBondVerifyCode URL: https://docs.totem.ing/api/totemsdk-provider-bond/type-aliases/ProviderBondVerifyCode [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / ProviderBondVerifyCode # Type Alias: ProviderBondVerifyCode > **ProviderBondVerifyCode** = `"OK"` \| `"MANIFEST_SIGNATURE_INVALID"` \| `"MANIFEST_EXPIRED"` \| `"IDENTITY_NOT_AUTHORISED"` \| `"IDENTITY_REVOKED"` \| `"IDENTITY_EXPIRED"` \| `"BOND_EXTENSION_HASH_MISMATCH"` \| `"BOND_OWNER_NOT_AUTHORISED"` \| `"BOND_RECOVERY_NOT_AUTHORISED"` \| `"PROBE_SIGNER_NOT_AUTHORISED"` \| `"INCIDENT_SIGNER_NOT_AUTHORISED"` \| `"SCORE_SIGNER_NOT_AUTHORISED"` \| `"BOND_PROOF_INVALID"` \| `"BOND_AMOUNT_INSUFFICIENT"` \| `"BOND_ASSET_NOT_ACCEPTED"` \| `"BOND_PURPOSE_NOT_ACCEPTED"` \| `"REQUIRES_LIVE_VERIFIER"` \| `"UNSUPPORTED_PROOF_TYPE"` --- ## Page: ProviderRecommendation URL: https://docs.totem.ing/api/totemsdk-provider-bond/type-aliases/ProviderRecommendation [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / ProviderRecommendation # Type Alias: ProviderRecommendation > **ProviderRecommendation** = `"recommended"` \| `"acceptable"` \| `"risky"` \| `"avoid"` \| `"offline"` \| `"unbonded"` \| `"expired"` --- ## Page: DEFAULT_MINIMA_TOKEN_ID URL: https://docs.totem.ing/api/totemsdk-provider-bond/variables/DEFAULT_MINIMA_TOKEN_ID [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / DEFAULT\_MINIMA\_TOKEN\_ID # Variable: DEFAULT\_MINIMA\_TOKEN\_ID > `const` **DEFAULT\_MINIMA\_TOKEN\_ID**: `"0x00"` = `'0x00'` --- ## Page: DEFAULT_PROVIDER_SCORING_WEIGHTS URL: https://docs.totem.ing/api/totemsdk-provider-bond/variables/DEFAULT_PROVIDER_SCORING_WEIGHTS [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / DEFAULT\_PROVIDER\_SCORING\_WEIGHTS # Variable: DEFAULT\_PROVIDER\_SCORING\_WEIGHTS > `const` **DEFAULT\_PROVIDER\_SCORING\_WEIGHTS**: `object` ## Type Declaration ### bond > `readonly` **bond**: `0.3` = `0.30` ### identity > `readonly` **identity**: `0.25` = `0.25` ### incidents > `readonly` **incidents**: `0.15` = `0.15` ### reliability > `readonly` **reliability**: `0.3` = `0.30` --- ## Page: PROVIDER_BOND_TOPIC_PREFIX URL: https://docs.totem.ing/api/totemsdk-provider-bond/variables/PROVIDER_BOND_TOPIC_PREFIX [**@totemsdk/provider-bond**](../index.md) *** [@totemsdk/provider-bond](../index.md) / PROVIDER\_BOND\_TOPIC\_PREFIX # Variable: PROVIDER\_BOND\_TOPIC\_PREFIX > `const` **PROVIDER\_BOND\_TOPIC\_PREFIX**: `"totem.provider-bond.v1"` = `'totem.provider-bond.v1'` --- ## Page: EventEmitterTransport URL: https://docs.totem.ing/api/totemsdk-pubsub-transport/classes/EventEmitterTransport [**@totemsdk/pubsub-transport**](../index.md) *** [@totemsdk/pubsub-transport](../index.md) / EventEmitterTransport # Class: EventEmitterTransport In-process pub/sub transport backed by a Node.js EventEmitter. Useful for wiring together components in the same process without a broker. Two EventEmitterTransport instances sharing the same `bus` EventEmitter form a bidirectional pub/sub channel: what one publishes, the other receives. ## Implements - [`IPubSubTransport`](../interfaces/IPubSubTransport.md) ## Constructors ### Constructor > **new EventEmitterTransport**(`bus?`): `EventEmitterTransport` #### Parameters ##### bus? `EventEmitter`\<`DefaultEventMap`\> #### Returns `EventEmitterTransport` ## Accessors ### bus #### Get Signature > **get** **bus**(): `EventEmitter` ##### Returns `EventEmitter` ## Methods ### connect() > **connect**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> #### Implementation of [`IPubSubTransport`](../interfaces/IPubSubTransport.md).[`connect`](../interfaces/IPubSubTransport.md#connect) *** ### disconnect() > **disconnect**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> #### Implementation of [`IPubSubTransport`](../interfaces/IPubSubTransport.md).[`disconnect`](../interfaces/IPubSubTransport.md#disconnect) *** ### onMessage() > **onMessage**(`handler`): () => `void` #### Parameters ##### handler (`message`) => `void` #### Returns () => `void` #### Implementation of [`IPubSubTransport`](../interfaces/IPubSubTransport.md).[`onMessage`](../interfaces/IPubSubTransport.md#onmessage) *** ### publish() > **publish**(`topic`, `payload`): `Promise`\<`void`\> #### Parameters ##### topic `string` ##### payload `string` \| `Uint8Array`\<`ArrayBufferLike`\> #### Returns `Promise`\<`void`\> #### Implementation of [`IPubSubTransport`](../interfaces/IPubSubTransport.md).[`publish`](../interfaces/IPubSubTransport.md#publish) *** ### subscribe() > **subscribe**(`topic`): `Promise`\<[`PubSubSubscription`](../interfaces/PubSubSubscription.md)\> #### Parameters ##### topic `string` #### Returns `Promise`\<[`PubSubSubscription`](../interfaces/PubSubSubscription.md)\> #### Implementation of [`IPubSubTransport`](../interfaces/IPubSubTransport.md).[`subscribe`](../interfaces/IPubSubTransport.md#subscribe) --- ## Page: MockPubSubTransport URL: https://docs.totem.ing/api/totemsdk-pubsub-transport/classes/MockPubSubTransport [**@totemsdk/pubsub-transport**](../index.md) *** [@totemsdk/pubsub-transport](../index.md) / MockPubSubTransport # Class: MockPubSubTransport Mock pub/sub transport for unit tests. Records all published messages and supports manual message injection. ## Implements - [`IPubSubTransport`](../interfaces/IPubSubTransport.md) ## Constructors ### Constructor > **new MockPubSubTransport**(): `MockPubSubTransport` #### Returns `MockPubSubTransport` ## Properties ### connected > **connected**: `boolean` = `false` *** ### published > `readonly` **published**: `object`[] = `[]` #### payload > **payload**: `string` \| `Uint8Array`\<`ArrayBufferLike`\> #### topic > **topic**: `string` *** ### subscriptions > `readonly` **subscriptions**: `string`[] = `[]` ## Methods ### connect() > **connect**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> #### Implementation of [`IPubSubTransport`](../interfaces/IPubSubTransport.md).[`connect`](../interfaces/IPubSubTransport.md#connect) *** ### disconnect() > **disconnect**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> #### Implementation of [`IPubSubTransport`](../interfaces/IPubSubTransport.md).[`disconnect`](../interfaces/IPubSubTransport.md#disconnect) *** ### inject() > **inject**(`topic`, `payload`): `void` Inject an inbound message — useful for simulating broker delivery in tests. #### Parameters ##### topic `string` ##### payload `string` \| `Uint8Array`\<`ArrayBufferLike`\> #### Returns `void` *** ### onMessage() > **onMessage**(`handler`): () => `void` #### Parameters ##### handler (`message`) => `void` #### Returns () => `void` #### Implementation of [`IPubSubTransport`](../interfaces/IPubSubTransport.md).[`onMessage`](../interfaces/IPubSubTransport.md#onmessage) *** ### publish() > **publish**(`topic`, `payload`): `Promise`\<`void`\> #### Parameters ##### topic `string` ##### payload `string` \| `Uint8Array`\<`ArrayBufferLike`\> #### Returns `Promise`\<`void`\> #### Implementation of [`IPubSubTransport`](../interfaces/IPubSubTransport.md).[`publish`](../interfaces/IPubSubTransport.md#publish) *** ### subscribe() > **subscribe**(`topic`): `Promise`\<[`PubSubSubscription`](../interfaces/PubSubSubscription.md)\> #### Parameters ##### topic `string` #### Returns `Promise`\<[`PubSubSubscription`](../interfaces/PubSubSubscription.md)\> #### Implementation of [`IPubSubTransport`](../interfaces/IPubSubTransport.md).[`subscribe`](../interfaces/IPubSubTransport.md#subscribe) --- ## Page: createPairedEventEmitterTransports URL: https://docs.totem.ing/api/totemsdk-pubsub-transport/functions/createPairedEventEmitterTransports [**@totemsdk/pubsub-transport**](../index.md) *** [@totemsdk/pubsub-transport](../index.md) / createPairedEventEmitterTransports # Function: createPairedEventEmitterTransports() > **createPairedEventEmitterTransports**(): \[[`EventEmitterTransport`](../classes/EventEmitterTransport.md), [`EventEmitterTransport`](../classes/EventEmitterTransport.md)\] Create a bidirectional pair of EventEmitterTransports sharing one bus. What [0] publishes, [1] receives via onMessage, and vice-versa. ## Returns \[[`EventEmitterTransport`](../classes/EventEmitterTransport.md), [`EventEmitterTransport`](../classes/EventEmitterTransport.md)\] --- ## Page: IPubSubTransport URL: https://docs.totem.ing/api/totemsdk-pubsub-transport/interfaces/IPubSubTransport [**@totemsdk/pubsub-transport**](../index.md) *** [@totemsdk/pubsub-transport](../index.md) / IPubSubTransport # Interface: IPubSubTransport Canonical publish-subscribe transport interface. Modelled on MQTT semantics but transport-agnostic: - connect/disconnect — lifecycle - subscribe/publish — message exchange - onMessage — global inbound handler (returns unsubscribe fn) ## Methods ### connect() > **connect**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### disconnect() > **disconnect**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### onMessage() > **onMessage**(`handler`): () => `void` #### Parameters ##### handler (`message`) => `void` #### Returns () => `void` *** ### publish() > **publish**(`topic`, `payload`): `Promise`\<`void`\> #### Parameters ##### topic `string` ##### payload `string` \| `Uint8Array`\<`ArrayBufferLike`\> #### Returns `Promise`\<`void`\> *** ### subscribe() > **subscribe**(`topic`): `Promise`\<[`PubSubSubscription`](PubSubSubscription.md)\> #### Parameters ##### topic `string` #### Returns `Promise`\<[`PubSubSubscription`](PubSubSubscription.md)\> --- ## Page: PubSubMessage URL: https://docs.totem.ing/api/totemsdk-pubsub-transport/interfaces/PubSubMessage [**@totemsdk/pubsub-transport**](../index.md) *** [@totemsdk/pubsub-transport](../index.md) / PubSubMessage # Interface: PubSubMessage An inbound pub/sub message carrying a topic and raw payload. ## Properties ### payload > **payload**: `Uint8Array` *** ### topic > **topic**: `string` --- ## Page: PubSubSubscription URL: https://docs.totem.ing/api/totemsdk-pubsub-transport/interfaces/PubSubSubscription [**@totemsdk/pubsub-transport**](../index.md) *** [@totemsdk/pubsub-transport](../index.md) / PubSubSubscription # Interface: PubSubSubscription A live subscription returned from IPubSubTransport.subscribe(). ## Properties ### topic > **topic**: `string` ## Methods ### unsubscribe() > **unsubscribe**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> --- ## Page: MqttClientPort URL: https://docs.totem.ing/api/totemsdk-pubsub-transport/type-aliases/MqttClientPort [**@totemsdk/pubsub-transport**](../index.md) *** [@totemsdk/pubsub-transport](../index.md) / MqttClientPort # Type Alias: MqttClientPort > **MqttClientPort** = [`IPubSubTransport`](../interfaces/IPubSubTransport.md) Type alias kept for backward compatibility with @totemsdk/edge-mqtt. New code should use IPubSubTransport directly. --- ## Page: MqttMessage URL: https://docs.totem.ing/api/totemsdk-pubsub-transport/type-aliases/MqttMessage [**@totemsdk/pubsub-transport**](../index.md) *** [@totemsdk/pubsub-transport](../index.md) / MqttMessage # Type Alias: MqttMessage > **MqttMessage** = [`PubSubMessage`](../interfaces/PubSubMessage.md) Type alias for PubSubMessage (MQTT flavour). --- ## Page: asrAdapter URL: https://docs.totem.ing/api/totemsdk-qvac/functions/asrAdapter [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / asrAdapter # Function: asrAdapter() > **asrAdapter**(`provider`): [`QvacAsrOps`](../interfaces/QvacAsrOps.md) ## Parameters ### provider `IntelligenceProvider` ## Returns [`QvacAsrOps`](../interfaces/QvacAsrOps.md) --- ## Page: audiogenAdapter URL: https://docs.totem.ing/api/totemsdk-qvac/functions/audiogenAdapter [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / audiogenAdapter # Function: audiogenAdapter() > **audiogenAdapter**(`provider`): [`QvacAudiogenOps`](../interfaces/QvacAudiogenOps.md) ## Parameters ### provider `IntelligenceProvider` ## Returns [`QvacAudiogenOps`](../interfaces/QvacAudiogenOps.md) --- ## Page: classifyAdapter URL: https://docs.totem.ing/api/totemsdk-qvac/functions/classifyAdapter [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / classifyAdapter # Function: classifyAdapter() > **classifyAdapter**(`provider`): [`QvacClassifyOps`](../interfaces/QvacClassifyOps.md) ## Parameters ### provider `IntelligenceProvider` ## Returns [`QvacClassifyOps`](../interfaces/QvacClassifyOps.md) --- ## Page: createContentAccessGatedProvider URL: https://docs.totem.ing/api/totemsdk-qvac/functions/createContentAccessGatedProvider [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / createContentAccessGatedProvider # Function: createContentAccessGatedProvider() > **createContentAccessGatedProvider**(`policy`, `provider`): `IntelligenceProvider` Wrap a provider with workspace-scoped content gating (RFC-007 §5). The returned provider keeps the host provider's id/capabilities/cancel/close and forwards only gated RAG operations. Denials are returned as `POLICY_REJECTED` results — never by touching provider storage. ## Parameters ### policy [`ContentAccessPolicy`](../interfaces/ContentAccessPolicy.md) ### provider `IntelligenceProvider` ## Returns `IntelligenceProvider` ## Example ```ts const gated = createContentAccessGatedProvider( { entitlements: [{ principal: 'P1', workspaceIds: ['ws-Fleet'] }], freshnessMs: 60_000 }, createQvacIntelligenceProvider({ sdk }), ); ``` --- ## Page: createQvacIntelligenceProvider URL: https://docs.totem.ing/api/totemsdk-qvac/functions/createQvacIntelligenceProvider [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / createQvacIntelligenceProvider # Function: createQvacIntelligenceProvider() > **createQvacIntelligenceProvider**(`options?`): `object` Factory: wrap a QVAC SDK surface into an @totemsdk/intelligence provider. The SDK is injected via `options.sdk`, resolved lazily via `options.sdkLoader`, or required from the installed `@qvac/sdk` package at first use. A normal app can construct the provider with zero configuration when `@qvac/sdk` is installed; injection remains available for tests and custom runtimes. ## Parameters ### options? [`QvacProviderOptions`](../interfaces/QvacProviderOptions.md) = `{}` ## Returns ### activeRequests > `readonly` **activeRequests**: `ReadonlyMap`\<`string`, `AbortController`\> ### capabilities > `readonly` **capabilities**: `` `intelligence:${string}` ``[] ### discoverCapabilities > `readonly` **discoverCapabilities**: () => `` `intelligence:${string}` ``[] #### Returns `` `intelligence:${string}` ``[] ### displayName > `readonly` **displayName**: `string` ### id > `readonly` **id**: `string` ### isReady > `readonly` **isReady**: `boolean` ### sdk? > `readonly` `optional` **sdk?**: [`QvacSdkLike`](../interfaces/QvacSdkLike.md) ### upstreamRequestIds > `readonly` **upstreamRequestIds**: `ReadonlyMap`\<`string`, `string`\> local requestId → QVAC-side requestId captured from the SDK result. ### version > `readonly` **version**: `string` ### cancel() > **cancel**(`requestId`): `Promise`\<`IntelligenceOutcome`\<`void`\>\> #### Parameters ##### requestId `string` #### Returns `Promise`\<`IntelligenceOutcome`\<`void`\>\> ### close() > **close**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> ### invoke() > **invoke**\<`T`\>(`op`): `Promise`\<`IntelligenceOutcome`\<`T`\>\> #### Type Parameters ##### T `T` = `unknown` #### Parameters ##### op `IntelligenceOperation`\<`T`\> #### Returns `Promise`\<`IntelligenceOutcome`\<`T`\>\> ### invokeStream() > **invokeStream**(`op`): `AsyncIterable`\<`IntelligenceStreamChunk`\> #### Parameters ##### op `IntelligenceStreamOperation` #### Returns `AsyncIterable`\<`IntelligenceStreamChunk`\> --- ## Page: diffusionAdapter URL: https://docs.totem.ing/api/totemsdk-qvac/functions/diffusionAdapter [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / diffusionAdapter # Function: diffusionAdapter() > **diffusionAdapter**(`provider`): [`QvacDiffusionOps`](../interfaces/QvacDiffusionOps.md) ## Parameters ### provider `IntelligenceProvider` ## Returns [`QvacDiffusionOps`](../interfaces/QvacDiffusionOps.md) --- ## Page: embedAdapter URL: https://docs.totem.ing/api/totemsdk-qvac/functions/embedAdapter [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / embedAdapter # Function: embedAdapter() > **embedAdapter**(`provider`): [`QvacEmbedOps`](../interfaces/QvacEmbedOps.md) ## Parameters ### provider `IntelligenceProvider` ## Returns [`QvacEmbedOps`](../interfaces/QvacEmbedOps.md) --- ## Page: evaluateContentAccess URL: https://docs.totem.ing/api/totemsdk-qvac/functions/evaluateContentAccess [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / evaluateContentAccess # Function: evaluateContentAccess() > **evaluateContentAccess**(`policy`, `domain`, `op`, `params`, `context`): [`ContentAccessDecision`](../interfaces/ContentAccessDecision.md) Decide whether a RAG operation may proceed for the calling principal. Purely a policy function — no provider interaction. Returns the effective params (with `workspaceId` rewritten when the caller left it unset and has exactly one entitled workspace, so the provider never sees an un-scoped retrieval) or a denial. ## Parameters ### policy [`ContentAccessPolicy`](../interfaces/ContentAccessPolicy.md) ### domain `string` ### op `string` ### params `Record`\<`string`, `unknown`\> ### context `IntelligenceContext` \| `undefined` ## Returns [`ContentAccessDecision`](../interfaces/ContentAccessDecision.md) --- ## Page: llmAdapter URL: https://docs.totem.ing/api/totemsdk-qvac/functions/llmAdapter [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / llmAdapter # Function: llmAdapter() > **llmAdapter**(`provider`): [`QvacLlmOps`](../interfaces/QvacLlmOps.md) ## Parameters ### provider `IntelligenceProvider` ## Returns [`QvacLlmOps`](../interfaces/QvacLlmOps.md) --- ## Page: modelsAdapter URL: https://docs.totem.ing/api/totemsdk-qvac/functions/modelsAdapter [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / modelsAdapter # Function: modelsAdapter() > **modelsAdapter**(`provider`): [`QvacModelsOps`](../interfaces/QvacModelsOps.md) ## Parameters ### provider `IntelligenceProvider` ## Returns [`QvacModelsOps`](../interfaces/QvacModelsOps.md) --- ## Page: ocrAdapter URL: https://docs.totem.ing/api/totemsdk-qvac/functions/ocrAdapter [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / ocrAdapter # Function: ocrAdapter() > **ocrAdapter**(`provider`): [`QvacOcrOps`](../interfaces/QvacOcrOps.md) ## Parameters ### provider `IntelligenceProvider` ## Returns [`QvacOcrOps`](../interfaces/QvacOcrOps.md) --- ## Page: pluginsAdapter URL: https://docs.totem.ing/api/totemsdk-qvac/functions/pluginsAdapter [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / pluginsAdapter # Function: pluginsAdapter() > **pluginsAdapter**(`provider`): [`QvacPluginsOps`](../interfaces/QvacPluginsOps.md) ## Parameters ### provider `IntelligenceProvider` ## Returns [`QvacPluginsOps`](../interfaces/QvacPluginsOps.md) --- ## Page: qvacOpShape URL: https://docs.totem.ing/api/totemsdk-qvac/functions/qvacOpShape [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / qvacOpShape # Function: qvacOpShape() > **qvacOpShape**(`op`): [`QvacOpShape`](../type-aliases/QvacOpShape.md) Shape of a given op (defaults to record). ## Parameters ### op `string` ## Returns [`QvacOpShape`](../type-aliases/QvacOpShape.md) --- ## Page: ragAdapter URL: https://docs.totem.ing/api/totemsdk-qvac/functions/ragAdapter [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / ragAdapter # Function: ragAdapter() > **ragAdapter**(`provider`): [`QvacRagOps`](../interfaces/QvacRagOps.md) ## Parameters ### provider `IntelligenceProvider` ## Returns [`QvacRagOps`](../interfaces/QvacRagOps.md) --- ## Page: systemAdapter URL: https://docs.totem.ing/api/totemsdk-qvac/functions/systemAdapter [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / systemAdapter # Function: systemAdapter() > **systemAdapter**(`provider`): [`QvacSystemOps`](../interfaces/QvacSystemOps.md) ## Parameters ### provider `IntelligenceProvider` ## Returns [`QvacSystemOps`](../interfaces/QvacSystemOps.md) --- ## Page: translateAdapter URL: https://docs.totem.ing/api/totemsdk-qvac/functions/translateAdapter [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / translateAdapter # Function: translateAdapter() > **translateAdapter**(`provider`): [`QvacTranslateOps`](../interfaces/QvacTranslateOps.md) ## Parameters ### provider `IntelligenceProvider` ## Returns [`QvacTranslateOps`](../interfaces/QvacTranslateOps.md) --- ## Page: ttsAdapter URL: https://docs.totem.ing/api/totemsdk-qvac/functions/ttsAdapter [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / ttsAdapter # Function: ttsAdapter() > **ttsAdapter**(`provider`): [`QvacTtsOps`](../interfaces/QvacTtsOps.md) ## Parameters ### provider `IntelligenceProvider` ## Returns [`QvacTtsOps`](../interfaces/QvacTtsOps.md) --- ## Page: verifyQvacRuntimeBehavior URL: https://docs.totem.ing/api/totemsdk-qvac/functions/verifyQvacRuntimeBehavior [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / verifyQvacRuntimeBehavior # Function: verifyQvacRuntimeBehavior() > **verifyQvacRuntimeBehavior**(`input`): `Promise`\<[`QvacRuntimeVerificationMark`](../interfaces/QvacRuntimeVerificationMark.md)\> Exercise the injected runtime against the three Phase 3a scenarios and return a `provider-verified` mark. Throws on any violation — a scenario that the runtime fails is surfaced, never relabelled as an SDK guarantee. ## Parameters ### input [`VerifyQvacRuntimeBehaviorInput`](../interfaces/VerifyQvacRuntimeBehaviorInput.md) ## Returns `Promise`\<[`QvacRuntimeVerificationMark`](../interfaces/QvacRuntimeVerificationMark.md)\> --- ## Page: videoAdapter URL: https://docs.totem.ing/api/totemsdk-qvac/functions/videoAdapter [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / videoAdapter # Function: videoAdapter() > **videoAdapter**(`provider`): [`QvacVideoOps`](../interfaces/QvacVideoOps.md) ## Parameters ### provider `IntelligenceProvider` ## Returns [`QvacVideoOps`](../interfaces/QvacVideoOps.md) --- ## Page: vlaAdapter URL: https://docs.totem.ing/api/totemsdk-qvac/functions/vlaAdapter [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / vlaAdapter # Function: vlaAdapter() > **vlaAdapter**(`provider`): [`QvacVlaOps`](../interfaces/QvacVlaOps.md) ## Parameters ### provider `IntelligenceProvider` ## Returns [`QvacVlaOps`](../interfaces/QvacVlaOps.md) --- ## Page: worldAdapter URL: https://docs.totem.ing/api/totemsdk-qvac/functions/worldAdapter [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / worldAdapter # Function: worldAdapter() > **worldAdapter**(`provider`): [`QvacWorldOps`](../interfaces/QvacWorldOps.md) ## Parameters ### provider `IntelligenceProvider` ## Returns [`QvacWorldOps`](../interfaces/QvacWorldOps.md) --- ## Page: AssessModelFitInput URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/AssessModelFitInput [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / AssessModelFitInput # Interface: AssessModelFitInput ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### modelId > **modelId**: `string` --- ## Page: AssessModelFitResult URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/AssessModelFitResult [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / AssessModelFitResult # Interface: AssessModelFitResult ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### fits? > `optional` **fits?**: `boolean` *** ### reason? > `optional` **reason?**: `string` --- ## Page: AudioGenClientParams URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/AudioGenClientParams [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / AudioGenClientParams # Interface: AudioGenClientParams ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### modelId > **modelId**: `string` *** ### prompt > **prompt**: `string` --- ## Page: AudioGenResult URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/AudioGenResult [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / AudioGenResult # Interface: AudioGenResult ## Properties ### outputs > **outputs**: `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>[]\> *** ### progressStream > **progressStream**: `AsyncGenerator`\<`unknown`\> *** ### requestId > **requestId**: `string` *** ### stats > **stats**: `Promise`\<`unknown`\> --- ## Page: BatchCompletionRun URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/BatchCompletionRun [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / BatchCompletionRun # Interface: BatchCompletionRun ## Properties ### events > **events**: `AsyncIterable`\<`unknown`\> *** ### final > **final**: `Promise`\<`unknown`\> *** ### requestId > **requestId**: `string` --- ## Page: BciTranscribeClientParams URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/BciTranscribeClientParams [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / BciTranscribeClientParams # Interface: BciTranscribeClientParams ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### filePath? > `optional` **filePath?**: `string` *** ### mode? > `optional` **mode?**: `string` *** ### modelId > **modelId**: `string` --- ## Page: BciTranscribeStreamSession URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/BciTranscribeStreamSession [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / BciTranscribeStreamSession # Interface: BciTranscribeStreamSession ## Properties ### stats > **stats**: `Promise`\<`unknown`\> ## Methods ### \[asyncIterator\]() > **\[asyncIterator\]**(): `AsyncIterator`\<`unknown`\> #### Returns `AsyncIterator`\<`unknown`\> *** ### destroy() > **destroy**(): `void` #### Returns `void` *** ### end() > **end**(): `void` #### Returns `void` *** ### write() > **write**(`audioChunk`): `void` #### Parameters ##### audioChunk `Uint8Array` #### Returns `void` --- ## Page: ClassificationResult URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/ClassificationResult [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / ClassificationResult # Interface: ClassificationResult ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### text > **text**: `string` *** ### value? > `optional` **value?**: `number` --- ## Page: ClassifyClientParams URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/ClassifyClientParams [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / ClassifyClientParams # Interface: ClassifyClientParams ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### labels? > `optional` **labels?**: `string`[] *** ### modelId > **modelId**: `string` *** ### text > **text**: `string` --- ## Page: CompletionFinal URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/CompletionFinal [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / CompletionFinal # Interface: CompletionFinal ## Properties ### cacheableAssistantContent? > `optional` **cacheableAssistantContent?**: `string` *** ### contentText > **contentText**: `string` *** ### raw > **raw**: `object` #### fullText > **fullText**: `string` *** ### stats? > `optional` **stats?**: [`CompletionStats`](CompletionStats.md) *** ### stopReason? > `optional` **stopReason?**: [`StopReason`](../type-aliases/StopReason.md) *** ### thinkingText? > `optional` **thinkingText?**: `string` *** ### toolCalls > **toolCalls**: `ToolCallWithCall`[] --- ## Page: CompletionParams URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/CompletionParams [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / CompletionParams # Interface: CompletionParams ## Properties ### captureThinking? > `optional` **captureThinking?**: `boolean` *** ### emitRawDeltas? > `optional` **emitRawDeltas?**: `boolean` *** ### history > **history**: `object`[] #### attachments? > `optional` **attachments?**: `unknown`[] #### content > **content**: `string` #### role > **role**: `string` *** ### kvCache? > `optional` **kvCache?**: `string` \| `boolean` *** ### mcp? > `optional` **mcp?**: `unknown`[] *** ### modelId > **modelId**: `string` *** ### params? > `optional` **params?**: `Record`\<`string`, `unknown`\> *** ### responseFormat? > `optional` **responseFormat?**: `unknown` *** ### stream? > `optional` **stream?**: `boolean` *** ### toolDialect? > `optional` **toolDialect?**: `string` *** ### tools? > `optional` **tools?**: `unknown`[] --- ## Page: CompletionRun URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/CompletionRun [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / CompletionRun # Interface: CompletionRun ## Properties ### events > **events**: `AsyncIterable`\<[`CompletionEvent`](../type-aliases/CompletionEvent.md)\> *** ### final > **final**: `Promise`\<[`CompletionFinal`](CompletionFinal.md)\> *** ### requestId > **requestId**: `string` *** ### stats > **stats**: `Promise`\<[`CompletionStats`](CompletionStats.md) \| `undefined`\> *** ### text > **text**: `Promise`\<`string`\> *** ### tokenStream > **tokenStream**: `AsyncGenerator`\<`string`\> *** ### toolCalls > **toolCalls**: `Promise`\<`ToolCallWithCall`[]\> *** ### toolCallStream > **toolCallStream**: `AsyncGenerator`\<`ToolCallEvent`\> --- ## Page: CompletionStats URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/CompletionStats [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / CompletionStats # Interface: CompletionStats ## Properties ### avgConcurrentSeq? > `optional` **avgConcurrentSeq?**: `number` *** ### backendDevice? > `optional` **backendDevice?**: `"gpu"` \| `"cpu"` *** ### cacheTokens? > `optional` **cacheTokens?**: `number` *** ### emittedTokens? > `optional` **emittedTokens?**: `number` *** ### generatedTokens? > `optional` **generatedTokens?**: `number` *** ### promptTokens? > `optional` **promptTokens?**: `number` *** ### promptTokensPerSecond? > `optional` **promptTokensPerSecond?**: `number` *** ### timeToFirstToken? > `optional` **timeToFirstToken?**: `number` *** ### tokensPerSecond? > `optional` **tokensPerSecond?**: `number` --- ## Page: ContentAccessDecision URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/ContentAccessDecision [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / ContentAccessDecision # Interface: ContentAccessDecision ## Properties ### allowed > **allowed**: `boolean` *** ### params? > `optional` **params?**: `Record`\<`string`, `unknown`\> Ops to forward to the provider with workspace scoping applied. *** ### reason? > `optional` **reason?**: `string` *** ### workspaceId? > `optional` **workspaceId?**: `string` The effective `workspaceId` (rewritten when the op left it unset). --- ## Page: ContentAccessPolicy URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/ContentAccessPolicy [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / ContentAccessPolicy # Interface: ContentAccessPolicy ## Properties ### entitlements > **entitlements**: readonly [`ContentWorkspaceEntitlement`](ContentWorkspaceEntitlement.md)[] Latest authoritative entitlement snapshot. Change this to revoke — retrieval is gated once the change is observed; no cleanup follows. *** ### freshnessMs? > `optional` **freshnessMs?**: `number` Freshness/offline policy: how stale the snapshot may be before denial. When `freshnessMs` is set and `now - observedAt > freshnessMs`, protected ops are denied (fail-closed while offline/stale). *** ### now? > `optional` **now?**: () => `number` Injectable clock (defaults to `Date.now`). #### Returns `number` *** ### observedAt? > `optional` **observedAt?**: `number` Wall-clock time `entitlements` was observed (defaults to `now` at use). *** ### onDeny? > `optional` **onDeny?**: (`principal`, `op`, `reason`) => `void` Diagnostic hook invoked on every denial. #### Parameters ##### principal `string` \| `undefined` ##### op `string` ##### reason `string` #### Returns `void` --- ## Page: ContentWorkspaceEntitlement URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/ContentWorkspaceEntitlement [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / ContentWorkspaceEntitlement # Interface: ContentWorkspaceEntitlement A principal's entitlement to content. Content is addressed by workspace: a principal may search/ingest/lifecycle exactly the workspaces listed, and nothing else. ## Properties ### principal > **principal**: `string` Principal identifier (account, agent id, purchase key). *** ### workspaceIds > **workspaceIds**: readonly `string`[] Workspace ids the principal may read and write. --- ## Page: DiffusionClientParams URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/DiffusionClientParams [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / DiffusionClientParams # Interface: DiffusionClientParams ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### height? > `optional` **height?**: `number` *** ### image? > `optional` **image?**: `unknown` *** ### modelId > **modelId**: `string` *** ### negativePrompt? > `optional` **negativePrompt?**: `string` *** ### prompt > **prompt**: `string` *** ### width? > `optional` **width?**: `number` --- ## Page: DiffusionProgressTick URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/DiffusionProgressTick [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / DiffusionProgressTick # Interface: DiffusionProgressTick ## Properties ### elapsedMs > **elapsedMs**: `number` *** ### step > **step**: `number` *** ### totalSteps > **totalSteps**: `number` --- ## Page: DiffusionResult URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/DiffusionResult [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / DiffusionResult # Interface: DiffusionResult ## Properties ### outputs > **outputs**: `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>[]\> *** ### progressStream > **progressStream**: `AsyncGenerator`\<[`DiffusionProgressTick`](DiffusionProgressTick.md)\> *** ### stats > **stats**: `Promise`\<`unknown`\> --- ## Page: DownloadAssetOptions URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/DownloadAssetOptions [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / DownloadAssetOptions # Interface: DownloadAssetOptions ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### assetId? > `optional` **assetId?**: `string` *** ### assetSrc? > `optional` **assetSrc?**: `string` *** ### hyperdriveKey? > `optional` **hyperdriveKey?**: `string` *** ### modelFileName? > `optional` **modelFileName?**: `string` *** ### modelPath? > `optional` **modelPath?**: `string` *** ### onProgress? > `optional` **onProgress?**: (`progress`) => `void` #### Parameters ##### progress ###### downloaded `number` ###### percentage `number` ###### total? `number` ###### type `string` #### Returns `void` --- ## Page: EmbedParams URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/EmbedParams [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / EmbedParams # Interface: EmbedParams ## Properties ### modelId > **modelId**: `string` *** ### text > **text**: `string` \| `string`[] --- ## Page: EmbedResult URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/EmbedResult [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / EmbedResult # Interface: EmbedResult ## Properties ### embedding > **embedding**: `number`[] \| `number`[][] *** ### stats? > `optional` **stats?**: [`EmbedStats`](EmbedStats.md) --- ## Page: EmbedStats URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/EmbedStats [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / EmbedStats # Interface: EmbedStats ## Indexable > \[`key`: `string`\]: `unknown` --- ## Page: FinetuneHandle URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/FinetuneHandle [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / FinetuneHandle # Interface: FinetuneHandle ## Properties ### progressStream > **progressStream**: `AsyncGenerator`\<`unknown`\> *** ### requestId > **requestId**: `string` *** ### result > **result**: `Promise`\<`unknown`\> --- ## Page: GetLoadedModelInfoParams URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/GetLoadedModelInfoParams [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / GetLoadedModelInfoParams # Interface: GetLoadedModelInfoParams ## Properties ### modelId > **modelId**: `string` --- ## Page: GetModelInfoParams URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/GetModelInfoParams [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / GetModelInfoParams # Interface: GetModelInfoParams ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### modelId? > `optional` **modelId?**: `string` *** ### modelType? > `optional` **modelType?**: `string` --- ## Page: GetSystemResourcesInput URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/GetSystemResourcesInput [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / GetSystemResourcesInput # Interface: GetSystemResourcesInput ## Indexable > \[`key`: `string`\]: `unknown` --- ## Page: HeartbeatResponse URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/HeartbeatResponse [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / HeartbeatResponse # Interface: HeartbeatResponse ## Indexable > \[`key`: `string`\]: `unknown` --- ## Page: InvokePluginOptions URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/InvokePluginOptions [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / InvokePluginOptions # Interface: InvokePluginOptions\ ## Type Parameters ### TParams `TParams` = `unknown` ## Properties ### handler > **handler**: `string` *** ### modelId > **modelId**: `string` *** ### params > **params**: `TParams` --- ## Page: LoadModelOptions URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/LoadModelOptions [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / LoadModelOptions # Interface: LoadModelOptions ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### fallbackSrc? > `optional` **fallbackSrc?**: `string` *** ### logger? > `optional` **logger?**: `unknown` *** ### modelConfig? > `optional` **modelConfig?**: `Record`\<`string`, `unknown`\> *** ### modelId? > `optional` **modelId?**: `string` *** ### modelSrc > **modelSrc**: `string` *** ### modelType? > `optional` **modelType?**: `string` *** ### onProgress? > `optional` **onProgress?**: (`progress`) => `void` #### Parameters ##### progress ###### downloaded `number` ###### percentage `number` ###### total? `number` ###### type `string` #### Returns `void` *** ### requireHttpChecksum? > `optional` **requireHttpChecksum?**: `boolean` *** ### requireSecureTransport? > `optional` **requireSecureTransport?**: `boolean` --- ## Page: LoadedModelInfo URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/LoadedModelInfo [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / LoadedModelInfo # Interface: LoadedModelInfo ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### config? > `optional` **config?**: `Record`\<`string`, `unknown`\> *** ### modelId > **modelId**: `string` *** ### modelName? > `optional` **modelName?**: `string` *** ### modelType > **modelType**: `string` --- ## Page: LoggingParams URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/LoggingParams [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / LoggingParams # Interface: LoggingParams ## Properties ### id > **id**: `string` --- ## Page: LoggingStreamResponse URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/LoggingStreamResponse [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / LoggingStreamResponse # Interface: LoggingStreamResponse ## Properties ### id > **id**: `string` *** ### level > **level**: [`LogLevel`](../type-aliases/LogLevel.md) *** ### message > **message**: `string` *** ### namespace > **namespace**: `string` *** ### timestamp > **timestamp**: `number` *** ### type > **type**: `"loggingStream"` --- ## Page: ModelInfo URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/ModelInfo [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / ModelInfo # Interface: ModelInfo ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### config? > `optional` **config?**: `Record`\<`string`, `unknown`\> *** ### modelId > **modelId**: `string` *** ### modelName? > `optional` **modelName?**: `string` *** ### modelPath? > `optional` **modelPath?**: `string` *** ### modelType? > `optional` **modelType?**: `string` --- ## Page: ModelRegistryEntry URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/ModelRegistryEntry [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / ModelRegistryEntry # Interface: ModelRegistryEntry ## Extended by - [`ModelRegistryEntryAddon`](ModelRegistryEntryAddon.md) ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### addon? > `optional` **addon?**: `string` *** ### displayName? > `optional` **displayName?**: `string` *** ### engine? > `optional` **engine?**: `string` *** ### name > **name**: `string` --- ## Page: ModelRegistryEntryAddon URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/ModelRegistryEntryAddon [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / ModelRegistryEntryAddon # Interface: ModelRegistryEntryAddon ## Extends - [`ModelRegistryEntry`](ModelRegistryEntry.md) ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### addon? > `optional` **addon?**: `string` #### Inherited from [`ModelRegistryEntry`](ModelRegistryEntry.md).[`addon`](ModelRegistryEntry.md#addon) *** ### displayName? > `optional` **displayName?**: `string` #### Inherited from [`ModelRegistryEntry`](ModelRegistryEntry.md).[`displayName`](ModelRegistryEntry.md#displayname) *** ### engine? > `optional` **engine?**: `string` #### Inherited from [`ModelRegistryEntry`](ModelRegistryEntry.md).[`engine`](ModelRegistryEntry.md#engine) *** ### name > **name**: `string` #### Inherited from [`ModelRegistryEntry`](ModelRegistryEntry.md).[`name`](ModelRegistryEntry.md#name) --- ## Page: ModelRegistrySearchParams URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/ModelRegistrySearchParams [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / ModelRegistrySearchParams # Interface: ModelRegistrySearchParams ## Properties ### addon? > `optional` **addon?**: `string` *** ### engine? > `optional` **engine?**: `string` *** ### filter? > `optional` **filter?**: `string` *** ### modelType? > `optional` **modelType?**: `string` *** ### quantization? > `optional` **quantization?**: `string` --- ## Page: OCRClientParams URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/OCRClientParams [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / OCRClientParams # Interface: OCRClientParams ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### image > **image**: `unknown` *** ### modelId > **modelId**: `string` --- ## Page: OCRStats URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/OCRStats [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / OCRStats # Interface: OCRStats ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### detectionTime? > `optional` **detectionTime?**: `number` *** ### recognitionTime? > `optional` **recognitionTime?**: `number` *** ### totalTime? > `optional` **totalTime?**: `number` --- ## Page: OCRTextBlock URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/OCRTextBlock [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / OCRTextBlock # Interface: OCRTextBlock ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### bbox? > `optional` **bbox?**: `unknown` *** ### confidence? > `optional` **confidence?**: `number` *** ### text > **text**: `string` --- ## Page: OcrResult URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/OcrResult [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / OcrResult # Interface: OcrResult ## Properties ### blocks > **blocks**: `Promise`\<[`OCRTextBlock`](OCRTextBlock.md)[]\> *** ### blockStream > **blockStream**: `AsyncGenerator`\<[`OCRTextBlock`](OCRTextBlock.md)[]\> *** ### stats > **stats**: `Promise`\<[`OCRStats`](OCRStats.md) \| `undefined`\> --- ## Page: QvacAsrOps URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/QvacAsrOps [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / QvacAsrOps # Interface: QvacAsrOps ## Properties ### bciTranscribe > **bciTranscribe**: `QvacOp`\<[`BciTranscribeClientParams`](BciTranscribeClientParams.md), `string`\> *** ### bciTranscribeStream > **bciTranscribeStream**: `QvacOp`\<[`BciTranscribeClientParams`](BciTranscribeClientParams.md), [`BciTranscribeStreamSession`](BciTranscribeStreamSession.md)\> *** ### transcribe > **transcribe**: `QvacOp`\<[`TranscribeClientParams`](TranscribeClientParams.md), `string`\> *** ### transcribeStream > **transcribeStream**: `QvacOp`\<[`TranscribeClientParams`](TranscribeClientParams.md), [`TranscribeStreamSession`](TranscribeStreamSession.md)\> --- ## Page: QvacAudiogenOps URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/QvacAudiogenOps [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / QvacAudiogenOps # Interface: QvacAudiogenOps ## Properties ### audioGen > **audioGen**: `QvacOp`\<[`AudioGenClientParams`](AudioGenClientParams.md), [`AudioGenResult`](AudioGenResult.md)\> --- ## Page: QvacCallResult URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/QvacCallResult [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / QvacCallResult # Interface: QvacCallResult Result of a single QVAC invocation, normalised by the adapter. `upstreamRequestId` is the QVAC-side request id captured from the decorated promise / run object the SDK returned (see `requestId` on CompletionRun, embed/loadModel/transcribe decorated promises, translate results, …). The provider records it so a later `cancel(requestId)` can be forwarded upstream as `sdk.cancel({ requestId })` — targeted cancellation instead of a bare local AbortSignal. ## Properties ### data > `readonly` **data**: `unknown` *** ### upstreamRequestId? > `readonly` `optional` **upstreamRequestId?**: `string` *** ### usage? > `readonly` `optional` **usage?**: `Partial`\<`IntelligenceUsage`\> --- ## Page: QvacClassifyOps URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/QvacClassifyOps [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / QvacClassifyOps # Interface: QvacClassifyOps ## Properties ### classify > **classify**: `QvacOp`\<[`ClassifyClientParams`](ClassifyClientParams.md), [`ClassificationResult`](ClassificationResult.md)[]\> --- ## Page: QvacDiffusionOps URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/QvacDiffusionOps [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / QvacDiffusionOps # Interface: QvacDiffusionOps ## Properties ### diffusion > **diffusion**: `QvacOp`\<[`DiffusionClientParams`](DiffusionClientParams.md), [`DiffusionResult`](DiffusionResult.md)\> *** ### upscale > **upscale**: `QvacOp`\<[`UpscaleClientParams`](UpscaleClientParams.md), [`UpscaleResult`](UpscaleResult.md)\> --- ## Page: QvacEmbedOps URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/QvacEmbedOps [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / QvacEmbedOps # Interface: QvacEmbedOps ## Properties ### embed > **embed**: `QvacOp`\<[`EmbedParams`](EmbedParams.md), [`EmbedResult`](EmbedResult.md)\> --- ## Page: QvacLlmOps URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/QvacLlmOps [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / QvacLlmOps # Interface: QvacLlmOps ## Properties ### batchCompletion > **batchCompletion**: `QvacOp`\<`Record`\<`string`, `unknown`\>, [`BatchCompletionRun`](BatchCompletionRun.md)\> *** ### completion > **completion**: `QvacOp`\<[`CompletionParams`](CompletionParams.md), [`CompletionRun`](CompletionRun.md)\> *** ### finetune > **finetune**: `QvacOp`\<`Record`\<`string`, `unknown`\>, [`FinetuneHandle`](FinetuneHandle.md)\> --- ## Page: QvacModelsOps URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/QvacModelsOps [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / QvacModelsOps # Interface: QvacModelsOps ## Properties ### assessModelFit > **assessModelFit**: `QvacOp`\<[`AssessModelFitInput`](AssessModelFitInput.md), [`AssessModelFitResult`](AssessModelFitResult.md)\> *** ### deleteCache > **deleteCache**: `QvacOp`\<[`DeleteCacheParams`](../type-aliases/DeleteCacheParams.md), \{ `success`: `boolean`; \}\> *** ### downloadAsset > **downloadAsset**: `QvacOp`\<[`DownloadAssetOptions`](DownloadAssetOptions.md), `string`\> *** ### getLoadedModelInfo > **getLoadedModelInfo**: `QvacOp`\<[`GetLoadedModelInfoParams`](GetLoadedModelInfoParams.md), [`LoadedModelInfo`](LoadedModelInfo.md)\> *** ### getModelInfo > **getModelInfo**: `QvacOp`\<[`GetModelInfoParams`](GetModelInfoParams.md), [`ModelInfo`](ModelInfo.md)\> *** ### loadModel > **loadModel**: `QvacOp`\<[`LoadModelOptions`](LoadModelOptions.md), `string`\> *** ### modelRegistryGetModel > **modelRegistryGetModel**: (`registryPath`, `registrySource`) => `Promise`\<`IntelligenceOutcome`\<[`ModelRegistryEntry`](ModelRegistryEntry.md)\>\> Real upstream signature: positional `(registryPath, registrySource)`. #### Parameters ##### registryPath `string` ##### registrySource `string` #### Returns `Promise`\<`IntelligenceOutcome`\<[`ModelRegistryEntry`](ModelRegistryEntry.md)\>\> *** ### modelRegistryList > **modelRegistryList**: `QvacOp`\<`Record`\<`string`, `never`\>, [`ModelRegistryEntry`](ModelRegistryEntry.md)[]\> *** ### modelRegistrySearch > **modelRegistrySearch**: `QvacOp`\<[`ModelRegistrySearchParams`](ModelRegistrySearchParams.md), [`ModelRegistryEntry`](ModelRegistryEntry.md)[]\> *** ### resume > **resume**: `QvacOp`\<`Record`\<`string`, `never`\>, `void`\> *** ### state > **state**: `QvacOp`\<`Record`\<`string`, `never`\>, `unknown`\> *** ### suspend > **suspend**: `QvacOp`\<`Record`\<`string`, `never`\>, `void`\> *** ### unloadModel > **unloadModel**: `QvacOp`\<\{ `modelId`: `string`; \}, `void`\> --- ## Page: QvacOcrOps URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/QvacOcrOps [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / QvacOcrOps # Interface: QvacOcrOps ## Properties ### ocr > **ocr**: `QvacOp`\<[`OCRClientParams`](OCRClientParams.md), [`OcrResult`](OcrResult.md)\> --- ## Page: QvacOpHandler URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/QvacOpHandler [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / QvacOpHandler # Interface: QvacOpHandler() > **QvacOpHandler**(`params`, `opts`): `Promise`\<[`QvacCallResult`](QvacCallResult.md)\> ## Parameters ### params `Record`\<`string`, `unknown`\> ### opts `QvacOpHandlerCallOptions` ## Returns `Promise`\<[`QvacCallResult`](QvacCallResult.md)\> --- ## Page: QvacPluginsOps URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/QvacPluginsOps [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / QvacPluginsOps # Interface: QvacPluginsOps ## Properties ### invokePlugin > **invokePlugin**: `QvacOp`\<[`InvokePluginOptions`](InvokePluginOptions.md)\<`unknown`\>, `unknown`\> *** ### invokePluginStream > **invokePluginStream**: `QvacOp`\<[`InvokePluginOptions`](InvokePluginOptions.md)\<`unknown`\>, `unknown`\> --- ## Page: QvacProviderOptions URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/QvacProviderOptions [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / QvacProviderOptions # Interface: QvacProviderOptions Options for the QVAC intelligence adapter. ## Properties ### defaultTimeoutMs? > `readonly` `optional` **defaultTimeoutMs?**: `number` Timeout for individual operations (ms). Default: none. *** ### lazyConnect? > `readonly` `optional` **lazyConnect?**: `boolean` Auto-connect semantics — defaults to true (no-op for local SDK). *** ### onLog? > `readonly` `optional` **onLog?**: (`level`, `message`, `context?`) => `void` Logger hook receiving operational diagnostics. #### Parameters ##### level `string` ##### message `string` ##### context? `unknown` #### Returns `void` *** ### resolveOp? > `readonly` `optional` **resolveOp?**: `QvacOpResolver` Override the default op resolver. *** ### sdk? > `readonly` `optional` **sdk?**: [`QvacSdkLike`](QvacSdkLike.md) QVAC SDK (or structural equivalent) to wrap. Optional — see `sdkLoader`. Most consumers can skip this and supply `sdkLoader`, or install `@qvac/sdk` and rely on the lazy default load. *** ### sdkLoader? > `readonly` `optional` **sdkLoader?**: () => [`QvacSdkLike`](QvacSdkLike.md) \| `Promise`\<[`QvacSdkLike`](QvacSdkLike.md)\> Async SDK loader, used when `sdk` is not provided. The idiomatic form is `() => import('@qvac/sdk')`. If neither `sdk` nor `sdkLoader` is given, the provider attempts `require('@qvac/sdk')` lazily at first use and returns UNAVAILABLE when the package is not installed. Injection via `sdk`/`sdkLoader` keeps the adapter testable and lets runtimes supply a custom surface without the heavy native dependency tree. #### Returns [`QvacSdkLike`](QvacSdkLike.md) \| `Promise`\<[`QvacSdkLike`](QvacSdkLike.md)\> *** ### usageExtractor? > `readonly` `optional` **usageExtractor?**: [`QvacUsageExtractor`](../type-aliases/QvacUsageExtractor.md) Override the DSL op→usage mapping used by the provider. --- ## Page: QvacRagOps URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/QvacRagOps [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / QvacRagOps # Interface: QvacRagOps ## Properties ### ragChunk > **ragChunk**: `QvacOp`\<[`RagChunkParams`](RagChunkParams.md), [`RagDoc`](RagDoc.md)[]\> *** ### ragCloseWorkspace > **ragCloseWorkspace**: `QvacOp`\<[`RagCloseWorkspaceParams`](RagCloseWorkspaceParams.md), `void`\> *** ### ragDeleteEmbeddings > **ragDeleteEmbeddings**: `QvacOp`\<[`RagDeleteEmbeddingsParams`](../type-aliases/RagDeleteEmbeddingsParams.md), `void`\> *** ### ragDeleteWorkspace > **ragDeleteWorkspace**: `QvacOp`\<[`RagDeleteWorkspaceParams`](RagDeleteWorkspaceParams.md), `void`\> *** ### ragIngest > **ragIngest**: `QvacOp`\<[`RagIngestParams`](RagIngestParams.md), \{ `droppedIndices`: `number`[]; `processed`: [`RagSaveEmbeddingsResult`](RagSaveEmbeddingsResult.md)[]; \}\> *** ### ragListWorkspaces > **ragListWorkspaces**: `QvacOp`\<`Record`\<`string`, `never`\>, [`RagWorkspaceInfo`](RagWorkspaceInfo.md)[]\> *** ### ragReindex > **ragReindex**: `QvacOp`\<[`RagReindexParams`](RagReindexParams.md), `RagReindexResult`\> *** ### ragSaveEmbeddings > **ragSaveEmbeddings**: `QvacOp`\<[`RagSaveEmbeddingsParams`](RagSaveEmbeddingsParams.md), [`RagSaveEmbeddingsResult`](RagSaveEmbeddingsResult.md)[]\> *** ### ragSearch > **ragSearch**: `QvacOp`\<[`RagSearchParams`](RagSearchParams.md), [`RagSearchResult`](RagSearchResult.md)[]\> --- ## Page: QvacRuntimeObservation URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/QvacRuntimeObservation [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / QvacRuntimeObservation # Interface: QvacRuntimeObservation ## Properties ### scenario > `readonly` **scenario**: [`QvacRuntimeBehaviorScenario`](../type-aliases/QvacRuntimeBehaviorScenario.md) *** ### verifies > `readonly` **verifies**: `string` --- ## Page: QvacRuntimeVerificationMark URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/QvacRuntimeVerificationMark [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / QvacRuntimeVerificationMark # Interface: QvacRuntimeVerificationMark ## Properties ### details > `readonly` **details**: readonly [`QvacRuntimeObservation`](QvacRuntimeObservation.md)[] *** ### exercised > `readonly` **exercised**: readonly [`QvacRuntimeBehaviorScenario`](../type-aliases/QvacRuntimeBehaviorScenario.md)[] *** ### level > `readonly` **level**: `"provider-verified"` *** ### provider > `readonly` **provider**: `"qvac"` --- ## Page: QvacSdkLike URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/QvacSdkLike [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / QvacSdkLike # Interface: QvacSdkLike Structural QVAC SDK surface. Consumers provide either the real `@qvac/sdk` module or a compatible mock. `id`, `version`, and `plugins` are optional discovery hints; when absent the provider falls back to defaults. ## Indexable > \[`op`: `string`\]: `unknown` Canonical op callables, keyed by op name (e.g. `completion`, `embed`, `ragSearch`). The default handler resolves `sdk[op]` when present and throws NOT_IMPLEMENTED otherwise. ## Properties ### id? > `readonly` `optional` **id?**: `string` *** ### version? > `readonly` `optional` **version?**: `string` ## Methods ### close()? > `optional` **close**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> --- ## Page: QvacSystemOps URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/QvacSystemOps [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / QvacSystemOps # Interface: QvacSystemOps ## Properties ### cancel > **cancel**: `QvacOp`\<[`CancelClientInput`](../type-aliases/CancelClientInput.md), `void`\> *** ### close > **close**: `QvacOp`\<`Record`\<`string`, `never`\>, `void`\> *** ### getSystemResources > **getSystemResources**: `QvacOp`\<[`GetSystemResourcesInput`](GetSystemResourcesInput.md), [`SystemResources`](SystemResources.md)\> *** ### heartbeat > **heartbeat**: `QvacOp`\<`Record`\<`string`, `never`\>, [`HeartbeatResponse`](HeartbeatResponse.md)\> *** ### loggingStream > **loggingStream**: `QvacOp`\<[`LoggingParams`](LoggingParams.md), `AsyncGenerator`\<[`LoggingStreamResponse`](LoggingStreamResponse.md), `any`, `any`\>\> *** ### subscribeServerLogs > **subscribeServerLogs**: (`handler`) => `Promise`\<`IntelligenceOutcome`\<\{ `unsubscribe`: () => `void`; \}\>\> Real upstream signature: `subscribeServerLogs(handler)` returns an unsubscribe function; the adapter surfaces it as `{ unsubscribe }`. #### Parameters ##### handler [`ServerLogHandler`](ServerLogHandler.md) #### Returns `Promise`\<`IntelligenceOutcome`\<\{ `unsubscribe`: () => `void`; \}\>\> --- ## Page: QvacTranslateOps URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/QvacTranslateOps [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / QvacTranslateOps # Interface: QvacTranslateOps ## Properties ### translate > **translate**: `QvacOp`\<[`TranslateClientParams`](TranslateClientParams.md), [`TranslateResult`](TranslateResult.md)\> --- ## Page: QvacTtsOps URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/QvacTtsOps [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / QvacTtsOps # Interface: QvacTtsOps ## Properties ### textToSpeech > **textToSpeech**: `QvacOp`\<[`TtsClientParamsInput`](TtsClientParamsInput.md), [`TextToSpeechStreamResult`](TextToSpeechStreamResult.md)\> *** ### textToSpeechStream > **textToSpeechStream**: `QvacOp`\<[`TextToSpeechStreamClientParams`](TextToSpeechStreamClientParams.md), [`TextToSpeechStreamSession`](TextToSpeechStreamSession.md)\> --- ## Page: QvacVideoOps URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/QvacVideoOps [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / QvacVideoOps # Interface: QvacVideoOps ## Properties ### video > **video**: `QvacOp`\<[`VideoClientParams`](VideoClientParams.md), [`VideoResult`](VideoResult.md)\> --- ## Page: QvacVlaOps URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/QvacVlaOps [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / QvacVlaOps # Interface: QvacVlaOps ## Properties ### vla > **vla**: `QvacOp`\<[`VlaClientRunParams`](VlaClientRunParams.md), [`VlaClientRunResult`](VlaClientRunResult.md)\> *** ### vlaHparams > **vlaHparams**: `QvacOp`\<\{ `modelId`: `string`; \}, [`VlaHparamsOpResult`](VlaHparamsOpResult.md)\> *** ### vlaPadState > **vlaPadState**: (`state`, `targetDim?`) => `Promise`\<`IntelligenceOutcome`\<`Uint8Array`\<`ArrayBufferLike`\>\>\> Real upstream signature: positional, pads a state tensor. #### Parameters ##### state `Uint8Array` ##### targetDim? `number` #### Returns `Promise`\<`IntelligenceOutcome`\<`Uint8Array`\<`ArrayBufferLike`\>\>\> *** ### vlaPreprocessImage > **vlaPreprocessImage**: (`pixels`, `width`, `height`, `options?`) => `Promise`\<`IntelligenceOutcome`\<`Uint8Array`\<`ArrayBufferLike`\>\>\> Real upstream signature: positional, returns the preprocessed image. #### Parameters ##### pixels `Float32Array` ##### width `number` ##### height `number` ##### options? `Record`\<`string`, `unknown`\> #### Returns `Promise`\<`IntelligenceOutcome`\<`Uint8Array`\<`ArrayBufferLike`\>\>\> *** ### vlaSetEmbodiment > **vlaSetEmbodiment**: `QvacOp`\<\{ `embodiment`: [`VlaEmbodimentSelection`](../type-aliases/VlaEmbodimentSelection.md); `modelId`: `string`; \}, \{ `hparams`: [`VlaHparams`](VlaHparams.md); \}\> --- ## Page: QvacWorldOps URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/QvacWorldOps [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / QvacWorldOps # Interface: QvacWorldOps ## Properties ### worldCreateScene > **worldCreateScene**: `QvacOp`\<[`WorldSceneClientParams`](WorldSceneClientParams.md), [`WorldCreateSceneResult`](../type-aliases/WorldCreateSceneResult.md)\> *** ### worldStep > **worldStep**: `QvacOp`\<[`WorldStepClientParams`](WorldStepClientParams.md), [`WorldStepResult`](WorldStepResult.md)\> --- ## Page: RagChunkParams URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/RagChunkParams [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / RagChunkParams # Interface: RagChunkParams ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### chunkOverlap? > `optional` **chunkOverlap?**: `number` *** ### chunkSize? > `optional` **chunkSize?**: `number` *** ### chunkStrategy? > `optional` **chunkStrategy?**: `string` *** ### content > **content**: `string` *** ### splitStrategy? > `optional` **splitStrategy?**: `string` --- ## Page: RagCloseWorkspaceParams URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/RagCloseWorkspaceParams [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / RagCloseWorkspaceParams # Interface: RagCloseWorkspaceParams ## Properties ### deleteOnClose? > `optional` **deleteOnClose?**: `boolean` *** ### workspaceId > **workspaceId**: `string` --- ## Page: RagDeleteWorkspaceParams URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/RagDeleteWorkspaceParams [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / RagDeleteWorkspaceParams # Interface: RagDeleteWorkspaceParams ## Properties ### workspaceId > **workspaceId**: `string` --- ## Page: RagDoc URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/RagDoc [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / RagDoc # Interface: RagDoc ## Properties ### content > **content**: `string` *** ### embedding? > `optional` **embedding?**: `unknown` *** ### id? > `optional` **id?**: `string` *** ### metadata? > `optional` **metadata?**: `unknown` --- ## Page: RagEmbeddedDoc URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/RagEmbeddedDoc [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / RagEmbeddedDoc # Interface: RagEmbeddedDoc ## Properties ### content > **content**: `string` *** ### id > **id**: `string` *** ### metadata? > `optional` **metadata?**: `unknown` --- ## Page: RagIngestParams URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/RagIngestParams [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / RagIngestParams # Interface: RagIngestParams ## Properties ### documents > **documents**: `unknown`[] *** ### embeddingModelId > **embeddingModelId**: `string` *** ### workspaceId? > `optional` **workspaceId?**: `string` --- ## Page: RagReindexParams URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/RagReindexParams [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / RagReindexParams # Interface: RagReindexParams ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### workspaceId? > `optional` **workspaceId?**: `string` --- ## Page: RagSaveEmbeddingsParams URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/RagSaveEmbeddingsParams [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / RagSaveEmbeddingsParams # Interface: RagSaveEmbeddingsParams ## Properties ### chunks > **chunks**: [`RagEmbeddedDoc`](RagEmbeddedDoc.md)[] *** ### embeddingModelId > **embeddingModelId**: `string` *** ### workspaceId? > `optional` **workspaceId?**: `string` --- ## Page: RagSaveEmbeddingsResult URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/RagSaveEmbeddingsResult [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / RagSaveEmbeddingsResult # Interface: RagSaveEmbeddingsResult ## Properties ### error? > `optional` **error?**: `unknown` *** ### id > **id**: `string` *** ### status > **status**: `"ok"` \| `"error"` --- ## Page: RagSearchParams URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/RagSearchParams [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / RagSearchParams # Interface: RagSearchParams ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### embeddingModelId > **embeddingModelId**: `string` *** ### text > **text**: `string` *** ### topK? > `optional` **topK?**: `number` *** ### workspaceId? > `optional` **workspaceId?**: `string` --- ## Page: RagSearchResult URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/RagSearchResult [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / RagSearchResult # Interface: RagSearchResult ## Properties ### details? > `optional` **details?**: `unknown` *** ### doc > **doc**: `unknown` *** ### score > **score**: `number` --- ## Page: RagWorkspaceInfo URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/RagWorkspaceInfo [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / RagWorkspaceInfo # Interface: RagWorkspaceInfo ## Properties ### documents? > `optional` **documents?**: `number` *** ### id > **id**: `string` *** ### name? > `optional` **name?**: `string` *** ### open > **open**: `boolean` --- ## Page: ServerLogHandler URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/ServerLogHandler [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / ServerLogHandler # Interface: ServerLogHandler() > **ServerLogHandler**(`log`): `void` ## Parameters ### log [`LoggingStreamResponse`](LoggingStreamResponse.md) ## Returns `void` --- ## Page: SystemResources URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/SystemResources [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / SystemResources # Interface: SystemResources ## Indexable > \[`key`: `string`\]: `unknown` --- ## Page: TextToSpeechStreamClientParams URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/TextToSpeechStreamClientParams [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / TextToSpeechStreamClientParams # Interface: TextToSpeechStreamClientParams ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### inputType? > `optional` **inputType?**: `string` *** ### modelId > **modelId**: `string` *** ### stream? > `optional` **stream?**: `boolean` --- ## Page: TextToSpeechStreamResponse URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/TextToSpeechStreamResponse [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / TextToSpeechStreamResponse # Interface: TextToSpeechStreamResponse ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### buffer? > `optional` **buffer?**: `number`[] *** ### chunkIndex? > `optional` **chunkIndex?**: `number` *** ### sentenceChunk? > `optional` **sentenceChunk?**: `string` *** ### type > **type**: `string` --- ## Page: TextToSpeechStreamResult URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/TextToSpeechStreamResult [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / TextToSpeechStreamResult # Interface: TextToSpeechStreamResult ## Properties ### buffer > **buffer**: `Promise`\<`number`[]\> *** ### bufferStream > **bufferStream**: `AsyncGenerator`\<`number`\> *** ### chunkUpdates? > `optional` **chunkUpdates?**: `AsyncGenerator`\<[`TtsSentenceChunkUpdate`](TtsSentenceChunkUpdate.md), `any`, `any`\> *** ### done > **done**: `Promise`\<`boolean`\> --- ## Page: TextToSpeechStreamSession URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/TextToSpeechStreamSession [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / TextToSpeechStreamSession # Interface: TextToSpeechStreamSession ## Methods ### \[asyncIterator\]() > **\[asyncIterator\]**(): `AsyncIterator`\<[`TextToSpeechStreamResponse`](TextToSpeechStreamResponse.md)\> #### Returns `AsyncIterator`\<[`TextToSpeechStreamResponse`](TextToSpeechStreamResponse.md)\> *** ### destroy() > **destroy**(): `void` #### Returns `void` *** ### end() > **end**(): `void` #### Returns `void` *** ### write() > **write**(`textFragment`): `void` #### Parameters ##### textFragment `string` \| `Uint8Array`\<`ArrayBufferLike`\> #### Returns `void` --- ## Page: TranscribeClientParams URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/TranscribeClientParams [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / TranscribeClientParams # Interface: TranscribeClientParams ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### audio? > `optional` **audio?**: `unknown` *** ### filePath? > `optional` **filePath?**: `string` *** ### language? > `optional` **language?**: `string` *** ### mode? > `optional` **mode?**: `string` *** ### modelId > **modelId**: `string` --- ## Page: TranscribeSegment URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/TranscribeSegment [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / TranscribeSegment # Interface: TranscribeSegment ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### confidence? > `optional` **confidence?**: `number` *** ### end? > `optional` **end?**: `number` *** ### start? > `optional` **start?**: `number` *** ### text > **text**: `string` *** ### type > **type**: `string` --- ## Page: TranscribeStreamSession URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/TranscribeStreamSession [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / TranscribeStreamSession # Interface: TranscribeStreamSession ## Properties ### stats > **stats**: `Promise`\<`unknown`\> ## Methods ### \[asyncIterator\]() > **\[asyncIterator\]**(): `AsyncIterator`\<`unknown`\> #### Returns `AsyncIterator`\<`unknown`\> *** ### destroy() > **destroy**(): `void` #### Returns `void` *** ### end() > **end**(): `void` #### Returns `void` *** ### write() > **write**(`audioChunk`): `void` #### Parameters ##### audioChunk `Uint8Array` #### Returns `void` --- ## Page: TranslateClientParams URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/TranslateClientParams [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / TranslateClientParams # Interface: TranslateClientParams ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### from > **from**: `string` *** ### modelId? > `optional` **modelId?**: `string` *** ### stream? > `optional` **stream?**: `boolean` *** ### text > **text**: `string` \| `string`[] *** ### to > **to**: `string` --- ## Page: TranslateResult URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/TranslateResult [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / TranslateResult # Interface: TranslateResult ## Properties ### requestId > **requestId**: `string` *** ### stats > **stats**: `Promise`\<[`TranslationStats`](TranslationStats.md) \| `undefined`\> *** ### text > **text**: `Promise`\<`string`\> *** ### tokenStream > **tokenStream**: `AsyncGenerator`\<`string`\> *** ### translations > **translations**: `Promise`\<`string`[]\> --- ## Page: TranslationStats URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/TranslationStats [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / TranslationStats # Interface: TranslationStats ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### cacheTokens? > `optional` **cacheTokens?**: `number` *** ### decodeTime? > `optional` **decodeTime?**: `number` *** ### encodeTime? > `optional` **encodeTime?**: `number` *** ### timeToFirstToken? > `optional` **timeToFirstToken?**: `number` *** ### tokensPerSecond? > `optional` **tokensPerSecond?**: `number` *** ### totalTime? > `optional` **totalTime?**: `number` *** ### totalTokens? > `optional` **totalTokens?**: `number` --- ## Page: TtsClientParamsInput URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/TtsClientParamsInput [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / TtsClientParamsInput # Interface: TtsClientParamsInput ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### emotion? > `optional` **emotion?**: `string` *** ### inputType? > `optional` **inputType?**: `string` *** ### language? > `optional` **language?**: `string` *** ### modelId > **modelId**: `string` *** ### pace? > `optional` **pace?**: `string` *** ### params? > `optional` **params?**: `Record`\<`string`, `unknown`\> *** ### sentenceStream? > `optional` **sentenceStream?**: `boolean` *** ### stream? > `optional` **stream?**: `boolean` *** ### text > **text**: `string` *** ### voice? > `optional` **voice?**: `string` --- ## Page: TtsSentenceChunkUpdate URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/TtsSentenceChunkUpdate [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / TtsSentenceChunkUpdate # Interface: TtsSentenceChunkUpdate ## Properties ### buffer > **buffer**: `number`[] *** ### chunkIndex? > `optional` **chunkIndex?**: `number` *** ### sentenceChunk? > `optional` **sentenceChunk?**: `string` --- ## Page: UpscaleClientParams URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/UpscaleClientParams [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / UpscaleClientParams # Interface: UpscaleClientParams ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### image > **image**: `unknown` *** ### modelId > **modelId**: `string` --- ## Page: UpscaleResult URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/UpscaleResult [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / UpscaleResult # Interface: UpscaleResult ## Properties ### outputs > **outputs**: `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>[]\> *** ### progressStream > **progressStream**: `AsyncGenerator`\<[`DiffusionProgressTick`](DiffusionProgressTick.md)\> *** ### stats > **stats**: `Promise`\<[`UpscaleStats`](UpscaleStats.md) \| `undefined`\> --- ## Page: UpscaleStats URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/UpscaleStats [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / UpscaleStats # Interface: UpscaleStats ## Indexable > \[`key`: `string`\]: `unknown` --- ## Page: UpscaleStreamResponse URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/UpscaleStreamResponse [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / UpscaleStreamResponse # Interface: UpscaleStreamResponse ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### type > **type**: `string` --- ## Page: VerifyQvacRuntimeBehaviorInput URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/VerifyQvacRuntimeBehaviorInput [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / VerifyQvacRuntimeBehaviorInput # Interface: VerifyQvacRuntimeBehaviorInput ## Properties ### sdk > **sdk**: [`QvacSdkLike`](QvacSdkLike.md) The injected runtime surface whose behavior is being verified. --- ## Page: VideoClientParams URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/VideoClientParams [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / VideoClientParams # Interface: VideoClientParams ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### image? > `optional` **image?**: `unknown` *** ### modelId > **modelId**: `string` *** ### prompt > **prompt**: `string` --- ## Page: VideoProgressTick URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/VideoProgressTick [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / VideoProgressTick # Interface: VideoProgressTick ## Properties ### elapsedMs > **elapsedMs**: `number` *** ### step > **step**: `number` *** ### totalSteps > **totalSteps**: `number` --- ## Page: VideoResult URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/VideoResult [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / VideoResult # Interface: VideoResult ## Properties ### outputs > **outputs**: `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>[]\> *** ### progressStream > **progressStream**: `AsyncGenerator`\<[`VideoProgressTick`](VideoProgressTick.md)\> *** ### requestId > **requestId**: `string` *** ### stats > **stats**: `Promise`\<`unknown`\> --- ## Page: VlaClientRunParams URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/VlaClientRunParams [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / VlaClientRunParams # Interface: VlaClientRunParams ## Properties ### images > **images**: `string`[] *** ### imgHeight > **imgHeight**: `number` *** ### imgWidth > **imgWidth**: `number` *** ### mask > **mask**: `string` *** ### modelId > **modelId**: `string` *** ### noise? > `optional` **noise?**: `string` *** ### state > **state**: `string` *** ### tokens > **tokens**: `string` --- ## Page: VlaClientRunResult URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/VlaClientRunResult [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / VlaClientRunResult # Interface: VlaClientRunResult ## Properties ### actionDim > **actionDim**: `number` *** ### actions > **actions**: `string` *** ### chunkSize > **chunkSize**: `number` *** ### stats? > `optional` **stats?**: [`VlaStats`](VlaStats.md) --- ## Page: VlaHparams URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/VlaHparams [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / VlaHparams # Interface: VlaHparams ## Properties ### actionDim > **actionDim**: `number` *** ### chunkSize > **chunkSize**: `number` *** ### imageInputMode? > `optional` **imageInputMode?**: `"pixels"` \| `"patches"` *** ### imagePatchElems? > `optional` **imagePatchElems?**: `number` *** ### maxActionDim > **maxActionDim**: `number` *** ### maxStateDim > **maxStateDim**: `number` *** ### numCameras? > `optional` **numCameras?**: `number` *** ### selectedEmbodimentCatId? > `optional` **selectedEmbodimentCatId?**: `number` *** ### selectedEmbodimentTag? > `optional` **selectedEmbodimentTag?**: `string` *** ### stateInputMode? > `optional` **stateInputMode?**: `"discrete"` \| `"continuous"` *** ### tokenizerMaxLength > **tokenizerMaxLength**: `number` *** ### visionImageSize > **visionImageSize**: `number` --- ## Page: VlaHparamsOpResult URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/VlaHparamsOpResult [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / VlaHparamsOpResult # Interface: VlaHparamsOpResult ## Properties ### backendName > **backendName**: `string` \| `null` *** ### hparams > **hparams**: [`VlaHparams`](VlaHparams.md) --- ## Page: VlaStats URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/VlaStats [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / VlaStats # Interface: VlaStats ## Properties ### backendDevice? > `optional` **backendDevice?**: `number` *** ### ode\_ms? > `optional` **ode\_ms?**: `number` *** ### prefill\_compute\_ms? > `optional` **prefill\_compute\_ms?**: `number` *** ### prefill\_total\_ms? > `optional` **prefill\_total\_ms?**: `number` *** ### smollm2\_compute\_ms? > `optional` **smollm2\_compute\_ms?**: `number` *** ### smollm2\_total\_ms? > `optional` **smollm2\_total\_ms?**: `number` *** ### total\_ms? > `optional` **total\_ms?**: `number` *** ### vision\_ms? > `optional` **vision\_ms?**: `number` --- ## Page: WorldSceneClientParams URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/WorldSceneClientParams [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / WorldSceneClientParams # Interface: WorldSceneClientParams ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### modelId > **modelId**: `string` *** ### username? > `optional` **username?**: `string` --- ## Page: WorldSceneResult URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/WorldSceneResult [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / WorldSceneResult # Interface: WorldSceneResult ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### scene? > `optional` **scene?**: `unknown` --- ## Page: WorldSceneResultWithPack URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/WorldSceneResultWithPack [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / WorldSceneResultWithPack # Interface: WorldSceneResultWithPack ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### pack? > `optional` **pack?**: `unknown` *** ### scene? > `optional` **scene?**: `unknown` --- ## Page: WorldStepClientParams URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/WorldStepClientParams [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / WorldStepClientParams # Interface: WorldStepClientParams ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### modelId > **modelId**: `string` --- ## Page: WorldStepProgressTick URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/WorldStepProgressTick [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / WorldStepProgressTick # Interface: WorldStepProgressTick ## Properties ### elapsedMs > **elapsedMs**: `number` *** ### step > **step**: `number` *** ### totalSteps > **totalSteps**: `number` --- ## Page: WorldStepResult URL: https://docs.totem.ing/api/totemsdk-qvac/interfaces/WorldStepResult [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / WorldStepResult # Interface: WorldStepResult ## Indexable > \[`key`: `string`\]: `unknown` ## Properties ### events? > `optional` **events?**: `unknown` --- ## Page: CancelClientInput URL: https://docs.totem.ing/api/totemsdk-qvac/type-aliases/CancelClientInput [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / CancelClientInput # Type Alias: CancelClientInput > **CancelClientInput** = \{ `clearCache?`: `boolean`; `requestId`: `string`; \} \| \{ `clearCache?`: `boolean`; `operation`: `"request"`; `requestId`: `string`; \} \| \{ `kind?`: `CancelKind`; `modelId`: `string`; \} \| \{ `kind?`: `CancelKind`; `modelId`: `string`; `operation`: `"broad"`; \} \| \{ `modelId`: `string`; `operation`: `"inference"`; \} \| \{ `modelId`: `string`; `operation`: `"embeddings"`; \} --- ## Page: CompletionEvent URL: https://docs.totem.ing/api/totemsdk-qvac/type-aliases/CompletionEvent [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / CompletionEvent # Type Alias: CompletionEvent > **CompletionEvent** = `ContentDeltaEvent` \| `RawDeltaEvent` \| `ThinkingDeltaEvent` \| `ToolCallEvent` \| `ToolErrorEvent` \| `StatsEvent` \| `DoneEvent` --- ## Page: DeleteCacheParams URL: https://docs.totem.ing/api/totemsdk-qvac/type-aliases/DeleteCacheParams [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / DeleteCacheParams # Type Alias: DeleteCacheParams > **DeleteCacheParams** = \{ `all`: `true`; \} \| \{ `kvCacheKey`: `string`; `modelId?`: `string`; \} --- ## Page: LogLevel URL: https://docs.totem.ing/api/totemsdk-qvac/type-aliases/LogLevel [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / LogLevel # Type Alias: LogLevel > **LogLevel** = `"error"` \| `"off"` \| `"warn"` \| `"info"` \| `"debug"` --- ## Page: QvacOpShape URL: https://docs.totem.ing/api/totemsdk-qvac/type-aliases/QvacOpShape [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / QvacOpShape # Type Alias: QvacOpShape > **QvacOpShape** = \{ `kind`: `"record"`; \} \| \{ `argKeys`: readonly `string`[]; `kind`: `"positional"`; \} \| \{ `kind`: `"callback"`; `paramKey`: `string`; \} How a QVAC operation must be invoked on the SDK surface, because the upstream `@qvac/sdk@0.19.0` surface is not uniformly record-param: - `record` — the default: `sdk[op](params, opts?)`. - `positional` — exotic helpers that take positional args: `sdk[op](...argKeys.map(k => params[k]), opts?)`. e.g. `vlaPreprocessImage(pixels, width, height, options?)` and `vlaPadState(state, targetDim?)`. - `callback` — event-subscription helpers that take a handler function and return a teardown: `sdk[op](params[paramKey])` → data becomes `{ unsubscribe }`. e.g. `subscribeServerLogs(handler)`. The mapped op-shape catalog lives in [QVAC\_OP\_SHAPES](../variables/QVAC_OP_SHAPES.md) and is mirrored by the per-op `shape` field in `api-snapshot.ts`. --- ## Page: QvacRuntimeBehaviorScenario URL: https://docs.totem.ing/api/totemsdk-qvac/type-aliases/QvacRuntimeBehaviorScenario [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / QvacRuntimeBehaviorScenario # Type Alias: QvacRuntimeBehaviorScenario > **QvacRuntimeBehaviorScenario** = `"in-flight-runs-die-with-runtime"` \| `"restart-does-not-resume"` \| `"orphan-chunk-reindexing"` --- ## Page: QvacUsageExtractor URL: https://docs.totem.ing/api/totemsdk-qvac/type-aliases/QvacUsageExtractor [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / QvacUsageExtractor # Type Alias: QvacUsageExtractor > **QvacUsageExtractor** = (`domain`, `op`, `raw`) => `Partial`\<`IntelligenceUsage`\> \| `undefined` Extracts usage from an op result. Best-effort: looks for `stats`, `usage`, or flat token/duration fields. ## Parameters ### domain `string` ### op `string` ### raw `unknown` ## Returns `Partial`\<`IntelligenceUsage`\> \| `undefined` --- ## Page: RagDeleteEmbeddingsParams URL: https://docs.totem.ing/api/totemsdk-qvac/type-aliases/RagDeleteEmbeddingsParams [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / RagDeleteEmbeddingsParams # Type Alias: RagDeleteEmbeddingsParams > **RagDeleteEmbeddingsParams** = `object` ## Properties ### id? > `optional` **id?**: `string` \| `string`[] *** ### workspaceId? > `optional` **workspaceId?**: `string` --- ## Page: RagWorkspaceOp URL: https://docs.totem.ing/api/totemsdk-qvac/type-aliases/RagWorkspaceOp [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / RagWorkspaceOp # Type Alias: RagWorkspaceOp > **RagWorkspaceOp** = *typeof* [`RAG_WORKSPACE_OPS`](../variables/RAG_WORKSPACE_OPS.md)\[`number`\] --- ## Page: StopReason URL: https://docs.totem.ing/api/totemsdk-qvac/type-aliases/StopReason [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / StopReason # Type Alias: StopReason > **StopReason** = `"cancelled"` \| `"eos"` \| `"length"` \| `"stopSequence"` --- ## Page: TtsPace URL: https://docs.totem.ing/api/totemsdk-qvac/type-aliases/TtsPace [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / TtsPace # Type Alias: TtsPace > **TtsPace** = `"slow"` \| `"moderate"` \| `"fast"` --- ## Page: VlaEmbodimentSelection URL: https://docs.totem.ing/api/totemsdk-qvac/type-aliases/VlaEmbodimentSelection [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / VlaEmbodimentSelection # Type Alias: VlaEmbodimentSelection > **VlaEmbodimentSelection** = `string` \| `number` \| \{ `catId?`: `never`; `numCameras?`: `number`; `tag`: `string`; \} \| \{ `catId`: `number`; `numCameras?`: `number`; `tag?`: `never`; \} --- ## Page: WorldCreateSceneResult URL: https://docs.totem.ing/api/totemsdk-qvac/type-aliases/WorldCreateSceneResult [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / WorldCreateSceneResult # Type Alias: WorldCreateSceneResult > **WorldCreateSceneResult** = [`WorldSceneResult`](../interfaces/WorldSceneResult.md) \| [`WorldSceneResultWithPack`](../interfaces/WorldSceneResultWithPack.md) --- ## Page: CONTENT_DENY_CODE URL: https://docs.totem.ing/api/totemsdk-qvac/variables/CONTENT_DENY_CODE [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / CONTENT\_DENY\_CODE # Variable: CONTENT\_DENY\_CODE > `const` **CONTENT\_DENY\_CODE**: `IntelligenceErrorCode` Code for content-access denials. --- ## Page: QVAC_OP_SHAPES URL: https://docs.totem.ing/api/totemsdk-qvac/variables/QVAC_OP_SHAPES [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / QVAC\_OP\_SHAPES # Variable: QVAC\_OP\_SHAPES > `const` **QVAC\_OP\_SHAPES**: `Readonly`\<`Record`\<`string`, [`QvacOpShape`](../type-aliases/QvacOpShape.md)\>\> Op-shape table for the 54-op @qvac/sdk@0.19.0 catalog. Every op not listed here defaults to `record` — positional/callback are the only deviations. --- ## Page: QVAC_PROVIDER_VERIFIED_CLAIMS URL: https://docs.totem.ing/api/totemsdk-qvac/variables/QVAC_PROVIDER_VERIFIED_CLAIMS [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / QVAC\_PROVIDER\_VERIFIED\_CLAIMS # Variable: QVAC\_PROVIDER\_VERIFIED\_CLAIMS > `const` **QVAC\_PROVIDER\_VERIFIED\_CLAIMS**: `object` ## Type Declaration ### boundary > `readonly` **boundary**: `string` ### level > `readonly` **level**: `"provider-verified"` = `'provider-verified'` ### provider > `readonly` **provider**: `"qvac"` = `'qvac'` --- ## Page: RAG_DESTRUCTIVE_OPS URL: https://docs.totem.ing/api/totemsdk-qvac/variables/RAG_DESTRUCTIVE_OPS [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / RAG\_DESTRUCTIVE\_OPS # Variable: RAG\_DESTRUCTIVE\_OPS > `const` **RAG\_DESTRUCTIVE\_OPS**: readonly \[`"ragDeleteEmbeddings"`, `"ragDeleteWorkspace"`, `"ragCloseWorkspace"`, `"ragReindex"`\] Delete-family ops — revoked entitlements must never trigger these. --- ## Page: RAG_WORKSPACE_OPS URL: https://docs.totem.ing/api/totemsdk-qvac/variables/RAG_WORKSPACE_OPS [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / RAG\_WORKSPACE\_OPS # Variable: RAG\_WORKSPACE\_OPS > `const` **RAG\_WORKSPACE\_OPS**: readonly \[`"ragSearch"`, `"ragIngest"`, `"ragSaveEmbeddings"`, `"ragDeleteEmbeddings"`, `"ragReindex"`, `"ragListWorkspaces"`, `"ragCloseWorkspace"`, `"ragDeleteWorkspace"`\] Workspace-scoped RAG operations the content gate governs. --- ## Page: asrDomain URL: https://docs.totem.ing/api/totemsdk-qvac/variables/asrDomain [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / asrDomain # Variable: asrDomain > `const` **asrDomain**: `"asr"` --- ## Page: audiogenDomain URL: https://docs.totem.ing/api/totemsdk-qvac/variables/audiogenDomain [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / audiogenDomain # Variable: audiogenDomain > `const` **audiogenDomain**: `"audiogen"` --- ## Page: classifyDomain URL: https://docs.totem.ing/api/totemsdk-qvac/variables/classifyDomain [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / classifyDomain # Variable: classifyDomain > `const` **classifyDomain**: `"classify"` --- ## Page: diffusionDomain URL: https://docs.totem.ing/api/totemsdk-qvac/variables/diffusionDomain [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / diffusionDomain # Variable: diffusionDomain > `const` **diffusionDomain**: `"diffusion"` --- ## Page: embedDomain URL: https://docs.totem.ing/api/totemsdk-qvac/variables/embedDomain [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / embedDomain # Variable: embedDomain > `const` **embedDomain**: `"embed"` --- ## Page: llmDomain URL: https://docs.totem.ing/api/totemsdk-qvac/variables/llmDomain [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / llmDomain # Variable: llmDomain > `const` **llmDomain**: `"llm"` --- ## Page: modelsDomain URL: https://docs.totem.ing/api/totemsdk-qvac/variables/modelsDomain [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / modelsDomain # Variable: modelsDomain > `const` **modelsDomain**: `"models"` --- ## Page: ocrDomain URL: https://docs.totem.ing/api/totemsdk-qvac/variables/ocrDomain [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / ocrDomain # Variable: ocrDomain > `const` **ocrDomain**: `"ocr"` --- ## Page: pluginsDomain URL: https://docs.totem.ing/api/totemsdk-qvac/variables/pluginsDomain [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / pluginsDomain # Variable: pluginsDomain > `const` **pluginsDomain**: `"plugins"` --- ## Page: ragDomain URL: https://docs.totem.ing/api/totemsdk-qvac/variables/ragDomain [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / ragDomain # Variable: ragDomain > `const` **ragDomain**: `"rag"` --- ## Page: systemDomain URL: https://docs.totem.ing/api/totemsdk-qvac/variables/systemDomain [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / systemDomain # Variable: systemDomain > `const` **systemDomain**: `"system"` --- ## Page: translateDomain URL: https://docs.totem.ing/api/totemsdk-qvac/variables/translateDomain [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / translateDomain # Variable: translateDomain > `const` **translateDomain**: `"translate"` --- ## Page: ttsDomain URL: https://docs.totem.ing/api/totemsdk-qvac/variables/ttsDomain [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / ttsDomain # Variable: ttsDomain > `const` **ttsDomain**: `"tts"` --- ## Page: videoDomain URL: https://docs.totem.ing/api/totemsdk-qvac/variables/videoDomain [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / videoDomain # Variable: videoDomain > `const` **videoDomain**: `"video"` --- ## Page: vlaDomain URL: https://docs.totem.ing/api/totemsdk-qvac/variables/vlaDomain [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / vlaDomain # Variable: vlaDomain > `const` **vlaDomain**: `"vla"` --- ## Page: worldDomain URL: https://docs.totem.ing/api/totemsdk-qvac/variables/worldDomain [**@totemsdk/qvac**](../index.md) *** [@totemsdk/qvac](../index.md) / worldDomain # Variable: worldDomain > `const` **worldDomain**: `"world"` --- ## Page: addRasterManifestToGraph URL: https://docs.totem.ing/api/totemsdk-raster-proof/functions/addRasterManifestToGraph [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / addRasterManifestToGraph # Function: addRasterManifestToGraph() > **addRasterManifestToGraph**(`graph`, `manifest`): `ProofGraph` Add a raster manifest as a 'custom' node to a proof graph (immutable — returns a new graph). ## Parameters ### graph `ProofGraph` ### manifest [`RasterManifest`](../interfaces/RasterManifest.md) ## Returns `ProofGraph` --- ## Page: canonicalJson URL: https://docs.totem.ing/api/totemsdk-raster-proof/functions/canonicalJson [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / canonicalJson # Function: canonicalJson() > **canonicalJson**(`value`): `string` Deterministic canonical JSON with recursively sorted keys. Never use bare JSON.stringify on objects passed to hash or sign operations. ## Parameters ### value `unknown` ## Returns `string` --- ## Page: chunkBytes URL: https://docs.totem.ing/api/totemsdk-raster-proof/functions/chunkBytes [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / chunkBytes # Function: chunkBytes() > **chunkBytes**(`bytes`, `chunkSizeBytes?`): [`RasterChunk`](../interfaces/RasterChunk.md)[] Split bytes into fixed-size chunks (default 64 KiB). Each chunk carries a content hash of its raw bytes. Empty input is rejected. ## Parameters ### bytes `Uint8Array` ### chunkSizeBytes? `number` = `DEFAULT_CHUNK_SIZE_BYTES` ## Returns [`RasterChunk`](../interfaces/RasterChunk.md)[] --- ## Page: computeMerkleRoot URL: https://docs.totem.ing/api/totemsdk-raster-proof/functions/computeMerkleRoot [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / computeMerkleRoot # Function: computeMerkleRoot() > **computeMerkleRoot**(`chunks`): `string` Compute the Merkle root over chunk hashes (deterministic). Odd layers promote the last hash unchanged. ## Parameters ### chunks [`RasterChunk`](../interfaces/RasterChunk.md)[] ## Returns `string` --- ## Page: computeRasterManifestId URL: https://docs.totem.ing/api/totemsdk-raster-proof/functions/computeRasterManifestId [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / computeRasterManifestId # Function: computeRasterManifestId() > **computeRasterManifestId**(`input`): `string` Compute the stable raster manifest ID: "totem:raster:". Deterministic over stable fields — the same logical manifest always hashes to the same identifier. ## Parameters ### input `Omit`\<[`RasterManifest`](../interfaces/RasterManifest.md), `"rasterId"`\> ## Returns `string` --- ## Page: computeRasterWindowProofId URL: https://docs.totem.ing/api/totemsdk-raster-proof/functions/computeRasterWindowProofId [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / computeRasterWindowProofId # Function: computeRasterWindowProofId() > **computeRasterWindowProofId**(`input`): `string` Compute the stable raster window proof ID: "totem:raster-window:". ## Parameters ### input `Omit`\<[`RasterWindowProof`](../interfaces/RasterWindowProof.md), `"windowProofId"`\> ## Returns `string` --- ## Page: createDerivedRasterManifest URL: https://docs.totem.ing/api/totemsdk-raster-proof/functions/createDerivedRasterManifest [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / createDerivedRasterManifest # Function: createDerivedRasterManifest() > **createDerivedRasterManifest**(`params`): [`RasterManifest`](../interfaces/RasterManifest.md) Create a derived raster manifest from source rasters. sourceType is forced to 'derived'; provenance.derivedFrom lists the source raster IDs. ## Parameters ### params [`CreateDerivedRasterManifestParams`](../interfaces/CreateDerivedRasterManifestParams.md) ## Returns [`RasterManifest`](../interfaces/RasterManifest.md) --- ## Page: createMerkleProof URL: https://docs.totem.ing/api/totemsdk-raster-proof/functions/createMerkleProof [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / createMerkleProof # Function: createMerkleProof() > **createMerkleProof**(`chunks`, `leafIndex`): [`RasterMerkleProof`](../interfaces/RasterMerkleProof.md) Build a Merkle inclusion proof for one chunk. The proof's leafHash is the domain-separated leaf hash of that chunk. Callers can reproduce it with merkleLeafHash(chunks[leafIndex]). ## Parameters ### chunks [`RasterChunk`](../interfaces/RasterChunk.md)[] ### leafIndex `number` ## Returns [`RasterMerkleProof`](../interfaces/RasterMerkleProof.md) --- ## Page: createRasterManifest URL: https://docs.totem.ing/api/totemsdk-raster-proof/functions/createRasterManifest [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / createRasterManifest # Function: createRasterManifest() > **createRasterManifest**(`params`): [`RasterManifest`](../interfaces/RasterManifest.md) Create a deterministic RasterManifest. rasterId is computed from stable fields (everything except rasterId and metadata). ## Parameters ### params [`CreateRasterManifestParams`](../interfaces/CreateRasterManifestParams.md) ## Returns [`RasterManifest`](../interfaces/RasterManifest.md) --- ## Page: createRasterMerkleSummary URL: https://docs.totem.ing/api/totemsdk-raster-proof/functions/createRasterMerkleSummary [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / createRasterMerkleSummary # Function: createRasterMerkleSummary() > **createRasterMerkleSummary**(`bytes`, `options?`): [`RasterMerkleSummary`](../interfaces/RasterMerkleSummary.md) Hash bytes, chunk them, and summarize in one edge-safe pass. ## Parameters ### bytes `Uint8Array` ### options? [`RasterMerkleOptions`](../interfaces/RasterMerkleOptions.md) = `{}` ## Returns [`RasterMerkleSummary`](../interfaces/RasterMerkleSummary.md) --- ## Page: createRasterSpatialRelation URL: https://docs.totem.ing/api/totemsdk-raster-proof/functions/createRasterSpatialRelation [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / createRasterSpatialRelation # Function: createRasterSpatialRelation() > **createRasterSpatialRelation**(`params`): `SpatialRelationClaim` Evaluate a spatial relation between a raster footprint and a spatial object, producing a deterministic SpatialRelationClaim via @totemsdk/spatial-proof. Requires the manifest to have bounds. ## Parameters ### params [`CreateRasterSpatialRelationParams`](../interfaces/CreateRasterSpatialRelationParams.md) ## Returns `SpatialRelationClaim` --- ## Page: createRasterWindowProof URL: https://docs.totem.ing/api/totemsdk-raster-proof/functions/createRasterWindowProof [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / createRasterWindowProof # Function: createRasterWindowProof() > **createRasterWindowProof**(`params`): [`RasterWindowProof`](../interfaces/RasterWindowProof.md) Create a deterministic RasterWindowProof. windowProofId is computed from stable fields (everything except windowProofId and metadata). ## Parameters ### params [`CreateRasterWindowProofParams`](../interfaces/CreateRasterWindowProofParams.md) ## Returns [`RasterWindowProof`](../interfaces/RasterWindowProof.md) --- ## Page: createUnsignedRasterProof URL: https://docs.totem.ing/api/totemsdk-raster-proof/functions/createUnsignedRasterProof [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / createUnsignedRasterProof # Function: createUnsignedRasterProof() > **createUnsignedRasterProof**(`params`): `UnsignedProof` Create an unsigned attestation proof for a raster manifest. The proof claims: "this manifest describes this asset, produced by this source, at this time, with this content hash / Merkle root". It does NOT claim the visual interpretation is correct — interpretation is an operator / model / reviewer claim made elsewhere. ## Parameters ### params [`CreateRasterProofParams`](../interfaces/CreateRasterProofParams.md) ## Returns `UnsignedProof` --- ## Page: hashBytes URL: https://docs.totem.ing/api/totemsdk-raster-proof/functions/hashBytes [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / hashBytes # Function: hashBytes() > **hashBytes**(`bytes`): `string` SHA3-256 hash of raw bytes → lowercase hex (no 0x prefix). ## Parameters ### bytes `Uint8Array` ## Returns `string` --- ## Page: hashRasterManifest URL: https://docs.totem.ing/api/totemsdk-raster-proof/functions/hashRasterManifest [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / hashRasterManifest # Function: hashRasterManifest() > **hashRasterManifest**(`manifest`): `string` Hash a complete RasterManifest (excluding rasterId and metadata) to lowercase SHA3-256 hex without a 0x prefix — the value used in EvidenceRef.hash. ## Parameters ### manifest [`RasterManifest`](../interfaces/RasterManifest.md) ## Returns `string` --- ## Page: hashRasterWindowProof URL: https://docs.totem.ing/api/totemsdk-raster-proof/functions/hashRasterWindowProof [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / hashRasterWindowProof # Function: hashRasterWindowProof() > **hashRasterWindowProof**(`proof`): `string` Hash a complete RasterWindowProof (excluding windowProofId and metadata) to lowercase SHA3-256 hex without a 0x prefix. ## Parameters ### proof [`RasterWindowProof`](../interfaces/RasterWindowProof.md) ## Returns `string` --- ## Page: hashString URL: https://docs.totem.ing/api/totemsdk-raster-proof/functions/hashString [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / hashString # Function: hashString() > **hashString**(`value`): `string` SHA3-256 hash of a UTF-8 string → lowercase hex (no 0x prefix). ## Parameters ### value `string` ## Returns `string` --- ## Page: hashSubarray URL: https://docs.totem.ing/api/totemsdk-raster-proof/functions/hashSubarray [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / hashSubarray # Function: hashSubarray() > **hashSubarray**(`bytes`, `offset`, `length`): `string` Hash a chunk's bytes in-place using hashBytes. Kept as a named helper so callers can hash arbitrary sub-byte-ranges without allocating. ## Parameters ### bytes `Uint8Array` ### offset `number` ### length `number` ## Returns `string` --- ## Page: merkleLeafHash URL: https://docs.totem.ing/api/totemsdk-raster-proof/functions/merkleLeafHash [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / merkleLeafHash # Function: merkleLeafHash() > **merkleLeafHash**(`chunk`): `string` Domain-separated Merkle leaf hash for a chunk. A user proving "this chunk is in this tree" recomputes merkleLeafHash(chunk) and compares it to RasterMerkleProof.leafHash before verifying the sibling chain. ## Parameters ### chunk [`RasterChunk`](../interfaces/RasterChunk.md) ## Returns `string` --- ## Page: rasterEvidenceRefs URL: https://docs.totem.ing/api/totemsdk-raster-proof/functions/rasterEvidenceRefs [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / rasterEvidenceRefs # Function: rasterEvidenceRefs() > **rasterEvidenceRefs**(`manifest`, `windowProof?`, `spatialObjectId?`): `EvidenceRef`[] Build the evidence ref list for a raster proof: - raster manifest hash - content hash - Merkle root when present - window proof hash when present - source raster IDs when derived - spatial object ID when present ## Parameters ### manifest [`RasterManifest`](../interfaces/RasterManifest.md) ### windowProof? [`RasterWindowProof`](../interfaces/RasterWindowProof.md) ### spatialObjectId? `string` ## Returns `EvidenceRef`[] --- ## Page: rasterFootprintToSpatialObject URL: https://docs.totem.ing/api/totemsdk-raster-proof/functions/rasterFootprintToSpatialObject [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / rasterFootprintToSpatialObject # Function: rasterFootprintToSpatialObject() > **rasterFootprintToSpatialObject**(`manifest`): `SpatialObject` \| `null` Convert a raster manifest into a spatial object footprint, or null when the manifest has no bounds (nothing to georeference). ## Parameters ### manifest [`RasterManifest`](../interfaces/RasterManifest.md) ## Returns `SpatialObject` \| `null` --- ## Page: rasterManifestToEvidenceRef URL: https://docs.totem.ing/api/totemsdk-raster-proof/functions/rasterManifestToEvidenceRef [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / rasterManifestToEvidenceRef # Function: rasterManifestToEvidenceRef() > **rasterManifestToEvidenceRef**(`manifest`): `EvidenceRef` Convert a RasterManifest into an EvidenceRef for inclusion in a proof. ## Parameters ### manifest [`RasterManifest`](../interfaces/RasterManifest.md) ## Returns `EvidenceRef` --- ## Page: rasterManifestToGraphEdges URL: https://docs.totem.ing/api/totemsdk-raster-proof/functions/rasterManifestToGraphEdges [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / rasterManifestToGraphEdges # Function: rasterManifestToGraphEdges() > **rasterManifestToGraphEdges**(`manifest`): `ProofGraphEdge`[] Build ProofGraphEdges for a raster manifest: derived_from raster → each source raster (when provenance.derivedFrom) references raster → spatial object (when spatial.spatialObjectId) about raster → device (when deviceId) about raster → subject(operator) (when operatorId) about raster → subject(mission) (when missionId) references window proof → raster (see rasterWindowProofToGraphEdges) The "raster supports proof" edge is created by @totemsdk/proofgraph's addProof when the signed proof is added to the graph — this helper has no proof to link at construction time. Edge IDs are deterministic (content-derived in @totemsdk/proofgraph). ## Parameters ### manifest [`RasterManifest`](../interfaces/RasterManifest.md) ## Returns `ProofGraphEdge`[] --- ## Page: rasterManifestToProofGraphNode URL: https://docs.totem.ing/api/totemsdk-raster-proof/functions/rasterManifestToProofGraphNode [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / rasterManifestToProofGraphNode # Function: rasterManifestToProofGraphNode() > **rasterManifestToProofGraphNode**(`manifest`): `ProofGraphNode` Build a ProofGraphNode for a raster manifest ('custom' type). Node ID is deterministic: "custom:". ## Parameters ### manifest [`RasterManifest`](../interfaces/RasterManifest.md) ## Returns `ProofGraphNode` --- ## Page: rasterWindowProofToEvidenceRef URL: https://docs.totem.ing/api/totemsdk-raster-proof/functions/rasterWindowProofToEvidenceRef [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / rasterWindowProofToEvidenceRef # Function: rasterWindowProofToEvidenceRef() > **rasterWindowProofToEvidenceRef**(`proof`): `EvidenceRef` Convert a RasterWindowProof into an EvidenceRef for inclusion in a proof. ## Parameters ### proof [`RasterWindowProof`](../interfaces/RasterWindowProof.md) ## Returns `EvidenceRef` --- ## Page: rasterWindowProofToGraphEdges URL: https://docs.totem.ing/api/totemsdk-raster-proof/functions/rasterWindowProofToGraphEdges [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / rasterWindowProofToGraphEdges # Function: rasterWindowProofToGraphEdges() > **rasterWindowProofToGraphEdges**(`windowProof`): `ProofGraphEdge`[] Build ProofGraphEdges for a raster window proof: derived_from window proof → raster ## Parameters ### windowProof [`RasterWindowProof`](../interfaces/RasterWindowProof.md) ## Returns `ProofGraphEdge`[] --- ## Page: rasterWindowProofToProofGraphNode URL: https://docs.totem.ing/api/totemsdk-raster-proof/functions/rasterWindowProofToProofGraphNode [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / rasterWindowProofToProofGraphNode # Function: rasterWindowProofToProofGraphNode() > **rasterWindowProofToProofGraphNode**(`windowProof`): `ProofGraphNode` Build a ProofGraphNode for a raster window proof ('custom' type). Node ID is deterministic: "custom:". ## Parameters ### windowProof [`RasterWindowProof`](../interfaces/RasterWindowProof.md) ## Returns `ProofGraphNode` --- ## Page: signRasterProof URL: https://docs.totem.ing/api/totemsdk-raster-proof/functions/signRasterProof [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / signRasterProof # Function: signRasterProof() > **signRasterProof**(`unsigned`, `seed`, `keyIndex`): `SignedProof` Sign an unsigned raster proof with a WOTS key. The caller is responsible for reserving the WOTS key index (see @totemsdk/wots-lease) before calling — one-time key warning applies. ## Parameters ### unsigned `UnsignedProof` ### seed `Uint8Array` ### keyIndex `number` ## Returns `SignedProof` --- ## Page: toHex URL: https://docs.totem.ing/api/totemsdk-raster-proof/functions/toHex [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / toHex # Function: toHex() > **toHex**(`bytes`): `string` ## Parameters ### bytes `Uint8Array` ## Returns `string` --- ## Page: validateRasterManifest URL: https://docs.totem.ing/api/totemsdk-raster-proof/functions/validateRasterManifest [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / validateRasterManifest # Function: validateRasterManifest() > **validateRasterManifest**(`manifest`): [`RasterValidationResult`](../interfaces/RasterValidationResult.md) Validate the structure of a RasterManifest. Structural only — does not re-hash bytes (verification of a proof envelope also recomputes the ID and manifest hash). ## Parameters ### manifest [`RasterManifest`](../interfaces/RasterManifest.md) ## Returns [`RasterValidationResult`](../interfaces/RasterValidationResult.md) --- ## Page: verifyMerkleProof URL: https://docs.totem.ing/api/totemsdk-raster-proof/functions/verifyMerkleProof [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / verifyMerkleProof # Function: verifyMerkleProof() > **verifyMerkleProof**(`proof`): `boolean` Verify a Merkle inclusion proof against its own root. Structural check — recomputes the root from leafHash + siblings and compares. ## Parameters ### proof [`RasterMerkleProof`](../interfaces/RasterMerkleProof.md) ## Returns `boolean` --- ## Page: verifyRasterDerivation URL: https://docs.totem.ing/api/totemsdk-raster-proof/functions/verifyRasterDerivation [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / verifyRasterDerivation # Function: verifyRasterDerivation() > **verifyRasterDerivation**(`manifest`, `sourceManifests`): [`RasterDerivationVerifyResult`](../interfaces/RasterDerivationVerifyResult.md) Verify the declared provenance structure of a derived raster manifest against the supplied source manifests. ## Parameters ### manifest [`RasterManifest`](../interfaces/RasterManifest.md) ### sourceManifests [`RasterManifest`](../interfaces/RasterManifest.md)[] ## Returns [`RasterDerivationVerifyResult`](../interfaces/RasterDerivationVerifyResult.md) --- ## Page: verifyRasterProof URL: https://docs.totem.ing/api/totemsdk-raster-proof/functions/verifyRasterProof [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / verifyRasterProof # Function: verifyRasterProof() > **verifyRasterProof**(`signed`): [`RasterProofVerifyResult`](../interfaces/RasterProofVerifyResult.md) Verify a signed raster proof end to end. Checks: 1. the underlying @totemsdk/proof verification (signature, proofId, expiry) 2. payload contains a structurally valid RasterManifest 3. the manifest rasterId matches a recomputation from its fields 4. the manifest evidence hash matches the payload manifest 5. content hash and Merkle root evidence refs are present when declared 6. window proof (when supplied) has a recomputable ID, matches the manifest's Merkle root, and any supplied Merkle proofs verify 7. provenance structure is valid for derived rasters Anchoring is not required. Source raster manifests are not supplied inside the proof, so derivation checks are structural only (full cross-source verification is @totemsdk/raster-proof's verifyRasterDerivation). ## Parameters ### signed `SignedProof` ## Returns [`RasterProofVerifyResult`](../interfaces/RasterProofVerifyResult.md) --- ## Page: CreateDerivedRasterManifestParams URL: https://docs.totem.ing/api/totemsdk-raster-proof/interfaces/CreateDerivedRasterManifestParams [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / CreateDerivedRasterManifestParams # Interface: CreateDerivedRasterManifestParams ## Properties ### asset > **asset**: [`RasterAssetRef`](RasterAssetRef.md) *** ### capturedAt? > `optional` **capturedAt?**: `number` *** ### createdAt? > `optional` **createdAt?**: `number` *** ### deviceId? > `optional` **deviceId?**: `string` *** ### layerType > **layerType**: [`RasterLayerType`](../type-aliases/RasterLayerType.md) *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### missionId? > `optional` **missionId?**: `string` *** ### modelId? > `optional` **modelId?**: `string` *** ### operatorId? > `optional` **operatorId?**: `string` *** ### parametersHash? > `optional` **parametersHash?**: `string` *** ### pipelineId? > `optional` **pipelineId?**: `string` *** ### pipelineVersion? > `optional` **pipelineVersion?**: `string` *** ### providerId? > `optional` **providerId?**: `string` *** ### sceneId? > `optional` **sceneId?**: `string` *** ### sourceManifests > **sourceManifests**: [`RasterManifest`](RasterManifest.md)[] *** ### spatial? > `optional` **spatial?**: [`RasterSpatialMetadata`](RasterSpatialMetadata.md) *** ### uncertainty? > `optional` **uncertainty?**: `string`[] --- ## Page: CreateRasterManifestParams URL: https://docs.totem.ing/api/totemsdk-raster-proof/interfaces/CreateRasterManifestParams [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / CreateRasterManifestParams # Interface: CreateRasterManifestParams ## Properties ### asset > **asset**: [`RasterAssetRef`](RasterAssetRef.md) *** ### capturedAt? > `optional` **capturedAt?**: `number` *** ### createdAt? > `optional` **createdAt?**: `number` *** ### deviceId? > `optional` **deviceId?**: `string` *** ### layerType > **layerType**: [`RasterLayerType`](../type-aliases/RasterLayerType.md) *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### missionId? > `optional` **missionId?**: `string` *** ### operatorId? > `optional` **operatorId?**: `string` *** ### provenance? > `optional` **provenance?**: [`RasterProvenance`](RasterProvenance.md) *** ### providerId? > `optional` **providerId?**: `string` *** ### sceneId? > `optional` **sceneId?**: `string` *** ### sourceType > **sourceType**: [`RasterSourceType`](../type-aliases/RasterSourceType.md) *** ### spatial? > `optional` **spatial?**: [`RasterSpatialMetadata`](RasterSpatialMetadata.md) --- ## Page: CreateRasterProofParams URL: https://docs.totem.ing/api/totemsdk-raster-proof/interfaces/CreateRasterProofParams [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / CreateRasterProofParams # Interface: CreateRasterProofParams ## Properties ### expiresAt? > `optional` **expiresAt?**: `number` *** ### issuedAt? > `optional` **issuedAt?**: `number` *** ### issuer? > `optional` **issuer?**: `string` *** ### manifest > **manifest**: [`RasterManifest`](RasterManifest.md) *** ### merkleProofs? > `optional` **merkleProofs?**: [`RasterMerkleProof`](RasterMerkleProof.md)[] Full Merkle proofs for chunks referenced by windowProof (optional, enables leaf-level verification). *** ### spatialObjectId? > `optional` **spatialObjectId?**: `string` Spatial object ID referenced by the raster footprint (added as evidence ref). *** ### windowProof? > `optional` **windowProof?**: [`RasterWindowProof`](RasterWindowProof.md) --- ## Page: CreateRasterSpatialRelationParams URL: https://docs.totem.ing/api/totemsdk-raster-proof/interfaces/CreateRasterSpatialRelationParams [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / CreateRasterSpatialRelationParams # Interface: CreateRasterSpatialRelationParams ## Properties ### computedAt? > `optional` **computedAt?**: `number` *** ### manifest > **manifest**: [`RasterManifest`](RasterManifest.md) *** ### maxDistanceM? > `optional` **maxDistanceM?**: `number` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### relation > **relation**: `SpatialRelationType` *** ### spatialObject > **spatialObject**: `SpatialObject` Spatial object from @totemsdk/spatial-proof (site boundary, zone, route, …). *** ### subjectProofId? > `optional` **subjectProofId?**: `string` --- ## Page: CreateRasterWindowProofParams URL: https://docs.totem.ing/api/totemsdk-raster-proof/interfaces/CreateRasterWindowProofParams [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / CreateRasterWindowProofParams # Interface: CreateRasterWindowProofParams ## Properties ### chunkHashes > **chunkHashes**: `string`[] *** ### chunkIndices > **chunkIndices**: `number`[] *** ### createdAt? > `optional` **createdAt?**: `number` *** ### merkleRoot > **merkleRoot**: `string` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### rasterId > **rasterId**: `string` *** ### spatial? > `optional` **spatial?**: [`RasterSpatialMetadata`](RasterSpatialMetadata.md) --- ## Page: RasterAssetRef URL: https://docs.totem.ing/api/totemsdk-raster-proof/interfaces/RasterAssetRef [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / RasterAssetRef # Interface: RasterAssetRef ## Properties ### byteSize? > `optional` **byteSize?**: `number` *** ### chunkSizeBytes? > `optional` **chunkSizeBytes?**: `number` *** ### contentHash > **contentHash**: `string` *** ### format > **format**: [`RasterAssetFormat`](../type-aliases/RasterAssetFormat.md) *** ### hashAlgorithm > **hashAlgorithm**: `"sha3-256"` *** ### mediaType? > `optional` **mediaType?**: `string` *** ### merkleRoot? > `optional` **merkleRoot?**: `string` *** ### uri? > `optional` **uri?**: `string` --- ## Page: RasterChunk URL: https://docs.totem.ing/api/totemsdk-raster-proof/interfaces/RasterChunk [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / RasterChunk # Interface: RasterChunk ## Properties ### hash > **hash**: `string` *** ### index > **index**: `number` *** ### length > **length**: `number` *** ### offset > **offset**: `number` --- ## Page: RasterDerivationVerifyResult URL: https://docs.totem.ing/api/totemsdk-raster-proof/interfaces/RasterDerivationVerifyResult [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / RasterDerivationVerifyResult # Interface: RasterDerivationVerifyResult ## Properties ### missingSources? > `optional` **missingSources?**: `string`[] *** ### reasons? > `optional` **reasons?**: `string`[] *** ### sourceRasterIds? > `optional` **sourceRasterIds?**: `string`[] *** ### uncertainty? > `optional` **uncertainty?**: `string`[] *** ### valid > **valid**: `boolean` --- ## Page: RasterManifest URL: https://docs.totem.ing/api/totemsdk-raster-proof/interfaces/RasterManifest [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / RasterManifest # Interface: RasterManifest ## Properties ### asset > **asset**: [`RasterAssetRef`](RasterAssetRef.md) *** ### capturedAt? > `optional` **capturedAt?**: `number` *** ### createdAt > **createdAt**: `number` *** ### deviceId? > `optional` **deviceId?**: `string` *** ### layerType > **layerType**: [`RasterLayerType`](../type-aliases/RasterLayerType.md) *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### missionId? > `optional` **missionId?**: `string` *** ### operatorId? > `optional` **operatorId?**: `string` *** ### provenance? > `optional` **provenance?**: [`RasterProvenance`](RasterProvenance.md) *** ### providerId? > `optional` **providerId?**: `string` *** ### rasterId > **rasterId**: `string` *** ### sceneId? > `optional` **sceneId?**: `string` *** ### sourceType > **sourceType**: [`RasterSourceType`](../type-aliases/RasterSourceType.md) *** ### spatial? > `optional` **spatial?**: [`RasterSpatialMetadata`](RasterSpatialMetadata.md) --- ## Page: RasterMerkleOptions URL: https://docs.totem.ing/api/totemsdk-raster-proof/interfaces/RasterMerkleOptions [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / RasterMerkleOptions # Interface: RasterMerkleOptions ## Properties ### chunkSizeBytes? > `optional` **chunkSizeBytes?**: `number` --- ## Page: RasterMerkleProof URL: https://docs.totem.ing/api/totemsdk-raster-proof/interfaces/RasterMerkleProof [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / RasterMerkleProof # Interface: RasterMerkleProof ## Properties ### hashAlgorithm > **hashAlgorithm**: `"sha3-256"` *** ### leafHash > **leafHash**: `string` *** ### leafIndex > **leafIndex**: `number` *** ### root > **root**: `string` *** ### siblings > **siblings**: `object`[] #### hash > **hash**: `string` #### position > **position**: `"left"` \| `"right"` --- ## Page: RasterMerkleSummary URL: https://docs.totem.ing/api/totemsdk-raster-proof/interfaces/RasterMerkleSummary [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / RasterMerkleSummary # Interface: RasterMerkleSummary ## Properties ### byteSize > **byteSize**: `number` *** ### chunkCount > **chunkCount**: `number` *** ### chunkSizeBytes > **chunkSizeBytes**: `number` *** ### contentHash > **contentHash**: `string` *** ### merkleRoot > **merkleRoot**: `string` --- ## Page: RasterProofVerifyResult URL: https://docs.totem.ing/api/totemsdk-raster-proof/interfaces/RasterProofVerifyResult [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / RasterProofVerifyResult # Interface: RasterProofVerifyResult ## Properties ### derivationValid? > `optional` **derivationValid?**: `boolean` *** ### manifestHashValid? > `optional` **manifestHashValid?**: `boolean` *** ### payloadValid? > `optional` **payloadValid?**: `boolean` *** ### rasterId? > `optional` **rasterId?**: `string` *** ### rasterIdValid? > `optional` **rasterIdValid?**: `boolean` *** ### reason? > `optional` **reason?**: `string` *** ### signerAddress? > `optional` **signerAddress?**: `string` *** ### valid > **valid**: `boolean` *** ### windowProofValid? > `optional` **windowProofValid?**: `boolean` --- ## Page: RasterProvenance URL: https://docs.totem.ing/api/totemsdk-raster-proof/interfaces/RasterProvenance [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / RasterProvenance # Interface: RasterProvenance ## Properties ### derivedFrom? > `optional` **derivedFrom?**: `string`[] *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### modelId? > `optional` **modelId?**: `string` *** ### operatorId? > `optional` **operatorId?**: `string` *** ### parametersHash? > `optional` **parametersHash?**: `string` *** ### pipelineId? > `optional` **pipelineId?**: `string` *** ### pipelineVersion? > `optional` **pipelineVersion?**: `string` *** ### uncertainty? > `optional` **uncertainty?**: `string`[] --- ## Page: RasterSpatialMetadata URL: https://docs.totem.ing/api/totemsdk-raster-proof/interfaces/RasterSpatialMetadata [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / RasterSpatialMetadata # Interface: RasterSpatialMetadata Spatial context for a raster asset. Bounds are GeoJSON order: [minLon, minLat, maxLon, maxLat] (WGS84 / EPSG:4326). ## Properties ### bounds? > `optional` **bounds?**: \[`number`, `number`, `number`, `number`\] *** ### crs? > `optional` **crs?**: `string` *** ### geometryHash? > `optional` **geometryHash?**: `string` totem:geo: hash of the footprint geometry (via @totemsdk/spatial-proof). *** ### heightPx? > `optional` **heightPx?**: `number` *** ### resolutionM? > `optional` **resolutionM?**: `number` *** ### spatialObjectId? > `optional` **spatialObjectId?**: `string` totem:spatial: spatial object ID the footprint maps to. *** ### widthPx? > `optional` **widthPx?**: `number` --- ## Page: RasterValidationResult URL: https://docs.totem.ing/api/totemsdk-raster-proof/interfaces/RasterValidationResult [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / RasterValidationResult # Interface: RasterValidationResult ## Properties ### errors > **errors**: `string`[] *** ### valid > **valid**: `boolean` *** ### warnings > **warnings**: `string`[] --- ## Page: RasterWindowProof URL: https://docs.totem.ing/api/totemsdk-raster-proof/interfaces/RasterWindowProof [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / RasterWindowProof # Interface: RasterWindowProof ## Properties ### chunkHashes > **chunkHashes**: `string`[] *** ### chunkIndices > **chunkIndices**: `number`[] *** ### createdAt > **createdAt**: `number` *** ### merkleRoot > **merkleRoot**: `string` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### rasterId > **rasterId**: `string` *** ### spatial? > `optional` **spatial?**: [`RasterSpatialMetadata`](RasterSpatialMetadata.md) *** ### windowProofId > **windowProofId**: `string` --- ## Page: RasterAssetFormat URL: https://docs.totem.ing/api/totemsdk-raster-proof/type-aliases/RasterAssetFormat [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / RasterAssetFormat # Type Alias: RasterAssetFormat > **RasterAssetFormat** = `"geotiff"` \| `"cog"` \| `"png"` \| `"jpeg"` \| `"webp"` \| `"mbtiles"` \| `"zarr"` \| `"npy"` \| `"raw"` \| `"other"` --- ## Page: RasterLayerType URL: https://docs.totem.ing/api/totemsdk-raster-proof/type-aliases/RasterLayerType [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / RasterLayerType # Type Alias: RasterLayerType > **RasterLayerType** = `"rgb"` \| `"thermal"` \| `"multispectral"` \| `"sar"` \| `"lidar-derived"` \| `"depth"` \| `"change-mask"` \| `"water-mask"` \| `"vegetation-mask"` \| `"bare-earth-mask"` \| `"cloud-mask"` \| `"uncertainty-mask"` \| `"custom"` --- ## Page: RasterSourceType URL: https://docs.totem.ing/api/totemsdk-raster-proof/type-aliases/RasterSourceType [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / RasterSourceType # Type Alias: RasterSourceType > **RasterSourceType** = `"satellite"` \| `"drone"` \| `"camera"` \| `"robot-camera"` \| `"thermal-camera"` \| `"lidar-derived"` \| `"radar"` \| `"map-tile"` \| `"derived"` \| `"manual-import"` \| `"other"` @totemsdk/raster-proof — Type definitions Pure schema for raster and visual evidence proofs. This package proves bytes, manifests, provenance, windows and declared relationships. It does NOT process raster bytes — no decoding, no GDAL, no cloud masking, no NDVI, no ML. It only hashes bytes and records the metadata that makes them verifiable. No network, no storage, no map rendering, no GIS engine dependency. --- ## Page: DEFAULT_CHUNK_SIZE_BYTES URL: https://docs.totem.ing/api/totemsdk-raster-proof/variables/DEFAULT_CHUNK_SIZE_BYTES [**@totemsdk/raster-proof**](../index.md) *** [@totemsdk/raster-proof](../index.md) / DEFAULT\_CHUNK\_SIZE\_BYTES # Variable: DEFAULT\_CHUNK\_SIZE\_BYTES > `const` **DEFAULT\_CHUNK\_SIZE\_BYTES**: `number` --- ## Page: LookupBackend URL: https://docs.totem.ing/api/totemsdk-realtime/classes/LookupBackend [**@totemsdk/realtime**](../index.md) *** [@totemsdk/realtime](../index.md) / LookupBackend # Class: LookupBackend Plug-in interface for the portfolio data source. Implement this to use any chain provider — LookupNode, a raw Minima RPC, a custom indexer — instead of the default Axia hosted API. ## Examples **— sovereign LookupNode** ```ts import { LookupBackend } from '@totemsdk/realtime'; import { connectLookupNode } from '@totemsdk/lookup-client'; const client = await connectLookupNode({ hyperswarmTopic: 'abc...' }); const manager = createPortfolioStreamManager(deps, { backend: new LookupBackend(client), }); ``` **— direct Minima node (polling)** ```ts import { MinimaRpcBackend } from '@totemsdk/realtime'; import { createMinimaRpcClient } from '@totemsdk/minima-rpc'; const rpc = createMinimaRpcClient({ host: 'localhost', port: 9005 }); const manager = createPortfolioStreamManager(deps, { backend: new MinimaRpcBackend(rpc), }); ``` ## Implements - [`PortfolioBackend`](../interfaces/PortfolioBackend.md) ## Constructors ### Constructor > **new LookupBackend**(`client`): `LookupBackend` #### Parameters ##### client [`LookupLike`](../interfaces/LookupLike.md) #### Returns `LookupBackend` ## Properties ### supportsPush > `readonly` **supportsPush**: `true` = `true` Whether this backend delivers push updates via `subscribe()`. If false or absent the manager will call `getPortfolio()` on a timer. #### Implementation of [`PortfolioBackend`](../interfaces/PortfolioBackend.md).[`supportsPush`](../interfaces/PortfolioBackend.md#supportspush) ## Methods ### getPortfolio() > **getPortfolio**(`address`): `Promise`\<[`PortfolioEntry`](../interfaces/PortfolioEntry.md)[]\> Fetch the current portfolio for one address. Called for the initial snapshot and for poll cycles on non-push backends. #### Parameters ##### address `string` #### Returns `Promise`\<[`PortfolioEntry`](../interfaces/PortfolioEntry.md)[]\> #### Implementation of [`PortfolioBackend`](../interfaces/PortfolioBackend.md).[`getPortfolio`](../interfaces/PortfolioBackend.md#getportfolio) *** ### subscribe() > **subscribe**(`addresses`, `onUpdate`): `Promise`\<[`BackendUnsubscribe`](../type-aliases/BackendUnsubscribe.md)\> (Optional) Subscribe to real-time updates for a set of addresses. Only called when `supportsPush` is true. Must call `onUpdate(address, entries)` whenever the portfolio changes. Returns an unsubscribe function to clean up listeners and watches. #### Parameters ##### addresses `string`[] ##### onUpdate (`address`, `entries`) => `void` #### Returns `Promise`\<[`BackendUnsubscribe`](../type-aliases/BackendUnsubscribe.md)\> #### Implementation of [`PortfolioBackend`](../interfaces/PortfolioBackend.md).[`subscribe`](../interfaces/PortfolioBackend.md#subscribe) --- ## Page: MinimaRpcBackend URL: https://docs.totem.ing/api/totemsdk-realtime/classes/MinimaRpcBackend [**@totemsdk/realtime**](../index.md) *** [@totemsdk/realtime](../index.md) / MinimaRpcBackend # Class: MinimaRpcBackend Plug-in interface for the portfolio data source. Implement this to use any chain provider — LookupNode, a raw Minima RPC, a custom indexer — instead of the default Axia hosted API. ## Examples **— sovereign LookupNode** ```ts import { LookupBackend } from '@totemsdk/realtime'; import { connectLookupNode } from '@totemsdk/lookup-client'; const client = await connectLookupNode({ hyperswarmTopic: 'abc...' }); const manager = createPortfolioStreamManager(deps, { backend: new LookupBackend(client), }); ``` **— direct Minima node (polling)** ```ts import { MinimaRpcBackend } from '@totemsdk/realtime'; import { createMinimaRpcClient } from '@totemsdk/minima-rpc'; const rpc = createMinimaRpcClient({ host: 'localhost', port: 9005 }); const manager = createPortfolioStreamManager(deps, { backend: new MinimaRpcBackend(rpc), }); ``` ## Implements - [`PortfolioBackend`](../interfaces/PortfolioBackend.md) ## Constructors ### Constructor > **new MinimaRpcBackend**(`client`): `MinimaRpcBackend` #### Parameters ##### client [`MinimaRpcLike`](../interfaces/MinimaRpcLike.md) #### Returns `MinimaRpcBackend` ## Properties ### supportsPush > `readonly` **supportsPush**: `false` = `false` Whether this backend delivers push updates via `subscribe()`. If false or absent the manager will call `getPortfolio()` on a timer. #### Implementation of [`PortfolioBackend`](../interfaces/PortfolioBackend.md).[`supportsPush`](../interfaces/PortfolioBackend.md#supportspush) ## Methods ### getPortfolio() > **getPortfolio**(`address`): `Promise`\<[`PortfolioEntry`](../interfaces/PortfolioEntry.md)[]\> Fetch the current portfolio for one address. Called for the initial snapshot and for poll cycles on non-push backends. #### Parameters ##### address `string` #### Returns `Promise`\<[`PortfolioEntry`](../interfaces/PortfolioEntry.md)[]\> #### Implementation of [`PortfolioBackend`](../interfaces/PortfolioBackend.md).[`getPortfolio`](../interfaces/PortfolioBackend.md#getportfolio) --- ## Page: PortfolioCache URL: https://docs.totem.ing/api/totemsdk-realtime/classes/PortfolioCache [**@totemsdk/realtime**](../index.md) *** [@totemsdk/realtime](../index.md) / PortfolioCache # Class: PortfolioCache ## Constructors ### Constructor > **new PortfolioCache**(`deps`, `config?`): `PortfolioCache` #### Parameters ##### deps [`PortfolioCacheDependencies`](../interfaces/PortfolioCacheDependencies.md) ##### config? [`PortfolioCacheConfig`](../interfaces/PortfolioCacheConfig.md) = `{}` #### Returns `PortfolioCache` ## Methods ### cleanup() > **cleanup**(): `Promise`\<`number`\> #### Returns `Promise`\<`number`\> *** ### clear() > **clear**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### get() > **get**(`address`): `Promise`\<[`PortfolioEntry`](../interfaces/PortfolioEntry.md)[] \| `null`\> #### Parameters ##### address `string` #### Returns `Promise`\<[`PortfolioEntry`](../interfaces/PortfolioEntry.md)[] \| `null`\> *** ### getAll() > **getAll**(): `Promise`\<`Record`\<`string`, [`PortfolioEntry`](../interfaces/PortfolioEntry.md)[]\>\> #### Returns `Promise`\<`Record`\<`string`, [`PortfolioEntry`](../interfaces/PortfolioEntry.md)[]\>\> *** ### getInMemory() > **getInMemory**(`address`): [`PortfolioEntry`](../interfaces/PortfolioEntry.md)[] \| `null` #### Parameters ##### address `string` #### Returns [`PortfolioEntry`](../interfaces/PortfolioEntry.md)[] \| `null` *** ### remove() > **remove**(`address`): `Promise`\<`void`\> #### Parameters ##### address `string` #### Returns `Promise`\<`void`\> *** ### set() > **set**(`address`, `entries`): `Promise`\<`void`\> #### Parameters ##### address `string` ##### entries [`PortfolioEntry`](../interfaces/PortfolioEntry.md)[] #### Returns `Promise`\<`void`\> --- ## Page: PortfolioStreamManager URL: https://docs.totem.ing/api/totemsdk-realtime/classes/PortfolioStreamManager [**@totemsdk/realtime**](../index.md) *** [@totemsdk/realtime](../index.md) / PortfolioStreamManager # Class: PortfolioStreamManager ## Constructors ### Constructor > **new PortfolioStreamManager**(`deps`, `config`): `PortfolioStreamManager` #### Parameters ##### deps [`PortfolioStreamDependencies`](../interfaces/PortfolioStreamDependencies.md) ##### config [`PortfolioStreamConfig`](../interfaces/PortfolioStreamConfig.md) #### Returns `PortfolioStreamManager` ## Methods ### addListener() > **addListener**(`listener`): `void` #### Parameters ##### listener [`PortfolioStreamListener`](../interfaces/PortfolioStreamListener.md) #### Returns `void` *** ### dispose() > **dispose**(): `void` #### Returns `void` *** ### forceRefresh() > **forceRefresh**(): `Promise`\<`void`\> Force an immediate HTTP portfolio fetch. Rate-limited to once every 5 seconds. #### Returns `Promise`\<`void`\> *** ### getCachedPortfolio() > **getCachedPortfolio**(`address`): `Promise`\<[`PortfolioEntry`](../interfaces/PortfolioEntry.md)[] \| `null`\> #### Parameters ##### address `string` #### Returns `Promise`\<[`PortfolioEntry`](../interfaces/PortfolioEntry.md)[] \| `null`\> *** ### getConnectionState() > **getConnectionState**(): [`ConnectionState`](../type-aliases/ConnectionState.md) #### Returns [`ConnectionState`](../type-aliases/ConnectionState.md) *** ### getSnapshot() > **getSnapshot**(`addresses?`): `Promise`\<\{ `connectionState`: [`ConnectionState`](../type-aliases/ConnectionState.md); `error?`: `string`; `portfolios`: `Record`\<`string`, [`PortfolioEntry`](../interfaces/PortfolioEntry.md)[]\>; \}\> Get a snapshot of cached portfolios for a set of addresses. #### Parameters ##### addresses? `string`[] #### Returns `Promise`\<\{ `connectionState`: [`ConnectionState`](../type-aliases/ConnectionState.md); `error?`: `string`; `portfolios`: `Record`\<`string`, [`PortfolioEntry`](../interfaces/PortfolioEntry.md)[]\>; \}\> *** ### isCurrentlyStreaming() > **isCurrentlyStreaming**(): `boolean` #### Returns `boolean` *** ### removeListener() > **removeListener**(`listener`): `void` #### Parameters ##### listener [`PortfolioStreamListener`](../interfaces/PortfolioStreamListener.md) #### Returns `void` *** ### start() > **start**(`addresses`): `Promise`\<`void`\> #### Parameters ##### addresses `string`[] #### Returns `Promise`\<`void`\> *** ### stop() > **stop**(): `void` #### Returns `void` *** ### triggerReplay() > **triggerReplay**(): `Promise`\<`void`\> Replay the current cache to all listeners without triggering a new subscription. #### Returns `Promise`\<`void`\> *** ### updateAddresses() > **updateAddresses**(`addresses`): `Promise`\<`void`\> #### Parameters ##### addresses `string`[] #### Returns `Promise`\<`void`\> --- ## Page: classifyKind URL: https://docs.totem.ing/api/totemsdk-realtime/functions/classifyKind [**@totemsdk/realtime**](../index.md) *** [@totemsdk/realtime](../index.md) / classifyKind # Function: classifyKind() > **classifyKind**(`tokenid`, `decimals`, `total`, `artimage`): `"native"` \| `"token"` \| `"nft"` Classify a portfolio entry based on its fields. All three conditions must be met for 'nft': 1. artimage is present (non-empty string) 2. decimals === 0 3. total === '1' Everything else with a non-'0x00' tokenid is 'token'. ## Parameters ### tokenid `string` ### decimals `number` ### total `string` ### artimage `string` \| `undefined` ## Returns `"native"` \| `"token"` \| `"nft"` --- ## Page: createPortfolioStreamManager URL: https://docs.totem.ing/api/totemsdk-realtime/functions/createPortfolioStreamManager [**@totemsdk/realtime**](../index.md) *** [@totemsdk/realtime](../index.md) / createPortfolioStreamManager # Function: createPortfolioStreamManager() > **createPortfolioStreamManager**(`deps`, `config`): [`PortfolioStreamManager`](../classes/PortfolioStreamManager.md) ## Parameters ### deps `Omit`\<[`PortfolioStreamDependencies`](../interfaces/PortfolioStreamDependencies.md), `"portfolioCache"`\> & `object` ### config [`PortfolioStreamConfig`](../interfaces/PortfolioStreamConfig.md) ## Returns [`PortfolioStreamManager`](../classes/PortfolioStreamManager.md) --- ## Page: toPortfolioEntry URL: https://docs.totem.ing/api/totemsdk-realtime/functions/toPortfolioEntry [**@totemsdk/realtime**](../index.md) *** [@totemsdk/realtime](../index.md) / toPortfolioEntry # Function: toPortfolioEntry() > **toPortfolioEntry**(`raw`, `address`): [`PortfolioEntry`](../interfaces/PortfolioEntry.md) Normalise a raw balance / coin entry to a PortfolioEntry. ## Parameters ### raw [`RawBalanceEntry`](../interfaces/RawBalanceEntry.md) Raw entry from any backend ### address `string` The address this entry belongs to (required for the field) ## Returns [`PortfolioEntry`](../interfaces/PortfolioEntry.md) --- ## Page: LookupLike URL: https://docs.totem.ing/api/totemsdk-realtime/interfaces/LookupLike [**@totemsdk/realtime**](../index.md) *** [@totemsdk/realtime](../index.md) / LookupLike # Interface: LookupLike Duck-typed subset of LookupClient that LookupBackend needs. A real @totemsdk/lookup-client `LookupClient` satisfies this automatically. ## Methods ### getCoins() > **getCoins**(`query`): `Promise`\<`LookupCoin`[]\> #### Parameters ##### query ###### address? `string` ###### relevant? `boolean` ###### sendable? `boolean` #### Returns `Promise`\<`LookupCoin`[]\> *** ### subscribeCoinUpdates() > **subscribeCoinUpdates**(`cb`): () => `void` #### Parameters ##### cb (`event`) => `void` #### Returns () => `void` *** ### watchAddress() > **watchAddress**(`address`): `Promise`\<`void`\> #### Parameters ##### address `string` #### Returns `Promise`\<`void`\> --- ## Page: MinimaRpcLike URL: https://docs.totem.ing/api/totemsdk-realtime/interfaces/MinimaRpcLike [**@totemsdk/realtime**](../index.md) *** [@totemsdk/realtime](../index.md) / MinimaRpcLike # Interface: MinimaRpcLike Duck-typed subset of MinimaRpcClient that MinimaRpcBackend needs. A real @totemsdk/minima-rpc `MinimaRpcClient` satisfies this automatically. ## Methods ### balance() > **balance**(`params?`): `Promise`\<`MinimaBalance`[]\> #### Parameters ##### params? ###### address? `string` ###### megammr? `boolean` ###### tokendetails? `boolean` #### Returns `Promise`\<`MinimaBalance`[]\> --- ## Page: PortfolioBackend URL: https://docs.totem.ing/api/totemsdk-realtime/interfaces/PortfolioBackend [**@totemsdk/realtime**](../index.md) *** [@totemsdk/realtime](../index.md) / PortfolioBackend # Interface: PortfolioBackend Plug-in interface for the portfolio data source. Implement this to use any chain provider — LookupNode, a raw Minima RPC, a custom indexer — instead of the default Axia hosted API. ## Examples **— sovereign LookupNode** ```ts import { LookupBackend } from '@totemsdk/realtime'; import { connectLookupNode } from '@totemsdk/lookup-client'; const client = await connectLookupNode({ hyperswarmTopic: 'abc...' }); const manager = createPortfolioStreamManager(deps, { backend: new LookupBackend(client), }); ``` **— direct Minima node (polling)** ```ts import { MinimaRpcBackend } from '@totemsdk/realtime'; import { createMinimaRpcClient } from '@totemsdk/minima-rpc'; const rpc = createMinimaRpcClient({ host: 'localhost', port: 9005 }); const manager = createPortfolioStreamManager(deps, { backend: new MinimaRpcBackend(rpc), }); ``` ## Properties ### supportsPush? > `readonly` `optional` **supportsPush?**: `boolean` Whether this backend delivers push updates via `subscribe()`. If false or absent the manager will call `getPortfolio()` on a timer. ## Methods ### getPortfolio() > **getPortfolio**(`address`): `Promise`\<[`PortfolioEntry`](PortfolioEntry.md)[]\> Fetch the current portfolio for one address. Called for the initial snapshot and for poll cycles on non-push backends. #### Parameters ##### address `string` #### Returns `Promise`\<[`PortfolioEntry`](PortfolioEntry.md)[]\> *** ### subscribe()? > `optional` **subscribe**(`addresses`, `onUpdate`): `Promise`\<[`BackendUnsubscribe`](../type-aliases/BackendUnsubscribe.md)\> (Optional) Subscribe to real-time updates for a set of addresses. Only called when `supportsPush` is true. Must call `onUpdate(address, entries)` whenever the portfolio changes. Returns an unsubscribe function to clean up listeners and watches. #### Parameters ##### addresses `string`[] ##### onUpdate (`address`, `entries`) => `void` #### Returns `Promise`\<[`BackendUnsubscribe`](../type-aliases/BackendUnsubscribe.md)\> --- ## Page: PortfolioCacheConfig URL: https://docs.totem.ing/api/totemsdk-realtime/interfaces/PortfolioCacheConfig [**@totemsdk/realtime**](../index.md) *** [@totemsdk/realtime](../index.md) / PortfolioCacheConfig # Interface: PortfolioCacheConfig ## Properties ### maxCacheAge? > `optional` **maxCacheAge?**: `number` --- ## Page: PortfolioCacheDependencies URL: https://docs.totem.ing/api/totemsdk-realtime/interfaces/PortfolioCacheDependencies [**@totemsdk/realtime**](../index.md) *** [@totemsdk/realtime](../index.md) / PortfolioCacheDependencies # Interface: PortfolioCacheDependencies ## Properties ### logger > **logger**: `LoggerAdapter` *** ### storage > **storage**: `StorageAdapter` *** ### timer > **timer**: `object` #### now() > **now**(): `number` ##### Returns `number` --- ## Page: PortfolioEntry URL: https://docs.totem.ing/api/totemsdk-realtime/interfaces/PortfolioEntry [**@totemsdk/realtime**](../index.md) *** [@totemsdk/realtime](../index.md) / PortfolioEntry # Interface: PortfolioEntry A single portfolio entry representing one asset held at an address. kind classification: 'native' — tokenid === '0x00' (Minima) 'nft' — artimage present AND decimals === 0 AND total === '1' 'token' — everything else with a non-'0x00' tokenid ## Properties ### address > **address**: `string` *** ### artimage? > `optional` **artimage?**: `string` *** ### coins? > `optional` **coins?**: `number` Number of UTXOs contributing to this balance *** ### confirmed > **confirmed**: `string` *** ### decimals > **decimals**: `number` *** ### description? > `optional` **description?**: `string` \| `null` Token description *** ### icon? > `optional` **icon?**: `string` \| `null` Token icon URL (may be a data URL or hosted URL) *** ### kind > **kind**: `"native"` \| `"token"` \| `"nft"` *** ### name > **name**: `string` *** ### owner? > `optional` **owner?**: `string` \| `null` Token owner address *** ### sendable > **sendable**: `string` *** ### ticker > **ticker**: `string` *** ### tokenid > **tokenid**: `string` *** ### total > **total**: `string` *** ### unconfirmed > **unconfirmed**: `string` *** ### url? > `optional` **url?**: `string` \| `null` Token website URL *** ### webvalidate? > `optional` **webvalidate?**: `string` --- ## Page: PortfolioStreamConfig URL: https://docs.totem.ing/api/totemsdk-realtime/interfaces/PortfolioStreamConfig [**@totemsdk/realtime**](../index.md) *** [@totemsdk/realtime](../index.md) / PortfolioStreamConfig # Interface: PortfolioStreamConfig ## Properties ### backend? > `optional` **backend?**: [`PortfolioBackend`](PortfolioBackend.md) Optional custom backend. When set, all Axia HTTP/WS logic is bypassed. See `PortfolioBackend` for the interface. *** ### baseUrl? > `optional` **baseUrl?**: `string` Axia API base URL. Required when using the default Axia backend. Omit when providing a custom `backend`. *** ### httpPollInterval? > `optional` **httpPollInterval?**: `number` *** ### maxCacheAge? > `optional` **maxCacheAge?**: `number` *** ### projectId? > `optional` **projectId?**: `string` Axia project ID sent as `x-api-key`. Required for the default Axia backend. Omit when providing a custom `backend`. *** ### reconnectDelays? > `optional` **reconnectDelays?**: `number`[] *** ### tokenRefreshBuffer? > `optional` **tokenRefreshBuffer?**: `number` --- ## Page: PortfolioStreamDependencies URL: https://docs.totem.ing/api/totemsdk-realtime/interfaces/PortfolioStreamDependencies [**@totemsdk/realtime**](../index.md) *** [@totemsdk/realtime](../index.md) / PortfolioStreamDependencies # Interface: PortfolioStreamDependencies ## Properties ### http > **http**: `HttpClient` *** ### lifecycle? > `optional` **lifecycle?**: `LifecycleAdapter` *** ### logger > **logger**: `LoggerAdapter` *** ### portfolioCache > **portfolioCache**: [`PortfolioCache`](../classes/PortfolioCache.md) *** ### timer > **timer**: `TimerAdapter` *** ### websocket > **websocket**: `WebSocketFactory` --- ## Page: PortfolioStreamListener URL: https://docs.totem.ing/api/totemsdk-realtime/interfaces/PortfolioStreamListener [**@totemsdk/realtime**](../index.md) *** [@totemsdk/realtime](../index.md) / PortfolioStreamListener # Interface: PortfolioStreamListener ## Properties ### onConnectionStateChange? > `optional` **onConnectionStateChange?**: (`state`, `error?`) => `void` #### Parameters ##### state [`ConnectionState`](../type-aliases/ConnectionState.md) ##### error? `string` #### Returns `void` *** ### onTxConfirmation? > `optional` **onTxConfirmation?**: (`event`) => `void` #### Parameters ##### event [`TxConfirmationEvent`](TxConfirmationEvent.md) #### Returns `void` ## Methods ### onPortfolioUpdate() > **onPortfolioUpdate**(`event`): `void` #### Parameters ##### event [`PortfolioUpdateEvent`](PortfolioUpdateEvent.md) #### Returns `void` --- ## Page: PortfolioUpdateEvent URL: https://docs.totem.ing/api/totemsdk-realtime/interfaces/PortfolioUpdateEvent [**@totemsdk/realtime**](../index.md) *** [@totemsdk/realtime](../index.md) / PortfolioUpdateEvent # Interface: PortfolioUpdateEvent ## Properties ### address > **address**: `string` *** ### entries > **entries**: [`PortfolioEntry`](PortfolioEntry.md)[] *** ### eventId > **eventId**: `string` *** ### timestamp > **timestamp**: `number` *** ### type > **type**: `"portfolio_update"` *** ### version > **version**: `string` --- ## Page: RawBalanceEntry URL: https://docs.totem.ing/api/totemsdk-realtime/interfaces/RawBalanceEntry [**@totemsdk/realtime**](../index.md) *** [@totemsdk/realtime](../index.md) / RawBalanceEntry # Interface: RawBalanceEntry Raw shape accepted by toPortfolioEntry(). All fields are optional — missing fields get safe defaults. ## Properties ### address? > `optional` **address?**: `string` *** ### artimage? > `optional` **artimage?**: `string` *** ### balance? > `optional` **balance?**: `string` alias used by some endpoints *** ### confirmed? > `optional` **confirmed?**: `string` *** ### confirmed\_balance? > `optional` **confirmed\_balance?**: `string` alias used in some responses *** ### decimals? > `optional` **decimals?**: `string` \| `number` *** ### name? > `optional` **name?**: `string` *** ### sendable? > `optional` **sendable?**: `string` *** ### ticker? > `optional` **ticker?**: `string` *** ### token? > `optional` **token?**: `string` \| \{ `artimage?`: `string`; `decimals?`: `string` \| `number`; `description?`: `string`; `name?`: `string`; `ticker?`: `string`; `webvalidate?`: `string`; \} nested token metadata object *** ### token\_id? > `optional` **token\_id?**: `string` hex tokenid used by WS protocol *** ### tokenid? > `optional` **tokenid?**: `string` *** ### total? > `optional` **total?**: `string` canonical total (confirmed + unconfirmed) *** ### unconfirmed? > `optional` **unconfirmed?**: `string` *** ### unconfirmed\_balance? > `optional` **unconfirmed\_balance?**: `string` *** ### webvalidate? > `optional` **webvalidate?**: `string` --- ## Page: TxConfirmationEvent URL: https://docs.totem.ing/api/totemsdk-realtime/interfaces/TxConfirmationEvent [**@totemsdk/realtime**](../index.md) *** [@totemsdk/realtime](../index.md) / TxConfirmationEvent # Interface: TxConfirmationEvent ## Properties ### address > **address**: `string` *** ### amount > **amount**: `string` *** ### block > **block**: `number` *** ### confirmations > **confirmations**: `number` *** ### eventId > **eventId**: `string` *** ### status > **status**: `string` *** ### timestamp > **timestamp**: `number` *** ### tokenid > **tokenid**: `string` *** ### txid > **txid**: `string` *** ### type > **type**: `"tx_confirmation"` *** ### version > **version**: `string` --- ## Page: WebSocketMessage URL: https://docs.totem.ing/api/totemsdk-realtime/interfaces/WebSocketMessage [**@totemsdk/realtime**](../index.md) *** [@totemsdk/realtime](../index.md) / WebSocketMessage # Interface: WebSocketMessage ## Indexable > \[`key`: `string`\]: `any` ## Properties ### type > **type**: `string` --- ## Page: WebSocketTokenResponse URL: https://docs.totem.ing/api/totemsdk-realtime/interfaces/WebSocketTokenResponse [**@totemsdk/realtime**](../index.md) *** [@totemsdk/realtime](../index.md) / WebSocketTokenResponse # Interface: WebSocketTokenResponse ## Properties ### expiresAt? > `optional` **expiresAt?**: `number` *** ### sessionId > **sessionId**: `string` *** ### token > **token**: `string` --- ## Page: BackendUnsubscribe URL: https://docs.totem.ing/api/totemsdk-realtime/type-aliases/BackendUnsubscribe [**@totemsdk/realtime**](../index.md) *** [@totemsdk/realtime](../index.md) / BackendUnsubscribe # Type Alias: BackendUnsubscribe > **BackendUnsubscribe** = () => `void` ## Returns `void` --- ## Page: ConnectionState URL: https://docs.totem.ing/api/totemsdk-realtime/type-aliases/ConnectionState [**@totemsdk/realtime**](../index.md) *** [@totemsdk/realtime](../index.md) / ConnectionState # Type Alias: ConnectionState > **ConnectionState** = `"disconnected"` \| `"connecting"` \| `"connected"` \| `"error"` \| `"fallback"` --- ## Page: HttpPolicyStore URL: https://docs.totem.ing/api/totemsdk-recursive-mast/classes/HttpPolicyStore [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / HttpPolicyStore # Class: HttpPolicyStore ## Implements - [`RecursiveMastPolicyStore`](../interfaces/RecursiveMastPolicyStore.md) ## Constructors ### Constructor > **new HttpPolicyStore**(`options`): `HttpPolicyStore` #### Parameters ##### options [`HttpStoreOptions`](../interfaces/HttpStoreOptions.md) #### Returns `HttpPolicyStore` ## Methods ### getBranch() > **getBranch**(`policyRoot`, `scriptHash`): `Promise`\<[`MastBranchPackage`](../interfaces/MastBranchPackage.md) \| `null`\> #### Parameters ##### policyRoot `string` ##### scriptHash `string` #### Returns `Promise`\<[`MastBranchPackage`](../interfaces/MastBranchPackage.md) \| `null`\> #### Implementation of [`RecursiveMastPolicyStore`](../interfaces/RecursiveMastPolicyStore.md).[`getBranch`](../interfaces/RecursiveMastPolicyStore.md#getbranch) *** ### getBundle() > **getBundle**(`bundleHash`): `Promise`\<\{ `branches`: [`MastBranchPackage`](../interfaces/MastBranchPackage.md)[]; `manifest`: [`RecursiveMastPolicyManifest`](../interfaces/RecursiveMastPolicyManifest.md); \} \| `null`\> #### Parameters ##### bundleHash `string` #### Returns `Promise`\<\{ `branches`: [`MastBranchPackage`](../interfaces/MastBranchPackage.md)[]; `manifest`: [`RecursiveMastPolicyManifest`](../interfaces/RecursiveMastPolicyManifest.md); \} \| `null`\> #### Implementation of [`RecursiveMastPolicyStore`](../interfaces/RecursiveMastPolicyStore.md).[`getBundle`](../interfaces/RecursiveMastPolicyStore.md#getbundle) *** ### getManifest() > **getManifest**(`policyId`, `version?`): `Promise`\<[`RecursiveMastPolicyManifest`](../interfaces/RecursiveMastPolicyManifest.md) \| `null`\> #### Parameters ##### policyId `string` ##### version? `number` #### Returns `Promise`\<[`RecursiveMastPolicyManifest`](../interfaces/RecursiveMastPolicyManifest.md) \| `null`\> #### Implementation of [`RecursiveMastPolicyStore`](../interfaces/RecursiveMastPolicyStore.md).[`getManifest`](../interfaces/RecursiveMastPolicyStore.md#getmanifest) *** ### listBranches() > **listBranches**(`policyRoot`, `filter?`): `Promise`\<[`MastBranchSummary`](../interfaces/MastBranchSummary.md)[]\> #### Parameters ##### policyRoot `string` ##### filter? [`BranchFilter`](../interfaces/BranchFilter.md) #### Returns `Promise`\<[`MastBranchSummary`](../interfaces/MastBranchSummary.md)[]\> #### Implementation of [`RecursiveMastPolicyStore`](../interfaces/RecursiveMastPolicyStore.md).[`listBranches`](../interfaces/RecursiveMastPolicyStore.md#listbranches) *** ### putBranch() > **putBranch**(`_branch`): `Promise`\<`string`\> #### Parameters ##### \_branch [`MastBranchPackage`](../interfaces/MastBranchPackage.md) #### Returns `Promise`\<`string`\> #### Implementation of [`RecursiveMastPolicyStore`](../interfaces/RecursiveMastPolicyStore.md).[`putBranch`](../interfaces/RecursiveMastPolicyStore.md#putbranch) *** ### putBundle() > **putBundle**(`_manifest`, `_branches`): `Promise`\<`string`\> #### Parameters ##### \_manifest [`RecursiveMastPolicyManifest`](../interfaces/RecursiveMastPolicyManifest.md) ##### \_branches [`MastBranchPackage`](../interfaces/MastBranchPackage.md)[] #### Returns `Promise`\<`string`\> #### Implementation of [`RecursiveMastPolicyStore`](../interfaces/RecursiveMastPolicyStore.md).[`putBundle`](../interfaces/RecursiveMastPolicyStore.md#putbundle) *** ### putManifest() > **putManifest**(`_manifest`): `Promise`\<`string`\> #### Parameters ##### \_manifest [`RecursiveMastPolicyManifest`](../interfaces/RecursiveMastPolicyManifest.md) #### Returns `Promise`\<`string`\> #### Implementation of [`RecursiveMastPolicyStore`](../interfaces/RecursiveMastPolicyStore.md).[`putManifest`](../interfaces/RecursiveMastPolicyStore.md#putmanifest) --- ## Page: MemoryPolicyStore URL: https://docs.totem.ing/api/totemsdk-recursive-mast/classes/MemoryPolicyStore [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / MemoryPolicyStore # Class: MemoryPolicyStore ## Implements - [`RecursiveMastPolicyStore`](../interfaces/RecursiveMastPolicyStore.md) ## Constructors ### Constructor > **new MemoryPolicyStore**(`options?`): `MemoryPolicyStore` #### Parameters ##### options? [`MemoryStoreOptions`](../interfaces/MemoryStoreOptions.md) = `{}` #### Returns `MemoryPolicyStore` ## Methods ### deleteBranch() > **deleteBranch**(`policyRoot`, `scriptHash`): `Promise`\<`void`\> #### Parameters ##### policyRoot `string` ##### scriptHash `string` #### Returns `Promise`\<`void`\> #### Implementation of [`RecursiveMastPolicyStore`](../interfaces/RecursiveMastPolicyStore.md).[`deleteBranch`](../interfaces/RecursiveMastPolicyStore.md#deletebranch) *** ### deleteManifest() > **deleteManifest**(`policyId`, `version`): `Promise`\<`void`\> #### Parameters ##### policyId `string` ##### version `number` #### Returns `Promise`\<`void`\> #### Implementation of [`RecursiveMastPolicyStore`](../interfaces/RecursiveMastPolicyStore.md).[`deleteManifest`](../interfaces/RecursiveMastPolicyStore.md#deletemanifest) *** ### getBranch() > **getBranch**(`policyRoot`, `scriptHash`): `Promise`\<[`MastBranchPackage`](../interfaces/MastBranchPackage.md) \| `null`\> #### Parameters ##### policyRoot `string` ##### scriptHash `string` #### Returns `Promise`\<[`MastBranchPackage`](../interfaces/MastBranchPackage.md) \| `null`\> #### Implementation of [`RecursiveMastPolicyStore`](../interfaces/RecursiveMastPolicyStore.md).[`getBranch`](../interfaces/RecursiveMastPolicyStore.md#getbranch) *** ### getBundle() > **getBundle**(`bundleHash`): `Promise`\<\{ `branches`: [`MastBranchPackage`](../interfaces/MastBranchPackage.md)[]; `manifest`: [`RecursiveMastPolicyManifest`](../interfaces/RecursiveMastPolicyManifest.md); \} \| `null`\> #### Parameters ##### bundleHash `string` #### Returns `Promise`\<\{ `branches`: [`MastBranchPackage`](../interfaces/MastBranchPackage.md)[]; `manifest`: [`RecursiveMastPolicyManifest`](../interfaces/RecursiveMastPolicyManifest.md); \} \| `null`\> #### Implementation of [`RecursiveMastPolicyStore`](../interfaces/RecursiveMastPolicyStore.md).[`getBundle`](../interfaces/RecursiveMastPolicyStore.md#getbundle) *** ### getManifest() > **getManifest**(`policyId`, `version?`): `Promise`\<[`RecursiveMastPolicyManifest`](../interfaces/RecursiveMastPolicyManifest.md) \| `null`\> #### Parameters ##### policyId `string` ##### version? `number` #### Returns `Promise`\<[`RecursiveMastPolicyManifest`](../interfaces/RecursiveMastPolicyManifest.md) \| `null`\> #### Implementation of [`RecursiveMastPolicyStore`](../interfaces/RecursiveMastPolicyStore.md).[`getManifest`](../interfaces/RecursiveMastPolicyStore.md#getmanifest) *** ### hasBranch() > **hasBranch**(`policyRoot`, `scriptHash`): `Promise`\<`boolean`\> #### Parameters ##### policyRoot `string` ##### scriptHash `string` #### Returns `Promise`\<`boolean`\> #### Implementation of [`RecursiveMastPolicyStore`](../interfaces/RecursiveMastPolicyStore.md).[`hasBranch`](../interfaces/RecursiveMastPolicyStore.md#hasbranch) *** ### hasManifest() > **hasManifest**(`policyId`, `version?`): `Promise`\<`boolean`\> #### Parameters ##### policyId `string` ##### version? `number` #### Returns `Promise`\<`boolean`\> #### Implementation of [`RecursiveMastPolicyStore`](../interfaces/RecursiveMastPolicyStore.md).[`hasManifest`](../interfaces/RecursiveMastPolicyStore.md#hasmanifest) *** ### listBranches() > **listBranches**(`policyRoot`, `filter?`): `Promise`\<[`MastBranchSummary`](../interfaces/MastBranchSummary.md)[]\> #### Parameters ##### policyRoot `string` ##### filter? [`BranchFilter`](../interfaces/BranchFilter.md) #### Returns `Promise`\<[`MastBranchSummary`](../interfaces/MastBranchSummary.md)[]\> #### Implementation of [`RecursiveMastPolicyStore`](../interfaces/RecursiveMastPolicyStore.md).[`listBranches`](../interfaces/RecursiveMastPolicyStore.md#listbranches) *** ### listManifests() > **listManifests**(`policyId`): `Promise`\<`number`[]\> #### Parameters ##### policyId `string` #### Returns `Promise`\<`number`[]\> #### Implementation of [`RecursiveMastPolicyStore`](../interfaces/RecursiveMastPolicyStore.md).[`listManifests`](../interfaces/RecursiveMastPolicyStore.md#listmanifests) *** ### mirrorPolicy() > **mirrorPolicy**(`policyId`, `destination`): `Promise`\<[`MirrorResult`](../interfaces/MirrorResult.md)\> #### Parameters ##### policyId `string` ##### destination [`RecursiveMastPolicyStore`](../interfaces/RecursiveMastPolicyStore.md) #### Returns `Promise`\<[`MirrorResult`](../interfaces/MirrorResult.md)\> #### Implementation of [`RecursiveMastPolicyStore`](../interfaces/RecursiveMastPolicyStore.md).[`mirrorPolicy`](../interfaces/RecursiveMastPolicyStore.md#mirrorpolicy) *** ### putBranch() > **putBranch**(`branch`): `Promise`\<`string`\> #### Parameters ##### branch [`MastBranchPackage`](../interfaces/MastBranchPackage.md) #### Returns `Promise`\<`string`\> #### Implementation of [`RecursiveMastPolicyStore`](../interfaces/RecursiveMastPolicyStore.md).[`putBranch`](../interfaces/RecursiveMastPolicyStore.md#putbranch) *** ### putBundle() > **putBundle**(`manifest`, `branches`): `Promise`\<`string`\> #### Parameters ##### manifest [`RecursiveMastPolicyManifest`](../interfaces/RecursiveMastPolicyManifest.md) ##### branches [`MastBranchPackage`](../interfaces/MastBranchPackage.md)[] #### Returns `Promise`\<`string`\> #### Implementation of [`RecursiveMastPolicyStore`](../interfaces/RecursiveMastPolicyStore.md).[`putBundle`](../interfaces/RecursiveMastPolicyStore.md#putbundle) *** ### putManifest() > **putManifest**(`manifest`): `Promise`\<`string`\> #### Parameters ##### manifest [`RecursiveMastPolicyManifest`](../interfaces/RecursiveMastPolicyManifest.md) #### Returns `Promise`\<`string`\> #### Implementation of [`RecursiveMastPolicyStore`](../interfaces/RecursiveMastPolicyStore.md).[`putManifest`](../interfaces/RecursiveMastPolicyStore.md#putmanifest) --- ## Page: acceptResponse URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/acceptResponse [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / acceptResponse # Function: acceptResponse() > **acceptResponse**(`session`, `response`): [`SigningSession`](../interfaces/SigningSession.md) Accept a signing response into the session. ## Parameters ### session [`SigningSession`](../interfaces/SigningSession.md) ### response [`PolicySigningResponse`](../interfaces/PolicySigningResponse.md) ## Returns [`SigningSession`](../interfaces/SigningSession.md) --- ## Page: advanceSession URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/advanceSession [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / advanceSession # Function: advanceSession() > **advanceSession**(`session`): [`SigningSession`](../interfaces/SigningSession.md) Transition the session to the next appropriate status. ## Parameters ### session [`SigningSession`](../interfaces/SigningSession.md) ## Returns [`SigningSession`](../interfaces/SigningSession.md) --- ## Page: announcePolicy URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/announcePolicy [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / announcePolicy # Function: announcePolicy() > **announcePolicy**(`client`, `config`): `Promise`\<`void`\> Announce a policy manifest to the lookup network. ## Parameters ### client [`PolicyLookupClient`](../interfaces/PolicyLookupClient.md) ### config [`AnnouncePolicyConfig`](../interfaces/AnnouncePolicyConfig.md) ## Returns `Promise`\<`void`\> --- ## Page: asBlockDuration URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/asBlockDuration [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / asBlockDuration # Function: asBlockDuration() > **asBlockDuration**(`n`): [`BlockDuration`](../type-aliases/BlockDuration.md) ## Parameters ### n `number` ## Returns [`BlockDuration`](../type-aliases/BlockDuration.md) --- ## Page: asBlockHeight URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/asBlockHeight [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / asBlockHeight # Function: asBlockHeight() > **asBlockHeight**(`n`): [`BlockHeight`](../type-aliases/BlockHeight.md) ## Parameters ### n `number` ## Returns [`BlockHeight`](../type-aliases/BlockHeight.md) --- ## Page: asUnixTimeMs URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/asUnixTimeMs [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / asUnixTimeMs # Function: asUnixTimeMs() > **asUnixTimeMs**(`n`): [`UnixTimeMs`](../type-aliases/UnixTimeMs.md) ## Parameters ### n `number` ## Returns [`UnixTimeMs`](../type-aliases/UnixTimeMs.md) --- ## Page: asUnixTimeSec URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/asUnixTimeSec [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / asUnixTimeSec # Function: asUnixTimeSec() > **asUnixTimeSec**(`n`): [`UnixTimeSec`](../type-aliases/UnixTimeSec.md) ## Parameters ### n `number` ## Returns [`UnixTimeSec`](../type-aliases/UnixTimeSec.md) --- ## Page: auditPolicyAvailability URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/auditPolicyAvailability [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / auditPolicyAvailability # Function: auditPolicyAvailability() > **auditPolicyAvailability**(`config`): `Promise`\<[`PolicyAvailabilityReport`](../interfaces/PolicyAvailabilityReport.md)\> ## Parameters ### config [`AuditConfig`](../interfaces/AuditConfig.md) ## Returns `Promise`\<[`PolicyAvailabilityReport`](../interfaces/PolicyAvailabilityReport.md)\> --- ## Page: branchSummary URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/branchSummary [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / branchSummary # Function: branchSummary() > **branchSummary**(`branch`): [`MastBranchSummary`](../interfaces/MastBranchSummary.md) ## Parameters ### branch [`MastBranchPackage`](../interfaces/MastBranchPackage.md) ## Returns [`MastBranchSummary`](../interfaces/MastBranchSummary.md) --- ## Page: buildAcceptanceScript URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/buildAcceptanceScript [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / buildAcceptanceScript # Function: buildAcceptanceScript() > **buildAcceptanceScript**(`targetDomain`, `targetPolicyRoot`, `constraints?`): `string` Build the KISSVM acceptance script for a cross-domain bridge. This script runs in the source domain and validates that a proof from the target domain satisfies the bridge constraints. ## Parameters ### targetDomain `string` ### targetPolicyRoot `string` ### constraints? `CrossDomainConstraints` = `{}` ## Returns `string` --- ## Page: buildBidirectionalBridge URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/buildBidirectionalBridge [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / buildBidirectionalBridge # Function: buildBidirectionalBridge() > **buildBidirectionalBridge**(`domainA`, `domainB`, `rootA`, `rootB`, `proofAtoB`, `proofBtoA`, `constraints?`): \[`CrossDomainBridge`, `CrossDomainBridge`\] Build a bidirectional trust bridge (mutual recognition between two domains). ## Parameters ### domainA `string` ### domainB `string` ### rootA `string` ### rootB `string` ### proofAtoB `string` ### proofBtoA `string` ### constraints? `CrossDomainConstraints` = `{}` ## Returns \[`CrossDomainBridge`, `CrossDomainBridge`\] --- ## Page: buildCrossDomainBridge URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/buildCrossDomainBridge [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / buildCrossDomainBridge # Function: buildCrossDomainBridge() > **buildCrossDomainBridge**(`sourceDomain`, `targetDomain`, `sourcePolicyRoot`, `targetPolicyRoot`, `acceptanceProof`, `constraints?`): `CrossDomainBridge` Build a cross-domain trust bridge. ## Parameters ### sourceDomain `string` Source domain identifier. ### targetDomain `string` Target domain identifier. ### sourcePolicyRoot `string` The policy root in the source domain that accepts target proofs. ### targetPolicyRoot `string` The policy root in the target domain being accepted. ### acceptanceProof `string` Merkle proof that the acceptance script is in the source policy root. ### constraints? `CrossDomainConstraints` = `{}` Constraints on accepted proofs. ## Returns `CrossDomainBridge` --- ## Page: buildDelegationChain URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/buildDelegationChain [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / buildDelegationChain # Function: buildDelegationChain() > **buildDelegationChain**(`links`): `DelegationChain` Build a complete delegation chain from an ordered list of links. ## Parameters ### links `DelegationLink`[] ## Returns `DelegationChain` --- ## Page: buildDelegationLink URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/buildDelegationLink [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / buildDelegationLink # Function: buildDelegationLink() > **buildDelegationLink**(`delegator`, `delegate`, `policyRoot`, `proof`, `constraints?`, `sequence?`): `DelegationLink` Build a single delegation link. ## Parameters ### delegator `string` The delegator's public key digest. ### delegate `string` The delegate's public key digest. ### policyRoot `string` The policy root authorizing this delegation. ### proof `string` Merkle proof that the delegation script is in the policy root. ### constraints? `DelegationConstraints` = `{}` Constraints on the delegation. ### sequence? `number` = `0` Sequence number in the chain. ## Returns `DelegationLink` --- ## Page: buildDelegationScript URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/buildDelegationScript [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / buildDelegationScript # Function: buildDelegationScript() > **buildDelegationScript**(`delegator`, `delegate`, `constraints?`): `string` Build the KISSVM delegation script for a single delegation. ## Parameters ### delegator `string` ### delegate `string` ### constraints? `DelegationConstraints` = `{}` ## Returns `string` --- ## Page: buildEpochAdvancementScript URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/buildEpochAdvancementScript [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / buildEpochAdvancementScript # Function: buildEpochAdvancementScript() > **buildEpochAdvancementScript**(`config`, `newEpoch`, `authorizerPkd`): `string` ## Parameters ### config [`PolicyAnchorConfig`](../interfaces/PolicyAnchorConfig.md) ### newEpoch `number` ### authorizerPkd `string` ## Returns `string` --- ## Page: buildLayerSubset URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/buildLayerSubset [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / buildLayerSubset # Function: buildLayerSubset() > **buildLayerSubset**(`config`, `include`): `object` Build a subset of layers — useful when some layers are optional. Only includes layers that are present in the `include` array. ## Parameters ### config [`LayeredPolicyConfig`](../interfaces/LayeredPolicyConfig.md) ### include `string`[] ## Returns `object` ### proofChain > **proofChain**: [`ProofChain`](../interfaces/ProofChain.md) ### tree > **tree**: [`PolicyTree`](../interfaces/PolicyTree.md) --- ## Page: buildLayeredMastScript URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/buildLayeredMastScript [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / buildLayeredMastScript # Function: buildLayeredMastScript() > **buildLayeredMastScript**(`config`): `string` Build the nested MAST KISSVM script for a layered policy. Each layer delegates to the next via MAST. ## Parameters ### config [`LayeredPolicyConfig`](../interfaces/LayeredPolicyConfig.md) ## Returns `string` --- ## Page: buildLayeredPolicy URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/buildLayeredPolicy [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / buildLayeredPolicy # Function: buildLayeredPolicy() > **buildLayeredPolicy**(`config`): `object` Build a layered policy tree from a config. Returns a PolicyTree where each layer is a node, plus a proof chain that can be used for nested MAST execution. ## Parameters ### config [`LayeredPolicyConfig`](../interfaces/LayeredPolicyConfig.md) ## Returns `object` ### mastScript > **mastScript**: `string` ### proofChain > **proofChain**: [`ProofChain`](../interfaces/ProofChain.md) ### tree > **tree**: [`PolicyTree`](../interfaces/PolicyTree.md) ## Example ```ts const { tree, proofChain } = buildLayeredPolicy({ assetId: 'robot-arm-001', assetName: 'Robot Arm', layers: [ { id: 'manufacturer', name: 'Robot Corp', script: mfgScript, authorityPkd: mfgPk }, { id: 'regulatory', name: 'EU Machinery Directive', script: regScript, authorityPkd: regPk }, { id: 'owner', name: 'Factory GmbH', script: ownerScript, authorityPkd: ownerPk }, { id: 'site', name: 'Plant A', script: siteScript, authorityPkd: sitePk }, { id: 'operator', name: 'Technician', script: opScript, authorityPkd: opPk }, ], }); ``` --- ## Page: buildMigrationPath URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/buildMigrationPath [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / buildMigrationPath # Function: buildMigrationPath() > **buildMigrationPath**(`steps`): `MigrationPath` Build a complete migration path from an ordered list of steps. ## Parameters ### steps `MigrationStep`[] ## Returns `MigrationPath` --- ## Page: buildMigrationScript URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/buildMigrationScript [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / buildMigrationScript # Function: buildMigrationScript() > **buildMigrationScript**(`fromPolicyRoot`, `toPolicyRoot`, `activationBlock`, `deprecationBlock`): `string` Build the KISSVM migration script. During the transition window (activationBlock ≤ ## Parameters ### fromPolicyRoot `string` ### toPolicyRoot `string` ### activationBlock `number` ### deprecationBlock `number` ## Returns `string` ## BLOCK < deprecationBlock), both old and new policies are accepted. After deprecationBlock, only the new policy is accepted. --- ## Page: buildMigrationStep URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/buildMigrationStep [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / buildMigrationStep # Function: buildMigrationStep() > **buildMigrationStep**(`fromPolicyRoot`, `toPolicyRoot`, `activationBlock`, `deprecationBlock`, `proof`): `MigrationStep` Build a single migration step. ## Parameters ### fromPolicyRoot `string` The old policy root being migrated from. ### toPolicyRoot `string` The new policy root being migrated to. ### activationBlock `number` Block height at which this migration activates. ### deprecationBlock `number` Block height at which the old policy is fully deprecated. ### proof `string` Merkle proof that the migration script is in the old policy root. ## Returns `MigrationStep` --- ## Page: buildPolicyAnchorScript URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/buildPolicyAnchorScript [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / buildPolicyAnchorScript # Function: buildPolicyAnchorScript() > **buildPolicyAnchorScript**(`config`): `string` ## Parameters ### config [`PolicyAnchorConfig`](../interfaces/PolicyAnchorConfig.md) ## Returns `string` --- ## Page: buildPolicyAnchorState URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/buildPolicyAnchorState [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / buildPolicyAnchorState # Function: buildPolicyAnchorState() > **buildPolicyAnchorState**(`config`, `initialRoots`): `Record`\<`number`, `string`\> ## Parameters ### config [`PolicyAnchorConfig`](../interfaces/PolicyAnchorConfig.md) ### initialRoots #### emergencyRoot? `string` #### firmwareApprovalRoot? `string` #### manifestHash? `string` #### ownerRoot? `string` #### recoveryRoot? `string` #### regulatorRoot? `string` #### serviceProviderRoot? `string` ## Returns `Record`\<`number`, `string`\> --- ## Page: buildPolicyTree URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/buildPolicyTree [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / buildPolicyTree # Function: buildPolicyTree() > **buildPolicyTree**(`nodes`): [`PolicyTree`](../interfaces/PolicyTree.md) Build a policy tree from a flat list of nodes. Nodes reference parents by `parentId`. The root is the node with no parent. ## Parameters ### nodes [`PolicyNodeInput`](../interfaces/PolicyNodeInput.md)[] ## Returns [`PolicyTree`](../interfaces/PolicyTree.md) ## Example ```ts const tree = buildPolicyTree([ { id: 'root', name: 'National', script: 'RETURN TRUE' }, { id: 'regional', name: 'Regional', script: 'ASSERT SIGNEDBY(STATE(0)) RETURN TRUE', parentId: 'root' }, { id: 'local', name: 'Local', script: 'ASSERT SIGNEDBY(PREVSTATE(0)) RETURN TRUE', parentId: 'regional' }, ]); ``` --- ## Page: buildPrevStateWorkflow URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/buildPrevStateWorkflow [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / buildPrevStateWorkflow # Function: buildPrevStateWorkflow() > **buildPrevStateWorkflow**(`id`, `name`, `transitions`, `additionalScript?`): [`PrevStateWorkflow`](../interfaces/PrevStateWorkflow.md) Build a complete PREVSTATE workflow from a list of transitions. ## Parameters ### id `string` Workflow identifier. ### name `string` Human-readable name. ### transitions [`StateTransition`](../interfaces/StateTransition.md)[] Ordered list of state transitions. ### additionalScript? `string` Additional KISSVM script logic (assertions, verifications). ## Returns [`PrevStateWorkflow`](../interfaces/PrevStateWorkflow.md) --- ## Page: buildProofChain URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/buildProofChain [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / buildProofChain # Function: buildProofChain() > **buildProofChain**(`links`): [`ProofChain`](../interfaces/ProofChain.md) ## Parameters ### links [`ProofLink`](../interfaces/ProofLink.md)[] ## Returns [`ProofChain`](../interfaces/ProofChain.md) --- ## Page: buildRecursiveWitnessPlan URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/buildRecursiveWitnessPlan [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / buildRecursiveWitnessPlan # Function: buildRecursiveWitnessPlan() > **buildRecursiveWitnessPlan**(`selectedPath`, `disclosedScripts`, `collectedSignatures`): `object` Build a recursive MAST witness plan from collected signatures and disclosed scripts. The plan describes what the witness should contain; use materializeRecursiveWitness() from @totemsdk/recursive-mast/kissvm to produce the canonical KISSVM ScriptWitness. ## Parameters ### selectedPath [`PolicyPathDescriptor`](../interfaces/PolicyPathDescriptor.md) The policy path from anchor to action. ### disclosedScripts [`ScriptDisclosure`](../interfaces/ScriptDisclosure.md)[] The disclosed MAST branch scripts. ### collectedSignatures `Map`\<`string`, `string`\> Signatures by role. ## Returns `object` A witness plan (mastBranches + signatures) ready for materialization. ### mastBranches > **mastBranches**: `Map`\<`string`, `string`\> ### signatures > **signatures**: `Map`\<`string`, `string`\> --- ## Page: buildRootRotationScript URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/buildRootRotationScript [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / buildRootRotationScript # Function: buildRootRotationScript() > **buildRootRotationScript**(`port`, `newRoot`, `authorizerPkd`, `reason`): `string` ## Parameters ### port `number` ### newRoot `string` ### authorizerPkd `string` ### reason `string` ## Returns `string` --- ## Page: buildStateTransition URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/buildStateTransition [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / buildStateTransition # Function: buildStateTransition() > **buildStateTransition**(`port`, `name`, `currentValue`, `previousValue`, `transition`): [`StateTransition`](../interfaces/StateTransition.md) Build a single state transition definition. ## Parameters ### port `number` STATE/PREVSTATE port number. ### name `string` Human-readable name. ### currentValue `string` Current state value. ### previousValue `string` Previous state value (from PREVSTATE). ### transition `string` Description of the transition function. ## Returns [`StateTransition`](../interfaces/StateTransition.md) --- ## Page: buildTrustNetwork URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/buildTrustNetwork [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / buildTrustNetwork # Function: buildTrustNetwork() > **buildTrustNetwork**(`bridges`): `object` Build a trust network — a set of cross-domain bridges forming a connected graph of mutually trusting policy spaces. ## Parameters ### bridges `CrossDomainBridge`[] ## Returns `object` ### bridges > **bridges**: `CrossDomainBridge`[] ### domains > **domains**: `string`[] ### isConnected > **isConnected**: `boolean` --- ## Page: bundleKey URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/bundleKey [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / bundleKey # Function: bundleKey() > **bundleKey**(`bundleHash`): [`ContentKey`](../interfaces/ContentKey.md) ## Parameters ### bundleHash `string` ## Returns [`ContentKey`](../interfaces/ContentKey.md) --- ## Page: cancelSession URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/cancelSession [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / cancelSession # Function: cancelSession() > **cancelSession**(`session`, `reason?`): [`SigningSession`](../interfaces/SigningSession.md) Cancel the session. ## Parameters ### session [`SigningSession`](../interfaces/SigningSession.md) ### reason? `string` ## Returns [`SigningSession`](../interfaces/SigningSession.md) --- ## Page: canonicalHash URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/canonicalHash [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / canonicalHash # Function: canonicalHash() > **canonicalHash**(`domain`, `payload`, `version?`): `string` ## Parameters ### domain [`EncodingDomain`](../type-aliases/EncodingDomain.md) ### payload `Record`\<`string`, `unknown`\> ### version? `number` = `CANONICAL_ENCODING_VERSION` ## Returns `string` --- ## Page: canonicalSerialize URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/canonicalSerialize [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / canonicalSerialize # Function: canonicalSerialize() > **canonicalSerialize**(`domain`, `payload`, `version?`): `Uint8Array` ## Parameters ### domain [`EncodingDomain`](../type-aliases/EncodingDomain.md) ### payload `Record`\<`string`, `unknown`\> ### version? `number` = `CANONICAL_ENCODING_VERSION` ## Returns `Uint8Array` --- ## Page: canonicalSign URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/canonicalSign [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / canonicalSign # Function: canonicalSign() > **canonicalSign**(`domain`, `payload`, `signFn`, `version?`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> ## Parameters ### domain [`EncodingDomain`](../type-aliases/EncodingDomain.md) ### payload `Record`\<`string`, `unknown`\> ### signFn (`data`) => `Uint8Array`\<`ArrayBufferLike`\> \| `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> ### version? `number` = `CANONICAL_ENCODING_VERSION` ## Returns `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> --- ## Page: canonicalVerify URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/canonicalVerify [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / canonicalVerify # Function: canonicalVerify() > **canonicalVerify**(`domain`, `payload`, `signature`, `verifyFn`, `version?`): `Promise`\<`boolean`\> ## Parameters ### domain [`EncodingDomain`](../type-aliases/EncodingDomain.md) ### payload `Record`\<`string`, `unknown`\> ### signature `Uint8Array` ### verifyFn (`data`, `sig`) => `boolean` \| `Promise`\<`boolean`\> ### version? `number` = `CANONICAL_ENCODING_VERSION` ## Returns `Promise`\<`boolean`\> --- ## Page: collectSigningResponses URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/collectSigningResponses [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / collectSigningResponses # Function: collectSigningResponses() > **collectSigningResponses**(`requiredRoles`, `responses`, `options?`): [`SigningRoundResult`](../interfaces/SigningRoundResult.md) ## Parameters ### requiredRoles `string`[] ### responses [`PolicySigningResponse`](../interfaces/PolicySigningResponse.md)[] ### options? #### allowOneSignerMultipleRoles? `boolean` #### requestId? `string` ## Returns [`SigningRoundResult`](../interfaces/SigningRoundResult.md) --- ## Page: compileMastTree URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/compileMastTree [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / compileMastTree # Function: compileMastTree() > **compileMastTree**(`scripts`): [`CompiledMast`](../interfaces/CompiledMast.md) ## Parameters ### scripts `string`[] ## Returns [`CompiledMast`](../interfaces/CompiledMast.md) --- ## Page: compilePolicyGraph URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/compilePolicyGraph [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / compilePolicyGraph # Function: compilePolicyGraph() > **compilePolicyGraph**(`policy`): [`CompiledRecursivePolicy`](../interfaces/CompiledRecursivePolicy.md) ## Parameters ### policy [`PolicyGraph`](../interfaces/PolicyGraph.md) ## Returns [`CompiledRecursivePolicy`](../interfaces/CompiledRecursivePolicy.md) --- ## Page: computeBranchInventoryHash URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/computeBranchInventoryHash [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / computeBranchInventoryHash # Function: computeBranchInventoryHash() > **computeBranchInventoryHash**(`inventory`): `string` ## Parameters ### inventory [`BranchInventory`](../interfaces/BranchInventory.md) ## Returns `string` --- ## Page: computeBundleHash URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/computeBundleHash [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / computeBundleHash # Function: computeBundleHash() > **computeBundleHash**(`manifest`, `branches`): `string` ## Parameters ### manifest `Uint8Array` ### branches `Uint8Array`\<`ArrayBufferLike`\>[] ## Returns `string` --- ## Page: computeCanonicalScriptAddress URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/computeCanonicalScriptAddress [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / computeCanonicalScriptAddress # Function: computeCanonicalScriptAddress() > **computeCanonicalScriptAddress**(`script`): `string` ## Parameters ### script `string` ## Returns `string` --- ## Page: computeCanonicalScriptHash URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/computeCanonicalScriptHash [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / computeCanonicalScriptHash # Function: computeCanonicalScriptHash() > **computeCanonicalScriptHash**(`script`): `string` ## Parameters ### script `string` ## Returns `string` --- ## Page: computeKeyFingerprint URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/computeKeyFingerprint [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / computeKeyFingerprint # Function: computeKeyFingerprint() > **computeKeyFingerprint**(`keyBytes`): `string` ## Parameters ### keyBytes `Uint8Array` ## Returns `string` --- ## Page: computePolicyPackageHash URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/computePolicyPackageHash [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / computePolicyPackageHash # Function: computePolicyPackageHash() > **computePolicyPackageHash**(`scripts`, `proofs`, `metadata`): `string` Compute the policy package hash — SHA3-256 of all scripts + proofs + metadata. ## Parameters ### scripts `string`[] ### proofs `string`[] ### metadata `string` ## Returns `string` --- ## Page: computeScriptHash URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/computeScriptHash [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / computeScriptHash # Function: computeScriptHash() > **computeScriptHash**(`script`): `string` ## Parameters ### script `string` ## Returns `string` --- ## Page: confirmSession URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/confirmSession [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / confirmSession # Function: confirmSession() > **confirmSession**(`session`, `confirmation`): [`SigningSession`](../interfaces/SigningSession.md) Mark the session as confirmed (transaction mined). Requires txpowId and confirmed block — a caller cannot declare a transaction confirmed without evidence. Session must be in 'submitted' status. ## Parameters ### session [`SigningSession`](../interfaces/SigningSession.md) ### confirmation #### confirmedBlock `number` #### inclusionProof? `string` #### txpowId `string` ## Returns [`SigningSession`](../interfaces/SigningSession.md) --- ## Page: counterWorkflow URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/counterWorkflow [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / counterWorkflow # Function: counterWorkflow() > **counterWorkflow**(`port`, `maxValue?`): [`PrevStateWorkflow`](../interfaces/PrevStateWorkflow.md) Generate a KISSVM script for a counter that increments on each transaction. ## Parameters ### port `number` STATE port for the counter. ### maxValue? `number` Optional maximum value (inclusive). ## Returns [`PrevStateWorkflow`](../interfaces/PrevStateWorkflow.md) --- ## Page: createAvailabilityReceipt URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/createAvailabilityReceipt [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / createAvailabilityReceipt # Function: createAvailabilityReceipt() > **createAvailabilityReceipt**(`config`): [`AvailabilityReceipt`](../interfaces/AvailabilityReceipt.md) ## Parameters ### config #### branchHashes `string`[] #### custodianIdentityId `string` #### inventoryDigest? `string` #### manifestDigest `string` #### policyEpoch `number` #### policyId `string` #### policyRoot `string` #### policyVersion `number` #### validitySeconds? `number` ## Returns [`AvailabilityReceipt`](../interfaces/AvailabilityReceipt.md) --- ## Page: createBranchPackage URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/createBranchPackage [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / createBranchPackage # Function: createBranchPackage() > **createBranchPackage**(`config`): `Promise`\<[`MastBranchPackage`](../interfaces/MastBranchPackage.md)\> ## Parameters ### config #### action `string` #### childRoots? `string`[] #### evidenceRequirements? `string`[] #### expiresAt? `number` #### policyEpoch `number` #### policyId `string` #### policyRoot `string` #### policyVersion `number` #### proof `Uint8Array` #### publisherIdentityId `string` #### role? `string` #### script `string` #### signFn (`data`) => `Uint8Array`\<`ArrayBufferLike`\> \| `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> #### validFrom `number` ## Returns `Promise`\<[`MastBranchPackage`](../interfaces/MastBranchPackage.md)\> --- ## Page: createEncryptedBranch URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/createEncryptedBranch [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / createEncryptedBranch # Function: createEncryptedBranch() > **createEncryptedBranch**(`branch`, `encryptFn`, `keyFingerprint`, `recipientPkds`): `Promise`\<[`EncryptedBranchPackage`](../interfaces/EncryptedBranchPackage.md)\> ## Parameters ### branch [`MastBranchPackage`](../interfaces/MastBranchPackage.md) ### encryptFn (`data`) => `Uint8Array`\<`ArrayBufferLike`\> \| `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> ### keyFingerprint `string` ### recipientPkds `string`[] ## Returns `Promise`\<[`EncryptedBranchPackage`](../interfaces/EncryptedBranchPackage.md)\> --- ## Page: createEncryptionEnvelope URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/createEncryptionEnvelope [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / createEncryptionEnvelope # Function: createEncryptionEnvelope() > **createEncryptionEnvelope**(`algorithm`, `keyBytes`, `nonce`, `ciphertext`): [`EncryptionEnvelope`](../interfaces/EncryptionEnvelope.md) ## Parameters ### algorithm [`EncryptionAlgorithm`](../type-aliases/EncryptionAlgorithm.md) ### keyBytes `Uint8Array` ### nonce `Uint8Array` ### ciphertext `Uint8Array` ## Returns [`EncryptionEnvelope`](../interfaces/EncryptionEnvelope.md) --- ## Page: createKeyWrappingEnvelope URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/createKeyWrappingEnvelope [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / createKeyWrappingEnvelope # Function: createKeyWrappingEnvelope() > **createKeyWrappingEnvelope**(`algorithm`, `recipientPkd`, `wrappedKey`, `keyFingerprint`): [`KeyWrappingEnvelope`](../interfaces/KeyWrappingEnvelope.md) ## Parameters ### algorithm [`EncryptionAlgorithm`](../type-aliases/EncryptionAlgorithm.md) ### recipientPkd `string` ### wrappedKey `Uint8Array` ### keyFingerprint `string` ## Returns [`KeyWrappingEnvelope`](../interfaces/KeyWrappingEnvelope.md) --- ## Page: createSigningRequest URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/createSigningRequest [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / createSigningRequest # Function: createSigningRequest() > **createSigningRequest**(`config`, `requesterSignFn`): `Promise`\<[`PolicySigningRequest`](../interfaces/PolicySigningRequest.md)\> Create a canonical signing request. ## Parameters ### config [`CreateSigningRequestConfig`](../interfaces/CreateSigningRequestConfig.md) ### requesterSignFn (`data`) => `Uint8Array`\<`ArrayBufferLike`\> \| `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> ## Returns `Promise`\<[`PolicySigningRequest`](../interfaces/PolicySigningRequest.md)\> --- ## Page: createSigningResponse URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/createSigningResponse [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / createSigningResponse # Function: createSigningResponse() > **createSigningResponse**(`config`): [`PolicySigningResponse`](../interfaces/PolicySigningResponse.md) ## Parameters ### config [`CreateSigningResponseConfig`](../interfaces/CreateSigningResponseConfig.md) ## Returns [`PolicySigningResponse`](../interfaces/PolicySigningResponse.md) --- ## Page: createSigningSession URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/createSigningSession [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / createSigningSession # Function: createSigningSession() > **createSigningSession**(`config`): [`SigningSession`](../interfaces/SigningSession.md) Create a new signing session. ## Parameters ### config [`SigningSessionConfig`](../interfaces/SigningSessionConfig.md) ## Returns [`SigningSession`](../interfaces/SigningSession.md) --- ## Page: decryptBranch URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/decryptBranch [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / decryptBranch # Function: decryptBranch() > **decryptBranch**(`encrypted`, `decryptFn`, `keyFingerprint`): `Promise`\<[`DecryptedBranchResult`](../interfaces/DecryptedBranchResult.md)\> ## Parameters ### encrypted [`EncryptedBranchPackage`](../interfaces/EncryptedBranchPackage.md) ### decryptFn (`data`) => `Uint8Array`\<`ArrayBufferLike`\> \| `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> ### keyFingerprint `string` ## Returns `Promise`\<[`DecryptedBranchResult`](../interfaces/DecryptedBranchResult.md)\> --- ## Page: deserializeBranchPackage URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/deserializeBranchPackage [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / deserializeBranchPackage # Function: deserializeBranchPackage() > **deserializeBranchPackage**(`data`): [`MastBranchPackage`](../interfaces/MastBranchPackage.md) ## Parameters ### data `Uint8Array` ## Returns [`MastBranchPackage`](../interfaces/MastBranchPackage.md) --- ## Page: deserializeEncryptionEnvelope URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/deserializeEncryptionEnvelope [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / deserializeEncryptionEnvelope # Function: deserializeEncryptionEnvelope() > **deserializeEncryptionEnvelope**(`data`): [`EncryptionEnvelope`](../interfaces/EncryptionEnvelope.md) \| `null` ## Parameters ### data `Uint8Array` ## Returns [`EncryptionEnvelope`](../interfaces/EncryptionEnvelope.md) \| `null` --- ## Page: deserializeKeyWrappingEnvelope URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/deserializeKeyWrappingEnvelope [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / deserializeKeyWrappingEnvelope # Function: deserializeKeyWrappingEnvelope() > **deserializeKeyWrappingEnvelope**(`data`): [`KeyWrappingEnvelope`](../interfaces/KeyWrappingEnvelope.md) \| `null` ## Parameters ### data `Uint8Array` ## Returns [`KeyWrappingEnvelope`](../interfaces/KeyWrappingEnvelope.md) \| `null` --- ## Page: encryptedBranchPublicMetadata URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/encryptedBranchPublicMetadata [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / encryptedBranchPublicMetadata # Function: encryptedBranchPublicMetadata() > **encryptedBranchPublicMetadata**(`encrypted`): `object` ## Parameters ### encrypted [`EncryptedBranchPackage`](../interfaces/EncryptedBranchPackage.md) ## Returns `object` ### action > **action**: `string` ### encryptionKeyFingerprint > **encryptionKeyFingerprint**: `string` ### expiresAt? > `optional` **expiresAt?**: `number` ### policyRoot > **policyRoot**: `string` ### recipientPkds > **recipientPkds**: `string`[] ### role? > `optional` **role?**: `string` ### scriptHash > **scriptHash**: `string` ### validFrom > **validFrom**: `number` --- ## Page: findPolicyNode URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/findPolicyNode [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / findPolicyNode # Function: findPolicyNode() > **findPolicyNode**(`tree`, `id`): [`PolicyNode`](../interfaces/PolicyNode.md) \| `undefined` Find a policy node by ID in the tree. ## Parameters ### tree [`PolicyTree`](../interfaces/PolicyTree.md) ### id `string` ## Returns [`PolicyNode`](../interfaces/PolicyNode.md) \| `undefined` --- ## Page: getActivePolicyRoot URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/getActivePolicyRoot [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / getActivePolicyRoot # Function: getActivePolicyRoot() > **getActivePolicyRoot**(`path`, `currentBlock`): `string` Get the active policy root at a given block height from a migration path. ## Parameters ### path `MigrationPath` ### currentBlock `number` ## Returns `string` --- ## Page: getBranchesByAction URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/getBranchesByAction [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / getBranchesByAction # Function: getBranchesByAction() > **getBranchesByAction**(`inventory`, `action`): [`BranchInventoryEntry`](../interfaces/BranchInventoryEntry.md)[] ## Parameters ### inventory [`BranchInventory`](../interfaces/BranchInventory.md) ### action `string` ## Returns [`BranchInventoryEntry`](../interfaces/BranchInventoryEntry.md)[] --- ## Page: getBranchesByRole URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/getBranchesByRole [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / getBranchesByRole # Function: getBranchesByRole() > **getBranchesByRole**(`inventory`, `role`): [`BranchInventoryEntry`](../interfaces/BranchInventoryEntry.md)[] ## Parameters ### inventory [`BranchInventory`](../interfaces/BranchInventory.md) ### role `string` ## Returns [`BranchInventoryEntry`](../interfaces/BranchInventoryEntry.md)[] --- ## Page: getCriticalBranches URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/getCriticalBranches [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / getCriticalBranches # Function: getCriticalBranches() > **getCriticalBranches**(`inventory`): [`BranchInventoryEntry`](../interfaces/BranchInventoryEntry.md)[] ## Parameters ### inventory [`BranchInventory`](../interfaces/BranchInventory.md) ## Returns [`BranchInventoryEntry`](../interfaces/BranchInventoryEntry.md)[] --- ## Page: getPolicyLeaves URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/getPolicyLeaves [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / getPolicyLeaves # Function: getPolicyLeaves() > **getPolicyLeaves**(`tree`): [`PolicyNode`](../interfaces/PolicyNode.md)[] Get all leaf nodes (nodes with no children). ## Parameters ### tree [`PolicyTree`](../interfaces/PolicyTree.md) ## Returns [`PolicyNode`](../interfaces/PolicyNode.md)[] --- ## Page: getPolicyPath URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/getPolicyPath [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / getPolicyPath # Function: getPolicyPath() > **getPolicyPath**(`tree`, `targetId`): [`PolicyNode`](../interfaces/PolicyNode.md)[] Get the path from root to a specific node. ## Parameters ### tree [`PolicyTree`](../interfaces/PolicyTree.md) ### targetId `string` ## Returns [`PolicyNode`](../interfaces/PolicyNode.md)[] --- ## Page: getRecoveryBranches URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/getRecoveryBranches [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / getRecoveryBranches # Function: getRecoveryBranches() > **getRecoveryBranches**(`inventory`): [`BranchInventoryEntry`](../interfaces/BranchInventoryEntry.md)[] ## Parameters ### inventory [`BranchInventory`](../interfaces/BranchInventory.md) ## Returns [`BranchInventoryEntry`](../interfaces/BranchInventoryEntry.md)[] --- ## Page: isEncryptedBranch URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/isEncryptedBranch [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / isEncryptedBranch # Function: isEncryptedBranch() > **isEncryptedBranch**(`obj`): `obj is EncryptedBranchPackage` ## Parameters ### obj `unknown` ## Returns `obj is EncryptedBranchPackage` --- ## Page: isMigrationActive URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/isMigrationActive [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / isMigrationActive # Function: isMigrationActive() > **isMigrationActive**(`step`, `currentBlock`): `boolean` Check whether a migration step is currently active at a given block height. ## Parameters ### step `MigrationStep` ### currentBlock `number` ## Returns `boolean` --- ## Page: isMigrationComplete URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/isMigrationComplete [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / isMigrationComplete # Function: isMigrationComplete() > **isMigrationComplete**(`step`, `currentBlock`): `boolean` Check whether a migration step is fully complete (old policy deprecated). ## Parameters ### step `MigrationStep` ### currentBlock `number` ## Returns `boolean` --- ## Page: nowMs URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/nowMs [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / nowMs # Function: nowMs() > **nowMs**(): [`UnixTimeMs`](../type-aliases/UnixTimeMs.md) ## Returns [`UnixTimeMs`](../type-aliases/UnixTimeMs.md) --- ## Page: nowSec URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/nowSec [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / nowSec # Function: nowSec() > **nowSec**(): [`UnixTimeSec`](../type-aliases/UnixTimeSec.md) ## Returns [`UnixTimeSec`](../type-aliases/UnixTimeSec.md) --- ## Page: parseContentKey URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/parseContentKey [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / parseContentKey # Function: parseContentKey() > **parseContentKey**(`key`): [`ContentKey`](../interfaces/ContentKey.md) \| `null` ## Parameters ### key `string` ## Returns [`ContentKey`](../interfaces/ContentKey.md) \| `null` --- ## Page: policyManifestKey URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/policyManifestKey [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / policyManifestKey # Function: policyManifestKey() > **policyManifestKey**(`policyId`, `version`): [`ContentKey`](../interfaces/ContentKey.md) ## Parameters ### policyId `string` ### version `number` ## Returns [`ContentKey`](../interfaces/ContentKey.md) --- ## Page: proofKey URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/proofKey [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / proofKey # Function: proofKey() > **proofKey**(`policyRoot`, `scriptHash`): [`ContentKey`](../interfaces/ContentKey.md) ## Parameters ### policyRoot `string` ### scriptHash `string` ## Returns [`ContentKey`](../interfaces/ContentKey.md) --- ## Page: queryPolicies URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/queryPolicies [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / queryPolicies # Function: queryPolicies() > **queryPolicies**(`client`, `config`): `Promise`\<[`PolicyQueryResult`](../interfaces/PolicyQueryResult.md)[]\> Query the lookup network for policies. ## Parameters ### client [`PolicyLookupClient`](../interfaces/PolicyLookupClient.md) ### config [`QueryPolicyConfig`](../interfaces/QueryPolicyConfig.md) ## Returns `Promise`\<[`PolicyQueryResult`](../interfaces/PolicyQueryResult.md)[]\> --- ## Page: receiptCoversBranch URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/receiptCoversBranch [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / receiptCoversBranch # Function: receiptCoversBranch() > **receiptCoversBranch**(`receipt`, `scriptHash`): `boolean` ## Parameters ### receipt [`AvailabilityReceipt`](../interfaces/AvailabilityReceipt.md) ### scriptHash `string` ## Returns `boolean` --- ## Page: receiptCoversInventory URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/receiptCoversInventory [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / receiptCoversInventory # Function: receiptCoversInventory() > **receiptCoversInventory**(`receipt`, `inventory`): `boolean` ## Parameters ### receipt [`AvailabilityReceipt`](../interfaces/AvailabilityReceipt.md) ### inventory [`BranchInventory`](../interfaces/BranchInventory.md) ## Returns `boolean` --- ## Page: recordEvidence URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/recordEvidence [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / recordEvidence # Function: recordEvidence() > **recordEvidence**(`session`, `evidence`): [`SigningSession`](../interfaces/SigningSession.md) Record evidence collection. ## Parameters ### session [`SigningSession`](../interfaces/SigningSession.md) ### evidence [`SignedEvidence`](../interfaces/SignedEvidence.md) ## Returns [`SigningSession`](../interfaces/SigningSession.md) --- ## Page: resolvePolicyForSubject URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/resolvePolicyForSubject [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / resolvePolicyForSubject # Function: resolvePolicyForSubject() > **resolvePolicyForSubject**(`client`, `config`): `Promise`\<[`ResolvedPolicy`](../interfaces/ResolvedPolicy.md) \| `null`\> Resolve the current policy for a subject and action. Queries the lookup network, filters by capability matching the action, and returns the highest-epoch active policy. ## Parameters ### client [`PolicyLookupClient`](../interfaces/PolicyLookupClient.md) ### config [`ResolvePolicyConfig`](../interfaces/ResolvePolicyConfig.md) ## Returns `Promise`\<[`ResolvedPolicy`](../interfaces/ResolvedPolicy.md) \| `null`\> --- ## Page: roundBasedWorkflow URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/roundBasedWorkflow [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / roundBasedWorkflow # Function: roundBasedWorkflow() > **roundBasedWorkflow**(`roundPort`, `pk1`, `pk2`): [`PrevStateWorkflow`](../interfaces/PrevStateWorkflow.md) Generate a KISSVM script for a round-based game or voting system. ## Parameters ### roundPort `number` STATE port for the current round number. ### pk1 `string` First participant's public key. ### pk2 `string` Second participant's public key. ## Returns [`PrevStateWorkflow`](../interfaces/PrevStateWorkflow.md) --- ## Page: scriptKey URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/scriptKey [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / scriptKey # Function: scriptKey() > **scriptKey**(`scriptHash`): [`ContentKey`](../interfaces/ContentKey.md) ## Parameters ### scriptHash `string` ## Returns [`ContentKey`](../interfaces/ContentKey.md) --- ## Page: serializeBranchPackage URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/serializeBranchPackage [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / serializeBranchPackage # Function: serializeBranchPackage() > **serializeBranchPackage**(`branch`): `Uint8Array` ## Parameters ### branch [`MastBranchPackage`](../interfaces/MastBranchPackage.md) ## Returns `Uint8Array` --- ## Page: serializeEncryptionEnvelope URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/serializeEncryptionEnvelope [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / serializeEncryptionEnvelope # Function: serializeEncryptionEnvelope() > **serializeEncryptionEnvelope**(`envelope`): `Uint8Array` ## Parameters ### envelope [`EncryptionEnvelope`](../interfaces/EncryptionEnvelope.md) ## Returns `Uint8Array` --- ## Page: serializeKeyWrappingEnvelope URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/serializeKeyWrappingEnvelope [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / serializeKeyWrappingEnvelope # Function: serializeKeyWrappingEnvelope() > **serializeKeyWrappingEnvelope**(`envelope`): `Uint8Array` ## Parameters ### envelope [`KeyWrappingEnvelope`](../interfaces/KeyWrappingEnvelope.md) ## Returns `Uint8Array` --- ## Page: sessionSummary URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/sessionSummary [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / sessionSummary # Function: sessionSummary() > **sessionSummary**(`session`): `object` Get the session's readiness summary. ## Parameters ### session [`SigningSession`](../interfaces/SigningSession.md) ## Returns `object` ### evidenceCollected > **evidenceCollected**: `number` ### evidenceRequired > **evidenceRequired**: `number` ### pendingRoles > **pendingRoles**: `string`[] ### remainingEvidence > **remainingEvidence**: `string`[] ### requiredCount > **requiredCount**: `number` ### signedCount > **signedCount**: `number` ### status > **status**: [`SigningSessionStatus`](../type-aliases/SigningSessionStatus.md) --- ## Page: signAvailabilityReceipt URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/signAvailabilityReceipt [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / signAvailabilityReceipt # Function: signAvailabilityReceipt() > **signAvailabilityReceipt**(`receipt`, `signFn`, `custodianPkd`): `Promise`\<[`AvailabilityReceipt`](../interfaces/AvailabilityReceipt.md)\> ## Parameters ### receipt [`AvailabilityReceipt`](../interfaces/AvailabilityReceipt.md) ### signFn (`data`) => `Uint8Array`\<`ArrayBufferLike`\> \| `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> ### custodianPkd `string` ## Returns `Promise`\<[`AvailabilityReceipt`](../interfaces/AvailabilityReceipt.md)\> --- ## Page: signPolicyManifest URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/signPolicyManifest [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / signPolicyManifest # Function: signPolicyManifest() > **signPolicyManifest**(`manifest`, `signFn`, `authorityPkd`): `Promise`\<[`RecursiveMastPolicyManifest`](../interfaces/RecursiveMastPolicyManifest.md)\> Sign a policy manifest with the authority's key. ## Parameters ### manifest `Omit`\<[`RecursiveMastPolicyManifest`](../interfaces/RecursiveMastPolicyManifest.md), `"authoritySignature"` \| `"authorityPkd"` \| `"signedAt"`\> ### signFn (`data`) => `Uint8Array`\<`ArrayBufferLike`\> \| `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> ### authorityPkd `string` ## Returns `Promise`\<[`RecursiveMastPolicyManifest`](../interfaces/RecursiveMastPolicyManifest.md)\> --- ## Page: splitPolicyManifest URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/splitPolicyManifest [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / splitPolicyManifest # Function: splitPolicyManifest() > **splitPolicyManifest**(`manifest`, `branchHashes`): `object` Split a policy manifest into public and restricted components. ## Parameters ### manifest [`RecursiveMastPolicyManifest`](../interfaces/RecursiveMastPolicyManifest.md) ### branchHashes `string`[] ## Returns `object` ### public\_ > **public\_**: [`RecursiveMastPolicyManifest`](../interfaces/RecursiveMastPolicyManifest.md) ### restricted > **restricted**: `string`[] --- ## Page: submitSession URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/submitSession [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / submitSession # Function: submitSession() > **submitSession**(`session`): [`SigningSession`](../interfaces/SigningSession.md) Mark the session as submitted. ## Parameters ### session [`SigningSession`](../interfaces/SigningSession.md) ## Returns [`SigningSession`](../interfaces/SigningSession.md) --- ## Page: timelockWorkflow URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/timelockWorkflow [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / timelockWorkflow # Function: timelockWorkflow() > **timelockWorkflow**(`lockPort`, `ownerPk`): [`PrevStateWorkflow`](../interfaces/PrevStateWorkflow.md) Generate a KISSVM script for a time-locked withdrawal. ## Parameters ### lockPort `number` STATE port for the lock expiry block. ### ownerPk `string` Public key of the owner. ## Returns [`PrevStateWorkflow`](../interfaces/PrevStateWorkflow.md) --- ## Page: toDelegationChainScript URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/toDelegationChainScript [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / toDelegationChainScript # Function: toDelegationChainScript() > **toDelegationChainScript**(`chain`): `string` Generate the full nested MAST script for a delegation chain. Each level delegates to the next via MAST. ## Parameters ### chain `DelegationChain` ## Returns `string` --- ## Page: toMigrationPathScript URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/toMigrationPathScript [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / toMigrationPathScript # Function: toMigrationPathScript() > **toMigrationPathScript**(`path`): `string` Generate the full nested MAST script for a migration path. Each step wraps the next in a migration transition. ## Parameters ### path `MigrationPath` ## Returns `string` --- ## Page: toMinimaProofExpression URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/toMinimaProofExpression [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / toMinimaProofExpression # Function: toMinimaProofExpression() > **toMinimaProofExpression**(`link`): `string` Generate a canonical Minima 5-argument PROOF expression. Canonical Minima syntax: PROOF(data, leafSum, rootHash, rootSum, proofHex) ## Parameters ### link [`ProofLink`](../interfaces/ProofLink.md) ## Returns `string` Minima expression: `PROOF(0x 0x 0x)` --- ## Page: toNestedMastScript URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/toNestedMastScript [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / toNestedMastScript # Function: toNestedMastScript() > **toNestedMastScript**(`chain`): `string` Generate the full nested MAST KISSVM script for a proof chain. Each level uses `MAST 0x` to auto-load the next script from the transaction witness. The VM looks up the witness ScriptProof whose calculated address equals the given root, parses it, and executes it in the same contract context. VM limits: 64 stack depth, 1,024 instructions shared across all frames. ## Parameters ### chain [`ProofChain`](../interfaces/ProofChain.md) ## Returns `string` KISSVM script with nested MAST expressions. --- ## Page: toProofExpression URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/toProofExpression [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / toProofExpression # ~~Function: toProofExpression()~~ > **toProofExpression**(`link`): `string` ## Parameters ### link [`ProofLink`](../interfaces/ProofLink.md) ## Returns `string` ## Deprecated Use toMinimaProofExpression(). Canonical Minima PROOF takes five arguments: data, leafSum, rootHash, rootSum, proofHex. --- ## Page: toTotemProofExpression URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/toTotemProofExpression [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / toTotemProofExpression # ~~Function: toTotemProofExpression()~~ > **toTotemProofExpression**(`link`): `string` ## Parameters ### link [`ProofLink`](../interfaces/ProofLink.md) ## Returns `string` ## Deprecated Use toMinimaProofExpression(). Canonical Minima PROOF takes five arguments: data, leafSum, rootHash, rootSum, proofHex. --- ## Page: unixTimeMsToSec URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/unixTimeMsToSec [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / unixTimeMsToSec # Function: unixTimeMsToSec() > **unixTimeMsToSec**(`ms`): [`UnixTimeSec`](../type-aliases/UnixTimeSec.md) ## Parameters ### ms [`UnixTimeMs`](../type-aliases/UnixTimeMs.md) ## Returns [`UnixTimeSec`](../type-aliases/UnixTimeSec.md) --- ## Page: unixTimeSecToMs URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/unixTimeSecToMs [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / unixTimeSecToMs # Function: unixTimeSecToMs() > **unixTimeSecToMs**(`sec`): [`UnixTimeMs`](../type-aliases/UnixTimeMs.md) ## Parameters ### sec [`UnixTimeSec`](../type-aliases/UnixTimeSec.md) ## Returns [`UnixTimeMs`](../type-aliases/UnixTimeMs.md) --- ## Page: validateInventoryCoverage URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/validateInventoryCoverage [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / validateInventoryCoverage # Function: validateInventoryCoverage() > **validateInventoryCoverage**(`inventory`, `availableHashes`): `object` ## Parameters ### inventory [`BranchInventory`](../interfaces/BranchInventory.md) ### availableHashes `Set`\<`string`\> ## Returns `object` ### available > **available**: `number` ### coverage > **coverage**: `number` ### missing > **missing**: [`BranchInventoryEntry`](../interfaces/BranchInventoryEntry.md)[] ### missingCritical > **missingCritical**: [`BranchInventoryEntry`](../interfaces/BranchInventoryEntry.md)[] ### missingRecovery > **missingRecovery**: [`BranchInventoryEntry`](../interfaces/BranchInventoryEntry.md)[] ### total > **total**: `number` --- ## Page: verifyAvailabilityReceipt URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/verifyAvailabilityReceipt [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / verifyAvailabilityReceipt # Function: verifyAvailabilityReceipt() > **verifyAvailabilityReceipt**(`receipt`, `verifyFn`): `Promise`\<\{ `reason?`: `string`; `valid`: `boolean`; \}\> ## Parameters ### receipt [`AvailabilityReceipt`](../interfaces/AvailabilityReceipt.md) ### verifyFn (`data`, `sig`) => `boolean` \| `Promise`\<`boolean`\> ## Returns `Promise`\<\{ `reason?`: `string`; `valid`: `boolean`; \}\> --- ## Page: verifyBranchPackage URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/verifyBranchPackage [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / verifyBranchPackage # ~~Function: verifyBranchPackage()~~ > **verifyBranchPackage**(`branch`): `object` ## Parameters ### branch [`MastBranchPackage`](../interfaces/MastBranchPackage.md) ## Returns `object` ### ~~reason?~~ > `optional` **reason?**: `string` ### ~~valid~~ > **valid**: `boolean` ## Deprecated Use validateBranchEnvelope() for envelope checks or verifyBranchMembership() for full cryptographic verification. --- ## Page: verifyDelegationChain URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/verifyDelegationChain [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / verifyDelegationChain # Function: verifyDelegationChain() > **verifyDelegationChain**(`chain`): `object` Verify a delegation chain. Each link must: 1. Have a valid Merkle proof (delegation script is in policyRoot) 2. Chain continuity: each link's delegator must be the previous link's delegate 3. Constraints must be satisfied ## Parameters ### chain `DelegationChain` ## Returns `object` ### reason? > `optional` **reason?**: `string` ### valid > **valid**: `boolean` --- ## Page: verifyProofChain URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/verifyProofChain [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / verifyProofChain # Function: verifyProofChain() > **verifyProofChain**(`chain`, `expectedLeafScriptHash?`): [`VerificationResult`](../interfaces/VerificationResult.md) ## Parameters ### chain [`ProofChain`](../interfaces/ProofChain.md) ### expectedLeafScriptHash? `string` ## Returns [`VerificationResult`](../interfaces/VerificationResult.md) --- ## Page: verifyScriptMembership URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/verifyScriptMembership [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / verifyScriptMembership # Function: verifyScriptMembership() > **verifyScriptMembership**(`script`, `proofHex`, `expectedRoot`): `object` ## Parameters ### script `string` ### proofHex `string` ### expectedRoot `string` ## Returns `object` ### reason? > `optional` **reason?**: `string` ### valid > **valid**: `boolean` --- ## Page: verifySigningRequest URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/verifySigningRequest [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / verifySigningRequest # Function: verifySigningRequest() > **verifySigningRequest**(`request`, `options`): `SigningRequestVerificationReport` ## Parameters ### request [`PolicySigningRequest`](../interfaces/PolicySigningRequest.md) ### options `SigningRequestVerificationOptions` ## Returns `SigningRequestVerificationReport` --- ## Page: vestingWorkflow URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/vestingWorkflow [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / vestingWorkflow # Function: vestingWorkflow() > **vestingWorkflow**(`startPort`, `totalPort`, `claimedPort`, `beneficiaryPk`): [`PrevStateWorkflow`](../interfaces/PrevStateWorkflow.md) Generate a KISSVM script for a vesting schedule. ## Parameters ### startPort `number` STATE port for vesting start block. ### totalPort `number` STATE port for total vested amount. ### claimedPort `number` STATE port for previously claimed amount. ### beneficiaryPk `string` Public key of the beneficiary. ## Returns [`PrevStateWorkflow`](../interfaces/PrevStateWorkflow.md) --- ## Page: watchPolicy URL: https://docs.totem.ing/api/totemsdk-recursive-mast/functions/watchPolicy [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / watchPolicy # Function: watchPolicy() > **watchPolicy**(`client`, `config`): () => `void` Watch a policy for updates (epoch changes, rotations, revocations). Returns an unsubscribe function. ## Parameters ### client [`PolicyLookupClient`](../interfaces/PolicyLookupClient.md) ### config [`WatchPolicyConfig`](../interfaces/WatchPolicyConfig.md) ## Returns () => `void` --- ## Page: AnnouncePolicyConfig URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/AnnouncePolicyConfig [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / AnnouncePolicyConfig # Interface: AnnouncePolicyConfig ## Properties ### capabilities > **capabilities**: `string`[] *** ### expiresAt > **expiresAt**: `number` *** ### manifest > **manifest**: [`RecursiveMastPolicyManifest`](RecursiveMastPolicyManifest.md) *** ### manifestBytes > **manifestBytes**: `Uint8Array` --- ## Page: AuditConfig URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/AuditConfig [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / AuditConfig # Interface: AuditConfig ## Properties ### availabilityPolicy > **availabilityPolicy**: [`AvailabilityPolicy`](AvailabilityPolicy.md) *** ### criticalActions > **criticalActions**: `string`[] *** ### policyId > **policyId**: `string` *** ### recoveryAction? > `optional` **recoveryAction?**: `string` *** ### replicas > **replicas**: `PolicyStoreReplica`[] --- ## Page: AvailabilityPolicy URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/AvailabilityPolicy [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / AvailabilityPolicy # Interface: AvailabilityPolicy ## Properties ### archivePreviousVersions > **archivePreviousVersions**: `boolean` *** ### minimumReplicas > **minimumReplicas**: `number` *** ### replicationCheckInterval? > `optional` **replicationCheckInterval?**: `number` *** ### requiredCustodians > **requiredCustodians**: `string`[] *** ### requireLocalCriticalBranches > **requireLocalCriticalBranches**: `boolean` --- ## Page: AvailabilityReceipt URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/AvailabilityReceipt [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / AvailabilityReceipt # Interface: AvailabilityReceipt ## Properties ### branchHashes > **branchHashes**: `string`[] *** ### custodianIdentityId > **custodianIdentityId**: `string` *** ### custodianPkd? > `optional` **custodianPkd?**: `string` *** ### custodianSignature? > `optional` **custodianSignature?**: `string` *** ### expiresAt > **expiresAt**: `number` *** ### inventoryDigest? > `optional` **inventoryDigest?**: `string` *** ### manifestDigest > **manifestDigest**: `string` *** ### policyEpoch > **policyEpoch**: `number` *** ### policyId > **policyId**: `string` *** ### policyRoot > **policyRoot**: `string` *** ### policyVersion > **policyVersion**: `number` *** ### receiptId > **receiptId**: `string` *** ### timestamp > **timestamp**: `number` --- ## Page: BranchFilter URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/BranchFilter [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / BranchFilter # Interface: BranchFilter ## Properties ### action? > `optional` **action?**: `string` *** ### activeOnly? > `optional` **activeOnly?**: `boolean` *** ### minEpoch? > `optional` **minEpoch?**: `number` *** ### minVersion? > `optional` **minVersion?**: `number` *** ### now? > `optional` **now?**: `number` *** ### role? > `optional` **role?**: `string` --- ## Page: BranchInventory URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/BranchInventory [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / BranchInventory # Interface: BranchInventory ## Properties ### branches > **branches**: [`BranchInventoryEntry`](BranchInventoryEntry.md)[] *** ### createdAt > **createdAt**: `number` *** ### epoch > **epoch**: `number` *** ### policyId > **policyId**: `string` *** ### policyRoot > **policyRoot**: `string` *** ### version > **version**: `number` --- ## Page: BranchInventoryEntry URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/BranchInventoryEntry [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / BranchInventoryEntry # Interface: BranchInventoryEntry ## Properties ### action > **action**: `string` *** ### critical > **critical**: `boolean` *** ### policyRoot > **policyRoot**: `string` *** ### recoveryPath > **recoveryPath**: `boolean` *** ### role? > `optional` **role?**: `string` *** ### scriptHash > **scriptHash**: `string` --- ## Page: CompiledMast URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/CompiledMast [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / CompiledMast # Interface: CompiledMast ## Properties ### leafCount > **leafCount**: `number` *** ### rootAddress > **rootAddress**: `string` *** ### rootHex > **rootHex**: `string` *** ### scripts > **scripts**: [`MinimaScriptProof`](MinimaScriptProof.md)[] --- ## Page: CompiledPolicyNode URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/CompiledPolicyNode [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / CompiledPolicyNode # Interface: CompiledPolicyNode ## Properties ### logicalNodeId > **logicalNodeId**: `string` *** ### mast > **mast**: [`CompiledMast`](CompiledMast.md) --- ## Page: CompiledRecursivePolicy URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/CompiledRecursivePolicy [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / CompiledRecursivePolicy # Interface: CompiledRecursivePolicy ## Properties ### anchorAddress > **anchorAddress**: `string` *** ### anchorRoot > **anchorRoot**: `string` *** ### compiledNodes > **compiledNodes**: `Map`\<`string`, [`CompiledPolicyNode`](CompiledPolicyNode.md)\> *** ### graph > **graph**: [`PolicyGraph`](PolicyGraph.md) --- ## Page: ContentKey URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/ContentKey [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / ContentKey # Interface: ContentKey ## Properties ### key > **key**: `string` *** ### parts > **parts**: `string`[] *** ### prefix > **prefix**: `string` --- ## Page: CreateSigningRequestConfig URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/CreateSigningRequestConfig [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / CreateSigningRequestConfig # Interface: CreateSigningRequestConfig ## Properties ### action > **action**: `string` *** ### disclosedScripts > **disclosedScripts**: [`ScriptDisclosure`](ScriptDisclosure.md)[] *** ### evidence > **evidence**: [`SignedEvidence`](SignedEvidence.md)[] *** ### expectedInputs > **expectedInputs**: [`ExpectedInput`](ExpectedInput.md)[] *** ### expectedOutputs > **expectedOutputs**: [`ExpectedOutput`](ExpectedOutput.md)[] *** ### expirySeconds? > `optional` **expirySeconds?**: `number` *** ### policyEpoch > **policyEpoch**: `number` *** ### policyId > **policyId**: `string` *** ### policyVersion > **policyVersion**: `number` *** ### replyEndpoint > **replyEndpoint**: `string` *** ### requestedRole > **requestedRole**: `string` *** ### requesterIdentity > **requesterIdentity**: [`SignedIdentityClaim`](SignedIdentityClaim.md) *** ### selectedPath > **selectedPath**: [`PolicyPathDescriptor`](PolicyPathDescriptor.md) *** ### subjectId > **subjectId**: `string` *** ### transactionDigest > **transactionDigest**: `string` *** ### transactionTemplate > **transactionTemplate**: `Uint8Array` --- ## Page: CreateSigningResponseConfig URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/CreateSigningResponseConfig [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / CreateSigningResponseConfig # Interface: CreateSigningResponseConfig ## Properties ### actingAddress > **actingAddress**: `string` *** ### approvalEvidence? > `optional` **approvalEvidence?**: `string` *** ### identityProof? > `optional` **identityProof?**: [`SignedIdentityClaim`](SignedIdentityClaim.md) *** ### reason? > `optional` **reason?**: `string` *** ### requestId > **requestId**: `string` *** ### role > **role**: `string` *** ### signature? > `optional` **signature?**: `string` *** ### signerIdentityId > **signerIdentityId**: `string` *** ### status > **status**: `"approved"` \| `"rejected"` \| `"needs-information"` --- ## Page: DecryptedBranchResult URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/DecryptedBranchResult [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / DecryptedBranchResult # Interface: DecryptedBranchResult ## Properties ### branch > **branch**: [`MastBranchPackage`](MastBranchPackage.md) *** ### keyFingerprint > **keyFingerprint**: `string` --- ## Page: EncryptedBranchPackage URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/EncryptedBranchPackage [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / EncryptedBranchPackage # Interface: EncryptedBranchPackage ## Properties ### action > **action**: `string` *** ### encryptedPayload > **encryptedPayload**: `Uint8Array` *** ### encryptionKeyFingerprint > **encryptionKeyFingerprint**: `string` *** ### expiresAt? > `optional` **expiresAt?**: `number` *** ### policyEpoch > **policyEpoch**: `number` *** ### policyId > **policyId**: `string` *** ### policyRoot > **policyRoot**: `string` *** ### policyVersion > **policyVersion**: `number` *** ### publisherIdentityId > **publisherIdentityId**: `string` *** ### publisherSignature > **publisherSignature**: `string` *** ### recipientPkds > **recipientPkds**: `string`[] *** ### role? > `optional` **role?**: `string` *** ### scriptHash > **scriptHash**: `string` *** ### validFrom > **validFrom**: `number` --- ## Page: EncryptionEnvelope URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/EncryptionEnvelope [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / EncryptionEnvelope # Interface: EncryptionEnvelope ## Properties ### algorithm > **algorithm**: [`EncryptionAlgorithm`](../type-aliases/EncryptionAlgorithm.md) *** ### ciphertext > **ciphertext**: `Uint8Array` *** ### keyFingerprint > **keyFingerprint**: `string` *** ### nonce > **nonce**: `Uint8Array` *** ### version > **version**: `number` --- ## Page: EvidenceState URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/EvidenceState [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / EvidenceState # Interface: EvidenceState ## Properties ### collected > **collected**: `boolean` *** ### data? > `optional` **data?**: `string` *** ### evidenceId > **evidenceId**: `string` *** ### signerPkd? > `optional` **signerPkd?**: `string` *** ### type > **type**: `string` --- ## Page: ExpectedInput URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/ExpectedInput [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / ExpectedInput # Interface: ExpectedInput ## Properties ### address? > `optional` **address?**: `string` Required address. *** ### amount? > `optional` **amount?**: `string` Required amount. *** ### coinId > **coinId**: `string` Coin ID. *** ### tokenId? > `optional` **tokenId?**: `string` Required token ID. --- ## Page: ExpectedOutput URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/ExpectedOutput [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / ExpectedOutput # Interface: ExpectedOutput ## Properties ### address > **address**: `string` Recipient address. *** ### amount > **amount**: `string` Output amount. *** ### state? > `optional` **state?**: `Record`\<`number`, `string`\> State variables to set. *** ### tokenId? > `optional` **tokenId?**: `string` Token ID. --- ## Page: HttpStoreOptions URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/HttpStoreOptions [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / HttpStoreOptions # Interface: HttpStoreOptions ## Properties ### baseUrl > **baseUrl**: `string` *** ### fetchFn? > `optional` **fetchFn?**: (`input`, `init?`) => `Promise`\<`Response`\> #### Parameters ##### input `string` \| `URL` \| `Request` ##### init? `RequestInit` #### Returns `Promise`\<`Response`\> *** ### timeoutMs? > `optional` **timeoutMs?**: `number` --- ## Page: KeyWrappingEnvelope URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/KeyWrappingEnvelope [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / KeyWrappingEnvelope # Interface: KeyWrappingEnvelope ## Properties ### algorithm > **algorithm**: [`EncryptionAlgorithm`](../type-aliases/EncryptionAlgorithm.md) *** ### keyFingerprint > **keyFingerprint**: `string` *** ### recipientPkd > **recipientPkd**: `string` *** ### version > **version**: `number` *** ### wrappedKey > **wrappedKey**: `Uint8Array` --- ## Page: LayeredPolicyConfig URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/LayeredPolicyConfig [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / LayeredPolicyConfig # Interface: LayeredPolicyConfig ## Properties ### assetId > **assetId**: `string` Asset root identifier (e.g. device serial, fleet ID, site ID). *** ### assetName > **assetName**: `string` Asset root name. *** ### layers > **layers**: [`PolicyLayer`](PolicyLayer.md)[] Ordered layers from root to action. *** ### maxDepth? > `optional` **maxDepth?**: `number` Optional: maximum allowed depth (default 7). --- ## Page: MastBranchPackage URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/MastBranchPackage [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / MastBranchPackage # Interface: MastBranchPackage ## Properties ### action > **action**: `string` *** ### childRoots? > `optional` **childRoots?**: `string`[] *** ### evidenceRequirements? > `optional` **evidenceRequirements?**: `string`[] *** ### expiresAt? > `optional` **expiresAt?**: `number` *** ### policyEpoch > **policyEpoch**: `number` *** ### policyId > **policyId**: `string` *** ### policyRoot > **policyRoot**: `string` *** ### policyVersion > **policyVersion**: `number` *** ### proof > **proof**: `Uint8Array` *** ### publisherIdentityId > **publisherIdentityId**: `string` *** ### publisherSignature > **publisherSignature**: `string` *** ### role? > `optional` **role?**: `string` *** ### script > **script**: `string` *** ### scriptHash > **scriptHash**: `string` *** ### validFrom > **validFrom**: `number` --- ## Page: MastBranchSummary URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/MastBranchSummary [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / MastBranchSummary # Interface: MastBranchSummary ## Properties ### action > **action**: `string` *** ### expiresAt? > `optional` **expiresAt?**: `number` *** ### policyEpoch > **policyEpoch**: `number` *** ### policyVersion > **policyVersion**: `number` *** ### role? > `optional` **role?**: `string` *** ### scriptHash > **scriptHash**: `string` *** ### validFrom > **validFrom**: `number` --- ## Page: MemoryStoreOptions URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/MemoryStoreOptions [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / MemoryStoreOptions # Interface: MemoryStoreOptions ## Properties ### persistPath? > `optional` **persistPath?**: `string` --- ## Page: MinimaScriptProof URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/MinimaScriptProof [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / MinimaScriptProof # Interface: MinimaScriptProof Canonical MAST compiler — produces Minima-compatible MMR roots, script addresses, and ScriptProofs using the core package's byte-exact MMR primitives. Algorithm (matching Minima Address.java + MMRSet.java): 1. Use the EXACT script text (no normalization — Minima commits to the script as-is via MiniString encoding) 2. Compute MMR leaf: sha3(MiniNumber.ZERO || MiniString(script) || MiniNumber.ZERO) 3. Build MMR tree from all script leaves using canonical parent construction 4. Compute Mx address from root via Base32 encoding 5. Generate MMR proofs for each leaf including peak-bagging steps Peak bagging uses iterative adjacent-pairing (matching Minima Java's MMRSet.getMMRRoot) rather than right-to-left chaining. This implementation handles arbitrary leaf counts (not just powers of 2). ## Properties ### address > **address**: `string` *** ### proofHex > **proofHex**: `string` *** ### script > **script**: `string` --- ## Page: MirrorResult URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/MirrorResult [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / MirrorResult # Interface: MirrorResult ## Properties ### branchesCopied > **branchesCopied**: `number` *** ### bundlesCopied > **bundlesCopied**: `number` *** ### destination > **destination**: `string` *** ### errors > **errors**: `string`[] *** ### manifestsCopied > **manifestsCopied**: `number` *** ### source > **source**: `string` --- ## Page: PolicyAction URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/PolicyAction [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / PolicyAction # Interface: PolicyAction ## Properties ### action > **action**: `string` Action identifier (e.g. "firmware.install", "maintenance.restart"). *** ### description > **description**: `string` Human-readable description. *** ### executionRoot > **executionRoot**: `string` The MAST root that executes this action. *** ### expirySeconds > **expirySeconds**: `number` Maximum validity of a signing request in seconds. *** ### inputs > **inputs**: `Record`\<`string`, `string`\> Required input fields and their types. *** ### optionalRoles? > `optional` **optionalRoles?**: `string`[] Roles that MAY sign (e.g. fleet-operator, insurer). *** ### requestEndpoint > **requestEndpoint**: `string` Where to send signing requests for this action. *** ### requiredRoles > **requiredRoles**: `string`[] Roles that MUST sign. --- ## Page: PolicyAnchorConfig URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/PolicyAnchorConfig [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / PolicyAnchorConfig # Interface: PolicyAnchorConfig Policy Anchor Coin — a stable on-chain UTXO whose locking script commits to a set of policy roots that can rotate through state updates. The anchor has explicit branches: 1. Normal action — MAST the selected action root 2. Root rotation — MAST the root-rotation authority 3. Epoch advancement — MAST the epoch-advancement authority 4. Recovery — MAST the recovery root 5. Emergency — MAST the emergency root Every successful branch must enforce the complete successor anchor: - Same subject identity - Same token and amount (unless explicitly permitted) - Expected anchor script/address - Exact next epoch - Authorized root changes only - Unchanged roots preserved - Expected manifest commitment - Exactly one valid successor output - No duplicate anchor outputs State port assignments: State 0 = subject ID State 10 = current regulator policy root State 11 = current owner policy root State 12 = current service-provider root State 13 = current firmware-approval root State 14 = policy epoch State 15 = policy-manifest commitment State 16 = recovery root State 17 = emergency root State 18 = action root (set by the spender to select which action to execute) ## Properties ### emergencyRoot? > `optional` **emergencyRoot?**: `string` *** ### initialEpoch > **initialEpoch**: `number` *** ### institutionalRoot > **institutionalRoot**: `string` *** ### ports > **ports**: `object` #### actionRoot > **actionRoot**: `number` #### emergencyRoot > **emergencyRoot**: `number` #### epoch > **epoch**: `number` #### firmwareApprovalRoot > **firmwareApprovalRoot**: `number` #### manifestHash > **manifestHash**: `number` #### ownerRoot > **ownerRoot**: `number` #### recoveryRoot > **recoveryRoot**: `number` #### regulatorRoot > **regulatorRoot**: `number` #### serviceProviderRoot > **serviceProviderRoot**: `number` *** ### recoveryRoot? > `optional` **recoveryRoot?**: `string` *** ### subjectId > **subjectId**: `string` *** ### subjectType > **subjectType**: `"site"` \| `"vehicle"` \| `"machine"` \| `"device"` \| `"fleet"` \| `"building"` --- ## Page: PolicyAvailabilityReport URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/PolicyAvailabilityReport [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / PolicyAvailabilityReport # Interface: PolicyAvailabilityReport ## Properties ### availableBranches > **availableBranches**: `number` *** ### branchCoverage > **branchCoverage**: `number` *** ### checkedAt > **checkedAt**: `number` *** ### manifestReplicas > **manifestReplicas**: `number` *** ### manifestVersionsAvailable > **manifestVersionsAvailable**: `number`[] *** ### manifestVersionsMissing > **manifestVersionsMissing**: `number`[] *** ### meetsMinimumReplicas > **meetsMinimumReplicas**: `boolean` *** ### missingBranches > **missingBranches**: `string`[] *** ### policyId > **policyId**: `string` *** ### recoveryPathAvailable > **recoveryPathAvailable**: `boolean` *** ### totalBranches > **totalBranches**: `number` *** ### unmirroredCriticalPaths > **unmirroredCriticalPaths**: `string`[] *** ### warnings > **warnings**: `string`[] --- ## Page: PolicyDelegationEdge URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/PolicyDelegationEdge [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / PolicyDelegationEdge # Interface: PolicyDelegationEdge ## Properties ### constraints? > `optional` **constraints?**: `Record`\<`string`, `unknown`\> *** ### from > **from**: `string` *** ### to > **to**: `string` --- ## Page: PolicyEndpoint URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/PolicyEndpoint [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / PolicyEndpoint # Interface: PolicyEndpoint ## Properties ### address > **address**: `string` Connection string or topic. *** ### id > **id**: `string` Endpoint identifier. *** ### purpose > **purpose**: `"signing"` \| `"discovery"` \| `"announcement"` \| `"audit"` \| `"recovery"` Purpose of this endpoint. *** ### transport > **transport**: `"hyperswarm"` \| `"websocket"` \| `"mqtt"` \| `"http"` \| `"custom"` Transport type. --- ## Page: PolicyGraph URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/PolicyGraph [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / PolicyGraph # Interface: PolicyGraph ## Properties ### edges > **edges**: [`PolicyDelegationEdge`](PolicyDelegationEdge.md)[] *** ### nodes > **nodes**: [`PolicyGraphNode`](PolicyGraphNode.md)[] --- ## Page: PolicyGraphNode URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/PolicyGraphNode [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / PolicyGraphNode # Interface: PolicyGraphNode ## Properties ### id > **id**: `string` *** ### name > **name**: `string` *** ### parentId? > `optional` **parentId?**: `string` *** ### scripts > **scripts**: `string`[] --- ## Page: PolicyLayer URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/PolicyLayer [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / PolicyLayer # Interface: PolicyLayer ## Properties ### authorityPkd > **authorityPkd**: `string` The public key digest of the authority controlling this layer. *** ### constraints? > `optional` **constraints?**: `Record`\<`string`, `unknown`\> Optional: constraints specific to this layer. *** ### id > **id**: `string` Unique identifier for this layer. *** ### name > **name**: `string` Human-readable layer name. *** ### script > **script**: `string` The KISSVM script for this layer. --- ## Page: PolicyLookupClient URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/PolicyLookupClient [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / PolicyLookupClient # Interface: PolicyLookupClient ## Methods ### announcePolicy() > **announcePolicy**(`manifest`, `metadata`): `Promise`\<`void`\> Announce a policy manifest to the network. #### Parameters ##### manifest `Uint8Array` ##### metadata ###### authorityIdentityId `string` ###### capabilities `string`[] ###### expiresAt `number` ###### policyEpoch `number` ###### policyId `string` ###### policyRoot `string` ###### policyVersion `number` ###### subjectId `string` #### Returns `Promise`\<`void`\> *** ### queryPolicies() > **queryPolicies**(`params`): `Promise`\<[`PolicyQueryResult`](PolicyQueryResult.md)[]\> Query the network for policies. #### Parameters ##### params ###### activeOnly? `boolean` ###### authorityIdentityId? `string` ###### capability? `string` ###### limit? `number` ###### minEpoch? `number` ###### minVersion? `number` ###### policyId? `string` ###### policyRoot? `string` ###### subjectId? `string` #### Returns `Promise`\<[`PolicyQueryResult`](PolicyQueryResult.md)[]\> *** ### watchPolicy() > **watchPolicy**(`policyId`, `afterEpoch`, `onUpdate`): () => `void` Watch for policy updates. #### Parameters ##### policyId `string` ##### afterEpoch `number` ##### onUpdate (`update`) => `void` #### Returns () => `void` --- ## Page: PolicyNode URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/PolicyNode [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / PolicyNode # Interface: PolicyNode ## Properties ### children > **children**: `PolicyNode`[] *** ### id > **id**: `string` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### name > **name**: `string` *** ### parentId? > `optional` **parentId?**: `string` *** ### policyRoot > **policyRoot**: `string` *** ### script > **script**: `string` *** ### scriptHash > **scriptHash**: `string` --- ## Page: PolicyNodeInput URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/PolicyNodeInput [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / PolicyNodeInput # Interface: PolicyNodeInput ## Properties ### id > **id**: `string` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### name > **name**: `string` *** ### parentId? > `optional` **parentId?**: `string` *** ### script > **script**: `string` --- ## Page: PolicyPathDescriptor URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/PolicyPathDescriptor [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / PolicyPathDescriptor # Interface: PolicyPathDescriptor ## Properties ### action > **action**: `string` The action being executed. *** ### executionRoot > **executionRoot**: `string` The executing MAST root. *** ### roots > **roots**: `string`[] Ordered chain of policy roots from anchor to action. --- ## Page: PolicyQueryResult URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/PolicyQueryResult [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / PolicyQueryResult # Interface: PolicyQueryResult ## Properties ### expiresAt > **expiresAt**: `number` *** ### manifest > **manifest**: `Uint8Array` *** ### nodeId > **nodeId**: `string` *** ### policyEpoch > **policyEpoch**: `number` *** ### policyId > **policyId**: `string` *** ### policyRoot > **policyRoot**: `string` *** ### policyVersion > **policyVersion**: `number` --- ## Page: PolicyRole URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/PolicyRole [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / PolicyRole # Interface: PolicyRole ## Properties ### currentRoot > **currentRoot**: `string` Current root for this role's subtree. *** ### description > **description**: `string` Human-readable description. *** ### discoveryEndpoint? > `optional` **discoveryEndpoint?**: `string` How to discover the current signer for this role. *** ### federated > **federated**: `boolean` Whether this role is managed by an independent policy subtree. *** ### persistent > **persistent**: `boolean` Whether this role persists across policy epochs. *** ### role > **role**: `string` Role identifier (e.g. "oem-release-authority", "vehicle-owner"). --- ## Page: PolicySignature URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/PolicySignature [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / PolicySignature # Interface: PolicySignature ## Properties ### keyIndex > **keyIndex**: `number` *** ### leaseReceipt > **leaseReceipt**: `string` *** ### publicKey > **publicKey**: `string` *** ### signature > **signature**: `string` *** ### signedAt > **signedAt**: [`UnixTimeMs`](../type-aliases/UnixTimeMs.md) --- ## Page: PolicySigner URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/PolicySigner [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / PolicySigner # Interface: PolicySigner ## Properties ### address > **address**: `string` ## Methods ### burnKey()? > `optional` **burnKey**(`leaseReceipt`, `reason`): `Promise`\<`void`\> #### Parameters ##### leaseReceipt `string` ##### reason `string` #### Returns `Promise`\<`void`\> *** ### commitKey()? > `optional` **commitKey**(`leaseReceipt`): `Promise`\<`void`\> #### Parameters ##### leaseReceipt `string` #### Returns `Promise`\<`void`\> *** ### getPublicKey() > **getPublicKey**(): `Promise`\<`string`\> #### Returns `Promise`\<`string`\> *** ### reserveKey()? > `optional` **reserveKey**(): `Promise`\<\{ `keyIndex`: `number`; `leaseReceipt`: `string`; \}\> #### Returns `Promise`\<\{ `keyIndex`: `number`; `leaseReceipt`: `string`; \}\> *** ### signDomainSeparated() > **signDomainSeparated**(`domain`, `payload`): `Promise`\<[`PolicySignature`](PolicySignature.md)\> #### Parameters ##### domain [`SigningDomain`](../type-aliases/SigningDomain.md) ##### payload `Uint8Array` #### Returns `Promise`\<[`PolicySignature`](PolicySignature.md)\> --- ## Page: PolicySignerConfig URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/PolicySignerConfig [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / PolicySignerConfig # Interface: PolicySignerConfig ## Properties ### address > **address**: `string` *** ### publicKeyHex > **publicKeyHex**: `string` *** ### signFn > **signFn**: (`data`, `keyIndex`) => `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> #### Parameters ##### data `Uint8Array` ##### keyIndex `number` #### Returns `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> *** ### treeId > **treeId**: `string` *** ### wotsLeaseProvider? > `optional` **wotsLeaseProvider?**: `object` #### burnReservation() > **burnReservation**(`reservationId`, `reason`): `Promise`\<`void`\> ##### Parameters ###### reservationId `string` ###### reason `string` ##### Returns `Promise`\<`void`\> #### commitReservation() > **commitReservation**(`reservationId`, `txId`): `Promise`\<`void`\> ##### Parameters ###### reservationId `string` ###### txId `string` ##### Returns `Promise`\<`void`\> #### reserveKeyUse() > **reserveKeyUse**(`params`): `Promise`\<\{ `indices`: \{ `l1`: `number`; `l2`: `number`; `l3`: `number`; \}; `publicKey`: `string`; `reservationId`: `string`; \}\> ##### Parameters ###### params ###### branchId? `string` ###### deviceId? `string` ###### payloadHash? `string` ###### purpose? `string` ###### treeId `string` ###### ttlMs? `number` ##### Returns `Promise`\<\{ `indices`: \{ `l1`: `number`; `l2`: `number`; `l3`: `number`; \}; `publicKey`: `string`; `reservationId`: `string`; \}\> --- ## Page: PolicySigningRequest URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/PolicySigningRequest [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / PolicySigningRequest # Interface: PolicySigningRequest ## Properties ### action > **action**: `string` The action being executed. *** ### disclosedScripts > **disclosedScripts**: [`ScriptDisclosure`](ScriptDisclosure.md)[] Disclosed scripts for verification. *** ### evidence > **evidence**: [`SignedEvidence`](SignedEvidence.md)[] Supporting evidence. *** ### expectedInputs > **expectedInputs**: [`ExpectedInput`](ExpectedInput.md)[] Expected inputs. *** ### expectedOutputs > **expectedOutputs**: [`ExpectedOutput`](ExpectedOutput.md)[] Expected outputs. *** ### expiresAt > **expiresAt**: `number` When the request expires. *** ### policyEpoch > **policyEpoch**: `number` Current policy epoch. *** ### policyId > **policyId**: `string` The policy manifest ID. *** ### policyVersion > **policyVersion**: `number` Policy version. *** ### replyEndpoint > **replyEndpoint**: `string` Where to send the response. *** ### requestedAt > **requestedAt**: `number` When the request was created. *** ### requestedRole > **requestedRole**: `string` The role being requested to sign. *** ### requesterIdentity > **requesterIdentity**: [`SignedIdentityClaim`](SignedIdentityClaim.md) The requester's identity claim. *** ### requesterSignature > **requesterSignature**: `string` The requester's signature over the request. *** ### requestId > **requestId**: `string` Unique request identifier. *** ### selectedPath > **selectedPath**: [`PolicyPathDescriptor`](PolicyPathDescriptor.md) The policy path from anchor to action. *** ### subjectId > **subjectId**: `string` The subject being acted upon. *** ### transactionDigest > **transactionDigest**: `string` The canonical transaction digest to sign. *** ### transactionTemplate > **transactionTemplate**: `Uint8Array` The transaction template (serialised Minima TX). --- ## Page: PolicySigningResponse URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/PolicySigningResponse [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / PolicySigningResponse # Interface: PolicySigningResponse ## Properties ### actingAddress > **actingAddress**: `string` *** ### approvalEvidence? > `optional` **approvalEvidence?**: `string` *** ### identityProof? > `optional` **identityProof?**: [`SignedIdentityClaim`](SignedIdentityClaim.md) *** ### reason? > `optional` **reason?**: `string` *** ### requestId > **requestId**: `string` *** ### responseId > **responseId**: `string` *** ### role > **role**: `string` *** ### signature? > `optional` **signature?**: `string` *** ### signedAt > **signedAt**: `number` *** ### signerIdentityId > **signerIdentityId**: `string` *** ### status > **status**: `"approved"` \| `"rejected"` \| `"needs-information"` --- ## Page: PolicyTree URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/PolicyTree [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / PolicyTree # Interface: PolicyTree ## Properties ### depth > **depth**: `number` *** ### nodeCount > **nodeCount**: `number` *** ### nodeMap > **nodeMap**: `Map`\<`string`, [`PolicyNode`](PolicyNode.md)\> *** ### root > **root**: [`PolicyNode`](PolicyNode.md) --- ## Page: PolicyUpdateNotification URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/PolicyUpdateNotification [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / PolicyUpdateNotification # Interface: PolicyUpdateNotification ## Properties ### currentRoot > **currentRoot**: `string` *** ### manifest > **manifest**: `Uint8Array` *** ### policyEpoch > **policyEpoch**: `number` *** ### policyId > **policyId**: `string` *** ### policyVersion > **policyVersion**: `number` *** ### previousRoot? > `optional` **previousRoot?**: `string` --- ## Page: PrevStateWorkflow URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/PrevStateWorkflow [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / PrevStateWorkflow # Interface: PrevStateWorkflow ## Properties ### id > **id**: `string` *** ### name > **name**: `string` *** ### script > **script**: `string` *** ### scriptHash > **scriptHash**: `string` *** ### transitions > **transitions**: [`StateTransition`](StateTransition.md)[] --- ## Page: ProofChain URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/ProofChain [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / ProofChain # Interface: ProofChain ## Properties ### depth > **depth**: `number` *** ### leafScriptHash > **leafScriptHash**: `string` *** ### links > **links**: [`ProofLink`](ProofLink.md)[] *** ### verified > **verified**: `boolean` --- ## Page: ProofLink URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/ProofLink [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / ProofLink # Interface: ProofLink ## Properties ### label? > `optional` **label?**: `string` *** ### leafSum? > `optional` **leafSum?**: `MiniNumber` *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### policyRoot > **policyRoot**: `string` *** ### proof > **proof**: `string` *** ### rootSum? > `optional` **rootSum?**: `MiniNumber` *** ### script > **script**: `string` *** ### scriptHash > **scriptHash**: `string` --- ## Page: QueryPolicyConfig URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/QueryPolicyConfig [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / QueryPolicyConfig # Interface: QueryPolicyConfig ## Properties ### activeOnly? > `optional` **activeOnly?**: `boolean` Only return active (non-expired, non-revoked) policies. *** ### authorityIdentityId? > `optional` **authorityIdentityId?**: `string` Find policies by authority identity. *** ### capability? > `optional` **capability?**: `string` Find policies supporting a specific capability. *** ### limit? > `optional` **limit?**: `number` Maximum number of results. *** ### minEpoch? > `optional` **minEpoch?**: `number` Minimum policy epoch. *** ### minVersion? > `optional` **minVersion?**: `number` Minimum policy version. *** ### policyId? > `optional` **policyId?**: `string` Find a specific policy by ID. *** ### policyRoot? > `optional` **policyRoot?**: `string` Find policies by root hash. *** ### subjectId? > `optional` **subjectId?**: `string` Find policies for a specific subject (vehicle, machine, device). --- ## Page: RecursiveMastPolicyManifest URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/RecursiveMastPolicyManifest [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / RecursiveMastPolicyManifest # Interface: RecursiveMastPolicyManifest ## Properties ### actions > **actions**: [`PolicyAction`](PolicyAction.md)[] Available actions. *** ### anchorAddress > **anchorAddress**: `string` The address of the Policy Anchor Coin. *** ### anchorCoinId? > `optional` **anchorCoinId?**: `string` The coin ID of the Policy Anchor Coin (if on-chain). *** ### authorityPkd? > `optional` **authorityPkd?**: `string` The public key digest that signed the manifest. *** ### authoritySignature? > `optional` **authoritySignature?**: `string` Signature by the policy's institutional authority. *** ### endpoints > **endpoints**: [`PolicyEndpoint`](PolicyEndpoint.md)[] Communication endpoints. *** ### epoch > **epoch**: `number` Current policy epoch. *** ### expiresAt? > `optional` **expiresAt?**: `number` Block height at which this policy expires (optional). *** ### policyId > **policyId**: `string` Unique policy identifier. *** ### policyPackageHash > **policyPackageHash**: `string` SHA3-256 of the complete policy package (scripts + proofs + metadata). *** ### policyRoot > **policyRoot**: `string` The Merkle root of the policy's MAST script tree. *** ### previousVersion? > `optional` **previousVersion?**: `string` Previous version's policyId (for chain verification). *** ### roles > **roles**: [`PolicyRole`](PolicyRole.md)[] Roles defined in this policy. *** ### signedAt? > `optional` **signedAt?**: `number` Timestamp of signing. *** ### status > **status**: `"draft"` \| `"active"` \| `"superseded"` \| `"revoked"` Policy status. *** ### subject > **subject**: `object` The subject being governed. #### id > **id**: `string` #### type > **type**: `"site"` \| `"vehicle"` \| `"machine"` \| `"device"` \| `"fleet"` \| `"building"` *** ### successorVersion? > `optional` **successorVersion?**: `string` Next version's policyId (if superseded). *** ### validFrom > **validFrom**: `number` Block height from which this policy is valid. *** ### version > **version**: `number` Policy version number. --- ## Page: RecursiveMastPolicyStore URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/RecursiveMastPolicyStore [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / RecursiveMastPolicyStore # Interface: RecursiveMastPolicyStore ## Methods ### deleteBranch()? > `optional` **deleteBranch**(`policyRoot`, `scriptHash`): `Promise`\<`void`\> #### Parameters ##### policyRoot `string` ##### scriptHash `string` #### Returns `Promise`\<`void`\> *** ### deleteManifest()? > `optional` **deleteManifest**(`policyId`, `version`): `Promise`\<`void`\> #### Parameters ##### policyId `string` ##### version `number` #### Returns `Promise`\<`void`\> *** ### getBranch() > **getBranch**(`policyRoot`, `scriptHash`): `Promise`\<[`MastBranchPackage`](MastBranchPackage.md) \| `null`\> #### Parameters ##### policyRoot `string` ##### scriptHash `string` #### Returns `Promise`\<[`MastBranchPackage`](MastBranchPackage.md) \| `null`\> *** ### getBundle() > **getBundle**(`bundleHash`): `Promise`\<\{ `branches`: [`MastBranchPackage`](MastBranchPackage.md)[]; `manifest`: [`RecursiveMastPolicyManifest`](RecursiveMastPolicyManifest.md); \} \| `null`\> #### Parameters ##### bundleHash `string` #### Returns `Promise`\<\{ `branches`: [`MastBranchPackage`](MastBranchPackage.md)[]; `manifest`: [`RecursiveMastPolicyManifest`](RecursiveMastPolicyManifest.md); \} \| `null`\> *** ### getManifest() > **getManifest**(`policyId`, `version?`): `Promise`\<[`RecursiveMastPolicyManifest`](RecursiveMastPolicyManifest.md) \| `null`\> #### Parameters ##### policyId `string` ##### version? `number` #### Returns `Promise`\<[`RecursiveMastPolicyManifest`](RecursiveMastPolicyManifest.md) \| `null`\> *** ### hasBranch()? > `optional` **hasBranch**(`policyRoot`, `scriptHash`): `Promise`\<`boolean`\> #### Parameters ##### policyRoot `string` ##### scriptHash `string` #### Returns `Promise`\<`boolean`\> *** ### hasManifest()? > `optional` **hasManifest**(`policyId`, `version?`): `Promise`\<`boolean`\> #### Parameters ##### policyId `string` ##### version? `number` #### Returns `Promise`\<`boolean`\> *** ### listBranches()? > `optional` **listBranches**(`policyRoot`, `filter?`): `Promise`\<[`MastBranchSummary`](MastBranchSummary.md)[]\> #### Parameters ##### policyRoot `string` ##### filter? [`BranchFilter`](BranchFilter.md) #### Returns `Promise`\<[`MastBranchSummary`](MastBranchSummary.md)[]\> *** ### listManifests()? > `optional` **listManifests**(`policyId`): `Promise`\<`number`[]\> #### Parameters ##### policyId `string` #### Returns `Promise`\<`number`[]\> *** ### mirrorPolicy()? > `optional` **mirrorPolicy**(`policyId`, `destination`): `Promise`\<[`MirrorResult`](MirrorResult.md)\> #### Parameters ##### policyId `string` ##### destination `RecursiveMastPolicyStore` #### Returns `Promise`\<[`MirrorResult`](MirrorResult.md)\> *** ### putBranch() > **putBranch**(`branch`): `Promise`\<`string`\> #### Parameters ##### branch [`MastBranchPackage`](MastBranchPackage.md) #### Returns `Promise`\<`string`\> *** ### putBundle() > **putBundle**(`manifest`, `branches`): `Promise`\<`string`\> #### Parameters ##### manifest [`RecursiveMastPolicyManifest`](RecursiveMastPolicyManifest.md) ##### branches [`MastBranchPackage`](MastBranchPackage.md)[] #### Returns `Promise`\<`string`\> *** ### putManifest() > **putManifest**(`manifest`): `Promise`\<`string`\> #### Parameters ##### manifest [`RecursiveMastPolicyManifest`](RecursiveMastPolicyManifest.md) #### Returns `Promise`\<`string`\> --- ## Page: RequiredRoleState URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/RequiredRoleState [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / RequiredRoleState # Interface: RequiredRoleState ## Properties ### required > **required**: `boolean` *** ### role > **role**: `string` *** ### signature? > `optional` **signature?**: `string` *** ### signed > **signed**: `boolean` *** ### signedAt? > `optional` **signedAt?**: `number` *** ### signerIdentityId? > `optional` **signerIdentityId?**: `string` --- ## Page: ResolvePolicyConfig URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/ResolvePolicyConfig [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / ResolvePolicyConfig # Interface: ResolvePolicyConfig ## Properties ### action > **action**: `string` The action to resolve a policy for. *** ### minEpoch? > `optional` **minEpoch?**: `number` Minimum acceptable policy epoch. *** ### minVersion? > `optional` **minVersion?**: `number` Minimum acceptable policy version. *** ### subjectId > **subjectId**: `string` The subject to resolve a policy for. --- ## Page: ResolvedPolicy URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/ResolvedPolicy [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / ResolvedPolicy # Interface: ResolvedPolicy ## Properties ### current > **current**: `boolean` Whether the resolved policy is current (epoch matches latest). *** ### manifest > **manifest**: [`RecursiveMastPolicyManifest`](RecursiveMastPolicyManifest.md) *** ### queryResult > **queryResult**: [`PolicyQueryResult`](PolicyQueryResult.md) --- ## Page: RestrictedBranchPackage URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/RestrictedBranchPackage [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / RestrictedBranchPackage # Interface: RestrictedBranchPackage ## Properties ### branchHash > **branchHash**: `string` The branch's script hash. *** ### counterpartyInstructions > **counterpartyInstructions**: `string` Instructions for the counterparty. *** ### encryptedContent? > `optional` **encryptedContent?**: `Uint8Array`\<`ArrayBufferLike`\> Encrypted content (optional, for sensitive branches). *** ### encryptionKeyFingerprint? > `optional` **encryptionKeyFingerprint?**: `string` Encryption key fingerprint (if encrypted). *** ### mmrProof > **mmrProof**: `string` MMR proof that this branch is in the policy root. *** ### parameterSchema > **parameterSchema**: `Record`\<`string`, `string`\> Parameter schema for the branch. *** ### policyId > **policyId**: `string` The policy ID this branch package belongs to. *** ### recipientPkds > **recipientPkds**: `string`[] Recipient public key digests. *** ### script > **script**: `string` The KISS VM branch script. --- ## Page: ScriptDisclosure URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/ScriptDisclosure [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / ScriptDisclosure # Interface: ScriptDisclosure ## Properties ### mmrProof > **mmrProof**: `string` MMR proof that this script is in the policy root. *** ### script > **script**: `string` The KISS VM script text. *** ### scriptHash > **scriptHash**: `string` The script hash. --- ## Page: SignedEvidence URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/SignedEvidence [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / SignedEvidence # Interface: SignedEvidence ## Properties ### data > **data**: `string` The evidence data. *** ### evidenceId > **evidenceId**: `string` Evidence identifier. *** ### signature > **signature**: `string` Signature over the evidence. *** ### signerPkd > **signerPkd**: `string` The signer's public key digest. *** ### type > **type**: `string` Type of evidence (e.g. "credential", "work-order", "calibration"). --- ## Page: SignedIdentityClaim URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/SignedIdentityClaim [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / SignedIdentityClaim # Interface: SignedIdentityClaim ## Properties ### identity > **identity**: `string` The claimed identity (e.g. "did:totem:..."). *** ### identityId > **identityId**: `string` The identity document ID. *** ### issuerPkd > **issuerPkd**: `string` The issuer's public key digest. *** ### issuerSignature > **issuerSignature**: `string` The issuer's signature. *** ### subjectPkd > **subjectPkd**: `string` The subject's public key digest. *** ### subjectSignature > **subjectSignature**: `string` The subject's signature. --- ## Page: SigningRoundResult URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/SigningRoundResult [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / SigningRoundResult # Interface: SigningRoundResult ## Properties ### approved > **approved**: [`PolicySigningResponse`](PolicySigningResponse.md)[] *** ### complete > **complete**: `boolean` *** ### errors > **errors**: `string`[] *** ### needsInfo > **needsInfo**: [`PolicySigningResponse`](PolicySigningResponse.md)[] *** ### pending > **pending**: `string`[] *** ### rejected > **rejected**: [`PolicySigningResponse`](PolicySigningResponse.md)[] *** ### signatures > **signatures**: `Record`\<`string`, `string`\> --- ## Page: SigningSession URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/SigningSession [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / SigningSession # Interface: SigningSession ## Properties ### action > **action**: `string` *** ### createdAt > **createdAt**: `number` *** ### evidence > **evidence**: [`EvidenceState`](EvidenceState.md)[] *** ### expiresAt > **expiresAt**: `number` *** ### policyEpoch > **policyEpoch**: `number` *** ### policyId > **policyId**: `string` *** ### policyVersion > **policyVersion**: `number` *** ### requestId > **requestId**: `string` *** ### requiredRoles > **requiredRoles**: [`RequiredRoleState`](RequiredRoleState.md)[] *** ### responses > **responses**: [`PolicySigningResponse`](PolicySigningResponse.md)[] *** ### sessionId > **sessionId**: `string` *** ### status > **status**: [`SigningSessionStatus`](../type-aliases/SigningSessionStatus.md) *** ### transactionDigest > **transactionDigest**: `string` *** ### updatedAt > **updatedAt**: `number` --- ## Page: SigningSessionConfig URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/SigningSessionConfig [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / SigningSessionConfig # Interface: SigningSessionConfig ## Properties ### action > **action**: `string` *** ### expirySeconds? > `optional` **expirySeconds?**: `number` *** ### optionalRoles? > `optional` **optionalRoles?**: `string`[] *** ### policyEpoch > **policyEpoch**: `number` *** ### policyId > **policyId**: `string` *** ### policyVersion > **policyVersion**: `number` *** ### requiredEvidence > **requiredEvidence**: `object`[] #### evidenceId > **evidenceId**: `string` #### type > **type**: `string` *** ### requiredRoles > **requiredRoles**: `string`[] *** ### transactionDigest > **transactionDigest**: `string` --- ## Page: StateTransition URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/StateTransition [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / StateTransition # Interface: StateTransition ## Properties ### currentValue > **currentValue**: `string` *** ### name > **name**: `string` *** ### port > **port**: `number` *** ### previousValue > **previousValue**: `string` *** ### transition > **transition**: `string` *** ### valid > **valid**: `boolean` --- ## Page: VerificationResult URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/VerificationResult [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / VerificationResult # Interface: VerificationResult ## Properties ### chain? > `optional` **chain?**: [`ProofChain`](ProofChain.md) *** ### failedAt? > `optional` **failedAt?**: `number` *** ### reason? > `optional` **reason?**: `string` *** ### valid > **valid**: `boolean` --- ## Page: WatchPolicyConfig URL: https://docs.totem.ing/api/totemsdk-recursive-mast/interfaces/WatchPolicyConfig [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / WatchPolicyConfig # Interface: WatchPolicyConfig ## Properties ### afterEpoch? > `optional` **afterEpoch?**: `number` Only notify for epochs after this value. *** ### onUpdate > **onUpdate**: (`update`) => `void` Called when the policy is updated. #### Parameters ##### update [`PolicyUpdateNotification`](PolicyUpdateNotification.md) #### Returns `void` *** ### policyId > **policyId**: `string` The policy to watch. --- ## Page: BlockDuration URL: https://docs.totem.ing/api/totemsdk-recursive-mast/type-aliases/BlockDuration [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / BlockDuration # Type Alias: BlockDuration > **BlockDuration** = `number` & `object` ## Type Declaration ### \[BlockDurationBrand\] > **\[BlockDurationBrand\]**: `true` --- ## Page: BlockHeight URL: https://docs.totem.ing/api/totemsdk-recursive-mast/type-aliases/BlockHeight [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / BlockHeight # Type Alias: BlockHeight > **BlockHeight** = `number` & `object` ## Type Declaration ### \[BlockHeightBrand\] > **\[BlockHeightBrand\]**: `true` --- ## Page: EncodingDomain URL: https://docs.totem.ing/api/totemsdk-recursive-mast/type-aliases/EncodingDomain [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / EncodingDomain # Type Alias: EncodingDomain > **EncodingDomain** = `"MANF"` \| `"BRIN"` \| `"AVRC"` \| `"SREQ"` \| `"SRES"` \| `"EVID"` \| `"BUND"` --- ## Page: EncryptionAlgorithm URL: https://docs.totem.ing/api/totemsdk-recursive-mast/type-aliases/EncryptionAlgorithm [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / EncryptionAlgorithm # Type Alias: EncryptionAlgorithm > **EncryptionAlgorithm** = *typeof* [`ENCRYPTION_ALGORITHMS`](../variables/ENCRYPTION_ALGORITHMS.md)\[keyof *typeof* [`ENCRYPTION_ALGORITHMS`](../variables/ENCRYPTION_ALGORITHMS.md)\] --- ## Page: SigningDomain URL: https://docs.totem.ing/api/totemsdk-recursive-mast/type-aliases/SigningDomain [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / SigningDomain # Type Alias: SigningDomain > **SigningDomain** = `"policy-manifest"` \| `"branch-package"` \| `"signing-request"` \| `"signing-response"` \| `"evidence"` \| `"availability-receipt"` --- ## Page: SigningSessionStatus URL: https://docs.totem.ing/api/totemsdk-recursive-mast/type-aliases/SigningSessionStatus [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / SigningSessionStatus # Type Alias: SigningSessionStatus > **SigningSessionStatus** = `"draft"` \| `"resolving"` \| `"awaiting-evidence"` \| `"awaiting-signatures"` \| `"ready"` \| `"expired"` \| `"rejected"` \| `"cancelled"` \| `"submitted"` \| `"confirmed"` --- ## Page: UnixTimeMs URL: https://docs.totem.ing/api/totemsdk-recursive-mast/type-aliases/UnixTimeMs [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / UnixTimeMs # Type Alias: UnixTimeMs > **UnixTimeMs** = `number` & `object` ## Type Declaration ### \[UnixTimeMsBrand\] > **\[UnixTimeMsBrand\]**: `true` --- ## Page: UnixTimeSec URL: https://docs.totem.ing/api/totemsdk-recursive-mast/type-aliases/UnixTimeSec [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / UnixTimeSec # Type Alias: UnixTimeSec > **UnixTimeSec** = `number` & `object` ## Type Declaration ### \[UnixTimeSecBrand\] > **\[UnixTimeSecBrand\]**: `true` --- ## Page: CANONICAL_ENCODING_VERSION URL: https://docs.totem.ing/api/totemsdk-recursive-mast/variables/CANONICAL_ENCODING_VERSION [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / CANONICAL\_ENCODING\_VERSION # Variable: CANONICAL\_ENCODING\_VERSION > `const` **CANONICAL\_ENCODING\_VERSION**: `1` = `1` --- ## Page: ENCRYPTION_ALGORITHMS URL: https://docs.totem.ing/api/totemsdk-recursive-mast/variables/ENCRYPTION_ALGORITHMS [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / ENCRYPTION\_ALGORITHMS # Variable: ENCRYPTION\_ALGORITHMS > `const` **ENCRYPTION\_ALGORITHMS**: `object` ## Type Declaration ### AES\_256\_GCM > `readonly` **AES\_256\_GCM**: `1` = `0x01` ### CHACHA20\_POLY1305 > `readonly` **CHACHA20\_POLY1305**: `2` = `0x02` --- ## Page: ENVELOPE_VERSION URL: https://docs.totem.ing/api/totemsdk-recursive-mast/variables/ENVELOPE_VERSION [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / ENVELOPE\_VERSION # Variable: ENVELOPE\_VERSION > `const` **ENVELOPE\_VERSION**: `1` = `1` --- ## Page: KEY_PREFIX URL: https://docs.totem.ing/api/totemsdk-recursive-mast/variables/KEY_PREFIX [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / KEY\_PREFIX # Variable: KEY\_PREFIX > `const` **KEY\_PREFIX**: `object` ## Type Declaration ### BUNDLE > `readonly` **BUNDLE**: `"bundle"` = `'bundle'` ### MANIFEST\_DIGEST > `readonly` **MANIFEST\_DIGEST**: `"manifest"` = `'manifest'` ### POLICY\_MANIFEST > `readonly` **POLICY\_MANIFEST**: `"policy"` = `'policy'` ### PROOF > `readonly` **PROOF**: `"proof"` = `'proof'` ### SCRIPT > `readonly` **SCRIPT**: `"script"` = `'script'` --- ## Page: STANDARD_LAYERS URL: https://docs.totem.ing/api/totemsdk-recursive-mast/variables/STANDARD_LAYERS [**@totemsdk/recursive-mast**](../index.md) *** [@totemsdk/recursive-mast](../index.md) / STANDARD\_LAYERS # Variable: STANDARD\_LAYERS > `const` **STANDARD\_LAYERS**: `object` Standard layer IDs for the canonical 7-layer chain. ## Type Declaration ### ASSET > `readonly` **ASSET**: `"asset"` ### MANUFACTURER > `readonly` **MANUFACTURER**: `"manufacturer"` ### OPERATOR > `readonly` **OPERATOR**: `"operator"` ### OWNER > `readonly` **OWNER**: `"owner"` ### PRODUCT > `readonly` **PRODUCT**: `"product"` ### REGULATORY > `readonly` **REGULATORY**: `"regulatory"` ### SITE > `readonly` **SITE**: `"site"` --- ## Page: UnifiedIdentityWallet URL: https://docs.totem.ing/api/totemsdk-root-identity/classes/UnifiedIdentityWallet [**@totemsdk/root-identity**](../index.md) *** [@totemsdk/root-identity](../index.md) / UnifiedIdentityWallet # Class: UnifiedIdentityWallet ## Constructors ### Constructor > **new UnifiedIdentityWallet**(`baseSeed`, `childCount?`): `UnifiedIdentityWallet` #### Parameters ##### baseSeed `Uint8Array` 32-byte raw seed (use `UnifiedIdentityWallet.fromPhrase` for mnemonic input) ##### childCount? `number` = `MAX_CHILD_COUNT` Number of child addresses (1–64, default 64) #### Returns `UnifiedIdentityWallet` ## Methods ### getAddressMap() > **getAddressMap**(): `object` Root address and children as a structured object. #### Returns `object` ##### children > **children**: `string`[] ##### root > **root**: `string` *** ### getAllAddresses() > **getAllAddresses**(): `string`[] All addresses: root first, then all children in order. #### Returns `string`[] *** ### getChildAddress() > **getChildAddress**(`index`): `string` Minima spend address for child `index` (0-based). #### Parameters ##### index `number` #### Returns `string` *** ### getChildCount() > **getChildCount**(): `number` Number of child addresses configured for this wallet. #### Returns `number` *** ### getChildPublicKey() > **getChildPublicKey**(`index`): `string` 64-char hex public key for child `index`. #### Parameters ##### index `number` #### Returns `string` *** ### getChildTreeKey() > **getChildTreeKey**(`index`): `TreeKey` Get (or create and cache) the TreeKey for child `index` (0-based). Use this for transaction signing — the child TreeKey is the spend key. Call `getChildUses` / `setChildUses` to manage the watermark manually. #### Parameters ##### index `number` #### Returns `TreeKey` *** ### getChildUses() > **getChildUses**(`index`): `number` Number of times child `index` has signed (for persistence). #### Parameters ##### index `number` #### Returns `number` *** ### getMaxUsesPerSlot() > **getMaxUsesPerSlot**(): `number` Maximum one-time signatures available per slot (3 levels × 64 keys = 262 144). #### Returns `number` *** ### getRootAddress() > **getRootAddress**(): `string` Minima address for the root key. NEVER use this address for spending. #### Returns `string` *** ### getRootPublicKey() > **getRootPublicKey**(): `string` 64-char hex public key for the root key. #### Returns `string` *** ### getRootTreeKey() > **getRootTreeKey**(): `TreeKey` Get (or create and cache) the root identity TreeKey. Use this only for off-chain attestation signing, not for spending. #### Returns `TreeKey` *** ### getRootUses() > **getRootUses**(): `number` Number of times the root identity key has signed (for persistence). #### Returns `number` *** ### getWatermarkState() > **getWatermarkState**(): `object` Return a serialisable snapshot of all current watermark counters. Persist the returned object (e.g. to encrypted storage) and pass it back to `restoreWatermarkState()` at the start of the next session so that no one-time-use signing slot is ever reused. #### Returns `object` ##### childUses > **childUses**: `Record`\<`number`, `number`\> ##### rootUses > **rootUses**: `number` *** ### proveOwnership() > **proveOwnership**(`childIndices`): [`OwnershipProof`](../interfaces/OwnershipProof.md) Produce an ownership proof demonstrating that this root identity controls all given child addresses. The root key signs a canonical JSON message containing all child public keys (sorted) and a timestamp, enabling third-party verification without any network access. #### Parameters ##### childIndices `number`[] Which children to include (0-based) #### Returns [`OwnershipProof`](../interfaces/OwnershipProof.md) *** ### restoreWatermarkState() > **restoreWatermarkState**(`state`): `void` Restore watermark counters from a previously persisted snapshot. Call this immediately after constructing the wallet to prevent slot reuse across sessions. Out-of-range or invalid entries are silently skipped. #### Parameters ##### state ###### childUses? `Record`\<`number`, `number`\> ###### rootUses? `number` #### Returns `void` *** ### setChildUses() > **setChildUses**(`index`, `uses`): `void` Restore child watermark from a previously persisted value. #### Parameters ##### index `number` ##### uses `number` #### Returns `void` *** ### setRootUses() > **setRootUses**(`uses`): `void` Restore root watermark from a previously persisted value. #### Parameters ##### uses `number` #### Returns `void` *** ### signFromChild() > **signFromChild**(`index`, `message`): [`WotsProof`](../interfaces/WotsProof.md) Sign `message` with child key `index` (0-based) for on-chain transactions. Each child maintains its own independent use counter. #### Parameters ##### index `number` ##### message `string` #### Returns [`WotsProof`](../interfaces/WotsProof.md) #### Throws if child TreeKey is exhausted or index out of range *** ### signFromRoot() > **signFromRoot**(`message`): [`WotsProof`](../interfaces/WotsProof.md) Sign `message` with the root identity key (for off-chain attestations). Hashes the message with SHA3-256 before signing. #### Parameters ##### message `string` #### Returns [`WotsProof`](../interfaces/WotsProof.md) #### Throws if root TreeKey is exhausted (262 144 uses) *** ### fromPhrase() > `static` **fromPhrase**(`phrase`, `childCount?`): `UnifiedIdentityWallet` Create a wallet from a Minima-compatible BIP39 seed phrase. #### Parameters ##### phrase `string` ##### childCount? `number` = `MAX_CHILD_COUNT` #### Returns `UnifiedIdentityWallet` *** ### generatePhrase() > `static` **generatePhrase**(): `string` Generate a new random Minima-compatible 24-word seed phrase. #### Returns `string` *** ### validatePhrase() > `static` **validatePhrase**(`phrase`): `boolean` Validate a Minima-compatible seed phrase. #### Parameters ##### phrase `string` #### Returns `boolean` *** ### verifyOwnershipProof() > `static` **verifyOwnershipProof**(`proof`): `boolean` Verify an ownership proof produced by `proveOwnership`. Returns `true` only when: - The canonical message is reconstructed correctly (child keys are sorted). - The root WOTS signature validates against the root public key and address. - Every child public key correctly derives the corresponding child address. Pure crypto — no network access required. Always returns `false` (never throws) on malformed or incomplete proof data. #### Parameters ##### proof [`OwnershipProof`](../interfaces/OwnershipProof.md) #### Returns `boolean` --- ## Page: OwnershipProof URL: https://docs.totem.ing/api/totemsdk-root-identity/interfaces/OwnershipProof [**@totemsdk/root-identity**](../index.md) *** [@totemsdk/root-identity](../index.md) / OwnershipProof # Interface: OwnershipProof Ownership proof demonstrating that a root key controls a set of child addresses. The root key signs a canonical JSON message that includes all child public keys and a timestamp, allowing third parties to verify the claim without any interaction with the blockchain. Verification steps: 1. Rebuild the canonical message from `rootAddress`, `childPublicKeys`, and `timestamp`. 2. Verify `rootProof.signature` over that message with `rootProof.publicKey`. 3. For each `(childPublicKeys[i], childAddresses[i])` pair confirm the address is correctly derived from the public key. ## Properties ### childAddresses > **childAddresses**: `string`[] *** ### childPublicKeys > **childPublicKeys**: `string`[] *** ### rootAddress > **rootAddress**: `string` *** ### rootProof > **rootProof**: [`WotsProof`](WotsProof.md) *** ### rootPublicKey > **rootPublicKey**: `string` *** ### timestamp > **timestamp**: `string` --- ## Page: WotsProof URL: https://docs.totem.ing/api/totemsdk-root-identity/interfaces/WotsProof [**@totemsdk/root-identity**](../index.md) *** [@totemsdk/root-identity](../index.md) / WotsProof # Interface: WotsProof A single WOTS signing proof tied to an on-chain address. Both `signature` and `publicKey` are lower-case hex strings (no 0x prefix). `message` is the exact UTF-8 string that was signed so callers can reconstruct the SHA3-256 digest independently. ## Properties ### address > **address**: `string` *** ### message > **message**: `string` *** ### publicKey > **publicKey**: `string` *** ### signature > **signature**: `string` --- ## Page: MAX_CHILD_COUNT URL: https://docs.totem.ing/api/totemsdk-root-identity/variables/MAX_CHILD_COUNT [**@totemsdk/root-identity**](../index.md) *** [@totemsdk/root-identity](../index.md) / MAX\_CHILD\_COUNT # Variable: MAX\_CHILD\_COUNT > `const` **MAX\_CHILD\_COUNT**: `64` = `64` --- ## Page: consumeNonce URL: https://docs.totem.ing/api/totemsdk-se-server/functions/consumeNonce [**@totemsdk/se-server**](../index.md) *** [@totemsdk/se-server](../index.md) / consumeNonce # Function: consumeNonce() > **consumeNonce**(`pool`, `nonce`): `Promise`\<`string` \| `null`\> ## Parameters ### pool `Pool` ### nonce `string` ## Returns `Promise`\<`string` \| `null`\> --- ## Page: createSeRouter URL: https://docs.totem.ing/api/totemsdk-se-server/functions/createSeRouter [**@totemsdk/se-server**](../index.md) *** [@totemsdk/se-server](../index.md) / createSeRouter # Function: createSeRouter() > **createSeRouter**(`config`, `pool`): `Router` ## Parameters ### config [`SeServerConfig`](../interfaces/SeServerConfig.md) ### pool `Pool` ## Returns `Router` --- ## Page: createSeServer URL: https://docs.totem.ing/api/totemsdk-se-server/functions/createSeServer [**@totemsdk/se-server**](../index.md) *** [@totemsdk/se-server](../index.md) / createSeServer # Function: createSeServer() > **createSeServer**(`config`, `monitorOpts?`): [`SeServer`](../interfaces/SeServer.md) Create a fully configured SE server. Runs `migrateStatechainTables` on first `listen()` call. The returned `app` can also be mounted into an existing Express app at any path if you prefer not to bind a new port. The router is mounted at both `/statechain` (legacy) and `/v1/statechain` (versioned, stable). ## Parameters ### config [`SeServerConfig`](../interfaces/SeServerConfig.md) ### monitorOpts? `TimelockMonitorOptions` ## Returns [`SeServer`](../interfaces/SeServer.md) --- ## Page: createTimelockMonitor URL: https://docs.totem.ing/api/totemsdk-se-server/functions/createTimelockMonitor [**@totemsdk/se-server**](../index.md) *** [@totemsdk/se-server](../index.md) / createTimelockMonitor # Function: createTimelockMonitor() > **createTimelockMonitor**(`pool`, `opts?`): `object` ## Parameters ### pool `Pool` ### opts? `TimelockMonitorOptions` = `{}` ## Returns `object` ### start() > **start**(): `void` #### Returns `void` ### stop() > **stop**(): `void` #### Returns `void` --- ## Page: decryptReclaimTx URL: https://docs.totem.ing/api/totemsdk-se-server/functions/decryptReclaimTx [**@totemsdk/se-server**](../index.md) *** [@totemsdk/se-server](../index.md) / decryptReclaimTx # Function: decryptReclaimTx() > **decryptReclaimTx**(`seed`, `enc`): `string` ## Parameters ### seed `Uint8Array` ### enc `string` ## Returns `string` --- ## Page: encryptReclaimTx URL: https://docs.totem.ing/api/totemsdk-se-server/functions/encryptReclaimTx [**@totemsdk/se-server**](../index.md) *** [@totemsdk/se-server](../index.md) / encryptReclaimTx # Function: encryptReclaimTx() > **encryptReclaimTx**(`seed`, `reclaimTxHex`): `string` ## Parameters ### seed `Uint8Array` ### reclaimTxHex `string` ## Returns `string` --- ## Page: getApproachingTimelockChains URL: https://docs.totem.ing/api/totemsdk-se-server/functions/getApproachingTimelockChains [**@totemsdk/se-server**](../index.md) *** [@totemsdk/se-server](../index.md) / getApproachingTimelockChains # Function: getApproachingTimelockChains() > **getApproachingTimelockChains**(`pool`): `Promise`\<[`StatechainRecord`](../interfaces/StatechainRecord.md)[]\> ## Parameters ### pool `Pool` ## Returns `Promise`\<[`StatechainRecord`](../interfaces/StatechainRecord.md)[]\> --- ## Page: getPublicKeyHex URL: https://docs.totem.ing/api/totemsdk-se-server/functions/getPublicKeyHex [**@totemsdk/se-server**](../index.md) *** [@totemsdk/se-server](../index.md) / getPublicKeyHex # Function: getPublicKeyHex() > **getPublicKeyHex**(`seed`): `string` Derives the SE WOTS public key digest from seed. Fast approximation using sha3_256 — consistent with what axia-api stores in statechain_records.se_public_key and what clients verify against. ## Parameters ### seed `Uint8Array` ## Returns `string` --- ## Page: getPublicKeyHexAsync URL: https://docs.totem.ing/api/totemsdk-se-server/functions/getPublicKeyHexAsync [**@totemsdk/se-server**](../index.md) *** [@totemsdk/se-server](../index.md) / getPublicKeyHexAsync # Function: getPublicKeyHexAsync() > **getPublicKeyHexAsync**(`seed`): `Promise`\<`string`\> Full WOTS public key derivation (async, loads WASM core). ## Parameters ### seed `Uint8Array` ## Returns `Promise`\<`string`\> --- ## Page: getStatechainRecord URL: https://docs.totem.ing/api/totemsdk-se-server/functions/getStatechainRecord [**@totemsdk/se-server**](../index.md) *** [@totemsdk/se-server](../index.md) / getStatechainRecord # Function: getStatechainRecord() > **getStatechainRecord**(`pool`, `chainId`): `Promise`\<[`StatechainRecord`](../interfaces/StatechainRecord.md) \| `null`\> ## Parameters ### pool `Pool` ### chainId `string` ## Returns `Promise`\<[`StatechainRecord`](../interfaces/StatechainRecord.md) \| `null`\> --- ## Page: insertRevocation URL: https://docs.totem.ing/api/totemsdk-se-server/functions/insertRevocation [**@totemsdk/se-server**](../index.md) *** [@totemsdk/se-server](../index.md) / insertRevocation # Function: insertRevocation() > **insertRevocation**(`pool`, `chainId`, `revokedPartyId`, `revokedPkd`): `Promise`\<`void`\> ## Parameters ### pool `Pool` ### chainId `string` ### revokedPartyId `string` ### revokedPkd `string` ## Returns `Promise`\<`void`\> --- ## Page: insertStatechainRecord URL: https://docs.totem.ing/api/totemsdk-se-server/functions/insertStatechainRecord [**@totemsdk/se-server**](../index.md) *** [@totemsdk/se-server](../index.md) / insertStatechainRecord # Function: insertStatechainRecord() > **insertStatechainRecord**(`pool`, `rec`): `Promise`\<`void`\> ## Parameters ### pool `Pool` ### rec `Omit`\<[`StatechainRecord`](../interfaces/StatechainRecord.md), `"transfer_count"` \| `"status"` \| `"created_at"` \| `"updated_at"`\> ## Returns `Promise`\<`void`\> --- ## Page: isRevoked URL: https://docs.totem.ing/api/totemsdk-se-server/functions/isRevoked [**@totemsdk/se-server**](../index.md) *** [@totemsdk/se-server](../index.md) / isRevoked # Function: isRevoked() > **isRevoked**(`pool`, `chainId`, `partyId`): `Promise`\<`boolean`\> ## Parameters ### pool `Pool` ### chainId `string` ### partyId `string` ## Returns `Promise`\<`boolean`\> --- ## Page: issueNonce URL: https://docs.totem.ing/api/totemsdk-se-server/functions/issueNonce [**@totemsdk/se-server**](../index.md) *** [@totemsdk/se-server](../index.md) / issueNonce # Function: issueNonce() > **issueNonce**(`pool`, `chainId`): `Promise`\<`string`\> ## Parameters ### pool `Pool` ### chainId `string` ## Returns `Promise`\<`string`\> --- ## Page: loadConfigFromEnv URL: https://docs.totem.ing/api/totemsdk-se-server/functions/loadConfigFromEnv [**@totemsdk/se-server**](../index.md) *** [@totemsdk/se-server](../index.md) / loadConfigFromEnv # Function: loadConfigFromEnv() > **loadConfigFromEnv**(): [`SeServerConfig`](../interfaces/SeServerConfig.md) Load config from standard environment variables. Throws on missing/invalid SE_KEY. ## Returns [`SeServerConfig`](../interfaces/SeServerConfig.md) --- ## Page: logSignEvent URL: https://docs.totem.ing/api/totemsdk-se-server/functions/logSignEvent [**@totemsdk/se-server**](../index.md) *** [@totemsdk/se-server](../index.md) / logSignEvent # Function: logSignEvent() > **logSignEvent**(`pool`, `chainId`, `eventType`): `Promise`\<`void`\> ## Parameters ### pool `Pool` ### chainId `string` ### eventType `string` ## Returns `Promise`\<`void`\> --- ## Page: migrateStatechainTables URL: https://docs.totem.ing/api/totemsdk-se-server/functions/migrateStatechainTables [**@totemsdk/se-server**](../index.md) *** [@totemsdk/se-server](../index.md) / migrateStatechainTables # Function: migrateStatechainTables() > **migrateStatechainTables**(`pool`): `Promise`\<`void`\> ## Parameters ### pool `Pool` ## Returns `Promise`\<`void`\> --- ## Page: seSign URL: https://docs.totem.ing/api/totemsdk-se-server/functions/seSign [**@totemsdk/se-server**](../index.md) *** [@totemsdk/se-server](../index.md) / seSign # Function: seSign() > **seSign**(`seed`, `commitmentBytes`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> Sign commitmentBytes with the SE's WOTS key at index 0. ## Parameters ### seed `Uint8Array` ### commitmentBytes `Uint8Array` ## Returns `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> --- ## Page: updateStatechainOwner URL: https://docs.totem.ing/api/totemsdk-se-server/functions/updateStatechainOwner [**@totemsdk/se-server**](../index.md) *** [@totemsdk/se-server](../index.md) / updateStatechainOwner # Function: updateStatechainOwner() > **updateStatechainOwner**(`pool`, `chainId`, `newOwnerPartyId`, `newOwnerPkd`, `newReclaimTxHexEnc`): `Promise`\<`void`\> ## Parameters ### pool `Pool` ### chainId `string` ### newOwnerPartyId `string` ### newOwnerPkd `string` ### newReclaimTxHexEnc `string` ## Returns `Promise`\<`void`\> --- ## Page: updateStatechainStatus URL: https://docs.totem.ing/api/totemsdk-se-server/functions/updateStatechainStatus [**@totemsdk/se-server**](../index.md) *** [@totemsdk/se-server](../index.md) / updateStatechainStatus # Function: updateStatechainStatus() > **updateStatechainStatus**(`pool`, `chainId`, `status`): `Promise`\<`void`\> ## Parameters ### pool `Pool` ### chainId `string` ### status `"active"` \| `"claimed"` \| `"disputed"` ## Returns `Promise`\<`void`\> --- ## Page: wotsVerifyDigestAsync URL: https://docs.totem.ing/api/totemsdk-se-server/functions/wotsVerifyDigestAsync [**@totemsdk/se-server**](../index.md) *** [@totemsdk/se-server](../index.md) / wotsVerifyDigestAsync # Function: wotsVerifyDigestAsync() > **wotsVerifyDigestAsync**(`sig`, `message`, `pkDigest`): `Promise`\<`boolean`\> Verify a WOTS digest signature. Generic — verifies any operator's signature. ## Parameters ### sig `Uint8Array` ### message `Uint8Array` ### pkDigest `Uint8Array` ## Returns `Promise`\<`boolean`\> --- ## Page: SeServer URL: https://docs.totem.ing/api/totemsdk-se-server/interfaces/SeServer [**@totemsdk/se-server**](../index.md) *** [@totemsdk/se-server](../index.md) / SeServer # Interface: SeServer ## Properties ### app > **app**: `Express` *** ### pool > **pool**: `Pool` ## Methods ### close() > **close**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### listen() > **listen**(`port?`): `Promise`\<`Server`\<*typeof* `IncomingMessage`, *typeof* `ServerResponse`\>\> #### Parameters ##### port? `number` #### Returns `Promise`\<`Server`\<*typeof* `IncomingMessage`, *typeof* `ServerResponse`\>\> --- ## Page: SeServerConfig URL: https://docs.totem.ing/api/totemsdk-se-server/interfaces/SeServerConfig [**@totemsdk/se-server**](../index.md) *** [@totemsdk/se-server](../index.md) / SeServerConfig # Interface: SeServerConfig ## Properties ### betaMode? > `optional` **betaMode?**: `boolean` Adds X-Beta headers to all responses. Default false (stable API). *** ### databaseUrl > **databaseUrl**: `string` Postgres connection string, e.g. postgres://user:pass@host/db *** ### onSign? > `optional` **onSign?**: (`event`) => `void` Called after every SE signing event. Lets operators hook in billing, audit logging, or rate limiting without patching this package. #### Parameters ##### event [`SeSignEvent`](SeSignEvent.md) #### Returns `void` *** ### port? > `optional` **port?**: `number` Port to listen on when using createSeServer().listen(). Default 4000. *** ### reclaimTimelock? > `optional` **reclaimTimelock?**: `number` On-chain reclaim timelock in blocks. Default 256. *** ### seSeed > **seSeed**: `Uint8Array` 32-byte WOTS seed for the SE key. --- ## Page: SeSignEvent URL: https://docs.totem.ing/api/totemsdk-se-server/interfaces/SeSignEvent [**@totemsdk/se-server**](../index.md) *** [@totemsdk/se-server](../index.md) / SeSignEvent # Interface: SeSignEvent ## Properties ### chainId > **chainId**: `string` *** ### eventType > **eventType**: `string` *** ### projectId? > `optional` **projectId?**: `string` --- ## Page: StatechainRecord URL: https://docs.totem.ing/api/totemsdk-se-server/interfaces/StatechainRecord [**@totemsdk/se-server**](../index.md) *** [@totemsdk/se-server](../index.md) / StatechainRecord # Interface: StatechainRecord ## Properties ### chain\_id > **chain\_id**: `string` *** ### coin\_id > **coin\_id**: `string` *** ### created\_at > **created\_at**: `Date` *** ### current\_owner\_party\_id > **current\_owner\_party\_id**: `string` *** ### current\_owner\_pkd > **current\_owner\_pkd**: `string` *** ### locking\_address > **locking\_address**: `string` *** ### project\_id > **project\_id**: `string` *** ### reclaim\_tx\_hex\_enc > **reclaim\_tx\_hex\_enc**: `string` *** ### se\_public\_key > **se\_public\_key**: `string` *** ### statechain\_script > **statechain\_script**: `string` *** ### status > **status**: `"active"` \| `"claimed"` \| `"disputed"` *** ### token\_id > **token\_id**: `string` *** ### transfer\_count > **transfer\_count**: `number` *** ### updated\_at > **updated\_at**: `Date` --- ## Page: TimelockAlert URL: https://docs.totem.ing/api/totemsdk-se-server/interfaces/TimelockAlert [**@totemsdk/se-server**](../index.md) *** [@totemsdk/se-server](../index.md) / TimelockAlert # Interface: TimelockAlert ## Properties ### chain > **chain**: [`StatechainRecord`](StatechainRecord.md) *** ### message > **message**: `string` --- ## Page: SE_API_VERSION URL: https://docs.totem.ing/api/totemsdk-se-server/variables/SE_API_VERSION [**@totemsdk/se-server**](../index.md) *** [@totemsdk/se-server](../index.md) / SE\_API\_VERSION # Variable: SE\_API\_VERSION > `const` **SE\_API\_VERSION**: `"v1"` = `'v1'` Stable API version prefix. The wire format is frozen at v1. --- ## Page: ConsoleLogger URL: https://docs.totem.ing/api/totemsdk-server/classes/ConsoleLogger [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / ConsoleLogger # Class: ConsoleLogger ## Implements - [`LoggerAdapter`](../interfaces/LoggerAdapter.md) ## Constructors ### Constructor > **new ConsoleLogger**(`prefix?`): `ConsoleLogger` #### Parameters ##### prefix? `string` #### Returns `ConsoleLogger` ## Methods ### debug() > **debug**(`message`, ...`args`): `void` #### Parameters ##### message `string` ##### args ...`unknown`[] #### Returns `void` #### Implementation of [`LoggerAdapter`](../interfaces/LoggerAdapter.md).[`debug`](../interfaces/LoggerAdapter.md#debug) *** ### error() > **error**(`message`, ...`args`): `void` #### Parameters ##### message `string` ##### args ...`unknown`[] #### Returns `void` #### Implementation of [`LoggerAdapter`](../interfaces/LoggerAdapter.md).[`error`](../interfaces/LoggerAdapter.md#error) *** ### info() > **info**(`message`, ...`args`): `void` #### Parameters ##### message `string` ##### args ...`unknown`[] #### Returns `void` #### Implementation of [`LoggerAdapter`](../interfaces/LoggerAdapter.md).[`info`](../interfaces/LoggerAdapter.md#info) *** ### warn() > **warn**(`message`, ...`args`): `void` #### Parameters ##### message `string` ##### args ...`unknown`[] #### Returns `void` #### Implementation of [`LoggerAdapter`](../interfaces/LoggerAdapter.md).[`warn`](../interfaces/LoggerAdapter.md#warn) --- ## Page: DefaultTimerAdapter URL: https://docs.totem.ing/api/totemsdk-server/classes/DefaultTimerAdapter [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / DefaultTimerAdapter # Class: DefaultTimerAdapter ## Implements - [`TimerAdapter`](../interfaces/TimerAdapter.md) ## Constructors ### Constructor > **new DefaultTimerAdapter**(): `DefaultTimerAdapter` #### Returns `DefaultTimerAdapter` ## Methods ### clearInterval() > **clearInterval**(`handle`): `void` #### Parameters ##### handle `Timeout` #### Returns `void` #### Implementation of [`TimerAdapter`](../interfaces/TimerAdapter.md).[`clearInterval`](../interfaces/TimerAdapter.md#clearinterval) *** ### clearTimeout() > **clearTimeout**(`handle`): `void` #### Parameters ##### handle `Timeout` #### Returns `void` #### Implementation of [`TimerAdapter`](../interfaces/TimerAdapter.md).[`clearTimeout`](../interfaces/TimerAdapter.md#cleartimeout) *** ### now() > **now**(): `number` #### Returns `number` #### Implementation of [`TimerAdapter`](../interfaces/TimerAdapter.md).[`now`](../interfaces/TimerAdapter.md#now) *** ### setInterval() > **setInterval**(`callback`, `ms`): `Timeout` #### Parameters ##### callback () => `void` ##### ms `number` #### Returns `Timeout` #### Implementation of [`TimerAdapter`](../interfaces/TimerAdapter.md).[`setInterval`](../interfaces/TimerAdapter.md#setinterval) *** ### setTimeout() > **setTimeout**(`callback`, `ms`): `Timeout` #### Parameters ##### callback () => `void` ##### ms `number` #### Returns `Timeout` #### Implementation of [`TimerAdapter`](../interfaces/TimerAdapter.md).[`setTimeout`](../interfaces/TimerAdapter.md#settimeout) --- ## Page: EnvironmentAuthProvider URL: https://docs.totem.ing/api/totemsdk-server/classes/EnvironmentAuthProvider [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / EnvironmentAuthProvider # Class: EnvironmentAuthProvider ## Implements - [`AuthTokenProvider`](../interfaces/AuthTokenProvider.md) ## Constructors ### Constructor > **new EnvironmentAuthProvider**(`envVarName?`): `EnvironmentAuthProvider` #### Parameters ##### envVarName? `string` = `'TOTEM_AUTH_TOKEN'` #### Returns `EnvironmentAuthProvider` ## Methods ### clearToken() > **clearToken**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> #### Implementation of [`AuthTokenProvider`](../interfaces/AuthTokenProvider.md).[`clearToken`](../interfaces/AuthTokenProvider.md#cleartoken) *** ### getToken() > **getToken**(): `Promise`\<`string` \| `null`\> #### Returns `Promise`\<`string` \| `null`\> #### Implementation of [`AuthTokenProvider`](../interfaces/AuthTokenProvider.md).[`getToken`](../interfaces/AuthTokenProvider.md#gettoken) *** ### isAuthenticated() > **isAuthenticated**(): `Promise`\<`boolean`\> #### Returns `Promise`\<`boolean`\> #### Implementation of [`AuthTokenProvider`](../interfaces/AuthTokenProvider.md).[`isAuthenticated`](../interfaces/AuthTokenProvider.md#isauthenticated) *** ### onTokenChange() > **onTokenChange**(`_callback`): () => `void` #### Parameters ##### \_callback (`token`) => `void` #### Returns () => `void` #### Implementation of [`AuthTokenProvider`](../interfaces/AuthTokenProvider.md).[`onTokenChange`](../interfaces/AuthTokenProvider.md#ontokenchange) *** ### setToken() > **setToken**(`_token`): `Promise`\<`void`\> #### Parameters ##### \_token `string` #### Returns `Promise`\<`void`\> #### Implementation of [`AuthTokenProvider`](../interfaces/AuthTokenProvider.md).[`setToken`](../interfaces/AuthTokenProvider.md#settoken) --- ## Page: ExchangeHelper URL: https://docs.totem.ing/api/totemsdk-server/classes/ExchangeHelper [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / ExchangeHelper # Class: ExchangeHelper Exchange Contract Helper Creates DEX-style exchange contracts using VERIFYOUT. ## Constructors ### Constructor > **new ExchangeHelper**(): `ExchangeHelper` #### Returns `ExchangeHelper` ## Methods ### buildOfferState() > `static` **buildOfferState**(`ownerPublicKey`, `desiredAddress`, `desiredAmount`, `desiredTokenId`): [`StateValue`](../interfaces/StateValue.md)[] Build state variables for an exchange offer. #### Parameters ##### ownerPublicKey `string` ##### desiredAddress `string` ##### desiredAmount `string` ##### desiredTokenId `string` #### Returns [`StateValue`](../interfaces/StateValue.md)[] *** ### buildTakeOfferDescriptor() > `static` **buildTakeOfferDescriptor**(`address`, `ownerPublicKey`, `desiredAddress`, `desiredAmount`, `desiredTokenId`): [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) Build ScriptDescriptor for taking an exchange offer. #### Parameters ##### address `string` ##### ownerPublicKey `string` ##### desiredAddress `string` ##### desiredAmount `string` ##### desiredTokenId `string` #### Returns [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) *** ### createOffer() > `static` **createOffer**(`ownerPublicKey`, `desiredAddress`, `desiredAmount`, `desiredTokenId`): `object` Create an exchange offer script. Owner can cancel, or anyone can take the offer by providing the specified output. #### Parameters ##### ownerPublicKey `string` ##### desiredAddress `string` ##### desiredAmount `string` ##### desiredTokenId `string` #### Returns `object` ##### address > **address**: `string` ##### script > **script**: `string` *** ### validateExchange() > `static` **validateExchange**(`outputs`, `expectedAddress`, `expectedAmount`, `expectedTokenId`, `inputIndex`): `object` Validate VERIFYOUT for an exchange transaction. #### Parameters ##### outputs `object`[] ##### expectedAddress `string` ##### expectedAmount `string` ##### expectedTokenId `string` ##### inputIndex `number` #### Returns `object` ##### error? > `optional` **error?**: `string` ##### valid > **valid**: `boolean` --- ## Page: FileStorageAdapter URL: https://docs.totem.ing/api/totemsdk-server/classes/FileStorageAdapter [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / FileStorageAdapter # Class: FileStorageAdapter ## Implements - [`StorageAdapter`](../interfaces/StorageAdapter.md) ## Constructors ### Constructor > **new FileStorageAdapter**(`options`): `FileStorageAdapter` #### Parameters ##### options [`FileStorageAdapterOptions`](../interfaces/FileStorageAdapterOptions.md) #### Returns `FileStorageAdapter` ## Methods ### clear() > **clear**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> #### Implementation of [`StorageAdapter`](../interfaces/StorageAdapter.md).[`clear`](../interfaces/StorageAdapter.md#clear) *** ### get() > **get**\<`T`\>(`key`): `Promise`\<`T` \| `null`\> #### Type Parameters ##### T `T` #### Parameters ##### key `string` #### Returns `Promise`\<`T` \| `null`\> #### Implementation of [`StorageAdapter`](../interfaces/StorageAdapter.md).[`get`](../interfaces/StorageAdapter.md#get) *** ### has() > **has**(`key`): `Promise`\<`boolean`\> #### Parameters ##### key `string` #### Returns `Promise`\<`boolean`\> #### Implementation of [`StorageAdapter`](../interfaces/StorageAdapter.md).[`has`](../interfaces/StorageAdapter.md#has) *** ### keys() > **keys**(): `Promise`\<`string`[]\> #### Returns `Promise`\<`string`[]\> #### Implementation of [`StorageAdapter`](../interfaces/StorageAdapter.md).[`keys`](../interfaces/StorageAdapter.md#keys) *** ### remove() > **remove**(`key`): `Promise`\<`boolean`\> #### Parameters ##### key `string` #### Returns `Promise`\<`boolean`\> #### Implementation of [`StorageAdapter`](../interfaces/StorageAdapter.md).[`remove`](../interfaces/StorageAdapter.md#remove) *** ### set() > **set**\<`T`\>(`key`, `value`): `Promise`\<`void`\> #### Type Parameters ##### T `T` #### Parameters ##### key `string` ##### value `T` #### Returns `Promise`\<`void`\> #### Implementation of [`StorageAdapter`](../interfaces/StorageAdapter.md).[`set`](../interfaces/StorageAdapter.md#set) --- ## Page: FlashCashHelper URL: https://docs.totem.ing/api/totemsdk-server/classes/FlashCashHelper [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / FlashCashHelper # Class: FlashCashHelper Flash Cash Helper Creates flash loan contracts for single-transaction borrowing. ## Constructors ### Constructor > **new FlashCashHelper**(): `FlashCashHelper` #### Returns `FlashCashHelper` ## Methods ### buildBorrowDescriptor() > `static` **buildBorrowDescriptor**(`address`, `ownerPublicKey`, `interestMultiplier?`): [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) Build ScriptDescriptor for borrowing flash cash. #### Parameters ##### address `string` ##### ownerPublicKey `string` ##### interestMultiplier? `string` #### Returns [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) *** ### calculateReturn() > `static` **calculateReturn**(`borrowAmount`, `interestMultiplier`): `bigint` Calculate return amount with interest. #### Parameters ##### borrowAmount `bigint` ##### interestMultiplier `number` #### Returns `bigint` *** ### createFlashCash() > `static` **createFlashCash**(`ownerPublicKey`, `interestMultiplier?`): `object` Create a flash cash contract. #### Parameters ##### ownerPublicKey `string` ##### interestMultiplier? `string` #### Returns `object` ##### address > **address**: `string` ##### script > **script**: `string` --- ## Page: HTLCHelper URL: https://docs.totem.ing/api/totemsdk-server/classes/HTLCHelper [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / HTLCHelper # Class: HTLCHelper HTLC Helper Creates Hashed Timelock Contracts for atomic swaps and lightning-style payments. ## Constructors ### Constructor > **new HTLCHelper**(): `HTLCHelper` #### Returns `HTLCHelper` ## Methods ### buildClaimDescriptor() > `static` **buildClaimDescriptor**(`address`, `senderPublicKey`, `recipientPublicKey`, `hashLock`, `timeoutBlock`, `preimage`): [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) Build ScriptDescriptor to claim HTLC with preimage. #### Parameters ##### address `string` ##### senderPublicKey `string` ##### recipientPublicKey `string` ##### hashLock `string` ##### timeoutBlock `bigint` ##### preimage `string` #### Returns [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) *** ### buildRefundDescriptor() > `static` **buildRefundDescriptor**(`address`, `senderPublicKey`, `recipientPublicKey`, `hashLock`, `timeoutBlock`): [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) Build ScriptDescriptor to refund HTLC after timeout. #### Parameters ##### address `string` ##### senderPublicKey `string` ##### recipientPublicKey `string` ##### hashLock `string` ##### timeoutBlock `bigint` #### Returns [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) *** ### createHTLC() > `static` **createHTLC**(`senderPublicKey`, `recipientPublicKey`, `hashLock`, `timeoutBlock`, `algorithm?`): `object` Create an HTLC script. The script allows: - Recipient to claim with preimage before timeout - Sender to refund after timeout #### Parameters ##### senderPublicKey `string` ##### recipientPublicKey `string` ##### hashLock `string` ##### timeoutBlock `bigint` ##### algorithm? `"sha3"` \| `"sha2"` #### Returns `object` ##### address > **address**: `string` ##### script > **script**: `string` *** ### generateSecret() > `static` **generateSecret**(): `object` Generate a random preimage and its hash. #### Returns `object` ##### hash > **hash**: `string` ##### preimage > **preimage**: `string` *** ### hashPreimage() > `static` **hashPreimage**(`preimage`, `algorithm?`): `string` Hash a preimage using SHA3 (default) or SHA2. #### Parameters ##### preimage `string` ##### algorithm? `"sha3"` \| `"sha2"` #### Returns `string` *** ### verifyPreimage() > `static` **verifyPreimage**(`preimage`, `expectedHash`, `algorithm?`): `boolean` Verify a preimage matches a hash. #### Parameters ##### preimage `string` ##### expectedHash `string` ##### algorithm? `"sha3"` \| `"sha2"` #### Returns `boolean` --- ## Page: InMemoryAuthProvider URL: https://docs.totem.ing/api/totemsdk-server/classes/InMemoryAuthProvider [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / InMemoryAuthProvider # Class: InMemoryAuthProvider ## Implements - [`AuthTokenProvider`](../interfaces/AuthTokenProvider.md) ## Constructors ### Constructor > **new InMemoryAuthProvider**(): `InMemoryAuthProvider` #### Returns `InMemoryAuthProvider` ## Methods ### clearToken() > **clearToken**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> #### Implementation of [`AuthTokenProvider`](../interfaces/AuthTokenProvider.md).[`clearToken`](../interfaces/AuthTokenProvider.md#cleartoken) *** ### getToken() > **getToken**(): `Promise`\<`string` \| `null`\> #### Returns `Promise`\<`string` \| `null`\> #### Implementation of [`AuthTokenProvider`](../interfaces/AuthTokenProvider.md).[`getToken`](../interfaces/AuthTokenProvider.md#gettoken) *** ### isAuthenticated() > **isAuthenticated**(): `Promise`\<`boolean`\> #### Returns `Promise`\<`boolean`\> #### Implementation of [`AuthTokenProvider`](../interfaces/AuthTokenProvider.md).[`isAuthenticated`](../interfaces/AuthTokenProvider.md#isauthenticated) *** ### onTokenChange() > **onTokenChange**(`callback`): () => `void` #### Parameters ##### callback (`token`) => `void` #### Returns () => `void` #### Implementation of [`AuthTokenProvider`](../interfaces/AuthTokenProvider.md).[`onTokenChange`](../interfaces/AuthTokenProvider.md#ontokenchange) *** ### setToken() > **setToken**(`token`): `Promise`\<`void`\> #### Parameters ##### token `string` #### Returns `Promise`\<`void`\> #### Implementation of [`AuthTokenProvider`](../interfaces/AuthTokenProvider.md).[`setToken`](../interfaces/AuthTokenProvider.md#settoken) --- ## Page: LeaseMonitor URL: https://docs.totem.ing/api/totemsdk-server/classes/LeaseMonitor [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / LeaseMonitor # Class: LeaseMonitor ## Constructors ### Constructor > **new LeaseMonitor**(`leaseStore`, `timer?`, `logger?`, `config?`): `LeaseMonitor` #### Parameters ##### leaseStore [`LeaseStore`](LeaseStore.md) ##### timer? [`TimerAdapter`](../interfaces/TimerAdapter.md) ##### logger? [`LoggerAdapter`](../interfaces/LoggerAdapter.md) ##### config? [`LeaseMonitorConfig`](../interfaces/LeaseMonitorConfig.md) #### Returns `LeaseMonitor` ## Methods ### checkNow() > **checkNow**(): `Promise`\<[`LeaseExpiryEvent`](../interfaces/LeaseExpiryEvent.md)[]\> #### Returns `Promise`\<[`LeaseExpiryEvent`](../interfaces/LeaseExpiryEvent.md)[]\> *** ### isActive() > **isActive**(): `boolean` #### Returns `boolean` *** ### onExpirySoon() > **onExpirySoon**(`callback`): () => `void` #### Parameters ##### callback [`LeaseExpiryCallback`](../type-aliases/LeaseExpiryCallback.md) #### Returns () => `void` *** ### removeAllListeners() > **removeAllListeners**(): `void` #### Returns `void` *** ### start() > **start**(): `void` #### Returns `void` *** ### stop() > **stop**(): `void` #### Returns `void` --- ## Page: LeaseStore URL: https://docs.totem.ing/api/totemsdk-server/classes/LeaseStore [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / LeaseStore # Class: LeaseStore ## Constructors ### Constructor > **new LeaseStore**(`storage`, `logger?`, `config?`): `LeaseStore` #### Parameters ##### storage [`StorageAdapter`](../interfaces/StorageAdapter.md) ##### logger? [`LoggerAdapter`](../interfaces/LoggerAdapter.md) ##### config? [`LeaseStoreConfig`](../interfaces/LeaseStoreConfig.md) #### Returns `LeaseStore` ## Methods ### calculateMonitoringInterval() > **calculateMonitoringInterval**(): `number` #### Returns `number` *** ### cleanupExpired() > **cleanupExpired**(): `Promise`\<`number`\> #### Returns `Promise`\<`number`\> *** ### clear() > **clear**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### delete() > **delete**(`leaseId`): `Promise`\<`boolean`\> #### Parameters ##### leaseId `string` #### Returns `Promise`\<`boolean`\> *** ### deleteByToken() > **deleteByToken**(`leaseToken`): `Promise`\<`boolean`\> #### Parameters ##### leaseToken `string` #### Returns `Promise`\<`boolean`\> *** ### get() > **get**(`leaseId`): [`StoredLease`](../interfaces/StoredLease.md) \| `undefined` #### Parameters ##### leaseId `string` #### Returns [`StoredLease`](../interfaces/StoredLease.md) \| `undefined` *** ### getActive() > **getActive**(): [`StoredLease`](../interfaces/StoredLease.md)[] #### Returns [`StoredLease`](../interfaces/StoredLease.md)[] *** ### getAll() > **getAll**(): [`StoredLease`](../interfaces/StoredLease.md)[] #### Returns [`StoredLease`](../interfaces/StoredLease.md)[] *** ### getByToken() > **getByToken**(`leaseToken`): [`StoredLease`](../interfaces/StoredLease.md) \| `undefined` #### Parameters ##### leaseToken `string` #### Returns [`StoredLease`](../interfaces/StoredLease.md) \| `undefined` *** ### getExpiringSoon() > **getExpiringSoon**(`thresholdMs?`): [`StoredLease`](../interfaces/StoredLease.md)[] #### Parameters ##### thresholdMs? `number` #### Returns [`StoredLease`](../interfaces/StoredLease.md)[] *** ### getMinimumTTL() > **getMinimumTTL**(): `number` \| `null` #### Returns `number` \| `null` *** ### initialize() > **initialize**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### isInitialized() > **isInitialized**(): `boolean` #### Returns `boolean` *** ### save() > **save**(`lease`): `Promise`\<`void`\> #### Parameters ##### lease [`StoredLease`](../interfaces/StoredLease.md) #### Returns `Promise`\<`void`\> *** ### updateStatus() > **updateStatus**(`leaseId`, `status`): `Promise`\<`void`\> #### Parameters ##### leaseId `string` ##### status [`LeaseStatus`](../type-aliases/LeaseStatus.md) #### Returns `Promise`\<`void`\> --- ## Page: MASTHelper URL: https://docs.totem.ing/api/totemsdk-server/classes/MASTHelper [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / MASTHelper # Class: MASTHelper MAST Helper Creates Merkelized Abstract Syntax Tree contracts for privacy and scalability. ## Constructors ### Constructor > **new MASTHelper**(): `MASTHelper` #### Returns `MASTHelper` ## Methods ### buildDescriptor() > `static` **buildDescriptor**(`address`, `rootHash`, `branchScript`, `branchProof`, `wotsPublicKey?`): [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) Build ScriptDescriptor for spending a MAST branch. #### Parameters ##### address `string` ##### rootHash `string` ##### branchScript `string` ##### branchProof `string` ##### wotsPublicKey? `string` #### Returns [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) *** ### buildSimpleTree() > `static` **buildSimpleTree**(`scripts`): `object` Build a simple MAST tree from multiple scripts. Returns the root hash and proofs for each script. For a proper implementation, this should call the mmrcreate RPC. This is a simplified local version for 2 scripts. #### Parameters ##### scripts `string`[] #### Returns `object` ##### proofs > **proofs**: `Map`\<`string`, \{ `index`: `number`; `proof`: `string`; \}\> ##### root > **root**: `string` *** ### createMASTScript() > `static` **createMASTScript**(`rootHash`): `object` Create a MAST script with the given root hash. #### Parameters ##### rootHash `string` #### Returns `object` ##### address > **address**: `string` ##### script > **script**: `string` *** ### hashScript() > `static` **hashScript**(`script`): `string` Compute hash of a script for MAST leaf. #### Parameters ##### script `string` #### Returns `string` --- ## Page: MMRTree URL: https://docs.totem.ing/api/totemsdk-server/classes/MMRTree [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / MMRTree # Class: MMRTree Simple MMR Tree for TreeKeyNode Builds a perfect binary tree from N entries (N must be power of 2 for simplicity) This matches TreeKeyNode.java which always uses 64 leaves (2^6) ## Constructors ### Constructor > **new MMRTree**(): `MMRTree` #### Returns `MMRTree` ## Methods ### addLeaf() > **addLeaf**(`data`): [`MMREntry`](../interfaces/MMREntry.md) Add a leaf entry to the MMR Matches MMR.java addEntry() but simplified for power-of-2 trees #### Parameters ##### data [`MMRData`](../interfaces/MMRData.md) #### Returns [`MMREntry`](../interfaces/MMREntry.md) *** ### getLeaf() > **getLeaf**(`index`): [`MMRData`](../interfaces/MMRData.md) \| `null` Get the leaf MMRData at a specific index #### Parameters ##### index `number` #### Returns [`MMRData`](../interfaces/MMRData.md) \| `null` *** ### getProof() > **getProof**(`leafIndex`): [`MMRProof`](../interfaces/MMRProof.md) Get proof for a leaf at given index Matches MMR.java getProofToPeak() #### Parameters ##### leafIndex `number` #### Returns [`MMRProof`](../interfaces/MMRProof.md) *** ### getRoot() > **getRoot**(): [`MMRData`](../interfaces/MMRData.md) \| `null` Get the root of the tree For a perfect binary tree with N leaves, root is at row log2(N), entry 0 #### Returns [`MMRData`](../interfaces/MMRData.md) \| `null` *** ### fromPublicKeys() > `static` **fromPublicKeys**(`pubkeys`): `MMRTree` Build tree from array of Winternitz public keys Used by TreeKeyNode to compute wallet public key #### Parameters ##### pubkeys `Bytes`[] #### Returns `MMRTree` --- ## Page: MemoryStorageAdapter URL: https://docs.totem.ing/api/totemsdk-server/classes/MemoryStorageAdapter [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / MemoryStorageAdapter # Class: MemoryStorageAdapter ## Implements - [`StorageAdapter`](../interfaces/StorageAdapter.md) ## Constructors ### Constructor > **new MemoryStorageAdapter**(): `MemoryStorageAdapter` #### Returns `MemoryStorageAdapter` ## Methods ### clear() > **clear**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> #### Implementation of [`StorageAdapter`](../interfaces/StorageAdapter.md).[`clear`](../interfaces/StorageAdapter.md#clear) *** ### get() > **get**\<`T`\>(`key`): `Promise`\<`T` \| `null`\> #### Type Parameters ##### T `T` #### Parameters ##### key `string` #### Returns `Promise`\<`T` \| `null`\> #### Implementation of [`StorageAdapter`](../interfaces/StorageAdapter.md).[`get`](../interfaces/StorageAdapter.md#get) *** ### has() > **has**(`key`): `Promise`\<`boolean`\> #### Parameters ##### key `string` #### Returns `Promise`\<`boolean`\> #### Implementation of [`StorageAdapter`](../interfaces/StorageAdapter.md).[`has`](../interfaces/StorageAdapter.md#has) *** ### keys() > **keys**(): `Promise`\<`string`[]\> #### Returns `Promise`\<`string`[]\> #### Implementation of [`StorageAdapter`](../interfaces/StorageAdapter.md).[`keys`](../interfaces/StorageAdapter.md#keys) *** ### remove() > **remove**(`key`): `Promise`\<`boolean`\> #### Parameters ##### key `string` #### Returns `Promise`\<`boolean`\> #### Implementation of [`StorageAdapter`](../interfaces/StorageAdapter.md).[`remove`](../interfaces/StorageAdapter.md#remove) *** ### set() > **set**\<`T`\>(`key`, `value`): `Promise`\<`void`\> #### Type Parameters ##### T `T` #### Parameters ##### key `string` ##### value `T` #### Returns `Promise`\<`void`\> #### Implementation of [`StorageAdapter`](../interfaces/StorageAdapter.md).[`set`](../interfaces/StorageAdapter.md#set) --- ## Page: MiniNumber URL: https://docs.totem.ing/api/totemsdk-server/classes/MiniNumber [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / MiniNumber # Class: MiniNumber ## Constructors ### Constructor > **new MiniNumber**(`value`): `MiniNumber` #### Parameters ##### value `string` \| `number` \| `bigint` \| `MiniNumber` #### Returns `MiniNumber` ## Properties ### scale > `readonly` **scale**: `number` *** ### unscaled > `readonly` **unscaled**: `bigint` *** ### EIGHT > `readonly` `static` **EIGHT**: `MiniNumber` *** ### FIFTY > `readonly` `static` **FIFTY**: `MiniNumber` *** ### FIVEONE12 > `readonly` `static` **FIVEONE12**: `MiniNumber` *** ### FOUR > `readonly` `static` **FOUR**: `MiniNumber` *** ### MINUSONE > `readonly` `static` **MINUSONE**: `MiniNumber` *** ### ONE > `readonly` `static` **ONE**: `MiniNumber` *** ### SIXTEEN > `readonly` `static` **SIXTEEN**: `MiniNumber` *** ### SIXTYFOUR > `readonly` `static` **SIXTYFOUR**: `MiniNumber` *** ### THIRTYTWO > `readonly` `static` **THIRTYTWO**: `MiniNumber` *** ### THOUSAND24 > `readonly` `static` **THOUSAND24**: `MiniNumber` *** ### THREE > `readonly` `static` **THREE**: `MiniNumber` *** ### TWELVE > `readonly` `static` **TWELVE**: `MiniNumber` *** ### TWENTY > `readonly` `static` **TWENTY**: `MiniNumber` *** ### TWO > `readonly` `static` **TWO**: `MiniNumber` *** ### TWOFIVESIX > `readonly` `static` **TWOFIVESIX**: `MiniNumber` *** ### ZERO > `readonly` `static` **ZERO**: `MiniNumber` ## Methods ### abs() > **abs**(): `MiniNumber` #### Returns `MiniNumber` *** ### add() > **add**(`other`): `MiniNumber` #### Parameters ##### other `MiniNumber` #### Returns `MiniNumber` *** ### ceil() > **ceil**(): `MiniNumber` #### Returns `MiniNumber` *** ### compareTo() > **compareTo**(`other`): `number` #### Parameters ##### other `MiniNumber` #### Returns `number` *** ### decimalPlaces() > **decimalPlaces**(): `number` #### Returns `number` *** ### decrement() > **decrement**(): `MiniNumber` #### Returns `MiniNumber` *** ### div() > **div**(`other`): `MiniNumber` #### Parameters ##### other `MiniNumber` #### Returns `MiniNumber` *** ### floor() > **floor**(): `MiniNumber` #### Returns `MiniNumber` *** ### getAsBigDecimal() > **getAsBigDecimal**(): `string` #### Returns `string` *** ### getAsBigInteger() > **getAsBigInteger**(): `string` #### Returns `string` *** ### increment() > **increment**(): `MiniNumber` #### Returns `MiniNumber` *** ### isEqual() > **isEqual**(`other`): `boolean` #### Parameters ##### other `MiniNumber` #### Returns `boolean` *** ### isLess() > **isLess**(`other`): `boolean` #### Parameters ##### other `MiniNumber` #### Returns `boolean` *** ### isLessEqual() > **isLessEqual**(`other`): `boolean` #### Parameters ##### other `MiniNumber` #### Returns `boolean` *** ### isMore() > **isMore**(`other`): `boolean` #### Parameters ##### other `MiniNumber` #### Returns `boolean` *** ### isMoreEqual() > **isMoreEqual**(`other`): `boolean` #### Parameters ##### other `MiniNumber` #### Returns `boolean` *** ### modulo() > **modulo**(`other`): `MiniNumber` #### Parameters ##### other `MiniNumber` #### Returns `MiniNumber` *** ### mult() > **mult**(`other`): `MiniNumber` #### Parameters ##### other `MiniNumber` #### Returns `MiniNumber` *** ### negate() > **negate**(): `MiniNumber` #### Returns `MiniNumber` *** ### pow() > **pow**(`n`): `MiniNumber` #### Parameters ##### n `number` #### Returns `MiniNumber` *** ### setSignificantDigits() > **setSignificantDigits**(`d`): `MiniNumber` #### Parameters ##### d `number` #### Returns `MiniNumber` *** ### sqrt() > **sqrt**(): `MiniNumber` #### Returns `MiniNumber` *** ### sub() > **sub**(`other`): `MiniNumber` #### Parameters ##### other `MiniNumber` #### Returns `MiniNumber` *** ### toNumber() > **toNumber**(): `number` #### Returns `number` *** ### toString() > **toString**(): `string` #### Returns `string` --- ## Page: MinimaClient URL: https://docs.totem.ing/api/totemsdk-server/classes/MinimaClient [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / MinimaClient # Class: MinimaClient ## Extends - `EventEmitter` ## Constructors ### Constructor > **new MinimaClient**(`config`): `MinimaClient` #### Parameters ##### config `ClientConfig` #### Returns `MinimaClient` #### Overrides `EventEmitter.constructor` ## Properties ### captureRejections > `static` **captureRejections**: `boolean` Value: [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) Change the default `captureRejections` option on all new `EventEmitter` objects. #### Since v13.4.0, v12.16.0 #### Inherited from `EventEmitter.captureRejections` *** ### captureRejectionSymbol > `readonly` `static` **captureRejectionSymbol**: *typeof* [`captureRejectionSymbol`](#capturerejectionsymbol) Value: `Symbol.for('nodejs.rejection')` See how to write a custom `rejection handler`. #### Since v13.4.0, v12.16.0 #### Inherited from `EventEmitter.captureRejectionSymbol` *** ### defaultMaxListeners > `static` **defaultMaxListeners**: `number` By default, a maximum of `10` listeners can be registered for any single event. This limit can be changed for individual `EventEmitter` instances using the `emitter.setMaxListeners(n)` method. To change the default for _all_`EventEmitter` instances, the `events.defaultMaxListeners` property can be used. If this value is not a positive number, a `RangeError` is thrown. Take caution when setting the `events.defaultMaxListeners` because the change affects _all_ `EventEmitter` instances, including those created before the change is made. However, calling `emitter.setMaxListeners(n)` still has precedence over `events.defaultMaxListeners`. This is not a hard limit. The `EventEmitter` instance will allow more listeners to be added but will output a trace warning to stderr indicating that a "possible EventEmitter memory leak" has been detected. For any single `EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()` methods can be used to temporarily avoid this warning: ```js import { EventEmitter } from 'node:events'; const emitter = new EventEmitter(); emitter.setMaxListeners(emitter.getMaxListeners() + 1); emitter.once('event', () => { // do stuff emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); }); ``` The `--trace-warnings` command-line flag can be used to display the stack trace for such warnings. The emitted warning can be inspected with `process.on('warning')` and will have the additional `emitter`, `type`, and `count` properties, referring to the event emitter instance, the event's name and the number of attached listeners, respectively. Its `name` property is set to `'MaxListenersExceededWarning'`. #### Since v0.11.2 #### Inherited from `EventEmitter.defaultMaxListeners` *** ### errorMonitor > `readonly` `static` **errorMonitor**: *typeof* [`errorMonitor`](#errormonitor) This symbol shall be used to install a listener for only monitoring `'error'` events. Listeners installed using this symbol are called before the regular `'error'` listeners are called. Installing a listener using this symbol does not change the behavior once an `'error'` event is emitted. Therefore, the process will still crash if no regular `'error'` listener is installed. #### Since v13.6.0, v12.17.0 #### Inherited from `EventEmitter.errorMonitor` ## Methods ### \[captureRejectionSymbol\]()? > `optional` **\[captureRejectionSymbol\]**\<`K`\>(`error`, `event`, ...`args`): `void` #### Type Parameters ##### K `K` #### Parameters ##### error `Error` ##### event `string` \| `symbol` ##### args ...`AnyRest` #### Returns `void` #### Inherited from `EventEmitter.[captureRejectionSymbol]` *** ### addListener() > **addListener**\<`K`\>(`eventName`, `listener`): `this` Alias for `emitter.on(eventName, listener)`. #### Type Parameters ##### K `K` #### Parameters ##### eventName `string` \| `symbol` ##### listener (...`args`) => `void` #### Returns `this` #### Since v0.1.26 #### Inherited from `EventEmitter.addListener` *** ### buildTransaction() > **buildTransaction**(`_params`): `Promise`\<`Transaction`\> Build a transaction client-side. NOTE: Axia has no server-side build endpoint — transactions must be constructed locally using @totemsdk/tx-builder. #### Parameters ##### \_params ###### amount `string` ###### data? `string` ###### fee? `string` ###### from `string` ###### to `string` #### Returns `Promise`\<`Transaction`\> *** ### connect() > **connect**(): `Promise`\<`void`\> Fetch a short-lived JWT from the API then open the balance WebSocket. Messages are emitted as 'balance' events (portfolio_snapshot / portfolio_delta). #### Returns `Promise`\<`void`\> *** ### disconnect() > **disconnect**(): `void` Disconnect from network #### Returns `void` *** ### emit() > **emit**\<`K`\>(`eventName`, ...`args`): `boolean` Synchronously calls each of the listeners registered for the event named `eventName`, in the order they were registered, passing the supplied arguments to each. Returns `true` if the event had listeners, `false` otherwise. ```js import { EventEmitter } from 'node:events'; const myEmitter = new EventEmitter(); // First listener myEmitter.on('event', function firstListener() { console.log('Helloooo! first listener'); }); // Second listener myEmitter.on('event', function secondListener(arg1, arg2) { console.log(`event with parameters ${arg1}, ${arg2} in second listener`); }); // Third listener myEmitter.on('event', function thirdListener(...args) { const parameters = args.join(', '); console.log(`event with parameters ${parameters} in third listener`); }); console.log(myEmitter.listeners('event')); myEmitter.emit('event', 1, 2, 3, 4, 5); // Prints: // [ // [Function: firstListener], // [Function: secondListener], // [Function: thirdListener] // ] // Helloooo! first listener // event with parameters 1, 2 in second listener // event with parameters 1, 2, 3, 4, 5 in third listener ``` #### Type Parameters ##### K `K` #### Parameters ##### eventName `string` \| `symbol` ##### args ...`AnyRest` #### Returns `boolean` #### Since v0.1.26 #### Inherited from `EventEmitter.emit` *** ### eventNames() > **eventNames**(): (`string` \| `symbol`)[] Returns an array listing the events for which the emitter has registered listeners. The values in the array are strings or `Symbol`s. ```js import { EventEmitter } from 'node:events'; const myEE = new EventEmitter(); myEE.on('foo', () => {}); myEE.on('bar', () => {}); const sym = Symbol('symbol'); myEE.on(sym, () => {}); console.log(myEE.eventNames()); // Prints: [ 'foo', 'bar', Symbol(symbol) ] ``` #### Returns (`string` \| `symbol`)[] #### Since v6.0.0 #### Inherited from `EventEmitter.eventNames` *** ### getBalance() > **getBalance**(`address`, `tokenId?`): `Promise`\<`string`\> Get total confirmed Minima balance for an address. Uses GET /v1/wallet/portfolio/:address and sums the native token entry. #### Parameters ##### address `string` ##### tokenId? `string` #### Returns `Promise`\<`string`\> *** ### getBlockHeight() > **getBlockHeight**(): `Promise`\<`number`\> Get current chain tip block height via Minima `status` RPC. #### Returns `Promise`\<`number`\> *** ### getMaxListeners() > **getMaxListeners**(): `number` Returns the current max listener value for the `EventEmitter` which is either set by `emitter.setMaxListeners(n)` or defaults to [EventEmitter.defaultMaxListeners](#defaultmaxlisteners). #### Returns `number` #### Since v1.0.0 #### Inherited from `EventEmitter.getMaxListeners` *** ### getUTXOs() > **getUTXOs**(`address`): `Promise`\<`UTXO`[]\> Get raw UTXOs (coins) for an address. Returns the UTXO list from GET /v1/wallet/utxos/:address. #### Parameters ##### address `string` #### Returns `Promise`\<`UTXO`[]\> *** ### listenerCount() > **listenerCount**\<`K`\>(`eventName`, `listener?`): `number` Returns the number of listeners listening for the event named `eventName`. If `listener` is provided, it will return how many times the listener is found in the list of the listeners of the event. #### Type Parameters ##### K `K` #### Parameters ##### eventName `string` \| `symbol` The name of the event being listened for ##### listener? `Function` The event handler function #### Returns `number` #### Since v3.2.0 #### Inherited from `EventEmitter.listenerCount` *** ### listeners() > **listeners**\<`K`\>(`eventName`): `Function`[] Returns a copy of the array of listeners for the event named `eventName`. ```js server.on('connection', (stream) => { console.log('someone connected!'); }); console.log(util.inspect(server.listeners('connection'))); // Prints: [ [Function] ] ``` #### Type Parameters ##### K `K` #### Parameters ##### eventName `string` \| `symbol` #### Returns `Function`[] #### Since v0.1.26 #### Inherited from `EventEmitter.listeners` *** ### off() > **off**\<`K`\>(`eventName`, `listener`): `this` Alias for `emitter.removeListener()`. #### Type Parameters ##### K `K` #### Parameters ##### eventName `string` \| `symbol` ##### listener (...`args`) => `void` #### Returns `this` #### Since v10.0.0 #### Inherited from `EventEmitter.off` *** ### on() > **on**\<`K`\>(`eventName`, `listener`): `this` Adds the `listener` function to the end of the listeners array for the event named `eventName`. No checks are made to see if the `listener` has already been added. Multiple calls passing the same combination of `eventName` and `listener` will result in the `listener` being added, and called, multiple times. ```js server.on('connection', (stream) => { console.log('someone connected!'); }); ``` Returns a reference to the `EventEmitter`, so that calls can be chained. By default, event listeners are invoked in the order they are added. The `emitter.prependListener()` method can be used as an alternative to add the event listener to the beginning of the listeners array. ```js import { EventEmitter } from 'node:events'; const myEE = new EventEmitter(); myEE.on('foo', () => console.log('a')); myEE.prependListener('foo', () => console.log('b')); myEE.emit('foo'); // Prints: // b // a ``` #### Type Parameters ##### K `K` #### Parameters ##### eventName `string` \| `symbol` The name of the event. ##### listener (...`args`) => `void` The callback function #### Returns `this` #### Since v0.1.101 #### Inherited from `EventEmitter.on` *** ### once() > **once**\<`K`\>(`eventName`, `listener`): `this` Adds a **one-time** `listener` function for the event named `eventName`. The next time `eventName` is triggered, this listener is removed and then invoked. ```js server.once('connection', (stream) => { console.log('Ah, we have our first user!'); }); ``` Returns a reference to the `EventEmitter`, so that calls can be chained. By default, event listeners are invoked in the order they are added. The `emitter.prependOnceListener()` method can be used as an alternative to add the event listener to the beginning of the listeners array. ```js import { EventEmitter } from 'node:events'; const myEE = new EventEmitter(); myEE.once('foo', () => console.log('a')); myEE.prependOnceListener('foo', () => console.log('b')); myEE.emit('foo'); // Prints: // b // a ``` #### Type Parameters ##### K `K` #### Parameters ##### eventName `string` \| `symbol` The name of the event. ##### listener (...`args`) => `void` The callback function #### Returns `this` #### Since v0.3.0 #### Inherited from `EventEmitter.once` *** ### prependListener() > **prependListener**\<`K`\>(`eventName`, `listener`): `this` Adds the `listener` function to the _beginning_ of the listeners array for the event named `eventName`. No checks are made to see if the `listener` has already been added. Multiple calls passing the same combination of `eventName` and `listener` will result in the `listener` being added, and called, multiple times. ```js server.prependListener('connection', (stream) => { console.log('someone connected!'); }); ``` Returns a reference to the `EventEmitter`, so that calls can be chained. #### Type Parameters ##### K `K` #### Parameters ##### eventName `string` \| `symbol` The name of the event. ##### listener (...`args`) => `void` The callback function #### Returns `this` #### Since v6.0.0 #### Inherited from `EventEmitter.prependListener` *** ### prependOnceListener() > **prependOnceListener**\<`K`\>(`eventName`, `listener`): `this` Adds a **one-time**`listener` function for the event named `eventName` to the _beginning_ of the listeners array. The next time `eventName` is triggered, this listener is removed, and then invoked. ```js server.prependOnceListener('connection', (stream) => { console.log('Ah, we have our first user!'); }); ``` Returns a reference to the `EventEmitter`, so that calls can be chained. #### Type Parameters ##### K `K` #### Parameters ##### eventName `string` \| `symbol` The name of the event. ##### listener (...`args`) => `void` The callback function #### Returns `this` #### Since v6.0.0 #### Inherited from `EventEmitter.prependOnceListener` *** ### rawListeners() > **rawListeners**\<`K`\>(`eventName`): `Function`[] Returns a copy of the array of listeners for the event named `eventName`, including any wrappers (such as those created by `.once()`). ```js import { EventEmitter } from 'node:events'; const emitter = new EventEmitter(); emitter.once('log', () => console.log('log once')); // Returns a new Array with a function `onceWrapper` which has a property // `listener` which contains the original listener bound above const listeners = emitter.rawListeners('log'); const logFnWrapper = listeners[0]; // Logs "log once" to the console and does not unbind the `once` event logFnWrapper.listener(); // Logs "log once" to the console and removes the listener logFnWrapper(); emitter.on('log', () => console.log('log persistently')); // Will return a new Array with a single function bound by `.on()` above const newListeners = emitter.rawListeners('log'); // Logs "log persistently" twice newListeners[0](); emitter.emit('log'); ``` #### Type Parameters ##### K `K` #### Parameters ##### eventName `string` \| `symbol` #### Returns `Function`[] #### Since v9.4.0 #### Inherited from `EventEmitter.rawListeners` *** ### removeAllListeners() > **removeAllListeners**(`eventName?`): `this` Removes all listeners, or those of the specified `eventName`. It is bad practice to remove listeners added elsewhere in the code, particularly when the `EventEmitter` instance was created by some other component or module (e.g. sockets or file streams). Returns a reference to the `EventEmitter`, so that calls can be chained. #### Parameters ##### eventName? `string` \| `symbol` #### Returns `this` #### Since v0.1.26 #### Inherited from `EventEmitter.removeAllListeners` *** ### removeListener() > **removeListener**\<`K`\>(`eventName`, `listener`): `this` Removes the specified `listener` from the listener array for the event named `eventName`. ```js const callback = (stream) => { console.log('someone connected!'); }; server.on('connection', callback); // ... server.removeListener('connection', callback); ``` `removeListener()` will remove, at most, one instance of a listener from the listener array. If any single listener has been added multiple times to the listener array for the specified `eventName`, then `removeListener()` must be called multiple times to remove each instance. Once an event is emitted, all listeners attached to it at the time of emitting are called in order. This implies that any `removeListener()` or `removeAllListeners()` calls _after_ emitting and _before_ the last listener finishes execution will not remove them from`emit()` in progress. Subsequent events behave as expected. ```js import { EventEmitter } from 'node:events'; class MyEmitter extends EventEmitter {} const myEmitter = new MyEmitter(); const callbackA = () => { console.log('A'); myEmitter.removeListener('event', callbackB); }; const callbackB = () => { console.log('B'); }; myEmitter.on('event', callbackA); myEmitter.on('event', callbackB); // callbackA removes listener callbackB but it will still be called. // Internal listener array at time of emit [callbackA, callbackB] myEmitter.emit('event'); // Prints: // A // B // callbackB is now removed. // Internal listener array [callbackA] myEmitter.emit('event'); // Prints: // A ``` Because listeners are managed using an internal array, calling this will change the position indices of any listener registered _after_ the listener being removed. This will not impact the order in which listeners are called, but it means that any copies of the listener array as returned by the `emitter.listeners()` method will need to be recreated. When a single function has been added as a handler multiple times for a single event (as in the example below), `removeListener()` will remove the most recently added instance. In the example the `once('ping')` listener is removed: ```js import { EventEmitter } from 'node:events'; const ee = new EventEmitter(); function pong() { console.log('pong'); } ee.on('ping', pong); ee.once('ping', pong); ee.removeListener('ping', pong); ee.emit('ping'); ee.emit('ping'); ``` Returns a reference to the `EventEmitter`, so that calls can be chained. #### Type Parameters ##### K `K` #### Parameters ##### eventName `string` \| `symbol` ##### listener (...`args`) => `void` #### Returns `this` #### Since v0.1.26 #### Inherited from `EventEmitter.removeListener` *** ### setMaxListeners() > **setMaxListeners**(`n`): `this` By default `EventEmitter`s will print a warning if more than `10` listeners are added for a particular event. This is a useful default that helps finding memory leaks. The `emitter.setMaxListeners()` method allows the limit to be modified for this specific `EventEmitter` instance. The value can be set to `Infinity` (or `0`) to indicate an unlimited number of listeners. Returns a reference to the `EventEmitter`, so that calls can be chained. #### Parameters ##### n `number` #### Returns `this` #### Since v0.3.5 #### Inherited from `EventEmitter.setMaxListeners` *** ### submitTransaction() > **submitTransaction**(`signedTxHex`): `Promise`\<`string`\> Submit a pre-built, signed transaction hex via Minima txnpost RPC. For the full production path (mine + submit) use MinimaWallet.mineAndSubmitTxPoW(). #### Parameters ##### signedTxHex `string` #### Returns `Promise`\<`string`\> *** ### subscribe() > **subscribe**(`addresses`): `void` Subscribe the open WebSocket to a set of addresses. #### Parameters ##### addresses `string`[] #### Returns `void` *** ### addAbortListener() > `static` **addAbortListener**(`signal`, `resource`): `Disposable` **`Experimental`** Listens once to the `abort` event on the provided `signal`. Listening to the `abort` event on abort signals is unsafe and may lead to resource leaks since another third party with the signal can call `e.stopImmediatePropagation()`. Unfortunately Node.js cannot change this since it would violate the web standard. Additionally, the original API makes it easy to forget to remove listeners. This API allows safely using `AbortSignal`s in Node.js APIs by solving these two issues by listening to the event such that `stopImmediatePropagation` does not prevent the listener from running. Returns a disposable so that it may be unsubscribed from more easily. ```js import { addAbortListener } from 'node:events'; function example(signal) { let disposable; try { signal.addEventListener('abort', (e) => e.stopImmediatePropagation()); disposable = addAbortListener(signal, (e) => { // Do something when signal is aborted. }); } finally { disposable?.[Symbol.dispose](); } } ``` #### Parameters ##### signal `AbortSignal` ##### resource (`event`) => `void` #### Returns `Disposable` Disposable that removes the `abort` listener. #### Since v20.5.0 #### Inherited from `EventEmitter.addAbortListener` *** ### getEventListeners() > `static` **getEventListeners**(`emitter`, `name`): `Function`[] Returns a copy of the array of listeners for the event named `eventName`. For `EventEmitter`s this behaves exactly the same as calling `.listeners` on the emitter. For `EventTarget`s this is the only way to get the event listeners for the event target. This is useful for debugging and diagnostic purposes. ```js import { getEventListeners, EventEmitter } from 'node:events'; { const ee = new EventEmitter(); const listener = () => console.log('Events are fun'); ee.on('foo', listener); console.log(getEventListeners(ee, 'foo')); // [ [Function: listener] ] } { const et = new EventTarget(); const listener = () => console.log('Events are fun'); et.addEventListener('foo', listener); console.log(getEventListeners(et, 'foo')); // [ [Function: listener] ] } ``` #### Parameters ##### emitter `EventEmitter`\<`DefaultEventMap`\> \| `EventTarget` ##### name `string` \| `symbol` #### Returns `Function`[] #### Since v15.2.0, v14.17.0 #### Inherited from `EventEmitter.getEventListeners` *** ### getMaxListeners() > `static` **getMaxListeners**(`emitter`): `number` Returns the currently set max amount of listeners. For `EventEmitter`s this behaves exactly the same as calling `.getMaxListeners` on the emitter. For `EventTarget`s this is the only way to get the max event listeners for the event target. If the number of event handlers on a single EventTarget exceeds the max set, the EventTarget will print a warning. ```js import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events'; { const ee = new EventEmitter(); console.log(getMaxListeners(ee)); // 10 setMaxListeners(11, ee); console.log(getMaxListeners(ee)); // 11 } { const et = new EventTarget(); console.log(getMaxListeners(et)); // 10 setMaxListeners(11, et); console.log(getMaxListeners(et)); // 11 } ``` #### Parameters ##### emitter `EventEmitter`\<`DefaultEventMap`\> \| `EventTarget` #### Returns `number` #### Since v19.9.0 #### Inherited from `EventEmitter.getMaxListeners` *** ### ~~listenerCount()~~ > `static` **listenerCount**(`emitter`, `eventName`): `number` A class method that returns the number of listeners for the given `eventName` registered on the given `emitter`. ```js import { EventEmitter, listenerCount } from 'node:events'; const myEmitter = new EventEmitter(); myEmitter.on('event', () => {}); myEmitter.on('event', () => {}); console.log(listenerCount(myEmitter, 'event')); // Prints: 2 ``` #### Parameters ##### emitter `EventEmitter` The emitter to query ##### eventName `string` \| `symbol` The event name #### Returns `number` #### Since v0.9.12 #### Deprecated Since v3.2.0 - Use `listenerCount` instead. #### Inherited from `EventEmitter.listenerCount` *** ### on() #### Call Signature > `static` **on**(`emitter`, `eventName`, `options?`): `AsyncIterator`\<`any`[]\> ```js import { on, EventEmitter } from 'node:events'; import process from 'node:process'; const ee = new EventEmitter(); // Emit later on process.nextTick(() => { ee.emit('foo', 'bar'); ee.emit('foo', 42); }); for await (const event of on(ee, 'foo')) { // The execution of this inner block is synchronous and it // processes one event at a time (even with await). Do not use // if concurrent execution is required. console.log(event); // prints ['bar'] [42] } // Unreachable here ``` Returns an `AsyncIterator` that iterates `eventName` events. It will throw if the `EventEmitter` emits `'error'`. It removes all listeners when exiting the loop. The `value` returned by each iteration is an array composed of the emitted event arguments. An `AbortSignal` can be used to cancel waiting on events: ```js import { on, EventEmitter } from 'node:events'; import process from 'node:process'; const ac = new AbortController(); (async () => { const ee = new EventEmitter(); // Emit later on process.nextTick(() => { ee.emit('foo', 'bar'); ee.emit('foo', 42); }); for await (const event of on(ee, 'foo', { signal: ac.signal })) { // The execution of this inner block is synchronous and it // processes one event at a time (even with await). Do not use // if concurrent execution is required. console.log(event); // prints ['bar'] [42] } // Unreachable here })(); process.nextTick(() => ac.abort()); ``` Use the `close` option to specify an array of event names that will end the iteration: ```js import { on, EventEmitter } from 'node:events'; import process from 'node:process'; const ee = new EventEmitter(); // Emit later on process.nextTick(() => { ee.emit('foo', 'bar'); ee.emit('foo', 42); ee.emit('close'); }); for await (const event of on(ee, 'foo', { close: ['close'] })) { console.log(event); // prints ['bar'] [42] } // the loop will exit after 'close' is emitted console.log('done'); // prints 'done' ``` ##### Parameters ###### emitter `EventEmitter` ###### eventName `string` \| `symbol` ###### options? `StaticEventEmitterIteratorOptions` ##### Returns `AsyncIterator`\<`any`[]\> An `AsyncIterator` that iterates `eventName` events emitted by the `emitter` ##### Since v13.6.0, v12.16.0 ##### Inherited from `EventEmitter.on` #### Call Signature > `static` **on**(`emitter`, `eventName`, `options?`): `AsyncIterator`\<`any`[]\> ```js import { on, EventEmitter } from 'node:events'; import process from 'node:process'; const ee = new EventEmitter(); // Emit later on process.nextTick(() => { ee.emit('foo', 'bar'); ee.emit('foo', 42); }); for await (const event of on(ee, 'foo')) { // The execution of this inner block is synchronous and it // processes one event at a time (even with await). Do not use // if concurrent execution is required. console.log(event); // prints ['bar'] [42] } // Unreachable here ``` Returns an `AsyncIterator` that iterates `eventName` events. It will throw if the `EventEmitter` emits `'error'`. It removes all listeners when exiting the loop. The `value` returned by each iteration is an array composed of the emitted event arguments. An `AbortSignal` can be used to cancel waiting on events: ```js import { on, EventEmitter } from 'node:events'; import process from 'node:process'; const ac = new AbortController(); (async () => { const ee = new EventEmitter(); // Emit later on process.nextTick(() => { ee.emit('foo', 'bar'); ee.emit('foo', 42); }); for await (const event of on(ee, 'foo', { signal: ac.signal })) { // The execution of this inner block is synchronous and it // processes one event at a time (even with await). Do not use // if concurrent execution is required. console.log(event); // prints ['bar'] [42] } // Unreachable here })(); process.nextTick(() => ac.abort()); ``` Use the `close` option to specify an array of event names that will end the iteration: ```js import { on, EventEmitter } from 'node:events'; import process from 'node:process'; const ee = new EventEmitter(); // Emit later on process.nextTick(() => { ee.emit('foo', 'bar'); ee.emit('foo', 42); ee.emit('close'); }); for await (const event of on(ee, 'foo', { close: ['close'] })) { console.log(event); // prints ['bar'] [42] } // the loop will exit after 'close' is emitted console.log('done'); // prints 'done' ``` ##### Parameters ###### emitter `EventTarget` ###### eventName `string` ###### options? `StaticEventEmitterIteratorOptions` ##### Returns `AsyncIterator`\<`any`[]\> An `AsyncIterator` that iterates `eventName` events emitted by the `emitter` ##### Since v13.6.0, v12.16.0 ##### Inherited from `EventEmitter.on` *** ### once() #### Call Signature > `static` **once**(`emitter`, `eventName`, `options?`): `Promise`\<`any`[]\> Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given event or that is rejected if the `EventEmitter` emits `'error'` while waiting. The `Promise` will resolve with an array of all the arguments emitted to the given event. This method is intentionally generic and works with the web platform [EventTarget](https://dom.spec.whatwg.org/#interface-eventtarget) interface, which has no special`'error'` event semantics and does not listen to the `'error'` event. ```js import { once, EventEmitter } from 'node:events'; import process from 'node:process'; const ee = new EventEmitter(); process.nextTick(() => { ee.emit('myevent', 42); }); const [value] = await once(ee, 'myevent'); console.log(value); const err = new Error('kaboom'); process.nextTick(() => { ee.emit('error', err); }); try { await once(ee, 'myevent'); } catch (err) { console.error('error happened', err); } ``` The special handling of the `'error'` event is only used when `events.once()` is used to wait for another event. If `events.once()` is used to wait for the '`error'` event itself, then it is treated as any other kind of event without special handling: ```js import { EventEmitter, once } from 'node:events'; const ee = new EventEmitter(); once(ee, 'error') .then(([err]) => console.log('ok', err.message)) .catch((err) => console.error('error', err.message)); ee.emit('error', new Error('boom')); // Prints: ok boom ``` An `AbortSignal` can be used to cancel waiting for the event: ```js import { EventEmitter, once } from 'node:events'; const ee = new EventEmitter(); const ac = new AbortController(); async function foo(emitter, event, signal) { try { await once(emitter, event, { signal }); console.log('event emitted!'); } catch (error) { if (error.name === 'AbortError') { console.error('Waiting for the event was canceled!'); } else { console.error('There was an error', error.message); } } } foo(ee, 'foo', ac.signal); ac.abort(); // Abort waiting for the event ee.emit('foo'); // Prints: Waiting for the event was canceled! ``` ##### Parameters ###### emitter `EventEmitter` ###### eventName `string` \| `symbol` ###### options? `StaticEventEmitterOptions` ##### Returns `Promise`\<`any`[]\> ##### Since v11.13.0, v10.16.0 ##### Inherited from `EventEmitter.once` #### Call Signature > `static` **once**(`emitter`, `eventName`, `options?`): `Promise`\<`any`[]\> Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given event or that is rejected if the `EventEmitter` emits `'error'` while waiting. The `Promise` will resolve with an array of all the arguments emitted to the given event. This method is intentionally generic and works with the web platform [EventTarget](https://dom.spec.whatwg.org/#interface-eventtarget) interface, which has no special`'error'` event semantics and does not listen to the `'error'` event. ```js import { once, EventEmitter } from 'node:events'; import process from 'node:process'; const ee = new EventEmitter(); process.nextTick(() => { ee.emit('myevent', 42); }); const [value] = await once(ee, 'myevent'); console.log(value); const err = new Error('kaboom'); process.nextTick(() => { ee.emit('error', err); }); try { await once(ee, 'myevent'); } catch (err) { console.error('error happened', err); } ``` The special handling of the `'error'` event is only used when `events.once()` is used to wait for another event. If `events.once()` is used to wait for the '`error'` event itself, then it is treated as any other kind of event without special handling: ```js import { EventEmitter, once } from 'node:events'; const ee = new EventEmitter(); once(ee, 'error') .then(([err]) => console.log('ok', err.message)) .catch((err) => console.error('error', err.message)); ee.emit('error', new Error('boom')); // Prints: ok boom ``` An `AbortSignal` can be used to cancel waiting for the event: ```js import { EventEmitter, once } from 'node:events'; const ee = new EventEmitter(); const ac = new AbortController(); async function foo(emitter, event, signal) { try { await once(emitter, event, { signal }); console.log('event emitted!'); } catch (error) { if (error.name === 'AbortError') { console.error('Waiting for the event was canceled!'); } else { console.error('There was an error', error.message); } } } foo(ee, 'foo', ac.signal); ac.abort(); // Abort waiting for the event ee.emit('foo'); // Prints: Waiting for the event was canceled! ``` ##### Parameters ###### emitter `EventTarget` ###### eventName `string` ###### options? `StaticEventEmitterOptions` ##### Returns `Promise`\<`any`[]\> ##### Since v11.13.0, v10.16.0 ##### Inherited from `EventEmitter.once` *** ### setMaxListeners() > `static` **setMaxListeners**(`n?`, ...`eventTargets`): `void` ```js import { setMaxListeners, EventEmitter } from 'node:events'; const target = new EventTarget(); const emitter = new EventEmitter(); setMaxListeners(5, target, emitter); ``` #### Parameters ##### n? `number` A non-negative number. The maximum number of listeners per `EventTarget` event. ##### eventTargets ...(`EventEmitter`\<`DefaultEventMap`\> \| `EventTarget`)[] Zero or more {EventTarget} or {EventEmitter} instances. If none are specified, `n` is set as the default max for all newly created {EventTarget} and {EventEmitter} objects. #### Returns `void` #### Since v15.4.0 #### Inherited from `EventEmitter.setMaxListeners` --- ## Page: MinimaProvider URL: https://docs.totem.ing/api/totemsdk-server/classes/MinimaProvider [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / MinimaProvider # Class: MinimaProvider ## Extends - `EventEmitter` ## Constructors ### Constructor > **new MinimaProvider**(`config`): `MinimaProvider` #### Parameters ##### config `ProviderConfig` #### Returns `MinimaProvider` #### Overrides `EventEmitter.constructor` ## Properties ### captureRejections > `static` **captureRejections**: `boolean` Value: [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) Change the default `captureRejections` option on all new `EventEmitter` objects. #### Since v13.4.0, v12.16.0 #### Inherited from `EventEmitter.captureRejections` *** ### captureRejectionSymbol > `readonly` `static` **captureRejectionSymbol**: *typeof* [`captureRejectionSymbol`](MinimaClient.md#capturerejectionsymbol) Value: `Symbol.for('nodejs.rejection')` See how to write a custom `rejection handler`. #### Since v13.4.0, v12.16.0 #### Inherited from `EventEmitter.captureRejectionSymbol` *** ### defaultMaxListeners > `static` **defaultMaxListeners**: `number` By default, a maximum of `10` listeners can be registered for any single event. This limit can be changed for individual `EventEmitter` instances using the `emitter.setMaxListeners(n)` method. To change the default for _all_`EventEmitter` instances, the `events.defaultMaxListeners` property can be used. If this value is not a positive number, a `RangeError` is thrown. Take caution when setting the `events.defaultMaxListeners` because the change affects _all_ `EventEmitter` instances, including those created before the change is made. However, calling `emitter.setMaxListeners(n)` still has precedence over `events.defaultMaxListeners`. This is not a hard limit. The `EventEmitter` instance will allow more listeners to be added but will output a trace warning to stderr indicating that a "possible EventEmitter memory leak" has been detected. For any single `EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()` methods can be used to temporarily avoid this warning: ```js import { EventEmitter } from 'node:events'; const emitter = new EventEmitter(); emitter.setMaxListeners(emitter.getMaxListeners() + 1); emitter.once('event', () => { // do stuff emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); }); ``` The `--trace-warnings` command-line flag can be used to display the stack trace for such warnings. The emitted warning can be inspected with `process.on('warning')` and will have the additional `emitter`, `type`, and `count` properties, referring to the event emitter instance, the event's name and the number of attached listeners, respectively. Its `name` property is set to `'MaxListenersExceededWarning'`. #### Since v0.11.2 #### Inherited from `EventEmitter.defaultMaxListeners` *** ### errorMonitor > `readonly` `static` **errorMonitor**: *typeof* [`errorMonitor`](MinimaClient.md#errormonitor) This symbol shall be used to install a listener for only monitoring `'error'` events. Listeners installed using this symbol are called before the regular `'error'` listeners are called. Installing a listener using this symbol does not change the behavior once an `'error'` event is emitted. Therefore, the process will still crash if no regular `'error'` listener is installed. #### Since v13.6.0, v12.17.0 #### Inherited from `EventEmitter.errorMonitor` ## Methods ### \[captureRejectionSymbol\]()? > `optional` **\[captureRejectionSymbol\]**\<`K`\>(`error`, `event`, ...`args`): `void` #### Type Parameters ##### K `K` #### Parameters ##### error `Error` ##### event `string` \| `symbol` ##### args ...`AnyRest` #### Returns `void` #### Inherited from `EventEmitter.[captureRejectionSymbol]` *** ### addListener() > **addListener**\<`K`\>(`eventName`, `listener`): `this` Alias for `emitter.on(eventName, listener)`. #### Type Parameters ##### K `K` #### Parameters ##### eventName `string` \| `symbol` ##### listener (...`args`) => `void` #### Returns `this` #### Since v0.1.26 #### Inherited from `EventEmitter.addListener` *** ### connect() > **connect**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### disconnect() > **disconnect**(): `void` #### Returns `void` *** ### emit() > **emit**\<`K`\>(`eventName`, ...`args`): `boolean` Synchronously calls each of the listeners registered for the event named `eventName`, in the order they were registered, passing the supplied arguments to each. Returns `true` if the event had listeners, `false` otherwise. ```js import { EventEmitter } from 'node:events'; const myEmitter = new EventEmitter(); // First listener myEmitter.on('event', function firstListener() { console.log('Helloooo! first listener'); }); // Second listener myEmitter.on('event', function secondListener(arg1, arg2) { console.log(`event with parameters ${arg1}, ${arg2} in second listener`); }); // Third listener myEmitter.on('event', function thirdListener(...args) { const parameters = args.join(', '); console.log(`event with parameters ${parameters} in third listener`); }); console.log(myEmitter.listeners('event')); myEmitter.emit('event', 1, 2, 3, 4, 5); // Prints: // [ // [Function: firstListener], // [Function: secondListener], // [Function: thirdListener] // ] // Helloooo! first listener // event with parameters 1, 2 in second listener // event with parameters 1, 2, 3, 4, 5 in third listener ``` #### Type Parameters ##### K `K` #### Parameters ##### eventName `string` \| `symbol` ##### args ...`AnyRest` #### Returns `boolean` #### Since v0.1.26 #### Inherited from `EventEmitter.emit` *** ### eventNames() > **eventNames**(): (`string` \| `symbol`)[] Returns an array listing the events for which the emitter has registered listeners. The values in the array are strings or `Symbol`s. ```js import { EventEmitter } from 'node:events'; const myEE = new EventEmitter(); myEE.on('foo', () => {}); myEE.on('bar', () => {}); const sym = Symbol('symbol'); myEE.on(sym, () => {}); console.log(myEE.eventNames()); // Prints: [ 'foo', 'bar', Symbol(symbol) ] ``` #### Returns (`string` \| `symbol`)[] #### Since v6.0.0 #### Inherited from `EventEmitter.eventNames` *** ### getMaxListeners() > **getMaxListeners**(): `number` Returns the current max listener value for the `EventEmitter` which is either set by `emitter.setMaxListeners(n)` or defaults to [EventEmitter.defaultMaxListeners](MinimaClient.md#defaultmaxlisteners). #### Returns `number` #### Since v1.0.0 #### Inherited from `EventEmitter.getMaxListeners` *** ### listenerCount() > **listenerCount**\<`K`\>(`eventName`, `listener?`): `number` Returns the number of listeners listening for the event named `eventName`. If `listener` is provided, it will return how many times the listener is found in the list of the listeners of the event. #### Type Parameters ##### K `K` #### Parameters ##### eventName `string` \| `symbol` The name of the event being listened for ##### listener? `Function` The event handler function #### Returns `number` #### Since v3.2.0 #### Inherited from `EventEmitter.listenerCount` *** ### listeners() > **listeners**\<`K`\>(`eventName`): `Function`[] Returns a copy of the array of listeners for the event named `eventName`. ```js server.on('connection', (stream) => { console.log('someone connected!'); }); console.log(util.inspect(server.listeners('connection'))); // Prints: [ [Function] ] ``` #### Type Parameters ##### K `K` #### Parameters ##### eventName `string` \| `symbol` #### Returns `Function`[] #### Since v0.1.26 #### Inherited from `EventEmitter.listeners` *** ### off() > **off**\<`K`\>(`eventName`, `listener`): `this` Alias for `emitter.removeListener()`. #### Type Parameters ##### K `K` #### Parameters ##### eventName `string` \| `symbol` ##### listener (...`args`) => `void` #### Returns `this` #### Since v10.0.0 #### Inherited from `EventEmitter.off` *** ### on() > **on**\<`K`\>(`eventName`, `listener`): `this` Adds the `listener` function to the end of the listeners array for the event named `eventName`. No checks are made to see if the `listener` has already been added. Multiple calls passing the same combination of `eventName` and `listener` will result in the `listener` being added, and called, multiple times. ```js server.on('connection', (stream) => { console.log('someone connected!'); }); ``` Returns a reference to the `EventEmitter`, so that calls can be chained. By default, event listeners are invoked in the order they are added. The `emitter.prependListener()` method can be used as an alternative to add the event listener to the beginning of the listeners array. ```js import { EventEmitter } from 'node:events'; const myEE = new EventEmitter(); myEE.on('foo', () => console.log('a')); myEE.prependListener('foo', () => console.log('b')); myEE.emit('foo'); // Prints: // b // a ``` #### Type Parameters ##### K `K` #### Parameters ##### eventName `string` \| `symbol` The name of the event. ##### listener (...`args`) => `void` The callback function #### Returns `this` #### Since v0.1.101 #### Inherited from `EventEmitter.on` *** ### once() > **once**\<`K`\>(`eventName`, `listener`): `this` Adds a **one-time** `listener` function for the event named `eventName`. The next time `eventName` is triggered, this listener is removed and then invoked. ```js server.once('connection', (stream) => { console.log('Ah, we have our first user!'); }); ``` Returns a reference to the `EventEmitter`, so that calls can be chained. By default, event listeners are invoked in the order they are added. The `emitter.prependOnceListener()` method can be used as an alternative to add the event listener to the beginning of the listeners array. ```js import { EventEmitter } from 'node:events'; const myEE = new EventEmitter(); myEE.once('foo', () => console.log('a')); myEE.prependOnceListener('foo', () => console.log('b')); myEE.emit('foo'); // Prints: // b // a ``` #### Type Parameters ##### K `K` #### Parameters ##### eventName `string` \| `symbol` The name of the event. ##### listener (...`args`) => `void` The callback function #### Returns `this` #### Since v0.3.0 #### Inherited from `EventEmitter.once` *** ### prependListener() > **prependListener**\<`K`\>(`eventName`, `listener`): `this` Adds the `listener` function to the _beginning_ of the listeners array for the event named `eventName`. No checks are made to see if the `listener` has already been added. Multiple calls passing the same combination of `eventName` and `listener` will result in the `listener` being added, and called, multiple times. ```js server.prependListener('connection', (stream) => { console.log('someone connected!'); }); ``` Returns a reference to the `EventEmitter`, so that calls can be chained. #### Type Parameters ##### K `K` #### Parameters ##### eventName `string` \| `symbol` The name of the event. ##### listener (...`args`) => `void` The callback function #### Returns `this` #### Since v6.0.0 #### Inherited from `EventEmitter.prependListener` *** ### prependOnceListener() > **prependOnceListener**\<`K`\>(`eventName`, `listener`): `this` Adds a **one-time**`listener` function for the event named `eventName` to the _beginning_ of the listeners array. The next time `eventName` is triggered, this listener is removed, and then invoked. ```js server.prependOnceListener('connection', (stream) => { console.log('Ah, we have our first user!'); }); ``` Returns a reference to the `EventEmitter`, so that calls can be chained. #### Type Parameters ##### K `K` #### Parameters ##### eventName `string` \| `symbol` The name of the event. ##### listener (...`args`) => `void` The callback function #### Returns `this` #### Since v6.0.0 #### Inherited from `EventEmitter.prependOnceListener` *** ### rawListeners() > **rawListeners**\<`K`\>(`eventName`): `Function`[] Returns a copy of the array of listeners for the event named `eventName`, including any wrappers (such as those created by `.once()`). ```js import { EventEmitter } from 'node:events'; const emitter = new EventEmitter(); emitter.once('log', () => console.log('log once')); // Returns a new Array with a function `onceWrapper` which has a property // `listener` which contains the original listener bound above const listeners = emitter.rawListeners('log'); const logFnWrapper = listeners[0]; // Logs "log once" to the console and does not unbind the `once` event logFnWrapper.listener(); // Logs "log once" to the console and removes the listener logFnWrapper(); emitter.on('log', () => console.log('log persistently')); // Will return a new Array with a single function bound by `.on()` above const newListeners = emitter.rawListeners('log'); // Logs "log persistently" twice newListeners[0](); emitter.emit('log'); ``` #### Type Parameters ##### K `K` #### Parameters ##### eventName `string` \| `symbol` #### Returns `Function`[] #### Since v9.4.0 #### Inherited from `EventEmitter.rawListeners` *** ### removeAllListeners() > **removeAllListeners**(`eventName?`): `this` Removes all listeners, or those of the specified `eventName`. It is bad practice to remove listeners added elsewhere in the code, particularly when the `EventEmitter` instance was created by some other component or module (e.g. sockets or file streams). Returns a reference to the `EventEmitter`, so that calls can be chained. #### Parameters ##### eventName? `string` \| `symbol` #### Returns `this` #### Since v0.1.26 #### Inherited from `EventEmitter.removeAllListeners` *** ### removeListener() > **removeListener**\<`K`\>(`eventName`, `listener`): `this` Removes the specified `listener` from the listener array for the event named `eventName`. ```js const callback = (stream) => { console.log('someone connected!'); }; server.on('connection', callback); // ... server.removeListener('connection', callback); ``` `removeListener()` will remove, at most, one instance of a listener from the listener array. If any single listener has been added multiple times to the listener array for the specified `eventName`, then `removeListener()` must be called multiple times to remove each instance. Once an event is emitted, all listeners attached to it at the time of emitting are called in order. This implies that any `removeListener()` or `removeAllListeners()` calls _after_ emitting and _before_ the last listener finishes execution will not remove them from`emit()` in progress. Subsequent events behave as expected. ```js import { EventEmitter } from 'node:events'; class MyEmitter extends EventEmitter {} const myEmitter = new MyEmitter(); const callbackA = () => { console.log('A'); myEmitter.removeListener('event', callbackB); }; const callbackB = () => { console.log('B'); }; myEmitter.on('event', callbackA); myEmitter.on('event', callbackB); // callbackA removes listener callbackB but it will still be called. // Internal listener array at time of emit [callbackA, callbackB] myEmitter.emit('event'); // Prints: // A // B // callbackB is now removed. // Internal listener array [callbackA] myEmitter.emit('event'); // Prints: // A ``` Because listeners are managed using an internal array, calling this will change the position indices of any listener registered _after_ the listener being removed. This will not impact the order in which listeners are called, but it means that any copies of the listener array as returned by the `emitter.listeners()` method will need to be recreated. When a single function has been added as a handler multiple times for a single event (as in the example below), `removeListener()` will remove the most recently added instance. In the example the `once('ping')` listener is removed: ```js import { EventEmitter } from 'node:events'; const ee = new EventEmitter(); function pong() { console.log('pong'); } ee.on('ping', pong); ee.once('ping', pong); ee.removeListener('ping', pong); ee.emit('ping'); ee.emit('ping'); ``` Returns a reference to the `EventEmitter`, so that calls can be chained. #### Type Parameters ##### K `K` #### Parameters ##### eventName `string` \| `symbol` ##### listener (...`args`) => `void` #### Returns `this` #### Since v0.1.26 #### Inherited from `EventEmitter.removeListener` *** ### request() > **request**(`method`, `params?`): `Promise`\<`any`\> #### Parameters ##### method `string` ##### params? `any` #### Returns `Promise`\<`any`\> *** ### setMaxListeners() > **setMaxListeners**(`n`): `this` By default `EventEmitter`s will print a warning if more than `10` listeners are added for a particular event. This is a useful default that helps finding memory leaks. The `emitter.setMaxListeners()` method allows the limit to be modified for this specific `EventEmitter` instance. The value can be set to `Infinity` (or `0`) to indicate an unlimited number of listeners. Returns a reference to the `EventEmitter`, so that calls can be chained. #### Parameters ##### n `number` #### Returns `this` #### Since v0.3.5 #### Inherited from `EventEmitter.setMaxListeners` *** ### addAbortListener() > `static` **addAbortListener**(`signal`, `resource`): `Disposable` **`Experimental`** Listens once to the `abort` event on the provided `signal`. Listening to the `abort` event on abort signals is unsafe and may lead to resource leaks since another third party with the signal can call `e.stopImmediatePropagation()`. Unfortunately Node.js cannot change this since it would violate the web standard. Additionally, the original API makes it easy to forget to remove listeners. This API allows safely using `AbortSignal`s in Node.js APIs by solving these two issues by listening to the event such that `stopImmediatePropagation` does not prevent the listener from running. Returns a disposable so that it may be unsubscribed from more easily. ```js import { addAbortListener } from 'node:events'; function example(signal) { let disposable; try { signal.addEventListener('abort', (e) => e.stopImmediatePropagation()); disposable = addAbortListener(signal, (e) => { // Do something when signal is aborted. }); } finally { disposable?.[Symbol.dispose](); } } ``` #### Parameters ##### signal `AbortSignal` ##### resource (`event`) => `void` #### Returns `Disposable` Disposable that removes the `abort` listener. #### Since v20.5.0 #### Inherited from `EventEmitter.addAbortListener` *** ### getEventListeners() > `static` **getEventListeners**(`emitter`, `name`): `Function`[] Returns a copy of the array of listeners for the event named `eventName`. For `EventEmitter`s this behaves exactly the same as calling `.listeners` on the emitter. For `EventTarget`s this is the only way to get the event listeners for the event target. This is useful for debugging and diagnostic purposes. ```js import { getEventListeners, EventEmitter } from 'node:events'; { const ee = new EventEmitter(); const listener = () => console.log('Events are fun'); ee.on('foo', listener); console.log(getEventListeners(ee, 'foo')); // [ [Function: listener] ] } { const et = new EventTarget(); const listener = () => console.log('Events are fun'); et.addEventListener('foo', listener); console.log(getEventListeners(et, 'foo')); // [ [Function: listener] ] } ``` #### Parameters ##### emitter `EventEmitter`\<`DefaultEventMap`\> \| `EventTarget` ##### name `string` \| `symbol` #### Returns `Function`[] #### Since v15.2.0, v14.17.0 #### Inherited from `EventEmitter.getEventListeners` *** ### getMaxListeners() > `static` **getMaxListeners**(`emitter`): `number` Returns the currently set max amount of listeners. For `EventEmitter`s this behaves exactly the same as calling `.getMaxListeners` on the emitter. For `EventTarget`s this is the only way to get the max event listeners for the event target. If the number of event handlers on a single EventTarget exceeds the max set, the EventTarget will print a warning. ```js import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events'; { const ee = new EventEmitter(); console.log(getMaxListeners(ee)); // 10 setMaxListeners(11, ee); console.log(getMaxListeners(ee)); // 11 } { const et = new EventTarget(); console.log(getMaxListeners(et)); // 10 setMaxListeners(11, et); console.log(getMaxListeners(et)); // 11 } ``` #### Parameters ##### emitter `EventEmitter`\<`DefaultEventMap`\> \| `EventTarget` #### Returns `number` #### Since v19.9.0 #### Inherited from `EventEmitter.getMaxListeners` *** ### ~~listenerCount()~~ > `static` **listenerCount**(`emitter`, `eventName`): `number` A class method that returns the number of listeners for the given `eventName` registered on the given `emitter`. ```js import { EventEmitter, listenerCount } from 'node:events'; const myEmitter = new EventEmitter(); myEmitter.on('event', () => {}); myEmitter.on('event', () => {}); console.log(listenerCount(myEmitter, 'event')); // Prints: 2 ``` #### Parameters ##### emitter `EventEmitter` The emitter to query ##### eventName `string` \| `symbol` The event name #### Returns `number` #### Since v0.9.12 #### Deprecated Since v3.2.0 - Use `listenerCount` instead. #### Inherited from `EventEmitter.listenerCount` *** ### on() #### Call Signature > `static` **on**(`emitter`, `eventName`, `options?`): `AsyncIterator`\<`any`[]\> ```js import { on, EventEmitter } from 'node:events'; import process from 'node:process'; const ee = new EventEmitter(); // Emit later on process.nextTick(() => { ee.emit('foo', 'bar'); ee.emit('foo', 42); }); for await (const event of on(ee, 'foo')) { // The execution of this inner block is synchronous and it // processes one event at a time (even with await). Do not use // if concurrent execution is required. console.log(event); // prints ['bar'] [42] } // Unreachable here ``` Returns an `AsyncIterator` that iterates `eventName` events. It will throw if the `EventEmitter` emits `'error'`. It removes all listeners when exiting the loop. The `value` returned by each iteration is an array composed of the emitted event arguments. An `AbortSignal` can be used to cancel waiting on events: ```js import { on, EventEmitter } from 'node:events'; import process from 'node:process'; const ac = new AbortController(); (async () => { const ee = new EventEmitter(); // Emit later on process.nextTick(() => { ee.emit('foo', 'bar'); ee.emit('foo', 42); }); for await (const event of on(ee, 'foo', { signal: ac.signal })) { // The execution of this inner block is synchronous and it // processes one event at a time (even with await). Do not use // if concurrent execution is required. console.log(event); // prints ['bar'] [42] } // Unreachable here })(); process.nextTick(() => ac.abort()); ``` Use the `close` option to specify an array of event names that will end the iteration: ```js import { on, EventEmitter } from 'node:events'; import process from 'node:process'; const ee = new EventEmitter(); // Emit later on process.nextTick(() => { ee.emit('foo', 'bar'); ee.emit('foo', 42); ee.emit('close'); }); for await (const event of on(ee, 'foo', { close: ['close'] })) { console.log(event); // prints ['bar'] [42] } // the loop will exit after 'close' is emitted console.log('done'); // prints 'done' ``` ##### Parameters ###### emitter `EventEmitter` ###### eventName `string` \| `symbol` ###### options? `StaticEventEmitterIteratorOptions` ##### Returns `AsyncIterator`\<`any`[]\> An `AsyncIterator` that iterates `eventName` events emitted by the `emitter` ##### Since v13.6.0, v12.16.0 ##### Inherited from `EventEmitter.on` #### Call Signature > `static` **on**(`emitter`, `eventName`, `options?`): `AsyncIterator`\<`any`[]\> ```js import { on, EventEmitter } from 'node:events'; import process from 'node:process'; const ee = new EventEmitter(); // Emit later on process.nextTick(() => { ee.emit('foo', 'bar'); ee.emit('foo', 42); }); for await (const event of on(ee, 'foo')) { // The execution of this inner block is synchronous and it // processes one event at a time (even with await). Do not use // if concurrent execution is required. console.log(event); // prints ['bar'] [42] } // Unreachable here ``` Returns an `AsyncIterator` that iterates `eventName` events. It will throw if the `EventEmitter` emits `'error'`. It removes all listeners when exiting the loop. The `value` returned by each iteration is an array composed of the emitted event arguments. An `AbortSignal` can be used to cancel waiting on events: ```js import { on, EventEmitter } from 'node:events'; import process from 'node:process'; const ac = new AbortController(); (async () => { const ee = new EventEmitter(); // Emit later on process.nextTick(() => { ee.emit('foo', 'bar'); ee.emit('foo', 42); }); for await (const event of on(ee, 'foo', { signal: ac.signal })) { // The execution of this inner block is synchronous and it // processes one event at a time (even with await). Do not use // if concurrent execution is required. console.log(event); // prints ['bar'] [42] } // Unreachable here })(); process.nextTick(() => ac.abort()); ``` Use the `close` option to specify an array of event names that will end the iteration: ```js import { on, EventEmitter } from 'node:events'; import process from 'node:process'; const ee = new EventEmitter(); // Emit later on process.nextTick(() => { ee.emit('foo', 'bar'); ee.emit('foo', 42); ee.emit('close'); }); for await (const event of on(ee, 'foo', { close: ['close'] })) { console.log(event); // prints ['bar'] [42] } // the loop will exit after 'close' is emitted console.log('done'); // prints 'done' ``` ##### Parameters ###### emitter `EventTarget` ###### eventName `string` ###### options? `StaticEventEmitterIteratorOptions` ##### Returns `AsyncIterator`\<`any`[]\> An `AsyncIterator` that iterates `eventName` events emitted by the `emitter` ##### Since v13.6.0, v12.16.0 ##### Inherited from `EventEmitter.on` *** ### once() #### Call Signature > `static` **once**(`emitter`, `eventName`, `options?`): `Promise`\<`any`[]\> Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given event or that is rejected if the `EventEmitter` emits `'error'` while waiting. The `Promise` will resolve with an array of all the arguments emitted to the given event. This method is intentionally generic and works with the web platform [EventTarget](https://dom.spec.whatwg.org/#interface-eventtarget) interface, which has no special`'error'` event semantics and does not listen to the `'error'` event. ```js import { once, EventEmitter } from 'node:events'; import process from 'node:process'; const ee = new EventEmitter(); process.nextTick(() => { ee.emit('myevent', 42); }); const [value] = await once(ee, 'myevent'); console.log(value); const err = new Error('kaboom'); process.nextTick(() => { ee.emit('error', err); }); try { await once(ee, 'myevent'); } catch (err) { console.error('error happened', err); } ``` The special handling of the `'error'` event is only used when `events.once()` is used to wait for another event. If `events.once()` is used to wait for the '`error'` event itself, then it is treated as any other kind of event without special handling: ```js import { EventEmitter, once } from 'node:events'; const ee = new EventEmitter(); once(ee, 'error') .then(([err]) => console.log('ok', err.message)) .catch((err) => console.error('error', err.message)); ee.emit('error', new Error('boom')); // Prints: ok boom ``` An `AbortSignal` can be used to cancel waiting for the event: ```js import { EventEmitter, once } from 'node:events'; const ee = new EventEmitter(); const ac = new AbortController(); async function foo(emitter, event, signal) { try { await once(emitter, event, { signal }); console.log('event emitted!'); } catch (error) { if (error.name === 'AbortError') { console.error('Waiting for the event was canceled!'); } else { console.error('There was an error', error.message); } } } foo(ee, 'foo', ac.signal); ac.abort(); // Abort waiting for the event ee.emit('foo'); // Prints: Waiting for the event was canceled! ``` ##### Parameters ###### emitter `EventEmitter` ###### eventName `string` \| `symbol` ###### options? `StaticEventEmitterOptions` ##### Returns `Promise`\<`any`[]\> ##### Since v11.13.0, v10.16.0 ##### Inherited from `EventEmitter.once` #### Call Signature > `static` **once**(`emitter`, `eventName`, `options?`): `Promise`\<`any`[]\> Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given event or that is rejected if the `EventEmitter` emits `'error'` while waiting. The `Promise` will resolve with an array of all the arguments emitted to the given event. This method is intentionally generic and works with the web platform [EventTarget](https://dom.spec.whatwg.org/#interface-eventtarget) interface, which has no special`'error'` event semantics and does not listen to the `'error'` event. ```js import { once, EventEmitter } from 'node:events'; import process from 'node:process'; const ee = new EventEmitter(); process.nextTick(() => { ee.emit('myevent', 42); }); const [value] = await once(ee, 'myevent'); console.log(value); const err = new Error('kaboom'); process.nextTick(() => { ee.emit('error', err); }); try { await once(ee, 'myevent'); } catch (err) { console.error('error happened', err); } ``` The special handling of the `'error'` event is only used when `events.once()` is used to wait for another event. If `events.once()` is used to wait for the '`error'` event itself, then it is treated as any other kind of event without special handling: ```js import { EventEmitter, once } from 'node:events'; const ee = new EventEmitter(); once(ee, 'error') .then(([err]) => console.log('ok', err.message)) .catch((err) => console.error('error', err.message)); ee.emit('error', new Error('boom')); // Prints: ok boom ``` An `AbortSignal` can be used to cancel waiting for the event: ```js import { EventEmitter, once } from 'node:events'; const ee = new EventEmitter(); const ac = new AbortController(); async function foo(emitter, event, signal) { try { await once(emitter, event, { signal }); console.log('event emitted!'); } catch (error) { if (error.name === 'AbortError') { console.error('Waiting for the event was canceled!'); } else { console.error('There was an error', error.message); } } } foo(ee, 'foo', ac.signal); ac.abort(); // Abort waiting for the event ee.emit('foo'); // Prints: Waiting for the event was canceled! ``` ##### Parameters ###### emitter `EventTarget` ###### eventName `string` ###### options? `StaticEventEmitterOptions` ##### Returns `Promise`\<`any`[]\> ##### Since v11.13.0, v10.16.0 ##### Inherited from `EventEmitter.once` *** ### setMaxListeners() > `static` **setMaxListeners**(`n?`, ...`eventTargets`): `void` ```js import { setMaxListeners, EventEmitter } from 'node:events'; const target = new EventTarget(); const emitter = new EventEmitter(); setMaxListeners(5, target, emitter); ``` #### Parameters ##### n? `number` A non-negative number. The maximum number of listeners per `EventTarget` event. ##### eventTargets ...(`EventEmitter`\<`DefaultEventMap`\> \| `EventTarget`)[] Zero or more {EventTarget} or {EventEmitter} instances. If none are specified, `n` is set as the default max for all newly created {EventTarget} and {EventEmitter} objects. #### Returns `void` #### Since v15.4.0 #### Inherited from `EventEmitter.setMaxListeners` --- ## Page: MinimaWallet URL: https://docs.totem.ing/api/totemsdk-server/classes/MinimaWallet [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / MinimaWallet # Class: MinimaWallet Minima-compatible wallet for Node.js Uses per-address TreeKey architecture matching Minima Wallet.java exactly. ## Constructors ### Constructor > **new MinimaWallet**(`config`): `MinimaWallet` #### Parameters ##### config `WalletConfig` #### Returns `MinimaWallet` ## Properties ### MAX\_ADDRESSES > `readonly` `static` **MAX\_ADDRESSES**: `64` = `64` ## Methods ### clearTreeKeyCache() > **clearTreeKeyCache**(): `void` Clear TreeKey cache (useful for memory management) #### Returns `void` *** ### createAccount() > **createAccount**(`label?`): `Promise`\<`Account`\> Create new account using per-address TreeKey architecture Matches Minima Wallet.createNewKey() exactly: 1. modifier = new MiniData(new BigInteger(Integer.toString(numkeys))) 2. privseed = Crypto.hashObjects(baseSeed, modifier) 3. treekey = TreeKey.createDefault(privseed) 4. address public key = TreeKey's MMR root #### Parameters ##### label? `string` #### Returns `Promise`\<`Account`\> *** ### export() > **export**(`password`): `Promise`\<`string`\> Export wallet as encrypted JSON #### Parameters ##### password `string` #### Returns `Promise`\<`string`\> *** ### generateSeedPhrase() > **generateSeedPhrase**(): `string` Generate new Minima-compatible seed phrase #### Returns `string` 24-word seed phrase in UPPERCASE (Minima canonical form) *** ### getAccount() > **getAccount**(`address`): `Account` \| `undefined` Get account by address #### Parameters ##### address `string` #### Returns `Account` \| `undefined` *** ### getAccountByIndex() > **getAccountByIndex**(`index`): `Account` \| `undefined` Get account by index #### Parameters ##### index `number` #### Returns `Account` \| `undefined` *** ### getAccounts() > **getAccounts**(): `Account`[] Get all accounts #### Returns `Account`[] *** ### getStats() > **getStats**(): `object` Get wallet statistics #### Returns `object` ##### accountCount > **accountCount**: `number` ##### cachedTreeKeys > **cachedTreeKeys**: `number` ##### maxAddresses > **maxAddresses**: `number` *** ### import() > **import**(`encryptedData`, `password`): `Promise`\<`void`\> Import wallet from encrypted JSON #### Parameters ##### encryptedData `string` ##### password `string` #### Returns `Promise`\<`void`\> *** ### initialize() > **initialize**(`seedPhrase?`): `Promise`\<`void`\> Initialize wallet with new seed phrase or load existing #### Parameters ##### seedPhrase? `string` 24-word Minima seed phrase (optional, creates new if not provided) #### Returns `Promise`\<`void`\> *** ### mineAndSubmitTxPoW() > **mineAndSubmitTxPoW**(`txBytes`, `witnessBytes`, `opts?`): `Promise`\<\{ `elapsedMs`: `number`; `miningSource`: `"wasm"` \| `"js"`; `txpowId`: `string`; \}\> Mine a TxPoW locally and submit it to the Axia API. This is the production path for SDK-built transactions: 1. Fetch the live difficulty target from the Axia API. 2. Build the TxBody (serialized tx + witness bytes). 3. Iterate the nonce until SHA3-256(TxHeader) < target (JS mining loop). 4. POST the mined TxPoW hex to the Axia MEG bridge for p2p broadcast. The caller is responsible for building and signing the transaction (e.g. via @totemsdk/tx-builder) to produce txBytes + witnessBytes. #### Parameters ##### txBytes `Uint8Array` Pre-serialized, signed Transaction bytes. Use core.serializeTransaction(tx) after signing. ##### witnessBytes `Uint8Array` Pre-serialized Witness bytes (WOTS proofs + coin proofs). Use your witness serializer (extension or SDK equivalent). ##### opts? Optional: axiaBaseUrl override, AbortSignal, mining chunk size. ###### axiaBaseUrl? `string` ###### chunkSize? `number` ###### signal? `AbortSignal` ###### submitPath? `string` #### Returns `Promise`\<\{ `elapsedMs`: `number`; `miningSource`: `"wasm"` \| `"js"`; `txpowId`: `string`; \}\> txpowId (hex), mining source, and wall-clock time. *** ### sendTransaction() > **sendTransaction**(`params`, `signingIndices`): `Promise`\<`string`\> Send transaction with automatic signing WARNING: This convenience method is NOT suitable for production use. Production code must: 1. Track used signing indices via WatermarkStore 2. Use signData() with proper Minima transaction serialization 3. Build witness bundle correctly for txnimport #### Parameters ##### params `TransactionParams` Transaction parameters ##### signingIndices Required: unique (l1, l2) indices for this signature ###### l1 `number` ###### l2 `number` #### Returns `Promise`\<`string`\> *** ### signData() > **signData**(`dataHash`, `addressIndex`, `signingIndices`): `Promise`\<`string`\> Sign raw data hash using per-address TreeKey This is the low-level signing method that accepts pre-computed hash. Use this for full Minima compatibility where transaction hashing follows Minima's canonical serialization. CRITICAL FIX (2026-02-05): Now uses setUses() + sign() to produce 3 proofs matching Java's TreeKey.sign() exactly for depth=3 TreeKeys. #### Parameters ##### dataHash `Uint8Array` 32-byte SHA3-256 hash of data to sign ##### addressIndex `number` Account index (0-63) ##### signingIndices Unique (l1, l2) indices for this signature ###### l1 `number` ###### l2 `number` #### Returns `Promise`\<`string`\> Hex-encoded signature *** ### signMinimaTransaction() > **signMinimaTransaction**(`tx`, `addressIndex`, `signingIndices`): `Promise`\<\{ `digest`: `Uint8Array`; `signature`: `string`; \}\> Sign a MinimaTransaction using canonical Minima wire serialization. This is the production-ready signing method that matches the Totem wallet extension exactly: 1. Precomputes output coin IDs (matching Java's TxPoWGenerator.precomputeTransactionCoinID) 2. Serializes the transaction using Minima's canonical wire format (Streamable.ts) 3. Computes SHA3-256 digest of the serialized bytes 4. Signs with TreeKey hierarchical WOTS signatures #### Parameters ##### tx [`MinimaTransaction`](../interfaces/MinimaTransaction.md) MinimaTransaction with proper MinimaCoin inputs/outputs ##### addressIndex `number` Account index (0-63) to sign with ##### signingIndices Unique (l1, l2) indices for this one-time signature ###### l1 `number` ###### l2 `number` #### Returns `Promise`\<\{ `digest`: `Uint8Array`; `signature`: `string`; \}\> Hex-encoded hierarchical TreeKey signature *** ### signTransaction() > **signTransaction**(`tx`, `fromAddress`, `signingIndices`): `Promise`\<`string`\> Sign transaction using per-address TreeKey CRITICAL: WOTS ONE-TIME KEY REQUIREMENT ======================================== WOTS (Winternitz One-Time Signature) keys MUST only be used once. Reusing the same (l1, l2) indices for different messages compromises the private key and allows signature forgery. The caller MUST provide unique signingIndices for each transaction. Use a WatermarkStore or similar mechanism to track used indices. Each per-address TreeKey supports 64 × 64 = 4,096 unique signatures. CRITICAL FIX (2026-02-05): Now uses setUses() + sign() to produce 3 proofs matching Java's TreeKey.sign() exactly for depth=3 TreeKeys. The (l1, l2) indices are converted to a uses counter: uses = l1 * 64 + l2 Uses hierarchical TreeKey signatures: - setUses(uses) + sign() produces 3 signature proofs (Root→L1→L2→DATA) - l1 range: 0-63 (L1 index) - l2 range: 0-63 (L2 index within L1 subtree) NOTE: Transaction serialization currently uses JSON. For full Minima compatibility, provide pre-hashed transaction data via signData(). #### Parameters ##### tx `Transaction` Transaction to sign ##### fromAddress `string` Address to sign from ##### signingIndices REQUIRED in production: unique (l1, l2) indices ###### l1 `number` ###### l2 `number` #### Returns `Promise`\<`string`\> Hex-encoded signature #### Throws Error if indices are not provided (in production mode) *** ### updateBalances() > **updateBalances**(): `Promise`\<`void`\> Update account balances from network #### Returns `Promise`\<`void`\> *** ### validateSeedPhrase() > **validateSeedPhrase**(`phrase`): `boolean` Validate a seed phrase #### Parameters ##### phrase `string` Seed phrase to validate #### Returns `boolean` true if all words are valid BIP39 words --- ## Page: NodeConfigProvider URL: https://docs.totem.ing/api/totemsdk-server/classes/NodeConfigProvider [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / NodeConfigProvider # Class: NodeConfigProvider ## Implements - [`ConfigProvider`](../interfaces/ConfigProvider.md) ## Constructors ### Constructor > **new NodeConfigProvider**(`options`): `NodeConfigProvider` #### Parameters ##### options [`NodeConfigOptions`](../interfaces/NodeConfigOptions.md) #### Returns `NodeConfigProvider` ## Properties ### apiKey? > `readonly` `optional` **apiKey?**: `string` #### Implementation of [`ConfigProvider`](../interfaces/ConfigProvider.md).[`apiKey`](../interfaces/ConfigProvider.md#apikey) *** ### apiUrl > `readonly` **apiUrl**: `string` #### Implementation of [`ConfigProvider`](../interfaces/ConfigProvider.md).[`apiUrl`](../interfaces/ConfigProvider.md#apiurl) *** ### network > `readonly` **network**: `"mainnet"` \| `"testnet"` \| `"devnet"` #### Implementation of [`ConfigProvider`](../interfaces/ConfigProvider.md).[`network`](../interfaces/ConfigProvider.md#network) *** ### wsUrl > `readonly` **wsUrl**: `string` #### Implementation of [`ConfigProvider`](../interfaces/ConfigProvider.md).[`wsUrl`](../interfaces/ConfigProvider.md#wsurl) ## Methods ### get() #### Call Signature > **get**\<`T`\>(`key`): `T` \| `undefined` ##### Type Parameters ###### T `T` ##### Parameters ###### key `string` ##### Returns `T` \| `undefined` ##### Implementation of [`ConfigProvider`](../interfaces/ConfigProvider.md).[`get`](../interfaces/ConfigProvider.md#get) #### Call Signature > **get**\<`T`\>(`key`, `defaultValue`): `T` ##### Type Parameters ###### T `T` ##### Parameters ###### key `string` ###### defaultValue `T` ##### Returns `T` ##### Implementation of [`ConfigProvider`](../interfaces/ConfigProvider.md).[`get`](../interfaces/ConfigProvider.md#get) *** ### getAll() > **getAll**(): `Record`\<`string`, `unknown`\> #### Returns `Record`\<`string`, `unknown`\> #### Implementation of [`ConfigProvider`](../interfaces/ConfigProvider.md).[`getAll`](../interfaces/ConfigProvider.md#getall) *** ### has() > **has**(`key`): `boolean` #### Parameters ##### key `string` #### Returns `boolean` #### Implementation of [`ConfigProvider`](../interfaces/ConfigProvider.md).[`has`](../interfaces/ConfigProvider.md#has) *** ### set() > **set**\<`T`\>(`key`, `value`): `void` #### Type Parameters ##### T `T` #### Parameters ##### key `string` ##### value `T` #### Returns `void` #### Implementation of [`ConfigProvider`](../interfaces/ConfigProvider.md).[`set`](../interfaces/ConfigProvider.md#set) --- ## Page: NodeCryptoAdapter URL: https://docs.totem.ing/api/totemsdk-server/classes/NodeCryptoAdapter [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / NodeCryptoAdapter # Class: NodeCryptoAdapter ## Implements - [`CryptoAdapter`](../interfaces/CryptoAdapter.md) ## Constructors ### Constructor > **new NodeCryptoAdapter**(): `NodeCryptoAdapter` #### Returns `NodeCryptoAdapter` ## Methods ### randomBytes() > **randomBytes**(`length`): `Uint8Array` #### Parameters ##### length `number` #### Returns `Uint8Array` #### Implementation of [`CryptoAdapter`](../interfaces/CryptoAdapter.md).[`randomBytes`](../interfaces/CryptoAdapter.md#randombytes) *** ### sha256() > **sha256**(`data`): `Uint8Array` #### Parameters ##### data `Uint8Array` #### Returns `Uint8Array` #### Implementation of [`CryptoAdapter`](../interfaces/CryptoAdapter.md).[`sha256`](../interfaces/CryptoAdapter.md#sha256) *** ### sha256Async() > **sha256Async**(`data`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> #### Parameters ##### data `Uint8Array` #### Returns `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> #### Implementation of [`CryptoAdapter`](../interfaces/CryptoAdapter.md).[`sha256Async`](../interfaces/CryptoAdapter.md#sha256async) --- ## Page: NodeHttpClient URL: https://docs.totem.ing/api/totemsdk-server/classes/NodeHttpClient [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / NodeHttpClient # Class: NodeHttpClient ## Implements - [`HttpClient`](../interfaces/HttpClient.md) ## Constructors ### Constructor > **new NodeHttpClient**(`options?`): `NodeHttpClient` #### Parameters ##### options? [`NodeHttpClientOptions`](../interfaces/NodeHttpClientOptions.md) = `{}` #### Returns `NodeHttpClient` ## Methods ### delete() > **delete**\<`T`\>(`url`, `options?`): `Promise`\<[`HttpResponse`](../interfaces/HttpResponse.md)\<`T`\>\> #### Type Parameters ##### T `T` #### Parameters ##### url `string` ##### options? [`HttpRequestOptions`](../interfaces/HttpRequestOptions.md) #### Returns `Promise`\<[`HttpResponse`](../interfaces/HttpResponse.md)\<`T`\>\> #### Implementation of [`HttpClient`](../interfaces/HttpClient.md).[`delete`](../interfaces/HttpClient.md#delete) *** ### get() > **get**\<`T`\>(`url`, `options?`): `Promise`\<[`HttpResponse`](../interfaces/HttpResponse.md)\<`T`\>\> #### Type Parameters ##### T `T` #### Parameters ##### url `string` ##### options? [`HttpRequestOptions`](../interfaces/HttpRequestOptions.md) #### Returns `Promise`\<[`HttpResponse`](../interfaces/HttpResponse.md)\<`T`\>\> #### Implementation of [`HttpClient`](../interfaces/HttpClient.md).[`get`](../interfaces/HttpClient.md#get) *** ### post() > **post**\<`T`\>(`url`, `body?`, `options?`): `Promise`\<[`HttpResponse`](../interfaces/HttpResponse.md)\<`T`\>\> #### Type Parameters ##### T `T` #### Parameters ##### url `string` ##### body? `unknown` ##### options? [`HttpRequestOptions`](../interfaces/HttpRequestOptions.md) #### Returns `Promise`\<[`HttpResponse`](../interfaces/HttpResponse.md)\<`T`\>\> #### Implementation of [`HttpClient`](../interfaces/HttpClient.md).[`post`](../interfaces/HttpClient.md#post) *** ### put() > **put**\<`T`\>(`url`, `body?`, `options?`): `Promise`\<[`HttpResponse`](../interfaces/HttpResponse.md)\<`T`\>\> #### Type Parameters ##### T `T` #### Parameters ##### url `string` ##### body? `unknown` ##### options? [`HttpRequestOptions`](../interfaces/HttpRequestOptions.md) #### Returns `Promise`\<[`HttpResponse`](../interfaces/HttpResponse.md)\<`T`\>\> #### Implementation of [`HttpClient`](../interfaces/HttpClient.md).[`put`](../interfaces/HttpClient.md#put) --- ## Page: NodeWebSocketFactory URL: https://docs.totem.ing/api/totemsdk-server/classes/NodeWebSocketFactory [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / NodeWebSocketFactory # Class: NodeWebSocketFactory ## Implements - [`WebSocketFactory`](../interfaces/WebSocketFactory.md) ## Constructors ### Constructor > **new NodeWebSocketFactory**(`defaultOptions?`): `NodeWebSocketFactory` #### Parameters ##### defaultOptions? [`WebSocketFactoryOptions`](../interfaces/WebSocketFactoryOptions.md) #### Returns `NodeWebSocketFactory` ## Methods ### create() > **create**(`url`, `protocols?`, `options?`): [`WebSocketClient`](../interfaces/WebSocketClient.md) #### Parameters ##### url `string` ##### protocols? `string`[] ##### options? [`WebSocketFactoryOptions`](../interfaces/WebSocketFactoryOptions.md) #### Returns [`WebSocketClient`](../interfaces/WebSocketClient.md) #### Implementation of [`WebSocketFactory`](../interfaces/WebSocketFactory.md).[`create`](../interfaces/WebSocketFactory.md#create) *** ### dispose() > **dispose**(): `void` #### Returns `void` #### Implementation of [`WebSocketFactory`](../interfaces/WebSocketFactory.md).[`dispose`](../interfaces/WebSocketFactory.md#dispose) --- ## Page: NoopLifecycleAdapter URL: https://docs.totem.ing/api/totemsdk-server/classes/NoopLifecycleAdapter [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / NoopLifecycleAdapter # Class: NoopLifecycleAdapter ## Implements - [`LifecycleAdapter`](../interfaces/LifecycleAdapter.md) ## Constructors ### Constructor > **new NoopLifecycleAdapter**(): `NoopLifecycleAdapter` #### Returns `NoopLifecycleAdapter` ## Methods ### onResume() > **onResume**(`_callback`): () => `void` #### Parameters ##### \_callback () => `void` #### Returns () => `void` #### Implementation of [`LifecycleAdapter`](../interfaces/LifecycleAdapter.md).[`onResume`](../interfaces/LifecycleAdapter.md#onresume) *** ### onSuspend() > **onSuspend**(`_callback`): () => `void` #### Parameters ##### \_callback () => `void` #### Returns () => `void` #### Implementation of [`LifecycleAdapter`](../interfaces/LifecycleAdapter.md).[`onSuspend`](../interfaces/LifecycleAdapter.md#onsuspend) --- ## Page: NoopLogger URL: https://docs.totem.ing/api/totemsdk-server/classes/NoopLogger [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / NoopLogger # Class: NoopLogger ## Implements - [`LoggerAdapter`](../interfaces/LoggerAdapter.md) ## Constructors ### Constructor > **new NoopLogger**(): `NoopLogger` #### Returns `NoopLogger` ## Methods ### debug() > **debug**(`_message`, ...`_args`): `void` #### Parameters ##### \_message `string` ##### \_args ...`unknown`[] #### Returns `void` #### Implementation of [`LoggerAdapter`](../interfaces/LoggerAdapter.md).[`debug`](../interfaces/LoggerAdapter.md#debug) *** ### error() > **error**(`_message`, ...`_args`): `void` #### Parameters ##### \_message `string` ##### \_args ...`unknown`[] #### Returns `void` #### Implementation of [`LoggerAdapter`](../interfaces/LoggerAdapter.md).[`error`](../interfaces/LoggerAdapter.md#error) *** ### info() > **info**(`_message`, ...`_args`): `void` #### Parameters ##### \_message `string` ##### \_args ...`unknown`[] #### Returns `void` #### Implementation of [`LoggerAdapter`](../interfaces/LoggerAdapter.md).[`info`](../interfaces/LoggerAdapter.md#info) *** ### warn() > **warn**(`_message`, ...`_args`): `void` #### Parameters ##### \_message `string` ##### \_args ...`unknown`[] #### Returns `void` #### Implementation of [`LoggerAdapter`](../interfaces/LoggerAdapter.md).[`warn`](../interfaces/LoggerAdapter.md#warn) --- ## Page: NoopMetrics URL: https://docs.totem.ing/api/totemsdk-server/classes/NoopMetrics [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / NoopMetrics # Class: NoopMetrics ## Implements - [`MetricsAdapter`](../interfaces/MetricsAdapter.md) ## Constructors ### Constructor > **new NoopMetrics**(): `NoopMetrics` #### Returns `NoopMetrics` ## Methods ### gauge() > **gauge**(`_name`, `_value`, `_tags?`): `void` #### Parameters ##### \_name `string` ##### \_value `number` ##### \_tags? `Record`\<`string`, `string`\> #### Returns `void` #### Implementation of [`MetricsAdapter`](../interfaces/MetricsAdapter.md).[`gauge`](../interfaces/MetricsAdapter.md#gauge) *** ### histogram() > **histogram**(`_name`, `_value`, `_tags?`): `void` #### Parameters ##### \_name `string` ##### \_value `number` ##### \_tags? `Record`\<`string`, `string`\> #### Returns `void` #### Implementation of [`MetricsAdapter`](../interfaces/MetricsAdapter.md).[`histogram`](../interfaces/MetricsAdapter.md#histogram) *** ### increment() > **increment**(`_name`, `_value?`, `_tags?`): `void` #### Parameters ##### \_name `string` ##### \_value? `number` ##### \_tags? `Record`\<`string`, `string`\> #### Returns `void` #### Implementation of [`MetricsAdapter`](../interfaces/MetricsAdapter.md).[`increment`](../interfaces/MetricsAdapter.md#increment) *** ### timing() > **timing**(`_name`, `_durationMs`, `_tags?`): `void` #### Parameters ##### \_name `string` ##### \_durationMs `number` ##### \_tags? `Record`\<`string`, `string`\> #### Returns `void` #### Implementation of [`MetricsAdapter`](../interfaces/MetricsAdapter.md).[`timing`](../interfaces/MetricsAdapter.md#timing) --- ## Page: SlowCashHelper URL: https://docs.totem.ing/api/totemsdk-server/classes/SlowCashHelper [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / SlowCashHelper # Class: SlowCashHelper Slow Cash Helper Creates rate-limited withdrawal contracts. ## Constructors ### Constructor > **new SlowCashHelper**(): `SlowCashHelper` #### Returns `SlowCashHelper` ## Methods ### buildWithdrawalDescriptor() > `static` **buildWithdrawalDescriptor**(`address`, `ownerPublicKey`, `withdrawalPercent?`, `cooldownBlocks?`): [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) Build ScriptDescriptor for slow cash withdrawal. #### Parameters ##### address `string` ##### ownerPublicKey `string` ##### withdrawalPercent? `string` ##### cooldownBlocks? `bigint` #### Returns [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) *** ### calculateWithdrawal() > `static` **calculateWithdrawal**(`currentAmount`, `withdrawalPercent`): `object` Calculate withdrawal amount. #### Parameters ##### currentAmount `bigint` ##### withdrawalPercent `number` #### Returns `object` ##### remaining > **remaining**: `bigint` ##### withdrawal > **withdrawal**: `bigint` *** ### canWithdraw() > `static` **canWithdraw**(`coinAge`, `cooldownBlocks`): `boolean` Check if withdrawal is allowed based on coin age. #### Parameters ##### coinAge `bigint` ##### cooldownBlocks `bigint` #### Returns `boolean` *** ### createSlowCash() > `static` **createSlowCash**(`ownerPublicKey`, `withdrawalPercent?`, `cooldownBlocks?`): `object` Create a slow cash contract. #### Parameters ##### ownerPublicKey `string` ##### withdrawalPercent? `string` ##### cooldownBlocks? `bigint` #### Returns `object` ##### address > **address**: `string` ##### script > **script**: `string` --- ## Page: StatefulGameHelper URL: https://docs.totem.ing/api/totemsdk-server/classes/StatefulGameHelper [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / StatefulGameHelper # Class: StatefulGameHelper Stateful Game Helper Creates multi-round stateful contracts (like coin flip). ## Constructors ### Constructor > **new StatefulGameHelper**(): `StatefulGameHelper` #### Returns `StatefulGameHelper` ## Methods ### buildNextRoundState() > `static` **buildNextRoundState**(`currentRound`, `preservedPorts`, `newStates`): [`StateValue`](../interfaces/StateValue.md)[] Build state for next round. #### Parameters ##### currentRound `number` ##### preservedPorts `number`[] ##### newStates [`StateValue`](../interfaces/StateValue.md)[] #### Returns [`StateValue`](../interfaces/StateValue.md)[] *** ### createRoundCheck() > `static` **createRoundCheck**(): `string` Create a round increment assertion. #### Returns `string` *** ### validateRound() > `static` **validateRound**(`previousRound`, `currentRound`): `boolean` Validate round progression. #### Parameters ##### previousRound `number` ##### currentRound `number` #### Returns `boolean` --- ## Page: StorageAuthProvider URL: https://docs.totem.ing/api/totemsdk-server/classes/StorageAuthProvider [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / StorageAuthProvider # Class: StorageAuthProvider ## Implements - [`AuthTokenProvider`](../interfaces/AuthTokenProvider.md) ## Constructors ### Constructor > **new StorageAuthProvider**(`storage`, `options?`): `StorageAuthProvider` #### Parameters ##### storage [`StorageAdapter`](../interfaces/StorageAdapter.md) ##### options? [`StorageAuthProviderOptions`](../interfaces/StorageAuthProviderOptions.md) = `{}` #### Returns `StorageAuthProvider` ## Methods ### clearToken() > **clearToken**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> #### Implementation of [`AuthTokenProvider`](../interfaces/AuthTokenProvider.md).[`clearToken`](../interfaces/AuthTokenProvider.md#cleartoken) *** ### getToken() > **getToken**(): `Promise`\<`string` \| `null`\> #### Returns `Promise`\<`string` \| `null`\> #### Implementation of [`AuthTokenProvider`](../interfaces/AuthTokenProvider.md).[`getToken`](../interfaces/AuthTokenProvider.md#gettoken) *** ### isAuthenticated() > **isAuthenticated**(): `Promise`\<`boolean`\> #### Returns `Promise`\<`boolean`\> #### Implementation of [`AuthTokenProvider`](../interfaces/AuthTokenProvider.md).[`isAuthenticated`](../interfaces/AuthTokenProvider.md#isauthenticated) *** ### onTokenChange() > **onTokenChange**(`callback`): () => `void` #### Parameters ##### callback (`token`) => `void` #### Returns () => `void` #### Implementation of [`AuthTokenProvider`](../interfaces/AuthTokenProvider.md).[`onTokenChange`](../interfaces/AuthTokenProvider.md#ontokenchange) *** ### setToken() > **setToken**(`token`): `Promise`\<`void`\> #### Parameters ##### token `string` #### Returns `Promise`\<`void`\> #### Implementation of [`AuthTokenProvider`](../interfaces/AuthTokenProvider.md).[`setToken`](../interfaces/AuthTokenProvider.md#settoken) --- ## Page: TimelockHelper URL: https://docs.totem.ing/api/totemsdk-server/classes/TimelockHelper [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / TimelockHelper # Class: TimelockHelper Timelock Helper Creates timelocked scripts that can only be spent after a certain block. ## Constructors ### Constructor > **new TimelockHelper**(): `TimelockHelper` #### Returns `TimelockHelper` ## Methods ### buildDescriptor() > `static` **buildDescriptor**(`address`, `publicKey`, `unlockBlock`): [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) Build ScriptDescriptor for a timelock spend. #### Parameters ##### address `string` ##### publicKey `string` ##### unlockBlock `bigint` #### Returns [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) *** ### createBlockTimelock() > `static` **createBlockTimelock**(`publicKey`, `unlockBlock`): `object` Create a timelock script that unlocks at a specific block. #### Parameters ##### publicKey `string` ##### unlockBlock `bigint` #### Returns `object` ##### address > **address**: `string` ##### script > **script**: `string` *** ### createCoinageTimelock() > `static` **createCoinageTimelock**(`publicKey`, `minCoinAge`): `object` Create a timelock script based on coin age. #### Parameters ##### publicKey `string` ##### minCoinAge `bigint` #### Returns `object` ##### address > **address**: `string` ##### script > **script**: `string` *** ### isUnlocked() > `static` **isUnlocked**(`unlockBlock`, `currentBlock`): `boolean` Check if a timelock is satisfied given current block. #### Parameters ##### unlockBlock `bigint` ##### currentBlock `bigint` #### Returns `boolean` --- ## Page: TransactionLifecycle URL: https://docs.totem.ing/api/totemsdk-server/classes/TransactionLifecycle [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / TransactionLifecycle # Class: TransactionLifecycle ## Constructors ### Constructor > **new TransactionLifecycle**(`txService`, `leaseStore`, `watermarkStore`, `receiptStore`, `logger?`, `metrics?`, `config?`): `TransactionLifecycle` #### Parameters ##### txService [`TransactionService`](TransactionService.md) ##### leaseStore [`LeaseStore`](LeaseStore.md) ##### watermarkStore [`WatermarkStore`](WatermarkStore.md) ##### receiptStore [`TransactionReceiptStore`](TransactionReceiptStore.md) ##### logger? [`LoggerAdapter`](../interfaces/LoggerAdapter.md) ##### metrics? [`MetricsAdapter`](../interfaces/MetricsAdapter.md) ##### config? [`TransactionLifecycleConfig`](../interfaces/TransactionLifecycleConfig.md) #### Returns `TransactionLifecycle` ## Methods ### cancelLease() > **cancelLease**(`leaseToken`): `Promise`\<`void`\> #### Parameters ##### leaseToken `string` #### Returns `Promise`\<`void`\> *** ### finalize() > **finalize**(`leaseToken`, `signedHex`, `metadata`): `Promise`\<[`FinalizeResponse`](../interfaces/FinalizeResponse.md)\> #### Parameters ##### leaseToken `string` ##### signedHex `string` ##### metadata [`TransactionMetadata`](../interfaces/TransactionMetadata.md) #### Returns `Promise`\<[`FinalizeResponse`](../interfaces/FinalizeResponse.md)\> *** ### prepare() > **prepare**(`params`, `rootPublicKey`): `Promise`\<[`PrepareResult`](../interfaces/PrepareResult.md)\> #### Parameters ##### params [`PrepareRequest`](../interfaces/PrepareRequest.md) ##### rootPublicKey `string` #### Returns `Promise`\<[`PrepareResult`](../interfaces/PrepareResult.md)\> *** ### setSyncWatermarkFunction() > **setSyncWatermarkFunction**(`fn`): `void` #### Parameters ##### fn [`WatermarkSyncFunction`](../interfaces/WatermarkSyncFunction.md) #### Returns `void` *** ### sign() > **sign**(`prepareResult`, `seed`, `deps`, `paramSetName?`): `Promise`\<[`SignResult`](../interfaces/SignResult.md)\> #### Parameters ##### prepareResult [`PrepareResult`](../interfaces/PrepareResult.md) ##### seed `Uint8Array` ##### deps [`WotsSigningDependencies`](../interfaces/WotsSigningDependencies.md) ##### paramSetName? `string` #### Returns `Promise`\<[`SignResult`](../interfaces/SignResult.md)\> --- ## Page: TransactionLifecycleError URL: https://docs.totem.ing/api/totemsdk-server/classes/TransactionLifecycleError [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / TransactionLifecycleError # Class: TransactionLifecycleError ## Extends - `Error` ## Constructors ### Constructor > **new TransactionLifecycleError**(`message`, `code`, `userMessage`): `TransactionLifecycleError` #### Parameters ##### message `string` ##### code `number` ##### userMessage `string` #### Returns `TransactionLifecycleError` #### Overrides `Error.constructor` ## Properties ### cause? > `optional` **cause?**: `unknown` #### Inherited from `Error.cause` *** ### code > **code**: `number` *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### userMessage > **userMessage**: `string` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: TransactionReceiptStore URL: https://docs.totem.ing/api/totemsdk-server/classes/TransactionReceiptStore [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / TransactionReceiptStore # Class: TransactionReceiptStore ## Constructors ### Constructor > **new TransactionReceiptStore**(`storage`, `logger?`, `config?`): `TransactionReceiptStore` #### Parameters ##### storage [`StorageAdapter`](../interfaces/StorageAdapter.md) ##### logger? [`LoggerAdapter`](../interfaces/LoggerAdapter.md) ##### config? [`TransactionReceiptStoreConfig`](../interfaces/TransactionReceiptStoreConfig.md) #### Returns `TransactionReceiptStore` ## Methods ### add() > **add**(`receipt`): `Promise`\<`void`\> #### Parameters ##### receipt [`TransactionReceipt`](../interfaces/TransactionReceipt.md) #### Returns `Promise`\<`void`\> *** ### clear() > **clear**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### count() > **count**(): `number` #### Returns `number` *** ### getAll() > **getAll**(): [`TransactionReceipt`](../interfaces/TransactionReceipt.md)[] #### Returns [`TransactionReceipt`](../interfaces/TransactionReceipt.md)[] *** ### getByTxpowid() > **getByTxpowid**(`txpowid`): [`TransactionReceipt`](../interfaces/TransactionReceipt.md) \| `undefined` #### Parameters ##### txpowid `string` #### Returns [`TransactionReceipt`](../interfaces/TransactionReceipt.md) \| `undefined` *** ### getRecent() > **getRecent**(`count?`): [`TransactionReceipt`](../interfaces/TransactionReceipt.md)[] #### Parameters ##### count? `number` #### Returns [`TransactionReceipt`](../interfaces/TransactionReceipt.md)[] *** ### initialize() > **initialize**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### isInitialized() > **isInitialized**(): `boolean` #### Returns `boolean` *** ### updateStatus() > **updateStatus**(`txpowid`, `status`): `Promise`\<`void`\> #### Parameters ##### txpowid `string` ##### status `"pending"` \| `"confirmed"` \| `"failed"` #### Returns `Promise`\<`void`\> --- ## Page: TransactionService URL: https://docs.totem.ing/api/totemsdk-server/classes/TransactionService [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / TransactionService # Class: TransactionService ## Constructors ### Constructor > **new TransactionService**(`http`, `config`, `logger?`, `metrics?`): `TransactionService` #### Parameters ##### http [`HttpClient`](../interfaces/HttpClient.md) ##### config [`TransactionServiceConfig`](../interfaces/TransactionServiceConfig.md) ##### logger? [`LoggerAdapter`](../interfaces/LoggerAdapter.md) ##### metrics? [`MetricsAdapter`](../interfaces/MetricsAdapter.md) #### Returns `TransactionService` ## Methods ### finalize() > **finalize**(`params`): `Promise`\<[`FinalizeResponse`](../interfaces/FinalizeResponse.md)\> #### Parameters ##### params [`FinalizeRequest`](../interfaces/FinalizeRequest.md) #### Returns `Promise`\<[`FinalizeResponse`](../interfaces/FinalizeResponse.md)\> *** ### prepare() > **prepare**(`params`, `rootPublicKey`): `Promise`\<[`PrepareResponse`](../interfaces/PrepareResponse.md)\> #### Parameters ##### params [`PrepareRequest`](../interfaces/PrepareRequest.md) ##### rootPublicKey `string` #### Returns `Promise`\<[`PrepareResponse`](../interfaces/PrepareResponse.md)\> *** ### sign() > **sign**(`request`, `seed`, `_deps?`, `_paramSet?`): `Promise`\<[`SignResult`](../interfaces/SignResult.md)\> Sign a transaction using per-address TreeKey architecture. Produces 3 proofs (Root→L1→L2→DATA) matching Minima's TreeKey.sign() exactly. #### Parameters ##### request [`SignRequest`](../interfaces/SignRequest.md) Indices and digestTx from the /prepare response ##### seed `Uint8Array` 32-byte wallet base seed (from mnemonic) ##### \_deps? [`WotsSigningDependencies`](../interfaces/WotsSigningDependencies.md) \| `null` Deprecated, unused. Pass null or omit. ##### \_paramSet? `string` Deprecated, unused. TreeKey uses its own param set. #### Returns `Promise`\<[`SignResult`](../interfaces/SignResult.md)\> --- ## Page: TreeKey URL: https://docs.totem.ing/api/totemsdk-server/classes/TreeKey [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / TreeKey # Class: TreeKey TreeKey - Full hierarchical key tree with multiple levels Matches TreeKey.java: - Default: 3 levels x 64 keys = 262,144 one-time signatures - Tracks usage count to determine which key to use - Produces multi-level signatures ## Constructors ### Constructor > **new TreeKey**(`privateSeed`, `keysPerLevel?`, `levels?`): `TreeKey` #### Parameters ##### privateSeed `Bytes` ##### keysPerLevel? `number` ##### levels? `number` #### Returns `TreeKey` ## Methods ### getAddressPublicKey() > **getAddressPublicKey**(`l1`): `Bytes` Get the public key for a level-1 address (single index) This is the MMR root of the level-1 TreeKeyNode's 64 Winternitz keys. Use this for wallet addresses where each address = one level-1 node. #### Parameters ##### l1 `number` Level 1 index (0-63, corresponds to wallet address index) #### Returns `Bytes` 32-byte MMR root public key for SIGNEDBY scripts *** ### getCachedSignatures() > **getCachedSignatures**(): `Map`\<`string`, [`SignatureProof`](../interfaces/SignatureProof.md)\> Get all cached parent-child signatures (for serialization/persistence) #### Returns `Map`\<`string`, [`SignatureProof`](../interfaces/SignatureProof.md)\> *** ### getMaxUses() > **getMaxUses**(): `number` Get the maximum number of signatures this tree can produce #### Returns `number` *** ### getParentChildSig() > **getParentChildSig**(`path`): [`SignatureProof`](../interfaces/SignatureProof.md) \| `undefined` Get a cached parent-child signature #### Parameters ##### path `number`[] Array of indices (e.g., [l1] for root->level1) #### Returns [`SignatureProof`](../interfaces/SignatureProof.md) \| `undefined` *** ### getPublicKey() > **getPublicKey**(): `Bytes` Get the wallet's public key (root of the key tree) #### Returns `Bytes` *** ### getRootNode() > **getRootNode**(): [`TreeKeyNode`](TreeKeyNode.md) Get the root TreeKeyNode (for internal use) #### Returns [`TreeKeyNode`](TreeKeyNode.md) *** ### getRootPublicKey() > **getRootPublicKey**(): `Bytes` Get the root public key (for watermark tracking) #### Returns `Bytes` *** ### getSigningNodePublicKey() > **getSigningNodePublicKey**(`l1`, `l2`): `Bytes` Get the public key for a specific signing key at tree index (l1, l2) This navigates to the level-2 node for signing operations. #### Parameters ##### l1 `number` Level 1 index (address) ##### l2 `number` Level 2 index (signing key within address) #### Returns `Bytes` 32-byte MMR root public key of level-2 node *** ### getUses() > **getUses**(): `number` Get current usage count #### Returns `number` *** ### hasParentChildSig() > **hasParentChildSig**(`path`): `boolean` Check if a parent-child signature is cached #### Parameters ##### path `number`[] Array of indices (e.g., [l1] for root->level1) #### Returns `boolean` *** ### restoreCachedSignatures() > **restoreCachedSignatures**(`cache`): `void` Restore cached signatures (for hydrating from persistence) #### Parameters ##### cache `Map`\<`string`, [`SignatureProof`](../interfaces/SignatureProof.md)\> #### Returns `void` *** ### setParentChildSig() > **setParentChildSig**(`path`, `sig`): `void` Cache a parent-child signature for reuse This allows the same signature to be reused across multiple signing operations #### Parameters ##### path `number`[] Array of indices leading to the child (e.g., [l1] or [l1, l2]) ##### sig [`SignatureProof`](../interfaces/SignatureProof.md) SignatureProof from parent signing child's public key #### Returns `void` *** ### setUses() > **setUses**(`uses`): `void` Set the usage counter (for resuming from a known state) #### Parameters ##### uses `number` #### Returns `void` *** ### sign() > **sign**(`data`): [`TreeSignature`](../interfaces/TreeSignature.md) Sign data with the current key and increment usage Matches TreeKey.java sign(): - Determines path through tree based on usage count - Each level's key signs the next level's root public key - Final level signs the actual data CRITICAL FIX (January 2026): Build proofs bottom-up to sign child's getRootPublicKey() Java's TreeKey.verify() verifies non-leaf signatures against childsig.getRootPublicKey(), which is the 32-byte MMR root computed from the NEXT proof's leafPubkey + MMRproof. Uses parent-child signature caching for efficiency: - Parent-child signatures are cached and reused - Only the final data signature is computed fresh each time #### Parameters ##### data `Bytes` #### Returns [`TreeSignature`](../interfaces/TreeSignature.md) *** ### createWithProgress() > `static` **createWithProgress**(`privateSeed`, `keysPerLevel?`, `levels?`, `onProgress?`): `Promise`\<`TreeKey`\> Async factory method for TreeKey with progress reporting Reports progress as the root TreeKeyNode generates its 64 signing keys #### Parameters ##### privateSeed `Bytes` ##### keysPerLevel? `number` ##### levels? `number` ##### onProgress? [`ProgressCallback`](../type-aliases/ProgressCallback.md) #### Returns `Promise`\<`TreeKey`\> --- ## Page: TreeKeyNode URL: https://docs.totem.ing/api/totemsdk-server/classes/TreeKeyNode [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / TreeKeyNode # Class: TreeKeyNode TreeKeyNode - One node in the key tree containing 64 Winternitz keys Matches TreeKeyNode.java (see attached_assets/TreeKeyNode_1767574401422.java): Key generation (lines 44-62): - Creates 64 Winternitz keys from a deterministic seed - For each key: MiniData pubkey = wots.getPublicKey() returns 32-byte DIGEST - Adds to MMR: MMRData.CreateMMRDataLeafNode(pubkey, MiniNumber.ZERO) - Public key = MMR root (mPublicKey = mTree.getRoot().getData()) MMR leaf construction (see MMRData.java lines 30-36): MMRData.CreateMMRDataLeafNode(pubkeyDigest, MiniNumber.ZERO) → hash = Crypto.hashAllObjects(MiniNumber.ZERO, zData, zSumValue) → Serialization: [0x00,0x01,0x00] + [4-byte-len + pubkey] + [0x00,0x01,0x00] MMR parent construction (see MMRData.java lines 38-50): MMRData.CreateMMRDataParentNode(left, right) → hash = Crypto.hashAllObjects(MiniNumber.ONE, left.data, right.data, sumValue) IMPORTANT: Minima NEVER stores the 1088-byte full WOTS public key. Only the 32-byte digest is stored and used for MMR construction. ## Constructors ### Constructor > **new TreeKeyNode**(`privateSeed`, `keysPerLevel?`): `TreeKeyNode` #### Parameters ##### privateSeed `Bytes` ##### keysPerLevel? `number` #### Returns `TreeKeyNode` ## Methods ### getChild() > **getChild**(`childIndex`): `TreeKeyNode` Create a child TreeKeyNode at the specified index Matches TreeKeyNode.java getChild() PERFORMANCE FIX: Child nodes are now cached to avoid regenerating 64 WOTS keys on every getChild() call. This is critical for address derivation performance where getChild() is called 64 times. #### Parameters ##### childIndex `number` #### Returns `TreeKeyNode` *** ### getProof() > **getProof**(`keyIndex`): [`MMRProof`](../interfaces/MMRProof.md) Get the MMR proof for a specific key index #### Parameters ##### keyIndex `number` #### Returns [`MMRProof`](../interfaces/MMRProof.md) *** ### getPublicKey() > **getPublicKey**(): `Bytes` Get the public key for this tree node (MMR root of all 64 Winternitz keys) #### Returns `Bytes` *** ### ~~getWOTSPublicKey()~~ > **getWOTSPublicKey**(`index`): `Bytes` Get the full Winternitz public key at a specific index (0-63) Returns the full L×32 byte public key (1088 bytes), derived on-demand NOTE: This is only used for local signature verification in tests. Java's Winternitz.getPublicKey() returns a 32-byte digest, not this. For production code, use getWOTSPublicKeyDigest() instead. #### Parameters ##### index `number` #### Returns `Bytes` #### Deprecated Use getWOTSPublicKeyDigest() for Minima compatibility *** ### getWOTSPublicKeyDigest() > **getWOTSPublicKeyDigest**(`index`): `Bytes` Get the Winternitz public key digest at a specific index (0-63) Returns the 32-byte SHA3 hash of the full public key #### Parameters ##### index `number` #### Returns `Bytes` *** ### sign() > **sign**(`keyIndex`, `data`): [`SignatureProof`](../interfaces/SignatureProof.md) Sign data with a specific key from this node Returns a SignatureProof containing the 32-byte leaf pubkey DIGEST, signature, and MMR proof CRITICAL: Java's WinternitzOTSignature.getSignature() ALWAYS hashes the message first, regardless of input length. From BouncyCastle WinternitzOTSignature.java lines 137-138: messDigestOTS.update(message, 0, message.length); messDigestOTS.doFinal(hash, 0); We MUST always hash to match Java verification, which also always hashes. CRITICAL FIX (January 2026): leafPubkey is the 32-byte WOTS public key DIGEST. Java's Winternitz.getPublicKey() returns SHA3-256(full_key) = 32 bytes! Previous bug: We stored 1088-byte full keys, Java expected 32-byte digests → verification failed. #### Parameters ##### keyIndex `number` ##### data `Bytes` #### Returns [`SignatureProof`](../interfaces/SignatureProof.md) *** ### createWithProgress() > `static` **createWithProgress**(`privateSeed`, `keysPerLevel?`, `onProgress?`): `Promise`\<`TreeKeyNode`\> Async factory method for TreeKeyNode with progress reporting Yields to event loop every few keys to keep UI responsive #### Parameters ##### privateSeed `Bytes` ##### keysPerLevel? `number` ##### onProgress? [`ProgressCallback`](../type-aliases/ProgressCallback.md) #### Returns `Promise`\<`TreeKeyNode`\> --- ## Page: VaultHelper URL: https://docs.totem.ing/api/totemsdk-server/classes/VaultHelper [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / VaultHelper # Class: VaultHelper Vault Helper Creates vault/covenant contracts with safe house enforcement. ## Constructors ### Constructor > **new VaultHelper**(): `VaultHelper` #### Returns `VaultHelper` ## Methods ### buildWithdrawalState() > `static` **buildWithdrawalState**(`amount`, `recipientAddress`): [`StateValue`](../interfaces/StateValue.md)[] Build state for vault withdrawal. #### Parameters ##### amount `string` ##### recipientAddress `string` #### Returns [`StateValue`](../interfaces/StateValue.md)[] *** ### createVault() > `static` **createVault**(`coldKey`, `hotKey`, `cooldownBlocks?`): `object` Create a vault script. #### Parameters ##### coldKey `string` ##### hotKey `string` ##### cooldownBlocks? `bigint` #### Returns `object` ##### safeHouseAddress > **safeHouseAddress**: `string` ##### safeHouseScript > **safeHouseScript**: `string` ##### vaultAddress > **vaultAddress**: `string` ##### vaultScript > **vaultScript**: `string` *** ### generateSafeHouseScript() > `static` **generateSafeHouseScript**(`coldKey`, `hotKey`, `cooldownBlocks?`): `string` Generate safe house script from vault parameters. #### Parameters ##### coldKey `string` ##### hotKey `string` ##### cooldownBlocks? `bigint` #### Returns `string` --- ## Page: WatermarkExhaustedError URL: https://docs.totem.ing/api/totemsdk-server/classes/WatermarkExhaustedError [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / WatermarkExhaustedError # Class: WatermarkExhaustedError ## Extends - `Error` ## Constructors ### Constructor > **new WatermarkExhaustedError**(): `WatermarkExhaustedError` #### Returns `WatermarkExhaustedError` #### Overrides `Error.constructor` ## Properties ### cause? > `optional` **cause?**: `unknown` #### Inherited from `Error.cause` *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: WatermarkStore URL: https://docs.totem.ing/api/totemsdk-server/classes/WatermarkStore [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / WatermarkStore # Class: WatermarkStore ## Constructors ### Constructor > **new WatermarkStore**(`storage`, `logger?`, `config?`): `WatermarkStore` #### Parameters ##### storage [`StorageAdapter`](../interfaces/StorageAdapter.md) ##### logger? [`LoggerAdapter`](../interfaces/LoggerAdapter.md) ##### config? [`WatermarkStoreConfig`](../interfaces/WatermarkStoreConfig.md) #### Returns `WatermarkStore` ## Methods ### advanceWatermark() > **advanceWatermark**(`indices`): `Promise`\<`void`\> #### Parameters ##### indices `WotsIndices` #### Returns `Promise`\<`void`\> *** ### clear() > **clear**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### getCurrent() > **getCurrent**(): [`WatermarkState`](../interfaces/WatermarkState.md) \| `null` #### Returns [`WatermarkState`](../interfaces/WatermarkState.md) \| `null` *** ### getNextIndices() > **getNextIndices**(): `WotsIndices` \| `null` #### Returns `WotsIndices` \| `null` *** ### getUsageStats() > **getUsageStats**(): `object` #### Returns `object` ##### percentage > **percentage**: `number` ##### total > **total**: `number` ##### used > **used**: `number` *** ### hasAvailableIndices() > **hasAvailableIndices**(): `boolean` #### Returns `boolean` *** ### initialize() > **initialize**(): `Promise`\<[`WatermarkState`](../interfaces/WatermarkState.md)\> #### Returns `Promise`\<[`WatermarkState`](../interfaces/WatermarkState.md)\> *** ### isExhausted() > **isExhausted**(): `boolean` #### Returns `boolean` *** ### isInitialized() > **isInitialized**(): `boolean` #### Returns `boolean` *** ### load() > **load**(): `Promise`\<[`WatermarkState`](../interfaces/WatermarkState.md) \| `null`\> #### Returns `Promise`\<[`WatermarkState`](../interfaces/WatermarkState.md) \| `null`\> *** ### markUsed() > **markUsed**(`indices`): `Promise`\<`void`\> #### Parameters ##### indices `WotsIndices` #### Returns `Promise`\<`void`\> *** ### save() > **save**(`watermark`): `Promise`\<`void`\> #### Parameters ##### watermark [`WatermarkState`](../interfaces/WatermarkState.md) #### Returns `Promise`\<`void`\> *** ### updateFromServer() > **updateFromServer**(`serverWatermark`): `Promise`\<[`SyncResult`](../interfaces/SyncResult.md)\> #### Parameters ##### serverWatermark `WotsIndices` #### Returns `Promise`\<[`SyncResult`](../interfaces/SyncResult.md)\> --- ## Page: addressToRoot URL: https://docs.totem.ing/api/totemsdk-server/functions/addressToRoot [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / addressToRoot # Function: addressToRoot() > **addressToRoot**(`mx`): `Uint8Array` ## Parameters ### mx `string` ## Returns `Uint8Array` --- ## Page: aggregateSignatures URL: https://docs.totem.ing/api/totemsdk-server/functions/aggregateSignatures [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / aggregateSignatures # Function: aggregateSignatures() > **aggregateSignatures**(`totemSignature`, `externalSignatures`): `Uint8Array`\<`ArrayBufferLike`\>[] ## Parameters ### totemSignature #### publicKey `Uint8Array` #### signature `Uint8Array` ### externalSignatures [`ExternalSignature`](../interfaces/ExternalSignature.md)[] ## Returns `Uint8Array`\<`ArrayBufferLike`\>[] --- ## Page: assert32 URL: https://docs.totem.ing/api/totemsdk-server/functions/assert32 [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / assert32 # Function: assert32() > **assert32**(`u`, `label?`): `void` ## Parameters ### u `Uint8Array` ### label? `string` ## Returns `void` --- ## Page: baseWWithChecksum URL: https://docs.totem.ing/api/totemsdk-server/functions/baseWWithChecksum [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / baseWWithChecksum # Function: baseWWithChecksum() > **baseWWithChecksum**(`msgHash`, `paramSet?`): `number`[] Decompose digest into base-w digits + checksum Returns flat array of all L digits ## Parameters ### msgHash `Uint8Array` ### paramSet? [`ParamSet`](../type-aliases/ParamSet.md) ## Returns `number`[] --- ## Page: bigIntToByteArray URL: https://docs.totem.ing/api/totemsdk-server/functions/bigIntToByteArray [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / bigIntToByteArray # Function: bigIntToByteArray() > **bigIntToByteArray**(`value`): `Uint8Array` Convert a BigInt to Java BigInteger.toByteArray() format. Java BigInteger uses two's complement: - Zero → [0x00] - Positive with high bit set → leading 0x00 byte ## Parameters ### value `bigint` The BigInt value (must be non-negative) ## Returns `Uint8Array` Uint8Array in two's complement format --- ## Page: buildMinimaCoin URL: https://docs.totem.ing/api/totemsdk-server/functions/buildMinimaCoin [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / buildMinimaCoin # Function: buildMinimaCoin() > **buildMinimaCoin**(`opts`): [`MinimaCoin`](../interfaces/MinimaCoin.md) ## Parameters ### opts #### address `Uint8Array` #### amount `string` #### coinId? `Uint8Array`\<`ArrayBufferLike`\> #### coinProofData? [`CoinProofData`](../interfaces/CoinProofData.md) #### created? `bigint` #### mmrEntryNumber? `bigint` #### rawAmountBytes? `Uint8Array`\<`ArrayBufferLike`\> #### rawBlockCreatedBytes? `Uint8Array`\<`ArrayBufferLike`\> #### rawMmrEntryBytes? `Uint8Array`\<`ArrayBufferLike`\> #### spent? `boolean` #### state? [`StateVariable`](../interfaces/StateVariable.md)[] #### storeState? `boolean` #### tokenId? `Uint8Array`\<`ArrayBufferLike`\> ## Returns [`MinimaCoin`](../interfaces/MinimaCoin.md) --- ## Page: buildScriptProofFromDescriptor URL: https://docs.totem.ing/api/totemsdk-server/functions/buildScriptProofFromDescriptor [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / buildScriptProofFromDescriptor # Function: buildScriptProofFromDescriptor() > **buildScriptProofFromDescriptor**(`descriptor`): [`ScriptProofResult`](../interfaces/ScriptProofResult.md) ## Parameters ### descriptor [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) ## Returns [`ScriptProofResult`](../interfaces/ScriptProofResult.md) --- ## Page: bytesToUtf8 URL: https://docs.totem.ing/api/totemsdk-server/functions/bytesToUtf8 [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / bytesToUtf8 # Function: bytesToUtf8() > **bytesToUtf8**(`bytes`): `string` ## Parameters ### bytes `Uint8Array` ## Returns `string` --- ## Page: calculateProofRoot URL: https://docs.totem.ing/api/totemsdk-server/functions/calculateProofRoot [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / calculateProofRoot # Function: calculateProofRoot() > **calculateProofRoot**(`leafData`, `proof`): `Bytes` Calculate root from leaf data and proof Matches SignatureProof.getRootPublicKey() in Java From SignatureProof.java: MMRData pubentry = MMRData.CreateMMRDataLeafNode(mPublicKey, MiniNumber.ZERO); return mProof.calculateProof(pubentry).getData(); ## Parameters ### leafData [`MMRData`](../interfaces/MMRData.md) ### proof [`MMRProof`](../interfaces/MMRProof.md) ## Returns `Bytes` --- ## Page: canonicalJson URL: https://docs.totem.ing/api/totemsdk-server/functions/canonicalJson [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / canonicalJson # Function: canonicalJson() > **canonicalJson**(`value`): `string` ## Parameters ### value `unknown` ## Returns `string` --- ## Page: cleanSeedPhrase URL: https://docs.totem.ing/api/totemsdk-server/functions/cleanSeedPhrase [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / cleanSeedPhrase # Function: cleanSeedPhrase() > **cleanSeedPhrase**(`seedPhrase`): `string` Clean and normalize a seed phrase matching Minima's BIP39.cleanSeedPhrase() exactly From BIP39.java: - Split by whitespace - For each token: lowercase; length >= 3 required - If token length < 4: must match full word in wordlist - Else: accept FIRST word in wordlist that startsWith(token) - Join with single spaces, trim, then convert to UPPERCASE ## Parameters ### seedPhrase `string` Raw user input (may be abbreviated, mixed case) ## Returns `string` Canonical uppercase phrase with full words from BIP39 list ## Throws Error if any word cannot be matched --- ## Page: computeScriptAddress URL: https://docs.totem.ing/api/totemsdk-server/functions/computeScriptAddress [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / computeScriptAddress # Function: computeScriptAddress() > **computeScriptAddress**(`script`): `string` ## Parameters ### script `string` ## Returns `string` --- ## Page: concat URL: https://docs.totem.ing/api/totemsdk-server/functions/concat [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / concat # Function: concat() > **concat**(...`arrays`): `Uint8Array` ## Parameters ### arrays ...`Uint8Array`\<`ArrayBufferLike`\>[] ## Returns `Uint8Array` --- ## Page: convertFlatChunkToSDK URL: https://docs.totem.ing/api/totemsdk-server/functions/convertFlatChunkToSDK [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / convertFlatChunkToSDK # Function: convertFlatChunkToSDK() > **convertFlatChunkToSDK**(`chunk`): [`MMRProofChunk`](../interfaces/MMRProofChunk.md) ## Parameters ### chunk [`FlatMMRProofChunk`](../interfaces/FlatMMRProofChunk.md) ## Returns [`MMRProofChunk`](../interfaces/MMRProofChunk.md) --- ## Page: convertLegacyProofToSDK URL: https://docs.totem.ing/api/totemsdk-server/functions/convertLegacyProofToSDK [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / convertLegacyProofToSDK # Function: convertLegacyProofToSDK() > **convertLegacyProofToSDK**(`legacy`): `object` ## Parameters ### legacy [`LegacyMMRProof`](../interfaces/LegacyMMRProof.md) ## Returns `object` ### blockTime > **blockTime**: `bigint` ### proof > **proof**: [`MMRProof`](../interfaces/MMRProof.md) --- ## Page: convertStringToSeed URL: https://docs.totem.ing/api/totemsdk-server/functions/convertStringToSeed [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / convertStringToSeed # Function: convertStringToSeed() > **convertStringToSeed**(`phrase`): `Uint8Array` Convert a seed phrase to a 32-byte seed matching Minima's BIP39.convertStringToSeed() IMPORTANT: This is NOT standard BIP39! Minima simply hashes the phrase bytes with SHA3-256. No PBKDF2, no passphrase salt, no "mnemonic" prefix. From BIP39.java convertStringToSeed(): MiniString phrase = new MiniString(zPhrase); return new MiniData(Crypto.getInstance().hashData(phrase.getData())); ## Parameters ### phrase `string` Canonical phrase (should be cleaned first with cleanSeedPhrase) ## Returns `Uint8Array` 32-byte SHA3-256 seed --- ## Page: convertWordListToSeed URL: https://docs.totem.ing/api/totemsdk-server/functions/convertWordListToSeed [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / convertWordListToSeed # Function: convertWordListToSeed() > **convertWordListToSeed**(`words`): `Uint8Array` Convert word array to seed matching Minima's BIP39.convertWordListToSeed() From BIP39.java: String allwords = convertWordListToString(zWords); MiniString ministr = new MiniString(allwords); MiniData hash = new MiniData(Crypto.getInstance().hashData(ministr.getData())); ## Parameters ### words `string`[] Array of BIP39 words ## Returns `Uint8Array` 32-byte SHA3-256 seed --- ## Page: createAdapterRegistry URL: https://docs.totem.ing/api/totemsdk-server/functions/createAdapterRegistry [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / createAdapterRegistry # Function: createAdapterRegistry() > **createAdapterRegistry**(`adapters`): [`AdapterRegistry`](../interfaces/AdapterRegistry.md) ## Parameters ### adapters `Partial`\<[`AdapterRegistry`](../interfaces/AdapterRegistry.md)\> ## Returns [`AdapterRegistry`](../interfaces/AdapterRegistry.md) --- ## Page: createAuthedNodeHttpClient URL: https://docs.totem.ing/api/totemsdk-server/functions/createAuthedNodeHttpClient [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / createAuthedNodeHttpClient # Function: createAuthedNodeHttpClient() > **createAuthedNodeHttpClient**(`getToken`, `options?`): [`HttpClient`](../interfaces/HttpClient.md) ## Parameters ### getToken () => `Promise`\<`string` \| `null`\> ### options? [`NodeHttpClientOptions`](../interfaces/NodeHttpClientOptions.md) = `{}` ## Returns [`HttpClient`](../interfaces/HttpClient.md) --- ## Page: createCancellationToken URL: https://docs.totem.ing/api/totemsdk-server/functions/createCancellationToken [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / createCancellationToken # Function: createCancellationToken() > **createCancellationToken**(): [`CancellationTokenSource`](../interfaces/CancellationTokenSource.md) ## Returns [`CancellationTokenSource`](../interfaces/CancellationTokenSource.md) --- ## Page: createConfigFromEnv URL: https://docs.totem.ing/api/totemsdk-server/functions/createConfigFromEnv [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / createConfigFromEnv # Function: createConfigFromEnv() > **createConfigFromEnv**(`envMapping?`): [`NodeConfigProvider`](../classes/NodeConfigProvider.md) ## Parameters ### envMapping? [`EnvironmentConfigMapping`](../interfaces/EnvironmentConfigMapping.md) ## Returns [`NodeConfigProvider`](../classes/NodeConfigProvider.md) --- ## Page: createDefaultTransaction URL: https://docs.totem.ing/api/totemsdk-server/functions/createDefaultTransaction [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / createDefaultTransaction # Function: createDefaultTransaction() > **createDefaultTransaction**(): [`MinimaTransaction`](../interfaces/MinimaTransaction.md) ## Returns [`MinimaTransaction`](../interfaces/MinimaTransaction.md) --- ## Page: createEmptyMMRProof URL: https://docs.totem.ing/api/totemsdk-server/functions/createEmptyMMRProof [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / createEmptyMMRProof # Function: createEmptyMMRProof() > **createEmptyMMRProof**(): [`MMRProof`](../interfaces/MMRProof.md) ## Returns [`MMRProof`](../interfaces/MMRProof.md) --- ## Page: createExchangeDescriptor URL: https://docs.totem.ing/api/totemsdk-server/functions/createExchangeDescriptor [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / createExchangeDescriptor # Function: createExchangeDescriptor() > **createExchangeDescriptor**(`address`, `ownerPublicKey`, `desiredAddress`, `desiredAmount`, `desiredTokenId`): [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) ## Parameters ### address `string` ### ownerPublicKey `string` ### desiredAddress `string` ### desiredAmount `string` ### desiredTokenId `string` ## Returns [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) --- ## Page: createFlashCashDescriptor URL: https://docs.totem.ing/api/totemsdk-server/functions/createFlashCashDescriptor [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / createFlashCashDescriptor # Function: createFlashCashDescriptor() > **createFlashCashDescriptor**(`address`, `ownerPublicKey`, `interestMultiplier?`): [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) ## Parameters ### address `string` ### ownerPublicKey `string` ### interestMultiplier? `string` ## Returns [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) --- ## Page: createHTLCDescriptor URL: https://docs.totem.ing/api/totemsdk-server/functions/createHTLCDescriptor [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / createHTLCDescriptor # Function: createHTLCDescriptor() > **createHTLCDescriptor**(`address`, `ownerPublicKey`, `recipientPublicKey`, `hashLock`, `timeoutBlock`, `isOwner`, `preimage?`): [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) ## Parameters ### address `string` ### ownerPublicKey `string` ### recipientPublicKey `string` ### hashLock `string` ### timeoutBlock `bigint` ### isOwner `boolean` ### preimage? `string` ## Returns [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) --- ## Page: createMASTDescriptor URL: https://docs.totem.ing/api/totemsdk-server/functions/createMASTDescriptor [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / createMASTDescriptor # Function: createMASTDescriptor() > **createMASTDescriptor**(`address`, `rootHash`, `branchScript`, `branchProof`, `wotsPublicKey?`): [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) ## Parameters ### address `string` ### rootHash `string` ### branchScript `string` ### branchProof `string` ### wotsPublicKey? `string` ## Returns [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) --- ## Page: createMMRDataLeafNode URL: https://docs.totem.ing/api/totemsdk-server/functions/createMMRDataLeafNode [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / createMMRDataLeafNode # Function: createMMRDataLeafNode() > **createMMRDataLeafNode**(`pubkey`, `sumValue?`): [`MMRData`](../interfaces/MMRData.md) Create MMRData leaf node matching Minima's MMRData.CreateMMRDataLeafNode From MMRData.java: MiniData hash = Crypto.getInstance().hashAllObjects(MiniNumber.ZERO, zData, zSumValue); CRITICAL: Crypto.hashAllObjects uses writeDataStream for Streamables: - MiniNumber: scale + len + data (see serializeMiniNumber) - MiniData: 4-byte length + data (see serializeMiniData) For TreeKeyNode, zData is the Winternitz public key (MiniData) and zSumValue is ZERO Serialization order: 1. MiniNumber.ZERO: [0x00, 0x01, 0x00] 2. MiniData (pubkey): [4-byte length] + [bytes] (writeDataStream, NOT writeHashToStream) 3. MiniNumber.ZERO: [0x00, 0x01, 0x00] ## Parameters ### pubkey `Bytes` ### sumValue? `bigint` ## Returns [`MMRData`](../interfaces/MMRData.md) --- ## Page: createMMRDataParentNode URL: https://docs.totem.ing/api/totemsdk-server/functions/createMMRDataParentNode [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / createMMRDataParentNode # Function: createMMRDataParentNode() > **createMMRDataParentNode**(`left`, `right`): [`MMRData`](../interfaces/MMRData.md) Create MMRData parent node matching Minima's MMRData.CreateMMRDataParentNode From MMRData.java: MiniNumber sumvalue = zLeft.getValue().add(zRight.getValue()); MiniData combinedhash = Crypto.getInstance().hashAllObjects( MiniNumber.ONE, zLeft.getData(), zRight.getData(), sumvalue); CRITICAL: The getData() returns MiniData (the hash), which is serialized with writeDataStream (4-byte length) in hashAllObjects. Serialization order: 1. MiniNumber.ONE: [0x00, 0x01, 0x01] 2. MiniData (left.data): [4-byte length] + [bytes] 3. MiniData (right.data): [4-byte length] + [bytes] 4. MiniNumber (sumvalue): serialized MiniNumber ## Parameters ### left [`MMRData`](../interfaces/MMRData.md) ### right [`MMRData`](../interfaces/MMRData.md) ## Returns [`MMRData`](../interfaces/MMRData.md) --- ## Page: createMMREntryNumber URL: https://docs.totem.ing/api/totemsdk-server/functions/createMMREntryNumber [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / createMMREntryNumber # Function: createMMREntryNumber() > **createMMREntryNumber**(`value`): [`JavaMMREntryNumber`](../interfaces/JavaMMREntryNumber.md) Create MMREntryNumber from bigint (common case for integer positions) ## Parameters ### value `bigint` ## Returns [`JavaMMREntryNumber`](../interfaces/JavaMMREntryNumber.md) --- ## Page: createMofNMultisigDescriptor URL: https://docs.totem.ing/api/totemsdk-server/functions/createMofNMultisigDescriptor [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / createMofNMultisigDescriptor # Function: createMofNMultisigDescriptor() > **createMofNMultisigDescriptor**(`address`, `threshold`, `publicKeys`, `ownPublicKey`): [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) ## Parameters ### address `string` ### threshold `number` ### publicKeys `string`[] ### ownPublicKey `string` ## Returns [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) --- ## Page: createMultisigDescriptor URL: https://docs.totem.ing/api/totemsdk-server/functions/createMultisigDescriptor [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / createMultisigDescriptor # Function: createMultisigDescriptor() > **createMultisigDescriptor**(`address`, `publicKey1`, `publicKey2`, `ownPublicKey`): [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) ## Parameters ### address `string` ### publicKey1 `string` ### publicKey2 `string` ### ownPublicKey `string` ## Returns [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) --- ## Page: createNodeAdapters URL: https://docs.totem.ing/api/totemsdk-server/functions/createNodeAdapters [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / createNodeAdapters # Function: createNodeAdapters() > **createNodeAdapters**(`options`): [`AdapterRegistry`](../interfaces/AdapterRegistry.md) ## Parameters ### options [`CreateNodeAdaptersOptions`](../interfaces/CreateNodeAdaptersOptions.md) ## Returns [`AdapterRegistry`](../interfaces/AdapterRegistry.md) --- ## Page: createPerAddressTreeKey URL: https://docs.totem.ing/api/totemsdk-server/functions/createPerAddressTreeKey [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / createPerAddressTreeKey # ~~Function: createPerAddressTreeKey()~~ > **createPerAddressTreeKey**(`baseSeed`, `addressIndex`): [`TreeKey`](../classes/TreeKey.md) ## Parameters ### baseSeed `Bytes` ### addressIndex `number` ## Returns [`TreeKey`](../classes/TreeKey.md) ## Deprecated Use [createUnifiedChildTreeKey](createUnifiedChildTreeKey.md) instead. This wrapper preserves the LEGACY per-address seed derivation (`SHA3-256(baseSeed ‖ indexBytes(i))`) so that existing callers that import this symbol by name continue to derive the same keys. New code must use createUnifiedChildTreeKey which applies the unified two-step derivation (root_priv_seed → child_seed_i). --- ## Page: createPerAddressTreeKeyAsync URL: https://docs.totem.ing/api/totemsdk-server/functions/createPerAddressTreeKeyAsync [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / createPerAddressTreeKeyAsync # ~~Function: createPerAddressTreeKeyAsync()~~ > **createPerAddressTreeKeyAsync**(`baseSeed`, `addressIndex`, `onProgress?`): `Promise`\<[`TreeKey`](../classes/TreeKey.md)\> ## Parameters ### baseSeed `Bytes` ### addressIndex `number` ### onProgress? [`ProgressCallback`](../type-aliases/ProgressCallback.md) ## Returns `Promise`\<[`TreeKey`](../classes/TreeKey.md)\> ## Deprecated Use [createUnifiedChildTreeKeyAsync](createUnifiedChildTreeKeyAsync.md) instead. Preserves legacy per-address seed derivation for backward compatibility. --- ## Page: createServerAdapters URL: https://docs.totem.ing/api/totemsdk-server/functions/createServerAdapters [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / createServerAdapters # Function: createServerAdapters() > **createServerAdapters**(`options`): [`AdapterRegistry`](../interfaces/AdapterRegistry.md) ## Parameters ### options [`CreateServerAdaptersOptions`](../interfaces/CreateServerAdaptersOptions.md) ## Returns [`AdapterRegistry`](../interfaces/AdapterRegistry.md) --- ## Page: createSignedByDescriptor URL: https://docs.totem.ing/api/totemsdk-server/functions/createSignedByDescriptor [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / createSignedByDescriptor # Function: createSignedByDescriptor() > **createSignedByDescriptor**(`address`, `wotsRootPublicKey`): [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) ## Parameters ### address `string` ### wotsRootPublicKey `string` ## Returns [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) --- ## Page: createSlowCashDescriptor URL: https://docs.totem.ing/api/totemsdk-server/functions/createSlowCashDescriptor [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / createSlowCashDescriptor # Function: createSlowCashDescriptor() > **createSlowCashDescriptor**(`address`, `ownerPublicKey`, `withdrawalPercent?`, `cooldownBlocks?`): [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) ## Parameters ### address `string` ### ownerPublicKey `string` ### withdrawalPercent? `string` ### cooldownBlocks? `bigint` ## Returns [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) --- ## Page: createTimelockDescriptor URL: https://docs.totem.ing/api/totemsdk-server/functions/createTimelockDescriptor [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / createTimelockDescriptor # Function: createTimelockDescriptor() > **createTimelockDescriptor**(`address`, `publicKey`, `unlockBlock`): [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) ## Parameters ### address `string` ### publicKey `string` ### unlockBlock `bigint` ## Returns [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md) --- ## Page: createUnifiedChildTreeKey URL: https://docs.totem.ing/api/totemsdk-server/functions/createUnifiedChildTreeKey [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / createUnifiedChildTreeKey # Function: createUnifiedChildTreeKey() > **createUnifiedChildTreeKey**(`baseSeed`, `index`): [`TreeKey`](../classes/TreeKey.md) Create the unified child TreeKey for spend address at `index`. Derivation: child_seed_i = deriveUnifiedChildSeed(baseSeed, i) treeKey = new TreeKey(child_seed_i, 64, 3) ## Parameters ### baseSeed `Bytes` 32-byte wallet base seed (from mnemonic) ### index `number` Address index (0-63) ## Returns [`TreeKey`](../classes/TreeKey.md) TreeKey for this spend address with size=64, depth=3 --- ## Page: createUnifiedChildTreeKeyAsync URL: https://docs.totem.ing/api/totemsdk-server/functions/createUnifiedChildTreeKeyAsync [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / createUnifiedChildTreeKeyAsync # Function: createUnifiedChildTreeKeyAsync() > **createUnifiedChildTreeKeyAsync**(`baseSeed`, `index`, `onProgress?`): `Promise`\<[`TreeKey`](../classes/TreeKey.md)\> Async version with progress reporting for UI. ## Parameters ### baseSeed `Bytes` 32-byte wallet base seed ### index `number` Address index (0-63) ### onProgress? [`ProgressCallback`](../type-aliases/ProgressCallback.md) Optional progress callback ## Returns `Promise`\<[`TreeKey`](../classes/TreeKey.md)\> Promise resolving to the child TreeKey --- ## Page: createUnifiedRootTreeKey URL: https://docs.totem.ing/api/totemsdk-server/functions/createUnifiedRootTreeKey [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / createUnifiedRootTreeKey # Function: createUnifiedRootTreeKey() > **createUnifiedRootTreeKey**(`baseSeed`): [`TreeKey`](../classes/TreeKey.md) Create the unified root identity TreeKey (identity anchor, never a spend address). Derivation: root_priv_seed = deriveRootPrivSeed(baseSeed) treeKey = new TreeKey(root_priv_seed, 64, 3) ## Parameters ### baseSeed `Bytes` 32-byte wallet base seed (from mnemonic) ## Returns [`TreeKey`](../classes/TreeKey.md) Root identity TreeKey with size=64, depth=3 --- ## Page: deduplicateScriptDescriptors URL: https://docs.totem.ing/api/totemsdk-server/functions/deduplicateScriptDescriptors [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / deduplicateScriptDescriptors # Function: deduplicateScriptDescriptors() > **deduplicateScriptDescriptors**(`descriptors`): `Map`\<`string`, [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md)\> ## Parameters ### descriptors [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md)[] ## Returns `Map`\<`string`, [`ScriptDescriptor`](../interfaces/ScriptDescriptor.md)\> --- ## Page: deriveAddressFromPublicKey URL: https://docs.totem.ing/api/totemsdk-server/functions/deriveAddressFromPublicKey [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / deriveAddressFromPublicKey # Function: deriveAddressFromPublicKey() > **deriveAddressFromPublicKey**(`publicKeyHex`): `string` ## Parameters ### publicKeyHex `string` ## Returns `string` --- ## Page: deriveChildTreeSeedJava URL: https://docs.totem.ing/api/totemsdk-server/functions/deriveChildTreeSeedJava [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / deriveChildTreeSeedJava # Function: deriveChildTreeSeedJava() > **deriveChildTreeSeedJava**(`childSeed`, `childIndex`): `Uint8Array` Derive child tree seed matching Java TreeKeyNode.java exactly From TreeKeyNode.java getChild (line 68): MiniData seed = Crypto.getInstance().hashAllObjects(new MiniNumber(zChild), mChildSeed); The child seed is derived from parent's private seed: mChildSeed = Crypto.getInstance().hashObject(zPrivateSeed); // line 30 ## Parameters ### childSeed `Uint8Array` 32-byte child seed (hash of parent's private seed) ### childIndex `number` Child index (0-63) ## Returns `Uint8Array` 32-byte derived seed for child tree --- ## Page: deriveUnifiedAddressPublicKey URL: https://docs.totem.ing/api/totemsdk-server/functions/deriveUnifiedAddressPublicKey [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / deriveUnifiedAddressPublicKey # Function: deriveUnifiedAddressPublicKey() > **deriveUnifiedAddressPublicKey**(`baseSeed`, `index`): `Bytes` Fast path for deriving a child address public key without constructing the full TreeKey. Useful during wallet initialisation. ## Parameters ### baseSeed `Bytes` 32-byte wallet base seed ### index `number` Address index (0-63) ## Returns `Bytes` 32-byte address public key (MMR root of child TreeKey) --- ## Page: deriveUnifiedChildSeed URL: https://docs.totem.ing/api/totemsdk-server/functions/deriveUnifiedChildSeed [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / deriveUnifiedChildSeed # Function: deriveUnifiedChildSeed() > **deriveUnifiedChildSeed**(`baseSeed`, `index`): `Uint8Array` Derive a unified child seed for the address at `index`. Architecture: child_seed_i = SHA3-256( serializeMiniData(root_priv_seed) ‖ serializeMiniData(indexBytes(i)) ) ## Parameters ### baseSeed `Uint8Array` 32-byte wallet base seed (from mnemonic) ### index `number` Address index (0-63) ## Returns `Uint8Array` 32-byte child seed for the TreeKey at this address --- ## Page: deserializeTreeSignature URL: https://docs.totem.ing/api/totemsdk-server/functions/deserializeTreeSignature [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / deserializeTreeSignature # Function: deserializeTreeSignature() > **deserializeTreeSignature**(`data`): [`TreeSignature`](../interfaces/TreeSignature.md) Deserialize a TreeSignature from bytes Matches Java's Signature.readDataStream(): - Number of proofs: MiniNumber format - Each SignatureProof: MiniData(pubkey) + MiniData(signature) + MMRProof ## Parameters ### data `Bytes` ## Returns [`TreeSignature`](../interfaces/TreeSignature.md) --- ## Page: encodeMiniData URL: https://docs.totem.ing/api/totemsdk-server/functions/encodeMiniData [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / encodeMiniData # Function: encodeMiniData() > **encodeMiniData**(`data`): `Uint8Array` ## Parameters ### data `Uint8Array` ## Returns `Uint8Array` --- ## Page: encodeMiniNumber URL: https://docs.totem.ing/api/totemsdk-server/functions/encodeMiniNumber [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / encodeMiniNumber # Function: encodeMiniNumber() > **encodeMiniNumber**(`value`, `scale?`): `Uint8Array` ## Parameters ### value `bigint` ### scale? `number` ## Returns `Uint8Array` --- ## Page: encodeMiniString URL: https://docs.totem.ing/api/totemsdk-server/functions/encodeMiniString [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / encodeMiniString # Function: encodeMiniString() > **encodeMiniString**(`str`): `Uint8Array` ## Parameters ### str `string` ## Returns `Uint8Array` --- ## Page: encodeStateValue URL: https://docs.totem.ing/api/totemsdk-server/functions/encodeStateValue [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / encodeStateValue # Function: encodeStateValue() > **encodeStateValue**(`stateValue`): `Uint8Array` ## Parameters ### stateValue [`StateValue`](../interfaces/StateValue.md) ## Returns `Uint8Array` --- ## Page: finalizeLease URL: https://docs.totem.ing/api/totemsdk-server/functions/finalizeLease [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / finalizeLease # Function: finalizeLease() > **finalizeLease**(`apiUrl`, `apiKey`, `leaseToken`, `signedHex`): `Promise`\<\{ `body`: `string`; `status`: `number`; \}\> ## Parameters ### apiUrl `string` ### apiKey `string` ### leaseToken `string` ### signedHex `string` ## Returns `Promise`\<\{ `body`: `string`; `status`: `number`; \}\> --- ## Page: flatIndexFromLanes URL: https://docs.totem.ing/api/totemsdk-server/functions/flatIndexFromLanes [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / flatIndexFromLanes # Function: flatIndexFromLanes() > **flatIndexFromLanes**(`addressIndex`, `l1`, `l2`): `number` lane tuple -> flat WOTS index (64^3 space) ## Parameters ### addressIndex `number` ### l1 `number` ### l2 `number` ## Returns `number` --- ## Page: generateSeedPhrase URL: https://docs.totem.ing/api/totemsdk-server/functions/generateSeedPhrase [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / generateSeedPhrase # Function: generateSeedPhrase() > **generateSeedPhrase**(): `string` Generate a new random seed phrase as a string ## Returns `string` 24-word phrase in UPPERCASE (canonical form) --- ## Page: generateWordList URL: https://docs.totem.ing/api/totemsdk-server/functions/generateWordList [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / generateWordList # Function: generateWordList() > **generateWordList**(): `string`[] Generate a new random 24-word seed phrase Uses crypto.getRandomValues for secure randomness ## Returns `string`[] Array of 24 random BIP39 words (lowercase) --- ## Page: getParamSet URL: https://docs.totem.ing/api/totemsdk-server/functions/getParamSet [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / getParamSet # Function: getParamSet() > **getParamSet**(`_env?`): [`ParamSet`](../type-aliases/ParamSet.md) ## Parameters ### \_env? `string` ## Returns [`ParamSet`](../type-aliases/ParamSet.md) --- ## Page: getRootPublicKey URL: https://docs.totem.ing/api/totemsdk-server/functions/getRootPublicKey [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / getRootPublicKey # Function: getRootPublicKey() > **getRootPublicKey**(`proof`): `Bytes` Compute root public key from a Winternitz signature proof Matches SignatureProof.getRootPublicKey() in Java ## Parameters ### proof [`SignatureProof`](../interfaces/SignatureProof.md) ## Returns `Bytes` --- ## Page: hashAllObjects URL: https://docs.totem.ing/api/totemsdk-server/functions/hashAllObjects [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / hashAllObjects # Function: hashAllObjects() > **hashAllObjects**(...`items`): `Uint8Array` Hash multiple Streamable objects (Java compatible) From Crypto.java hashAllObjects: 1. Write each object to DataOutputStream 2. SHA3-256 hash the combined bytes This matches TreeKeyNode.java seed derivation: Crypto.getInstance().hashAllObjects(new MiniNumber(i), zPrivateSeed) ## Parameters ### items ...`Uint8Array`\<`ArrayBufferLike`\>[] Array of serialized objects (use serializeMiniNumber/serializeMiniData) ## Returns `Uint8Array` 32-byte SHA3-256 hash --- ## Page: hashCanonical URL: https://docs.totem.ing/api/totemsdk-server/functions/hashCanonical [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / hashCanonical # Function: hashCanonical() > **hashCanonical**(`domain`, `value`): `string` ## Parameters ### domain `string` ### value `unknown` ## Returns `string` --- ## Page: hashObject URL: https://docs.totem.ing/api/totemsdk-server/functions/hashObject [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / hashObject # Function: hashObject() > **hashObject**(`data`): `Uint8Array` Hash a single object matching Java's Crypto.hashObject() From TreeKeyNode.java line 30: mChildSeed = Crypto.getInstance().hashObject(zPrivateSeed); This serializes the object as MiniData (length-prefixed) and hashes it. ## Parameters ### data `Uint8Array` Raw bytes (will be serialized as MiniData) ## Returns `Uint8Array` 32-byte SHA3-256 hash --- ## Page: indexToMiniDataBytes URL: https://docs.totem.ing/api/totemsdk-server/functions/indexToMiniDataBytes [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / indexToMiniDataBytes # Function: indexToMiniDataBytes() > **indexToMiniDataBytes**(`index`): `Uint8Array` Convert index to MiniData bytes matching Java's: new MiniData(new BigInteger(Integer.toString(index))) BigInteger uses minimum byte representation (no leading zeros). This is used for per-address key derivation in Wallet.java. ## Parameters ### index `number` Non-negative integer (0, 1, 2, ...) ## Returns `Uint8Array` Minimal byte representation of the index --- ## Page: javaHashAllObjects URL: https://docs.totem.ing/api/totemsdk-server/functions/javaHashAllObjects [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / javaHashAllObjects # Function: javaHashAllObjects() > **javaHashAllObjects**(...`items`): `Uint8Array` Java hashAllObjects for MMRData hashing Used for MMRData.CreateMMRDataLeafNode and CreateMMRDataParentNode From Crypto.java hashAllObjects: Serializes each Streamable object and hashes the concatenation. For MMRData, the serialization is: - MiniNumber: [scale][len][data] (see serializeMiniNumber) - MiniData: [4-byte len][data] for writeDataStream - Hash: [4-byte len][data] for writeHashToStream (same as MiniData) CRITICAL: Java writeHashToStream uses writeInt (4-byte prefix), identical to writeDataStream. See MiniData.java lines 282-289. ## Parameters ### items ...`Uint8Array`\<`ArrayBufferLike`\>[] Pre-serialized items to concatenate and hash ## Returns `Uint8Array` 32-byte SHA3-256 hash --- ## Page: mmrLeafExact URL: https://docs.totem.ing/api/totemsdk-server/functions/mmrLeafExact [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / mmrLeafExact # Function: mmrLeafExact() > **mmrLeafExact**(`script`): `Bytes` Byte-exact one-leaf MMR leaf used by Minima Address.java path: sha3( MiniNumber.ZERO || MiniString(script) || MiniNumber.ZERO ) ## Parameters ### script `string` ## Returns `Bytes` --- ## Page: mmrRootFromSingleLeaf URL: https://docs.totem.ing/api/totemsdk-server/functions/mmrRootFromSingleLeaf [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / mmrRootFromSingleLeaf # Function: mmrRootFromSingleLeaf() > **mmrRootFromSingleLeaf**(`script`): `Bytes` In a single-leaf MMR the root equals the leaf commitment. ## Parameters ### script `string` ## Returns `Bytes` --- ## Page: mxToHex URL: https://docs.totem.ing/api/totemsdk-server/functions/mxToHex [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / mxToHex # Function: mxToHex() > **mxToHex**(`address`): `string` Convert an Mx (radix-32) or hex Minima address to lowercase hex. ## Parameters ### address `string` ## Returns `string` --- ## Page: normalizeHex URL: https://docs.totem.ing/api/totemsdk-server/functions/normalizeHex [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / normalizeHex # Function: normalizeHex() > **normalizeHex**(`hex`): `string` ## Parameters ### hex `string` ## Returns `string` --- ## Page: parseDecimalToMiniNumber URL: https://docs.totem.ing/api/totemsdk-server/functions/parseDecimalToMiniNumber [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / parseDecimalToMiniNumber # Function: parseDecimalToMiniNumber() > **parseDecimalToMiniNumber**(`decimal`): [`ParsedMiniNumber`](../interfaces/ParsedMiniNumber.md) ## Parameters ### decimal `string` ## Returns [`ParsedMiniNumber`](../interfaces/ParsedMiniNumber.md) --- ## Page: parseMMRProofFromHex URL: https://docs.totem.ing/api/totemsdk-server/functions/parseMMRProofFromHex [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / parseMMRProofFromHex # Function: parseMMRProofFromHex() > **parseMMRProofFromHex**(`data`): `object` Deserialize MMRProof from bytes matching Minima's MMRProof.readDataStream() Format: 1. blockTime (MiniNumber) 2. chain length (MiniNumber) 3. Each chunk: isLeft (1 byte) + MMRData (hash with 4-byte length prefix + value MiniNumber) CRITICAL: Java MMRData.readDataStream uses mData.readHashFromStream() which reads a 4-byte big-endian length prefix followed by the hash bytes. ## Parameters ### data `Bytes` ## Returns `object` ### blockTime > **blockTime**: `bigint` ### bytesRead > **bytesRead**: `number` ### proof > **proof**: [`MMRProof`](../interfaces/MMRProof.md) --- ## Page: phraseToSeed URL: https://docs.totem.ing/api/totemsdk-server/functions/phraseToSeed [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / phraseToSeed # Function: phraseToSeed() > **phraseToSeed**(`rawPhrase`): `Uint8Array` Full pipeline: raw user input → 32-byte seed 1. cleanSeedPhrase() - normalize with prefix matching, output uppercase 2. convertStringToSeed() - SHA3-256 hash of phrase bytes ## Parameters ### rawPhrase `string` User's input (may be abbreviated, mixed case) ## Returns `Uint8Array` 32-byte seed for TreeKey ## Throws Error if phrase contains invalid words --- ## Page: prepareLease URL: https://docs.totem.ing/api/totemsdk-server/functions/prepareLease [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / prepareLease # Function: prepareLease() > **prepareLease**(`apiUrl`, `apiKey`, `args`): `Promise`\<[`PrepareResp`](../type-aliases/PrepareResp.md)\> ## Parameters ### apiUrl `string` ### apiKey `string` ### args [`PrepareArgs`](../type-aliases/PrepareArgs.md) ## Returns `Promise`\<[`PrepareResp`](../type-aliases/PrepareResp.md)\> --- ## Page: prfChainSeed URL: https://docs.totem.ing/api/totemsdk-server/functions/prfChainSeed [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / prfChainSeed # ~~Function: prfChainSeed()~~ > **prfChainSeed**(`seed`, `i`, `j`, `_paramSet`): `Uint8Array` ## Parameters ### seed `Uint8Array` ### i `number` ### j `number` ### \_paramSet [`ParamSet`](../type-aliases/ParamSet.md) ## Returns `Uint8Array` ## Deprecated Use expandPrivateKey instead --- ## Page: scriptFromWotsPk URL: https://docs.totem.ing/api/totemsdk-server/functions/scriptFromWotsPk [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / scriptFromWotsPk # Function: scriptFromWotsPk() > **scriptFromWotsPk**(`pkDigest32`): `string` Produce KISSVM script that authorizes with a WOTS PK digest (32 bytes). ## Parameters ### pkDigest32 `Uint8Array` ## Returns `string` --- ## Page: scriptToAddress URL: https://docs.totem.ing/api/totemsdk-server/functions/scriptToAddress [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / scriptToAddress # Function: scriptToAddress() > **scriptToAddress**(`script`): `string` ## Parameters ### script `string` ## Returns `string` --- ## Page: sendTransaction URL: https://docs.totem.ing/api/totemsdk-server/functions/sendTransaction [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / sendTransaction # Function: sendTransaction() > **sendTransaction**(`params`): `Promise`\<[`SendResult`](../interfaces/SendResult.md)\> Send a Minima transaction end-to-end. Fetches spendable coins for the sender address, builds and signs a transaction using a per-address WOTS TreeKey, mines TxPoW in a `worker_threads` Worker (non-blocking), then submits the mined TxPoW to Axia for broadcast on the Minima network. The difficulty target is cached per `axiaBaseUrl` for 60 seconds to avoid redundant network round-trips in high-throughput scenarios. ## Parameters ### params [`SendParams`](../interfaces/SendParams.md) ## Returns `Promise`\<[`SendResult`](../interfaces/SendResult.md)\> ## Example ```ts import { sendTransaction } from '@totemsdk/node'; const result = await sendTransaction({ seed: 'word1 word2 ... word24', addressIndex: 0, toAddress: 'MxABC...', amount: '10', axiaBaseUrl: 'https://api.axia.to', apiKey: 'ak_live_...', signingIndices: { l1: 0, l2: 0 }, }); console.log('TxPoW ID:', result.txpowId); console.log(`Mined in ${result.elapsedMs}ms via ${result.miningSource}`); ``` ## Throws If there are insufficient coins, signing fails, mining is aborted, or the Axia API returns an error. --- ## Page: serializeCoin URL: https://docs.totem.ing/api/totemsdk-server/functions/serializeCoin [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / serializeCoin # Function: serializeCoin() > **serializeCoin**(`coin`): `Uint8Array` ## Parameters ### coin [`MinimaCoin`](../interfaces/MinimaCoin.md) ## Returns `Uint8Array` --- ## Page: serializeExtraScripts URL: https://docs.totem.ing/api/totemsdk-server/functions/serializeExtraScripts [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / serializeExtraScripts # Function: serializeExtraScripts() > **serializeExtraScripts**(`extraScripts`): `Uint8Array` ## Parameters ### extraScripts `Map`\<`string`, `string`\> ## Returns `Uint8Array` --- ## Page: serializeMMRData URL: https://docs.totem.ing/api/totemsdk-server/functions/serializeMMRData [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / serializeMMRData # Function: serializeMMRData() > **serializeMMRData**(`mmrData`): `Uint8Array` Serialize MMRData matching Java MMRData.writeDataStream() From MMRData.java: mData.writeHashToStream(zOut); // 4-byte length prefix + hash bytes mValue.writeDataStream(zOut); // MiniNumber format ## Parameters ### mmrData [`JavaMMRData`](../interfaces/JavaMMRData.md) MMRData to serialize ## Returns `Uint8Array` Serialized bytes: writeHashToStream(hash) + MiniNumber(value) --- ## Page: serializeMMREntry URL: https://docs.totem.ing/api/totemsdk-server/functions/serializeMMREntry [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / serializeMMREntry # Function: serializeMMREntry() > **serializeMMREntry**(`entry`): `Uint8Array` Serialize MMREntry matching Java MMREntry.writeDataStream() From MMREntry.java: MiniNumber row = new MiniNumber(mRow); row.writeDataStream(zOut); mEntryNumber.writeDataStream(zOut); mMMRData.writeDataStream(zOut); ## Parameters ### entry [`JavaMMREntry`](../interfaces/JavaMMREntry.md) MMREntry to serialize ## Returns `Uint8Array` Serialized bytes: MiniNumber(row) + MMREntryNumber + MMRData --- ## Page: serializeMMREntryNumber URL: https://docs.totem.ing/api/totemsdk-server/functions/serializeMMREntryNumber [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / serializeMMREntryNumber # Function: serializeMMREntryNumber() > **serializeMMREntryNumber**(`entry`): `Uint8Array` Serialize MMREntryNumber matching Java MMREntryNumber.writeDataStream() From MMREntryNumber.java: MiniNumber.WriteToStream(zOut, mNumber.scale()); MiniData.WriteToStream(zOut, mNumber.unscaledValue().toByteArray()); ## Parameters ### entry [`JavaMMREntryNumber`](../interfaces/JavaMMREntryNumber.md) MMREntryNumber to serialize ## Returns `Uint8Array` Serialized bytes: MiniNumber(scale) + MiniData(unscaled bytes) --- ## Page: serializeMMRProof URL: https://docs.totem.ing/api/totemsdk-server/functions/serializeMMRProof [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / serializeMMRProof # Function: serializeMMRProof() > **serializeMMRProof**(`proof`, `blockTime?`): `Bytes` ## Parameters ### proof #### chunks `object`[] ### blockTime? `bigint` ## Returns `Bytes` --- ## Page: serializeMMRProofChunk URL: https://docs.totem.ing/api/totemsdk-server/functions/serializeMMRProofChunk [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / serializeMMRProofChunk # Function: serializeMMRProofChunk() > **serializeMMRProofChunk**(`chunk`): `Uint8Array` ## Parameters ### chunk [`MMRProofChunk`](../interfaces/MMRProofChunk.md) ## Returns `Uint8Array` --- ## Page: serializeMiniData URL: https://docs.totem.ing/api/totemsdk-server/functions/serializeMiniData [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / serializeMiniData # Function: serializeMiniData() > **serializeMiniData**(`data`): `Uint8Array` Serialize bytes in MiniData format (Java compatible) Re-export of Streamable.writeMiniData for backward compatibility. ## Parameters ### data `Uint8Array` Bytes to serialize ## Returns `Uint8Array` Serialized bytes matching Java MiniData format --- ## Page: serializeMiniNumber URL: https://docs.totem.ing/api/totemsdk-server/functions/serializeMiniNumber [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / serializeMiniNumber # Function: serializeMiniNumber() > **serializeMiniNumber**(`n`): `Uint8Array` Serialize a number in MiniNumber format (Java compatible) Thin wrapper over Streamable.writeMiniNumber that accepts number for backward compatibility. ## Parameters ### n `number` Non-negative integer to serialize ## Returns `Uint8Array` Serialized bytes matching Java MiniNumber format --- ## Page: serializeMiniNumberONE URL: https://docs.totem.ing/api/totemsdk-server/functions/serializeMiniNumberONE [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / serializeMiniNumberONE # Function: serializeMiniNumberONE() > **serializeMiniNumberONE**(): `Uint8Array` Serialize MiniNumber.ONE Returns: [0x00, 0x01, 0x01] = scale(0) + length(1) + value(1) ## Returns `Uint8Array` --- ## Page: serializeMiniNumberZERO URL: https://docs.totem.ing/api/totemsdk-server/functions/serializeMiniNumberZERO [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / serializeMiniNumberZERO # Function: serializeMiniNumberZERO() > **serializeMiniNumberZERO**(): `Uint8Array` Serialize MiniNumber.ZERO - cached for performance Returns: [0x00, 0x01, 0x00] = scale(0) + length(1) + value(0) ## Returns `Uint8Array` --- ## Page: serializeScriptProofWithProof URL: https://docs.totem.ing/api/totemsdk-server/functions/serializeScriptProofWithProof [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / serializeScriptProofWithProof # Function: serializeScriptProofWithProof() > **serializeScriptProofWithProof**(`script`, `proof`, `blockTime?`): `Uint8Array` ## Parameters ### script `string` ### proof [`MMRProof`](../interfaces/MMRProof.md) ### blockTime? `bigint` ## Returns `Uint8Array` --- ## Page: serializeStateVariables URL: https://docs.totem.ing/api/totemsdk-server/functions/serializeStateVariables [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / serializeStateVariables # Function: serializeStateVariables() > **serializeStateVariables**(`stateValues`): `Uint8Array` ## Parameters ### stateValues [`StateValue`](../interfaces/StateValue.md)[] ## Returns `Uint8Array` --- ## Page: serializeTreeSignature URL: https://docs.totem.ing/api/totemsdk-server/functions/serializeTreeSignature [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / serializeTreeSignature # Function: serializeTreeSignature() > **serializeTreeSignature**(`sig`): `Bytes` Serialize a TreeSignature to bytes Uses Streamable.writeSignature() for byte-exact compatibility with Java's Signature.writeDataStream(). ## Parameters ### sig [`TreeSignature`](../interfaces/TreeSignature.md) ## Returns `Bytes` --- ## Page: simpleTotemSendRequest URL: https://docs.totem.ing/api/totemsdk-server/functions/simpleTotemSendRequest [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / simpleTotemSendRequest # Function: simpleTotemSendRequest() > **simpleTotemSendRequest**(`to`, `amount`, `tokenId?`): [`TotemSendTransactionRequest`](../interfaces/TotemSendTransactionRequest.md) ## Parameters ### to `string` ### amount `string` ### tokenId? `string` ## Returns [`TotemSendTransactionRequest`](../interfaces/TotemSendTransactionRequest.md) --- ## Page: toHex URL: https://docs.totem.ing/api/totemsdk-server/functions/toHex [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / toHex # Function: toHex() > **toHex**(`bytes`): `string` ## Parameters ### bytes `Uint8Array` ## Returns `string` --- ## Page: toWinternitzDigits URL: https://docs.totem.ing/api/totemsdk-server/functions/toWinternitzDigits [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / toWinternitzDigits # Function: toWinternitzDigits() > **toWinternitzDigits**(`hash32`, `ps?`): `object` Convert message hash to Winternitz digits with checksum For w=8 (8 bits per digit), since 8 % 8 == 0: - Each byte of the hash IS one digit (0-255) - messagesize = 32 digits - checksum = (messagesize << w) - sum = 8192 - sum - checksumsize = 14 bits, extracted as 2 digits Matches WinternitzOTSignature.getSignature() for w=8 case ## Parameters ### hash32 `Uint8Array` ### ps? [`ParamSet`](../type-aliases/ParamSet.md) ## Returns `object` ### checksumDigits > **checksumDigits**: `number`[] ### digits > **digits**: `number`[] ### total > **total**: `number` --- ## Page: utf8ToBytes URL: https://docs.totem.ing/api/totemsdk-server/functions/utf8ToBytes [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / utf8ToBytes # Function: utf8ToBytes() > **utf8ToBytes**(`str`): `Uint8Array` ## Parameters ### str `string` ## Returns `Uint8Array` --- ## Page: validateExternalSignature URL: https://docs.totem.ing/api/totemsdk-server/functions/validateExternalSignature [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / validateExternalSignature # Function: validateExternalSignature() > **validateExternalSignature**(`signature`, `transactionDigest`): `boolean` ## Parameters ### signature [`ExternalSignature`](../interfaces/ExternalSignature.md) ### transactionDigest `Uint8Array` ## Returns `boolean` --- ## Page: validatePhrase URL: https://docs.totem.ing/api/totemsdk-server/functions/validatePhrase [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / validatePhrase # Function: validatePhrase() > **validatePhrase**(`phrase`): `boolean` Validate that a phrase contains valid BIP39 words Does NOT check checksum (Minima doesn't use checksums) ## Parameters ### phrase `string` Space-separated words (any case) ## Returns `boolean` true if all words are valid BIP39 words --- ## Page: validateSendTransactionRequest URL: https://docs.totem.ing/api/totemsdk-server/functions/validateSendTransactionRequest [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / validateSendTransactionRequest # Function: validateSendTransactionRequest() > **validateSendTransactionRequest**(`request`): `object` ## Parameters ### request `unknown` ## Returns `object` ### errors > **errors**: `string`[] ### valid > **valid**: `boolean` --- ## Page: verifySignature URL: https://docs.totem.ing/api/totemsdk-server/functions/verifySignature [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / verifySignature # Function: verifySignature() > **verifySignature**(`address`, `message`, `signatureHex`, `publicKeyHex`): `boolean` ## Parameters ### address `string` ### message `string` ### signatureHex `string` ### publicKeyHex `string` ## Returns `boolean` --- ## Page: verifySignatureDetailed URL: https://docs.totem.ing/api/totemsdk-server/functions/verifySignatureDetailed [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / verifySignatureDetailed # Function: verifySignatureDetailed() > **verifySignatureDetailed**(`address`, `message`, `signatureHex`, `publicKeyHex`): [`VerificationResult`](../interfaces/VerificationResult.md) ## Parameters ### address `string` ### message `string` ### signatureHex `string` ### publicKeyHex `string` ## Returns [`VerificationResult`](../interfaces/VerificationResult.md) --- ## Page: verifyTreeSignature URL: https://docs.totem.ing/api/totemsdk-server/functions/verifyTreeSignature [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / verifyTreeSignature # Function: verifyTreeSignature() > **verifyTreeSignature**(`expectedPubkey`, `data`, `signature`): `boolean` Verify a tree signature against expected public key and data Matches TreeKey.java verify(): - First proof's computed root must match expected public key - Each intermediate proof must sign the next level's root - Final proof must verify against the actual data ## Parameters ### expectedPubkey `Bytes` ### data `Bytes` ### signature [`TreeSignature`](../interfaces/TreeSignature.md) ## Returns `boolean` --- ## Page: verifyTreeSignatureDetailed URL: https://docs.totem.ing/api/totemsdk-server/functions/verifyTreeSignatureDetailed [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / verifyTreeSignatureDetailed # Function: verifyTreeSignatureDetailed() > **verifyTreeSignatureDetailed**(`expectedPubkey`, `data`, `signature`): [`VerificationResult`](../interfaces/VerificationResult.md) ## Parameters ### expectedPubkey `Bytes` ### data `Bytes` ### signature [`TreeSignature`](../interfaces/TreeSignature.md) ## Returns [`VerificationResult`](../interfaces/VerificationResult.md) --- ## Page: wotsAddressFromKeypair URL: https://docs.totem.ing/api/totemsdk-server/functions/wotsAddressFromKeypair [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / wotsAddressFromKeypair # Function: wotsAddressFromKeypair() ## Call Signature > **wotsAddressFromKeypair**(`seed`, `index`): `string` ### Parameters #### seed `Uint8Array` #### index `number` ### Returns `string` ## Call Signature > **wotsAddressFromKeypair**(`kp`): `string` ### Parameters #### kp ##### index `number` ##### seed `Uint8Array` ### Returns `string` --- ## Page: wotsKeypairFromSeed URL: https://docs.totem.ing/api/totemsdk-server/functions/wotsKeypairFromSeed [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / wotsKeypairFromSeed # Function: wotsKeypairFromSeed() > **wotsKeypairFromSeed**(`seed`, `index`): `object` ## Parameters ### seed `Uint8Array` ### index `number` ## Returns `object` ### index > **index**: `number` ### pk > **pk**: `Uint8Array` ### seed > **seed**: `Uint8Array` --- ## Page: wotsSignLegacy URL: https://docs.totem.ing/api/totemsdk-server/functions/wotsSignLegacy [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / wotsSignLegacy # Function: wotsSignLegacy() > **wotsSignLegacy**(`msgHash`, `seed`, `index`, `paramSet?`): [`WotsSignature`](../type-aliases/WotsSignature.md) Legacy wrapper returning structured signature ## Parameters ### msgHash `Uint8Array` ### seed `Uint8Array` ### index `number` ### paramSet? [`ParamSet`](../type-aliases/ParamSet.md) ## Returns [`WotsSignature`](../type-aliases/WotsSignature.md) --- ## Page: writeHashToStream URL: https://docs.totem.ing/api/totemsdk-server/functions/writeHashToStream [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / writeHashToStream # Function: writeHashToStream() > **writeHashToStream**(`data`): `Uint8Array` Serialize hash in MiniData.writeHashToStream format (4-byte length prefix) Re-export of Streamable.writeHashToStream for backward compatibility. ## Parameters ### data `Uint8Array` Hash bytes (max 64 bytes per MINIMA_MAX_HASH_LENGTH) ## Returns `Uint8Array` Serialized bytes with 4-byte length prefix --- ## Page: writeMMREntryNumber URL: https://docs.totem.ing/api/totemsdk-server/functions/writeMMREntryNumber [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / writeMMREntryNumber # Function: writeMMREntryNumber() > **writeMMREntryNumber**(`value`, `scale?`): `Uint8Array` Encode an MMREntryNumber per Java MMREntryNumber.writeDataStream() Java source (MMREntryNumber.java): MiniNumber.WriteToStream(zOut, mNumber.scale()); // scale as MiniNumber MiniData.WriteToStream(zOut, mNumber.unscaledValue().toByteArray()); // unscaled as MiniData Format: - MiniNumber for scale (always 0 for integer values) - MiniData for unscaled BigInteger value For integer MMREntryNumber (scale=0), this encodes as: [00 01 00] - MiniNumber: scale=0, len=1, data=0x00 [00 00 00 LL ...] - MiniData: 4-byte len + BigInteger bytes ## Parameters ### value `bigint` ### scale? `number` ## Returns `Uint8Array` --- ## Page: writeMiniByte URL: https://docs.totem.ing/api/totemsdk-server/functions/writeMiniByte [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / writeMiniByte # Function: writeMiniByte() > **writeMiniByte**(`value`): `Uint8Array` Encode a MiniByte per Java MiniByte.writeDataStream() Format: single byte (0-255) ## Parameters ### value `number` \| `boolean` ## Returns `Uint8Array` --- ## Page: writeMiniNumber URL: https://docs.totem.ing/api/totemsdk-server/functions/writeMiniNumber [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / writeMiniNumber # Function: writeMiniNumber() > **writeMiniNumber**(`value`, `scale?`): `Uint8Array` ## Parameters ### value `bigint` ### scale? `number` ## Returns `Uint8Array` --- ## Page: AdapterRegistry URL: https://docs.totem.ing/api/totemsdk-server/interfaces/AdapterRegistry [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / AdapterRegistry # Interface: AdapterRegistry ## Properties ### auth > **auth**: [`AuthTokenProvider`](AuthTokenProvider.md) *** ### config > **config**: [`ConfigProvider`](ConfigProvider.md) *** ### crypto > **crypto**: [`CryptoAdapter`](CryptoAdapter.md) *** ### http > **http**: [`HttpClient`](HttpClient.md) *** ### logger > **logger**: [`LoggerAdapter`](LoggerAdapter.md) *** ### metrics? > `optional` **metrics?**: [`MetricsAdapter`](MetricsAdapter.md) *** ### storage > **storage**: [`StorageAdapter`](StorageAdapter.md) *** ### timer > **timer**: [`TimerAdapter`](TimerAdapter.md) *** ### websocket > **websocket**: [`WebSocketFactory`](WebSocketFactory.md) --- ## Page: AuthTokenProvider URL: https://docs.totem.ing/api/totemsdk-server/interfaces/AuthTokenProvider [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / AuthTokenProvider # Interface: AuthTokenProvider ## Methods ### clearToken() > **clearToken**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### getToken() > **getToken**(): `Promise`\<`string` \| `null`\> #### Returns `Promise`\<`string` \| `null`\> *** ### isAuthenticated() > **isAuthenticated**(): `Promise`\<`boolean`\> #### Returns `Promise`\<`boolean`\> *** ### onTokenChange() > **onTokenChange**(`callback`): () => `void` #### Parameters ##### callback (`token`) => `void` #### Returns () => `void` *** ### setToken() > **setToken**(`token`): `Promise`\<`void`\> #### Parameters ##### token `string` #### Returns `Promise`\<`void`\> --- ## Page: CancellationToken URL: https://docs.totem.ing/api/totemsdk-server/interfaces/CancellationToken [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / CancellationToken # Interface: CancellationToken ## Properties ### cancelled > `readonly` **cancelled**: `boolean` ## Methods ### onCancel() > **onCancel**(`callback`): () => `void` #### Parameters ##### callback () => `void` #### Returns () => `void` --- ## Page: CancellationTokenSource URL: https://docs.totem.ing/api/totemsdk-server/interfaces/CancellationTokenSource [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / CancellationTokenSource # Interface: CancellationTokenSource ## Properties ### token > `readonly` **token**: [`CancellationToken`](CancellationToken.md) ## Methods ### cancel() > **cancel**(): `void` #### Returns `void` --- ## Page: CoinProofData URL: https://docs.totem.ing/api/totemsdk-server/interfaces/CoinProofData [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / CoinProofData # Interface: CoinProofData ## Properties ### address > **address**: `Uint8Array` *** ### blockCreated > **blockCreated**: `bigint` *** ### coinId > **coinId**: `Uint8Array` *** ### mmrEntryNumber > **mmrEntryNumber**: `bigint` *** ### rawAmountBytes > **rawAmountBytes**: `Uint8Array` *** ### rawBlockCreatedBytes > **rawBlockCreatedBytes**: `Uint8Array` *** ### rawMmrEntryBytes > **rawMmrEntryBytes**: `Uint8Array` *** ### rawTokenData? > `optional` **rawTokenData?**: `Uint8Array`\<`ArrayBufferLike`\> *** ### spent > **spent**: `boolean` *** ### state > **state**: [`RawStateVariable`](RawStateVariable.md)[] *** ### storeState > **storeState**: `boolean` *** ### tokenId > **tokenId**: `Uint8Array` --- ## Page: ConfigProvider URL: https://docs.totem.ing/api/totemsdk-server/interfaces/ConfigProvider [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / ConfigProvider # Interface: ConfigProvider ## Properties ### apiKey? > `readonly` `optional` **apiKey?**: `string` *** ### apiUrl > `readonly` **apiUrl**: `string` *** ### network > `readonly` **network**: `"mainnet"` \| `"testnet"` \| `"devnet"` *** ### wsUrl > `readonly` **wsUrl**: `string` ## Methods ### get() #### Call Signature > **get**\<`T`\>(`key`): `T` \| `undefined` ##### Type Parameters ###### T `T` ##### Parameters ###### key `string` ##### Returns `T` \| `undefined` #### Call Signature > **get**\<`T`\>(`key`, `defaultValue`): `T` ##### Type Parameters ###### T `T` ##### Parameters ###### key `string` ###### defaultValue `T` ##### Returns `T` *** ### getAll() > **getAll**(): `Record`\<`string`, `unknown`\> #### Returns `Record`\<`string`, `unknown`\> *** ### has() > **has**(`key`): `boolean` #### Parameters ##### key `string` #### Returns `boolean` *** ### set() > **set**\<`T`\>(`key`, `value`): `void` #### Type Parameters ##### T `T` #### Parameters ##### key `string` ##### value `T` #### Returns `void` --- ## Page: CreateNodeAdaptersOptions URL: https://docs.totem.ing/api/totemsdk-server/interfaces/CreateNodeAdaptersOptions [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / CreateNodeAdaptersOptions # Interface: CreateNodeAdaptersOptions ## Extended by - [`CreateServerAdaptersOptions`](CreateServerAdaptersOptions.md) ## Properties ### config > **config**: [`NodeConfigOptions`](NodeConfigOptions.md) *** ### enableLogging? > `optional` **enableLogging?**: `boolean` *** ### pingIntervalMs? > `optional` **pingIntervalMs?**: `number` *** ### storageDirectory? > `optional` **storageDirectory?**: `string` *** ### useFileStorage? > `optional` **useFileStorage?**: `boolean` --- ## Page: CreateServerAdaptersOptions URL: https://docs.totem.ing/api/totemsdk-server/interfaces/CreateServerAdaptersOptions [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / CreateServerAdaptersOptions # Interface: CreateServerAdaptersOptions ## Extends - [`CreateNodeAdaptersOptions`](CreateNodeAdaptersOptions.md) ## Properties ### authTokenEnvVar? > `optional` **authTokenEnvVar?**: `string` *** ### config > **config**: [`NodeConfigOptions`](NodeConfigOptions.md) #### Inherited from [`CreateNodeAdaptersOptions`](CreateNodeAdaptersOptions.md).[`config`](CreateNodeAdaptersOptions.md#config) *** ### enableLogging? > `optional` **enableLogging?**: `boolean` #### Inherited from [`CreateNodeAdaptersOptions`](CreateNodeAdaptersOptions.md).[`enableLogging`](CreateNodeAdaptersOptions.md#enablelogging) *** ### pingIntervalMs? > `optional` **pingIntervalMs?**: `number` #### Inherited from [`CreateNodeAdaptersOptions`](CreateNodeAdaptersOptions.md).[`pingIntervalMs`](CreateNodeAdaptersOptions.md#pingintervalms) *** ### storageDirectory? > `optional` **storageDirectory?**: `string` #### Inherited from [`CreateNodeAdaptersOptions`](CreateNodeAdaptersOptions.md).[`storageDirectory`](CreateNodeAdaptersOptions.md#storagedirectory) *** ### useFileStorage? > `optional` **useFileStorage?**: `boolean` #### Inherited from [`CreateNodeAdaptersOptions`](CreateNodeAdaptersOptions.md).[`useFileStorage`](CreateNodeAdaptersOptions.md#usefilestorage) --- ## Page: CryptoAdapter URL: https://docs.totem.ing/api/totemsdk-server/interfaces/CryptoAdapter [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / CryptoAdapter # Interface: CryptoAdapter ## Methods ### randomBytes() > **randomBytes**(`length`): `Uint8Array` #### Parameters ##### length `number` #### Returns `Uint8Array` *** ### sha256() > **sha256**(`data`): `Uint8Array` #### Parameters ##### data `Uint8Array` #### Returns `Uint8Array` *** ### sha256Async() > **sha256Async**(`data`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> #### Parameters ##### data `Uint8Array` #### Returns `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> --- ## Page: DAppContractCallParams URL: https://docs.totem.ing/api/totemsdk-server/interfaces/DAppContractCallParams [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / DAppContractCallParams # Interface: DAppContractCallParams ## Properties ### args? > `optional` **args?**: `Record`\<`string`, `string`\> *** ### contractAddress > **contractAddress**: `string` *** ### method? > `optional` **method?**: `string` *** ### script? > `optional` **script?**: `string` --- ## Page: DAppHtlcParams URL: https://docs.totem.ing/api/totemsdk-server/interfaces/DAppHtlcParams [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / DAppHtlcParams # Interface: DAppHtlcParams ## Properties ### hashlock > **hashlock**: `string` *** ### recipientAddress > **recipientAddress**: `string` *** ### refundAddress > **refundAddress**: `string` *** ### timeoutBlocks > **timeoutBlocks**: `number` --- ## Page: DAppLiquidityParams URL: https://docs.totem.ing/api/totemsdk-server/interfaces/DAppLiquidityParams [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / DAppLiquidityParams # Interface: DAppLiquidityParams ## Properties ### amountA? > `optional` **amountA?**: `string` *** ### amountB? > `optional` **amountB?**: `string` *** ### lpTokenAmount? > `optional` **lpTokenAmount?**: `string` *** ### poolAddress > **poolAddress**: `string` *** ### tokenAId > **tokenAId**: `string` *** ### tokenBId > **tokenBId**: `string` --- ## Page: DAppMultisigParams URL: https://docs.totem.ing/api/totemsdk-server/interfaces/DAppMultisigParams [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / DAppMultisigParams # Interface: DAppMultisigParams ## Properties ### publicKeys > **publicKeys**: `string`[] *** ### requiredSignatures > **requiredSignatures**: `number` *** ### timeoutBlocks? > `optional` **timeoutBlocks?**: `number` --- ## Page: DAppStateVariable URL: https://docs.totem.ing/api/totemsdk-server/interfaces/DAppStateVariable [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / DAppStateVariable # Interface: DAppStateVariable ## Properties ### port > **port**: `number` *** ### type? > `optional` **type?**: `"string"` \| `"number"` \| `"hex"` \| `"address"` *** ### value > **value**: `string` --- ## Page: DAppSwapParams URL: https://docs.totem.ing/api/totemsdk-server/interfaces/DAppSwapParams [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / DAppSwapParams # Interface: DAppSwapParams ## Properties ### amountIn > **amountIn**: `string` *** ### fromTokenId > **fromTokenId**: `string` *** ### minAmountOut > **minAmountOut**: `string` *** ### poolAddress? > `optional` **poolAddress?**: `string` *** ### slippageBps? > `optional` **slippageBps?**: `number` *** ### toTokenId > **toTokenId**: `string` --- ## Page: DAppTimelockParams URL: https://docs.totem.ing/api/totemsdk-server/interfaces/DAppTimelockParams [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / DAppTimelockParams # Interface: DAppTimelockParams ## Properties ### fallbackAddress? > `optional` **fallbackAddress?**: `string` *** ### releaseBlock > **releaseBlock**: `number` --- ## Page: DAppTransactionInput URL: https://docs.totem.ing/api/totemsdk-server/interfaces/DAppTransactionInput [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / DAppTransactionInput # Interface: DAppTransactionInput ## Properties ### address? > `optional` **address?**: `string` *** ### amount? > `optional` **amount?**: `string` *** ### coinId > **coinId**: `string` *** ### tokenId? > `optional` **tokenId?**: `string` --- ## Page: DAppTransactionOutput URL: https://docs.totem.ing/api/totemsdk-server/interfaces/DAppTransactionOutput [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / DAppTransactionOutput # Interface: DAppTransactionOutput ## Properties ### address > **address**: `string` *** ### amount > **amount**: `string` *** ### script? > `optional` **script?**: `string` *** ### scriptRef? > `optional` **scriptRef?**: `string` *** ### state? > `optional` **state?**: [`DAppStateVariable`](DAppStateVariable.md)[] *** ### storeState? > `optional` **storeState?**: `boolean` *** ### tokenId? > `optional` **tokenId?**: `string` --- ## Page: EnvironmentConfigMapping URL: https://docs.totem.ing/api/totemsdk-server/interfaces/EnvironmentConfigMapping [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / EnvironmentConfigMapping # Interface: EnvironmentConfigMapping ## Properties ### apiKey? > `optional` **apiKey?**: `string` *** ### apiUrl? > `optional` **apiUrl?**: `string` *** ### network? > `optional` **network?**: `string` *** ### wsUrl? > `optional` **wsUrl?**: `string` --- ## Page: ExternalSignature URL: https://docs.totem.ing/api/totemsdk-server/interfaces/ExternalSignature [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / ExternalSignature # Interface: ExternalSignature ## Properties ### proof? > `optional` **proof?**: [`MMRProof`](MMRProof.md) *** ### publicKey > **publicKey**: `string` *** ### signature > **signature**: `string` *** ### signatureType > **signatureType**: `"wots"` \| `"standard"` *** ### validated? > `optional` **validated?**: `boolean` --- ## Page: FileStorageAdapterOptions URL: https://docs.totem.ing/api/totemsdk-server/interfaces/FileStorageAdapterOptions [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / FileStorageAdapterOptions # Interface: FileStorageAdapterOptions ## Properties ### directory > **directory**: `string` *** ### failurePolicy? > `optional` **failurePolicy?**: `"strict"` \| `"lenient"` `strict` (default) surfaces `corrupt` records; `lenient` returns null. *** ### prefix? > `optional` **prefix?**: `string` --- ## Page: FinalizeRequest URL: https://docs.totem.ing/api/totemsdk-server/interfaces/FinalizeRequest [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / FinalizeRequest # Interface: FinalizeRequest ## Properties ### importId? > `optional` **importId?**: `string` *** ### leaseToken > **leaseToken**: `string` *** ### signedBase64? > `optional` **signedBase64?**: `string` *** ### signedHex? > `optional` **signedHex?**: `string` *** ### transactionHex? > `optional` **transactionHex?**: `string` --- ## Page: FinalizeResponse URL: https://docs.totem.ing/api/totemsdk-server/interfaces/FinalizeResponse [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / FinalizeResponse # Interface: FinalizeResponse ## Properties ### leaseId > **leaseId**: `string` *** ### ok > **ok**: `boolean` *** ### txpowid > **txpowid**: `string` --- ## Page: FlatMMRProofChunk URL: https://docs.totem.ing/api/totemsdk-server/interfaces/FlatMMRProofChunk [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / FlatMMRProofChunk # Interface: FlatMMRProofChunk ## Properties ### data > **data**: `Uint8Array` *** ### isLeft > **isLeft**: `boolean` --- ## Page: HierarchicalWitnessBundle URL: https://docs.totem.ing/api/totemsdk-server/interfaces/HierarchicalWitnessBundle [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / HierarchicalWitnessBundle # Interface: HierarchicalWitnessBundle Hierarchical witness bundle produced by per-address TreeKey signing. Index mapping: addressIndex — which HD address (0-63) l1 — L1 index within per-address TreeKey (0-63) l2 — L2 index within per-address TreeKey (0-63) proofs contains 3 entries for depth-3 TreeKeys (Root→L1→L2→DATA), matching Minima's TreeKey.sign() exactly. ## Properties ### addressIndex > **addressIndex**: `number` *** ### l1 > **l1**: `number` *** ### l2 > **l2**: `number` *** ### proofs > **proofs**: `SignatureProofHex`[] *** ### rootPublicKey > **rootPublicKey**: `string` --- ## Page: HttpClient URL: https://docs.totem.ing/api/totemsdk-server/interfaces/HttpClient [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / HttpClient # Interface: HttpClient ## Methods ### delete() > **delete**\<`T`\>(`url`, `options?`): `Promise`\<[`HttpResponse`](HttpResponse.md)\<`T`\>\> #### Type Parameters ##### T `T` #### Parameters ##### url `string` ##### options? [`HttpRequestOptions`](HttpRequestOptions.md) #### Returns `Promise`\<[`HttpResponse`](HttpResponse.md)\<`T`\>\> *** ### get() > **get**\<`T`\>(`url`, `options?`): `Promise`\<[`HttpResponse`](HttpResponse.md)\<`T`\>\> #### Type Parameters ##### T `T` #### Parameters ##### url `string` ##### options? [`HttpRequestOptions`](HttpRequestOptions.md) #### Returns `Promise`\<[`HttpResponse`](HttpResponse.md)\<`T`\>\> *** ### post() > **post**\<`T`\>(`url`, `body?`, `options?`): `Promise`\<[`HttpResponse`](HttpResponse.md)\<`T`\>\> #### Type Parameters ##### T `T` #### Parameters ##### url `string` ##### body? `unknown` ##### options? [`HttpRequestOptions`](HttpRequestOptions.md) #### Returns `Promise`\<[`HttpResponse`](HttpResponse.md)\<`T`\>\> *** ### put() > **put**\<`T`\>(`url`, `body?`, `options?`): `Promise`\<[`HttpResponse`](HttpResponse.md)\<`T`\>\> #### Type Parameters ##### T `T` #### Parameters ##### url `string` ##### body? `unknown` ##### options? [`HttpRequestOptions`](HttpRequestOptions.md) #### Returns `Promise`\<[`HttpResponse`](HttpResponse.md)\<`T`\>\> --- ## Page: HttpRequestOptions URL: https://docs.totem.ing/api/totemsdk-server/interfaces/HttpRequestOptions [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / HttpRequestOptions # Interface: HttpRequestOptions ## Properties ### cancellationToken? > `optional` **cancellationToken?**: [`CancellationToken`](CancellationToken.md) *** ### headers? > `optional` **headers?**: `Record`\<`string`, `string`\> *** ### timeout? > `optional` **timeout?**: `number` --- ## Page: HttpResponse URL: https://docs.totem.ing/api/totemsdk-server/interfaces/HttpResponse [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / HttpResponse # Interface: HttpResponse\ ## Type Parameters ### T `T` ## Properties ### data > **data**: `T` *** ### headers > **headers**: `Record`\<`string`, `string`\> *** ### ok > **ok**: `boolean` *** ### status > **status**: `number` *** ### statusText > **statusText**: `string` --- ## Page: JavaMMRData URL: https://docs.totem.ing/api/totemsdk-server/interfaces/JavaMMRData [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / JavaMMRData # Interface: JavaMMRData MMRData interface for serialization purposes Matches Minima's MMRData.java ## Properties ### data > **data**: `Uint8Array` *** ### value > **value**: `bigint` --- ## Page: JavaMMREntry URL: https://docs.totem.ing/api/totemsdk-server/interfaces/JavaMMREntry [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / JavaMMREntry # Interface: JavaMMREntry MMREntry interface for serialization purposes Matches Minima's MMREntry.java ## Properties ### entryNumber > **entryNumber**: [`JavaMMREntryNumber`](JavaMMREntryNumber.md) *** ### mmrData > **mmrData**: [`JavaMMRData`](JavaMMRData.md) *** ### row > **row**: `number` --- ## Page: JavaMMREntryNumber URL: https://docs.totem.ing/api/totemsdk-server/interfaces/JavaMMREntryNumber [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / JavaMMREntryNumber # Interface: JavaMMREntryNumber MMREntryNumber interface matching Minima's MMREntryNumber.java Represents a BigDecimal position in the MMR tree ## Properties ### scale > **scale**: `number` *** ### unscaled > **unscaled**: `bigint` --- ## Page: KeyGenProgress URL: https://docs.totem.ing/api/totemsdk-server/interfaces/KeyGenProgress [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / KeyGenProgress # Interface: KeyGenProgress Progress callback for key generation ## Properties ### current > **current**: `number` *** ### message > **message**: `string` *** ### phase > **phase**: `"wots_keys"` \| `"mmr_build"` \| `"address_derive"` \| `"complete"` *** ### total > **total**: `number` --- ## Page: LeaseExpiryEvent URL: https://docs.totem.ing/api/totemsdk-server/interfaces/LeaseExpiryEvent [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / LeaseExpiryEvent # Interface: LeaseExpiryEvent ## Properties ### expiresAt > **expiresAt**: `number` *** ### lease > **lease**: [`StoredLease`](StoredLease.md) *** ### leaseId > **leaseId**: `string` *** ### remainingMs > **remainingMs**: `number` --- ## Page: LeaseMonitorConfig URL: https://docs.totem.ing/api/totemsdk-server/interfaces/LeaseMonitorConfig [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / LeaseMonitorConfig # Interface: LeaseMonitorConfig ## Properties ### defaultIntervalMs? > `optional` **defaultIntervalMs?**: `number` *** ### expiryThresholdMs? > `optional` **expiryThresholdMs?**: `number` *** ### maxIntervalMs? > `optional` **maxIntervalMs?**: `number` *** ### minIntervalMs? > `optional` **minIntervalMs?**: `number` --- ## Page: LeaseStoreConfig URL: https://docs.totem.ing/api/totemsdk-server/interfaces/LeaseStoreConfig [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / LeaseStoreConfig # Interface: LeaseStoreConfig ## Properties ### storageKey? > `optional` **storageKey?**: `string` --- ## Page: LeaseWotsIndices URL: https://docs.totem.ing/api/totemsdk-server/interfaces/LeaseWotsIndices [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / LeaseWotsIndices # Interface: LeaseWotsIndices ## Properties ### addressIndex > **addressIndex**: `number` *** ### l1 > **l1**: `number` *** ### l2 > **l2**: `number` --- ## Page: LegacyMMRProof URL: https://docs.totem.ing/api/totemsdk-server/interfaces/LegacyMMRProof [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / LegacyMMRProof # Interface: LegacyMMRProof ## Properties ### blockTime > **blockTime**: `bigint` *** ### proofChain > **proofChain**: [`FlatMMRProofChunk`](FlatMMRProofChunk.md)[] --- ## Page: LifecycleAdapter URL: https://docs.totem.ing/api/totemsdk-server/interfaces/LifecycleAdapter [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / LifecycleAdapter # Interface: LifecycleAdapter ## Methods ### onResume()? > `optional` **onResume**(`callback`): () => `void` #### Parameters ##### callback () => `void` #### Returns () => `void` *** ### onSuspend() > **onSuspend**(`callback`): () => `void` #### Parameters ##### callback () => `void` #### Returns () => `void` --- ## Page: LoggerAdapter URL: https://docs.totem.ing/api/totemsdk-server/interfaces/LoggerAdapter [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / LoggerAdapter # Interface: LoggerAdapter ## Methods ### debug() > **debug**(`message`, ...`args`): `void` #### Parameters ##### message `string` ##### args ...`unknown`[] #### Returns `void` *** ### error() > **error**(`message`, ...`args`): `void` #### Parameters ##### message `string` ##### args ...`unknown`[] #### Returns `void` *** ### info() > **info**(`message`, ...`args`): `void` #### Parameters ##### message `string` ##### args ...`unknown`[] #### Returns `void` *** ### warn() > **warn**(`message`, ...`args`): `void` #### Parameters ##### message `string` ##### args ...`unknown`[] #### Returns `void` --- ## Page: MMRData URL: https://docs.totem.ing/api/totemsdk-server/interfaces/MMRData [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / MMRData # Interface: MMRData MMRData structure matching Minima's MMRData.java Contains hash and value (for sum tree functionality) ## Properties ### data > **data**: `Bytes` *** ### value > **value**: `bigint` --- ## Page: MMREntry URL: https://docs.totem.ing/api/totemsdk-server/interfaces/MMREntry [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / MMREntry # Interface: MMREntry MMREntry structure matching Minima's MMREntry.java Represents a node in the MMR at a specific row and position ## Properties ### entryNumber > **entryNumber**: `bigint` *** ### mmrData > **mmrData**: [`MMRData`](MMRData.md) *** ### row > **row**: `number` --- ## Page: MMRProof URL: https://docs.totem.ing/api/totemsdk-server/interfaces/MMRProof [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / MMRProof # Interface: MMRProof MMRProof structure matching Minima's MMRProof.java Contains proof chunks to verify leaf membership in the tree ## Properties ### chunks > **chunks**: [`MMRProofChunk`](MMRProofChunk.md)[] --- ## Page: MMRProofChunk URL: https://docs.totem.ing/api/totemsdk-server/interfaces/MMRProofChunk [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / MMRProofChunk # Interface: MMRProofChunk MMRProofChunk - one step in the proof path Matches Minima's MMRProof structure ## Properties ### isLeft > **isLeft**: `boolean` *** ### mmrData > **mmrData**: [`MMRData`](MMRData.md) --- ## Page: MetricsAdapter URL: https://docs.totem.ing/api/totemsdk-server/interfaces/MetricsAdapter [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / MetricsAdapter # Interface: MetricsAdapter ## Methods ### gauge() > **gauge**(`name`, `value`, `tags?`): `void` #### Parameters ##### name `string` ##### value `number` ##### tags? `Record`\<`string`, `string`\> #### Returns `void` *** ### histogram() > **histogram**(`name`, `value`, `tags?`): `void` #### Parameters ##### name `string` ##### value `number` ##### tags? `Record`\<`string`, `string`\> #### Returns `void` *** ### increment() > **increment**(`name`, `value?`, `tags?`): `void` #### Parameters ##### name `string` ##### value? `number` ##### tags? `Record`\<`string`, `string`\> #### Returns `void` *** ### timing() > **timing**(`name`, `durationMs`, `tags?`): `void` #### Parameters ##### name `string` ##### durationMs `number` ##### tags? `Record`\<`string`, `string`\> #### Returns `void` --- ## Page: MinimaCoin URL: https://docs.totem.ing/api/totemsdk-server/interfaces/MinimaCoin [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / MinimaCoin # Interface: MinimaCoin ## Properties ### address > **address**: `Uint8Array` *** ### amount > **amount**: `string` *** ### coinId > **coinId**: `Uint8Array` *** ### created > **created**: `bigint` *** ### mmrEntryNumber > **mmrEntryNumber**: `bigint` *** ### rawAmountBytes? > `optional` **rawAmountBytes?**: `Uint8Array`\<`ArrayBufferLike`\> *** ### rawBlockCreatedBytes? > `optional` **rawBlockCreatedBytes?**: `Uint8Array`\<`ArrayBufferLike`\> *** ### rawMmrEntryBytes? > `optional` **rawMmrEntryBytes?**: `Uint8Array`\<`ArrayBufferLike`\> *** ### rawTokenData? > `optional` **rawTokenData?**: `Uint8Array`\<`ArrayBufferLike`\> *** ### spent > **spent**: `boolean` *** ### state > **state**: [`StateVariable`](StateVariable.md)[] \| [`RawStateVariable`](RawStateVariable.md)[] *** ### storeState > **storeState**: `boolean` *** ### token > **token**: [`MinimaToken`](MinimaToken.md) \| `null` *** ### tokenId > **tokenId**: `Uint8Array` --- ## Page: MinimaToken URL: https://docs.totem.ing/api/totemsdk-server/interfaces/MinimaToken [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / MinimaToken # Interface: MinimaToken ## Properties ### coinId > **coinId**: `Uint8Array` *** ### created? > `optional` **created?**: `bigint` *** ### name > **name**: `Uint8Array` *** ### scale > **scale**: `number` *** ### script > **script**: `Uint8Array` *** ### totalAmount > **totalAmount**: `bigint` --- ## Page: MinimaTransaction URL: https://docs.totem.ing/api/totemsdk-server/interfaces/MinimaTransaction [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / MinimaTransaction # Interface: MinimaTransaction Transaction Serialization & Digest Computation Port of the extension's MinimaTransactionBuilder serialization logic to the SDK core for full parity with the Totem wallet extension. Matches Minima Java's Transaction.writeDataStream() and Coin.writeDataStream() exactly. CRITICAL: Before computing the transaction digest for signing, you MUST call precomputeTransactionCoinID() to set output coin IDs. Without this, the signed digest won't match what the Minima node verifies, causing allsignaturesvalid=false. ## Properties ### inputs > **inputs**: [`MinimaCoin`](MinimaCoin.md)[] *** ### linkHash > **linkHash**: `Uint8Array` *** ### outputs > **outputs**: [`MinimaCoin`](MinimaCoin.md)[] *** ### state > **state**: [`StateVariable`](StateVariable.md)[] --- ## Page: NodeConfigOptions URL: https://docs.totem.ing/api/totemsdk-server/interfaces/NodeConfigOptions [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / NodeConfigOptions # Interface: NodeConfigOptions ## Properties ### additionalConfig? > `optional` **additionalConfig?**: `Record`\<`string`, `unknown`\> *** ### apiKey? > `optional` **apiKey?**: `string` *** ### apiUrl > **apiUrl**: `string` *** ### network > **network**: `"mainnet"` \| `"testnet"` \| `"devnet"` *** ### wsUrl > **wsUrl**: `string` --- ## Page: NodeHttpClientOptions URL: https://docs.totem.ing/api/totemsdk-server/interfaces/NodeHttpClientOptions [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / NodeHttpClientOptions # Interface: NodeHttpClientOptions ## Properties ### defaultHeaders? > `optional` **defaultHeaders?**: `Record`\<`string`, `string`\> *** ### defaultTimeout? > `optional` **defaultTimeout?**: `number` --- ## Page: ParsedMiniNumber URL: https://docs.totem.ing/api/totemsdk-server/interfaces/ParsedMiniNumber [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / ParsedMiniNumber # Interface: ParsedMiniNumber ## Properties ### scale > **scale**: `number` *** ### unscaledValue > **unscaledValue**: `bigint` --- ## Page: PrepareRequest URL: https://docs.totem.ing/api/totemsdk-server/interfaces/PrepareRequest [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / PrepareRequest # Interface: PrepareRequest ## Properties ### addressIndex? > `optional` **addressIndex?**: `number` *** ### amount > **amount**: `string` *** ### burn? > `optional` **burn?**: `string` *** ### to > **to**: `string` *** ### tokenId? > `optional` **tokenId?**: `string` *** ### txId? > `optional` **txId?**: `string` --- ## Page: PrepareResponse URL: https://docs.totem.ing/api/totemsdk-server/interfaces/PrepareResponse [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / PrepareResponse # Interface: PrepareResponse ## Extended by - [`PrepareResult`](PrepareResult.md) ## Properties ### addressIndex > **addressIndex**: `number` *** ### digestL2 > **digestL2**: `string` \| `null` *** ### digestL3 > **digestL3**: `string` \| `null` *** ### digestTx > **digestTx**: `string` *** ### l1 > **l1**: `number` *** ### l2 > **l2**: `number` *** ### leaseId > **leaseId**: `string` *** ### leaseToken > **leaseToken**: `string` *** ### leaseTTL > **leaseTTL**: `number` *** ### paramSet > **paramSet**: `string` *** ### perAddressScript? > `optional` **perAddressScript?**: `string` \| `null` *** ### rootPublicKey > **rootPublicKey**: `string` *** ### txId > **txId**: `string` --- ## Page: PrepareResult URL: https://docs.totem.ing/api/totemsdk-server/interfaces/PrepareResult [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / PrepareResult # Interface: PrepareResult ## Extends - [`PrepareResponse`](PrepareResponse.md) ## Properties ### addressIndex > **addressIndex**: `number` #### Inherited from [`PrepareResponse`](PrepareResponse.md).[`addressIndex`](PrepareResponse.md#addressindex) *** ### digestL2 > **digestL2**: `string` \| `null` #### Inherited from [`PrepareResponse`](PrepareResponse.md).[`digestL2`](PrepareResponse.md#digestl2) *** ### digestL3 > **digestL3**: `string` \| `null` #### Inherited from [`PrepareResponse`](PrepareResponse.md).[`digestL3`](PrepareResponse.md#digestl3) *** ### digestTx > **digestTx**: `string` #### Inherited from [`PrepareResponse`](PrepareResponse.md).[`digestTx`](PrepareResponse.md#digesttx) *** ### l1 > **l1**: `number` #### Inherited from [`PrepareResponse`](PrepareResponse.md).[`l1`](PrepareResponse.md#l1) *** ### l2 > **l2**: `number` #### Inherited from [`PrepareResponse`](PrepareResponse.md).[`l2`](PrepareResponse.md#l2) *** ### leaseId > **leaseId**: `string` #### Inherited from [`PrepareResponse`](PrepareResponse.md).[`leaseId`](PrepareResponse.md#leaseid) *** ### leaseToken > **leaseToken**: `string` #### Inherited from [`PrepareResponse`](PrepareResponse.md).[`leaseToken`](PrepareResponse.md#leasetoken) *** ### leaseTTL > **leaseTTL**: `number` #### Inherited from [`PrepareResponse`](PrepareResponse.md).[`leaseTTL`](PrepareResponse.md#leasettl) *** ### metadata > **metadata**: [`TransactionMetadata`](TransactionMetadata.md) *** ### paramSet > **paramSet**: `string` #### Inherited from [`PrepareResponse`](PrepareResponse.md).[`paramSet`](PrepareResponse.md#paramset) *** ### perAddressScript? > `optional` **perAddressScript?**: `string` \| `null` #### Inherited from [`PrepareResponse`](PrepareResponse.md).[`perAddressScript`](PrepareResponse.md#peraddressscript) *** ### rootPublicKey > **rootPublicKey**: `string` #### Inherited from [`PrepareResponse`](PrepareResponse.md).[`rootPublicKey`](PrepareResponse.md#rootpublickey) *** ### txId > **txId**: `string` #### Inherited from [`PrepareResponse`](PrepareResponse.md).[`txId`](PrepareResponse.md#txid) --- ## Page: RawStateVariable URL: https://docs.totem.ing/api/totemsdk-server/interfaces/RawStateVariable [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / RawStateVariable # Interface: RawStateVariable ## Properties ### port > **port**: `number` *** ### rawData > **rawData**: `Uint8Array` *** ### type > **type**: `number` --- ## Page: ScriptCatalogEntry URL: https://docs.totem.ing/api/totemsdk-server/interfaces/ScriptCatalogEntry [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / ScriptCatalogEntry # Interface: ScriptCatalogEntry ## Properties ### address > **address**: `string` *** ### createdAt > **createdAt**: `number` *** ### lastUsed > **lastUsed**: `number` *** ### script > **script**: `string` *** ### scriptType > **scriptType**: [`ScriptType`](../type-aliases/ScriptType.md) --- ## Page: ScriptDescriptor URL: https://docs.totem.ing/api/totemsdk-server/interfaces/ScriptDescriptor [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / ScriptDescriptor # Interface: ScriptDescriptor ## Properties ### address > **address**: `string` *** ### externalSignatures? > `optional` **externalSignatures?**: [`ExternalSignature`](ExternalSignature.md)[] *** ### extraScripts? > `optional` **extraScripts?**: `Map`\<`string`, `string`\> *** ### htlcHash? > `optional` **htlcHash?**: `string` *** ### htlcPreimage? > `optional` **htlcPreimage?**: `string` *** ### mastProof? > `optional` **mastProof?**: [`MMRProof`](MMRProof.md) *** ### multisigKeys? > `optional` **multisigKeys?**: `string`[] *** ### multisigThreshold? > `optional` **multisigThreshold?**: `number` *** ### script > **script**: `string` *** ### scriptType > **scriptType**: [`ScriptType`](../type-aliases/ScriptType.md) *** ### stateVariables? > `optional` **stateVariables?**: [`StateValue`](StateValue.md)[] *** ### storeState? > `optional` **storeState?**: `boolean` *** ### timelockBlock? > `optional` **timelockBlock?**: `bigint` *** ### verifyOutExpectations? > `optional` **verifyOutExpectations?**: [`VerifyOutExpectation`](VerifyOutExpectation.md)[] *** ### wotsRootPublicKey? > `optional` **wotsRootPublicKey?**: `string` --- ## Page: ScriptProofResult URL: https://docs.totem.ing/api/totemsdk-server/interfaces/ScriptProofResult [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / ScriptProofResult # Interface: ScriptProofResult ## Properties ### proof > **proof**: [`MMRProof`](MMRProof.md) *** ### script > **script**: `string` *** ### serialized > **serialized**: `Uint8Array` --- ## Page: SendParams URL: https://docs.totem.ing/api/totemsdk-server/interfaces/SendParams [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / SendParams # Interface: SendParams Parameters for `sendTransaction()`. ## Properties ### addressIndex > **addressIndex**: `number` Account index (0–63) — determines which per-address TreeKey is used. Must match the address that owns the coins to be spent. *** ### amount > **amount**: `string` Amount to send as a decimal string, e.g. `"10"` or `"0.5"`. *** ### apiKey > **apiKey**: `string` Axia API key (sent as `x-api-key` header). *** ### axiaBaseUrl > **axiaBaseUrl**: `string` Axia API base URL, e.g. `"https://api.axia.to"`. *** ### chunkSize? > `optional` **chunkSize?**: `number` Hash iterations per async yield during mining. Default: 10 000. Lower = more responsive; higher = slightly faster. *** ### seed > **seed**: `string` 24-word Minima seed phrase. Store securely — never log or expose this value. *** ### signal? > `optional` **signal?**: `AbortSignal` Optional AbortSignal to cancel mining. *** ### signingIndices > **signingIndices**: `object` WOTS one-time signing indices. Must be unique per transaction. l1 ∈ [0, 63], l2 ∈ [0, 63]. #### l1 > **l1**: `number` #### l2 > **l2**: `number` *** ### toAddress > **toAddress**: `string` Recipient address — Mx-prefix or hex (with or without `0x`). *** ### tokenId? > `optional` **tokenId?**: `string` Token ID. Defaults to `"0x00"` (native MIN). --- ## Page: SendResult URL: https://docs.totem.ing/api/totemsdk-server/interfaces/SendResult [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / SendResult # Interface: SendResult Result returned by `sendTransaction()` on success. ## Properties ### elapsedMs > **elapsedMs**: `number` Wall-clock mining time in milliseconds (excludes API latency). *** ### miningSource > **miningSource**: `"wasm"` \| `"js"` Mining engine: `'wasm'` when the pre-compiled binary was used. *** ### status > **status**: `"submitted"` Always `'submitted'` on success. *** ### txpowId > **txpowId**: `string` Canonical TxPoW ID assigned by the Minima network (hex). --- ## Page: SignRequest URL: https://docs.totem.ing/api/totemsdk-server/interfaces/SignRequest [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / SignRequest # Interface: SignRequest ## Properties ### addressIndex > **addressIndex**: `number` *** ### digestTx > **digestTx**: `string` *** ### l1 > **l1**: `number` *** ### l2 > **l2**: `number` --- ## Page: SignResult URL: https://docs.totem.ing/api/totemsdk-server/interfaces/SignResult [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / SignResult # Interface: SignResult ## Properties ### signedHex > **signedHex**: `string` *** ### witnessBundle > **witnessBundle**: [`HierarchicalWitnessBundle`](HierarchicalWitnessBundle.md) --- ## Page: SignatureProof URL: https://docs.totem.ing/api/totemsdk-server/interfaces/SignatureProof [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / SignatureProof # Interface: SignatureProof SignatureProof structure matching Minima's SignatureProof.java Contains: - leafPubkey: The 32-byte WOTS public key DIGEST (SHA3-256 of full L×32 key) - signature: The 1088-byte Winternitz signature (L×32 bytes) - mmrProof: Proof linking the leaf pubkey to the tree node's root CRITICAL FIX (January 2026): Java's Winternitz.getPublicKey() returns a 32-byte digest! From BouncyCastle WinternitzOTSignature.getPublicKey() (lines 103-121): byte[] buf = new byte[keysize * mdsize]; // Full 1088 bytes (34×32) // ... hash each chain 255 times into buf ... messDigestOTS.update(buf, 0, buf.length); // Hash the full key byte[] tmp = new byte[mdsize]; // 32 bytes messDigestOTS.doFinal(tmp, 0); // SHA3-256 return tmp; // Returns 32-byte DIGEST! Similarly, WinternitzOTSVerify.Verify() recovers the full key then hashes to 32 bytes. Winternitz.verify() then compares the 32-byte recovered digest to mPublicKey (32 bytes). Previous bug: We stored 1088-byte full keys, Java expected 32-byte digests → always failed. ## Properties ### leafPubkey > **leafPubkey**: `Bytes` *** ### mmrProof > **mmrProof**: [`MMRProof`](MMRProof.md) *** ### signature > **signature**: `Bytes` --- ## Page: SiteTransactionPermission URL: https://docs.totem.ing/api/totemsdk-server/interfaces/SiteTransactionPermission [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / SiteTransactionPermission # Interface: SiteTransactionPermission ## Properties ### expiresAt > **expiresAt**: `number` *** ### grantedAt > **grantedAt**: `number` *** ### origin > **origin**: `string` *** ### scopes > **scopes**: [`TransactionScope`](TransactionScope.md)[] --- ## Page: SpendableCoinInput URL: https://docs.totem.ing/api/totemsdk-server/interfaces/SpendableCoinInput [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / SpendableCoinInput # Interface: SpendableCoinInput ## Properties ### address > **address**: `string` *** ### amount > **amount**: `string` *** ### coinId > **coinId**: `string` *** ### coinProofData? > `optional` **coinProofData?**: [`CoinProofData`](CoinProofData.md) *** ### rawAmountBytes? > `optional` **rawAmountBytes?**: `Uint8Array`\<`ArrayBufferLike`\> *** ### tokenId > **tokenId**: `string` --- ## Page: StateValue URL: https://docs.totem.ing/api/totemsdk-server/interfaces/StateValue [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / StateValue # Interface: StateValue ## Properties ### port > **port**: `number` *** ### type > **type**: `"string"` \| `"number"` \| `"bool"` \| `"hex"` *** ### value > **value**: `string` \| `bigint` \| `boolean` \| `Uint8Array`\<`ArrayBufferLike`\> --- ## Page: StateVariable URL: https://docs.totem.ing/api/totemsdk-server/interfaces/StateVariable [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / StateVariable # Interface: StateVariable ## Properties ### port > **port**: `number` *** ### type > **type**: `"string"` \| `"number"` \| `"bool"` \| `"hex"` *** ### value > **value**: `string` \| `bigint` \| `boolean` \| `Uint8Array`\<`ArrayBufferLike`\> --- ## Page: StorageAdapter URL: https://docs.totem.ing/api/totemsdk-server/interfaces/StorageAdapter [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / StorageAdapter # Interface: StorageAdapter ## Methods ### clear() > **clear**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### get() > **get**\<`T`\>(`key`): `Promise`\<`T` \| `null`\> #### Type Parameters ##### T `T` #### Parameters ##### key `string` #### Returns `Promise`\<`T` \| `null`\> *** ### has() > **has**(`key`): `Promise`\<`boolean`\> #### Parameters ##### key `string` #### Returns `Promise`\<`boolean`\> *** ### keys() > **keys**(): `Promise`\<`string`[]\> #### Returns `Promise`\<`string`[]\> *** ### remove() > **remove**(`key`): `Promise`\<`boolean`\> #### Parameters ##### key `string` #### Returns `Promise`\<`boolean`\> *** ### set() > **set**\<`T`\>(`key`, `value`): `Promise`\<`void`\> #### Type Parameters ##### T `T` #### Parameters ##### key `string` ##### value `T` #### Returns `Promise`\<`void`\> --- ## Page: StorageAuthProviderOptions URL: https://docs.totem.ing/api/totemsdk-server/interfaces/StorageAuthProviderOptions [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / StorageAuthProviderOptions # Interface: StorageAuthProviderOptions ## Properties ### tokenKey? > `optional` **tokenKey?**: `string` --- ## Page: StoredLease URL: https://docs.totem.ing/api/totemsdk-server/interfaces/StoredLease [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / StoredLease # Interface: StoredLease ## Properties ### createdAt > **createdAt**: `number` *** ### expiresAt > **expiresAt**: `number` *** ### indices > **indices**: [`LeaseWotsIndices`](LeaseWotsIndices.md) *** ### leaseId > **leaseId**: `string` *** ### leaseToken > **leaseToken**: `string` *** ### leaseTTL > **leaseTTL**: `number` *** ### status > **status**: [`LeaseStatus`](../type-aliases/LeaseStatus.md) *** ### treeId? > `optional` **treeId?**: `string` *** ### txId? > `optional` **txId?**: `string` --- ## Page: SyncResult URL: https://docs.totem.ing/api/totemsdk-server/interfaces/SyncResult [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / SyncResult # Interface: SyncResult ## Properties ### drift > **drift**: `number` *** ### hasConflict > **hasConflict**: `boolean` *** ### updated > **updated**: `boolean` --- ## Page: TimerAdapter URL: https://docs.totem.ing/api/totemsdk-server/interfaces/TimerAdapter [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / TimerAdapter # Interface: TimerAdapter ## Methods ### clearInterval() > **clearInterval**(`handle`): `void` #### Parameters ##### handle `Timeout` #### Returns `void` *** ### clearTimeout() > **clearTimeout**(`handle`): `void` #### Parameters ##### handle `Timeout` #### Returns `void` *** ### now() > **now**(): `number` #### Returns `number` *** ### setInterval() > **setInterval**(`callback`, `ms`): `Timeout` #### Parameters ##### callback () => `void` ##### ms `number` #### Returns `Timeout` *** ### setTimeout() > **setTimeout**(`callback`, `ms`): `Timeout` #### Parameters ##### callback () => `void` ##### ms `number` #### Returns `Timeout` --- ## Page: TotemSendTransactionRequest URL: https://docs.totem.ing/api/totemsdk-server/interfaces/TotemSendTransactionRequest [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / TotemSendTransactionRequest # Interface: TotemSendTransactionRequest ## Properties ### burn? > `optional` **burn?**: `string` *** ### contract? > `optional` **contract?**: [`DAppContractCallParams`](DAppContractCallParams.md) *** ### htlc? > `optional` **htlc?**: [`DAppHtlcParams`](DAppHtlcParams.md) *** ### inputs? > `optional` **inputs?**: [`DAppTransactionInput`](DAppTransactionInput.md)[] *** ### intent > **intent**: [`DAppTransactionIntent`](../type-aliases/DAppTransactionIntent.md) *** ### liquidity? > `optional` **liquidity?**: [`DAppLiquidityParams`](DAppLiquidityParams.md) *** ### memo? > `optional` **memo?**: `string` *** ### metadata? > `optional` **metadata?**: `object` #### appName? > `optional` **appName?**: `string` #### description? > `optional` **description?**: `string` #### iconUrl? > `optional` **iconUrl?**: `string` *** ### multisig? > `optional` **multisig?**: [`DAppMultisigParams`](DAppMultisigParams.md) *** ### options? > `optional` **options?**: `object` #### excludeAddresses? > `optional` **excludeAddresses?**: `string`[] #### skipPreview? > `optional` **skipPreview?**: `boolean` #### useSourceAddress? > `optional` **useSourceAddress?**: `string` #### verifyWithTotemidea? > `optional` **verifyWithTotemidea?**: `boolean` *** ### outputs > **outputs**: [`DAppTransactionOutput`](DAppTransactionOutput.md)[] *** ### swap? > `optional` **swap?**: [`DAppSwapParams`](DAppSwapParams.md) *** ### timelock? > `optional` **timelock?**: [`DAppTimelockParams`](DAppTimelockParams.md) *** ### version > **version**: `1` --- ## Page: TotemSendTransactionResponse URL: https://docs.totem.ing/api/totemsdk-server/interfaces/TotemSendTransactionResponse [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / TotemSendTransactionResponse # Interface: TotemSendTransactionResponse ## Properties ### artifactId? > `optional` **artifactId?**: `string` *** ### digestHex? > `optional` **digestHex?**: `string` *** ### error? > `optional` **error?**: `string` *** ### errorCode? > `optional` **errorCode?**: [`TotemTransactionErrorCode`](../type-aliases/TotemTransactionErrorCode.md) *** ### status? > `optional` **status?**: `"pending"` \| `"submitted"` \| `"confirmed"` \| `"rejected"` *** ### success > **success**: `boolean` *** ### txpowid? > `optional` **txpowid?**: `string` *** ### verification? > `optional` **verification?**: `object` #### totemideaNotes? > `optional` **totemideaNotes?**: `string`[] #### totemideaValid? > `optional` **totemideaValid?**: `boolean` #### totemideaWarnings? > `optional` **totemideaWarnings?**: `string`[] --- ## Page: TransactionBuildResult URL: https://docs.totem.ing/api/totemsdk-server/interfaces/TransactionBuildResult [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / TransactionBuildResult # Interface: TransactionBuildResult ## Properties ### digestTx > **digestTx**: `Uint8Array` *** ### digestTxHex > **digestTxHex**: `string` *** ### serialized > **serialized**: `Uint8Array` *** ### serializedHex > **serializedHex**: `string` *** ### transaction > **transaction**: [`MinimaTransaction`](MinimaTransaction.md) --- ## Page: TransactionError URL: https://docs.totem.ing/api/totemsdk-server/interfaces/TransactionError [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / TransactionError # Interface: TransactionError ## Properties ### code > **code**: `number` *** ### message > **message**: `string` *** ### userMessage > **userMessage**: `string` --- ## Page: TransactionLifecycleConfig URL: https://docs.totem.ing/api/totemsdk-server/interfaces/TransactionLifecycleConfig [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / TransactionLifecycleConfig # Interface: TransactionLifecycleConfig ## Properties ### syncWatermarkBeforePrepare? > `optional` **syncWatermarkBeforePrepare?**: `boolean` *** ### validateWatermarkBeforePrepare? > `optional` **validateWatermarkBeforePrepare?**: `boolean` --- ## Page: TransactionMetadata URL: https://docs.totem.ing/api/totemsdk-server/interfaces/TransactionMetadata [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / TransactionMetadata # Interface: TransactionMetadata ## Properties ### amount > **amount**: `string` *** ### to > **to**: `string` *** ### tokenId > **tokenId**: `string` --- ## Page: TransactionReceipt URL: https://docs.totem.ing/api/totemsdk-server/interfaces/TransactionReceipt [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / TransactionReceipt # Interface: TransactionReceipt ## Properties ### amount > **amount**: `string` *** ### indices > **indices**: [`WotsIndices`](WotsIndices.md) *** ### leaseId? > `optional` **leaseId?**: `string` *** ### status > **status**: `"pending"` \| `"confirmed"` \| `"failed"` *** ### timestamp > **timestamp**: `number` *** ### to > **to**: `string` *** ### tokenId > **tokenId**: `string` *** ### txId? > `optional` **txId?**: `string` *** ### txpowid > **txpowid**: `string` --- ## Page: TransactionReceiptStoreConfig URL: https://docs.totem.ing/api/totemsdk-server/interfaces/TransactionReceiptStoreConfig [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / TransactionReceiptStoreConfig # Interface: TransactionReceiptStoreConfig ## Properties ### maxReceipts? > `optional` **maxReceipts?**: `number` *** ### storageKey? > `optional` **storageKey?**: `string` --- ## Page: TransactionRoundState URL: https://docs.totem.ing/api/totemsdk-server/interfaces/TransactionRoundState [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / TransactionRoundState # Interface: TransactionRoundState ## Properties ### newStates > **newStates**: [`StateValue`](StateValue.md)[] *** ### preservedPorts > **preservedPorts**: `number`[] *** ### previousRound > **previousRound**: `number` *** ### round > **round**: `number` --- ## Page: TransactionScope URL: https://docs.totem.ing/api/totemsdk-server/interfaces/TransactionScope [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / TransactionScope # Interface: TransactionScope ## Properties ### allowedIntents > **allowedIntents**: [`DAppTransactionIntent`](../type-aliases/DAppTransactionIntent.md)[] *** ### dailyUsed > **dailyUsed**: `string` *** ### lastResetDate > **lastResetDate**: `string` *** ### maxAmountPerTx > **maxAmountPerTx**: `string` *** ### maxDailyAmount > **maxDailyAmount**: `string` *** ### tokenId > **tokenId**: `string` *** ### tokenSymbol? > `optional` **tokenSymbol?**: `string` --- ## Page: TransactionServiceConfig URL: https://docs.totem.ing/api/totemsdk-server/interfaces/TransactionServiceConfig [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / TransactionServiceConfig # Interface: TransactionServiceConfig ## Properties ### apiKey > **apiKey**: `string` *** ### baseUrl > **baseUrl**: `string` *** ### paramSet? > `optional` **paramSet?**: `string` --- ## Page: TreeSignature URL: https://docs.totem.ing/api/totemsdk-server/interfaces/TreeSignature [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / TreeSignature # Interface: TreeSignature Full Signature structure matching Minima's Signature.java For a 3-level tree, contains 3 SignatureProofs: - Level 0: Signs level 1's root public key - Level 1: Signs level 2's root public key - Level 2: Signs the actual data ## Properties ### proofs > **proofs**: [`SignatureProof`](SignatureProof.md)[] --- ## Page: VerificationResult URL: https://docs.totem.ing/api/totemsdk-server/interfaces/VerificationResult [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / VerificationResult # Interface: VerificationResult ## Properties ### error? > `optional` **error?**: `string` *** ### valid > **valid**: `boolean` --- ## Page: VerifyOutExpectation URL: https://docs.totem.ing/api/totemsdk-server/interfaces/VerifyOutExpectation [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / VerifyOutExpectation # Interface: VerifyOutExpectation ## Properties ### amount > **amount**: `string` \| `bigint` *** ### inputIndex > **inputIndex**: `number` \| `"@INPUT"` *** ### keepState > **keepState**: `boolean` *** ### outputAddress > **outputAddress**: `string` *** ### tokenId > **tokenId**: `string` --- ## Page: WatermarkState URL: https://docs.totem.ing/api/totemsdk-server/interfaces/WatermarkState [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / WatermarkState # Interface: WatermarkState ## Properties ### lastSyncTimestamp? > `optional` **lastSyncTimestamp?**: `number` *** ### next\_addressIndex > **next\_addressIndex**: `number` *** ### next\_l1 > **next\_l1**: `number` *** ### next\_l2 > **next\_l2**: `number` *** ### serverWatermark? > `optional` **serverWatermark?**: `WotsIndices` *** ### usedIndices > **usedIndices**: \[`number`, `number`, `number`\][] --- ## Page: WatermarkStoreConfig URL: https://docs.totem.ing/api/totemsdk-server/interfaces/WatermarkStoreConfig [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / WatermarkStoreConfig # Interface: WatermarkStoreConfig ## Properties ### storageKey? > `optional` **storageKey?**: `string` --- ## Page: WatermarkSyncFunction URL: https://docs.totem.ing/api/totemsdk-server/interfaces/WatermarkSyncFunction [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / WatermarkSyncFunction # Interface: WatermarkSyncFunction() > **WatermarkSyncFunction**(`rootPublicKey`): `Promise`\<\{ `multiDeviceConflict`: `boolean`; `updated`: `boolean`; \}\> ## Parameters ### rootPublicKey `string` ## Returns `Promise`\<\{ `multiDeviceConflict`: `boolean`; `updated`: `boolean`; \}\> --- ## Page: WebSocketClient URL: https://docs.totem.ing/api/totemsdk-server/interfaces/WebSocketClient [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / WebSocketClient # Interface: WebSocketClient ## Properties ### onclose > **onclose**: ((`ev`) => `void`) \| `null` *** ### onerror > **onerror**: ((`ev`) => `void`) \| `null` *** ### onmessage > **onmessage**: ((`ev`) => `void`) \| `null` *** ### onopen > **onopen**: ((`ev`) => `void`) \| `null` *** ### readyState > `readonly` **readyState**: `number` *** ### url > `readonly` **url**: `string` ## Methods ### addEventListener() > **addEventListener**\<`K`\>(`event`, `listener`): `void` #### Type Parameters ##### K `K` *extends* keyof [`WebSocketEventMap`](../type-aliases/WebSocketEventMap.md) #### Parameters ##### event `K` ##### listener (`ev`) => `void` #### Returns `void` *** ### close() > **close**(`code?`, `reason?`): `void` #### Parameters ##### code? `number` ##### reason? `string` #### Returns `void` *** ### removeAllListeners() > **removeAllListeners**(): `void` #### Returns `void` *** ### removeEventListener() > **removeEventListener**\<`K`\>(`event`, `listener`): `void` #### Type Parameters ##### K `K` *extends* keyof [`WebSocketEventMap`](../type-aliases/WebSocketEventMap.md) #### Parameters ##### event `K` ##### listener (`ev`) => `void` #### Returns `void` *** ### send() > **send**(`data`): `void` #### Parameters ##### data `string` \| [`BinaryData`](../type-aliases/BinaryData.md) #### Returns `void` *** ### terminate() > **terminate**(): `void` #### Returns `void` --- ## Page: WebSocketCloseEvent URL: https://docs.totem.ing/api/totemsdk-server/interfaces/WebSocketCloseEvent [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / WebSocketCloseEvent # Interface: WebSocketCloseEvent ## Properties ### code > **code**: `number` *** ### reason > **reason**: `string` *** ### type > **type**: `"close"` *** ### wasClean > **wasClean**: `boolean` --- ## Page: WebSocketErrorEvent URL: https://docs.totem.ing/api/totemsdk-server/interfaces/WebSocketErrorEvent [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / WebSocketErrorEvent # Interface: WebSocketErrorEvent ## Properties ### error? > `optional` **error?**: `Error` *** ### message? > `optional` **message?**: `string` *** ### type > **type**: `"error"` --- ## Page: WebSocketFactory URL: https://docs.totem.ing/api/totemsdk-server/interfaces/WebSocketFactory [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / WebSocketFactory # Interface: WebSocketFactory ## Methods ### create() > **create**(`url`, `protocols?`, `options?`): [`WebSocketClient`](WebSocketClient.md) #### Parameters ##### url `string` ##### protocols? `string`[] ##### options? [`WebSocketFactoryOptions`](WebSocketFactoryOptions.md) #### Returns [`WebSocketClient`](WebSocketClient.md) *** ### dispose() > **dispose**(): `void` #### Returns `void` --- ## Page: WebSocketFactoryOptions URL: https://docs.totem.ing/api/totemsdk-server/interfaces/WebSocketFactoryOptions [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / WebSocketFactoryOptions # Interface: WebSocketFactoryOptions ## Properties ### maxPayloadBytes? > `optional` **maxPayloadBytes?**: `number` *** ### pingIntervalMs? > `optional` **pingIntervalMs?**: `number` *** ### pongTimeoutMs? > `optional` **pongTimeoutMs?**: `number` --- ## Page: WebSocketMessageEvent URL: https://docs.totem.ing/api/totemsdk-server/interfaces/WebSocketMessageEvent [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / WebSocketMessageEvent # Interface: WebSocketMessageEvent ## Properties ### data > **data**: `string` \| [`BinaryData`](../type-aliases/BinaryData.md) *** ### type > **type**: `"message"` --- ## Page: WebSocketOpenEvent URL: https://docs.totem.ing/api/totemsdk-server/interfaces/WebSocketOpenEvent [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / WebSocketOpenEvent # Interface: WebSocketOpenEvent ## Properties ### type > **type**: `"open"` --- ## Page: WitnessBundle URL: https://docs.totem.ing/api/totemsdk-server/interfaces/WitnessBundle [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / WitnessBundle # ~~Interface: WitnessBundle~~ ## Deprecated Use HierarchicalWitnessBundle. Kept for backward compatibility. ## Properties ### ~~addressIndex~~ > **addressIndex**: `number` *** ### ~~l1~~ > **l1**: `number` *** ### ~~l2~~ > **l2**: `number` *** ### ~~signatures~~ > **signatures**: `object` #### ~~l1Proof~~ > **l1Proof**: `string`[] #### ~~l2Proof~~ > **l2Proof**: `string`[] #### ~~l3Proof~~ > **l3Proof**: `string`[] --- ## Page: WotsIndices URL: https://docs.totem.ing/api/totemsdk-server/interfaces/WotsIndices [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / WotsIndices # Interface: WotsIndices ## Properties ### addressIndex > **addressIndex**: `number` *** ### l1 > **l1**: `number` *** ### l2 > **l2**: `number` --- ## Page: WotsSigningDependencies URL: https://docs.totem.ing/api/totemsdk-server/interfaces/WotsSigningDependencies [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / WotsSigningDependencies # ~~Interface: WotsSigningDependencies~~ ## Deprecated WotsSigningDependencies is no longer used by TransactionService.sign(). The service now derives everything from the seed and indices directly using the built-in TreeKey implementation. This interface is kept for backward compatibility only and will be removed in a future version. ## Properties ### ~~defaultParamSet?~~ > `optional` **defaultParamSet?**: `any` *** ### ~~fromHex?~~ > `optional` **fromHex?**: (`hex`) => `Uint8Array` #### Parameters ##### hex `string` #### Returns `Uint8Array` *** ### ~~getParamSet?~~ > `optional` **getParamSet?**: (`name`) => `any` #### Parameters ##### name `string` #### Returns `any` *** ### ~~wotsSign?~~ > `optional` **wotsSign?**: (`seed`, `index`, `message`, `paramSet`) => `Uint8Array` #### Parameters ##### seed `Uint8Array` ##### index `number` ##### message `Uint8Array` ##### paramSet `any` #### Returns `Uint8Array` --- ## Page: BinaryData URL: https://docs.totem.ing/api/totemsdk-server/type-aliases/BinaryData [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / BinaryData # Type Alias: BinaryData > **BinaryData** = `Uint8Array` \| `ArrayBuffer` --- ## Page: Bytes URL: https://docs.totem.ing/api/totemsdk-server/type-aliases/Bytes [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / Bytes # Type Alias: Bytes > **Bytes** = `Uint8Array` Streamable.ts - Canonical Java-Compatible Serialization Primitives This module provides byte-exact serialization functions matching Minima's Java Streamable interface and its implementations. JAVA REFERENCE CLASSES: - MiniData.writeDataStream(): 4-byte int length + raw bytes - MiniNumber.writeDataStream(): 1-byte scale + 1-byte len + BigInteger bytes - MiniString.writeDataStream(): delegates to MiniData(UTF-8 bytes) - MiniByte.writeDataStream(): single byte - Crypto.writeHashToStream(): 4-byte int length + hash bytes - MMREntryNumber.writeDataStream(): 1-byte len + BigInteger bytes CRITICAL NOTES: - MiniNumber uses 1-byte length, NOT 4-byte like MiniData - BigInteger.toByteArray() uses two's complement (leading 0 if high bit set) - Zero encodes as length=1, value=0x00 Created: 2026-01-20 Purpose: Single source of truth for all Minima type serialization --- ## Page: DAppTransactionIntent URL: https://docs.totem.ing/api/totemsdk-server/type-aliases/DAppTransactionIntent [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / DAppTransactionIntent # Type Alias: DAppTransactionIntent > **DAppTransactionIntent** = `"send"` \| `"token_send"` \| `"swap"` \| `"liquidity_add"` \| `"liquidity_remove"` \| `"contract_call"` \| `"multisig"` \| `"timelock"` \| `"htlc"` \| `"custom"` --- ## Page: LeaseExpiryCallback URL: https://docs.totem.ing/api/totemsdk-server/type-aliases/LeaseExpiryCallback [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / LeaseExpiryCallback # Type Alias: LeaseExpiryCallback > **LeaseExpiryCallback** = (`event`) => `void` ## Parameters ### event [`LeaseExpiryEvent`](../interfaces/LeaseExpiryEvent.md) ## Returns `void` --- ## Page: LeaseStatus URL: https://docs.totem.ing/api/totemsdk-server/type-aliases/LeaseStatus [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / LeaseStatus # Type Alias: LeaseStatus > **LeaseStatus** = `"pending"` \| `"active"` \| `"expired"` \| `"finalized"` \| `"cancelled"` --- ## Page: ParamSet URL: https://docs.totem.ing/api/totemsdk-server/type-aliases/ParamSet [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / ParamSet # Type Alias: ParamSet > **ParamSet** = `object` WOTS Parameter Set - BouncyCastle Compatible (w=8) Matches Minima Java implementation which uses BouncyCastle: - Winternitz.java: WINTERNITZ_VALUE = 8 - WinternitzOTSignature.java: w=8 means 8 BITS per digit (not base-8) - SHA3-256 hash function (mdsize = 32 bytes) Chain count calculation (from WinternitzOTSignature constructor): messagesize = ((mdsize << 3) + w - 1) / w = (256 + 7) / 8 = 32 checksumsize = getLog((messagesize << w) + 1) = getLog(8193) = 14 bits keysize = messagesize + (checksumsize + w - 1) / w = 32 + (14 + 7) / 8 = 34 So L = 34 chains total, each chain value is 0-255 (8-bit digit) ## Properties ### checksumDigits > **checksumDigits**: `2` *** ### checksumSize > **checksumSize**: `14` *** ### L > **L**: `34` *** ### maxDigit > **maxDigit**: `255` *** ### messageSize > **messageSize**: `32` *** ### n > **n**: `256` *** ### name > **name**: `"minima"` *** ### w > **w**: `8` --- ## Page: PrepareArgs URL: https://docs.totem.ing/api/totemsdk-server/type-aliases/PrepareArgs [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / PrepareArgs # Type Alias: PrepareArgs > **PrepareArgs** = `object` Totem <-> Axia hardened WOTS helpers (no deps on server internals). ## Properties ### amount > **amount**: `string` *** ### burn? > `optional` **burn?**: `string` \| `null` *** ### digestL2? > `optional` **digestL2?**: `string` \| `null` *** ### digestL3? > `optional` **digestL3?**: `string` \| `null` *** ### rootPublicKey > **rootPublicKey**: `string` *** ### to > **to**: `string` *** ### tokenId? > `optional` **tokenId?**: `string` *** ### ttlMs? > `optional` **ttlMs?**: `number` *** ### txId > **txId**: `string` --- ## Page: PrepareResp URL: https://docs.totem.ing/api/totemsdk-server/type-aliases/PrepareResp [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / PrepareResp # Type Alias: PrepareResp > **PrepareResp** = `object` ## Properties ### digestTx? > `optional` **digestTx?**: `string` \| `null` *** ### lease > **lease**: `object` #### addressIndex > **addressIndex**: `number` #### l1 > **l1**: `number` #### l2 > **l2**: `number` *** ### leaseToken > **leaseToken**: `string` *** ### txId > **txId**: `string` --- ## Page: ProgressCallback URL: https://docs.totem.ing/api/totemsdk-server/type-aliases/ProgressCallback [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / ProgressCallback # Type Alias: ProgressCallback > **ProgressCallback** = (`progress`) => `void` ## Parameters ### progress [`KeyGenProgress`](../interfaces/KeyGenProgress.md) ## Returns `void` --- ## Page: ScriptType URL: https://docs.totem.ing/api/totemsdk-server/type-aliases/ScriptType [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / ScriptType # Type Alias: ScriptType > **ScriptType** = `"signedby"` \| `"multisig"` \| `"multisig_mofn"` \| `"timelock"` \| `"htlc"` \| `"mast"` \| `"exchange"` \| `"vault"` \| `"flashcash"` \| `"slowcash"` \| `"stateful"` \| `"custom"` --- ## Page: StateVariableType URL: https://docs.totem.ing/api/totemsdk-server/type-aliases/StateVariableType [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / StateVariableType # Type Alias: StateVariableType > **StateVariableType** = `"STATE"` \| `"PREVSTATE"` \| `"SAMESTATE"` --- ## Page: TimerHandle URL: https://docs.totem.ing/api/totemsdk-server/type-aliases/TimerHandle [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / TimerHandle # Type Alias: TimerHandle > **TimerHandle** = `ReturnType`\<*typeof* `setTimeout`\> --- ## Page: TotemTransactionErrorCode URL: https://docs.totem.ing/api/totemsdk-server/type-aliases/TotemTransactionErrorCode [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / TotemTransactionErrorCode # Type Alias: TotemTransactionErrorCode > **TotemTransactionErrorCode** = `"INVALID_REQUEST"` \| `"INSUFFICIENT_FUNDS"` \| `"PERMISSION_DENIED"` \| `"USER_REJECTED"` \| `"SITE_NOT_CONNECTED"` \| `"SPENDING_LIMIT_EXCEEDED"` \| `"TOKEN_NOT_ALLOWED"` \| `"VERIFICATION_FAILED"` \| `"BUILD_FAILED"` \| `"SIGN_FAILED"` \| `"BROADCAST_FAILED"` \| `"TIMEOUT"` --- ## Page: WebSocketEventMap URL: https://docs.totem.ing/api/totemsdk-server/type-aliases/WebSocketEventMap [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / WebSocketEventMap # Type Alias: WebSocketEventMap > **WebSocketEventMap** = `object` ## Properties ### close > **close**: [`WebSocketCloseEvent`](../interfaces/WebSocketCloseEvent.md) *** ### error > **error**: [`WebSocketErrorEvent`](../interfaces/WebSocketErrorEvent.md) *** ### message > **message**: [`WebSocketMessageEvent`](../interfaces/WebSocketMessageEvent.md) *** ### open > **open**: [`WebSocketOpenEvent`](../interfaces/WebSocketOpenEvent.md) --- ## Page: WotsKeypair URL: https://docs.totem.ing/api/totemsdk-server/type-aliases/WotsKeypair [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / WotsKeypair # Type Alias: WotsKeypair > **WotsKeypair** = `object` ## Properties ### index > **index**: `number` *** ### pk > **pk**: `Uint8Array` *** ### seed > **seed**: `Uint8Array` --- ## Page: WotsSignature URL: https://docs.totem.ing/api/totemsdk-server/type-aliases/WotsSignature [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / WotsSignature # Type Alias: WotsSignature > **WotsSignature** = `object` ## Properties ### index > **index**: `number` *** ### sig > **sig**: `Uint8Array`[] *** ### w > **w**: `number` --- ## Page: CORE_BUILD_ID URL: https://docs.totem.ing/api/totemsdk-server/variables/CORE_BUILD_ID [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / CORE\_BUILD\_ID # Variable: CORE\_BUILD\_ID > `const` **CORE\_BUILD\_ID**: `"2026.02.05-v1"` = `"2026.02.05-v1"` SDK Core Version Information CORE_BUILD_ID is used to detect bundle duplication issues where the extension might bundle two different copies of sdk-core, computing addresses with one copy and signing with another. If you see different CORE_BUILD_IDs logged from wallet creation vs signing modules, there's a bundling issue. --- ## Page: CORE_VERSION URL: https://docs.totem.ing/api/totemsdk-server/variables/CORE_VERSION [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / CORE\_VERSION # Variable: CORE\_VERSION > `const` **CORE\_VERSION**: `"1.0.0"` = `"1.0.0"` --- ## Page: DEFAULT_KEYS_PER_LEVEL URL: https://docs.totem.ing/api/totemsdk-server/variables/DEFAULT_KEYS_PER_LEVEL [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / DEFAULT\_KEYS\_PER\_LEVEL # Variable: DEFAULT\_KEYS\_PER\_LEVEL > `const` **DEFAULT\_KEYS\_PER\_LEVEL**: `64` = `64` --- ## Page: DEFAULT_LEVELS URL: https://docs.totem.ing/api/totemsdk-server/variables/DEFAULT_LEVELS [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / DEFAULT\_LEVELS # Variable: DEFAULT\_LEVELS > `const` **DEFAULT\_LEVELS**: `3` = `3` --- ## Page: F URL: https://docs.totem.ing/api/totemsdk-server/variables/F [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / F # Variable: F > `const` **F**: (`x`) => `Uint8Array`\<`ArrayBufferLike`\> ## Parameters ### x `Uint8Array` ## Returns `Uint8Array`\<`ArrayBufferLike`\> --- ## Page: MINIMA_CONSTANTS URL: https://docs.totem.ing/api/totemsdk-server/variables/MINIMA_CONSTANTS [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / MINIMA\_CONSTANTS # Variable: MINIMA\_CONSTANTS > `const` **MINIMA\_CONSTANTS**: `object` ## Type Declaration ### ADDRESS\_PREFIX > `readonly` **ADDRESS\_PREFIX**: `"Mx"` ### MAX\_SIGNATURES > `readonly` **MAX\_SIGNATURES**: `262144` ### NETWORK\_ID > `readonly` **NETWORK\_ID**: `1` ### SIGNATURE\_LEVELS > `readonly` **SIGNATURE\_LEVELS**: `3` ### WOTS\_N > `readonly` **WOTS\_N**: `32` ### WOTS\_W > `readonly` **WOTS\_W**: `8` --- ## Page: STATETYPE_BOOL URL: https://docs.totem.ing/api/totemsdk-server/variables/STATETYPE_BOOL [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / STATETYPE\_BOOL # Variable: STATETYPE\_BOOL > `const` **STATETYPE\_BOOL**: `8` = `8` --- ## Page: STATETYPE_HEX URL: https://docs.totem.ing/api/totemsdk-server/variables/STATETYPE_HEX [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / STATETYPE\_HEX # Variable: STATETYPE\_HEX > `const` **STATETYPE\_HEX**: `1` = `1` --- ## Page: STATETYPE_NUMBER URL: https://docs.totem.ing/api/totemsdk-server/variables/STATETYPE_NUMBER [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / STATETYPE\_NUMBER # Variable: STATETYPE\_NUMBER > `const` **STATETYPE\_NUMBER**: `2` = `2` --- ## Page: STATETYPE_STRING URL: https://docs.totem.ing/api/totemsdk-server/variables/STATETYPE_STRING [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / STATETYPE\_STRING # Variable: STATETYPE\_STRING > `const` **STATETYPE\_STRING**: `4` = `4` --- ## Page: TOTEM_SEND_TRANSACTION_VERSION URL: https://docs.totem.ing/api/totemsdk-server/variables/TOTEM_SEND_TRANSACTION_VERSION [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / TOTEM\_SEND\_TRANSACTION\_VERSION # Variable: TOTEM\_SEND\_TRANSACTION\_VERSION > `const` **TOTEM\_SEND\_TRANSACTION\_VERSION**: `1` = `1` --- ## Page: WORD_LIST URL: https://docs.totem.ing/api/totemsdk-server/variables/WORD_LIST [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / WORD\_LIST # Variable: WORD\_LIST > `const` **WORD\_LIST**: readonly `string`[] Official BIP39 English word list (2048 words) From https://github.com/bitcoin/bips/blob/master/bip-0039/english.txt --- ## Page: WOTS_MINIMA URL: https://docs.totem.ing/api/totemsdk-server/variables/WOTS_MINIMA [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / WOTS\_MINIMA # Variable: WOTS\_MINIMA > `const` **WOTS\_MINIMA**: [`ParamSet`](../type-aliases/ParamSet.md) --- ## Page: WOTS_V1_DEV URL: https://docs.totem.ing/api/totemsdk-server/variables/WOTS_V1_DEV [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / WOTS\_V1\_DEV # Variable: WOTS\_V1\_DEV > `const` **WOTS\_V1\_DEV**: [`ParamSet`](../type-aliases/ParamSet.md) --- ## Page: WOTS_V2_SPEC URL: https://docs.totem.ing/api/totemsdk-server/variables/WOTS_V2_SPEC [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / WOTS\_V2\_SPEC # Variable: WOTS\_V2\_SPEC > `const` **WOTS\_V2\_SPEC**: [`ParamSet`](../type-aliases/ParamSet.md) --- ## Page: WebSocketReadyState URL: https://docs.totem.ing/api/totemsdk-server/variables/WebSocketReadyState [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / WebSocketReadyState # Variable: WebSocketReadyState > `const` **WebSocketReadyState**: `object` ## Type Declaration ### CLOSED > `readonly` **CLOSED**: `3` ### CLOSING > `readonly` **CLOSING**: `2` ### CONNECTING > `readonly` **CONNECTING**: `0` ### OPEN > `readonly` **OPEN**: `1` --- ## Page: bytesToHex URL: https://docs.totem.ing/api/totemsdk-server/variables/bytesToHex [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / bytesToHex # Variable: bytesToHex > `const` **bytesToHex**: *typeof* `bytes_to_hex_wasm` --- ## Page: computeTransactionDigest URL: https://docs.totem.ing/api/totemsdk-server/variables/computeTransactionDigest [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / computeTransactionDigest # Variable: computeTransactionDigest > `const` **computeTransactionDigest**: *typeof* `compute_transaction_digest_wasm` --- ## Page: concatBytes URL: https://docs.totem.ing/api/totemsdk-server/variables/concatBytes [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / concatBytes # Variable: concatBytes > `const` **concatBytes**: *typeof* `concat_bytes_wasm` --- ## Page: createChallenge URL: https://docs.totem.ing/api/totemsdk-server/variables/createChallenge [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / createChallenge # Variable: createChallenge > `const` **createChallenge**: *typeof* `create_challenge_wasm` --- ## Page: deriveChainSeedJava URL: https://docs.totem.ing/api/totemsdk-server/variables/deriveChainSeedJava [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / deriveChainSeedJava # Variable: deriveChainSeedJava > `const` **deriveChainSeedJava**: *typeof* `derive_chain_seed_wasm` --- ## Page: deriveFullPublicKey URL: https://docs.totem.ing/api/totemsdk-server/variables/deriveFullPublicKey [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / deriveFullPublicKey # Variable: deriveFullPublicKey > `const` **deriveFullPublicKey**: *typeof* `derive_full_public_key_wasm` --- ## Page: derivePKdigest URL: https://docs.totem.ing/api/totemsdk-server/variables/derivePKdigest [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / derivePKdigest # Variable: derivePKdigest > `const` **derivePKdigest**: *typeof* `derive_pk_digest_wasm` --- ## Page: derivePerAddressSeed URL: https://docs.totem.ing/api/totemsdk-server/variables/derivePerAddressSeed [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / derivePerAddressSeed # Variable: derivePerAddressSeed > `const` **derivePerAddressSeed**: *typeof* `derive_per_address_seed_wasm` --- ## Page: deriveRootPrivSeed URL: https://docs.totem.ing/api/totemsdk-server/variables/deriveRootPrivSeed [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / deriveRootPrivSeed # Variable: deriveRootPrivSeed > `const` **deriveRootPrivSeed**: *typeof* `derive_root_priv_seed_wasm` --- ## Page: deserializeMMRProof URL: https://docs.totem.ing/api/totemsdk-server/variables/deserializeMMRProof [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / deserializeMMRProof # ~~Variable: deserializeMMRProof~~ > `const` **deserializeMMRProof**: *typeof* [`parseMMRProofFromHex`](../functions/parseMMRProofFromHex.md) ## Deprecated Use parseMMRProofFromHex --- ## Page: expandPrivateKey URL: https://docs.totem.ing/api/totemsdk-server/variables/expandPrivateKey [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / expandPrivateKey # Variable: expandPrivateKey > `const` **expandPrivateKey**: *typeof* `expand_private_key_wasm` --- ## Page: fromHex URL: https://docs.totem.ing/api/totemsdk-server/variables/fromHex [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / fromHex # Variable: fromHex > `const` **fromHex**: (`h`) => `Uint8Array` ## Parameters ### h `string` ## Returns `Uint8Array` --- ## Page: h URL: https://docs.totem.ing/api/totemsdk-server/variables/h [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / h # Variable: h > `const` **h**: (`x`) => `Uint8Array`\<`ArrayBufferLike`\> ## Parameters ### x `Uint8Array` ## Returns `Uint8Array`\<`ArrayBufferLike`\> --- ## Page: hashChain URL: https://docs.totem.ing/api/totemsdk-server/variables/hashChain [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / hashChain # Variable: hashChain > `const` **hashChain**: *typeof* `hash_chain_wasm` --- ## Page: hex URL: https://docs.totem.ing/api/totemsdk-server/variables/hex [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / hex # Variable: hex > `const` **hex**: (`u`) => `string` ## Parameters ### u `Uint8Array` ## Returns `string` --- ## Page: hexToBytes URL: https://docs.totem.ing/api/totemsdk-server/variables/hexToBytes [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / hexToBytes # Variable: hexToBytes > `const` **hexToBytes**: *typeof* `hex_to_bytes_wasm` --- ## Page: makeMxAddress URL: https://docs.totem.ing/api/totemsdk-server/variables/makeMxAddress [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / makeMxAddress # Variable: makeMxAddress > `const` **makeMxAddress**: *typeof* `make_mx_address_wasm` --- ## Page: mmrRootFromPublicKeys URL: https://docs.totem.ing/api/totemsdk-server/variables/mmrRootFromPublicKeys [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / mmrRootFromPublicKeys # Variable: mmrRootFromPublicKeys > `const` **mmrRootFromPublicKeys**: *typeof* `mmr_root_from_public_keys_wasm` --- ## Page: parseMxAddress URL: https://docs.totem.ing/api/totemsdk-server/variables/parseMxAddress [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / parseMxAddress # Variable: parseMxAddress > `const` **parseMxAddress**: *typeof* `parse_mx_address_wasm` --- ## Page: precomputeTransactionCoinID URL: https://docs.totem.ing/api/totemsdk-server/variables/precomputeTransactionCoinID [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / precomputeTransactionCoinID # Variable: precomputeTransactionCoinID > `const` **precomputeTransactionCoinID**: *typeof* `precompute_transaction_coin_id_wasm` --- ## Page: serializeRealMMRProof URL: https://docs.totem.ing/api/totemsdk-server/variables/serializeRealMMRProof [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / serializeRealMMRProof # Variable: serializeRealMMRProof > `const` **serializeRealMMRProof**: *typeof* [`serializeMMRProof`](../functions/serializeMMRProof.md) --- ## Page: serializeTransaction URL: https://docs.totem.ing/api/totemsdk-server/variables/serializeTransaction [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / serializeTransaction # Variable: serializeTransaction > `const` **serializeTransaction**: *typeof* `serialize_transaction_wasm` --- ## Page: sha3_256 URL: https://docs.totem.ing/api/totemsdk-server/variables/sha3_256 [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / sha3\_256 # Variable: sha3\_256 > `const` **sha3\_256**: *typeof* `sha3_256_wasm` --- ## Page: timingSafeEqual URL: https://docs.totem.ing/api/totemsdk-server/variables/timingSafeEqual [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / timingSafeEqual # Variable: timingSafeEqual > `const` **timingSafeEqual**: *typeof* `timing_safe_equal_wasm` --- ## Page: u16be URL: https://docs.totem.ing/api/totemsdk-server/variables/u16be [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / u16be # Variable: u16be > `const` **u16be**: (`n`) => `Uint8Array`\<`ArrayBuffer`\> ## Parameters ### n `number` ## Returns `Uint8Array`\<`ArrayBuffer`\> --- ## Page: u32be URL: https://docs.totem.ing/api/totemsdk-server/variables/u32be [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / u32be # Variable: u32be > `const` **u32be**: (`n`) => `Uint8Array`\<`ArrayBuffer`\> ## Parameters ### n `number` ## Returns `Uint8Array`\<`ArrayBuffer`\> --- ## Page: validateChallenge URL: https://docs.totem.ing/api/totemsdk-server/variables/validateChallenge [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / validateChallenge # Variable: validateChallenge > `const` **validateChallenge**: *typeof* `validate_challenge_wasm` --- ## Page: verifyMMRProof URL: https://docs.totem.ing/api/totemsdk-server/variables/verifyMMRProof [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / verifyMMRProof # Variable: verifyMMRProof > `const` **verifyMMRProof**: *typeof* `verify_mmr_proof_wasm` --- ## Page: wotsPkFromSig URL: https://docs.totem.ing/api/totemsdk-server/variables/wotsPkFromSig [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / wotsPkFromSig # Variable: wotsPkFromSig > `const` **wotsPkFromSig**: *typeof* `wots_pk_from_sig_wasm` --- ## Page: wotsPublicKeyFromSeed URL: https://docs.totem.ing/api/totemsdk-server/variables/wotsPublicKeyFromSeed [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / wotsPublicKeyFromSeed # Variable: wotsPublicKeyFromSeed > `const` **wotsPublicKeyFromSeed**: *typeof* `derive_pk_digest_wasm` --- ## Page: wotsSign URL: https://docs.totem.ing/api/totemsdk-server/variables/wotsSign [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / wotsSign # Variable: wotsSign > `const` **wotsSign**: *typeof* `wots_sign_wasm` --- ## Page: wotsVerify URL: https://docs.totem.ing/api/totemsdk-server/variables/wotsVerify [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / wotsVerify # Variable: wotsVerify > `const` **wotsVerify**: *typeof* `wots_verify_wasm` --- ## Page: wotsVerifyDigest URL: https://docs.totem.ing/api/totemsdk-server/variables/wotsVerifyDigest [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / wotsVerifyDigest # Variable: wotsVerifyDigest > `const` **wotsVerifyDigest**: *typeof* `wots_verify_digest_wasm` --- ## Page: writeMiniData URL: https://docs.totem.ing/api/totemsdk-server/variables/writeMiniData [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / writeMiniData # Variable: writeMiniData > `const` **writeMiniData**: *typeof* `write_mini_data_wasm` --- ## Page: writeMiniString URL: https://docs.totem.ing/api/totemsdk-server/variables/writeMiniString [**@totemsdk/server**](../index.md) *** [@totemsdk/server](../index.md) / writeMiniString # Variable: writeMiniString > `const` **writeMiniString**: *typeof* `write_mini_string_wasm` --- ## Page: addSpatialRelationToGraph URL: https://docs.totem.ing/api/totemsdk-spatial-proof/functions/addSpatialRelationToGraph [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / addSpatialRelationToGraph # Function: addSpatialRelationToGraph() > **addSpatialRelationToGraph**(`graph`, `claim`): `ProofGraph` Add a spatial relation claim as a 'custom' node to a proof graph (immutable — returns a new graph). ## Parameters ### graph `ProofGraph` ### claim [`SpatialRelationClaim`](../interfaces/SpatialRelationClaim.md) ## Returns `ProofGraph` --- ## Page: bboxCovers URL: https://docs.totem.ing/api/totemsdk-spatial-proof/functions/bboxCovers [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / bboxCovers # Function: bboxCovers() > **bboxCovers**(`a`, `b`): `boolean` True when box `a` fully covers box `b`. ## Parameters ### a [`BoundingBox`](../interfaces/BoundingBox.md) ### b [`BoundingBox`](../interfaces/BoundingBox.md) ## Returns `boolean` --- ## Page: bboxIntersects URL: https://docs.totem.ing/api/totemsdk-spatial-proof/functions/bboxIntersects [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / bboxIntersects # Function: bboxIntersects() > **bboxIntersects**(`a`, `b`): `boolean` True when two bounding boxes share any area or edge. ## Parameters ### a [`BoundingBox`](../interfaces/BoundingBox.md) ### b [`BoundingBox`](../interfaces/BoundingBox.md) ## Returns `boolean` --- ## Page: canonicalJson URL: https://docs.totem.ing/api/totemsdk-spatial-proof/functions/canonicalJson [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / canonicalJson # Function: canonicalJson() > **canonicalJson**(`value`): `string` Deterministic canonical JSON with recursively sorted keys. Never use bare JSON.stringify on objects passed to hash or sign operations. ## Parameters ### value `unknown` ## Returns `string` --- ## Page: computeGeometryHash URL: https://docs.totem.ing/api/totemsdk-spatial-proof/functions/computeGeometryHash [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / computeGeometryHash # Function: computeGeometryHash() > **computeGeometryHash**(`geometry`): `string` Compute the stable geometry identifier: "totem:geo:". Deterministic over the exact geometry — the same geometry always hashes to the same identifier. ## Parameters ### geometry [`GeoGeometry`](../type-aliases/GeoGeometry.md) ## Returns `string` --- ## Page: computeSpatialObjectId URL: https://docs.totem.ing/api/totemsdk-spatial-proof/functions/computeSpatialObjectId [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / computeSpatialObjectId # Function: computeSpatialObjectId() > **computeSpatialObjectId**(`input`): `string` Compute a stable URI-style spatial object ID: "totem:spatial:". Callers pass the object minus spatialId; metadata is excluded internally. ## Parameters ### input `Omit`\<[`SpatialObject`](../interfaces/SpatialObject.md), `"spatialId"`\> ## Returns `string` --- ## Page: computeSpatialRelationId URL: https://docs.totem.ing/api/totemsdk-spatial-proof/functions/computeSpatialRelationId [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / computeSpatialRelationId # Function: computeSpatialRelationId() > **computeSpatialRelationId**(`input`): `string` Compute a stable URI-style spatial relation claim ID using the same "totem:spatial:" namespace as spatial objects. Relation and object hashes are distinguishable by their content-derived preimage, so the shared prefix cannot cause an ID collision for equivalent logical content. ## Parameters ### input `Omit`\<[`SpatialRelationClaim`](../interfaces/SpatialRelationClaim.md), `"relationId"`\> ## Returns `string` --- ## Page: createUnsignedSpatialProof URL: https://docs.totem.ing/api/totemsdk-spatial-proof/functions/createUnsignedSpatialProof [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / createUnsignedSpatialProof # Function: createUnsignedSpatialProof() > **createUnsignedSpatialProof**(`params`): `UnsignedProof` Create an unsigned attestation proof for a spatial relation claim. The proof claims: "this subject relates to this spatial object in this way at this time, computed by this engine." It does NOT claim the relation is geodetically exact — approximation notes travel inside the claim result. ## Parameters ### params [`CreateSpatialProofParams`](../interfaces/CreateSpatialProofParams.md) ## Returns `UnsignedProof` --- ## Page: distanceMeters URL: https://docs.totem.ing/api/totemsdk-spatial-proof/functions/distanceMeters [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / distanceMeters # Function: distanceMeters() > **distanceMeters**(`a`, `b`): `number` Great-circle distance between two [lon, lat] points using the Haversine formula. Approximate (spherical Earth, R = 6371 km). ## Parameters ### a [`Coordinate`](../type-aliases/Coordinate.md) ### b [`Coordinate`](../type-aliases/Coordinate.md) ## Returns `number` --- ## Page: distancePointToLineStringMeters URL: https://docs.totem.ing/api/totemsdk-spatial-proof/functions/distancePointToLineStringMeters [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / distancePointToLineStringMeters # Function: distancePointToLineStringMeters() > **distancePointToLineStringMeters**(`point`, `line`): `number` Minimum distance from a point to a LineString. Approximate: equirectangular scaling applied per segment. ## Parameters ### point [`Coordinate`](../type-aliases/Coordinate.md) ### line [`GeoLineStringGeometry`](../interfaces/GeoLineStringGeometry.md) ## Returns `number` --- ## Page: distancePointToSegmentMeters URL: https://docs.totem.ing/api/totemsdk-spatial-proof/functions/distancePointToSegmentMeters [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / distancePointToSegmentMeters # Function: distancePointToSegmentMeters() > **distancePointToSegmentMeters**(`point`, `a`, `b`): `number` Perpendicular distance from a point to a line segment defined by [a, b]. Uses an equirectangular local approximation scaled to meters — accurate for short segments, approximate over large distances or near the poles. ## Parameters ### point [`Coordinate`](../type-aliases/Coordinate.md) ### a [`Coordinate`](../type-aliases/Coordinate.md) ### b [`Coordinate`](../type-aliases/Coordinate.md) ## Returns `number` --- ## Page: evaluateSpatialRelation URL: https://docs.totem.ing/api/totemsdk-spatial-proof/functions/evaluateSpatialRelation [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / evaluateSpatialRelation # Function: evaluateSpatialRelation() > **evaluateSpatialRelation**(`params`): [`SpatialRelationClaim`](../interfaces/SpatialRelationClaim.md) Evaluate a spatial relation and return a deterministic SpatialRelationClaim. The claim's relationId is content-derived from all fields except relationId and metadata, so identical evaluations always produce the same ID. ## Parameters ### params [`EvaluateSpatialRelationParams`](../interfaces/EvaluateSpatialRelationParams.md) ## Returns [`SpatialRelationClaim`](../interfaces/SpatialRelationClaim.md) --- ## Page: getBoundingBox URL: https://docs.totem.ing/api/totemsdk-spatial-proof/functions/getBoundingBox [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / getBoundingBox # Function: getBoundingBox() > **getBoundingBox**(`geometry`): [`BoundingBox`](../interfaces/BoundingBox.md) Compute the axis-aligned bounding box of any geometry. Handles Point, LineString, Polygon, and MultiPolygon (multi-dimensional flattening). ## Parameters ### geometry [`GeoGeometry`](../type-aliases/GeoGeometry.md) ## Returns [`BoundingBox`](../interfaces/BoundingBox.md) --- ## Page: hashSpatialObject URL: https://docs.totem.ing/api/totemsdk-spatial-proof/functions/hashSpatialObject [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / hashSpatialObject # Function: hashSpatialObject() > **hashSpatialObject**(`obj`): `string` Hash a complete SpatialObject (excluding spatialId and metadata) to lowercase SHA3-256 hex without a 0x prefix — the value used in EvidenceRef.hash. ## Parameters ### obj [`SpatialObject`](../interfaces/SpatialObject.md) ## Returns `string` --- ## Page: hashSpatialRelationClaim URL: https://docs.totem.ing/api/totemsdk-spatial-proof/functions/hashSpatialRelationClaim [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / hashSpatialRelationClaim # Function: hashSpatialRelationClaim() > **hashSpatialRelationClaim**(`claim`): `string` Hash a complete SpatialRelationClaim (excluding relationId and metadata) to lowercase SHA3-256 hex without a 0x prefix — the value used in EvidenceRef.hash. ## Parameters ### claim [`SpatialRelationClaim`](../interfaces/SpatialRelationClaim.md) ## Returns `string` --- ## Page: isPointNearBoundary URL: https://docs.totem.ing/api/totemsdk-spatial-proof/functions/isPointNearBoundary [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / isPointNearBoundary # Function: isPointNearBoundary() > **isPointNearBoundary**(`point`, `polygon`, `thresholdM`): `boolean` True when a point is within `thresholdM` meters of any boundary ring of a Polygon (outer ring and holes). Uses the equirectangular approximation. ## Parameters ### point [`Coordinate`](../type-aliases/Coordinate.md) ### polygon [`GeoPolygonGeometry`](../interfaces/GeoPolygonGeometry.md) ### thresholdM `number` ## Returns `boolean` --- ## Page: isRingClosed URL: https://docs.totem.ing/api/totemsdk-spatial-proof/functions/isRingClosed [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / isRingClosed # Function: isRingClosed() > **isRingClosed**(`ring`): `boolean` Ring closure: the first and last points must be equal. When a ring is not closed, it is rejected (see normalizePolygonRing for the deterministic normalizer). ## Parameters ### ring [`Coordinate`](../type-aliases/Coordinate.md)[] ## Returns `boolean` --- ## Page: normalizePolygon URL: https://docs.totem.ing/api/totemsdk-spatial-proof/functions/normalizePolygon [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / normalizePolygon # Function: normalizePolygon() > **normalizePolygon**(`polygon`): [`GeoPolygonGeometry`](../interfaces/GeoPolygonGeometry.md) Deterministic normalizer for a whole polygon: closes every ring. ## Parameters ### polygon [`GeoPolygonGeometry`](../interfaces/GeoPolygonGeometry.md) ## Returns [`GeoPolygonGeometry`](../interfaces/GeoPolygonGeometry.md) --- ## Page: normalizePolygonRing URL: https://docs.totem.ing/api/totemsdk-spatial-proof/functions/normalizePolygonRing [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / normalizePolygonRing # Function: normalizePolygonRing() > **normalizePolygonRing**(`ring`): [`Coordinate`](../type-aliases/Coordinate.md)[] Deterministic normalizer: if the ring is not closed, append a copy of the first point. Idempotent for already-closed rings. The returned array is a fresh copy — the input is never mutated. ## Parameters ### ring [`Coordinate`](../type-aliases/Coordinate.md)[] ## Returns [`Coordinate`](../type-aliases/Coordinate.md)[] --- ## Page: pointInMultiPolygon URL: https://docs.totem.ing/api/totemsdk-spatial-proof/functions/pointInMultiPolygon [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / pointInMultiPolygon # Function: pointInMultiPolygon() > **pointInMultiPolygon**(`point`, `multi`): `boolean` Point-in-MultiPolygon: true when the point is inside any of the polygons. ## Parameters ### point [`Coordinate`](../type-aliases/Coordinate.md) ### multi [`GeoMultiPolygonGeometry`](../interfaces/GeoMultiPolygonGeometry.md) ## Returns `boolean` --- ## Page: pointInPolygon URL: https://docs.totem.ing/api/totemsdk-spatial-proof/functions/pointInPolygon [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / pointInPolygon # Function: pointInPolygon() > **pointInPolygon**(`point`, `polygon`): `boolean` Ray-casting point-in-polygon test over the outer ring of a Polygon. Uses a normalized (closed) copy of the ring. Approximate on the lon/lat plane — fine for typical geofences; not geodesic. ## Parameters ### point [`Coordinate`](../type-aliases/Coordinate.md) ### polygon [`GeoPolygonGeometry`](../interfaces/GeoPolygonGeometry.md) ## Returns `boolean` --- ## Page: signSpatialProof URL: https://docs.totem.ing/api/totemsdk-spatial-proof/functions/signSpatialProof [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / signSpatialProof # Function: signSpatialProof() > **signSpatialProof**(`unsigned`, `seed`, `keyIndex`): `SignedProof` Sign an unsigned spatial proof with a WOTS key. The caller is responsible for reserving the WOTS key index (see @totemsdk/wots-lease) before calling — one-time key warning applies. ## Parameters ### unsigned `UnsignedProof` ### seed `Uint8Array` ### keyIndex `number` ## Returns `SignedProof` --- ## Page: spatialClaimEvidenceRefs URL: https://docs.totem.ing/api/totemsdk-spatial-proof/functions/spatialClaimEvidenceRefs [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / spatialClaimEvidenceRefs # Function: spatialClaimEvidenceRefs() > **spatialClaimEvidenceRefs**(`claim`, `obj`, `subjectGeometry?`): `EvidenceRef`[] Build the evidence ref list for a spatial proof. Always includes the relation claim hash and spatial object hash. Optionally adds the subject geometry hash, subject proof ID, location claim ID, and raster manifest ID when present on the claim. ## Parameters ### claim [`SpatialRelationClaim`](../interfaces/SpatialRelationClaim.md) ### obj [`SpatialObject`](../interfaces/SpatialObject.md) ### subjectGeometry? [`GeoGeometry`](../type-aliases/GeoGeometry.md) ## Returns `EvidenceRef`[] --- ## Page: spatialObjectToEvidenceRef URL: https://docs.totem.ing/api/totemsdk-spatial-proof/functions/spatialObjectToEvidenceRef [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / spatialObjectToEvidenceRef # Function: spatialObjectToEvidenceRef() > **spatialObjectToEvidenceRef**(`obj`): `EvidenceRef` Convert a SpatialObject into an EvidenceRef for inclusion in a proof. ## Parameters ### obj [`SpatialObject`](../interfaces/SpatialObject.md) ## Returns `EvidenceRef` --- ## Page: spatialObjectToProofGraphNode URL: https://docs.totem.ing/api/totemsdk-spatial-proof/functions/spatialObjectToProofGraphNode [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / spatialObjectToProofGraphNode # Function: spatialObjectToProofGraphNode() > **spatialObjectToProofGraphNode**(`obj`): `ProofGraphNode` Build a ProofGraphNode for a spatial object. Uses the 'custom' node type (no native proofgraph node type fits a spatial object). Node ID is deterministic: "custom:". ## Parameters ### obj [`SpatialObject`](../interfaces/SpatialObject.md) ## Returns `ProofGraphNode` --- ## Page: spatialRelationFromLocationClaim URL: https://docs.totem.ing/api/totemsdk-spatial-proof/functions/spatialRelationFromLocationClaim [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / spatialRelationFromLocationClaim # Function: spatialRelationFromLocationClaim() > **spatialRelationFromLocationClaim**(`params`): [`SpatialRelationClaim`](../interfaces/SpatialRelationClaim.md) Derive a spatial relation claim from a location claim. The location claim's [lon, lat] is used as the subject Point geometry and its claimId is recorded as the locationClaimId input, so the resulting spatial claim provably references the location claim it was computed from. ## Parameters ### params #### computedAt? `number` #### locationClaim `LocationClaim` #### maxDistanceM? `number` #### metadata? `Record`\<`string`, `unknown`\> #### relation [`SpatialRelationType`](../type-aliases/SpatialRelationType.md) #### spatialObject [`SpatialObject`](../interfaces/SpatialObject.md) ## Returns [`SpatialRelationClaim`](../interfaces/SpatialRelationClaim.md) --- ## Page: spatialRelationToEvidenceRef URL: https://docs.totem.ing/api/totemsdk-spatial-proof/functions/spatialRelationToEvidenceRef [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / spatialRelationToEvidenceRef # Function: spatialRelationToEvidenceRef() > **spatialRelationToEvidenceRef**(`claim`): `EvidenceRef` Convert a SpatialRelationClaim into an EvidenceRef for inclusion in a proof. ## Parameters ### claim [`SpatialRelationClaim`](../interfaces/SpatialRelationClaim.md) ## Returns `EvidenceRef` --- ## Page: spatialRelationToGraphEdges URL: https://docs.totem.ing/api/totemsdk-spatial-proof/functions/spatialRelationToGraphEdges [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / spatialRelationToGraphEdges # Function: spatialRelationToGraphEdges() > **spatialRelationToGraphEdges**(`claim`): `ProofGraphEdge`[] Build ProofGraphEdges for a spatial relation claim: about relation → subject references relation → spatial object derived_from relation → location claim (when present) references relation → subject proof (when present) references relation → raster manifest (when present) Edge IDs are deterministic (content-derived in @totemsdk/proofgraph). ## Parameters ### claim [`SpatialRelationClaim`](../interfaces/SpatialRelationClaim.md) ## Returns `ProofGraphEdge`[] --- ## Page: spatialRelationToProofGraphNode URL: https://docs.totem.ing/api/totemsdk-spatial-proof/functions/spatialRelationToProofGraphNode [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / spatialRelationToProofGraphNode # Function: spatialRelationToProofGraphNode() > **spatialRelationToProofGraphNode**(`claim`): `ProofGraphNode` Build a ProofGraphNode for a spatial relation claim. Uses the 'custom' node type. Node ID is deterministic: "custom:". ## Parameters ### claim [`SpatialRelationClaim`](../interfaces/SpatialRelationClaim.md) ## Returns `ProofGraphNode` --- ## Page: toHex URL: https://docs.totem.ing/api/totemsdk-spatial-proof/functions/toHex [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / toHex # Function: toHex() > **toHex**(`bytes`): `string` ## Parameters ### bytes `Uint8Array` ## Returns `string` --- ## Page: validateCoordinate URL: https://docs.totem.ing/api/totemsdk-spatial-proof/functions/validateCoordinate [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / validateCoordinate # Function: validateCoordinate() > **validateCoordinate**(`coord`): [`SpatialValidationResult`](../interfaces/SpatialValidationResult.md) Validate a single [lon, lat] coordinate. Returns an error if the coordinate is out of range or not finite. ## Parameters ### coord [`Coordinate`](../type-aliases/Coordinate.md) ## Returns [`SpatialValidationResult`](../interfaces/SpatialValidationResult.md) --- ## Page: validateGeometry URL: https://docs.totem.ing/api/totemsdk-spatial-proof/functions/validateGeometry [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / validateGeometry # Function: validateGeometry() > **validateGeometry**(`geometry`): [`SpatialValidationResult`](../interfaces/SpatialValidationResult.md) Validate a single geometry. Rules: - Point: 1 valid coordinate - LineString: at least 2 valid coordinates - Polygon: at least 4 points per ring; rings must be closed - MultiPolygon: at least 1 polygon, each valid ## Parameters ### geometry [`GeoGeometry`](../type-aliases/GeoGeometry.md) ## Returns [`SpatialValidationResult`](../interfaces/SpatialValidationResult.md) --- ## Page: validateSpatialObject URL: https://docs.totem.ing/api/totemsdk-spatial-proof/functions/validateSpatialObject [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / validateSpatialObject # Function: validateSpatialObject() > **validateSpatialObject**(`obj`): [`SpatialValidationResult`](../interfaces/SpatialValidationResult.md) Validate a spatial object. CRS defaults to EPSG:4326; any other CRS produces a warning (all geometry math here assumes WGS84 lon/lat). ## Parameters ### obj [`SpatialObject`](../interfaces/SpatialObject.md) ## Returns [`SpatialValidationResult`](../interfaces/SpatialValidationResult.md) --- ## Page: validateSpatialRelationClaim URL: https://docs.totem.ing/api/totemsdk-spatial-proof/functions/validateSpatialRelationClaim [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / validateSpatialRelationClaim # Function: validateSpatialRelationClaim() > **validateSpatialRelationClaim**(`claim`): `object` Validate the structure of a spatial relation claim (does not re-evaluate the geometry — verification of the proof envelope also checks the claim ID and evidence hashes). ## Parameters ### claim [`SpatialRelationClaim`](../interfaces/SpatialRelationClaim.md) ## Returns `object` ### errors > **errors**: `string`[] ### valid > **valid**: `boolean` ### warnings > **warnings**: `string`[] --- ## Page: verifySpatialProof URL: https://docs.totem.ing/api/totemsdk-spatial-proof/functions/verifySpatialProof [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / verifySpatialProof # Function: verifySpatialProof() > **verifySpatialProof**(`signed`): [`SpatialProofVerifyResult`](../interfaces/SpatialProofVerifyResult.md) Verify a signed spatial proof end to end. Checks: 1. the underlying @totemsdk/proof verification (signature, proofId, expiry) 2. payload contains a structurally valid SpatialRelationClaim 3. the relation's claimId matches a recomputation from its fields 4. the relation evidence hash matches the payload claim 5. the spatial-object evidence hash matches the payload claim inputs 6. any subject geometry evidence hash is present when claimed Anchoring is not required. ## Parameters ### signed `SignedProof` ## Returns [`SpatialProofVerifyResult`](../interfaces/SpatialProofVerifyResult.md) --- ## Page: BoundingBox URL: https://docs.totem.ing/api/totemsdk-spatial-proof/interfaces/BoundingBox [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / BoundingBox # Interface: BoundingBox ## Properties ### maxLat > **maxLat**: `number` *** ### maxLon > **maxLon**: `number` *** ### minLat > **minLat**: `number` *** ### minLon > **minLon**: `number` --- ## Page: CreateSpatialProofParams URL: https://docs.totem.ing/api/totemsdk-spatial-proof/interfaces/CreateSpatialProofParams [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / CreateSpatialProofParams # Interface: CreateSpatialProofParams ## Properties ### claim > **claim**: [`SpatialRelationClaim`](SpatialRelationClaim.md) *** ### expiresAt? > `optional` **expiresAt?**: `number` *** ### issuedAt? > `optional` **issuedAt?**: `number` *** ### issuer? > `optional` **issuer?**: `string` *** ### spatialObject > **spatialObject**: [`SpatialObject`](SpatialObject.md) Full spatial object used to compute its evidence hash. *** ### subjectGeometry? > `optional` **subjectGeometry?**: [`GeoGeometry`](../type-aliases/GeoGeometry.md) Optional subject geometry used to add a geometry evidence ref. --- ## Page: EngineInfo URL: https://docs.totem.ing/api/totemsdk-spatial-proof/interfaces/EngineInfo [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / EngineInfo # Interface: EngineInfo ## Properties ### algorithm > **algorithm**: `string` *** ### name > **name**: `string` *** ### version > **version**: `string` --- ## Page: EvaluateSpatialRelationParams URL: https://docs.totem.ing/api/totemsdk-spatial-proof/interfaces/EvaluateSpatialRelationParams [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / EvaluateSpatialRelationParams # Interface: EvaluateSpatialRelationParams ## Properties ### computedAt? > `optional` **computedAt?**: `number` *** ### locationClaimId? > `optional` **locationClaimId?**: `string` *** ### maxDistanceM? > `optional` **maxDistanceM?**: `number` Required for distance-based relations (within_distance, on_route, near_boundary). *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### rasterManifestId? > `optional` **rasterManifestId?**: `string` *** ### relation > **relation**: [`SpatialRelationType`](../type-aliases/SpatialRelationType.md) *** ### spatialObject > **spatialObject**: [`SpatialObject`](SpatialObject.md) *** ### subjectGeometry? > `optional` **subjectGeometry?**: [`GeoGeometry`](../type-aliases/GeoGeometry.md) *** ### subjectId > **subjectId**: `string` *** ### subjectKind > **subjectKind**: `string` *** ### subjectProofId? > `optional` **subjectProofId?**: `string` --- ## Page: GeoLineStringGeometry URL: https://docs.totem.ing/api/totemsdk-spatial-proof/interfaces/GeoLineStringGeometry [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / GeoLineStringGeometry # Interface: GeoLineStringGeometry ## Properties ### coordinates > **coordinates**: [`Coordinate`](../type-aliases/Coordinate.md)[] *** ### type > **type**: `"LineString"` --- ## Page: GeoMultiPolygonGeometry URL: https://docs.totem.ing/api/totemsdk-spatial-proof/interfaces/GeoMultiPolygonGeometry [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / GeoMultiPolygonGeometry # Interface: GeoMultiPolygonGeometry ## Properties ### coordinates > **coordinates**: [`Coordinate`](../type-aliases/Coordinate.md)[][][] *** ### type > **type**: `"MultiPolygon"` --- ## Page: GeoPointGeometry URL: https://docs.totem.ing/api/totemsdk-spatial-proof/interfaces/GeoPointGeometry [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / GeoPointGeometry # Interface: GeoPointGeometry ## Properties ### coordinates > **coordinates**: [`Coordinate`](../type-aliases/Coordinate.md) *** ### type > **type**: `"Point"` --- ## Page: GeoPolygonGeometry URL: https://docs.totem.ing/api/totemsdk-spatial-proof/interfaces/GeoPolygonGeometry [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / GeoPolygonGeometry # Interface: GeoPolygonGeometry ## Properties ### coordinates > **coordinates**: [`Coordinate`](../type-aliases/Coordinate.md)[][] *** ### type > **type**: `"Polygon"` --- ## Page: SpatialObject URL: https://docs.totem.ing/api/totemsdk-spatial-proof/interfaces/SpatialObject [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / SpatialObject # Interface: SpatialObject ## Properties ### crs? > `optional` **crs?**: `string` *** ### geometry > **geometry**: [`GeoGeometry`](../type-aliases/GeoGeometry.md) *** ### kind > **kind**: [`SpatialObjectKind`](../type-aliases/SpatialObjectKind.md) *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### name? > `optional` **name?**: `string` *** ### spatialId > **spatialId**: `string` --- ## Page: SpatialProofVerifyResult URL: https://docs.totem.ing/api/totemsdk-spatial-proof/interfaces/SpatialProofVerifyResult [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / SpatialProofVerifyResult # Interface: SpatialProofVerifyResult ## Properties ### evidenceHashValid? > `optional` **evidenceHashValid?**: `boolean` *** ### payloadValid? > `optional` **payloadValid?**: `boolean` *** ### reason? > `optional` **reason?**: `string` *** ### relationId? > `optional` **relationId?**: `string` *** ### relationIdValid? > `optional` **relationIdValid?**: `boolean` *** ### signerAddress? > `optional` **signerAddress?**: `string` *** ### spatialObjectId? > `optional` **spatialObjectId?**: `string` *** ### valid > **valid**: `boolean` --- ## Page: SpatialRelationClaim URL: https://docs.totem.ing/api/totemsdk-spatial-proof/interfaces/SpatialRelationClaim [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / SpatialRelationClaim # Interface: SpatialRelationClaim ## Properties ### computedAt > **computedAt**: `number` *** ### engine > **engine**: [`EngineInfo`](EngineInfo.md) *** ### inputs > **inputs**: [`SpatialRelationClaimInputs`](SpatialRelationClaimInputs.md) *** ### metadata? > `optional` **metadata?**: `Record`\<`string`, `unknown`\> *** ### relation > **relation**: [`SpatialRelationType`](../type-aliases/SpatialRelationType.md) *** ### relationId > **relationId**: `string` *** ### result > **result**: [`SpatialRelationClaimResult`](SpatialRelationClaimResult.md) *** ### spatialObjectId > **spatialObjectId**: `string` *** ### subjectId > **subjectId**: `string` *** ### subjectKind > **subjectKind**: `string` --- ## Page: SpatialRelationClaimInputs URL: https://docs.totem.ing/api/totemsdk-spatial-proof/interfaces/SpatialRelationClaimInputs [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / SpatialRelationClaimInputs # Interface: SpatialRelationClaimInputs ## Properties ### locationClaimId? > `optional` **locationClaimId?**: `string` Optional location claim ID the geometry was derived from. *** ### rasterManifestId? > `optional` **rasterManifestId?**: `string` Optional raster/scene manifest ID the geometry was derived from. *** ### spatialGeometryHash > **spatialGeometryHash**: `string` totem:geo: hash of the spatial object's geometry. *** ### subjectGeometryHash? > `optional` **subjectGeometryHash?**: `string` totem:geo: hash of the subject geometry (when supplied). *** ### subjectProofId? > `optional` **subjectProofId?**: `string` Optional subject proof ID the geometry was derived from. --- ## Page: SpatialRelationClaimResult URL: https://docs.totem.ing/api/totemsdk-spatial-proof/interfaces/SpatialRelationClaimResult [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / SpatialRelationClaimResult # Interface: SpatialRelationClaimResult ## Properties ### confidenceScore? > `optional` **confidenceScore?**: `number` *** ### distanceM? > `optional` **distanceM?**: `number` *** ### matched > **matched**: `boolean` *** ### uncertainty? > `optional` **uncertainty?**: `string`[] Explicit notes on approximation. Present whenever a relation was evaluated with an approximate algorithm (e.g. bbox-only). Honesty is critical — the package never silently claims exactness. --- ## Page: SpatialValidationResult URL: https://docs.totem.ing/api/totemsdk-spatial-proof/interfaces/SpatialValidationResult [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / SpatialValidationResult # Interface: SpatialValidationResult ## Properties ### errors > **errors**: `string`[] *** ### valid > **valid**: `boolean` *** ### warnings > **warnings**: `string`[] --- ## Page: Coordinate URL: https://docs.totem.ing/api/totemsdk-spatial-proof/type-aliases/Coordinate [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / Coordinate # Type Alias: Coordinate > **Coordinate** = \[`number`, `number`\] @totemsdk/spatial-proof — Type definitions Pure schema for geospatial relationship proofs. COORDINATE ORDER: GeoJSON order — [longitude, latitude] in decimal degrees (WGS84 / EPSG:4326). This is the opposite of "lat, lon". All geometry functions and hashes in this package assume [lon, lat]. No network, no storage, no map rendering, no GIS engine dependency. --- ## Page: GeoGeometry URL: https://docs.totem.ing/api/totemsdk-spatial-proof/type-aliases/GeoGeometry [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / GeoGeometry # Type Alias: GeoGeometry > **GeoGeometry** = [`GeoPointGeometry`](../interfaces/GeoPointGeometry.md) \| [`GeoLineStringGeometry`](../interfaces/GeoLineStringGeometry.md) \| [`GeoPolygonGeometry`](../interfaces/GeoPolygonGeometry.md) \| [`GeoMultiPolygonGeometry`](../interfaces/GeoMultiPolygonGeometry.md) --- ## Page: SpatialObjectKind URL: https://docs.totem.ing/api/totemsdk-spatial-proof/type-aliases/SpatialObjectKind [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / SpatialObjectKind # Type Alias: SpatialObjectKind > **SpatialObjectKind** = `"site-boundary"` \| `"zone"` \| `"route"` \| `"scene-footprint"` \| `"asset-footprint"` \| `"restricted-area"` \| `"inspection-area"` \| `"custom"` --- ## Page: SpatialRelationType URL: https://docs.totem.ing/api/totemsdk-spatial-proof/type-aliases/SpatialRelationType [**@totemsdk/spatial-proof**](../index.md) *** [@totemsdk/spatial-proof](../index.md) / SpatialRelationType # Type Alias: SpatialRelationType > **SpatialRelationType** = `"inside"` \| `"outside"` \| `"intersects"` \| `"overlaps"` \| `"covers"` \| `"covered_by"` \| `"within_distance"` \| `"near_boundary"` \| `"on_route"` \| `"entered_zone"` \| `"exited_zone"` \| `"unknown"` --- ## Page: HttpSEClient URL: https://docs.totem.ing/api/totemsdk-statechain/classes/HttpSEClient [**@totemsdk/statechain**](../index.md) *** [@totemsdk/statechain](../index.md) / HttpSEClient # Class: HttpSEClient HTTP implementation of SEClient that talks to any compatible SE server. `ownerSign(nonce)` must sign sha3_256(nonce) with the current owner's WOTS key. It is called automatically inside `blindSign` and `revokeKey` after the SE issues a challenge nonce — callers do not need to manage the challenge protocol. ## Implements - [`SEClient`](../interfaces/SEClient.md) ## Constructors ### Constructor > **new HttpSEClient**(`baseUrl`, `ownerSign`, `opts?`): `HttpSEClient` #### Parameters ##### baseUrl `string` ##### ownerSign (`nonce`) => `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> ##### opts? [`HttpSEClientOptions`](../interfaces/HttpSEClientOptions.md) = `{}` #### Returns `HttpSEClient` ## Methods ### blindSign() > **blindSign**(`chainId`, `blindedCommitmentHex`): `Promise`\<`string`\> #### Parameters ##### chainId `string` ##### blindedCommitmentHex `string` #### Returns `Promise`\<`string`\> #### Implementation of [`SEClient`](../interfaces/SEClient.md).[`blindSign`](../interfaces/SEClient.md#blindsign) *** ### isRevoked() > **isRevoked**(`_ownerPartyId`): `Promise`\<`boolean`\> #### Parameters ##### \_ownerPartyId `string` #### Returns `Promise`\<`boolean`\> #### Implementation of [`SEClient`](../interfaces/SEClient.md).[`isRevoked`](../interfaces/SEClient.md#isrevoked) *** ### registerChain() > **registerChain**(`chainId`, `_coinId`, `_ownerPublicKeyDigest`, `_lockingScript`): `Promise`\<`void`\> Optional: register a newly locked coin with the SE. Called during `createStateChain` when present. #### Parameters ##### chainId `string` ##### \_coinId `string` ##### \_ownerPublicKeyDigest `string` ##### \_lockingScript `string` #### Returns `Promise`\<`void`\> #### Implementation of [`SEClient`](../interfaces/SEClient.md).[`registerChain`](../interfaces/SEClient.md#registerchain) *** ### revokeKey() > **revokeKey**(`chainId`, `opts`): `Promise`\<`void`\> #### Parameters ##### chainId `string` ##### opts ###### newOwnerPartyId `string` ###### newOwnerPkd `string` ###### newReclaimTxHex `string` ###### previousOwnerPartyId `string` ###### previousOwnerPkd `string` #### Returns `Promise`\<`void`\> #### Implementation of [`SEClient`](../interfaces/SEClient.md).[`revokeKey`](../interfaces/SEClient.md#revokekey) --- ## Page: SENotFoundError URL: https://docs.totem.ing/api/totemsdk-statechain/classes/SENotFoundError [**@totemsdk/statechain**](../index.md) *** [@totemsdk/statechain](../index.md) / SENotFoundError # Class: SENotFoundError ## Extends - `Error` ## Constructors ### Constructor > **new SENotFoundError**(`sePublicKeyHex`): `SENotFoundError` #### Parameters ##### sePublicKeyHex `string` #### Returns `SENotFoundError` #### Overrides `Error.constructor` ## Properties ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: buildStatechainScript URL: https://docs.totem.ing/api/totemsdk-statechain/functions/buildStatechainScript [**@totemsdk/statechain**](../index.md) *** [@totemsdk/statechain](../index.md) / buildStatechainScript # Function: buildStatechainScript() > **buildStatechainScript**(`sePkd`): `string` MULTISIG(2) locking script for the state chain UTXO. The owner key is read from STATE(0) of the coin being spent. This allows any current owner to authorize a spend without changing the locking script or address — only the coin's stored state changes on each ownership transfer. Normal path (any time): requires MULTISIG(2 STATE(0) SE) signatures. Reclaim path (after COINAGE >= RECLAIM_TIMELOCK): owner can reclaim unilaterally with just SIGNEDBY(STATE(0)) — no SE signature required. ## Parameters ### sePkd `string` SE's WOTS public key digest (hardcoded in script, fixed per SE). ## Returns `string` --- ## Page: claimOwnership URL: https://docs.totem.ing/api/totemsdk-statechain/functions/claimOwnership [**@totemsdk/statechain**](../index.md) *** [@totemsdk/statechain](../index.md) / claimOwnership # Function: claimOwnership() > **claimOwnership**(`chain`, `leaseProvider`): `Promise`\<[`ClaimPayload`](../interfaces/ClaimPayload.md)\> Cooperative claim — current owner + SE co-sign a claim TX. Public API: `claimOwnership(chain, leaseProvider) -> ClaimPayload` Both `chain.currentOwner.sign` and `leaseProvider.seClient.blindSign` sign `computeTransactionDigest(tx)` — the actual TX body hash — satisfying the `MULTISIG(2 STATE(0) SE)` spending path. No timelock required. ## Parameters ### chain [`StateChain`](../interfaces/StateChain.md) Active or claiming statechain. ### leaseProvider [`StatechainLeaseProvider`](../interfaces/StatechainLeaseProvider.md) Bundle: SE client for countersigning + optional broadcast. ## Returns `Promise`\<[`ClaimPayload`](../interfaces/ClaimPayload.md)\> ClaimPayload with txHex, claimAddress, chainId, coinId, and optional txpowId. --- ## Page: clearSeRegistryCache URL: https://docs.totem.ing/api/totemsdk-statechain/functions/clearSeRegistryCache [**@totemsdk/statechain**](../index.md) *** [@totemsdk/statechain](../index.md) / clearSeRegistryCache # Function: clearSeRegistryCache() > **clearSeRegistryCache**(): `void` Clear the in-memory registry cache (useful in tests). ## Returns `void` --- ## Page: createDurableStateChainStore URL: https://docs.totem.ing/api/totemsdk-statechain/functions/createDurableStateChainStore [**@totemsdk/statechain**](../index.md) *** [@totemsdk/statechain](../index.md) / createDurableStateChainStore # Function: createDurableStateChainStore() > **createDurableStateChainStore**(`adapter`, `options?`): [`DurableStateChainStore`](../interfaces/DurableStateChainStore.md) Create a durable `StateChain` registry over a CAS-capable adapter. The whole registry is one revision-CAS snapshot record, keyed under the configured namespace. A `MemoryStore` (volatile ack) requires `requireAckMode: 'volatile'` — pass it explicitly so a production caller can never accidentally downgrade durability (RFC-007 §4.2 no-silent-downgrade). ## Parameters ### adapter `StorageAdapter` ### options? [`DurableStateChainStoreOptions`](../interfaces/DurableStateChainStoreOptions.md) = `{}` ## Returns [`DurableStateChainStore`](../interfaces/DurableStateChainStore.md) --- ## Page: createStateChain URL: https://docs.totem.ing/api/totemsdk-statechain/functions/createStateChain [**@totemsdk/statechain**](../index.md) *** [@totemsdk/statechain](../index.md) / createStateChain # Function: createStateChain() > **createStateChain**(`coinId`, `owner`, `sePublicKey`, `leaseProvider`, `chainProvider?`): `Promise`\<[`StateChain`](../interfaces/StateChain.md)\> Create a new StateChain by locking a coin into the statechain MULTISIG script. Public API: `createStateChain(coinId, owner, sePublicKey, leaseProvider, chainProvider?)` Steps: 1. Resolve coin details (address, tokenId, amount) from owner fields or chainProvider. 2. Build the STATE(0)-based locking script and compute lockingAddress. 3. Build and sign the LOCK TX: moves `coinId` into `lockingAddress` with STATE(0) = ownerPkd. Output coinId becomes `chain.coinId`. 4. Broadcast the lock TX if `leaseProvider.broadcast` is present. 5. Register the locked coin with the SE via `seClient.registerChain?`. 6. Pre-sign the initial owner's unilateral reclaim TX (owner can exit without SE after ## Parameters ### coinId `string` The input UTXO coinId to be locked into the statechain. `chain.coinId` will be the LOCK TX output coinId (different). ### owner [`StatechainOwner`](../interfaces/StatechainOwner.md) Initial owner with identity, signing capability, and coin metadata. `owner.address`, `owner.tokenId`, `owner.amount` must be present (or derivable from `chainProvider`). ### sePublicKey `string` SE's WOTS public key digest. ### leaseProvider [`StatechainLeaseProvider`](../interfaces/StatechainLeaseProvider.md) SE client + optional broadcast for the lock TX. ### chainProvider? `ChainStateProvider` Optional: fetch coin details when owner metadata is absent. ## Returns `Promise`\<[`StateChain`](../interfaces/StateChain.md)\> ## COINAGE >= reclaimTimelock). --- ## Page: fetchSeRegistry URL: https://docs.totem.ing/api/totemsdk-statechain/functions/fetchSeRegistry [**@totemsdk/statechain**](../index.md) *** [@totemsdk/statechain](../index.md) / fetchSeRegistry # Function: fetchSeRegistry() > **fetchSeRegistry**(`registryUrl?`, `fetchImpl?`): `Promise`\<[`SERegistryEntry`](../interfaces/SERegistryEntry.md)[]\> Fetch and cache the SE registry from a given URL. ## Parameters ### registryUrl? `string` = `DEFAULT_REGISTRY_URL` ### fetchImpl? \{(`input`, `init?`): `Promise`\<`Response`\>; (`input`, `init?`): `Promise`\<`Response`\>; \} ## Returns `Promise`\<[`SERegistryEntry`](../interfaces/SERegistryEntry.md)[]\> --- ## Page: reclaimAbandoned URL: https://docs.totem.ing/api/totemsdk-statechain/functions/reclaimAbandoned [**@totemsdk/statechain**](../index.md) *** [@totemsdk/statechain](../index.md) / reclaimAbandoned # Function: reclaimAbandoned() > **reclaimAbandoned**(`chain`, `proof`, `leaseProvider?`): `Promise`\<[`ClaimPayload`](../interfaces/ClaimPayload.md)\> Reclaim after SE abandonment (SE offline / unresponsive). Public API: `reclaimAbandoned(chain, proof, leaseProvider) -> ClaimPayload` Broadcasts `chain.reclaimTx` — the pre-signed unilateral reclaim TX built during `createStateChain` (and updated on every `transferOwnership`). This TX is signed by the CURRENT owner (not the initial owner) and spends via `SIGNEDBY(STATE(0))` after `@COINAGE >= RECLAIM_TIMELOCK`. No SE cooperation needed. If `proof.timelockBlock` is provided and `leaseProvider.getTip` is present, the current block height is validated before broadcasting. ## Parameters ### chain [`StateChain`](../interfaces/StateChain.md) Any non-claimed statechain. ### proof [`AbandonedProof`](../interfaces/AbandonedProof.md) Optional: timelockBlock + evidence. ### leaseProvider? [`StatechainLeaseProvider`](../interfaces/StatechainLeaseProvider.md) Bundle: optional broadcast + optional getTip. ## Returns `Promise`\<[`ClaimPayload`](../interfaces/ClaimPayload.md)\> ClaimPayload with pre-built reclaimTx and reclaimAddress. --- ## Page: resolveSEClient URL: https://docs.totem.ing/api/totemsdk-statechain/functions/resolveSEClient [**@totemsdk/statechain**](../index.md) *** [@totemsdk/statechain](../index.md) / resolveSEClient # Function: resolveSEClient() > **resolveSEClient**(`sePublicKeyHex`, `ownerSign`, `opts?`): `Promise`\<[`HttpSEClient`](../classes/HttpSEClient.md)\> Resolve an HttpSEClient for a given SE public key by looking it up in the SE Registry. Caches the registry response for 60 seconds. ## Parameters ### sePublicKeyHex `string` The SE WOTS public key digest stored in the statechain. ### ownerSign (`nonce`) => `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> Function that signs sha3_256(nonce) with the current owner's WOTS key. ### opts? [`ResolveSEClientOptions`](../interfaces/ResolveSEClientOptions.md) = `{}` Optional registry URL, fetch impl, and timeout. ## Returns `Promise`\<[`HttpSEClient`](../classes/HttpSEClient.md)\> ## Throws SENotFoundError if no entry matches sePublicKeyHex. --- ## Page: scriptAddress URL: https://docs.totem.ing/api/totemsdk-statechain/functions/scriptAddress [**@totemsdk/statechain**](../index.md) *** [@totemsdk/statechain](../index.md) / scriptAddress # Function: scriptAddress() > **scriptAddress**(`script`): `string` ## Parameters ### script `string` ## Returns `string` --- ## Page: transferOwnership URL: https://docs.totem.ing/api/totemsdk-statechain/functions/transferOwnership [**@totemsdk/statechain**](../index.md) *** [@totemsdk/statechain](../index.md) / transferOwnership # Function: transferOwnership() > **transferOwnership**(`chain`, `newOwner`, `seClient`, `_verifyBlindSig?`, `_chainProvider?`): `Promise`\<[`StateChain`](../interfaces/StateChain.md)\> Transfer ownership of a statechain UTXO to a new owner. Public API: `transferOwnership(chain, newOwner, seClient)` Creates an on-chain state-update TX: input: current MULTISIG coin with STATE(0) = oldOwnerPkd output: same locking address with STATE(0) = newOwnerPkd Signing flow: - `chain.currentOwner.sign(txDigest)` — old owner signs TX body digest. - `seClient.blindSign(hex(txDigest))` — SE countersigns same digest. Both satisfy `MULTISIG(2 STATE(0) SE)` for the input coin. Post-transfer: - New owner's reclaim TX is built via `newOwner.sign(reclaimDigest)`. `chain.reclaimTx` always reflects CURRENT owner — never initial owner. - Old owner's `transferKeySeed` is moved to `TransferRecord.transferKey` then **zeroed in-place** on the original owner object so the secret does not persist in hot state after the ownership hop. ## Parameters ### chain [`StateChain`](../interfaces/StateChain.md) Active statechain (must have `currentOwner.sign`). ### newOwner [`StatechainOwner`](../interfaces/StatechainOwner.md) Recipient identity + signing capability. ### seClient [`SEClient`](../interfaces/SEClient.md) SE client for countersigning the state-update TX. ### \_verifyBlindSig? (`sig`, `commitment`, `sePkdHex`) => `boolean` Optional SE blind-sig verification override (test use). Defaults to `wotsVerifyDigest`. Production callers should omit this. ### \_chainProvider? `ChainStateProvider` Optional: broadcast the state-update TX on-chain. ## Returns `Promise`\<[`StateChain`](../interfaces/StateChain.md)\> --- ## Page: verifyStateChain URL: https://docs.totem.ing/api/totemsdk-statechain/functions/verifyStateChain [**@totemsdk/statechain**](../index.md) *** [@totemsdk/statechain](../index.md) / verifyStateChain # Function: verifyStateChain() > **verifyStateChain**(`chain`, `opts?`): [`VerifyResult`](../interfaces/VerifyResult.md) Verify the full transfer history of a statechain. For each TransferRecord, verifies: 1. Chain continuity: party IDs and PKDs are linked hop-by-hop. 2. Transfer key lineage: derivePKdigest(transferKey, 0) === fromPublicKeyDigest. 3. Digest provenance: sha3_256(txBodyHex) === signedDigest. Prevents a malicious record from pairing valid signatures over one digest with unrelated `txHex`. Binds all signatures to the actual TX data. 4. SE blind signature: verifies `blindedSignature` over `signedDigest`. 5. Old-owner signature: verifies `ownerSignature` over `signedDigest`. Proves the old owner — not just the SE — authorised this state transition. Then validates that `currentOwner` matches the last transfer recipient. ## Parameters ### chain [`StateChain`](../interfaces/StateChain.md) ### opts? [`VerifyOptions`](../interfaces/VerifyOptions.md) ## Returns [`VerifyResult`](../interfaces/VerifyResult.md) --- ## Page: AbandonedProof URL: https://docs.totem.ing/api/totemsdk-statechain/interfaces/AbandonedProof [**@totemsdk/statechain**](../index.md) *** [@totemsdk/statechain](../index.md) / AbandonedProof # Interface: AbandonedProof ## Properties ### evidence? > `optional` **evidence?**: `string` *** ### timelockBlock? > `optional` **timelockBlock?**: `number` --- ## Page: ClaimPayload URL: https://docs.totem.ing/api/totemsdk-statechain/interfaces/ClaimPayload [**@totemsdk/statechain**](../index.md) *** [@totemsdk/statechain](../index.md) / ClaimPayload # Interface: ClaimPayload ## Properties ### chainId > **chainId**: `string` *** ### claimAddress > **claimAddress**: `string` *** ### coinId > **coinId**: `string` *** ### txHex > **txHex**: `string` *** ### txpowId? > `optional` **txpowId?**: `string` --- ## Page: DurableStateChainStore URL: https://docs.totem.ing/api/totemsdk-statechain/interfaces/DurableStateChainStore [**@totemsdk/statechain**](../index.md) *** [@totemsdk/statechain](../index.md) / DurableStateChainStore # Interface: DurableStateChainStore ## Methods ### get() > **get**(`chainId`): `Promise`\<[`StoredStateChain`](../type-aliases/StoredStateChain.md) \| `undefined`\> Load a chain (owner signing capability is not persisted; re-attach it). #### Parameters ##### chainId `string` #### Returns `Promise`\<[`StoredStateChain`](../type-aliases/StoredStateChain.md) \| `undefined`\> *** ### getRecoveryReport() > **getRecoveryReport**(`chainId`): `Promise`\<[`RecoveryReport`](RecoveryReport.md)\> Recovery report for one chain (asserts SE-independent recoverability). #### Parameters ##### chainId `string` #### Returns `Promise`\<[`RecoveryReport`](RecoveryReport.md)\> *** ### getRevision() > **getRevision**(): `Promise`\<`number`\> Current registry transition counter (0 before the first write). #### Returns `Promise`\<`number`\> *** ### getSnapshot() > **getSnapshot**(): `Promise`\<[`StateChainRegistryState`](StateChainRegistryState.md)\> Current persisted registry state. #### Returns `Promise`\<[`StateChainRegistryState`](StateChainRegistryState.md)\> *** ### hasState() > **hasState**(): `Promise`\<`boolean`\> True once any chain record has been persisted. #### Returns `Promise`\<`boolean`\> *** ### list() > **list**(): `Promise`\<[`StoredStateChain`](../type-aliases/StoredStateChain.md)[]\> All persisted chains (owner signing capability is not persisted). #### Returns `Promise`\<[`StoredStateChain`](../type-aliases/StoredStateChain.md)[]\> *** ### remove() > **remove**(`chainId`): `Promise`\<`boolean`\> Remove a chain from the registry. #### Parameters ##### chainId `string` #### Returns `Promise`\<`boolean`\> *** ### save() > **save**(`chain`): `Promise`\<`void`\> Persist a chain (create / transfer / claim state transition). #### Parameters ##### chain [`StateChain`](StateChain.md) #### Returns `Promise`\<`void`\> *** ### verifyRecoverability() > **verifyRecoverability**(): `Promise`\<`object`[]\> Recovery report for every persisted chain. #### Returns `Promise`\<`object`[]\> --- ## Page: DurableStateChainStoreOptions URL: https://docs.totem.ing/api/totemsdk-statechain/interfaces/DurableStateChainStoreOptions [**@totemsdk/statechain**](../index.md) *** [@totemsdk/statechain](../index.md) / DurableStateChainStoreOptions # Interface: DurableStateChainStoreOptions ## Properties ### namespace? > `readonly` `optional` **namespace?**: `string` Key namespace prefix; default `totem_statechain:v1:`. *** ### requireAckMode? > `readonly` `optional` **requireAckMode?**: `"volatile"` \| `"buffered"` \| `"durably-acknowledged"` Required write acknowledgment; default `durably-acknowledged`. Pass `volatile` only for tests/scratch adapters (e.g. `MemoryStore`). *** ### verify? > `readonly` `optional` **verify?**: (`chain`, `opts?`) => `VerifyResult` Structural validation hook run over each `StateChain` at load and before each save (default: a strict `verifyChainIntegrity` check). #### Parameters ##### chain [`StateChain`](StateChain.md) ##### opts? [`VerifyOptions`](VerifyOptions.md) #### Returns `VerifyResult` *** ### verifyOptions? > `readonly` `optional` **verifyOptions?**: [`VerifyOptions`](VerifyOptions.md) Verification-override options (test/self-hosted SE mocks). --- ## Page: HttpSEClientOptions URL: https://docs.totem.ing/api/totemsdk-statechain/interfaces/HttpSEClientOptions [**@totemsdk/statechain**](../index.md) *** [@totemsdk/statechain](../index.md) / HttpSEClientOptions # Interface: HttpSEClientOptions ## Properties ### fetch? > `optional` **fetch?**: \{(`input`, `init?`): `Promise`\<`Response`\>; (`input`, `init?`): `Promise`\<`Response`\>; \} Custom fetch implementation. Defaults to global fetch (Node 18+). #### Call Signature > (`input`, `init?`): `Promise`\<`Response`\> [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) ##### Parameters ###### input `RequestInfo` \| `URL` ###### init? `RequestInit` ##### Returns `Promise`\<`Response`\> #### Call Signature > (`input`, `init?`): `Promise`\<`Response`\> [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) ##### Parameters ###### input `string` \| `Request` \| `URL` ###### init? `RequestInit` ##### Returns `Promise`\<`Response`\> *** ### timeoutMs? > `optional` **timeoutMs?**: `number` Request timeout in milliseconds. Default 30 000. --- ## Page: RecoveryReport URL: https://docs.totem.ing/api/totemsdk-statechain/interfaces/RecoveryReport [**@totemsdk/statechain**](../index.md) *** [@totemsdk/statechain](../index.md) / RecoveryReport # Interface: RecoveryReport ## Properties ### hasReclaimTx > `readonly` **hasReclaimTx**: `boolean` True when a persisted `reclaimTx` exists for the chain. *** ### ownerRecoveryMaterialPresent > `readonly` **ownerRecoveryMaterialPresent**: `boolean` True when the current-owner fields needed to spend the reclaim TX exist. *** ### reason? > `readonly` `optional` **reason?**: `string` Reason when `verifies` is false. *** ### recoverableWithoutSE > `readonly` **recoverableWithoutSE**: `boolean` True when the chain can be recovered without SE cooperation (strict). *** ### verifies > `readonly` **verifies**: `boolean` True when the stored chain verifies (`verifyStateChain` passes). --- ## Page: ResolveSEClientOptions URL: https://docs.totem.ing/api/totemsdk-statechain/interfaces/ResolveSEClientOptions [**@totemsdk/statechain**](../index.md) *** [@totemsdk/statechain](../index.md) / ResolveSEClientOptions # Interface: ResolveSEClientOptions ## Properties ### fetch? > `optional` **fetch?**: \{(`input`, `init?`): `Promise`\<`Response`\>; (`input`, `init?`): `Promise`\<`Response`\>; \} #### Call Signature > (`input`, `init?`): `Promise`\<`Response`\> [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) ##### Parameters ###### input `RequestInfo` \| `URL` ###### init? `RequestInit` ##### Returns `Promise`\<`Response`\> #### Call Signature > (`input`, `init?`): `Promise`\<`Response`\> [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) ##### Parameters ###### input `string` \| `Request` \| `URL` ###### init? `RequestInit` ##### Returns `Promise`\<`Response`\> *** ### registryUrl? > `optional` **registryUrl?**: `string` *** ### timeoutMs? > `optional` **timeoutMs?**: `number` Timeout for SE HTTP requests in milliseconds. Default 30 000. --- ## Page: SEClient URL: https://docs.totem.ing/api/totemsdk-statechain/interfaces/SEClient [**@totemsdk/statechain**](../index.md) *** [@totemsdk/statechain](../index.md) / SEClient # Interface: SEClient ## Methods ### blindSign() > **blindSign**(`chainId`, `commitmentHex`): `Promise`\<`string`\> #### Parameters ##### chainId `string` ##### commitmentHex `string` #### Returns `Promise`\<`string`\> *** ### isRevoked() > **isRevoked**(`ownerPartyId`): `Promise`\<`boolean`\> #### Parameters ##### ownerPartyId `string` #### Returns `Promise`\<`boolean`\> *** ### registerChain()? > `optional` **registerChain**(`chainId`, `coinId`, `ownerPublicKeyDigest`, `lockingScript`): `Promise`\<`void`\> Optional: register a newly locked coin with the SE. Called during `createStateChain` when present. #### Parameters ##### chainId `string` ##### coinId `string` ##### ownerPublicKeyDigest `string` ##### lockingScript `string` #### Returns `Promise`\<`void`\> *** ### revokeKey() > **revokeKey**(`chainId`, `opts`): `Promise`\<`void`\> #### Parameters ##### chainId `string` ##### opts ###### newOwnerPartyId `string` ###### newOwnerPkd `string` ###### newReclaimTxHex `string` ###### previousOwnerPartyId `string` ###### previousOwnerPkd `string` #### Returns `Promise`\<`void`\> --- ## Page: SERegistryEntry URL: https://docs.totem.ing/api/totemsdk-statechain/interfaces/SERegistryEntry [**@totemsdk/statechain**](../index.md) *** [@totemsdk/statechain](../index.md) / SERegistryEntry # Interface: SERegistryEntry ## Properties ### announcedAt > **announcedAt**: `string` *** ### axiaHosted > **axiaHosted**: `boolean` *** ### chainCount > **chainCount**: `number` *** ### expiresAt > **expiresAt**: `string` *** ### feeBasisPoints > **feeBasisPoints**: `number` *** ### name > **name**: `string` *** ### sePublicKey > **sePublicKey**: `string` *** ### url > **url**: `string` *** ### verified > **verified**: `boolean` --- ## Page: StateChain URL: https://docs.totem.ing/api/totemsdk-statechain/interfaces/StateChain [**@totemsdk/statechain**](../index.md) *** [@totemsdk/statechain](../index.md) / StateChain # Interface: StateChain StateChain — in-memory state of a Mercury-protocol statechain UTXO. `lockingAddress` — same for all transfers (STATE(0) design). `coinId` — the CURRENT on-chain coin ID (updated per transfer hop). Starts as the LOCK TX output coin ID (not the original input coinId). `reclaimTx` — pre-signed unilateral reclaim TX for the CURRENT owner. Pre-built at createStateChain; rebuilt on every transferOwnership. Valid after ## COINAGE >= reclaimTimelock without SE cooperation. `reclaimAddress` — SIGNEDBY(currentOwnerPkd) output address of reclaimTx. ## Properties ### amount > **amount**: `bigint` *** ### chainId > **chainId**: `string` *** ### coinId > **coinId**: `string` *** ### createdAt > **createdAt**: `number` *** ### currentOwner > **currentOwner**: [`StatechainOwner`](StatechainOwner.md) *** ### lockingAddress > **lockingAddress**: `string` *** ### lockingScript > **lockingScript**: `string` *** ### reclaimAddress > **reclaimAddress**: `string` *** ### reclaimTimelock > **reclaimTimelock**: `number` *** ### reclaimTx > **reclaimTx**: `string` *** ### sePublicKey > **sePublicKey**: `string` *** ### status > **status**: [`StatechainStatus`](../type-aliases/StatechainStatus.md) *** ### tokenId > **tokenId**: `string` *** ### transferHistory > **transferHistory**: [`TransferRecord`](TransferRecord.md)[] --- ## Page: StateChainRegistryState URL: https://docs.totem.ing/api/totemsdk-statechain/interfaces/StateChainRegistryState [**@totemsdk/statechain**](../index.md) *** [@totemsdk/statechain](../index.md) / StateChainRegistryState # Interface: StateChainRegistryState ## Properties ### chains > `readonly` **chains**: `Record`\<`string`, [`StoredStateChain`](../type-aliases/StoredStateChain.md)\> --- ## Page: StatechainLeaseOps URL: https://docs.totem.ing/api/totemsdk-statechain/interfaces/StatechainLeaseOps [**@totemsdk/statechain**](../index.md) *** [@totemsdk/statechain](../index.md) / StatechainLeaseOps # Interface: StatechainLeaseOps ## Methods ### burnReservation() > **burnReservation**(`reservationId`): `Promise`\<`void`\> #### Parameters ##### reservationId `string` #### Returns `Promise`\<`void`\> *** ### commitKeyUse() > **commitKeyUse**(`reservationId`): `Promise`\<`void`\> #### Parameters ##### reservationId `string` #### Returns `Promise`\<`void`\> *** ### reserveKeyUse() > **reserveKeyUse**(`keyIndex`): `Promise`\<\{ `reservationId`: `string`; \}\> #### Parameters ##### keyIndex `number` #### Returns `Promise`\<\{ `reservationId`: `string`; \}\> --- ## Page: StatechainLeaseProvider URL: https://docs.totem.ing/api/totemsdk-statechain/interfaces/StatechainLeaseProvider [**@totemsdk/statechain**](../index.md) *** [@totemsdk/statechain](../index.md) / StatechainLeaseProvider # Interface: StatechainLeaseProvider StatechainLeaseProvider — operational context for SE-based flows. Used by `createStateChain`, `claimOwnership`, and `reclaimAbandoned`. `broadcast` — if present, cooperative claim / reclaim broadcast the TxPoW. `getTip` — if present alongside `proof.timelockBlock`, `reclaimAbandoned` validates the current block height before broadcasting. `verifyBlindSig` — test override for SE blind-sig verification. ## Properties ### broadcast? > `optional` **broadcast?**: (`txHex`) => `Promise`\<\{ `success?`: `boolean`; `txpowid?`: `string`; \}\> #### Parameters ##### txHex `string` #### Returns `Promise`\<\{ `success?`: `boolean`; `txpowid?`: `string`; \}\> *** ### getTip? > `optional` **getTip?**: () => `Promise`\<\{ `block`: `number`; \} \| `undefined`\> #### Returns `Promise`\<\{ `block`: `number`; \} \| `undefined`\> *** ### leaseOps? > `optional` **leaseOps?**: [`StatechainLeaseOps`](StatechainLeaseOps.md) *** ### seClient > **seClient**: [`SEClient`](SEClient.md) *** ### verifyBlindSig? > `optional` **verifyBlindSig?**: (`sig`, `commitment`, `sePkdHex`) => `boolean` #### Parameters ##### sig `string` ##### commitment `Uint8Array` ##### sePkdHex `string` #### Returns `boolean` --- ## Page: StatechainOwner URL: https://docs.totem.ing/api/totemsdk-statechain/interfaces/StatechainOwner [**@totemsdk/statechain**](../index.md) *** [@totemsdk/statechain](../index.md) / StatechainOwner # Interface: StatechainOwner StatechainOwner — owner identity and signing capability. `sign(message)` signs a `computeTransactionDigest` byte-array with this owner's WOTS key. Used for: lock TX, reclaimTx building, cooperative claim. Creation-time fields (only required on the owner passed to `createStateChain`): `address` — the coin's current address (spending address of the input UTXO). If absent, `chainProvider.getCoin(coinId)` is used as fallback. `tokenId` — token ID of the coin being locked. `amount` — coin amount in MIN base units. These three fields are stripped from the stored `StateChain.currentOwner`. `transferKeySeed` — WOTS seed (hex) for this owner's key slot. Moved into `TransferRecord.transferKey` on outbound transfer, then zeroed in-place on the original owner object so the secret does not linger in hot state. ## Properties ### address? > `optional` **address?**: `string` Source coin address — required for the lock TX in createStateChain. *** ### amount? > `optional` **amount?**: `bigint` Coin amount in MIN base units — required when creating a new statechain. *** ### partyId > **partyId**: `string` *** ### publicKeyDigest > **publicKeyDigest**: `string` *** ### tokenId? > `optional` **tokenId?**: `string` Coin token ID — required when creating a new statechain. *** ### transferKeySeed? > `optional` **transferKeySeed?**: `string` ## Methods ### sign() > **sign**(`message`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> #### Parameters ##### message `Uint8Array` #### Returns `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> --- ## Page: TransferRecord URL: https://docs.totem.ing/api/totemsdk-statechain/interfaces/TransferRecord [**@totemsdk/statechain**](../index.md) *** [@totemsdk/statechain](../index.md) / TransferRecord # Interface: TransferRecord TransferRecord — one entry per ownership hop in transferHistory. `transferKey` — prior owner's WOTS seed (hex) for custody-lineage proofs. `ownerSignature` — hex of the old owner's WOTS sig over `signedDigest`. Stored so `verifyStateChain` can verify per-hop old-owner signatures. `signedDigest` — hex of computeTransactionDigest(stateUpdateTx). Bound to `txBodyHex` — `verifyStateChain` recomputes this digest from `txBodyHex` and rejects records where they do not match. `txBodyHex` — hex of the raw serialized Transaction bytes (NOT the full TxPoW). Used by `verifyStateChain` to prevent signature grafting: the stored `signedDigest` must equal sha3_256(fromHex(txBodyHex)). `txHex` — full TxPoW hex of the on-chain state-update TX. ## Properties ### blindedSignature > **blindedSignature**: `string` *** ### from > **from**: `string` *** ### fromPublicKeyDigest > **fromPublicKeyDigest**: `string` *** ### ownerSignature > **ownerSignature**: `string` Hex of old owner's signature over signedDigest. *** ### signedDigest > **signedDigest**: `string` Hex of sha3_256(txBodyHex) — the TX body digest signed by old owner + SE. *** ### timestamp > **timestamp**: `number` *** ### to > **to**: `string` *** ### toPublicKeyDigest > **toPublicKeyDigest**: `string` *** ### transferKey > **transferKey**: `string` Prior owner's WOTS seed for custody lineage verification. *** ### txBodyHex > **txBodyHex**: `string` Hex of the raw serialized Transaction bytes (not TxPoW envelope). `verifyStateChain` recomputes sha3_256(txBodyHex) and asserts it equals `signedDigest`, binding all signatures to the specific TX data. *** ### txHex > **txHex**: `string` Full TxPoW hex of the on-chain state-update TX. --- ## Page: VerifyOptions URL: https://docs.totem.ing/api/totemsdk-statechain/interfaces/VerifyOptions [**@totemsdk/statechain**](../index.md) *** [@totemsdk/statechain](../index.md) / VerifyOptions # Interface: VerifyOptions ## Properties ### verifyBlindSig? > `optional` **verifyBlindSig?**: (`sig`, `commitment`, `sePkdHex`) => `boolean` Override SE blind-signature verification. Default: `wotsVerifyDigest(hexToBytes(sig), commitment, hexToBytes(sePkdHex))` Tests override because mock SE sigs use SHA3-256. #### Parameters ##### sig `string` ##### commitment `Uint8Array` ##### sePkdHex `string` #### Returns `boolean` *** ### verifyOwnerSig? > `optional` **verifyOwnerSig?**: (`ownerSig`, `commitment`, `fromPkdHex`) => `boolean` Override old-owner signature verification per hop. Default: `wotsVerifyDigest(hexToBytes(ownerSig), commitment, hexToBytes(fromPkdHex))` Tests override because mock owner sigs use SHA3-256. #### Parameters ##### ownerSig `string` ##### commitment `Uint8Array` ##### fromPkdHex `string` #### Returns `boolean` *** ### verifyTransferKey? > `optional` **verifyTransferKey?**: (`transferKey`, `fromPublicKeyDigest`) => `boolean` Override transferKey lineage verification. Default: `bytesToHex(derivePKdigest(hexToBytes(transferKey), 0)) === fromPublicKeyDigest` Tests override because mock seeds are not real WOTS seeds. #### Parameters ##### transferKey `string` ##### fromPublicKeyDigest `string` #### Returns `boolean` --- ## Page: VerifyResult URL: https://docs.totem.ing/api/totemsdk-statechain/interfaces/VerifyResult [**@totemsdk/statechain**](../index.md) *** [@totemsdk/statechain](../index.md) / VerifyResult # Interface: VerifyResult ## Properties ### depth > **depth**: `number` *** ### reason? > `optional` **reason?**: `string` *** ### rootOwner > **rootOwner**: `string` *** ### valid > **valid**: `boolean` --- ## Page: StatechainStatus URL: https://docs.totem.ing/api/totemsdk-statechain/type-aliases/StatechainStatus [**@totemsdk/statechain**](../index.md) *** [@totemsdk/statechain](../index.md) / StatechainStatus # Type Alias: StatechainStatus > **StatechainStatus** = `"active"` \| `"claiming"` \| `"claimed"` \| `"abandoned"` --- ## Page: StoredStateChain URL: https://docs.totem.ing/api/totemsdk-statechain/type-aliases/StoredStateChain [**@totemsdk/statechain**](../index.md) *** [@totemsdk/statechain](../index.md) / StoredStateChain # Type Alias: StoredStateChain > **StoredStateChain** = `Omit`\<[`StateChain`](../interfaces/StateChain.md), `"currentOwner"`\> & `object` Chain record as persisted (owner minus signing capability). ## Type Declaration ### currentOwner > `readonly` **currentOwner**: [`StoredStatechainOwner`](StoredStatechainOwner.md) --- ## Page: StoredStatechainOwner URL: https://docs.totem.ing/api/totemsdk-statechain/type-aliases/StoredStatechainOwner [**@totemsdk/statechain**](../index.md) *** [@totemsdk/statechain](../index.md) / StoredStatechainOwner # Type Alias: StoredStatechainOwner > **StoredStatechainOwner** = `Omit`\<[`StatechainOwner`](../interfaces/StatechainOwner.md), `"sign"`\> Owner snapshot as persisted: `sign` is a runtime capability (a closure over the caller's WOTS key) that cannot be serialised, so it is stripped on save. Every durable recovery field (`publicKeyDigest`, `transferKeySeed`) is kept; a caller re-attaches signing capability when it loads a chain into memory. --- ## Page: RECLAIM_TIMELOCK URL: https://docs.totem.ing/api/totemsdk-statechain/variables/RECLAIM_TIMELOCK [**@totemsdk/statechain**](../index.md) *** [@totemsdk/statechain](../index.md) / RECLAIM\_TIMELOCK # Variable: RECLAIM\_TIMELOCK > `const` **RECLAIM\_TIMELOCK**: `256` = `256` --- ## Page: STATECHAIN_RECORD_VERSION URL: https://docs.totem.ing/api/totemsdk-statechain/variables/STATECHAIN_RECORD_VERSION [**@totemsdk/statechain**](../index.md) *** [@totemsdk/statechain](../index.md) / STATECHAIN\_RECORD\_VERSION # Variable: STATECHAIN\_RECORD\_VERSION > `const` **STATECHAIN\_RECORD\_VERSION**: `1` = `1` On-disk registry format version (independent of on-chain protocol version). Bumping this means old snapshots must be explicitly refused (RFC-007 §4.2) — valuable state (signing history, `reclaimTx` recovery material) is never silently reinitialised. --- ## Page: ArtifactStore URL: https://docs.totem.ing/api/totemsdk-storage/classes/ArtifactStore [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / ArtifactStore # Class: ArtifactStore ## Constructors ### Constructor > **new ArtifactStore**(`backend`, `options?`): `ArtifactStore` #### Parameters ##### backend [`ArtifactStoreBackend`](../interfaces/ArtifactStoreBackend.md) ##### options? `ArtifactStoreOptions` = `{}` #### Returns `ArtifactStore` ## Accessors ### capabilities #### Get Signature > **get** **capabilities**(): [`ArtifactBackendCapabilities`](../interfaces/ArtifactBackendCapabilities.md) ##### Returns [`ArtifactBackendCapabilities`](../interfaces/ArtifactBackendCapabilities.md) ## Methods ### delete() > **delete**(`ref`): `Promise`\<`void`\> #### Parameters ##### ref [`ArtifactRef`](../interfaces/ArtifactRef.md) #### Returns `Promise`\<`void`\> *** ### get() > **get**(`ref`): `Promise`\<[`ArtifactRead`](../interfaces/ArtifactRead.md)\> #### Parameters ##### ref [`ArtifactRef`](../interfaces/ArtifactRef.md) #### Returns `Promise`\<[`ArtifactRead`](../interfaces/ArtifactRead.md)\> *** ### list() > **list**(): `Promise`\<[`ArtifactIndexEntry`](../interfaces/ArtifactIndexEntry.md)[]\> #### Returns `Promise`\<[`ArtifactIndexEntry`](../interfaces/ArtifactIndexEntry.md)[]\> *** ### put() > **put**(`namespace`, `bytes`, `options?`): `Promise`\<[`PutReceipt`](../interfaces/PutReceipt.md)\> #### Parameters ##### namespace `string` ##### bytes `Uint8Array` ##### options? [`PutOptions`](../interfaces/PutOptions.md) #### Returns `Promise`\<[`PutReceipt`](../interfaces/PutReceipt.md)\> --- ## Page: MemoryStore URL: https://docs.totem.ing/api/totemsdk-storage/classes/MemoryStore [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / MemoryStore # Class: MemoryStore ## Implements - [`StorageAdapterWithCapabilities`](../interfaces/StorageAdapterWithCapabilities.md) - [`CasStore`](../interfaces/CasStore.md) - [`TransactionalStore`](../interfaces/TransactionalStore.md) ## Constructors ### Constructor > **new MemoryStore**(): `MemoryStore` #### Returns `MemoryStore` ## Properties ### capabilities > `readonly` **capabilities**: [`StoreCapabilities`](../interfaces/StoreCapabilities.md) #### Implementation of [`StorageAdapterWithCapabilities`](../interfaces/StorageAdapterWithCapabilities.md).[`capabilities`](../interfaces/StorageAdapterWithCapabilities.md#capabilities) ## Methods ### clear() > **clear**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> #### Implementation of [`StorageAdapterWithCapabilities`](../interfaces/StorageAdapterWithCapabilities.md).[`clear`](../interfaces/StorageAdapterWithCapabilities.md#clear) *** ### conditionalUpdate() > **conditionalUpdate**\<`T`\>(`key`, `update`): `Promise`\<[`ConditionalResult`](../interfaces/ConditionalResult.md)\<`T`\>\> #### Type Parameters ##### T `T` #### Parameters ##### key `string` ##### update [`ConditionalUpdater`](../type-aliases/ConditionalUpdater.md)\<`T`\> #### Returns `Promise`\<[`ConditionalResult`](../interfaces/ConditionalResult.md)\<`T`\>\> #### Implementation of [`CasStore`](../interfaces/CasStore.md).[`conditionalUpdate`](../interfaces/CasStore.md#conditionalupdate) *** ### get() > **get**\<`T`\>(`key`): `Promise`\<`T` \| `null`\> #### Type Parameters ##### T `T` #### Parameters ##### key `string` #### Returns `Promise`\<`T` \| `null`\> #### Implementation of [`StorageAdapterWithCapabilities`](../interfaces/StorageAdapterWithCapabilities.md).[`get`](../interfaces/StorageAdapterWithCapabilities.md#get) *** ### has() > **has**(`key`): `Promise`\<`boolean`\> #### Parameters ##### key `string` #### Returns `Promise`\<`boolean`\> #### Implementation of [`StorageAdapterWithCapabilities`](../interfaces/StorageAdapterWithCapabilities.md).[`has`](../interfaces/StorageAdapterWithCapabilities.md#has) *** ### keys() > **keys**(): `Promise`\<`string`[]\> #### Returns `Promise`\<`string`[]\> #### Implementation of [`StorageAdapterWithCapabilities`](../interfaces/StorageAdapterWithCapabilities.md).[`keys`](../interfaces/StorageAdapterWithCapabilities.md#keys) *** ### remove() > **remove**(`key`): `Promise`\<`boolean`\> #### Parameters ##### key `string` #### Returns `Promise`\<`boolean`\> #### Implementation of [`StorageAdapterWithCapabilities`](../interfaces/StorageAdapterWithCapabilities.md).[`remove`](../interfaces/StorageAdapterWithCapabilities.md#remove) *** ### set() > **set**\<`T`\>(`key`, `value`): `Promise`\<`void`\> #### Type Parameters ##### T `T` #### Parameters ##### key `string` ##### value `T` #### Returns `Promise`\<`void`\> #### Implementation of [`StorageAdapterWithCapabilities`](../interfaces/StorageAdapterWithCapabilities.md).[`set`](../interfaces/StorageAdapterWithCapabilities.md#set) *** ### transaction() > **transaction**(): [`Transaction`](../interfaces/Transaction.md) #### Returns [`Transaction`](../interfaces/Transaction.md) #### Implementation of [`TransactionalStore`](../interfaces/TransactionalStore.md).[`transaction`](../interfaces/TransactionalStore.md#transaction) --- ## Page: Namespace URL: https://docs.totem.ing/api/totemsdk-storage/classes/Namespace [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / Namespace # Class: Namespace ## Implements - [`StorageAdapter`](../interfaces/StorageAdapter.md) ## Constructors ### Constructor > **new Namespace**(`store`, `prefix`): `Namespace` #### Parameters ##### store [`StorageAdapter`](../interfaces/StorageAdapter.md) ##### prefix `string` #### Returns `Namespace` ## Properties ### prefix > `readonly` **prefix**: `string` ## Methods ### clear() > **clear**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> #### Implementation of [`StorageAdapter`](../interfaces/StorageAdapter.md).[`clear`](../interfaces/StorageAdapter.md#clear) *** ### get() > **get**\<`T`\>(`key`): `Promise`\<`T` \| `null`\> #### Type Parameters ##### T `T` #### Parameters ##### key `string` #### Returns `Promise`\<`T` \| `null`\> #### Implementation of [`StorageAdapter`](../interfaces/StorageAdapter.md).[`get`](../interfaces/StorageAdapter.md#get) *** ### has() > **has**(`key`): `Promise`\<`boolean`\> #### Parameters ##### key `string` #### Returns `Promise`\<`boolean`\> #### Implementation of [`StorageAdapter`](../interfaces/StorageAdapter.md).[`has`](../interfaces/StorageAdapter.md#has) *** ### keys() > **keys**(): `Promise`\<`string`[]\> #### Returns `Promise`\<`string`[]\> #### Implementation of [`StorageAdapter`](../interfaces/StorageAdapter.md).[`keys`](../interfaces/StorageAdapter.md#keys) *** ### remove() > **remove**(`key`): `Promise`\<`boolean`\> #### Parameters ##### key `string` #### Returns `Promise`\<`boolean`\> #### Implementation of [`StorageAdapter`](../interfaces/StorageAdapter.md).[`remove`](../interfaces/StorageAdapter.md#remove) *** ### set() > **set**\<`T`\>(`key`, `value`): `Promise`\<`void`\> #### Type Parameters ##### T `T` #### Parameters ##### key `string` ##### value `T` #### Returns `Promise`\<`void`\> #### Implementation of [`StorageAdapter`](../interfaces/StorageAdapter.md).[`set`](../interfaces/StorageAdapter.md#set) --- ## Page: StorageError URL: https://docs.totem.ing/api/totemsdk-storage/classes/StorageError [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / StorageError # Class: StorageError ## Extends - `Error` ## Constructors ### Constructor > **new StorageError**(`message`, `code`, `details?`): `StorageError` #### Parameters ##### message `string` ##### code `"not-found"` \| `"corrupt"` \| `"unavailable"` \| `"write-failed"` ##### details? [`StorageErrorDetails`](../interfaces/StorageErrorDetails.md) = `{}` #### Returns `StorageError` #### Overrides `Error.constructor` ## Properties ### code > `readonly` **code**: `"not-found"` \| `"corrupt"` \| `"unavailable"` \| `"write-failed"` *** ### details > `readonly` **details**: `Readonly`\<`Record`\<`string`, `unknown`\>\> *** ### key? > `readonly` `optional` **key?**: `string` *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: artifactRefId URL: https://docs.totem.ing/api/totemsdk-storage/functions/artifactRefId [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / artifactRefId # Function: artifactRefId() > **artifactRefId**(`ref`): `string` ## Parameters ### ref [`ArtifactRef`](../interfaces/ArtifactRef.md) ## Returns `string` --- ## Page: asStorageError URL: https://docs.totem.ing/api/totemsdk-storage/functions/asStorageError [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / asStorageError # Function: asStorageError() > **asStorageError**(`err`, `fallback?`): [`StorageError`](../classes/StorageError.md) ## Parameters ### err `unknown` ### fallback? `"not-found"` \| `"corrupt"` \| `"unavailable"` \| `"write-failed"` ## Returns [`StorageError`](../classes/StorageError.md) --- ## Page: assertCapabilities URL: https://docs.totem.ing/api/totemsdk-storage/functions/assertCapabilities [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / assertCapabilities # Function: assertCapabilities() > **assertCapabilities**(`adapter`, `required`): `void` No-silent-downgrade guard (RFC-007 §4.2). A consumer that requires `durably-acknowledged`, atomic, or conditional writes must reject an adapter that cannot provide them at construction time. ## Parameters ### adapter [`StorageAdapterWithCapabilities`](../interfaces/StorageAdapterWithCapabilities.md) ### required `Partial`\<[`StoreCapabilities`](../interfaces/StoreCapabilities.md)\> ## Returns `void` --- ## Page: createJournal URL: https://docs.totem.ing/api/totemsdk-storage/functions/createJournal [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / createJournal # Function: createJournal() > **createJournal**\<`T`\>(`adapter`, `options?`): [`Journal`](../interfaces/Journal.md)\<`T`\> ## Type Parameters ### T `T` ## Parameters ### adapter [`StorageAdapterWithCapabilities`](../interfaces/StorageAdapterWithCapabilities.md) & [`CasStore`](../interfaces/CasStore.md) ### options? [`JournalOptions`](../interfaces/JournalOptions.md)\<`T`\> = `{}` ## Returns [`Journal`](../interfaces/Journal.md)\<`T`\> --- ## Page: createRevisionedSnapshotStore URL: https://docs.totem.ing/api/totemsdk-storage/functions/createRevisionedSnapshotStore [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / createRevisionedSnapshotStore # Function: createRevisionedSnapshotStore() > **createRevisionedSnapshotStore**\<`T`\>(`adapter`, `options`): [`RevisionedSnapshotStore`](../interfaces/RevisionedSnapshotStore.md)\<`T`\> ## Type Parameters ### T `T` ## Parameters ### adapter [`StorageAdapterWithCapabilities`](../interfaces/StorageAdapterWithCapabilities.md) & [`CasStore`](../interfaces/CasStore.md) ### options [`RevisionedSnapshotStoreOptions`](../interfaces/RevisionedSnapshotStoreOptions.md)\<`T`\> ## Returns [`RevisionedSnapshotStore`](../interfaces/RevisionedSnapshotStore.md)\<`T`\> --- ## Page: enqueueItem URL: https://docs.totem.ing/api/totemsdk-storage/functions/enqueueItem [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / enqueueItem # Function: enqueueItem() > **enqueueItem**\<`T`\>(`store`, `key`, `item`): `Promise`\<[`EnqueueReceipt`](../interfaces/EnqueueReceipt.md)\> ## Type Parameters ### T `T` ## Parameters ### store [`TransactionalStore`](../interfaces/TransactionalStore.md) ### key `string` ### item `T` ## Returns `Promise`\<[`EnqueueReceipt`](../interfaces/EnqueueReceipt.md)\> --- ## Page: isStorageError URL: https://docs.totem.ing/api/totemsdk-storage/functions/isStorageError [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / isStorageError # Function: isStorageError() > **isStorageError**(`err`): `err is StorageError` ## Parameters ### err `unknown` ## Returns `err is StorageError` --- ## Page: jsonClean URL: https://docs.totem.ing/api/totemsdk-storage/functions/jsonClean [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / jsonClean # Function: jsonClean() > **jsonClean**(`value`): `unknown` Persistable values are JSON-clean by contract (the codec rejects bare `undefined` rather than silently dropping it): object keys with undefined values are removed and undefined array entries become `null`, matching `JSON.stringify` semantics while preserving bigint and Uint8Array values. ## Parameters ### value `unknown` ## Returns `unknown` --- ## Page: ArtifactBackendCapabilities URL: https://docs.totem.ing/api/totemsdk-storage/interfaces/ArtifactBackendCapabilities [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / ArtifactBackendCapabilities # Interface: ArtifactBackendCapabilities ## Properties ### acknowledge > `readonly` **acknowledge**: `"volatile"` \| `"buffered"` \| `"durably-acknowledged"` *** ### atomic > `readonly` **atomic**: `boolean` *** ### offlineReadable > `readonly` **offlineReadable**: `boolean` *** ### retention > `readonly` **retention**: `"fixed"` \| `"managed"` \| `"none"` *** ### writable > `readonly` **writable**: `boolean` --- ## Page: ArtifactIndexEntry URL: https://docs.totem.ing/api/totemsdk-storage/interfaces/ArtifactIndexEntry [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / ArtifactIndexEntry # Interface: ArtifactIndexEntry ## Properties ### createdAt > `readonly` **createdAt**: `number` *** ### id > `readonly` **id**: `string` *** ### owner? > `readonly` `optional` **owner?**: `string` *** ### ref > `readonly` **ref**: [`ArtifactRef`](ArtifactRef.md) *** ### retentionMs? > `readonly` `optional` **retentionMs?**: `number` *** ### size > `readonly` **size**: `number` *** ### tombstone? > `readonly` `optional` **tombstone?**: `boolean` --- ## Page: ArtifactRead URL: https://docs.totem.ing/api/totemsdk-storage/interfaces/ArtifactRead [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / ArtifactRead # Interface: ArtifactRead ## Properties ### bytes? > `readonly` `optional` **bytes?**: `Uint8Array`\<`ArrayBufferLike`\> *** ### message? > `readonly` `optional` **message?**: `string` *** ### status > `readonly` **status**: [`ArtifactReadStatus`](../type-aliases/ArtifactReadStatus.md) --- ## Page: ArtifactRef URL: https://docs.totem.ing/api/totemsdk-storage/interfaces/ArtifactRef [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / ArtifactRef # Interface: ArtifactRef ## Properties ### algorithm > `readonly` **algorithm**: `"sha3-256"` *** ### digest > `readonly` **digest**: `string` *** ### namespace > `readonly` **namespace**: `string` --- ## Page: ArtifactStoreBackend URL: https://docs.totem.ing/api/totemsdk-storage/interfaces/ArtifactStoreBackend [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / ArtifactStoreBackend # Interface: ArtifactStoreBackend ## Properties ### capabilities > `readonly` **capabilities**: [`ArtifactBackendCapabilities`](ArtifactBackendCapabilities.md) ## Methods ### delete()? > `optional` **delete**(`ref`): `Promise`\<`void`\> #### Parameters ##### ref [`ArtifactRef`](ArtifactRef.md) #### Returns `Promise`\<`void`\> *** ### get() > **get**(`ref`): `Promise`\<[`ArtifactRead`](ArtifactRead.md)\> #### Parameters ##### ref [`ArtifactRef`](ArtifactRef.md) #### Returns `Promise`\<[`ArtifactRead`](ArtifactRead.md)\> *** ### put() > **put**(`ref`, `bytes`, `options?`): `Promise`\<[`PutReceipt`](PutReceipt.md)\> #### Parameters ##### ref [`ArtifactRef`](ArtifactRef.md) ##### bytes `Uint8Array` ##### options? [`PutOptions`](PutOptions.md) #### Returns `Promise`\<[`PutReceipt`](PutReceipt.md)\> --- ## Page: CasStore URL: https://docs.totem.ing/api/totemsdk-storage/interfaces/CasStore [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / CasStore # Interface: CasStore ## Methods ### conditionalUpdate() > **conditionalUpdate**\<`T`\>(`key`, `update`): `Promise`\<[`ConditionalResult`](ConditionalResult.md)\<`T`\>\> #### Type Parameters ##### T `T` #### Parameters ##### key `string` ##### update [`ConditionalUpdater`](../type-aliases/ConditionalUpdater.md)\<`T`\> #### Returns `Promise`\<[`ConditionalResult`](ConditionalResult.md)\<`T`\>\> --- ## Page: Codec URL: https://docs.totem.ing/api/totemsdk-storage/interfaces/Codec [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / Codec # Interface: Codec ## Properties ### version > `readonly` **version**: `number` ## Methods ### deserialize() > **deserialize**(`data`): `unknown` #### Parameters ##### data `Uint8Array` #### Returns `unknown` *** ### serialize() > **serialize**(`value`): `Uint8Array` #### Parameters ##### value `unknown` #### Returns `Uint8Array` --- ## Page: ConditionalResult URL: https://docs.totem.ing/api/totemsdk-storage/interfaces/ConditionalResult [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / ConditionalResult # Interface: ConditionalResult\ ## Type Parameters ### T `T` ## Properties ### applied > `readonly` **applied**: `boolean` *** ### revision > `readonly` **revision**: `number` *** ### value > `readonly` **value**: `T` \| `null` --- ## Page: EnqueueReceipt URL: https://docs.totem.ing/api/totemsdk-storage/interfaces/EnqueueReceipt [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / EnqueueReceipt # Interface: EnqueueReceipt ## Properties ### index > `readonly` **index**: `number` --- ## Page: Journal URL: https://docs.totem.ing/api/totemsdk-storage/interfaces/Journal [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / Journal # Interface: Journal\ ## Type Parameters ### T `T` ## Methods ### append() > **append**(`record`): `Promise`\<[`JournalEntry`](JournalEntry.md)\<`T`\>\> Append one record; returns the immutable entry. #### Parameters ##### record `T` #### Returns `Promise`\<[`JournalEntry`](JournalEntry.md)\<`T`\>\> *** ### appendBatch() > **appendBatch**(`records`): `Promise`\<[`JournalEntry`](JournalEntry.md)\<`T`\>[]\> Append records in order. Not atomic across adapters (append-only records are immutable, so a failure partway is an unrecorded tail, repaired by `recover()`); entries are appendable one-at-a-time. #### Parameters ##### records readonly `T`[] #### Returns `Promise`\<[`JournalEntry`](JournalEntry.md)\<`T`\>[]\> *** ### count() > **count**(): `Promise`\<`number`\> Number of durably-recorded entries (contiguous from 1). #### Returns `Promise`\<`number`\> *** ### getHead() > **getHead**(): `Promise`\<`number`\> Highest contiguous durably-recorded sequence (0 when empty). #### Returns `Promise`\<`number`\> *** ### hasState() > **hasState**(): `Promise`\<`boolean`\> True when the journal holds any state (head or entries). #### Returns `Promise`\<`boolean`\> *** ### read() > **read**(`fromSeq?`, `toSeq?`): `Promise`\<[`JournalEntry`](JournalEntry.md)\<`T`\>[]\> Replay records in ascending sequence, `fromSeq`..`toSeq` (default: all records so far). #### Parameters ##### fromSeq? `number` ##### toSeq? `number` #### Returns `Promise`\<[`JournalEntry`](JournalEntry.md)\<`T`\>[]\> *** ### readSince() > **readSince**(`seq`): `Promise`\<[`JournalEntry`](JournalEntry.md)\<`T`\>[]\> Replay records after `seq` (checkpoint resume), ascending. #### Parameters ##### seq `number` #### Returns `Promise`\<[`JournalEntry`](JournalEntry.md)\<`T`\>[]\> *** ### recover() > **recover**(): `Promise`\<[`JournalRecoveryReport`](JournalRecoveryReport.md)\> Repair a possibly torn head: roll back an unrecorded tail left by a crash between CAS head bump and entry write; surface any gap below the contiguous tail as `corrupt`. #### Returns `Promise`\<[`JournalRecoveryReport`](JournalRecoveryReport.md)\> *** ### tail() > **tail**(`count`): `Promise`\<[`JournalEntry`](JournalEntry.md)\<`T`\>[]\> Last `count` records, ascending (clamped). #### Parameters ##### count `number` #### Returns `Promise`\<[`JournalEntry`](JournalEntry.md)\<`T`\>[]\> --- ## Page: JournalEntry URL: https://docs.totem.ing/api/totemsdk-storage/interfaces/JournalEntry [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / JournalEntry # Interface: JournalEntry\ One immutable journal entry. ## Type Parameters ### T `T` ## Properties ### createdAt > `readonly` **createdAt**: `number` *** ### record > `readonly` **record**: `T` *** ### seq > `readonly` **seq**: `number` Monotonic, collision-free sequence (1-based; 0 = no entries). *** ### version > `readonly` **version**: `number` Format version of this entry's record (forward-migratable on read). --- ## Page: JournalOptions URL: https://docs.totem.ing/api/totemsdk-storage/interfaces/JournalOptions [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / JournalOptions # Interface: JournalOptions\ ## Type Parameters ### T `T` ## Properties ### migrate? > `readonly` `optional` **migrate?**: (`version`, `record`) => `T` Forward-migrate an older record version to the current shape. Invoked on every read of an entry whose `version` predates `JOURNAL_RECORD_VERSION`. A migration that cannot be performed, or an entry whose version exceeds the current one, refuses to open as `corrupt` — never silent. #### Parameters ##### version `number` ##### record `unknown` #### Returns `T` *** ### namespace? > `readonly` `optional` **namespace?**: `string` Key namespace prefix; default `totem_journal:v1:`. *** ### requireAckMode? > `readonly` `optional` **requireAckMode?**: `"volatile"` \| `"buffered"` \| `"durably-acknowledged"` Required write acknowledgment; default `durably-acknowledged`. Pass `volatile` only for tests/dev adapters (e.g. `MemoryStore`). *** ### validate? > `readonly` `optional` **validate?**: (`record`) => `void` Optional structural validation run on every appended/read record. #### Parameters ##### record `T` #### Returns `void` --- ## Page: JournalRecoveryReport URL: https://docs.totem.ing/api/totemsdk-storage/interfaces/JournalRecoveryReport [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / JournalRecoveryReport # Interface: JournalRecoveryReport ## Properties ### gapAt > `readonly` **gapAt**: readonly `number`[] seqs missing below the contiguous tail — corruption the journal refuses. *** ### headAfter > `readonly` **headAfter**: `number` Highest contiguous durably-recorded sequence. *** ### headBefore > `readonly` **headBefore**: `number` Head before `recover()` ran (may already equal `headAfter`). *** ### repairedUnrecordedTail > `readonly` **repairedUnrecordedTail**: `boolean` True when an unrecorded tail was rolled back (crash between bump+write). --- ## Page: PutOptions URL: https://docs.totem.ing/api/totemsdk-storage/interfaces/PutOptions [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / PutOptions # Interface: PutOptions ## Properties ### metadata? > `readonly` `optional` **metadata?**: `Readonly`\<`Record`\<`string`, `string`\>\> *** ### retentionMs? > `readonly` `optional` **retentionMs?**: `number` --- ## Page: PutReceipt URL: https://docs.totem.ing/api/totemsdk-storage/interfaces/PutReceipt [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / PutReceipt # Interface: PutReceipt ## Properties ### acknowledge > `readonly` **acknowledge**: `"volatile"` \| `"buffered"` \| `"durably-acknowledged"` *** ### ref > `readonly` **ref**: [`ArtifactRef`](ArtifactRef.md) *** ### size > `readonly` **size**: `number` --- ## Page: RevisionedSnapshotStore URL: https://docs.totem.ing/api/totemsdk-storage/interfaces/RevisionedSnapshotStore [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / RevisionedSnapshotStore # Interface: RevisionedSnapshotStore\ ## Type Parameters ### T `T` ## Methods ### getRecord() > **getRecord**(): `Promise`\<[`SnapshotRecord`](SnapshotRecord.md)\<`T`\>\> Current record envelope, including `revision`. #### Returns `Promise`\<[`SnapshotRecord`](SnapshotRecord.md)\<`T`\>\> *** ### getRevision() > **getRevision**(): `Promise`\<`number`\> Current transition counter (0 when no record exists). #### Returns `Promise`\<`number`\> *** ### hasState() > **hasState**(): `Promise`\<`boolean`\> True when a record has been persisted. #### Returns `Promise`\<`boolean`\> *** ### load() > **load**(): `Promise`\<`T`\> Current stored state (`empty()` result when no record exists yet). #### Returns `Promise`\<`T`\> *** ### mutate() > **mutate**(`update`): `Promise`\<[`SnapshotRecord`](SnapshotRecord.md)\<`T`\>\> Apply a whole-state transition under revision-CAS. #### Parameters ##### update (`state`) => `T` #### Returns `Promise`\<[`SnapshotRecord`](SnapshotRecord.md)\<`T`\>\> --- ## Page: RevisionedSnapshotStoreOptions URL: https://docs.totem.ing/api/totemsdk-storage/interfaces/RevisionedSnapshotStoreOptions [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / RevisionedSnapshotStoreOptions # Interface: RevisionedSnapshotStoreOptions\ ## Type Parameters ### T `T` ## Properties ### empty > `readonly` **empty**: () => `T` Build a pristine state when no record exists. #### Returns `T` *** ### namespace? > `readonly` `optional` **namespace?**: `string` Key namespace prefix; default `totem_snapshot:v1:`. *** ### requireAckMode? > `readonly` `optional` **requireAckMode?**: `"volatile"` \| `"buffered"` \| `"durably-acknowledged"` Required write acknowledgment; default `durably-acknowledged`. Pass `volatile` only for tests/scratch adapters (e.g. `MemoryStore`). *** ### validate? > `readonly` `optional` **validate?**: (`state`) => `void` Structural validation hook run over a loaded state. Throw `StorageError('corrupt')` for anything a consumer refuses to open — corruption is surfaced, never treated as absence. #### Parameters ##### state `T` #### Returns `void` --- ## Page: SnapshotRecord URL: https://docs.totem.ing/api/totemsdk-storage/interfaces/SnapshotRecord [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / SnapshotRecord # Interface: SnapshotRecord\ ## Type Parameters ### T `T` ## Properties ### revision > `readonly` **revision**: `number` Monotonic transition counter — advanced on every mutation. *** ### savedAt > `readonly` **savedAt**: `number` *** ### state > `readonly` **state**: `T` *** ### version > `readonly` **version**: `number` In-record format version (`SNAPSHOT_RECORD_VERSION`). --- ## Page: StorageAdapter URL: https://docs.totem.ing/api/totemsdk-storage/interfaces/StorageAdapter [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / StorageAdapter # Interface: StorageAdapter ## Extended by - [`StorageAdapterWithCapabilities`](StorageAdapterWithCapabilities.md) ## Methods ### clear() > **clear**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### get() > **get**\<`T`\>(`key`): `Promise`\<`T` \| `null`\> #### Type Parameters ##### T `T` #### Parameters ##### key `string` #### Returns `Promise`\<`T` \| `null`\> *** ### has() > **has**(`key`): `Promise`\<`boolean`\> #### Parameters ##### key `string` #### Returns `Promise`\<`boolean`\> *** ### keys() > **keys**(): `Promise`\<`string`[]\> #### Returns `Promise`\<`string`[]\> *** ### remove() > **remove**(`key`): `Promise`\<`boolean`\> #### Parameters ##### key `string` #### Returns `Promise`\<`boolean`\> *** ### set() > **set**\<`T`\>(`key`, `value`): `Promise`\<`void`\> #### Type Parameters ##### T `T` #### Parameters ##### key `string` ##### value `T` #### Returns `Promise`\<`void`\> --- ## Page: StorageAdapterWithCapabilities URL: https://docs.totem.ing/api/totemsdk-storage/interfaces/StorageAdapterWithCapabilities [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / StorageAdapterWithCapabilities # Interface: StorageAdapterWithCapabilities ## Extends - [`StorageAdapter`](StorageAdapter.md) ## Properties ### capabilities > `readonly` **capabilities**: [`StoreCapabilities`](StoreCapabilities.md) ## Methods ### clear() > **clear**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> #### Inherited from [`StorageAdapter`](StorageAdapter.md).[`clear`](StorageAdapter.md#clear) *** ### close()? > `optional` **close**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### get() > **get**\<`T`\>(`key`): `Promise`\<`T` \| `null`\> #### Type Parameters ##### T `T` #### Parameters ##### key `string` #### Returns `Promise`\<`T` \| `null`\> #### Inherited from [`StorageAdapter`](StorageAdapter.md).[`get`](StorageAdapter.md#get) *** ### has() > **has**(`key`): `Promise`\<`boolean`\> #### Parameters ##### key `string` #### Returns `Promise`\<`boolean`\> #### Inherited from [`StorageAdapter`](StorageAdapter.md).[`has`](StorageAdapter.md#has) *** ### keys() > **keys**(): `Promise`\<`string`[]\> #### Returns `Promise`\<`string`[]\> #### Inherited from [`StorageAdapter`](StorageAdapter.md).[`keys`](StorageAdapter.md#keys) *** ### remove() > **remove**(`key`): `Promise`\<`boolean`\> #### Parameters ##### key `string` #### Returns `Promise`\<`boolean`\> #### Inherited from [`StorageAdapter`](StorageAdapter.md).[`remove`](StorageAdapter.md#remove) *** ### set() > **set**\<`T`\>(`key`, `value`): `Promise`\<`void`\> #### Type Parameters ##### T `T` #### Parameters ##### key `string` ##### value `T` #### Returns `Promise`\<`void`\> #### Inherited from [`StorageAdapter`](StorageAdapter.md).[`set`](StorageAdapter.md#set) --- ## Page: StorageErrorDetails URL: https://docs.totem.ing/api/totemsdk-storage/interfaces/StorageErrorDetails [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / StorageErrorDetails # Interface: StorageErrorDetails ## Properties ### cause? > `readonly` `optional` **cause?**: `unknown` *** ### detectedVersion? > `readonly` `optional` **detectedVersion?**: `number` *** ### key? > `readonly` `optional` **key?**: `string` *** ### unsupportedVersion? > `readonly` `optional` **unsupportedVersion?**: `number` --- ## Page: StoreCapabilities URL: https://docs.totem.ing/api/totemsdk-storage/interfaces/StoreCapabilities [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / StoreCapabilities # Interface: StoreCapabilities ## Properties ### acknowledge > `readonly` **acknowledge**: `"volatile"` \| `"buffered"` \| `"durably-acknowledged"` *** ### atomic > `readonly` **atomic**: `boolean` *** ### conditional > `readonly` **conditional**: `boolean` --- ## Page: Transaction URL: https://docs.totem.ing/api/totemsdk-storage/interfaces/Transaction [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / Transaction # Interface: Transaction ## Methods ### commit() > **commit**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### get() > **get**\<`T`\>(`key`): `Promise`\<`T` \| `null`\> #### Type Parameters ##### T `T` #### Parameters ##### key `string` #### Returns `Promise`\<`T` \| `null`\> *** ### remove() > **remove**(`key`): `Transaction` #### Parameters ##### key `string` #### Returns `Transaction` *** ### set() > **set**\<`T`\>(`key`, `value`): `Transaction` #### Type Parameters ##### T `T` #### Parameters ##### key `string` ##### value `T` #### Returns `Transaction` --- ## Page: TransactionalStore URL: https://docs.totem.ing/api/totemsdk-storage/interfaces/TransactionalStore [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / TransactionalStore # Interface: TransactionalStore ## Methods ### transaction() > **transaction**(): [`Transaction`](Transaction.md) #### Returns [`Transaction`](Transaction.md) --- ## Page: ArtifactReadStatus URL: https://docs.totem.ing/api/totemsdk-storage/type-aliases/ArtifactReadStatus [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / ArtifactReadStatus # Type Alias: ArtifactReadStatus > **ArtifactReadStatus** = `"ok"` \| `"not-found"` \| `"corrupt"` \| `"unavailable"` --- ## Page: ConditionalUpdateDecision URL: https://docs.totem.ing/api/totemsdk-storage/type-aliases/ConditionalUpdateDecision [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / ConditionalUpdateDecision # Type Alias: ConditionalUpdateDecision\ > **ConditionalUpdateDecision**\<`T`\> = \{ `next`: `T`; \} \| \{ `abort`: `string`; \} ## Type Parameters ### T `T` --- ## Page: ConditionalUpdater URL: https://docs.totem.ing/api/totemsdk-storage/type-aliases/ConditionalUpdater [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / ConditionalUpdater # Type Alias: ConditionalUpdater\ > **ConditionalUpdater**\<`T`\> = (`current`) => [`ConditionalUpdateDecision`](ConditionalUpdateDecision.md)\<`T`\> ## Type Parameters ### T `T` ## Parameters ### current `T` \| `null` ## Returns [`ConditionalUpdateDecision`](ConditionalUpdateDecision.md)\<`T`\> --- ## Page: FailurePolicy URL: https://docs.totem.ing/api/totemsdk-storage/type-aliases/FailurePolicy [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / FailurePolicy # Type Alias: FailurePolicy > **FailurePolicy** = *typeof* [`FailurePolicies`](../variables/FailurePolicies.md)\[`number`\] --- ## Page: StorageErrorCode URL: https://docs.totem.ing/api/totemsdk-storage/type-aliases/StorageErrorCode [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / StorageErrorCode # Type Alias: StorageErrorCode > **StorageErrorCode** = *typeof* [`StorageErrorCodes`](../variables/StorageErrorCodes.md)\[`number`\] --- ## Page: WriteAckMode URL: https://docs.totem.ing/api/totemsdk-storage/type-aliases/WriteAckMode [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / WriteAckMode # Type Alias: WriteAckMode > **WriteAckMode** = *typeof* [`WriteAckModes`](../variables/WriteAckModes.md)\[`number`\] --- ## Page: ARTIFACT_DEFAULT_ALGORITHM URL: https://docs.totem.ing/api/totemsdk-storage/variables/ARTIFACT_DEFAULT_ALGORITHM [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / ARTIFACT\_DEFAULT\_ALGORITHM # Variable: ARTIFACT\_DEFAULT\_ALGORITHM > `const` **ARTIFACT\_DEFAULT\_ALGORITHM**: `ArtifactHashAlgorithm` = `'sha3-256'` --- ## Page: CODEC_MAGIC URL: https://docs.totem.ing/api/totemsdk-storage/variables/CODEC_MAGIC [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / CODEC\_MAGIC # Variable: CODEC\_MAGIC > `const` **CODEC\_MAGIC**: `Uint8Array`\<`ArrayBuffer`\> --- ## Page: CODEC_VERSION URL: https://docs.totem.ing/api/totemsdk-storage/variables/CODEC_VERSION [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / CODEC\_VERSION # Variable: CODEC\_VERSION > `const` **CODEC\_VERSION**: `1` = `1` --- ## Page: FailurePolicies URL: https://docs.totem.ing/api/totemsdk-storage/variables/FailurePolicies [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / FailurePolicies # Variable: FailurePolicies > `const` **FailurePolicies**: readonly \[`"strict"`, `"lenient"`\] --- ## Page: JOURNAL_RECORD_VERSION URL: https://docs.totem.ing/api/totemsdk-storage/variables/JOURNAL_RECORD_VERSION [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / JOURNAL\_RECORD\_VERSION # Variable: JOURNAL\_RECORD\_VERSION > `const` **JOURNAL\_RECORD\_VERSION**: `2` = `2` Current entry format version. 1 is the 2026 initial journal layout; set to 2 so that genuinely older journal formats can be demonstrated as forward-migratable on read (migration is opt-in via `JournalOptions.migrate`). --- ## Page: SNAPSHOT_RECORD_VERSION URL: https://docs.totem.ing/api/totemsdk-storage/variables/SNAPSHOT_RECORD_VERSION [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / SNAPSHOT\_RECORD\_VERSION # Variable: SNAPSHOT\_RECORD\_VERSION > `const` **SNAPSHOT\_RECORD\_VERSION**: `1` = `1` On-disk record version. Bumping this means old records must be explicitly refused (never silently reinitialised). --- ## Page: StorageErrorCodes URL: https://docs.totem.ing/api/totemsdk-storage/variables/StorageErrorCodes [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / StorageErrorCodes # Variable: StorageErrorCodes > `const` **StorageErrorCodes**: readonly \[`"not-found"`, `"corrupt"`, `"unavailable"`, `"write-failed"`\] --- ## Page: WriteAckModes URL: https://docs.totem.ing/api/totemsdk-storage/variables/WriteAckModes [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / WriteAckModes # Variable: WriteAckModes > `const` **WriteAckModes**: readonly \[`"volatile"`, `"buffered"`, `"durably-acknowledged"`\] --- ## Page: codec URL: https://docs.totem.ing/api/totemsdk-storage/variables/codec [**@totemsdk/storage**](../index.md) *** [@totemsdk/storage](../index.md) / codec # Variable: codec > `const` **codec**: [`Codec`](../interfaces/Codec.md) --- ## Page: ClosedTransportError URL: https://docs.totem.ing/api/totemsdk-stream-transport/classes/ClosedTransportError [**@totemsdk/stream-transport**](../index.md) *** [@totemsdk/stream-transport](../index.md) / ClosedTransportError # Class: ClosedTransportError Thrown by send() when the transport has been closed. ## Extends - `Error` ## Constructors ### Constructor > **new ClosedTransportError**(`message?`): `ClosedTransportError` #### Parameters ##### message? `string` = `'transport is closed'` #### Returns `ClosedTransportError` #### Overrides `Error.constructor` ## Properties ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > `readonly` **name**: `"ClosedTransportError"` = `'ClosedTransportError'` #### Overrides `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: HyperswarmStreamTransport URL: https://docs.totem.ing/api/totemsdk-stream-transport/classes/HyperswarmStreamTransport [**@totemsdk/stream-transport**](../index.md) *** [@totemsdk/stream-transport](../index.md) / HyperswarmStreamTransport # Class: HyperswarmStreamTransport Adapts a raw Hyperswarm connection (a Node.js Duplex stream) to IStreamTransport, carrying the connection's info (publicKey, topics). ## Extends - [`NodeStreamTransport`](NodeStreamTransport.md) ## Constructors ### Constructor > **new HyperswarmStreamTransport**(`conn`, `info`): `HyperswarmStreamTransport` #### Parameters ##### conn `unknown` ##### info ###### publicKey `Buffer` ###### topics? `Buffer`\<`ArrayBufferLike`\>[] #### Returns `HyperswarmStreamTransport` #### Overrides [`NodeStreamTransport`](NodeStreamTransport.md).[`constructor`](NodeStreamTransport.md#constructor) ## Properties ### pubkey > `readonly` **pubkey**: `string` *** ### topics > `readonly` **topics**: `Buffer`\<`ArrayBufferLike`\>[] ## Accessors ### state #### Get Signature > **get** **state**(): [`TransportState`](../type-aliases/TransportState.md) Explicit connection state. ##### Returns [`TransportState`](../type-aliases/TransportState.md) Explicit connection state. #### Inherited from [`NodeStreamTransport`](NodeStreamTransport.md).[`state`](NodeStreamTransport.md#state) ## Methods ### close() > **close**(): `Promise`\<`void`\> Close the transport. After the returned promise resolves, no further data or close deliveries occur. Calling close() more than once is safe (the second call resolves immediately). #### Returns `Promise`\<`void`\> #### Inherited from [`NodeStreamTransport`](NodeStreamTransport.md).[`close`](NodeStreamTransport.md#close) *** ### onClose() > **onClose**(`handler`): () => `void` Subscribe to connection close. Returns an unsubscribe function. #### Parameters ##### handler [`CloseHandler`](../type-aliases/CloseHandler.md) #### Returns () => `void` #### Inherited from [`NodeStreamTransport`](NodeStreamTransport.md).[`onClose`](NodeStreamTransport.md#onclose) *** ### onData() > **onData**(`handler`): () => `void` Subscribe to data chunks. Returns an unsubscribe function. #### Parameters ##### handler [`DataHandler`](../type-aliases/DataHandler.md) #### Returns () => `void` #### Inherited from [`NodeStreamTransport`](NodeStreamTransport.md).[`onData`](NodeStreamTransport.md#ondata) *** ### onError() > **onError**(`handler`): () => `void` Subscribe to transport errors. Returns an unsubscribe function. #### Parameters ##### handler [`ErrorHandler`](../type-aliases/ErrorHandler.md) #### Returns () => `void` #### Inherited from [`NodeStreamTransport`](NodeStreamTransport.md).[`onError`](NodeStreamTransport.md#onerror) *** ### send() > **send**(`data`): `Promise`\<`void`\> Send bytes to the remote peer. - Returns a promise that resolves once the bytes are accepted by the underlying transport (or after the documented backpressure policy). - Rejects with `ClosedTransportError` if the transport is closed. - Rejects with the underlying error if delivery fails. #### Parameters ##### data `Uint8Array` #### Returns `Promise`\<`void`\> #### Inherited from [`NodeStreamTransport`](NodeStreamTransport.md).[`send`](NodeStreamTransport.md#send) --- ## Page: InMemoryTransport URL: https://docs.totem.ing/api/totemsdk-stream-transport/classes/InMemoryTransport [**@totemsdk/stream-transport**](../index.md) *** [@totemsdk/stream-transport](../index.md) / InMemoryTransport # Class: InMemoryTransport In-process bidirectional transport for use in unit tests and the contract suite. Call createInMemoryPair() to get two linked instances. Extra test-helper methods: _deliver(event, ...args) — fire event handlers on this side only _deliverClose() — fire 'close' on this side's handlers only simulateRemoteClose() — fire 'close' on BOTH sides (asynchronous) _simulateServerClose() — alias for simulateRemoteClose() _linkPeer(other) — link two transports together ## Implements - [`IStreamTransport`](../interfaces/IStreamTransport.md) ## Constructors ### Constructor > **new InMemoryTransport**(): `InMemoryTransport` #### Returns `InMemoryTransport` ## Accessors ### state #### Get Signature > **get** **state**(): [`TransportState`](../type-aliases/TransportState.md) Explicit connection state. ##### Returns [`TransportState`](../type-aliases/TransportState.md) Explicit connection state. #### Implementation of [`IStreamTransport`](../interfaces/IStreamTransport.md).[`state`](../interfaces/IStreamTransport.md#state) ## Methods ### \_deliver() > **\_deliver**(`event`, ...`args`): `void` Fire event handlers on THIS side only. #### Parameters ##### event `string` ##### args ...`unknown`[] #### Returns `void` *** ### \_deliverClose() > **\_deliverClose**(): `void` Fire 'close' on this side's handlers only (for reconnect testing). #### Returns `void` *** ### \_linkPeer() > **\_linkPeer**(`other`): `void` #### Parameters ##### other `InMemoryTransport` #### Returns `void` *** ### \_simulateServerClose() > **\_simulateServerClose**(): `void` Alias for simulateRemoteClose(). #### Returns `void` *** ### close() > **close**(): `Promise`\<`void`\> Close the transport. After the returned promise resolves, no further data or close deliveries occur. Calling close() more than once is safe (the second call resolves immediately). #### Returns `Promise`\<`void`\> #### Implementation of [`IStreamTransport`](../interfaces/IStreamTransport.md).[`close`](../interfaces/IStreamTransport.md#close) *** ### onClose() > **onClose**(`handler`): () => `void` Subscribe to connection close. Returns an unsubscribe function. #### Parameters ##### handler [`CloseHandler`](../type-aliases/CloseHandler.md) #### Returns () => `void` #### Implementation of [`IStreamTransport`](../interfaces/IStreamTransport.md).[`onClose`](../interfaces/IStreamTransport.md#onclose) *** ### onData() > **onData**(`handler`): () => `void` Subscribe to data chunks. Returns an unsubscribe function. #### Parameters ##### handler [`DataHandler`](../type-aliases/DataHandler.md) #### Returns () => `void` #### Implementation of [`IStreamTransport`](../interfaces/IStreamTransport.md).[`onData`](../interfaces/IStreamTransport.md#ondata) *** ### onError() > **onError**(`handler`): () => `void` Subscribe to transport errors. Returns an unsubscribe function. #### Parameters ##### handler [`ErrorHandler`](../type-aliases/ErrorHandler.md) #### Returns () => `void` #### Implementation of [`IStreamTransport`](../interfaces/IStreamTransport.md).[`onError`](../interfaces/IStreamTransport.md#onerror) *** ### send() > **send**(`data`): `Promise`\<`void`\> Send bytes to the remote peer. - Returns a promise that resolves once the bytes are accepted by the underlying transport (or after the documented backpressure policy). - Rejects with `ClosedTransportError` if the transport is closed. - Rejects with the underlying error if delivery fails. #### Parameters ##### data `Uint8Array` #### Returns `Promise`\<`void`\> #### Implementation of [`IStreamTransport`](../interfaces/IStreamTransport.md).[`send`](../interfaces/IStreamTransport.md#send) *** ### simulateRemoteClose() > **simulateRemoteClose**(): `void` Fire 'close' on BOTH sides asynchronously. Use when simulating a remote side terminating the connection. #### Returns `void` --- ## Page: NodeStreamTransport URL: https://docs.totem.ing/api/totemsdk-stream-transport/classes/NodeStreamTransport [**@totemsdk/stream-transport**](../index.md) *** [@totemsdk/stream-transport](../index.md) / NodeStreamTransport # Class: NodeStreamTransport Wraps any Node.js Duplex-compatible stream (net.Socket, tls.TLSSocket, Hyperswarm connection, etc.) as IStreamTransport. ## Extended by - [`HyperswarmStreamTransport`](HyperswarmStreamTransport.md) ## Implements - [`IStreamTransport`](../interfaces/IStreamTransport.md) ## Constructors ### Constructor > **new NodeStreamTransport**(`stream`): `NodeStreamTransport` #### Parameters ##### stream `unknown` #### Returns `NodeStreamTransport` ## Accessors ### state #### Get Signature > **get** **state**(): [`TransportState`](../type-aliases/TransportState.md) Explicit connection state. ##### Returns [`TransportState`](../type-aliases/TransportState.md) Explicit connection state. #### Implementation of [`IStreamTransport`](../interfaces/IStreamTransport.md).[`state`](../interfaces/IStreamTransport.md#state) ## Methods ### close() > **close**(): `Promise`\<`void`\> Close the transport. After the returned promise resolves, no further data or close deliveries occur. Calling close() more than once is safe (the second call resolves immediately). #### Returns `Promise`\<`void`\> #### Implementation of [`IStreamTransport`](../interfaces/IStreamTransport.md).[`close`](../interfaces/IStreamTransport.md#close) *** ### onClose() > **onClose**(`handler`): () => `void` Subscribe to connection close. Returns an unsubscribe function. #### Parameters ##### handler [`CloseHandler`](../type-aliases/CloseHandler.md) #### Returns () => `void` #### Implementation of [`IStreamTransport`](../interfaces/IStreamTransport.md).[`onClose`](../interfaces/IStreamTransport.md#onclose) *** ### onData() > **onData**(`handler`): () => `void` Subscribe to data chunks. Returns an unsubscribe function. #### Parameters ##### handler [`DataHandler`](../type-aliases/DataHandler.md) #### Returns () => `void` #### Implementation of [`IStreamTransport`](../interfaces/IStreamTransport.md).[`onData`](../interfaces/IStreamTransport.md#ondata) *** ### onError() > **onError**(`handler`): () => `void` Subscribe to transport errors. Returns an unsubscribe function. #### Parameters ##### handler [`ErrorHandler`](../type-aliases/ErrorHandler.md) #### Returns () => `void` #### Implementation of [`IStreamTransport`](../interfaces/IStreamTransport.md).[`onError`](../interfaces/IStreamTransport.md#onerror) *** ### send() > **send**(`data`): `Promise`\<`void`\> Send bytes to the remote peer. - Returns a promise that resolves once the bytes are accepted by the underlying transport (or after the documented backpressure policy). - Rejects with `ClosedTransportError` if the transport is closed. - Rejects with the underlying error if delivery fails. #### Parameters ##### data `Uint8Array` #### Returns `Promise`\<`void`\> #### Implementation of [`IStreamTransport`](../interfaces/IStreamTransport.md).[`send`](../interfaces/IStreamTransport.md#send) --- ## Page: StdioStreamTransport URL: https://docs.totem.ing/api/totemsdk-stream-transport/classes/StdioStreamTransport [**@totemsdk/stream-transport**](../index.md) *** [@totemsdk/stream-transport](../index.md) / StdioStreamTransport # Class: StdioStreamTransport Canonical bidirectional byte-stream transport contract. Every transport exposes the same subscription API; each `on*` method returns an unsubscribe function so handlers can always be removed. There is a single connection state machine and a single `send` signature. This replaces the old `on(event, handler)` API which could not express unsubscription, backpressure or connection state. ## Implements - [`IStreamTransport`](../interfaces/IStreamTransport.md) ## Constructors ### Constructor > **new StdioStreamTransport**(`input?`, `output?`, `options?`): `StdioStreamTransport` #### Parameters ##### input? `unknown` = `process.stdin` ##### output? `unknown` = `process.stdout` ##### options? [`StdioStreamTransportOptions`](../interfaces/StdioStreamTransportOptions.md) = `{}` #### Returns `StdioStreamTransport` ## Accessors ### state #### Get Signature > **get** **state**(): [`TransportState`](../type-aliases/TransportState.md) Explicit connection state. ##### Returns [`TransportState`](../type-aliases/TransportState.md) Explicit connection state. #### Implementation of [`IStreamTransport`](../interfaces/IStreamTransport.md).[`state`](../interfaces/IStreamTransport.md#state) ## Methods ### close() > **close**(): `Promise`\<`void`\> Close the transport. After the returned promise resolves, no further data or close deliveries occur. Calling close() more than once is safe (the second call resolves immediately). #### Returns `Promise`\<`void`\> #### Implementation of [`IStreamTransport`](../interfaces/IStreamTransport.md).[`close`](../interfaces/IStreamTransport.md#close) *** ### onClose() > **onClose**(`handler`): () => `void` Subscribe to connection close. Returns an unsubscribe function. #### Parameters ##### handler [`CloseHandler`](../type-aliases/CloseHandler.md) #### Returns () => `void` #### Implementation of [`IStreamTransport`](../interfaces/IStreamTransport.md).[`onClose`](../interfaces/IStreamTransport.md#onclose) *** ### onData() > **onData**(`handler`): () => `void` Subscribe to data chunks. Returns an unsubscribe function. #### Parameters ##### handler [`DataHandler`](../type-aliases/DataHandler.md) #### Returns () => `void` #### Implementation of [`IStreamTransport`](../interfaces/IStreamTransport.md).[`onData`](../interfaces/IStreamTransport.md#ondata) *** ### onError() > **onError**(`handler`): () => `void` Subscribe to transport errors. Returns an unsubscribe function. #### Parameters ##### handler [`ErrorHandler`](../type-aliases/ErrorHandler.md) #### Returns () => `void` #### Implementation of [`IStreamTransport`](../interfaces/IStreamTransport.md).[`onError`](../interfaces/IStreamTransport.md#onerror) *** ### send() > **send**(`data`): `Promise`\<`void`\> Send bytes to the remote peer. - Returns a promise that resolves once the bytes are accepted by the underlying transport (or after the documented backpressure policy). - Rejects with `ClosedTransportError` if the transport is closed. - Rejects with the underlying error if delivery fails. #### Parameters ##### data `Uint8Array` #### Returns `Promise`\<`void`\> #### Implementation of [`IStreamTransport`](../interfaces/IStreamTransport.md).[`send`](../interfaces/IStreamTransport.md#send) --- ## Page: WebRTCDataChannelTransport URL: https://docs.totem.ing/api/totemsdk-stream-transport/classes/WebRTCDataChannelTransport [**@totemsdk/stream-transport**](../index.md) *** [@totemsdk/stream-transport](../index.md) / WebRTCDataChannelTransport # Class: WebRTCDataChannelTransport Wraps an RTCDataChannel (browser WebRTC) as IStreamTransport. Requires the RTCDataChannel to be in arraybuffer mode. The browser RTCDataChannel API has no send-completion signal, so backpressure is documented as not honoured; send() resolves after enqueue and rejects only after close. ## Implements - [`IStreamTransport`](../interfaces/IStreamTransport.md) ## Constructors ### Constructor > **new WebRTCDataChannelTransport**(`channel`): `WebRTCDataChannelTransport` #### Parameters ##### channel `unknown` #### Returns `WebRTCDataChannelTransport` ## Accessors ### state #### Get Signature > **get** **state**(): [`TransportState`](../type-aliases/TransportState.md) Explicit connection state. ##### Returns [`TransportState`](../type-aliases/TransportState.md) Explicit connection state. #### Implementation of [`IStreamTransport`](../interfaces/IStreamTransport.md).[`state`](../interfaces/IStreamTransport.md#state) ## Methods ### close() > **close**(): `Promise`\<`void`\> Close the transport. After the returned promise resolves, no further data or close deliveries occur. Calling close() more than once is safe (the second call resolves immediately). #### Returns `Promise`\<`void`\> #### Implementation of [`IStreamTransport`](../interfaces/IStreamTransport.md).[`close`](../interfaces/IStreamTransport.md#close) *** ### onClose() > **onClose**(`handler`): () => `void` Subscribe to connection close. Returns an unsubscribe function. #### Parameters ##### handler [`CloseHandler`](../type-aliases/CloseHandler.md) #### Returns () => `void` #### Implementation of [`IStreamTransport`](../interfaces/IStreamTransport.md).[`onClose`](../interfaces/IStreamTransport.md#onclose) *** ### onData() > **onData**(`handler`): () => `void` Subscribe to data chunks. Returns an unsubscribe function. #### Parameters ##### handler [`DataHandler`](../type-aliases/DataHandler.md) #### Returns () => `void` #### Implementation of [`IStreamTransport`](../interfaces/IStreamTransport.md).[`onData`](../interfaces/IStreamTransport.md#ondata) *** ### onError() > **onError**(`handler`): () => `void` Subscribe to transport errors. Returns an unsubscribe function. #### Parameters ##### handler [`ErrorHandler`](../type-aliases/ErrorHandler.md) #### Returns () => `void` #### Implementation of [`IStreamTransport`](../interfaces/IStreamTransport.md).[`onError`](../interfaces/IStreamTransport.md#onerror) *** ### send() > **send**(`data`): `Promise`\<`void`\> Send bytes to the remote peer. - Returns a promise that resolves once the bytes are accepted by the underlying transport (or after the documented backpressure policy). - Rejects with `ClosedTransportError` if the transport is closed. - Rejects with the underlying error if delivery fails. #### Parameters ##### data `Uint8Array` #### Returns `Promise`\<`void`\> #### Implementation of [`IStreamTransport`](../interfaces/IStreamTransport.md).[`send`](../interfaces/IStreamTransport.md#send) --- ## Page: WebSocketTransport URL: https://docs.totem.ing/api/totemsdk-stream-transport/classes/WebSocketTransport [**@totemsdk/stream-transport**](../index.md) *** [@totemsdk/stream-transport](../index.md) / WebSocketTransport # Class: WebSocketTransport Wraps a browser or Node.js WebSocket as IStreamTransport. Compatible with both the native browser WebSocket and the `ws` npm package. Backpressure: `ws` exposes a send callback and `bufferedAmount`; the browser WebSocket API does not. When the underlying socket is a `ws` instance, send() resolves via the completion callback; for the browser API, send() resolves after enqueue and backpressure is documented as not honoured (the API offers no completion signal). In both cases send() rejects after close. ## Implements - [`IStreamTransport`](../interfaces/IStreamTransport.md) ## Constructors ### Constructor > **new WebSocketTransport**(`ws`): `WebSocketTransport` #### Parameters ##### ws `unknown` #### Returns `WebSocketTransport` ## Accessors ### state #### Get Signature > **get** **state**(): [`TransportState`](../type-aliases/TransportState.md) Explicit connection state. ##### Returns [`TransportState`](../type-aliases/TransportState.md) Explicit connection state. #### Implementation of [`IStreamTransport`](../interfaces/IStreamTransport.md).[`state`](../interfaces/IStreamTransport.md#state) ## Methods ### close() > **close**(): `Promise`\<`void`\> Close the transport. After the returned promise resolves, no further data or close deliveries occur. Calling close() more than once is safe (the second call resolves immediately). #### Returns `Promise`\<`void`\> #### Implementation of [`IStreamTransport`](../interfaces/IStreamTransport.md).[`close`](../interfaces/IStreamTransport.md#close) *** ### onClose() > **onClose**(`handler`): () => `void` Subscribe to connection close. Returns an unsubscribe function. #### Parameters ##### handler [`CloseHandler`](../type-aliases/CloseHandler.md) #### Returns () => `void` #### Implementation of [`IStreamTransport`](../interfaces/IStreamTransport.md).[`onClose`](../interfaces/IStreamTransport.md#onclose) *** ### onData() > **onData**(`handler`): () => `void` Subscribe to data chunks. Returns an unsubscribe function. #### Parameters ##### handler [`DataHandler`](../type-aliases/DataHandler.md) #### Returns () => `void` #### Implementation of [`IStreamTransport`](../interfaces/IStreamTransport.md).[`onData`](../interfaces/IStreamTransport.md#ondata) *** ### onError() > **onError**(`handler`): () => `void` Subscribe to transport errors. Returns an unsubscribe function. #### Parameters ##### handler [`ErrorHandler`](../type-aliases/ErrorHandler.md) #### Returns () => `void` #### Implementation of [`IStreamTransport`](../interfaces/IStreamTransport.md).[`onError`](../interfaces/IStreamTransport.md#onerror) *** ### send() > **send**(`data`): `Promise`\<`void`\> Send bytes to the remote peer. - Returns a promise that resolves once the bytes are accepted by the underlying transport (or after the documented backpressure policy). - Rejects with `ClosedTransportError` if the transport is closed. - Rejects with the underlying error if delivery fails. #### Parameters ##### data `Uint8Array` #### Returns `Promise`\<`void`\> #### Implementation of [`IStreamTransport`](../interfaces/IStreamTransport.md).[`send`](../interfaces/IStreamTransport.md#send) --- ## Page: broadcastTopic URL: https://docs.totem.ing/api/totemsdk-stream-transport/functions/broadcastTopic [**@totemsdk/stream-transport**](../index.md) *** [@totemsdk/stream-transport](../index.md) / broadcastTopic # Function: broadcastTopic() > **broadcastTopic**(`namespace`): `Buffer` 32-byte DHT topic for a broadcast namespace. Used to fan-out state updates to all peers in a channel. ## Parameters ### namespace `string` ## Returns `Buffer` --- ## Page: channelTopic URL: https://docs.totem.ing/api/totemsdk-stream-transport/functions/channelTopic [**@totemsdk/stream-transport**](../index.md) *** [@totemsdk/stream-transport](../index.md) / channelTopic # Function: channelTopic() > **channelTopic**(`channelId`): `Buffer` 32-byte DHT topic for a specific payment channel. Used by both sides to join the same swarm topic. ## Parameters ### channelId `string` ## Returns `Buffer` --- ## Page: createHyperswarmTransport URL: https://docs.totem.ing/api/totemsdk-stream-transport/functions/createHyperswarmTransport [**@totemsdk/stream-transport**](../index.md) *** [@totemsdk/stream-transport](../index.md) / createHyperswarmTransport # Function: createHyperswarmTransport() > **createHyperswarmTransport**(`config`): `Promise`\<[`HyperswarmStreamTransport`](../classes/HyperswarmStreamTransport.md)\> Establishes a Hyperswarm connection and returns IStreamTransport. Dynamically imports `hyperswarm` so the package remains optional at build time. ## Parameters ### config [`HyperswarmTransportConfig`](../interfaces/HyperswarmTransportConfig.md) ## Returns `Promise`\<[`HyperswarmStreamTransport`](../classes/HyperswarmStreamTransport.md)\> --- ## Page: createInMemoryPair URL: https://docs.totem.ing/api/totemsdk-stream-transport/functions/createInMemoryPair [**@totemsdk/stream-transport**](../index.md) *** [@totemsdk/stream-transport](../index.md) / createInMemoryPair # Function: createInMemoryPair() > **createInMemoryPair**(): \[[`InMemoryTransport`](../classes/InMemoryTransport.md), [`InMemoryTransport`](../classes/InMemoryTransport.md)\] Create a linked pair of InMemoryTransport instances. Bytes sent on [0] arrive on [1] and vice-versa. ## Returns \[[`InMemoryTransport`](../classes/InMemoryTransport.md), [`InMemoryTransport`](../classes/InMemoryTransport.md)\] --- ## Page: createWebSocketTransport URL: https://docs.totem.ing/api/totemsdk-stream-transport/functions/createWebSocketTransport [**@totemsdk/stream-transport**](../index.md) *** [@totemsdk/stream-transport](../index.md) / createWebSocketTransport # Function: createWebSocketTransport() > **createWebSocketTransport**(`url`): `Promise`\<[`WebSocketTransport`](../classes/WebSocketTransport.md)\> Creates a WebSocketTransport by connecting to the given URL. Works in both browser (native WebSocket) and Node.js (ws package). ## Parameters ### url `string` ## Returns `Promise`\<[`WebSocketTransport`](../classes/WebSocketTransport.md)\> --- ## Page: peerTopic URL: https://docs.totem.ing/api/totemsdk-stream-transport/functions/peerTopic [**@totemsdk/stream-transport**](../index.md) *** [@totemsdk/stream-transport](../index.md) / peerTopic # Function: peerTopic() > **peerTopic**(`pubkey`): `Buffer` 32-byte DHT topic for a specific peer public key. Used to advertise and discover a peer's endpoint. ## Parameters ### pubkey `string` ## Returns `Buffer` --- ## Page: HyperswarmTransportConfig URL: https://docs.totem.ing/api/totemsdk-stream-transport/interfaces/HyperswarmTransportConfig [**@totemsdk/stream-transport**](../index.md) *** [@totemsdk/stream-transport](../index.md) / HyperswarmTransportConfig # Interface: HyperswarmTransportConfig ## Properties ### joinOpts? > `optional` **joinOpts?**: `object` Hyperswarm join options. Default: { server: true, client: true }. #### client? > `optional` **client?**: `boolean` #### server? > `optional` **server?**: `boolean` *** ### targetPublicKey? > `optional` **targetPublicKey?**: `Buffer`\<`ArrayBufferLike`\> Optional: only accept connections matching this 32-byte pubkey. *** ### topic > **topic**: `Buffer` 32-byte topic buffer to join. --- ## Page: IStreamTransport URL: https://docs.totem.ing/api/totemsdk-stream-transport/interfaces/IStreamTransport [**@totemsdk/stream-transport**](../index.md) *** [@totemsdk/stream-transport](../index.md) / IStreamTransport # Interface: IStreamTransport Canonical bidirectional byte-stream transport contract. Every transport exposes the same subscription API; each `on*` method returns an unsubscribe function so handlers can always be removed. There is a single connection state machine and a single `send` signature. This replaces the old `on(event, handler)` API which could not express unsubscription, backpressure or connection state. ## Properties ### state > `readonly` **state**: [`TransportState`](../type-aliases/TransportState.md) Explicit connection state. ## Methods ### close() > **close**(): `Promise`\<`void`\> Close the transport. After the returned promise resolves, no further data or close deliveries occur. Calling close() more than once is safe (the second call resolves immediately). #### Returns `Promise`\<`void`\> *** ### connect()? > `optional` **connect**(): `Promise`\<`void`\> Optional async connect. Implementations that construct an already-connected transport may omit it. #### Returns `Promise`\<`void`\> *** ### onClose() > **onClose**(`handler`): () => `void` Subscribe to connection close. Returns an unsubscribe function. #### Parameters ##### handler [`CloseHandler`](../type-aliases/CloseHandler.md) #### Returns () => `void` *** ### onData() > **onData**(`handler`): () => `void` Subscribe to data chunks. Returns an unsubscribe function. #### Parameters ##### handler [`DataHandler`](../type-aliases/DataHandler.md) #### Returns () => `void` *** ### onError() > **onError**(`handler`): () => `void` Subscribe to transport errors. Returns an unsubscribe function. #### Parameters ##### handler [`ErrorHandler`](../type-aliases/ErrorHandler.md) #### Returns () => `void` *** ### send() > **send**(`data`): `Promise`\<`void`\> Send bytes to the remote peer. - Returns a promise that resolves once the bytes are accepted by the underlying transport (or after the documented backpressure policy). - Rejects with `ClosedTransportError` if the transport is closed. - Rejects with the underlying error if delivery fails. #### Parameters ##### data `Uint8Array` #### Returns `Promise`\<`void`\> --- ## Page: StdioStreamTransportOptions URL: https://docs.totem.ing/api/totemsdk-stream-transport/interfaces/StdioStreamTransportOptions [**@totemsdk/stream-transport**](../index.md) *** [@totemsdk/stream-transport](../index.md) / StdioStreamTransportOptions # Interface: StdioStreamTransportOptions Adapts a Node.js Readable + Writable pair (default: process.stdin/stdout) as IStreamTransport. This transport is Node-only by definition. ## Properties ### ownInput? > `optional` **ownInput?**: `boolean` *** ### ownOutput? > `optional` **ownOutput?**: `boolean` --- ## Page: CloseHandler URL: https://docs.totem.ing/api/totemsdk-stream-transport/type-aliases/CloseHandler [**@totemsdk/stream-transport**](../index.md) *** [@totemsdk/stream-transport](../index.md) / CloseHandler # Type Alias: CloseHandler > **CloseHandler** = () => `void` ## Returns `void` --- ## Page: DataHandler URL: https://docs.totem.ing/api/totemsdk-stream-transport/type-aliases/DataHandler [**@totemsdk/stream-transport**](../index.md) *** [@totemsdk/stream-transport](../index.md) / DataHandler # Type Alias: DataHandler > **DataHandler** = (`chunk`) => `void` ## Parameters ### chunk `Uint8Array` ## Returns `void` --- ## Page: ErrorHandler URL: https://docs.totem.ing/api/totemsdk-stream-transport/type-aliases/ErrorHandler [**@totemsdk/stream-transport**](../index.md) *** [@totemsdk/stream-transport](../index.md) / ErrorHandler # Type Alias: ErrorHandler > **ErrorHandler** = (`err`) => `void` ## Parameters ### err `Error` ## Returns `void` --- ## Page: TransportState URL: https://docs.totem.ing/api/totemsdk-stream-transport/type-aliases/TransportState [**@totemsdk/stream-transport**](../index.md) *** [@totemsdk/stream-transport](../index.md) / TransportState # Type Alias: TransportState > **TransportState** = `"connecting"` \| `"open"` \| `"closing"` \| `"closed"` @totemsdk/stream-transport Transport-layer abstractions for Totem SDK. The canonical transport contract is `IStreamTransport`: - `state` — explicit connection state - `send(data)` — async send; resolves when the bytes are accepted by the underlying transport or the documented backpressure policy is applied; rejects after close or on error. - `onData`/`onClose`/`onError` — subscribe and receive an unsubscribe function. - `close()` — async close with predictable semantics (no further deliveries after the returned promise resolves). Implementations: NodeStreamTransport, WebSocketTransport, WebRTCDataChannelTransport, StdioStreamTransport, HyperswarmStreamTransport, and InMemoryTransport / createInMemoryPair for tests. Topic helpers (channelTopic / peerTopic / broadcastTopic) are Node-only (they return Buffer) and are used by the Omnia swarm in Node environments. --- ## Page: CoinSelectionError URL: https://docs.totem.ing/api/totemsdk-tx-builder/classes/CoinSelectionError [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / CoinSelectionError # Class: CoinSelectionError ## Extends - `Error` ## Constructors ### Constructor > **new CoinSelectionError**(`message`, `code`, `details?`): `CoinSelectionError` #### Parameters ##### message `string` ##### code `"FETCH_FAILED"` \| `"INSUFFICIENT_FUNDS"` \| `"SERVICE_UNAVAILABLE"` \| `"NETWORK_ERROR"` ##### details? `Record`\<`string`, `any`\> #### Returns `CoinSelectionError` #### Overrides `Error.constructor` ## Properties ### cause? > `optional` **cause?**: `unknown` #### Inherited from `Error.cause` *** ### code > `readonly` **code**: `"FETCH_FAILED"` \| `"INSUFFICIENT_FUNDS"` \| `"SERVICE_UNAVAILABLE"` \| `"NETWORK_ERROR"` *** ### details? > `readonly` `optional` **details?**: `Record`\<`string`, `any`\> *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: CoinSelectionService URL: https://docs.totem.ing/api/totemsdk-tx-builder/classes/CoinSelectionService [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / CoinSelectionService # Class: CoinSelectionService ## Constructors ### Constructor > **new CoinSelectionService**(`fetcher`, `storage?`): `CoinSelectionService` #### Parameters ##### fetcher [`CoinFetcher`](../interfaces/CoinFetcher.md) ##### storage? [`StoragePort`](../type-aliases/StoragePort.md) #### Returns `CoinSelectionService` ## Methods ### addExcludedAddress() > **addExcludedAddress**(`address`): `void` #### Parameters ##### address `string` #### Returns `void` *** ### fetchSpendableCoins() > **fetchSpendableCoins**(`addresses`, `tokenId?`): `Promise`\<[`SpendableCoin`](../interfaces/SpendableCoin.md)[]\> #### Parameters ##### addresses `string`[] ##### tokenId? `string` = `'0x00'` #### Returns `Promise`\<[`SpendableCoin`](../interfaces/SpendableCoin.md)[]\> *** ### formatCoinInputs() > **formatCoinInputs**(`coins`): `object`[] #### Parameters ##### coins [`SpendableCoin`](../interfaces/SpendableCoin.md)[] #### Returns `object`[] *** ### getExcludedAddresses() > **getExcludedAddresses**(): `string`[] #### Returns `string`[] *** ### isAddressExcluded() > **isAddressExcluded**(`address`): `boolean` #### Parameters ##### address `string` #### Returns `boolean` *** ### loadExcludedAddresses() > **loadExcludedAddresses**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### orderCoinsByAmount() > **orderCoinsByAmount**(`coins`): [`SpendableCoin`](../interfaces/SpendableCoin.md)[] #### Parameters ##### coins [`SpendableCoin`](../interfaces/SpendableCoin.md)[] #### Returns [`SpendableCoin`](../interfaces/SpendableCoin.md)[] *** ### removeExcludedAddress() > **removeExcludedAddress**(`address`): `void` #### Parameters ##### address `string` #### Returns `void` *** ### saveExcludedAddresses() > **saveExcludedAddresses**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### selectCoins() > **selectCoins**(`coins`, `options`): [`CoinSelectionResult`](../interfaces/CoinSelectionResult.md) #### Parameters ##### coins [`SpendableCoin`](../interfaces/SpendableCoin.md)[] ##### options [`CoinSelectionOptions`](../interfaces/CoinSelectionOptions.md) #### Returns [`CoinSelectionResult`](../interfaces/CoinSelectionResult.md) *** ### selectCoinsForSend() > **selectCoinsForSend**(`allAddresses`, `options`): `Promise`\<[`CoinSelectionResult`](../interfaces/CoinSelectionResult.md)\> #### Parameters ##### allAddresses `string`[] ##### options [`CoinSelectionOptions`](../interfaces/CoinSelectionOptions.md) #### Returns `Promise`\<[`CoinSelectionResult`](../interfaces/CoinSelectionResult.md)\> --- ## Page: MultisigManager URL: https://docs.totem.ing/api/totemsdk-tx-builder/classes/MultisigManager [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / MultisigManager # Class: MultisigManager ## Constructors ### Constructor > **new MultisigManager**(`storage?`): `MultisigManager` #### Parameters ##### storage? [`StoragePort`](../type-aliases/StoragePort.md) #### Returns `MultisigManager` ## Properties ### ready > `readonly` **ready**: `Promise`\<`void`\> ## Methods ### addOwnSignature() > **addOwnSignature**(`transactionId`, `signature`, `proof?`): `Promise`\<`void`\> #### Parameters ##### transactionId `string` ##### signature `string` ##### proof? `MMRProof` #### Returns `Promise`\<`void`\> *** ### cleanupExpired() > **cleanupExpired**(): `Promise`\<`number`\> #### Returns `Promise`\<`number`\> *** ### computeMultisigAddress() > **computeMultisigAddress**(`config`): `string` #### Parameters ##### config [`MultisigConfig`](../interfaces/MultisigConfig.md) #### Returns `string` *** ### createMultisigScript() > **createMultisigScript**(`config`): `ScriptDescriptor` #### Parameters ##### config [`MultisigConfig`](../interfaces/MultisigConfig.md) #### Returns `ScriptDescriptor` *** ### createPendingTransaction() > **createPendingTransaction**(`config`, `transactionHex`, `transactionDigest`, `expirationHours?`): `Promise`\<[`PendingMultisigTransaction`](../interfaces/PendingMultisigTransaction.md)\> #### Parameters ##### config [`MultisigConfig`](../interfaces/MultisigConfig.md) ##### transactionHex `string` ##### transactionDigest `string` ##### expirationHours? `number` = `24` #### Returns `Promise`\<[`PendingMultisigTransaction`](../interfaces/PendingMultisigTransaction.md)\> *** ### deleteTransaction() > **deleteTransaction**(`transactionId`): `Promise`\<`boolean`\> #### Parameters ##### transactionId `string` #### Returns `Promise`\<`boolean`\> *** ### exportTransaction() > **exportTransaction**(`transactionId`): `Promise`\<[`MultisigExportData`](../interfaces/MultisigExportData.md)\> #### Parameters ##### transactionId `string` #### Returns `Promise`\<[`MultisigExportData`](../interfaces/MultisigExportData.md)\> *** ### getAllPending() > **getAllPending**(): `Promise`\<[`PendingMultisigTransaction`](../interfaces/PendingMultisigTransaction.md)[]\> #### Returns `Promise`\<[`PendingMultisigTransaction`](../interfaces/PendingMultisigTransaction.md)[]\> *** ### getSignatures() > **getSignatures**(`transactionId`): `Promise`\<`ExternalSignature`[]\> #### Parameters ##### transactionId `string` #### Returns `Promise`\<`ExternalSignature`[]\> *** ### getSignatureStatus() > **getSignatureStatus**(`transactionId`): `Promise`\<\{ `collected`: `number`; `missing`: `string`[]; `required`: `number`; `status`: `string`; \}\> #### Parameters ##### transactionId `string` #### Returns `Promise`\<\{ `collected`: `number`; `missing`: `string`[]; `required`: `number`; `status`: `string`; \}\> *** ### getTransaction() > **getTransaction**(`transactionId`): `Promise`\<[`PendingMultisigTransaction`](../interfaces/PendingMultisigTransaction.md) \| `undefined`\> #### Parameters ##### transactionId `string` #### Returns `Promise`\<[`PendingMultisigTransaction`](../interfaces/PendingMultisigTransaction.md) \| `undefined`\> *** ### importExternalSignature() > **importExternalSignature**(`transactionId`, `publicKey`, `signature`, `signatureType?`, `proof?`): `Promise`\<\{ `error?`: `string`; `valid`: `boolean`; \}\> #### Parameters ##### transactionId `string` ##### publicKey `string` ##### signature `string` ##### signatureType? `"wots"` \| `"standard"` ##### proof? `MMRProof` #### Returns `Promise`\<\{ `error?`: `string`; `valid`: `boolean`; \}\> *** ### importTransaction() > **importTransaction**(`data`): `Promise`\<[`PendingMultisigTransaction`](../interfaces/PendingMultisigTransaction.md)\> #### Parameters ##### data [`MultisigExportData`](../interfaces/MultisigExportData.md) #### Returns `Promise`\<[`PendingMultisigTransaction`](../interfaces/PendingMultisigTransaction.md)\> *** ### isReady() > **isReady**(`transactionId`): `Promise`\<`boolean`\> #### Parameters ##### transactionId `string` #### Returns `Promise`\<`boolean`\> *** ### markBroadcast() > **markBroadcast**(`transactionId`): `Promise`\<`void`\> #### Parameters ##### transactionId `string` #### Returns `Promise`\<`void`\> *** ### markFailed() > **markFailed**(`transactionId`, `error?`): `Promise`\<`void`\> #### Parameters ##### transactionId `string` ##### error? `string` #### Returns `Promise`\<`void`\> --- ## Page: MultisigStorageError URL: https://docs.totem.ing/api/totemsdk-tx-builder/classes/MultisigStorageError [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / MultisigStorageError # Class: MultisigStorageError Local storage error so corruption is surfaced, never treated as absence. ## Extends - `Error` ## Constructors ### Constructor > **new MultisigStorageError**(`code`, `message`): `MultisigStorageError` #### Parameters ##### code `"corrupt"` \| `"unsupported-version"` ##### message `string` #### Returns `MultisigStorageError` #### Overrides `Error.constructor` ## Properties ### cause? > `optional` **cause?**: `unknown` #### Inherited from `Error.cause` *** ### code > `readonly` **code**: `"corrupt"` \| `"unsupported-version"` *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: addDecimalStrings URL: https://docs.totem.ing/api/totemsdk-tx-builder/functions/addDecimalStrings [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / addDecimalStrings # Function: addDecimalStrings() > **addDecimalStrings**(`a`, `b`): `string` ## Parameters ### a `string` ### b `string` ## Returns `string` --- ## Page: addDecimalStringsWasm URL: https://docs.totem.ing/api/totemsdk-tx-builder/functions/addDecimalStringsWasm [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / addDecimalStringsWasm # Function: addDecimalStringsWasm() > **addDecimalStringsWasm**(`a`, `b`): `Promise`\<`string`\> ## Parameters ### a `string` ### b `string` ## Returns `Promise`\<`string`\> --- ## Page: addressFromPkDigest URL: https://docs.totem.ing/api/totemsdk-tx-builder/functions/addressFromPkDigest [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / addressFromPkDigest # Function: addressFromPkDigest() > **addressFromPkDigest**(`pkDigest32`): `string` Replicate Minima's SIGNEDBY-address derivation from a 32-byte WOTS pk digest: script = `RETURN SIGNEDBY(pkDigest)` → MMR leaf → Mx address. Matches the wasm `wots_address_from_keypair_wasm` path, so a keypair's address here is the same address a Minima node would report for that key. ## Parameters ### pkDigest32 `Uint8Array` ## Returns `string` --- ## Page: bigIntToDecimalString URL: https://docs.totem.ing/api/totemsdk-tx-builder/functions/bigIntToDecimalString [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / bigIntToDecimalString # Function: bigIntToDecimalString() > **bigIntToDecimalString**(`value`): `string` ## Parameters ### value `bigint` ## Returns `string` --- ## Page: buildPoolFundTx URL: https://docs.totem.ing/api/totemsdk-tx-builder/functions/buildPoolFundTx [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / buildPoolFundTx # Function: buildPoolFundTx() > **buildPoolFundTx**(`params`): [`PoolFundBuildResult`](../interfaces/PoolFundBuildResult.md) Construct the pool-funding spending transaction and the LP's deep proof. The returned TxPoW-relevant digest is what the LP signs; broadcast/mine is left to the caller (which then proves the coin spent into the pool script). ## Parameters ### params [`BuildPoolFundTxParams`](../interfaces/BuildPoolFundTxParams.md) ## Returns [`PoolFundBuildResult`](../interfaces/PoolFundBuildResult.md) --- ## Page: compareDecimal URL: https://docs.totem.ing/api/totemsdk-tx-builder/functions/compareDecimal [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / compareDecimal # Function: compareDecimal() > **compareDecimal**(`a`, `b`): `number` ## Parameters ### a `string` ### b `string` ## Returns `number` --- ## Page: compareDecimalWasm URL: https://docs.totem.ing/api/totemsdk-tx-builder/functions/compareDecimalWasm [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / compareDecimalWasm # Function: compareDecimalWasm() > **compareDecimalWasm**(`a`, `b`): `Promise`\<`number`\> ## Parameters ### a `string` ### b `string` ## Returns `Promise`\<`number`\> --- ## Page: computeMultisigAddressWasm URL: https://docs.totem.ing/api/totemsdk-tx-builder/functions/computeMultisigAddressWasm [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / computeMultisigAddressWasm # Function: computeMultisigAddressWasm() > **computeMultisigAddressWasm**(`config`): `Promise`\<\{ `address`: `string`; `scriptHash`: `string`; \}\> ## Parameters ### config #### address? `string` #### ownPublicKey `string` #### publicKeys `string`[] #### threshold `number` #### type `"2of2"` \| `"mofn"` ## Returns `Promise`\<\{ `address`: `string`; `scriptHash`: `string`; \}\> --- ## Page: hashPoolFundTx URL: https://docs.totem.ing/api/totemsdk-tx-builder/functions/hashPoolFundTx [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / hashPoolFundTx # Function: hashPoolFundTx() > **hashPoolFundTx**(`tx`): `Uint8Array` ## Parameters ### tx [`PoolFundTx`](../interfaces/PoolFundTx.md) ## Returns `Uint8Array` --- ## Page: isPositive URL: https://docs.totem.ing/api/totemsdk-tx-builder/functions/isPositive [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / isPositive # Function: isPositive() > **isPositive**(`value`): `boolean` ## Parameters ### value `string` ## Returns `boolean` --- ## Page: isPositiveWasm URL: https://docs.totem.ing/api/totemsdk-tx-builder/functions/isPositiveWasm [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / isPositiveWasm # Function: isPositiveWasm() > **isPositiveWasm**(`value`): `Promise`\<`boolean`\> ## Parameters ### value `string` ## Returns `Promise`\<`boolean`\> --- ## Page: orderCoinsByAmountWasm URL: https://docs.totem.ing/api/totemsdk-tx-builder/functions/orderCoinsByAmountWasm [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / orderCoinsByAmountWasm # Function: orderCoinsByAmountWasm() > **orderCoinsByAmountWasm**(`coins`): `Promise`\<[`SpendableCoin`](../interfaces/SpendableCoin.md)[]\> ## Parameters ### coins [`SpendableCoin`](../interfaces/SpendableCoin.md)[] ## Returns `Promise`\<[`SpendableCoin`](../interfaces/SpendableCoin.md)[]\> --- ## Page: parseDecimalToBigInt URL: https://docs.totem.ing/api/totemsdk-tx-builder/functions/parseDecimalToBigInt [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / parseDecimalToBigInt # Function: parseDecimalToBigInt() > **parseDecimalToBigInt**(`value`): `bigint` ## Parameters ### value `string` ## Returns `bigint` --- ## Page: recomputeDigestWasm URL: https://docs.totem.ing/api/totemsdk-tx-builder/functions/recomputeDigestWasm [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / recomputeDigestWasm # Function: recomputeDigestWasm() > **recomputeDigestWasm**(`transactionHex`): `Promise`\<`string`\> ## Parameters ### transactionHex `string` ## Returns `Promise`\<`string`\> --- ## Page: selectCoinsWasm URL: https://docs.totem.ing/api/totemsdk-tx-builder/functions/selectCoinsWasm [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / selectCoinsWasm # Function: selectCoinsWasm() > **selectCoinsWasm**(`coins`, `options`, `excludedAddresses?`): `Promise`\<[`CoinSelectionResult`](../interfaces/CoinSelectionResult.md)\> ## Parameters ### coins [`SpendableCoin`](../interfaces/SpendableCoin.md)[] ### options [`CoinSelectionOptions`](../interfaces/CoinSelectionOptions.md) ### excludedAddresses? `string`[] = `[]` ## Returns `Promise`\<[`CoinSelectionResult`](../interfaces/CoinSelectionResult.md)\> --- ## Page: sha3_256_hexWasm URL: https://docs.totem.ing/api/totemsdk-tx-builder/functions/sha3_256_hexWasm [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / sha3\_256\_hexWasm # Function: sha3\_256\_hexWasm() > **sha3\_256\_hexWasm**(`data`): `Promise`\<`string`\> ## Parameters ### data `Uint8Array` ## Returns `Promise`\<`string`\> --- ## Page: subtractDecimalStrings URL: https://docs.totem.ing/api/totemsdk-tx-builder/functions/subtractDecimalStrings [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / subtractDecimalStrings # Function: subtractDecimalStrings() > **subtractDecimalStrings**(`a`, `b`): `string` ## Parameters ### a `string` ### b `string` ## Returns `string` --- ## Page: subtractDecimalStringsWasm URL: https://docs.totem.ing/api/totemsdk-tx-builder/functions/subtractDecimalStringsWasm [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / subtractDecimalStringsWasm # Function: subtractDecimalStringsWasm() > **subtractDecimalStringsWasm**(`a`, `b`): `Promise`\<`string`\> ## Parameters ### a `string` ### b `string` ## Returns `Promise`\<`string`\> --- ## Page: toProofHex URL: https://docs.totem.ing/api/totemsdk-tx-builder/functions/toProofHex [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / toProofHex # Function: toProofHex() > **toProofHex**(`proof`): `string` ## Parameters ### proof [`DeepFundingProof`](../interfaces/DeepFundingProof.md) ## Returns `string` --- ## Page: verifyPoolFundTx URL: https://docs.totem.ing/api/totemsdk-tx-builder/functions/verifyPoolFundTx [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / verifyPoolFundTx # Function: verifyPoolFundTx() > **verifyPoolFundTx**(`tx`, `proof`, `expectedPoolAddress?`): [`PoolFundVerification`](../interfaces/PoolFundVerification.md) Verify a deep funding proof. `expectedPoolAddress` (the pool/channel script address) is required to prove the spend target — without it the proof only proves the LP signed some tx, which is why acceptance must pass it. ## Parameters ### tx [`PoolFundTx`](../interfaces/PoolFundTx.md) ### proof [`DeepFundingProof`](../interfaces/DeepFundingProof.md) ### expectedPoolAddress? `string` ## Returns [`PoolFundVerification`](../interfaces/PoolFundVerification.md) --- ## Page: BuildPoolFundTxParams URL: https://docs.totem.ing/api/totemsdk-tx-builder/interfaces/BuildPoolFundTxParams [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / BuildPoolFundTxParams # Interface: BuildPoolFundTxParams ## Properties ### amount > **amount**: `string` *** ### fundingCoinId > **fundingCoinId**: `string` *** ### lpAddress > **lpAddress**: `string` *** ### lpKeyIndex? > `optional` **lpKeyIndex?**: `number` *** ### lpSeed > **lpSeed**: `Uint8Array` *** ### nonce? > `optional` **nonce?**: `string` *** ### poolId > **poolId**: `string` *** ### recipientAddress > **recipientAddress**: `string` *** ### tokenId? > `optional` **tokenId?**: `string` --- ## Page: CoinFetcher URL: https://docs.totem.ing/api/totemsdk-tx-builder/interfaces/CoinFetcher [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / CoinFetcher # Interface: CoinFetcher ## Methods ### fetchCoins() > **fetchCoins**(`addresses`, `tokenId?`): `Promise`\<[`SpendableCoin`](SpendableCoin.md)[]\> #### Parameters ##### addresses `string`[] ##### tokenId? `string` #### Returns `Promise`\<[`SpendableCoin`](SpendableCoin.md)[]\> --- ## Page: CoinSelectionOptions URL: https://docs.totem.ing/api/totemsdk-tx-builder/interfaces/CoinSelectionOptions [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / CoinSelectionOptions # Interface: CoinSelectionOptions ## Properties ### excludedAddresses? > `optional` **excludedAddresses?**: `string`[] *** ### focusedAddress? > `optional` **focusedAddress?**: `string` *** ### mode > **mode**: [`SendMode`](../type-aliases/SendMode.md) *** ### targetAmount > **targetAmount**: `string` *** ### tokenId? > `optional` **tokenId?**: `string` --- ## Page: CoinSelectionResult URL: https://docs.totem.ing/api/totemsdk-tx-builder/interfaces/CoinSelectionResult [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / CoinSelectionResult # Interface: CoinSelectionResult ## Properties ### change > **change**: `string` *** ### fromAddresses > **fromAddresses**: `string`[] *** ### insufficientFunds > **insufficientFunds**: `boolean` *** ### selectedCoins > **selectedCoins**: [`SpendableCoin`](SpendableCoin.md)[] *** ### totalSelected > **totalSelected**: `string` --- ## Page: DeepFundingProof URL: https://docs.totem.ing/api/totemsdk-tx-builder/interfaces/DeepFundingProof [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / DeepFundingProof # Interface: DeepFundingProof ## Properties ### amount > **amount**: `string` *** ### fundingCoinId > **fundingCoinId**: `string` *** ### lpAddress > **lpAddress**: `string` *** ### lpPkDigest > **lpPkDigest**: `string` *** ### lpSignature > **lpSignature**: `string` *** ### nonce > **nonce**: `string` *** ### recipientAddress > **recipientAddress**: `string` *** ### signedDigest > **signedDigest**: `string` *** ### tokenId > **tokenId**: `string` --- ## Page: EnhancedBuildParams URL: https://docs.totem.ing/api/totemsdk-tx-builder/interfaces/EnhancedBuildParams [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / EnhancedBuildParams # Interface: EnhancedBuildParams ## Properties ### inputs > **inputs**: [`EnhancedCoinInput`](EnhancedCoinInput.md)[] *** ### linkHash? > `optional` **linkHash?**: `Uint8Array`\<`ArrayBufferLike`\> *** ### outputs > **outputs**: [`EnhancedCoinOutput`](EnhancedCoinOutput.md)[] *** ### transactionState? > `optional` **transactionState?**: `StateValue`[] --- ## Page: EnhancedCoinInput URL: https://docs.totem.ing/api/totemsdk-tx-builder/interfaces/EnhancedCoinInput [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / EnhancedCoinInput # Interface: EnhancedCoinInput ## Properties ### address > **address**: `string` *** ### amount > **amount**: `string` *** ### coinId > **coinId**: `string` *** ### coinProofHex? > `optional` **coinProofHex?**: `string` *** ### scriptDescriptor > **scriptDescriptor**: `ScriptDescriptor` *** ### tokenId? > `optional` **tokenId?**: `string` *** ### witness? > `optional` **witness?**: [`TransactionWitnessDescriptor`](TransactionWitnessDescriptor.md) --- ## Page: EnhancedCoinOutput URL: https://docs.totem.ing/api/totemsdk-tx-builder/interfaces/EnhancedCoinOutput [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / EnhancedCoinOutput # Interface: EnhancedCoinOutput ## Properties ### address > **address**: `string` *** ### amount > **amount**: `string` *** ### state? > `optional` **state?**: `StateValue`[] *** ### storeState? > `optional` **storeState?**: `boolean` *** ### tokenId? > `optional` **tokenId?**: `string` --- ## Page: MultisigConfig URL: https://docs.totem.ing/api/totemsdk-tx-builder/interfaces/MultisigConfig [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / MultisigConfig # Interface: MultisigConfig ## Properties ### address? > `optional` **address?**: `string` *** ### ownPublicKey > **ownPublicKey**: `string` *** ### publicKeys > **publicKeys**: `string`[] *** ### threshold > **threshold**: `number` *** ### type > **type**: `"2of2"` \| `"mofn"` --- ## Page: MultisigExportData URL: https://docs.totem.ing/api/totemsdk-tx-builder/interfaces/MultisigExportData [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / MultisigExportData # Interface: MultisigExportData ## Properties ### config > **config**: [`MultisigConfig`](MultisigConfig.md) *** ### createdAt > **createdAt**: `number` *** ### id > **id**: `string` *** ### signatures > **signatures**: `object`[] #### publicKey > **publicKey**: `string` #### signature > **signature**: `string` #### signatureType > **signatureType**: `"wots"` \| `"standard"` *** ### transactionDigest > **transactionDigest**: `string` *** ### transactionHex > **transactionHex**: `string` *** ### version > **version**: `number` --- ## Page: PendingMultisigTransaction URL: https://docs.totem.ing/api/totemsdk-tx-builder/interfaces/PendingMultisigTransaction [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / PendingMultisigTransaction # Interface: PendingMultisigTransaction ## Properties ### config > **config**: [`MultisigConfig`](MultisigConfig.md) *** ### createdAt > **createdAt**: `number` *** ### expiresAt > **expiresAt**: `number` *** ### id > **id**: `string` *** ### signatures > **signatures**: `Map`\<`string`, `ExternalSignature`\> *** ### status > **status**: `"pending"` \| `"ready"` \| `"broadcast"` \| `"expired"` \| `"failed"` *** ### transactionDigest > **transactionDigest**: `string` *** ### transactionHex > **transactionHex**: `string` --- ## Page: PoolFundBuildResult URL: https://docs.totem.ing/api/totemsdk-tx-builder/interfaces/PoolFundBuildResult [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / PoolFundBuildResult # Interface: PoolFundBuildResult ## Properties ### digest > **digest**: `Uint8Array` *** ### proof > **proof**: [`DeepFundingProof`](DeepFundingProof.md) *** ### signature > **signature**: `Uint8Array` *** ### tx > **tx**: [`PoolFundTx`](PoolFundTx.md) --- ## Page: PoolFundTx URL: https://docs.totem.ing/api/totemsdk-tx-builder/interfaces/PoolFundTx [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / PoolFundTx # Interface: PoolFundTx ## Properties ### amount > **amount**: `string` *** ### domain > **domain**: `string` *** ### fundingCoinId > **fundingCoinId**: `string` *** ### lpAddress > **lpAddress**: `string` *** ### nonce > **nonce**: `string` *** ### poolId > **poolId**: `string` *** ### recipientAddress > **recipientAddress**: `string` *** ### tokenId > **tokenId**: `string` *** ### version > **version**: `1` --- ## Page: PoolFundVerification URL: https://docs.totem.ing/api/totemsdk-tx-builder/interfaces/PoolFundVerification [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / PoolFundVerification # Interface: PoolFundVerification ## Properties ### reasons > **reasons**: `string`[] *** ### valid > **valid**: `boolean` --- ## Page: ScriptProofWitnessInput URL: https://docs.totem.ing/api/totemsdk-tx-builder/interfaces/ScriptProofWitnessInput [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / ScriptProofWitnessInput # Interface: ScriptProofWitnessInput ## Properties ### expectedRoot > **expectedRoot**: `string` *** ### script > **script**: `string` *** ### scriptProof > **scriptProof**: `string` --- ## Page: SignatureWitnessInput URL: https://docs.totem.ing/api/totemsdk-tx-builder/interfaces/SignatureWitnessInput [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / SignatureWitnessInput # Interface: SignatureWitnessInput ## Properties ### pubkeyHex > **pubkeyHex**: `string` *** ### signature > **signature**: `Uint8Array` --- ## Page: SpendableCoin URL: https://docs.totem.ing/api/totemsdk-tx-builder/interfaces/SpendableCoin [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / SpendableCoin # Interface: SpendableCoin ## Properties ### address > **address**: `string` *** ### amount > **amount**: `string` *** ### coinId > **coinId**: `string` *** ### created > **created**: `number` *** ### tokenid > **tokenid**: `string` --- ## Page: StorageAdapter URL: https://docs.totem.ing/api/totemsdk-tx-builder/interfaces/StorageAdapter [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / StorageAdapter # Interface: StorageAdapter ## Methods ### clear() > **clear**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### get() > **get**\<`T`\>(`key`): `Promise`\<`T` \| `null`\> #### Type Parameters ##### T `T` #### Parameters ##### key `string` #### Returns `Promise`\<`T` \| `null`\> *** ### has() > **has**(`key`): `Promise`\<`boolean`\> #### Parameters ##### key `string` #### Returns `Promise`\<`boolean`\> *** ### keys() > **keys**(): `Promise`\<`string`[]\> #### Returns `Promise`\<`string`[]\> *** ### remove() > **remove**(`key`): `Promise`\<`boolean`\> #### Parameters ##### key `string` #### Returns `Promise`\<`boolean`\> *** ### set() > **set**\<`T`\>(`key`, `value`): `Promise`\<`void`\> #### Type Parameters ##### T `T` #### Parameters ##### key `string` ##### value `T` #### Returns `Promise`\<`void`\> --- ## Page: TokenProofWitnessInput URL: https://docs.totem.ing/api/totemsdk-tx-builder/interfaces/TokenProofWitnessInput [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / TokenProofWitnessInput # Interface: TokenProofWitnessInput ## Properties ### proof > **proof**: `string` *** ### tokenId > **tokenId**: `string` --- ## Page: TransactionWitnessDescriptor URL: https://docs.totem.ing/api/totemsdk-tx-builder/interfaces/TransactionWitnessDescriptor [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / TransactionWitnessDescriptor # Interface: TransactionWitnessDescriptor ## Properties ### scriptProofs? > `optional` **scriptProofs?**: [`ScriptProofWitnessInput`](ScriptProofWitnessInput.md)[] *** ### signatures? > `optional` **signatures?**: [`SignatureWitnessInput`](SignatureWitnessInput.md)[] *** ### tokenProofs? > `optional` **tokenProofs?**: [`TokenProofWitnessInput`](TokenProofWitnessInput.md)[] --- ## Page: SendMode URL: https://docs.totem.ing/api/totemsdk-tx-builder/type-aliases/SendMode [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / SendMode # Type Alias: SendMode > **SendMode** = `"global"` \| `"focused"` --- ## Page: StoragePort URL: https://docs.totem.ing/api/totemsdk-tx-builder/type-aliases/StoragePort [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / StoragePort # Type Alias: StoragePort > **StoragePort** = `Pick`\<[`StorageAdapter`](../interfaces/StorageAdapter.md), `"get"` \| `"set"` \| `"remove"`\> Structural storage surface used by tx-builder consumers. --- ## Page: POOL_FUND_DOMAIN URL: https://docs.totem.ing/api/totemsdk-tx-builder/variables/POOL_FUND_DOMAIN [**@totemsdk/tx-builder**](../index.md) *** [@totemsdk/tx-builder](../index.md) / POOL\_FUND\_DOMAIN # Variable: POOL\_FUND\_DOMAIN > `const` **POOL\_FUND\_DOMAIN**: `"totemsdk/pool-fund/deep-proof/v1"` = `'totemsdk/pool-fund/deep-proof/v1'` --- ## Page: assembleTxPoWEnvelope URL: https://docs.totem.ing/api/totemsdk-txpow/functions/assembleTxPoWEnvelope [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / assembleTxPoWEnvelope # Function: assembleTxPoWEnvelope() > **assembleTxPoWEnvelope**(`headerBytes`, `bodyBytes`): `Uint8Array` Assemble the complete Minima TxPoW wire format: TxHeader | 0x01 (hasBody) | TxBody This is the representation required for network submission of a genuine L1 block candidate. A mined header alone is NOT sufficient. ## Parameters ### headerBytes `Uint8Array` Serialized TxHeader bytes (with the winning nonce). ### bodyBytes `Uint8Array` Serialized TxBody bytes. ## Returns `Uint8Array` --- ## Page: buildBlockHeaderTail URL: https://docs.totem.ing/api/totemsdk-txpow/functions/buildBlockHeaderTail [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / buildBlockHeaderTail # Function: buildBlockHeaderTail() > **buildBlockHeaderTail**(`template`, `customHash`, `txBodyHash`): `Uint8Array` Build the TxHeader tail (everything after the nonce field) for a block candidate with the given customHash commitment. Field order (TxHeader.writeDataStream): mNonce | mChainID | mTimeMilli | mBlockNumber | mBlockDifficulty | super-parents RLE | mMMRRoot | mMMRTotal | mMagic | mCustomHash | mTxBodyHash ## Parameters ### template [`MinimaWorkTemplate`](../interfaces/MinimaWorkTemplate.md) The current Minima work template. ### customHash `string` The action commitment (32-byte hex) to place in mCustomHash. ### txBodyHash `string` SHA3-256 of the serialized TxBody (32-byte hex). ## Returns `Uint8Array` --- ## Page: buildEmptyBlockBody URL: https://docs.totem.ing/api/totemsdk-txpow/functions/buildEmptyBlockBody [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / buildEmptyBlockBody # Function: buildEmptyBlockBody() > **buildEmptyBlockBody**(`prng`, `txnDifficulty`): `Uint8Array` Build the serialized TxBody for a fresh block candidate. Mirrors TxBody.writeDataStream with an empty transaction and witness (the same shape Minima's MINEPULSE automine uses for block candidates): mPRNG | mTxnDifficulty | mTransaction | mWitness | mBurnTransaction | mBurnWitness | mTxPowIDList ## Parameters ### prng `Uint8Array` 32-byte PRNG (deterministic for tests; random otherwise). ### txnDifficulty `string` Transaction difficulty (32-byte hex). For a block candidate this is typically the block difficulty. ## Returns `Uint8Array` --- ## Page: buildEmptyBurnTxBytes URL: https://docs.totem.ing/api/totemsdk-txpow/functions/buildEmptyBurnTxBytes [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / buildEmptyBurnTxBytes # Function: buildEmptyBurnTxBytes() > **buildEmptyBurnTxBytes**(): `Uint8Array` Build the empty burn transaction bytes (TxBody.writeDataStream fields 5-6). Equivalent to serializeTransaction({ linkHash: [0x00], inputs: [], outputs: [], state: [] }): 0 inputs, 0 outputs, 0 state, linkHash = ZERO_TXPOWID (1 byte). ## Returns `Uint8Array` --- ## Page: buildEmptyBurnWitnessBytes URL: https://docs.totem.ing/api/totemsdk-txpow/functions/buildEmptyBurnWitnessBytes [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / buildEmptyBurnWitnessBytes # Function: buildEmptyBurnWitnessBytes() > **buildEmptyBurnWitnessBytes**(): `Uint8Array` Build the empty burn witness bytes (TxBody.writeDataStream field 6). 0 signatures, 0 coinproofs, 0 scriptproofs. ## Returns `Uint8Array` --- ## Page: buildEmptyTransactionBytes URL: https://docs.totem.ing/api/totemsdk-txpow/functions/buildEmptyTransactionBytes [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / buildEmptyTransactionBytes # Function: buildEmptyTransactionBytes() > **buildEmptyTransactionBytes**(): `Uint8Array` Build the empty transaction bytes (TxBody.writeDataStream field 3). 0 inputs, 0 outputs, 0 state, linkHash = ZERO_TXPOWID (1 byte). ## Returns `Uint8Array` --- ## Page: buildEmptyWitnessBytes URL: https://docs.totem.ing/api/totemsdk-txpow/functions/buildEmptyWitnessBytes [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / buildEmptyWitnessBytes # Function: buildEmptyWitnessBytes() > **buildEmptyWitnessBytes**(): `Uint8Array` Build the empty witness bytes (TxBody.writeDataStream field 4). 0 signatures, 0 coinproofs, 0 scriptproofs. ## Returns `Uint8Array` --- ## Page: buildHeaderTail URL: https://docs.totem.ing/api/totemsdk-txpow/functions/buildHeaderTail [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / buildHeaderTail # Function: buildHeaderTail() > **buildHeaderTail**(`txBodyHash`, `timeMilli`): `Uint8Array` Build the "header tail" — the part of TxHeader that follows mNonce. This is computed once at the start of a mine and never changes during it. This is the fresh-transaction header shape (blockNumber=0, MAX_HASH block difficulty, zero super-parents, zero MMR, zero customHash). Block-candidate mining (Machine Work Admission) builds its own tail via `admission/template.ts` with real chain state and a customHash commitment. ## Parameters ### txBodyHash `Uint8Array` ### timeMilli `bigint` ## Returns `Uint8Array` --- ## Page: calibrateHashRate URL: https://docs.totem.ing/api/totemsdk-txpow/functions/calibrateHashRate [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / calibrateHashRate # Function: calibrateHashRate() > **calibrateHashRate**(): `Promise`\<`number`\> Run 100K trial SHA3-256 hashes and return the measured hash rate (hashes/sec). Call once per session and cache the result — the cost is ~50ms on a typical desktop and ~300ms on a mid-range mobile. ## Returns `Promise`\<`number`\> --- ## Page: canonicalAction URL: https://docs.totem.ing/api/totemsdk-txpow/functions/canonicalAction [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / canonicalAction # Function: canonicalAction() > **canonicalAction**(`action`): `string` Canonical serialization of a MachineWorkAction. Length-prefixed fields in a fixed order; context keys are sorted so that equivalent input produces identical output. ## Parameters ### action [`MachineWorkAction`](../interfaces/MachineWorkAction.md) ## Returns `string` --- ## Page: canonicalChallenge URL: https://docs.totem.ing/api/totemsdk-txpow/functions/canonicalChallenge [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / canonicalChallenge # Function: canonicalChallenge() > **canonicalChallenge**(`challenge`): `string` Canonical serialization of a WorkChallenge. Deterministic field ordering with length-prefixed strings so that no ambiguous concatenation is possible. Used for the commitment and for challenge fingerprints. ## Parameters ### challenge [`WorkChallenge`](../interfaces/WorkChallenge.md) ## Returns `string` --- ## Page: challengeFingerprint URL: https://docs.totem.ing/api/totemsdk-txpow/functions/challengeFingerprint [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / challengeFingerprint # Function: challengeFingerprint() > **challengeFingerprint**(`challenge`): `string` Derive a stable challenge fingerprint (SHA3-256 of canonical challenge bytes). Useful for higher-level code that tracks already-consumed challenge IDs. ## Parameters ### challenge [`WorkChallenge`](../interfaces/WorkChallenge.md) ## Returns `string` --- ## Page: computeActionCommitment URL: https://docs.totem.ing/api/totemsdk-txpow/functions/computeActionCommitment [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / computeActionCommitment # Function: computeActionCommitment() > **computeActionCommitment**(`action`, `challenge`): `string` Compute the canonical action commitment. commitment = SHA3-256( protocolDomain || protocolVersion || canonicalAction(action) || canonicalChallenge(challenge) ) ## Parameters ### action [`MachineWorkAction`](../interfaces/MachineWorkAction.md) The application action. ### challenge [`WorkChallenge`](../interfaces/WorkChallenge.md) The challenge the work is bound to. ## Returns `string` --- ## Page: computeBlockCandidateId URL: https://docs.totem.ing/api/totemsdk-txpow/functions/computeBlockCandidateId [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / computeBlockCandidateId # Function: computeBlockCandidateId() > **computeBlockCandidateId**(`headerBytes`): `Uint8Array` Compute the TxPoW ID for a mined block-candidate header. txpowId = SHA3-256(serialized TxHeader). ## Parameters ### headerBytes `Uint8Array` ## Returns `Uint8Array` --- ## Page: computeSuperLevel URL: https://docs.totem.ing/api/totemsdk-txpow/functions/computeSuperLevel [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / computeSuperLevel # Function: computeSuperLevel() > **computeSuperLevel**(`txpowId`, `blockDifficulty`): `number` Compute the Minima Super level for a TxPoW ID against a block difficulty, with Minima's exact integer semantics. From TxPoW.calculateTXPOWID() / getSuperLevel(): quot = blockDifficulty / txpowId (unsigned BigInteger division) super = quot.bitLength() - 1 (floor(log2(quot))) if super >= MINIMA_CASCADE_LEVELS (32) → clamp to 31 When the TxPoW is NOT a block (txpowId >= blockDifficulty), quot = 0, bitLength(0) = 0, so super = -1. Result: -1 — not a Minima block 0 — ordinary/base Minima block (Super-0) 1..31 — Super-1 … Super-31 (stronger blocks; 31 is the maximum represented) ## Parameters ### txpowId `Uint8Array` SHA3-256(header), 32 bytes. ### blockDifficulty `string` 32-byte hex block difficulty target. ## Returns `number` --- ## Page: computeTxPoWId URL: https://docs.totem.ing/api/totemsdk-txpow/functions/computeTxPoWId [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / computeTxPoWId # Function: computeTxPoWId() > **computeTxPoWId**(`headerBytes`): `Uint8Array` Compute TxPoW ID = SHA3-256(TxHeader bytes). Matches Java: Crypto.getInstance().hashObject(mHeader) via SHA3Digest(256). ## Parameters ### headerBytes `Uint8Array` ## Returns `Uint8Array` --- ## Page: createWorkChallenge URL: https://docs.totem.ing/api/totemsdk-txpow/functions/createWorkChallenge [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / createWorkChallenge # Function: createWorkChallenge() > **createWorkChallenge**(`recipient`, `domain`, `target`, `options?`): [`WorkChallenge`](../interfaces/WorkChallenge.md) Create a WorkChallenge. ## Parameters ### recipient `string` The intended receiver the challenge binds to. ### domain `string` Application domain (open-ended, e.g. "totem.compute.reserve"). ### target `string` Absolute 32-byte cryptographic target (hex). ### options? Optional overrides (challengeId, nonce, ttl, issuedAt, network). #### challengeId? `string` #### issuedAt? `number` #### network? `string` #### nonce? `string` #### ttlMs? `number` ## Returns [`WorkChallenge`](../interfaces/WorkChallenge.md) --- ## Page: estimateMiningCost URL: https://docs.totem.ing/api/totemsdk-txpow/functions/estimateMiningCost [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / estimateMiningCost # Function: estimateMiningCost() > **estimateMiningCost**(`txnDifficulty`, `hashRatePerSec`): [`MiningEstimate`](../interfaces/MiningEstimate.md) Given a difficulty target and a measured hash rate, return the expected number of hashes, expected wall-clock time, and a confidence label. expectedHashes ≈ MAX_HASH / txnDifficulty (geometric distribution: each hash has P(valid) = txnDifficulty / MAX_HASH) Confidence labels: fast < 2 s normal 2 – 15 s slow > 15 s ## Parameters ### txnDifficulty `Uint8Array` ### hashRatePerSec `number` ## Returns [`MiningEstimate`](../interfaces/MiningEstimate.md) --- ## Page: fetchTxPowTarget URL: https://docs.totem.ing/api/totemsdk-txpow/functions/fetchTxPowTarget [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / fetchTxPowTarget # Function: fetchTxPowTarget() > **fetchTxPowTarget**(`axiaBaseUrl`, `timeoutMs?`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> Fetch the current minimum TxPoW work from the Axia API. Falls back to TX_POW_MIN_DIFFICULTY (the hardcoded protocol floor) on any error: network failure, timeout, or malformed response. ## Parameters ### axiaBaseUrl `string` Base URL of the Axia API, e.g. "https://api.axia.to" ### timeoutMs? `number` = `3000` Request timeout in ms (default: 3000) ## Returns `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> --- ## Page: getBrowserWasmUrl URL: https://docs.totem.ing/api/totemsdk-txpow/functions/getBrowserWasmUrl [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / getBrowserWasmUrl # Function: getBrowserWasmUrl() > **getBrowserWasmUrl**(): `string` \| `null` Return the current browser WASM URL, or null if not yet configured. Used by the main thread to pass the URL into spawned browser Web Workers. ## Returns `string` \| `null` --- ## Page: isBlockWinner URL: https://docs.totem.ing/api/totemsdk-txpow/functions/isBlockWinner [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / isBlockWinner # Function: isBlockWinner() > **isBlockWinner**(`txpowId`, `blockDifficulty`): `boolean` Check whether a txpowId beats the block target (i.e. is a genuine Minima block). valid = txpowId < blockDifficulty (big-endian 256-bit comparison). ## Parameters ### txpowId `Uint8Array` ### blockDifficulty `string` ## Returns `boolean` --- ## Page: isLessThan URL: https://docs.totem.ing/api/totemsdk-txpow/functions/isLessThan [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / isLessThan # Function: isLessThan() > **isLessThan**(`a`, `b`): `boolean` Big-endian 256-bit comparison: true if a < b. Used to check: txpowId < mTxnDifficulty. ## Parameters ### a `Uint8Array` ### b `Uint8Array` ## Returns `boolean` --- ## Page: isWasmAvailable URL: https://docs.totem.ing/api/totemsdk-txpow/functions/isWasmAvailable [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / isWasmAvailable # Function: isWasmAvailable() > **isWasmAvailable**(): `Promise`\<`boolean`\> Returns true when the WASM binary is loaded and `mine` is ready to use. Cached after the first call; subsequent calls are synchronous (via memoised flag). ## Returns `Promise`\<`boolean`\> --- ## Page: mineHeaderTail URL: https://docs.totem.ing/api/totemsdk-txpow/functions/mineHeaderTail [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / mineHeaderTail # Function: mineHeaderTail() > **mineHeaderTail**(`headerTail`, `target`, `options?`): `Promise`\<[`MineResult`](../interfaces/MineResult.md)\> Core mining loop over a pre-built header tail. Iterates the nonce in the serialized TxHeader (nonce value at offset 2, followed by `headerTail`) until `SHA3-256(header) < target`. Shared by the transaction miner (`mineTxPoWInProcess`) and the Machine Work Admission miner (`admission/mine.ts`), which supplies its own block-candidate tail. ## Parameters ### headerTail `Uint8Array` Serialized TxHeader bytes AFTER the nonce field. ### target `Uint8Array` 32-byte difficulty target (big-endian 256-bit). ### options? [`MineOptions`](../interfaces/MineOptions.md) Chunk size, max iterations, abort signal, timeMilli override. ## Returns `Promise`\<[`MineResult`](../interfaces/MineResult.md)\> --- ## Page: mineTxPoW URL: https://docs.totem.ing/api/totemsdk-txpow/functions/mineTxPoW [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / mineTxPoW # Function: mineTxPoW() > **mineTxPoW**(`txBodyBytes`, `txnDifficulty`, `options?`): `Promise`\<[`MineResult`](../interfaces/MineResult.md)\> Mine a TxPoW locally by iterating the header nonce until SHA3-256( TxHeader ) < txnDifficulty In Node.js (main thread), delegates to a `worker_threads` Worker so the event loop is never blocked. In browsers or Jest, runs in-process with periodic `setImmediate`/`setTimeout(0)` yields between chunks. Uses the pre-compiled `miner.wasm` binary for inner-loop throughput when available. Falls back to pure JS automatically when the binary is absent. ## Parameters ### txBodyBytes `Uint8Array` Pre-serialized TxBody bytes (from serializeTxBody). ### txnDifficulty `Uint8Array` 32-byte target. MUST be ≤ TX_POW_MIN_DIFFICULTY. ### options? [`MineOptions`](../interfaces/MineOptions.md) Chunk size, max iterations, abort signal, timeMilli override. ## Returns `Promise`\<[`MineResult`](../interfaces/MineResult.md)\> --- ## Page: mineTxPoWInProcess URL: https://docs.totem.ing/api/totemsdk-txpow/functions/mineTxPoWInProcess [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / mineTxPoWInProcess # Function: mineTxPoWInProcess() > **mineTxPoWInProcess**(`txBodyBytes`, `txnDifficulty`, `options?`): `Promise`\<[`MineResult`](../interfaces/MineResult.md)\> Run the mining loop in the current thread/task. Called directly by the Node.js worker, and by the browser code path. ## Parameters ### txBodyBytes `Uint8Array` ### txnDifficulty `Uint8Array` ### options? [`MineOptions`](../interfaces/MineOptions.md) ## Returns `Promise`\<[`MineResult`](../interfaces/MineResult.md)\> --- ## Page: mineWorkAdmission URL: https://docs.totem.ing/api/totemsdk-txpow/functions/mineWorkAdmission [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / mineWorkAdmission # Function: mineWorkAdmission() > **mineWorkAdmission**(`action`, `challenge`, `templateProvider`, `options?`): `Promise`\<[`MachineWorkAdmissionProof`](../interfaces/MachineWorkAdmissionProof.md)\> Mine a Machine Work Admission proof. The admission target is derived from `challenge.target` — the challenge is the single authoritative source. The miner searches the nonce space of a real Minima block candidate (from the injected template provider) whose customHash commits to the action. ## Parameters ### action [`MachineWorkAction`](../interfaces/MachineWorkAction.md) The application action. ### challenge [`WorkChallenge`](../interfaces/WorkChallenge.md) The receiver-issued challenge (target is authoritative). ### templateProvider [`MinimaWorkTemplateProvider`](../interfaces/MinimaWorkTemplateProvider.md) Injected provider for the current Minima template. ### options? [`MineWorkAdmissionOptions`](../interfaces/MineWorkAdmissionOptions.md) Mining options. ## Returns `Promise`\<[`MachineWorkAdmissionProof`](../interfaces/MachineWorkAdmissionProof.md)\> --- ## Page: reconstructTxPoWEnvelope URL: https://docs.totem.ing/api/totemsdk-txpow/functions/reconstructTxPoWEnvelope [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / reconstructTxPoWEnvelope # Function: reconstructTxPoWEnvelope() > **reconstructTxPoWEnvelope**(`proofTemplate`, `headerBytes`, `prng`): `object` Reconstruct the complete Minima TxPoW envelope for a proof. Rebuilds the empty block TxBody deterministically, recomputes the body hash, and reassembles header | 0x01 | body. Used by verification to confirm the proof corresponds to a complete, Minima-serializable candidate. ## Parameters ### proofTemplate [`MinimaWorkTemplate`](../interfaces/MinimaWorkTemplate.md) The template the proof was mined against. ### headerBytes `Uint8Array` The mined TxHeader bytes. ### prng `Uint8Array` The PRNG used when the proof was mined (32 bytes). ## Returns `object` ### bodyHash > **bodyHash**: `string` ### envelope > **envelope**: `Uint8Array` --- ## Page: serializeMagic URL: https://docs.totem.ing/api/totemsdk-txpow/functions/serializeMagic [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / serializeMagic # Function: serializeMagic() > **serializeMagic**(): `Uint8Array` ## Returns `Uint8Array` --- ## Page: serializeSuperParents URL: https://docs.totem.ing/api/totemsdk-txpow/functions/serializeSuperParents [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / serializeSuperParents # Function: serializeSuperParents() > **serializeSuperParents**(`superParents`): `Uint8Array` Serialize the super-parent RLE runs per TxHeader.writeDataStream. Consecutive equal hashes are coalesced into (count: MiniByte, hash) runs. A fresh candidate with all-distinct parents serializes as 32 runs. ## Parameters ### superParents `string`[] ## Returns `Uint8Array` --- ## Page: serializeTxBody URL: https://docs.totem.ing/api/totemsdk-txpow/functions/serializeTxBody [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / serializeTxBody # Function: serializeTxBody() > **serializeTxBody**(`txBytes`, `witnessBytes`, `options?`): `Uint8Array` Serialize a TxBody per Minima's TxBody.writeDataStream(). ## Parameters ### txBytes `Uint8Array` Pre-serialized Transaction bytes (from @totemsdk/core's serializeTransaction) ### witnessBytes `Uint8Array` Pre-serialized Witness bytes (from extension's serializeWitness) ### options? [`TxBodyOptions`](../interfaces/TxBodyOptions.md) Optional txnDifficulty override and test PRNG ## Returns `Uint8Array` --- ## Page: serializeTxHeader URL: https://docs.totem.ing/api/totemsdk-txpow/functions/serializeTxHeader [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / serializeTxHeader # Function: serializeTxHeader() > **serializeTxHeader**(`txBodyHash`, `options?`): `Uint8Array` Serialize a TxHeader per Minima's TxHeader.writeDataStream(). ## Parameters ### txBodyHash `Uint8Array` SHA3-256 of the serialized TxBody (32 bytes) ### options? [`TxHeaderOptions`](../interfaces/TxHeaderOptions.md) Optional nonce and timeMilli overrides ## Returns `Uint8Array` --- ## Page: serializeTxPoW URL: https://docs.totem.ing/api/totemsdk-txpow/functions/serializeTxPoW [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / serializeTxPoW # Function: serializeTxPoW() > **serializeTxPoW**(`txBytes`, `witnessBytes`, `options?`): `Uint8Array` Serialize a complete TxPoW per Minima's TxPoW.writeDataStream(). Assembles TxBody from pre-serialized tx+witness bytes, hashes the body to obtain mTxBodyHash, builds TxHeader with nonce=0, then concatenates: TxHeader | 0x01 (hasBody) | TxBody The returned bytes have nonce=0. Pass them to mineTxPoW() to find a valid nonce for local mining, or send as-is when MEG will re-mine. ## Parameters ### txBytes `Uint8Array` Pre-serialized Transaction bytes ### witnessBytes `Uint8Array` Pre-serialized Witness bytes ### options? [`TxPoWOptions`](../type-aliases/TxPoWOptions.md) Optional txnDifficulty, nonce, timeMilli, prng ## Returns `Uint8Array` --- ## Page: setBrowserWorkerUrl URL: https://docs.totem.ing/api/totemsdk-txpow/functions/setBrowserWorkerUrl [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / setBrowserWorkerUrl # Function: setBrowserWorkerUrl() > **setBrowserWorkerUrl**(`url`): `void` Configure the URL of the browser.worker.js bundle so that `mineTxPoW()` can spawn a Web Worker in browser contexts. Call this once at extension/dApp startup. The bundled worker file exposes the same message protocol as node.worker.ts. ## Parameters ### url `string` ## Returns `void` ## Example ```ts import { setBrowserWorkerUrl } from '@totemsdk/txpow'; setBrowserWorkerUrl(browser.runtime.getURL('mine-worker.js')); ``` --- ## Page: setWasmUrl URL: https://docs.totem.ing/api/totemsdk-txpow/functions/setWasmUrl [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / setWasmUrl # Function: setWasmUrl() > **setWasmUrl**(`url`): `void` Configure the URL from which the browser loads `miner.wasm`. Call this once at app startup in browser contexts. The extension build (Task #114) resolves this URL from the bundler's output. ## Parameters ### url `string` ## Returns `void` ## Example ```ts import { setWasmUrl } from '@totemsdk/txpow'; setWasmUrl(browser.runtime.getURL('miner.wasm')); ``` --- ## Page: templateFreshness URL: https://docs.totem.ing/api/totemsdk-txpow/functions/templateFreshness [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / templateFreshness # Function: templateFreshness() > **templateFreshness**(`template`, `latest`, `options?`): `object` Default staleness policy: a template is "current enough" for admission if it was captured within the window, and "current" for L1 broadcast if it matches the latest template id. ## Parameters ### template [`MinimaWorkTemplate`](../interfaces/MinimaWorkTemplate.md) ### latest [`MinimaWorkTemplate`](../interfaces/MinimaWorkTemplate.md) \| `null` ### options? #### admissionWindowMs? `number` #### now? `number` ## Returns `object` ### admissionValid > **admissionValid**: `boolean` ### broadcastable > **broadcastable**: `boolean` --- ## Page: validateWorkChallenge URL: https://docs.totem.ing/api/totemsdk-txpow/functions/validateWorkChallenge [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / validateWorkChallenge # Function: validateWorkChallenge() > **validateWorkChallenge**(`challenge`, `expected?`): `object` Validate a WorkChallenge at verification time. Checks structural integrity, expiry, and that the challenge binds to the expected recipient/domain. Does NOT check the proof hash — that is the caller's job via verifyWorkAdmission. ## Parameters ### challenge [`WorkChallenge`](../interfaces/WorkChallenge.md) ### expected? #### domain? `string` #### now? `number` #### recipient? `string` ## Returns `object` ### reason? > `optional` **reason?**: `string` ### valid > **valid**: `boolean` --- ## Page: verifyProofOfWork URL: https://docs.totem.ing/api/totemsdk-txpow/functions/verifyProofOfWork [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / verifyProofOfWork # Function: verifyProofOfWork() > **verifyProofOfWork**(`txpowId`, `mTxnDifficulty`): [`VerifyResult`](../interfaces/VerifyResult.md) Verify that a TxPoW ID beats the stated difficulty target. valid = txpowId < mTxnDifficulty (big-endian 256-bit comparison) ## Parameters ### txpowId `Uint8Array` The 32-byte TxPoW ID (SHA3-256 of the header). ### mTxnDifficulty `Uint8Array` The 32-byte difficulty target from the TxBody. ## Returns [`VerifyResult`](../interfaces/VerifyResult.md) --- ## Page: verifyTxPoWParts URL: https://docs.totem.ing/api/totemsdk-txpow/functions/verifyTxPoWParts [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / verifyTxPoWParts # Function: verifyTxPoWParts() > **verifyTxPoWParts**(`headerBytes`, `bodyBytes`): [`VerifyResult`](../interfaces/VerifyResult.md) Verify a TxPoW from pre-split header and body bytes. Computes SHA3-256(headerBytes) as the txpowId, extracts mTxnDifficulty from the body, and checks txpowId < mTxnDifficulty. Falls back to TX_POW_MIN_DIFFICULTY when the body cannot be parsed. ## Parameters ### headerBytes `Uint8Array` Raw TxHeader bytes (SHA3-256 of these is the txpowId). ### bodyBytes `Uint8Array` Raw TxBody bytes (mTxnDifficulty extracted from here). ## Returns [`VerifyResult`](../interfaces/VerifyResult.md) --- ## Page: verifyTxPoWWork URL: https://docs.totem.ing/api/totemsdk-txpow/functions/verifyTxPoWWork [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / verifyTxPoWWork # Function: verifyTxPoWWork() > **verifyTxPoWWork**(`txpowHex`): [`VerifyResult`](../interfaces/VerifyResult.md) Relay-side work verification from raw TxPoW hex. Parses the TxPoW hex into header and body by locating the hasBody byte via body-hash verification. Computes the canonical TxPoW ID (SHA3-256 of the header only), extracts mTxnDifficulty from the TxBody, and verifies: txpowId < mTxnDifficulty Falls back to TX_POW_MIN_DIFFICULTY as a spam filter when: - The hex is invalid or malformed - No valid header/body split can be found (non-standard structure) - mTxnDifficulty cannot be extracted from the body PureMinima performs authoritative work verification on submission; this function is a first-pass relay-side filter. ## Parameters ### txpowHex `string` Hex-encoded serialized TxPoW (TxHeader | 0x01 | TxBody). ## Returns [`VerifyResult`](../interfaces/VerifyResult.md) --- ## Page: verifyWorkAdmission URL: https://docs.totem.ing/api/totemsdk-txpow/functions/verifyWorkAdmission [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / verifyWorkAdmission # Function: verifyWorkAdmission() > **verifyWorkAdmission**(`action`, `challenge`, `proof`, `templateProvider?`, `options?`): `Promise`\<[`WorkAdmissionVerification`](../interfaces/WorkAdmissionVerification.md)\> Verify a Machine Work Admission proof. The admission target is taken from the validated challenge — never from the proof. `proof.qualifiesAsMinimaBlock`, `proof.superLevel`, and `proof.isBlock` are treated as derived metadata and are NOT trusted; the Super level is recomputed from the re-derived txpowId and the template's block difficulty. ## Parameters ### action [`MachineWorkAction`](../interfaces/MachineWorkAction.md) The application action the proof claims to commit. ### challenge [`WorkChallenge`](../interfaces/WorkChallenge.md) The challenge the proof claims to satisfy. ### proof [`MachineWorkAdmissionProof`](../interfaces/MachineWorkAdmissionProof.md) The mined proof. ### templateProvider? [`MinimaWorkTemplateProvider`](../interfaces/MinimaWorkTemplateProvider.md) Optional live provider. When supplied, template freshness and broadcastability are checked and `broadcastable` is set. When omitted, verification runs in offline mode and does NOT claim Minima block contribution (`broadcastable` is undefined). ### options? [`VerifyWorkAdmissionOptions`](../interfaces/VerifyWorkAdmissionOptions.md) Verification options. ## Returns `Promise`\<[`WorkAdmissionVerification`](../interfaces/WorkAdmissionVerification.md)\> --- ## Page: MachineWorkAction URL: https://docs.totem.ing/api/totemsdk-txpow/interfaces/MachineWorkAction [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / MachineWorkAction # Interface: MachineWorkAction The application action, represented in a generic domain-separated form. Only a commitment to this action enters the TxPoW header — never the application payload itself. The application remains off-chain. ## Properties ### actionId > **actionId**: `string` Unique action identifier. *** ### context? > `optional` **context?**: `Record`\<`string`, `string`\> Optional domain-specific context (canonicalized into the commitment). *** ### domain > **domain**: `string` Application domain (e.g. "totem.compute.reserve"). Open-ended. *** ### payloadHash > **payloadHash**: `string` SHA3-256 hex commitment to the application payload (off-chain). *** ### recipient > **recipient**: `string` The intended recipient. *** ### sender > **sender**: `string` The sender performing the work. *** ### version > **version**: `number` Protocol version. --- ## Page: MachineWorkAdmissionProof URL: https://docs.totem.ing/api/totemsdk-txpow/interfaces/MachineWorkAdmissionProof [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / MachineWorkAdmissionProof # Interface: MachineWorkAdmissionProof The mined Machine Work Admission proof. Reuses the existing TxPoW types where possible: - `txpow` — serialized TxHeader bytes (SHA3-256 of these is `txpowId`) - `txpowEnvelope` — the COMPLETE Minima TxPoW wire format (header | 0x01 hasBody | body), required for network submission of a genuine Minima block - `txpowId` — SHA3-256(header) `qualifiesAsMinimaBlock`, `isBlock`, and `superLevel` are DERIVED METADATA recorded at mining time. They are never trusted by verification — verification recomputes all of them from the re-derived txpowId and the template's block difficulty. ## Properties ### actionCommitment > **actionCommitment**: `string` Hex commitment placed in the TxPoW header's customHash field. *** ### admissionTarget > **admissionTarget**: `string` The admission target (32-byte hex) the proof satisfies. *** ### challengeId > **challengeId**: `string` The challenge this proof was mined against. *** ### isBlock > **isBlock**: `boolean` DERIVED METADATA: superLevel >= 0. Never trusted by verification. *** ### minedAt > **minedAt**: `number` Epoch milliseconds when the proof was mined. *** ### nonce > **nonce**: `string` The winning nonce. *** ### qualifiesAsMinimaBlock > **qualifiesAsMinimaBlock**: `boolean` DERIVED METADATA: true when the mined hash also beats the block difficulty encoded by the candidate template (i.e. a genuine Minima block). Never trusted by verification — it is recomputed from the re-derived txpowId. *** ### qualifiesForAdmission > **qualifiesForAdmission**: `true` Always true for a valid admission proof. *** ### superLevel > **superLevel**: `number` DERIVED METADATA: Minima Super level (-1 = not a block, 0..31 = block strength). Never trusted by verification. *** ### template > **template**: [`MinimaWorkTemplate`](MinimaWorkTemplate.md) Template the proof was mined against (for staleness policy). *** ### txpow > **txpow**: `string` Serialized TxHeader bytes (SHA3-256 of these is the TxPoW ID). *** ### txpowEnvelope > **txpowEnvelope**: `string` Complete Minima TxPoW envelope (header | 0x01 | body) for block relay. *** ### txpowId > **txpowId**: `string` SHA3-256(header) — the canonical TxPoW ID. *** ### version > **version**: `number` Protocol version. --- ## Page: MineOptions URL: https://docs.totem.ing/api/totemsdk-txpow/interfaces/MineOptions [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / MineOptions # Interface: MineOptions ## Properties ### chunkSize? > `optional` **chunkSize?**: `number` Hash iterations per async yield (default: 10_000). Lower = more responsive UI; higher = slightly faster mining. *** ### forceJs? > `optional` **forceJs?**: `boolean` Force the pure-JS mining path even when `miner.wasm` is present. Useful for testing the JS fallback or comparing JS vs WASM performance. *** ### maxIterations? > `optional` **maxIterations?**: `number` Hard cap on total iterations (default: unlimited). Throws if exhausted without finding a valid nonce. *** ### signal? > `optional` **signal?**: `AbortSignal` AbortSignal — rejects the Promise when aborted. *** ### timeMilli? > `optional` **timeMilli?**: `bigint` Override the header timestamp (milliseconds since epoch). Defaults to Date.now(). Set a fixed value for deterministic testing. --- ## Page: MineResult URL: https://docs.totem.ing/api/totemsdk-txpow/interfaces/MineResult [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / MineResult # Interface: MineResult ## Properties ### elapsedMs > **elapsedMs**: `number` *** ### minedHeaderBytes > **minedHeaderBytes**: `Uint8Array` Fully serialized TxHeader bytes with the winning nonce. *** ### nonce > **nonce**: `bigint` *** ### source > **source**: `"wasm"` \| `"js"` 'wasm' when the pre-compiled WASM binary found the nonce; 'js' otherwise. *** ### txpowId > **txpowId**: `Uint8Array` SHA3-256(minedHeaderBytes) — the canonical TxPoW ID. --- ## Page: MineWorkAdmissionOptions URL: https://docs.totem.ing/api/totemsdk-txpow/interfaces/MineWorkAdmissionOptions [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / MineWorkAdmissionOptions # Interface: MineWorkAdmissionOptions ## Properties ### \_skipWorker? > `optional` **\_skipWorker?**: `boolean` Skip the Node.js worker_threads Worker (for testing). *** ### chunkSize? > `optional` **chunkSize?**: `number` Hash iterations per async yield (default: 10_000). *** ### forceJs? > `optional` **forceJs?**: `boolean` Force the pure-JS mining path (for testing). *** ### maxIterations? > `optional` **maxIterations?**: `number` Hard cap on total iterations (default: unlimited). *** ### prng? > `optional` **prng?**: `Uint8Array`\<`ArrayBufferLike`\> Deterministic 32-byte PRNG for the TxBody (testing only). When omitted a cryptographically random PRNG is generated. *** ### relay? > `optional` **relay?**: [`MinimaWorkRelay`](MinimaWorkRelay.md) Preferred Minima block relay boundary. When supplied, a genuine current Minima block is submitted through the relay exactly once. Falls back to the deprecated provider.broadcastBlockCandidate only when no relay is set. *** ### signal? > `optional` **signal?**: `AbortSignal` AbortSignal — rejects the Promise when aborted. *** ### timeMilli? > `optional` **timeMilli?**: `bigint` Override the template timeMilli for deterministic testing. --- ## Page: MinimaWorkRelay URL: https://docs.totem.ing/api/totemsdk-txpow/interfaces/MinimaWorkRelay [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / MinimaWorkRelay # Interface: MinimaWorkRelay Relay boundary for a complete Minima TxPoW envelope. Keeps Minima networking outside core mining logic. A future @totemsdk/minima-rpc or chain-provider adapter may implement this port. Duplicate relay attempts must be safe/idempotent at the integration boundary. ## Methods ### submitBlock() > **submitBlock**(`envelope`): `Promise`\<`void`\> Submit a complete Minima TxPoW envelope for block relay. #### Parameters ##### envelope `Uint8Array` #### Returns `Promise`\<`void`\> --- ## Page: MinimaWorkTemplate URL: https://docs.totem.ing/api/totemsdk-txpow/interfaces/MinimaWorkTemplate [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / MinimaWorkTemplate # Interface: MinimaWorkTemplate A Minima block-candidate work template. This is the chain state a candidate is mined against. It is structurally capable of becoming a legitimate Minima block: block number, block difficulty, super-parents, MMR root/total, magic, and time are all taken from the current chain tip (see TxPoWGenerator.generateTxPoW in Minima). ## Properties ### blockDifficulty > **blockDifficulty**: `string` Current block difficulty target (32-byte hex). *** ### blockNumber > **blockNumber**: `bigint` Block number = current tip + 1. *** ### capturedAt > **capturedAt**: `number` Epoch milliseconds when the template was captured. *** ### chainId > **chainId**: `string` Chain ID (MAIN_NET = 0x00). *** ### magic > **magic**: `string` Serialized Magic struct (hex). *** ### mmrRoot > **mmrRoot**: `string` Current MMR root (32-byte hex). *** ### mmrTotal > **mmrTotal**: `bigint` Current MMR total (sum of all coins). *** ### superParents > **superParents**: `string`[] Super-parent hashes at each cascade level (RLE-serialized). *** ### templateId > **templateId**: `string` Template identifier (e.g. tip txpowId) for staleness checks. *** ### timeMilli > **timeMilli**: `bigint` Candidate timestamp in epoch milliseconds. --- ## Page: MinimaWorkTemplateProvider URL: https://docs.totem.ing/api/totemsdk-txpow/interfaces/MinimaWorkTemplateProvider [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / MinimaWorkTemplateProvider # Interface: MinimaWorkTemplateProvider Provider abstraction for the current Minima block-candidate template. The TxPoW package remains transport/node-client agnostic: callers inject a provider that fetches the current template from a Minima node, Axia, or a test fixture. `MinimaWorkRelay` is the preferred long-term relay boundary. The legacy `broadcastBlockCandidate` callback is retained as a compatibility/fallback path only — new consumers should use `relay` via `MinimaWorkRelay` and not build around the lossy `candidate: unknown` shape. ## Methods ### ~~broadcastBlockCandidate()?~~ > `optional` **broadcastBlockCandidate**(`candidate`): `Promise`\<`void`\> #### Parameters ##### candidate [`MachineWorkAdmissionProof`](MachineWorkAdmissionProof.md) #### Returns `Promise`\<`void`\> #### Deprecated Prefer `MinimaWorkRelay.submitBlock` (complete envelope). Retained for compatibility; only invoked for genuine Minima blocks (Super-0 … Super-31) when no relay is configured. *** ### getCurrentTemplate() > **getCurrentTemplate**(): `Promise`\<[`MinimaWorkTemplate`](MinimaWorkTemplate.md)\> Fetch the current block-candidate template. #### Returns `Promise`\<[`MinimaWorkTemplate`](MinimaWorkTemplate.md)\> *** ### getLatestTemplate()? > `optional` **getLatestTemplate**(): `Promise`\<[`MinimaWorkTemplate`](MinimaWorkTemplate.md)\> Optional: fetch the latest template for freshness checks. Falls back to getCurrentTemplate. #### Returns `Promise`\<[`MinimaWorkTemplate`](MinimaWorkTemplate.md)\> *** ### validateTemplate()? > `optional` **validateTemplate**(`template`): `Promise`\<`boolean`\> Optional: validate a template before mining against it. #### Parameters ##### template [`MinimaWorkTemplate`](MinimaWorkTemplate.md) #### Returns `Promise`\<`boolean`\> --- ## Page: MiningEstimate URL: https://docs.totem.ing/api/totemsdk-txpow/interfaces/MiningEstimate [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / MiningEstimate # Interface: MiningEstimate ## Properties ### confidence > **confidence**: `"fast"` \| `"normal"` \| `"slow"` *** ### expectedHashes > **expectedHashes**: `bigint` *** ### expectedSeconds > **expectedSeconds**: `number` --- ## Page: TxBodyOptions URL: https://docs.totem.ing/api/totemsdk-txpow/interfaces/TxBodyOptions [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / TxBodyOptions # Interface: TxBodyOptions @totemsdk/txpow TxPoW envelope serialization and proof-of-work mining for the Minima protocol. USAGE — MEG-side mining (byte-identical to extension current behaviour): const txpow = serializeTxPoW(txBytes, witnessBytes); // Submit to Axia: node re-mines with correct difficulty USAGE — Local mining: const target = await fetchTxPowTarget(axiaBaseUrl); const txBody = serializeTxBody(txBytes, witnessBytes, { txnDifficulty: target }); const result = await mineTxPoW(txBody, target); const txpow = concat(result.minedHeaderBytes, new Uint8Array([0x01]), txBody); USAGE — Verify (relay nodes): const check = verifyProofOfWork(txpowId, mTxnDifficulty); if (!check.valid) drop(check.reason); ## Properties ### prng? > `optional` **prng?**: `Uint8Array`\<`ArrayBufferLike`\> Override the 32-byte PRNG field. Useful for deterministic tests only. *** ### txnDifficulty? > `optional` **txnDifficulty?**: `Uint8Array`\<`ArrayBufferLike`\> Transaction difficulty target (32-byte MiniData). • MEG-side-mined path: leave undefined → MAX_HASH (all 0xFF) • Locally mined path: MUST be ≤ TX_POW_MIN_DIFFICULTY, typically fetched via fetchTxPowTarget() from the same package. Setting MAX_HASH for locally mined TxPoWs will cause block-level rejection. --- ## Page: TxHeaderOptions URL: https://docs.totem.ing/api/totemsdk-txpow/interfaces/TxHeaderOptions [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / TxHeaderOptions # Interface: TxHeaderOptions @totemsdk/txpow TxPoW envelope serialization and proof-of-work mining for the Minima protocol. USAGE — MEG-side mining (byte-identical to extension current behaviour): const txpow = serializeTxPoW(txBytes, witnessBytes); // Submit to Axia: node re-mines with correct difficulty USAGE — Local mining: const target = await fetchTxPowTarget(axiaBaseUrl); const txBody = serializeTxBody(txBytes, witnessBytes, { txnDifficulty: target }); const result = await mineTxPoW(txBody, target); const txpow = concat(result.minedHeaderBytes, new Uint8Array([0x01]), txBody); USAGE — Verify (relay nodes): const check = verifyProofOfWork(txpowId, mTxnDifficulty); if (!check.valid) drop(check.reason); ## Properties ### nonce? > `optional` **nonce?**: `bigint` Proof-of-work nonce. Defaults to 0n. The mining loop iterates this. *** ### timeMilli? > `optional` **timeMilli?**: `bigint` Block timestamp in milliseconds. Defaults to Date.now() at call time. --- ## Page: TxPowParams URL: https://docs.totem.ing/api/totemsdk-txpow/interfaces/TxPowParams [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / TxPowParams # Interface: TxPowParams ## Properties ### minTxPowWork > **minTxPowWork**: `string` --- ## Page: VerifyResult URL: https://docs.totem.ing/api/totemsdk-txpow/interfaces/VerifyResult [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / VerifyResult # Interface: VerifyResult ## Properties ### difficulty > **difficulty**: `string` *** ### reason? > `optional` **reason?**: `string` *** ### txpowId > **txpowId**: `string` *** ### valid > **valid**: `boolean` --- ## Page: VerifyWorkAdmissionOptions URL: https://docs.totem.ing/api/totemsdk-txpow/interfaces/VerifyWorkAdmissionOptions [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / VerifyWorkAdmissionOptions # Interface: VerifyWorkAdmissionOptions ## Properties ### admissionWindowMs? > `optional` **admissionWindowMs?**: `number` Staleness window (ms) within which a template is acceptable for admission. *** ### latestTemplate? > `optional` **latestTemplate?**: [`MinimaWorkTemplate`](MinimaWorkTemplate.md) \| `null` The latest template, for broadcastability checks. *** ### now? > `optional` **now?**: `number` Override the current time for deterministic testing. --- ## Page: WorkAdmissionVerification URL: https://docs.totem.ing/api/totemsdk-txpow/interfaces/WorkAdmissionVerification [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / WorkAdmissionVerification # Interface: WorkAdmissionVerification Result of verifying a Machine Work Admission proof. Three distinct claims, never to be confused: A. `valid` — the hash satisfies the challenge target (admission proof). B. `superLevel` / `isBlock` — the hash ALSO satisfies the block difficulty encoded by the candidate template, yielding an exact Minima Super level. C. `broadcastable` — the candidate still corresponds to sufficiently current live Minima state AND can be submitted through the relay. A stale candidate may remain `valid = true` (and `superLevel >= 0`) while `broadcastable = false`. `superLevel === -1 ⇔ isBlock === false`, and `superLevel >= 0 ⇔ isBlock === true`. Verification recomputes these — it never trusts sender-supplied `isBlock`/`superLevel` metadata. ## Properties ### broadcastable? > `optional` **broadcastable?**: `boolean` Level C: isBlock AND the template is current AND a live template provider was supplied. Undefined in offline mode (no provider) — offline verification must NOT claim Minima block contribution. *** ### isBlock? > `optional` **isBlock?**: `boolean` Level B: superLevel >= 0 (a genuine Minima block). *** ### reason? > `optional` **reason?**: `string` *** ### superLevel? > `optional` **superLevel?**: `number` Level B: exact Minima Super level of the candidate hash. -1 = not a Minima block; 0..31 = Super-0 … Super-31 block strength. *** ### valid > **valid**: `boolean` Level A: the hash satisfies the challenge target. --- ## Page: WorkChallenge URL: https://docs.totem.ing/api/totemsdk-txpow/interfaces/WorkChallenge [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / WorkChallenge # Interface: WorkChallenge The receiver controls the admission requirement. A challenge must be unique enough to prevent useful pre-mining, must expire, must bind to the intended receiver, and must bind to an application domain. `target` is an absolute cryptographic target: verification is `hash < target`. ## Properties ### challengeId > **challengeId**: `string` Unique challenge identifier (receiver-generated, prevents pre-mining). *** ### domain > **domain**: `string` Application domain (e.g. "totem.negotiation.proposal"). Open-ended. *** ### expiresAt > **expiresAt**: `number` Epoch milliseconds after which the challenge is invalid. *** ### issuedAt > **issuedAt**: `number` Epoch milliseconds when the challenge was issued. *** ### network? > `optional` **network?**: `string` Optional network identifier (e.g. "mainnet", "testnet"). *** ### nonce > **nonce**: `string` Receiver-generated random nonce to prevent pre-mining. *** ### recipient > **recipient**: `string` The intended receiver this challenge is bound to. *** ### target > **target**: `string` Absolute 32-byte cryptographic target (big-endian 256-bit). *** ### version > **version**: `number` Protocol version. --- ## Page: TxPoWOptions URL: https://docs.totem.ing/api/totemsdk-txpow/type-aliases/TxPoWOptions [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / TxPoWOptions # Type Alias: TxPoWOptions > **TxPoWOptions** = [`TxHeaderOptions`](../interfaces/TxHeaderOptions.md) & [`TxBodyOptions`](../interfaces/TxBodyOptions.md) @totemsdk/txpow TxPoW envelope serialization and proof-of-work mining for the Minima protocol. USAGE — MEG-side mining (byte-identical to extension current behaviour): const txpow = serializeTxPoW(txBytes, witnessBytes); // Submit to Axia: node re-mines with correct difficulty USAGE — Local mining: const target = await fetchTxPowTarget(axiaBaseUrl); const txBody = serializeTxBody(txBytes, witnessBytes, { txnDifficulty: target }); const result = await mineTxPoW(txBody, target); const txpow = concat(result.minedHeaderBytes, new Uint8Array([0x01]), txBody); USAGE — Verify (relay nodes): const check = verifyProofOfWork(txpowId, mTxnDifficulty); if (!check.valid) drop(check.reason); --- ## Page: CASCADE_LEVELS URL: https://docs.totem.ing/api/totemsdk-txpow/variables/CASCADE_LEVELS [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / CASCADE\_LEVELS # Variable: CASCADE\_LEVELS > `const` **CASCADE\_LEVELS**: `32` = `32` constants.ts — TxPoW-level constants matching Minima Java protocol values. ZERO_HASH: 32-byte all-zeros — used for MMRRoot, CustomHash, super-parent slot. MAX_HASH: 32-byte all-0xFF — default mBlockDifficulty / mTxnDifficulty for MEG-side-mined paths. Rejected by checkTxPoWSimple() at block level. TX_POW_MIN_DIFFICULTY: Safe transaction difficulty target. ≈ MAX_HASH / 1,000,000 = Magic.getMinTxPowWork() floor. Local-mining paths MUST use a target ≤ this value. MAIN_NET_CHAIN_ID: 1-byte [0x00] — Java MiniData("0x00") = MAIN_NET chain ID. CASCADE_LEVELS: 32 — number of super-parent slots in a fresh TxPoW header. --- ## Page: DEFAULT_CHALLENGE_TTL_MS URL: https://docs.totem.ing/api/totemsdk-txpow/variables/DEFAULT_CHALLENGE_TTL_MS [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / DEFAULT\_CHALLENGE\_TTL\_MS # Variable: DEFAULT\_CHALLENGE\_TTL\_MS > `const` **DEFAULT\_CHALLENGE\_TTL\_MS**: `number` Default challenge lifetime: 5 minutes. --- ## Page: MACHINE_WORK_ADMISSION_VERSION URL: https://docs.totem.ing/api/totemsdk-txpow/variables/MACHINE_WORK_ADMISSION_VERSION [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / MACHINE\_WORK\_ADMISSION\_VERSION # Variable: MACHINE\_WORK\_ADMISSION\_VERSION > `const` **MACHINE\_WORK\_ADMISSION\_VERSION**: `1` = `1` Current Machine Work Admission protocol version. --- ## Page: MACHINE_WORK_DOMAIN URL: https://docs.totem.ing/api/totemsdk-txpow/variables/MACHINE_WORK_DOMAIN [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / MACHINE\_WORK\_DOMAIN # Variable: MACHINE\_WORK\_DOMAIN > `const` **MACHINE\_WORK\_DOMAIN**: `"totem.machine-work-admission"` = `'totem.machine-work-admission'` Canonical protocol domain prefix for the commitment hash. --- ## Page: MAIN_NET_CHAIN_ID URL: https://docs.totem.ing/api/totemsdk-txpow/variables/MAIN_NET_CHAIN_ID [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / MAIN\_NET\_CHAIN\_ID # Variable: MAIN\_NET\_CHAIN\_ID > `const` **MAIN\_NET\_CHAIN\_ID**: `Uint8Array`\<`ArrayBuffer`\> --- ## Page: MAX_CHALLENGE_TTL_MS URL: https://docs.totem.ing/api/totemsdk-txpow/variables/MAX_CHALLENGE_TTL_MS [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / MAX\_CHALLENGE\_TTL\_MS # Variable: MAX\_CHALLENGE\_TTL\_MS > `const` **MAX\_CHALLENGE\_TTL\_MS**: `number` Maximum challenge lifetime: 24 hours. --- ## Page: MAX_HASH URL: https://docs.totem.ing/api/totemsdk-txpow/variables/MAX_HASH [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / MAX\_HASH # Variable: MAX\_HASH > `const` **MAX\_HASH**: `Uint8Array` --- ## Page: TX_POW_MIN_DIFFICULTY URL: https://docs.totem.ing/api/totemsdk-txpow/variables/TX_POW_MIN_DIFFICULTY [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / TX\_POW\_MIN\_DIFFICULTY # Variable: TX\_POW\_MIN\_DIFFICULTY > `const` **TX\_POW\_MIN\_DIFFICULTY**: `Uint8Array` TX_POW_MIN_DIFFICULTY = floor((2^256 - 1) / 1_000_000) This is the hardcoded floor constant matching Magic.getMinTxPowWork(). Any locally mined TxPoW must have mTxnDifficulty ≤ this value to pass TxPoWChecker.checkTxPoWSimple() at block inclusion. Computed: (2n**256n - 1n) / 1_000_000n Hex: 0x000010C6F7A0B5ED8538AACDD46595F0C7AC73E0E9DBF12F70000000000000000 --- ## Page: ZERO_HASH URL: https://docs.totem.ing/api/totemsdk-txpow/variables/ZERO_HASH [**@totemsdk/txpow**](../index.md) *** [@totemsdk/txpow](../index.md) / ZERO\_HASH # Variable: ZERO\_HASH > `const` **ZERO\_HASH**: `Uint8Array`\<`ArrayBuffer`\> --- ## Page: TotemAdapterError URL: https://docs.totem.ing/api/totemsdk-wallet-adapter/classes/TotemAdapterError [**@totemsdk/wallet-adapter**](../index.md) *** [@totemsdk/wallet-adapter](../index.md) / TotemAdapterError # Class: TotemAdapterError ## Extends - `Error` ## Constructors ### Constructor > **new TotemAdapterError**(`message`, `code?`, `errorCode?`): `TotemAdapterError` #### Parameters ##### message `string` ##### code? `number` = `-32000` ##### errorCode? `string` #### Returns `TotemAdapterError` #### Overrides `Error.constructor` ## Properties ### code > `readonly` **code**: `number` = `-32000` *** ### errorCode? > `readonly` `optional` **errorCode?**: `string` *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: TotemWalletAdapter URL: https://docs.totem.ing/api/totemsdk-wallet-adapter/classes/TotemWalletAdapter [**@totemsdk/wallet-adapter**](../index.md) *** [@totemsdk/wallet-adapter](../index.md) / TotemWalletAdapter # Abstract Class: TotemWalletAdapter Abstract base class for third-party Totem-compatible wallets. Subclass this and implement only three methods: - `getAccounts(origin)` — return the list of accounts for a dApp origin - `signTransaction(origin, params)` — sign an unsigned transaction hex - `signData(origin, params)` — sign arbitrary data hex Everything else — TOTEM_CONNECT handshake, TOTEM_GET_CAPABILITIES, connected-site gating, chain provider switching, and the totem:announce injection — is handled automatically by the base class. Call `adapter.inject()` once from your extension content script or page context to make the wallet discoverable by any dApp using WalletDiscovery from @totemsdk/connect. ## Constructors ### Constructor > **new TotemWalletAdapter**(`config`): `TotemWalletAdapter` #### Parameters ##### config [`WalletAdapterConfig`](../interfaces/WalletAdapterConfig.md) #### Returns `TotemWalletAdapter` ## Properties ### \_chainProvider > `protected` **\_chainProvider**: [`ChainProviderLike`](../interfaces/ChainProviderLike.md) \| `null` ## Methods ### destroy() > **destroy**(): `void` Remove the `totem:requestAnnounce` listener and clear all state. After calling destroy() the adapter will no longer respond to dApp discovery requests. #### Returns `void` *** ### emit() > `protected` **emit**(`event`, ...`args`): `void` Emit an event to all dApp listeners subscribed via provider.on(). Call this from your subclass when wallet state changes (e.g. account changed). #### Parameters ##### event `string` ##### args ...`unknown`[] #### Returns `void` *** ### getAccounts() > `abstract` `protected` **getAccounts**(`origin`): `Promise`\<[`GetAccountsResponse`](../interfaces/GetAccountsResponse.md)\> Return the accounts this wallet manages for the given dApp origin. Called on TOTEM_CONNECT and TOTEM_GET_ACCOUNTS. Note: `publicKey` must be a non-null hex string for any account that will be used with TOTEM_VERIFY. Return null only for accounts that will never need to produce verification signatures. #### Parameters ##### origin `string` #### Returns `Promise`\<[`GetAccountsResponse`](../interfaces/GetAccountsResponse.md)\> *** ### handleRequest() > **handleRequest**(`method`, `params?`): `Promise`\<`unknown`\> Dispatch a single RPC request as if it came from a dApp provider.request() call. Useful for testing without a real browser environment. #### Parameters ##### method `string` ##### params? `Record`\<`string`, `unknown`\> = `{}` #### Returns `Promise`\<`unknown`\> *** ### inject() > **inject**(): `void` Fire `totem:announce` and register a `totem:requestAnnounce` listener so the wallet re-announces on demand. Safe to call from a content script or an injected MAIN-world script. No-op if called more than once — call `destroy()` first to re-inject. #### Returns `void` *** ### isConnected() > `protected` **isConnected**(`origin`): `boolean` Check whether a given origin has called TOTEM_CONNECT. Useful in subclass implementations that want to gate custom behaviour. #### Parameters ##### origin `string` #### Returns `boolean` *** ### signData() > `abstract` `protected` **signData**(`origin`, `params`): `Promise`\<[`SignDataResponse`](../interfaces/SignDataResponse.md)\> Sign arbitrary data (used for TOTEM_SIGN_DATA and TOTEM_VERIFY). #### Parameters ##### origin `string` ##### params [`SignDataParams`](../interfaces/SignDataParams.md) #### Returns `Promise`\<[`SignDataResponse`](../interfaces/SignDataResponse.md)\> *** ### signTransaction() > `abstract` `protected` **signTransaction**(`origin`, `params`): `Promise`\<[`SignTransactionResponse`](../interfaces/SignTransactionResponse.md)\> Sign an unsigned Minima transaction hex. Called on totem_signTransaction. The base class does NOT perform coin selection — if you need it, handle TOTEM_SEND_TRANSACTION as a future extension point in your subclass. #### Parameters ##### origin `string` ##### params [`SignTransactionParams`](../interfaces/SignTransactionParams.md) #### Returns `Promise`\<[`SignTransactionResponse`](../interfaces/SignTransactionResponse.md)\> --- ## Page: AccountEntry URL: https://docs.totem.ing/api/totemsdk-wallet-adapter/interfaces/AccountEntry [**@totemsdk/wallet-adapter**](../index.md) *** [@totemsdk/wallet-adapter](../index.md) / AccountEntry # Interface: AccountEntry ## Properties ### address > **address**: `string` *** ### addressIndex > **addressIndex**: `number` *** ### balance? > `optional` **balance?**: `string` *** ### publicKey > **publicKey**: `string` \| `null` WOTS public key hex. Required for TOTEM_VERIFY — return null only for accounts that will not be used for verification. --- ## Page: AdapterProvider URL: https://docs.totem.ing/api/totemsdk-wallet-adapter/interfaces/AdapterProvider [**@totemsdk/wallet-adapter**](../index.md) *** [@totemsdk/wallet-adapter](../index.md) / AdapterProvider # Interface: AdapterProvider ## Properties ### isTotem > **isTotem**: `true` ## Methods ### on() > **on**(`event`, `callback`): `void` #### Parameters ##### event `string` ##### callback (...`args`) => `void` #### Returns `void` *** ### removeListener() > **removeListener**(`event`, `callback`): `void` #### Parameters ##### event `string` ##### callback (...`args`) => `void` #### Returns `void` *** ### request() > **request**(`args`): `Promise`\<`unknown`\> #### Parameters ##### args ###### method `string` ###### params? `Record`\<`string`, `unknown`\> #### Returns `Promise`\<`unknown`\> --- ## Page: ChainProviderLike URL: https://docs.totem.ing/api/totemsdk-wallet-adapter/interfaces/ChainProviderLike [**@totemsdk/wallet-adapter**](../index.md) *** [@totemsdk/wallet-adapter](../index.md) / ChainProviderLike # Interface: ChainProviderLike ## Methods ### broadcastTxPoW() > **broadcastTxPoW**(`txpowHex`): `Promise`\<\{ `message?`: `string`; `success`: `boolean`; `txpowid?`: `string`; \}\> #### Parameters ##### txpowHex `string` #### Returns `Promise`\<\{ `message?`: `string`; `success`: `boolean`; `txpowid?`: `string`; \}\> *** ### getCoin() > **getCoin**(`coinId`): `Promise`\<`unknown`\> #### Parameters ##### coinId `string` #### Returns `Promise`\<`unknown`\> *** ### getCoins() > **getCoins**(`query`): `Promise`\<`unknown`[]\> #### Parameters ##### query `Record`\<`string`, `unknown`\> #### Returns `Promise`\<`unknown`[]\> *** ### getProof() > **getProof**(`coinId`): `Promise`\<`unknown`\> #### Parameters ##### coinId `string` #### Returns `Promise`\<`unknown`\> *** ### getTip() > **getTip**(): `Promise`\<\{ `block`: `number`; `hash`: `string`; `time?`: `string`; \}\> #### Returns `Promise`\<\{ `block`: `number`; `hash`: `string`; `time?`: `string`; \}\> *** ### getToken() > **getToken**(`tokenId`): `Promise`\<`unknown`\> #### Parameters ##### tokenId `string` #### Returns `Promise`\<`unknown`\> *** ### getTokensByCreator() > **getTokensByCreator**(`address`): `Promise`\<`unknown`[]\> #### Parameters ##### address `string` #### Returns `Promise`\<`unknown`[]\> *** ### searchTokens() > **searchTokens**(`query`): `Promise`\<`unknown`[]\> #### Parameters ##### query `Record`\<`string`, `unknown`\> #### Returns `Promise`\<`unknown`[]\> --- ## Page: ConnectResponse URL: https://docs.totem.ing/api/totemsdk-wallet-adapter/interfaces/ConnectResponse [**@totemsdk/wallet-adapter**](../index.md) *** [@totemsdk/wallet-adapter](../index.md) / ConnectResponse # Interface: ConnectResponse ## Properties ### address > **address**: `string` *** ### addressIndex > **addressIndex**: `number` *** ### connected > **connected**: `true` *** ### isReconnect? > `optional` **isReconnect?**: `boolean` --- ## Page: DisconnectResponse URL: https://docs.totem.ing/api/totemsdk-wallet-adapter/interfaces/DisconnectResponse [**@totemsdk/wallet-adapter**](../index.md) *** [@totemsdk/wallet-adapter](../index.md) / DisconnectResponse # Interface: DisconnectResponse ## Properties ### error? > `optional` **error?**: `string` *** ### errorCode? > `optional` **errorCode?**: `string` *** ### success > **success**: `boolean` --- ## Page: GetAccountsResponse URL: https://docs.totem.ing/api/totemsdk-wallet-adapter/interfaces/GetAccountsResponse [**@totemsdk/wallet-adapter**](../index.md) *** [@totemsdk/wallet-adapter](../index.md) / GetAccountsResponse # Interface: GetAccountsResponse ## Properties ### accounts > **accounts**: [`AccountEntry`](AccountEntry.md)[] *** ### activeIndex > **activeIndex**: `number` --- ## Page: SignDataParams URL: https://docs.totem.ing/api/totemsdk-wallet-adapter/interfaces/SignDataParams [**@totemsdk/wallet-adapter**](../index.md) *** [@totemsdk/wallet-adapter](../index.md) / SignDataParams # Interface: SignDataParams ## Properties ### inputAddresses > **inputAddresses**: `string`[] *** ### inputIndices? > `optional` **inputIndices?**: `number`[] *** ### returnFormat? > `optional` **returnFormat?**: `"hex"` \| `"json"` *** ### unsignedHex > **unsignedHex**: `string` --- ## Page: SignDataResponse URL: https://docs.totem.ing/api/totemsdk-wallet-adapter/interfaces/SignDataResponse [**@totemsdk/wallet-adapter**](../index.md) *** [@totemsdk/wallet-adapter](../index.md) / SignDataResponse # Interface: SignDataResponse ## Properties ### error? > `optional` **error?**: `string` *** ### errorCode? > `optional` **errorCode?**: `string` *** ### signatures? > `optional` **signatures?**: `object`[] *** ### signedHex? > `optional` **signedHex?**: `string` *** ### success > **success**: `boolean` --- ## Page: SignTransactionParams URL: https://docs.totem.ing/api/totemsdk-wallet-adapter/interfaces/SignTransactionParams [**@totemsdk/wallet-adapter**](../index.md) *** [@totemsdk/wallet-adapter](../index.md) / SignTransactionParams # Interface: SignTransactionParams ## Properties ### inputAddresses > **inputAddresses**: `string`[] *** ### inputIndices? > `optional` **inputIndices?**: `number`[] *** ### returnFormat? > `optional` **returnFormat?**: `"hex"` \| `"json"` *** ### unsignedHex > **unsignedHex**: `string` --- ## Page: SignTransactionResponse URL: https://docs.totem.ing/api/totemsdk-wallet-adapter/interfaces/SignTransactionResponse [**@totemsdk/wallet-adapter**](../index.md) *** [@totemsdk/wallet-adapter](../index.md) / SignTransactionResponse # Interface: SignTransactionResponse ## Properties ### error? > `optional` **error?**: `string` *** ### errorCode? > `optional` **errorCode?**: `string` *** ### signatures? > `optional` **signatures?**: `object`[] *** ### signedHex? > `optional` **signedHex?**: `string` *** ### success > **success**: `boolean` --- ## Page: VerifyResponse URL: https://docs.totem.ing/api/totemsdk-wallet-adapter/interfaces/VerifyResponse [**@totemsdk/wallet-adapter**](../index.md) *** [@totemsdk/wallet-adapter](../index.md) / VerifyResponse # Interface: VerifyResponse ## Properties ### address > **address**: `string` *** ### expiresAt > **expiresAt**: `number` *** ### message > **message**: `string` *** ### publicKey > **publicKey**: `string` *** ### sessionExpiresAt? > `optional` **sessionExpiresAt?**: `number` *** ### sessionToken? > `optional` **sessionToken?**: `string` *** ### signature > **signature**: `string` *** ### verificationId > **verificationId**: `string` *** ### verified > **verified**: `true` --- ## Page: WalletAdapterConfig URL: https://docs.totem.ing/api/totemsdk-wallet-adapter/interfaces/WalletAdapterConfig [**@totemsdk/wallet-adapter**](../index.md) *** [@totemsdk/wallet-adapter](../index.md) / WalletAdapterConfig # Interface: WalletAdapterConfig ## Properties ### capabilities? > `optional` **capabilities?**: `DeepPartial`\<`Omit`\<[`WalletCapabilities`](WalletCapabilities.md), `"version"`\>\> *** ### chainProvider? > `optional` **chainProvider?**: [`ChainProviderLike`](ChainProviderLike.md) *** ### chainProviderFactory? > `optional` **chainProviderFactory?**: [`ChainProviderFactory`](../type-aliases/ChainProviderFactory.md) *** ### walletInfo > **walletInfo**: [`WalletInfo`](WalletInfo.md) --- ## Page: WalletCapabilities URL: https://docs.totem.ing/api/totemsdk-wallet-adapter/interfaces/WalletCapabilities [**@totemsdk/wallet-adapter**](../index.md) *** [@totemsdk/wallet-adapter](../index.md) / WalletCapabilities # Interface: WalletCapabilities ## Properties ### account > **account**: `object` #### accountSwitcher > **accountSwitcher**: `boolean` #### multiAddress > **multiAddress**: `boolean` *** ### chain > **chain**: `object` #### hostedProvider > **hostedProvider**: `boolean` #### hyperswarm > **hyperswarm**: `boolean` #### localProofVerify > **localProofVerify**: `boolean` #### lookupNode > **lookupNode**: `boolean` #### pearRuntime > **pearRuntime**: `boolean` #### pureMinimaRpc > **pureMinimaRpc**: `boolean` *** ### omnia > **omnia**: `object` #### channels > **channels**: `boolean` #### crossTokenSwap > **crossTokenSwap**: `boolean` #### factory > **factory**: `boolean` #### hyperswarm > **hyperswarm**: `boolean` #### multiHop > **multiHop**: `boolean` #### routing > **routing**: `boolean` #### splicing > **splicing**: `boolean` #### virtualChannels > **virtualChannels**: `boolean` *** ### qvac > **qvac**: `object` #### explanations > **explanations**: `boolean` #### paymentIntents > **paymentIntents**: `boolean` *** ### scripting > **scripting**: `object` #### kissvm > **kissvm**: `boolean` *** ### statechain > **statechain**: `object` #### blindSE > **blindSE**: `boolean` #### supported > **supported**: `boolean` *** ### txpow > **txpow**: `object` #### localMining > **localMining**: `boolean` #### progressEvents > **progressEvents**: `boolean` *** ### version > **version**: `string` *** ### wallet > **wallet**: `object` #### custodyType > **custodyType**: `"self"` \| `"hosted"` \| `"hybrid"` #### maxAddresses > **maxAddresses**: `number` \| `null` #### rootIdentity > **rootIdentity**: `boolean` #### seedExport > **seedExport**: `boolean` #### selfCustody > **selfCustody**: `boolean` #### treeKeyDepth > **treeKeyDepth**: `number` \| `null` #### wotsTreeKey > **wotsTreeKey**: `boolean` --- ## Page: WalletInfo URL: https://docs.totem.ing/api/totemsdk-wallet-adapter/interfaces/WalletInfo [**@totemsdk/wallet-adapter**](../index.md) *** [@totemsdk/wallet-adapter](../index.md) / WalletInfo # Interface: WalletInfo ## Properties ### icon? > `optional` **icon?**: `string` *** ### id > **id**: `string` *** ### name > **name**: `string` *** ### version? > `optional` **version?**: `string` --- ## Page: ChainProviderFactory URL: https://docs.totem.ing/api/totemsdk-wallet-adapter/type-aliases/ChainProviderFactory [**@totemsdk/wallet-adapter**](../index.md) *** [@totemsdk/wallet-adapter](../index.md) / ChainProviderFactory # Type Alias: ChainProviderFactory > **ChainProviderFactory** = (`providerType`, `rpcEndpoint?`) => [`ChainProviderLike`](../interfaces/ChainProviderLike.md) ## Parameters ### providerType `"hosted"` \| `"pure_rpc"` \| `"hybrid"` ### rpcEndpoint? `string` ## Returns [`ChainProviderLike`](../interfaces/ChainProviderLike.md) --- ## Page: AxiaLeaseProvider URL: https://docs.totem.ing/api/totemsdk-wots-lease/classes/AxiaLeaseProvider [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / AxiaLeaseProvider # Class: AxiaLeaseProvider ## Implements - [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md) ## Constructors ### Constructor > **new AxiaLeaseProvider**(`config`): `AxiaLeaseProvider` #### Parameters ##### config [`AxiaLeaseProviderConfig`](../interfaces/AxiaLeaseProviderConfig.md) #### Returns `AxiaLeaseProvider` ## Methods ### burnReservation() > **burnReservation**(`reservationId`, `reason`): `Promise`\<`void`\> #### Parameters ##### reservationId `string` ##### reason `string` #### Returns `Promise`\<`void`\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`burnReservation`](../interfaces/WotsLeaseProvider.md#burnreservation) *** ### commitKeyUse() > **commitKeyUse**(`reservationId`, `txId`): `Promise`\<`void`\> #### Parameters ##### reservationId `string` ##### txId `string` #### Returns `Promise`\<`void`\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`commitKeyUse`](../interfaces/WotsLeaseProvider.md#commitkeyuse) *** ### getLocalWatermark() > **getLocalWatermark**(`treeId`): `Promise`\<[`LocalWatermark`](../interfaces/LocalWatermark.md)\> #### Parameters ##### treeId `string` #### Returns `Promise`\<[`LocalWatermark`](../interfaces/LocalWatermark.md)\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`getLocalWatermark`](../interfaces/WotsLeaseProvider.md#getlocalwatermark) *** ### initialize() > **initialize**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### publishWatermark() > **publishWatermark**(`_treeId`): `Promise`\<`void`\> #### Parameters ##### \_treeId `string` #### Returns `Promise`\<`void`\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`publishWatermark`](../interfaces/WotsLeaseProvider.md#publishwatermark) *** ### reserveKeyUse() > **reserveKeyUse**(`params`): `Promise`\<[`LeaseReservation`](../interfaces/LeaseReservation.md)\> #### Parameters ##### params [`ReserveParams`](../interfaces/ReserveParams.md) #### Returns `Promise`\<[`LeaseReservation`](../interfaces/LeaseReservation.md)\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`reserveKeyUse`](../interfaces/WotsLeaseProvider.md#reservekeyuse) *** ### syncLeaseJournal() > **syncLeaseJournal**(): `Promise`\<[`SyncResult`](../interfaces/SyncResult.md)\> #### Returns `Promise`\<[`SyncResult`](../interfaces/SyncResult.md)\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`syncLeaseJournal`](../interfaces/WotsLeaseProvider.md#syncleasejournal) *** ### verifyLeaseCertificate() > **verifyLeaseCertificate**(`cert?`): `Promise`\<`boolean`\> #### Parameters ##### cert? [`LeaseCertificate`](../interfaces/LeaseCertificate.md) #### Returns `Promise`\<`boolean`\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`verifyLeaseCertificate`](../interfaces/WotsLeaseProvider.md#verifyleasecertificate) --- ## Page: DeviceRangeViolationError URL: https://docs.totem.ing/api/totemsdk-wots-lease/classes/DeviceRangeViolationError [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / DeviceRangeViolationError # Class: DeviceRangeViolationError ## Extends - `Error` ## Constructors ### Constructor > **new DeviceRangeViolationError**(`addressIndex`, `allowedStart`, `allowedEnd`): `DeviceRangeViolationError` #### Parameters ##### addressIndex `number` ##### allowedStart `number` ##### allowedEnd `number` #### Returns `DeviceRangeViolationError` #### Overrides `Error.constructor` ## Properties ### addressIndex > `readonly` **addressIndex**: `number` *** ### allowedEnd > `readonly` **allowedEnd**: `number` *** ### allowedStart > `readonly` **allowedStart**: `number` *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: HybridLeaseProvider URL: https://docs.totem.ing/api/totemsdk-wots-lease/classes/HybridLeaseProvider [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / HybridLeaseProvider # Class: HybridLeaseProvider ## Implements - [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md) ## Constructors ### Constructor > **new HybridLeaseProvider**(`config`): `HybridLeaseProvider` #### Parameters ##### config [`HybridLeaseProviderConfig`](../interfaces/HybridLeaseProviderConfig.md) #### Returns `HybridLeaseProvider` ## Methods ### burnReservation() > **burnReservation**(`reservationId`, `reason`): `Promise`\<`void`\> #### Parameters ##### reservationId `string` ##### reason `string` #### Returns `Promise`\<`void`\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`burnReservation`](../interfaces/WotsLeaseProvider.md#burnreservation) *** ### commitKeyUse() > **commitKeyUse**(`reservationId`, `txId`): `Promise`\<`void`\> #### Parameters ##### reservationId `string` ##### txId `string` #### Returns `Promise`\<`void`\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`commitKeyUse`](../interfaces/WotsLeaseProvider.md#commitkeyuse) *** ### getLocalWatermark() > **getLocalWatermark**(`treeId`): `Promise`\<[`LocalWatermark`](../interfaces/LocalWatermark.md)\> #### Parameters ##### treeId `string` #### Returns `Promise`\<[`LocalWatermark`](../interfaces/LocalWatermark.md)\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`getLocalWatermark`](../interfaces/WotsLeaseProvider.md#getlocalwatermark) *** ### publishWatermark() > **publishWatermark**(`treeId`): `Promise`\<`void`\> #### Parameters ##### treeId `string` #### Returns `Promise`\<`void`\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`publishWatermark`](../interfaces/WotsLeaseProvider.md#publishwatermark) *** ### reserveKeyUse() > **reserveKeyUse**(`params`): `Promise`\<[`LeaseReservation`](../interfaces/LeaseReservation.md)\> #### Parameters ##### params [`ReserveParams`](../interfaces/ReserveParams.md) #### Returns `Promise`\<[`LeaseReservation`](../interfaces/LeaseReservation.md)\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`reserveKeyUse`](../interfaces/WotsLeaseProvider.md#reservekeyuse) *** ### syncLeaseJournal() > **syncLeaseJournal**(): `Promise`\<[`SyncResult`](../interfaces/SyncResult.md)\> #### Returns `Promise`\<[`SyncResult`](../interfaces/SyncResult.md)\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`syncLeaseJournal`](../interfaces/WotsLeaseProvider.md#syncleasejournal) *** ### verifyLeaseCertificate() > **verifyLeaseCertificate**(`cert?`): `Promise`\<`boolean`\> #### Parameters ##### cert? [`LeaseCertificate`](../interfaces/LeaseCertificate.md) #### Returns `Promise`\<`boolean`\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`verifyLeaseCertificate`](../interfaces/WotsLeaseProvider.md#verifyleasecertificate) --- ## Page: IndicesUnavailableError URL: https://docs.totem.ing/api/totemsdk-wots-lease/classes/IndicesUnavailableError [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / IndicesUnavailableError # Class: IndicesUnavailableError ## Extends - `Error` ## Constructors ### Constructor > **new IndicesUnavailableError**(`treeId`, `indices`): `IndicesUnavailableError` #### Parameters ##### treeId `string` ##### indices [`SigningIndices`](../interfaces/SigningIndices.md) #### Returns `IndicesUnavailableError` #### Overrides `Error.constructor` ## Properties ### indices > `readonly` **indices**: [`SigningIndices`](../interfaces/SigningIndices.md) *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### treeId > `readonly` **treeId**: `string` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: LeaseJournal URL: https://docs.totem.ing/api/totemsdk-wots-lease/classes/LeaseJournal [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / LeaseJournal # Class: LeaseJournal ## Constructors ### Constructor > **new LeaseJournal**(`storage`, `logger?`): `LeaseJournal` #### Parameters ##### storage `StorageAdapter` ##### logger? `LoggerAdapter` = `...` #### Returns `LeaseJournal` ## Methods ### append() > **append**(`entry`): `Promise`\<`void`\> #### Parameters ##### entry [`JournalEntry`](../interfaces/JournalEntry.md) #### Returns `Promise`\<`void`\> *** ### clear() > **clear**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### getAll() > **getAll**(): [`JournalEntry`](../interfaces/JournalEntry.md)[] #### Returns [`JournalEntry`](../interfaces/JournalEntry.md)[] *** ### getByReservation() > **getByReservation**(`reservationId`): [`JournalEntry`](../interfaces/JournalEntry.md) \| `undefined` #### Parameters ##### reservationId `string` #### Returns [`JournalEntry`](../interfaces/JournalEntry.md) \| `undefined` *** ### getByTree() > **getByTree**(`treeId`): [`JournalEntry`](../interfaces/JournalEntry.md)[] #### Parameters ##### treeId `string` #### Returns [`JournalEntry`](../interfaces/JournalEntry.md)[] *** ### initialize() > **initialize**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> --- ## Page: LeaseNotFoundError URL: https://docs.totem.ing/api/totemsdk-wots-lease/classes/LeaseNotFoundError [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / LeaseNotFoundError # Class: LeaseNotFoundError ## Extends - `Error` ## Constructors ### Constructor > **new LeaseNotFoundError**(`reservationId`): `LeaseNotFoundError` #### Parameters ##### reservationId `string` #### Returns `LeaseNotFoundError` #### Overrides `Error.constructor` ## Properties ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### reservationId > `readonly` **reservationId**: `string` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: LocalLeaseProvider URL: https://docs.totem.ing/api/totemsdk-wots-lease/classes/LocalLeaseProvider [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / LocalLeaseProvider # Class: LocalLeaseProvider ## Implements - [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md) ## Constructors ### Constructor > **new LocalLeaseProvider**(`storage`, `logger?`, `deviceId?`): `LocalLeaseProvider` #### Parameters ##### storage `StorageAdapter` ##### logger? `LoggerAdapter` = `...` ##### deviceId? `string` = `'local'` #### Returns `LocalLeaseProvider` ## Methods ### advanceToRemoteWatermark() > **advanceToRemoteWatermark**(`treeId`, `remote`): `Promise`\<`boolean`\> Advance the local watermark to a remote cursor (monotonic merge). Used by quorum sync and the lookup-node LeaseCoordinator when a peer publishes a watermark ahead of ours. Returns false when the remote cursor is behind (no-op). #### Parameters ##### treeId `string` ##### remote ###### addressCursor `number` ###### l1Cursor `number` ###### l2Cursor `number` #### Returns `Promise`\<`boolean`\> *** ### burnReservation() > **burnReservation**(`reservationId`, `reason`): `Promise`\<`void`\> #### Parameters ##### reservationId `string` ##### reason `string` #### Returns `Promise`\<`void`\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`burnReservation`](../interfaces/WotsLeaseProvider.md#burnreservation) *** ### commitKeyUse() > **commitKeyUse**(`reservationId`, `txId`): `Promise`\<`void`\> #### Parameters ##### reservationId `string` ##### txId `string` #### Returns `Promise`\<`void`\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`commitKeyUse`](../interfaces/WotsLeaseProvider.md#commitkeyuse) *** ### getJournal() > **getJournal**(): [`LeaseJournal`](LeaseJournal.md) Expose the journal for quorum/on-chain providers to merge remote entries. #### Returns [`LeaseJournal`](LeaseJournal.md) *** ### getLocalWatermark() > **getLocalWatermark**(`treeId`): `Promise`\<[`LocalWatermark`](../interfaces/LocalWatermark.md)\> #### Parameters ##### treeId `string` #### Returns `Promise`\<[`LocalWatermark`](../interfaces/LocalWatermark.md)\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`getLocalWatermark`](../interfaces/WotsLeaseProvider.md#getlocalwatermark) *** ### initialize() > **initialize**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### listTrees() > **listTrees**(): `string`[] List all tree IDs known to the local watermark store. #### Returns `string`[] *** ### publishWatermark() > **publishWatermark**(`_treeId`): `Promise`\<`void`\> #### Parameters ##### \_treeId `string` #### Returns `Promise`\<`void`\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`publishWatermark`](../interfaces/WotsLeaseProvider.md#publishwatermark) *** ### reserveKeyUse() > **reserveKeyUse**(`params`): `Promise`\<[`LeaseReservation`](../interfaces/LeaseReservation.md)\> #### Parameters ##### params [`ReserveParams`](../interfaces/ReserveParams.md) #### Returns `Promise`\<[`LeaseReservation`](../interfaces/LeaseReservation.md)\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`reserveKeyUse`](../interfaces/WotsLeaseProvider.md#reservekeyuse) *** ### reserveSpecificKeyUse() > **reserveSpecificKeyUse**(`params`, `indices`): `Promise`\<[`LeaseReservation`](../interfaces/LeaseReservation.md)\> Reserve a specific set of indices (used by quorum coordination so every peer attests to the same slot). Throws IndicesUnavailableError when the slot is already taken. #### Parameters ##### params [`ReserveParams`](../interfaces/ReserveParams.md) ##### indices [`SigningIndices`](../interfaces/SigningIndices.md) #### Returns `Promise`\<[`LeaseReservation`](../interfaces/LeaseReservation.md)\> *** ### syncLeaseJournal() > **syncLeaseJournal**(): `Promise`\<[`SyncResult`](../interfaces/SyncResult.md)\> #### Returns `Promise`\<[`SyncResult`](../interfaces/SyncResult.md)\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`syncLeaseJournal`](../interfaces/WotsLeaseProvider.md#syncleasejournal) *** ### verifyLeaseCertificate() > **verifyLeaseCertificate**(`cert?`): `Promise`\<`boolean`\> #### Parameters ##### cert? [`LeaseCertificate`](../interfaces/LeaseCertificate.md) #### Returns `Promise`\<`boolean`\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`verifyLeaseCertificate`](../interfaces/WotsLeaseProvider.md#verifyleasecertificate) --- ## Page: OnchainWatermarkError URL: https://docs.totem.ing/api/totemsdk-wots-lease/classes/OnchainWatermarkError [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / OnchainWatermarkError # Class: OnchainWatermarkError ## Extends - `Error` ## Constructors ### Constructor > **new OnchainWatermarkError**(`message`): `OnchainWatermarkError` #### Parameters ##### message `string` #### Returns `OnchainWatermarkError` #### Overrides `Error.constructor` ## Properties ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: OnchainWatermarkNotImplementedError URL: https://docs.totem.ing/api/totemsdk-wots-lease/classes/OnchainWatermarkNotImplementedError [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / OnchainWatermarkNotImplementedError # Class: OnchainWatermarkNotImplementedError ## Extends - `Error` ## Constructors ### Constructor > **new OnchainWatermarkNotImplementedError**(): `OnchainWatermarkNotImplementedError` #### Returns `OnchainWatermarkNotImplementedError` #### Overrides `Error.constructor` ## Properties ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: OnchainWatermarkProvider URL: https://docs.totem.ing/api/totemsdk-wots-lease/classes/OnchainWatermarkProvider [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / OnchainWatermarkProvider # Class: OnchainWatermarkProvider ## Implements - [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md) ## Constructors ### Constructor > **new OnchainWatermarkProvider**(`config`): `OnchainWatermarkProvider` #### Parameters ##### config [`OnchainWatermarkProviderConfig`](../interfaces/OnchainWatermarkProviderConfig.md) #### Returns `OnchainWatermarkProvider` ## Methods ### burnReservation() > **burnReservation**(`reservationId`, `reason`): `Promise`\<`void`\> #### Parameters ##### reservationId `string` ##### reason `string` #### Returns `Promise`\<`void`\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`burnReservation`](../interfaces/WotsLeaseProvider.md#burnreservation) *** ### commitKeyUse() > **commitKeyUse**(`reservationId`, `txId`): `Promise`\<`void`\> #### Parameters ##### reservationId `string` ##### txId `string` #### Returns `Promise`\<`void`\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`commitKeyUse`](../interfaces/WotsLeaseProvider.md#commitkeyuse) *** ### getLocalWatermark() > **getLocalWatermark**(`treeId`): `Promise`\<[`LocalWatermark`](../interfaces/LocalWatermark.md)\> #### Parameters ##### treeId `string` #### Returns `Promise`\<[`LocalWatermark`](../interfaces/LocalWatermark.md)\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`getLocalWatermark`](../interfaces/WotsLeaseProvider.md#getlocalwatermark) *** ### initialize() > **initialize**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### publishWatermark() > **publishWatermark**(`treeId`): `Promise`\<`void`\> Publish the local watermark cursor on-chain by spending the watermark coin back to itself with STATE(statePort) = flat cursor. Rate-limited by minBlocksBetweenPublishes using the chain tip. #### Parameters ##### treeId `string` #### Returns `Promise`\<`void`\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`publishWatermark`](../interfaces/WotsLeaseProvider.md#publishwatermark) *** ### reserveKeyUse() > **reserveKeyUse**(`params`): `Promise`\<[`LeaseReservation`](../interfaces/LeaseReservation.md)\> #### Parameters ##### params [`ReserveParams`](../interfaces/ReserveParams.md) #### Returns `Promise`\<[`LeaseReservation`](../interfaces/LeaseReservation.md)\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`reserveKeyUse`](../interfaces/WotsLeaseProvider.md#reservekeyuse) *** ### syncLeaseJournal() > **syncLeaseJournal**(): `Promise`\<[`SyncResult`](../interfaces/SyncResult.md)\> #### Returns `Promise`\<[`SyncResult`](../interfaces/SyncResult.md)\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`syncLeaseJournal`](../interfaces/WotsLeaseProvider.md#syncleasejournal) *** ### verifyLeaseCertificate() > **verifyLeaseCertificate**(`cert?`): `Promise`\<`boolean`\> #### Parameters ##### cert? [`LeaseCertificate`](../interfaces/LeaseCertificate.md) #### Returns `Promise`\<`boolean`\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`verifyLeaseCertificate`](../interfaces/WotsLeaseProvider.md#verifyleasecertificate) --- ## Page: P2PQuorumLeaseProvider URL: https://docs.totem.ing/api/totemsdk-wots-lease/classes/P2PQuorumLeaseProvider [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / P2PQuorumLeaseProvider # Class: P2PQuorumLeaseProvider ## Implements - [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md) ## Constructors ### Constructor > **new P2PQuorumLeaseProvider**(`config`): `P2PQuorumLeaseProvider` #### Parameters ##### config [`P2PQuorumLeaseProviderConfig`](../interfaces/P2PQuorumLeaseProviderConfig.md) #### Returns `P2PQuorumLeaseProvider` ## Methods ### attestKeyUse() > **attestKeyUse**(`params`, `indices`): `Promise`\<[`QuorumAttestation`](../interfaces/QuorumAttestation.md)[]\> Collect quorum attestations for a reservation that was already made locally (used by HybridLeaseProvider so the local slot and the attested slot are the same). Throws QuorumUnavailableError / QuorumConflictError on failure — the caller owns the local reservation and must burn it. #### Parameters ##### params [`ReserveParams`](../interfaces/ReserveParams.md) ##### indices ###### addressIndex `number` ###### l1 `number` ###### l2 `number` #### Returns `Promise`\<[`QuorumAttestation`](../interfaces/QuorumAttestation.md)[]\> *** ### burnReservation() > **burnReservation**(`reservationId`, `reason`): `Promise`\<`void`\> #### Parameters ##### reservationId `string` ##### reason `string` #### Returns `Promise`\<`void`\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`burnReservation`](../interfaces/WotsLeaseProvider.md#burnreservation) *** ### commitKeyUse() > **commitKeyUse**(`reservationId`, `txId`): `Promise`\<`void`\> #### Parameters ##### reservationId `string` ##### txId `string` #### Returns `Promise`\<`void`\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`commitKeyUse`](../interfaces/WotsLeaseProvider.md#commitkeyuse) *** ### getLocalWatermark() > **getLocalWatermark**(`treeId`): `Promise`\<[`LocalWatermark`](../interfaces/LocalWatermark.md)\> #### Parameters ##### treeId `string` #### Returns `Promise`\<[`LocalWatermark`](../interfaces/LocalWatermark.md)\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`getLocalWatermark`](../interfaces/WotsLeaseProvider.md#getlocalwatermark) *** ### initialize() > **initialize**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### publishWatermark() > **publishWatermark**(`treeId`): `Promise`\<`void`\> #### Parameters ##### treeId `string` #### Returns `Promise`\<`void`\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`publishWatermark`](../interfaces/WotsLeaseProvider.md#publishwatermark) *** ### reserveKeyUse() > **reserveKeyUse**(`params`): `Promise`\<[`LeaseReservation`](../interfaces/LeaseReservation.md)\> #### Parameters ##### params [`ReserveParams`](../interfaces/ReserveParams.md) #### Returns `Promise`\<[`LeaseReservation`](../interfaces/LeaseReservation.md)\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`reserveKeyUse`](../interfaces/WotsLeaseProvider.md#reservekeyuse) *** ### syncLeaseJournal() > **syncLeaseJournal**(): `Promise`\<[`SyncResult`](../interfaces/SyncResult.md)\> #### Returns `Promise`\<[`SyncResult`](../interfaces/SyncResult.md)\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`syncLeaseJournal`](../interfaces/WotsLeaseProvider.md#syncleasejournal) *** ### verifyLeaseCertificate() > **verifyLeaseCertificate**(`cert?`): `Promise`\<`boolean`\> #### Parameters ##### cert? [`LeaseCertificate`](../interfaces/LeaseCertificate.md) #### Returns `Promise`\<`boolean`\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`verifyLeaseCertificate`](../interfaces/WotsLeaseProvider.md#verifyleasecertificate) --- ## Page: P2PQuorumNotImplementedError URL: https://docs.totem.ing/api/totemsdk-wots-lease/classes/P2PQuorumNotImplementedError [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / P2PQuorumNotImplementedError # Class: P2PQuorumNotImplementedError ## Extends - `Error` ## Constructors ### Constructor > **new P2PQuorumNotImplementedError**(): `P2PQuorumNotImplementedError` #### Returns `P2PQuorumNotImplementedError` #### Overrides `Error.constructor` ## Properties ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: PersonalLeaseNodeNotConfiguredError URL: https://docs.totem.ing/api/totemsdk-wots-lease/classes/PersonalLeaseNodeNotConfiguredError [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / PersonalLeaseNodeNotConfiguredError # Class: PersonalLeaseNodeNotConfiguredError ## Extends - `Error` ## Constructors ### Constructor > **new PersonalLeaseNodeNotConfiguredError**(): `PersonalLeaseNodeNotConfiguredError` #### Returns `PersonalLeaseNodeNotConfiguredError` #### Overrides `Error.constructor` ## Properties ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: PersonalLeaseNodeProvider URL: https://docs.totem.ing/api/totemsdk-wots-lease/classes/PersonalLeaseNodeProvider [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / PersonalLeaseNodeProvider # Class: PersonalLeaseNodeProvider Layer 3 — personal lookup-node lease coordinator. Calls the HTTP REST API exposed by a running @totemsdk/lookup-node that has lease coordination enabled. All write operations are forwarded to the node's LeaseCoordinator so the node acts as the source-of-truth watermark journal for high-value transactions. Wrap with HybridLeaseProvider so local reservations always succeed even when the personal node is temporarily unreachable: ```ts const provider = new HybridLeaseProvider({ local: new LocalLeaseProvider(storage), node: new PersonalLeaseNodeProvider({ nodeUrl, nodePubkey }), threshold: 10, // escalate to node for txns >= 10 MIN }); ``` ## Implements - [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md) ## Constructors ### Constructor > **new PersonalLeaseNodeProvider**(`config`): `PersonalLeaseNodeProvider` #### Parameters ##### config [`PersonalLeaseNodeConfig`](../interfaces/PersonalLeaseNodeConfig.md) #### Returns `PersonalLeaseNodeProvider` ## Methods ### burnReservation() > **burnReservation**(`reservationId`, `reason`): `Promise`\<`void`\> #### Parameters ##### reservationId `string` ##### reason `string` #### Returns `Promise`\<`void`\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`burnReservation`](../interfaces/WotsLeaseProvider.md#burnreservation) *** ### commitKeyUse() > **commitKeyUse**(`reservationId`, `txId`): `Promise`\<`void`\> #### Parameters ##### reservationId `string` ##### txId `string` #### Returns `Promise`\<`void`\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`commitKeyUse`](../interfaces/WotsLeaseProvider.md#commitkeyuse) *** ### getLocalWatermark() > **getLocalWatermark**(`treeId`): `Promise`\<[`LocalWatermark`](../interfaces/LocalWatermark.md)\> #### Parameters ##### treeId `string` #### Returns `Promise`\<[`LocalWatermark`](../interfaces/LocalWatermark.md)\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`getLocalWatermark`](../interfaces/WotsLeaseProvider.md#getlocalwatermark) *** ### publishWatermark() > **publishWatermark**(`treeId`): `Promise`\<`void`\> #### Parameters ##### treeId `string` #### Returns `Promise`\<`void`\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`publishWatermark`](../interfaces/WotsLeaseProvider.md#publishwatermark) *** ### reserveKeyUse() > **reserveKeyUse**(`params`): `Promise`\<[`LeaseReservation`](../interfaces/LeaseReservation.md)\> #### Parameters ##### params [`ReserveParams`](../interfaces/ReserveParams.md) #### Returns `Promise`\<[`LeaseReservation`](../interfaces/LeaseReservation.md)\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`reserveKeyUse`](../interfaces/WotsLeaseProvider.md#reservekeyuse) *** ### syncLeaseJournal() > **syncLeaseJournal**(): `Promise`\<[`SyncResult`](../interfaces/SyncResult.md)\> #### Returns `Promise`\<[`SyncResult`](../interfaces/SyncResult.md)\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`syncLeaseJournal`](../interfaces/WotsLeaseProvider.md#syncleasejournal) *** ### verifyLeaseCertificate() > **verifyLeaseCertificate**(`cert?`): `Promise`\<`boolean`\> #### Parameters ##### cert? [`LeaseCertificate`](../interfaces/LeaseCertificate.md) #### Returns `Promise`\<`boolean`\> #### Implementation of [`WotsLeaseProvider`](../interfaces/WotsLeaseProvider.md).[`verifyLeaseCertificate`](../interfaces/WotsLeaseProvider.md#verifyleasecertificate) --- ## Page: QuorumConflictError URL: https://docs.totem.ing/api/totemsdk-wots-lease/classes/QuorumConflictError [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / QuorumConflictError # Class: QuorumConflictError ## Extends - `Error` ## Constructors ### Constructor > **new QuorumConflictError**(`treeId`, `indices`): `QuorumConflictError` #### Parameters ##### treeId `string` ##### indices [`SigningIndices`](../interfaces/SigningIndices.md) #### Returns `QuorumConflictError` #### Overrides `Error.constructor` ## Properties ### indices > `readonly` **indices**: [`SigningIndices`](../interfaces/SigningIndices.md) *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### treeId > `readonly` **treeId**: `string` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: QuorumUnavailableError URL: https://docs.totem.ing/api/totemsdk-wots-lease/classes/QuorumUnavailableError [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / QuorumUnavailableError # Class: QuorumUnavailableError ## Extends - `Error` ## Constructors ### Constructor > **new QuorumUnavailableError**(`required`, `available`): `QuorumUnavailableError` #### Parameters ##### required `number` ##### available `number` #### Returns `QuorumUnavailableError` #### Overrides `Error.constructor` ## Properties ### available > `readonly` **available**: `number` *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### required > `readonly` **required**: `number` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: WatermarkExhaustedError URL: https://docs.totem.ing/api/totemsdk-wots-lease/classes/WatermarkExhaustedError [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / WatermarkExhaustedError # Class: WatermarkExhaustedError ## Extends - `Error` ## Constructors ### Constructor > **new WatermarkExhaustedError**(`treeId`): `WatermarkExhaustedError` #### Parameters ##### treeId `string` #### Returns `WatermarkExhaustedError` #### Overrides `Error.constructor` ## Properties ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### treeId > `readonly` **treeId**: `string` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: WatermarkMonotonicityError URL: https://docs.totem.ing/api/totemsdk-wots-lease/classes/WatermarkMonotonicityError [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / WatermarkMonotonicityError # Class: WatermarkMonotonicityError ## Extends - `Error` ## Constructors ### Constructor > **new WatermarkMonotonicityError**(`message`): `WatermarkMonotonicityError` #### Parameters ##### message `string` #### Returns `WatermarkMonotonicityError` #### Overrides `Error.constructor` ## Properties ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` 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() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` 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` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- ## Page: WotsWatermarkStore URL: https://docs.totem.ing/api/totemsdk-wots-lease/classes/WotsWatermarkStore [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / WotsWatermarkStore # Class: WotsWatermarkStore ## Constructors ### Constructor > **new WotsWatermarkStore**(`storage`, `logger?`): `WotsWatermarkStore` #### Parameters ##### storage `StorageAdapter` ##### logger? `LoggerAdapter` = `...` #### Returns `WotsWatermarkStore` ## Methods ### clear() > **clear**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### getLocalWatermark() > **getLocalWatermark**(`treeId`): [`LocalWatermark`](../interfaces/LocalWatermark.md) #### Parameters ##### treeId `string` #### Returns [`LocalWatermark`](../interfaces/LocalWatermark.md) *** ### getNextIndices() > **getNextIndices**(`treeId`): [`SigningIndices`](../interfaces/SigningIndices.md) #### Parameters ##### treeId `string` #### Returns [`SigningIndices`](../interfaces/SigningIndices.md) *** ### getRawState() > **getRawState**(): [`WotsWatermarkState`](../interfaces/WotsWatermarkState.md) #### Returns [`WotsWatermarkState`](../interfaces/WotsWatermarkState.md) *** ### initialize() > **initialize**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### isUnavailable() > **isUnavailable**(`treeId`, `indices`): `boolean` #### Parameters ##### treeId `string` ##### indices [`SigningIndices`](../interfaces/SigningIndices.md) #### Returns `boolean` *** ### markUnavailable() > **markUnavailable**(`treeId`, `indices`, `reason`): `Promise`\<`void`\> #### Parameters ##### treeId `string` ##### indices [`SigningIndices`](../interfaces/SigningIndices.md) ##### reason [`UnavailableReason`](../type-aliases/UnavailableReason.md) #### Returns `Promise`\<`void`\> *** ### save() > **save**(`treeId`, `patch`): `Promise`\<`void`\> #### Parameters ##### treeId `string` ##### patch `Partial`\<[`TreeWatermark`](../interfaces/TreeWatermark.md)\> #### Returns `Promise`\<`void`\> --- ## Page: allocateDeviceRange URL: https://docs.totem.ing/api/totemsdk-wots-lease/functions/allocateDeviceRange [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / allocateDeviceRange # Function: allocateDeviceRange() > **allocateDeviceRange**(`params`): [`DeviceKeyRange`](../interfaces/DeviceKeyRange.md) ## Parameters ### params #### deviceId `string` #### deviceSlot `number` ## Returns [`DeviceKeyRange`](../interfaces/DeviceKeyRange.md) --- ## Page: deviceSlotForAddressIndex URL: https://docs.totem.ing/api/totemsdk-wots-lease/functions/deviceSlotForAddressIndex [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / deviceSlotForAddressIndex # Function: deviceSlotForAddressIndex() > **deviceSlotForAddressIndex**(`addressIndex`): `number` ## Parameters ### addressIndex `number` ## Returns `number` --- ## Page: flatIndex URL: https://docs.totem.ing/api/totemsdk-wots-lease/functions/flatIndex [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / flatIndex # Function: flatIndex() > **flatIndex**(`idx`): `number` ## Parameters ### idx [`SigningIndices`](../interfaces/SigningIndices.md) ## Returns `number` --- ## Page: fromFlatIndex URL: https://docs.totem.ing/api/totemsdk-wots-lease/functions/fromFlatIndex [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / fromFlatIndex # Function: fromFlatIndex() > **fromFlatIndex**(`flat`): [`SigningIndices`](../interfaces/SigningIndices.md) ## Parameters ### flat `number` ## Returns [`SigningIndices`](../interfaces/SigningIndices.md) --- ## Page: AxiaLeaseProviderConfig URL: https://docs.totem.ing/api/totemsdk-wots-lease/interfaces/AxiaLeaseProviderConfig [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / AxiaLeaseProviderConfig # Interface: AxiaLeaseProviderConfig ## Properties ### apiKey > **apiKey**: `string` *** ### apiUrl > **apiUrl**: `string` *** ### logger? > `optional` **logger?**: `LoggerAdapter` *** ### rootPublicKey > **rootPublicKey**: `string` *** ### storage > **storage**: `StorageAdapter` --- ## Page: CertificateSigner URL: https://docs.totem.ing/api/totemsdk-wots-lease/interfaces/CertificateSigner [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / CertificateSigner # Interface: CertificateSigner Identity used to authenticate lease certificates (Layer 4/5). A certificate's `signature` is a signature over the canonical certificate payload (see certificate.ts). Verifiers reject unsigned certificates. ## Properties ### name? > `optional` **name?**: `string` Identity label stored on issued certificates via `issuedBy`. *** ### publicKeyDigest > **publicKeyDigest**: `string` Hex (0x-prefixed or bare) public key digest of the issuing identity. ## Methods ### sign() > **sign**(`message`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> Sign the canonical certificate message. #### Parameters ##### message `Uint8Array` #### Returns `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> *** ### verify()? > `optional` **verify**(`message`, `signature`): `Promise`\<`boolean`\> Verify a signature over the canonical certificate message. #### Parameters ##### message `Uint8Array` ##### signature `Uint8Array` #### Returns `Promise`\<`boolean`\> --- ## Page: ConflictRecord URL: https://docs.totem.ing/api/totemsdk-wots-lease/interfaces/ConflictRecord [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / ConflictRecord # Interface: ConflictRecord ## Properties ### localIndex > **localIndex**: `number` *** ### remoteIndex > **remoteIndex**: `number` *** ### timestamp > **timestamp**: `number` *** ### treeId > **treeId**: `string` --- ## Page: DeviceKeyRange URL: https://docs.totem.ing/api/totemsdk-wots-lease/interfaces/DeviceKeyRange [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / DeviceKeyRange # Interface: DeviceKeyRange ## Properties ### addressCount > **addressCount**: `number` *** ### deviceId > **deviceId**: `string` *** ### endAddressIndex > **endAddressIndex**: `number` *** ### startAddressIndex > **startAddressIndex**: `number` --- ## Page: HybridLeaseProviderConfig URL: https://docs.totem.ing/api/totemsdk-wots-lease/interfaces/HybridLeaseProviderConfig [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / HybridLeaseProviderConfig # Interface: HybridLeaseProviderConfig ## Properties ### certificateSigner? > `optional` **certificateSigner?**: [`CertificateSigner`](CertificateSigner.md) Identity that authenticates locally-assembled quorum certificates. *** ### local > **local**: [`LocalLeaseProvider`](../classes/LocalLeaseProvider.md) *** ### node? > `optional` **node?**: [`PersonalLeaseNodeProvider`](../classes/PersonalLeaseNodeProvider.md) *** ### onchain? > `optional` **onchain?**: [`OnchainWatermarkProvider`](../classes/OnchainWatermarkProvider.md) *** ### quorum? > `optional` **quorum?**: [`P2PQuorumLeaseProvider`](../classes/P2PQuorumLeaseProvider.md) *** ### threshold? > `optional` **threshold?**: `number` --- ## Page: JournalEntry URL: https://docs.totem.ing/api/totemsdk-wots-lease/interfaces/JournalEntry [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / JournalEntry # Interface: JournalEntry ## Properties ### branchId > **branchId**: `string` *** ### deviceId > **deviceId**: `string` *** ### hash? > `optional` **hash?**: `string` *** ### indices > **indices**: [`SigningIndices`](SigningIndices.md) *** ### payloadHash? > `optional` **payloadHash?**: `string` *** ### previousHash? > `optional` **previousHash?**: `string` *** ### reservationId? > `optional` **reservationId?**: `string` *** ### status > **status**: `"reserved"` \| `"committed"` \| `"burned"` \| `"reserved-expired"` *** ### timestamp > **timestamp**: `number` *** ### treeId > **treeId**: `string` *** ### txId? > `optional` **txId?**: `string` *** ### wotsIndex > **wotsIndex**: `number` --- ## Page: LeaseCertificate URL: https://docs.totem.ing/api/totemsdk-wots-lease/interfaces/LeaseCertificate [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / LeaseCertificate # Interface: LeaseCertificate ## Properties ### attestations? > `optional` **attestations?**: [`QuorumAttestation`](QuorumAttestation.md)[] Layer 4 — quorum attestations collected from P2P peers. *** ### branchId? > `optional` **branchId?**: `string` *** ### deviceId? > `optional` **deviceId?**: `string` *** ### expiresAt > **expiresAt**: `number` *** ### indices > **indices**: [`SigningIndices`](SigningIndices.md) *** ### issuedAt > **issuedAt**: `number` *** ### issuedBy > **issuedBy**: `string` *** ### payloadHash? > `optional` **payloadHash?**: `string` *** ### purpose? > `optional` **purpose?**: `string` *** ### reservationId > **reservationId**: `string` *** ### signature > **signature**: `string` *** ### treeId > **treeId**: `string` *** ### txpowid? > `optional` **txpowid?**: `string` Layer 5 — content hash of the on-chain watermark TX (sha3-256 of TxPoW bytes). --- ## Page: LeaseReservation URL: https://docs.totem.ing/api/totemsdk-wots-lease/interfaces/LeaseReservation [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / LeaseReservation # Interface: LeaseReservation ## Properties ### certificate? > `optional` **certificate?**: [`LeaseCertificate`](LeaseCertificate.md) *** ### expiresAt > **expiresAt**: `number` *** ### indices > **indices**: [`SigningIndices`](SigningIndices.md) *** ### leaseToken? > `optional` **leaseToken?**: `string` *** ### reservationId > **reservationId**: `string` --- ## Page: LocalWatermark URL: https://docs.totem.ing/api/totemsdk-wots-lease/interfaces/LocalWatermark [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / LocalWatermark # Interface: LocalWatermark ## Properties ### addressCursor > **addressCursor**: `number` *** ### capacity > **capacity**: `number` *** ### l1Cursor > **l1Cursor**: `number` *** ### l2Cursor > **l2Cursor**: `number` *** ### lastSyncTimestamp? > `optional` **lastSyncTimestamp?**: `number` *** ### treeId > **treeId**: `string` *** ### unavailableCount > **unavailableCount**: `number` --- ## Page: OnchainWatermarkProviderConfig URL: https://docs.totem.ing/api/totemsdk-wots-lease/interfaces/OnchainWatermarkProviderConfig [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / OnchainWatermarkProviderConfig # Interface: OnchainWatermarkProviderConfig Layer 5 — on-chain watermark anchoring. `chain` is any ChainStateProvider (hosted, Minima RPC, or lookup node). The provider spends a dedicated watermark coin whose STATE(0) holds the flat watermark cursor; every publish advances it on-chain so the watermark is verifiable by third parties without trusting this device. ## Properties ### amount? > `optional` **amount?**: `string` Amount of the watermark coin in MIN base units. Default: '1'. *** ### chain > **chain**: `object` Chain access for coin queries, proofs, and broadcasting. #### broadcastTxPoW() > **broadcastTxPoW**(`txpowHex`): `Promise`\<\{ `message?`: `string`; `success`: `boolean`; `txpowid?`: `string`; \}\> ##### Parameters ###### txpowHex `string` ##### Returns `Promise`\<\{ `message?`: `string`; `success`: `boolean`; `txpowid?`: `string`; \}\> #### getCoin() > **getCoin**(`coinId`): `Promise`\<\{ `address`: `string`; `amount`: `string`; `coinid`: `string`; `state?`: `unknown`[]; `tokenid`: `string`; \} \| `null`\> ##### Parameters ###### coinId `string` ##### Returns `Promise`\<\{ `address`: `string`; `amount`: `string`; `coinid`: `string`; `state?`: `unknown`[]; `tokenid`: `string`; \} \| `null`\> #### getProof() > **getProof**(`coinId`): `Promise`\<\{ `data`: `unknown`; \}\> ##### Parameters ###### coinId `string` ##### Returns `Promise`\<\{ `data`: `unknown`; \}\> #### getTip()? > `optional` **getTip**(): `Promise`\<\{ `block`: `number`; \}\> ##### Returns `Promise`\<\{ `block`: `number`; \}\> *** ### local > **local**: [`LocalLeaseProvider`](../classes/LocalLeaseProvider.md) Local provider used for the authoritative local watermark + journal. *** ### minBlocksBetweenPublishes? > `optional` **minBlocksBetweenPublishes?**: `number` Minimum blocks between on-chain publishes (rate limit). Default: 1. *** ### signer > **signer**: `object` Signer for the watermark coin's script (SIGNEDBY digest). Also authenticates issued certificates. #### publicKeyDigest > **publicKeyDigest**: `string` #### sign() > **sign**(`message`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> ##### Parameters ###### message `Uint8Array` ##### Returns `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\> #### verify()? > `optional` **verify**(`message`, `signature`): `Promise`\<`boolean`\> ##### Parameters ###### message `Uint8Array` ###### signature `Uint8Array` ##### Returns `Promise`\<`boolean`\> *** ### statePort? > `optional` **statePort?**: `number` Port holding the flat watermark cursor in the coin state. Default: 0. *** ### storage? > `optional` **storage?**: `StorageAdapter` Optional durable storage for the watermark coin's identity. When set, the provider persists the advanced watermark coin ID after each publish so the rollover survives restarts. Default: in-memory only. *** ### tokenId? > `optional` **tokenId?**: `string` Token ID of the watermark coin. Default: '0x00'. *** ### watermarkAddress > **watermarkAddress**: `string` Address the watermark coin currently sits at (spending address). *** ### watermarkCoinId > **watermarkCoinId**: `string` Coin ID of the dedicated watermark coin. --- ## Page: P2PQuorumLeaseProviderConfig URL: https://docs.totem.ing/api/totemsdk-wots-lease/interfaces/P2PQuorumLeaseProviderConfig [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / P2PQuorumLeaseProviderConfig # Interface: P2PQuorumLeaseProviderConfig ## Properties ### certificateSigner? > `optional` **certificateSigner?**: [`CertificateSigner`](CertificateSigner.md) Identity that authenticates issued certificates. When set, reserved certificates carry a real signature; without it, certificates are issued unsigned and will FAIL verification. *** ### local > **local**: [`LocalLeaseProvider`](../classes/LocalLeaseProvider.md) Local provider used for the authoritative local watermark + journal. *** ### minAttestations? > `optional` **minAttestations?**: `number` Minimum attestations required for a reservation to be considered quorum-approved. Default: 1. *** ### peers > **peers**: [`QuorumPeer`](QuorumPeer.md)[] Quorum members to coordinate with (excluding self). *** ### requestTimeoutMs? > `optional` **requestTimeoutMs?**: `number` Timeout per peer request. Default: 5_000. *** ### requireQuorumOnCommit? > `optional` **requireQuorumOnCommit?**: `boolean` Require quorum approval on commit as well as reserve. Default: false. --- ## Page: PersonalLeaseNodeConfig URL: https://docs.totem.ing/api/totemsdk-wots-lease/interfaces/PersonalLeaseNodeConfig [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / PersonalLeaseNodeConfig # Interface: PersonalLeaseNodeConfig ## Properties ### authToken? > `optional` **authToken?**: `string` *** ### certificateSigner? > `optional` **certificateSigner?**: [`CertificateSigner`](CertificateSigner.md) Identity that authenticates certificates issued by this node. When set, `verifyLeaseCertificate` performs cryptographic signature verification; without it, verification is issuer-only (no signature check). *** ### nodePubkey > **nodePubkey**: `string` *** ### nodeUrl > **nodeUrl**: `string` --- ## Page: QuorumAttestation URL: https://docs.totem.ing/api/totemsdk-wots-lease/interfaces/QuorumAttestation [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / QuorumAttestation # Interface: QuorumAttestation ## Properties ### expiresAt > **expiresAt**: `number` *** ### indices > **indices**: [`SigningIndices`](SigningIndices.md) *** ### peerId > **peerId**: `string` *** ### signature? > `optional` **signature?**: `string` --- ## Page: QuorumPeer URL: https://docs.totem.ing/api/totemsdk-wots-lease/interfaces/QuorumPeer [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / QuorumPeer # Interface: QuorumPeer Layer 4 — P2P quorum lease coordination. `peers` is the set of quorum members this device coordinates with. Each entry is a transport-agnostic RPC handle: the provider sends the same LEASE_RESERVE / LEASE_COMMIT / LEASE_BURN wire messages used by the lookup protocol, so any peer that speaks that protocol can participate (lookup nodes, other devices, or in-memory test peers). ## Properties ### peerId > **peerId**: `string` ## Methods ### request() > **request**(`message`, `timeoutMs?`): `Promise`\<\{ `payload`: `Record`\<`string`, `unknown`\>; `type`: `string`; \}\> #### Parameters ##### message ###### payload `Record`\<`string`, `unknown`\> ###### type `"LEASE_RESERVE"` \| `"LEASE_COMMIT"` \| `"LEASE_BURN"` \| `"LEASE_WATERMARK"` ##### timeoutMs? `number` #### Returns `Promise`\<\{ `payload`: `Record`\<`string`, `unknown`\>; `type`: `string`; \}\> --- ## Page: ReserveParams URL: https://docs.totem.ing/api/totemsdk-wots-lease/interfaces/ReserveParams [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / ReserveParams # Interface: ReserveParams ## Properties ### branchId? > `optional` **branchId?**: `string` *** ### deviceId? > `optional` **deviceId?**: `string` *** ### payloadHash? > `optional` **payloadHash?**: `string` *** ### purpose? > `optional` **purpose?**: `string` *** ### treeId > **treeId**: `string` *** ### ttlMs? > `optional` **ttlMs?**: `number` *** ### valueHint? > `optional` **valueHint?**: `string` --- ## Page: SigningIndices URL: https://docs.totem.ing/api/totemsdk-wots-lease/interfaces/SigningIndices [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / SigningIndices # Interface: SigningIndices ## Properties ### addressIndex > **addressIndex**: `number` *** ### l1 > **l1**: `number` *** ### l2 > **l2**: `number` --- ## Page: SyncResult URL: https://docs.totem.ing/api/totemsdk-wots-lease/interfaces/SyncResult [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / SyncResult # Interface: SyncResult ## Properties ### advancedTo? > `optional` **advancedTo?**: [`SigningIndices`](SigningIndices.md) *** ### conflicts > **conflicts**: [`ConflictRecord`](ConflictRecord.md)[] *** ### synced > **synced**: `boolean` --- ## Page: TreeWatermark URL: https://docs.totem.ing/api/totemsdk-wots-lease/interfaces/TreeWatermark [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / TreeWatermark # Interface: TreeWatermark ## Properties ### addressCursor > **addressCursor**: `number` *** ### branchId? > `optional` **branchId?**: `string` *** ### deviceId? > `optional` **deviceId?**: `string` *** ### l1Cursor > **l1Cursor**: `number` *** ### l2Cursor > **l2Cursor**: `number` *** ### lastSyncTimestamp? > `optional` **lastSyncTimestamp?**: `number` *** ### treeId > **treeId**: `string` *** ### unavailable > **unavailable**: `Record`\<`number`, [`UnavailableReason`](../type-aliases/UnavailableReason.md)\> --- ## Page: WotsLeaseProvider URL: https://docs.totem.ing/api/totemsdk-wots-lease/interfaces/WotsLeaseProvider [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / WotsLeaseProvider # Interface: WotsLeaseProvider ## Methods ### burnReservation() > **burnReservation**(`reservationId`, `reason`): `Promise`\<`void`\> #### Parameters ##### reservationId `string` ##### reason `string` #### Returns `Promise`\<`void`\> *** ### commitKeyUse() > **commitKeyUse**(`reservationId`, `txId`): `Promise`\<`void`\> #### Parameters ##### reservationId `string` ##### txId `string` #### Returns `Promise`\<`void`\> *** ### getLocalWatermark() > **getLocalWatermark**(`treeId`): `Promise`\<[`LocalWatermark`](LocalWatermark.md)\> #### Parameters ##### treeId `string` #### Returns `Promise`\<[`LocalWatermark`](LocalWatermark.md)\> *** ### publishWatermark() > **publishWatermark**(`treeId`): `Promise`\<`void`\> #### Parameters ##### treeId `string` #### Returns `Promise`\<`void`\> *** ### reserveKeyUse() > **reserveKeyUse**(`params`): `Promise`\<[`LeaseReservation`](LeaseReservation.md)\> #### Parameters ##### params [`ReserveParams`](ReserveParams.md) #### Returns `Promise`\<[`LeaseReservation`](LeaseReservation.md)\> *** ### syncLeaseJournal() > **syncLeaseJournal**(): `Promise`\<[`SyncResult`](SyncResult.md)\> #### Returns `Promise`\<[`SyncResult`](SyncResult.md)\> *** ### verifyLeaseCertificate() > **verifyLeaseCertificate**(`cert?`): `Promise`\<`boolean`\> #### Parameters ##### cert? [`LeaseCertificate`](LeaseCertificate.md) #### Returns `Promise`\<`boolean`\> --- ## Page: WotsWatermarkState URL: https://docs.totem.ing/api/totemsdk-wots-lease/interfaces/WotsWatermarkState [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / WotsWatermarkState # Interface: WotsWatermarkState ## Properties ### trees > **trees**: `Record`\<`string`, [`TreeWatermark`](TreeWatermark.md)\> *** ### version > **version**: `3` --- ## Page: LeaseStatus URL: https://docs.totem.ing/api/totemsdk-wots-lease/type-aliases/LeaseStatus [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / LeaseStatus # Type Alias: LeaseStatus > **LeaseStatus** = `"pending"` \| `"active"` \| `"expired"` \| `"finalized"` \| `"cancelled"` --- ## Page: UnavailableReason URL: https://docs.totem.ing/api/totemsdk-wots-lease/type-aliases/UnavailableReason [**@totemsdk/wots-lease**](../index.md) *** [@totemsdk/wots-lease](../index.md) / UnavailableReason # Type Alias: UnavailableReason > **UnavailableReason** = `"reserved"` \| `"committed"` \| `"burned"` \| `"reserved-expired"` --- ## Page: Local Edge AI Overview URL: https://docs.totem.ing/concepts/intelligence-overview # Local Edge AI (QVAC) Totem is being extended so devices run their **own** AI inference — models on the edge, not cloud APIs. Two new packages make this safe to wire into the mining, payment, and policy core: | Package | Role | |---------|------| | **`@totemsdk/intelligence`** | Provider-neutral contracts — capabilities, operations, usage receipts, error codes, and the `EdgeIntelligencePort` | | **`@totemsdk/qvac`** | QVAC adapter — wraps `@qvac/sdk` into those contracts, with runtime capability discovery and per-domain adapters | ## Trust model: the AI proposes, Totem authorizes An `IntelligenceProvider` is a **compute surface, never a signing surface**. - Inference runs locally/self-hosted inside the device's own process. - The inference layer cannot sign transactions and never holds keys. - Every inference is keyed by a `proposalId` / `runId` so policy layers upstream (`@totemsdk/agent-policy`, `@totemsdk/authority`) can authorize, meter, and budget it the same way they authorize a payment. ## What the contracts provide - **Domains** — `llm`, `embed`, `rag`, `asr`, `translate`, `tts`, `diffusion`, `ocr`, `classify`, `audiogen`, `video`, `vla`, `world`, `models`, `system`, `plugins`. Each surfaces as an `intelligence:` capability string, compatible with `@totemsdk/edge`'s `domain:action` convention. - **Operations** — a stable `domain` + `op` + `params` shape so consumers never depend on a concrete provider's vocabulary. - **Usage receipts** — `usage` output per invocation (tokens, duration) is the metering unit that `@totemsdk/agent-policy` inference-cost flows consume. - **Errors** — `IntelligenceError` carries a stable error code and a `retryable` flag for retries and budgets. ## QVAC adapter `@totemsdk/qvac` consumes `@qvac/sdk` at runtime only — injected, loaded via `sdkLoader`, or lazily required. The package has **no manifest peer on the heavy native SDK**: its type surface is vendored from the real `@qvac/sdk@0.19.0` declarations, so adapter param/result types are genuine upstream signatures (e.g. `CompletionParams` requires `modelId` + `history`), and a CI drift audit (`validate:qvac-drift`) reinstalls the real SDK and verifies the wrapped op surface still exists upstream. ```ts import * as qvac from '@qvac/sdk'; import { createQvacIntelligenceProvider } from '@totemsdk/qvac'; const provider = createQvacIntelligenceProvider({ sdk: qvac }); const result = await provider.invoke({ domain: 'llm', op: 'completion', params: { modelId: 'qvac-llm', history: [{ role: 'user', content: 'Summarize this invoice' }] }, }); if (result.ok) console.log(result.data, result.usage?.tokensOut); ``` **Capability discovery.** `provider.capabilities` reflects which domains are actually callable on the resolved SDK — a runtime without the RAG plugin stops advertising `intelligence:rag`. **Shapes & cancellation.** The provider dispatches each op per the real SDK invocation shape (record / positional / callback), maps streamable run/session surfaces (`textToSpeech` audio samples, `transcribeStream` segments, `completion` token/progress/done, `loggingStream` deltas) onto `IntelligenceStreamChunk`s, mirrors real adapter signatures, and forwards cancellation to `sdk.cancel({ requestId })` when the SDK decorates pending promises with a `requestId`. ## Edge integration Routes `intelligence:invoke` / `intelligence:cancel` actions to the `EdgeIntelligencePort`: ```ts import { createQvacEdgeIntelligencePort } from '@totemsdk/qvac/edge'; import { edgeRuntime } from '@totemsdk/edge'; const port = createQvacEdgeIntelligencePort({ sdk: qvac }); edgeRuntime.ports.intelligence = port; ``` Dispatch is **capability-gated**: `intelligence:invoke` fails with `CAPABILITY_MISSING` before touching the port if `intelligence:` is not in the runtime's `EdgeCapabilitySet`. ## Learning more - [`@totemsdk/intelligence`](../api/totemsdk-intelligence/index.md) — contract reference - [`@totemsdk/qvac`](../api/totemsdk-qvac/index.md) — adapter reference - [Agent Policy Overview](agent-policy-overview.md) — how proposals like `inference` intents get evaluated and signed --- ## Page: TypeScript Configuration URL: https://docs.totem.ing/guides/typescript-configuration # TypeScript Configuration ## The DOM lib requirement Several `@totemsdk` packages use the [Web Crypto API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API) (`globalThis.crypto.subtle`) for Ed25519 key generation and signing. The type names for this API — `CryptoKeyPair`, `AlgorithmIdentifier`, `EcKeyGenParams`, `CryptoKey` — live in TypeScript's built-in `DOM` lib, **even when your project targets Node.js**. Without `"DOM"` in your `lib` array, `tsc` will fail with errors like: ``` error TS2304: Cannot find name 'AlgorithmIdentifier' error TS2304: Cannot find name 'CryptoKeyPair' error TS2304: Cannot find name 'EcKeyGenParams' ``` ## Fix Add `"DOM"` to the `lib` array in your `tsconfig.json`: ```json { "compilerOptions": { "target": "ES2020", "lib": ["ES2020", "DOM"] } } ``` This is safe for Node.js projects — it only adds type definitions, it does not change what gets emitted or what runs at runtime. ## Affected packages | Package | Files that require DOM types | |---------|------------------------------| | `@totemsdk/core` | `verify.ts` | | `@totemsdk/lookup-client` | `auth.ts` | | `@totemsdk/lookup-node` | `lease.ts`, `registry.ts`, `server-auth.ts` | | `@totemsdk/node` | Web Crypto + WebSocket types | | `@totemsdk/omnia-factory` | `factory.ts`, `virtual.ts` | | `@totemsdk/omnia-hyperswarm` | `relay.ts` (`ErrorEvent`) | | `@totemsdk/omnia-router` | `request.ts` | | `@totemsdk/realtime` | WebSocket / event types | Since `@totemsdk/core` is a transitive dependency of almost every other package, the simplest rule is: > **Always include `"DOM"` in `lib` when using any `@totemsdk` package in a TypeScript project.** ## Why not just use `@types/node`? `@types/node` v18+ does include `globalThis.crypto` as a value, but it does not re-export the Web Crypto *type names* (`AlgorithmIdentifier` etc.) into the global scope — those remain in the DOM lib. Adding `"DOM"` is the correct fix. ---