@imtbl/sdk 1.52.0 → 1.52.1-alpha.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.
Files changed (57) hide show
  1. package/dist/{blockchain_data-T7u5Hp0U.js → blockchain_data-DBBTvmmb.js} +2 -2
  2. package/dist/blockchain_data.d.ts +34 -3202
  3. package/dist/blockchain_data.js +3 -3
  4. package/dist/browser/checkout/{AddFundsWidget-DuG1OWEM.js → AddFundsWidget-SdKqlUUr.js} +124 -49
  5. package/dist/browser/checkout/{BridgeWidget-2D-8F1Vq.js → BridgeWidget-Bx1DFMXg.js} +11 -9
  6. package/dist/browser/checkout/{CheckoutWidget-Bvnur5WZ.js → CheckoutWidget-B1pE8Gc2.js} +81 -35
  7. package/dist/browser/checkout/{OnRampWidget-B4UV_TYW.js → OnRampWidget-bmvseWX-.js} +20 -12
  8. package/dist/browser/checkout/{SaleWidget-BQMUaWlZ.js → SaleWidget-Ddos1DHm.js} +9 -9
  9. package/dist/browser/checkout/{SpendingCapHero-BsQQYO_D.js → SpendingCapHero-BKdEyvIl.js} +1 -1
  10. package/dist/browser/checkout/{SwapWidget-BK7sTJ6u.js → SwapWidget-CrEzJos9.js} +12 -10
  11. package/dist/browser/checkout/{TextInputForm-Cy6sTMjr.js → TextInputForm-BvZsFFRK.js} +1 -1
  12. package/dist/browser/checkout/{TopUpView-Dw-JH0Q5.js → TopUpView-CojeMjuL.js} +1 -1
  13. package/dist/browser/checkout/{WalletWidget-t6i1V-G5.js → WalletWidget-DcoX5T7s.js} +7 -6
  14. package/dist/browser/checkout/{auto-track-CMv29U8a.js → auto-track-CPy9e41Q.js} +1 -1
  15. package/dist/browser/checkout/{balance-Dt4oB1G1.js → balance-_0wiNzA1.js} +2 -2
  16. package/dist/browser/checkout/{index-D2zks65E.js → index-2yp2sttp.js} +2 -2
  17. package/dist/browser/checkout/{index-BRzBLTux.js → index-4LGmzy2P.js} +1 -1
  18. package/dist/browser/checkout/{index-Zraoakam.js → index-BjnD8v8p.js} +1 -1
  19. package/dist/browser/checkout/{index-DmXFGYTM.js → index-BpduNNVl.js} +1 -1
  20. package/dist/browser/checkout/{index-D4zR0DRy.js → index-CPLIXtyA.js} +1 -1
  21. package/dist/browser/checkout/{index-CMBbtkDe.js → index-CcR4tO_g.js} +1 -1
  22. package/dist/browser/checkout/{index-5qc7Vsg4.js → index-DnQfQojQ.js} +63 -46
  23. package/dist/browser/checkout/{index-DwTyassh.js → index-Dv7_L5sJ.js} +1 -1
  24. package/dist/browser/checkout/{index.umd-CCwq6cRd.js → index.umd-LRNZ8nMO.js} +1 -1
  25. package/dist/browser/checkout/{retry-C_l6vh-l.js → retry-TNKwGgHJ.js} +1 -1
  26. package/dist/browser/checkout/sdk.js +5 -5
  27. package/dist/browser/checkout/widgets-esm.js +1 -1
  28. package/dist/browser/checkout/widgets.js +279 -128
  29. package/dist/{checkout-DxDRj3k-.js → checkout-BoEdWIoM.js} +7 -6
  30. package/dist/checkout.d.ts +38 -10
  31. package/dist/checkout.js +5 -5
  32. package/dist/{config-Dj7PQqL4.js → config-4V88kddG.js} +1 -1
  33. package/dist/config.js +1 -1
  34. package/dist/{index-8m8-bJcZ.js → index-5q3Doq32.js} +1 -1
  35. package/dist/{index-1bjDCdo5.js → index-CAL1gWlu.js} +4 -4
  36. package/dist/{index-XxjQ6oVx.js → index-D0T-P8dM.js} +53 -53
  37. package/dist/{index-D4eU2e1C.js → index-DDE1ZfXv.js} +1 -1
  38. package/dist/{index-BxF866Mh.js → index-Dg5cqGBu.js} +1 -1
  39. package/dist/{index-snMwBaY-.js → index-Dqva106f.js} +1 -1
  40. package/dist/index.browser.js +5 -5
  41. package/dist/index.browser.js.map +1 -1
  42. package/dist/index.cjs +66 -61
  43. package/dist/index.d.ts +266 -3404
  44. package/dist/index.js +14 -14
  45. package/dist/{minting_backend-DfBB5ptf.js → minting_backend-x7gO9bio.js} +3 -3
  46. package/dist/minting_backend.d.ts +312 -228
  47. package/dist/minting_backend.js +5 -5
  48. package/dist/{orderbook-CnmzmGtG.js → orderbook-BUiL0rqz.js} +1 -1
  49. package/dist/orderbook.js +2 -2
  50. package/dist/{passport-B8WhzCZf.js → passport-DGaas7w4.js} +10 -6
  51. package/dist/passport.d.ts +3 -1
  52. package/dist/passport.js +4 -4
  53. package/dist/{webhook-DzAoMhRT.js → webhook-Be5S01dB.js} +1 -1
  54. package/dist/webhook.js +2 -2
  55. package/dist/{x-DbbHwlbW.js → x-7ExOXsHk.js} +3 -3
  56. package/dist/x.js +4 -4
  57. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
