lightning 4.3.1 → 4.7.0

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.
Files changed (59) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/grpc/protos/lightning.proto +115 -1
  3. package/grpc/protos/stateservice.proto +3 -0
  4. package/index.js +2 -0
  5. package/lnd_methods/index.js +2 -0
  6. package/lnd_methods/offchain/delete_failed_pay_attempts.js +25 -4
  7. package/lnd_methods/offchain/delete_payment.js +58 -0
  8. package/lnd_methods/offchain/emit_payment.d.ts +3 -3
  9. package/lnd_methods/offchain/finished_payment.js +3 -0
  10. package/lnd_methods/offchain/get_payment.d.ts +8 -0
  11. package/lnd_methods/offchain/get_payment.js +4 -0
  12. package/lnd_methods/offchain/get_payments.d.ts +4 -0
  13. package/lnd_methods/offchain/get_payments.js +2 -0
  14. package/lnd_methods/offchain/index.d.ts +1 -0
  15. package/lnd_methods/offchain/index.js +2 -0
  16. package/lnd_methods/offchain/pay.d.ts +2 -0
  17. package/lnd_methods/offchain/pay.js +2 -0
  18. package/lnd_methods/offchain/pay_via_payment_details.d.ts +2 -0
  19. package/lnd_methods/offchain/pay_via_payment_details.js +1 -0
  20. package/lnd_methods/offchain/pay_via_payment_request.d.ts +2 -0
  21. package/lnd_methods/offchain/pay_via_payment_request.js +1 -0
  22. package/lnd_methods/offchain/pay_via_routes.d.ts +2 -0
  23. package/lnd_methods/offchain/pay_via_routes.js +2 -0
  24. package/lnd_methods/offchain/subscribe_to_past_payment.d.ts +10 -0
  25. package/lnd_methods/offchain/subscribe_to_past_payment.js +4 -0
  26. package/lnd_methods/offchain/subscribe_to_past_payments.d.ts +74 -0
  27. package/lnd_methods/offchain/subscribe_to_past_payments.js +4 -0
  28. package/lnd_methods/offchain/subscribe_to_pay.js +1 -0
  29. package/lnd_methods/offchain/subscribe_to_pay_via_details.d.ts +2 -0
  30. package/lnd_methods/offchain/subscribe_to_pay_via_details.js +1 -0
  31. package/lnd_methods/offchain/subscribe_to_pay_via_request.d.ts +2 -0
  32. package/lnd_methods/offchain/subscribe_to_pay_via_request.js +1 -0
  33. package/lnd_methods/offchain/subscribe_to_pay_via_routes.d.ts +2 -0
  34. package/lnd_methods/offchain/subscribe_to_pay_via_routes.js +11 -1
  35. package/lnd_methods/offchain/subscribe_to_probe_for_route.d.ts +1 -1
  36. package/lnd_methods/unauthenticated/get_wallet_status.d.ts +3 -0
  37. package/lnd_methods/unauthenticated/get_wallet_status.js +3 -0
  38. package/lnd_methods/unauthenticated/subscribe_to_wallet_status.d.ts +4 -1
  39. package/lnd_methods/unauthenticated/subscribe_to_wallet_status.js +9 -0
  40. package/lnd_responses/confirmed_from_payment.js +16 -0
  41. package/lnd_responses/rpc_attempt_htlc_as_attempt.js +8 -27
  42. package/lnd_responses/rpc_payment_as_payment.js +3 -0
  43. package/lnd_responses/rpc_wallet_state_as_state.js +5 -0
  44. package/package.json +2 -2
  45. package/test/lnd_methods/offchain/test_delete_failed_pay_attempts.js +18 -0
  46. package/test/lnd_methods/offchain/test_delete_payment.js +51 -0
  47. package/test/lnd_methods/offchain/test_delete_payments.js +1 -1
  48. package/test/lnd_methods/offchain/test_finished_payment.js +2 -0
  49. package/test/lnd_methods/offchain/test_get_payments.js +4 -2
  50. package/test/lnd_methods/offchain/test_pay_via_payment_details.js +1 -1
  51. package/test/lnd_methods/offchain/test_subscribe_to_past_payments.js +4 -0
  52. package/test/lnd_methods/offchain/test_subscribe_to_pay_via_routes.js +1 -0
  53. package/test/lnd_responses/test_confirmed_from_payment.js +4 -0
  54. package/test/lnd_responses/test_rpc_attempt_htlc_as_attempt.js +35 -21
  55. package/test/lnd_responses/test_rpc_payment_as_payment.js +4 -0
  56. package/test/lnd_responses/test_rpc_wallet_state_as_state.js +5 -0
  57. package/test/protos/protos.json +1 -1
  58. package/test/typescript/subscribe_to_past_payments.test-d.ts +11 -0
  59. package/typescript/shared.d.ts +3 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # Versions
