@rhinestone/sdk 2.5.0 → 2.7.0

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.
Files changed (87) hide show
  1. package/dist/src/accounts/adapters/kernel.d.ts +0 -1
  2. package/dist/src/accounts/adapters/kernel.d.ts.map +1 -1
  3. package/dist/src/accounts/adapters/kernel.js +1 -13
  4. package/dist/src/accounts/kernel-signing.d.ts +3 -0
  5. package/dist/src/accounts/kernel-signing.d.ts.map +1 -0
  6. package/dist/src/accounts/kernel-signing.js +13 -0
  7. package/dist/src/api/account.d.ts.map +1 -1
  8. package/dist/src/api/account.js +118 -0
  9. package/dist/src/api/compose-types.d.ts +7 -0
  10. package/dist/src/api/compose-types.d.ts.map +1 -1
  11. package/dist/src/api/direct-signing.d.ts.map +1 -1
  12. package/dist/src/api/direct-signing.js +11 -6
  13. package/dist/src/api/signer-selection.js +11 -0
  14. package/dist/src/clients/orchestrator/client.js +1 -1
  15. package/dist/src/clients/orchestrator/public.d.ts +8 -1
  16. package/dist/src/clients/orchestrator/public.d.ts.map +1 -1
  17. package/dist/src/clients/orchestrator/types.d.ts +6 -0
  18. package/dist/src/clients/orchestrator/types.d.ts.map +1 -1
  19. package/dist/src/config/account.d.ts +152 -7
  20. package/dist/src/config/account.d.ts.map +1 -1
  21. package/dist/src/index.d.ts +2 -2
  22. package/dist/src/index.d.ts.map +1 -1
  23. package/dist/src/modules/validators/capabilities.d.ts.map +1 -1
  24. package/dist/src/modules/validators/capabilities.js +33 -10
  25. package/dist/src/modules/validators/contribution.d.ts.map +1 -1
  26. package/dist/src/modules/validators/contribution.js +12 -0
  27. package/dist/src/modules/validators/definition.d.ts.map +1 -1
  28. package/dist/src/modules/validators/definition.js +18 -0
  29. package/dist/src/modules/validators/permissions.d.ts +13 -0
  30. package/dist/src/modules/validators/permissions.d.ts.map +1 -1
  31. package/dist/src/modules/validators/permissions.js +140 -2
  32. package/dist/src/modules/validators/quorum.d.ts +66 -0
  33. package/dist/src/modules/validators/quorum.d.ts.map +1 -0
  34. package/dist/src/modules/validators/quorum.js +231 -0
  35. package/dist/src/modules/validators/resolve.d.ts.map +1 -1
  36. package/dist/src/modules/validators/resolve.js +5 -0
  37. package/dist/src/modules/validators/smart-sessions/resolve.d.ts.map +1 -1
  38. package/dist/src/modules/validators/smart-sessions/resolve.js +112 -13
  39. package/dist/src/modules/validators/smart-sessions/swap/fynd.d.ts +92 -0
  40. package/dist/src/modules/validators/smart-sessions/swap/fynd.d.ts.map +1 -0
  41. package/dist/src/modules/validators/smart-sessions/swap/fynd.js +101 -0
  42. package/dist/src/modules/validators/smart-sessions/swap/rhinestone.d.ts +147 -0
  43. package/dist/src/modules/validators/smart-sessions/swap/rhinestone.d.ts.map +1 -0
  44. package/dist/src/modules/validators/smart-sessions/swap/rhinestone.js +305 -0
  45. package/dist/src/modules/validators/smart-sessions/swap/rules.d.ts +73 -0
  46. package/dist/src/modules/validators/smart-sessions/swap/rules.d.ts.map +1 -0
  47. package/dist/src/modules/validators/smart-sessions/swap/rules.js +105 -0
  48. package/dist/src/modules/validators/smart-sessions/swap/scope.d.ts +31 -0
  49. package/dist/src/modules/validators/smart-sessions/swap/scope.d.ts.map +1 -0
  50. package/dist/src/modules/validators/smart-sessions/swap/scope.js +168 -0
  51. package/dist/src/modules/validators/smart-sessions/swap/zero-ex.d.ts +143 -0
  52. package/dist/src/modules/validators/smart-sessions/swap/zero-ex.d.ts.map +1 -0
  53. package/dist/src/modules/validators/smart-sessions/swap/zero-ex.js +164 -0
  54. package/dist/src/modules/validators/smart-sessions/types.d.ts +78 -0
  55. package/dist/src/modules/validators/smart-sessions/types.d.ts.map +1 -1
  56. package/dist/src/modules/validators/types.d.ts +26 -3
  57. package/dist/src/modules/validators/types.d.ts.map +1 -1
  58. package/dist/src/signing/hash.d.ts +9 -0
  59. package/dist/src/signing/hash.d.ts.map +1 -0
  60. package/dist/src/signing/hash.js +15 -0
  61. package/dist/src/signing/intent-plans/assemble.d.ts.map +1 -1
  62. package/dist/src/signing/intent-plans/assemble.js +10 -0
  63. package/dist/src/signing/intent-plans/independent.d.ts.map +1 -1
  64. package/dist/src/signing/intent-plans/independent.js +5 -1
  65. package/dist/src/signing/plan.d.ts.map +1 -1
  66. package/dist/src/signing/plan.js +14 -1
  67. package/dist/src/signing/quorum.d.ts +77 -0
  68. package/dist/src/signing/quorum.d.ts.map +1 -0
  69. package/dist/src/signing/quorum.js +52 -0
  70. package/dist/src/signing/signers/ecdsa.d.ts +1 -1
  71. package/dist/src/signing/signers/ecdsa.d.ts.map +1 -1
  72. package/dist/src/signing/signers/ecdsa.js +8 -0
  73. package/dist/src/signing/typed-data.d.ts +12 -6
  74. package/dist/src/signing/typed-data.d.ts.map +1 -1
  75. package/dist/src/signing/typed-data.js +9 -4
  76. package/dist/src/signing/types.d.ts +8 -0
  77. package/dist/src/signing/types.d.ts.map +1 -1
  78. package/dist/src/smart-sessions/index.d.ts +10 -5
  79. package/dist/src/smart-sessions/index.d.ts.map +1 -1
  80. package/dist/src/smart-sessions/index.js +6 -1
  81. package/dist/src/transactions/intents/sign-transaction.d.ts.map +1 -1
  82. package/dist/src/transactions/intents/sign-transaction.js +161 -47
  83. package/dist/src/transactions/user-operations/prepare.d.ts.map +1 -1
  84. package/dist/src/transactions/user-operations/prepare.js +3 -1
  85. package/dist/src/transactions/user-operations/validator-account.d.ts.map +1 -1
  86. package/dist/src/transactions/user-operations/validator-account.js +4 -0
  87. package/package.json +5 -1
