Tool Execution
When the chat agent decides to call a HYRE endpoint, it triggers a relay pattern that deducts the fee from the user’s escrow balance and forwards the request to the API.Execution Flow
Payment Signing (EVM Chains)
On Base and SKALE, the backend uses EIP-3009 TransferWithAuthorization to sign USDC transfers from the custodial wallet:- The backend decrypts the user’s wallet private key.
- It constructs a
TransferWithAuthorizationpayload with:from: user’s custodial walletto: HYRE recipient addressvalue: endpoint price in atomic USDCvalidAfter: current timestampvalidBefore: current timestamp + 300 seconds
- Signs the EIP-712 typed data with the decrypted key.
- The fee payer submits the signed authorization on-chain.
- A real transaction hash is returned and verifiable on the block explorer.
On Solana, the escrow uses an internal balance ledger with periodic on-chain settlement rather than per-query transactions. This reduces gas overhead.
Internal Auth Bypass
The/playground/call endpoint bypasses the x402 payment middleware using a shared secret (MPP_SECRET_KEY):
Error Handling
Transaction Verification
Every paid query returns metadata that can be verified:On SKALE, transaction hashes can be verified on the SKALE Europa explorer.