@rhinestone/sdk 2.0.0-beta.3 → 2.0.0-beta.30

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 (107) hide show
  1. package/dist/src/accounts/error.d.ts +2 -9
  2. package/dist/src/accounts/error.d.ts.map +1 -1
  3. package/dist/src/accounts/error.js +5 -11
  4. package/dist/src/accounts/hca.d.ts +25 -0
  5. package/dist/src/accounts/hca.d.ts.map +1 -0
  6. package/dist/src/accounts/hca.js +145 -0
  7. package/dist/src/accounts/index.d.ts +9 -9
  8. package/dist/src/accounts/index.d.ts.map +1 -1
  9. package/dist/src/accounts/index.js +112 -41
  10. package/dist/src/accounts/kernel.d.ts +1 -2
  11. package/dist/src/accounts/kernel.d.ts.map +1 -1
  12. package/dist/src/accounts/kernel.js +1 -8
  13. package/dist/src/accounts/nexus.d.ts +3 -2
  14. package/dist/src/accounts/nexus.d.ts.map +1 -1
  15. package/dist/src/accounts/nexus.js +33 -8
  16. package/dist/src/accounts/safe.d.ts +1 -2
  17. package/dist/src/accounts/safe.d.ts.map +1 -1
  18. package/dist/src/accounts/safe.js +3 -9
  19. package/dist/src/accounts/signing/common.d.ts +1 -4
  20. package/dist/src/accounts/signing/common.d.ts.map +1 -1
  21. package/dist/src/accounts/signing/common.js +7 -11
  22. package/dist/src/accounts/signing/message.d.ts.map +1 -1
  23. package/dist/src/accounts/signing/message.js +1 -4
  24. package/dist/src/accounts/signing/typedData.d.ts.map +1 -1
  25. package/dist/src/accounts/signing/typedData.js +1 -4
  26. package/dist/src/accounts/startale.d.ts +1 -2
  27. package/dist/src/accounts/startale.d.ts.map +1 -1
  28. package/dist/src/accounts/startale.js +2 -5
  29. package/dist/src/actions/ecdsa.js +5 -5
  30. package/dist/src/actions/index.js +2 -2
  31. package/dist/src/actions/mfa.js +2 -2
  32. package/dist/src/actions/passkeys.js +2 -2
  33. package/dist/src/actions/smart-sessions.d.ts +29 -5
  34. package/dist/src/actions/smart-sessions.d.ts.map +1 -1
  35. package/dist/src/actions/smart-sessions.js +38 -10
  36. package/dist/src/errors/index.d.ts +4 -4
  37. package/dist/src/errors/index.d.ts.map +1 -1
  38. package/dist/src/errors/index.js +6 -6
  39. package/dist/src/execution/error.d.ts +8 -21
  40. package/dist/src/execution/error.d.ts.map +1 -1
  41. package/dist/src/execution/error.js +7 -21
  42. package/dist/src/execution/index.d.ts +17 -17
  43. package/dist/src/execution/index.d.ts.map +1 -1
  44. package/dist/src/execution/index.js +22 -41
  45. package/dist/src/execution/utils.d.ts +15 -11
  46. package/dist/src/execution/utils.d.ts.map +1 -1
  47. package/dist/src/execution/utils.js +279 -75
  48. package/dist/src/index.d.ts +236 -37
  49. package/dist/src/index.d.ts.map +1 -1
  50. package/dist/src/index.js +60 -115
  51. package/dist/src/jwt-server/jcs.d.ts +1 -1
  52. package/dist/src/jwt-server/jcs.js +4 -2
  53. package/dist/src/modules/index.d.ts.map +1 -1
  54. package/dist/src/modules/index.js +0 -5
  55. package/dist/src/modules/read.d.ts +3 -2
  56. package/dist/src/modules/read.d.ts.map +1 -1
  57. package/dist/src/modules/read.js +33 -4
  58. package/dist/src/modules/validators/core.d.ts +5 -5
  59. package/dist/src/modules/validators/core.d.ts.map +1 -1
  60. package/dist/src/modules/validators/core.js +45 -34
  61. package/dist/src/modules/validators/cross-chain-permits.d.ts +11 -0
  62. package/dist/src/modules/validators/cross-chain-permits.d.ts.map +1 -0
  63. package/dist/src/modules/validators/cross-chain-permits.js +76 -0
  64. package/dist/src/modules/validators/permissions.d.ts +1 -0
  65. package/dist/src/modules/validators/permissions.d.ts.map +1 -1
  66. package/dist/src/modules/validators/permissions.js +162 -17
  67. package/dist/src/modules/validators/policies/claim/arbiters.d.ts +22 -0
  68. package/dist/src/modules/validators/policies/claim/arbiters.d.ts.map +1 -0
  69. package/dist/src/modules/validators/policies/claim/arbiters.js +57 -0
  70. package/dist/src/modules/validators/smart-sessions.d.ts +38 -9
  71. package/dist/src/modules/validators/smart-sessions.d.ts.map +1 -1
  72. package/dist/src/modules/validators/smart-sessions.js +509 -92
  73. package/dist/src/orchestrator/caip2.d.ts +9 -3
  74. package/dist/src/orchestrator/caip2.d.ts.map +1 -1
  75. package/dist/src/orchestrator/caip2.js +40 -5
  76. package/dist/src/orchestrator/client.d.ts.map +1 -1
  77. package/dist/src/orchestrator/client.js +44 -21
  78. package/dist/src/orchestrator/consts.d.ts +1 -1
  79. package/dist/src/orchestrator/consts.d.ts.map +1 -1
  80. package/dist/src/orchestrator/consts.js +1 -1
  81. package/dist/src/orchestrator/destinations.d.ts +24 -0
  82. package/dist/src/orchestrator/destinations.d.ts.map +1 -0
  83. package/dist/src/orchestrator/destinations.js +55 -0
  84. package/dist/src/orchestrator/error.d.ts +87 -4
  85. package/dist/src/orchestrator/error.d.ts.map +1 -1
  86. package/dist/src/orchestrator/error.js +237 -3
  87. package/dist/src/orchestrator/index.d.ts +6 -5
  88. package/dist/src/orchestrator/index.d.ts.map +1 -1
  89. package/dist/src/orchestrator/index.js +4 -3
  90. package/dist/src/orchestrator/registry.d.ts +2 -1
  91. package/dist/src/orchestrator/registry.d.ts.map +1 -1
  92. package/dist/src/orchestrator/registry.js +13 -0
  93. package/dist/src/orchestrator/types.d.ts +114 -28
  94. package/dist/src/orchestrator/types.d.ts.map +1 -1
  95. package/dist/src/orchestrator/types.js +1 -5
  96. package/dist/src/smart-sessions/index.d.ts +5 -0
  97. package/dist/src/smart-sessions/index.d.ts.map +1 -0
  98. package/dist/src/smart-sessions/index.js +6 -0
  99. package/dist/src/types.d.ts +298 -29
  100. package/dist/src/types.d.ts.map +1 -1
  101. package/dist/src/utils/index.d.ts +59 -0
  102. package/dist/src/utils/index.d.ts.map +1 -1
  103. package/dist/src/utils/index.js +59 -0
  104. package/package.json +4 -8
  105. package/dist/src/actions/recovery.d.ts +0 -33
  106. package/dist/src/actions/recovery.d.ts.map +0 -1
  107. package/dist/src/actions/recovery.js +0 -189
