otto-intel-mcp 0.1.2 → 0.1.4
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/README.md +76 -18
- package/dist/account-userop-policy-definition.d.ts +14 -0
- package/dist/account-userop-policy-definition.js +12 -0
- package/dist/account-userop-policy-relation.d.ts +371 -0
- package/dist/account-userop-policy-relation.js +87 -0
- package/dist/adapter/cdp-signer.d.ts +76 -9
- package/dist/adapter/cdp-signer.js +274 -33
- package/dist/adapter/evm-call-failure.d.ts +29 -0
- package/dist/adapter/evm-call-failure.js +109 -0
- package/dist/adapter/refusal.d.ts +1 -1
- package/dist/adapter/refusal.js +13 -0
- package/dist/adapter/route-simulator.d.ts +91 -0
- package/dist/adapter/route-simulator.js +143 -0
- package/dist/adapter-cdp-index.d.ts +1 -1
- package/dist/executable-equities.d.ts +55 -0
- package/dist/executable-equities.js +116 -0
- package/dist/executable-yield-markets.d.ts +261 -0
- package/dist/executable-yield-markets.js +154 -0
- package/dist/execution-account-gas-quote.d.ts +141 -0
- package/dist/execution-account-gas-quote.js +443 -0
- package/dist/execution-account-gas-review.d.ts +123 -0
- package/dist/execution-account-gas-review.js +104 -0
- package/dist/execution-account-gas-runtime.d.ts +33 -0
- package/dist/execution-account-gas-runtime.js +131 -0
- package/dist/execution-account-gas-view.d.ts +936 -0
- package/dist/execution-account-gas-view.js +56 -0
- package/dist/execution-config.d.ts +3 -0
- package/dist/execution-config.js +4 -0
- package/dist/execution-delegated-definition.d.ts +7 -6
- package/dist/execution-delegated-definition.js +13 -2
- package/dist/execution-delegation-admin-definition.d.ts +127 -5
- package/dist/execution-delegation-admin-definition.js +155 -5
- package/dist/execution-delegation-admin.d.ts +48 -2
- package/dist/execution-delegation-admin.js +422 -12
- package/dist/execution-delegation-cap-store.d.ts +386 -0
- package/dist/execution-delegation-cap-store.js +1150 -0
- package/dist/execution-delegation-exit-definition.d.ts +309 -0
- package/dist/execution-delegation-exit-definition.js +204 -0
- package/dist/execution-delegation-exit-store.d.ts +114 -0
- package/dist/execution-delegation-exit-store.js +671 -0
- package/dist/execution-delegation-exit.d.ts +4 -0
- package/dist/execution-delegation-exit.js +614 -0
- package/dist/execution-delegation-finality.d.ts +22 -0
- package/dist/execution-delegation-finality.js +90 -0
- package/dist/execution-delegation-operation-store.d.ts +129 -0
- package/dist/execution-delegation-operation-store.js +1107 -0
- package/dist/execution-delegation-operations-definition.d.ts +282 -0
- package/dist/execution-delegation-operations-definition.js +117 -0
- package/dist/execution-delegation-operations.d.ts +6 -0
- package/dist/execution-delegation-operations.js +282 -0
- package/dist/execution-delegation-policy.d.ts +154 -8
- package/dist/execution-delegation-policy.js +273 -40
- package/dist/execution-delegation.d.ts +51 -0
- package/dist/execution-delegation.js +441 -31
- package/dist/execution-errors.d.ts +1 -1
- package/dist/execution-errors.js +122 -0
- package/dist/execution-index.d.ts +7 -2
- package/dist/execution-index.js +7 -2
- package/dist/execution-journal-schema.d.ts +96 -0
- package/dist/execution-journal-schema.js +368 -0
- package/dist/execution-journal-tables.d.ts +14 -0
- package/dist/execution-journal-tables.js +227 -0
- package/dist/execution-policy-compatibility.d.ts +34 -0
- package/dist/execution-policy-compatibility.js +76 -0
- package/dist/execution-registration.d.ts +54 -2
- package/dist/execution-registration.js +151 -5
- package/dist/execution-sponsored-account-profile.d.ts +32 -0
- package/dist/execution-sponsored-account-profile.js +59 -0
- package/dist/execution-sponsored-account.d.ts +1519 -0
- package/dist/execution-sponsored-account.js +222 -0
- package/dist/execution-sponsored-definition.d.ts +1713 -0
- package/dist/execution-sponsored-definition.js +185 -0
- package/dist/execution-sponsored-gas-policy.d.ts +27 -0
- package/dist/execution-sponsored-gas-policy.js +110 -0
- package/dist/execution-sponsored-hosted.d.ts +3 -0
- package/dist/execution-sponsored-hosted.js +71 -0
- package/dist/execution-sponsored-index.d.ts +1322 -0
- package/dist/execution-sponsored-index.js +102 -0
- package/dist/execution-sponsored-mcp-definition.d.ts +1662 -0
- package/dist/execution-sponsored-mcp-definition.js +94 -0
- package/dist/execution-sponsored-receipt.d.ts +47 -0
- package/dist/execution-sponsored-receipt.js +74 -0
- package/dist/execution-sponsored-registration.d.ts +14 -0
- package/dist/execution-sponsored-registration.js +77 -0
- package/dist/execution-sponsored-runtime.d.ts +84 -0
- package/dist/execution-sponsored-runtime.js +149 -0
- package/dist/execution-sponsored-settlement.d.ts +15 -0
- package/dist/execution-sponsored-settlement.js +88 -0
- package/dist/execution-sponsored-store.d.ts +67 -0
- package/dist/execution-sponsored-store.js +517 -0
- package/dist/execution-sponsored-transport.d.ts +90 -0
- package/dist/execution-sponsored-transport.js +180 -0
- package/dist/execution-tool-definitions.d.ts +21 -21
- package/dist/execution-tool-definitions.js +0 -7
- package/dist/execution-tools.d.ts +53 -1
- package/dist/execution-tools.js +171 -13
- package/dist/execution-worker-guard.d.ts +28 -0
- package/dist/execution-worker-guard.js +124 -0
- package/dist/hybrid-yield-index.d.ts +10 -0
- package/dist/hybrid-yield-index.js +11 -0
- package/dist/hybrid-yield-markets.d.ts +96 -0
- package/dist/hybrid-yield-markets.js +124 -0
- package/dist/hybrid-yield.d.ts +411 -0
- package/dist/hybrid-yield.js +155 -0
- package/dist/hyperliquid-order-builder.js +4 -0
- package/dist/lifi-execution-client.d.ts +6 -0
- package/dist/lifi-execution-client.js +3 -0
- package/dist/lp-userop-account.d.ts +461 -0
- package/dist/lp-userop-account.js +417 -0
- package/dist/lp-userop-authority.d.ts +49 -0
- package/dist/lp-userop-authority.js +211 -0
- package/dist/lp-userop-definition.d.ts +233 -0
- package/dist/lp-userop-definition.js +85 -0
- package/dist/lp-userop-hosted.d.ts +3 -0
- package/dist/lp-userop-hosted.js +73 -0
- package/dist/lp-userop-index.d.ts +1569 -0
- package/dist/lp-userop-index.js +112 -0
- package/dist/lp-userop-mcp-definition.d.ts +1220 -0
- package/dist/lp-userop-mcp-definition.js +46 -0
- package/dist/lp-userop-operation.d.ts +1230 -0
- package/dist/lp-userop-operation.js +140 -0
- package/dist/lp-userop-registration.d.ts +14 -0
- package/dist/lp-userop-registration.js +70 -0
- package/dist/lp-userop-settlement.d.ts +89 -0
- package/dist/lp-userop-settlement.js +184 -0
- package/dist/lp-userop.d.ts +643 -0
- package/dist/lp-userop.js +343 -0
- package/dist/native-yield-account-definition.d.ts +1192 -0
- package/dist/native-yield-account-definition.js +232 -0
- package/dist/native-yield-account-gas.d.ts +58 -0
- package/dist/native-yield-account-gas.js +228 -0
- package/dist/native-yield-account-index.d.ts +23 -0
- package/dist/native-yield-account-index.js +28 -0
- package/dist/native-yield-account-policy.d.ts +168 -0
- package/dist/native-yield-account-policy.js +525 -0
- package/dist/native-yield-account-rpc.d.ts +8 -0
- package/dist/native-yield-account-rpc.js +128 -0
- package/dist/native-yield-account-runtime.d.ts +71 -0
- package/dist/native-yield-account-runtime.js +125 -0
- package/dist/native-yield-account-store.d.ts +40 -0
- package/dist/native-yield-account-store.js +307 -0
- package/dist/native-yield-account.d.ts +662 -0
- package/dist/native-yield-account.js +371 -0
- package/dist/native-yield-consent-store.d.ts +20 -0
- package/dist/native-yield-consent-store.js +317 -0
- package/dist/native-yield-definition.d.ts +288 -0
- package/dist/native-yield-definition.js +105 -0
- package/dist/native-yield-reader.d.ts +4 -0
- package/dist/native-yield-reader.js +137 -0
- package/dist/native-yield-settlement.d.ts +48 -0
- package/dist/native-yield-settlement.js +167 -0
- package/dist/native-yield-simulation.d.ts +18 -0
- package/dist/native-yield-simulation.js +45 -0
- package/dist/native-yield-userop-account.d.ts +675 -0
- package/dist/native-yield-userop-account.js +357 -0
- package/dist/native-yield-userop-authority.d.ts +214 -0
- package/dist/native-yield-userop-authority.js +296 -0
- package/dist/native-yield-userop-definition.d.ts +331 -0
- package/dist/native-yield-userop-definition.js +105 -0
- package/dist/native-yield-userop-hosted.d.ts +3 -0
- package/dist/native-yield-userop-hosted.js +71 -0
- package/dist/native-yield-userop-index.d.ts +1522 -0
- package/dist/native-yield-userop-index.js +142 -0
- package/dist/native-yield-userop-mcp-definition.d.ts +1356 -0
- package/dist/native-yield-userop-mcp-definition.js +50 -0
- package/dist/native-yield-userop-operation.d.ts +845 -0
- package/dist/native-yield-userop-operation.js +127 -0
- package/dist/native-yield-userop-policy.d.ts +23 -0
- package/dist/native-yield-userop-policy.js +25 -0
- package/dist/native-yield-userop-registration.d.ts +17 -0
- package/dist/native-yield-userop-registration.js +76 -0
- package/dist/native-yield-userop-settlement.d.ts +8 -0
- package/dist/native-yield-userop-settlement.js +79 -0
- package/dist/native-yield-userop-simulation.d.ts +18 -0
- package/dist/native-yield-userop-simulation.js +34 -0
- package/dist/native-yield-userop.d.ts +35 -0
- package/dist/native-yield-userop.js +156 -0
- package/dist/native-yield-verify.d.ts +30 -0
- package/dist/native-yield-verify.js +141 -0
- package/dist/native-yield.d.ts +17 -0
- package/dist/native-yield.js +119 -0
- package/dist/stdio-main.js +0 -0
- package/dist/stock-buy-definition.d.ts +338 -0
- package/dist/stock-buy-definition.js +127 -0
- package/dist/stock-buy-oracle.d.ts +8 -0
- package/dist/stock-buy-oracle.js +22 -0
- package/dist/stock-buy.d.ts +17 -0
- package/dist/stock-buy.js +164 -0
- package/dist/tool-definitions.d.ts +3 -1
- package/dist/tool-definitions.js +55 -2
- package/dist/vendor/lp-v3/lp-v3-atomic-contract.d.ts +445 -0
- package/dist/vendor/lp-v3/lp-v3-atomic-contract.js +90 -0
- package/dist/vendor/lp-v3/lp-v3-atomic-evidence.d.ts +14 -0
- package/dist/vendor/lp-v3/lp-v3-atomic-evidence.js +82 -0
- package/dist/vendor/lp-v3/lp-v3-atomic-index.d.ts +80 -0
- package/dist/vendor/lp-v3/lp-v3-atomic-index.js +19 -0
- package/dist/vendor/lp-v3/lp-v3-atomic-plan.d.ts +43 -0
- package/dist/vendor/lp-v3/lp-v3-atomic-plan.js +112 -0
- package/dist/vendor/lp-v3/lp-v3-atomic-read-contract.d.ts +312 -0
- package/dist/vendor/lp-v3/lp-v3-atomic-read-contract.js +41 -0
- package/dist/vendor/lp-v3/lp-v3-atomic-read-index.d.ts +3 -0
- package/dist/vendor/lp-v3/lp-v3-atomic-read-index.js +3 -0
- package/dist/vendor/lp-v3/lp-v3-atomic-read-rpc.d.ts +49 -0
- package/dist/vendor/lp-v3/lp-v3-atomic-read-rpc.js +88 -0
- package/dist/vendor/lp-v3/lp-v3-atomic-read.d.ts +17 -0
- package/dist/vendor/lp-v3/lp-v3-atomic-read.js +232 -0
- package/dist/vendor/lp-v3/lp-v3-atomic-settlement.d.ts +105 -0
- package/dist/vendor/lp-v3/lp-v3-atomic-settlement.js +162 -0
- package/dist/vendor/lp-v3/lp-v3-collect-protocol-contract.d.ts +606 -0
- package/dist/vendor/lp-v3/lp-v3-collect-protocol-contract.js +59 -0
- package/dist/vendor/lp-v3/lp-v3-collect-protocol-index.d.ts +168 -0
- package/dist/vendor/lp-v3/lp-v3-collect-protocol-index.js +23 -0
- package/dist/vendor/lp-v3/lp-v3-collect-protocol-observation.d.ts +32 -0
- package/dist/vendor/lp-v3/lp-v3-collect-protocol-observation.js +228 -0
- package/dist/vendor/lp-v3/lp-v3-collect-protocol-plan.d.ts +11 -0
- package/dist/vendor/lp-v3/lp-v3-collect-protocol-plan.js +91 -0
- package/dist/vendor/lp-v3/lp-v3-collect-protocol-reconcile.d.ts +9 -0
- package/dist/vendor/lp-v3/lp-v3-collect-protocol-reconcile.js +124 -0
- package/dist/vendor/lp-v3/lp-v3-contract.d.ts +538 -0
- package/dist/vendor/lp-v3/lp-v3-contract.js +137 -0
- package/dist/vendor/lp-v3/lp-v3-evidence.d.ts +25 -0
- package/dist/vendor/lp-v3/lp-v3-evidence.js +168 -0
- package/dist/vendor/lp-v3/lp-v3-plan.d.ts +22 -0
- package/dist/vendor/lp-v3/lp-v3-plan.js +135 -0
- package/dist/vendor/lp-v3/types.d.ts +131 -0
- package/dist/vendor/lp-v3/types.js +6 -0
- package/dist/vendor/lp-v3/v4-math.d.ts +18 -0
- package/dist/vendor/lp-v3/v4-math.js +90 -0
- package/dist/yield-deposit-definition.d.ts +374 -0
- package/dist/yield-deposit-definition.js +123 -0
- package/dist/yield-deposit.d.ts +16 -0
- package/dist/yield-deposit.js +149 -0
- package/dist/yield-route-semantics.d.ts +27 -0
- package/dist/yield-route-semantics.js +71 -0
- package/dist/yield-withdraw-definition.d.ts +357 -0
- package/dist/yield-withdraw-definition.js +90 -0
- package/dist/yield-withdraw.d.ts +11 -0
- package/dist/yield-withdraw.js +122 -0
- package/package.json +239 -7
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server-owned yield execution registry.
|
|
3
|
+
*
|
|
4
|
+
* The dApp's server route and TEA import the exact same records. Discovery can
|
|
5
|
+
* attach APY data to a record, but it cannot create or mutate execution
|
|
6
|
+
* eligibility. The canonical commitment is server-only (both consumers run in
|
|
7
|
+
* Node) and covers the complete registry record, including nested fields.
|
|
8
|
+
*/
|
|
9
|
+
export type ExecutableYieldAction = 'deposit' | 'withdraw';
|
|
10
|
+
export type ExecutableYieldCall = 'approve' | 'supply' | 'deposit' | 'withdraw' | 'redeem';
|
|
11
|
+
interface ExecutableYieldMarketBase {
|
|
12
|
+
readonly id: string;
|
|
13
|
+
readonly venue: string;
|
|
14
|
+
readonly chainId: 8453;
|
|
15
|
+
readonly chainSlug: 'base';
|
|
16
|
+
readonly asset: {
|
|
17
|
+
readonly symbol: 'USDC';
|
|
18
|
+
readonly group: 'USDC';
|
|
19
|
+
readonly address: `0x${string}`;
|
|
20
|
+
readonly decimals: 6;
|
|
21
|
+
};
|
|
22
|
+
/** Exact protocol call target (Aave Pool proxy or per-vault Morpho ERC-4626). */
|
|
23
|
+
readonly protocolTarget: `0x${string}`;
|
|
24
|
+
readonly vaultAddress: `0x${string}`;
|
|
25
|
+
readonly nativeValue: '0';
|
|
26
|
+
readonly allowedCallSequences: {
|
|
27
|
+
readonly deposit: readonly (readonly ExecutableYieldCall[])[];
|
|
28
|
+
readonly withdraw: readonly (readonly ExecutableYieldCall[])[];
|
|
29
|
+
};
|
|
30
|
+
readonly safeBinding: {
|
|
31
|
+
readonly executionOwner: 'SAFE';
|
|
32
|
+
readonly depositReceiver: 'SAFE';
|
|
33
|
+
readonly withdrawReceiver: 'SAFE';
|
|
34
|
+
};
|
|
35
|
+
/** Exact Yield Copilot discovery identity that may receive this execution ID. */
|
|
36
|
+
readonly discoveryMarketId: string;
|
|
37
|
+
}
|
|
38
|
+
export type ExecutableYieldMarket = (ExecutableYieldMarketBase & {
|
|
39
|
+
readonly protocol: 'AAVE';
|
|
40
|
+
readonly builder: 'aave-native';
|
|
41
|
+
readonly selectors: {
|
|
42
|
+
readonly approve: `0x${string}`;
|
|
43
|
+
readonly supply: `0x${string}`;
|
|
44
|
+
readonly withdraw: `0x${string}`;
|
|
45
|
+
};
|
|
46
|
+
}) | (ExecutableYieldMarketBase & {
|
|
47
|
+
readonly protocol: 'MORPHO';
|
|
48
|
+
readonly builder: 'morpho-native';
|
|
49
|
+
/** Pinned ERC-4626 share-token decimals for exact `redeem(max)` accounting. */
|
|
50
|
+
readonly vaultShareDecimals: 18;
|
|
51
|
+
readonly selectors: {
|
|
52
|
+
readonly approve: `0x${string}`;
|
|
53
|
+
readonly deposit: `0x${string}`;
|
|
54
|
+
readonly withdraw: `0x${string}`;
|
|
55
|
+
readonly redeem: `0x${string}`;
|
|
56
|
+
};
|
|
57
|
+
});
|
|
58
|
+
export declare const BASE_USDC_AAVE_V3_MARKET: {
|
|
59
|
+
readonly id: "base-usdc-aave-v3";
|
|
60
|
+
readonly venue: "AAVE V3";
|
|
61
|
+
readonly protocol: "AAVE";
|
|
62
|
+
readonly chainId: 8453;
|
|
63
|
+
readonly chainSlug: "base";
|
|
64
|
+
readonly asset: {
|
|
65
|
+
readonly symbol: "USDC";
|
|
66
|
+
readonly group: "USDC";
|
|
67
|
+
readonly address: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
|
|
68
|
+
readonly decimals: 6;
|
|
69
|
+
};
|
|
70
|
+
readonly protocolTarget: "0xA238Dd80C259a72e81d7e4664a9801593F98d1c5";
|
|
71
|
+
readonly vaultAddress: "0xA238Dd80C259a72e81d7e4664a9801593F98d1c5";
|
|
72
|
+
readonly nativeValue: "0";
|
|
73
|
+
readonly builder: "aave-native";
|
|
74
|
+
readonly selectors: {
|
|
75
|
+
readonly approve: "0x095ea7b3";
|
|
76
|
+
readonly supply: "0x617ba037";
|
|
77
|
+
readonly withdraw: "0x69328dec";
|
|
78
|
+
};
|
|
79
|
+
readonly allowedCallSequences: {
|
|
80
|
+
readonly deposit: readonly [readonly ["approve", "supply"], readonly ["supply"]];
|
|
81
|
+
readonly withdraw: readonly [readonly ["withdraw"]];
|
|
82
|
+
};
|
|
83
|
+
readonly safeBinding: {
|
|
84
|
+
readonly executionOwner: "SAFE";
|
|
85
|
+
readonly depositReceiver: "SAFE";
|
|
86
|
+
readonly withdrawReceiver: "SAFE";
|
|
87
|
+
};
|
|
88
|
+
readonly discoveryMarketId: "aave:8453:0xa238dd80c259a72e81d7e4664a9801593f98d1c5:0x833589fcd6edb6e08f4c7c32d4f71b54bda02913";
|
|
89
|
+
};
|
|
90
|
+
export declare const BASE_USDC_MORPHO_GAUNTLET_PRIME_MARKET: {
|
|
91
|
+
readonly id: "base-usdc-morpho-gauntlet-prime";
|
|
92
|
+
readonly venue: "MORPHO · GAUNTLET USDC PRIME";
|
|
93
|
+
readonly protocol: "MORPHO";
|
|
94
|
+
readonly chainId: 8453;
|
|
95
|
+
readonly chainSlug: "base";
|
|
96
|
+
readonly asset: {
|
|
97
|
+
readonly symbol: "USDC";
|
|
98
|
+
readonly group: "USDC";
|
|
99
|
+
readonly address: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
|
|
100
|
+
readonly decimals: 6;
|
|
101
|
+
};
|
|
102
|
+
readonly protocolTarget: "0xeE8F4eC5672F09119b96Ab6fB59C27E1b7e44b61";
|
|
103
|
+
readonly vaultAddress: "0xeE8F4eC5672F09119b96Ab6fB59C27E1b7e44b61";
|
|
104
|
+
readonly vaultShareDecimals: 18;
|
|
105
|
+
readonly nativeValue: "0";
|
|
106
|
+
readonly builder: "morpho-native";
|
|
107
|
+
readonly selectors: {
|
|
108
|
+
readonly approve: "0x095ea7b3";
|
|
109
|
+
readonly deposit: "0x6e553f65";
|
|
110
|
+
readonly withdraw: "0xb460af94";
|
|
111
|
+
readonly redeem: "0xba087652";
|
|
112
|
+
};
|
|
113
|
+
readonly allowedCallSequences: {
|
|
114
|
+
readonly deposit: readonly [readonly ["approve", "deposit"], readonly ["deposit"]];
|
|
115
|
+
readonly withdraw: readonly [readonly ["withdraw"], readonly ["redeem"]];
|
|
116
|
+
};
|
|
117
|
+
readonly safeBinding: {
|
|
118
|
+
readonly executionOwner: "SAFE";
|
|
119
|
+
readonly depositReceiver: "SAFE";
|
|
120
|
+
readonly withdrawReceiver: "SAFE";
|
|
121
|
+
};
|
|
122
|
+
readonly discoveryMarketId: "morpho:8453:0xee8f4ec5672f09119b96ab6fb59c27e1b7e44b61:0x833589fcd6edb6e08f4c7c32d4f71b54bda02913";
|
|
123
|
+
};
|
|
124
|
+
export declare const BASE_USDC_MORPHO_STEAKHOUSE_PRIME_MARKET: {
|
|
125
|
+
readonly id: "base-usdc-morpho-steakhouse-prime";
|
|
126
|
+
readonly venue: "MORPHO · STEAKHOUSE PRIME USDC";
|
|
127
|
+
readonly protocol: "MORPHO";
|
|
128
|
+
readonly chainId: 8453;
|
|
129
|
+
readonly chainSlug: "base";
|
|
130
|
+
readonly asset: {
|
|
131
|
+
readonly symbol: "USDC";
|
|
132
|
+
readonly group: "USDC";
|
|
133
|
+
readonly address: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
|
|
134
|
+
readonly decimals: 6;
|
|
135
|
+
};
|
|
136
|
+
readonly protocolTarget: "0xBEEFE94c8aD530842bfE7d8B397938fFc1cb83b2";
|
|
137
|
+
readonly vaultAddress: "0xBEEFE94c8aD530842bfE7d8B397938fFc1cb83b2";
|
|
138
|
+
readonly vaultShareDecimals: 18;
|
|
139
|
+
readonly nativeValue: "0";
|
|
140
|
+
readonly builder: "morpho-native";
|
|
141
|
+
readonly selectors: {
|
|
142
|
+
readonly approve: "0x095ea7b3";
|
|
143
|
+
readonly deposit: "0x6e553f65";
|
|
144
|
+
readonly withdraw: "0xb460af94";
|
|
145
|
+
readonly redeem: "0xba087652";
|
|
146
|
+
};
|
|
147
|
+
readonly allowedCallSequences: {
|
|
148
|
+
readonly deposit: readonly [readonly ["approve", "deposit"], readonly ["deposit"]];
|
|
149
|
+
readonly withdraw: readonly [readonly ["withdraw"], readonly ["redeem"]];
|
|
150
|
+
};
|
|
151
|
+
readonly safeBinding: {
|
|
152
|
+
readonly executionOwner: "SAFE";
|
|
153
|
+
readonly depositReceiver: "SAFE";
|
|
154
|
+
readonly withdrawReceiver: "SAFE";
|
|
155
|
+
};
|
|
156
|
+
readonly discoveryMarketId: "morpho:8453:0xbeefe94c8ad530842bfe7d8b397938ffc1cb83b2:0x833589fcd6edb6e08f4c7c32d4f71b54bda02913";
|
|
157
|
+
};
|
|
158
|
+
export declare const EXECUTABLE_YIELD_MARKETS: readonly [{
|
|
159
|
+
readonly id: "base-usdc-aave-v3";
|
|
160
|
+
readonly venue: "AAVE V3";
|
|
161
|
+
readonly protocol: "AAVE";
|
|
162
|
+
readonly chainId: 8453;
|
|
163
|
+
readonly chainSlug: "base";
|
|
164
|
+
readonly asset: {
|
|
165
|
+
readonly symbol: "USDC";
|
|
166
|
+
readonly group: "USDC";
|
|
167
|
+
readonly address: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
|
|
168
|
+
readonly decimals: 6;
|
|
169
|
+
};
|
|
170
|
+
readonly protocolTarget: "0xA238Dd80C259a72e81d7e4664a9801593F98d1c5";
|
|
171
|
+
readonly vaultAddress: "0xA238Dd80C259a72e81d7e4664a9801593F98d1c5";
|
|
172
|
+
readonly nativeValue: "0";
|
|
173
|
+
readonly builder: "aave-native";
|
|
174
|
+
readonly selectors: {
|
|
175
|
+
readonly approve: "0x095ea7b3";
|
|
176
|
+
readonly supply: "0x617ba037";
|
|
177
|
+
readonly withdraw: "0x69328dec";
|
|
178
|
+
};
|
|
179
|
+
readonly allowedCallSequences: {
|
|
180
|
+
readonly deposit: readonly [readonly ["approve", "supply"], readonly ["supply"]];
|
|
181
|
+
readonly withdraw: readonly [readonly ["withdraw"]];
|
|
182
|
+
};
|
|
183
|
+
readonly safeBinding: {
|
|
184
|
+
readonly executionOwner: "SAFE";
|
|
185
|
+
readonly depositReceiver: "SAFE";
|
|
186
|
+
readonly withdrawReceiver: "SAFE";
|
|
187
|
+
};
|
|
188
|
+
readonly discoveryMarketId: "aave:8453:0xa238dd80c259a72e81d7e4664a9801593f98d1c5:0x833589fcd6edb6e08f4c7c32d4f71b54bda02913";
|
|
189
|
+
}, {
|
|
190
|
+
readonly id: "base-usdc-morpho-gauntlet-prime";
|
|
191
|
+
readonly venue: "MORPHO · GAUNTLET USDC PRIME";
|
|
192
|
+
readonly protocol: "MORPHO";
|
|
193
|
+
readonly chainId: 8453;
|
|
194
|
+
readonly chainSlug: "base";
|
|
195
|
+
readonly asset: {
|
|
196
|
+
readonly symbol: "USDC";
|
|
197
|
+
readonly group: "USDC";
|
|
198
|
+
readonly address: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
|
|
199
|
+
readonly decimals: 6;
|
|
200
|
+
};
|
|
201
|
+
readonly protocolTarget: "0xeE8F4eC5672F09119b96Ab6fB59C27E1b7e44b61";
|
|
202
|
+
readonly vaultAddress: "0xeE8F4eC5672F09119b96Ab6fB59C27E1b7e44b61";
|
|
203
|
+
readonly vaultShareDecimals: 18;
|
|
204
|
+
readonly nativeValue: "0";
|
|
205
|
+
readonly builder: "morpho-native";
|
|
206
|
+
readonly selectors: {
|
|
207
|
+
readonly approve: "0x095ea7b3";
|
|
208
|
+
readonly deposit: "0x6e553f65";
|
|
209
|
+
readonly withdraw: "0xb460af94";
|
|
210
|
+
readonly redeem: "0xba087652";
|
|
211
|
+
};
|
|
212
|
+
readonly allowedCallSequences: {
|
|
213
|
+
readonly deposit: readonly [readonly ["approve", "deposit"], readonly ["deposit"]];
|
|
214
|
+
readonly withdraw: readonly [readonly ["withdraw"], readonly ["redeem"]];
|
|
215
|
+
};
|
|
216
|
+
readonly safeBinding: {
|
|
217
|
+
readonly executionOwner: "SAFE";
|
|
218
|
+
readonly depositReceiver: "SAFE";
|
|
219
|
+
readonly withdrawReceiver: "SAFE";
|
|
220
|
+
};
|
|
221
|
+
readonly discoveryMarketId: "morpho:8453:0xee8f4ec5672f09119b96ab6fb59c27e1b7e44b61:0x833589fcd6edb6e08f4c7c32d4f71b54bda02913";
|
|
222
|
+
}, {
|
|
223
|
+
readonly id: "base-usdc-morpho-steakhouse-prime";
|
|
224
|
+
readonly venue: "MORPHO · STEAKHOUSE PRIME USDC";
|
|
225
|
+
readonly protocol: "MORPHO";
|
|
226
|
+
readonly chainId: 8453;
|
|
227
|
+
readonly chainSlug: "base";
|
|
228
|
+
readonly asset: {
|
|
229
|
+
readonly symbol: "USDC";
|
|
230
|
+
readonly group: "USDC";
|
|
231
|
+
readonly address: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
|
|
232
|
+
readonly decimals: 6;
|
|
233
|
+
};
|
|
234
|
+
readonly protocolTarget: "0xBEEFE94c8aD530842bfE7d8B397938fFc1cb83b2";
|
|
235
|
+
readonly vaultAddress: "0xBEEFE94c8aD530842bfE7d8B397938fFc1cb83b2";
|
|
236
|
+
readonly vaultShareDecimals: 18;
|
|
237
|
+
readonly nativeValue: "0";
|
|
238
|
+
readonly builder: "morpho-native";
|
|
239
|
+
readonly selectors: {
|
|
240
|
+
readonly approve: "0x095ea7b3";
|
|
241
|
+
readonly deposit: "0x6e553f65";
|
|
242
|
+
readonly withdraw: "0xb460af94";
|
|
243
|
+
readonly redeem: "0xba087652";
|
|
244
|
+
};
|
|
245
|
+
readonly allowedCallSequences: {
|
|
246
|
+
readonly deposit: readonly [readonly ["approve", "deposit"], readonly ["deposit"]];
|
|
247
|
+
readonly withdraw: readonly [readonly ["withdraw"], readonly ["redeem"]];
|
|
248
|
+
};
|
|
249
|
+
readonly safeBinding: {
|
|
250
|
+
readonly executionOwner: "SAFE";
|
|
251
|
+
readonly depositReceiver: "SAFE";
|
|
252
|
+
readonly withdrawReceiver: "SAFE";
|
|
253
|
+
};
|
|
254
|
+
readonly discoveryMarketId: "morpho:8453:0xbeefe94c8ad530842bfe7d8b397938ffc1cb83b2:0x833589fcd6edb6e08f4c7c32d4f71b54bda02913";
|
|
255
|
+
}];
|
|
256
|
+
export type ExecutableYieldMarketId = (typeof EXECUTABLE_YIELD_MARKETS)[number]['id'];
|
|
257
|
+
export type ExecutableYieldMarketCommitment = `sha256:${string}`;
|
|
258
|
+
/** SHA-256 commitment over every enumerable field in the complete, canonical registry record. */
|
|
259
|
+
export declare function getExecutableYieldMarketCommitment(market: ExecutableYieldMarket): ExecutableYieldMarketCommitment;
|
|
260
|
+
export declare function getExecutableYieldMarket(marketId: string): ExecutableYieldMarket | null;
|
|
261
|
+
export {};
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server-owned yield execution registry.
|
|
3
|
+
*
|
|
4
|
+
* The dApp's server route and TEA import the exact same records. Discovery can
|
|
5
|
+
* attach APY data to a record, but it cannot create or mutate execution
|
|
6
|
+
* eligibility. The canonical commitment is server-only (both consumers run in
|
|
7
|
+
* Node) and covers the complete registry record, including nested fields.
|
|
8
|
+
*/
|
|
9
|
+
import { createHash } from 'node:crypto';
|
|
10
|
+
function deepFreeze(value) {
|
|
11
|
+
if (value && typeof value === 'object' && !Object.isFrozen(value)) {
|
|
12
|
+
for (const nested of Object.values(value))
|
|
13
|
+
deepFreeze(nested);
|
|
14
|
+
Object.freeze(value);
|
|
15
|
+
}
|
|
16
|
+
return value;
|
|
17
|
+
}
|
|
18
|
+
export const BASE_USDC_AAVE_V3_MARKET = deepFreeze({
|
|
19
|
+
id: 'base-usdc-aave-v3',
|
|
20
|
+
venue: 'AAVE V3',
|
|
21
|
+
protocol: 'AAVE',
|
|
22
|
+
chainId: 8453,
|
|
23
|
+
chainSlug: 'base',
|
|
24
|
+
asset: {
|
|
25
|
+
symbol: 'USDC',
|
|
26
|
+
group: 'USDC',
|
|
27
|
+
address: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',
|
|
28
|
+
decimals: 6,
|
|
29
|
+
},
|
|
30
|
+
protocolTarget: '0xA238Dd80C259a72e81d7e4664a9801593F98d1c5',
|
|
31
|
+
vaultAddress: '0xA238Dd80C259a72e81d7e4664a9801593F98d1c5',
|
|
32
|
+
nativeValue: '0',
|
|
33
|
+
builder: 'aave-native',
|
|
34
|
+
selectors: {
|
|
35
|
+
approve: '0x095ea7b3',
|
|
36
|
+
supply: '0x617ba037',
|
|
37
|
+
withdraw: '0x69328dec',
|
|
38
|
+
},
|
|
39
|
+
// An existing exact allowance lets the SDK omit approve. No other leg is valid.
|
|
40
|
+
allowedCallSequences: {
|
|
41
|
+
deposit: [['approve', 'supply'], ['supply']],
|
|
42
|
+
withdraw: [['withdraw']],
|
|
43
|
+
},
|
|
44
|
+
safeBinding: {
|
|
45
|
+
executionOwner: 'SAFE',
|
|
46
|
+
depositReceiver: 'SAFE',
|
|
47
|
+
withdrawReceiver: 'SAFE',
|
|
48
|
+
},
|
|
49
|
+
discoveryMarketId: 'aave:8453:0xa238dd80c259a72e81d7e4664a9801593f98d1c5:0x833589fcd6edb6e08f4c7c32d4f71b54bda02913',
|
|
50
|
+
});
|
|
51
|
+
export const BASE_USDC_MORPHO_GAUNTLET_PRIME_MARKET = deepFreeze({
|
|
52
|
+
id: 'base-usdc-morpho-gauntlet-prime',
|
|
53
|
+
venue: 'MORPHO · GAUNTLET USDC PRIME',
|
|
54
|
+
protocol: 'MORPHO',
|
|
55
|
+
chainId: 8453,
|
|
56
|
+
chainSlug: 'base',
|
|
57
|
+
asset: {
|
|
58
|
+
symbol: 'USDC',
|
|
59
|
+
group: 'USDC',
|
|
60
|
+
address: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',
|
|
61
|
+
decimals: 6,
|
|
62
|
+
},
|
|
63
|
+
protocolTarget: '0xeE8F4eC5672F09119b96Ab6fB59C27E1b7e44b61',
|
|
64
|
+
vaultAddress: '0xeE8F4eC5672F09119b96Ab6fB59C27E1b7e44b61',
|
|
65
|
+
vaultShareDecimals: 18,
|
|
66
|
+
nativeValue: '0',
|
|
67
|
+
builder: 'morpho-native',
|
|
68
|
+
selectors: {
|
|
69
|
+
approve: '0x095ea7b3',
|
|
70
|
+
deposit: '0x6e553f65',
|
|
71
|
+
withdraw: '0xb460af94',
|
|
72
|
+
redeem: '0xba087652',
|
|
73
|
+
},
|
|
74
|
+
allowedCallSequences: {
|
|
75
|
+
deposit: [['approve', 'deposit'], ['deposit']],
|
|
76
|
+
withdraw: [['withdraw'], ['redeem']],
|
|
77
|
+
},
|
|
78
|
+
safeBinding: {
|
|
79
|
+
executionOwner: 'SAFE',
|
|
80
|
+
depositReceiver: 'SAFE',
|
|
81
|
+
withdrawReceiver: 'SAFE',
|
|
82
|
+
},
|
|
83
|
+
discoveryMarketId: 'morpho:8453:0xee8f4ec5672f09119b96ab6fb59c27e1b7e44b61:0x833589fcd6edb6e08f4c7c32d4f71b54bda02913',
|
|
84
|
+
});
|
|
85
|
+
export const BASE_USDC_MORPHO_STEAKHOUSE_PRIME_MARKET = deepFreeze({
|
|
86
|
+
id: 'base-usdc-morpho-steakhouse-prime',
|
|
87
|
+
venue: 'MORPHO · STEAKHOUSE PRIME USDC',
|
|
88
|
+
protocol: 'MORPHO',
|
|
89
|
+
chainId: 8453,
|
|
90
|
+
chainSlug: 'base',
|
|
91
|
+
asset: {
|
|
92
|
+
symbol: 'USDC',
|
|
93
|
+
group: 'USDC',
|
|
94
|
+
address: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',
|
|
95
|
+
decimals: 6,
|
|
96
|
+
},
|
|
97
|
+
protocolTarget: '0xBEEFE94c8aD530842bfE7d8B397938fFc1cb83b2',
|
|
98
|
+
vaultAddress: '0xBEEFE94c8aD530842bfE7d8B397938fFc1cb83b2',
|
|
99
|
+
vaultShareDecimals: 18,
|
|
100
|
+
nativeValue: '0',
|
|
101
|
+
builder: 'morpho-native',
|
|
102
|
+
selectors: {
|
|
103
|
+
approve: '0x095ea7b3',
|
|
104
|
+
deposit: '0x6e553f65',
|
|
105
|
+
withdraw: '0xb460af94',
|
|
106
|
+
redeem: '0xba087652',
|
|
107
|
+
},
|
|
108
|
+
allowedCallSequences: {
|
|
109
|
+
deposit: [['approve', 'deposit'], ['deposit']],
|
|
110
|
+
withdraw: [['withdraw'], ['redeem']],
|
|
111
|
+
},
|
|
112
|
+
safeBinding: {
|
|
113
|
+
executionOwner: 'SAFE',
|
|
114
|
+
depositReceiver: 'SAFE',
|
|
115
|
+
withdrawReceiver: 'SAFE',
|
|
116
|
+
},
|
|
117
|
+
discoveryMarketId: 'morpho:8453:0xbeefe94c8ad530842bfe7d8b397938ffc1cb83b2:0x833589fcd6edb6e08f4c7c32d4f71b54bda02913',
|
|
118
|
+
});
|
|
119
|
+
export const EXECUTABLE_YIELD_MARKETS = deepFreeze([
|
|
120
|
+
BASE_USDC_AAVE_V3_MARKET,
|
|
121
|
+
BASE_USDC_MORPHO_GAUNTLET_PRIME_MARKET,
|
|
122
|
+
BASE_USDC_MORPHO_STEAKHOUSE_PRIME_MARKET,
|
|
123
|
+
]);
|
|
124
|
+
function canonicalJson(value) {
|
|
125
|
+
if (value === null || typeof value === 'string' || typeof value === 'boolean') {
|
|
126
|
+
return JSON.stringify(value);
|
|
127
|
+
}
|
|
128
|
+
if (typeof value === 'number') {
|
|
129
|
+
if (!Number.isFinite(value))
|
|
130
|
+
throw new Error('executable yield registry contains a non-finite number');
|
|
131
|
+
return JSON.stringify(value);
|
|
132
|
+
}
|
|
133
|
+
if (Array.isArray(value))
|
|
134
|
+
return `[${value.map(canonicalJson).join(',')}]`;
|
|
135
|
+
if (typeof value === 'object') {
|
|
136
|
+
const entries = Object.entries(value).sort(([left], [right]) => left.localeCompare(right));
|
|
137
|
+
return `{${entries
|
|
138
|
+
.map(([key, nested]) => `${JSON.stringify(key)}:${canonicalJson(nested)}`)
|
|
139
|
+
.join(',')}}`;
|
|
140
|
+
}
|
|
141
|
+
throw new Error('executable yield registry contains a non-canonical value');
|
|
142
|
+
}
|
|
143
|
+
/** SHA-256 commitment over every enumerable field in the complete, canonical registry record. */
|
|
144
|
+
export function getExecutableYieldMarketCommitment(market) {
|
|
145
|
+
const canonical = canonicalJson(market);
|
|
146
|
+
const digest = createHash('sha256')
|
|
147
|
+
.update(`otto:executable-yield-market:v1:${canonical}`, 'utf8')
|
|
148
|
+
.digest('hex');
|
|
149
|
+
return `sha256:${digest}`;
|
|
150
|
+
}
|
|
151
|
+
export function getExecutableYieldMarket(marketId) {
|
|
152
|
+
return EXECUTABLE_YIELD_MARKETS.find((market) => market.id === marketId) ?? null;
|
|
153
|
+
}
|
|
154
|
+
//# sourceMappingURL=executable-yield-markets.js.map
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { type PublicClient } from 'viem';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
declare const callsSchema: z.ZodArray<z.ZodObject<{
|
|
4
|
+
to: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
5
|
+
data: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
6
|
+
value: z.ZodString;
|
|
7
|
+
}, z.core.$strict>>;
|
|
8
|
+
declare const bindingSchema: z.ZodObject<{
|
|
9
|
+
account: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
10
|
+
chainId: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<8453>, z.ZodLiteral<42161>, z.ZodLiteral<10>, z.ZodLiteral<137>]>;
|
|
11
|
+
entryPoint: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
12
|
+
calls: z.ZodArray<z.ZodObject<{
|
|
13
|
+
to: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
14
|
+
data: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
15
|
+
value: z.ZodString;
|
|
16
|
+
}, z.core.$strict>>;
|
|
17
|
+
}, z.core.$strict>;
|
|
18
|
+
declare const priceSchema: z.ZodObject<{
|
|
19
|
+
amountAtomic: z.ZodString;
|
|
20
|
+
decimals: z.ZodNumber;
|
|
21
|
+
observedAtMs: z.ZodNumber;
|
|
22
|
+
expiresAtMs: z.ZodNumber;
|
|
23
|
+
}, z.core.$strict>;
|
|
24
|
+
declare const sponsorSchema: z.ZodObject<{
|
|
25
|
+
paymaster: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
26
|
+
sponsorshipPolicyId: z.ZodString;
|
|
27
|
+
}, z.core.$strict>;
|
|
28
|
+
export type AccountGasQuoteCall = z.input<typeof callsSchema>[number];
|
|
29
|
+
export type AccountGasQuoteBinding = Omit<z.input<typeof bindingSchema>, 'calls'> & {
|
|
30
|
+
calls: readonly AccountGasQuoteCall[];
|
|
31
|
+
};
|
|
32
|
+
export type AccountGasQuoteUsdPrice = z.input<typeof priceSchema>;
|
|
33
|
+
/** The block anchor covers balance, deposit and nonce only. The bundler estimate has no block parameter. */
|
|
34
|
+
export declare const ACCOUNT_GAS_QUOTE_SCHEMA: z.ZodObject<{
|
|
35
|
+
version: z.ZodLiteral<1>;
|
|
36
|
+
kind: z.ZodLiteral<"estimate">;
|
|
37
|
+
payer: z.ZodLiteral<"user">;
|
|
38
|
+
account: z.ZodString;
|
|
39
|
+
chainId: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<8453>, z.ZodLiteral<42161>, z.ZodLiteral<10>, z.ZodLiteral<137>]>;
|
|
40
|
+
entryPoint: z.ZodString;
|
|
41
|
+
nativeAsset: z.ZodObject<{
|
|
42
|
+
symbol: z.ZodEnum<{
|
|
43
|
+
ETH: "ETH";
|
|
44
|
+
POL: "POL";
|
|
45
|
+
}>;
|
|
46
|
+
decimals: z.ZodLiteral<18>;
|
|
47
|
+
}, z.core.$strict>;
|
|
48
|
+
callsCommitment: z.ZodString;
|
|
49
|
+
nonce: z.ZodString;
|
|
50
|
+
blockNumber: z.ZodString;
|
|
51
|
+
blockHash: z.ZodString;
|
|
52
|
+
blockTimestampMs: z.ZodNumber;
|
|
53
|
+
observedAtMs: z.ZodNumber;
|
|
54
|
+
expiresAtMs: z.ZodNumber;
|
|
55
|
+
simulation: z.ZodLiteral<"sender-balance-override">;
|
|
56
|
+
providerEstimate: z.ZodObject<{
|
|
57
|
+
blockAnchor: z.ZodLiteral<"unanchored">;
|
|
58
|
+
startedAtMs: z.ZodNumber;
|
|
59
|
+
completedAtMs: z.ZodNumber;
|
|
60
|
+
elapsedMs: z.ZodNumber;
|
|
61
|
+
}, z.core.$strict>;
|
|
62
|
+
gas: z.ZodObject<{
|
|
63
|
+
callGasLimit: z.ZodString;
|
|
64
|
+
verificationGasLimit: z.ZodString;
|
|
65
|
+
preVerificationGas: z.ZodString;
|
|
66
|
+
maxFeePerGasWei: z.ZodString;
|
|
67
|
+
maxPriorityFeePerGasWei: z.ZodString;
|
|
68
|
+
estimatedPrefundWei: z.ZodString;
|
|
69
|
+
reserveWei: z.ZodString;
|
|
70
|
+
estimatedRequiredWei: z.ZodString;
|
|
71
|
+
reserveBps: z.ZodLiteral<"2500">;
|
|
72
|
+
}, z.core.$strict>;
|
|
73
|
+
balance: z.ZodObject<{
|
|
74
|
+
nativeWei: z.ZodString;
|
|
75
|
+
entryPointDepositWei: z.ZodString;
|
|
76
|
+
callValueWei: z.ZodString;
|
|
77
|
+
depositAppliedToGasWei: z.ZodString;
|
|
78
|
+
walletGasRequirementWei: z.ZodString;
|
|
79
|
+
nativeAvailableForGasWei: z.ZodString;
|
|
80
|
+
gasShortfallWei: z.ZodString;
|
|
81
|
+
requiredNativeWei: z.ZodString;
|
|
82
|
+
shortfallWei: z.ZodString;
|
|
83
|
+
}, z.core.$strict>;
|
|
84
|
+
usdPrice: z.ZodOptional<z.ZodObject<{
|
|
85
|
+
amountAtomic: z.ZodString;
|
|
86
|
+
decimals: z.ZodNumber;
|
|
87
|
+
observedAtMs: z.ZodNumber;
|
|
88
|
+
expiresAtMs: z.ZodNumber;
|
|
89
|
+
}, z.core.$strict>>;
|
|
90
|
+
estimatedGasCostUsdMicros: z.ZodOptional<z.ZodString>;
|
|
91
|
+
sponsoredEstimate: z.ZodOptional<z.ZodObject<{
|
|
92
|
+
kind: z.ZodLiteral<"estimate">;
|
|
93
|
+
simulation: z.ZodLiteral<"paymaster-stub">;
|
|
94
|
+
entryPointVersion: z.ZodLiteral<"0.6">;
|
|
95
|
+
paymaster: z.ZodString;
|
|
96
|
+
sponsorshipPolicyId: z.ZodString;
|
|
97
|
+
paymasterAndDataCommitment: z.ZodString;
|
|
98
|
+
providerEstimate: z.ZodObject<{
|
|
99
|
+
blockAnchor: z.ZodLiteral<"unanchored">;
|
|
100
|
+
startedAtMs: z.ZodNumber;
|
|
101
|
+
completedAtMs: z.ZodNumber;
|
|
102
|
+
elapsedMs: z.ZodNumber;
|
|
103
|
+
}, z.core.$strict>;
|
|
104
|
+
gas: z.ZodObject<{
|
|
105
|
+
callGasLimit: z.ZodString;
|
|
106
|
+
verificationGasLimit: z.ZodString;
|
|
107
|
+
preVerificationGas: z.ZodString;
|
|
108
|
+
maxFeePerGasWei: z.ZodString;
|
|
109
|
+
maxPriorityFeePerGasWei: z.ZodString;
|
|
110
|
+
verificationGasMultiplier: z.ZodLiteral<"3">;
|
|
111
|
+
estimatedPrefundWei: z.ZodString;
|
|
112
|
+
reserveWei: z.ZodString;
|
|
113
|
+
estimatedRequiredWei: z.ZodString;
|
|
114
|
+
reserveBps: z.ZodLiteral<"2500">;
|
|
115
|
+
}, z.core.$strict>;
|
|
116
|
+
estimatedGasCostUsdMicros: z.ZodOptional<z.ZodString>;
|
|
117
|
+
}, z.core.$strict>>;
|
|
118
|
+
}, z.core.$strict>;
|
|
119
|
+
export type AccountGasQuote = z.infer<typeof ACCOUNT_GAS_QUOTE_SCHEMA>;
|
|
120
|
+
export declare class AccountGasQuoteError extends Error {
|
|
121
|
+
readonly code = "ACCOUNT_GAS_QUOTE_UNAVAILABLE";
|
|
122
|
+
constructor(message?: string);
|
|
123
|
+
}
|
|
124
|
+
export declare function accountGasCallsCommitment(calls: readonly AccountGasQuoteCall[]): string;
|
|
125
|
+
export interface PrepareAccountGasQuoteInput extends AccountGasQuoteBinding {
|
|
126
|
+
client: PublicClient;
|
|
127
|
+
/** Operator-configured Pimlico endpoint. Kept out of quotes, hashes and errors. */
|
|
128
|
+
paymasterUrl: string;
|
|
129
|
+
fetch?: typeof globalThis.fetch;
|
|
130
|
+
nowMs?: () => number;
|
|
131
|
+
monotonicNowMs?: () => number;
|
|
132
|
+
/** Optional separately sourced advisory USD price. Missing means unavailable, never zero. */
|
|
133
|
+
usdPrice?: AccountGasQuoteUsdPrice;
|
|
134
|
+
/** Already reviewed source activation identity, never selected by the end user. */
|
|
135
|
+
sponsor?: z.input<typeof sponsorSchema>;
|
|
136
|
+
}
|
|
137
|
+
/** No signer, paymaster sponsorship, submission, account authority or account code reads. */
|
|
138
|
+
export declare function prepareAccountGasQuote(input: PrepareAccountGasQuoteInput): Promise<AccountGasQuote>;
|
|
139
|
+
/** Call synchronously at request start. Persisted copies retain wall-clock expiry but no process-local clock proof. */
|
|
140
|
+
export declare function assertFreshAccountGasQuote(value: AccountGasQuote, input: AccountGasQuoteBinding, nowMs?: number): void;
|
|
141
|
+
export {};
|