This repository was archived by the owner on Aug 23, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +41
-1
lines changed Expand file tree Collapse file tree 1 file changed +41
-1
lines changed Original file line number Diff line number Diff line change 11
11
* [ client.cat] ( #clientcat )
12
12
* [ client.import] ( #clientimport )
13
13
* [ client.listAsks] ( #clientlistasks )
14
- * client.payments
14
+ * [ client.payments] ( #clientpayments )
15
15
* client.proposeStorageDeal
16
16
* client.queryStorageDeal
17
17
* [ config.get] ( #configget )
@@ -401,6 +401,46 @@ After first iteration:
401
401
*/
402
402
```
403
403
404
+ ## ` client.payments `
405
+
406
+ > List payments for a given deal
407
+
408
+ ### ` client.payments([options]) `
409
+
410
+ #### Parameters
411
+
412
+ | Name | Type | Description |
413
+ | ------| ------| -------------|
414
+ | channel id | ` String ` | Channel id from which to list vouchers |
415
+ | options | ` Object ` | Optional options |
416
+ | options.signal | [ ` AbortSignal ` ] ( https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal ) | A signal that can be used to abort the request |
417
+
418
+ #### Returns
419
+
420
+ | Type | Description |
421
+ | ------| -------------|
422
+ | ` Promise<Object[]> ` | List of payments |
423
+
424
+ ``` js
425
+ const cid = ' zDPWYqFCuTNxiwRkt1iDJWEy6qKPGCunMGHrP1ojsMrZDWKYsgzF'
426
+ const payments = await fc .client .payments (cid)
427
+ console .log (payments)
428
+
429
+ /*
430
+ [
431
+ {
432
+ "channel":0,
433
+ "payer":"t1bcvxo4ztdkukjmrsjvc5d4w24cl55vvbrssspyy",
434
+ "target":"t1uo4nzu44apoclkbjbbvc4f3irbptg3ctjq44wiq",
435
+ "amount":"25000",
436
+ "valid_at":8,
437
+ "condition":null,
438
+ "signature":"1My76149fPIulbdO/DKlkUBMMSLwGYSw2XmVKXq3HrxMG5kkmBgsaPZ/DzdxiOWX5kdnXJ++AFQqsmWHd5dtOwE="
439
+ }
440
+ ]
441
+ */
442
+ ```
443
+
404
444
## ` config.get `
405
445
406
446
> Get config values
You can’t perform that action at this time.
0 commit comments