Core Protocol Interfaces
IOrchestrator
The main coordinator for the intent lifecycle. Key Methods:signalIntent()- Create a new intent to take liquidityfulfillIntent()- Complete an intent with payment proofcancelIntent()- Cancel a pending intentreleaseFundsToPayer()- Manual release mechanismpruneIntents()- Clean up expired intents (escrow-only)
Intent- Complete intent data structure with owner, amount, payment method, conversion rate, and hook configurationSignalIntentParams- Parameters for creating a new intentFulfillIntentParams- Parameters for fulfilling an intent with proof
IOrchestratorV2
Extended orchestrator with pre-intent hooks, whitelist hooks, and manager fee support. New Features:- Pre-intent hook validation during
signalIntent() - Whitelist hook for access control
- Manager fee snapshots for delegated rate managers
cleanupOrphanedIntents()for anyone to clean up orphaned intents- Separate
preIntentHookDataand persisteddatafields
setDepositPreIntentHook()- Configure pre-intent validation hooksetDepositWhitelistHook()- Configure whitelist access control hookgetDepositPreIntentHook()- Query pre-intent hook for a depositgetDepositWhitelistHook()- Query whitelist hook for a deposit
IEscrow
Manages liquidity deposits and fund locking for intents. Key Methods:lockFunds()- Lock funds for an intent (orchestrator-only)unlockFunds()- Unlock funds when intent is cancelledunlockAndTransferFunds()- Unlock and transfer on fulfillmentextendIntentExpiry()- Extend intent expiration timegetDeposit()- Retrieve deposit informationgetExpiredIntents()- Find expired intents and reclaimable amounts
Deposit- Deposit configuration including token, ranges, state, and guardianDepositPaymentMethodData- Payment method configuration with gating service and verification dataCurrency- Currency code with minimum conversion rateIntent- Intent tracking with hash, amount, timestamp, and expiry
IEscrowV2
Extended escrow with oracle-based rates and delegated rate managers. New Features:- Oracle-based conversion rates with spread configuration
- Delegated rate manager support
- Orchestrator registry for multi-orchestrator deployments
- Batch oracle configuration methods
OracleRateConfig- Oracle adapter, config, spread, and staleness settingsRateManagerConfig- Rate manager address and ID
setOracleRateConfig()- Configure oracle-based rates for a currencysetOracleRateConfigBatch()- Batch configure oracle ratesremoveOracleRateConfig()- Remove oracle rate configurationsetRateManager()- Delegate rate management to external contractclearRateManager()- Clear rate manager delegationgetEffectiveRate()- Get effective rate (oracle or manual)getManagerFee()- Get manager fee for a deposit
Verification Interfaces
IPaymentVerifier
Interface for verifying off-chain payment proofs. Key Methods:verifyPayment()- Verify payment proof and return release amount
VerifyPaymentData- Intent hash, payment proof, and additional dataPaymentVerificationResult- Success flag, intent hash, and release amount
- Zero-knowledge proofs (zkEmail, Groth16)
- TLS-based proofs (TLSNotary, TLSProxy)
- Attestations from trusted witnesses
IAttestationVerifier
Verifies attestations from witnesses or TEE environments. Key Methods:verify()- Verify attestations for a given digest
- Multi-signature attestations
- Threshold signatures
- TEE attestations
Hook Interfaces
IPostIntentHook
Execute custom logic after intent fulfillment. Key Methods:execute()- Post-intent hook execution
_intent- Full intent data structure_amountNetFees- Amount available after fees_fulfillIntentData- Data from fulfillIntent call
- Bridging tokens to another chain
- Swapping tokens
- Staking or yield farming
- Custom distribution logic
IPostIntentHookV2
V2 interface with structured execution context. Key Structs:HookIntentContext- Intent data without referrer/feesHookExecutionContext- Complete execution context with token and executable amount
execute()- Execute hook with structured context
signalHookData) and fulfill-time data (fulfillHookData).
View source
IPreIntentHook
Validate intents before they are signaled (OrchestratorV2 only). Key Methods:validateSignalIntent()- Validate incoming intent, revert to reject
PreIntentContext- Taker, escrow, deposit, amount, payment details, and hook data
- Whitelist/blacklist enforcement
- KYC/compliance checks
- Custom eligibility logic
- Rate validation
Registry Interfaces
IPaymentVerifierRegistry
Manages payment methods and their verifiers. Key Methods:isPaymentMethod()- Check if payment method existsgetPaymentMethods()- List all payment methodsgetVerifier()- Get verifier for a payment methodisCurrency()- Check if currency is supported for a payment methodgetCurrencies()- List currencies for a payment method
IEscrowRegistry
Manages whitelisted escrow contracts. Key Methods:isWhitelistedEscrow()- Check if escrow is whitelistedisAcceptingAllEscrows()- Check if all escrows are acceptedgetWhitelistedEscrows()- List whitelisted escrows
IOrchestratorRegistry
Manages whitelisted orchestrators (EscrowV2 only). Key Methods:addOrchestrator()- Add orchestrator to allowlistremoveOrchestrator()- Remove orchestrator from allowlistisOrchestrator()- Check if address is authorized orchestrator
IPostIntentHookRegistry
Manages whitelisted post-intent hooks. Key Methods:isWhitelistedHook()- Check if hook is whitelistedgetWhitelistedHooks()- List whitelisted hooks
IRelayerRegistry
Manages whitelisted relayers for gasless transactions. Key Methods:isWhitelistedRelayer()- Check if relayer is whitelistedgetWhitelistedRelayers()- List whitelisted relayers
INullifierRegistry
Prevents double-spending of proofs. Key Methods:addNullifier()- Register a nullifierisNullified()- Check if nullifier has been used
Oracle and Rate Interfaces
IOracleAdapter
Generic interface for reading oracle rates. Key Methods:validateConfig()- Validate and normalize adapter configurationgetRate()- Get current market rate in preciseUnits (1e18)
valid- Whether quote is usablerate- Market rate (fiat per deposit token)updatedAt- Oracle timestamp
- Chainlink price feeds
- Pyth Network
- Custom oracle implementations
IRateManager
Interface for delegated rate management. Key Methods:getRate()- Get effective rate for deposit/currency pairgetFee()- Get fee terms for rate managerisRateManager()- Check if manager ID existsonDepositOptIn()- Called when deposit opts into delegation
Utility Interfaces
IProtocolViewer
Read-only interface for aggregated protocol data. Key Methods:getDepositFromIds()- Get detailed deposit views with all payment methods and currenciesgetAccountIntents()- Get all intents for an account with full context
DepositView- Deposit with available liquidity, payment methods, and intentsIntentView- Intent with associated deposit informationPaymentMethodDataView- Payment method with verification data and currencies
IProtocolViewerV2
Extended viewer for V2 contracts with oracle and rate manager support. View sourceExternal Oracle Interfaces
IChainlinkAggregatorV3
Chainlink price feed interface. Key Methods:latestRoundData()- Get latest price datadecimals()- Get price decimals
IPyth
Pyth Network price feed interface. Key Methods:getPrice()- Get current price for price IDupdatePriceFeeds()- Update price feeds with off-chain data
Version Comparison
V1 vs V2 Differences
Orchestrator:- V2 adds pre-intent hooks for validation before signaling
- V2 adds whitelist hooks for access control
- V2 adds manager fee snapshots for rate delegation
- V2 separates ephemeral (
preIntentHookData) from persisted (data) hook data - V2 adds
cleanupOrphanedIntents()for anyone to clean up
- V2 adds oracle-based conversion rates with spread configuration
- V2 adds delegated rate manager support
- V2 adds orchestrator registry for multi-orchestrator deployments
- V2 provides
getEffectiveRate()andgetManagerFee()helpers
- V2 uses structured
HookExecutionContextinstead of rawIntent - V2 separates signal-time and fulfill-time hook data