@imtbl/checkout-sdk 2.1.0 → 2.1.1-alpha.1
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 +1157 -1356
- package/dist/node/index.cjs +796 -995
- package/dist/node/index.js +935 -1134
- package/dist/types/env/env.d.ts +0 -1
- package/dist/types/sdk.d.ts +2 -2
- package/package.json +9 -12
- package/dist/types/env/env.test.d.ts +0 -1
- package/dist/types/widgets/load.d.ts +0 -2
- package/dist/types/widgets/load.test.d.ts +0 -1
- package/dist/types/widgets/version.d.ts +0 -22
- package/dist/types/widgets/version.test.d.ts +0 -1
package/dist/types/env/env.d.ts
CHANGED
package/dist/types/sdk.d.ts
CHANGED
|
@@ -22,6 +22,8 @@ export declare class Checkout {
|
|
|
22
22
|
*/
|
|
23
23
|
constructor(config?: CheckoutModuleConfiguration);
|
|
24
24
|
/**
|
|
25
|
+
* @deprecated Use `import { WidgetsFactory } from '@imtbl/checkout-widgets'` instead.
|
|
26
|
+
* This method will be removed in the next major release (v3)
|
|
25
27
|
* Loads the widgets bundle and initiates the widgets factory.
|
|
26
28
|
* @param {WidgetsInit} init - The initialisation parameters for loading the widgets bundle and applying configuration
|
|
27
29
|
* @returns {Promise<ImmutableCheckoutWidgets.WidgetsFactory>} A promise that resolves to the widgets factory instance
|
|
@@ -29,8 +31,6 @@ export declare class Checkout {
|
|
|
29
31
|
* @throws {CheckoutError} When the widgets script fails to load
|
|
30
32
|
*/
|
|
31
33
|
widgets(init: WidgetsInit): Promise<ImmutableCheckoutWidgets.WidgetsFactory>;
|
|
32
|
-
private loadUmdBundle;
|
|
33
|
-
private loadEsModules;
|
|
34
34
|
/**
|
|
35
35
|
* Creates a provider using the given parameters.
|
|
36
36
|
* @param {CreateProviderParams} params - The parameters for creating the provider.
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imtbl/checkout-sdk",
|
|
3
3
|
"description": "Immutable Checkout SDK",
|
|
4
|
-
"version": "2.1.
|
|
4
|
+
"version": "2.1.1-alpha.1",
|
|
5
5
|
"author": "immutable",
|
|
6
6
|
"bugs": "https://github.com/immutable/ts-immutable-sdk/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@imtbl/blockchain-data": "2.1.
|
|
9
|
-
"@imtbl/bridge-sdk": "2.1.
|
|
10
|
-
"@imtbl/config": "2.1.
|
|
11
|
-
"@imtbl/dex-sdk": "2.1.
|
|
12
|
-
"@imtbl/generated-clients": "2.1.
|
|
13
|
-
"@imtbl/metrics": "2.1.
|
|
14
|
-
"@imtbl/orderbook": "2.1.
|
|
15
|
-
"@imtbl/passport": "2.1.
|
|
8
|
+
"@imtbl/blockchain-data": "2.1.1-alpha.1",
|
|
9
|
+
"@imtbl/bridge-sdk": "2.1.1-alpha.1",
|
|
10
|
+
"@imtbl/config": "2.1.1-alpha.1",
|
|
11
|
+
"@imtbl/dex-sdk": "2.1.1-alpha.1",
|
|
12
|
+
"@imtbl/generated-clients": "2.1.1-alpha.1",
|
|
13
|
+
"@imtbl/metrics": "2.1.1-alpha.1",
|
|
14
|
+
"@imtbl/orderbook": "2.1.1-alpha.1",
|
|
15
|
+
"@imtbl/passport": "2.1.1-alpha.1",
|
|
16
16
|
"@metamask/detect-provider": "^2.0.0",
|
|
17
17
|
"axios": "^1.6.5",
|
|
18
18
|
"ethers": "^6.13.4",
|
|
@@ -76,11 +76,8 @@
|
|
|
76
76
|
"docs": "typedoc --plugin typedoc-plugin-markdown --skipErrorChecking --disableSources --out docs src/index.ts",
|
|
77
77
|
"lint": "eslint ./src --ext .ts,.jsx,.tsx --max-warnings=0",
|
|
78
78
|
"lint:fix": "eslint ./src --ext .ts,.jsx,.tsx --max-warnings=0 --fix",
|
|
79
|
-
"prepare:examplesdk": "pnpm --filter @examples/commerce-widget-nextjs exec mkdir -p tests/utils/local-widgets-js/ && cp ./dist/*.js $(pnpm --filter @examples/commerce-widget-nextjs exec pwd)/tests/utils/local-widgets-js/",
|
|
80
|
-
"prepare:testsdk": "pnpm --filter @tests/checkout-widgets-nextjs exec mkdir -p tests/utils/local-widgets-js/ && cp ./dist/*.js $(pnpm --filter @tests/checkout-widgets-nextjs exec pwd)/tests/utils/local-widgets-js/",
|
|
81
79
|
"start": "tsup --config ./tsup.config.js --watch",
|
|
82
80
|
"start:dev": "CHECKOUT_DEV_MODE=true pnpm start",
|
|
83
|
-
"start:local": "CHECKOUT_LOCAL_MODE=true pnpm start",
|
|
84
81
|
"test": "jest test",
|
|
85
82
|
"test:watch": "jest test --watch",
|
|
86
83
|
"typecheck": "tsc --customConditions default --noEmit"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { SemanticVersion } from './definitions/types';
|
|
2
|
-
import { CheckoutWidgetsVersionConfig } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* Validates and builds a version string based on the given SemanticVersion object.
|
|
5
|
-
* If the version is undefined or has an invalid major version, it returns the default checkout version.
|
|
6
|
-
* If the version is all zeros, it also returns the default checkout version.
|
|
7
|
-
* Otherwise, it constructs a validated version string based on the major, minor, patch, and build numbers.
|
|
8
|
-
*/
|
|
9
|
-
export declare function validateAndBuildVersion(version: SemanticVersion | undefined): string;
|
|
10
|
-
/**
|
|
11
|
-
* Fetches the latest version of the package from the JSDelivr version.json file.
|
|
12
|
-
* Falls back to 'latest' if an error occurs or the response is invalid.
|
|
13
|
-
* @returns {Promise<string>} A promise resolving to the latest version string or 'latest'.
|
|
14
|
-
*/
|
|
15
|
-
export declare function getLatestVersion(): Promise<string>;
|
|
16
|
-
/**
|
|
17
|
-
* Determines the version of the widgets to use based on the provided validated build version and checkout version config.
|
|
18
|
-
* If a version is provided in the widget init parameters, it uses that version.
|
|
19
|
-
* If the build version is an alpha, it uses that version.
|
|
20
|
-
* Defaults to 'latest' if no compatible version markers are found.
|
|
21
|
-
*/
|
|
22
|
-
export declare function determineWidgetsVersion(validatedBuildVersion: string, initVersionProvided: boolean, versionConfig?: CheckoutWidgetsVersionConfig): Promise<string>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|