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
| Name | Type | Description |
|---|---|---|
| apiKey | Text | Your API key (vnd_sk_...) |
| credentialHash | Blob (32 bytes) | SHA-256 hash of the credential |
| destroyedAt | Int | Timestamp in nanoseconds |
| metadata | ?Blob | Optional metadata (max 16KB) |
| idempotencyKey | ?Text | Optional 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
| Name | Type | Description |
|---|---|---|
| apiKey | Text | Your 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
| Tier | Max per batch |
|---|---|
| Free | 10 |
| Pro | 100 |
| Scale | 500 |
| Auditor | 100 (verification batches) |
| Enterprise | 2,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 icterminateAgent
Update call · Requires API key
Create a termination receipt for an AI agent lifecycle event.
Parameters
| Name | Type | Description |
|---|---|---|
| apiKey | Text | Your API key |
| agentIdHash | Blob (32 bytes) | SHA-256 hash of the agent identifier |
| terminatedAt | Int | Timestamp in nanoseconds |
| reason | AgentTerminationReason | #taskComplete, #expiration, #resourceLimit, #parentTerminated, #userRequested, #error, #selfTerminated |
| metadata | ?Blob | Optional 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
| Name | Type | Description |
|---|---|---|
| receiptId | Text | The receipt ID to verify |
Returns
Result<VerificationResult, Error>
Rate Limits
| Tier | Monthly Quota | Requests/minute | Overage |
|---|---|---|---|
| Free | 250 | 60 | Blocked until next period |
| Pro ($99/mo) | 3,000 | 600 | Sliding scale (<1¢ each) |
| Scale ($299/mo) | 12,000 | 6,000 | Sliding scale (<1¢ each) |
| Auditor ($1/mo) | 0 (verification only) | 600 | N/A |
| Enterprise | Custom | Custom | Custom |
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
}