@rhinestone/sdk 2.0.0-beta.4 → 2.0.0-beta.40

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 (114) 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 +148 -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 +119 -43
  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 +8 -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 +6 -9
  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 +6 -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 +18 -18
  43. package/dist/src/execution/index.d.ts.map +1 -1
  44. package/dist/src/execution/index.js +27 -42
  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 +281 -80
  48. package/dist/src/index.d.ts +246 -37
  49. package/dist/src/index.d.ts.map +1 -1
  50. package/dist/src/index.js +82 -116
  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 +52 -4
  58. package/dist/src/modules/validators/core.d.ts +6 -6
  59. package/dist/src/modules/validators/core.d.ts.map +1 -1
  60. package/dist/src/modules/validators/core.js +42 -39
  61. package/dist/src/modules/validators/cross-chain-permits.d.ts +21 -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 +111 -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 +192 -18
  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 +16 -3
  74. package/dist/src/orchestrator/caip2.d.ts.map +1 -1
  75. package/dist/src/orchestrator/caip2.js +38 -6
  76. package/dist/src/orchestrator/client.d.ts +2 -1
  77. package/dist/src/orchestrator/client.d.ts.map +1 -1
  78. package/dist/src/orchestrator/client.js +50 -24
  79. package/dist/src/orchestrator/consts.d.ts +1 -1
  80. package/dist/src/orchestrator/consts.d.ts.map +1 -1
  81. package/dist/src/orchestrator/consts.js +1 -1
  82. package/dist/src/orchestrator/destinations.d.ts +24 -0
  83. package/dist/src/orchestrator/destinations.d.ts.map +1 -0
  84. package/dist/src/orchestrator/destinations.js +59 -0
  85. package/dist/src/orchestrator/error.d.ts +95 -5
  86. package/dist/src/orchestrator/error.d.ts.map +1 -1
  87. package/dist/src/orchestrator/error.js +260 -4
  88. package/dist/src/orchestrator/index.d.ts +7 -5
  89. package/dist/src/orchestrator/index.d.ts.map +1 -1
  90. package/dist/src/orchestrator/index.js +4 -3
  91. package/dist/src/orchestrator/registry.d.ts +2 -1
  92. package/dist/src/orchestrator/registry.d.ts.map +1 -1
  93. package/dist/src/orchestrator/registry.js +13 -0
  94. package/dist/src/orchestrator/types.d.ts +92 -29
  95. package/dist/src/orchestrator/types.d.ts.map +1 -1
  96. package/dist/src/orchestrator/types.js +1 -5
  97. package/dist/src/orchestrator/wire.d.ts +30 -0
  98. package/dist/src/orchestrator/wire.d.ts.map +1 -0
  99. package/dist/src/orchestrator/wire.gen.d.ts +4290 -0
  100. package/dist/src/orchestrator/wire.gen.d.ts.map +1 -0
  101. package/dist/src/orchestrator/wire.gen.js +1 -0
  102. package/dist/src/orchestrator/wire.js +1 -0
  103. package/dist/src/smart-sessions/index.d.ts +6 -0
  104. package/dist/src/smart-sessions/index.d.ts.map +1 -0
  105. package/dist/src/smart-sessions/index.js +7 -0
  106. package/dist/src/types.d.ts +299 -31
  107. package/dist/src/types.d.ts.map +1 -1
  108. package/dist/src/utils/index.d.ts +59 -0
  109. package/dist/src/utils/index.d.ts.map +1 -1
  110. package/dist/src/utils/index.js +59 -0
  111. package/package.json +5 -9
  112. package/dist/src/actions/recovery.d.ts +0 -33
  113. package/dist/src/actions/recovery.d.ts.map +0 -1
  114. package/dist/src/actions/recovery.js +0 -189
@@ -1,7 +1,20 @@
1
- type Caip2ChainId = `eip155:${number}`;
1
+ type EvmCaip2ChainId = `eip155:${number}`;
2
+ type SolanaCaip2ChainId = `solana:${string}`;
3
+ type TronCaip2ChainId = `tron:${string}`;
4
+ type HyperCoreCaip2ChainId = 'hypercore:mainnet';
5
+ type Caip2ChainId = EvmCaip2ChainId | SolanaCaip2ChainId | TronCaip2ChainId | HyperCoreCaip2ChainId;
2
6
  declare function toCaip2(chainId: number): Caip2ChainId;
