SIGIL · INTEGRATION DOCS← Back to site
[ DOCS · v1 · 2026 ]

Integrate SIGIL
in your app.

Sigil is a desktop wallet. Your frontend asks it to sign things over a sigil:// URI. Sigil pops up, the user reviews and approves, then Sigil POSTs the signed result to a callback URL you control. That's the whole interface.

The quickest path is the official @sigil-oss/connect SDK — it builds envelopes, signs them, and parses callbacks. Or build the URI yourself; the protocol fits in a single fetch call.

[ SOURCE OF TRUTH ]

Everything below is derived from the Rust validator at src-tauri/src/deep_link.rs and the Zod schema at src/lib/request-schema.ts. If these docs and the code disagree, the code wins.

The protocol

Sigil registers the sigil:// scheme with the OS. Opening a sigil://v1/request URL brings Sigil to the foreground — or launches it — with your request queued.

URI SHAPE
sigil://v1/request?d=<base64url-encoded JSON envelope>
                   [&cb=<optional HTTPS callback URL>]
  • Scheme must be sigil; host must be v1; path must be /request
  • d = base64url (no padding) of a JSON envelope: { request, callback?, proof? }
  • Server delivery: set callback — Sigil POSTs the result as JSON from the Rust layer
  • Client delivery: set redirect_uri — Sigil opens redirect_uri?result=<base64url JSON> in the browser; no server needed
  • Both can be set — Sigil POSTs then redirects; either alone also works
  • Envelope max size: 8 192 bytes base64

Envelope shape

TYPESCRIPT
interface SigilEnvelope {
  request: SigilRequest;    // discriminated union on "type"
  callback?: string | null; // server POST — Sigil POSTs result to this URL
  redirect_uri?: string | null; // client redirect — Sigil opens browser to this URL
  proof?: {
    version: 1;
    algorithm: "ES256";
    issuer: string;
    key_id?: string;
    payload_hash: string;
    signature: string;
    public_jwk?: JsonWebKey;
  };
}

End-to-end flow

  1. Build the envelope: { request: { type, nonce, dapp, …fields }, callback? }
  2. Base64url-encode (no padding), put it in ?d=.
  3. Open the URI window.location.href = uri in browsers; open / xdg-open / start from native apps.
  4. Sigil validates in Rust, queues the request, and shows it to the user.
  5. User approves or rejects. Sigil delivers the result — POSTs to callback if set, and/or opens redirect_uri?result=… in the browser if set.
[ LOCKED WALLET ]

If the wallet is locked when a request arrives, Sigil holds it in the queue. After the user unlocks, Sigil routes directly to the request review screen — the request is not lost.