lightning 10.8.2 → 10.9.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Versions
2
2
 
3
+ ## 10.9.1
4
+
5
+ - Add support for LND v0.17.5-beta
6
+
7
+ ## 10.9.0
8
+
9
+ - `fundPsbt`, `getChainFeeEstimate`, `sendToChainAddress`,
10
+ `sendToChainAddresses`, `sendToChainOutputScripts`: Add `utxo_selection` to
11
+ specify preferred coin selection behavior.
12
+
3
13
  ## 10.8.2
4
14
 
5
15
  - `pay` and payment via request methods: disallow features 30/31 from payments
@@ -1091,6 +1091,18 @@ message LightningAddress {
1091
1091
  string host = 2;
1092
1092
  }
1093
1093
 
1094
+ enum CoinSelectionStrategy {
1095
+ // Use the coin selection strategy defined in the global configuration
1096
+ // (lnd.conf).
1097
+ STRATEGY_USE_GLOBAL_CONFIG = 0;
1098
+
1099
+ // Select the largest available coins first during coin selection.
1100
+ STRATEGY_LARGEST = 1;
1101
+
1102
+ // Randomly select the available coins during coin selection.
1103
+ STRATEGY_RANDOM = 2;
1104
+ }
1105
+
1094
1106
  message EstimateFeeRequest {
1095
1107
  // The map from addresses to amounts for the transaction.
1096
1108
  map<string, int64> AddrToAmount = 1;
@@ -1105,6 +1117,9 @@ message EstimateFeeRequest {
1105
1117
 
1106
1118
  // Whether unconfirmed outputs should be used as inputs for the transaction.
1107
1119
  bool spend_unconfirmed = 4;
1120
+
1121
+ // The strategy to use for selecting coins during fees estimation.
1122
+ CoinSelectionStrategy coin_selection_strategy = 5;
1108
1123
  }
1109
1124
 
1110
1125
  message EstimateFeeResponse {
@@ -1145,6 +1160,9 @@ message SendManyRequest {
1145
1160
 
1146
1161
  // Whether unconfirmed outputs should be used as inputs for the transaction.
1147
1162
  bool spend_unconfirmed = 8;
1163
+
1164
+ // The strategy to use for selecting coins during sending many requests.
1165
+ CoinSelectionStrategy coin_selection_strategy = 9;
1148
1166
  }
1149
1167
  message SendManyResponse {
1150
1168
  // The id of the transaction
@@ -1187,6 +1205,9 @@ message SendCoinsRequest {
1187
1205
 
1188
1206
  // Whether unconfirmed outputs should be used as inputs for the transaction.
1189
1207
  bool spend_unconfirmed = 9;
1208
+
1209
+ // The strategy to use for selecting coins.
1210
+ CoinSelectionStrategy coin_selection_strategy = 10;
1190
1211
  }
1191
1212
  message SendCoinsResponse {
1192
1213
  // The transaction ID of the transaction
@@ -2115,6 +2136,9 @@ message BatchOpenChannelRequest {
2115
2136
 
2116
2137
  // An optional label for the batch transaction, limited to 500 characters.
2117
2138
  string label = 6;
2139
+
2140
+ // The strategy to use for selecting coins during batch opening channels.
2141
+ CoinSelectionStrategy coin_selection_strategy = 7;
2118
2142
  }
2119
2143
 
2120
2144
  message BatchOpenChannel {
@@ -3330,6 +3354,9 @@ message RoutingPolicy {
3330
3354
 
3331
3355
  // Custom channel update tlv records.
3332
3356
  map<uint64, bytes> custom_records = 8;
3357
+
3358
+ int32 inbound_fee_base_msat = 9;
3359
+ int32 inbound_fee_rate_milli_msat = 10;
3333
3360
  }
3334
3361
 
3335
3362
  /*
@@ -3545,8 +3572,11 @@ message BlindedPaymentPath {
3545
3572
  // The base fee for the blinded path provided, expressed in msat.
3546
3573
  uint64 base_fee_msat = 2;
3547
3574
 
3548
- // The proportional fee for the blinded path provided, expressed in msat.
3549
- uint64 proportional_fee_msat = 3;
3575
+ /*
3576
+ The proportional fee for the blinded path provided, expressed in parts
3577
+ per million.
3578
+ */
3579
+ uint32 proportional_fee_rate = 3;
3550
3580
 
3551
3581
  /*
3552
3582
  The total CLTV delta for the blinded path provided, including the
@@ -4306,7 +4336,15 @@ message ChannelFeeReport {
4306
4336
  // The effective fee rate in milli-satoshis. Computed by dividing the
4307
4337
  // fee_per_mil value by 1 million.
4308
4338
  double fee_rate = 4;
4339
+
4340
+ // The base fee charged regardless of the number of milli-satoshis sent.
4341
+ int32 inbound_base_fee_msat = 6;
4342
+
4343
+ // The amount charged per milli-satoshis transferred expressed in
4344
+ // millionths of a satoshi.
4345
+ int32 inbound_fee_per_mil = 7;
4309
4346
  }
4347
+
4310
4348
  message FeeReportResponse {
4311
4349
  // An array of channel fee reports which describes the current fee schedule
4312
4350
  // for each channel.
@@ -4357,7 +4395,11 @@ message PolicyUpdateRequest {
4357
4395
 
4358
4396
  // If true, min_htlc_msat is applied.
4359
4397
  bool min_htlc_msat_specified = 8;
4398
+
4399
+ int32 inbound_base_fee_msat = 10;
4400
+ int32 inbound_fee_rate_ppm = 11;
4360
4401
  }
4402
+
4361
4403
  enum UpdateFailure {
4362
4404
  UPDATE_FAILURE_UNKNOWN = 0;
4363
4405
  UPDATE_FAILURE_PENDING = 1;
@@ -813,6 +813,9 @@ message SendOutputsRequest {
813
813
 
814
814
  // Whether unconfirmed outputs should be used as inputs for the transaction.
815
815
  bool spend_unconfirmed = 5;
816
+
817
+ // The strategy to use for selecting coins during sending the outputs.
818
+ lnrpc.CoinSelectionStrategy coin_selection_strategy = 6;
816
819
  }
817
820
  message SendOutputsResponse {
818
821
  /*
@@ -1308,6 +1311,9 @@ message FundPsbtRequest {
1308
1311
  // accounts, no change type should be provided as the coin selection key
1309
1312
  // scope will always be used to generate the change address.
1310
1313
  ChangeAddressType change_type = 8;
1314
+
1315
+ // The strategy to use for selecting coins during funding the PSBT.
1316
+ lnrpc.CoinSelectionStrategy coin_selection_strategy = 10;
1311
1317
  }
1312
1318
  message FundPsbtResponse {
1313
1319
  /*
@@ -51,6 +51,7 @@
51
51
  "d62c575f8499a314eb27f12462d20500b6bda2c7": "0.10.3-beta",
52
52
  "df0b82f0165f19bde8832bacd1e35544b0a2990d": "0.14.0-beta",
53
53
  "eecbe99d68384c734b2c91fd0800484e69c5cab2": "0.14.4-beta",
54
+ "f8211a2c3b3d2112159cd119bd7674743336c661": "0.17.5-beta",
54
55
  "fb765fdb1daf1c1db08ab9b6aa0c442af431bc82": "0.16.1-beta",
55
56
  "fd1a95bf322cdd1c743a1554f8e470fbf9a5e564": "0.15.1-beta",
56
57
  "fdbeb1e7023827f1cb499a81d474986aa569d945": "0.16.2-beta"
@@ -22,7 +22,7 @@ export type GetConfigurationResult = {
22
22
  * Requires `info:read`, `offchain:read`, `onchain:read`, `peers:read`
23
23
  permissions
24
24
  *
25
- * This method is not supported on LND 0.17.4 and below
25
+ * This method is not supported on LND 0.17.5 and below
26
26
  */
27
27
  export const getConfiguration: AuthenticatedLightningMethod<
28
28
  GetConfigurationArgs,
@@ -17,7 +17,7 @@ const {values} = Object;
17
17
  Requires `info:read`, `offchain:read`, `onchain:read`, `peers:read`
18
18
  permissions
19
19
 
20
- This method is not supported on LND 0.17.4 and below
20
+ This method is not supported on LND 0.17.5 and below
21
21
 
22
22
  {
23
23
  lnd: <Authenticated LND API Object>
@@ -56,7 +56,7 @@ export type GetConnectedWatchTowersResult = {
56
56
  *
57
57
  * `is_anchor` flag is not supported on LND 0.11.1 and below
58
58
  *
59
- * `is_taproot` flag is not supported on LND 0.17.4 and below
59
+ * `is_taproot` flag is not supported on LND 0.17.5 and below
60
60
  */
61
61
  export const getConnectedWatchtowers: AuthenticatedLightningMethod<
62
62
  GetConnectedWatchTowersArgs,
@@ -18,7 +18,7 @@ const unimplementedError = '12 UNIMPLEMENTED: unknown service wtclientrpc.Watcht
18
18
 
19
19
  `is_anchor` flag is not supported on LND 0.11.1 and below
20
20
 
21
- `is_taproot` flag is not supported on LND 0.17.4 and below
21
+ `is_taproot` flag is not supported on LND 0.17.5 and below
22
22
 
23
23
  {
24
24
  [is_anchor]: <Get Anchor Type Tower Info Bool>
@@ -23,7 +23,7 @@ const type = 'default';
23
23
 
24
24
  `blocks_until_expiry` is not supported in LND 0.16.4 or before
25
25
 
26
- `close_transaction` is not supported in LND 0.17.4 or before
26
+ `close_transaction` is not supported in LND 0.17.5 or before
27
27
 
28
28
  {
29
29
  lnd: <Authenticated LND API Object>
@@ -14,6 +14,6 @@ export type DeleteChainTransactionArgs = AuthenticatedLightningArgs<{
14
14
  *
15
15
  * Requires `onchain:write` permission
16
16
  *
17
- * This method is not supported on LND 0.17.4 and below
17
+ * This method is not supported on LND 0.17.5 and below
18
18
  */
19
19
  export const deleteChainTransaction: AuthenticatedLightningMethod<DeleteChainTransactionArgs>;
@@ -13,7 +13,7 @@ const type = 'wallet';
13
13
 
14
14
  Requires `onchain:write` permission
15
15
 
16
- This method is not supported on LND 0.17.4 and below
16
+ This method is not supported on LND 0.17.5 and below
17
17
 
18
18
  {
19
19
  id: <Transaction Id Hex String>
@@ -16,6 +16,7 @@ const {isArray} = Array;
16
16
  const {isBuffer} = Buffer;
17
17
  const method = 'fundPsbt';
18
18
  const notSupported = /unknown.*walletrpc.WalletKit/;
19
+ const strategy = type => !type ? undefined : `STRATEGY_${type.toUpperCase()}`;
19
20
  const type = 'wallet';
20
21
  const txIdFromBuffer = buffer => buffer.slice().reverse().toString('hex');
21
22
  const txIdFromHash = hash => hash.reverse().toString('hex');
@@ -26,6 +27,8 @@ const txIdFromHash = hash => hash.reverse().toString('hex');
26
27
 
27
28
  If there are no inputs passed, internal UTXOs will be selected and locked
28
29
 
30
+ `utxo_selection` methods: 'largest', 'random'
31
+
29
32
  Requires `onchain:write` permission
30
33
 
31
34
  Requires LND built with `walletrpc` tag
@@ -34,6 +37,8 @@ const txIdFromHash = hash => hash.reverse().toString('hex');
34
37
 
35
38
  Specifying 0 for `min_confirmations` is not supported in LND 0.13.0 and below
36
39
 
40
+ `utxo_selection` is not supported in LND 0.17.5 and below
41
+
37
42
  {
38
43
  [fee_tokens_per_vbyte]: <Chain Fee Tokens Per Virtual Byte Number>
39
44
  [inputs]: [{
@@ -48,6 +53,7 @@ const txIdFromHash = hash => hash.reverse().toString('hex');
48
53
  }]
49
54
  [target_confirmations]: <Confirmations To Wait Number>
50
55
  [psbt]: <Existing PSBT Hex String>
56
+ [utxo_selection]: <Select UTXOs Using Method String>
51
57
  }
52
58
 
53
59
  @returns via cbk or Promise
@@ -158,6 +164,7 @@ module.exports = (args, cbk) => {
158
164
  fund: ['fee', 'funding', 'minConfs', ({fee, funding, minConfs}, cbk) => {
159
165
  return args.lnd[type][method]({
160
166
  change_type: defaultChangeType,
167
+ coin_selection_strategy: strategy(args.utxo_selection),
161
168
  min_confs: minConfs !== undefined ? minConfs : undefined,
162
169
  psbt: !!args.psbt ? Buffer.from(args.psbt, 'hex') : undefined,
163
170
  raw: funding || undefined,
@@ -7,15 +7,20 @@ const hasNumber = n => !!n && n !== '0';
7
7
  const {isArray} = Array;
8
8
  const method = 'estimateFee';
9
9
  const notFound = -1;
10
+ const strategy = type => !type ? undefined : `STRATEGY_${type.toUpperCase()}`;
10
11
  const type = 'default';
11
12
  const unconfirmedConfCount = 0;
12
13
 
13
14
  /** Get a chain fee estimate for a prospective chain send
14
15
 
16
+ `utxo_selection` methods: 'largest', 'random'
17
+
15
18
  Requires `onchain:read` permission
16
19
 
17
20
  Specifying 0 for `utxo_confirmations` is not supported in LND 0.13.0 or below
18
21
 
22
+ `utxo_selection` is not supported in LND 0.17.5 and below
23
+
19
24
  {
20
25
  lnd: <Authenticated LND API Object>
21
26
  send_to: [{
@@ -24,6 +29,7 @@ const unconfirmedConfCount = 0;
24
29
  }]
25
30
  [target_confirmations]: <Target Confirmations Number>
26
31
  [utxo_confirmations]: <Minimum Confirmations for UTXO Selection Number>
32
+ [utxo_selection]: <Select UTXOs Using Method String>
27
33
  }
28
34
 
29
35
  @returns via cbk or Promise
@@ -68,6 +74,7 @@ module.exports = (args, cbk) => {
68
74
 
69
75
  return args.lnd[type][method]({
70
76
  AddrToAmount,
77
+ coin_selection_strategy: strategy(args.utxo_selection),
71
78
  target_conf: args.target_confirmations || undefined,
72
79
  min_confs: args.utxo_confirmations || undefined,
73
80
  spend_unconfirmed: args.utxo_confirmations === unconfirmedConfCount,
@@ -16,7 +16,7 @@ export type GetChainTransactionResult = ChainTransaction;
16
16
  *
17
17
  * Requires `onchain:read` permission
18
18
  *
19
- * This method is not supported on LND 0.17.4 and below
19
+ * This method is not supported on LND 0.17.5 and below
20
20
  */
21
21
  export const getChainTransaction: AuthenticatedLightningMethod<
22
22
  GetChainTransactionArgs,
@@ -13,7 +13,7 @@ const type = 'wallet';
13
13
 
14
14
  Requires `onchain:read` permission
15
15
 
16
- This method is not supported on LND 0.17.4 and below
16
+ This method is not supported on LND 0.17.5 and below
17
17
 
18
18
  {
19
19
  id: <Transaction Id Hex String>
@@ -9,16 +9,21 @@ const {isInteger} = Number;
9
9
  const lowBalanceErr = 'insufficient funds available to construct transaction';
10
10
  const method = 'sendCoins';
11
11
  const OPEN = 1;
12
+ const strategy = type => !type ? undefined : `STRATEGY_${type.toUpperCase()}`;
12
13
  const {stringify} = JSON;
13
14
  const type = 'default';
14
15
  const unconfirmedConfCount = 0;
15
16
 
16
17
  /** Send tokens in a blockchain transaction.
17
18
 
19
+ `utxo_selection` methods: 'largest', 'random'
20
+
18
21
  Requires `onchain:write` permission
19
22
 
20
23
  `utxo_confirmations` is not supported on LND 0.11.1 or below
21
24
 
25
+ `utxo_selection` is not supported in LND 0.17.5 and below
26
+
22
27
  {
23
28
  address: <Destination Chain Address String>
24
29
  [description]: <Transaction Label String>
@@ -29,6 +34,7 @@ const unconfirmedConfCount = 0;
29
34
  [target_confirmations]: <Confirmations To Wait Number>
30
35
  [tokens]: <Tokens To Send Number>
31
36
  [utxo_confirmations]: <Minimum Confirmations for UTXO Selection Number>
37
+ [utxo_selection]: <Select UTXOs Using Method String>
32
38
  [wss]: [<Web Socket Server Object>]
33
39
  }
34
40
 
@@ -82,6 +88,7 @@ module.exports = (args, cbk) => {
82
88
  return args.lnd.default.sendCoins({
83
89
  addr: args.address,
84
90
  amount: args.tokens || undefined,
91
+ coin_selection_strategy: strategy(args.utxo_selection),
85
92
  min_confs: args.utxo_confirmations || undefined,
86
93
  label: args.description || undefined,
87
94
  sat_per_byte: args.fee_tokens_per_vbyte || undefined,
@@ -8,15 +8,20 @@ const {isArray} = Array;
8
8
  const method = 'sendMany';
9
9
  const OPEN = 1;
10
10
  const unconfirmedConfCount = 0;
11
+ const strategy = type => !type ? undefined : `STRATEGY_${type.toUpperCase()}`;
11
12
  const {stringify} = JSON;
12
13
  const type = 'default';
13
14
 
14
15
  /** Send tokens to multiple destinations in a blockchain transaction.
15
16
 
17
+ `utxo_selection` methods: 'largest', 'random'
18
+
16
19
  Requires `onchain:write` permission
17
20
 
18
21
  `utxo_confirmations` is not supported on LND 0.11.1 or below
19
22
 
23
+ `utxo_selection` is not supported in LND 0.17.5 and below
24
+
20
25
  {
21
26
  [description]: <Transaction Label String>
22
27
  [fee_tokens_per_vbyte]: <Chain Fee Tokens Per Virtual Byte Number>
@@ -28,6 +33,7 @@ const type = 'default';
28
33
  }]
29
34
  [target_confirmations]: <Confirmations To Wait Number>
30
35
  [utxo_confirmations]: <Minimum Confirmations for UTXO Selection Number>
36
+ [utxo_selection]: <Select UTXOs Using Method String>
31
37
  [wss]: [<Web Socket Server Object>]
32
38
  }
33
39
 
@@ -76,6 +82,7 @@ module.exports = (args, cbk) => {
76
82
 
77
83
  const send = {
78
84
  AddrToAmount,
85
+ coin_selection_strategy: strategy(args.utxo_selection),
79
86
  label: args.description || undefined,
80
87
  min_confs: args.utxo_confirmations || undefined,
81
88
  sat_per_byte: args.fee_tokens_per_vbyte || undefined,
@@ -12,17 +12,22 @@ const {isArray} = Array;
12
12
  const {isBuffer} = Buffer;
13
13
  const method = 'sendOutputs';
14
14
  const minFeeRate = 1;
15
- const unconfirmedConfCount = 0;
15
+ const strategy = type => !type ? undefined : `STRATEGY_${type.toUpperCase()}`;
16
16
  const type = 'wallet';
17
+ const unconfirmedConfCount = 0;
17
18
  const weightPerKWeight = 1e3;
18
19
  const weightPerVByte = 4;
19
20
 
20
21
  /** Send on-chain funds to multiple output scripts
21
22
 
23
+ `utxo_selection` methods: 'largest', 'random'
24
+
22
25
  Requires `onchain:write` permission
23
26
 
24
27
  Requires LND compiled with `walletrpc` build tag
25
28
 
29
+ `utxo_selection` is not supported in LND 0.17.5 and below
30
+
26
31
  {
27
32
  [description]: <Transaction Label String>
28
33
  [fee_tokens_per_vbyte]: <Chain Fee Tokens Per Virtual Byte Number>
@@ -32,6 +37,7 @@ const weightPerVByte = 4;
32
37
  tokens: <Tokens Number>
33
38
  }]
34
39
  [utxo_confirmations]: <Minimum Confirmations for UTXO Selection Number>
40
+ [utxo_selection]: <Select UTXOs Using Method String>
35
41
  }
36
42
 
37
43
  @returns via cbk or Promise
@@ -66,6 +72,7 @@ module.exports = (args, cbk) => {
66
72
  const feePerKw = feePerVByte * weightPerKWeight / weightPerVByte;
67
73
 
68
74
  return args.lnd[type][method]({
75
+ coin_selection_strategy: strategy(args.utxo_selection),
69
76
  label: args.description || undefined,
70
77
  min_confs: args.utxo_confirmations || undefined,
71
78
  outputs: args.send_to.map(output => ({
package/package.json CHANGED
@@ -7,9 +7,9 @@
7
7
  "url": "https://github.com/alexbosworth/lightning/issues"
8
8
  },
9
9
  "dependencies": {
10
- "@grpc/grpc-js": "1.10.4",
10
+ "@grpc/grpc-js": "1.10.6",
11
11
  "@grpc/proto-loader": "0.7.12",
12
- "@types/node": "20.12.2",
12
+ "@types/node": "20.12.7",
13
13
  "@types/request": "2.48.12",
14
14
  "@types/ws": "8.5.10",
15
15
  "async": "3.2.5",
@@ -22,12 +22,12 @@
22
22
  "invoices": "3.0.0",
23
23
  "psbt": "3.0.0",
24
24
  "tiny-secp256k1": "2.2.3",
25
- "type-fest": "4.14.0"
25
+ "type-fest": "4.16.0"
26
26
  },
27
27
  "description": "Lightning Network client library",
28
28
  "devDependencies": {
29
29
  "tsd": "0.31.0",
30
- "typescript": "5.4.3"
30
+ "typescript": "5.4.5"
31
31
  },
32
32
  "engines": {
33
33
  "node": ">=18"
@@ -53,5 +53,5 @@
53
53
  "directory": "test/typescript"
54
54
  },
55
55
  "types": "index.d.ts",
56
- "version": "10.8.2"
56
+ "version": "10.9.1"
57
57
  }
@@ -169,6 +169,11 @@ const tests = [
169
169
  description: 'PSBT funding can specify conf target',
170
170
  expected: makeExpected({}),
171
171
  },
172
+ {
173
+ args: makeArgs({utxo_selection: 'largest'}),
174
+ description: 'PSBT funding can select largest coins',
175
+ expected: makeExpected({}),
176
+ },
172
177
  ];
173
178
 
174
179
  tests.forEach(({args, description, error, expected}) => {
@@ -113,6 +113,24 @@ const tests = [
113
113
  description: 'Sat per vbyte result is supported',
114
114
  expected: {fee: 1, tokens_per_vbyte: 2},
115
115
  },
116
+ {
117
+ args: {
118
+ lnd: {
119
+ default: {
120
+ estimateFee: ({}, cbk) => cbk(null, {
121
+ fee_sat: '1',
122
+ feerate_sat_per_byte: '1',
123
+ sat_per_vbyte: '2',
124
+ }),
125
+ },
126
+ },
127
+ send_to: [{address: 'address', tokens: 1}],
128
+ utxo_confirmations: 0,
129
+ utxo_selection: 'largest',
130
+ },
131
+ description: 'Coin selection can be specified',
132
+ expected: {fee: 1, tokens_per_vbyte: 2},
133
+ },
116
134
  ];
117
135
 
118
136
  tests.forEach(({args, description, error, expected}) => {
@@ -146,6 +146,17 @@ const tests = [
146
146
  tokens: 1,
147
147
  },
148
148
  },
149
+ {
150
+ args: makeArgs({utxo_selection: 'random'}),
151
+ description: 'Send coins with coin selection',
152
+ expected: {
153
+ confirmation_count: 0,
154
+ id: Buffer.alloc(32).toString('hex'),
155
+ is_confirmed: false,
156
+ is_outgoing: true,
157
+ tokens: 1,
158
+ },
159
+ },
149
160
  ];
150
161
 
151
162
  tests.forEach(({args, description, error, expected}) => {
@@ -130,6 +130,17 @@ const tests = [
130
130
  tokens: 1,
131
131
  },
132
132
  },
133
+ {
134
+ args: makeArgs({utxo_selection: 'random'}),
135
+ description: 'Send coins with coin selection',
136
+ expected: {
137
+ confirmation_count: 0,
138
+ id: Buffer.alloc(32).toString('hex'),
139
+ is_confirmed: false,
140
+ is_outgoing: true,
141
+ tokens: 1,
142
+ },
143
+ },
133
144
  ];
134
145
 
135
146
  tests.forEach(({args, description, error, expected}) => {
@@ -61,6 +61,18 @@ const tests = [
61
61
  transaction: '01000000000000000000',
62
62
  },
63
63
  },
64
+ {
65
+ args: makeArgs({utxo_selection: 'random'}),
66
+ description: 'Send coins with coin selection',
67
+ expected: {
68
+ confirmation_count: 0,
69
+ id: 'd21633ba23f70118185227be58a63527675641ad37967e2aa461559f577aec43',
70
+ is_confirmed: false,
71
+ is_outgoing: true,
72
+ tokens: 1,
73
+ transaction: '01000000000000000000',
74
+ },
75
+ },
64
76
  ];
65
77
 
66
78
  tests.forEach(({args, description, error, expected}) => {