@unifold/core 0.1.43 → 0.1.45
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 +15 -1
- package/dist/index.d.ts +15 -1
- package/dist/index.js +24 -0
- package/dist/index.mjs +23 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -524,6 +524,20 @@ interface VerifyAddressResponse {
|
|
|
524
524
|
* @returns Verification result with valid status and reason if invalid
|
|
525
525
|
*/
|
|
526
526
|
declare function verifyRecipientAddress(request: VerifyAddressRequest, publishableKey?: string): Promise<VerifyAddressResponse>;
|
|
527
|
+
interface HypercoreActivationRequest {
|
|
528
|
+
source_address: string;
|
|
529
|
+
recipient_address: string;
|
|
530
|
+
}
|
|
531
|
+
interface HypercoreActivationResponse {
|
|
532
|
+
user_exists: boolean;
|
|
533
|
+
activation_fee: number;
|
|
534
|
+
is_sanctioned: boolean;
|
|
535
|
+
}
|
|
536
|
+
/**
|
|
537
|
+
* Check whether a recipient address is activated on HyperCore (Hyperliquid L1).
|
|
538
|
+
* Returns whether the recipient exists and the activation fee if not.
|
|
539
|
+
*/
|
|
540
|
+
declare function checkHypercoreActivation(request: HypercoreActivationRequest, publishableKey?: string): Promise<HypercoreActivationResponse>;
|
|
527
541
|
interface ExchangeProviderInfo {
|
|
528
542
|
service_provider: string;
|
|
529
543
|
service_provider_display_name: string;
|
|
@@ -860,4 +874,4 @@ declare const i18n: {
|
|
|
860
874
|
};
|
|
861
875
|
type I18nStrings = typeof i18n;
|
|
862
876
|
|
|
863
|
-
export { ActionType, type AddressBalanceResponse, type AddressBalancesResponse, type AddressValidationFailureCode, type AddressValidationMetadata, type AutoSwapRequest, type AutoSwapResponse, type BuildHypercoreTransactionRequest, type BuildHypercoreTransactionResponse, type BuildSolanaTransactionRequest, type BuildSolanaTransactionResponse, type ChainType, type CreateDepositAddressRequest, type CreateExchangeSessionRequest, type CreateExchangeSessionResponse, type DefaultTokenChain, type DefaultTokenMetadata, type DefaultTokenResponse, type DepositAddressResponse, type DepositQuote, type DepositQuoteRequest, type DestinationToken, type DestinationTokenChain, type ExchangeProviderInfo, type ExchangeProvidersResponse, type ExchangeSessionStartParams, type ExchangeWalletAddress, ExecutionStatus, type FeaturedToken, type FiatCurrenciesResponse, type FiatCurrency, type GetExchangesQuery, type HypercoreActionType, type I18nStrings, type IconUrl, IneligibilityReason, type IpAddressResponse, type OnrampQuote, type OnrampQuotesRequest, type OnrampQuotesResponse, type OnrampSessionRequest, type OnrampSessionResponse, type PaymentIntent, type PaymentIntentDepositAddress, type PaymentIntentExecutionsResponse, type PaymentNetwork, type PollExecutionsRequest, type PollExecutionsResponse, type ProjectConfigResponse, type QueryExecutionsRequest, type QueryExecutionsResponse, SOLANA_USDC_ADDRESS, type SendHypercoreTransactionRequest, type SendHypercoreTransactionResponse, type SendSolanaTransactionRequest, type SendSolanaTransactionResponse, type SupportedChain, type SupportedDepositTokensResponse, type SupportedDestinationTokensResponse, type SupportedToken, type TokenBalance, type TokenChain, type TokenChainIconUrl, type TokenChainsResponse, type TokenIconUrl, type TokenInfo, type TokenMetadata, type UserIpInfo, type VerifyAddressRequest, type VerifyAddressResponse, type Wallet, buildHypercoreTransaction, buildSolanaTransaction, createDepositAddress, createExchangeSession, createOnrampSession, getAddressBalance, getAddressBalances, getApiBaseUrl, getChainName, getDefaultOnrampToken, getDepositQuote, getExchangeSessionStartUrl, getExchanges, getFiatCurrencies, getIconUrl, getIconUrlWithCdn, getIpAddress, getOnrampQuotes, getOnrampSessionStartUrl, getPreferredIconUrl, getProjectConfig, getSupportedDepositTokens, getSupportedDestinationTokens, getTokenChains, getTokenMetadata, getWalletByChainType, i18n, listPaymentIntentExecutions, pollDirectExecutions, queryExecutions, retrievePaymentIntent, sendHypercoreTransaction, sendSolanaTransaction, setApiConfig, useUserIp, verifyRecipientAddress };
|
|
877
|
+
export { ActionType, type AddressBalanceResponse, type AddressBalancesResponse, type AddressValidationFailureCode, type AddressValidationMetadata, type AutoSwapRequest, type AutoSwapResponse, type BuildHypercoreTransactionRequest, type BuildHypercoreTransactionResponse, type BuildSolanaTransactionRequest, type BuildSolanaTransactionResponse, type ChainType, type CreateDepositAddressRequest, type CreateExchangeSessionRequest, type CreateExchangeSessionResponse, type DefaultTokenChain, type DefaultTokenMetadata, type DefaultTokenResponse, type DepositAddressResponse, type DepositQuote, type DepositQuoteRequest, type DestinationToken, type DestinationTokenChain, type ExchangeProviderInfo, type ExchangeProvidersResponse, type ExchangeSessionStartParams, type ExchangeWalletAddress, ExecutionStatus, type FeaturedToken, type FiatCurrenciesResponse, type FiatCurrency, type GetExchangesQuery, type HypercoreActionType, type HypercoreActivationRequest, type HypercoreActivationResponse, type I18nStrings, type IconUrl, IneligibilityReason, type IpAddressResponse, type OnrampQuote, type OnrampQuotesRequest, type OnrampQuotesResponse, type OnrampSessionRequest, type OnrampSessionResponse, type PaymentIntent, type PaymentIntentDepositAddress, type PaymentIntentExecutionsResponse, type PaymentNetwork, type PollExecutionsRequest, type PollExecutionsResponse, type ProjectConfigResponse, type QueryExecutionsRequest, type QueryExecutionsResponse, SOLANA_USDC_ADDRESS, type SendHypercoreTransactionRequest, type SendHypercoreTransactionResponse, type SendSolanaTransactionRequest, type SendSolanaTransactionResponse, type SupportedChain, type SupportedDepositTokensResponse, type SupportedDestinationTokensResponse, type SupportedToken, type TokenBalance, type TokenChain, type TokenChainIconUrl, type TokenChainsResponse, type TokenIconUrl, type TokenInfo, type TokenMetadata, type UserIpInfo, type VerifyAddressRequest, type VerifyAddressResponse, type Wallet, buildHypercoreTransaction, buildSolanaTransaction, checkHypercoreActivation, createDepositAddress, createExchangeSession, createOnrampSession, getAddressBalance, getAddressBalances, getApiBaseUrl, getChainName, getDefaultOnrampToken, getDepositQuote, getExchangeSessionStartUrl, getExchanges, getFiatCurrencies, getIconUrl, getIconUrlWithCdn, getIpAddress, getOnrampQuotes, getOnrampSessionStartUrl, getPreferredIconUrl, getProjectConfig, getSupportedDepositTokens, getSupportedDestinationTokens, getTokenChains, getTokenMetadata, getWalletByChainType, i18n, listPaymentIntentExecutions, pollDirectExecutions, queryExecutions, retrievePaymentIntent, sendHypercoreTransaction, sendSolanaTransaction, setApiConfig, useUserIp, verifyRecipientAddress };
|
package/dist/index.d.ts
CHANGED
|
@@ -524,6 +524,20 @@ interface VerifyAddressResponse {
|
|
|
524
524
|
* @returns Verification result with valid status and reason if invalid
|
|
525
525
|
*/
|
|
526
526
|
declare function verifyRecipientAddress(request: VerifyAddressRequest, publishableKey?: string): Promise<VerifyAddressResponse>;
|
|
527
|
+
interface HypercoreActivationRequest {
|
|
528
|
+
source_address: string;
|
|
529
|
+
recipient_address: string;
|
|
530
|
+
}
|
|
531
|
+
interface HypercoreActivationResponse {
|
|
532
|
+
user_exists: boolean;
|
|
533
|
+
activation_fee: number;
|
|
534
|
+
is_sanctioned: boolean;
|
|
535
|
+
}
|
|
536
|
+
/**
|
|
537
|
+
* Check whether a recipient address is activated on HyperCore (Hyperliquid L1).
|
|
538
|
+
* Returns whether the recipient exists and the activation fee if not.
|
|
539
|
+
*/
|
|
540
|
+
declare function checkHypercoreActivation(request: HypercoreActivationRequest, publishableKey?: string): Promise<HypercoreActivationResponse>;
|
|
527
541
|
interface ExchangeProviderInfo {
|
|
528
542
|
service_provider: string;
|
|
529
543
|
service_provider_display_name: string;
|
|
@@ -860,4 +874,4 @@ declare const i18n: {
|
|
|
860
874
|
};
|
|
861
875
|
type I18nStrings = typeof i18n;
|
|
862
876
|
|
|
863
|
-
export { ActionType, type AddressBalanceResponse, type AddressBalancesResponse, type AddressValidationFailureCode, type AddressValidationMetadata, type AutoSwapRequest, type AutoSwapResponse, type BuildHypercoreTransactionRequest, type BuildHypercoreTransactionResponse, type BuildSolanaTransactionRequest, type BuildSolanaTransactionResponse, type ChainType, type CreateDepositAddressRequest, type CreateExchangeSessionRequest, type CreateExchangeSessionResponse, type DefaultTokenChain, type DefaultTokenMetadata, type DefaultTokenResponse, type DepositAddressResponse, type DepositQuote, type DepositQuoteRequest, type DestinationToken, type DestinationTokenChain, type ExchangeProviderInfo, type ExchangeProvidersResponse, type ExchangeSessionStartParams, type ExchangeWalletAddress, ExecutionStatus, type FeaturedToken, type FiatCurrenciesResponse, type FiatCurrency, type GetExchangesQuery, type HypercoreActionType, type I18nStrings, type IconUrl, IneligibilityReason, type IpAddressResponse, type OnrampQuote, type OnrampQuotesRequest, type OnrampQuotesResponse, type OnrampSessionRequest, type OnrampSessionResponse, type PaymentIntent, type PaymentIntentDepositAddress, type PaymentIntentExecutionsResponse, type PaymentNetwork, type PollExecutionsRequest, type PollExecutionsResponse, type ProjectConfigResponse, type QueryExecutionsRequest, type QueryExecutionsResponse, SOLANA_USDC_ADDRESS, type SendHypercoreTransactionRequest, type SendHypercoreTransactionResponse, type SendSolanaTransactionRequest, type SendSolanaTransactionResponse, type SupportedChain, type SupportedDepositTokensResponse, type SupportedDestinationTokensResponse, type SupportedToken, type TokenBalance, type TokenChain, type TokenChainIconUrl, type TokenChainsResponse, type TokenIconUrl, type TokenInfo, type TokenMetadata, type UserIpInfo, type VerifyAddressRequest, type VerifyAddressResponse, type Wallet, buildHypercoreTransaction, buildSolanaTransaction, createDepositAddress, createExchangeSession, createOnrampSession, getAddressBalance, getAddressBalances, getApiBaseUrl, getChainName, getDefaultOnrampToken, getDepositQuote, getExchangeSessionStartUrl, getExchanges, getFiatCurrencies, getIconUrl, getIconUrlWithCdn, getIpAddress, getOnrampQuotes, getOnrampSessionStartUrl, getPreferredIconUrl, getProjectConfig, getSupportedDepositTokens, getSupportedDestinationTokens, getTokenChains, getTokenMetadata, getWalletByChainType, i18n, listPaymentIntentExecutions, pollDirectExecutions, queryExecutions, retrievePaymentIntent, sendHypercoreTransaction, sendSolanaTransaction, setApiConfig, useUserIp, verifyRecipientAddress };
|
|
877
|
+
export { ActionType, type AddressBalanceResponse, type AddressBalancesResponse, type AddressValidationFailureCode, type AddressValidationMetadata, type AutoSwapRequest, type AutoSwapResponse, type BuildHypercoreTransactionRequest, type BuildHypercoreTransactionResponse, type BuildSolanaTransactionRequest, type BuildSolanaTransactionResponse, type ChainType, type CreateDepositAddressRequest, type CreateExchangeSessionRequest, type CreateExchangeSessionResponse, type DefaultTokenChain, type DefaultTokenMetadata, type DefaultTokenResponse, type DepositAddressResponse, type DepositQuote, type DepositQuoteRequest, type DestinationToken, type DestinationTokenChain, type ExchangeProviderInfo, type ExchangeProvidersResponse, type ExchangeSessionStartParams, type ExchangeWalletAddress, ExecutionStatus, type FeaturedToken, type FiatCurrenciesResponse, type FiatCurrency, type GetExchangesQuery, type HypercoreActionType, type HypercoreActivationRequest, type HypercoreActivationResponse, type I18nStrings, type IconUrl, IneligibilityReason, type IpAddressResponse, type OnrampQuote, type OnrampQuotesRequest, type OnrampQuotesResponse, type OnrampSessionRequest, type OnrampSessionResponse, type PaymentIntent, type PaymentIntentDepositAddress, type PaymentIntentExecutionsResponse, type PaymentNetwork, type PollExecutionsRequest, type PollExecutionsResponse, type ProjectConfigResponse, type QueryExecutionsRequest, type QueryExecutionsResponse, SOLANA_USDC_ADDRESS, type SendHypercoreTransactionRequest, type SendHypercoreTransactionResponse, type SendSolanaTransactionRequest, type SendSolanaTransactionResponse, type SupportedChain, type SupportedDepositTokensResponse, type SupportedDestinationTokensResponse, type SupportedToken, type TokenBalance, type TokenChain, type TokenChainIconUrl, type TokenChainsResponse, type TokenIconUrl, type TokenInfo, type TokenMetadata, type UserIpInfo, type VerifyAddressRequest, type VerifyAddressResponse, type Wallet, buildHypercoreTransaction, buildSolanaTransaction, checkHypercoreActivation, createDepositAddress, createExchangeSession, createOnrampSession, getAddressBalance, getAddressBalances, getApiBaseUrl, getChainName, getDefaultOnrampToken, getDepositQuote, getExchangeSessionStartUrl, getExchanges, getFiatCurrencies, getIconUrl, getIconUrlWithCdn, getIpAddress, getOnrampQuotes, getOnrampSessionStartUrl, getPreferredIconUrl, getProjectConfig, getSupportedDepositTokens, getSupportedDestinationTokens, getTokenChains, getTokenMetadata, getWalletByChainType, i18n, listPaymentIntentExecutions, pollDirectExecutions, queryExecutions, retrievePaymentIntent, sendHypercoreTransaction, sendSolanaTransaction, setApiConfig, useUserIp, verifyRecipientAddress };
|
package/dist/index.js
CHANGED
|
@@ -26,6 +26,7 @@ __export(index_exports, {
|
|
|
26
26
|
SOLANA_USDC_ADDRESS: () => SOLANA_USDC_ADDRESS,
|
|
27
27
|
buildHypercoreTransaction: () => buildHypercoreTransaction,
|
|
28
28
|
buildSolanaTransaction: () => buildSolanaTransaction,
|
|
29
|
+
checkHypercoreActivation: () => checkHypercoreActivation,
|
|
29
30
|
createDepositAddress: () => createDepositAddress,
|
|
30
31
|
createExchangeSession: () => createExchangeSession,
|
|
31
32
|
createOnrampSession: () => createOnrampSession,
|
|
@@ -507,6 +508,28 @@ async function verifyRecipientAddress(request, publishableKey) {
|
|
|
507
508
|
}
|
|
508
509
|
return response.json();
|
|
509
510
|
}
|
|
511
|
+
async function checkHypercoreActivation(request, publishableKey) {
|
|
512
|
+
const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
|
|
513
|
+
validatePublishableKey(pk);
|
|
514
|
+
const response = await fetch(
|
|
515
|
+
`${API_BASE_URL}/v1/public/addresses/hypercore/activation`,
|
|
516
|
+
{
|
|
517
|
+
method: "POST",
|
|
518
|
+
headers: {
|
|
519
|
+
accept: "application/json",
|
|
520
|
+
"x-publishable-key": pk,
|
|
521
|
+
"Content-Type": "application/json"
|
|
522
|
+
},
|
|
523
|
+
body: JSON.stringify(request)
|
|
524
|
+
}
|
|
525
|
+
);
|
|
526
|
+
if (!response.ok) {
|
|
527
|
+
throw new Error(
|
|
528
|
+
`HyperCore activation check failed: ${response.statusText}`
|
|
529
|
+
);
|
|
530
|
+
}
|
|
531
|
+
return response.json();
|
|
532
|
+
}
|
|
510
533
|
async function getExchanges(query, publishableKey) {
|
|
511
534
|
const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
|
|
512
535
|
validatePublishableKey(pk);
|
|
@@ -862,6 +885,7 @@ var i18n = en_default;
|
|
|
862
885
|
SOLANA_USDC_ADDRESS,
|
|
863
886
|
buildHypercoreTransaction,
|
|
864
887
|
buildSolanaTransaction,
|
|
888
|
+
checkHypercoreActivation,
|
|
865
889
|
createDepositAddress,
|
|
866
890
|
createExchangeSession,
|
|
867
891
|
createOnrampSession,
|
package/dist/index.mjs
CHANGED
|
@@ -442,6 +442,28 @@ async function verifyRecipientAddress(request, publishableKey) {
|
|
|
442
442
|
}
|
|
443
443
|
return response.json();
|
|
444
444
|
}
|
|
445
|
+
async function checkHypercoreActivation(request, publishableKey) {
|
|
446
|
+
const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
|
|
447
|
+
validatePublishableKey(pk);
|
|
448
|
+
const response = await fetch(
|
|
449
|
+
`${API_BASE_URL}/v1/public/addresses/hypercore/activation`,
|
|
450
|
+
{
|
|
451
|
+
method: "POST",
|
|
452
|
+
headers: {
|
|
453
|
+
accept: "application/json",
|
|
454
|
+
"x-publishable-key": pk,
|
|
455
|
+
"Content-Type": "application/json"
|
|
456
|
+
},
|
|
457
|
+
body: JSON.stringify(request)
|
|
458
|
+
}
|
|
459
|
+
);
|
|
460
|
+
if (!response.ok) {
|
|
461
|
+
throw new Error(
|
|
462
|
+
`HyperCore activation check failed: ${response.statusText}`
|
|
463
|
+
);
|
|
464
|
+
}
|
|
465
|
+
return response.json();
|
|
466
|
+
}
|
|
445
467
|
async function getExchanges(query, publishableKey) {
|
|
446
468
|
const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
|
|
447
469
|
validatePublishableKey(pk);
|
|
@@ -796,6 +818,7 @@ export {
|
|
|
796
818
|
SOLANA_USDC_ADDRESS,
|
|
797
819
|
buildHypercoreTransaction,
|
|
798
820
|
buildSolanaTransaction,
|
|
821
|
+
checkHypercoreActivation,
|
|
799
822
|
createDepositAddress,
|
|
800
823
|
createExchangeSession,
|
|
801
824
|
createOnrampSession,
|