@imtbl/sdk 0.0.1-alpha → 0.0.1-alpha.2
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/base.d.ts +119 -14
- package/dist/base.js +20 -8
- package/dist/browser/checkout.js +2 -2
- package/dist/checkout_sdk.d.ts +1 -33
- package/dist/checkout_sdk.js +63 -66
- package/dist/checkout_widgets.d.ts +1 -3
- package/dist/checkout_widgets.js +11 -16
- package/dist/index.cjs +216 -226
- package/dist/index.d.ts +39 -96
- package/dist/index.js +216 -227
- package/dist/passport.d.ts +14 -40
- package/dist/passport.js +91 -95
- package/dist/provider.d.ts +20 -36
- package/dist/provider.js +55 -66
- package/dist/starkex.d.ts +40 -6
- package/dist/starkex.js +1 -1
- package/package.json +2 -11
package/dist/checkout_sdk.d.ts
CHANGED
|
@@ -554,21 +554,11 @@ interface TokenInfo {
|
|
|
554
554
|
icon?: string;
|
|
555
555
|
}
|
|
556
556
|
interface GetTokenAllowListParams {
|
|
557
|
-
type: TokenFilterTypes;
|
|
558
557
|
chainId: ChainId;
|
|
559
|
-
exclude?: TokenFilter[];
|
|
560
558
|
}
|
|
561
559
|
interface GetTokenAllowListResult {
|
|
562
560
|
tokens: TokenInfo[];
|
|
563
561
|
}
|
|
564
|
-
declare enum TokenFilterTypes {
|
|
565
|
-
SWAP = "swap",
|
|
566
|
-
BRIDGE = "bridge",
|
|
567
|
-
ALL = "all"
|
|
568
|
-
}
|
|
569
|
-
interface TokenFilter {
|
|
570
|
-
address: string;
|
|
571
|
-
}
|
|
572
562
|
declare enum ChainId {
|
|
573
563
|
ETHEREUM = 1,
|
|
574
564
|
GOERLI = 5,
|
|
@@ -638,27 +628,6 @@ interface Transaction {
|
|
|
638
628
|
data: string;
|
|
639
629
|
chainId: number;
|
|
640
630
|
}
|
|
641
|
-
declare enum WalletFilterTypes {
|
|
642
|
-
ALL = "all",
|
|
643
|
-
DESKTOP = "desktop",
|
|
644
|
-
MOBILE = "mobile"
|
|
645
|
-
}
|
|
646
|
-
interface WalletFilter {
|
|
647
|
-
connectionProvider: ConnectionProviders;
|
|
648
|
-
}
|
|
649
|
-
interface GetWalletAllowListParams {
|
|
650
|
-
type: WalletFilterTypes;
|
|
651
|
-
exclude?: WalletFilter[];
|
|
652
|
-
}
|
|
653
|
-
interface WalletInfo {
|
|
654
|
-
connectionProvider: ConnectionProviders;
|
|
655
|
-
name: string;
|
|
656
|
-
description: string;
|
|
657
|
-
icon: string;
|
|
658
|
-
}
|
|
659
|
-
interface GetWalletAllowListResult {
|
|
660
|
-
allowedWallets: WalletInfo[];
|
|
661
|
-
}
|
|
662
631
|
declare class Checkout {
|
|
663
632
|
checkIsWalletConnected(params: CheckConnectionParams): Promise<CheckConnectionResult>;
|
|
664
633
|
connect(params: ConnectParams): Promise<ConnectResult>;
|
|
@@ -666,8 +635,7 @@ declare class Checkout {
|
|
|
666
635
|
getBalance(params: GetBalanceParams): Promise<GetBalanceResult>;
|
|
667
636
|
getAllBalances(params: GetAllBalancesParams): Promise<GetAllBalancesResult>;
|
|
668
637
|
getTokenAllowList(params: GetTokenAllowListParams): GetTokenAllowListResult;
|
|
669
|
-
getWalletsAllowList(params: GetWalletAllowListParams): Promise<GetWalletAllowListResult>;
|
|
670
638
|
sendTransaction(params: SendTransactionParams): Promise<SendTransactionResult>;
|
|
671
639
|
}
|
|
672
640
|
|
|
673
|
-
export { ChainId, CheckConnectionParams, CheckConnectionResult, Checkout, ConnectParams, ConnectResult, ConnectionProviders, GetAllBalancesParams, GetAllBalancesResult, GetBalanceParams, GetBalanceResult, GetTokenAllowListParams, GetTokenAllowListResult,
|
|
641
|
+
export { ChainId, CheckConnectionParams, CheckConnectionResult, Checkout, ConnectParams, ConnectResult, ConnectionProviders, GetAllBalancesParams, GetAllBalancesResult, GetBalanceParams, GetBalanceResult, GetTokenAllowListParams, GetTokenAllowListResult, NetworkInfo, SendTransactionParams, SendTransactionResult, SwitchNetworkParams, SwitchNetworkResult, TokenInfo };
|
package/dist/checkout_sdk.js
CHANGED
|
@@ -2,10 +2,6 @@ import { utils, Contract } from 'ethers';
|
|
|
2
2
|
import $7v2Z6$metamaskdetectprovider from '@metamask/detect-provider';
|
|
3
3
|
import { Web3Provider } from '@ethersproject/providers';
|
|
4
4
|
|
|
5
|
-
function $parcel$interopDefault(a) {
|
|
6
|
-
return a && a.__esModule ? a.default : a;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
5
|
const $762782b6c862d954$export$db5daa1b5156ccfe = [
|
|
10
6
|
{
|
|
11
7
|
constant: true,
|
|
@@ -128,12 +124,6 @@ const $a47e48dd2c04791b$export$f61f4aaec62f6be9 = {
|
|
|
128
124
|
};
|
|
129
125
|
|
|
130
126
|
|
|
131
|
-
let $08d5ddc39acd6833$export$fd9b17d87f4121d2;
|
|
132
|
-
(function(TokenFilterTypes) {
|
|
133
|
-
TokenFilterTypes["SWAP"] = "swap";
|
|
134
|
-
TokenFilterTypes["BRIDGE"] = "bridge";
|
|
135
|
-
TokenFilterTypes["ALL"] = "all";
|
|
136
|
-
})($08d5ddc39acd6833$export$fd9b17d87f4121d2 || ($08d5ddc39acd6833$export$fd9b17d87f4121d2 = {}));
|
|
137
127
|
|
|
138
128
|
|
|
139
129
|
|
|
@@ -144,12 +134,6 @@ const $4f91c5f280efe242$export$a130407f3423b97d = {
|
|
|
144
134
|
ADD_NETWORK: "wallet_addEthereumChain",
|
|
145
135
|
SWITCH_NETWORK: "wallet_switchEthereumChain"
|
|
146
136
|
};
|
|
147
|
-
let $4f91c5f280efe242$export$a75605c67ea83a5a;
|
|
148
|
-
(function(WalletFilterTypes) {
|
|
149
|
-
WalletFilterTypes["ALL"] = "all";
|
|
150
|
-
WalletFilterTypes["DESKTOP"] = "desktop";
|
|
151
|
-
WalletFilterTypes["MOBILE"] = "mobile";
|
|
152
|
-
})($4f91c5f280efe242$export$a75605c67ea83a5a || ($4f91c5f280efe242$export$a75605c67ea83a5a = {}));
|
|
153
137
|
|
|
154
138
|
|
|
155
139
|
|
|
@@ -259,24 +243,67 @@ async function $de192de6ef100f9f$var$addNetworkToWallet(provider, chainId) {
|
|
|
259
243
|
|
|
260
244
|
|
|
261
245
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
246
|
+
let $efe60cea83bfc4e8$export$f04a61298a47a40f;
|
|
247
|
+
(function(Icon) {
|
|
248
|
+
Icon["ETH"] = "data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' width='100%25' height='100%25' version='1.1' shape-rendering='geometricPrecision' text-rendering='geometricPrecision' image-rendering='optimizeQuality' fill-rule='evenodd' clip-rule='evenodd'%0AviewBox='0 0 784.37 1277.39' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns:xodm='http://www.corel.com/coreldraw/odm/2003'%3E%3Cg id='Layer_x0020_1'%3E%3Cmetadata id='CorelCorpID_0Corel-Layer'/%3E%3Cg id='_1421394342400'%3E%3Cg%3E%3Cpolygon fill='%23343434' fill-rule='nonzero' points='392.07,0 383.5,29.11 383.5,873.74 392.07,882.29 784.13,650.54 '/%3E%3Cpolygon fill='%238C8C8C' fill-rule='nonzero' points='392.07,0 -0,650.54 392.07,882.29 392.07,472.33 '/%3E%3Cpolygon fill='%233C3C3B' fill-rule='nonzero' points='392.07,956.52 387.24,962.41 387.24,1263.28 392.07,1277.38 784.37,724.89 '/%3E%3Cpolygon fill='%238C8C8C' fill-rule='nonzero' points='392.07,1277.38 392.07,956.52 -0,724.89 '/%3E%3Cpolygon fill='%23141414' fill-rule='nonzero' points='392.07,882.29 784.13,650.54 392.07,472.33 '/%3E%3Cpolygon fill='%23393939' fill-rule='nonzero' points='0,650.54 392.07,882.29 392.07,472.33 '/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A";
|
|
249
|
+
Icon["MATIC"] = "data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 38.4 33.5' style='enable-background:new 0 0 38.4 33.5;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%238247E5;%7D%0A%3C/style%3E%3Cg%3E%3Cpath class='st0' d='M29,10.2c-0.7-0.4-1.6-0.4-2.4,0L21,13.5l-3.8,2.1l-5.5,3.3c-0.7,0.4-1.6,0.4-2.4,0L5,16.3 c-0.7-0.4-1.2-1.2-1.2-2.1v-5c0-0.8,0.4-1.6,1.2-2.1l4.3-2.5c0.7-0.4,1.6-0.4,2.4,0L16,7.2c0.7,0.4,1.2,1.2,1.2,2.1v3.3l3.8-2.2V7 c0-0.8-0.4-1.6-1.2-2.1l-8-4.7c-0.7-0.4-1.6-0.4-2.4,0L1.2,5C0.4,5.4,0,6.2,0,7v9.4c0,0.8,0.4,1.6,1.2,2.1l8.1,4.7 c0.7,0.4,1.6,0.4,2.4,0l5.5-3.2l3.8-2.2l5.5-3.2c0.7-0.4,1.6-0.4,2.4,0l4.3,2.5c0.7,0.4,1.2,1.2,1.2,2.1v5c0,0.8-0.4,1.6-1.2,2.1 L29,28.8c-0.7,0.4-1.6,0.4-2.4,0l-4.3-2.5c-0.7-0.4-1.2-1.2-1.2-2.1V21l-3.8,2.2v3.3c0,0.8,0.4,1.6,1.2,2.1l8.1,4.7 c0.7,0.4,1.6,0.4,2.4,0l8.1-4.7c0.7-0.4,1.2-1.2,1.2-2.1V17c0-0.8-0.4-1.6-1.2-2.1L29,10.2z'/%3E%3C/g%3E%3C/svg%3E%0A";
|
|
250
|
+
Icon["IMX"] = "data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 139 113' style='enable-background:new 0 0 139 113;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bclip-path:url(%23SVGID_00000053504646934646330740000009134454895836103350_);%7D .st1%7Bfill:%2317B5CB;%7D%0A%3C/style%3E%3Cg%3E%3Cdefs%3E%3Crect id='SVGID_1_' width='139' height='113'/%3E%3C/defs%3E%3CclipPath id='SVGID_00000035518931339590433170000002358037249938198420_'%3E%3Cuse xlink:href='%23SVGID_1_' style='overflow:visible;'/%3E%3C/clipPath%3E%3Cg style='clip-path:url(%23SVGID_00000035518931339590433170000002358037249938198420_);'%3E%3Cpath class='st1' d='M124.1,0h14.6L79.5,67.6c-1.5,1.7-1.6,4.3-0.1,6.1l34.1,39.7H98.3L66.8,76.6l-1.6-2c-1.5-1.7-1.4-4.4,0.1-6.1 L124.1,0z'/%3E%3Cpath class='st1' d='M91.2,73.7c-1-1.1-1.3-2.7-1-4.1c0.3-0.8,0.8-1.6,1.4-2.2l3.9-4.3l43.5,50.3h-13.8 C125.2,113.4,99.7,83.6,91.2,73.7z'/%3E%3Cpath class='st1' d='M15.2,113.4H0l46.6-53.9c1.5-1.7,1.5-4.3,0-6L0.4,0H15l46.5,53.9c1.2,1.6,1.4,3.9,0.1,5.4 C49.4,73.4,15.2,113.4,15.2,113.4z'/%3E%3Cpath class='st1' d='M40.6,0h-14l43.1,49.9c0,0,0.1-0.1,4.9-5.8c1.3-1.5,1.6-3.4,0.1-4.9C65.7,30,40.6,0,40.6,0z'/%3E%3Cpath class='st1' d='M82.6,34.8L112.5,0H98.3L82.7,18.2l-4.5,5.3c-1.5,1.7-1.6,4.3-0.1,6.1C79.2,30.9,82.6,34.8,82.6,34.8z'/%3E%3Cpath class='st1' d='M56.6,78.6l-29.9,34.8h14.1l15.6-18.2l4.5-5.3c1.5-1.7,1.6-4.3,0.1-6.1C59.9,82.5,56.6,78.6,56.6,78.6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A";
|
|
251
|
+
})($efe60cea83bfc4e8$export$f04a61298a47a40f || ($efe60cea83bfc4e8$export$f04a61298a47a40f = {}));
|
|
252
|
+
const $efe60cea83bfc4e8$export$3dbcce43073f40c7 = [
|
|
253
|
+
{
|
|
254
|
+
name: "Ethereum",
|
|
255
|
+
symbol: "ETH",
|
|
256
|
+
decimals: 18,
|
|
257
|
+
icon: "data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' width='100%25' height='100%25' version='1.1' shape-rendering='geometricPrecision' text-rendering='geometricPrecision' image-rendering='optimizeQuality' fill-rule='evenodd' clip-rule='evenodd'%0AviewBox='0 0 784.37 1277.39' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns:xodm='http://www.corel.com/coreldraw/odm/2003'%3E%3Cg id='Layer_x0020_1'%3E%3Cmetadata id='CorelCorpID_0Corel-Layer'/%3E%3Cg id='_1421394342400'%3E%3Cg%3E%3Cpolygon fill='%23343434' fill-rule='nonzero' points='392.07,0 383.5,29.11 383.5,873.74 392.07,882.29 784.13,650.54 '/%3E%3Cpolygon fill='%238C8C8C' fill-rule='nonzero' points='392.07,0 -0,650.54 392.07,882.29 392.07,472.33 '/%3E%3Cpolygon fill='%233C3C3B' fill-rule='nonzero' points='392.07,956.52 387.24,962.41 387.24,1263.28 392.07,1277.38 784.37,724.89 '/%3E%3Cpolygon fill='%238C8C8C' fill-rule='nonzero' points='392.07,1277.38 392.07,956.52 -0,724.89 '/%3E%3Cpolygon fill='%23141414' fill-rule='nonzero' points='392.07,882.29 784.13,650.54 392.07,472.33 '/%3E%3Cpolygon fill='%23393939' fill-rule='nonzero' points='0,650.54 392.07,882.29 392.07,472.33 '/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
name: "Matic",
|
|
261
|
+
symbol: "MATIC",
|
|
262
|
+
address: "0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0",
|
|
263
|
+
decimals: 18,
|
|
264
|
+
icon: "data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 38.4 33.5' style='enable-background:new 0 0 38.4 33.5;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%238247E5;%7D%0A%3C/style%3E%3Cg%3E%3Cpath class='st0' d='M29,10.2c-0.7-0.4-1.6-0.4-2.4,0L21,13.5l-3.8,2.1l-5.5,3.3c-0.7,0.4-1.6,0.4-2.4,0L5,16.3 c-0.7-0.4-1.2-1.2-1.2-2.1v-5c0-0.8,0.4-1.6,1.2-2.1l4.3-2.5c0.7-0.4,1.6-0.4,2.4,0L16,7.2c0.7,0.4,1.2,1.2,1.2,2.1v3.3l3.8-2.2V7 c0-0.8-0.4-1.6-1.2-2.1l-8-4.7c-0.7-0.4-1.6-0.4-2.4,0L1.2,5C0.4,5.4,0,6.2,0,7v9.4c0,0.8,0.4,1.6,1.2,2.1l8.1,4.7 c0.7,0.4,1.6,0.4,2.4,0l5.5-3.2l3.8-2.2l5.5-3.2c0.7-0.4,1.6-0.4,2.4,0l4.3,2.5c0.7,0.4,1.2,1.2,1.2,2.1v5c0,0.8-0.4,1.6-1.2,2.1 L29,28.8c-0.7,0.4-1.6,0.4-2.4,0l-4.3-2.5c-0.7-0.4-1.2-1.2-1.2-2.1V21l-3.8,2.2v3.3c0,0.8,0.4,1.6,1.2,2.1l8.1,4.7 c0.7,0.4,1.6,0.4,2.4,0l8.1-4.7c0.7-0.4,1.2-1.2,1.2-2.1V17c0-0.8-0.4-1.6-1.2-2.1L29,10.2z'/%3E%3C/g%3E%3C/svg%3E%0A"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
name: "Immutable X",
|
|
268
|
+
symbol: "IMX",
|
|
269
|
+
address: "0xF57e7e7C23978C3cAEC3C3548E3D615c346e79fF",
|
|
270
|
+
decimals: 18,
|
|
271
|
+
icon: "data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 139 113' style='enable-background:new 0 0 139 113;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bclip-path:url(%23SVGID_00000053504646934646330740000009134454895836103350_);%7D .st1%7Bfill:%2317B5CB;%7D%0A%3C/style%3E%3Cg%3E%3Cdefs%3E%3Crect id='SVGID_1_' width='139' height='113'/%3E%3C/defs%3E%3CclipPath id='SVGID_00000035518931339590433170000002358037249938198420_'%3E%3Cuse xlink:href='%23SVGID_1_' style='overflow:visible;'/%3E%3C/clipPath%3E%3Cg style='clip-path:url(%23SVGID_00000035518931339590433170000002358037249938198420_);'%3E%3Cpath class='st1' d='M124.1,0h14.6L79.5,67.6c-1.5,1.7-1.6,4.3-0.1,6.1l34.1,39.7H98.3L66.8,76.6l-1.6-2c-1.5-1.7-1.4-4.4,0.1-6.1 L124.1,0z'/%3E%3Cpath class='st1' d='M91.2,73.7c-1-1.1-1.3-2.7-1-4.1c0.3-0.8,0.8-1.6,1.4-2.2l3.9-4.3l43.5,50.3h-13.8 C125.2,113.4,99.7,83.6,91.2,73.7z'/%3E%3Cpath class='st1' d='M15.2,113.4H0l46.6-53.9c1.5-1.7,1.5-4.3,0-6L0.4,0H15l46.5,53.9c1.2,1.6,1.4,3.9,0.1,5.4 C49.4,73.4,15.2,113.4,15.2,113.4z'/%3E%3Cpath class='st1' d='M40.6,0h-14l43.1,49.9c0,0,0.1-0.1,4.9-5.8c1.3-1.5,1.6-3.4,0.1-4.9C65.7,30,40.6,0,40.6,0z'/%3E%3Cpath class='st1' d='M82.6,34.8L112.5,0H98.3L82.7,18.2l-4.5,5.3c-1.5,1.7-1.6,4.3-0.1,6.1C79.2,30.9,82.6,34.8,82.6,34.8z'/%3E%3Cpath class='st1' d='M56.6,78.6l-29.9,34.8h14.1l15.6-18.2l4.5-5.3c1.5-1.7,1.6-4.3,0.1-6.1C59.9,82.5,56.6,78.6,56.6,78.6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A"
|
|
272
|
+
}
|
|
273
|
+
];
|
|
274
|
+
const $efe60cea83bfc4e8$var$goerliTokensList = [
|
|
275
|
+
{
|
|
276
|
+
name: "Ethereum",
|
|
277
|
+
symbol: "ETH",
|
|
278
|
+
decimals: 18,
|
|
279
|
+
icon: "data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' width='100%25' height='100%25' version='1.1' shape-rendering='geometricPrecision' text-rendering='geometricPrecision' image-rendering='optimizeQuality' fill-rule='evenodd' clip-rule='evenodd'%0AviewBox='0 0 784.37 1277.39' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns:xodm='http://www.corel.com/coreldraw/odm/2003'%3E%3Cg id='Layer_x0020_1'%3E%3Cmetadata id='CorelCorpID_0Corel-Layer'/%3E%3Cg id='_1421394342400'%3E%3Cg%3E%3Cpolygon fill='%23343434' fill-rule='nonzero' points='392.07,0 383.5,29.11 383.5,873.74 392.07,882.29 784.13,650.54 '/%3E%3Cpolygon fill='%238C8C8C' fill-rule='nonzero' points='392.07,0 -0,650.54 392.07,882.29 392.07,472.33 '/%3E%3Cpolygon fill='%233C3C3B' fill-rule='nonzero' points='392.07,956.52 387.24,962.41 387.24,1263.28 392.07,1277.38 784.37,724.89 '/%3E%3Cpolygon fill='%238C8C8C' fill-rule='nonzero' points='392.07,1277.38 392.07,956.52 -0,724.89 '/%3E%3Cpolygon fill='%23141414' fill-rule='nonzero' points='392.07,882.29 784.13,650.54 392.07,472.33 '/%3E%3Cpolygon fill='%23393939' fill-rule='nonzero' points='0,650.54 392.07,882.29 392.07,472.33 '/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
name: "Immutable X",
|
|
283
|
+
symbol: "IMX",
|
|
284
|
+
address: "0x1facdd0165489f373255a90304650e15481b2c85",
|
|
285
|
+
decimals: 18,
|
|
286
|
+
icon: "data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 139 113' style='enable-background:new 0 0 139 113;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bclip-path:url(%23SVGID_00000053504646934646330740000009134454895836103350_);%7D .st1%7Bfill:%2317B5CB;%7D%0A%3C/style%3E%3Cg%3E%3Cdefs%3E%3Crect id='SVGID_1_' width='139' height='113'/%3E%3C/defs%3E%3CclipPath id='SVGID_00000035518931339590433170000002358037249938198420_'%3E%3Cuse xlink:href='%23SVGID_1_' style='overflow:visible;'/%3E%3C/clipPath%3E%3Cg style='clip-path:url(%23SVGID_00000035518931339590433170000002358037249938198420_);'%3E%3Cpath class='st1' d='M124.1,0h14.6L79.5,67.6c-1.5,1.7-1.6,4.3-0.1,6.1l34.1,39.7H98.3L66.8,76.6l-1.6-2c-1.5-1.7-1.4-4.4,0.1-6.1 L124.1,0z'/%3E%3Cpath class='st1' d='M91.2,73.7c-1-1.1-1.3-2.7-1-4.1c0.3-0.8,0.8-1.6,1.4-2.2l3.9-4.3l43.5,50.3h-13.8 C125.2,113.4,99.7,83.6,91.2,73.7z'/%3E%3Cpath class='st1' d='M15.2,113.4H0l46.6-53.9c1.5-1.7,1.5-4.3,0-6L0.4,0H15l46.5,53.9c1.2,1.6,1.4,3.9,0.1,5.4 C49.4,73.4,15.2,113.4,15.2,113.4z'/%3E%3Cpath class='st1' d='M40.6,0h-14l43.1,49.9c0,0,0.1-0.1,4.9-5.8c1.3-1.5,1.6-3.4,0.1-4.9C65.7,30,40.6,0,40.6,0z'/%3E%3Cpath class='st1' d='M82.6,34.8L112.5,0H98.3L82.7,18.2l-4.5,5.3c-1.5,1.7-1.6,4.3-0.1,6.1C79.2,30.9,82.6,34.8,82.6,34.8z'/%3E%3Cpath class='st1' d='M56.6,78.6l-29.9,34.8h14.1l15.6-18.2l4.5-5.3c1.5-1.7,1.6-4.3,0.1-6.1C59.9,82.5,56.6,78.6,56.6,78.6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A"
|
|
287
|
+
}
|
|
288
|
+
];
|
|
289
|
+
const $efe60cea83bfc4e8$var$polygonTokensList = [];
|
|
290
|
+
const $efe60cea83bfc4e8$export$473cec51305fdae8 = (chainId)=>{
|
|
291
|
+
let tokenList = [];
|
|
292
|
+
switch(chainId){
|
|
293
|
+
case ($a47e48dd2c04791b$export$c06e1e7429de6283).ETHEREUM:
|
|
294
|
+
tokenList = $efe60cea83bfc4e8$export$3dbcce43073f40c7;
|
|
295
|
+
break;
|
|
296
|
+
case ($a47e48dd2c04791b$export$c06e1e7429de6283).GOERLI:
|
|
297
|
+
tokenList = $efe60cea83bfc4e8$var$goerliTokensList;
|
|
298
|
+
break;
|
|
299
|
+
case ($a47e48dd2c04791b$export$c06e1e7429de6283).POLYGON:
|
|
300
|
+
tokenList = $efe60cea83bfc4e8$var$polygonTokensList;
|
|
301
|
+
break;
|
|
302
|
+
default:
|
|
303
|
+
tokenList = $efe60cea83bfc4e8$export$3dbcce43073f40c7;
|
|
304
|
+
}
|
|
278
305
|
return {
|
|
279
|
-
tokens:
|
|
306
|
+
tokens: tokenList
|
|
280
307
|
};
|
|
281
308
|
};
|
|
282
309
|
|
|
@@ -321,10 +348,7 @@ async function $1564e43dde50bb61$export$60e0fe116a0e6ed0(provider, walletAddress
|
|
|
321
348
|
const $1564e43dde50bb61$export$fee49741664a4d7e = async (provider, walletAddress, chainId)=>{
|
|
322
349
|
if (!Object.values(($a47e48dd2c04791b$export$c06e1e7429de6283)).includes(chainId)) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)(`ChainId ${chainId} is not supported`, ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).CHAIN_NOT_SUPPORTED_ERROR);
|
|
323
350
|
if (!provider.provider?.request) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("provider object is missing request function", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).PROVIDER_REQUEST_MISSING_ERROR);
|
|
324
|
-
const tokenList = ($efe60cea83bfc4e8$export$473cec51305fdae8)(
|
|
325
|
-
type: ($08d5ddc39acd6833$export$fd9b17d87f4121d2).ALL,
|
|
326
|
-
chainId: chainId
|
|
327
|
-
});
|
|
351
|
+
const tokenList = ($efe60cea83bfc4e8$export$473cec51305fdae8)(chainId);
|
|
328
352
|
const allBalancePromises = [];
|
|
329
353
|
allBalancePromises.push($1564e43dde50bb61$export$df96cd8d56be0ab1(provider, walletAddress));
|
|
330
354
|
tokenList.tokens.filter((token)=>token.address).forEach((token)=>allBalancePromises.push($1564e43dde50bb61$export$60e0fe116a0e6ed0(provider, walletAddress, token.address ?? "")));
|
|
@@ -395,30 +419,6 @@ async function $c99672cf2294e839$var$getMetaMaskProvider() {
|
|
|
395
419
|
|
|
396
420
|
|
|
397
421
|
|
|
398
|
-
var $6f3c55a615003cbf$exports = {};
|
|
399
|
-
$6f3c55a615003cbf$exports = JSON.parse('[{"connectionProvider":"metamask","icon":"some-icon-url","name":"MetaMask","description":"complete web3 wallet solution","platform":["mobile","desktop"]},{"connectionProvider":"passport","icon":"pp-icon","name":"Passport","description":"Web3 with your email!","platform":["mobile"]},{"connectionProvider":"gamestop","icon":"gme-icon","name":"GameStop","description":"Never stopping the game!","platform":["desktop"]}]');
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
async function $5cdde2ffe6360fec$export$a822caa90d7eef09({ type: type = ($4f91c5f280efe242$export$a75605c67ea83a5a).ALL , exclude: exclude }) {
|
|
403
|
-
// todo:For async API call, use the CheckoutError with errorType:API_CALL_ERROR?? or any other
|
|
404
|
-
const filteredWalletsList = ((/*@__PURE__*/$parcel$interopDefault($6f3c55a615003cbf$exports))).filter((wallet)=>{
|
|
405
|
-
const walletNotExcluded = !exclude?.map((excludeWallet)=>excludeWallet.connectionProvider).includes(wallet.connectionProvider);
|
|
406
|
-
const allowAllWallets = type === ($4f91c5f280efe242$export$a75605c67ea83a5a).ALL;
|
|
407
|
-
const walletsAllowedForType = wallet.platform.includes(type);
|
|
408
|
-
return walletNotExcluded && (allowAllWallets || walletsAllowedForType);
|
|
409
|
-
}).map((wallet)=>{
|
|
410
|
-
const { platform: platform , ...walletInfo } = wallet;
|
|
411
|
-
return walletInfo;
|
|
412
|
-
});
|
|
413
|
-
return {
|
|
414
|
-
allowedWallets: filteredWalletsList
|
|
415
|
-
};
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
422
|
|
|
423
423
|
const $dbe95599a4661140$export$8e0e7ffc78696d30 = async (params)=>{
|
|
424
424
|
const { provider: provider , transaction: transaction } = params;
|
|
@@ -458,14 +458,11 @@ class $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 {
|
|
|
458
458
|
return $1564e43dde50bb61$export$fee49741664a4d7e(params.provider, params.walletAddress, params.chainId);
|
|
459
459
|
}
|
|
460
460
|
getTokenAllowList(params) {
|
|
461
|
-
return $efe60cea83bfc4e8$export$473cec51305fdae8(params);
|
|
462
|
-
}
|
|
463
|
-
async getWalletsAllowList(params) {
|
|
464
|
-
return await $5cdde2ffe6360fec$export$a822caa90d7eef09(params);
|
|
461
|
+
return $efe60cea83bfc4e8$export$473cec51305fdae8(params.chainId);
|
|
465
462
|
}
|
|
466
463
|
async sendTransaction(params) {
|
|
467
464
|
return await $dbe95599a4661140$export$8e0e7ffc78696d30(params);
|
|
468
465
|
}
|
|
469
466
|
}
|
|
470
467
|
|
|
471
|
-
export { $a47e48dd2c04791b$export$c06e1e7429de6283 as ChainId, $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 as Checkout, $d176a05e966364ba$export$3bfad4d03ada24c4 as ConnectionProviders
|
|
468
|
+
export { $a47e48dd2c04791b$export$c06e1e7429de6283 as ChainId, $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 as Checkout, $d176a05e966364ba$export$3bfad4d03ada24c4 as ConnectionProviders };
|
|
@@ -12369,9 +12369,7 @@ declare namespace React {
|
|
|
12369
12369
|
interface DOMAttributes<T> {
|
|
12370
12370
|
children?: ReactNode | undefined;
|
|
12371
12371
|
dangerouslySetInnerHTML?: {
|
|
12372
|
-
|
|
12373
|
-
// But unfortunately we're mixing renderer-specific type declarations.
|
|
12374
|
-
__html: string | TrustedHTML;
|
|
12372
|
+
__html: string;
|
|
12375
12373
|
} | undefined;
|
|
12376
12374
|
|
|
12377
12375
|
// Clipboard Events
|
package/dist/checkout_widgets.js
CHANGED
|
@@ -63,20 +63,6 @@ let $a47e48dd2c04791b$export$c06e1e7429de6283;
|
|
|
63
63
|
});
|
|
64
64
|
|
|
65
65
|
|
|
66
|
-
let $08d5ddc39acd6833$export$fd9b17d87f4121d2;
|
|
67
|
-
(function(TokenFilterTypes) {
|
|
68
|
-
TokenFilterTypes["SWAP"] = "swap";
|
|
69
|
-
TokenFilterTypes["BRIDGE"] = "bridge";
|
|
70
|
-
TokenFilterTypes["ALL"] = "all";
|
|
71
|
-
})($08d5ddc39acd6833$export$fd9b17d87f4121d2 || ($08d5ddc39acd6833$export$fd9b17d87f4121d2 = {}));
|
|
72
|
-
let $4f91c5f280efe242$export$a75605c67ea83a5a;
|
|
73
|
-
(function(WalletFilterTypes) {
|
|
74
|
-
WalletFilterTypes["ALL"] = "all";
|
|
75
|
-
WalletFilterTypes["DESKTOP"] = "desktop";
|
|
76
|
-
WalletFilterTypes["MOBILE"] = "mobile";
|
|
77
|
-
})($4f91c5f280efe242$export$a75605c67ea83a5a || ($4f91c5f280efe242$export$a75605c67ea83a5a = {}));
|
|
78
|
-
|
|
79
|
-
|
|
80
66
|
|
|
81
67
|
|
|
82
68
|
let $a8bc256d81a5e2c1$export$e3dc0620abde7f5a;
|
|
@@ -90,8 +76,17 @@ let $a8bc256d81a5e2c1$export$e3dc0620abde7f5a;
|
|
|
90
76
|
CheckoutErrorType["USER_REJECTED_REQUEST_ERROR"] = "USER_REJECTED_REQUEST_ERROR";
|
|
91
77
|
CheckoutErrorType["TRANSACTION_ERROR"] = "TRANSACTION_ERROR";
|
|
92
78
|
})($a8bc256d81a5e2c1$export$e3dc0620abde7f5a || ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a = {}));
|
|
93
|
-
|
|
94
|
-
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
let $efe60cea83bfc4e8$export$f04a61298a47a40f;
|
|
85
|
+
(function(Icon) {
|
|
86
|
+
Icon["ETH"] = "data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' width='100%25' height='100%25' version='1.1' shape-rendering='geometricPrecision' text-rendering='geometricPrecision' image-rendering='optimizeQuality' fill-rule='evenodd' clip-rule='evenodd'%0AviewBox='0 0 784.37 1277.39' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns:xodm='http://www.corel.com/coreldraw/odm/2003'%3E%3Cg id='Layer_x0020_1'%3E%3Cmetadata id='CorelCorpID_0Corel-Layer'/%3E%3Cg id='_1421394342400'%3E%3Cg%3E%3Cpolygon fill='%23343434' fill-rule='nonzero' points='392.07,0 383.5,29.11 383.5,873.74 392.07,882.29 784.13,650.54 '/%3E%3Cpolygon fill='%238C8C8C' fill-rule='nonzero' points='392.07,0 -0,650.54 392.07,882.29 392.07,472.33 '/%3E%3Cpolygon fill='%233C3C3B' fill-rule='nonzero' points='392.07,956.52 387.24,962.41 387.24,1263.28 392.07,1277.38 784.37,724.89 '/%3E%3Cpolygon fill='%238C8C8C' fill-rule='nonzero' points='392.07,1277.38 392.07,956.52 -0,724.89 '/%3E%3Cpolygon fill='%23141414' fill-rule='nonzero' points='392.07,882.29 784.13,650.54 392.07,472.33 '/%3E%3Cpolygon fill='%23393939' fill-rule='nonzero' points='0,650.54 392.07,882.29 392.07,472.33 '/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A";
|
|
87
|
+
Icon["MATIC"] = "data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 38.4 33.5' style='enable-background:new 0 0 38.4 33.5;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%238247E5;%7D%0A%3C/style%3E%3Cg%3E%3Cpath class='st0' d='M29,10.2c-0.7-0.4-1.6-0.4-2.4,0L21,13.5l-3.8,2.1l-5.5,3.3c-0.7,0.4-1.6,0.4-2.4,0L5,16.3 c-0.7-0.4-1.2-1.2-1.2-2.1v-5c0-0.8,0.4-1.6,1.2-2.1l4.3-2.5c0.7-0.4,1.6-0.4,2.4,0L16,7.2c0.7,0.4,1.2,1.2,1.2,2.1v3.3l3.8-2.2V7 c0-0.8-0.4-1.6-1.2-2.1l-8-4.7c-0.7-0.4-1.6-0.4-2.4,0L1.2,5C0.4,5.4,0,6.2,0,7v9.4c0,0.8,0.4,1.6,1.2,2.1l8.1,4.7 c0.7,0.4,1.6,0.4,2.4,0l5.5-3.2l3.8-2.2l5.5-3.2c0.7-0.4,1.6-0.4,2.4,0l4.3,2.5c0.7,0.4,1.2,1.2,1.2,2.1v5c0,0.8-0.4,1.6-1.2,2.1 L29,28.8c-0.7,0.4-1.6,0.4-2.4,0l-4.3-2.5c-0.7-0.4-1.2-1.2-1.2-2.1V21l-3.8,2.2v3.3c0,0.8,0.4,1.6,1.2,2.1l8.1,4.7 c0.7,0.4,1.6,0.4,2.4,0l8.1-4.7c0.7-0.4,1.2-1.2,1.2-2.1V17c0-0.8-0.4-1.6-1.2-2.1L29,10.2z'/%3E%3C/g%3E%3C/svg%3E%0A";
|
|
88
|
+
Icon["IMX"] = "data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 139 113' style='enable-background:new 0 0 139 113;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bclip-path:url(%23SVGID_00000053504646934646330740000009134454895836103350_);%7D .st1%7Bfill:%2317B5CB;%7D%0A%3C/style%3E%3Cg%3E%3Cdefs%3E%3Crect id='SVGID_1_' width='139' height='113'/%3E%3C/defs%3E%3CclipPath id='SVGID_00000035518931339590433170000002358037249938198420_'%3E%3Cuse xlink:href='%23SVGID_1_' style='overflow:visible;'/%3E%3C/clipPath%3E%3Cg style='clip-path:url(%23SVGID_00000035518931339590433170000002358037249938198420_);'%3E%3Cpath class='st1' d='M124.1,0h14.6L79.5,67.6c-1.5,1.7-1.6,4.3-0.1,6.1l34.1,39.7H98.3L66.8,76.6l-1.6-2c-1.5-1.7-1.4-4.4,0.1-6.1 L124.1,0z'/%3E%3Cpath class='st1' d='M91.2,73.7c-1-1.1-1.3-2.7-1-4.1c0.3-0.8,0.8-1.6,1.4-2.2l3.9-4.3l43.5,50.3h-13.8 C125.2,113.4,99.7,83.6,91.2,73.7z'/%3E%3Cpath class='st1' d='M15.2,113.4H0l46.6-53.9c1.5-1.7,1.5-4.3,0-6L0.4,0H15l46.5,53.9c1.2,1.6,1.4,3.9,0.1,5.4 C49.4,73.4,15.2,113.4,15.2,113.4z'/%3E%3Cpath class='st1' d='M40.6,0h-14l43.1,49.9c0,0,0.1-0.1,4.9-5.8c1.3-1.5,1.6-3.4,0.1-4.9C65.7,30,40.6,0,40.6,0z'/%3E%3Cpath class='st1' d='M82.6,34.8L112.5,0H98.3L82.7,18.2l-4.5,5.3c-1.5,1.7-1.6,4.3-0.1,6.1C79.2,30.9,82.6,34.8,82.6,34.8z'/%3E%3Cpath class='st1' d='M56.6,78.6l-29.9,34.8h14.1l15.6-18.2l4.5-5.3c1.5-1.7,1.6-4.3,0.1-6.1C59.9,82.5,56.6,78.6,56.6,78.6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A";
|
|
89
|
+
})($efe60cea83bfc4e8$export$f04a61298a47a40f || ($efe60cea83bfc4e8$export$f04a61298a47a40f = {}));
|
|
95
90
|
|
|
96
91
|
function $parcel$export(e, n, v, s) {
|
|
97
92
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|