@@ -0,0 +1,168 @@
1
+ import { scopeFynd } from './fynd.js';
2
+ import { rhinestoneSwap, scopeRhinestone } from './rhinestone.js';
3
+ import { scopeZeroEx } from './zero-ex.js';
4
+ const erc20ApproveAbi = [
5
+ {
6
+ type: 'function',
7
+ name: 'approve',
8
+ stateMutability: 'nonpayable',
9
+ inputs: [
10
+ { name: 'spender', type: 'address' },
11
+ { name: 'amount', type: 'uint256' },
12
+ ],
13
+ outputs: [{ name: '', type: 'bool' }],
14
+ },
15
+ ];
16
+ /**
17
+ * One approve permission covering every venue's spender.
18
+ *
19
+ * Merged rather than one-per-venue because all venues pull the same sell token;
20
+ * a single action with a spender allowlist is cheaper to install and keeps the
21
+ * spending-limit a single shared counter instead of one budget per venue.
22
+ */
23
+ function approvePermission(scope, scopings) {
24
+ const spenders = [
25
+ ...new Set(scopings.flatMap((s) => s.approveSpenders.map((a) => a.toLowerCase()))),
26
+ ].map((s) => s);
27
+ return {
28
+ abi: erc20ApproveAbi,
29
+ address: scope.sell.token,
30
+ functions: {
31
+ approve: {
32
+ ...(scope.sell.maxTotal !== undefined
33
+ ? {
34
+ spendingLimit: {
35
+ token: scope.sell.token,
36
+ amount: scope.sell.maxTotal,
37
+ },
38
+ }
39
+ : {}),
40
+ params: {
41
+ spender: spenders.length === 1
42
+ ? { condition: 'equal', value: spenders[0] }
43
+ : { anyOf: spenders },
44
+ },
45
+ },
46
+ },
47
+ };
48
+ }
49
+ /**
50
+ * Compile a `swap` scope into one merged approve permission plus one scoped
51
+ * action per venue.
52
+ */
53
+ export function resolveSwapScope(scope, chainId, environment = 'production') {
54
+ // Default to the Swapper: it is the route the orchestrator emits for
55
+ // same-chain smart-account swaps, so a caller who just says "let this key
56
+ // swap A for B" gets a scope that actually matches the resulting ops.
57
+ const via = scope.via ?? [rhinestoneSwap()];
58
+ if (via.length === 0) {
59
+ throw new Error('swap.via must list at least one venue — an empty list would authorise nothing');
60
+ }
61
+ if (scope.sell.token.toLowerCase() === scope.buy.token.toLowerCase()) {
62
+ throw new Error(`swap.sell.token and swap.buy.token are the same address (${scope.sell.token})`);
63
+ }
64
+ const ctxFor = (venue) => ({
65
+ chainId,
66
+ environment,
67
+ sellToken: scope.sell.token,
68
+ buyToken: scope.buy.token,
69
+ recipient: scope.to,
70
+ // A venue-level cap wins over the scope-level one: `anySettler` demands its
71
+ // own `maxSpend` precisely because that venue needs a tighter bound than the
72
+ // session as a whole might carry.
73
+ cap: venue.maxSpend ?? scope.sell.maxTotal,
74
+ });
75
+ // Every aggregator venue is reachable two ways and the orchestrator picks:
76
+ // it wraps a route in the Swapper only when the Swapper can capture surplus,
77
+ // which depends on the direction AND the winning quoter, and that eligibility
78
+ // is orchestrator-side config that changes without the session knowing. So
79
+ // each venue authorises its direct call AND the wrapped one; authorising a
80
+ // single shape is how a session rejects the swap it was created for.
81
+ //
82
+ // The wrapped shape pins which aggregator may sit in the Swapper's `calls[]`.
83
+ // Two venues pinning DIFFERENT aggregators cannot share one Swapper action —
84
+ // so with more than one aggregator authorised the tail is left unpinned,
85
+ // which is the honest reading: either aggregator may fill it. The swap stays
86
+ // bound by the Swapper's own top-level tokenIn/tokenOut/recipient pins and
87
+ // the sell cap either way.
88
+ const routes = new Set(via.flatMap((venue) => venue.id === 'fynd'
89
+ ? ['fynd']
90
+ : venue.id === '0x'
91
+ ? ['zeroEx']
92
+ : []));
93
+ // A bare `rhinestoneSwap()` authorises any aggregator in the tail, so pinning
94
+ // it for the others would both contradict that venue and collide with it on
95
+ // the same Swapper action.
96
+ // A caller-written Swapper venue carries no route by construction — the
97
+ // routed shape is internal — so naming one authorises any aggregator.
98
+ const anyAggregatorAllowed = via.some((venue) => venue.id === 'rhinestone');
99
+ const sharedRoute = routes.size === 1 && !anyAggregatorAllowed ? [...routes][0] : undefined;
100
+ // More than one aggregator authorised: pin the tail to ANY ONE of them rather
101
+ // than to none. Sharing the Swapper action by dropping its route pins would
102
+ // authorise a tail neither venue named, which is broader than the scope.
103
+ const sharedRoutes = routes.size > 1 && !anyAggregatorAllowed ? [...routes] : undefined;
104
+ // The Settler the 0x venue already carries, so the wrapped half can pin the
105
+ // nested exec instead of dropping the one address that makes it bindable.
106
+ const zeroExSettler = via.flatMap((venue) => venue.id === '0x' && venue.settler !== undefined ? [venue.settler] : [])[0];
107
+ const wrappedVenue = () => {
108
+ const settler = zeroExSettler !== undefined ? { settler: zeroExSettler } : {};
109
+ if (sharedRoutes)
110
+ return { id: 'rhinestone', routes: sharedRoutes, ...settler };
111
+ if (sharedRoute) {
112
+ return {
113
+ id: 'rhinestone',
114
+ route: sharedRoute,
115
+ ...(sharedRoute === 'zeroEx' ? settler : {}),
116
+ };
117
+ }
118
+ return { id: 'rhinestone' };
119
+ };
120
+ const scopings = via.map((venue) => {
121
+ const ctx = ctxFor(venue);
122
+ if (venue.id === 'rhinestone')
123
+ return scopeRhinestone(venue, ctx);
124
+ const parts = [
125
+ venue.id === 'fynd' ? scopeFynd(ctx) : scopeZeroEx(venue, ctx),
126
+ scopeRhinestone(wrappedVenue(), ctx),
127
+ ];
128
+ return {
129
+ approveSpenders: parts.flatMap((p) => [...p.approveSpenders]),
130
+ actions: parts.flatMap((p) => [...p.actions]),
131
+ };
132
+ });
133
+ return {
134
+ permissions: [approvePermission(scope, scopings)],
135
+ actions: dedupeActions(scopings.flatMap((s) => [...s.actions])),
136
+ };
137
+ }
138
+ /**
139
+ * Collapse actions that different venues both authorise.
140
+ *
141
+ * Every aggregator venue covers the Swapper-wrapped shape as well as its direct
142
+ * one, so listing two of them yields the same (target, selector) twice. Those map to one on-chain action id, and the resolver rejects
143
+ * duplicates — reasonably, since two entries would silently overwrite each
144
+ * other's policies. Identical entries are safe to collapse; genuinely
145
+ * conflicting ones still throw, because picking a winner would silently
146
+ * loosen or tighten a rule the caller wrote.
147
+ */
148
+ function dedupeActions(actions) {
149
+ const byKey = new Map();
150
+ for (const action of actions) {
151
+ const key = `${action.target.toLowerCase()}|${action.selector.toLowerCase()}`;
152
+ const existing = byKey.get(key);
153
+ if (!existing) {
154
+ byKey.set(key, action);
155
+ continue;
156
+ }
157
+ if (JSON.stringify(existing, replaceBigInt) !==
158
+ JSON.stringify(action, replaceBigInt)) {
159
+ throw new Error(`Conflicting swap actions for ${action.target} ${action.selector}: ` +
160
+ 'two venues authorise the same call with different policies. Give ' +
161
+ 'them the same cap, or list only one.');
162
+ }
163
+ }
164
+ return [...byKey.values()];
165
+ }
166
+ function replaceBigInt(_key, value) {
167
+ return typeof value === 'bigint' ? value.toString() : value;
168
+ }
@@ -0,0 +1,143 @@
1
+ import { type Address } from 'viem';
2
+ import type { ZeroExVenue } from '../types.js';
3
+ import type { VenueContext, VenueScoping } from './rules.js';
4
+ /**
5
+ * 0x — Swap API v2, AllowanceHolder flow.
6
+ *
7
+ * Two calls per swap:
8
+ * 1. `approve(AllowanceHolder, amount)` on the sell token
9
+ * 2. `AllowanceHolder.exec(operator, token, amount, target, data)` — pulls the
10
+ * approved sell token and forwards `data` to the Settler.
11
+ *
12
+ * The split matters for scoping. `token` and `amount` are consumed by the
13
+ * AllowanceHolder itself, so pinning them is meaningful no matter what `target`
14
+ * is. `operator` and `target` decide who receives the pulled funds, and nothing
15
+ * on-chain requires them to be a Settler — leave them free and a compromised
16
+ * session key names its own contract.
17
+ */
18
+ /** Permanent across chains — 0x never rotates this. Verified deployed on Plasma. */
19
+ export declare const ZEROX_ALLOWANCE_HOLDER: Address;
20
+ /** Chains where 0x is an enabled quoter with a whitelisted Settler. */
21
+ export declare const ZEROX_CHAIN_IDS: readonly [1, 10, 56, 130, 137, 143, 146, 999, 4663, 8453, 9745, 42161, 43114, 57073];
22
+ export type ZeroExChainId = (typeof ZEROX_CHAIN_IDS)[number];
23
+ export declare const allowanceHolderAbi: readonly [{
24
+ readonly type: "function";
25
+ readonly name: "exec";
26
+ readonly stateMutability: "payable";
27
+ readonly inputs: readonly [{
28
+ readonly name: "operator";
29
+ readonly type: "address";
30
+ }, {
31
+ readonly name: "token";
32
+ readonly type: "address";
33
+ }, {
34
+ readonly name: "amount";
35
+ readonly type: "uint256";
36
+ }, {
37
+ readonly name: "target";
38
+ readonly type: "address";
39
+ }, {
40
+ readonly name: "data";
41
+ readonly type: "bytes";
42
+ }];
43
+ readonly outputs: readonly [{
44
+ readonly name: "result";
45
+ readonly type: "bytes";
46
+ }];
47
+ }];
48
+ export declare const ALLOWANCE_HOLDER_EXEC_SELECTOR: `0x${string}`;
49
+ /**
50
+ * 0x's Settler registry — an ERC-721 whose token owner IS the current Settler
51
+ * for that feature slot. Slot 2 is the taker-submitted Settler used by ordinary
52
+ * swaps.
53
+ *
54
+ * 0x redeploys the Settler every few weeks and moves the token, so there is no
55
+ * safe constant to bundle: any address baked into a release is correct only
56
+ * until the next rotation. Resolve with {@link resolveZeroExSettler} and pin the
57
+ * result, or use `anySettler` to trade the pin for longevity.
58
+ */
59
+ export declare const ZEROX_SETTLER_REGISTRY: Address;
60
+ export declare const ZEROX_SETTLER_FEATURE_ID = 2n;
61
+ export declare const zeroExSettlerRegistryAbi: readonly [{
62
+ readonly type: "function";
63
+ readonly name: "ownerOf";
64
+ readonly stateMutability: "view";
65
+ readonly inputs: readonly [{
66
+ readonly name: "tokenId";
67
+ readonly type: "uint256";
68
+ }];
69
+ readonly outputs: readonly [{
70
+ readonly name: "";
71
+ readonly type: "address";
72
+ }];
73
+ }];
74
+ /** Minimal structural client — avoids coupling this module to a viem client type. */
75
+ interface SettlerRegistryReader {
76
+ readContract(args: {
77
+ address: Address;
78
+ abi: typeof zeroExSettlerRegistryAbi;
79
+ functionName: 'ownerOf';
80
+ args: readonly [bigint];
81
+ }): Promise<Address>;
82
+ }
83
+ /**
84
+ * Read 0x's current Settler for this chain from the on-chain registry.
85
+ *
86
+ * Pin the result at session-enable time; do NOT re-resolve per swap. A session
87
+ * that looked the address up at use time would follow 0x's registry wherever it
88
+ * points, so a compromise of 0x's upgrade multisig could redirect every live
89
+ * session's approved funds. Pinned, the worst case of a rotation is that the
90
+ * session stops working until it is re-enabled.
91
+ *
92
+ * @param client - Any viem public client for the target chain.
93
+ */
94
+ export declare function resolveZeroExSettler(client: SettlerRegistryReader): Promise<Address>;
95
+ /**
96
+ * Pin 0x's Settler to a specific address.
97
+ *
98
+ * Pinning the inner `buyToken` / `recipient` is not a substitute for pinning
99
+ * `target`: those bytes only mean what their names say when the callee is
100
+ * genuinely a Settler.
101
+ */
102
+ export interface ZeroExPinnedOptions {
103
+ /** The Settler to pin. Get the current one with {@link resolveZeroExSettler}. */
104
+ settler: Address;
105
+ anySettler?: never;
106
+ maxSpend?: never;
107
+ }
108
+ /**
109
+ * Leave 0x's Settler unpinned so the session survives 0x's rotations.
110
+ *
111
+ * A deliberate security downgrade, which is why `maxSpend` is mandatory here:
112
+ * with `target` free, a compromised session key can redirect the AllowanceHolder
113
+ * pull to its own contract, and `maxSpend` is then the ONLY bound on what it
114
+ * takes. The blast radius becomes exactly `maxSpend`, never the account's whole
115
+ * balance.
116
+ *
117
+ * Prefer {@link ZeroExPinnedOptions} unless the session must outlive 0x's
118
+ * upgrade cadence (roughly every few weeks).
119
+ */
120
+ export interface ZeroExAnySettlerOptions {
121
+ anySettler: true;
122
+ /** Cumulative cap on sell-token spend across every swap in this session. */
123
+ maxSpend: bigint;
124
+ settler?: never;
125
+ }
126
+ /**
127
+ * Scope a session to 0x swaps, in whichever shape the orchestrator produces.
128
+ *
129
+ * Authorises BOTH the direct `AllowanceHolder.exec` call and the
130
+ * Swapper-wrapped one, and there is no way to narrow that. Whether a swap is
131
+ * wrapped is decided by `ENABLE_SWAPPER`, the account type, and whether the
132
+ * Swapper resolves on the chain — state that is read when the intent executes,
133
+ * not when the session is signed. Authorising one shape is how a session ends
134
+ * up rejecting the swap it was created for.
135
+ *
136
+ * Takes either a pinned `settler` or `anySettler` + `maxSpend`. There is
137
+ * deliberately no zero-argument form: a bundled Settler constant would be stale
138
+ * within weeks of the release that shipped it.
139
+ */
140
+ export declare function zeroEx(options: ZeroExPinnedOptions | ZeroExAnySettlerOptions): ZeroExVenue;
141
+ export declare function scopeZeroEx(venue: ZeroExVenue, ctx: VenueContext): VenueScoping;
142
+ export {};
143
+ //# sourceMappingURL=zero-ex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zero-ex.d.ts","sourceRoot":"","sources":["../../../../../../modules/validators/smart-sessions/swap/zero-ex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,OAAO,EAAsB,MAAM,MAAM,CAAA;AAEjE,OAAO,KAAK,EAAkC,WAAW,EAAE,MAAM,UAAU,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EAAE,KAAK,CAAA;CAChB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,MAAM,CACpB,OAAO,EAAE,mBAAmB,GAAG,uBAAuB,GACrD,WAAW,CAOb;AAED,wBAAgB,WAAW,CACzB,KAAK,EAAE,WAAW,EAClB,GAAG,EAAE,YAAY,GAChB,YAAY,CAsCd"}
@@ -0,0 +1,164 @@
1
+ import { toFunctionSelector } from 'viem';
2
+ import { namedParamOffsets } from '../../permissions.js';
3
+ import { cumulativeCap, pin, pinValue, swapAction } from './rules.js';
4
+ /**
5
+ * 0x — Swap API v2, AllowanceHolder flow.
6
+ *
7
+ * Two calls per swap:
8
+ * 1. `approve(AllowanceHolder, amount)` on the sell token
9
+ * 2. `AllowanceHolder.exec(operator, token, amount, target, data)` — pulls the
10
+ * approved sell token and forwards `data` to the Settler.
11
+ *
12
+ * The split matters for scoping. `token` and `amount` are consumed by the
13
+ * AllowanceHolder itself, so pinning them is meaningful no matter what `target`
14
+ * is. `operator` and `target` decide who receives the pulled funds, and nothing
15
+ * on-chain requires them to be a Settler — leave them free and a compromised
16
+ * session key names its own contract.
17
+ */
18
+ /** Permanent across chains — 0x never rotates this. Verified deployed on Plasma. */
19
+ export const ZEROX_ALLOWANCE_HOLDER = '0x0000000000001fF3684f28c67538d4D072C22734';
20
+ /** Chains where 0x is an enabled quoter with a whitelisted Settler. */
21
+ export const ZEROX_CHAIN_IDS = [
22
+ 1, 10, 56, 130, 137, 143, 146, 999, 4663, 8453, 9745, 42161, 43114, 57073,
23
+ ];
24
+ export const allowanceHolderAbi = [
25
+ {
26
+ type: 'function',
27
+ name: 'exec',
28
+ stateMutability: 'payable',
29
+ inputs: [
30
+ { name: 'operator', type: 'address' },
31
+ { name: 'token', type: 'address' },
32
+ { name: 'amount', type: 'uint256' },
33
+ { name: 'target', type: 'address' },
34
+ { name: 'data', type: 'bytes' },
35
+ ],
36
+ outputs: [{ name: 'result', type: 'bytes' }],
37
+ },
38
+ ];
39
+ export const ALLOWANCE_HOLDER_EXEC_SELECTOR = toFunctionSelector(allowanceHolderAbi[0]);
40
+ /** exec's own head offsets, derived from the ABI. */
41
+ const EXEC = namedParamOffsets(allowanceHolderAbi, 'exec');
42
+ /**
43
+ * Offsets of the Settler's slippage fields, measured in EXEC's calldata.
44
+ *
45
+ * These cannot come from an ABI: they live inside `exec.data`, which is opaque
46
+ * `bytes` as far as exec's own signature is concerned. They are stable anyway
47
+ * because the Settler's
48
+ * `execute((recipient, buyToken, minAmountOut) slippage, bytes[] actions, bytes32)`
49
+ * places the fixed-size slippage struct BEFORE the variable-length `actions`.
50
+ *
51
+ * Derivation: exec's `data` content begins at 192 (five head words + the length
52
+ * word), +4 for the inner selector = 196 for `recipient`, +32 = 228 for
53
+ * `buyToken`. Re-derive against a live 0x exec if 0x revs the Settler ABI.
54
+ */
55
+ /**
56
+ * `exec`'s `data` head word, and the canonical tail it must point at.
57
+ *
58
+ * The Settler offsets below are derived from `data` starting at 192, which only
59
+ * holds while this pointer says 160. Unpinned, a session key can aim `data`
60
+ * elsewhere and leave matching decoy words at 196/228 for the policy to read
61
+ * while the Settler decodes a different recipient. `rhinestone.ts` pins the
62
+ * equivalent `calls[]` shape words for the same reason.
63
+ */
64
+ const EXEC_DATA_POINTER_OFFSET = 128n;
65
+ const EXEC_DATA_POINTER = 160n;
66
+ const SETTLER_RECIPIENT_OFFSET = 196n;
67
+ const SETTLER_BUY_TOKEN_OFFSET = 228n;
68
+ /**
69
+ * 0x's Settler registry — an ERC-721 whose token owner IS the current Settler
70
+ * for that feature slot. Slot 2 is the taker-submitted Settler used by ordinary
71
+ * swaps.
72
+ *
73
+ * 0x redeploys the Settler every few weeks and moves the token, so there is no
74
+ * safe constant to bundle: any address baked into a release is correct only
75
+ * until the next rotation. Resolve with {@link resolveZeroExSettler} and pin the
76
+ * result, or use `anySettler` to trade the pin for longevity.
77
+ */
78
+ export const ZEROX_SETTLER_REGISTRY = '0x00000000000004533Fe15556B1E086BB1A72cEae';
79
+ export const ZEROX_SETTLER_FEATURE_ID = 2n;
80
+ export const zeroExSettlerRegistryAbi = [
81
+ {
82
+ type: 'function',
83
+ name: 'ownerOf',
84
+ stateMutability: 'view',
85
+ inputs: [{ name: 'tokenId', type: 'uint256' }],
86
+ outputs: [{ name: '', type: 'address' }],
87
+ },
88
+ ];
89
+ /**
90
+ * Read 0x's current Settler for this chain from the on-chain registry.
91
+ *
92
+ * Pin the result at session-enable time; do NOT re-resolve per swap. A session
93
+ * that looked the address up at use time would follow 0x's registry wherever it
94
+ * points, so a compromise of 0x's upgrade multisig could redirect every live
95
+ * session's approved funds. Pinned, the worst case of a rotation is that the
96
+ * session stops working until it is re-enabled.
97
+ *
98
+ * @param client - Any viem public client for the target chain.
99
+ */
100
+ export async function resolveZeroExSettler(client) {
101
+ return client.readContract({
102
+ address: ZEROX_SETTLER_REGISTRY,
103
+ abi: zeroExSettlerRegistryAbi,
104
+ functionName: 'ownerOf',
105
+ args: [ZEROX_SETTLER_FEATURE_ID],
106
+ });
107
+ }
108
+ /**
109
+ * Scope a session to 0x swaps, in whichever shape the orchestrator produces.
110
+ *
111
+ * Authorises BOTH the direct `AllowanceHolder.exec` call and the
112
+ * Swapper-wrapped one, and there is no way to narrow that. Whether a swap is
113
+ * wrapped is decided by `ENABLE_SWAPPER`, the account type, and whether the
114
+ * Swapper resolves on the chain — state that is read when the intent executes,
115
+ * not when the session is signed. Authorising one shape is how a session ends
116
+ * up rejecting the swap it was created for.
117
+ *
118
+ * Takes either a pinned `settler` or `anySettler` + `maxSpend`. There is
119
+ * deliberately no zero-argument form: a bundled Settler constant would be stale
120
+ * within weeks of the release that shipped it.
121
+ */
122
+ export function zeroEx(options) {
123
+ return {
124
+ id: '0x',
125
+ ...(options.settler !== undefined ? { settler: options.settler } : {}),
126
+ ...(options.anySettler ? { anySettler: true } : {}),
127
+ ...(options.maxSpend !== undefined ? { maxSpend: options.maxSpend } : {}),
128
+ };
129
+ }
130
+ export function scopeZeroEx(venue, ctx) {
131
+ // The union type rejects this at compile time, but a plain-JS caller or an
132
+ // `as any` reaches here with neither, and the rules below would then pin only
133
+ // the sell token — an unbounded AllowanceHolder path.
134
+ if (venue.settler === undefined && !venue.anySettler) {
135
+ throw new Error('zeroEx() requires either a pinned settler or anySettler + maxSpend: ' +
136
+ 'with neither, nothing bounds the operator, target or amount');
137
+ }
138
+ if (venue.anySettler && ctx.cap === undefined) {
139
+ throw new Error('zeroEx({ anySettler: true }) requires maxSpend: with the Settler ' +
140
+ 'unpinned it is the only bound on what a compromised session key can pull');
141
+ }
142
+ // Pinned from the scope, never from venue options — the sell token is a
143
+ // scope-level guarantee and must not depend on the caller restating it.
144
+ const rules = [
145
+ pin(EXEC.token, ctx.sellToken),
146
+ ];
147
+ if (venue.settler !== undefined) {
148
+ rules.push(pin(EXEC.operator, venue.settler));
149
+ rules.push(pin(EXEC.target, venue.settler));
150
+ // Before any offset inside `exec.data` can be trusted.
151
+ rules.push(pinValue(EXEC_DATA_POINTER_OFFSET, EXEC_DATA_POINTER));
152
+ rules.push(pin(SETTLER_BUY_TOKEN_OFFSET, ctx.buyToken));
153
+ rules.push(pin(SETTLER_RECIPIENT_OFFSET, ctx.recipient));
154
+ }
155
+ if (ctx.cap !== undefined) {
156
+ rules.push(cumulativeCap(EXEC.amount, ctx.cap));
157
+ }
158
+ return {
159
+ approveSpenders: [ZEROX_ALLOWANCE_HOLDER],
160
+ actions: [
161
+ swapAction(ZEROX_ALLOWANCE_HOLDER, ALLOWANCE_HOLDER_EXEC_SELECTOR, rules),
162
+ ],
163
+ };
164
+ }
@@ -50,6 +50,73 @@ export type SessionPolicy = {
50
50
  } | {
51
51
  readonly type: 'intent-execution';
52
52
  };