- export { M as MintingBackendModule, a as mintingPersistencePg, b as mintingPersistencePrismaSqlite, p as processMint, r as recordMint, s as submitMintingRequests } from './minting_backend-DfBB5ptf.js';
2
- import './index-XxjQ6oVx.js';
3
- import './index-snMwBaY-.js';
1
+ export { M as MintingBackendModule, a as mintingPersistencePg, b as mintingPersistencePrismaSqlite, p as processMint, r as recordMint, s as submitMintingRequests } from './minting_backend-x7gO9bio.js';
2
+ import './index-D0T-P8dM.js';
3
+ import './index-Dqva106f.js';
4
4
  import 'axios';
5
- import './index-8m8-bJcZ.js';
5
+ import './index-5q3Doq32.js';
6
6
  import 'lru-memorise';
7
7
  import 'global-const';
8
- import './index-D4eU2e1C.js';
8
+ import './index-DDE1ZfXv.js';
9
9
  import 'sns-validator';
@@ -1,4 +1,4 @@
1
- import { A as ActionType, F as FeeType, O as OrderStatusName, a as Orderbook, S as SignablePurpose, T as TransactionPurpose, c as constants } from './index-BxF866Mh.js';
1
+ import { A as ActionType, F as FeeType, O as OrderStatusName, a as Orderbook, S as SignablePurpose, T as TransactionPurpose, c as constants } from './index-Dg5cqGBu.js';
2
2
 