@@ -1,7 +1,13 @@
1
- type Caip2ChainId = `eip155:${number}`;
1
+ type EvmCaip2ChainId = `eip155:${number}`;
2
+ type SolanaCaip2ChainId = `solana:${string}`;
3
+ type TronCaip2ChainId = `tron:${string}`;
4
+ type Caip2ChainId = EvmCaip2ChainId | SolanaCaip2ChainId | TronCaip2ChainId;
2
5
  declare function toCaip2(chainId: number): Caip2ChainId;
3
6
  declare function fromCaip2(chainId: string): number;
4
7
  declare function isCaip2(chainId: string): chainId is Caip2ChainId;
5
- export type { Caip2ChainId };
6
- export { fromCaip2, isCaip2, toCaip2 };
8
+ declare function isEvmCaip2(chainId: string): chainId is EvmCaip2ChainId;
9
+ /** True when a numeric chain id corresponds to a known non-eip155 namespace. */
10
+ declare function isNonEvmChainId(chainId: number): boolean;
11
+ export type { Caip2ChainId, EvmCaip2ChainId, SolanaCaip2ChainId, TronCaip2ChainId, };
12
+ export { fromCaip2, isCaip2, isEvmCaip2, isNonEvmChainId, toCaip2 };
7
13
  //# sourceMappingURL=caip2.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"caip2.d.ts","sourceRoot":"","sources":["../../../orchestrator/caip2.ts"],"names":[],"mappings":"AAAA,KAAK,YAAY,GAAG,UAAU,MAAM,EAAE,CAAA;AAItC,iBAAS,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY,CAK9C;AAED,iBAAS,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAK1C;AAED,iBAAS,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,IAAI,YAAY,CAEzD;AAED,YAAY,EAAE,YAAY,EAAE,CAAA;AAC5B,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,CAAA"}
