Sigil documentation

Use the right client for the job.

Start with JSON-RPC for reads. Use the Rust SDK for typed configuration, transaction construction, identity resolution, and dedicated protocol helpers.

Rust client configuration

The sigil-sdk crate is part of the Sigil source workspace. Its core API is transport-agnostic: configuration and transaction helpers do not automatically create an HTTP client. Set the chain ID explicitly, especially when targeting the Velocity testnet.

use sigil_sdk::SigilClientConfig;

let config = SigilClientConfig {
    rpc_url: "https://rpc.sigil.ml/rpc".to_owned(),
    chain_id: "sigil-mainnet-1".to_owned(),
    timeout_secs: 15,
    auth_token: None,
};

Choose the relevant module

Enable only the features needed by your integration. Match your application to the version and feature flags in your source checkout.

ItemDetails
CoreSigilClientConfig, TransactionBuilder, signing helpers, and document resolver.
Names and mailName normalization and hashing, mailbox records, public mail keys, and delivery commitments.
Assets and storageNFT helpers and storage pin request, receipt, and challenge helpers.
evidence / evidence-httpArtifact digests, anchor transactions, confirmation policy, and optional HTTP transport.
gal / gal-httpGAL adapters, sign-in transcripts, verification, and optional HTTP anchor client.

Connect from another language

Any language with HTTP and JSON support can issue the read-only requests documented here. Use the Forge overview for the broader agent SDK model; this reference does not assume a package is published for every language.

const endpoint = 'https://rpc.sigil.ml/rpc';
const expectedChainId = 'sigil-mainnet-1';

async function readRpc(method, params = {}) {
  const response = await fetch(endpoint, {
    method: 'POST',
    headers: { 'content-type': 'application/json' },
    body: JSON.stringify({ jsonrpc: '2.0', id: 1, method, params }),
    signal: AbortSignal.timeout(15000),
  });
  if (!response.ok) throw new Error('HTTP ' + response.status);
  const envelope = await response.json();
  if (envelope.error) {
    throw new Error(envelope.error.code + ': ' + envelope.error.message);
  }
  if (!Object.hasOwn(envelope, 'result')) throw new Error('Missing RPC result');
  return envelope.result;
}

const node = await readRpc('sigil_getNodeInfo');
if (node.chain_id !== expectedChainId) throw new Error('Wrong network');
const activation = await readRpc('sigil_getNetworkActivationStatus');
console.log({ node, activation });

On this page