3
7
  declare function fromCaip2(chainId: string): number;
4
8
  declare function isCaip2(chainId: string): chainId is Caip2ChainId;
5
- export type { Caip2ChainId };
6
- export { fromCaip2, isCaip2, toCaip2 };
9
+ declare function isEvmCaip2(chainId: string): chainId is EvmCaip2ChainId;
10
+ /**
11
+ * True when a numeric chain id is genuinely non-EVM (Solana / Tron). HyperCore
12
+ * (1337) is EVM-settled, so this is `false` for it even though its wire id is
13
+ * the non-eip155 `hypercore:mainnet` namespace — `registry.ts` /
14
+ * `execution/utils.ts` rely on HyperCore being EVM-classified here. Sourced
15
+ * from the shared-configs registry `vmType`.
16
+ */
17
+ declare function isNonEvmChainId(chainId: number): boolean;
18
+ export type { Caip2ChainId, EvmCaip2ChainId, SolanaCaip2ChainId, TronCaip2ChainId, HyperCoreCaip2ChainId, };
19
+ export { fromCaip2, isCaip2, isEvmCaip2, isNonEvmChainId, toCaip2 };
7
20
  //# 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,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numeric-id mapping is owned by
2
+ // `@rhinestone/shared-configs` (the same source the orchestrator uses), so the
3
+ // SDK and orchestrator can't drift on the wire shape — adding a chain is a
4
+ // shared-configs registry entry, not a hand-maintained table in each repo.
5
+ // HyperCore is a first-class `virtual` registry entry there: its canonical id
6
+ // is `hypercore:mainnet` (EVM-settled, so `isNonEvmChainId(1337) === false`).
7
+ //
8
+ // Spec: https://chainagnostic.org/CAIPs/caip-2
9
+ import { chainIdFromCaip2, getCaip2, isNonEvmChainId as isNonEvmChainIdFromRegistry, } from '@rhinestone/shared-configs';
1
10
  const EIP155_CAIP2_REGEX = /^eip155:\d+$/;
2
11
  function toCaip2(chainId) {
3
12
  if (!Number.isInteger(chainId) || chainId < 0) {
4
- throw new Error(`Invalid EVM chain id: ${chainId}`);
13
+ throw new Error(`Invalid chain id: ${chainId}`);
5
14
  }
6
- return `eip155:${chainId}`;
15
+ // `getCaip2` returns the registry-declared caip2 (Solana/Tron/HyperCore) or
16
+ // the `eip155:<id>` fallback for plain EVM chains.
17
+ return getCaip2(chainId);
7
18
  }
8
19
  function fromCaip2(chainId) {
9
- if (!EIP155_CAIP2_REGEX.test(chainId)) {
10
- throw new Error(`Invalid CAIP-2 chain id: ${chainId}`);
20
+ // eip155 references aren't registry-backed (they compose programmatically),
21
+ // so parse them numerically here. This also keeps accepting the legacy
22
+ // `eip155:1337` HyperCore id for back-compat.
23
+ if (EIP155_CAIP2_REGEX.test(chainId)) {
24
+ return Number(chainId.slice('eip155:'.length));
11
25
  }
12
- return Number(chainId.slice('eip155:'.length));
26
+ const id = chainIdFromCaip2(chainId);
27
+ if (id !== undefined)
28
+ return id;
29
+ throw new Error(`Invalid CAIP-2 chain id: ${chainId}`);
13
30
  }
14
31
  function isCaip2(chainId) {
32
+ if (EIP155_CAIP2_REGEX.test(chainId))
33
+ return true;
34
+ return chainIdFromCaip2(chainId) !== undefined;
35
+ }
36
+ function isEvmCaip2(chainId) {
15
37
  return EIP155_CAIP2_REGEX.test(chainId);
16
38
  }
17
- export { fromCaip2, isCaip2, toCaip2 };
39
+ /**
40
+ * True when a numeric chain id is genuinely non-EVM (Solana / Tron). HyperCore
41
+ * (1337) is EVM-settled, so this is `false` for it even though its wire id is
42
+ * the non-eip155 `hypercore:mainnet` namespace — `registry.ts` /
43
+ * `execution/utils.ts` rely on HyperCore being EVM-classified here. Sourced
44
+ * from the shared-configs registry `vmType`.
45
+ */
46
+ function isNonEvmChainId(chainId) {
47
+ return isNonEvmChainIdFromRegistry(chainId);
48
+ }
49
+ export { fromCaip2, isCaip2, isEvmCaip2, isNonEvmChainId, toCaip2 };
@@ -1,6 +1,6 @@
1
1
  import type { Address } from 'viem';
2
2
  import type { AuthProvider } from '../auth/provider.js';
3
- import type { IntentInput, IntentOpStatus, IntentSubmitRequestInternal, IntentSubmitResponse, Portfolio, QuoteResponse, SplitIntentsInput, SplitIntentsResult } from './types.js';
3
+ import type { AppFeeBalances, IntentInput, IntentOpStatus, IntentSubmitRequestInternal, IntentSubmitResponse, Portfolio, QuoteResponse, SplitIntentsInput, SplitIntentsResult } from './types.js';
4
4
  interface PolicyContext {
5
5
  intentInput: unknown;
6
6
  isSponsored: boolean;
@@ -16,6 +16,7 @@ export declare class Orchestrator {
16
16
  [chainId: number]: Address[];
17
17
  };
18
18
  }): Promise<Portfolio>;
