Exporting & Verifying Bundles
End-to-End Audit Sequence
Section titled “End-to-End Audit Sequence”End-to-End Audit & Verification Sequence
Sequence- 2.Decision + request_idSigned & appended to DPL
- 3.POST
/api/v1/provenance/export· request_id - 4.dpl-bundle/1Ed25519 signed · SHA-256 state hash
- 5.Share selective-disclosure dpl-bundle/1
- 7.POST
/api/v1/provenance/verify· or offline verify - 8.21 Invariants VerifiedSignature, manifest digest, chain linkage & calibration
- 1.Your ServiceBipkit APIPOST
/api/v1/evaluateEvaluate state - 2.Bipkit APIYour ServiceDecision + request_idSigned & appended to DPL
- 3.Your ServiceBipkit APIPOST
/api/v1/provenance/exportrequest_id - 4.Bipkit APIYour Servicedpl-bundle/1Ed25519 signed · SHA-256 state hash
- 5.Your ServiceExternal AuditorShare selective-disclosure dpl-bundle/1
- 6.External AuditorBipkit APIGET
/api/v1/provenance/keys & /manifestFetch public keys - 7.External AuditorBipkit APIPOST
/api/v1/provenance/verifyor offline verify - 8.Bipkit APIExternal Auditor21 Invariants VerifiedSignature, manifest digest, chain linkage & calibration
Export & Verify with Official SDKs or cURL
Section titled “Export & Verify with Official SDKs or cURL”POST
/api/v1/provenance/exportPOST
/api/v1/provenance/verifyExport a self-contained dpl-bundle/1 JSON artifact for a given request_id and optional output_name, then submit it to /api/v1/provenance/verify to validate its Ed25519 signature, manifest digest, chain linkage, and calibration invariants. Supply presented_state only if you want on-demand SHA-256 state commitment proof included in the verification (it is never persisted).
import { Bipkit, type DplBundle } from "@bipware-org/bipkit";
const bipkit = new Bipkit();
const bundle = (await bipkit.provenance.export({ request_id: "eval_01K8FA1234567890ABCDEFGH", output_name: "is_destructive",})) as unknown as DplBundle;
const verification = await bipkit.provenance.verify(bundle);console.log("Verified:", verification);from bipkit import Bipkit
client = Bipkit()
bundle = client.provenance.export( request_id="eval_01K8FA1234567890ABCDEFGH", output_name="is_destructive",)
verification = client.provenance.verify(bundle)print("Verified:", verification)outputName := "is_destructive"rawBundle, err := client.Provenance.Export(ctx, bipkit.ExportBundleRequest{ RequestID: "eval_01K8FA1234567890ABCDEFGH", OutputName: &outputName,})if err != nil { log.Fatal(err)}
// Re-hydrate or decode into bipkit.DplBundle and verify:verification, err := client.Provenance.Verify(ctx, bundle)use bipkit::{DplBundle, ExportBundleRequest};
let raw = client .provenance_export(&ExportBundleRequest { request_id: "eval_01K8FA1234567890ABCDEFGH".into(), output_name: Some("is_destructive".into()), presented_state: None, }) .await?;
let bundle: DplBundle = serde_json::from_value(raw)?;let verification = client.provenance_verify(&bundle).await?;println!("Verified: {verification}");# 1. Export a Provenance Bundlecurl -X POST https://api.bipkit.io/api/v1/provenance/export \ -H "Authorization: Bearer bpk_live_YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "request_id": "eval_01K8FA1234567890ABCDEFGH", "output_name": "is_destructive" }' > bundle.json
# 2. Verify the Provenance Bundlecurl -X POST https://api.bipkit.io/api/v1/provenance/verify \ -H "Authorization: Bearer bpk_live_YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d @bundle.json