@imtbl/checkout-sdk 2.22.1-alpha.0 → 2.23.1-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/dist/browser/index.js +1 -6396
- package/dist/node/index.cjs +1 -6396
- package/dist/node/index.js +1 -6396
- package/dist/types/api/http/httpClient.d.ts +5 -5
- package/dist/types/env/constants.d.ts +4 -4
- package/dist/types/errors/checkoutError.d.ts +6 -1
- package/package.json +27 -29
- package/dist/types/api/blockscout/blockscout.test.d.ts +0 -1
- package/dist/types/api/http/httpClient.test.d.ts +0 -1
- package/dist/types/availability/availability.test.d.ts +0 -1
- package/dist/types/balances/balances.test.d.ts +0 -1
- package/dist/types/blockExplorer/blockExplorer.test.d.ts +0 -1
- package/dist/types/config/config.test.d.ts +0 -1
- package/dist/types/config/remoteConfigFetcher.test.d.ts +0 -1
- package/dist/types/config/tokensFetcher.test.d.ts +0 -1
- package/dist/types/connect/connect.test.d.ts +0 -1
- package/dist/types/errors/checkoutError.test.d.ts +0 -1
- package/dist/types/fiatRamp/fiatRamp.test.d.ts +0 -1
- package/dist/types/gasEstimate/bridgeGasEstimate.test.d.ts +0 -1
- package/dist/types/gasEstimate/gasEstimator.test.d.ts +0 -1
- package/dist/types/gasEstimate/gasPriceInWei.test.d.ts +0 -1
- package/dist/types/instance/instance.test.d.ts +0 -1
- package/dist/types/logger/debugLogger.test.d.ts +0 -1
- package/dist/types/network/network.test.d.ts +0 -1
- package/dist/types/provider/getUnderlyingProvider.test.d.ts +0 -1
- package/dist/types/provider/injected/index.test.d.ts +0 -1
- package/dist/types/provider/provider.test.d.ts +0 -1
- package/dist/types/provider/validateProvider.test.d.ts +0 -1
- package/dist/types/readOnlyProviders/readOnlyProviders.test.d.ts +0 -1
- package/dist/types/sdk.test.d.ts +0 -1
- package/dist/types/smartCheckout/actions/getUnsignedActions.test.d.ts +0 -1
- package/dist/types/smartCheckout/actions/signActions.test.d.ts +0 -1
- package/dist/types/smartCheckout/aggregators/allowanceAggregator.test.d.ts +0 -1
- package/dist/types/smartCheckout/aggregators/balanceAggregator.test.d.ts +0 -1
- package/dist/types/smartCheckout/aggregators/itemAggregator.test.d.ts +0 -1
- package/dist/types/smartCheckout/allowList/allowListCheck.test.d.ts +0 -1
- package/dist/types/smartCheckout/allowance/erc1155.test.d.ts +0 -1
- package/dist/types/smartCheckout/allowance/erc20.test.d.ts +0 -1
- package/dist/types/smartCheckout/allowance/erc721.test.d.ts +0 -1
- package/dist/types/smartCheckout/balanceCheck/balanceCheck.test.d.ts +0 -1
- package/dist/types/smartCheckout/balanceCheck/balanceRequirement.test.d.ts +0 -1
- package/dist/types/smartCheckout/buy/buy.test.d.ts +0 -1
- package/dist/types/smartCheckout/cancel/cancel.test.d.ts +0 -1
- package/dist/types/smartCheckout/fees/fees.test.d.ts +0 -1
- package/dist/types/smartCheckout/gas/gasCalculator.test.d.ts +0 -1
- package/dist/types/smartCheckout/itemRequirements/itemRequirements.test.d.ts +0 -1
- package/dist/types/smartCheckout/routing/bridge/bridgeRoute.test.d.ts +0 -1
- package/dist/types/smartCheckout/routing/bridge/getBridgeFeeEstimate.test.d.ts +0 -1
- package/dist/types/smartCheckout/routing/bridge/getEthBalance.test.d.ts +0 -1
- package/dist/types/smartCheckout/routing/bridgeAndSwap/bridgeAndSwapRoute.test.d.ts +0 -1
- package/dist/types/smartCheckout/routing/bridgeAndSwap/constructBridgeRequirements.test.d.ts +0 -1
- package/dist/types/smartCheckout/routing/bridgeAndSwap/fetchL1ToL2Mapping.test.d.ts +0 -1
- package/dist/types/smartCheckout/routing/bridgeAndSwap/getBalancesByChain.test.d.ts +0 -1
- package/dist/types/smartCheckout/routing/bridgeAndSwap/getDexQuotes.test.d.ts +0 -1
- package/dist/types/smartCheckout/routing/geoBlocking.test.d.ts +0 -1
- package/dist/types/smartCheckout/routing/indexer/fetchL1Representation.test.d.ts +0 -1
- package/dist/types/smartCheckout/routing/onRamp/onRampRoute.test.d.ts +0 -1
- package/dist/types/smartCheckout/routing/routingCalculator.test.d.ts +0 -1
- package/dist/types/smartCheckout/routing/routingOptions.test.d.ts +0 -1
- package/dist/types/smartCheckout/routing/swap/quoteFetcher.test.d.ts +0 -1
- package/dist/types/smartCheckout/routing/swap/swapRoute.test.d.ts +0 -1
- package/dist/types/smartCheckout/routing/tokenBalances.test.d.ts +0 -1
- package/dist/types/smartCheckout/sell/sell.test.d.ts +0 -1
- package/dist/types/smartCheckout/smartCheckout.test.d.ts +0 -1
- package/dist/types/swap/swap.test.d.ts +0 -1
- package/dist/types/tokens/tokens.test.d.ts +0 -1
- package/dist/types/transaction/transaction.test.d.ts +0 -1
- package/dist/types/utils/utils.test.d.ts +0 -1
- package/dist/types/wallet/wallet.test.d.ts +0 -1
|
@@ -6,9 +6,9 @@ export declare class HttpClient {
|
|
|
6
6
|
constructor(config?: CheckoutModuleConfiguration);
|
|
7
7
|
private shouldAddPublishableKey;
|
|
8
8
|
private setupInterceptors;
|
|
9
|
-
request(config: AxiosRequestConfig): Promise<import("axios").AxiosResponse<any, any>>;
|
|
10
|
-
get(url: string, config?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<any, any>>;
|
|
11
|
-
post(url: string, data?: any, config?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<any, any>>;
|
|
12
|
-
put(url: string, data?: any, config?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<any, any>>;
|
|
13
|
-
delete(url: string, data?: any, config?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<any, any>>;
|
|
9
|
+
request(config: AxiosRequestConfig): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
10
|
+
get(url: string, config?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
11
|
+
post(url: string, data?: any, config?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
12
|
+
put(url: string, data?: any, config?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
13
|
+
delete(url: string, data?: any, config?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
14
14
|
}
|
|
@@ -24,7 +24,7 @@ export declare const ZKEVM_NATIVE_SANDBOX_TOKEN: {
|
|
|
24
24
|
* @property {string} PRODUCTION - The base URL for the production environment.
|
|
25
25
|
*/
|
|
26
26
|
export declare const IMMUTABLE_API_BASE_URL: {
|
|
27
|
-
[
|
|
27
|
+
[ENV_DEVELOPMENT]: string;
|
|
28
28
|
sandbox: string;
|
|
29
29
|
production: string;
|
|
30
30
|
};
|
|
@@ -35,7 +35,7 @@ export declare const IMMUTABLE_API_BASE_URL: {
|
|
|
35
35
|
* @property {string} PRODUCTION - The base URL for the production environment.
|
|
36
36
|
*/
|
|
37
37
|
export declare const CHECKOUT_CDN_BASE_URL: {
|
|
38
|
-
[
|
|
38
|
+
[ENV_DEVELOPMENT]: string;
|
|
39
39
|
sandbox: string;
|
|
40
40
|
production: string;
|
|
41
41
|
};
|
|
@@ -113,6 +113,8 @@ export declare const ERC721ABI: ({
|
|
|
113
113
|
stateMutability: string;
|
|
114
114
|
type: string;
|
|
115
115
|
} | {
|
|
116
|
+
constant?: undefined;
|
|
117
|
+
payable?: undefined;
|
|
116
118
|
inputs: {
|
|
117
119
|
internalType: string;
|
|
118
120
|
name: string;
|
|
@@ -126,8 +128,6 @@ export declare const ERC721ABI: ({
|
|
|
126
128
|
}[];
|
|
127
129
|
stateMutability: string;
|
|
128
130
|
type: string;
|
|
129
|
-
constant?: undefined;
|
|
130
|
-
payable?: undefined;
|
|
131
131
|
})[];
|
|
132
132
|
export declare const ERC1155ABI: {
|
|
133
133
|
inputs: {
|
|
@@ -77,4 +77,9 @@ export declare class CheckoutInternalError extends Error {
|
|
|
77
77
|
type: CheckoutInternalErrorType;
|
|
78
78
|
constructor(type: CheckoutInternalErrorType);
|
|
79
79
|
}
|
|
80
|
-
export declare const withCheckoutError: <T>(
|
|
80
|
+
export declare const withCheckoutError: <T>(
|
|
81
|
+
/**
|
|
82
|
+
* Wraps a function that returns a Promise and catches any errors that occur. If an error is caught,
|
|
83
|
+
* it is wrapped in a CheckoutError and rethrown.
|
|
84
|
+
*/
|
|
85
|
+
fn: () => Promise<T>, customError: ErrorType) => Promise<T>;
|
package/package.json
CHANGED
|
@@ -1,40 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imtbl/checkout-sdk",
|
|
3
3
|
"description": "Immutable Checkout SDK",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.23.1-0",
|
|
5
5
|
"author": "immutable",
|
|
6
|
+
"browser": "dist/browser/index.js",
|
|
6
7
|
"bugs": "https://github.com/immutable/ts-immutable-sdk/issues",
|
|
7
8
|
"dependencies": {
|
|
8
|
-
"@imtbl/blockchain-data": "2.22.1-alpha.0",
|
|
9
|
-
"@imtbl/bridge-sdk": "2.22.1-alpha.0",
|
|
10
|
-
"@imtbl/config": "2.22.1-alpha.0",
|
|
11
|
-
"@imtbl/dex-sdk": "2.22.1-alpha.0",
|
|
12
|
-
"@imtbl/generated-clients": "2.22.1-alpha.0",
|
|
13
|
-
"@imtbl/metrics": "2.22.1-alpha.0",
|
|
14
|
-
"@imtbl/orderbook": "2.22.1-alpha.0",
|
|
15
|
-
"@imtbl/passport": "2.22.1-alpha.0",
|
|
16
9
|
"@metamask/detect-provider": "^2.0.0",
|
|
17
|
-
"axios": "^1.
|
|
18
|
-
"ethers": "^6.
|
|
10
|
+
"axios": "^1.18.1",
|
|
11
|
+
"ethers": "^6.17.0",
|
|
19
12
|
"semver": "^7.4.0",
|
|
20
|
-
"uuid": "^9.0.1"
|
|
13
|
+
"uuid": "^9.0.1",
|
|
14
|
+
"@imtbl/blockchain-data": "2.23.1-0",
|
|
15
|
+
"@imtbl/bridge-sdk": "2.23.1-0",
|
|
16
|
+
"@imtbl/config": "2.23.1-0",
|
|
17
|
+
"@imtbl/dex-sdk": "2.23.1-0",
|
|
18
|
+
"@imtbl/generated-clients": "2.23.1-0",
|
|
19
|
+
"@imtbl/metrics": "2.23.1-0",
|
|
20
|
+
"@imtbl/orderbook": "2.23.1-0",
|
|
21
|
+
"@imtbl/passport": "2.23.1-0"
|
|
21
22
|
},
|
|
22
23
|
"devDependencies": {
|
|
23
|
-
"@swc/core": "^1.
|
|
24
|
+
"@swc/core": "^1.15.46",
|
|
24
25
|
"@swc/jest": "^0.2.37",
|
|
25
26
|
"@types/jest": "^29.5.12",
|
|
26
27
|
"@types/node": "^22.10.7",
|
|
27
28
|
"@types/semver": "^7.5.8",
|
|
28
29
|
"@types/uuid": "^8.3.4",
|
|
29
|
-
"
|
|
30
|
-
"eslint": "^8.56.0",
|
|
30
|
+
"@typescript/native": "npm:typescript@^7.0.2",
|
|
31
31
|
"jest": "^29.7.0",
|
|
32
|
-
"jest-environment-jsdom": "^29.
|
|
33
|
-
"
|
|
34
|
-
"tsup": "^8.3.0",
|
|
35
|
-
"typedoc": "^0.26.5",
|
|
32
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
33
|
+
"rollup-plugin-polyfill-node": "^0.13.0",
|
|
36
34
|
"typedoc-plugin-markdown": "^4.2.3",
|
|
37
|
-
"typescript": "
|
|
35
|
+
"typescript": "npm:@typescript/typescript6@^6.0.2"
|
|
38
36
|
},
|
|
39
37
|
"exports": {
|
|
40
38
|
"development": {
|
|
@@ -60,27 +58,27 @@
|
|
|
60
58
|
"license": "Apache-2.0",
|
|
61
59
|
"main": "dist/node/index.cjs",
|
|
62
60
|
"module": "dist/node/index.js",
|
|
63
|
-
"browser": "dist/browser/index.js",
|
|
64
61
|
"publishConfig": {
|
|
65
62
|
"access": "public"
|
|
66
63
|
},
|
|
67
|
-
"repository":
|
|
64
|
+
"repository": {
|
|
65
|
+
"type": "git",
|
|
66
|
+
"url": "immutable/ts-immutable-sdk.git"
|
|
67
|
+
},
|
|
68
68
|
"source": "src/index.ts",
|
|
69
69
|
"type": "module",
|
|
70
70
|
"types": "./dist/types/index.d.ts",
|
|
71
71
|
"scripts": {
|
|
72
72
|
"build": "NODE_ENV=production pnpm transpile && pnpm typegen",
|
|
73
|
-
"transpile": "tsup src/index.ts --config ./tsup.config.js",
|
|
74
|
-
"typegen": "tsc --customConditions default --emitDeclarationOnly --outDir dist/types",
|
|
75
|
-
"pack:root": "pnpm pack --pack-destination $(dirname $(pnpm root -w))",
|
|
76
73
|
"build:dev": "CHECKOUT_DEV_MODE=true pnpm build",
|
|
77
74
|
"docs": "typedoc --plugin typedoc-plugin-markdown --skipErrorChecking --disableSources --out docs src/index.ts",
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"start": "tsup --config ./tsup.config.js --watch",
|
|
75
|
+
"pack:root": "pnpm pack --pack-destination $(dirname $(pnpm root -w))",
|
|
76
|
+
"start": "tsdown --watch",
|
|
81
77
|
"start:dev": "CHECKOUT_DEV_MODE=true pnpm start",
|
|
82
78
|
"test": "jest test",
|
|
83
79
|
"test:watch": "jest test --watch",
|
|
84
|
-
"
|
|
80
|
+
"transpile": "tsdown",
|
|
81
|
+
"typecheck": "tsc --customConditions default --noEmit",
|
|
82
|
+
"typegen": "tsc --customConditions default --emitDeclarationOnly --outDir dist/types"
|
|
85
83
|
}
|
|
86
84
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/types/sdk.test.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/types/smartCheckout/routing/bridgeAndSwap/constructBridgeRequirements.test.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|