19
+ getAppFeeBalances(): Promise<AppFeeBalances>;
19
20
  createQuote(input: IntentInput): Promise<QuoteResponse>;
20
21
  getSplit(input: SplitIntentsInput): Promise<SplitIntentsResult>;
21
22
  createIntent(request: IntentSubmitRequestInternal, policyContext?: PolicyContext): Promise<IntentSubmitResponse>;
@@ -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,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAQpD,OAAO,KAAK,EAKV,WAAW,EACX,c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  import { OrchestratorError, parseErrorEnvelope, } from './error.js';
4
4
  import { convertBigIntFields } from './utils.js';
@@ -41,6 +41,13 @@ export class Orchestrator {
41
41
  })),
42
42
  }));
43
43
  }
44
+ async getAppFeeBalances() {
45
+ const json = await this.fetch(`${this.serverUrl}/app-fees/balances`, { headers: await this.getHeaders() });
46
+ return {
47
+ withdrawableUsd: json.withdrawableUsd,
48
+ pendingUsd: json.pendingUsd,
49
+ };
50
+ }
44
51
  async createQuote(input) {
45
52
  const body = encodeIntentInput(input);
46
53
  const json = await this.fetch(`${this.serverUrl}/quotes`, {
@@ -62,6 +69,7 @@ export class Orchestrator {
62
69
  body: JSON.stringify(body),
63
70
  });
64
71
  return {
72
+ traceId: json.traceId ?? '',
65
73
  intents: json.intents.map(parseTokenAmountsRecord),
66
74
  };
67
75
  }
@@ -70,29 +78,29 @@ export class Orchestrator {
70
78
  const headers = policyContext
71
79
  ? await this.getSubmitHeaders(policyContext.intentInput, policyContext.isSponsored)
72
80
  : await this.getHeaders();
73
- return await this.fetch(`${this.serverUrl}/intents`, {
81
+ const json = await this.fetch(`${this.serverUrl}/intents`, {
74
82
  method: 'POST',
75
83
  headers,
76
84
  body: JSON.stringify(body),
77
85
  });
86
+ return { traceId: json.traceId ?? '', intentId: json.intentId };
78
87
  }
79
88
  async getIntent(intentId) {
80
89
  const json = await this.fetch(`${this.serverUrl}/intents/${intentId}`, {
81
90
  headers: await this.getHeaders(),
82
91
  });
83
92
  return {
93
+ traceId: json.traceId ?? '',
84
94
  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
95
  accountAddress: json.accountAddress,
94
- fillTimestamp: json.fillTimestamp,
95
- fillTransactionHash: json.fillTransactionHash,
96
+ // Flatten orchestrator's per-chain items[] to one entry per chain.
97
+ operations: (json.operations ?? []).map((op) => {
98
+ const item = op.items?.[0];
99
+ return {
100
+ chain: op.chain,
101
+ ...item,
102
+ };
103
+ }),
96
104
  };
97
105
  }
98
106
  async getHeaders() {
@@ -117,6 +125,7 @@ export class Orchestrator {
117
125
  }
118
126
  async fetch(url, options) {
119
127
  const response = await fetch(url, options);
128
+ const traceId = response.headers?.get?.('x-trace-id') ?? undefined;
120
129
  if (!response.ok) {
121
130
  let body;
122
131
  try {
@@ -129,10 +138,15 @@ export class Orchestrator {
129
138
  traceId: '',
130
139
  };
131
140
  }
141
+ body = { ...body, traceId: traceId ?? body.traceId ?? '' };
132
142
  const retryAfter = response.headers?.get?.('retry-after') ?? undefined;
133
143
  throw parseErrorEnvelope(body, response.status, retryAfter ?? undefined);
134
144
  }
135
- return response.json();
145
+ const body = await response.json();
146
+ if (body && typeof body === 'object' && !Array.isArray(body)) {
147
+ return { ...body, traceId: traceId ?? body.traceId };
148
+ }
149
+ return body;
136
150
  }
137
151
  }
138
152
  function parseTokenAmountsRecord(record) {
@@ -145,9 +159,11 @@ function parseChainId(value) {
145
159
  if (typeof value === 'number')
146
160
  return value;
147
161
  if (typeof value === 'string') {
148
- if (value.startsWith('eip155:'))
162
+ if (isCaip2(value))
149
163
  return fromCaip2(value);
150
- return Number(value);
164
+ const numeric = Number(value);
165
+ if (Number.isFinite(numeric))
166
+ return numeric;
151
167
  }
152
168
  throw new OrchestratorError({
153
169
  message: `Invalid chain id value: ${String(value)}`,
@@ -206,16 +222,17 @@ function encodeAuxiliaryFunds(funds) {
206
222
  ]));
207
223
  }
208
224
  function encodeOptions(options) {
209
- if (!options.auxiliaryFunds)
210
- return options;
211
- return {
212
- ...options,
213
- auxiliaryFunds: encodeAuxiliaryFunds(options.auxiliaryFunds),
214
- };
225
+ const wire = { ...options };
226
+ if (options.auxiliaryFunds) {
227
+ wire.auxiliaryFunds = encodeAuxiliaryFunds(options.auxiliaryFunds);
228
+ }
229
+ return wire;
215
230
  }
216
231
  function decodeQuoteResponse(json) {
217
- const routes = (json.routes ?? []);
218
- return { routes: routes.map(decodeQuote) };
232
+ return {
233
+ traceId: json.traceId ?? '',
234
+ routes: (json.routes ?? []).map(decodeQuote),
235
+ };
219
236
  }
220
237
  function decodeQuote(route) {
221
238
  return {
@@ -228,9 +245,18 @@ function decodeQuote(route) {
228
245
  tokenRequirements: route.tokenRequirements
229
246
  ? decodeTokenRequirements(route.tokenRequirements)
230
247
  : undefined,
231
- bridgeFill: route.bridgeFill,
248
+ bridgeFill: decodeBridgeFill(route.bridgeFill),
232
249
  };
233
250
  }
251
+ function decodeBridgeFill(bf) {
252
+ if (!bf)
253
+ return undefined;
254
+ // `fillStatusTimeout` is an internal orchestrator field on the wire that the
255
+ // public `BridgeFill` type does not surface — strip it so the adapter returns
256
+ // only the typed variant fields rather than leaking an untyped runtime field.
257
+ const { fillStatusTimeout: _fillStatusTimeout, ...rest } = bf;
258
+ return { ...rest };
259
+ }
234
260
  function decodeCost(cost) {
235
261
  return {
236
262
  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.4";
3
+ declare const SDK_VERSION = "2.0.0-beta.40";
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.4';
3
+ const SDK_VERSION = '2.0.0-beta.40';
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;AAYD,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,59 @@
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:mainnet',
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 canonical CAIP-2
34
+ // id is `hypercore:mainnet` (the orchestrator emits this since shared-configs
35
+ // 1.6.14 / RHI-4560; `eip155:1337` was wrong because 1337 is the
36
+ // Hardhat/Ganache local chain id). It still resolves to the numeric virtual id
37
+ // 1337, which the orchestrator maps to 999 for settlement; HyperCore stays
38
+ // EVM-addressed (`isNonEvmChainId(1337) === false`).
39
+ const hyperCoreMainnet = {
40
+ name: 'HyperCore',
41
+ caip2: 'hypercore:mainnet',
42
+ kind: 'hypercore',
43
+ nativeCurrency: { name: 'Hyperliquid', symbol: 'HYPE', decimals: 18 },
44
+ };
45
+ // True for any descriptor-addressed destination (Solana, Tron, HyperCore) as
46
+ // opposed to a plain viem `Chain`. viem chains carry no `kind` field, so the
47
+ // presence of `kind` is the structural discriminator — and every such
48
+ // destination is solver-mediated (no user-signed destination session, no
49
+ // destination-side validator), which is what every caller keys off.
50
+ function isNonEvmChain(chain) {
51
+ return 'kind' in chain;
52
+ }
53
+ // Numeric chain id for either chain kind. EVM uses viem's `id`; non-EVM
54
+ // derives the synthetic id from the CAIP-2 string. Used for the wire
55
+ // format and for SDK-internal lookups keyed by chain id.
56
+ function getChainId(chain) {
57
+ return isNonEvmChain(chain) ? fromCaip2(chain.caip2) : chain.id;
58
+ }
59
+ export { getChainId, hyperCoreMainnet, isNonEvmChain, solanaMainnet, tronMainnet, };
@@ -1,13 +1,54 @@
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>;
5
6
  }
7
+ interface ErrorDetail {
8
+ message: string;
9
+ context?: Record<string, unknown>;
10
+ }
6
11
  interface BaseErrorParams {
7
12
  message: string;
8
13
  traceId?: string;
9
14
  statusCode?: number;
10
15
  }
16
+ type SimulationAction = 'claim' | 'fill';
17
+ type SimulationRetryHint = 'RE_PREPARE' | 'RETRY_LATER';
18
+ 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';
19
+ interface SimulationCall {
20
+ chainId?: string;
21
+ to?: Address;
22
+ data?: Hex;
23
+ value?: string;
24
+ }
25
+ interface SimulationDetails {
26
+ stateOverride?: unknown;
27
+ blockNumber?: string;
28
+ relayer?: Address;
29
+ simulationUrls?: string[];
30
+ }
31
+ interface SimulationFailureSimulation {
32
+ success: false;
33
+ action?: SimulationAction;
34
+ chainId?: string;
35
+ call?: SimulationCall;
36
+ errorSelector?: string;
37
+ errorName?: string;
38
+ errorArgs?: Record<string, unknown>;
39
+ errorCategory?: SimulationErrorCategory;
40
+ details?: SimulationDetails;
41
+ }
42
+ interface SimulationFailureDetails {
43
+ nonce?: string;
44
+ category?: SimulationErrorCategory;
45
+ errorSelector?: string;
46
+ errorName?: string;
47
+ errorArgs?: Record<string, unknown>;
48
+ retryable?: boolean;
49
+ retryHint?: SimulationRetryHint;
50
+ simulations?: SimulationFailureSimulation[];
51
+ }
11
52
  declare class OrchestratorError extends Error {
12
53
  readonly code: ErrorCode | 'UNKNOWN';
13
54
  readonly traceId: string;
@@ -37,13 +78,35 @@ declare class UnauthorizedError extends OrchestratorError {
37
78
  constructor(params: BaseErrorParams);
38
79
  }
39
80
  declare class ForbiddenError extends OrchestratorError {
40
- constructor(params: BaseErrorParams);
81
+ constructor(params: BaseErrorParams & {
82
+ code?: ErrorCode;
83
+ });
84
+ }
85
+ /**
86
+ * Thrown when an API key's scope denies the request.
87
+ *
88
+ * Subclass of `ForbiddenError` carrying the failed `scope` and the
89
+ * `required` / `actual` levels — distinct from a generic 403 so integrators
90
+ * can prompt the user to widen the key's scope rather than rotate it.
91
+ */
92
+ declare class KeyScopeDeniedError extends ForbiddenError {
93
+ readonly scope: string;
94
+ readonly required: string | boolean;
95
+ readonly actual: string | boolean;
96
+ constructor(params: BaseErrorParams & {
97
+ scope: string;
98
+ required: string | boolean;
99
+ actual: string | boolean;
100
+ });
41
101
  }
42
102
  declare class ConflictError extends OrchestratorError {
43
103
  constructor(params: BaseErrorParams);
44
104
  }
45
105
  declare class UnprocessableContentError extends OrchestratorError {
46
- constructor(params: BaseErrorParams);
106
+ readonly details: ErrorDetail[];
107
+ constructor(params: BaseErrorParams & {
108
+ details?: ErrorDetail[];
109
+ });
47
110
  }
48
111
  declare class RateLimitedError extends OrchestratorError {
49
112
  readonly retryAfter?: string;
@@ -57,6 +120,17 @@ declare class SettlementQuoteError extends OrchestratorError {
57
120
  declare class SettlementExecutionError extends OrchestratorError {
58
121
  constructor(params: BaseErrorParams);
59
122
  }
123
+ declare class SimulationFailedError extends OrchestratorError {
124
+ readonly nonce?: string;
125
+ readonly category?: SimulationErrorCategory;
126
+ readonly errorSelector?: string;
127
+ readonly errorName?: string;
128
+ readonly errorArgs?: Record<string, unknown>;
129
+ readonly retryable: boolean;
130
+ readonly retryHint?: SimulationRetryHint;
131
+ readonly simulations: SimulationFailureSimulation[];
132
+ constructor(params: BaseErrorParams & SimulationFailureDetails);
133
+ }
60
134
  declare class ExternalServiceTimeoutError extends OrchestratorError {
61
135
  constructor(params: BaseErrorParams);
62
136
  }
@@ -91,7 +165,23 @@ declare function isOrchestratorError(error: unknown): error is OrchestratorError
91
165
  declare function isRateLimited(error: unknown): error is RateLimitedError;
92
166
  declare function isValidationError(error: unknown): error is ValidationError;
93
167
  declare function isAuthError(error: unknown): error is UnauthorizedError | ForbiddenError;
168
+ declare function isSimulationFailed(error: unknown): error is SimulationFailedError;
94
169
  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, };
170
+ /**
171
+ * Detects transport-level failures (connection reset, socket closed, DNS, TLS)
172
+ * that `fetch` rejects with instead of returning an HTTP response. Unlike HTTP
173
+ * errors — which the client converts into typed {@link OrchestratorError}s —
174
+ * these carry no status and bubble up untyped, so {@link isRetryable} misses
175
+ * them. They are safe to retry for idempotent reads (e.g. intent-status
176
+ * polling). We match by `code` and message across the cause chain — never by
177
+ * error type: `fetch` rejects network failures as `TypeError`, but `TypeError`
178
+ * is also thrown for logic bugs, bad URLs, and response-decoding errors that
179
+ * must NOT be retried (`waitForExecution` has no SDK-side deadline). Runtimes
180
+ * differ (Bun throws a plain `Error` with a socket message; undici/Node a
181
+ * `TypeError` with a coded `cause`), hence both signals. Caller-initiated
182
+ * aborts are excluded so deadlines/cancellation still propagate.
183
+ */
184
+ declare function isConnectionError(error: unknown): boolean;
185
+ export type { ErrorCode, ErrorDetail, ErrorEnvelope, SimulationAction, SimulationCall, SimulationDetails, SimulationErrorCategory, SimulationFailureDetails, SimulationFailureSimulation, SimulationRetryHint, ValidationIssue, };
186
+ 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
187
  //# 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,gBAAgB,CAAA;AAEpB,UAAU,eAAe;IACvB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAClC;AAED,UAAU,eAAe;IACvB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,cAAM,iBAAkB,SAAQ,KAAK;IACnC,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,CAAA;IACpC,QAAQ,C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K,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,EAAE,OAAO,CAAC,CAAA;CAClC;AAED,UAAU,WAAW;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAClC;AAED,UAAU,eAAe;IACvB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,KAAK,gBAAgB,GAAG,OAAO,GAAG,MAAM,CAAA;AACxC,KAAK,mBAAmB,GAAG,YAAY,GAAG,a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