53
+ /**
54
+ * A swap venue, produced by the `zeroEx()` / `fynd()` builders. Callers never
55
+ * construct these literally — router addresses, selectors and calldata offsets
56
+ * are resolved from the venue id inside `swap-venues.ts`.
57
+ */
58
+ export interface ZeroExVenue {
59
+ readonly id: '0x';
60
+ readonly settler?: Address;
61
+ readonly anySettler?: boolean;
62
+ readonly maxSpend?: bigint;
63
+ }
64
+ export interface FyndVenue {
65
+ readonly id: 'fynd';
66
+ readonly maxSpend?: bigint;
67
+ }
68
+ /**
69
+ * The Rhinestone Swapper — aggregator-agnostic, and the route the orchestrator
70
+ * actually uses for same-chain smart-account swaps.
71
+ */
72
+ export interface RhinestoneSwapVenue {
73
+ readonly id: 'rhinestone';
74
+ readonly maxSpend?: bigint;
75
+ }
76
+ /**
77
+ * The Swapper venue with its route pinned — composed by `resolveSwapScope`, and
78
+ * deliberately NOT part of {@link SwapVenue}.
79
+ *
80
+ * A caller who could hand-write `{ id: 'rhinestone', route: 'zeroEx' }` would
81
+ * get the wrapped 0x scoping while skipping `zeroEx()`'s options union, which
82
+ * is what forces either a Settler or `anySettler` + `maxSpend`. The nested exec
83
+ * would then be pinned by nothing at all. So the routed shape is reachable only
84
+ * by naming a venue, never by writing one.
85
+ */
86
+ export interface RoutedRhinestoneSwapVenue extends RhinestoneSwapVenue {
87
+ /** Pin which aggregator the Swapper's `calls[]` tail may route through. */
88
+ readonly route?: 'zeroEx' | 'fynd';
89
+ /**
90
+ * Several aggregators authorised for the same wrapped call. The tail is
91
+ * pinned to any ONE of them rather than left free, which is what keeps a
92
+ * multi-venue session no broader than the venues it names.
93
+ */
94
+ readonly routes?: readonly ('zeroEx' | 'fynd')[];
95
+ /**
96
+ * 0x's Settler, when known. Pins the nested `AllowanceHolder.exec` inside
97
+ * `calls[1].data`; without it that call's operator/target stay free.
98
+ */
99
+ readonly settler?: Address;
100
+ }
101
+ export type SwapVenue = RhinestoneSwapVenue | ZeroExVenue | FyndVenue;
102
+ /** Loose (chain-unaware) swap scope. The public config type narrows `via` by chain. */
103
+ export interface SwapScopeInput {
104
+ readonly sell: {
105
+ readonly token: Address;
106
+ readonly maxTotal?: bigint;
107
+ };
108
+ readonly buy: {
109
+ readonly token: Address;
110
+ };
111
+ /** Swap output recipient — pinned, so a compromised key cannot redirect output. */
112
+ readonly to: Address;
113
+ /**
114
+ * Venues this session may route through. Defaults to the Rhinestone Swapper,
115
+ * which covers whichever aggregator the orchestrator picks. Name aggregators
116
+ * explicitly only for flows where the account calls a router directly.
117
+ */
118
+ readonly via?: readonly SwapVenue[];
119
+ }
53
120
  export interface FallbackAction {
54
121
  readonly policies?: SessionPolicy[];
55
122
  }
