@relayprotocol/relay-sdk 8.2.0 → 9.0.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.
- package/_cjs/src/actions/execute.js.map +1 -1
- package/_cjs/src/actions/gaslessBatch.js +1 -1
- package/_cjs/src/actions/gaslessBatch.js.map +1 -1
- package/_cjs/src/actions/getQuote.js +1 -1
- package/_cjs/src/actions/getQuote.js.map +1 -1
- package/_cjs/src/routes/index.js +10 -1
- package/_cjs/src/routes/index.js.map +1 -1
- package/_cjs/src/types/Execute.js.map +1 -1
- package/_cjs/src/types/Order.js.map +1 -1
- package/_cjs/src/types/api.js.map +1 -1
- package/_cjs/src/utils/axios.js +1 -1
- package/_cjs/src/utils/axios.js.map +1 -1
- package/_cjs/src/utils/executeSteps/index.js +2 -14
- package/_cjs/src/utils/executeSteps/index.js.map +1 -1
- package/_cjs/src/utils/executeSteps/signatureStep.js +6 -2
- package/_cjs/src/utils/executeSteps/signatureStep.js.map +1 -1
- package/_cjs/src/utils/hyperliquid.js +1 -1
- package/_cjs/src/utils/hyperliquid.js.map +1 -1
- package/_cjs/src/utils/index.js +3 -1
- package/_cjs/src/utils/index.js.map +1 -1
- package/_cjs/src/utils/normalizeSteps.js +18 -0
- package/_cjs/src/utils/normalizeSteps.js.map +1 -0
- package/_cjs/src/utils/prepareCallTransaction.js.map +1 -1
- package/_cjs/src/utils/transaction.js +3 -6
- package/_cjs/src/utils/transaction.js.map +1 -1
- package/_cjs/src/version.js +1 -1
- package/_cjs/src/version.js.map +1 -1
- package/_cjs/tsconfig.build.tsbuildinfo +1 -1
- package/_esm/src/actions/execute.js.map +1 -1
- package/_esm/src/actions/gaslessBatch.js +2 -2
- package/_esm/src/actions/gaslessBatch.js.map +1 -1
- package/_esm/src/actions/getQuote.js +1 -1
- package/_esm/src/actions/getQuote.js.map +1 -1
- package/_esm/src/routes/index.js +10 -1
- package/_esm/src/routes/index.js.map +1 -1
- package/_esm/src/types/Execute.js.map +1 -1
- package/_esm/src/types/Order.js.map +1 -1
- package/_esm/src/types/api.js +0 -4
- package/_esm/src/types/api.js.map +1 -1
- package/_esm/src/utils/axios.js +1 -1
- package/_esm/src/utils/axios.js.map +1 -1
- package/_esm/src/utils/executeSteps/index.js +1 -19
- package/_esm/src/utils/executeSteps/index.js.map +1 -1
- package/_esm/src/utils/executeSteps/signatureStep.js +6 -2
- package/_esm/src/utils/executeSteps/signatureStep.js.map +1 -1
- package/_esm/src/utils/hyperliquid.js +1 -1
- package/_esm/src/utils/hyperliquid.js.map +1 -1
- package/_esm/src/utils/index.js +1 -0
- package/_esm/src/utils/index.js.map +1 -1
- package/_esm/src/utils/normalizeSteps.js +20 -0
- package/_esm/src/utils/normalizeSteps.js.map +1 -0
- package/_esm/src/utils/prepareCallTransaction.js.map +1 -1
- package/_esm/src/utils/transaction.js +3 -10
- package/_esm/src/utils/transaction.js.map +1 -1
- package/_esm/src/version.js +1 -1
- package/_esm/src/version.js.map +1 -1
- package/_esm/tsconfig.build.tsbuildinfo +1 -1
- package/_types/src/actions/execute.d.ts +2 -2
- package/_types/src/actions/execute.d.ts.map +1 -1
- package/_types/src/actions/gaslessBatch.d.ts +2 -2
- package/_types/src/actions/gaslessBatch.d.ts.map +1 -1
- package/_types/src/actions/getQuote.d.ts +3 -3
- package/_types/src/actions/getQuote.d.ts.map +1 -1
- package/_types/src/client.d.ts +42 -32
- package/_types/src/client.d.ts.map +1 -1
- package/_types/src/routes/index.d.ts.map +1 -1
- package/_types/src/types/Execute.d.ts +29 -5
- package/_types/src/types/Execute.d.ts.map +1 -1
- package/_types/src/types/Order.d.ts +28 -98
- package/_types/src/types/Order.d.ts.map +1 -1
- package/_types/src/types/api.d.ts +8592 -4024
- package/_types/src/types/api.d.ts.map +1 -1
- package/_types/src/utils/executeSteps/index.d.ts.map +1 -1
- package/_types/src/utils/executeSteps/signatureStep.d.ts.map +1 -1
- package/_types/src/utils/getCurrentStepData.d.ts +13 -12
- package/_types/src/utils/getCurrentStepData.d.ts.map +1 -1
- package/_types/src/utils/index.d.ts +1 -0
- package/_types/src/utils/index.d.ts.map +1 -1
- package/_types/src/utils/normalizeSteps.d.ts +9 -0
- package/_types/src/utils/normalizeSteps.d.ts.map +1 -0
- package/_types/src/utils/prepareBatchTransaction.d.ts +2 -5
- package/_types/src/utils/prepareBatchTransaction.d.ts.map +1 -1
- package/_types/src/utils/prepareCallTransaction.d.ts +1 -1
- package/_types/src/utils/transaction.d.ts.map +1 -1
- package/_types/src/version.d.ts +1 -1
- package/_types/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { AdaptedWallet, ProgressData, Execute } from '../types/index.js';
|
|
1
|
+
import type { AdaptedWallet, ProgressData, Execute, Quote } from '../types/index.js';
|
|
2
2
|
import { type WalletClient } from 'viem';
|
|
3
3
|
import { type AdaptViemWalletOptions } from '../utils/viemWallet.js';
|
|
4
4
|
export type ExecuteActionParameters = {
|
|
5
|
-
quote: Execute;
|
|
5
|
+
quote: Quote | Execute;
|
|
6
6
|
wallet: AdaptedWallet | WalletClient;
|
|
7
7
|
depositGasLimit?: string;
|
|
8
8
|
onProgress?: (data: ProgressData) => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../../../src/actions/execute.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../../../src/actions/execute.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,YAAY,EACZ,OAAO,EACP,KAAK,EACN,MAAM,mBAAmB,CAAA;AAQ1B,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,MAAM,CAAA;AACxC,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,wBAAwB,CAAA;AAG/B,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAA;IACtB,MAAM,EAAE,aAAa,GAAG,YAAY,CAAA;IACpC,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,GAAG,CAAA;CACzC,GAAG,sBAAsB,CAAA;AAE1B;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,uBAAuB,GAAG,OAAO,CAAC;IAC9D,IAAI,EAAE,OAAO,CAAA;IACb,eAAe,EAAE,eAAe,CAAA;CACjC,CAAC,GAAG;IACH,eAAe,EAAE,eAAe,CAAA;CACjC,CAkGA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type WalletClient } from 'viem';
|
|
2
|
-
import type { Execute } from '../types/Execute.js';
|
|
2
|
+
import type { Execute, Quote } from '../types/Execute.js';
|
|
3
3
|
import type { BatchExecutorConfig } from '../types/BatchExecutor.js';
|
|
4
4
|
export type GaslessBatchProgress = {
|
|
5
5
|
status: 'signing_authorization' | 'signing_batch' | 'submitting' | 'polling' | 'success' | 'failure';
|
|
@@ -8,7 +8,7 @@ export type GaslessBatchProgress = {
|
|
|
8
8
|
};
|
|
9
9
|
export type ExecuteGaslessBatchParameters = {
|
|
10
10
|
/** The quote obtained from getQuote() */
|
|
11
|
-
quote: Execute;
|
|
11
|
+
quote: Quote | Execute;
|
|
12
12
|
/** viem WalletClient with an account attached */
|
|
13
13
|
walletClient: WalletClient;
|
|
14
14
|
/** Batch executor config — defaults to Calibur */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gaslessBatch.d.ts","sourceRoot":"","sources":["../../../src/actions/gaslessBatch.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,YAAY,EAClB,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"gaslessBatch.d.ts","sourceRoot":"","sources":["../../../src/actions/gaslessBatch.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,YAAY,EAClB,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,KAAK,EAAa,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAoB/E,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EACF,uBAAuB,GACvB,eAAe,GACf,YAAY,GACZ,SAAS,GACT,SAAS,GACT,SAAS,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,GAAG,CAAA;CACd,CAAA;AAED,MAAM,MAAM,6BAA6B,GAAG;IAC1C,yCAAyC;IACzC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAA;IACtB,iDAAiD;IACjD,YAAY,EAAE,YAAY,CAAA;IAC1B,kDAAkD;IAClD,QAAQ,CAAC,EAAE,mBAAmB,CAAA;IAC9B,yDAAyD;IACzD,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB;kFAC8E;IAC9E,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,mDAAmD;IACnD,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,oBAAoB,KAAK,IAAI,CAAA;CAClD,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,mBAAmB,CACvC,UAAU,EAAE,6BAA6B,GACxC,OAAO,CAAC,kBAAkB,CAAC,CAkS7B"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type WalletClient } from 'viem';
|
|
2
2
|
import { type SimulateContractRequest } from '../utils/index.js';
|
|
3
3
|
import { type AdaptViemWalletOptions } from '../utils/viemWallet.js';
|
|
4
|
-
import type { AdaptedWallet,
|
|
5
|
-
export type QuoteBody = NonNullable<paths['/quote/
|
|
4
|
+
import type { AdaptedWallet, Quote, paths } from '../types/index.js';
|
|
5
|
+
export type QuoteBody = NonNullable<paths['/quote/v3']['post']['requestBody']['content']['application/json']>;
|
|
6
6
|
export type QuoteBodyOptions = Omit<QuoteBody, 'destinationChainId' | 'originChainId' | 'originCurrency' | 'destinationCurrency' | 'amount' | 'recipient'>;
|
|
7
7
|
export type GetQuoteParameters = {
|
|
8
8
|
chainId: number;
|
|
@@ -21,5 +21,5 @@ export type GetQuoteParameters = {
|
|
|
21
21
|
* Method to get a quote
|
|
22
22
|
* @param data - {@link GetQuoteParameters}
|
|
23
23
|
*/
|
|
24
|
-
export declare function getQuote(parameters: GetQuoteParameters, includeDefaultParameters?: boolean, headers?: Record<string, string>): Promise<
|
|
24
|
+
export declare function getQuote(parameters: GetQuoteParameters, includeDefaultParameters?: boolean, headers?: Record<string, string>): Promise<Quote>;
|
|
25
25
|
//# sourceMappingURL=getQuote.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getQuote.d.ts","sourceRoot":"","sources":["../../../src/actions/getQuote.ts"],"names":[],"mappings":"AAEA,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,MAAM,CAAA;AAErD,OAAO,EAKL,KAAK,uBAAuB,EAC7B,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,wBAAwB,CAAA;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"getQuote.d.ts","sourceRoot":"","sources":["../../../src/actions/getQuote.ts"],"names":[],"mappings":"AAEA,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,MAAM,CAAA;AAErD,OAAO,EAKL,KAAK,uBAAuB,EAC7B,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,wBAAwB,CAAA;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAGpE,MAAM,MAAM,SAAS,GAAG,WAAW,CACjC,KAAK,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CACzE,CAAA;AACD,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,SAAS,EACP,oBAAoB,GACpB,eAAe,GACf,gBAAgB,GAChB,qBAAqB,GACrB,QAAQ,GACR,WAAW,CACd,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAA;IACxC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,aAAa,GAAG,YAAY,CAAA;IACrC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,WAAW,CAAC,CAAA;IACzE,GAAG,CAAC,EAAE,CAAC,WAAW,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,uBAAuB,CAAC,EAAE,CAAA;CACrE,GAAG,sBAAsB,CAAA;AAgC1B;;;GAGG;AACH,wBAAsB,QAAQ,CAC5B,UAAU,EAAE,kBAAkB,EAC9B,wBAAwB,CAAC,EAAE,OAAO,EAClC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,OAAO,CAAC,KAAK,CAAC,CA+FhB"}
|
package/_types/src/client.d.ts
CHANGED
|
@@ -54,6 +54,7 @@ export declare class RelayClient {
|
|
|
54
54
|
log(message: Parameters<typeof logUtil>['0'], level?: LogLevel): void;
|
|
55
55
|
readonly utils: {
|
|
56
56
|
executeSteps: typeof utils.executeSteps;
|
|
57
|
+
normalizeSteps: typeof utils.normalizeSteps;
|
|
57
58
|
setParams: typeof utils.setParams;
|
|
58
59
|
pollUntilOk: typeof utils.pollUntilOk;
|
|
59
60
|
pollUntilHasData: typeof utils.pollUntilHasData;
|
|
@@ -88,8 +89,8 @@ export declare class RelayClient {
|
|
|
88
89
|
deployContract: <const abi extends import("viem").Abi | readonly unknown[], chainOverride extends import("viem/chains").Chain | undefined>(args: import("viem").DeployContractParameters<abi, import("viem/chains").Chain | undefined, import("viem").Account | undefined, chainOverride>) => Promise<`0x${string}`>;
|
|
89
90
|
getAddresses: () => Promise<import("viem").GetAddressesReturnType>;
|
|
90
91
|
getCallsStatus: (parameters: import("viem").GetCallsStatusParameters) => Promise<{
|
|
91
|
-
version: string;
|
|
92
92
|
id: string;
|
|
93
|
+
version: string;
|
|
93
94
|
chainId: number;
|
|
94
95
|
atomic: boolean;
|
|
95
96
|
capabilities?: {
|
|
@@ -104,7 +105,7 @@ export declare class RelayClient {
|
|
|
104
105
|
getCapabilities: <chainId extends number | undefined>(parameters?: import("viem").GetCapabilitiesParameters<chainId> | undefined) => Promise<(chainId extends number ? {
|
|
105
106
|
[x: string]: any;
|
|
106
107
|
atomic?: {
|
|
107
|
-
status: "
|
|
108
|
+
status: "ready" | "supported" | "unsupported";
|
|
108
109
|
} | undefined;
|
|
109
110
|
unstable_addSubAccount?: {
|
|
110
111
|
keyTypes: ("address" | "p256" | "webcrypto-p256" | "webauthn-p256")[];
|
|
@@ -116,7 +117,7 @@ export declare class RelayClient {
|
|
|
116
117
|
} : import("viem").WalletCapabilitiesRecord<import("viem").Capabilities<{
|
|
117
118
|
[x: string]: any;
|
|
118
119
|
atomic?: {
|
|
119
|
-
status: "
|
|
120
|
+
status: "ready" | "supported" | "unsupported";
|
|
120
121
|
} | undefined;
|
|
121
122
|
unstable_addSubAccount?: {
|
|
122
123
|
keyTypes: ("address" | "p256" | "webcrypto-p256" | "webauthn-p256")[];
|
|
@@ -128,7 +129,7 @@ export declare class RelayClient {
|
|
|
128
129
|
}>, number>) extends infer T ? { [K in keyof T]: (chainId extends number ? {
|
|
129
130
|
[x: string]: any;
|
|
130
131
|
atomic?: {
|
|
131
|
-
status: "
|
|
132
|
+
status: "ready" | "supported" | "unsupported";
|
|
132
133
|
} | undefined;
|
|
133
134
|
unstable_addSubAccount?: {
|
|
134
135
|
keyTypes: ("address" | "p256" | "webcrypto-p256" | "webauthn-p256")[];
|
|
@@ -140,7 +141,7 @@ export declare class RelayClient {
|
|
|
140
141
|
} : import("viem").WalletCapabilitiesRecord<import("viem").Capabilities<{
|
|
141
142
|
[x: string]: any;
|
|
142
143
|
atomic?: {
|
|
143
|
-
status: "
|
|
144
|
+
status: "ready" | "supported" | "unsupported";
|
|
144
145
|
} | undefined;
|
|
145
146
|
unstable_addSubAccount?: {
|
|
146
147
|
keyTypes: ("address" | "p256" | "webcrypto-p256" | "webauthn-p256")[];
|
|
@@ -7776,8 +7777,8 @@ export declare class RelayClient {
|
|
|
7776
7777
|
}, primaryType extends string>(args: import("viem").SignTypedDataParameters<typedData, primaryType, import("viem").Account | undefined>) => Promise<`0x${string}`>;
|
|
7777
7778
|
switchChain: (args: import("viem").SwitchChainParameters) => Promise<void>;
|
|
7778
7779
|
waitForCallsStatus: (parameters: import("viem").WaitForCallsStatusParameters) => Promise<{
|
|
7779
|
-
version: string;
|
|
7780
7780
|
id: string;
|
|
7781
|
+
version: string;
|
|
7781
7782
|
chainId: number;
|
|
7782
7783
|
atomic: boolean;
|
|
7783
7784
|
capabilities?: {
|
|
@@ -7815,19 +7816,23 @@ export declare class RelayClient {
|
|
|
7815
7816
|
action: string;
|
|
7816
7817
|
description: string;
|
|
7817
7818
|
kind: "transaction" | "signature";
|
|
7818
|
-
id: "
|
|
7819
|
+
id: import("./types/Execute.js").QuoteStepId;
|
|
7819
7820
|
requestId?: string | undefined;
|
|
7820
|
-
depositAddress?:
|
|
7821
|
+
depositAddress?: {
|
|
7822
|
+
address?: string | undefined;
|
|
7823
|
+
type?: "open" | "strict" | undefined;
|
|
7824
|
+
depositor?: string | null | undefined;
|
|
7825
|
+
depositTxHash?: string | null | undefined;
|
|
7826
|
+
recoveryAddress?: string | null | undefined;
|
|
7827
|
+
} | undefined;
|
|
7828
|
+
depositAddressId?: string | undefined;
|
|
7821
7829
|
items: {
|
|
7822
7830
|
status: "incomplete" | "complete";
|
|
7823
7831
|
receipt?: import("viem").TransactionReceipt | import("./types/AdaptedWallet.js").SvmReceipt | import("./types/AdaptedWallet.js").TronReceipt | import("./types/AdaptedWallet.js").TonReceipt | import("./types/AdaptedWallet.js").LvmReceipt | import("./types/AdaptedWallet.js").XrpReceipt | undefined;
|
|
7824
|
-
checkStatus?: "
|
|
7832
|
+
checkStatus?: "pending" | "refund" | "submitted" | "success" | "failure" | "waiting" | "unknown" | undefined;
|
|
7825
7833
|
progressState?: "complete" | "confirming" | "validating" | "signing" | "posting" | undefined;
|
|
7826
7834
|
data?: any;
|
|
7827
|
-
check?:
|
|
7828
|
-
endpoint?: string | undefined;
|
|
7829
|
-
method?: string | undefined;
|
|
7830
|
-
} | undefined;
|
|
7835
|
+
check?: import("./types/Execute.js").CheckApi | undefined;
|
|
7831
7836
|
orderIndexes?: number[] | undefined;
|
|
7832
7837
|
orderIds?: string[] | undefined;
|
|
7833
7838
|
error?: string | undefined;
|
|
@@ -7856,19 +7861,23 @@ export declare class RelayClient {
|
|
|
7856
7861
|
action: string;
|
|
7857
7862
|
description: string;
|
|
7858
7863
|
kind: "transaction" | "signature";
|
|
7859
|
-
id: "
|
|
7864
|
+
id: import("./types/Execute.js").QuoteStepId;
|
|
7860
7865
|
requestId?: string | undefined;
|
|
7861
|
-
depositAddress?:
|
|
7866
|
+
depositAddress?: {
|
|
7867
|
+
address?: string | undefined;
|
|
7868
|
+
type?: "open" | "strict" | undefined;
|
|
7869
|
+
depositor?: string | null | undefined;
|
|
7870
|
+
depositTxHash?: string | null | undefined;
|
|
7871
|
+
recoveryAddress?: string | null | undefined;
|
|
7872
|
+
} | undefined;
|
|
7873
|
+
depositAddressId?: string | undefined;
|
|
7862
7874
|
items: {
|
|
7863
7875
|
status: "incomplete" | "complete";
|
|
7864
7876
|
receipt?: import("viem").TransactionReceipt | import("./types/AdaptedWallet.js").SvmReceipt | import("./types/AdaptedWallet.js").TronReceipt | import("./types/AdaptedWallet.js").TonReceipt | import("./types/AdaptedWallet.js").LvmReceipt | import("./types/AdaptedWallet.js").XrpReceipt | undefined;
|
|
7865
|
-
checkStatus?: "
|
|
7877
|
+
checkStatus?: "pending" | "refund" | "submitted" | "success" | "failure" | "waiting" | "unknown" | undefined;
|
|
7866
7878
|
progressState?: "complete" | "confirming" | "validating" | "signing" | "posting" | undefined;
|
|
7867
7879
|
data?: any;
|
|
7868
|
-
check?:
|
|
7869
|
-
endpoint?: string | undefined;
|
|
7870
|
-
method?: string | undefined;
|
|
7871
|
-
} | undefined;
|
|
7880
|
+
check?: import("./types/Execute.js").CheckApi | undefined;
|
|
7872
7881
|
orderIndexes?: number[] | undefined;
|
|
7873
7882
|
orderIds?: string[] | undefined;
|
|
7874
7883
|
error?: string | undefined;
|
|
@@ -7894,13 +7903,10 @@ export declare class RelayClient {
|
|
|
7894
7903
|
currentStepItem: {
|
|
7895
7904
|
status: "incomplete" | "complete";
|
|
7896
7905
|
receipt?: import("viem").TransactionReceipt | import("./types/AdaptedWallet.js").SvmReceipt | import("./types/AdaptedWallet.js").TronReceipt | import("./types/AdaptedWallet.js").TonReceipt | import("./types/AdaptedWallet.js").LvmReceipt | import("./types/AdaptedWallet.js").XrpReceipt | undefined;
|
|
7897
|
-
checkStatus?: "
|
|
7906
|
+
checkStatus?: "pending" | "refund" | "submitted" | "success" | "failure" | "waiting" | "unknown" | undefined;
|
|
7898
7907
|
progressState?: "complete" | "confirming" | "validating" | "signing" | "posting" | undefined;
|
|
7899
7908
|
data?: any;
|
|
7900
|
-
check?:
|
|
7901
|
-
endpoint?: string | undefined;
|
|
7902
|
-
method?: string | undefined;
|
|
7903
|
-
} | undefined;
|
|
7909
|
+
check?: import("./types/Execute.js").CheckApi | undefined;
|
|
7904
7910
|
orderIndexes?: number[] | undefined;
|
|
7905
7911
|
orderIds?: string[] | undefined;
|
|
7906
7912
|
error?: string | undefined;
|
|
@@ -7933,19 +7939,23 @@ export declare class RelayClient {
|
|
|
7933
7939
|
action: string;
|
|
7934
7940
|
description: string;
|
|
7935
7941
|
kind: "transaction" | "signature";
|
|
7936
|
-
id: "
|
|
7942
|
+
id: import("./types/Execute.js").QuoteStepId;
|
|
7937
7943
|
requestId?: string | undefined;
|
|
7938
|
-
depositAddress?:
|
|
7944
|
+
depositAddress?: {
|
|
7945
|
+
address?: string | undefined;
|
|
7946
|
+
type?: "open" | "strict" | undefined;
|
|
7947
|
+
depositor?: string | null | undefined;
|
|
7948
|
+
depositTxHash?: string | null | undefined;
|
|
7949
|
+
recoveryAddress?: string | null | undefined;
|
|
7950
|
+
} | undefined;
|
|
7951
|
+
depositAddressId?: string | undefined;
|
|
7939
7952
|
items: {
|
|
7940
7953
|
status: "incomplete" | "complete";
|
|
7941
7954
|
receipt?: import("viem").TransactionReceipt | import("./types/AdaptedWallet.js").SvmReceipt | import("./types/AdaptedWallet.js").TronReceipt | import("./types/AdaptedWallet.js").TonReceipt | import("./types/AdaptedWallet.js").LvmReceipt | import("./types/AdaptedWallet.js").XrpReceipt | undefined;
|
|
7942
|
-
checkStatus?: "
|
|
7955
|
+
checkStatus?: "pending" | "refund" | "submitted" | "success" | "failure" | "waiting" | "unknown" | undefined;
|
|
7943
7956
|
progressState?: "complete" | "confirming" | "validating" | "signing" | "posting" | undefined;
|
|
7944
7957
|
data?: any;
|
|
7945
|
-
check?:
|
|
7946
|
-
endpoint?: string | undefined;
|
|
7947
|
-
method?: string | undefined;
|
|
7948
|
-
} | undefined;
|
|
7958
|
+
check?: import("./types/Execute.js").CheckApi | undefined;
|
|
7949
7959
|
orderIndexes?: number[] | undefined;
|
|
7950
7960
|
orderIds?: string[] | undefined;
|
|
7951
7961
|
error?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,QAAQ,EAAE,GAAG,IAAI,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAC5D,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAA;AAC7C,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAA;AAIzC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,+BAA+B,CAAC,EAAE,MAAM,CAAA;IACxC,MAAM,CAAC,EAAE,UAAU,EAAE,CAAA;IACrB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAA;IAC5E,2BAA2B,CAAC,EAAE,MAAM,CAAA;IACpC,SAAS,CAAC,EAAE;QACV,OAAO,CAAC,EAAE,OAAO,CAAA;QACjB,GAAG,CAAC,EAAE,MAAM,CAAA;KACb,CAAA;CACF,CAAA;AAQD,qBAAa,WAAW;IACtB,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAAe;IAC7B,QAAQ,CAAC,OAAO,iBAAU;gBAEd,OAAO,EAAE,kBAAkB;IAyCvC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,kBAAkB,CAAC;CAyC/C;AAED,wBAAgB,SAAS,gBAExB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,kBAAkB,eAQvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/routes/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/routes/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,UA+DlB,CAAC"}
|
|
@@ -3,14 +3,24 @@ import type { paths } from './api.js';
|
|
|
3
3
|
import type { OrderStepId } from './Order.js';
|
|
4
4
|
import type { AxiosRequestConfig } from 'axios';
|
|
5
5
|
import type { TransactionReceipt } from 'viem';
|
|
6
|
-
|
|
6
|
+
type QuoteV3Response = paths['/quote/v3']['post']['responses']['200']['content']['application/json'];
|
|
7
|
+
export type QuoteFee = QuoteV3Response['fees']['platform'];
|
|
8
|
+
export type QuoteFees = Partial<QuoteV3Response['fees']>;
|
|
9
|
+
export type QuoteCurrencyAmount = NonNullable<QuoteV3Response['originGas']>;
|
|
10
|
+
export type QuoteFeeSponsorship = NonNullable<QuoteV3Response['feeSponsorship']>;
|
|
11
|
+
export type DepositAddress = NonNullable<QuoteV3Response['steps'][0]['depositAddress']>;
|
|
12
|
+
export type QuoteProtocol = QuoteV3Response['protocol'];
|
|
13
|
+
export type QuoteWarnings = QuoteV3Response['warnings'];
|
|
7
14
|
export type SwapBreakdown = {
|
|
8
15
|
value?: string;
|
|
9
16
|
timeEstimate?: number;
|
|
10
17
|
}[] | undefined;
|
|
11
|
-
export type CheckApi =
|
|
12
|
-
|
|
13
|
-
|
|
18
|
+
export type CheckApi = {
|
|
19
|
+
endpoint?: string;
|
|
20
|
+
method?: string;
|
|
21
|
+
};
|
|
22
|
+
export type QuoteDetails = QuoteV3Response['details'];
|
|
23
|
+
export type QuoteStepId = 'deposit' | 'approve' | 'authorize' | 'swap' | 'send';
|
|
14
24
|
export type TransactionStepState = 'confirming' | 'validating' | 'complete';
|
|
15
25
|
export type SignatureStepState = 'signing' | 'posting' | 'validating' | 'complete';
|
|
16
26
|
export type Execute = {
|
|
@@ -19,6 +29,10 @@ export type Execute = {
|
|
|
19
29
|
orderId?: string;
|
|
20
30
|
}[];
|
|
21
31
|
fees?: QuoteFees;
|
|
32
|
+
originGas?: QuoteCurrencyAmount;
|
|
33
|
+
feeSponsorship?: QuoteFeeSponsorship;
|
|
34
|
+
protocol?: QuoteProtocol;
|
|
35
|
+
warnings?: QuoteWarnings;
|
|
22
36
|
breakdown?: SwapBreakdown;
|
|
23
37
|
details?: QuoteDetails;
|
|
24
38
|
error?: any;
|
|
@@ -32,7 +46,8 @@ export type Execute = {
|
|
|
32
46
|
kind: 'transaction' | 'signature';
|
|
33
47
|
id: QuoteStepId;
|
|
34
48
|
requestId?: string;
|
|
35
|
-
depositAddress?:
|
|
49
|
+
depositAddress?: DepositAddress;
|
|
50
|
+
depositAddressId?: string;
|
|
36
51
|
items: {
|
|
37
52
|
status: 'complete' | 'incomplete';
|
|
38
53
|
receipt?: TransactionReceipt | SvmReceipt | TronReceipt | TonReceipt | LvmReceipt | XrpReceipt;
|
|
@@ -70,4 +85,13 @@ export type ExecuteStepItem = NonNullable<Execute['steps'][0]['items']>[0];
|
|
|
70
85
|
export type FlatExecuteStep = Omit<ExecuteStep, 'items' | 'id'> & {
|
|
71
86
|
id: QuoteStepId | OrderStepId;
|
|
72
87
|
} & Pick<ExecuteStepItem, 'status' | 'data' | 'check'>;
|
|
88
|
+
/** A step as POST /quote/v3 returns it */
|
|
89
|
+
export type QuoteStep = Omit<FlatExecuteStep, 'id' | 'requestId'> & {
|
|
90
|
+
id: QuoteStepId;
|
|
91
|
+
};
|
|
92
|
+
/** A POST /quote/v3 response, as returned by `getQuote` and `useQuote` */
|
|
93
|
+
export type Quote = Omit<Execute, 'steps'> & {
|
|
94
|
+
steps: QuoteStep[];
|
|
95
|
+
};
|
|
96
|
+
export {};
|
|
73
97
|
//# sourceMappingURL=Execute.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Execute.d.ts","sourceRoot":"","sources":["../../../src/types/Execute.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,UAAU,EACV,UAAU,EACV,UAAU,EACX,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAA;AAC/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,MAAM,CAAA;AAE9C,
|
|
1
|
+
{"version":3,"file":"Execute.d.ts","sourceRoot":"","sources":["../../../src/types/Execute.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,WAAW,E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,wGAAwG;AACxG,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,WAAW,EAAE,OAAO,GAAG,IAAI,CAAC,GAAG;IAChE,EAAE,EAAE,WAAW,GAAG,WAAW,CAAA;CAC9B,GAAG,IAAI,CAAC,eAAe,EAAE,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC,CAAA;AAEtD,0CAA0C;AAC1C,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC,eAAe,EAAE,IAAI,GAAG,WAAW,CAAC,GAAG;IAClE,EAAE,EAAE,WAAW,CAAA;CAChB,CAAA;AAED,0EAA0E;AAC1E,MAAM,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG;IAC3C,KAAK,EAAE,SAAS,EAAE,CAAA;CACnB,CAAA"}
|
|
@@ -1,114 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export type
|
|
9
|
-
export type
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
*/
|
|
20
|
-
export type CreateOrderBody = {
|
|
21
|
-
type: 'limit';
|
|
22
|
-
user: string;
|
|
23
|
-
recipient?: string;
|
|
24
|
-
refundTo?: string;
|
|
25
|
-
side: 'buy' | 'sell';
|
|
26
|
-
targetCurrency: string;
|
|
27
|
-
targetChainId: number;
|
|
28
|
-
settlementCurrency: string;
|
|
29
|
-
settlementChainId: number;
|
|
30
|
-
targetPrice: string;
|
|
31
|
-
amount: string;
|
|
32
|
-
expiresAt: string;
|
|
33
|
-
appFees?: OrderAppFee[];
|
|
34
|
-
subsidizeFees?: boolean;
|
|
35
|
-
sponsoredFeeComponents?: OrderSponsoredFeeComponent[];
|
|
36
|
-
maxSubsidizationAmount?: string;
|
|
37
|
-
subsidizationBps?: number;
|
|
38
|
-
clientOrderId?: string;
|
|
39
|
-
};
|
|
40
|
-
export type OrderStep = {
|
|
41
|
-
id: OrderStepId;
|
|
42
|
-
action: string;
|
|
43
|
-
description: string;
|
|
44
|
-
kind: 'transaction' | 'signature';
|
|
45
|
-
status: 'incomplete' | 'complete';
|
|
1
|
+
import type { paths } from './api.js';
|
|
2
|
+
type OrdersRoute = paths['/orders'];
|
|
3
|
+
type ListOrdersResponse = OrdersRoute['get']['responses']['200']['content']['application/json'];
|
|
4
|
+
type ApiOrder = ListOrdersResponse['orders'][number];
|
|
5
|
+
type ApiOrderStep = NonNullable<ApiOrder['steps']>[number];
|
|
6
|
+
type ApiPriceCheck = NonNullable<ApiOrder['latestPriceCheck']>;
|
|
7
|
+
/** Body of `POST /orders`. */
|
|
8
|
+
export type CreateOrderBody = OrdersRoute['post']['requestBody']['content']['application/json'];
|
|
9
|
+
export type OrderStatus = NonNullable<ApiOrder['status']>;
|
|
10
|
+
export type OrderOutcome = NonNullable<ApiOrder['outcome']>;
|
|
11
|
+
export type OrderCancelReason = NonNullable<ApiOrder['cancellationReason']>;
|
|
12
|
+
export type OrderRequiredAction = NonNullable<ApiOrder['requiredAction']>;
|
|
13
|
+
export type OrderStepId = NonNullable<ApiOrderStep['id']>;
|
|
14
|
+
export type OrderCheckReason = NonNullable<ApiPriceCheck['reason']>;
|
|
15
|
+
export type OrderCreateErrorCode = NonNullable<OrdersRoute['post']['responses']['400']['content']['application/json']['errorCode']>;
|
|
16
|
+
export type OrderSponsoredFeeComponent = NonNullable<CreateOrderBody['sponsoredFeeComponents']>[number];
|
|
17
|
+
export type OrderAppFee = NonNullable<CreateOrderBody['appFees']>[number];
|
|
18
|
+
export type OrderStep = Required<Omit<ApiOrderStep, 'data' | 'check'>> & {
|
|
46
19
|
data: any;
|
|
47
20
|
check?: {
|
|
48
21
|
endpoint: string;
|
|
49
22
|
method: 'GET' | 'POST';
|
|
50
23
|
};
|
|
51
24
|
};
|
|
52
|
-
export type OrderPriceCheck =
|
|
53
|
-
|
|
54
|
-
allInPrice: string | null;
|
|
55
|
-
reason: OrderCheckReason | null;
|
|
56
|
-
checkedAt: string;
|
|
57
|
-
};
|
|
25
|
+
export type OrderPriceCheck = Required<ApiPriceCheck>;
|
|
26
|
+
type OptionalOrderField = 'appFees' | 'subsidizeFees' | 'sponsoredFeeComponents' | 'maxSubsidizationAmount' | 'subsidizationBps';
|
|
58
27
|
/**
|
|
59
28
|
* An order as the Orders API returns it.
|
|
60
|
-
* @property
|
|
61
|
-
* @property cancellationReason - Who cancelled the order; null unless the outcome is `cancelled`
|
|
62
|
-
* @property requiredAction - What Relay has to do before the order can continue; null unless the status is `requires_action`
|
|
29
|
+
* @property latestPriceCheck - Its `reason` is the first of `insufficient_balance`, `insufficient_allowance`, `no_route` and `price_not_reached` that stopped a fill, or null when nothing did
|
|
63
30
|
*/
|
|
64
|
-
export type Order = Omit<
|
|
65
|
-
id: string;
|
|
66
|
-
clientOrderId: string | null;
|
|
67
|
-
orderHash: string;
|
|
68
|
-
status: OrderStatus;
|
|
69
|
-
outcome: OrderOutcome | null;
|
|
70
|
-
cancellationReason: OrderCancelReason | null;
|
|
71
|
-
requiredAction: OrderRequiredAction | null;
|
|
72
|
-
recipient: string;
|
|
73
|
-
refundTo: string;
|
|
74
|
-
originChainId: number;
|
|
75
|
-
originCurrency: string;
|
|
76
|
-
destinationChainId: number;
|
|
77
|
-
destinationCurrency: string;
|
|
78
|
-
fees: Record<string, unknown>;
|
|
79
|
-
createdAt: string;
|
|
80
|
-
updatedAt: string;
|
|
81
|
-
expiresAt: string;
|
|
82
|
-
closedAt: string | null;
|
|
83
|
-
requestIds: string[];
|
|
84
|
-
filledAmount: string;
|
|
85
|
-
refundedAmount: string;
|
|
86
|
-
withdrawnAmount: string;
|
|
31
|
+
export type Order = Required<Omit<ApiOrder, OptionalOrderField | 'steps' | 'latestPriceCheck' | 'closestPriceCheck'>> & Pick<CreateOrderBody, OptionalOrderField> & {
|
|
87
32
|
steps: OrderStep[];
|
|
88
|
-
|
|
33
|
+
latestPriceCheck: OrderPriceCheck | null;
|
|
34
|
+
closestPriceCheck: OrderPriceCheck | null;
|
|
89
35
|
};
|
|
90
|
-
/**
|
|
91
|
-
|
|
92
|
-
* @property status - Only orders in these statuses
|
|
93
|
-
* @property startTimestamp - Unix seconds; filters on the sortBy field
|
|
94
|
-
* @property endTimestamp - Unix seconds; filters on the sortBy field
|
|
95
|
-
*/
|
|
96
|
-
export type GetOrdersQuery = {
|
|
97
|
-
orderId?: string;
|
|
98
|
-
appId?: string;
|
|
99
|
-
user?: string;
|
|
36
|
+
/** Query of `GET /orders`, with `status` as a list instead of a comma-separated string. */
|
|
37
|
+
export type GetOrdersQuery = Omit<NonNullable<OrdersRoute['get']['parameters']['query']>, 'status'> & {
|
|
100
38
|
status?: OrderStatus[];
|
|
101
|
-
originChainId?: number;
|
|
102
|
-
destinationChainId?: number;
|
|
103
|
-
limit?: number;
|
|
104
|
-
continuation?: string;
|
|
105
|
-
startTimestamp?: number;
|
|
106
|
-
endTimestamp?: number;
|
|
107
|
-
sortBy?: 'createdAt' | 'updatedAt';
|
|
108
|
-
sortDirection?: 'asc' | 'desc';
|
|
109
39
|
};
|
|
110
|
-
export type GetOrdersResponse = {
|
|
40
|
+
export type GetOrdersResponse = Omit<ListOrdersResponse, 'orders'> & {
|
|
111
41
|
orders: Order[];
|
|
112
|
-
continuation?: string;
|
|
113
42
|
};
|
|
43
|
+
export {};
|
|
114
44
|
//# sourceMappingURL=Order.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Order.d.ts","sourceRoot":"","sources":["../../../src/types/Order.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"Order.d.ts","sourceRoot":"","sources":["../../../src/types/Order.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAErC,KAAK,WAAW,GAAG,KAAK,CAAC,SAAS,CAAC,CA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