@rhinestone/sdk 1.19.0 → 1.19.1
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/dist/src/modules/validators/smart-sessions/swap/fynd.d.ts +21 -18
- package/dist/src/modules/validators/smart-sessions/swap/fynd.d.ts.map +1 -1
- package/dist/src/modules/validators/smart-sessions/swap/fynd.js +25 -24
- package/dist/src/modules/validators/smart-sessions/swap/rhinestone.js +7 -7
- package/dist/src/orchestrator/consts.d.ts +1 -1
- package/dist/src/orchestrator/consts.js +1 -1
- package/package.json +2 -2
|
@@ -13,22 +13,22 @@ import type { VenueContext, VenueScoping } from './rules';
|
|
|
13
13
|
export declare const FYND_CHAIN_IDS: readonly [1, 56, 130, 137, 8453, 9745, 42161];
|
|
14
14
|
export type FyndChainId = (typeof FYND_CHAIN_IDS)[number];
|
|
15
15
|
/**
|
|
16
|
-
* TychoRouter per chain — the contract fynd's encoded fills target.
|
|
16
|
+
* TychoRouter V3 per chain — the contract fynd's encoded fills target.
|
|
17
17
|
*
|
|
18
|
-
* Mirrors `fynd.routers` in
|
|
19
|
-
* listed only when the router is
|
|
20
|
-
*
|
|
18
|
+
* Mirrors the first router of each chain's `fynd.routers` in yeet's
|
|
19
|
+
* `config/quoters.jsonnet`. A chain is listed only when the router is
|
|
20
|
+
* whitelisted in `IntentExecutionPolicy`, since a quoter enabled without a
|
|
21
|
+
* whitelisted target produces quotes that revert.
|
|
21
22
|
*/
|
|
22
23
|
export declare const FYND_ROUTERS: Record<FyndChainId, Address>;
|
|
23
24
|
/**
|
|
24
|
-
*
|
|
25
|
+
* TychoRouterV3 `singleSwap`, the entrypoint fynd's encoded quotes call.
|
|
25
26
|
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* behind a pointer.
|
|
27
|
+
* Names are upstream's (`TychoRouterV3.sol` and its `ClientFeeParams` struct,
|
|
28
|
+
* propeller-heads/tycho at tag 0.387.0); the types are pinned by
|
|
29
|
+
* {@link FYND_SWAP_SELECTOR}'s assertion in the test suite. We never address
|
|
30
|
+
* `clientFeeParams`: a tuple containing `bytes` is dynamic and sits behind a
|
|
31
|
+
* pointer.
|
|
32
32
|
*/
|
|
33
33
|
export declare const tychoRouterAbi: readonly [{
|
|
34
34
|
readonly type: "function";
|
|
@@ -43,6 +43,9 @@ export declare const tychoRouterAbi: readonly [{
|
|
|
43
43
|
}, {
|
|
44
44
|
readonly name: "tokenOut";
|
|
45
45
|
readonly type: "address";
|
|
46
|
+
}, {
|
|
47
|
+
readonly name: "expectedAmountOut";
|
|
48
|
+
readonly type: "uint256";
|
|
46
49
|
}, {
|
|
47
50
|
readonly name: "minAmountOut";
|
|
48
51
|
readonly type: "uint256";
|
|
@@ -50,26 +53,26 @@ export declare const tychoRouterAbi: readonly [{
|
|
|
50
53
|
readonly name: "receiver";
|
|
51
54
|
readonly type: "address";
|
|
52
55
|
}, {
|
|
53
|
-
readonly name: "
|
|
56
|
+
readonly name: "clientFeeParams";
|
|
54
57
|
readonly type: "tuple";
|
|
55
58
|
readonly components: readonly [{
|
|
56
|
-
readonly name: "
|
|
57
|
-
readonly type: "
|
|
59
|
+
readonly name: "clientFeeBps";
|
|
60
|
+
readonly type: "uint32";
|
|
58
61
|
}, {
|
|
59
|
-
readonly name: "
|
|
62
|
+
readonly name: "clientFeeReceiver";
|
|
60
63
|
readonly type: "address";
|
|
61
64
|
}, {
|
|
62
|
-
readonly name: "
|
|
65
|
+
readonly name: "maxClientContribution";
|
|
63
66
|
readonly type: "uint256";
|
|
64
67
|
}, {
|
|
65
68
|
readonly name: "deadline";
|
|
66
69
|
readonly type: "uint256";
|
|
67
70
|
}, {
|
|
68
|
-
readonly name: "
|
|
71
|
+
readonly name: "clientSignature";
|
|
69
72
|
readonly type: "bytes";
|
|
70
73
|
}];
|
|
71
74
|
}, {
|
|
72
|
-
readonly name: "
|
|
75
|
+
readonly name: "swapData";
|
|
73
76
|
readonly type: "bytes";
|
|
74
77
|
}];
|
|
75
78
|
readonly outputs: readonly [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fynd.d.ts","sourceRoot":"","sources":["../../../../../../modules/validators/smart-sessions/swap/fynd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,OAAO,EAAsB,MAAM,MAAM,CAAA;AACjE,OAAO,KAAK,EACV,SAAS,EAEV,MAAM,mBAAmB,CAAA;AAE1B,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAGzD;;;;;;;GAOG;AAEH,uDAAuD;AACvD,eAAO,MAAM,cAAc,+CAAgD,CAAA;AAE3E,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAA;AAEzD
|
|
1
|
+
{"version":3,"file":"fynd.d.ts","sourceRoot":"","sources":["../../../../../../modules/validators/smart-sessions/swap/fynd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,OAAO,EAAsB,MAAM,MAAM,CAAA;AACjE,OAAO,KAAK,EACV,SAAS,EAEV,MAAM,mBAAmB,CAAA;AAE1B,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAGzD;;;;;;;GAOG;AAEH,uDAAuD;AACvD,eAAO,MAAM,cAAc,+CAAgD,CAAA;AAE3E,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAA;AAEzD;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,WAAW,EAAE,OAAO,CAQrD,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BH,CAAA;AAExB,eAAO,MAAM,kBAAkB,eAAwC,CAAA;AAQvE;;;;;;GAMG;AACH,wBAAgB,IAAI,CAAC,OAAO,GAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,SAAS,CAKnE;AAED,wBAAgB,SAAS,CAAC,GAAG,EAAE,YAAY,GAAG,YAAY,CAoBzD"}
|
|
@@ -17,30 +17,30 @@ const rules_1 = require("./rules");
|
|
|
17
17
|
/** Chains with a deployed, whitelisted TychoRouter. */
|
|
18
18
|
exports.FYND_CHAIN_IDS = [1, 56, 130, 137, 8453, 9745, 42161];
|
|
19
19
|
/**
|
|
20
|
-
* TychoRouter per chain — the contract fynd's encoded fills target.
|
|
20
|
+
* TychoRouter V3 per chain — the contract fynd's encoded fills target.
|
|
21
21
|
*
|
|
22
|
-
* Mirrors `fynd.routers` in
|
|
23
|
-
* listed only when the router is
|
|
24
|
-
*
|
|
22
|
+
* Mirrors the first router of each chain's `fynd.routers` in yeet's
|
|
23
|
+
* `config/quoters.jsonnet`. A chain is listed only when the router is
|
|
24
|
+
* whitelisted in `IntentExecutionPolicy`, since a quoter enabled without a
|
|
25
|
+
* whitelisted target produces quotes that revert.
|
|
25
26
|
*/
|
|
26
27
|
exports.FYND_ROUTERS = {
|
|
27
|
-
1: '
|
|
28
|
-
56: '
|
|
29
|
-
130: '
|
|
30
|
-
137: '
|
|
31
|
-
8453: '
|
|
32
|
-
9745: '
|
|
33
|
-
42161: '
|
|
28
|
+
1: '0x1644d2477f809cc2c71bccfd6dc9497e3f83210d',
|
|
29
|
+
56: '0x7f3d12bbafb8955e51b3ab9588b34c8ad95bda4e',
|
|
30
|
+
130: '0xcba5574597ad00ea250fd106dab4fc7461949635',
|
|
31
|
+
137: '0xbd4e6011f03355c2a377fd9af939322a7d0a1bc1',
|
|
32
|
+
8453: '0xaba5b53b03eafad1c5fc8bd5fc765fc85bb3de67',
|
|
33
|
+
9745: '0x0953c7e23b44259e5e5630e9b97c31d7278c4c85',
|
|
34
|
+
42161: '0x924f147c50ea59f5180a26031a8b65b2aa1e81cd',
|
|
34
35
|
};
|
|
35
36
|
/**
|
|
36
|
-
*
|
|
37
|
+
* TychoRouterV3 `singleSwap`, the entrypoint fynd's encoded quotes call.
|
|
37
38
|
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* behind a pointer.
|
|
39
|
+
* Names are upstream's (`TychoRouterV3.sol` and its `ClientFeeParams` struct,
|
|
40
|
+
* propeller-heads/tycho at tag 0.387.0); the types are pinned by
|
|
41
|
+
* {@link FYND_SWAP_SELECTOR}'s assertion in the test suite. We never address
|
|
42
|
+
* `clientFeeParams`: a tuple containing `bytes` is dynamic and sits behind a
|
|
43
|
+
* pointer.
|
|
44
44
|
*/
|
|
45
45
|
exports.tychoRouterAbi = [
|
|
46
46
|
{
|
|
@@ -51,20 +51,21 @@ exports.tychoRouterAbi = [
|
|
|
51
51
|
{ name: 'amountIn', type: 'uint256' },
|
|
52
52
|
{ name: 'tokenIn', type: 'address' },
|
|
53
53
|
{ name: 'tokenOut', type: 'address' },
|
|
54
|
+
{ name: 'expectedAmountOut', type: 'uint256' },
|
|
54
55
|
{ name: 'minAmountOut', type: 'uint256' },
|
|
55
56
|
{ name: 'receiver', type: 'address' },
|
|
56
57
|
{
|
|
57
|
-
name: '
|
|
58
|
+
name: 'clientFeeParams',
|
|
58
59
|
type: 'tuple',
|
|
59
60
|
components: [
|
|
60
|
-
{ name: '
|
|
61
|
-
{ name: '
|
|
62
|
-
{ name: '
|
|
61
|
+
{ name: 'clientFeeBps', type: 'uint32' },
|
|
62
|
+
{ name: 'clientFeeReceiver', type: 'address' },
|
|
63
|
+
{ name: 'maxClientContribution', type: 'uint256' },
|
|
63
64
|
{ name: 'deadline', type: 'uint256' },
|
|
64
|
-
{ name: '
|
|
65
|
+
{ name: 'clientSignature', type: 'bytes' },
|
|
65
66
|
],
|
|
66
67
|
},
|
|
67
|
-
{ name: '
|
|
68
|
+
{ name: 'swapData', type: 'bytes' },
|
|
68
69
|
],
|
|
69
70
|
outputs: [{ name: 'amountOut', type: 'uint256' }],
|
|
70
71
|
},
|
|
@@ -129,8 +129,7 @@ function swapperAddresses(environment) {
|
|
|
129
129
|
* pointer, the length, and each element pointer fixes every position, making the
|
|
130
130
|
* target offsets exact.
|
|
131
131
|
*
|
|
132
|
-
* Derived from live Plasma calldata and reproduced by
|
|
133
|
-
* `zeroExRouteRules` in the test suite:
|
|
132
|
+
* Derived from live Plasma calldata and reproduced by `offsets.test.ts`:
|
|
134
133
|
* @224 array pointer = 256 (tail begins right after the head)
|
|
135
134
|
* @256 length = 2 (approve + aggregator call)
|
|
136
135
|
* @288 elem[0] pointer= 64 (element table is 2 words)
|
|
@@ -152,14 +151,15 @@ const CALLS_ELEM0_VALUE_OFFSET = 384n;
|
|
|
152
151
|
const CALLS_ELEM1_VALUE_OFFSET = 608n;
|
|
153
152
|
const NESTED_EXEC_TOKEN_OFFSET = 740n;
|
|
154
153
|
/**
|
|
155
|
-
* The nested fynd call: `
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
* is what gets pinned rather than the end
|
|
154
|
+
* The nested fynd call: `singleSwap(amountIn, tokenIn, tokenOut,
|
|
155
|
+
* expectedAmountOut, minAmountOut, receiver, ...)`, its head starting at 708.
|
|
156
|
+
* The receiver is the Swapper itself, which collects the output and forwards
|
|
157
|
+
* it to the scope's recipient, so that is what gets pinned rather than the end
|
|
158
|
+
* recipient.
|
|
159
159
|
*/
|
|
160
160
|
const NESTED_FYND_TOKEN_IN_OFFSET = 740n;
|
|
161
161
|
const NESTED_FYND_TOKEN_OUT_OFFSET = 772n;
|
|
162
|
-
const NESTED_FYND_RECEIVER_OFFSET =
|
|
162
|
+
const NESTED_FYND_RECEIVER_OFFSET = 868n;
|
|
163
163
|
const CALLS_ELEM1_DATA_POINTER_OFFSET = 640n;
|
|
164
164
|
/** Head words of the `AllowanceHolder.exec` nested in `calls[1].data`. */
|
|
165
165
|
const NESTED_EXEC_OPERATOR_OFFSET = 708n;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const PROD_ORCHESTRATOR_URL = "https://v1.orchestrator.rhinestone.dev";
|
|
2
2
|
declare const RHINESTONE_SPOKE_POOL_ADDRESS = "0x000000000060f6e853447881951574cdd0663530";
|
|
3
|
-
declare const SDK_VERSION = "1.19.
|
|
3
|
+
declare const SDK_VERSION = "1.19.1";
|
|
4
4
|
declare const API_VERSION = "2026-01.alps";
|
|
5
5
|
export { PROD_ORCHESTRATOR_URL, RHINESTONE_SPOKE_POOL_ADDRESS, SDK_VERSION, API_VERSION, };
|
|
6
6
|
//# sourceMappingURL=consts.d.ts.map
|
|
@@ -5,7 +5,7 @@ const PROD_ORCHESTRATOR_URL = 'https://v1.orchestrator.rhinestone.dev';
|
|
|
5
5
|
exports.PROD_ORCHESTRATOR_URL = PROD_ORCHESTRATOR_URL;
|
|
6
6
|
const RHINESTONE_SPOKE_POOL_ADDRESS = '0x000000000060f6e853447881951574cdd0663530';
|
|
7
7
|
exports.RHINESTONE_SPOKE_POOL_ADDRESS = RHINESTONE_SPOKE_POOL_ADDRESS;
|
|
8
|
-
const SDK_VERSION = '1.19.
|
|
8
|
+
const SDK_VERSION = '1.19.1';
|
|
9
9
|
exports.SDK_VERSION = SDK_VERSION;
|
|
10
10
|
const API_VERSION = '2026-01.alps';
|
|
11
11
|
exports.API_VERSION = API_VERSION;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rhinestone/sdk",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.1",
|
|
4
4
|
"description": "End-to-end chain abstraction and modularity toolkit",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Rhinestone",
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
"access": "public"
|
|
172
172
|
},
|
|
173
173
|
"dependencies": {
|
|
174
|
-
"@rhinestone/shared-configs": "2.
|
|
174
|
+
"@rhinestone/shared-configs": "2.16.0",
|
|
175
175
|
"solady": "^0.1.26"
|
|
176
176
|
},
|
|
177
177
|
"peerDependencies": {
|