quidax-node 3.0.3 → 3.0.5

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.cjs CHANGED
@@ -153,7 +153,7 @@ var WalletsModule = class {
153
153
  }
154
154
  /**
155
155
  * Fetches all wallets for a given user.
156
- *
156
+ *
157
157
  * @param userId - The unique ID of the user. 'me' can be used for the authenticated user.
158
158
  * @returns A promise resolving to an array of Wallet objects.
159
159
  */
@@ -162,7 +162,7 @@ var WalletsModule = class {
162
162
  }
163
163
  /**
164
164
  * Fetches a specific cryptocurrency wallet for a user.
165
- *
165
+ *
166
166
  * @param userId - The unique ID of the user.
167
167
  * @param currency - The cryptocurrency ticker (e.g., 'btc', 'usdt').
168
168
  * @returns A promise resolving to a single Wallet object.
@@ -172,7 +172,7 @@ var WalletsModule = class {
172
172
  }
173
173
  /**
174
174
  * Fetches the default Payment Address for a specific user's wallet.
175
- *
175
+ *
176
176
  * @param userId - The unique ID of the user.
177
177
  * @param currency - The cryptocurrency ticker.
178
178
  * @returns A promise resolving to the primary PaymentAddress object.
@@ -182,7 +182,7 @@ var WalletsModule = class {
182
182
  }
183
183
  /**
184
184
  * Fetches all generated Payment Addresses for a specific user's wallet.
185
- *
185
+ *
186
186
  * @param userId - The unique ID of the user.
187
187
  * @param currency - The cryptocurrency ticker.
188
188
  * @returns A promise resolving to an array of PaymentAddress objects.
@@ -192,7 +192,7 @@ var WalletsModule = class {
192
192
  }
193
193
  /**
194
194
  * Fetches a specific Payment Address by its ID.
195
- *
195
+ *
196
196
  * @param userId - The unique ID of the user.
197
197
  * @param currency - The cryptocurrency ticker.
198
198
  * @param addressId - The ID of the specific payment address.
@@ -203,13 +203,13 @@ var WalletsModule = class {
203
203
  }
204
204
  /**
205
205
  * Generates a new Payment Address for a cryptocurrency wallet.
206
- *
206
+ *
207
207
  * @param userId - The unique ID of the user.
208
208
  * @param currency - The cryptocurrency ticker (e.g., 'btc', 'eth').
209
209
  * @returns A promise resolving to the newly generated PaymentAddress object.
210
210
  */
211
- async createPaymentAddress(userId, currency) {
212
- return this.client.post(`/users/${userId}/wallets/${currency}/addresses`);
211
+ async createPaymentAddress(userId, currency, network) {
212
+ return this.client.post(`/users/${userId}/wallets/${currency}/addresses?network=${network}`);
213
213
  }
214
214
  };
215
215
  //#endregion
@@ -441,7 +441,7 @@ var SwapModule = class {
441
441
  }
442
442
  /**
443
443
  * Generates a temporary swap quotation for previewing a swap before creation.
444
- *
444
+ *
445
445
  * @param userId - The unique ID of the user.
446
446
  * @param data - The swap quotation parameters.
447
447
  * @returns A promise resolving to the temporary swap quotation details.
@@ -451,7 +451,7 @@ var SwapModule = class {
451
451
  }
452
452
  /**
453
453
  * Creates an Instant Swap quotation linked to the user account.
454
- *
454
+ *
455
455
  * @param userId - The unique ID of the user.
456
456
  * @param data - The swap creation payload.
457
457
  * @returns A promise resolving to a SwapTransaction object in an unconfirmed state.
@@ -461,7 +461,7 @@ var SwapModule = class {
461
461
  }
462
462
  /**
463
463
  * Confirms a previously created Instant Swap quotation.
464
- *
464
+ *
465
465
  * @param userId - The unique ID of the user.
466
466
  * @param quotationId - The ID of the swap quotation to confirm.
467
467
  * @returns A promise resolving to the confirmed SwapTransaction.
@@ -471,7 +471,7 @@ var SwapModule = class {
471
471
  }
472
472
  /**
473
473
  * Refreshes an expired Instant Swap quotation to get updated market rates.
474
- *
474
+ *
475
475
  * @param userId - The unique ID of the user.
476
476
  * @param quotationId - The ID of the expired swap quotation.
477
477
  * @returns A promise resolving to the refreshed SwapTransaction.
@@ -481,7 +481,7 @@ var SwapModule = class {
481
481
  }
482
482
  /**
483
483
  * Fetches the details of a specific Swap Transaction.
484
- *
484
+ *
485
485
  * @param userId - The unique ID of the user.
486
486
  * @param swapTransactionId - The ID of the swap transaction.
487
487
  * @returns A promise resolving to the SwapTransaction details.
@@ -491,7 +491,7 @@ var SwapModule = class {
491
491
  }
492
492
  /**
493
493
  * Retrieves a paginated list of all swap transactions for a user.
494
- *
494
+ *
495
495
  * @param userId - The unique ID of the user.
496
496
  * @returns A promise resolving to a paginated list of SwapTransactions.
497
497
  */
