SDK example
Create escrow agreements and subscribe to settlement events.
import { VeriFlowClient } from "@veriflow/sdk";
const veriflow = new VeriFlowClient({
apiKey: process.env.VERIFLOW_API_KEY,
network: "ritual"
});
const escrow = await veriflow.escrows.create({
recipientWallet: "0x67a6...19Af",
amount: "86000",
currency: "RITUAL",
protocol: {
submissionType: "GITHUB_PR",
verificationEngine: "API_PROOF",
settlementRule: "AUTOMATIC_RELEASE",
requirements: {
repository: "org/repo",
branch: "main",
requireMerge: true,
requireCiPass: true,
minimumCommits: 3,
deadline: "2026-07-01T18:00:00.000Z"
},
requirementHash: "0x..."
}
});Contract-bound verification workflow
Wallet-signed actions and live Ritual callbacks drive escrow state changes.
1
Select protocol
2
Submit evidence
3
Engine verifies
4
Settlement releases
Webhook payload
Events are signed with `x-veriflow-signature` using HMAC-SHA256.
{
"type": "attestation.settled",
"escrowId": "escrow_africa_freelance_001",
"milestoneId": "ms_002_report",
"ritualJobId": "0x8e47...01aa",
"confidence": 0.91,
"settlementTx": "0x..."
}API routes
GET
/v1/protocol/config
POST
/v1/escrows
GET
/v1/escrows/:id
POST
/v1/escrows/:id/evidence
POST
/v1/escrows/:id/approvals
GET
/v1/escrows/:id/reviews
POST
/v1/attestations/callback
GET
/v1/reputation/:wallet
POST
/v1/escrows/:id/releases
Ritual primitives
VeriFlowEscrow
Escrow event reconciliation
AsyncJobTracker
Lifecycle indexing
TEEServiceRegistry
Executor discovery
AttestationVerifier
Signature validation