@imtbl/sdk 0.25.0 → 0.27.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/blockchain_data.d.ts +58 -0
- package/dist/blockchain_data.js +15 -1
- package/dist/browser/checkout.js +2 -2
- package/dist/checkout_sdk.d.ts +14 -33
- package/dist/checkout_sdk.js +55 -44
- package/dist/checkout_widgets.d.ts +14 -14
- package/dist/checkout_widgets.js +13 -13
- package/dist/immutablex_client.js +1 -1
- package/dist/index.browser.js +10 -10
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +70 -59
- package/dist/index.d.ts +129 -56
- package/dist/index.js +70 -59
- package/dist/passport.js +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1251,6 +1251,32 @@ interface Metadata {
|
|
|
1251
1251
|
'attributes': Array<NFTMetadataAttribute> | null;
|
|
1252
1252
|
}
|
|
1253
1253
|
|
|
1254
|
+
/**
|
|
1255
|
+
* Immutable zkEVM API
|
|
1256
|
+
* Immutable Multi Rollup API
|
|
1257
|
+
*
|
|
1258
|
+
* The version of the OpenAPI document: 1.0.0
|
|
1259
|
+
* Contact: support@immutable.com
|
|
1260
|
+
*
|
|
1261
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
1262
|
+
* https://openapi-generator.tech
|
|
1263
|
+
* Do not edit the class manually.
|
|
1264
|
+
*/
|
|
1265
|
+
|
|
1266
|
+
/**
|
|
1267
|
+
* Single metadata
|
|
1268
|
+
* @export
|
|
1269
|
+
* @interface GetMetadataResult
|
|
1270
|
+
*/
|
|
1271
|
+
interface GetMetadataResult {
|
|
1272
|
+
/**
|
|
1273
|
+
*
|
|
1274
|
+
* @type {Metadata}
|
|
1275
|
+
* @memberof GetMetadataResult
|
|
1276
|
+
*/
|
|
1277
|
+
'result': Metadata;
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1254
1280
|
/**
|
|
1255
1281
|
* Immutable zkEVM API
|
|
1256
1282
|
* Immutable Multi Rollup API
|
|
@@ -2352,6 +2378,31 @@ interface CollectionsApiRefreshCollectionMetadataRequest {
|
|
|
2352
2378
|
readonly refreshCollectionMetadataRequest: RefreshCollectionMetadataRequest;
|
|
2353
2379
|
}
|
|
2354
2380
|
|
|
2381
|
+
/**
|
|
2382
|
+
* Request parameters for getMetadata operation in MetadataApi.
|
|
2383
|
+
* @export
|
|
2384
|
+
* @interface MetadataApiGetMetadataRequest
|
|
2385
|
+
*/
|
|
2386
|
+
interface MetadataApiGetMetadataRequest {
|
|
2387
|
+
/**
|
|
2388
|
+
* The name of chain
|
|
2389
|
+
* @type {string}
|
|
2390
|
+
* @memberof MetadataApiGetMetadata
|
|
2391
|
+
*/
|
|
2392
|
+
readonly chainName: string;
|
|
2393
|
+
/**
|
|
2394
|
+
* The address of metadata contract
|
|
2395
|
+
* @type {string}
|
|
2396
|
+
* @memberof MetadataApiGetMetadata
|
|
2397
|
+
*/
|
|
2398
|
+
readonly contractAddress: string;
|
|
2399
|
+
/**
|
|
2400
|
+
* The id of the metadata
|
|
2401
|
+
* @type {string}
|
|
2402
|
+
* @memberof MetadataApiGetMetadata
|
|
2403
|
+
*/
|
|
2404
|
+
readonly metadataId: string;
|
|
2405
|
+
}
|
|
2355
2406
|
/**
|
|
2356
2407
|
* Request parameters for listMetadata operation in MetadataApi.
|
|
2357
2408
|
* @export
|
|
@@ -2875,6 +2926,13 @@ declare class BlockchainData {
|
|
|
2875
2926
|
* @throws {@link index.APIError}
|
|
2876
2927
|
*/
|
|
2877
2928
|
getToken(request: TokensApiGetERC20TokenRequest): Promise<GetTokenResult>;
|
|
2929
|
+
/**
|
|
2930
|
+
* Get metadata by ID
|
|
2931
|
+
* @param request - the request object containing the parameters to be provided in the API request
|
|
2932
|
+
* @returns a promise that resolves with a single Metadata
|
|
2933
|
+
* @throws {@link index.APIError}
|
|
2934
|
+
*/
|
|
2935
|
+
getMetadata(request: MetadataApiGetMetadataRequest): Promise<GetMetadataResult>;
|
|
2878
2936
|
/**
|
|
2879
2937
|
* List NFT Metadata by contract address
|
|
2880
2938
|
* @param request - the request object containing the parameters to be provided in the API request
|
|
@@ -15224,11 +15282,11 @@ type BuyResult = BuyResultSuccess | BuyResultFailed | BuyResultInsufficientFunds
|
|
|
15224
15282
|
/**
|
|
15225
15283
|
* Represents the result of {@link Checkout.buy}
|
|
15226
15284
|
* @property {CheckoutStatus.SUCCESS} status - The status to indicate success
|
|
15227
|
-
* @property {SmartCheckoutSufficient
|
|
15285
|
+
* @property {SmartCheckoutSufficient} smartCheckoutResult - The sufficient result of smart checkout
|
|
15228
15286
|
*/
|
|
15229
15287
|
type BuyResultSuccess = {
|
|
15230
15288
|
status: CheckoutStatus.SUCCESS;
|
|
15231
|
-
smartCheckoutResult: SmartCheckoutSufficient
|
|
15289
|
+
smartCheckoutResult: SmartCheckoutSufficient;
|
|
15232
15290
|
};
|
|
15233
15291
|
/**
|
|
15234
15292
|
* Represents the result of {@link Checkout.buy}
|
|
@@ -15241,49 +15299,49 @@ type BuyResultFailed = {
|
|
|
15241
15299
|
status: CheckoutStatus.FAILED;
|
|
15242
15300
|
transactionHash: string;
|
|
15243
15301
|
reason: string;
|
|
15244
|
-
smartCheckoutResult: SmartCheckoutSufficient
|
|
15302
|
+
smartCheckoutResult: SmartCheckoutSufficient;
|
|
15245
15303
|
};
|
|
15246
15304
|
/**
|
|
15247
15305
|
* Represents the result of {@link Checkout.buy}
|
|
15248
15306
|
* @property {CheckoutStatus.INSUFFICIENT_FUNDS} status - The status to indicate insufficient funds
|
|
15249
|
-
* @property {SmartCheckoutInsufficient
|
|
15307
|
+
* @property {SmartCheckoutInsufficient} smartCheckoutResult - The insufficient result of smart checkout
|
|
15250
15308
|
*/
|
|
15251
15309
|
type BuyResultInsufficientFunds = {
|
|
15252
15310
|
status: CheckoutStatus.INSUFFICIENT_FUNDS;
|
|
15253
|
-
smartCheckoutResult: SmartCheckoutInsufficient
|
|
15311
|
+
smartCheckoutResult: SmartCheckoutInsufficient;
|
|
15254
15312
|
};
|
|
15255
15313
|
type SellResult = SellResultSuccess | SellResultFailed | SellResultInsufficientFunds;
|
|
15256
15314
|
/**
|
|
15257
15315
|
* Represents the result of {@link Checkout.sell}
|
|
15258
15316
|
* @property {CheckoutStatus.SUCCESS} status - The status to indicate success
|
|
15259
|
-
* @property {SmartCheckoutSufficient
|
|
15317
|
+
* @property {SmartCheckoutSufficient} smartCheckoutResult - The sufficient result of smart checkout
|
|
15260
15318
|
*/
|
|
15261
15319
|
type SellResultSuccess = {
|
|
15262
15320
|
status: CheckoutStatus.SUCCESS;
|
|
15263
15321
|
orderIds: string[];
|
|
15264
|
-
smartCheckoutResult: SmartCheckoutSufficient
|
|
15322
|
+
smartCheckoutResult: SmartCheckoutSufficient;
|
|
15265
15323
|
};
|
|
15266
15324
|
/**
|
|
15267
15325
|
* Represents the result of {@link Checkout.sell}
|
|
15268
15326
|
* @property {CheckoutStatus.FAILED} status - The status to indicate failure
|
|
15269
15327
|
* @property {string} transactionHash - The transaction hash of the failed transaction
|
|
15270
15328
|
* @property {string} reason - The reason for the failure
|
|
15271
|
-
* @property {SmartCheckoutSufficient
|
|
15329
|
+
* @property {SmartCheckoutSufficient} smartCheckoutResult - The sufficient result of smart checkout
|
|
15272
15330
|
*/
|
|
15273
15331
|
type SellResultFailed = {
|
|
15274
15332
|
status: CheckoutStatus.FAILED;
|
|
15275
15333
|
transactionHash: string;
|
|
15276
15334
|
reason: string;
|
|
15277
|
-
smartCheckoutResult: SmartCheckoutSufficient
|
|
15335
|
+
smartCheckoutResult: SmartCheckoutSufficient;
|
|
15278
15336
|
};
|
|
15279
15337
|
/**
|
|
15280
15338
|
* Represents the result of {@link Checkout.sell}
|
|
15281
15339
|
* @property {CheckoutStatus.INSUFFICIENT_FUNDS} status - The status to indicate insufficient funds
|
|
15282
|
-
* @property {SmartCheckoutInsufficient
|
|
15340
|
+
* @property {SmartCheckoutInsufficient} smartCheckoutResult - The insufficient result of smart checkout
|
|
15283
15341
|
*/
|
|
15284
15342
|
type SellResultInsufficientFunds = {
|
|
15285
15343
|
status: CheckoutStatus.INSUFFICIENT_FUNDS;
|
|
15286
|
-
smartCheckoutResult: SmartCheckoutInsufficient
|
|
15344
|
+
smartCheckoutResult: SmartCheckoutInsufficient;
|
|
15287
15345
|
};
|
|
15288
15346
|
type CancelResult = CancelResultSuccess | CancelResultFailed;
|
|
15289
15347
|
/**
|
|
@@ -15518,13 +15576,11 @@ type SmartCheckoutInsufficient = {
|
|
|
15518
15576
|
};
|
|
15519
15577
|
/**
|
|
15520
15578
|
* Represents the routing outcome for a transaction.
|
|
15521
|
-
* @property {boolean} isPassport - Indicates if the provider used was a passport provider.
|
|
15522
15579
|
* @property {AvailableRoutingOptions} availableRoutingOptions - The routing options available to the user
|
|
15523
15580
|
* @property {RoutingOutcome} routingOutcome - The routing outcome for the transaction which
|
|
15524
15581
|
* includes the funding routes if routes were found
|
|
15525
15582
|
*/
|
|
15526
15583
|
type SmartCheckoutRouter = {
|
|
15527
|
-
isPassport: boolean;
|
|
15528
15584
|
availableRoutingOptions: AvailableRoutingOptions;
|
|
15529
15585
|
routingOutcome: RoutingOutcome;
|
|
15530
15586
|
};
|
|
@@ -15753,24 +15809,6 @@ type AvailableRoutingOptions = {
|
|
|
15753
15809
|
swap?: boolean;
|
|
15754
15810
|
bridge?: boolean;
|
|
15755
15811
|
};
|
|
15756
|
-
type FundingRouteFeeEstimate = SwapRouteFeeEstimate | BridgeRouteFeeEstimate;
|
|
15757
|
-
type SwapRouteFeeEstimate = {
|
|
15758
|
-
type: FundingStepType.SWAP;
|
|
15759
|
-
estimatedAmount: BigNumber;
|
|
15760
|
-
token: TokenInfo;
|
|
15761
|
-
};
|
|
15762
|
-
type BridgeRouteFeeEstimate = {
|
|
15763
|
-
type: FundingStepType.BRIDGE;
|
|
15764
|
-
gasFee: {
|
|
15765
|
-
estimatedAmount: BigNumber;
|
|
15766
|
-
token?: TokenInfo;
|
|
15767
|
-
};
|
|
15768
|
-
bridgeFee: {
|
|
15769
|
-
estimatedAmount: BigNumber;
|
|
15770
|
-
token?: TokenInfo;
|
|
15771
|
-
};
|
|
15772
|
-
totalFees: BigNumber;
|
|
15773
|
-
};
|
|
15774
15812
|
/**
|
|
15775
15813
|
* Interface representing the parameters for {@link Checkout.buy}
|
|
15776
15814
|
* @property {Web3Provider} provider - The provider to use for the buy.
|
|
@@ -16286,7 +16324,8 @@ declare enum CheckoutErrorType {
|
|
|
16286
16324
|
SIGN_MESSAGE_ERROR = "SIGN_MESSAGE_ERROR",
|
|
16287
16325
|
BRIDGE_GAS_ESTIMATE_ERROR = "BRIDGE_GAS_ESTIMATE_ERROR",
|
|
16288
16326
|
ORDER_FEE_ERROR = "ORDER_FEE_ERROR",
|
|
16289
|
-
ITEM_REQUIREMENTS_ERROR = "ITEM_REQUIREMENTS_ERROR"
|
|
16327
|
+
ITEM_REQUIREMENTS_ERROR = "ITEM_REQUIREMENTS_ERROR",
|
|
16328
|
+
API_ERROR = "API_ERROR"
|
|
16290
16329
|
}
|
|
16291
16330
|
/**
|
|
16292
16331
|
* Represents an error object with a specific type, optional message, and optional data.
|
|
@@ -16464,13 +16503,19 @@ declare class Checkout {
|
|
|
16464
16503
|
type checkout_sdk_d_AllowedNetworkConfig = AllowedNetworkConfig;
|
|
16465
16504
|
type checkout_sdk_d_AvailableRoutingOptions = AvailableRoutingOptions;
|
|
16466
16505
|
type checkout_sdk_d_BalanceDelta = BalanceDelta;
|
|
16506
|
+
type checkout_sdk_d_BridgeFundingStep = BridgeFundingStep;
|
|
16467
16507
|
type checkout_sdk_d_BuyOrder = BuyOrder;
|
|
16468
16508
|
type checkout_sdk_d_BuyParams = BuyParams;
|
|
16469
16509
|
type checkout_sdk_d_BuyResult = BuyResult;
|
|
16510
|
+
type checkout_sdk_d_BuyResultFailed = BuyResultFailed;
|
|
16511
|
+
type checkout_sdk_d_BuyResultInsufficientFunds = BuyResultInsufficientFunds;
|
|
16512
|
+
type checkout_sdk_d_BuyResultSuccess = BuyResultSuccess;
|
|
16470
16513
|
type checkout_sdk_d_BuyToken = BuyToken;
|
|
16471
16514
|
declare const checkout_sdk_d_CHECKOUT_API_BASE_URL: typeof CHECKOUT_API_BASE_URL;
|
|
16472
16515
|
type checkout_sdk_d_CancelParams = CancelParams;
|
|
16473
16516
|
type checkout_sdk_d_CancelResult = CancelResult;
|
|
16517
|
+
type checkout_sdk_d_CancelResultFailed = CancelResultFailed;
|
|
16518
|
+
type checkout_sdk_d_CancelResultSuccess = CancelResultSuccess;
|
|
16474
16519
|
type checkout_sdk_d_ChainId = ChainId;
|
|
16475
16520
|
declare const checkout_sdk_d_ChainId: typeof ChainId;
|
|
16476
16521
|
type checkout_sdk_d_ChainName = ChainName;
|
|
@@ -16488,6 +16533,7 @@ type checkout_sdk_d_ConnectParams = ConnectParams;
|
|
|
16488
16533
|
type checkout_sdk_d_ConnectResult = ConnectResult;
|
|
16489
16534
|
type checkout_sdk_d_DexConfig = DexConfig;
|
|
16490
16535
|
type checkout_sdk_d_ERC20ItemRequirement = ERC20ItemRequirement;
|
|
16536
|
+
type checkout_sdk_d_ERC721Balance = ERC721Balance;
|
|
16491
16537
|
type checkout_sdk_d_ERC721ItemRequirement = ERC721ItemRequirement;
|
|
16492
16538
|
type checkout_sdk_d_ErrorType = ErrorType;
|
|
16493
16539
|
type checkout_sdk_d_ExchangeType = ExchangeType;
|
|
@@ -16498,7 +16544,6 @@ type checkout_sdk_d_FiatRampParams = FiatRampParams;
|
|
|
16498
16544
|
type checkout_sdk_d_FulfillmentTransaction = FulfillmentTransaction;
|
|
16499
16545
|
type checkout_sdk_d_FundingItem = FundingItem;
|
|
16500
16546
|
type checkout_sdk_d_FundingRoute = FundingRoute;
|
|
16501
|
-
type checkout_sdk_d_FundingRouteFeeEstimate = FundingRouteFeeEstimate;
|
|
16502
16547
|
type checkout_sdk_d_FundingStep = FundingStep;
|
|
16503
16548
|
type checkout_sdk_d_FundingStepType = FundingStepType;
|
|
16504
16549
|
declare const checkout_sdk_d_FundingStepType: typeof FundingStepType;
|
|
@@ -16531,22 +16576,33 @@ type checkout_sdk_d_NetworkFilter = NetworkFilter;
|
|
|
16531
16576
|
type checkout_sdk_d_NetworkFilterTypes = NetworkFilterTypes;
|
|
16532
16577
|
declare const checkout_sdk_d_NetworkFilterTypes: typeof NetworkFilterTypes;
|
|
16533
16578
|
type checkout_sdk_d_NetworkInfo = NetworkInfo;
|
|
16579
|
+
type checkout_sdk_d_NoRouteOptions = NoRouteOptions;
|
|
16580
|
+
type checkout_sdk_d_NoRoutesFound = NoRoutesFound;
|
|
16581
|
+
type checkout_sdk_d_OnRampFundingStep = OnRampFundingStep;
|
|
16534
16582
|
type checkout_sdk_d_OrderFee = OrderFee;
|
|
16535
16583
|
type checkout_sdk_d_RemoteConfiguration = RemoteConfiguration;
|
|
16584
|
+
type checkout_sdk_d_RoutesFound = RoutesFound;
|
|
16536
16585
|
type checkout_sdk_d_RoutingOutcome = RoutingOutcome;
|
|
16537
16586
|
type checkout_sdk_d_RoutingOutcomeType = RoutingOutcomeType;
|
|
16538
16587
|
declare const checkout_sdk_d_RoutingOutcomeType: typeof RoutingOutcomeType;
|
|
16539
16588
|
type checkout_sdk_d_SellOrder = SellOrder;
|
|
16540
16589
|
type checkout_sdk_d_SellParams = SellParams;
|
|
16541
16590
|
type checkout_sdk_d_SellResult = SellResult;
|
|
16591
|
+
type checkout_sdk_d_SellResultFailed = SellResultFailed;
|
|
16592
|
+
type checkout_sdk_d_SellResultInsufficientFunds = SellResultInsufficientFunds;
|
|
16593
|
+
type checkout_sdk_d_SellResultSuccess = SellResultSuccess;
|
|
16542
16594
|
type checkout_sdk_d_SellToken = SellToken;
|
|
16543
16595
|
type checkout_sdk_d_SendTransactionParams = SendTransactionParams;
|
|
16544
16596
|
type checkout_sdk_d_SendTransactionResult = SendTransactionResult;
|
|
16597
|
+
type checkout_sdk_d_SmartCheckoutInsufficient = SmartCheckoutInsufficient;
|
|
16545
16598
|
type checkout_sdk_d_SmartCheckoutParams = SmartCheckoutParams;
|
|
16546
16599
|
type checkout_sdk_d_SmartCheckoutResult = SmartCheckoutResult;
|
|
16547
16600
|
type checkout_sdk_d_SmartCheckoutRouter = SmartCheckoutRouter;
|
|
16601
|
+
type checkout_sdk_d_SmartCheckoutSufficient = SmartCheckoutSufficient;
|
|
16602
|
+
type checkout_sdk_d_SwapFundingStep = SwapFundingStep;
|
|
16548
16603
|
type checkout_sdk_d_SwitchNetworkParams = SwitchNetworkParams;
|
|
16549
16604
|
type checkout_sdk_d_SwitchNetworkResult = SwitchNetworkResult;
|
|
16605
|
+
type checkout_sdk_d_TokenBalance = TokenBalance;
|
|
16550
16606
|
type checkout_sdk_d_TokenFilter = TokenFilter;
|
|
16551
16607
|
type checkout_sdk_d_TokenFilterTypes = TokenFilterTypes;
|
|
16552
16608
|
declare const checkout_sdk_d_TokenFilterTypes: typeof TokenFilterTypes;
|
|
@@ -16565,13 +16621,19 @@ declare namespace checkout_sdk_d {
|
|
|
16565
16621
|
checkout_sdk_d_AllowedNetworkConfig as AllowedNetworkConfig,
|
|
16566
16622
|
checkout_sdk_d_AvailableRoutingOptions as AvailableRoutingOptions,
|
|
16567
16623
|
checkout_sdk_d_BalanceDelta as BalanceDelta,
|
|
16624
|
+
checkout_sdk_d_BridgeFundingStep as BridgeFundingStep,
|
|
16568
16625
|
checkout_sdk_d_BuyOrder as BuyOrder,
|
|
16569
16626
|
checkout_sdk_d_BuyParams as BuyParams,
|
|
16570
16627
|
checkout_sdk_d_BuyResult as BuyResult,
|
|
16628
|
+
checkout_sdk_d_BuyResultFailed as BuyResultFailed,
|
|
16629
|
+
checkout_sdk_d_BuyResultInsufficientFunds as BuyResultInsufficientFunds,
|
|
16630
|
+
checkout_sdk_d_BuyResultSuccess as BuyResultSuccess,
|
|
16571
16631
|
checkout_sdk_d_BuyToken as BuyToken,
|
|
16572
16632
|
checkout_sdk_d_CHECKOUT_API_BASE_URL as CHECKOUT_API_BASE_URL,
|
|
16573
16633
|
checkout_sdk_d_CancelParams as CancelParams,
|
|
16574
16634
|
checkout_sdk_d_CancelResult as CancelResult,
|
|
16635
|
+
checkout_sdk_d_CancelResultFailed as CancelResultFailed,
|
|
16636
|
+
checkout_sdk_d_CancelResultSuccess as CancelResultSuccess,
|
|
16575
16637
|
checkout_sdk_d_ChainId as ChainId,
|
|
16576
16638
|
checkout_sdk_d_ChainName as ChainName,
|
|
16577
16639
|
checkout_sdk_d_CheckConnectionParams as CheckConnectionParams,
|
|
@@ -16584,6 +16646,7 @@ declare namespace checkout_sdk_d {
|
|
|
16584
16646
|
checkout_sdk_d_ConnectResult as ConnectResult,
|
|
16585
16647
|
checkout_sdk_d_DexConfig as DexConfig,
|
|
16586
16648
|
checkout_sdk_d_ERC20ItemRequirement as ERC20ItemRequirement,
|
|
16649
|
+
checkout_sdk_d_ERC721Balance as ERC721Balance,
|
|
16587
16650
|
checkout_sdk_d_ERC721ItemRequirement as ERC721ItemRequirement,
|
|
16588
16651
|
checkout_sdk_d_ErrorType as ErrorType,
|
|
16589
16652
|
checkout_sdk_d_ExchangeType as ExchangeType,
|
|
@@ -16593,7 +16656,6 @@ declare namespace checkout_sdk_d {
|
|
|
16593
16656
|
checkout_sdk_d_FulfillmentTransaction as FulfillmentTransaction,
|
|
16594
16657
|
checkout_sdk_d_FundingItem as FundingItem,
|
|
16595
16658
|
checkout_sdk_d_FundingRoute as FundingRoute,
|
|
16596
|
-
checkout_sdk_d_FundingRouteFeeEstimate as FundingRouteFeeEstimate,
|
|
16597
16659
|
checkout_sdk_d_FundingStep as FundingStep,
|
|
16598
16660
|
checkout_sdk_d_FundingStepType as FundingStepType,
|
|
16599
16661
|
checkout_sdk_d_GasAmount as GasAmount,
|
|
@@ -16621,21 +16683,32 @@ declare namespace checkout_sdk_d {
|
|
|
16621
16683
|
checkout_sdk_d_NetworkFilter as NetworkFilter,
|
|
16622
16684
|
checkout_sdk_d_NetworkFilterTypes as NetworkFilterTypes,
|
|
16623
16685
|
checkout_sdk_d_NetworkInfo as NetworkInfo,
|
|
16686
|
+
checkout_sdk_d_NoRouteOptions as NoRouteOptions,
|
|
16687
|
+
checkout_sdk_d_NoRoutesFound as NoRoutesFound,
|
|
16688
|
+
checkout_sdk_d_OnRampFundingStep as OnRampFundingStep,
|
|
16624
16689
|
checkout_sdk_d_OrderFee as OrderFee,
|
|
16625
16690
|
checkout_sdk_d_RemoteConfiguration as RemoteConfiguration,
|
|
16691
|
+
checkout_sdk_d_RoutesFound as RoutesFound,
|
|
16626
16692
|
checkout_sdk_d_RoutingOutcome as RoutingOutcome,
|
|
16627
16693
|
checkout_sdk_d_RoutingOutcomeType as RoutingOutcomeType,
|
|
16628
16694
|
checkout_sdk_d_SellOrder as SellOrder,
|
|
16629
16695
|
checkout_sdk_d_SellParams as SellParams,
|
|
16630
16696
|
checkout_sdk_d_SellResult as SellResult,
|
|
16697
|
+
checkout_sdk_d_SellResultFailed as SellResultFailed,
|
|
16698
|
+
checkout_sdk_d_SellResultInsufficientFunds as SellResultInsufficientFunds,
|
|
16699
|
+
checkout_sdk_d_SellResultSuccess as SellResultSuccess,
|
|
16631
16700
|
checkout_sdk_d_SellToken as SellToken,
|
|
16632
16701
|
checkout_sdk_d_SendTransactionParams as SendTransactionParams,
|
|
16633
16702
|
checkout_sdk_d_SendTransactionResult as SendTransactionResult,
|
|
16703
|
+
checkout_sdk_d_SmartCheckoutInsufficient as SmartCheckoutInsufficient,
|
|
16634
16704
|
checkout_sdk_d_SmartCheckoutParams as SmartCheckoutParams,
|
|
16635
16705
|
checkout_sdk_d_SmartCheckoutResult as SmartCheckoutResult,
|
|
16636
16706
|
checkout_sdk_d_SmartCheckoutRouter as SmartCheckoutRouter,
|
|
16707
|
+
checkout_sdk_d_SmartCheckoutSufficient as SmartCheckoutSufficient,
|
|
16708
|
+
checkout_sdk_d_SwapFundingStep as SwapFundingStep,
|
|
16637
16709
|
checkout_sdk_d_SwitchNetworkParams as SwitchNetworkParams,
|
|
16638
16710
|
checkout_sdk_d_SwitchNetworkResult as SwitchNetworkResult,
|
|
16711
|
+
checkout_sdk_d_TokenBalance as TokenBalance,
|
|
16639
16712
|
checkout_sdk_d_TokenFilter as TokenFilter,
|
|
16640
16713
|
checkout_sdk_d_TokenFilterTypes as TokenFilterTypes,
|
|
16641
16714
|
checkout_sdk_d_TokenInfo as TokenInfo,
|
|
@@ -31325,27 +31398,27 @@ type WalletNetworkSwitchEvent = {
|
|
|
31325
31398
|
*/
|
|
31326
31399
|
type WalletDisconnectWalletEvent = {};
|
|
31327
31400
|
/**
|
|
31328
|
-
* Enum representing possible
|
|
31401
|
+
* Enum representing possible Sale Widget event types.
|
|
31329
31402
|
*/
|
|
31330
|
-
declare enum
|
|
31403
|
+
declare enum SaleEventType {
|
|
31331
31404
|
CLOSE_WIDGET = "close-widget",
|
|
31332
31405
|
SUCCESS = "success",
|
|
31333
31406
|
FAILURE = "failure",
|
|
31334
31407
|
REJECTED = "rejected"
|
|
31335
31408
|
}
|
|
31336
31409
|
/**
|
|
31337
|
-
* Represents a successful
|
|
31410
|
+
* Represents a successful Sale transaction.
|
|
31338
31411
|
* @property {string} transactionHash - The hash of the successful transaction.
|
|
31339
31412
|
*/
|
|
31340
|
-
type
|
|
31413
|
+
type SaleSuccess = {
|
|
31341
31414
|
[key: string]: string;
|
|
31342
31415
|
};
|
|
31343
31416
|
/**
|
|
31344
|
-
* Type representing a
|
|
31417
|
+
* Type representing a Sale Widget with type FAILURE.
|
|
31345
31418
|
* @property {string} reason - The reason why the swap failed.
|
|
31346
31419
|
* @property {number} timestamp - The timestamp of the failed swap.
|
|
31347
31420
|
*/
|
|
31348
|
-
type
|
|
31421
|
+
type SaleFailed = {
|
|
31349
31422
|
reason: string;
|
|
31350
31423
|
timestamp: number;
|
|
31351
31424
|
};
|
|
@@ -31358,16 +31431,16 @@ declare enum IMTBLWidgetEvents {
|
|
|
31358
31431
|
IMTBL_SWAP_WIDGET_EVENT = "imtbl-swap-widget",
|
|
31359
31432
|
IMTBL_BRIDGE_WIDGET_EVENT = "imtbl-bridge-widget",
|
|
31360
31433
|
IMTBL_ONRAMP_WIDGET_EVENT = "imtbl-onramp-widget",
|
|
31361
|
-
IMTBL_PRIMARY_REVENUE_WIDGET_EVENT = "imtbl-
|
|
31434
|
+
IMTBL_PRIMARY_REVENUE_WIDGET_EVENT = "imtbl-sale-widget"
|
|
31362
31435
|
}
|
|
31363
31436
|
/**
|
|
31364
31437
|
* Represents an event emitted by a widget.
|
|
31365
31438
|
* @template T - The type of data associated with the event.
|
|
31366
|
-
* @property {OrchestrationEventType | ConnectEventType | WalletEventType | SwapEventType | BridgeEventType | OnRampEventType |
|
|
31439
|
+
* @property {OrchestrationEventType | ConnectEventType | WalletEventType | SwapEventType | BridgeEventType | OnRampEventType | SaleEventType} type - The type of the event.
|
|
31367
31440
|
* @property {T} data - The data associated with the event.
|
|
31368
31441
|
*/
|
|
31369
31442
|
type WidgetEvent<T> = {
|
|
31370
|
-
type: OrchestrationEventType | ConnectEventType | WalletEventType | SwapEventType | BridgeEventType | OnRampEventType |
|
|
31443
|
+
type: OrchestrationEventType | ConnectEventType | WalletEventType | SwapEventType | BridgeEventType | OnRampEventType | SaleEventType;
|
|
31371
31444
|
data: T;
|
|
31372
31445
|
};
|
|
31373
31446
|
/**
|
|
@@ -31396,7 +31469,7 @@ declare global {
|
|
|
31396
31469
|
'imtbl-swap': ImtblSwapProps;
|
|
31397
31470
|
'imtbl-bridge': ImtblBridgeProps;
|
|
31398
31471
|
'imtbl-onramp': ImtblOnRampProps;
|
|
31399
|
-
'imtbl-
|
|
31472
|
+
'imtbl-sale': ImtblSaleProps;
|
|
31400
31473
|
}
|
|
31401
31474
|
}
|
|
31402
31475
|
interface ImmutableWebComponent {
|
|
@@ -31478,9 +31551,9 @@ interface ImtblOnRampProps extends React.DetailedHTMLProps<React.HTMLAttributes<
|
|
|
31478
31551
|
contractAddress?: string;
|
|
31479
31552
|
}
|
|
31480
31553
|
/**
|
|
31481
|
-
* Interface for the properties of the
|
|
31554
|
+
* Interface for the properties of the Sale web component.
|
|
31482
31555
|
* Extends the React.DetailedHTMLProps interface to inherit HTML attributes for an HTMLElement.
|
|
31483
|
-
* @interface
|
|
31556
|
+
* @interface ImtblSaleProps
|
|
31484
31557
|
* @extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>
|
|
31485
31558
|
* @property {string | undefined} widgetConfig - Optional string representing the widget configuration.
|
|
31486
31559
|
* @property {string | undefined} amount - The amount to be paid.
|
|
@@ -31489,7 +31562,7 @@ interface ImtblOnRampProps extends React.DetailedHTMLProps<React.HTMLAttributes<
|
|
|
31489
31562
|
* @property {string | undefined} env - The environment to use: SANDBOX, DEV, PRODUCTION, ...
|
|
31490
31563
|
* @property {string | undefined} environmentId - The environment id from Immutable Hub.
|
|
31491
31564
|
*/
|
|
31492
|
-
interface
|
|
31565
|
+
interface ImtblSaleProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
|
|
31493
31566
|
widgetConfig?: string;
|
|
31494
31567
|
amount: string;
|
|
31495
31568
|
products: string;
|
|
@@ -31618,7 +31691,7 @@ declare const checkout_widgets_d_IMTBLWidgetEvents: typeof IMTBLWidgetEvents;
|
|
|
31618
31691
|
type checkout_widgets_d_ImtblBridgeProps = ImtblBridgeProps;
|
|
31619
31692
|
type checkout_widgets_d_ImtblConnectProps = ImtblConnectProps;
|
|
31620
31693
|
type checkout_widgets_d_ImtblOnRampProps = ImtblOnRampProps;
|
|
31621
|
-
type
|
|
31694
|
+
type checkout_widgets_d_ImtblSaleProps = ImtblSaleProps;
|
|
31622
31695
|
type checkout_widgets_d_ImtblSwapProps = ImtblSwapProps;
|
|
31623
31696
|
type checkout_widgets_d_ImtblWalletProps = ImtblWalletProps;
|
|
31624
31697
|
type checkout_widgets_d_OnRampEventType = OnRampEventType;
|
|
@@ -31629,15 +31702,15 @@ type checkout_widgets_d_OnRampReactProps = OnRampReactProps;
|
|
|
31629
31702
|
type checkout_widgets_d_OnRampSuccess = OnRampSuccess;
|
|
31630
31703
|
type checkout_widgets_d_OrchestrationEventType = OrchestrationEventType;
|
|
31631
31704
|
declare const checkout_widgets_d_OrchestrationEventType: typeof OrchestrationEventType;
|
|
31632
|
-
type checkout_widgets_d_PrimaryRevenueEventType = PrimaryRevenueEventType;
|
|
31633
|
-
declare const checkout_widgets_d_PrimaryRevenueEventType: typeof PrimaryRevenueEventType;
|
|
31634
|
-
type checkout_widgets_d_PrimaryRevenueFailed = PrimaryRevenueFailed;
|
|
31635
|
-
type checkout_widgets_d_PrimaryRevenueSuccess = PrimaryRevenueSuccess;
|
|
31636
31705
|
type checkout_widgets_d_RequestBridgeEvent = RequestBridgeEvent;
|
|
31637
31706
|
type checkout_widgets_d_RequestConnectEvent = RequestConnectEvent;
|
|
31638
31707
|
type checkout_widgets_d_RequestOnrampEvent = RequestOnrampEvent;
|
|
31639
31708
|
type checkout_widgets_d_RequestSwapEvent = RequestSwapEvent;
|
|
31640
31709
|
type checkout_widgets_d_RequestWalletEvent = RequestWalletEvent;
|
|
31710
|
+
type checkout_widgets_d_SaleEventType = SaleEventType;
|
|
31711
|
+
declare const checkout_widgets_d_SaleEventType: typeof SaleEventType;
|
|
31712
|
+
type checkout_widgets_d_SaleFailed = SaleFailed;
|
|
31713
|
+
type checkout_widgets_d_SaleSuccess = SaleSuccess;
|
|
31641
31714
|
type checkout_widgets_d_SemanticVersion = SemanticVersion;
|
|
31642
31715
|
type checkout_widgets_d_SwapEventType = SwapEventType;
|
|
31643
31716
|
declare const checkout_widgets_d_SwapEventType: typeof SwapEventType;
|
|
@@ -31675,7 +31748,7 @@ declare namespace checkout_widgets_d {
|
|
|
31675
31748
|
checkout_widgets_d_ImtblBridgeProps as ImtblBridgeProps,
|
|
31676
31749
|
checkout_widgets_d_ImtblConnectProps as ImtblConnectProps,
|
|
31677
31750
|
checkout_widgets_d_ImtblOnRampProps as ImtblOnRampProps,
|
|
31678
|
-
|
|
31751
|
+
checkout_widgets_d_ImtblSaleProps as ImtblSaleProps,
|
|
31679
31752
|
checkout_widgets_d_ImtblSwapProps as ImtblSwapProps,
|
|
31680
31753
|
checkout_widgets_d_ImtblWalletProps as ImtblWalletProps,
|
|
31681
31754
|
checkout_widgets_d_OnRampEventType as OnRampEventType,
|
|
@@ -31684,14 +31757,14 @@ declare namespace checkout_widgets_d {
|
|
|
31684
31757
|
checkout_widgets_d_OnRampReactProps as OnRampReactProps,
|
|
31685
31758
|
checkout_widgets_d_OnRampSuccess as OnRampSuccess,
|
|
31686
31759
|
checkout_widgets_d_OrchestrationEventType as OrchestrationEventType,
|
|
31687
|
-
checkout_widgets_d_PrimaryRevenueEventType as PrimaryRevenueEventType,
|
|
31688
|
-
checkout_widgets_d_PrimaryRevenueFailed as PrimaryRevenueFailed,
|
|
31689
|
-
checkout_widgets_d_PrimaryRevenueSuccess as PrimaryRevenueSuccess,
|
|
31690
31760
|
checkout_widgets_d_RequestBridgeEvent as RequestBridgeEvent,
|
|
31691
31761
|
checkout_widgets_d_RequestConnectEvent as RequestConnectEvent,
|
|
31692
31762
|
checkout_widgets_d_RequestOnrampEvent as RequestOnrampEvent,
|
|
31693
31763
|
checkout_widgets_d_RequestSwapEvent as RequestSwapEvent,
|
|
31694
31764
|
checkout_widgets_d_RequestWalletEvent as RequestWalletEvent,
|
|
31765
|
+
checkout_widgets_d_SaleEventType as SaleEventType,
|
|
31766
|
+
checkout_widgets_d_SaleFailed as SaleFailed,
|
|
31767
|
+
checkout_widgets_d_SaleSuccess as SaleSuccess,
|
|
31695
31768
|
checkout_widgets_d_SemanticVersion as SemanticVersion,
|
|
31696
31769
|
checkout_widgets_d_SwapEventType as SwapEventType,
|
|
31697
31770
|
checkout_widgets_d_SwapFailed as SwapFailed,
|