package/dist/index.d.cts CHANGED
@@ -196,7 +196,7 @@ declare class WalletsModule {
196
196
  * @param currency - The cryptocurrency ticker (e.g., 'btc', 'eth').
197
197
  * @returns A promise resolving to the newly generated PaymentAddress object.
198
198
  */
199
- createPaymentAddress(userId: string, currency: Currency): Promise<QuidaxResponse<PaymentAddress>>;
199
+ createPaymentAddress(userId: string, currency: Currency, network: string): Promise<QuidaxResponse<PaymentAddress>>;
200
200
  }
201
201
  //#endregion
202
202
  //#region src/modules/withdrawals.d.ts
@@ -486,7 +486,7 @@ declare class SwapModule {
486
486
  source_currency: Currency;
487
487
  destination_currency: Currency;
488
488
  amount: string;
489
- type: 'source' | 'destination';
489
+ type: "source" | "destination";
490
490
  }): Promise<QuidaxResponse<any>>;
491
491
  /**
492
492
  * Creates an Instant Swap quotation linked to the user account.
@@ -496,10 +496,10 @@ declare class SwapModule {
496
496
  * @returns A promise resolving to a SwapTransaction object in an unconfirmed state.
497
497
  */
498
498
  create(userId: string, data: {
499
- source_currency: Currency;
500
- destination_currency: Currency;
501
- source_amount?: string;
502
- destination_amount?: string;
499
+ from_currency: Currency;
500
+ to_currency: Currency;
501
+ from_amount?: string;
502
+ to_amount?: string;
503
503
  }): Promise<QuidaxResponse<SwapTransaction>>;
504
504
  /**
505
505
  * Confirms a previously created Instant Swap quotation.
package/dist/index.d.mts CHANGED
@@ -196,7 +196,7 @@ declare class WalletsModule {
196
196
  * @param currency - The cryptocurrency ticker (e.g., 'btc', 'eth').
197
197
  * @returns A promise resolving to the newly generated PaymentAddress object.
198
198
  */
199
- createPaymentAddress(userId: string, currency: Currency): Promise<QuidaxResponse<PaymentAddress>>;
199
+ createPaymentAddress(userId: string, currency: Currency, network: string): Promise<QuidaxResponse<PaymentAddress>>;
200
200
  }
201
201
  //#endregion
202
202
  //#region src/modules/withdrawals.d.ts
@@ -486,7 +486,7 @@ declare class SwapModule {
486
486
  source_currency: Currency;
487
487
  destination_currency: Currency;
488
488
  amount: string;
489
- type: 'source' | 'destination';
489
+ type: "source" | "destination";
490
490
  }): Promise<QuidaxResponse<any>>;
491
491
  /**
492
492
  * Creates an Instant Swap quotation linked to the user account.
@@ -496,10 +496,10 @@ declare class SwapModule {
496
496
  * @returns A promise resolving to a SwapTransaction object in an unconfirmed state.
497
497
  */
498
498
  create(userId: string, data: {
499
- source_currency: Currency;
500
- destination_currency: Currency;
501
- source_amount?: string;
502
- destination_amount?: string;
499
+ from_currency: Currency;
500
+ to_currency: Currency;
501
+ from_amount?: string;
502
+ to_amount?: string;
503
503
  }): Promise<QuidaxResponse<SwapTransaction>>;
504
504
  /**
505
505
  * Confirms a previously created Instant Swap quotation.
package/dist/index.mjs CHANGED
@@ -126,7 +126,7 @@ var WalletsModule = class {
126
126
  }
127
127
  /**
128
128
  * Fetches all wallets for a given user.
129
- *
129
+ *
130
130
  * @param userId - The unique ID of the user. 'me' can be used for the authenticated user.
131
131
  * @returns A promise resolving to an array of Wallet objects.
132
132
  */
@@ -135,7 +135,7 @@ var WalletsModule = class {
135
135
  }