1
+ {"version":3,"file":"caip2.d.ts","sourceRoot":"","sources":["../../../orchestrator/caip2.ts"],"names":[],"mappings":"AAOA,KAAK,eAAe,GAAG,UAAU,MAAM,EAAE,CAAA;AACzC,KAAK,kBAAkB,GAAG,UAAU,MAAM,EAAE,CAAA;AAC5C,KAAK,gBAAgB,GAAG,QAAQ,MAAM,EAAE,CAAA;AACxC,KAAK,YAAY,GAAG,eAAe,GAAG,kBAAkB,GAAG,gBAAgB,CAAA;AAmB3E,iBAAS,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY,CAO9C;AAED,iBAAS,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAS1C;AAED,iBAAS,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,IAAI,YAAY,CAGzD;AAED,iBAAS,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,IAAI,eAAe,CAE/D;AAED,gFAAgF;AAChF,iBAAS,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAEjD;AAED,YAAY,EACV,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,gBAAgB,GACjB,CAAA;AACD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,OAAO,EAAE,CAAA"}
@@ -1,17 +1,52 @@
1
+ // CAIP-2 wire format. Mirrors the orchestrator's caip2.ts namespace registry
2
+ // — Solana / Tron synthetic numeric ids round-trip through the same CAIP-2
3
+ // strings the orchestrator emits, so the SDK and orchestrator agree on the
4
+ // wire shape without needing the user to think about CAIP-2 themselves.
5
+ //
6
+ // Spec: https://chainagnostic.org/CAIPs/caip-2
1
7
  const EIP155_CAIP2_REGEX = /^eip155:\d+$/;
8
+ const NON_EIP155_CAIP2_REGEX = /^(?:solana|tron):[-_a-zA-Z0-9]{1,32}$/;
9
+ // Synthetic numeric ids ↔ CAIP-2 strings for non-eip155 chains. Must match
10
+ // the orchestrator's NON_EIP155_CAIP2_TO_ID exactly — these flow over the
11
+ // wire and any drift would cause routing failures.
12
+ const NON_EIP155_ID_TO_CAIP2 = {
13
+ 792703809: 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp',
14
+ 728126428: 'tron:0x2b6653dc',
15
+ };
16
+ const NON_EIP155_CAIP2_TO_ID = Object.fromEntries(Object.entries(NON_EIP155_ID_TO_CAIP2).map(([id, caip2]) => [
17
+ caip2,
18
+ Number(id),
19
+ ]));
2
20
  function toCaip2(chainId) {
3
21
  if (!Number.isInteger(chainId) || chainId < 0) {
4
- throw new Error(`Invalid EVM chain id: ${chainId}`);
22
+ throw new Error(`Invalid chain id: ${chainId}`);
5
23
  }
24
+ const nonEvm = NON_EIP155_ID_TO_CAIP2[chainId];
25
+ if (nonEvm)
26
+ return nonEvm;
6
27
  return `eip155:${chainId}`;
7
28
  }
8
29
  function fromCaip2(chainId) {
9
- if (!EIP155_CAIP2_REGEX.test(chainId)) {
10
- throw new Error(`Invalid CAIP-2 chain id: ${chainId}`);
30
+ if (EIP155_CAIP2_REGEX.test(chainId)) {
31
+ return Number(chainId.slice('eip155:'.length));
11
32
  }
12
- return Number(chainId.slice('eip155:'.length));
33
+ if (NON_EIP155_CAIP2_REGEX.test(chainId)) {
34
+ const id = NON_EIP155_CAIP2_TO_ID[chainId];
35
+ if (id !== undefined)
36
+ return id;
37
+ }
38
+ throw new Error(`Invalid CAIP-2 chain id: ${chainId}`);
13
39
  }
14
40
  function isCaip2(chainId) {
41
+ if (EIP155_CAIP2_REGEX.test(chainId))
42
+ return true;
43
+ return chainId in NON_EIP155_CAIP2_TO_ID;
44
+ }
45
+ function isEvmCaip2(chainId) {
15
46
  return EIP155_CAIP2_REGEX.test(chainId);
16
47
  }
17
- export { fromCaip2, isCaip2, toCaip2 };
48
+ /** True when a numeric chain id corresponds to a known non-eip155 namespace. */
49
+ function isNonEvmChainId(chainId) {
50
+ return chainId in NON_EIP155_ID_TO_CAIP2;
51
+ }
52
+ export { fromCaip2, isCaip2, isEvmCaip2, isNonEvmChainId, toCaip2 };
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../orchestrator/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AACnC,OAAO,KAAK,EAA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ts.js';
3
3
  import { OrchestratorError, parseErrorEnvelope, } from './error.js';
4
4
  import { convertBigIntFields } from './utils.js';
@@ -62,6 +62,7 @@ export class Orchestrator {
62
62
  body: JSON.stringify(body),
63
63
  });
64
64
  return {
65
+ traceId: json.traceId,
65
66
  intents: json.intents.map(parseTokenAmountsRecord),
66
67
  };
67
68
  }
@@ -81,18 +82,14 @@ export class Orchestrator {
81
82
  headers: await this.getHeaders(),
82
83
  });
