DeviceVault holds one MON balance per agent id. The active device can pay an allowlisted recipient inside the caps. The owner can always withdraw, including while spending is paused. A plain transfer to the contract reverts, because a transfer does not name an agent.
Address: 0x77102fCAC7927bB64507DF82bf1ae659465B4EE5. How the rules feel from the device is in Device Vault and Funding and gas.
EIP-712 domain: DeviceVault version 1. Three structs share loosenNonce(agentId):
MAX_DEVICE_GAS is 5 ether, in MON. A topUpGas call from the device cannot leave the device address holding more than that.
Functions
deposit(agentId) payableCredits msg.value to that agent. The agent must already be initialized by bindLimits. Emits Deposited.pay(agentId, recipient, amount)The only function that sends MON to a third party. Checks pause, allowlist, per-transaction cap, the rolling daily window, and balance, in that order. Emits Paid.topUpGas(agentId, amount)Sends MON to the active device. Counts against the caps. Skips the allowlist. A device caller also hits GasCap when the device would end above 5 MON. Emits GasToppedUp.withdraw(agentId, amount)Sends MON to the current owner. Ignores caps and pause. Emits Withdrawn.tightenCaps(agentId, perTxCap, dailyCap)Both new caps must be less than or equal to the current ones, and at least one must be strictly lower. Emits CapsTightened.loosenCaps(agentId, perTxCap, dailyCap, deadline, signature)Both new caps must be greater than or equal, and at least one strictly greater. A direct call from the owner ignores the signature. Any other caller must present a valid LoosenCaps signature, which consumes loosenNonce. Emits CapsLoosened.allowRecipient(agentId, recipient, deadline, signature)Adds one recipient. Reverts AlreadyAllowed if it is already on the list. Emits RecipientAllowed.unpause(agentId, deadline, signature)Reverts NotPaused if spending is already open. Emits SpendingUnpaused.bindLimits(agentId, perTxCap, dailyCap)Called by KineticRegistry from claim and link. The first call initializes the account unpaused and emits Initialized. A later call is a rebind: new caps, paused, allowlist cleared, daily window cleared, balance kept. Emits Rebound.Views
The daily window starts at the first spend and lasts one day. It is not a calendar day.
Events
Initialized, Rebound, Deposited, Paid, GasToppedUp, Withdrawn, CapsTightened, CapsLoosened, RecipientAllowed, RecipientDisallowed, SpendingPaused, SpendingUnpaused.