3
3
  var orderbook = /*#__PURE__*/Object.freeze({
4
4
  __proto__: null,
package/dist/orderbook.js CHANGED
@@ -1,5 +1,5 @@
1
- export { A as ActionType, F as FeeType, O as OrderStatusName, a as Orderbook, S as SignablePurpose, T as TransactionPurpose, c as constants } from './index-BxF866Mh.js';
2
- import './index-8m8-bJcZ.js';
1
+ export { A as ActionType, F as FeeType, O as OrderStatusName, a as Orderbook, S as SignablePurpose, T as TransactionPurpose, c as constants } from './index-Dg5cqGBu.js';
2
+ import './index-5q3Doq32.js';
3
3
  import 'axios';
4
4
  import 'lru-memorise';
5
5
  import 'global-const';
@@ -1,7 +1,7 @@
1
1
  import globalAxios, { isAxiosError as isAxiosError$1 } from 'axios';
2
- import { M as MultiRollupApiClients, c as createConfig, m as multiRollupConfig, I as ImxApiClients, d as imxApiConfig } from './index-snMwBaY-.js';
3
- import { g as IMXClient, s as signRaw, c as convertToSignableToken, t as generateLegacyStarkPrivateKey, r as createStarkSigner } from './index-1bjDCdo5.js';
4
- import { c as setPassportClientId, t as track, d as trackFlow, e as trackError, u as utils$2, i as identify, g as getDetail, D as Detail, f as trackDuration, E as Environment } from './index-8m8-bJcZ.js';
2
+ import { M as MultiRollupApiClients, c as createConfig, m as multiRollupConfig, I as ImxApiClients, d as imxApiConfig } from './index-Dqva106f.js';
3
+ import { g as IMXClient, s as signRaw, c as convertToSignableToken, t as generateLegacyStarkPrivateKey, r as createStarkSigner } from './index-CAL1gWlu.js';
4
+ import { c as setPassportClientId, t as track, d as trackFlow, e as trackError, u as utils$2, i as identify, g as getDetail, D as Detail, f as trackDuration, E as Environment } from './index-5q3Doq32.js';
5
5
  import { UserManager, User, ErrorTimeout, ErrorResponse, InMemoryWebStorage, WebStorageStateStore } from 'oidc-client-ts';
6
6
  import * as crypto from 'crypto';
7
7
  import jwt_decode from 'jwt-decode';
@@ -4879,7 +4879,7 @@ class AuthManager {
4879
4879
  return user || this.login();
4880
4880
  }
4881
4881
  async loginCallback() {
4882
- return withPassportError(async () => this.userManager.signinPopupCallback(), PassportErrorType.AUTHENTICATION_ERROR);
4882
+ return withPassportError(async () => { await this.userManager.signinCallback(); }, PassportErrorType.AUTHENTICATION_ERROR);
4883
4883
  }
4884
4884
  /**
4885
4885
  * loginWithDeviceFlow
@@ -7740,11 +7740,12 @@ class Passport {
7740
7740
  * @param options.useCachedSession = false - If true, and no active session exists, then the user will not be
7741
7741
  * prompted to log in and the Promise will resolve with a null value.
7742
7742
  * @param options.anonymousId - If provided, Passport internal metrics will be enriched with this value.
7743
+ * @param options.useSilentLogin - If true, and no active session exists, then the user will not be prompted to log in. Instead, we will attempt to authenticate the user silently. This approach will fail if the user does not have an active session with the authentication server, or if user input is required (for example, consent is required).
7743
7744
  * @returns {Promise<UserProfile | null>} the user profile if the user is logged in, otherwise null
7744
7745
  */
7745
7746
  async login(options) {
7746
7747
  return withMetricsAsync(async () => {
7747
- const { useCachedSession = false } = options || {};
7748
+ const { useCachedSession = false, useSilentLogin } = options || {};
7748
7749
  let user = null;
7749
7750
  try {
7750
7751
  user = await this.authManager.getUser();
@@ -7758,7 +7759,10 @@ class Passport {
7758
7759
  }
7759
7760
  logger.warn('Failed to retrieve a cached user session', error);
7760
7761
  }
7761
- if (!user && !useCachedSession) {
7762
+ if (!user && useSilentLogin) {
7763
+ user = await this.authManager.forceUserRefresh();
7764
+ }
7765
+ else if (!user && !useCachedSession) {
7762
7766
  user = await this.authManager.login(options?.anonymousId);
7763
7767
  }
7764
7768
  if (user) {
@@ -13770,11 +13770,13 @@ declare class Passport {
13770
13770
  * @param options.useCachedSession = false - If true, and no active session exists, then the user will not be
13771
13771
  * prompted to log in and the Promise will resolve with a null value.
13772
13772
  * @param options.anonymousId - If provided, Passport internal metrics will be enriched with this value.
13773
+ * @param options.useSilentLogin - If true, and no active session exists, then the user will not be prompted to log in. Instead, we will attempt to authenticate the user silently. This approach will fail if the user does not have an active session with the authentication server, or if user input is required (for example, consent is required).
13773
13774
  * @returns {Promise<UserProfile | null>} the user profile if the user is logged in, otherwise null
13774
13775
  */
13775
13776
  login(options?: {
13776
- useCachedSession: boolean;
13777
+ useCachedSession?: boolean;
13777
13778
  anonymousId?: string;
13779
+ useSilentLogin?: boolean;
13778
13780
  }): Promise<UserProfile | null>;
13779
13781
  loginCallback(): Promise<void>;
13780
13782
  loginWithDeviceFlow(options?: {
package/dist/passport.js CHANGED
@@ -1,8 +1,8 @@
1
- export { J as JsonRpcError, P as Passport, a as PassportError, b as ProviderErrorCode, c as ProviderEvent, R as RpcErrorCode } from './passport-B8WhzCZf.js';
1
+ export { J as JsonRpcError, P as Passport, a as PassportError, b as ProviderErrorCode, c as ProviderEvent, R as RpcErrorCode } from './passport-DGaas7w4.js';
2
2
  import 'axios';
3
- import './index-snMwBaY-.js';
4
- import './index-1bjDCdo5.js';
5
- import './index-8m8-bJcZ.js';
3
+ import './index-Dqva106f.js';
4
+ import './index-CAL1gWlu.js';
5
+ import './index-5q3Doq32.js';
6
6
  import 'lru-memorise';
7
7
  import 'global-const';
8
8
  import '@ethersproject/keccak256';
@@ -1,4 +1,4 @@
1
- import { h as handle } from './index-D4eU2e1C.js';
1
+ import { h as handle } from './index-DDE1ZfXv.js';
2
2
 
3
3
  var webhook = /*#__PURE__*/Object.freeze({
4
4
  __proto__: null,
package/dist/webhook.js CHANGED
@@ -1,6 +1,6 @@
1
- export { h as handle } from './index-D4eU2e1C.js';
1
+ export { h as handle } from './index-DDE1ZfXv.js';
2
2
  import 'sns-validator';
3
- import './index-8m8-bJcZ.js';
3
+ import './index-5q3Doq32.js';
4
4
  import 'axios';
5
5
  import 'lru-memorise';
6
6
  import 'global-const';
@@ -1,12 +1,12 @@
1
- import { I as ImxConfiguration, c as convertToSignableToken, s as signRaw, e as exportContracts, a as signMessage, E as EncodingApi, M as MintsApi, b as signRegisterEthAddress, A as ApiConfiguration, d as AssetsApi, B as BalancesApi, C as CollectionsApi, D as DepositsApi, f as ExchangesApi, g as IMXClient, h as IMXError, i as ImmutableX, j as MetadataApi, k as MetadataRefreshesApi, l as MetadataSchemaRequestTypeEnum, N as NftCheckoutPrimaryApi, O as OrdersApi, P as PrimarySalesApi, m as ProjectsApi, T as TokensApi, n as TradesApi, o as TransfersApi, U as UsersApi, W as WithdrawalsApi, p as createConfig, q as createImmutableXConfiguration, r as createStarkSigner, t as generateLegacyStarkPrivateKey, u as generateStarkPrivateKey, v as imxClientConfig, w as production, x as sandbox, y as serializePackedSignature, z as starkEcOrder } from './index-1bjDCdo5.js';
2
- import { b as index$2 } from './index-snMwBaY-.js';
1
+ import { I as ImxConfiguration, c as convertToSignableToken, s as signRaw, e as exportContracts, a as signMessage, E as EncodingApi, M as MintsApi, b as signRegisterEthAddress, A as ApiConfiguration, d as AssetsApi, B as BalancesApi, C as CollectionsApi, D as DepositsApi, f as ExchangesApi, g as IMXClient, h as IMXError, i as ImmutableX, j as MetadataApi, k as MetadataRefreshesApi, l as MetadataSchemaRequestTypeEnum, N as NftCheckoutPrimaryApi, O as OrdersApi, P as PrimarySalesApi, m as ProjectsApi, T as TokensApi, n as TradesApi, o as TransfersApi, U as UsersApi, W as WithdrawalsApi, p as createConfig, q as createImmutableXConfiguration, r as createStarkSigner, t as generateLegacyStarkPrivateKey, u as generateStarkPrivateKey, v as imxClientConfig, w as production, x as sandbox, y as serializePackedSignature, z as starkEcOrder } from './index-CAL1gWlu.js';
2
+ import { b as index$2 } from './index-Dqva106f.js';
3
3
  import { isAxiosError } from 'axios';
4
4
  import * as encUtils from 'enc-utils';
5
5
  import { parseUnits } from '@ethersproject/units';
6
6
  import { BigNumber } from '@ethersproject/bignumber';
7
7
  import { ethers } from 'ethers';
8
8
  import detectEthereumProvider from '@metamask/detect-provider';
9
- import { E as Environment, I as ImmutableConfiguration } from './index-8m8-bJcZ.js';
9
+ import { E as Environment, I as ImmutableConfiguration } from './index-5q3Doq32.js';
10
10
  import { Signer } from '@ethersproject/abstract-signer';
11
11
 
12
12
  function isChainValid(chainID, config) {
package/dist/x.js CHANGED
@@ -1,8 +1,8 @@
1
- export { A as ApiConfiguration, d as AssetsApi, B as BalancesApi, C as CollectionsApi, e as Contracts, D as DepositsApi, E as EncodingApi, f as ExchangesApi, g as IMXClient, h as IMXError, i as ImmutableX, I as ImxConfiguration, j as MetadataApi, k as MetadataRefreshesApi, l as MetadataSchemaRequestTypeEnum, M as MintsApi, N as NftCheckoutPrimaryApi, O as OrdersApi, P as PrimarySalesApi, m as ProjectsApi, T as TokensApi, n as TradesApi, o as TransfersApi, U as UsersApi, W as WithdrawalsApi, p as createConfig, q as createImmutableXConfiguration, r as createStarkSigner, t as generateLegacyStarkPrivateKey, u as generateStarkPrivateKey, v as imxClientConfig, r as imxClientCreateStarkSigner, t as imxClientGenerateLegacyStarkPrivateKey, w as production, x as sandbox, y as serializePackedSignature, b as signRegisterEthAddress, z as starkEcOrder } from './index-1bjDCdo5.js';
2
- export { G as GenericIMXProvider, M as MetaMaskIMXProvider, P as ProviderConfiguration } from './x-DbbHwlbW.js';
3
- export { E as Environment, I as ImmutableConfiguration } from './index-8m8-bJcZ.js';
1
+ export { A as ApiConfiguration, d as AssetsApi, B as BalancesApi, C as CollectionsApi, e as Contracts, D as DepositsApi, E as EncodingApi, f as ExchangesApi, g as IMXClient, h as IMXError, i as ImmutableX, I as ImxConfiguration, j as MetadataApi, k as MetadataRefreshesApi, l as MetadataSchemaRequestTypeEnum, M as MintsApi, N as NftCheckoutPrimaryApi, O as OrdersApi, P as PrimarySalesApi, m as ProjectsApi, T as TokensApi, n as TradesApi, o as TransfersApi, U as UsersApi, W as WithdrawalsApi, p as createConfig, q as createImmutableXConfiguration, r as createStarkSigner, t as generateLegacyStarkPrivateKey, u as generateStarkPrivateKey, v as imxClientConfig, r as imxClientCreateStarkSigner, t as imxClientGenerateLegacyStarkPrivateKey, w as production, x as sandbox, y as serializePackedSignature, b as signRegisterEthAddress, z as starkEcOrder } from './index-CAL1gWlu.js';
2
+ export { G as GenericIMXProvider, M as MetaMaskIMXProvider, P as ProviderConfiguration } from './x-7ExOXsHk.js';
3
+ export { E as Environment, I as ImmutableConfiguration } from './index-5q3Doq32.js';
4
4
  export { Signer as EthSigner } from '@ethersproject/abstract-signer';
5
- import './index-snMwBaY-.js';
5
+ import './index-Dqva106f.js';
6
6
  import 'axios';
7
7
  import '@ethersproject/keccak256';
8
8
  import '@ethersproject/strings';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@imtbl/sdk",
3
3
  "description": "Immutable Typescript SDK",
4
- "version": "1.52.0",
4
+ "version": "1.52.1-alpha.1",
5
5
  "author": "Immutable",
6
6
  "browser": "./dist/index.browser.js",
7
7
  "bugs": "https://github.com/immutable/ts-immutable-sdk/issues",