@pushchain/core 6.0.27-alpha.1 → 6.0.27-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGW.md +114 -6
- package/CHANGELOG.md +12 -0
- package/package.json +1 -1
- package/src/lib/agentic/contracts/prc20-metadata.d.ts +1 -1
- package/src/lib/agentic/contracts/prc20-metadata.js +11 -5
- package/src/lib/agentic/index.d.ts +1 -1
- package/src/lib/agentic/presets/aave-reserves.d.ts +4 -0
- package/src/lib/agentic/presets/aave-reserves.js +147 -0
- package/src/lib/agentic/presets/catalog.d.ts +25 -1
- package/src/lib/agentic/presets/catalog.js +70 -17
- package/src/lib/agentic/presets/default-policy.d.ts +9 -0
- package/src/lib/agentic/presets/default-policy.js +85 -0
- package/src/lib/agentic/presets/default-tokens.d.ts +4 -0
- package/src/lib/agentic/presets/default-tokens.js +39 -0
- package/src/lib/agentic/presets/index.js +130 -15
- package/src/lib/agentic/presets/operation-limits.d.ts +13 -0
- package/src/lib/agentic/presets/operation-limits.js +111 -0
- package/src/lib/agentic/presets/routes.d.ts +9 -0
- package/src/lib/agentic/presets/routes.js +51 -0
- package/src/lib/agentic/presets/types.d.ts +65 -13
- package/src/lib/index.d.ts +1 -1
- package/src/lib/universal/prc20-address.js +18 -4
package/AGW.md
CHANGED
|
@@ -91,7 +91,7 @@ An equality pin fixes an argument; a maximum pin bounds it. For EVM signatures,
|
|
|
91
91
|
|
|
92
92
|
`PushChain.CONSTANTS.AGENTIC.WALLET` resolves to the AGW on Push, its CEA on an EVM destination, or its CEA/selected token ATA on Solana. Deployment addresses and encoding helpers are internal.
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
For directly authored rules, omitted `maxValue`, `assets[].maxTotal`, and `maxGasPerCall` default to **zero**. Presets supply explicit policy values as described below. Asset totals meter tokens sent from Push; they do not meter trading or lending using capital already in the destination CEA. Specify positive caps for sends that need value, tokens or destination gas. Native value is limited per call; there is no public native lifetime-total cap.
|
|
95
95
|
|
|
96
96
|
## EVM destinations
|
|
97
97
|
|
|
@@ -171,7 +171,7 @@ The wire encoder uses uint32 maximum for unlimited native calls and 255 for unsp
|
|
|
171
171
|
|
|
172
172
|
- DEXES: Uniswap V3 on Ethereum, Base and Arbitrum (mainnet and their Sepolia testnets); PancakeSwap V3 on BNB mainnet and BSC testnet.
|
|
173
173
|
- LENDING: Aave on Ethereum, Base, Arbitrum and BNB mainnets, plus Sepolia/Base Sepolia/Arbitrum Sepolia; Moonwell on Base mainnet/testnet and Venus on BNB mainnet/testnet.
|
|
174
|
-
- STAKING: EigenLayer deposits on Ethereum mainnet and Sepolia
|
|
174
|
+
- STAKING: EigenLayer deposits on Ethereum mainnet and Sepolia; Lido stake and wrap/unwrap on Ethereum mainnet. Withdrawal requests with dynamic amounts, claims with position-derived amounts and EigenLayer withdrawals are excluded from these bounded presets. A selected native asset supplies the Lido `submit` value cap; omitted caps in explicitly supplied assets remain zero.
|
|
175
175
|
- PREDICTION: no entries yet. Hide categories with empty `chains` lists.
|
|
176
176
|
|
|
177
177
|
```ts
|
|
@@ -180,13 +180,24 @@ const availablePresets = presets.filter(preset => preset.chains.length > 0);
|
|
|
180
180
|
const { rules: reviewTemplates } = PushChain.utils.agentic.presets.get(
|
|
181
181
|
PushChain.CONSTANTS.AGENTIC.PRESETS.CATEGORY.DEXES,
|
|
182
182
|
);
|
|
183
|
-
//
|
|
183
|
+
// Every populated chain includes curated destination tokens in rule.assets.
|
|
184
|
+
// The SDK supplies spending limits, a PC budget and a seven-day expiry.
|
|
185
|
+
// Supply the agent to get complete Rule[] configuration.
|
|
186
|
+
const configuredPreset = PushChain.utils.agentic.presets.get(
|
|
187
|
+
PushChain.CONSTANTS.AGENTIC.PRESETS.CATEGORY.LENDING,
|
|
188
|
+
{ chainNamespace: 'eip155:11155111', agent: '0x0000000000000000000000000000000000001234', funding: 'destination' },
|
|
189
|
+
);
|
|
190
|
+
// Destination assets must already be funded; no Push token exports are granted.
|
|
191
|
+
// Show configuredPreset.readiness.chains[0].selectedAssets in the review UI.
|
|
192
|
+
// Pass configuredPreset.rules directly to create after checking readiness.
|
|
193
|
+
// The helper below illustrates explicit overrides, rather than required UI input.
|
|
184
194
|
|
|
185
195
|
function filledPreset(agent: Address, tokenIn: Address, tokenOut: Address) {
|
|
186
196
|
return PushChain.utils.agentic.presets.get(
|
|
187
197
|
PushChain.CONSTANTS.AGENTIC.PRESETS.CATEGORY.DEXES,
|
|
188
198
|
{
|
|
189
199
|
chainNamespace: 'eip155:11155111',
|
|
200
|
+
funding: 'destination',
|
|
190
201
|
agent,
|
|
191
202
|
validUntil: Math.floor(Date.now() / 1000) + 3600,
|
|
192
203
|
maxGasPerCall: BigInt(10) ** BigInt(18),
|
|
@@ -195,13 +206,13 @@ function filledPreset(agent: Address, tokenIn: Address, tokenOut: Address) {
|
|
|
195
206
|
{ token: tokenOut, maxPerCall: BigInt(100), maxTotal: BigInt(1000) },
|
|
196
207
|
],
|
|
197
208
|
},
|
|
198
|
-
)
|
|
209
|
+
);
|
|
199
210
|
}
|
|
200
211
|
```
|
|
201
212
|
|
|
202
|
-
The example caps are illustrative raw units; choose caps for the actual token decimals and gas requirements. `get` groups calls into one rule per chain.
|
|
213
|
+
The example caps are illustrative raw units; choose caps for the actual token decimals and gas requirements. `get` groups calls into one rule per chain. The result is `{ rules, readiness }`. With an agent supplied, `rules` is typed as `Rule[]`; otherwise it is `PresetRuleTemplate[]` with a generated expiry and missing agent. This type distinction alone does not establish readiness. When `assets` is omitted, each chain includes its curated destination tokens with the explicit spending limits below. An explicit `assets` array replaces the defaults for every returned chain; `[]` selects no tokens. Assets in an explicit list must name their chain unless a single chain filter is supplied. For an explicit asset list, omitted caps still default to zero. An omitted gas budget uses the preset policy; an explicit zero remains zero.
|
|
203
214
|
|
|
204
|
-
DEX discovery
|
|
215
|
+
DEX discovery without `assets` includes a curated wrapped-native/stablecoin pair per chain, with both swap directions, exact-input/output functions and the token-specific input caps below. It does not require the UI to select tokens separately for every network. DEX discovery also works with an explicit empty asset list or with assets for only some chains. A chain with fewer than two explicitly supplied tokens returns full-signature review calls with wallet-recipient pins and an explicit zero input-amount maximum. A single supplied token is also pinned as the input. These calls cannot spend swap input tokens, even if asset budgets are filled later. Call `get` again after selecting both tokens to replace the review calls with the complete token-pinned rules; merely assigning `rule.assets` is insufficient.
|
|
205
216
|
|
|
206
217
|
With two ERC20 tokens, `get` expands ordered pairs into exact-input and exact-output calls with token, wallet-recipient and input-amount pins. Native markers and expansions exceeding the policy's 32-pin limit are rejected. Two tokens fit the shipped router template; three do not. Static tuple fields use paths such as `[0, 3]`.
|
|
207
218
|
|
|
@@ -209,6 +220,103 @@ Reviewed EVM spenders generate approvals pinned to that spender and bounded by t
|
|
|
209
220
|
|
|
210
221
|
Templates describe permissions, not available liquidity or guaranteed execution. Verify destination token balances, supported reserves and source PRC20 routes before use: protocol testnet mock tokens may differ from MOVEABLE tokens. Presets do not sign, fetch app ABIs or modify wallets. Dynamic-path swaps, Solana protocol templates and unconfirmed deployments are excluded. Mainnet addresses were checked read-only; no mainnet transactions were executed. Other mainnet protocols in the proposal remain excluded until their deployment and permission constraints are verified. Local policy tests do not execute the destination protocols.
|
|
211
222
|
|
|
223
|
+
### Curated token defaults
|
|
224
|
+
|
|
225
|
+
These are small, protocol-specific subsets chosen to fit the 32-call/32-pin ceilings. The full reserve catalog is not automatically granted.
|
|
226
|
+
|
|
227
|
+
| Network | DEX pair | Lending tokens |
|
|
228
|
+
| --- | --- | --- |
|
|
229
|
+
| Ethereum | WETH / USDC | WETH, USDC |
|
|
230
|
+
| Base | WETH / USDC | USDC (Aave and Moonwell) |
|
|
231
|
+
| Arbitrum | WETH / native USDC | WETH, native USDC |
|
|
232
|
+
| BNB | WBNB / USDT | USDT (Aave and Venus) |
|
|
233
|
+
| Sepolia | DEX WETH / Circle USDC | Aave faucet LINK |
|
|
234
|
+
| Base Sepolia | WETH / Circle USDC | Aave faucet LINK, Moonwell mock USDbC and WETH |
|
|
235
|
+
| Arbitrum Sepolia | WETH / Circle USDC | Aave USDC |
|
|
236
|
+
| BSC testnet | WBNB / Venus USDT | Venus USDT, USDC |
|
|
237
|
+
|
|
238
|
+
Staking defaults are ETH/stETH/wstETH on Ethereum and the reviewed EigenLayer strategy's WETH on Sepolia. Testnet tokens with similar names can have different addresses; the returned addresses are authoritative. These tokens may lack Push PRC20 routes and can instead be used with destination-held balances. Defaults do not guarantee active reserves, liquidity, a Push PRC20 route or execution. In particular, an unmodified preset can fail rule preparation if its default assets lack PRC20 mappings. For destination-only use, pass `funding: 'destination'`: the SDK generates the operation constraints, returns empty rule bridge assets and retains selected token limits in readiness metadata. This grants no token export budget from Push and requires already-funded destination balances. Token addresses are returned as before; metadata was verified when defining the policy. No runtime metadata/price fetch is added to get.
|
|
239
|
+
|
|
240
|
+
### Funding and release-network checks
|
|
241
|
+
|
|
242
|
+
`funding` defaults to `'push'`. Missing PRC20 registry entries produce `BRIDGE_ASSET_UNAVAILABLE`, and readiness is false while the returned rule retains all requested assets. No address or cap is silently replaced. `network` defaults to `TESTNET_DONUT` (`TESTNET` is accepted as an alias); use the connected client's Push network when supplying it. Networks without a verified AGW deployment report `AGW_NETWORK_UNAVAILABLE`.
|
|
243
|
+
|
|
244
|
+
Use `funding: 'destination'` for the prefunded CEA workflow. Selected tokens still generate the same target/function/amount/recipient/spender restrictions, exposed alongside their caps in `readiness.chains[].selectedAssets`. Returned `rule.assets` is intentionally empty, which grants zero Push token-export authority. It is safe to pass these returned rules directly to create/update. The mode does not fund the destination, wrap ETH, mint testnet tokens or enable an unsupported network. Do not relabel it as bridge funding in the UI.
|
|
245
|
+
|
|
246
|
+
Existing mappings distinguish token identity by chain and address, including address casing for EVM. WETH/stETH Sepolia mappings and string/address-word source metadata are supported; mainnet or other-chain WETH is never aliased to them. Protocol mock LINK, Moonwell/Venus mocks and Circle testnet USDC can differ from the supported source tokens; they remain unavailable for bridge funding until real matching routes exist.
|
|
247
|
+
|
|
248
|
+
### Default permission policy
|
|
249
|
+
|
|
250
|
+
Only preset-generated assets receive these positive values. Direct rules, unknown tokens and explicit asset lists do not acquire guessed limits.
|
|
251
|
+
|
|
252
|
+
| Selected token | Per allowed call / Push outbound | Cumulative Push-outbound total |
|
|
253
|
+
| --- | --- | --- |
|
|
254
|
+
| USDC / USDT / mock USDbC | 10 tokens | 100 tokens |
|
|
255
|
+
| ETH / WETH / stETH / wstETH | 0.001 token | 0.01 token |
|
|
256
|
+
| WBNB | 0.01 token | 0.1 token |
|
|
257
|
+
| LINK | 1 token | 10 tokens |
|
|
258
|
+
|
|
259
|
+
Amounts use verified token decimals, keyed by chain and address, rather than symbol or live prices. For example, the USDT per-call limit is `10 * 10^18` on BNB mainnet and `10 * 10^6` on BSC testnet. These are fixed token quantities, not USD budgets.
|
|
260
|
+
|
|
261
|
+
The default expiry is seven days from each get call, computed once for all returned rules. The default gas ceiling is **20 PC per outbound**, including the value checked by URP; it is not a flat fee or a reservation. Actual sends obtain a fresh quote and remain subject to the rule cap. This ceiling has testnet protocol-flow coverage; mainnet templates do not have funded execution acceptance. Quotes may exceed the cap, requiring an explicit higher budget.
|
|
262
|
+
|
|
263
|
+
Explicit `validUntil` and `maxGasPerCall` override policy values; zero gas is preserved and reports incomplete readiness. An explicit `assets` array replaces all default tokens and limits, and omitted caps inside it remain zero. To change a preset cap while retaining its token set, take the returned assets, replace the caps and pass them back to get. Do not just edit the returned rule assets: the allowed-call pins and approvals also need regeneration.
|
|
264
|
+
|
|
265
|
+
`maxPerCall` applies to each allowed destination call; multiple calls may each consume that amount. `maxTotal` meters assets sent from Push, not aggregate destination activity. No destination lifetime limit is implied by these defaults. The general rules API continues to treat omitted caps as zero.
|
|
266
|
+
|
|
267
|
+
### Configure, inspect and regenerate
|
|
268
|
+
|
|
269
|
+
`readiness.ready` requires complete configuration plus offline SDK deployment/destination/bridge-registry support for the selected funding mode. Per-chain `configurationReady` reports input completeness separately. These checks do not verify live balances, reserve flags, liquidity, current deployed bytecode or source identity; grant preparation still verifies wiring and token metadata on-chain before signing. `readiness.chains` gives per-chain `issues`, `disabledCalls`, `excludedCalls`, catalog `knownTokens`, `selectedAssets`, `bridgeAssets`, `funding` and `zeroBridgeLimits`. Display `selectedAssets` as the reviewed token/amount permissions in either mode; `rule.assets` describes Push bridge permissions only. `bridgeAssets` reports registry presence, not verified live deployment. Mainnet templates remain discoverable but have `DESTINATION_UNAVAILABLE` on Donut. These are additive result fields; `rules` remains accepted by the existing create/update methods.
|
|
270
|
+
|
|
271
|
+
Tokens and permission defaults come directly from the SDK: omitted `assets` populates the curated subset and its caps in every returned `rule.assets`. Omitted gas and expiry use the policy below. The caller supplies the agent and can filter chains; no per-network token selection is required. Show the generated permissions for owner review and allow explicit overrides. Regenerate via get after an edit so operation pins/approvals match the new caps. Show explicitly zero-cap calls as disabled and present excluded calls clearly. A zero bridge limit can be intentional when assets are already at the destination; it is reported separately from operation readiness.
|
|
272
|
+
|
|
273
|
+
```ts
|
|
274
|
+
async function createConfiguredDex(
|
|
275
|
+
client: PushChain, agent: Address, tokenIn: Address, tokenOut: Address,
|
|
276
|
+
) {
|
|
277
|
+
const configured = filledPreset(agent, tokenIn, tokenOut);
|
|
278
|
+
if (!configured.readiness.ready) {
|
|
279
|
+
// Render these issues in the configuration screen; do not present it as ready.
|
|
280
|
+
return { issues: configured.readiness.chains };
|
|
281
|
+
}
|
|
282
|
+
return client.agentic.create('My DEX agent', { rules: configured.rules });
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
async function replaceConfiguredDex(
|
|
286
|
+
client: PushChain, wallet: Address, rulesId: Hex,
|
|
287
|
+
agent: Address, tokenIn: Address, tokenOut: Address,
|
|
288
|
+
) {
|
|
289
|
+
// Re-run get after editing tokens or limits. Changing rule.assets alone
|
|
290
|
+
// does not regenerate allowedCalls, token pins or approvals.
|
|
291
|
+
const configured = filledPreset(agent, tokenIn, tokenOut);
|
|
292
|
+
if (!configured.readiness.ready) throw new Error('Complete the preset inputs');
|
|
293
|
+
return client.agentic.wallet(wallet).rules.update({
|
|
294
|
+
rules: [{ rulesId, rule: configured.rules[0] }],
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
Save the preset category and editable inputs in the UI if subsequent edits should regenerate the preset. On-chain rules do not retain preset provenance or display metadata. A regenerated result is a replacement: do not append it to the old allowedCalls or keep the old token approvals. An update creates a new rulesId and resets counters, as documented above.
|
|
300
|
+
|
|
301
|
+
### Amount units and enforcement scope
|
|
302
|
+
|
|
303
|
+
| Preset operation | Generated restriction |
|
|
304
|
+
| --- | --- |
|
|
305
|
+
| DEX swap | Selected input/output token equality, wallet recipient, maximum input amount |
|
|
306
|
+
| Aave supply/withdraw/borrow/repay | Listed reserve token equality, wallet beneficiary, amount maximum |
|
|
307
|
+
| Moonwell/Venus mint/redeemUnderlying/borrow/repayBorrow | Maximum in the market's underlying-token units |
|
|
308
|
+
| EigenLayer deposit | Selected token equality and deposit amount maximum |
|
|
309
|
+
| Lido wrap/unwrap | stETH/wstETH input limits respectively; their units are not interchangeable |
|
|
310
|
+
| Lido submit | Native-value cap from the selected native asset's maxPerCall |
|
|
311
|
+
|
|
312
|
+
Aave reserve choices come from the reviewed official address book; fixed-token markets only enable for their actual underlying. Unknown assets do not receive an Aave approval or a positive Aave operation cap. A reserve listing is not a guarantee that its current supply cap, pause state or liquidity allows a transaction.
|
|
313
|
+
|
|
314
|
+
Market `redeem(uint256)` takes shares: it is excluded and `redeemUnderlying(uint256)` is provided instead. Lido's dynamic withdrawal arrays and position-based claims are also excluded because an underlying amount cap cannot safely be converted into those arguments by this pure helper. Custom rules remain possible through the normal rule API.
|
|
315
|
+
|
|
316
|
+
**A per-call limit applies to each allowed contract call, not the sum of several calls in one transaction. `maxTotal` is the cumulative Push-outbound amount, not lifetime turnover on the destination.** These statements also hold when a call's tokens are already in the CEA. Destination lifetime or batch-total accounting requires contract support. Bounded approvals do not supply such accounting.
|
|
317
|
+
|
|
318
|
+
The contract allows at most 32 pins across a universal rule. Expansion fails explicitly if the selected assets/apps exceed that ceiling; no restrictions are silently dropped. Two Aave reserves fit its four-operation template; three do not. Blank/incomplete inputs return zero-cap review calls, and regeneration replaces them with the selected token-specific calls.
|
|
319
|
+
|
|
212
320
|
## Validation
|
|
213
321
|
|
|
214
322
|
Run `node packages/core/scripts/check-agw-docs.js` to typecheck these examples. Unit tests use the normal core Jest configuration. `jest.agw-local.config.ts` uses pinned real AGW contracts and a stub gateway. Live E2Es are opt-in under `__e2e__/agw`; preflight verifies the deployment and funding limits. Local tests do not prove destination delivery, and historical live results do not count as validation of a changed public API.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
@pushchain/core@6.0.27-alpha.3 (2026-10-18)
|
|
2
|
+
|
|
3
|
+
- feat: ship bounded preset defaults with funding checks
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
@pushchain/core@6.0.27-alpha.2 (2026-10-16)
|
|
8
|
+
|
|
9
|
+
- feat: add bounded preset operations and configuration readiness
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
1
13
|
@pushchain/core@6.0.27-alpha.1 (2026-10-15)
|
|
2
14
|
|
|
3
15
|
- fix: resolve AGW tokens by destination and expand live coverage
|
package/package.json
CHANGED
|
@@ -22,5 +22,5 @@ export declare const PRC20_SOURCE_ABI: readonly [{
|
|
|
22
22
|
export declare function readSvmSourceToken(snap: Snapshot, token: Address, chain: string, network?: PUSH_NETWORK): Promise<Hex>;
|
|
23
23
|
export declare const CORE_ADDRESS: Address;
|
|
24
24
|
export declare function readGasPrc20(snap: Snapshot, chain: string): Promise<Address>;
|
|
25
|
-
/**
|
|
25
|
+
/** Solidity PRC20s return a string; Donut precompiles can return an address word. */
|
|
26
26
|
export declare function readOriginToken(snap: Snapshot, token: Address, chain: string): Promise<Address>;
|
|
@@ -64,19 +64,25 @@ exports.CORE_ADDRESS = '0x00000000000000000000000000000000000000C0';
|
|
|
64
64
|
async function readGasPrc20(snap, chain) {
|
|
65
65
|
return (0, viem_1.getAddress)(await snap.read(exports.CORE_ADDRESS, prc20_evm_1.UNIVERSAL_CORE_EVM, 'gasTokenPRC20ByChainNamespace', [chain]));
|
|
66
66
|
}
|
|
67
|
-
/**
|
|
67
|
+
/** Solidity PRC20s return a string; Donut precompiles can return an address word. */
|
|
68
68
|
async function readOriginToken(snap, token, chain) {
|
|
69
69
|
let source;
|
|
70
70
|
try {
|
|
71
71
|
source = await snap.read(token, exports.PRC20_SOURCE_ABI, 'SOURCE_TOKEN_ADDRESS');
|
|
72
72
|
}
|
|
73
73
|
catch (cause) {
|
|
74
|
-
|
|
74
|
+
let sourceWord;
|
|
75
|
+
try {
|
|
76
|
+
sourceWord = (0, viem_1.getAddress)(await snap.read(token, NATIVE_SOURCE_ABI, 'SOURCE_TOKEN_ADDRESS'));
|
|
77
|
+
}
|
|
78
|
+
catch {
|
|
75
79
|
throw cause;
|
|
76
|
-
|
|
77
|
-
if (
|
|
80
|
+
}
|
|
81
|
+
if (sourceWord !== viem_1.zeroAddress)
|
|
82
|
+
return sourceWord;
|
|
83
|
+
if ((await readGasPrc20(snap, chain)) === (0, viem_1.getAddress)(token))
|
|
78
84
|
return viem_1.zeroAddress;
|
|
79
|
-
throw
|
|
85
|
+
throw new errors_1.AgenticError(errors_1.AGENTIC_ERROR_CODE.RULE_READ_FAILED, `non-native PRC20 ${token} has an empty source token address`);
|
|
80
86
|
}
|
|
81
87
|
if ((0, viem_1.isAddress)(source, { strict: false }))
|
|
82
88
|
return (0, viem_1.getAddress)(source);
|
|
@@ -2,4 +2,4 @@ export type { AgenticAddress, AgenticHex, AgenticDoor, AgenticNamespace, Agentic
|
|
|
2
2
|
export { AGENTIC_ERROR_CODE, AgenticError, AgenticRevertError } from './errors';
|
|
3
3
|
export type { AgenticErrorCode } from './errors';
|
|
4
4
|
export { AGENTIC } from './constants';
|
|
5
|
-
export type { Preset, PresetCategory, PresetAsset, PresetOptions, ReadyPresetOptions, PresetRuleTemplate, AgenticPresets, } from './presets/types';
|
|
5
|
+
export type { Preset, PresetCategory, PresetAsset, PresetOptions, ReadyPresetOptions, PresetRuleTemplate, PresetResult, PresetChainReadiness, PresetConfigurationIssue, PresetCallIssue, AgenticPresets, } from './presets/types';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Aave V3 reserve addresses from the official bgd-labs/aave-address-book
|
|
2
|
+
* snapshots reviewed October 15, 2026. Listings are not liquidity/availability guarantees. */
|
|
3
|
+
import type { Address } from 'viem';
|
|
4
|
+
export declare const AAVE_RESERVES: Readonly<Record<string, readonly Address[]>>;
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AAVE_RESERVES = void 0;
|
|
4
|
+
exports.AAVE_RESERVES = {
|
|
5
|
+
'eip155:1': [
|
|
6
|
+
'0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
|
|
7
|
+
'0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0',
|
|
8
|
+
'0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599',
|
|
9
|
+
'0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
|
|
10
|
+
'0x6B175474E89094C44Da98b954EedeAC495271d0F',
|
|
11
|
+
'0x514910771AF9Ca656af840dff83E8264EcF986CA',
|
|
12
|
+
'0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9',
|
|
13
|
+
'0xBe9895146f7AF43049ca1c1AE358B0541Ea49704',
|
|
14
|
+
'0xdAC17F958D2ee523a2206206994597C13D831ec7',
|
|
15
|
+
'0xae78736Cd615f374D3085123A210448E74Fc6393',
|
|
16
|
+
'0x5f98805A4E8be255a32880FDeC7F6728C6568bA0',
|
|
17
|
+
'0xD533a949740bb3306d119CC777fa900bA034cd52',
|
|
18
|
+
'0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2',
|
|
19
|
+
'0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F',
|
|
20
|
+
'0xba100000625a3754423978a60c9317c58a424e3D',
|
|
21
|
+
'0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984',
|
|
22
|
+
'0x5A98FcBEA516Cf06857215779Fd812CA3beF1B32',
|
|
23
|
+
'0xC18360217D8F7Ab5e7c516566761Ea12Ce7F9D72',
|
|
24
|
+
'0x111111111117dC0aa78b770fA6A738034120C302',
|
|
25
|
+
'0x853d955aCEf822Db058eb8505911ED77F175b99e',
|
|
26
|
+
'0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f',
|
|
27
|
+
'0xD33526068D116cE69F19A9ee46F0bd304F21A51f',
|
|
28
|
+
'0x83F20F44975D03b1b09e64809B757c47f942BEeA',
|
|
29
|
+
'0xAf5191B0De278C7286d6C7CC6ab6BB8A73bA2Cd6',
|
|
30
|
+
'0xdeFA4e8a7bcBA345F687a2f1456F5Edd9CE97202',
|
|
31
|
+
'0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0',
|
|
32
|
+
'0xf939E0A03FB07F59A73314E73794Be0E57ac1b4E',
|
|
33
|
+
'0x6c3ea9036406852006290770BEdFcAbA0e23A0e8',
|
|
34
|
+
'0xCd5fE23C85820F7B72D0926FC9b05b43E359b7ee',
|
|
35
|
+
'0xf1C9acDc66974dFB6dEcB12aA385b9cD01190E38',
|
|
36
|
+
'0x4c9EDD5852cd905f086C759E8383e09bff1E68B3',
|
|
37
|
+
'0xA35b1B31Ce002FBF2058D22F30f95D405200A15b',
|
|
38
|
+
'0x9D39A5DE30e57443BfF2A8307A4256c8797A3497',
|
|
39
|
+
'0x18084fbA666a33d37592fA2633fD49a74DD93a88',
|
|
40
|
+
'0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf',
|
|
41
|
+
'0xdC035D45d973E3EC169d2276DDab16f1e407384F',
|
|
42
|
+
'0xA1290d69c65A6Fe4DF752f95823fae25cB99e5A7',
|
|
43
|
+
'0x8236a87084f8B84306f72007F36F2618A5634494',
|
|
44
|
+
'0x657e8C867D8B37dCC18fA4Caead9C45EB088C642',
|
|
45
|
+
'0x8292Bb45bf1Ee4d140127049757C2E0fF06317eD',
|
|
46
|
+
'0x50D2C7992b802Eef16c04FeADAB310f31866a545',
|
|
47
|
+
'0x3b3fB9C57858EF816833dC91565EFcd85D96f634',
|
|
48
|
+
'0xC139190F447e929f090Edeb554D95AbB8b18aC1C',
|
|
49
|
+
'0x917459337CaAC939D41d7493B3999f571D20D667',
|
|
50
|
+
'0x14Bdc3A3AE09f5518b923b69489CBcAfB238e617',
|
|
51
|
+
'0x90D2af7d622ca3141efA4d8f1F24d86E5974Cc8F',
|
|
52
|
+
'0xC96dE26018A54D51c097160568752c4E3BD6C364',
|
|
53
|
+
'0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c',
|
|
54
|
+
'0x9F56094C450763769BA0EA9Fe2876070c0fD5F77',
|
|
55
|
+
'0xBC6736d346a5eBC0dEbc997397912CD9b8FAe10a',
|
|
56
|
+
'0xD11c452fc99cF405034ee446803b6F6c1F6d5ED8',
|
|
57
|
+
'0xbf5495Efe5DB9ce00f80364C8B423567e58d2110',
|
|
58
|
+
'0x68749665FF8D2d112Fa859AA293F07A622782F38',
|
|
59
|
+
'0xe6A934089BBEe34F832060CE98848359883749B3',
|
|
60
|
+
'0x62C6E813b9589C3631Ba0Cdb013acdB8544038B7',
|
|
61
|
+
'0x1F84a51296691320478c98b8d77f2Bbd17D34350',
|
|
62
|
+
'0xE8483517077afa11A9B07f849cee2552f040d7b2',
|
|
63
|
+
'0xacA92E438df0B2401fF60dA7E4337B687a2435DA',
|
|
64
|
+
'0x356B8d89c1e1239Cbbb9dE4815c39A1474d5BA7D',
|
|
65
|
+
'0xe343167631d89B6Ffc58B88d6b7fB0228795491D',
|
|
66
|
+
'0xAeBf0Bb9f57E89260d57f31AF34eB58657d96Ce0',
|
|
67
|
+
'0x3de0ff76E8b528C092d47b9DaC775931cef80F49',
|
|
68
|
+
'0x9Bf45ab47747F4B4dD09B3C2c73953484b4eB375',
|
|
69
|
+
'0xB0F70C0bD6FD87dbEb7C10dC692a2a6106817072',
|
|
70
|
+
'0x619D75E3b790eBC21c289f2805Bb7177A7D732E2',
|
|
71
|
+
'0x9db38D74a0D29380899aD354121DfB521aDb0548',
|
|
72
|
+
'0x59bC9FaE5D62B19d4f8d07D758047aCb9EE19d34',
|
|
73
|
+
],
|
|
74
|
+
'eip155:8453': [
|
|
75
|
+
'0x4200000000000000000000000000000000000006',
|
|
76
|
+
'0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22',
|
|
77
|
+
'0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA',
|
|
78
|
+
'0xc1CBa3fCea344f92D9239c08C0568f6F2F0ee452',
|
|
79
|
+
'0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',
|
|
80
|
+
'0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A',
|
|
81
|
+
'0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf',
|
|
82
|
+
'0x2416092f143378750bb29b79eD961ab195CcEea5',
|
|
83
|
+
'0x6Bb7a212910682DCFdbd5BCBb3e28FB4E8da10Ee',
|
|
84
|
+
'0xEDfa23602D0EC14714057867A78d01e94176BEA0',
|
|
85
|
+
'0xecAc9C5F704e954931349Da37F60E39f515c11c1',
|
|
86
|
+
'0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42',
|
|
87
|
+
'0x63706e401c06ac8513145b7687A14804d17f814b',
|
|
88
|
+
'0x236aa50979D5f3De3Bd1Eeb40E81137F22ab794b',
|
|
89
|
+
'0x660975730059246A68521a3e2FBD4740173100f5',
|
|
90
|
+
],
|
|
91
|
+
'eip155:42161': [
|
|
92
|
+
'0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1',
|
|
93
|
+
'0xf97f4df75117a78c1A5a0DBb814Af92458539FB4',
|
|
94
|
+
'0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8',
|
|
95
|
+
'0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f',
|
|
96
|
+
'0x82aF49447D8a07e3bd95BD0d56f35241523fBab1',
|
|
97
|
+
'0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9',
|
|
98
|
+
'0xba5DdD1f9d7F570dc94a51479a000E3BCE967196',
|
|
99
|
+
'0xD22a58f79e9481D1a88e00c343885A588b34b68B',
|
|
100
|
+
'0x5979D7b546E38E414F7E9822514be443A4800529',
|
|
101
|
+
'0x3F56e0c36d275367b8C502090EDF38289b3dEa0d',
|
|
102
|
+
'0xEC70Dcb4A1EFa46b8F2D97C310C9c4790ba5ffA8',
|
|
103
|
+
'0x93b346b6BC2548dA6A1E7d98E9a421B42541425b',
|
|
104
|
+
'0xaf88d065e77c8cC2239327C5EDb3A432268e5831',
|
|
105
|
+
'0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F',
|
|
106
|
+
'0x912CE59144191C1204E64559FE8253a0e49E6548',
|
|
107
|
+
'0x35751007a407ca6FEFfE80b3cB397736D2cf4dbe',
|
|
108
|
+
'0x7dfF72693f6A4149b17e7C6314655f6A9F7c8B33',
|
|
109
|
+
'0x2416092f143378750bb29b79eD961ab195CcEea5',
|
|
110
|
+
'0x4186BFC76E2E237523CBC30FD220FE055156b41F',
|
|
111
|
+
'0x6c84a8f1c29108F47a79964b5Fe888D4f4D0dE40',
|
|
112
|
+
],
|
|
113
|
+
'eip155:56': [
|
|
114
|
+
'0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82',
|
|
115
|
+
'0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c',
|
|
116
|
+
'0x7130d2A12B9BCbFAe4f2634d864A1Ee1Ce3Ead9c',
|
|
117
|
+
'0x2170Ed0880ac9A755fd29B2688956BD959F933F8',
|
|
118
|
+
'0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d',
|
|
119
|
+
'0x55d398326f99059fF775485246999027B3197955',
|
|
120
|
+
'0xc5f0f7b66764F6ec8C8Dff7BA683102295E16409',
|
|
121
|
+
'0x26c5e01524d2E6280A48F2c50fF6De7e52E9611C',
|
|
122
|
+
],
|
|
123
|
+
'eip155:11155111': [
|
|
124
|
+
'0xFF34B3d4Aee8ddCd6F9AFFFB6Fe49bD371b8a357',
|
|
125
|
+
'0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5',
|
|
126
|
+
'0x94a9D9AC8a22534E3FaCa9F4e7F2E2cf85d5E4C8',
|
|
127
|
+
'0x29f2D40B0605204364af54EC677bD022dA425d03',
|
|
128
|
+
'0xC558DBdd856501FCd9aaF1E62eae57A9F0629a3c',
|
|
129
|
+
'0xaA8E23Fb1079EA71e0a56F48a2aA51851D8433D0',
|
|
130
|
+
'0x88541670E55cC00bEEFD87eB59EDd1b7C511AC9a',
|
|
131
|
+
'0x6d906e526a4e2Ca02097BA9d0caA3c382F52278E',
|
|
132
|
+
'0xc4bF5CbDaBE595361438F8c6a187bDc330539c60',
|
|
133
|
+
],
|
|
134
|
+
'eip155:84532': [
|
|
135
|
+
'0xba50Cd2A20f6DA35D788639E581bca8d0B5d4D5f',
|
|
136
|
+
'0x0a215D8ba66387DCA84B284D18c3B4ec3de6E54a',
|
|
137
|
+
'0x54114591963CF60EF3aA63bEfD6eC263D98145a4',
|
|
138
|
+
'0x4200000000000000000000000000000000000006',
|
|
139
|
+
'0xD171b9694f7A2597Ed006D41f7509aaD4B485c4B',
|
|
140
|
+
'0x810D46F9a9027E28F9B01F75E2bdde839dA61115',
|
|
141
|
+
],
|
|
142
|
+
'eip155:421614': [
|
|
143
|
+
'0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d',
|
|
144
|
+
'0x1dF462e2712496373A347f8ad10802a5E95f053D',
|
|
145
|
+
],
|
|
146
|
+
};
|
|
147
|
+
//# sourceMappingURL=aave-reserves.js.map
|
|
@@ -1,10 +1,33 @@
|
|
|
1
1
|
import { type Address } from 'viem';
|
|
2
2
|
import type { RuleCall, ForeignChainNamespace } from '../agentic.types';
|
|
3
3
|
import type { PresetCategory } from './types';
|
|
4
|
+
export type PresetBudget = {
|
|
5
|
+
kind: 'token-argument';
|
|
6
|
+
tokenArg: number;
|
|
7
|
+
amountArg: number;
|
|
8
|
+
tokens?: readonly Address[];
|
|
9
|
+
} | {
|
|
10
|
+
kind: 'fixed-token';
|
|
11
|
+
token: Address;
|
|
12
|
+
amountArg: number;
|
|
13
|
+
} | {
|
|
14
|
+
kind: 'native-value';
|
|
15
|
+
} | {
|
|
16
|
+
kind: 'setup';
|
|
17
|
+
} | {
|
|
18
|
+
kind: 'unsupported';
|
|
19
|
+
reason: 'SHARE_AMOUNT' | 'DYNAMIC_AMOUNT' | 'POSITION_AMOUNT';
|
|
20
|
+
alternative?: RuleCall['selector'];
|
|
21
|
+
};
|
|
22
|
+
export interface PresetCallDefinition extends RuleCall {
|
|
23
|
+
budget?: PresetBudget;
|
|
24
|
+
}
|
|
4
25
|
/** Internal catalog: reviewed addresses and explicit calls only; never fetched at runtime. */
|
|
5
26
|
export interface PresetChainDefinition {
|
|
6
27
|
chainNamespace: ForeignChainNamespace;
|
|
7
|
-
|
|
28
|
+
/** Used with the bundled permission policy only when assets is omitted. */
|
|
29
|
+
defaultTokens?: readonly Address[];
|
|
30
|
+
allowedCalls: readonly PresetCallDefinition[];
|
|
8
31
|
/** Static single-hop routers; incomplete pairs return zero-input-cap review calls. */
|
|
9
32
|
swapRouters?: readonly {
|
|
10
33
|
address: Address;
|
|
@@ -15,6 +38,7 @@ export interface PresetChainDefinition {
|
|
|
15
38
|
spender: Address;
|
|
16
39
|
app: string;
|
|
17
40
|
token?: Address;
|
|
41
|
+
tokens?: readonly Address[];
|
|
18
42
|
}[];
|
|
19
43
|
maxGasPerCall?: bigint;
|
|
20
44
|
}
|