2
2
 
3
+ ## 4.7.0
4
+
5
+ - `getPayment`: Add `created_at` to indicate the creation date of the payment
6
+ - `getPayment`: Add `request` to indicate serialized payment request
7
+ - `subscribeToPastPayment`: Add `created_at` to indicate the creation date of the payment
8
+ - `subscribeToPastPayment`: Add `request` to indicate serialized payment request
9
+ - `subscribeToPastPayments`: Add `created_at` to indicate the creation date of the payment
10
+ - `subscribeToPastPayments`: Add `request` to indicate serialized payment request
11
+
12
+ ## 4.6.0
13
+
14
+ - `getPayment`: Add `destination` to indicate the destination of the payment
15
+ - `subscribeToPastPayment`: Add `destination` to indicate the destination of the payment
16
+ - `subscribeToPastPayments`: Add `destination` to indicate the destination of the payment
17
+
18
+ ## 4.5.0
19
+
20
+ - `deletePayment`: Add method to delete a single payment
21
+ - `deleteFailedPayAttempts`: Add `id` argument to delete failed attempts for a payment
22
+ - `getWalletStatus`: `is_ready`: Add wallet server ready status
23
+ - `subscribeToWalletStatus`: Add `ready` event to indicate server ready status
24
+
25
+ ## 4.4.0
26
+
27
+ - `getPayment`: Add `confirmed_at` to indicate when payment resolved successfully
28
+ - `getPayments`: Add `confirmed_at` to indicate when payments resolve successfully
29
+ - `pay`: Add `confirmed_at` to indicate when payment resolved successfully
30
+ - `payViaPaymentDetails`: Add `confirmed_at` to indicate when payment was sent
31
+ - `payViaPaymentRequest`: Add `confirmed_at` to indicate when payment was sent
32
+ - `payViaRoutes`: Add `confirmed_at` to indicate when payment resolved successfully
33
+ - `subscribeToPastPayment`: Add `confirmed_at` to indicate when payment succeeded
34
+ - `subscribeToPastPayments`: Add `confirmed_at` to indicate when payments succeed
35
+ - `subscribeToPayViaDetails`: Add `confirmed_at` to indicate when payment was sent
36
+ - `subscribeToPayViaRequest`: Add `confirmed_at` to indicate when payment was sent
37
+ - `subscribeToPayViaRoutes`: Add `confirmed_at` to indicate when payment was sent
38
+
3
39
  ## 4.3.1
4
40
 
5
41
  - `getPendingChannels`: Add typescript annotations to result
