> ## Documentation Index
> Fetch the complete documentation index at: https://docs.proofable.me/llms.txt
> Use this file to discover all available pages before exploring further.

# Portable proofs

> Move a verified result between apps without repeating the check, using the open CAIP-380 envelope.

CAIP-380 is an open [ChainAgnostic](https://standards.chainagnostic.org/CAIPs/caip-380) standard at **Draft** status, with the move to Review [open with the editors](https://github.com/ChainAgnostic/CAIPs/pull/412), and Proofable is the reference implementation. Proofable emits the envelope in two forms, as a signed request from a wallet or as a Proofable-signed statement about its own result.

The CAIP-380 specification text in this document is released under [CC0 1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/). Reference implementation code, schemas, and fixtures elsewhere in this repository are Apache-2.0.

## Scope of the proposal

One wallet-signed envelope with a stable **qHash** that apps validate off-chain.

* Networks use CAIP-2 (`eip155:1`, `solana:mainnet`, `near:mainnet`, ...)
* Account ids use CAIP-10 (`eip155:1:0x...`, `solana:mainnet:...`, `near:mainnet:alice.near`) where an `*AccountId` field is emitted
* Stable profile and proof URLs use W3C `did:pkh` (`did:pkh:eip155:1:0x...`)

## Identity and chain glossary

| Term | Shape | Proofable usage |
| - | - | - |
| CAIP-2 | `namespace:reference` | Network context. Use `chain` for any non-EVM signing and account identity, for example `solana:mainnet` or `near:mainnet`. |
| CAIP-10 | `namespace:reference:account` | Account id fields such as `agentAccountId` and `controllerAccountId`. |
| `did:pkh` | `did:pkh:namespace:reference:account` | Stable DID for profiles, proof subjects, and `/u/[did]` URLs. It is derived from the same chain and account context, but is not a bare CAIP-10 string. |
| `chainId` | number | EVM-only compatibility field for the **account / signing** network (Proofable defaults to Base mainnet, `8453`). For NFT, token, or contract checks, set that asset's `chainId` inside `data`. |

Rule of thumb: EVM browser flows can rely on hosted verify or pass an explicit EVM provider. Any non-EVM flow passes the wallet or provider explicitly and includes `chain` as a CAIP-2 value. The envelope is chain-agnostic by design. Any namespace that publishes a CAIP-2 reference and a signing profile can participate.

## Proofable anchor

**`qHash`** (0x…) is SHAKE-256 (256-bit) of the canonical subset `did`, `verifierIds`, `data`, `signedTimestamp`, and exactly one of `chainId` or `chain`. Every field inside `data`, including a nonce or timestamp, remains bound to the hash. [Proofs](https://docs.proofable.me/proofs.md)

## Canonical JSON

Canonical JSON normalizes strings and keys to NFC, sorts object keys by Unicode code point, preserves array order and `null`, and rejects `undefined`, sparse arrays, non-finite numbers, functions, symbols, and bigint values.

## Signer string

Six-line UTF-8, LF. The wallet signs these exact bytes. `POST /api/v1/verification/standardize` returns the `signerString` for raw HTTP. The SDK `verify()` builds the same message client-side, and `standardizeVerificationRequest` fetches it from the API.

```text theme={"system"}
Portable Proof Verification Request
Wallet: <address>
Chain: <chainId or CAIP-2 chain>
Verifiers: <comma-separated-ids>
Data: <json payload>
Timestamp: <unix-ms>
```

[Signing format](https://docs.proofable.me/verification/signing-format.md) has the full rules.

## What the envelope proves

The signature and `qHash` prove the integrity of the envelope and identify who signed it. A user wallet signs its own verification request; Proofable signs a statement it produced itself, such as an authority decision or job outcome. The proof owner and the envelope signer can be different accounts, and neither signature proves an effect outside the statement the signer actually made.

To confirm Proofable issued a record and that it is still current, read it by exact `qHash` with `GET /api/v1/proofs/{qHash}`, within the visibility its owner set. This works for every proof, with or without an envelope.

## Offline verification

Proofable stores the envelope with its proof record. The owner can retrieve it by exact `qHash`; anonymous exact-`qHash` reads include it only when the proof is public and the owner enables portable-proof disclosure. Disclosure can change without changing `qHash` or the signature.

```javascript theme={"system"}
import { verifyPortableProofEnvelope } from '@proofable/sdk';
import envelope from '../../../examples/caip-380/minimal-evm.json' with { type: 'json' };

const result = await verifyPortableProofEnvelope(envelope);
if (!result.valid) throw new Error(result.errors.join('; '));
```

The helper recomputes `qHash`, checks the DID and chain binding, reconstructs the six-line message, and verifies the signature locally. Each chain uses its native signing scheme. EIP-1271 smart accounts require chain state; pass an ethers provider as `options.provider`.

Use the [small EVM fixture](https://github.com/proofable/sdk/blob/main/examples/caip-380/minimal-evm.json) for adapter tests. Its timestamp is historical, so `fresh` can be false while its hash and signature remain valid.

## Signing profiles

The envelope is chain-agnostic. Any chain with a CAIP-2 namespace and a signing scheme can produce a valid envelope. Proofable ships the profiles below and adds more as ecosystems publish signing specs.

| Chain family | CAIP-2 example | Signature | Status | Offline fixture |
| - | - | - | - | - |
| EVM | `eip155:1` | EIP-191 / EIP-1271 / EIP-6492 | Live | [minimal-evm.json](https://github.com/proofable/sdk/blob/main/examples/caip-380/minimal-evm.json) |
| Solana | `solana:mainnet` | Ed25519 | Live fixture | [minimal-solana.json](https://github.com/proofable/sdk/blob/main/examples/caip-380/minimal-solana.json) |
| NEAR | `near:mainnet` | NEAR `near_sign` (Ed25519) | Profile defined by CAIP-2 namespace | Pending |
| Other | Any CAIP-2 | Profile-specific | Add a profile when the ecosystem publishes a signing spec | Pending |

To add a profile, extend the SDK verifier with the chain's signature scheme and ship an offline fixture. The `qHash` canonicalization, six-line signer string, and CAIP-2 / CAIP-10 / `did:pkh` binding stay the same across every profile.

## Freshness

Proofable rejects a new request if `signedTimestamp` is older than 5 minutes or more than 60 seconds in the future. Historical offline verification reports freshness separately from cryptographic validity.

## Spec and lifecycle

[CAIP-380 (ChainAgnostic)](https://standards.chainagnostic.org/CAIPs/caip-380) follows the [CAIP-1](https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-1.md) lifecycle: `Draft → Review → Last Call → Final`. Review takes approval from two editors; Final also needs a second independent implementation of the cryptographic profile. [Standards and interoperability](https://docs.proofable.me/learn/standards.md) shows how the format works with other protocols, and the [whitepaper](https://docs.proofable.me/whitepaper.md#6-standards-and-interoperability) covers the architecture.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.