Prepare: change an agent credit line's limits
credit_guardrailsOne unsigned configure() transaction for the line's owner, starting from the line's current settings: agent (or revoke_agent: true, a JSON boolean, at once; never the owner's own wallet), keeper ("borro", "none" or an address), ceiling (USDG), daily_limit (USDG, or "none"), target_ltv and trigger_ltv (at most the line's max trigger, 30% for CREDIT; a new target over the line's trigger moves the trigger by the market's rule), sell_bps (0 in a market with no pool), slip_bps, allow (add addresses), deny (take them off), gas_station (true adds the agent's gas station, false takes it off), bills (true: bill pay, the agent's own wallet on the allowlist so it can borrow what it is short of an x402 bill, credit_bill; false takes it off; such a line needs a daily limit, $100 unless given). When the agent changes, the old agent's gas station and own wallet come off the allowlist in the same transaction and the new agent's go on in their place. A line with a gas station on its allowlist keeps a daily limit of at most $5,000 ($100 unless given). Checked as the line checks it; shows before and after. Ownership: transfer_to (the owner offers the line), or accept: true (the wallet it was offered to takes it with acceptOwnership, then names Borro's keeper again with setKeeper: two transactions sent one after the other; accepting clears the keeper, so until the second is sent the line has no keeper and no auto-repay; keeper: "none" leaves it off). Check each transaction's to: a line the factory confirms (isAccount).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deny | No | Addresses to take off it | |
| agent | No | A new agent address | |
| allow | No | Addresses to add to the allowlist | |
| bills | No | true: bill pay, the agent's own wallet on the allowlist (credit_bill); false: take it off | |
| accept | No | The wallet the line is offered to: accept it, then name Borro's keeper again | |
| keeper | No | "borro", "none" or an address | |
| wallet | Yes | The wallet's address (0x...); the transactions are built for it to sign | |
| account | Yes | The line's address | |
| ceiling | No | The most USDG the line may owe, in whole units as a decimal string, like "1.5" | |
| sell_bps | No | 0 to 2500 (0 in a market with no pool) | |
| slip_bps | No | 0 to 1000 | |
| target_ltv | No | Target LTV, a fraction under 1 like 0.18 or a percent with its sign like "18%" | |
| daily_limit | No | The most USDG out in any 24 hours, like "100", or "none" | |
| gas_station | No | true: put the agent's gas station on the allowlist; false: take it off | |
| transfer_to | No | The owner: offer the line to this address (it becomes theirs when they accept) | |
| trigger_ltv | No | Protect trigger LTV, at or above the target, like 0.27 or "27%" | |
| revoke_agent | No | Revoke the agent at once |