83
84
  return {
85
+ traceId: json.traceId,
84
86
  status: json.status,
85
- claims: (json.claims ?? []).map((claim) => ({
86
- depositId: claim.depositId !== undefined ? BigInt(claim.depositId) : 0n,
87
- chainId: parseChainId(claim.chainId),
88
- status: claim.status,
89
- claimTimestamp: claim.claimTimestamp,
90
- claimTransactionHash: claim.claimTransactionHash,
91
- })),
92
- destinationChainId: parseChainId(json.destinationChainId),
93
87
  accountAddress: json.accountAddress,
94
- fillTimestamp: json.fillTimestamp,
95
- fillTransactionHash: json.fillTransactionHash,
88
+ // Flatten orchestrator's per-chain items[] to one entry per chain.
89
+ operations: (json.operations ?? []).map((op) => {
90
+ const item = op.items?.[0] ?? {};
91
+ return { chain: op.chain, ...item };
92
+ }),
96
93
  };
97
94
  }
98
95
  async getHeaders() {
@@ -117,6 +114,7 @@ export class Orchestrator {
117
114
  }
118
115
  async fetch(url, options) {
119
116
  const response = await fetch(url, options);
117
+ const traceId = response.headers?.get?.('x-trace-id') ?? undefined;
120
118
  if (!response.ok) {
121
119
  let body;
122
120
  try {
@@ -129,10 +127,15 @@ export class Orchestrator {
129
127
  traceId: '',
130
128
  };
131
129
  }
130
+ body = { ...body, traceId: traceId ?? body.traceId ?? '' };
132
131
  const retryAfter = response.headers?.get?.('retry-after') ?? undefined;
133
132
  throw parseErrorEnvelope(body, response.status, retryAfter ?? undefined);
134
133
  }
135
- return response.json();
134
+ const body = await response.json();
135
+ if (body && typeof body === 'object' && !Array.isArray(body)) {
136
+ return { ...body, traceId: traceId ?? body.traceId };
137
+ }
138
+ return body;
136
139
  }
137
140
  }
