@unifold/core 0.1.57 → 0.1.59
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 +8 -4
- package/dist/index.d.ts +8 -4
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type ChainType = 'ethereum' | 'solana' | 'bitcoin' | 'algorand' | 'xrpl';
|
|
1
|
+
type ChainType = 'ethereum' | 'solana' | 'bitcoin' | 'algorand' | 'xrpl' | 'cardano';
|
|
2
2
|
|
|
3
3
|
declare function setApiConfig(config: {
|
|
4
4
|
baseUrl?: string;
|
|
@@ -24,7 +24,7 @@ declare function getIconUrl(iconPath: string): string;
|
|
|
24
24
|
declare function getIconUrlWithCdn(iconPath: string, assetCdnUrl?: string): string;
|
|
25
25
|
interface Wallet {
|
|
26
26
|
id: string;
|
|
27
|
-
chain_type: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl";
|
|
27
|
+
chain_type: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl" | "cardano";
|
|
28
28
|
address_type: string | null;
|
|
29
29
|
address: string;
|
|
30
30
|
destination_chain_type: string;
|
|
@@ -81,7 +81,7 @@ declare function getDepositAddress(params: GetExistingDepositAddressRequest, pub
|
|
|
81
81
|
/**
|
|
82
82
|
* Get wallet address for a specific chain type
|
|
83
83
|
*/
|
|
84
|
-
declare function getWalletByChainType(wallets: Wallet[], chainType: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl"): Wallet | undefined;
|
|
84
|
+
declare function getWalletByChainType(wallets: Wallet[], chainType: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl" | "cardano"): Wallet | undefined;
|
|
85
85
|
interface AutoSwapRequest {
|
|
86
86
|
wallet_id: string;
|
|
87
87
|
origin_currency: string;
|
|
@@ -156,7 +156,8 @@ interface QueryExecutionsResponse {
|
|
|
156
156
|
* Query direct executions for a user, optionally filtered by action type.
|
|
157
157
|
* @param externalUserId - External user ID
|
|
158
158
|
* @param publishableKey - Optional publishable key, defaults to configured key
|
|
159
|
-
* @param actionType - Optional filter: ActionType.Deposit or ActionType.Withdraw
|
|
159
|
+
* @param actionType - Optional filter: ActionType.Deposit or ActionType.Withdraw.
|
|
160
|
+
* Defaults to ActionType.Deposit when not provided.
|
|
160
161
|
*/
|
|
161
162
|
declare function queryExecutions(externalUserId: string, publishableKey?: string, actionType?: ActionType): Promise<QueryExecutionsResponse>;
|
|
162
163
|
interface PollExecutionsRequest {
|
|
@@ -457,6 +458,9 @@ interface ProjectConfigResponse {
|
|
|
457
458
|
pay_with_exchange?: {
|
|
458
459
|
enabled: boolean;
|
|
459
460
|
};
|
|
461
|
+
fiat_onramp?: {
|
|
462
|
+
enabled: boolean;
|
|
463
|
+
};
|
|
460
464
|
hypercore_sponsorship?: {
|
|
461
465
|
enabled: boolean;
|
|
462
466
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type ChainType = 'ethereum' | 'solana' | 'bitcoin' | 'algorand' | 'xrpl';
|
|
1
|
+
type ChainType = 'ethereum' | 'solana' | 'bitcoin' | 'algorand' | 'xrpl' | 'cardano';
|
|
2
2
|
|
|
3
3
|
declare function setApiConfig(config: {
|
|
4
4
|
baseUrl?: string;
|
|
@@ -24,7 +24,7 @@ declare function getIconUrl(iconPath: string): string;
|
|
|
24
24
|
declare function getIconUrlWithCdn(iconPath: string, assetCdnUrl?: string): string;
|
|
25
25
|
interface Wallet {
|
|
26
26
|
id: string;
|
|
27
|
-
chain_type: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl";
|
|
27
|
+
chain_type: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl" | "cardano";
|
|
28
28
|
address_type: string | null;
|
|
29
29
|
address: string;
|
|
30
30
|
destination_chain_type: string;
|
|
@@ -81,7 +81,7 @@ declare function getDepositAddress(params: GetExistingDepositAddressRequest, pub
|
|
|
81
81
|
/**
|
|
82
82
|
* Get wallet address for a specific chain type
|
|
83
83
|
*/
|
|
84
|
-
declare function getWalletByChainType(wallets: Wallet[], chainType: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl"): Wallet | undefined;
|
|
84
|
+
declare function getWalletByChainType(wallets: Wallet[], chainType: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl" | "cardano"): Wallet | undefined;
|
|
85
85
|
interface AutoSwapRequest {
|
|
86
86
|
wallet_id: string;
|
|
87
87
|
origin_currency: string;
|
|
@@ -156,7 +156,8 @@ interface QueryExecutionsResponse {
|
|
|
156
156
|
* Query direct executions for a user, optionally filtered by action type.
|
|
157
157
|
* @param externalUserId - External user ID
|
|
158
158
|
* @param publishableKey - Optional publishable key, defaults to configured key
|
|
159
|
-
* @param actionType - Optional filter: ActionType.Deposit or ActionType.Withdraw
|
|
159
|
+
* @param actionType - Optional filter: ActionType.Deposit or ActionType.Withdraw.
|
|
160
|
+
* Defaults to ActionType.Deposit when not provided.
|
|
160
161
|
*/
|
|
161
162
|
declare function queryExecutions(externalUserId: string, publishableKey?: string, actionType?: ActionType): Promise<QueryExecutionsResponse>;
|
|
162
163
|
interface PollExecutionsRequest {
|
|
@@ -457,6 +458,9 @@ interface ProjectConfigResponse {
|
|
|
457
458
|
pay_with_exchange?: {
|
|
458
459
|
enabled: boolean;
|
|
459
460
|
};
|
|
461
|
+
fiat_onramp?: {
|
|
462
|
+
enabled: boolean;
|
|
463
|
+
};
|
|
460
464
|
hypercore_sponsorship?: {
|
|
461
465
|
enabled: boolean;
|
|
462
466
|
};
|
package/dist/index.js
CHANGED
|
@@ -202,12 +202,12 @@ var ExecutionStatus = /* @__PURE__ */ ((ExecutionStatus2) => {
|
|
|
202
202
|
return ExecutionStatus2;
|
|
203
203
|
})(ExecutionStatus || {});
|
|
204
204
|
var SOLANA_USDC_ADDRESS = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";
|
|
205
|
-
async function queryExecutions(externalUserId, publishableKey, actionType) {
|
|
205
|
+
async function queryExecutions(externalUserId, publishableKey, actionType = "deposit" /* Deposit */) {
|
|
206
206
|
const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
|
|
207
207
|
validatePublishableKey(pk);
|
|
208
208
|
const body = {
|
|
209
209
|
external_user_id: externalUserId,
|
|
210
|
-
|
|
210
|
+
action_type: actionType
|
|
211
211
|
};
|
|
212
212
|
const response = await fetch(
|
|
213
213
|
`${API_BASE_URL}/v1/public/direct_executions/query`,
|
package/dist/index.mjs
CHANGED
|
@@ -119,12 +119,12 @@ var ExecutionStatus = /* @__PURE__ */ ((ExecutionStatus2) => {
|
|
|
119
119
|
return ExecutionStatus2;
|
|
120
120
|
})(ExecutionStatus || {});
|
|
121
121
|
var SOLANA_USDC_ADDRESS = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";
|
|
122
|
-
async function queryExecutions(externalUserId, publishableKey, actionType) {
|
|
122
|
+
async function queryExecutions(externalUserId, publishableKey, actionType = "deposit" /* Deposit */) {
|
|
123
123
|
const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
|
|
124
124
|
validatePublishableKey(pk);
|
|
125
125
|
const body = {
|
|
126
126
|
external_user_id: externalUserId,
|
|
127
|
-
|
|
127
|
+
action_type: actionType
|
|
128
128
|
};
|
|
129
129
|
const response = await fetch(
|
|
130
130
|
`${API_BASE_URL}/v1/public/direct_executions/query`,
|