@imtbl/sdk 0.17.6 → 0.18.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/blockchain_data.js +1 -1
- package/dist/browser/checkout.js +2 -2
- package/dist/checkout_sdk.d.ts +29 -10
- package/dist/checkout_sdk.js +350 -59
- package/dist/checkout_widgets.d.ts +4 -5
- package/dist/checkout_widgets.js +17 -19
- package/dist/immutablex_client.js +1 -1
- package/dist/index.browser.js +15 -15
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +769 -107
- package/dist/index.d.ts +65 -14
- package/dist/index.js +771 -109
- package/dist/passport.d.ts +22 -1
- package/dist/passport.js +404 -31
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3468,7 +3468,7 @@ interface FeeData {
|
|
|
3468
3468
|
* @export
|
|
3469
3469
|
* @interface FeeToken
|
|
3470
3470
|
*/
|
|
3471
|
-
interface FeeToken {
|
|
3471
|
+
interface FeeToken$1 {
|
|
3472
3472
|
/**
|
|
3473
3473
|
*
|
|
3474
3474
|
* @type {FeeData}
|
|
@@ -3505,7 +3505,7 @@ declare type FeeTokenTypeEnum = typeof FeeTokenTypeEnum[keyof typeof FeeTokenTyp
|
|
|
3505
3505
|
* Details of the fee currency
|
|
3506
3506
|
* @export
|
|
3507
3507
|
*/
|
|
3508
|
-
declare type OrderFeeInfoToken = FeeToken;
|
|
3508
|
+
declare type OrderFeeInfoToken = FeeToken$1;
|
|
3509
3509
|
|
|
3510
3510
|
/**
|
|
3511
3511
|
* Immutable X API
|
|
@@ -13138,6 +13138,27 @@ declare class JsonRpcError extends Error {
|
|
|
13138
13138
|
constructor(code: ProviderErrorCode | RpcErrorCode, message: string);
|
|
13139
13139
|
}
|
|
13140
13140
|
|
|
13141
|
+
interface TypedDataPayload {
|
|
13142
|
+
types: {
|
|
13143
|
+
EIP712Domain: Array<{
|
|
13144
|
+
name: string;
|
|
13145
|
+
type: string;
|
|
13146
|
+
}>;
|
|
13147
|
+
[key: string]: Array<{
|
|
13148
|
+
name: string;
|
|
13149
|
+
type: string;
|
|
13150
|
+
}>;
|
|
13151
|
+
};
|
|
13152
|
+
domain: {
|
|
13153
|
+
name?: string;
|
|
13154
|
+
version?: string;
|
|
13155
|
+
chainId?: number;
|
|
13156
|
+
verifyingContract?: string;
|
|
13157
|
+
salt?: string;
|
|
13158
|
+
};
|
|
13159
|
+
primaryType: string;
|
|
13160
|
+
message: Record<string, any>;
|
|
13161
|
+
}
|
|
13141
13162
|
interface RequestArguments {
|
|
13142
13163
|
method: string;
|
|
13143
13164
|
params?: Array<any>;
|
|
@@ -13229,6 +13250,7 @@ declare const passport_d_ProviderEvent: typeof ProviderEvent;
|
|
|
13229
13250
|
type passport_d_RequestArguments = RequestArguments;
|
|
13230
13251
|
type passport_d_RpcErrorCode = RpcErrorCode;
|
|
13231
13252
|
declare const passport_d_RpcErrorCode: typeof RpcErrorCode;
|
|
13253
|
+
type passport_d_TypedDataPayload = TypedDataPayload;
|
|
13232
13254
|
type passport_d_UserProfile = UserProfile;
|
|
13233
13255
|
declare namespace passport_d {
|
|
13234
13256
|
export {
|
|
@@ -13249,6 +13271,7 @@ declare namespace passport_d {
|
|
|
13249
13271
|
passport_d_ProviderEvent as ProviderEvent,
|
|
13250
13272
|
passport_d_RequestArguments as RequestArguments,
|
|
13251
13273
|
passport_d_RpcErrorCode as RpcErrorCode,
|
|
13274
|
+
passport_d_TypedDataPayload as TypedDataPayload,
|
|
13252
13275
|
passport_d_UserProfile as UserProfile,
|
|
13253
13276
|
};
|
|
13254
13277
|
}
|
|
@@ -14663,6 +14686,16 @@ interface CheckConnectionResult {
|
|
|
14663
14686
|
isConnected: boolean;
|
|
14664
14687
|
walletAddress: string;
|
|
14665
14688
|
}
|
|
14689
|
+
interface OrderFee {
|
|
14690
|
+
amount: FeeToken | FeePercentage;
|
|
14691
|
+
recipient: string;
|
|
14692
|
+
}
|
|
14693
|
+
interface FeeToken {
|
|
14694
|
+
token: string;
|
|
14695
|
+
}
|
|
14696
|
+
interface FeePercentage {
|
|
14697
|
+
percentageDecimal: number;
|
|
14698
|
+
}
|
|
14666
14699
|
/**
|
|
14667
14700
|
* An enum representing the type of gas estimate.
|
|
14668
14701
|
* @enum {string}
|
|
@@ -14784,15 +14817,21 @@ interface NetworkFilter {
|
|
|
14784
14817
|
/**
|
|
14785
14818
|
* Interface representing the parameters for {@link Checkout.sell}
|
|
14786
14819
|
* @property {Web3Provider} provider - The provider to use for the sell.
|
|
14787
|
-
* @property {
|
|
14788
|
-
*
|
|
14789
|
-
* @property {BuyToken} buyToken - The token to buy the item with.
|
|
14820
|
+
* @property {Array<SellOrder>} orders - An array of sell orders to execute.
|
|
14821
|
+
* Only currently actions the first order in the array until we support batch processing.
|
|
14790
14822
|
*/
|
|
14791
14823
|
interface SellParams {
|
|
14792
14824
|
provider: Web3Provider;
|
|
14825
|
+
orders: Array<SellOrder>;
|
|
14826
|
+
}
|
|
14827
|
+
interface SellOrder {
|
|
14828
|
+
sellToken: SellToken;
|
|
14829
|
+
buyToken: BuyToken;
|
|
14830
|
+
makerFees?: Array<OrderFee>;
|
|
14831
|
+
}
|
|
14832
|
+
interface SellToken {
|
|
14793
14833
|
id: string;
|
|
14794
14834
|
collectionAddress: string;
|
|
14795
|
-
buyToken: BuyToken;
|
|
14796
14835
|
}
|
|
14797
14836
|
/**
|
|
14798
14837
|
* Interface representing the result of the sell
|
|
@@ -14853,7 +14892,7 @@ type BuyToken = NativeBuyToken | ERC20BuyToken;
|
|
|
14853
14892
|
*/
|
|
14854
14893
|
type NativeBuyToken = {
|
|
14855
14894
|
type: ItemType.NATIVE;
|
|
14856
|
-
amount:
|
|
14895
|
+
amount: string;
|
|
14857
14896
|
};
|
|
14858
14897
|
/**
|
|
14859
14898
|
* Represents a ERC20 buy token
|
|
@@ -14863,7 +14902,7 @@ type NativeBuyToken = {
|
|
|
14863
14902
|
*/
|
|
14864
14903
|
type ERC20BuyToken = {
|
|
14865
14904
|
type: ItemType.ERC20;
|
|
14866
|
-
amount:
|
|
14905
|
+
amount: string;
|
|
14867
14906
|
contractAddress: string;
|
|
14868
14907
|
};
|
|
14869
14908
|
/**
|
|
@@ -15061,7 +15100,8 @@ declare enum CheckoutErrorType {
|
|
|
15061
15100
|
EXECUTE_APPROVAL_TRANSACTION_ERROR = "EXECUTE_APPROVAL_TRANSACTION_ERROR",
|
|
15062
15101
|
EXECUTE_FULFILMENT_TRANSACTION_ERROR = "EXECUTE_FULFILMENT_TRANSACTION_ERROR",
|
|
15063
15102
|
SIGN_MESSAGE_ERROR = "SIGN_MESSAGE_ERROR",
|
|
15064
|
-
BRIDGE_GAS_ESTIMATE_ERROR = "BRIDGE_GAS_ESTIMATE_ERROR"
|
|
15103
|
+
BRIDGE_GAS_ESTIMATE_ERROR = "BRIDGE_GAS_ESTIMATE_ERROR",
|
|
15104
|
+
ORDER_FEE_ERROR = "ORDER_FEE_ERROR"
|
|
15065
15105
|
}
|
|
15066
15106
|
/**
|
|
15067
15107
|
* Represents an error object with a specific type, optional message, and optional data.
|
|
@@ -15197,6 +15237,8 @@ declare class Checkout {
|
|
|
15197
15237
|
/**
|
|
15198
15238
|
* Determines the requirements for performing a sell.
|
|
15199
15239
|
* @param {SellParams} params - The parameters for the sell.
|
|
15240
|
+
* Only currently actions the first order in the array until we support batch processing.
|
|
15241
|
+
* Only currently actions the first fee in the fees array of each order until we support multiple fees.
|
|
15200
15242
|
*/
|
|
15201
15243
|
sell(params: SellParams): Promise<void>;
|
|
15202
15244
|
/**
|
|
@@ -15256,6 +15298,8 @@ type checkout_sdk_d_DexConfig = DexConfig;
|
|
|
15256
15298
|
type checkout_sdk_d_ErrorType = ErrorType;
|
|
15257
15299
|
type checkout_sdk_d_ExchangeType = ExchangeType;
|
|
15258
15300
|
declare const checkout_sdk_d_ExchangeType: typeof ExchangeType;
|
|
15301
|
+
type checkout_sdk_d_FeePercentage = FeePercentage;
|
|
15302
|
+
type checkout_sdk_d_FeeToken = FeeToken;
|
|
15259
15303
|
type checkout_sdk_d_FiatRampParams = FiatRampParams;
|
|
15260
15304
|
type checkout_sdk_d_GasEstimateBridgeToL2Result = GasEstimateBridgeToL2Result;
|
|
15261
15305
|
type checkout_sdk_d_GasEstimateParams = GasEstimateParams;
|
|
@@ -15282,9 +15326,12 @@ type checkout_sdk_d_NetworkFilter = NetworkFilter;
|
|
|
15282
15326
|
type checkout_sdk_d_NetworkFilterTypes = NetworkFilterTypes;
|
|
15283
15327
|
declare const checkout_sdk_d_NetworkFilterTypes: typeof NetworkFilterTypes;
|
|
15284
15328
|
type checkout_sdk_d_NetworkInfo = NetworkInfo;
|
|
15329
|
+
type checkout_sdk_d_OrderFee = OrderFee;
|
|
15285
15330
|
type checkout_sdk_d_RemoteConfiguration = RemoteConfiguration;
|
|
15331
|
+
type checkout_sdk_d_SellOrder = SellOrder;
|
|
15286
15332
|
type checkout_sdk_d_SellParams = SellParams;
|
|
15287
15333
|
type checkout_sdk_d_SellResult = SellResult;
|
|
15334
|
+
type checkout_sdk_d_SellToken = SellToken;
|
|
15288
15335
|
type checkout_sdk_d_SendTransactionParams = SendTransactionParams;
|
|
15289
15336
|
type checkout_sdk_d_SendTransactionResult = SendTransactionResult;
|
|
15290
15337
|
type checkout_sdk_d_SmartCheckoutParams = SmartCheckoutParams;
|
|
@@ -15321,6 +15368,8 @@ declare namespace checkout_sdk_d {
|
|
|
15321
15368
|
checkout_sdk_d_DexConfig as DexConfig,
|
|
15322
15369
|
checkout_sdk_d_ErrorType as ErrorType,
|
|
15323
15370
|
checkout_sdk_d_ExchangeType as ExchangeType,
|
|
15371
|
+
checkout_sdk_d_FeePercentage as FeePercentage,
|
|
15372
|
+
checkout_sdk_d_FeeToken as FeeToken,
|
|
15324
15373
|
checkout_sdk_d_FiatRampParams as FiatRampParams,
|
|
15325
15374
|
checkout_sdk_d_GasEstimateBridgeToL2Result as GasEstimateBridgeToL2Result,
|
|
15326
15375
|
checkout_sdk_d_GasEstimateParams as GasEstimateParams,
|
|
@@ -15343,9 +15392,12 @@ declare namespace checkout_sdk_d {
|
|
|
15343
15392
|
checkout_sdk_d_NetworkFilter as NetworkFilter,
|
|
15344
15393
|
checkout_sdk_d_NetworkFilterTypes as NetworkFilterTypes,
|
|
15345
15394
|
checkout_sdk_d_NetworkInfo as NetworkInfo,
|
|
15395
|
+
checkout_sdk_d_OrderFee as OrderFee,
|
|
15346
15396
|
checkout_sdk_d_RemoteConfiguration as RemoteConfiguration,
|
|
15397
|
+
checkout_sdk_d_SellOrder as SellOrder,
|
|
15347
15398
|
checkout_sdk_d_SellParams as SellParams,
|
|
15348
15399
|
checkout_sdk_d_SellResult as SellResult,
|
|
15400
|
+
checkout_sdk_d_SellToken as SellToken,
|
|
15349
15401
|
checkout_sdk_d_SendTransactionParams as SendTransactionParams,
|
|
15350
15402
|
checkout_sdk_d_SendTransactionResult as SendTransactionResult,
|
|
15351
15403
|
checkout_sdk_d_SmartCheckoutParams as SmartCheckoutParams,
|
|
@@ -29792,8 +29844,7 @@ interface GlobalJSXIntrinsicElements extends JSX.IntrinsicElements {}
|
|
|
29792
29844
|
*/
|
|
29793
29845
|
declare enum WidgetTheme {
|
|
29794
29846
|
LIGHT = "light",
|
|
29795
|
-
DARK = "dark"
|
|
29796
|
-
CUSTOM = "custom"
|
|
29847
|
+
DARK = "dark"
|
|
29797
29848
|
}
|
|
29798
29849
|
/**
|
|
29799
29850
|
* Enum representing list of Checkout Widgets DOM tags.
|
|
@@ -29821,9 +29872,9 @@ declare enum CheckoutWidgetTagNames {
|
|
|
29821
29872
|
*/
|
|
29822
29873
|
type SemanticVersion = {
|
|
29823
29874
|
major: number;
|
|
29824
|
-
minor
|
|
29825
|
-
patch
|
|
29826
|
-
prerelease
|
|
29875
|
+
minor?: number;
|
|
29876
|
+
patch?: number;
|
|
29877
|
+
prerelease?: 'alpha';
|
|
29827
29878
|
build?: number;
|
|
29828
29879
|
};
|
|
29829
29880
|
/**
|