138
141
  function parseTokenAmountsRecord(record) {
@@ -145,9 +148,11 @@ function parseChainId(value) {
145
148
  if (typeof value === 'number')
146
149
  return value;
147
150
  if (typeof value === 'string') {
148
- if (value.startsWith('eip155:'))
151
+ if (isCaip2(value))
149
152
  return fromCaip2(value);
150
- return Number(value);
153
+ const numeric = Number(value);
154
+ if (Number.isFinite(numeric))
155
+ return numeric;
151
156
  }
152
157
  throw new OrchestratorError({
153
158
  message: `Invalid chain id value: ${String(value)}`,
@@ -206,16 +211,15 @@ function encodeAuxiliaryFunds(funds) {
206
211
  ]));
207
212
  }
208
213
  function encodeOptions(options) {
209
- if (!options.auxiliaryFunds)
210
- return options;
211
- return {
212
- ...options,
213
- auxiliaryFunds: encodeAuxiliaryFunds(options.auxiliaryFunds),
214
- };
214
+ const wire = { ...options };
215
+ if (options.auxiliaryFunds) {
216
+ wire.auxiliaryFunds = encodeAuxiliaryFunds(options.auxiliaryFunds);
217
+ }
218
+ return wire;
215
219
  }
216
220
  function decodeQuoteResponse(json) {
217
221
  const routes = (json.routes ?? []);
218
- return { routes: routes.map(decodeQuote) };
222
+ return { traceId: json.traceId, routes: routes.map(decodeQuote) };
219
223
  }
220
224
  function decodeQuote(route) {
221
225
  return {
@@ -225,11 +229,30 @@ function decodeQuote(route) {
225
229
  settlementLayer: route.settlementLayer,
226
230
  signData: route.signData,
227
231
  cost: decodeCost(route.cost),
232
+ appFee: decodeAppFee(route.appFee ?? route.intentCost?.appFee),
228
233
  tokenRequirements: route.tokenRequirements
229
234
  ? decodeTokenRequirements(route.tokenRequirements)
230
235
  : undefined,
236
+ bridgeFill: decodeBridgeFill(route.bridgeFill),
231
237
  };
232
238
  }
239
+ function decodeAppFee(appFee) {
240
+ if (!appFee)
241
+ return undefined;
242
+ return appFee.map((fee) => ({
243
+ feeBps: fee.feeBps,
244
+ baseAmount: BigInt(fee.baseAmount),
245
+ amount: BigInt(fee.amount),
246
+ chainId: parseChainId(fee.chainId),
247
+ tokenAddress: fee.tokenAddress,
248
+ }));
249
+ }
250
+ // Normalizes CAIP-2 strings to numeric IDs for consistency with BridgeFill decodeCostTokenEntry, and getIntent
251
+ function decodeBridgeFill(bf) {
252
+ if (!bf)
253
+ return undefined;
254
+ return { ...bf, destinationChainId: parseChainId(bf.destinationChainId) };
255
+ }
233
256
  function decodeCost(cost) {
234
257
  return {
235
258
  input: cost.input.map(decodeCostTokenEntry),
@@ -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 = "2.0.0-beta.3";
3
+ declare const SDK_VERSION = "2.0.0-beta.30";
4
4
  declare const API_VERSION = "2026-04.blanc";
5
5
  export { PROD_ORCHESTRATOR_URL, RHINESTONE_SPOKE_POOL_ADDRESS, SDK_VERSION, API_VERSION, };
6
6
  //# sourceMappingURL=consts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../../orchestrator/consts.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,qBAAqB,2CAA2C,CAAA;AACtE,QAAA,MAAM,6BAA6B,+CACW,CAAA;AAE9C,QAAA,MAAM,WAAW,iBAAiB,CAAA;AAClC,QAAA,MAAM,WAAW,kBAAkB,CAAA;AAEnC,OAAO,EACL,qBAAqB,EACrB,6BAA6B,EAC7B,WAAW,EACX,WAAW,GACZ,CAAA"}
1
+ {"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../../orchestrator/consts.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,qBAAqB,2CAA2C,CAAA;AACtE,QAAA,MAAM,6BAA6B,+CACW,CAAA;AAE9C,QAAA,MAAM,WAAW,kBAAkB,CAAA;AACnC,QAAA,MAAM,WAAW,kBAAkB,CAAA;AAEnC,OAAO,EACL,qBAAqB,EACrB,6BAA6B,EAC7B,WAAW,EACX,WAAW,GACZ,CAAA"}
@@ -1,5 +1,5 @@
1
1
  const PROD_ORCHESTRATOR_URL = 'https://v1.orchestrator.rhinestone.dev';
2
2
  const RHINESTONE_SPOKE_POOL_ADDRESS = '0x000000000060f6e853447881951574cdd0663530';
3
- const SDK_VERSION = '2.0.0-beta.3';
3
+ const SDK_VERSION = '2.0.0-beta.30';
4
4
  const API_VERSION = '2026-04.blanc';
5
5
  export { PROD_ORCHESTRATOR_URL, RHINESTONE_SPOKE_POOL_ADDRESS, SDK_VERSION, API_VERSION, };
@@ -0,0 +1,24 @@
1
+ import type { Chain } from 'viem';
2
+ import type { Caip2ChainId } from './caip2.js';
3
+ interface NativeCurrency {
4
+ readonly name: string;
5
+ readonly symbol: string;
6
+ readonly decimals: number;
7
+ }
8
+ type NonEvmAddress = string;
9
+ interface NonEvmChain {
10
+ readonly name: string;
11
+ readonly caip2: Caip2ChainId;
12
+ readonly kind: 'svm' | 'tvm' | 'hypercore';
13
+ readonly nativeCurrency: NativeCurrency;
14
+ readonly testnet?: boolean;
15
+ }
16
+ type DestinationChain = Chain | NonEvmChain;
17
+ declare const solanaMainnet: NonEvmChain;
18
+ declare const tronMainnet: NonEvmChain;
19
+ declare const hyperCoreMainnet: NonEvmChain;
20
+ declare function isNonEvmChain(chain: DestinationChain): chain is NonEvmChain;
21
+ declare function getChainId(chain: DestinationChain): number;
22
+ export type { DestinationChain, NativeCurrency, NonEvmAddress, NonEvmChain };
23
+ export { getChainId, hyperCoreMainnet, isNonEvmChain, solanaMainnet, tronMainnet, };
24
+ //# sourceMappingURL=destinations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"destinations.d.ts","sourceRoot":"","sources":["../../../orchestrator/destinations.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,MAAM,CAAA;AACjC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAG3C,UAAU,cAAc;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAC1B;AAMD,KAAK,aAAa,GAAG,MAAM,CAAA;AAE3B,UAAU,WAAW;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAA;IAI5B,QAAQ,CAAC,IAAI,EAAE,KAAK,GAAG,KAAK,GAAG,WAAW,CAAA;IAC1C,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAA;IACvC,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAC3B;AAED,KAAK,gBAAgB,GAAG,KAAK,GAAG,WAAW,CAAA;AAE3C,QAAA,MAAM,aAAa,EAAE,WAKpB,CAAA;AAED,QAAA,MAAM,WAAW,EAAE,WAKlB,CAAA;AAQD,QAAA,MAAM,gBAAgB,EAAE,WAKvB,CAAA;AAOD,iBAAS,aAAa,CAAC,KAAK,EAAE,gBAAgB,GAAG,KAAK,IAAI,WAAW,CAEpE;AAKD,iBAAS,UAAU,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,CAEnD;AAED,YAAY,EAAE,gBAAgB,EAAE,cAAc,EAAE,aAAa,EAAE,WAAW,EAAE,CAAA;AAC5E,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,WAAW,GACZ,CAAA"}
@@ -0,0 +1,55 @@
1
+ // Public destination chain descriptors for destinations that aren't a plain
2
+ // viem `Chain`: the non-EVM chains (Solana, Tron) plus HyperCore (an EVM-settled
3
+ // virtual L1). Mirrors the minimal shape of viem's `Chain` (name,
4
+ // nativeCurrency) so callers can pass them anywhere a destination chain is
5
+ // expected — `targetChain: solanaMainnet` reads the same as `targetChain:
6
+ // optimism`.
7
+ //
8
+ // The `kind` field discriminates these from viem `Chain` objects; viem
9
+ // chains don't carry a `kind` field, so the `isNonEvmChain` helper
10
+ // narrows a `Chain | NonEvmChain` union structurally.
11
+ //
12
+ // The wire format is the CAIP-2 string. Internally the SDK and the
13
+ // orchestrator also use a synthetic numeric chain id derived from the
14
+ // CAIP-2 mapping, but it is non-standard and intentionally not exposed
15
+ // on this type — use `getChainId` if you need a numeric id.
16
+ import { fromCaip2 } from './caip2.js';
17
+ const solanaMainnet = {
18
+ name: 'Solana',
19
+ caip2: 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp',
20
+ kind: 'svm',
21
+ nativeCurrency: { name: 'Solana', symbol: 'SOL', decimals: 9 },
22
+ };
23
+ const tronMainnet = {
24
+ name: 'Tron',
25
+ caip2: 'tron:0x2b6653dc',
26
+ kind: 'tvm',
27
+ nativeCurrency: { name: 'Tron', symbol: 'TRX', decimals: 6 },
28
+ };
29
+ // HyperCore is Hyperliquid's virtual trading L1 (chain id 1337). Unlike Solana
30
+ // and Tron it settles on an EVM chain (HyperEVM, 999), but the deposit is
31
+ // solver-mediated: the orchestrator builds the core-deposit executions and the
32
+ // user signs no destination session, so it belongs with the descriptor-addressed
33
+ // destinations rather than the standard EVM signing path. The CAIP-2 reference
34
+ // is the virtual id; the orchestrator maps 1337 → 999 for settlement.
35
+ const hyperCoreMainnet = {
36
+ name: 'HyperCore',
37
+ caip2: 'eip155:1337',
38
+ kind: 'hypercore',
39
+ nativeCurrency: { name: 'Hyperliquid', symbol: 'HYPE', decimals: 18 },
40
+ };
41
+ // True for any descriptor-addressed destination (Solana, Tron, HyperCore) as
42
+ // opposed to a plain viem `Chain`. viem chains carry no `kind` field, so the
43
+ // presence of `kind` is the structural discriminator — and every such
44
+ // destination is solver-mediated (no user-signed destination session, no
45
+ // destination-side validator), which is what every caller keys off.
46
+ function isNonEvmChain(chain) {
47
+ return 'kind' in chain;
48
+ }
49
+ // Numeric chain id for either chain kind. EVM uses viem's `id`; non-EVM
50
+ // derives the synthetic id from the CAIP-2 string. Used for the wire
51
+ // format and for SDK-internal lookups keyed by chain id.
52
+ function getChainId(chain) {
53
+ return isNonEvmChain(chain) ? fromCaip2(chain.caip2) : chain.id;
54
+ }
55
+ export { getChainId, hyperCoreMainnet, isNonEvmChain, solanaMainnet, tronMainnet, };
@@ -1,4 +1,5 @@
1
- type ErrorCode = 'VALIDATION_ERROR' | 'INSUFFICIENT_LIQUIDITY' | 'NOT_FOUND' | 'UNAUTHORIZED' | 'FORBIDDEN' | 'CONFLICT' | 'UNPROCESSABLE_CONTENT' | 'TOO_MANY_REQUESTS' | 'SETTLEMENT_QUOTE_ERROR' | 'SETTLEMENT_EXECUTION_ERROR' | 'EXTERNAL_SERVICE_TIMEOUT' | 'RELAYER_MARKET_UNAVAILABLE' | 'INTERNAL_ERROR';
1
+ import type { Address, Hex } from 'viem';
2
+ type ErrorCode = 'VALIDATION_ERROR' | 'INSUFFICIENT_LIQUIDITY' | 'NOT_FOUND' | 'UNAUTHORIZED' | 'FORBIDDEN' | 'KEY_SCOPE_DENIED' | 'CONFLICT' | 'UNPROCESSABLE_CONTENT' | 'TOO_MANY_REQUESTS' | 'SETTLEMENT_QUOTE_ERROR' | 'SETTLEMENT_EXECUTION_ERROR' | 'SIMULATION_FAILED' | 'EXTERNAL_SERVICE_TIMEOUT' | 'RELAYER_MARKET_UNAVAILABLE' | 'INTERNAL_ERROR';
2
3
  interface ValidationIssue {
3
4
  message: string;
4
5
  context?: Record<string, unknown>;
@@ -8,6 +9,42 @@ interface BaseErrorParams {
8
9
  traceId?: string;
9
10
  statusCode?: number;
10
11
  }
12
+ type SimulationAction = 'claim' | 'fill';
13
+ type SimulationRetryHint = 'RE_PREPARE' | 'RETRY_LATER';
14
+ type SimulationErrorCategory = 'QUOTE_EXPIRED' | 'ORDER_EXPIRED' | 'PERMIT_EXPIRED' | 'PERMIT2_NONCE_CONSUMED' | 'EXECUTOR_NONCE_CONSUMED' | 'INVALID_SIGNATURE' | 'INVALID_PERMIT2_SIGNATURE' | 'INVALID_CONTRACT_SIGNATURE' | 'INVALID_SIGNER' | 'INSUFFICIENT_BALANCE' | 'INSUFFICIENT_ALLOWANCE' | 'ACCOUNT_CREATION_FAILED' | 'ACCOUNT_UNAUTHORIZED' | 'ADAPTER_CALL_FAILED' | 'EXECUTION_FAILED' | 'CLAIM_FAILED' | 'ROUTER_PAUSED' | 'ADAPTER_NOT_FOUND' | 'PANIC' | 'REQUIRE_FAILED' | 'UNCLASSIFIED_REVERT' | 'EMPTY_REVERT';
15
+ interface SimulationCall {
16
+ chainId?: string;
17
+ to?: Address;
18
+ data?: Hex;
19
+ value?: string;
20
+ }
21
+ interface SimulationDetails {
22
+ stateOverride?: unknown;
23
+ blockNumber?: string;
24
+ relayer?: Address;
25
+ simulationUrls?: string[];
26
+ }
27
+ interface SimulationFailureSimulation {
28
+ success: false;
29
+ action?: SimulationAction;
30
+ chainId?: string;
31
+ call?: SimulationCall;
32
+ errorSelector?: string;
33
+ errorName?: string;
34
+ errorArgs?: Record<string, unknown>;
35
+ errorCategory?: SimulationErrorCategory;
36
+ details?: SimulationDetails;
37
+ }
38
+ interface SimulationFailureDetails {
39
+ nonce?: string;
40
+ category?: SimulationErrorCategory;
41
+ errorSelector?: string;
42
+ errorName?: string;
43
+ errorArgs?: Record<string, unknown>;
44
+ retryable?: boolean;
45
+ retryHint?: SimulationRetryHint;
46
+ simulations?: SimulationFailureSimulation[];
47
+ }
11
48
  declare class OrchestratorError extends Error {
12
49
  readonly code: ErrorCode | 'UNKNOWN';
13
50
  readonly traceId: string;
@@ -37,7 +74,26 @@ declare class UnauthorizedError extends OrchestratorError {
37
74
  constructor(params: BaseErrorParams);
38
75
  }
39
76
  declare class ForbiddenError extends OrchestratorError {
40
- constructor(params: BaseErrorParams);
77
+ constructor(params: BaseErrorParams & {
78
+ code?: ErrorCode;
79
+ });
80
+ }
81
+ /**
82
+ * Thrown when an API key's scope denies the request.
83
+ *
84
+ * Subclass of `ForbiddenError` carrying the failed `scope` and the
85
+ * `required` / `actual` levels — distinct from a generic 403 so integrators
86
+ * can prompt the user to widen the key's scope rather than rotate it.
87
+ */
88
+ declare class KeyScopeDeniedError extends ForbiddenError {
89
+ readonly scope: string;
90
+ readonly required: string | boolean;
91
+ readonly actual: string | boolean;
92
+ constructor(params: BaseErrorParams & {
93
+ scope: string;
94
+ required: string | boolean;
95
+ actual: string | boolean;
96
+ });
41
97
  }
42
98
  declare class ConflictError extends OrchestratorError {
43
99
  constructor(params: BaseErrorParams);
@@ -57,6 +113,17 @@ declare class SettlementQuoteError extends OrchestratorError {
57
113
  declare class SettlementExecutionError extends OrchestratorError {
58
114
  constructor(params: BaseErrorParams);
59
115
  }
116
+ declare class SimulationFailedError extends OrchestratorError {
117
+ readonly nonce?: string;
118
+ readonly category?: SimulationErrorCategory;
119
+ readonly errorSelector?: string;
120
+ readonly errorName?: string;
121
+ readonly errorArgs?: Record<string, unknown>;
122
+ readonly retryable: boolean;
123
+ readonly retryHint?: SimulationRetryHint;
124
+ readonly simulations: SimulationFailureSimulation[];
125
+ constructor(params: BaseErrorParams & SimulationFailureDetails);
126
+ }
60
127
  declare class ExternalServiceTimeoutError extends OrchestratorError {
61
128
  constructor(params: BaseErrorParams);
62
129
  }
@@ -91,7 +158,23 @@ declare function isOrchestratorError(error: unknown): error is OrchestratorError
91
158
  declare function isRateLimited(error: unknown): error is RateLimitedError;
92
159
  declare function isValidationError(error: unknown): error is ValidationError;
93
160
  declare function isAuthError(error: unknown): error is UnauthorizedError | ForbiddenError;
161
+ declare function isSimulationFailed(error: unknown): error is SimulationFailedError;
94
162
  declare function isRetryable(error: unknown): boolean;
95
- export type { ErrorCode, ErrorEnvelope, ValidationIssue };
96
- export { parseErrorEnvelope, isOrchestratorError, isRetryable, isAuthError, isValidationError, isRateLimited, OrchestratorError, ValidationError, InsufficientLiquidityError, NotFoundError, UnauthorizedError, ForbiddenError, ConflictError, UnprocessableContentError, RateLimitedError, SettlementQuoteError, SettlementExecutionError, ExternalServiceTimeoutError, RelayerMarketUnavailableError, InternalServerError, UnsupportedChainError, UnsupportedTokenError, };
163
+ /**
164
+ * Detects transport-level failures (connection reset, socket closed, DNS, TLS)
165
+ * that `fetch` rejects with instead of returning an HTTP response. Unlike HTTP
166
+ * errors — which the client converts into typed {@link OrchestratorError}s —
167
+ * these carry no status and bubble up untyped, so {@link isRetryable} misses
168
+ * them. They are safe to retry for idempotent reads (e.g. intent-status
169
+ * polling). We match by `code` and message across the cause chain — never by
170
+ * error type: `fetch` rejects network failures as `TypeError`, but `TypeError`
171
+ * is also thrown for logic bugs, bad URLs, and response-decoding errors that
172
+ * must NOT be retried (`waitForExecution` has no SDK-side deadline). Runtimes
173
+ * differ (Bun throws a plain `Error` with a socket message; undici/Node a
174
+ * `TypeError` with a coded `cause`), hence both signals. Caller-initiated
175
+ * aborts are excluded so deadlines/cancellation still propagate.
176
+ */
177
+ declare function isConnectionError(error: unknown): boolean;
178
+ export type { ErrorCode, ErrorEnvelope, SimulationAction, SimulationCall, SimulationDetails, SimulationErrorCategory, SimulationFailureDetails, SimulationFailureSimulation, SimulationRetryHint, ValidationIssue, };
179
+ export { parseErrorEnvelope, isOrchestratorError, isRetryable, isConnectionError, isAuthError, isValidationError, isRateLimited, isSimulationFailed, OrchestratorError, ValidationError, InsufficientLiquidityError, NotFoundError, UnauthorizedError, ForbiddenError, KeyScopeDeniedError, ConflictError, UnprocessableContentError, RateLimitedError, SettlementQuoteError, SettlementExecutionError, SimulationFailedError, ExternalServiceTimeoutError, RelayerMarketUnavailableError, InternalServerError, UnsupportedChainError, UnsupportedTokenError, };
97
180
  //# sourceMappingURL=error.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../orchestrator/error.ts"],"names":[],"mappings":"AAAA,KAAK,SAAS,GACV,kBAAkB,GAClB,wBAAwB,GACxB,WAAW,GACX,cAAc,GACd,WAAW,GACX,UAAU,GACV,uBAAuB,GACvB,mBAAmB,GACnB,wBAAwB,GACxB,4BAA4B,GAC5B,0BAA0B,GAC1B,4BAA4B,GAC5B,g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BAAiB,CAoDnB;AAED,iBAAS,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,iBAAiB,CAEvE;AAED,iBAAS,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,gBAAgB,CAEhE;AAED,iBAAS,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAEnE;AAED,iBAAS,WAAW,CAClB,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,iBAAiB,GAAG,cAAc,CAE7C;AAED,iBAAS,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAM5C;AAED,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,eAAe,EAAE,CAAA;AACzD,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,WAAW,EACX,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,0BAA0B,EAC1B,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,yBAAyB,EACzB,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,EACxB,2BAA2B,EAC3B,6BAA6B,EAC7B,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,GACtB,CAAA"}
1
+ {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../orchestrator/error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAExC,KAAK,SAAS,GACV,kBAAkB,GAClB,wBAAwB,GACxB,WAAW,GACX,cAAc,GACd,WAAW,GACX,kBAAkB,GAClB,UAAU,GACV,uBAAuB,GACvB,mBAAmB,GACnB,wBAAwB,GACxB,4BAA4B,GAC5B,mBAAmB,GACnB,0BAA0B,GAC1B,4BAA4B,GAC5B,gBAAgB,CAAA;AAEpB,UAAU,eAAe;IACvB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,E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