@imtbl/sdk 0.1.7-alpha.1 → 0.1.7-alpha.3
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/blockchain-data.d.ts +1518 -0
- package/dist/blockchain-data.js +1258 -0
- package/dist/browser/checkout.js +2 -2
- package/dist/checkout_sdk.d.ts +112 -131
- package/dist/checkout_sdk.js +47 -29
- package/dist/checkout_widgets.d.ts +102 -159
- package/dist/checkout_widgets.js +32 -35
- package/dist/erc20.d.ts +3 -0
- package/dist/erc20.js +4 -0
- package/dist/erc721-permissioned-mintable.d.ts +3 -0
- package/dist/erc721-permissioned-mintable.js +4 -0
- package/dist/immutablex_client.js +15 -6
- package/dist/index.cjs +1482 -199
- package/dist/index.d.ts +6747 -6424
- package/dist/index.js +1488 -207
- package/dist/orderbook.d.ts +13 -6
- package/dist/orderbook.js +62 -41
- package/dist/passport.d.ts +2 -1154
- package/dist/passport.js +93 -104
- package/package.json +17 -1
|
@@ -14947,34 +14947,6 @@ declare enum Environment {
|
|
|
14947
14947
|
SANDBOX = "sandbox"
|
|
14948
14948
|
}
|
|
14949
14949
|
|
|
14950
|
-
/**
|
|
14951
|
-
* Interface representing token information.
|
|
14952
|
-
* @property {string} name - The token name.
|
|
14953
|
-
* @property {string} symbol - The token symbol.
|
|
14954
|
-
* @property {number} decimals - The token decimals.
|
|
14955
|
-
* @property {string} [address] - The token contract address.
|
|
14956
|
-
* @property {string} [icon] - The token icon URL/data:image.
|
|
14957
|
-
*/
|
|
14958
|
-
interface TokenInfo {
|
|
14959
|
-
name: string;
|
|
14960
|
-
symbol: string;
|
|
14961
|
-
decimals: number;
|
|
14962
|
-
address?: string;
|
|
14963
|
-
icon?: string;
|
|
14964
|
-
}
|
|
14965
|
-
/**
|
|
14966
|
-
* Interface representing the information of a network.
|
|
14967
|
-
* @property {string} name - The name of the network.
|
|
14968
|
-
* @property {number} chainId - The ID of the network.
|
|
14969
|
-
* @property {TokenInfo} nativeCurrency - The info of the network's native currency.
|
|
14970
|
-
* @property {boolean} isSupported - Flag indicating if the network is supported by the application.
|
|
14971
|
-
*/
|
|
14972
|
-
interface NetworkInfo {
|
|
14973
|
-
name: string;
|
|
14974
|
-
chainId: number;
|
|
14975
|
-
nativeCurrency: TokenInfo;
|
|
14976
|
-
isSupported: boolean;
|
|
14977
|
-
}
|
|
14978
14950
|
/**
|
|
14979
14951
|
* Enum representing the list of default supported providers.
|
|
14980
14952
|
*/
|
|
@@ -14983,33 +14955,73 @@ declare enum ConnectionProviders {
|
|
|
14983
14955
|
}
|
|
14984
14956
|
|
|
14985
14957
|
/**
|
|
14986
|
-
* Enum
|
|
14958
|
+
* Enum of possible Bridge Widget event types.
|
|
14987
14959
|
*/
|
|
14988
|
-
declare enum
|
|
14989
|
-
|
|
14990
|
-
|
|
14991
|
-
|
|
14992
|
-
IMTBL_BRIDGE_WIDGET_EVENT = "imtbl-bridge-widget",
|
|
14993
|
-
IMTBL_BUY_WIDGET_EVENT = "imtbl-buy-widget",
|
|
14994
|
-
IMTBL_ONRAMP_WIDGET_EVENT = "imtbl-onramp-widget"
|
|
14960
|
+
declare enum BridgeEventType {
|
|
14961
|
+
CLOSE_WIDGET = "close-widget",
|
|
14962
|
+
SUCCESS = "success",
|
|
14963
|
+
FAILURE = "failure"
|
|
14995
14964
|
}
|
|
14996
14965
|
/**
|
|
14997
|
-
*
|
|
14966
|
+
* Type representing a Bridge Widget event with type SUCCESS
|
|
14967
|
+
* @property {number} timestamp - The UNIX timestamp (in milliseconds) when the event occurred.
|
|
14998
14968
|
*/
|
|
14999
|
-
|
|
14969
|
+
type BridgeSuccess = {
|
|
14970
|
+
timestamp: number;
|
|
14971
|
+
};
|
|
14972
|
+
/**
|
|
14973
|
+
* Type representing a Bridge Widget event with type FAILURE
|
|
14974
|
+
* @property {string} reason - The reason for the failure.
|
|
14975
|
+
* @property {number} timestamp - The UNIX timestamp (in milliseconds) when the event occurred.
|
|
14976
|
+
*/
|
|
14977
|
+
type BridgeFailed = {
|
|
14978
|
+
reason: string;
|
|
14979
|
+
timestamp: number;
|
|
14980
|
+
};
|
|
14981
|
+
/**
|
|
14982
|
+
* Enum representing possible Buy Widget event types.
|
|
14983
|
+
*/
|
|
14984
|
+
declare enum BuyEventType {
|
|
14985
|
+
CLOSE_WIDGET = "close-widget",
|
|
15000
14986
|
SUCCESS = "success",
|
|
15001
14987
|
FAILURE = "failure",
|
|
15002
|
-
|
|
14988
|
+
NOT_CONNECTED = "not_connected"
|
|
15003
14989
|
}
|
|
15004
14990
|
/**
|
|
15005
|
-
*
|
|
15006
|
-
* @property {BuyEventType} type - The type of the event.
|
|
15007
|
-
* @property {T} data - The data contained in the event.
|
|
14991
|
+
* Type representing a Buy Widget event with type CLOSE.
|
|
15008
14992
|
*/
|
|
15009
|
-
type
|
|
15010
|
-
|
|
15011
|
-
|
|
14993
|
+
type BuyClose = {};
|
|
14994
|
+
/**
|
|
14995
|
+
* Type representing a Buy Widget event with type NOT_CONNECTED.
|
|
14996
|
+
* @property {string} providerPreference - The preferred provider used for the connection within the Buy Widget.
|
|
14997
|
+
*/
|
|
14998
|
+
type BuyNotConnected = {
|
|
14999
|
+
providerPreference: string;
|
|
15000
|
+
};
|
|
15001
|
+
/**
|
|
15002
|
+
* Type representing a Buy Widget event with type SUCCESS.
|
|
15003
|
+
* @property {number} timestamp - The timestamp of the successful buy.
|
|
15004
|
+
*/
|
|
15005
|
+
type BuySuccess = {
|
|
15006
|
+
timestamp: number;
|
|
15007
|
+
};
|
|
15008
|
+
/**
|
|
15009
|
+
* Type representing a Buy Widget event with type FAILURE.
|
|
15010
|
+
* @property {string} reason - The reason why the buy failed.
|
|
15011
|
+
* @property {number} timestamp - The timestamp of the failed buy.
|
|
15012
|
+
*/
|
|
15013
|
+
type BuyFailed = {
|
|
15014
|
+
reason: string;
|
|
15015
|
+
timestamp: number;
|
|
15012
15016
|
};
|
|
15017
|
+
/**
|
|
15018
|
+
* Enum representing possible Connect Widget event types.
|
|
15019
|
+
*/
|
|
15020
|
+
declare enum ConnectEventType {
|
|
15021
|
+
CLOSE_WIDGET = "close-widget",
|
|
15022
|
+
SUCCESS = "success",
|
|
15023
|
+
FAILURE = "failure"
|
|
15024
|
+
}
|
|
15013
15025
|
/**
|
|
15014
15026
|
* Type representing a Connect Widget event with type SUCCESS.
|
|
15015
15027
|
* @property {ConnectionProviders} providerPreference - The user's preferred connection provider.
|
|
@@ -15024,72 +15036,40 @@ type ConnectionSuccess = {
|
|
|
15024
15036
|
type ConnectionFailed = {
|
|
15025
15037
|
reason: string;
|
|
15026
15038
|
};
|
|
15027
|
-
|
|
15028
|
-
|
|
15029
|
-
|
|
15030
|
-
declare enum WalletEventType {
|
|
15031
|
-
CLOSE_WIDGET = "close-widget",
|
|
15032
|
-
NETWORK_SWITCH = "network-switch",
|
|
15033
|
-
ADD_COINS = "add-coins",
|
|
15039
|
+
declare enum OrchestrationEventType {
|
|
15040
|
+
REQUEST_CONNECT = "request-connect",
|
|
15041
|
+
REQUEST_WALLET = "request-wallet",
|
|
15034
15042
|
REQUEST_SWAP = "request-swap",
|
|
15035
15043
|
REQUEST_BRIDGE = "request-bridge",
|
|
15036
|
-
REQUEST_ONRAMP = "request-onramp"
|
|
15037
|
-
DISCONNECT_WALLET = "disconnect-wallet"
|
|
15044
|
+
REQUEST_ONRAMP = "request-onramp"
|
|
15038
15045
|
}
|
|
15039
|
-
|
|
15040
|
-
|
|
15041
|
-
* @property {string} network - The name of the selected network.
|
|
15042
|
-
* @property {number} chainId - The chain ID of the selected network.
|
|
15043
|
-
*/
|
|
15044
|
-
type WalletNetworkSwitchEvent = {
|
|
15045
|
-
network: string;
|
|
15046
|
-
chainId: number;
|
|
15046
|
+
type RequestConnectEvent = {
|
|
15047
|
+
providerPreference: string;
|
|
15047
15048
|
};
|
|
15048
|
-
type
|
|
15049
|
-
|
|
15050
|
-
token?: TokenInfo;
|
|
15051
|
-
tokenAmount?: string;
|
|
15049
|
+
type RequestWalletEvent = {
|
|
15050
|
+
providerPreference: string;
|
|
15052
15051
|
};
|
|
15053
|
-
type
|
|
15052
|
+
type RequestSwapEvent = {
|
|
15054
15053
|
fromTokenAddress: string;
|
|
15055
15054
|
toTokenAddress: string;
|
|
15056
15055
|
amount: string;
|
|
15057
15056
|
};
|
|
15058
|
-
type
|
|
15059
|
-
fromNetwork: string;
|
|
15057
|
+
type RequestBridgeEvent = {
|
|
15060
15058
|
tokenAddress: string;
|
|
15061
15059
|
amount: string;
|
|
15062
15060
|
};
|
|
15063
|
-
type
|
|
15061
|
+
type RequestOnrampEvent = {
|
|
15064
15062
|
tokenAddress: string;
|
|
15065
15063
|
amount: string;
|
|
15066
15064
|
};
|
|
15067
|
-
type WalletDisconnectWalletEvent = {};
|
|
15068
|
-
/**
|
|
15069
|
-
* Represents an event object emitted by the Wallet Widget.
|
|
15070
|
-
* @property {WalletEventType} type - The type of the event.
|
|
15071
|
-
* @property {T} data - The data contained in the event.
|
|
15072
|
-
*/
|
|
15073
|
-
type WalletEvent<T> = {
|
|
15074
|
-
type: WalletEventType;
|
|
15075
|
-
data: T;
|
|
15076
|
-
};
|
|
15077
|
-
/**
|
|
15078
|
-
* Represents an event object emitted by the Swap Widget.
|
|
15079
|
-
* @property {SwapEventType} type - The type of the event.
|
|
15080
|
-
* @property {T} data - The data contained in the event.
|
|
15081
|
-
*/
|
|
15082
|
-
type SwapEvent<T> = {
|
|
15083
|
-
type: SwapEventType;
|
|
15084
|
-
data: T;
|
|
15085
|
-
};
|
|
15086
15065
|
/**
|
|
15087
15066
|
* Enum representing possible Swap Widget event types.
|
|
15088
15067
|
*/
|
|
15089
15068
|
declare enum SwapEventType {
|
|
15069
|
+
CLOSE_WIDGET = "close-widget",
|
|
15090
15070
|
SUCCESS = "success",
|
|
15091
15071
|
FAILURE = "failure",
|
|
15092
|
-
|
|
15072
|
+
REJECTED = "rejected"
|
|
15093
15073
|
}
|
|
15094
15074
|
/**
|
|
15095
15075
|
* Type representing a Swap Widget with type SUCCESS.
|
|
@@ -15104,93 +15084,56 @@ type SwapSuccess = {
|
|
|
15104
15084
|
* @property {number} timestamp - The timestamp of the failed swap.
|
|
15105
15085
|
*/
|
|
15106
15086
|
type SwapFailed = {
|
|
15107
|
-
reason
|
|
15087
|
+
reason?: string;
|
|
15108
15088
|
timestamp: number;
|
|
15109
15089
|
};
|
|
15110
15090
|
/**
|
|
15111
|
-
*
|
|
15112
|
-
* @property {
|
|
15113
|
-
* @property {
|
|
15091
|
+
* Type representing a Swap Widget with type FAILURE.
|
|
15092
|
+
* @property {string} reason - The reason why the swap failed.
|
|
15093
|
+
* @property {number} timestamp - The timestamp of the failed swap.
|
|
15114
15094
|
*/
|
|
15115
|
-
type
|
|
15116
|
-
|
|
15117
|
-
|
|
15095
|
+
type SwapRejected = {
|
|
15096
|
+
reason?: string;
|
|
15097
|
+
timestamp: number;
|
|
15118
15098
|
};
|
|
15119
15099
|
/**
|
|
15120
|
-
* Enum
|
|
15100
|
+
* Enum representing possible Wallet Widget event types.
|
|
15121
15101
|
*/
|
|
15122
|
-
declare enum
|
|
15102
|
+
declare enum WalletEventType {
|
|
15123
15103
|
CLOSE_WIDGET = "close-widget",
|
|
15124
|
-
|
|
15125
|
-
|
|
15104
|
+
NETWORK_SWITCH = "network-switch",
|
|
15105
|
+
DISCONNECT_WALLET = "disconnect-wallet"
|
|
15126
15106
|
}
|
|
15127
15107
|
/**
|
|
15128
|
-
* Type representing
|
|
15129
|
-
* @property {
|
|
15130
|
-
|
|
15131
|
-
type BridgeSuccess = {
|
|
15132
|
-
timestamp: number;
|
|
15133
|
-
};
|
|
15134
|
-
/**
|
|
15135
|
-
* Type representing a Bridge Widget event with type FAILURE
|
|
15136
|
-
* @property {string} reason - The reason for the failure.
|
|
15137
|
-
* @property {number} timestamp - The UNIX timestamp (in milliseconds) when the event occurred.
|
|
15138
|
-
*/
|
|
15139
|
-
type BridgeFailed = {
|
|
15140
|
-
reason: string;
|
|
15141
|
-
timestamp: number;
|
|
15142
|
-
};
|
|
15143
|
-
/**
|
|
15144
|
-
* Represents an event object emitted by the Buy Widget.
|
|
15145
|
-
* @property {BuyEventType} type - The type of the event.
|
|
15146
|
-
* @property {T} data - The data contained in the event.
|
|
15108
|
+
* Type representing the data emitted by the network switch event.
|
|
15109
|
+
* @property {string} network - The name of the selected network.
|
|
15110
|
+
* @property {number} chainId - The chain ID of the selected network.
|
|
15147
15111
|
*/
|
|
15148
|
-
type
|
|
15149
|
-
|
|
15150
|
-
|
|
15112
|
+
type WalletNetworkSwitchEvent = {
|
|
15113
|
+
network: string;
|
|
15114
|
+
chainId: number;
|
|
15151
15115
|
};
|
|
15116
|
+
type WalletDisconnectWalletEvent = {};
|
|
15152
15117
|
/**
|
|
15153
|
-
* Enum representing
|
|
15118
|
+
* Enum representing the events emitted by the widgets.
|
|
15154
15119
|
*/
|
|
15155
|
-
declare enum
|
|
15156
|
-
|
|
15157
|
-
|
|
15158
|
-
|
|
15159
|
-
|
|
15120
|
+
declare enum IMTBLWidgetEvents {
|
|
15121
|
+
IMTBL_CONNECT_WIDGET_EVENT = "imtbl-connect-widget",
|
|
15122
|
+
IMTBL_WALLET_WIDGET_EVENT = "imtbl-wallet-widget",
|
|
15123
|
+
IMTBL_SWAP_WIDGET_EVENT = "imtbl-swap-widget",
|
|
15124
|
+
IMTBL_BRIDGE_WIDGET_EVENT = "imtbl-bridge-widget",
|
|
15125
|
+
IMTBL_BUY_WIDGET_EVENT = "imtbl-buy-widget",
|
|
15126
|
+
IMTBL_ONRAMP_WIDGET_EVENT = "imtbl-onramp-widget"
|
|
15160
15127
|
}
|
|
15161
15128
|
/**
|
|
15162
|
-
*
|
|
15163
|
-
|
|
15164
|
-
|
|
15165
|
-
/**
|
|
15166
|
-
* Type representing a Buy Widget event with type NOT_CONNECTED.
|
|
15167
|
-
* @property {string} providerPreference - The preferred provider used for the connection within the Buy Widget.
|
|
15168
|
-
*/
|
|
15169
|
-
type BuyNotConnected = {
|
|
15170
|
-
providerPreference: string;
|
|
15171
|
-
};
|
|
15172
|
-
/**
|
|
15173
|
-
* Type representing a Buy Widget event with type SUCCESS.
|
|
15174
|
-
* @property {number} timestamp - The timestamp of the successful buy.
|
|
15175
|
-
*/
|
|
15176
|
-
type BuySuccess = {
|
|
15177
|
-
timestamp: number;
|
|
15178
|
-
};
|
|
15179
|
-
/**
|
|
15180
|
-
* Type representing a Buy Widget event with type FAILURE.
|
|
15181
|
-
* @property {string} reason - The reason why the buy failed.
|
|
15182
|
-
* @property {number} timestamp - The timestamp of the failed buy.
|
|
15129
|
+
* Represents an event object emitted by any of the widgets.
|
|
15130
|
+
* @property {OrchestrationEventType | ConnectEventType | WalletEventType | SwapEventType | BridgeEventType | BuyEventType} type - The type of the event.
|
|
15131
|
+
* @property {T} data - The data contained in the event.
|
|
15183
15132
|
*/
|
|
15184
|
-
type
|
|
15185
|
-
|
|
15186
|
-
timestamp: number;
|
|
15187
|
-
};
|
|
15188
|
-
type OnRampEvent<T> = {
|
|
15189
|
-
type: OnRampEventType;
|
|
15133
|
+
type WidgetEvent<T> = {
|
|
15134
|
+
type: OrchestrationEventType | ConnectEventType | WalletEventType | SwapEventType | BridgeEventType | BuyEventType;
|
|
15190
15135
|
data: T;
|
|
15191
15136
|
};
|
|
15192
|
-
declare enum OnRampEventType {
|
|
15193
|
-
}
|
|
15194
15137
|
declare global {
|
|
15195
15138
|
interface Window {
|
|
15196
15139
|
ImtblCheckoutWidgetConfig: any;
|
|
@@ -15482,4 +15425,4 @@ declare function UpdateConfig(config: CheckoutWidgetsConfig): void;
|
|
|
15482
15425
|
*/
|
|
15483
15426
|
declare function SetProvider(tagName: CheckoutWidgetTagNames, provider: Web3Provider | null): void;
|
|
15484
15427
|
|
|
15485
|
-
export {
|
|
15428
|
+
export { BridgeEventType, BridgeFailed, BridgeReact, BridgeReactProps, BridgeSuccess, BuyClose, BuyEventType, BuyFailed, BuyNotConnected, BuyReact, BuyReactProps, BuySuccess, CheckoutWidgetTagNames, CheckoutWidgets, CheckoutWidgetsConfig, ConnectEventType, ConnectReact, ConnectReactProps, ConnectionFailed, ConnectionSuccess, ExampleReact, ExampleReactProps, IMTBLWidgetEvents, ImtblBridgeProps, ImtblBuyProps, ImtblConnectProps, ImtblExampleProps, ImtblInnerWidgetExampleProps, ImtblOuterWidgetExampleProps, ImtblSwapProps, ImtblTransitionExampleProps, ImtblWalletProps, Network, OrchestrationEventType, RequestBridgeEvent, RequestConnectEvent, RequestOnrampEvent, RequestSwapEvent, RequestWalletEvent, SetProvider, SwapEventType, SwapFailed, SwapReact, SwapReactProps, SwapRejected, SwapSuccess, UpdateConfig, WalletDisconnectWalletEvent, WalletEventType, WalletNetworkSwitchEvent, WalletReact, WalletReactProps, WidgetEvent, WidgetTheme };
|
package/dist/checkout_widgets.js
CHANGED
|
@@ -14,9 +14,7 @@ function $parcel$export(e, n, v, s) {
|
|
|
14
14
|
var $207ed853f11d19d5$exports = {};
|
|
15
15
|
|
|
16
16
|
$parcel$export($207ed853f11d19d5$exports, "IMTBLWidgetEvents", () => $207ed853f11d19d5$export$5a0ace85cae72d45);
|
|
17
|
-
|
|
18
|
-
* Enum representing the events emitted by the widgets.
|
|
19
|
-
*/ let $207ed853f11d19d5$export$5a0ace85cae72d45;
|
|
17
|
+
let $207ed853f11d19d5$export$5a0ace85cae72d45;
|
|
20
18
|
(function(IMTBLWidgetEvents) {
|
|
21
19
|
IMTBLWidgetEvents["IMTBL_CONNECT_WIDGET_EVENT"] = "imtbl-connect-widget";
|
|
22
20
|
IMTBLWidgetEvents["IMTBL_WALLET_WIDGET_EVENT"] = "imtbl-wallet-widget";
|
|
@@ -32,23 +30,21 @@ var $a85ecdbd885c58ad$exports = {};
|
|
|
32
30
|
$parcel$export($a85ecdbd885c58ad$exports, "ConnectEventType", () => $a85ecdbd885c58ad$export$e72e7f9969a47dd3);
|
|
33
31
|
let $a85ecdbd885c58ad$export$e72e7f9969a47dd3;
|
|
34
32
|
(function(ConnectEventType) {
|
|
33
|
+
ConnectEventType["CLOSE_WIDGET"] = "close-widget";
|
|
35
34
|
ConnectEventType["SUCCESS"] = "success";
|
|
36
35
|
ConnectEventType["FAILURE"] = "failure";
|
|
37
|
-
ConnectEventType["CLOSE_WIDGET"] = "close-widget";
|
|
38
36
|
})($a85ecdbd885c58ad$export$e72e7f9969a47dd3 || ($a85ecdbd885c58ad$export$e72e7f9969a47dd3 = {}));
|
|
39
37
|
|
|
40
38
|
|
|
41
39
|
var $77b6aac5c353d4a9$exports = {};
|
|
42
40
|
|
|
43
41
|
$parcel$export($77b6aac5c353d4a9$exports, "WalletEventType", () => $77b6aac5c353d4a9$export$d9be06b70b28c742);
|
|
44
|
-
|
|
42
|
+
/**
|
|
43
|
+
* Enum representing possible Wallet Widget event types.
|
|
44
|
+
*/ let $77b6aac5c353d4a9$export$d9be06b70b28c742;
|
|
45
45
|
(function(WalletEventType) {
|
|
46
46
|
WalletEventType["CLOSE_WIDGET"] = "close-widget";
|
|
47
47
|
WalletEventType["NETWORK_SWITCH"] = "network-switch";
|
|
48
|
-
WalletEventType["ADD_COINS"] = "add-coins";
|
|
49
|
-
WalletEventType["REQUEST_SWAP"] = "request-swap";
|
|
50
|
-
WalletEventType["REQUEST_BRIDGE"] = "request-bridge";
|
|
51
|
-
WalletEventType["REQUEST_ONRAMP"] = "request-onramp";
|
|
52
48
|
WalletEventType["DISCONNECT_WALLET"] = "disconnect-wallet";
|
|
53
49
|
})($77b6aac5c353d4a9$export$d9be06b70b28c742 || ($77b6aac5c353d4a9$export$d9be06b70b28c742 = {}));
|
|
54
50
|
|
|
@@ -57,14 +53,13 @@ var $53d219e7f6bf0cd6$exports = {};
|
|
|
57
53
|
|
|
58
54
|
$parcel$export($53d219e7f6bf0cd6$exports, "SwapEventType", () => $53d219e7f6bf0cd6$export$140a49745ab55563);
|
|
59
55
|
/**
|
|
60
|
-
*
|
|
61
|
-
* @property {SwapEventType} type - The type of the event.
|
|
62
|
-
* @property {T} data - The data contained in the event.
|
|
56
|
+
* Enum representing possible Swap Widget event types.
|
|
63
57
|
*/ let $53d219e7f6bf0cd6$export$140a49745ab55563;
|
|
64
58
|
(function(SwapEventType) {
|
|
59
|
+
SwapEventType["CLOSE_WIDGET"] = "close-widget";
|
|
65
60
|
SwapEventType["SUCCESS"] = "success";
|
|
66
61
|
SwapEventType["FAILURE"] = "failure";
|
|
67
|
-
SwapEventType["
|
|
62
|
+
SwapEventType["REJECTED"] = "rejected";
|
|
68
63
|
})($53d219e7f6bf0cd6$export$140a49745ab55563 || ($53d219e7f6bf0cd6$export$140a49745ab55563 = {}));
|
|
69
64
|
|
|
70
65
|
|
|
@@ -72,9 +67,7 @@ var $15cc9e120aa6f3bf$exports = {};
|
|
|
72
67
|
|
|
73
68
|
$parcel$export($15cc9e120aa6f3bf$exports, "BridgeEventType", () => $15cc9e120aa6f3bf$export$d1bfa21f7c76447a);
|
|
74
69
|
/**
|
|
75
|
-
*
|
|
76
|
-
* @property {BridgeEventType} type - The type of the event.
|
|
77
|
-
* @property {T} data - The data associated with the event.
|
|
70
|
+
* Enum of possible Bridge Widget event types.
|
|
78
71
|
*/ let $15cc9e120aa6f3bf$export$d1bfa21f7c76447a;
|
|
79
72
|
(function(BridgeEventType) {
|
|
80
73
|
BridgeEventType["CLOSE_WIDGET"] = "close-widget";
|
|
@@ -87,33 +80,37 @@ var $98cbcca465beec95$exports = {};
|
|
|
87
80
|
|
|
88
81
|
$parcel$export($98cbcca465beec95$exports, "BuyEventType", () => $98cbcca465beec95$export$90db5fe1be5993c1);
|
|
89
82
|
/**
|
|
90
|
-
*
|
|
91
|
-
* @property {BuyEventType} type - The type of the event.
|
|
92
|
-
* @property {T} data - The data contained in the event.
|
|
83
|
+
* Enum representing possible Buy Widget event types.
|
|
93
84
|
*/ let $98cbcca465beec95$export$90db5fe1be5993c1;
|
|
94
85
|
(function(BuyEventType) {
|
|
86
|
+
BuyEventType["CLOSE_WIDGET"] = "close-widget";
|
|
95
87
|
BuyEventType["SUCCESS"] = "success";
|
|
96
88
|
BuyEventType["FAILURE"] = "failure";
|
|
97
89
|
BuyEventType["NOT_CONNECTED"] = "not_connected";
|
|
98
|
-
BuyEventType["CLOSE"] = "close";
|
|
99
90
|
})($98cbcca465beec95$export$90db5fe1be5993c1 || ($98cbcca465beec95$export$90db5fe1be5993c1 = {}));
|
|
100
91
|
|
|
101
92
|
|
|
102
|
-
var $
|
|
93
|
+
var $ad06b030b1a3ba34$exports = {};
|
|
103
94
|
|
|
104
|
-
$parcel$export($
|
|
105
|
-
let $
|
|
106
|
-
|
|
95
|
+
$parcel$export($ad06b030b1a3ba34$exports, "OrchestrationEventType", () => $ad06b030b1a3ba34$export$b80d2daf830437b9);
|
|
96
|
+
let $ad06b030b1a3ba34$export$b80d2daf830437b9;
|
|
97
|
+
(function(OrchestrationEventType) {
|
|
98
|
+
OrchestrationEventType["REQUEST_CONNECT"] = "request-connect";
|
|
99
|
+
OrchestrationEventType["REQUEST_WALLET"] = "request-wallet";
|
|
100
|
+
OrchestrationEventType["REQUEST_SWAP"] = "request-swap";
|
|
101
|
+
OrchestrationEventType["REQUEST_BRIDGE"] = "request-bridge";
|
|
102
|
+
OrchestrationEventType["REQUEST_ONRAMP"] = "request-onramp";
|
|
103
|
+
})($ad06b030b1a3ba34$export$b80d2daf830437b9 || ($ad06b030b1a3ba34$export$b80d2daf830437b9 = {}));
|
|
107
104
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
108
105
|
|
|
109
|
-
var $
|
|
106
|
+
var $045213b18e9f1f94$exports = {};
|
|
110
107
|
|
|
111
|
-
$parcel$export($
|
|
112
|
-
$parcel$export($
|
|
113
|
-
$parcel$export($
|
|
108
|
+
$parcel$export($045213b18e9f1f94$exports, "Network", () => $045213b18e9f1f94$export$95be4ae94445245a);
|
|
109
|
+
$parcel$export($045213b18e9f1f94$exports, "WidgetTheme", () => $045213b18e9f1f94$export$c88931fdc51854eb);
|
|
110
|
+
$parcel$export($045213b18e9f1f94$exports, "CheckoutWidgetTagNames", () => $045213b18e9f1f94$export$75be0f6af9650f2c);
|
|
114
111
|
/**
|
|
115
112
|
* Enum representing the networks supported by Checkout.
|
|
116
|
-
*/ let $
|
|
113
|
+
*/ let $045213b18e9f1f94$export$95be4ae94445245a;
|
|
117
114
|
(function(Network) {
|
|
118
115
|
Network["ETHEREUM"] = "Ethereum";
|
|
119
116
|
Network["SEPOLIA"] = "Sepolia";
|
|
@@ -121,14 +118,14 @@ $parcel$export($14d7a2bbb79e0dae$exports, "CheckoutWidgetTagNames", () => $14d7a
|
|
|
121
118
|
Network["IMTBL_ZKEVM_DEVNET"] = "Immutable zkEVM Devnet";
|
|
122
119
|
Network["POLYGON_ZKEVM_TESTNET"] = "Polygon zkEVM Testnet";
|
|
123
120
|
Network["POLYGON_ZKEVM"] = "Polygon zkEVM";
|
|
124
|
-
})($
|
|
125
|
-
let $
|
|
121
|
+
})($045213b18e9f1f94$export$95be4ae94445245a || ($045213b18e9f1f94$export$95be4ae94445245a = {}));
|
|
122
|
+
let $045213b18e9f1f94$export$c88931fdc51854eb;
|
|
126
123
|
(function(WidgetTheme) {
|
|
127
124
|
WidgetTheme["LIGHT"] = "light";
|
|
128
125
|
WidgetTheme["DARK"] = "dark";
|
|
129
126
|
WidgetTheme["CUSTOM"] = "custom";
|
|
130
|
-
})($
|
|
131
|
-
let $
|
|
127
|
+
})($045213b18e9f1f94$export$c88931fdc51854eb || ($045213b18e9f1f94$export$c88931fdc51854eb = {}));
|
|
128
|
+
let $045213b18e9f1f94$export$75be0f6af9650f2c;
|
|
132
129
|
(function(CheckoutWidgetTagNames) {
|
|
133
130
|
CheckoutWidgetTagNames["CONNECT"] = "imtbl-connect";
|
|
134
131
|
CheckoutWidgetTagNames["WALLET"] = "imtbl-wallet";
|
|
@@ -136,7 +133,7 @@ let $14d7a2bbb79e0dae$export$75be0f6af9650f2c;
|
|
|
136
133
|
CheckoutWidgetTagNames["BUY"] = "imtbl-buy";
|
|
137
134
|
CheckoutWidgetTagNames["BRIDGE"] = "imtbl-bridge";
|
|
138
135
|
CheckoutWidgetTagNames["EXAMPLE"] = "imtbl-example";
|
|
139
|
-
})($
|
|
136
|
+
})($045213b18e9f1f94$export$75be0f6af9650f2c || ($045213b18e9f1f94$export$75be0f6af9650f2c = {}));
|
|
140
137
|
|
|
141
138
|
|
|
142
139
|
var $1f969328e5988c99$exports = {};
|
|
@@ -281,4 +278,4 @@ function $430e3eda76fa4d5f$export$931068bc678f0d73(tagName, provider) {
|
|
|
281
278
|
attemptToSetProvider();
|
|
282
279
|
}
|
|
283
280
|
|
|
284
|
-
export { $15cc9e120aa6f3bf$export$d1bfa21f7c76447a as BridgeEventType, $1f969328e5988c99$export$30f61ebf204c69f6 as BridgeReact, $98cbcca465beec95$export$90db5fe1be5993c1 as BuyEventType, $f22931ca9e2f35b6$export$d13582032b79b401 as BuyReact, $
|
|
281
|
+
export { $15cc9e120aa6f3bf$export$d1bfa21f7c76447a as BridgeEventType, $1f969328e5988c99$export$30f61ebf204c69f6 as BridgeReact, $98cbcca465beec95$export$90db5fe1be5993c1 as BuyEventType, $f22931ca9e2f35b6$export$d13582032b79b401 as BuyReact, $045213b18e9f1f94$export$75be0f6af9650f2c as CheckoutWidgetTagNames, $430e3eda76fa4d5f$export$af210a0808087845 as CheckoutWidgets, $a85ecdbd885c58ad$export$e72e7f9969a47dd3 as ConnectEventType, $f2083cd30e2f5c56$export$49d62957f420a1e2 as ConnectReact, $d087956fd1002f80$export$fa517eee6594d26c as ExampleReact, $207ed853f11d19d5$export$5a0ace85cae72d45 as IMTBLWidgetEvents, $045213b18e9f1f94$export$95be4ae94445245a as Network, $ad06b030b1a3ba34$export$b80d2daf830437b9 as OrchestrationEventType, $430e3eda76fa4d5f$export$931068bc678f0d73 as SetProvider, $53d219e7f6bf0cd6$export$140a49745ab55563 as SwapEventType, $a4fbb8e3a6aeff58$export$971e031379577f4 as SwapReact, $430e3eda76fa4d5f$export$bf1548ba7e61c17f as UpdateConfig, $77b6aac5c353d4a9$export$d9be06b70b28c742 as WalletEventType, $89d55ace0f8f1c07$export$ceaac94f34dba154 as WalletReact, $045213b18e9f1f94$export$c88931fdc51854eb as WidgetTheme };
|
package/dist/erc20.d.ts
ADDED
package/dist/erc20.js
ADDED
|
@@ -8,24 +8,33 @@ var Environment;
|
|
|
8
8
|
})(Environment || (Environment = {}));
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* createImmutableXConfiguration to create a custom ImmutableXConfiguration
|
|
12
|
+
* other than the production and sandbox defined below.
|
|
12
13
|
*/
|
|
13
|
-
const
|
|
14
|
+
const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress, registrationContractAddress, }) => Config.createConfig({
|
|
15
|
+
basePath,
|
|
16
|
+
chainID,
|
|
17
|
+
coreContractAddress,
|
|
18
|
+
registrationContractAddress,
|
|
19
|
+
sdkVersion: 'ts-immutable-sdk-0.1.7-alpha.3',
|
|
20
|
+
});
|
|
21
|
+
/**
|
|
22
|
+
* Sets `sdkVersion` at the time of build
|
|
23
|
+
*/
|
|
24
|
+
const production = () => createImmutableXConfiguration({
|
|
14
25
|
basePath: 'https://api.x.immutable.com',
|
|
15
26
|
chainID: 1,
|
|
16
27
|
coreContractAddress: '0x5FDCCA53617f4d2b9134B29090C87D01058e27e9',
|
|
17
28
|
registrationContractAddress: '0x72a06bf2a1CE5e39cBA06c0CAb824960B587d64c',
|
|
18
|
-
sdkVersion: 'ts-immutable-sdk-0.1.7-alpha.1',
|
|
19
29
|
});
|
|
20
30
|
/**
|
|
21
|
-
*
|
|
31
|
+
* Sets `sdkVersion` at the time of build
|
|
22
32
|
*/
|
|
23
|
-
const sandbox = () =>
|
|
33
|
+
const sandbox = () => createImmutableXConfiguration({
|
|
24
34
|
basePath: 'https://api.sandbox.x.immutable.com',
|
|
25
35
|
chainID: 5,
|
|
26
36
|
coreContractAddress: '0x7917eDb51ecD6CdB3F9854c3cc593F33de10c623',
|
|
27
37
|
registrationContractAddress: '0x1C97Ada273C9A52253f463042f29117090Cd7D83',
|
|
28
|
-
sdkVersion: 'ts-immutable-sdk-0.1.7-alpha.1',
|
|
29
38
|
});
|
|
30
39
|
class ImxConfiguration {
|
|
31
40
|
immutableXConfig;
|