@unifold/core 0.1.58 → 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 CHANGED
@@ -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
@@ -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
- ...actionType ? { action_type: actionType } : {}
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
- ...actionType ? { action_type: actionType } : {}
127
+ action_type: actionType
128
128
  };
129
129
  const response = await fetch(
130
130
  `${API_BASE_URL}/v1/public/direct_executions/query`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unifold/core",
3
- "version": "0.1.58",
3
+ "version": "0.1.59",
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",