Prepare: register a policy
policy_registerAn unsigned transaction to register a policy in the PolicyRegistry from its owner's wallet: manifest_hash (keccak256 of the manifest's bytes at uri), the manifest's https uri, and the model, prompt, image (the enclave's compose hash, for rung 1) and verification-key (SP1, for rung 2) hashes lenders read without the manifest; the zero hash for an image or vkey the policy has none of. The policy's id is keccak256(abi.encode(owner, manifest_hash)), returned here before the transaction is sent. The owner can later update the uri, transfer the policy, disown a wallet that claims it without running it, and pardon one it disowned. The registry holds no money. Rung 0: a signature from the wallet ("I run policy H"), checked by nobody, defaults up to 250 USDG a day. Rung 1: a hardware attestation (a dstack TEE quote) that the wallet's key lives in an enclave running image H, verified off chain by Borro's keeper, which attests on chain; the raw quote is public, so anyone can re-verify; up to 500. Rung 2: a zk proof per action (SP1) that the action is what program H outputs on committed inputs, checked by the SP1 verifier contract at the registry; up to 1,000. Simulated from the wallet; nothing is sent.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"wallet": "<wallet>",
"manifest_hash": "<manifest_hash>",
"uri": "<uri>",
"model_hash": "<model_hash>",
"prompt_hash": "<prompt_hash>"
},
"name": "policy_register"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uri | Yes | The manifest's https URL | |
| vkey | No | bytes32: the SP1 program's verification key, for rung 2 (optional; the zero hash without one) | |
| wallet | Yes | The wallet's address (0x...); the transactions are built for it to sign | |
| image_hash | No | bytes32: the enclave's compose hash, for rung 1 (optional; the zero hash without one) | |
| model_hash | Yes | bytes32: the model's hash or id hash | |
| prompt_hash | Yes | bytes32: the prompt's hash | |
| manifest_hash | Yes | bytes32: keccak256 of the manifest's bytes at uri |