136
136
  /**
137
137
  * Fetches a specific cryptocurrency wallet for a user.
138
- *
138
+ *
139
139
  * @param userId - The unique ID of the user.
140
140
  * @param currency - The cryptocurrency ticker (e.g., 'btc', 'usdt').
141
141
  * @returns A promise resolving to a single Wallet object.
@@ -145,7 +145,7 @@ var WalletsModule = class {
145
145
  }
146
146
  /**
147
147
  * Fetches the default Payment Address for a specific user's wallet.
148
- *
148
+ *
149
149
  * @param userId - The unique ID of the user.
150
150
  * @param currency - The cryptocurrency ticker.
151
151
  * @returns A promise resolving to the primary PaymentAddress object.
@@ -155,7 +155,7 @@ var WalletsModule = class {
155
155
  }
156
156
  /**
157
157
  * Fetches all generated Payment Addresses for a specific user's wallet.
158
- *
158
+ *
159
159
  * @param userId - The unique ID of the user.
160
160
  * @param currency - The cryptocurrency ticker.
161
161
  * @returns A promise resolving to an array of PaymentAddress objects.
@@ -165,7 +165,7 @@ var WalletsModule = class {
165
165
  }
166
166
  /**
167
167
  * Fetches a specific Payment Address by its ID.
168
- *
168
+ *
169
169
  * @param userId - The unique ID of the user.
170
170
  * @param currency - The cryptocurrency ticker.
171
171
  * @param addressId - The ID of the specific payment address.
@@ -176,13 +176,13 @@ var WalletsModule = class {
176
176
  }
177
177
  /**
178
178
  * Generates a new Payment Address for a cryptocurrency wallet.
179
- *
179
+ *
180
180
  * @param userId - The unique ID of the user.
181
181
  * @param currency - The cryptocurrency ticker (e.g., 'btc', 'eth').
182
182
  * @returns A promise resolving to the newly generated PaymentAddress object.
183
183
  */
184
- async createPaymentAddress(userId, currency) {
185
- return this.client.post(`/users/${userId}/wallets/${currency}/addresses`);
184
+ async createPaymentAddress(userId, currency, network) {
185
+ return this.client.post(`/users/${userId}/wallets/${currency}/addresses?network=${network}`);
186
186
  }
187
187
  };
188
188
  //#endregion
@@ -414,7 +414,7 @@ var SwapModule = class {
414
414
  }
415
415
  /**
416
416
  * Generates a temporary swap quotation for previewing a swap before creation.
417
- *
417
+ *
418
418
  * @param userId - The unique ID of the user.
419
419
  * @param data - The swap quotation parameters.
420
420
  * @returns A promise resolving to the temporary swap quotation details.
@@ -424,7 +424,7 @@ var SwapModule = class {
424
424
  }
425
425
  /**
426
426
  * Creates an Instant Swap quotation linked to the user account.
427
- *
427
+ *
428
428
  * @param userId - The unique ID of the user.
429
429
  * @param data - The swap creation payload.
430
430
  * @returns A promise resolving to a SwapTransaction object in an unconfirmed state.
@@ -434,7 +434,7 @@ var SwapModule = class {
434
434
  }
435
435
  /**
436
436
  * Confirms a previously created Instant Swap quotation.
437
- *
437
+ *
438
438
  * @param userId - The unique ID of the user.
439
439
  * @param quotationId - The ID of the swap quotation to confirm.
440
440
  * @returns A promise resolving to the confirmed SwapTransaction.
@@ -444,7 +444,7 @@ var SwapModule = class {
444
444
  }
445
445
  /**
446
446
  * Refreshes an expired Instant Swap quotation to get updated market rates.
447
- *
447
+ *
448
448
  * @param userId - The unique ID of the user.
449
449
  * @param quotationId - The ID of the expired swap quotation.
450
450
  * @returns A promise resolving to the refreshed SwapTransaction.
@@ -454,7 +454,7 @@ var SwapModule = class {
454
454
  }
455
455
  /**
456
456
  * Fetches the details of a specific Swap Transaction.
457
- *
457
+ *
458
458
  * @param userId - The unique ID of the user.
459
459
  * @param swapTransactionId - The ID of the swap transaction.
460
460
  * @returns A promise resolving to the SwapTransaction details.
@@ -464,7 +464,7 @@ var SwapModule = class {
464
464
  }
465
465
  /**
466
466
  * Retrieves a paginated list of all swap transactions for a user.
467
- *
467
+ *
468
468
  * @param userId - The unique ID of the user.
469
469
  * @returns A promise resolving to a paginated list of SwapTransactions.
470
470
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quidax-node",
3
- "version": "3.0.3",
3
+ "version": "3.0.5",
4
4
  "description": "",
5
5
  "main": "./dist/index.cjs",
6
6
  "files": [