@@ -180,6 +247,13 @@ export interface SessionDefinition {
180
247
  crossChainPermits?: CrossChainPermissionInput[];
181
248
  signing?: SessionSigning;
182
249
  policyAddresses?: SessionPolicyAddresses;
250
+ restrictToActions?: boolean;
251
+ /**
252
+ * Venue-scoped swap permissions. Compiles to a merged approve plus one scoped
253
+ * swap action per venue, and implies `restrictToActions`.
254
+ */
255
+ swap?: SwapScopeInput;
256
+ actions?: ScopedAction[];
183
257
  }
184
258
  export interface ResolvedPolicy {
185
259
  policy: Address;
@@ -209,6 +283,10 @@ export interface Session {
209
283
  erc7739Policies: ResolvedERC7739Policies;
210
284
  actions: readonly ResolvedAction[];
211
285
  claimPolicies: readonly Permit2ClaimPolicy[];
286
+ /** The venue scope this session was built from, carried through resolution so
287
+ * a caller can derive the matching quoter pin at transact time. Metadata
288
+ * only — it is not part of the permission id. */
289
+ swap?: SwapScopeInput;
212
290
  }
213
291
  export interface SessionData {
214
292
  sessionValidator: Address;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../modules/validators/smart-sessions/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,GAAG,EACH,WAAW,EACX,OAAO,EACP,KAAK,EACL,GAAG,EACH,SAAS,EACT,mBAAmB,EACnB,eAAe,EAChB,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAExC,MAAM,MAAM,mCAAmC,GAC3C,OAAO,GACP,aAAa,GACb,UAAU,GACV,oBAAoB,GACpB,iBAAiB,GACjB,UAAU,GACV,SAAS,CAAA;AAEb,MAAM,WAAW,8BAA8B;IAC7C,QAAQ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