POST · /v1/anchor

Optionally anchor a receipt.

Standard HAHS receipts are signed off-chain and verify offline. This page specifies an optional Base inclusion-proof profile that must be separately selected and configured; it is not the default receipt path. USDC payment on Base is separate from evidence anchoring.

How it works

Proposed optional flow:

  1. Your SDK computes the canonical SHA-256 of the receipt body (RFC 8785 JCS).
  2. You POST the hash with your API key. The endpoint queues the hash for the next anchor batch and returns a placeholder anchor URN immediately.
  3. If the anchor profile is selected and deployed, a scheduled batch posts its Merkle root to the specified Base destination and resolves the placeholder URN to an inclusion proof.

The receipt body never leaves your machine. Only the canonical SHA-256 is sent. The hash is one-way: we cannot read or reconstruct the receipt.

Endpoint

Request

POST https://api.thehiveryiq.com/v1/anchor
Authorization: Bearer hk_pro_xxxxxxxxxxxxxxxxxxxx
Content-Type: application/json

{
  "canonical_sha256": "<base64url SHA-256 of the JCS body>"
}

Response (immediate)

{
  "hahs_anchor": "urn:hahs:anchor:pending:2026-05-25T17:00Z:7f2e1a93",
  "batch_id": "2026-05-25T17:00Z",
  "eta_seconds": 3600
}

Illustrative response after a separately specified batch posts

{
  "hahs_anchor": "urn:hahs:anchor:base:18472193:0xabcd1234...:7f2e1a93",
  "network": "base",
  "block_height": 18472193,
  "tx_hash": "0xabcd1234ef567890...",
  "merkle_root": "sha256:9a67...4d21",
  "merkle_path": ["sha256:...", "sha256:..."],
  "verified_at": "2026-05-25T17:01:14Z"
}

SDK usage

The Python and TypeScript SDKs handle the call for you. Pass api_key + anchor=True on a Pro key, or anchor every receipt by default on Scale and Enterprise.

# Python: hive-protocol v0.2.0
from hive import hahs
receipt = hahs.issue(
    symbol="USDC", units=10, amount_usd=145,
    recipient="0xabc...", issuer_sk=sk,
    api_key="hk_pro_xxxxxxxx",
    anchor=True,
)
# receipt["hahs_anchor"] populated. receipt["tier"] == "pro".
// TypeScript: @hive-protocol/sdk v0.2.0
import { hahs } from "@hive-protocol/sdk";
const r = await hahs.issue({
  symbol: "USDC", units: 10, amountUsd: 145,
  recipient: "0xabc...", issuerSk: sk,
  apiKey: "hk_pro_xxxxxxxx",
  anchor: true,
});

Pricing

TierAPI key prefixReceiptsAnchoredVerifier
Freenone100/dayNoneLocal only
Prohk_pro_*50k/moOn demandPriority hosted
Scalehk_scale_*UnlimitedEvery receiptDedicated SLA
Enterprisehk_ent_*UnlimitedEvery receiptOn-prem image

Get an API key

Pay with USDC on Base. Reference your X handle or domain in the transaction memo. API key delivered within one business day to the email or DID listed in the memo.

Hive Treasury · USDC on Base
0x15184Bf50B3d3F52b60434f8942b7D52F2eB436E
Pro · $99 USDC / month
Scale · $499 USDC / month
Enterprise · $5,000+ USDC / year (contact)

In the memo, include: tier=pro|scale, contact=<email or domain>, optional issuer_did=<your did>. Annual prepay: 10× the monthly rate, 2 months free.

What you get with the key

Verifier obligations

Counterparties verifying an anchored receipt are expected to:

The local SDK hive.hahs.verify() does steps 1 and the canonical re-hash. Steps 2 and 3 are the network calls Pro/Scale/Enterprise subscribers pay for.

SLA