@@ -200,6 +200,16 @@ service Lightning {
200
200
  */
201
201
  rpc OpenChannel (OpenChannelRequest) returns (stream OpenStatusUpdate);
202
202
 
203
+ /* lncli: `batchopenchannel`
204
+ BatchOpenChannel attempts to open multiple single-funded channels in a
205
+ single transaction in an atomic way. This means either all channel open
206
+ requests succeed at once or all attempts are aborted if any of them fail.
207
+ This is the safer variant of using PSBTs to manually fund a batch of
208
+ channels through the OpenChannel RPC.
209
+ */
210
+ rpc BatchOpenChannel (BatchOpenChannelRequest)
211
+ returns (BatchOpenChannelResponse);
212
+
203
213
  /*
204
214
  FundingStateStep is an advanced funding related call that allows the caller
205
215
  to either execute some preparatory steps for a funding workflow, or
@@ -330,7 +340,14 @@ service Lightning {
330
340
  rpc ListPayments (ListPaymentsRequest) returns (ListPaymentsResponse);
331
341
 
332
342
  /*
333
- DeleteAllPayments deletes all outgoing payments from DB.
343
+ DeletePayment deletes an outgoing payment from DB. Note that it will not
344
+ attempt to delete an In-Flight payment, since that would be unsafe.
345
+ */
346
+ rpc DeletePayment (DeletePaymentRequest) returns (DeletePaymentResponse);
347
+
348
+ /*
349
+ DeleteAllPayments deletes all outgoing payments from DB. Note that it will
350
+ not attempt to delete In-Flight payments, since that would be unsafe.
334
351
  */
335
352
  rpc DeleteAllPayments (DeleteAllPaymentsRequest)
336
353
  returns (DeleteAllPaymentsResponse);
@@ -1776,6 +1793,84 @@ message ReadyForPsbtFunding {
1776
1793
  bytes psbt = 3;
1777
1794
  }
1778
1795
 
1796
+ message BatchOpenChannelRequest {
1797
+ // The list of channels to open.
1798
+ repeated BatchOpenChannel channels = 1;
1799
+
1800
+ // The target number of blocks that the funding transaction should be
1801
+ // confirmed by.
1802
+ int32 target_conf = 2;
1803
+
1804
+ // A manual fee rate set in sat/vByte that should be used when crafting the
1805
+ // funding transaction.
1806
+ int64 sat_per_vbyte = 3;
1807
+
1808
+ // The minimum number of confirmations each one of your outputs used for
1809
+ // the funding transaction must satisfy.
1810
+ int32 min_confs = 4;
1811
+
1812
+ // Whether unconfirmed outputs should be used as inputs for the funding
1813
+ // transaction.
1814
+ bool spend_unconfirmed = 5;
1815
+
1816
+ // An optional label for the batch transaction, limited to 500 characters.
1817
+ string label = 6;
1818
+ }
1819
+
1820
+ message BatchOpenChannel {
1821
+ // The pubkey of the node to open a channel with. When using REST, this
1822
+ // field must be encoded as base64.
1823
+ bytes node_pubkey = 1;
1824
+
1825
+ // The number of satoshis the wallet should commit to the channel.
1826
+ int64 local_funding_amount = 2;
1827
+
1828
+ // The number of satoshis to push to the remote side as part of the initial
1829
+ // commitment state.
1830
+ int64 push_sat = 3;
1831
+
1832
+ // Whether this channel should be private, not announced to the greater
1833
+ // network.
1834
+ bool private = 4;
1835
+
1836
+ // The minimum value in millisatoshi we will require for incoming HTLCs on
1837
+ // the channel.
1838
+ int64 min_htlc_msat = 5;
1839
+
1840
+ // The delay we require on the remote's commitment transaction. If this is
1841
+ // not set, it will be scaled automatically with the channel size.
1842
+ uint32 remote_csv_delay = 6;
1843
+
1844
+ /*
1845
+ Close address is an optional address which specifies the address to which
1846
+ funds should be paid out to upon cooperative close. This field may only be
1847
+ set if the peer supports the option upfront feature bit (call listpeers
1848
+ to check). The remote peer will only accept cooperative closes to this
1849
+ address if it is set.
1850
+
1851
+ Note: If this value is set on channel creation, you will *not* be able to
1852
+ cooperatively close out to a different address.
1853
+ */
1854
+ string close_address = 7;
1855
+
1856
+ /*
1857
+ An optional, unique identifier of 32 random bytes that will be used as the
1858
+ pending channel ID to identify the channel while it is in the pre-pending
1859
+ state.
1860
+ */
1861
+ bytes pending_chan_id = 8;
1862
+
1863
+ /*
1864
+ The explicit commitment type to use. Note this field will only be used if
1865
+ the remote peer supports explicit channel negotiation.
1866
+ */
1867
+ CommitmentType commitment_type = 9;
1868
+ }
1869
+
1870
+ message BatchOpenChannelResponse {
1871
+ repeated PendingUpdate pending_channels = 1;
1872
+ }
1873
+
1779
1874
  message OpenChannelRequest {
1780
1875
  // A manual fee rate set in sat/vbyte that should be used when crafting the
1781
1876
  // funding transaction.
@@ -1867,6 +1962,12 @@ message OpenChannelRequest {
1867
1962
  transaction.
1868
1963
  */
1869
1964
  uint32 max_local_csv = 17;
1965
+
1966
+ /*
1967
+ The explicit commitment type to use. Note this field will only be used if
1968
+ the remote peer supports explicit channel negotiation.
1969
+ */
1970
+ CommitmentType commitment_type = 18;
1870
1971
  }
1871
1972
  message OpenStatusUpdate {
1872
1973
  oneof update {
@@ -3354,6 +3455,16 @@ message ListPaymentsResponse {
3354
3455
  uint64 last_index_offset = 3;
3355
3456
  }
3356
3457
 
3458
+ message DeletePaymentRequest {
3459
+ // Payment hash to delete.
3460
+ bytes payment_hash = 1;
3461
+
3462
+ /*
3463
+ Only delete failed HTLCs from the payment, not the payment itself.
3464
+ */
3465
+ bool failed_htlcs_only = 2;
3466
+ }
3467
+
3357
3468
  message DeleteAllPaymentsRequest {
3358
3469
  // Only delete failed payments.
3359
3470
  bool failed_payments_only = 1;
@@ -3364,6 +3475,9 @@ message DeleteAllPaymentsRequest {
3364
3475
  bool failed_htlcs_only = 2;
3365
3476
  }
3366
3477
 
3478
+ message DeletePaymentResponse {
3479
+ }
3480
+
3367
3481
  message DeleteAllPaymentsResponse {
3368
3482
  }
3369
3483
 
@@ -41,6 +41,9 @@ enum WalletState {
41
41
  UNLOCKED = 2;
42
42
  RPC_ACTIVE = 3;
43
43
 
44
+ // SERVER_ACTIVE means that the lnd server is ready to accept calls.
45
+ SERVER_ACTIVE = 4;
46
+
44
47
  WAITING_TO_START = 255;
45
48
  }
46
49
 
package/index.js CHANGED
@@ -107,6 +107,7 @@ const {subscribeToInvoice} = require('./lnd_methods');
107
107
  const {subscribeToInvoices} = require('./lnd_methods');
108
108
  const {subscribeToOpenRequests} = require('./lnd_methods');
109
109
  const {subscribeToPastPayment} = require('./lnd_methods');
110
+ const {subscribeToPastPayments} = require('./lnd_methods');
110
111
  const {subscribeToPayViaDetails} = require('./lnd_methods');
111
112
  const {subscribeToPayViaRequest} = require('./lnd_methods');
112
113
  const {subscribeToPayViaRoutes} = require('./lnd_methods');
@@ -236,6 +237,7 @@ module.exports = {
236
237
  subscribeToInvoices,
237
238
  subscribeToOpenRequests,
238
239
  subscribeToPastPayment,
240
+ subscribeToPastPayments,
239
241
  subscribeToPayViaDetails,
240
242
  subscribeToPayViaRequest,
241
243
  subscribeToPayViaRoutes,
@@ -14,6 +14,7 @@ const {decodePaymentRequest} = require('./offchain');
14
14
  const {deleteFailedPayAttempts} = require('./offchain');
15
15
  const {deleteFailedPayments} = require('./offchain');
16
16
  const {deleteForwardingReputations} = require('./offchain');
17
+ const {deletePayment} = require('./offchain');
17
18
  const {deletePayments} = require('./offchain');
18
19
  const {diffieHellmanComputeSecret} = require('./signer');
19
20
  const {disableChannel} = require('./offchain');
@@ -140,6 +141,7 @@ module.exports = {
140
141
  deleteFailedPayAttempts,
141
142
  deleteFailedPayments,
142
143
  deleteForwardingReputations,
144
+ deletePayment,
143
145
  deletePayments,
144
146
  diffieHellmanComputeSecret,
145
147
  disableChannel,
@@ -3,7 +3,11 @@ const {returnResult} = require('asyncjs-util');
3
3
 
4
4
  const {isLnd} = require('./../../lnd_requests');
5
5
 
6
- const method = 'deleteAllPayments';
6
+ const deleteAllMethod = 'deleteAllPayments';
7
+ const deleteOneMethod = 'deletePayment';
8
+ const hexAsBuffer = hex => Buffer.from(hex, 'hex');
9
+ const isHash = n => /^[0-9A-F]{64}$/i.test(n);
10
+ const notSupported = /unknown/;
7
11
  const type = 'default';
8
12
 
9
13
  /** Delete failed payment attempt records
@@ -12,18 +16,25 @@ const type = 'default';
12
16
 
13
17
  Method not supported on LND 0.12.1 or below
14
18
 
19
+ `id` is not supported on LND 0.13.1 or below
20
+
15
21
  {
22
+ [id]: <Delete Only Failed Attempt Records For Payment With Hash Hex String>
16
23
  lnd: <Authenticated LND API Object>
17
24
  }
18
25
 
19
26
  @returns via cbk or Promise
20
27
  */
21
- module.exports = ({lnd}, cbk) => {
28
+ module.exports = ({id, lnd}, cbk) => {
22
29
  return new Promise((resolve, reject) => {
23
30
  return asyncAuto({
24
31
  // Check arguments
25
32
  validate: cbk => {
26
- if (!isLnd({lnd, method, type})) {
33
+ if (!!id && !isHash(id)) {
34
+ return cbk([400, 'ExpectedPaymentHashToDeleteFailedPayAttempts']);
35
+ }
36
+
37
+ if (!isLnd({lnd, type, method: deleteAllMethod})) {
27
38
  return cbk([400, 'ExpectedAuthenticatedLndToDeleteFailedAttempts']);
28
39
  }
29
40
 
@@ -32,7 +43,17 @@ module.exports = ({lnd}, cbk) => {
32
43
 
33
44
  // Delete failed payments
34
45
  deletePayments: ['validate', ({}, cbk) => {
35
- return lnd[type][method]({failed_htlcs_only: true}, err => {
46
+ const method = !id ? deleteAllMethod : deleteOneMethod;
47
+
48
+ return lnd[type][method]({
49
+ failed_htlcs_only: true,
50
+ id: !!id ? hexAsBuffer(id) : undefined,
51
+ },
52
+ err => {
53
+ if (!!err && notSupported.test(err.details)) {
54
+ return cbk([501, 'DeleteFailedPaymentAttemptsMethodNotSupported']);
55
+ }
56
+
36
57
  if (!!err) {
37
58
  return cbk([503, 'UnexpectedErrorDeletingFailedAttempts', {err}]);
38
59
  }
@@ -0,0 +1,58 @@
1
+ const asyncAuto = require('async/auto');
2
+ const {returnResult} = require('asyncjs-util');
3
+
4
+ const {isLnd} = require('./../../lnd_requests');
5
+
6
+ const hexAsBytes = hex => Buffer.from(hex, 'hex');
7
+ const isHash = n => !!n && /^[0-9A-F]{64}$/i.test(n);
8
+ const method = 'deletePayment';
9
+ const notSupported = /unknown/;
10
+ const type = 'default';
11
+
12
+ /** Delete a payment record
13
+
14
+ Requires `offchain:write` permission
15
+
16
+ Note: this method is not supported on LND 0.13.1 and below
17
+
18
+ {
19
+ id: <Payment Preimage Hash Hex String>
20
+ lnd: <Authenticated LND API Object>
21
+ }
22
+
23
+ @returns via cbk or Promise
24
+ */
25
+ module.exports = ({id, lnd}, cbk) => {
26
+ return new Promise((resolve, reject) => {
27
+ return asyncAuto({
28
+ // Check arguments
29
+ validate: cbk => {
30
+ if (!isHash(id)) {
31
+ return cbk([400, 'ExpectedPaymentHashToDeletePaymentRecord']);
32
+ }
33
+
34
+ if (!isLnd({lnd, method, type})) {
35
+ return cbk([400, 'ExpectedAuthenticatedLndToDeletePayment']);
36
+ }
37
+
38
+ return cbk();
39
+ },
40
+
41
+ // Delete all payments
42
+ deletePayments: ['validate', ({}, cbk) => {
43
+ return lnd[type][method]({payment_hash: hexAsBytes(id)}, err => {
44
+ if (!!err && notSupported.test(err.details)) {
45
+ return cbk([501, 'DeletePaymentMethodNotSupported']);
46
+ }
47
+
48
+ if (!!err) {
49
+ return cbk([503, 'UnexpectedErrorDeletingPayment', {err}]);
50
+ }
51
+
52
+ return cbk();
53
+ });
54
+ }],
55
+ },
56
+ returnResult({reject, resolve}, cbk));
57
+ });
58
+ };
@@ -1,7 +1,7 @@
1
1
  import * as events from 'events';
2
2
  import {ConfirmedFromPaymentResult} from '../../lnd_responses/confirmed_from_payment';
3
3
  import {FailureFromPaymentResult} from '../../lnd_responses/failure_from_payment';
4
- import {LightningError, PaymentState} from '../../typescript';
4
+ import {EmptyObject, LightningError, PaymentState} from '../../typescript';
5
5
 
6
6
  export type EmitPaymentArgs = {
7
7
  data: {
@@ -14,8 +14,8 @@ export type EmitPaymentConfirmedEvent = ConfirmedFromPaymentResult;
14
14
 
15
15
  export type EmitPaymentFailedEvent = FailureFromPaymentResult;
16
16
 
17
- export type EmitPaymentPayingEvent = {[key: string]: never};
17
+ export type EmitPaymentPayingEvent = EmptyObject;
18
18
 
19
- export type EmitPaymentError = LightningError<never>;
19
+ export type EmitPaymentError = LightningError<undefined>;
20
20
 
21
21
  export const emitPayment: (args: EmitPaymentArgs) => boolean | undefined;
@@ -5,6 +5,7 @@ const {returnResult} = require('asyncjs-util');
5
5
 
6
6
  {
7
7
  [confirmed]: {
8
+ confirmed_at: <Payment Confirmed At ISO 8601 Date String>
8
9
  fee: <Total Fee Tokens Paid Rounded Down Number>
9
10
  fee_mtokens: <Total Fee Millitokens Paid String>
10
11
  hops: [{
@@ -66,6 +67,7 @@ const {returnResult} = require('asyncjs-util');
66
67
 
67
68
  @returns via cbk or Promise
68
69
  {
70
+ confirmed_at: <Payment Confirmed At ISO 8601 Date String>
69
71
  fee: <Fee Tokens Number>
70
72
  fee_mtokens: <Total Fee Millitokens To Pay String>
71
73
  hops: [{
@@ -134,6 +136,7 @@ module.exports = ({confirmed, failed}, cbk) => {
134
136
  // Return the payment resolution
135
137
  payment: ['checkFailure', ({}, cbk) => {
136
138
  return cbk(null, {
139
+ confirmed_at: confirmed.confirmed_at,
137
140
  fee: confirmed.fee,
138
141
  fee_mtokens: confirmed.fee_mtokens,
139
142
  hops: confirmed.hops,
@@ -26,6 +26,12 @@ export type GetPaymentResult = {
26
26
  /** Payment Is Pending */
27
27
  is_pending?: boolean;
28
28
  payment?: {
29
+ /** Confirmed at ISO-8601 Date */
30
+ confirmed_at: string;
31
+ /** Created at ISO-8601 Date */
32
+ created_at: string;
33
+ /** Payment Destination Public Key Hex */
34
+ destination: string;
29
35
  /** Total Fee Millitokens To Pay */
30
36
  fee_mtokens: string;
31
37
  hops: {
@@ -50,6 +56,8 @@ export type GetPaymentResult = {
50
56
  id: string;
51
57
  /** Total Millitokens Paid */
52
58
  mtokens: string;
59
+ /** BOLT 11 Payment Request */
60
+ request?: string;
53
61
  /** Payment Forwarding Fee Rounded Up Tokens */
54
62
  safe_fee: number;
55
63
  /** Payment Tokens Rounded Up */
@@ -29,6 +29,9 @@ const type = 'router';
29
29
  [is_failed]: <Payment Is Failed Bool>
30
30
  [is_pending]: <Payment Is Pending Bool>
31
31
  [payment]: {
32
+ confirmed_at: <Payment Confirmed At ISO 8601 Date String>
33
+ created_at: <Payment Created At ISO 8601 Date String>
34
+ destination: <Payment Destination Hex String>
32
35
  fee: <Total Fees Paid Rounded Down Number>
33
36
  fee_mtokens: <Total Fee Millitokens Paid String>
34
37
  hops: [{
@@ -56,6 +59,7 @@ const type = 'router';
56
59
  }]
57
60
  mtokens: <Total Millitokens Paid String>
58
61
  }]
62
+ [request]: <BOLT 11 Encoded Payment Request String>
59
63
  safe_fee: <Payment Forwarding Fee Rounded Up Tokens Number>
60
64
  safe_tokens: <Payment Tokens Rounded Up Number>
61
65
  secret: <Payment Preimage Hex String>