R

Rubric Protocol · Evidence Retain

by Rubric Protocol

POSTBase

$0.05

per call · USD Coin on Base

Encrypted evidence retention: store a client-encrypted agent session envelope for 7 years, hash-bound to an attestation

Endpoint

POST https://rubric-protocol.com/v1/x402/evidence-retain

2

Calls / 30d

1

Unique payers / 30d

Aug 30

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://rubric-protocol.com/v1/x402/evidence-retain", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "attestationId": "2791af2e-1c95-4a2d-bb49-985f6486f5ab",
    "cipherHash": "sha3-256:4cca…",
    "envelope": {
      "ct": "base64(ciphertext)",
      "eph": "base64(32B)",
      "iv": "base64(12B)",
      "tag": "base64(16B)",
      "v": 1
    },
    "eventsHash": "sha3-256:9c1f…",
    "opening": {
      "data": {
        "eventsHash": "sha3-256:9c1f…",
        "session": "agent-session-0f2a91c4",
        "spec": "rubric-harness-attest/0.1"
      },
      "salt": "64 hex - SHA-256(payloadKey + ':rubric-commit-v1')"
    },
    "sessionId": "agent-session-0f2a91c4"
  }),
});
const data = await res.json();
cURL
curl -X POST \
  "https://rubric-protocol.com/v1/x402/evidence-retain" \
  -H "Content-Type: application/json" \
  -d '{"attestationId":"2791af2e-1c95-4a2d-bb49-985f6486f5ab","cipherHash":"sha3-256:4cca…","envelope":{"ct":"base64(ciphertext)","eph":"base64(32B)","iv":"base64(12B)","tag":"base64(16B)","v":1},"eventsHash":"sha3-256:9c1f…","opening":{"data":{"eventsHash":"sha3-256:9c1f…","session":"agent-session-0f2a91c4","spec":"rubric-harness-attest/0.1"},"salt":"64 hex - SHA-256(payloadKey + ':rubric-commit-v1')"},"sessionId":"agent-session-0f2a91c4"}' \
  -H "X-PAYMENT: <signed x402 payment>"

Payment details

Pay to0xab6731a0bcdf511c2842c768a03448075ab654ca
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase
Schemesexact

Is this your API?

Pin it to the top of Other and the homepage with a featured placement.

Get featured →

More from Rubric Protocol & similar services