Build SAP Escrow V2 Create Transaction
sap_escrow_build_create_transactionBuild an unsigned escrow transaction for preview, then finalize locally by signing with your wallet. Keypair never leaves your machine.
Instructions
Hosted-safe unsigned builder for create_escrow_v2. Use this from hosted SAP MCP, preview the result, then call local sap_payments_finalize_transaction with submit:true. The depositorWallet signs locally; keypair bytes never leave the user machine. Defaults to DisputeWindow settlementSecurity=2 and rejects SelfReport/0. SAP MCP context: Hosted-safe unsigned Escrow V2 builder. The output is not submitted and is not signed by hosted SAP MCP. Preview it, then call local sap_payments_finalize_transaction with submit:true and confirm:true. Never create temporary signing scripts or read keypair JSON.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nonce | No | Optional escrow nonce as a decimal string. Defaults to 0. | |
| arbiter | No | Optional arbiter public key kept for IDL compatibility and dispute workflows. | |
| coSigner | No | Required co-signer wallet public key when settlementSecurity=1 (CoSigned). | |
| maxCalls | No | Maximum number of calls covered by the escrow as a decimal string. Use 0 for unlimited when supported by policy. | |
| expiresAt | No | Optional expiry timestamp in unix seconds as a decimal string. Defaults to 0 (no expiry). | |
| tokenMint | No | Optional SPL payment token mint. Omit/null for native SOL. Use EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v for mainnet USDC x402 escrows. | |
| agentWallet | No | Agent owner wallet public key (base58). The V2 escrow PDA is derived from this wallet plus nonce. | |
| pricePerCall | No | Price per served call as a decimal string. Amount in the escrow token smallest unit: lamports for SOL, micro-USDC for USDC, or base units for the configured SPL token. | |
| tokenDecimals | No | Payment token decimals. Defaults to 6 when tokenMint is set, otherwise 9 for native SOL. | |
| initialDeposit | No | Initial escrow deposit as a decimal string. Amount in the escrow token smallest unit: lamports for SOL, micro-USDC for USDC, or base units for the configured SPL token. | |
| depositorWallet | No | Depositor wallet public key (base58). This wallet signs locally and funds the escrow; hosted SAP MCP never receives its private key. | |
| disputeWindowSlots | No | Required positive dispute window in slots for settlementSecurity=2. Defaults to 2160 (~15 minutes). | |
| settlementSecurity | No | V2 settlement security mode. 1=CoSigned (requires coSigner). 2=DisputeWindow (recommended default; requires disputeWindowSlots > 0). SelfReport/0 is deprecated and rejected on-chain. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | MCP content blocks returned to the caller. | |
| isError | No | True when the tool result represents an application-level error. |