@imtbl/sdk 0.43.0 → 0.44.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/sdk.js +2 -2
- package/dist/browser/checkout/widgets.js +61 -61
- package/dist/checkout.d.ts +17 -2
- package/dist/checkout.js +19 -4
- package/dist/immutablex_client.js +1 -1
- package/dist/index.browser.js +3 -3
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +52 -23
- package/dist/index.d.ts +19 -1
- package/dist/index.js +52 -23
- package/dist/passport.js +33 -20
- package/package.json +1 -1
package/dist/checkout.d.ts
CHANGED
|
@@ -10888,8 +10888,10 @@ type SellOrder = {
|
|
|
10888
10888
|
sellToken: SellToken;
|
|
10889
10889
|
/** the token info of the price of the item */
|
|
10890
10890
|
buyToken: BuyToken;
|
|
10891
|
-
/**
|
|
10891
|
+
/** optional array of makerFees to be applied to the listing */
|
|
10892
10892
|
makerFees?: OrderFee[];
|
|
10893
|
+
/** optional order expiry date. Default order expiry to 2 years from now */
|
|
10894
|
+
orderExpiry?: Date;
|
|
10893
10895
|
};
|
|
10894
10896
|
/**
|
|
10895
10897
|
* Represents the token that the item can be bought with once listed for sale.
|
|
@@ -12965,10 +12967,14 @@ type OnRampWidgetParams = {
|
|
|
12965
12967
|
type SaleWidgetParams = {
|
|
12966
12968
|
/** The total price to pay for the items in the sale */
|
|
12967
12969
|
amount?: string;
|
|
12970
|
+
/** Environment id from Immutable Hub */
|
|
12968
12971
|
environmentId?: string;
|
|
12972
|
+
/** Contract address of the token accepted for payments */
|
|
12969
12973
|
fromTokenAddress?: string;
|
|
12970
12974
|
/** The list of products to be purchased */
|
|
12971
12975
|
items?: SaleItem[];
|
|
12976
|
+
/** The name of the NFT collection on sale */
|
|
12977
|
+
collectionName?: string;
|
|
12972
12978
|
/** The wallet provider name to default to if no web3Provider is passed */
|
|
12973
12979
|
walletProviderName?: WalletProviderName;
|
|
12974
12980
|
/** The language to use for the sales widget */
|
|
@@ -13512,4 +13518,13 @@ type ErrorType = {
|
|
|
13512
13518
|
};
|
|
13513
13519
|
};
|
|
13514
13520
|
|
|
13515
|
-
|
|
13521
|
+
declare class BlockExplorerService {
|
|
13522
|
+
/**
|
|
13523
|
+
* getTransationLink returns the link to the transaction on blockscout
|
|
13524
|
+
* @param hash transaction hash
|
|
13525
|
+
* @returns link to the transaction on blockscout
|
|
13526
|
+
*/
|
|
13527
|
+
static getTransactionLink(chainId: ChainId, hash: string): string | undefined;
|
|
13528
|
+
}
|
|
13529
|
+
|
|
13530
|
+
export { AllowedNetworkConfig, AvailableRoutingOptions, BalanceDelta, BlockExplorerService, BridgeEventType, BridgeFailed, BridgeFundingStep, BridgeTransactionSent, BridgeWidgetConfiguration, BridgeWidgetParams, BuyOrder, BuyParams, BuyResult, BuyResultFailed, BuyResultInsufficientFunds, BuyResultSuccess, BuyToken, CancelParams, CancelResult, CancelResultFailed, CancelResultSuccess, ChainId, ChainName, ChainSlug, CheckConnectionParams, CheckConnectionResult, Checkout, CheckoutBridgeConfiguration, CheckoutConfiguration, CheckoutErrorType, CheckoutModuleConfiguration, CheckoutOnRampConfiguration, CheckoutStatus, CheckoutSwapConfiguration, CheckoutWidgetsConfig, ConnectEventType, ConnectParams, ConnectResult, ConnectTargetLayer, ConnectWidgetConfiguration, ConnectWidgetParams, ConnectionFailed, ConnectionSuccess, CreateProviderParams, CreateProviderResult, DexConfig, ERC20ItemRequirement, ERC721Balance, ERC721ItemRequirement, ErrorType, ExchangeType, Fee, FeePercentage, FeeToken, FeeType, FiatRampParams, FulfillmentTransaction, FundingItem, FundingRoute, FundingStep, FundingStepType, GasAmount, GasEstimateBridgeToL2Result, GasEstimateParams, GasEstimateSwapResult, GasEstimateTokenConfig, GasEstimateType, GasToken, GasTokenType, GetAllBalancesParams, GetAllBalancesResult, GetBalanceParams, GetBalanceResult, GetNetworkAllowListParams, GetNetworkAllowListResult, GetNetworkParams, GetTokenAllowListParams, GetTokenAllowListResult, GetTokenInfoParams, GetWalletAllowListParams, GetWalletAllowListResult, IMMUTABLE_API_BASE_URL, IMTBLWidgetEvents, IWidgetsFactory, ItemBalance, ItemType, LanguageChanged, NativeItemRequirement, NetworkFilter, NetworkFilterTypes, NetworkInfo, NoRouteOptions, NoRoutesFound, OnRampEventType, OnRampFailed, OnRampFundingStep, OnRampProviderFees, OnRampSuccess, OnRampWidgetParams, OnrampWidgetConfiguration, OrchestrationEvent, OrchestrationEventData, OrchestrationEventType, OrderFee, ProviderEvent, ProviderEventType, ProviderUpdated, RemoteConfiguration, RequestBridgeEvent, RequestConnectEvent, RequestOnrampEvent, RequestSwapEvent, RequestWalletEvent, RoutesFound, RoutingOutcome, RoutingOutcomeType, SaleEventType, SaleFailed, SaleItem, SalePaymentMethod, SalePaymentTypes, SaleSuccess, SaleTransactionSuccess, SaleWidgetConfiguration, SaleWidgetParams, SellOrder, SellParams, SellResult, SellResultFailed, SellResultInsufficientFunds, SellResultSuccess, SellToken, SemanticVersion, SendTransactionParams, SendTransactionResult, SmartCheckoutInsufficient, SmartCheckoutParams, SmartCheckoutResult, SmartCheckoutRouter, SmartCheckoutSufficient, SwapEventType, SwapFailed, SwapFundingStep, SwapRejected, SwapSuccess, SwapWidgetConfiguration, SwapWidgetParams, SwitchNetworkParams, SwitchNetworkResult, TokenAmountEstimate, TokenBalance, TokenFilter, TokenFilterTypes, TokenInfo, TransactionOrGasType, TransactionRequirement, WalletDisconnect, WalletEventType, WalletFilter, WalletFilterTypes, WalletInfo, WalletNetworkSwitch, WalletProviderName, WalletWidgetConfiguration, WalletWidgetParams, Widget, WidgetConfiguration, WidgetConfigurations, WidgetEvent, WidgetEventData, WidgetEventTypes, WidgetLanguage, WidgetParameters, WidgetProperties, WidgetTheme, WidgetType };
|
package/dist/checkout.js
CHANGED
|
@@ -25921,7 +25921,7 @@ class APIError extends Error {
|
|
|
25921
25921
|
|
|
25922
25922
|
/* eslint-disable implicit-arrow-linebreak */
|
|
25923
25923
|
const defaultHeaders = {
|
|
25924
|
-
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.
|
|
25924
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.44.1',
|
|
25925
25925
|
};
|
|
25926
25926
|
/**
|
|
25927
25927
|
* createAPIConfiguration to create a custom Configuration
|
|
@@ -27280,7 +27280,7 @@ const GAS_OVERRIDES = {
|
|
|
27280
27280
|
maxPriorityFeePerGas: BigNumber$1.from(101e9),
|
|
27281
27281
|
};
|
|
27282
27282
|
|
|
27283
|
-
const SDK_VERSION_MARKER = '0.
|
|
27283
|
+
const SDK_VERSION_MARKER = '0.44.1';
|
|
27284
27284
|
// This SDK version is replaced by the `yarn build` command ran on the root level
|
|
27285
27285
|
const globalPackageVersion = () => SDK_VERSION_MARKER;
|
|
27286
27286
|
|
|
@@ -30548,7 +30548,7 @@ const sell = async (config, provider, orders) => {
|
|
|
30548
30548
|
if (orders.length === 0) {
|
|
30549
30549
|
throw new CheckoutError('No orders were provided to the orders array. Please provide at least one order.', CheckoutErrorType.PREPARE_ORDER_LISTING_ERROR);
|
|
30550
30550
|
}
|
|
30551
|
-
const { buyToken, sellToken, makerFees } = orders[0];
|
|
30551
|
+
const { buyToken, sellToken, makerFees, orderExpiry, } = orders[0];
|
|
30552
30552
|
let decimals = 18;
|
|
30553
30553
|
if (buyToken.type === ItemType.ERC20) {
|
|
30554
30554
|
// get this from the allowed list
|
|
@@ -30569,6 +30569,7 @@ const sell = async (config, provider, orders) => {
|
|
|
30569
30569
|
contractAddress: sellToken.collectionAddress,
|
|
30570
30570
|
tokenId: sellToken.id,
|
|
30571
30571
|
},
|
|
30572
|
+
orderExpiry,
|
|
30572
30573
|
}));
|
|
30573
30574
|
}
|
|
30574
30575
|
catch (err) {
|
|
@@ -31160,4 +31161,18 @@ class Checkout {
|
|
|
31160
31161
|
}
|
|
31161
31162
|
}
|
|
31162
31163
|
|
|
31163
|
-
|
|
31164
|
+
class BlockExplorerService {
|
|
31165
|
+
/**
|
|
31166
|
+
* getTransationLink returns the link to the transaction on blockscout
|
|
31167
|
+
* @param hash transaction hash
|
|
31168
|
+
* @returns link to the transaction on blockscout
|
|
31169
|
+
*/
|
|
31170
|
+
static getTransactionLink(chainId, hash) {
|
|
31171
|
+
const url = BLOCKSCOUT_CHAIN_URL_MAP?.[chainId]?.url;
|
|
31172
|
+
if (!url || !hash)
|
|
31173
|
+
return undefined;
|
|
31174
|
+
return `${url}/tx/${hash}`;
|
|
31175
|
+
}
|
|
31176
|
+
}
|
|
31177
|
+
|
|
31178
|
+
export { BlockExplorerService, BridgeEventType, ChainId, ChainName, ChainSlug, Checkout, CheckoutConfiguration, CheckoutErrorType, CheckoutStatus, ConnectEventType, ConnectTargetLayer, ExchangeType, FeeType, FundingStepType, GasEstimateType, GasTokenType, IMMUTABLE_API_BASE_URL, IMTBLWidgetEvents, ItemType, NetworkFilterTypes, OnRampEventType, OrchestrationEventType, ProviderEventType, RoutingOutcomeType, SaleEventType, SalePaymentTypes, SwapEventType, TokenFilterTypes, TransactionOrGasType, WalletEventType, WalletFilterTypes, WalletProviderName, WidgetTheme, WidgetType };
|
|
@@ -17,7 +17,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
17
17
|
chainID,
|
|
18
18
|
coreContractAddress,
|
|
19
19
|
registrationContractAddress,
|
|
20
|
-
sdkVersion: 'ts-immutable-sdk-0.
|
|
20
|
+
sdkVersion: 'ts-immutable-sdk-0.44.1',
|
|
21
21
|
});
|
|
22
22
|
/**
|
|
23
23
|
* Sets `sdkVersion` at the time of build
|