How Operators and Transfer Intents work
masterThe protocol relies on two main abstractions: Operators and Transfer Intents.
Operators: Before use, an operator must register with the contract and specify a fee destination. Operators are responsible for setting up merchants and providing the UI for interaction. Registration is permissionless. Coinbase Commerce uses a specific address maintained by Coinbase as its operator.
Transfer Intents: These are the primitives used to facilitate individual payments. A
TransferIntentis a Solidity struct that must be signed by an operator. This signature ensures the intent cannot be forged or modified and allows operators to enforce policies (legal, internal, etc.) before a payment is allowed.
TransferIntent Fields:
merchant: The merchant's address.currency: The currency the merchant wishes to receive.amount: The amount of that currency requested.deadline: The expiration time for the payment.payer: The payer's address.chain: The chain the payer will pay on.refundAddress: Where any refunds should be directed.operator: The operator facilitating the payment.fee: The fee the operator should receive.id: A unique identifier for the payment.signature: The operator's signature (and optional prefix).