@rhinestone/sdk 2.0.0-beta.24 → 2.0.0-beta.25
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.
|
@@ -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,
|
|
3
|
+
import type { IntentInput, IntentOpStatus, IntentSubmitRequestInternal, IntentSubmitResponse, Portfolio, QuoteResponse, SplitIntentsInput, SplitIntentsResult } from './types.js';
|
|
4
4
|
interface PolicyContext {
|
|
5
5
|
intentInput: unknown;
|
|
6
6
|
isSponsored: boolean;
|
|
@@ -24,6 +24,5 @@ export declare class Orchestrator {
|
|
|
24
24
|
private getSubmitHeaders;
|
|
25
25
|
private fetch;
|
|
26
26
|
}
|
|
27
|
-
export declare function encodeSettlementLayers(filter: SettlementLayerFilter): readonly string[];
|
|
28
27
|
export {};
|
|
29
28
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../orchestrator/client.ts"],"names":[],"mappings":"
|
|
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,EAMV,WAAW,EACX,cAAc,EAEd,2BAA2B,EAC3B,oBAAoB,EACpB,SAAS,EAET,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAEnB,MAAM,SAAS,CAAA;AAGhB,UAAU,aAAa;IACrB,WAAW,EAAE,OAAO,CAAA;IACpB,WAAW,EAAE,OAAO,CAAA;CACrB;AAED,qBAAa,YAAY;IACvB,OAAO,CAAC,SAAS,CAAQ;IACzB,OAAO,CAAC,YAAY,CAAc;IAClC,OAAO,CAAC,YAAY,CAAC,CAAwB;gBAG3C,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,YAAY,EAC1B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAO5B,YAAY,CAChB,cAAc,EAAE,OAAO,EACvB,MAAM,CAAC,EAAE;QACP,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;QACnB,MAAM,CAAC,EAAE;YAAE,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,EAAE,CAAA;SAAE,CAAA;KAC1C,GACA,OAAO,CAAC,SAAS,CAAC;IAyCf,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;IAUvD,QAAQ,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAmB/D,YAAY,CAChB,OAAO,EAAE,2BAA2B,EACpC,aAAa,CAAC,EAAE,aAAa,GAC5B,OAAO,CAAC,oBAAoB,CAAC;IAe1B,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;YAgB5C,UAAU;YAWV,gBAAgB;YAiBhB,KAAK;CA8BpB"}
|
|
@@ -54,9 +54,7 @@ export class Orchestrator {
|
|
|
54
54
|
const body = convertBigIntFields({
|
|
55
55
|
chainId: toCaip2(input.chain.id),
|
|
56
56
|
tokens: input.tokens,
|
|
57
|
-
settlementLayers: input.settlementLayers
|
|
58
|
-
? encodeSettlementLayers(input.settlementLayers)
|
|
59
|
-
: undefined,
|
|
57
|
+
settlementLayers: input.settlementLayers,
|
|
60
58
|
});
|
|
61
59
|
const json = await this.fetch(`${this.serverUrl}/intents/splits`, {
|
|
62
60
|
method: 'POST',
|
|
@@ -217,28 +215,8 @@ function encodeOptions(options) {
|
|
|
217
215
|
if (options.auxiliaryFunds) {
|
|
218
216
|
wire.auxiliaryFunds = encodeAuxiliaryFunds(options.auxiliaryFunds);
|
|
219
217
|
}
|
|
220
|
-
if (options.settlementLayers) {
|
|
221
|
-
wire.settlementLayers = encodeSettlementLayers(options.settlementLayers);
|
|
222
|
-
}
|
|
223
218
|
return wire;
|
|
224
219
|
}
|
|
225
|
-
// Inversion universe for `{ exclude }` — must mirror the orchestrator's
|
|
226
|
-
// cross-chain settlement layer enum.
|
|
227
|
-
const KNOWN_SETTLEMENT_LAYERS = [
|
|
228
|
-
'ACROSS',
|
|
229
|
-
'ECO',
|
|
230
|
-
'RELAY',
|
|
231
|
-
'OFT',
|
|
232
|
-
'NEAR',
|
|
233
|
-
'RHINO',
|
|
234
|
-
'CCTP',
|
|
235
|
-
];
|
|
236
|
-
export function encodeSettlementLayers(filter) {
|
|
237
|
-
if ('include' in filter)
|
|
238
|
-
return filter.include;
|
|
239
|
-
const excluded = new Set(filter.exclude);
|
|
240
|
-
return KNOWN_SETTLEMENT_LAYERS.filter((layer) => !excluded.has(layer));
|
|
241
|
-
}
|
|
242
220
|
function decodeQuoteResponse(json) {
|
|
243
221
|
const routes = (json.routes ?? []);
|
|
244
222
|
return { traceId: json.traceId, routes: routes.map(decodeQuote) };
|
|
@@ -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
|
+
declare const SDK_VERSION = "2.0.0-beta.25";
|
|
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,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
|
+
const SDK_VERSION = '2.0.0-beta.25';
|
|
4
4
|
const API_VERSION = '2026-04.blanc';
|
|
5
5
|
export { PROD_ORCHESTRATOR_URL, RHINESTONE_SPOKE_POOL_ADDRESS, SDK_VERSION, API_VERSION, };
|