@unifold/core 0.1.26 → 0.1.27

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/index.d.mts CHANGED
@@ -22,7 +22,7 @@ declare function getIconUrl(iconPath: string): string;
22
22
  declare function getIconUrlWithCdn(iconPath: string, assetCdnUrl?: string): string;
23
23
  interface Wallet {
24
24
  id: string;
25
- chain_type: "ethereum" | "solana" | "bitcoin" | "algorand";
25
+ chain_type: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl";
26
26
  address_type: string | null;
27
27
  address: string;
28
28
  destination_chain_type: string;
@@ -51,7 +51,7 @@ declare function createDepositAddress(overrides?: Partial<CreateDepositAddressRe
51
51
  /**
52
52
  * Get wallet address for a specific chain type
53
53
  */
54
- declare function getWalletByChainType(wallets: Wallet[], chainType: "ethereum" | "solana" | "bitcoin" | "algorand"): Wallet | undefined;
54
+ declare function getWalletByChainType(wallets: Wallet[], chainType: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl"): Wallet | undefined;
55
55
  interface AutoSwapRequest {
56
56
  wallet_id: string;
57
57
  origin_currency: string;
@@ -420,11 +420,16 @@ interface TokenInfo {
420
420
  chain_icon_url: string;
421
421
  chain_icon_urls: TokenIconUrl[];
422
422
  }
423
+ declare enum IneligibilityReason {
424
+ MINIMUM_NOT_MET = "minimum_not_met",
425
+ NOT_SUPPORTED_DEPOSIT_FROM = "not_supported_deposit_from"
426
+ }
423
427
  interface TokenBalance {
424
428
  amount: string;
425
429
  amount_usd: string | null;
426
430
  exchange_rate: string | null;
427
431
  is_eligible: boolean;
432
+ ineligibility_reason: IneligibilityReason | null;
428
433
  token: TokenInfo;
429
434
  }
430
435
  interface AddressBalancesResponse {
@@ -626,4 +631,4 @@ declare const i18n: {
626
631
  };
627
632
  type I18nStrings = typeof i18n;
628
633
 
629
- export { type AddressBalanceResponse, type AddressBalancesResponse, type AddressValidationFailureCode, type AddressValidationMetadata, type AutoSwapRequest, type AutoSwapResponse, type BuildSolanaTransactionRequest, type BuildSolanaTransactionResponse, type CreateDepositAddressRequest, type DefaultTokenChain, type DefaultTokenMetadata, type DefaultTokenResponse, type DepositAddressResponse, ExecutionStatus, type FeaturedToken, type FiatCurrenciesResponse, type FiatCurrency, type I18nStrings, type IconUrl, type IpAddressResponse, type OnrampQuote, type OnrampQuotesRequest, type OnrampQuotesResponse, type OnrampSessionRequest, type OnrampSessionResponse, type PaymentNetwork, type PollExecutionsRequest, type PollExecutionsResponse, type ProjectConfigResponse, type QueryExecutionsRequest, type QueryExecutionsResponse, SOLANA_USDC_ADDRESS, type SendSolanaTransactionRequest, type SendSolanaTransactionResponse, type SupportedChain, type SupportedDepositTokensResponse, type SupportedToken, type TokenBalance, type TokenChain, type TokenChainIconUrl, type TokenChainsResponse, type TokenIconUrl, type TokenInfo, type TokenMetadata, type UserIpInfo, type VerifyAddressRequest, type VerifyAddressResponse, type Wallet, buildSolanaTransaction, createDepositAddress, createOnrampSession, getAddressBalance, getAddressBalances, getApiBaseUrl, getChainName, getDefaultOnrampToken, getFiatCurrencies, getIconUrl, getIconUrlWithCdn, getIpAddress, getOnrampQuotes, getOnrampSessionStartUrl, getPreferredIconUrl, getProjectConfig, getSupportedDepositTokens, getTokenChains, getTokenMetadata, getWalletByChainType, i18n, pollDirectExecutions, queryExecutions, sendSolanaTransaction, setApiConfig, useUserIp, verifyRecipientAddress };
634
+ export { type AddressBalanceResponse, type AddressBalancesResponse, type AddressValidationFailureCode, type AddressValidationMetadata, type AutoSwapRequest, type AutoSwapResponse, type BuildSolanaTransactionRequest, type BuildSolanaTransactionResponse, type CreateDepositAddressRequest, type DefaultTokenChain, type DefaultTokenMetadata, type DefaultTokenResponse, type DepositAddressResponse, ExecutionStatus, type FeaturedToken, type FiatCurrenciesResponse, type FiatCurrency, type I18nStrings, type IconUrl, IneligibilityReason, type IpAddressResponse, type OnrampQuote, type OnrampQuotesRequest, type OnrampQuotesResponse, type OnrampSessionRequest, type OnrampSessionResponse, type PaymentNetwork, type PollExecutionsRequest, type PollExecutionsResponse, type ProjectConfigResponse, type QueryExecutionsRequest, type QueryExecutionsResponse, SOLANA_USDC_ADDRESS, type SendSolanaTransactionRequest, type SendSolanaTransactionResponse, type SupportedChain, type SupportedDepositTokensResponse, type SupportedToken, type TokenBalance, type TokenChain, type TokenChainIconUrl, type TokenChainsResponse, type TokenIconUrl, type TokenInfo, type TokenMetadata, type UserIpInfo, type VerifyAddressRequest, type VerifyAddressResponse, type Wallet, buildSolanaTransaction, createDepositAddress, createOnrampSession, getAddressBalance, getAddressBalances, getApiBaseUrl, getChainName, getDefaultOnrampToken, getFiatCurrencies, getIconUrl, getIconUrlWithCdn, getIpAddress, getOnrampQuotes, getOnrampSessionStartUrl, getPreferredIconUrl, getProjectConfig, getSupportedDepositTokens, getTokenChains, getTokenMetadata, getWalletByChainType, i18n, pollDirectExecutions, queryExecutions, sendSolanaTransaction, setApiConfig, useUserIp, verifyRecipientAddress };
package/dist/index.d.ts CHANGED
@@ -22,7 +22,7 @@ declare function getIconUrl(iconPath: string): string;
22
22
  declare function getIconUrlWithCdn(iconPath: string, assetCdnUrl?: string): string;
23
23
  interface Wallet {
24
24
  id: string;
25
- chain_type: "ethereum" | "solana" | "bitcoin" | "algorand";
25
+ chain_type: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl";
26
26
  address_type: string | null;
27
27
  address: string;
28
28
  destination_chain_type: string;
@@ -51,7 +51,7 @@ declare function createDepositAddress(overrides?: Partial<CreateDepositAddressRe
51
51
  /**
52
52
  * Get wallet address for a specific chain type
53
53
  */
54
- declare function getWalletByChainType(wallets: Wallet[], chainType: "ethereum" | "solana" | "bitcoin" | "algorand"): Wallet | undefined;
54
+ declare function getWalletByChainType(wallets: Wallet[], chainType: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl"): Wallet | undefined;
55
55
  interface AutoSwapRequest {
56
56
  wallet_id: string;
57
57
  origin_currency: string;
@@ -420,11 +420,16 @@ interface TokenInfo {
420
420
  chain_icon_url: string;
421
421
  chain_icon_urls: TokenIconUrl[];
422
422
  }
423
+ declare enum IneligibilityReason {
424
+ MINIMUM_NOT_MET = "minimum_not_met",
425
+ NOT_SUPPORTED_DEPOSIT_FROM = "not_supported_deposit_from"
426
+ }
423
427
  interface TokenBalance {
424
428
  amount: string;
425
429
  amount_usd: string | null;
426
430
  exchange_rate: string | null;
427
431
  is_eligible: boolean;
432
+ ineligibility_reason: IneligibilityReason | null;
428
433
  token: TokenInfo;
429
434
  }
430
435
  interface AddressBalancesResponse {
@@ -626,4 +631,4 @@ declare const i18n: {
626
631
  };
627
632
  type I18nStrings = typeof i18n;
628
633
 
629
- export { type AddressBalanceResponse, type AddressBalancesResponse, type AddressValidationFailureCode, type AddressValidationMetadata, type AutoSwapRequest, type AutoSwapResponse, type BuildSolanaTransactionRequest, type BuildSolanaTransactionResponse, type CreateDepositAddressRequest, type DefaultTokenChain, type DefaultTokenMetadata, type DefaultTokenResponse, type DepositAddressResponse, ExecutionStatus, type FeaturedToken, type FiatCurrenciesResponse, type FiatCurrency, type I18nStrings, type IconUrl, type IpAddressResponse, type OnrampQuote, type OnrampQuotesRequest, type OnrampQuotesResponse, type OnrampSessionRequest, type OnrampSessionResponse, type PaymentNetwork, type PollExecutionsRequest, type PollExecutionsResponse, type ProjectConfigResponse, type QueryExecutionsRequest, type QueryExecutionsResponse, SOLANA_USDC_ADDRESS, type SendSolanaTransactionRequest, type SendSolanaTransactionResponse, type SupportedChain, type SupportedDepositTokensResponse, type SupportedToken, type TokenBalance, type TokenChain, type TokenChainIconUrl, type TokenChainsResponse, type TokenIconUrl, type TokenInfo, type TokenMetadata, type UserIpInfo, type VerifyAddressRequest, type VerifyAddressResponse, type Wallet, buildSolanaTransaction, createDepositAddress, createOnrampSession, getAddressBalance, getAddressBalances, getApiBaseUrl, getChainName, getDefaultOnrampToken, getFiatCurrencies, getIconUrl, getIconUrlWithCdn, getIpAddress, getOnrampQuotes, getOnrampSessionStartUrl, getPreferredIconUrl, getProjectConfig, getSupportedDepositTokens, getTokenChains, getTokenMetadata, getWalletByChainType, i18n, pollDirectExecutions, queryExecutions, sendSolanaTransaction, setApiConfig, useUserIp, verifyRecipientAddress };
634
+ export { type AddressBalanceResponse, type AddressBalancesResponse, type AddressValidationFailureCode, type AddressValidationMetadata, type AutoSwapRequest, type AutoSwapResponse, type BuildSolanaTransactionRequest, type BuildSolanaTransactionResponse, type CreateDepositAddressRequest, type DefaultTokenChain, type DefaultTokenMetadata, type DefaultTokenResponse, type DepositAddressResponse, ExecutionStatus, type FeaturedToken, type FiatCurrenciesResponse, type FiatCurrency, type I18nStrings, type IconUrl, IneligibilityReason, type IpAddressResponse, type OnrampQuote, type OnrampQuotesRequest, type OnrampQuotesResponse, type OnrampSessionRequest, type OnrampSessionResponse, type PaymentNetwork, type PollExecutionsRequest, type PollExecutionsResponse, type ProjectConfigResponse, type QueryExecutionsRequest, type QueryExecutionsResponse, SOLANA_USDC_ADDRESS, type SendSolanaTransactionRequest, type SendSolanaTransactionResponse, type SupportedChain, type SupportedDepositTokensResponse, type SupportedToken, type TokenBalance, type TokenChain, type TokenChainIconUrl, type TokenChainsResponse, type TokenIconUrl, type TokenInfo, type TokenMetadata, type UserIpInfo, type VerifyAddressRequest, type VerifyAddressResponse, type Wallet, buildSolanaTransaction, createDepositAddress, createOnrampSession, getAddressBalance, getAddressBalances, getApiBaseUrl, getChainName, getDefaultOnrampToken, getFiatCurrencies, getIconUrl, getIconUrlWithCdn, getIpAddress, getOnrampQuotes, getOnrampSessionStartUrl, getPreferredIconUrl, getProjectConfig, getSupportedDepositTokens, getTokenChains, getTokenMetadata, getWalletByChainType, i18n, pollDirectExecutions, queryExecutions, sendSolanaTransaction, setApiConfig, useUserIp, verifyRecipientAddress };
package/dist/index.js CHANGED
@@ -21,6 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
23
  ExecutionStatus: () => ExecutionStatus,
24
+ IneligibilityReason: () => IneligibilityReason,
24
25
  SOLANA_USDC_ADDRESS: () => SOLANA_USDC_ADDRESS,
25
26
  buildSolanaTransaction: () => buildSolanaTransaction,
26
27
  createDepositAddress: () => createDepositAddress,
@@ -397,6 +398,11 @@ async function getIpAddress() {
397
398
  }
398
399
  return response.json();
399
400
  }
401
+ var IneligibilityReason = /* @__PURE__ */ ((IneligibilityReason2) => {
402
+ IneligibilityReason2["MINIMUM_NOT_MET"] = "minimum_not_met";
403
+ IneligibilityReason2["NOT_SUPPORTED_DEPOSIT_FROM"] = "not_supported_deposit_from";
404
+ return IneligibilityReason2;
405
+ })(IneligibilityReason || {});
400
406
  async function getAddressBalances(address, chainType, publishableKey) {
401
407
  const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
402
408
  validatePublishableKey(pk);
@@ -609,6 +615,7 @@ var i18n = en_default;
609
615
  // Annotate the CommonJS export names for ESM import in node:
610
616
  0 && (module.exports = {
611
617
  ExecutionStatus,
618
+ IneligibilityReason,
612
619
  SOLANA_USDC_ADDRESS,
613
620
  buildSolanaTransaction,
614
621
  createDepositAddress,
package/dist/index.mjs CHANGED
@@ -343,6 +343,11 @@ async function getIpAddress() {
343
343
  }
344
344
  return response.json();
345
345
  }
346
+ var IneligibilityReason = /* @__PURE__ */ ((IneligibilityReason2) => {
347
+ IneligibilityReason2["MINIMUM_NOT_MET"] = "minimum_not_met";
348
+ IneligibilityReason2["NOT_SUPPORTED_DEPOSIT_FROM"] = "not_supported_deposit_from";
349
+ return IneligibilityReason2;
350
+ })(IneligibilityReason || {});
346
351
  async function getAddressBalances(address, chainType, publishableKey) {
347
352
  const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
348
353
  validatePublishableKey(pk);
@@ -554,6 +559,7 @@ var en_default = {
554
559
  var i18n = en_default;
555
560
  export {
556
561
  ExecutionStatus,
562
+ IneligibilityReason,
557
563
  SOLANA_USDC_ADDRESS,
558
564
  buildSolanaTransaction,
559
565
  createDepositAddress,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unifold/core",
3
- "version": "0.1.26",
3
+ "version": "0.1.27",
4
4
  "description": "Unifold Core SDK - Core types, API client, and business logic",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",