API Reference

Canister ID: lyksb-qiaaa-aaaae-aec2a-cai

certify

Update call · Requires API key

Create a blockchain-anchored deletion receipt for a credential hash.

Parameters

NameTypeDescription
apiKeyTextYour API key (vnd_sk_...)
credentialHashBlob (32 bytes)SHA-256 hash of the credential
destroyedAtIntTimestamp in nanoseconds
metadata?BlobOptional metadata (max 16KB)
idempotencyKey?TextOptional key to prevent duplicates

Returns

Result<Receipt, Error>

On success, returns the full Receipt object with ID, Merkle proof, and anchor info.

certifyBatch

Update call · Requires API key

Create multiple deletion receipts in a single API call. Tier-based batch size limits apply. Each receipt is billed individually. Rate limit counts as 1 call (not per receipt).

Parameters

NameTypeDescription
apiKeyTextYour API key (vnd_sk_...)
requests[CertifyRequest]Array of certify requests (max: Free=10, Pro=100, Scale=500, Enterprise=2000)

Returns

Result<[CertifyResponse], Error>

On success, returns an array of CertifyResponse objects, one per receipt created.

Batch Size Limits

TierMax per batch
Free10
Pro100
Scale500
Auditor100 (verification batches)
Enterprise2,000

Billing

Each receipt in the batch counts individually toward your quota. A batch of 100 receipts = 100 receipts billed. The API call itself counts as 1 toward your rate limit.

Example

// TypeScript SDK
const results = await canister.certifyBatch(apiKey, [
  {
    credentialHash: hash1,
    destroyedAt: BigInt(Date.now()) * 1_000_000n,
    metadata: [],
    idempotencyKey: ["batch-001-item-1"],
  },
  {
    credentialHash: hash2,
    destroyedAt: BigInt(Date.now()) * 1_000_000n,
    metadata: [],
    idempotencyKey: ["batch-001-item-2"],
  },
]);

// results: Array of { receiptId, status, ... }
console.log(`Created ${results.length} receipts`);

// dfx equivalent:
// dfx canister call <canister-id> certifyBatch '(
//   "vnd_sk_live_...",
//   vec {
//     record { credentialHash = blob "\ab\cd..."; destroyedAt = 1707350400000000000 : int; metadata = null; idempotencyKey = opt "key-1" };
//     record { credentialHash = blob "\ef\01..."; destroyedAt = 1707350400000000000 : int; metadata = null; idempotencyKey = opt "key-2" };
//   }
// )' --network ic

terminateAgent

Update call · Requires API key

Create a termination receipt for an AI agent lifecycle event.

Parameters

NameTypeDescription
apiKeyTextYour API key
agentIdHashBlob (32 bytes)SHA-256 hash of the agent identifier
terminatedAtIntTimestamp in nanoseconds
reasonAgentTerminationReason#taskComplete, #expiration, #resourceLimit, #parentTerminated, #userRequested, #error, #selfTerminated
metadata?BlobOptional metadata (max 16KB)

Returns

Result<Receipt, Error>

verify

Query call · No authentication required

Verify a deletion receipt by ID. Returns the full receipt and validation status.

Parameters

NameTypeDescription
receiptIdTextThe receipt ID to verify

Returns

Result<VerificationResult, Error>

Rate Limits

TierMonthly QuotaRequests/minuteOverage
Free25060Blocked until next period
Pro ($99/mo)3,000600Sliding scale (<1¢ each)
Scale ($299/mo)12,0006,000Sliding scale (<1¢ each)
Auditor ($1/mo)0 (verification only)600N/A
EnterpriseCustomCustomCustom

Verification queries are free and not counted against your quota.

Receipt Object

{
  id: Text,              // Unique receipt ID
  credentialHash: Blob,  // SHA-256 hash (32 bytes)
  destroyedAt: Int,      // Timestamp (nanoseconds)
  createdAt: Int,        // When receipt was created
  apiKeyId: Text,        // ID of the API key used
  batchId: ?Text,        // Merkle batch ID (when anchored)
  merkleProof: ?[Blob],  // Proof path (when anchored)
  merkleRoot: ?Blob,     // Batch root (when anchored)
  metadata: ?Blob        // Your optional metadata
}