@lightsparkdev/lightspark-sdk 1.5.6 → 1.5.9

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,29 @@
1
1
  # @lightsparkdev/lightspark-sdk
2
2
 
3
+ ## 1.5.9
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [b47bc60]
8
+ - @lightsparkdev/core@1.0.20
9
+
10
+ ## 1.5.8
11
+
12
+ ### Patch Changes
13
+
14
+ - 330f913: - Switch dependency placement to resolve TSUP bundling issues
15
+ - Updated dependencies [330f913]
16
+ - @lightsparkdev/core@1.0.19
17
+
18
+ ## 1.5.7
19
+
20
+ ### Patch Changes
21
+
22
+ - 062bf8a: [js] Add engines field to all packages to indicate supported NodeJS versions
23
+ - Updated dependencies [062bf8a]
24
+ - @lightsparkdev/crypto-wasm@0.1.3
25
+ - @lightsparkdev/core@1.0.18
26
+
3
27
  ## 1.5.6
4
28
 
5
29
  ### Patch Changes
@@ -2,8 +2,38 @@ import {
2
2
  BitcoinNetwork_default
3
3
  } from "./chunk-K6SAUSAX.js";
4
4
 
5
- // src/objects/Account.ts
6
- import autoBind10 from "auto-bind";
5
+ // ../../node_modules/auto-bind/index.js
6
+ var getAllProperties = (object) => {
7
+ const properties = /* @__PURE__ */ new Set();
8
+ do {
9
+ for (const key of Reflect.ownKeys(object)) {
10
+ properties.add([object, key]);
11
+ }
12
+ } while ((object = Reflect.getPrototypeOf(object)) && object !== Object.prototype);
13
+ return properties;
14
+ };
15
+ function autoBind(self, { include, exclude } = {}) {
16
+ const filter = (key) => {
17
+ const match = (pattern) => typeof pattern === "string" ? key === pattern : pattern.test(key);
18
+ if (include) {
19
+ return include.some(match);
20
+ }
21
+ if (exclude) {
22
+ return !exclude.some(match);
23
+ }
24
+ return true;
25
+ };
26
+ for (const [object, key] of getAllProperties(self.constructor.prototype)) {
27
+ if (key === "constructor" || !filter(key)) {
28
+ continue;
29
+ }
30
+ const descriptor = Reflect.getOwnPropertyDescriptor(object, key);
31
+ if (descriptor && typeof descriptor.value === "function") {
32
+ self[key] = self[key].bind(self);
33
+ }
34
+ }
35
+ return self;
36
+ }
7
37
 
8
38
  // src/objects/Permission.ts
9
39
  var Permission = /* @__PURE__ */ ((Permission2) => {
@@ -90,9 +120,6 @@ var AccountToApiTokensConnectionFromJson = (obj) => {
90
120
  };
91
121
  };
92
122
 
93
- // src/objects/Channel.ts
94
- import autoBind from "auto-bind";
95
-
96
123
  // src/objects/CurrencyUnit.ts
97
124
  var CurrencyUnit = /* @__PURE__ */ ((CurrencyUnit2) => {
98
125
  CurrencyUnit2["FUTURE_VALUE"] = "FUTURE_VALUE";
@@ -515,9 +542,6 @@ var LightsparkNodeStatus = /* @__PURE__ */ ((LightsparkNodeStatus2) => {
515
542
  })(LightsparkNodeStatus || {});
516
543
  var LightsparkNodeStatus_default = LightsparkNodeStatus;
517
544
 
518
- // src/objects/LightsparkNodeWithOSK.ts
519
- import autoBind2 from "auto-bind";
520
-
521
545
  // src/objects/LightsparkNodeToChannelsConnection.ts
522
546
  var LightsparkNodeToChannelsConnectionFromJson = (obj) => {
523
547
  return {
@@ -625,7 +649,7 @@ var LightsparkNodeWithOSK = class {
625
649
  this.blockchainBalance = blockchainBalance;
626
650
  this.balances = balances;
627
651
  this.encryptedSigningPrivateKey = encryptedSigningPrivateKey;
628
- autoBind2(this);
652
+ autoBind(this);
629
653
  }
630
654
  async getAddresses(client, first = void 0, types = void 0) {
631
655
  return await client.executeRawQuery({
@@ -1031,7 +1055,6 @@ fragment LightsparkNodeWithOSKFragment on LightsparkNodeWithOSK {
1031
1055
  var LightsparkNodeWithOSK_default = LightsparkNodeWithOSK;
1032
1056
 
1033
1057
  // src/objects/LightsparkNodeWithRemoteSigning.ts
1034
- import autoBind3 from "auto-bind";
1035
1058
  var LightsparkNodeWithRemoteSigning = class {
1036
1059
  constructor(id, createdAt, updatedAt, bitcoinNetwork, displayName, ownerId, umaPrescreeningUtxos, typename, alias, color, conductivity, publicKey, status, totalBalance, totalLocalBalance, localBalance, remoteBalance, blockchainBalance, balances) {
1037
1060
  this.id = id;
@@ -1053,7 +1076,7 @@ var LightsparkNodeWithRemoteSigning = class {
1053
1076
  this.remoteBalance = remoteBalance;
1054
1077
  this.blockchainBalance = blockchainBalance;
1055
1078
  this.balances = balances;
1056
- autoBind3(this);
1079
+ autoBind(this);
1057
1080
  }
1058
1081
  async getAddresses(client, first = void 0, types = void 0) {
1059
1082
  return await client.executeRawQuery({
@@ -1831,7 +1854,6 @@ import { LightsparkException as LightsparkException3 } from "@lightsparkdev/core
1831
1854
  import { LightsparkException as LightsparkException2 } from "@lightsparkdev/core";
1832
1855
 
1833
1856
  // src/objects/GraphNode.ts
1834
- import autoBind4 from "auto-bind";
1835
1857
  var GraphNode = class {
1836
1858
  constructor(id, createdAt, updatedAt, bitcoinNetwork, displayName, typename, alias, color, conductivity, publicKey) {
1837
1859
  this.id = id;
@@ -1844,7 +1866,7 @@ var GraphNode = class {
1844
1866
  this.color = color;
1845
1867
  this.conductivity = conductivity;
1846
1868
  this.publicKey = publicKey;
1847
- autoBind4(this);
1869
+ autoBind(this);
1848
1870
  }
1849
1871
  async getAddresses(client, first = void 0, types = void 0) {
1850
1872
  return await client.executeRawQuery({
@@ -3071,9 +3093,6 @@ var AccountToPaymentRequestsConnectionFromJson = (obj) => {
3071
3093
  // src/objects/Transaction.ts
3072
3094
  import { LightsparkException as LightsparkException5 } from "@lightsparkdev/core";
3073
3095
 
3074
- // src/objects/IncomingPayment.ts
3075
- import autoBind5 from "auto-bind";
3076
-
3077
3096
  // src/objects/IncomingPaymentAttemptStatus.ts
3078
3097
  var IncomingPaymentAttemptStatus = /* @__PURE__ */ ((IncomingPaymentAttemptStatus2) => {
3079
3098
  IncomingPaymentAttemptStatus2["FUTURE_VALUE"] = "FUTURE_VALUE";
@@ -3191,7 +3210,7 @@ var IncomingPayment = class {
3191
3210
  this.transactionHash = transactionHash;
3192
3211
  this.paymentRequestId = paymentRequestId;
3193
3212
  this.umaPostTransactionData = umaPostTransactionData;
3194
- autoBind5(this);
3213
+ autoBind(this);
3195
3214
  }
3196
3215
  async getAttempts(client, first = void 0, statuses = void 0, after = void 0) {
3197
3216
  return await client.executeRawQuery({
@@ -3333,12 +3352,6 @@ fragment IncomingPaymentFragment on IncomingPayment {
3333
3352
  }`;
3334
3353
  var IncomingPayment_default = IncomingPayment;
3335
3354
 
3336
- // src/objects/OutgoingPayment.ts
3337
- import autoBind7 from "auto-bind";
3338
-
3339
- // src/objects/OutgoingPaymentAttempt.ts
3340
- import autoBind6 from "auto-bind";
3341
-
3342
3355
  // src/objects/ChannelSnapshot.ts
3343
3356
  var ChannelSnapshotFromJson = (obj) => {
3344
3357
  return {
@@ -3500,7 +3513,7 @@ var OutgoingPaymentAttempt = class {
3500
3513
  this.amount = amount;
3501
3514
  this.fees = fees;
3502
3515
  this.channelSnapshot = channelSnapshot;
3503
- autoBind6(this);
3516
+ autoBind(this);
3504
3517
  }
3505
3518
  async getHops(client, first = void 0, after = void 0) {
3506
3519
  return await client.executeRawQuery({
@@ -3796,7 +3809,7 @@ var OutgoingPayment = class {
3796
3809
  this.failureMessage = failureMessage;
3797
3810
  this.umaPostTransactionData = umaPostTransactionData;
3798
3811
  this.paymentPreimage = paymentPreimage;
3799
- autoBind7(this);
3812
+ autoBind(this);
3800
3813
  }
3801
3814
  async getAttempts(client, first = void 0, after = void 0) {
3802
3815
  return await client.executeRawQuery({
@@ -5043,9 +5056,6 @@ var AccountToTransactionsConnectionFromJson = (obj) => {
5043
5056
  };
5044
5057
  };
5045
5058
 
5046
- // src/objects/Wallet.ts
5047
- import autoBind9 from "auto-bind";
5048
-
5049
5059
  // src/objects/WalletStatus.ts
5050
5060
  var WalletStatus = /* @__PURE__ */ ((WalletStatus2) => {
5051
5061
  WalletStatus2["FUTURE_VALUE"] = "FUTURE_VALUE";
@@ -5090,9 +5100,6 @@ var WalletToTransactionsConnectionFromJson = (obj) => {
5090
5100
  };
5091
5101
  };
5092
5102
 
5093
- // src/objects/WithdrawalRequest.ts
5094
- import autoBind8 from "auto-bind";
5095
-
5096
5103
  // src/objects/WithdrawalMode.ts
5097
5104
  var WithdrawalMode = /* @__PURE__ */ ((WithdrawalMode2) => {
5098
5105
  WithdrawalMode2["FUTURE_VALUE"] = "FUTURE_VALUE";
@@ -5291,7 +5298,7 @@ var WithdrawalRequest = class {
5291
5298
  this.amountWithdrawn = amountWithdrawn;
5292
5299
  this.completedAt = completedAt;
5293
5300
  this.withdrawalId = withdrawalId;
5294
- autoBind8(this);
5301
+ autoBind(this);
5295
5302
  }
5296
5303
  async getChannelClosingTransactions(client, first = void 0) {
5297
5304
  return await client.executeRawQuery({
@@ -5545,7 +5552,7 @@ var Wallet = class {
5545
5552
  this.lastLoginAt = lastLoginAt;
5546
5553
  this.balances = balances;
5547
5554
  this.accountId = accountId;
5548
- autoBind9(this);
5555
+ autoBind(this);
5549
5556
  }
5550
5557
  async getTransactions(client, first = void 0, after = void 0, createdAfterDate = void 0, createdBeforeDate = void 0, statuses = void 0, types = void 0) {
5551
5558
  return await client.executeRawQuery({
@@ -6729,7 +6736,7 @@ var Account = class {
6729
6736
  this.updatedAt = updatedAt;
6730
6737
  this.typename = typename;
6731
6738
  this.name = name;
6732
- autoBind10(this);
6739
+ autoBind(this);
6733
6740
  }
6734
6741
  async getApiTokens(client, first = void 0, after = void 0) {
6735
6742
  return await client.executeRawQuery({
@@ -10481,6 +10488,7 @@ fragment WithdrawalFeeEstimateOutputFragment on WithdrawalFeeEstimateOutput {
10481
10488
  }`;
10482
10489
 
10483
10490
  export {
10491
+ autoBind,
10484
10492
  CurrencyUnit_default,
10485
10493
  CurrencyAmountFromJson,
10486
10494
  FRAGMENT2 as FRAGMENT,
package/dist/index.cjs CHANGED
@@ -1910,7 +1910,41 @@ module.exports = __toCommonJS(src_exports);
1910
1910
 
1911
1911
  // src/auth/AccountTokenAuthProvider.ts
1912
1912
  var import_core = require("@lightsparkdev/core");
1913
- var import_auto_bind = __toESM(require("auto-bind"), 1);
1913
+
1914
+ // ../../node_modules/auto-bind/index.js
1915
+ var getAllProperties = (object) => {
1916
+ const properties = /* @__PURE__ */ new Set();
1917
+ do {
1918
+ for (const key of Reflect.ownKeys(object)) {
1919
+ properties.add([object, key]);
1920
+ }
1921
+ } while ((object = Reflect.getPrototypeOf(object)) && object !== Object.prototype);
1922
+ return properties;
1923
+ };
1924
+ function autoBind(self, { include, exclude } = {}) {
1925
+ const filter = (key) => {
1926
+ const match = (pattern) => typeof pattern === "string" ? key === pattern : pattern.test(key);
1927
+ if (include) {
1928
+ return include.some(match);
1929
+ }
1930
+ if (exclude) {
1931
+ return !exclude.some(match);
1932
+ }
1933
+ return true;
1934
+ };
1935
+ for (const [object, key] of getAllProperties(self.constructor.prototype)) {
1936
+ if (key === "constructor" || !filter(key)) {
1937
+ continue;
1938
+ }
1939
+ const descriptor = Reflect.getOwnPropertyDescriptor(object, key);
1940
+ if (descriptor && typeof descriptor.value === "function") {
1941
+ self[key] = self[key].bind(self);
1942
+ }
1943
+ }
1944
+ return self;
1945
+ }
1946
+
1947
+ // src/auth/AccountTokenAuthProvider.ts
1914
1948
  var AccountTokenAuthProvider = class {
1915
1949
  constructor(apiTokenClientId, apiTokenClientSecret) {
1916
1950
  this.apiTokenClientId = apiTokenClientId;
@@ -1918,7 +1952,7 @@ var AccountTokenAuthProvider = class {
1918
1952
  this.utf8AuthBytes = new TextEncoder().encode(
1919
1953
  `${apiTokenClientId}:${apiTokenClientSecret}`
1920
1954
  );
1921
- (0, import_auto_bind.default)(this);
1955
+ autoBind(this);
1922
1956
  }
1923
1957
  utf8AuthBytes;
1924
1958
  addWsConnectionParams(params) {
@@ -1943,13 +1977,12 @@ var AccountTokenAuthProvider = class {
1943
1977
  var AccountTokenAuthProvider_default = AccountTokenAuthProvider;
1944
1978
 
1945
1979
  // src/client.ts
1946
- var import_auto_bind12 = __toESM(require("auto-bind"), 1);
1947
1980
  var import_core9 = require("@lightsparkdev/core");
1948
1981
 
1949
1982
  // package.json
1950
1983
  var package_default = {
1951
1984
  name: "@lightsparkdev/lightspark-sdk",
1952
- version: "1.5.6",
1985
+ version: "1.5.9",
1953
1986
  description: "Lightspark JS SDK",
1954
1987
  author: "Lightspark Inc.",
1955
1988
  keywords: [
@@ -1967,9 +2000,6 @@ var package_default = {
1967
2000
  bugs: {
1968
2001
  url: "https://github.com/lightsparkdev/js-sdk/issues"
1969
2002
  },
1970
- engines: {
1971
- node: ">=18.17.0"
1972
- },
1973
2003
  exports: {
1974
2004
  ".": {
1975
2005
  types: "./dist/index.d.ts",
@@ -2037,9 +2067,8 @@ var package_default = {
2037
2067
  },
2038
2068
  license: "Apache-2.0",
2039
2069
  dependencies: {
2040
- "@lightsparkdev/core": "1.0.17",
2041
- "@lightsparkdev/crypto-wasm": "0.1.2",
2042
- "auto-bind": "^5.0.1",
2070
+ "@lightsparkdev/core": "1.0.20",
2071
+ "@lightsparkdev/crypto-wasm": "0.1.3",
2043
2072
  "crypto-browserify": "^3.12.0",
2044
2073
  dayjs: "^1.11.7",
2045
2074
  dotenv: "^16.3.1",
@@ -2050,11 +2079,12 @@ var package_default = {
2050
2079
  },
2051
2080
  devDependencies: {
2052
2081
  "@lightsparkdev/eslint-config": "*",
2053
- "@lightsparkdev/tsconfig": "0.0.0",
2082
+ "@lightsparkdev/tsconfig": "0.0.1",
2054
2083
  "@types/crypto-js": "^4.1.1",
2055
2084
  "@types/jest": "^29.5.3",
2056
2085
  "@types/node": "^20.2.5",
2057
2086
  "@types/ws": "^8.5.4",
2087
+ "auto-bind": "^5.0.1",
2058
2088
  eslint: "^8.3.0",
2059
2089
  "eslint-watch": "^8.0.0",
2060
2090
  jest: "^29.6.2",
@@ -2065,6 +2095,9 @@ var package_default = {
2065
2095
  tsup: "^7.2.0",
2066
2096
  typedoc: "^0.24.7",
2067
2097
  typescript: "^5.0.0"
2098
+ },
2099
+ engines: {
2100
+ node: ">=18"
2068
2101
  }
2069
2102
  };
2070
2103
 
@@ -2387,9 +2420,6 @@ var BlockchainBalanceToJson = (obj) => {
2387
2420
  };
2388
2421
  };
2389
2422
 
2390
- // src/objects/GraphNode.ts
2391
- var import_auto_bind2 = __toESM(require("auto-bind"), 1);
2392
-
2393
2423
  // src/objects/NodeAddressType.ts
2394
2424
  var NodeAddressType = /* @__PURE__ */ ((NodeAddressType2) => {
2395
2425
  NodeAddressType2["FUTURE_VALUE"] = "FUTURE_VALUE";
@@ -2431,7 +2461,7 @@ var GraphNode = class {
2431
2461
  this.color = color;
2432
2462
  this.conductivity = conductivity;
2433
2463
  this.publicKey = publicKey;
2434
- (0, import_auto_bind2.default)(this);
2464
+ autoBind(this);
2435
2465
  }
2436
2466
  async getAddresses(client, first = void 0, types = void 0) {
2437
2467
  return await client.executeRawQuery({
@@ -2537,12 +2567,6 @@ var LightsparkNodeStatus = /* @__PURE__ */ ((LightsparkNodeStatus2) => {
2537
2567
  })(LightsparkNodeStatus || {});
2538
2568
  var LightsparkNodeStatus_default = LightsparkNodeStatus;
2539
2569
 
2540
- // src/objects/LightsparkNodeWithOSK.ts
2541
- var import_auto_bind4 = __toESM(require("auto-bind"), 1);
2542
-
2543
- // src/objects/Channel.ts
2544
- var import_auto_bind3 = __toESM(require("auto-bind"), 1);
2545
-
2546
2570
  // src/objects/ChannelFees.ts
2547
2571
  var ChannelFeesFromJson = (obj) => {
2548
2572
  return {
@@ -2609,7 +2633,7 @@ var Channel = class {
2609
2633
  this.fees = fees;
2610
2634
  this.remoteNodeId = remoteNodeId;
2611
2635
  this.shortChannelId = shortChannelId;
2612
- (0, import_auto_bind3.default)(this);
2636
+ autoBind(this);
2613
2637
  }
2614
2638
  async getUptimePercentage(client, afterDate = void 0, beforeDate = void 0) {
2615
2639
  return await client.executeRawQuery({
@@ -2933,7 +2957,7 @@ var LightsparkNodeWithOSK = class {
2933
2957
  this.blockchainBalance = blockchainBalance;
2934
2958
  this.balances = balances;
2935
2959
  this.encryptedSigningPrivateKey = encryptedSigningPrivateKey;
2936
- (0, import_auto_bind4.default)(this);
2960
+ autoBind(this);
2937
2961
  }
2938
2962
  async getAddresses(client, first = void 0, types = void 0) {
2939
2963
  return await client.executeRawQuery({
@@ -3339,7 +3363,6 @@ fragment LightsparkNodeWithOSKFragment on LightsparkNodeWithOSK {
3339
3363
  var LightsparkNodeWithOSK_default = LightsparkNodeWithOSK;
3340
3364
 
3341
3365
  // src/objects/LightsparkNodeWithRemoteSigning.ts
3342
- var import_auto_bind5 = __toESM(require("auto-bind"), 1);
3343
3366
  var LightsparkNodeWithRemoteSigning = class {
3344
3367
  constructor(id, createdAt, updatedAt, bitcoinNetwork, displayName, ownerId, umaPrescreeningUtxos, typename, alias, color, conductivity, publicKey, status, totalBalance, totalLocalBalance, localBalance, remoteBalance, blockchainBalance, balances) {
3345
3368
  this.id = id;
@@ -3361,7 +3384,7 @@ var LightsparkNodeWithRemoteSigning = class {
3361
3384
  this.remoteBalance = remoteBalance;
3362
3385
  this.blockchainBalance = blockchainBalance;
3363
3386
  this.balances = balances;
3364
- (0, import_auto_bind5.default)(this);
3387
+ autoBind(this);
3365
3388
  }
3366
3389
  async getAddresses(client, first = void 0, types = void 0) {
3367
3390
  return await client.executeRawQuery({
@@ -5155,9 +5178,6 @@ mutation CreateTestModeInvoice(
5155
5178
  }
5156
5179
  `;
5157
5180
 
5158
- // src/objects/IncomingPayment.ts
5159
- var import_auto_bind6 = __toESM(require("auto-bind"), 1);
5160
-
5161
5181
  // src/objects/IncomingPaymentAttemptStatus.ts
5162
5182
  var IncomingPaymentAttemptStatus = /* @__PURE__ */ ((IncomingPaymentAttemptStatus2) => {
5163
5183
  IncomingPaymentAttemptStatus2["FUTURE_VALUE"] = "FUTURE_VALUE";
@@ -5275,7 +5295,7 @@ var IncomingPayment = class {
5275
5295
  this.transactionHash = transactionHash;
5276
5296
  this.paymentRequestId = paymentRequestId;
5277
5297
  this.umaPostTransactionData = umaPostTransactionData;
5278
- (0, import_auto_bind6.default)(this);
5298
+ autoBind(this);
5279
5299
  }
5280
5300
  async getAttempts(client, first = void 0, statuses = void 0, after = void 0) {
5281
5301
  return await client.executeRawQuery({
@@ -5681,12 +5701,6 @@ var MultiNodeDashboard = `
5681
5701
  ${FRAGMENT}
5682
5702
  `;
5683
5703
 
5684
- // src/objects/OutgoingPayment.ts
5685
- var import_auto_bind8 = __toESM(require("auto-bind"), 1);
5686
-
5687
- // src/objects/OutgoingPaymentAttempt.ts
5688
- var import_auto_bind7 = __toESM(require("auto-bind"), 1);
5689
-
5690
5704
  // src/objects/ChannelSnapshot.ts
5691
5705
  var ChannelSnapshotFromJson = (obj) => {
5692
5706
  return {
@@ -5848,7 +5862,7 @@ var OutgoingPaymentAttempt = class {
5848
5862
  this.amount = amount;
5849
5863
  this.fees = fees;
5850
5864
  this.channelSnapshot = channelSnapshot;
5851
- (0, import_auto_bind7.default)(this);
5865
+ autoBind(this);
5852
5866
  }
5853
5867
  async getHops(client, first = void 0, after = void 0) {
5854
5868
  return await client.executeRawQuery({
@@ -6144,7 +6158,7 @@ var OutgoingPayment = class {
6144
6158
  this.failureMessage = failureMessage;
6145
6159
  this.umaPostTransactionData = umaPostTransactionData;
6146
6160
  this.paymentPreimage = paymentPreimage;
6147
- (0, import_auto_bind8.default)(this);
6161
+ autoBind(this);
6148
6162
  }
6149
6163
  async getAttempts(client, first = void 0, after = void 0) {
6150
6164
  return await client.executeRawQuery({
@@ -7110,9 +7124,6 @@ mutation RegisterPayment(
7110
7124
  }
7111
7125
  `;
7112
7126
 
7113
- // src/objects/WithdrawalRequest.ts
7114
- var import_auto_bind9 = __toESM(require("auto-bind"), 1);
7115
-
7116
7127
  // src/objects/WithdrawalMode.ts
7117
7128
  var WithdrawalMode = /* @__PURE__ */ ((WithdrawalMode2) => {
7118
7129
  WithdrawalMode2["FUTURE_VALUE"] = "FUTURE_VALUE";
@@ -7311,7 +7322,7 @@ var WithdrawalRequest = class {
7311
7322
  this.amountWithdrawn = amountWithdrawn;
7312
7323
  this.completedAt = completedAt;
7313
7324
  this.withdrawalId = withdrawalId;
7314
- (0, import_auto_bind9.default)(this);
7325
+ autoBind(this);
7315
7326
  }
7316
7327
  async getChannelClosingTransactions(client, first = void 0) {
7317
7328
  return await client.executeRawQuery({
@@ -8555,9 +8566,6 @@ var WithdrawalFeeEstimate = `
8555
8566
  ${FRAGMENT24}
8556
8567
  `;
8557
8568
 
8558
- // src/objects/Account.ts
8559
- var import_auto_bind11 = __toESM(require("auto-bind"), 1);
8560
-
8561
8569
  // src/objects/AccountToApiTokensConnection.ts
8562
8570
  var AccountToApiTokensConnectionFromJson = (obj) => {
8563
8571
  return {
@@ -8991,9 +8999,6 @@ var AccountToTransactionsConnectionFromJson = (obj) => {
8991
8999
  };
8992
9000
  };
8993
9001
 
8994
- // src/objects/Wallet.ts
8995
- var import_auto_bind10 = __toESM(require("auto-bind"), 1);
8996
-
8997
9002
  // src/objects/WalletStatus.ts
8998
9003
  var WalletStatus = /* @__PURE__ */ ((WalletStatus2) => {
8999
9004
  WalletStatus2["FUTURE_VALUE"] = "FUTURE_VALUE";
@@ -9064,7 +9069,7 @@ var Wallet = class {
9064
9069
  this.lastLoginAt = lastLoginAt;
9065
9070
  this.balances = balances;
9066
9071
  this.accountId = accountId;
9067
- (0, import_auto_bind10.default)(this);
9072
+ autoBind(this);
9068
9073
  }
9069
9074
  async getTransactions(client, first = void 0, after = void 0, createdAfterDate = void 0, createdBeforeDate = void 0, statuses = void 0, types = void 0) {
9070
9075
  return await client.executeRawQuery({
@@ -10248,7 +10253,7 @@ var Account = class {
10248
10253
  this.updatedAt = updatedAt;
10249
10254
  this.typename = typename;
10250
10255
  this.name = name;
10251
- (0, import_auto_bind11.default)(this);
10256
+ autoBind(this);
10252
10257
  }
10253
10258
  async getApiTokens(client, first = void 0, after = void 0) {
10254
10259
  return await client.executeRawQuery({
@@ -12055,7 +12060,7 @@ var LightsparkClient = class {
12055
12060
  serverUrl,
12056
12061
  this.cryptoImpl
12057
12062
  );
12058
- (0, import_auto_bind12.default)(this);
12063
+ autoBind(this);
12059
12064
  }
12060
12065
  requester;
12061
12066
  nodeKeyCache;
package/dist/index.js CHANGED
@@ -69,6 +69,7 @@ import {
69
69
  WithdrawalRequestFromJson,
70
70
  WithdrawalRequestStatus_default,
71
71
  WithdrawalRequest_default,
72
+ autoBind,
72
73
  getApiTokenQuery,
73
74
  getChannelClosingTransactionQuery,
74
75
  getChannelOpeningTransactionQuery,
@@ -88,7 +89,7 @@ import {
88
89
  getTransactionQuery,
89
90
  getUmaInvitationQuery,
90
91
  getWithdrawalQuery
91
- } from "./chunk-6JPCSXLW.js";
92
+ } from "./chunk-X7VPX3F3.js";
92
93
  import {
93
94
  BitcoinNetwork_default
94
95
  } from "./chunk-K6SAUSAX.js";
@@ -96,7 +97,6 @@ import "./chunk-BMTV3EA2.js";
96
97
 
97
98
  // src/auth/AccountTokenAuthProvider.ts
98
99
  import { b64encode } from "@lightsparkdev/core";
99
- import autoBind from "auto-bind";
100
100
  var AccountTokenAuthProvider = class {
101
101
  constructor(apiTokenClientId, apiTokenClientSecret) {
102
102
  this.apiTokenClientId = apiTokenClientId;
@@ -129,7 +129,6 @@ var AccountTokenAuthProvider = class {
129
129
  var AccountTokenAuthProvider_default = AccountTokenAuthProvider;
130
130
 
131
131
  // src/client.ts
132
- import autoBind2 from "auto-bind";
133
132
  import {
134
133
  DefaultCrypto as DefaultCrypto2,
135
134
  LightsparkAuthException,
@@ -146,7 +145,7 @@ import {
146
145
  // package.json
147
146
  var package_default = {
148
147
  name: "@lightsparkdev/lightspark-sdk",
149
- version: "1.5.6",
148
+ version: "1.5.9",
150
149
  description: "Lightspark JS SDK",
151
150
  author: "Lightspark Inc.",
152
151
  keywords: [
@@ -164,9 +163,6 @@ var package_default = {
164
163
  bugs: {
165
164
  url: "https://github.com/lightsparkdev/js-sdk/issues"
166
165
  },
167
- engines: {
168
- node: ">=18.17.0"
169
- },
170
166
  exports: {
171
167
  ".": {
172
168
  types: "./dist/index.d.ts",
@@ -234,9 +230,8 @@ var package_default = {
234
230
  },
235
231
  license: "Apache-2.0",
236
232
  dependencies: {
237
- "@lightsparkdev/core": "1.0.17",
238
- "@lightsparkdev/crypto-wasm": "0.1.2",
239
- "auto-bind": "^5.0.1",
233
+ "@lightsparkdev/core": "1.0.20",
234
+ "@lightsparkdev/crypto-wasm": "0.1.3",
240
235
  "crypto-browserify": "^3.12.0",
241
236
  dayjs: "^1.11.7",
242
237
  dotenv: "^16.3.1",
@@ -247,11 +242,12 @@ var package_default = {
247
242
  },
248
243
  devDependencies: {
249
244
  "@lightsparkdev/eslint-config": "*",
250
- "@lightsparkdev/tsconfig": "0.0.0",
245
+ "@lightsparkdev/tsconfig": "0.0.1",
251
246
  "@types/crypto-js": "^4.1.1",
252
247
  "@types/jest": "^29.5.3",
253
248
  "@types/node": "^20.2.5",
254
249
  "@types/ws": "^8.5.4",
250
+ "auto-bind": "^5.0.1",
255
251
  eslint: "^8.3.0",
256
252
  "eslint-watch": "^8.0.0",
257
253
  jest: "^29.6.2",
@@ -262,6 +258,9 @@ var package_default = {
262
258
  tsup: "^7.2.0",
263
259
  typedoc: "^0.24.7",
264
260
  typescript: "^5.0.0"
261
+ },
262
+ engines: {
263
+ node: ">=18"
265
264
  }
266
265
  };
267
266
 
@@ -1247,7 +1246,7 @@ var LightsparkClient = class {
1247
1246
  serverUrl,
1248
1247
  this.cryptoImpl
1249
1248
  );
1250
- autoBind2(this);
1249
+ autoBind(this);
1251
1250
  }
1252
1251
  requester;
1253
1252
  nodeKeyCache;
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __export = (target, all) => {
9
7
  for (var name in all)
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
17
15
  }
18
16
  return to;
19
17
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
19
 
30
20
  // src/objects/index.ts
@@ -90,8 +80,38 @@ __export(objects_exports, {
90
80
  });
91
81
  module.exports = __toCommonJS(objects_exports);
92
82
 
93
- // src/objects/Account.ts
94
- var import_auto_bind10 = __toESM(require("auto-bind"), 1);
83
+ // ../../node_modules/auto-bind/index.js
84
+ var getAllProperties = (object) => {
85
+ const properties = /* @__PURE__ */ new Set();
86
+ do {
87
+ for (const key of Reflect.ownKeys(object)) {
88
+ properties.add([object, key]);
89
+ }
90
+ } while ((object = Reflect.getPrototypeOf(object)) && object !== Object.prototype);
91
+ return properties;
92
+ };
93
+ function autoBind(self, { include, exclude } = {}) {
94
+ const filter = (key) => {
95
+ const match = (pattern) => typeof pattern === "string" ? key === pattern : pattern.test(key);
96
+ if (include) {
97
+ return include.some(match);
98
+ }
99
+ if (exclude) {
100
+ return !exclude.some(match);
101
+ }
102
+ return true;
103
+ };
104
+ for (const [object, key] of getAllProperties(self.constructor.prototype)) {
105
+ if (key === "constructor" || !filter(key)) {
106
+ continue;
107
+ }
108
+ const descriptor = Reflect.getOwnPropertyDescriptor(object, key);
109
+ if (descriptor && typeof descriptor.value === "function") {
110
+ self[key] = self[key].bind(self);
111
+ }
112
+ }
113
+ return self;
114
+ }
95
115
 
96
116
  // src/objects/Permission.ts
97
117
  var Permission = /* @__PURE__ */ ((Permission2) => {
@@ -178,9 +198,6 @@ var AccountToApiTokensConnectionFromJson = (obj) => {
178
198
  };
179
199
  };
180
200
 
181
- // src/objects/Channel.ts
182
- var import_auto_bind = __toESM(require("auto-bind"), 1);
183
-
184
201
  // src/objects/CurrencyUnit.ts
185
202
  var CurrencyUnit = /* @__PURE__ */ ((CurrencyUnit2) => {
186
203
  CurrencyUnit2["FUTURE_VALUE"] = "FUTURE_VALUE";
@@ -281,7 +298,7 @@ var Channel = class {
281
298
  this.fees = fees;
282
299
  this.remoteNodeId = remoteNodeId;
283
300
  this.shortChannelId = shortChannelId;
284
- (0, import_auto_bind.default)(this);
301
+ autoBind(this);
285
302
  }
286
303
  async getUptimePercentage(client, afterDate = void 0, beforeDate = void 0) {
287
304
  return await client.executeRawQuery({
@@ -605,9 +622,6 @@ var LightsparkNodeStatus = /* @__PURE__ */ ((LightsparkNodeStatus2) => {
605
622
  })(LightsparkNodeStatus || {});
606
623
  var LightsparkNodeStatus_default = LightsparkNodeStatus;
607
624
 
608
- // src/objects/LightsparkNodeWithOSK.ts
609
- var import_auto_bind2 = __toESM(require("auto-bind"), 1);
610
-
611
625
  // src/objects/LightsparkNodeToChannelsConnection.ts
612
626
  var LightsparkNodeToChannelsConnectionFromJson = (obj) => {
613
627
  return {
@@ -715,7 +729,7 @@ var LightsparkNodeWithOSK = class {
715
729
  this.blockchainBalance = blockchainBalance;
716
730
  this.balances = balances;
717
731
  this.encryptedSigningPrivateKey = encryptedSigningPrivateKey;
718
- (0, import_auto_bind2.default)(this);
732
+ autoBind(this);
719
733
  }
720
734
  async getAddresses(client, first = void 0, types = void 0) {
721
735
  return await client.executeRawQuery({
@@ -1121,7 +1135,6 @@ fragment LightsparkNodeWithOSKFragment on LightsparkNodeWithOSK {
1121
1135
  var LightsparkNodeWithOSK_default = LightsparkNodeWithOSK;
1122
1136
 
1123
1137
  // src/objects/LightsparkNodeWithRemoteSigning.ts
1124
- var import_auto_bind3 = __toESM(require("auto-bind"), 1);
1125
1138
  var LightsparkNodeWithRemoteSigning = class {
1126
1139
  constructor(id, createdAt, updatedAt, bitcoinNetwork, displayName, ownerId, umaPrescreeningUtxos, typename, alias, color, conductivity, publicKey, status, totalBalance, totalLocalBalance, localBalance, remoteBalance, blockchainBalance, balances) {
1127
1140
  this.id = id;
@@ -1143,7 +1156,7 @@ var LightsparkNodeWithRemoteSigning = class {
1143
1156
  this.remoteBalance = remoteBalance;
1144
1157
  this.blockchainBalance = blockchainBalance;
1145
1158
  this.balances = balances;
1146
- (0, import_auto_bind3.default)(this);
1159
+ autoBind(this);
1147
1160
  }
1148
1161
  async getAddresses(client, first = void 0, types = void 0) {
1149
1162
  return await client.executeRawQuery({
@@ -1921,7 +1934,6 @@ var import_core3 = require("@lightsparkdev/core");
1921
1934
  var import_core2 = require("@lightsparkdev/core");
1922
1935
 
1923
1936
  // src/objects/GraphNode.ts
1924
- var import_auto_bind4 = __toESM(require("auto-bind"), 1);
1925
1937
  var GraphNode = class {
1926
1938
  constructor(id, createdAt, updatedAt, bitcoinNetwork, displayName, typename, alias, color, conductivity, publicKey) {
1927
1939
  this.id = id;
@@ -1934,7 +1946,7 @@ var GraphNode = class {
1934
1946
  this.color = color;
1935
1947
  this.conductivity = conductivity;
1936
1948
  this.publicKey = publicKey;
1937
- (0, import_auto_bind4.default)(this);
1949
+ autoBind(this);
1938
1950
  }
1939
1951
  async getAddresses(client, first = void 0, types = void 0) {
1940
1952
  return await client.executeRawQuery({
@@ -2869,9 +2881,6 @@ var AccountToPaymentRequestsConnectionFromJson = (obj) => {
2869
2881
  // src/objects/Transaction.ts
2870
2882
  var import_core5 = require("@lightsparkdev/core");
2871
2883
 
2872
- // src/objects/IncomingPayment.ts
2873
- var import_auto_bind5 = __toESM(require("auto-bind"), 1);
2874
-
2875
2884
  // src/objects/IncomingPaymentAttemptStatus.ts
2876
2885
  var IncomingPaymentAttemptStatus = /* @__PURE__ */ ((IncomingPaymentAttemptStatus2) => {
2877
2886
  IncomingPaymentAttemptStatus2["FUTURE_VALUE"] = "FUTURE_VALUE";
@@ -2989,7 +2998,7 @@ var IncomingPayment = class {
2989
2998
  this.transactionHash = transactionHash;
2990
2999
  this.paymentRequestId = paymentRequestId;
2991
3000
  this.umaPostTransactionData = umaPostTransactionData;
2992
- (0, import_auto_bind5.default)(this);
3001
+ autoBind(this);
2993
3002
  }
2994
3003
  async getAttempts(client, first = void 0, statuses = void 0, after = void 0) {
2995
3004
  return await client.executeRawQuery({
@@ -3131,12 +3140,6 @@ fragment IncomingPaymentFragment on IncomingPayment {
3131
3140
  }`;
3132
3141
  var IncomingPayment_default = IncomingPayment;
3133
3142
 
3134
- // src/objects/OutgoingPayment.ts
3135
- var import_auto_bind7 = __toESM(require("auto-bind"), 1);
3136
-
3137
- // src/objects/OutgoingPaymentAttempt.ts
3138
- var import_auto_bind6 = __toESM(require("auto-bind"), 1);
3139
-
3140
3143
  // src/objects/ChannelSnapshot.ts
3141
3144
  var ChannelSnapshotFromJson = (obj) => {
3142
3145
  return {
@@ -3298,7 +3301,7 @@ var OutgoingPaymentAttempt = class {
3298
3301
  this.amount = amount;
3299
3302
  this.fees = fees;
3300
3303
  this.channelSnapshot = channelSnapshot;
3301
- (0, import_auto_bind6.default)(this);
3304
+ autoBind(this);
3302
3305
  }
3303
3306
  async getHops(client, first = void 0, after = void 0) {
3304
3307
  return await client.executeRawQuery({
@@ -3594,7 +3597,7 @@ var OutgoingPayment = class {
3594
3597
  this.failureMessage = failureMessage;
3595
3598
  this.umaPostTransactionData = umaPostTransactionData;
3596
3599
  this.paymentPreimage = paymentPreimage;
3597
- (0, import_auto_bind7.default)(this);
3600
+ autoBind(this);
3598
3601
  }
3599
3602
  async getAttempts(client, first = void 0, after = void 0) {
3600
3603
  return await client.executeRawQuery({
@@ -4841,9 +4844,6 @@ var AccountToTransactionsConnectionFromJson = (obj) => {
4841
4844
  };
4842
4845
  };
4843
4846
 
4844
- // src/objects/Wallet.ts
4845
- var import_auto_bind9 = __toESM(require("auto-bind"), 1);
4846
-
4847
4847
  // src/objects/WalletStatus.ts
4848
4848
  var WalletStatus = /* @__PURE__ */ ((WalletStatus2) => {
4849
4849
  WalletStatus2["FUTURE_VALUE"] = "FUTURE_VALUE";
@@ -4888,9 +4888,6 @@ var WalletToTransactionsConnectionFromJson = (obj) => {
4888
4888
  };
4889
4889
  };
4890
4890
 
4891
- // src/objects/WithdrawalRequest.ts
4892
- var import_auto_bind8 = __toESM(require("auto-bind"), 1);
4893
-
4894
4891
  // src/objects/WithdrawalMode.ts
4895
4892
  var WithdrawalMode = /* @__PURE__ */ ((WithdrawalMode2) => {
4896
4893
  WithdrawalMode2["FUTURE_VALUE"] = "FUTURE_VALUE";
@@ -5089,7 +5086,7 @@ var WithdrawalRequest = class {
5089
5086
  this.amountWithdrawn = amountWithdrawn;
5090
5087
  this.completedAt = completedAt;
5091
5088
  this.withdrawalId = withdrawalId;
5092
- (0, import_auto_bind8.default)(this);
5089
+ autoBind(this);
5093
5090
  }
5094
5091
  async getChannelClosingTransactions(client, first = void 0) {
5095
5092
  return await client.executeRawQuery({
@@ -5343,7 +5340,7 @@ var Wallet = class {
5343
5340
  this.lastLoginAt = lastLoginAt;
5344
5341
  this.balances = balances;
5345
5342
  this.accountId = accountId;
5346
- (0, import_auto_bind9.default)(this);
5343
+ autoBind(this);
5347
5344
  }
5348
5345
  async getTransactions(client, first = void 0, after = void 0, createdAfterDate = void 0, createdBeforeDate = void 0, statuses = void 0, types = void 0) {
5349
5346
  return await client.executeRawQuery({
@@ -6527,7 +6524,7 @@ var Account = class {
6527
6524
  this.updatedAt = updatedAt;
6528
6525
  this.typename = typename;
6529
6526
  this.name = name;
6530
- (0, import_auto_bind10.default)(this);
6527
+ autoBind(this);
6531
6528
  }
6532
6529
  async getApiTokens(client, first = void 0, after = void 0) {
6533
6530
  return await client.executeRawQuery({
@@ -55,7 +55,7 @@ import {
55
55
  getTransactionQuery,
56
56
  getUmaInvitationQuery,
57
57
  getWithdrawalQuery
58
- } from "../chunk-6JPCSXLW.js";
58
+ } from "../chunk-X7VPX3F3.js";
59
59
  import {
60
60
  BitcoinNetwork_default
61
61
  } from "../chunk-K6SAUSAX.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightsparkdev/lightspark-sdk",
3
- "version": "1.5.6",
3
+ "version": "1.5.9",
4
4
  "description": "Lightspark JS SDK",
5
5
  "author": "Lightspark Inc.",
6
6
  "keywords": [
@@ -18,9 +18,6 @@
18
18
  "bugs": {
19
19
  "url": "https://github.com/lightsparkdev/js-sdk/issues"
20
20
  },
21
- "engines": {
22
- "node": ">=18.17.0"
23
- },
24
21
  "exports": {
25
22
  ".": {
26
23
  "types": "./dist/index.d.ts",
@@ -88,9 +85,8 @@
88
85
  },
89
86
  "license": "Apache-2.0",
90
87
  "dependencies": {
91
- "@lightsparkdev/core": "1.0.17",
92
- "@lightsparkdev/crypto-wasm": "0.1.2",
93
- "auto-bind": "^5.0.1",
88
+ "@lightsparkdev/core": "1.0.20",
89
+ "@lightsparkdev/crypto-wasm": "0.1.3",
94
90
  "crypto-browserify": "^3.12.0",
95
91
  "dayjs": "^1.11.7",
96
92
  "dotenv": "^16.3.1",
@@ -101,11 +97,12 @@
101
97
  },
102
98
  "devDependencies": {
103
99
  "@lightsparkdev/eslint-config": "*",
104
- "@lightsparkdev/tsconfig": "0.0.0",
100
+ "@lightsparkdev/tsconfig": "0.0.1",
105
101
  "@types/crypto-js": "^4.1.1",
106
102
  "@types/jest": "^29.5.3",
107
103
  "@types/node": "^20.2.5",
108
104
  "@types/ws": "^8.5.4",
105
+ "auto-bind": "^5.0.1",
109
106
  "eslint": "^8.3.0",
110
107
  "eslint-watch": "^8.0.0",
111
108
  "jest": "^29.6.2",
@@ -116,5 +113,8 @@
116
113
  "tsup": "^7.2.0",
117
114
  "typedoc": "^0.24.7",
118
115
  "typescript": "^5.0.0"
116
+ },
117
+ "engines": {
118
+ "node": ">=18"
119
119
  }
120
120
  }
@@ -111,12 +111,12 @@ async function getRegtestNode() {
111
111
  return regtestNode;
112
112
  }
113
113
 
114
- const createTestModePayment = async () => {
114
+ const createTestModePayment = async (invoiceMemo = "hi there!") => {
115
115
  const regtestNodeId = getRegtestNodeId();
116
116
  const testInvoice = await lightsparkClient.createInvoice(
117
117
  regtestNodeId,
118
118
  10_000,
119
- "hi there!",
119
+ invoiceMemo,
120
120
  );
121
121
 
122
122
  if (!testInvoice) {
@@ -228,20 +228,20 @@ describe(initSuiteName, () => {
228
228
  });
229
229
 
230
230
  describe(p0SuiteName, () => {
231
- test("Should create a normal payment invoice", async () => {
231
+ test("Should create a standard payment invoice", async () => {
232
232
  paymentInvoice = await lightsparkClient.createInvoice(
233
233
  getRegtestNodeId(),
234
234
  10_000,
235
- "hi there!",
235
+ "Standard payment invoice memo",
236
236
  );
237
237
  expect(paymentInvoice).toBeDefined();
238
- });
238
+ }, 10_000);
239
239
 
240
240
  test("Should create a AMP type invoice", async () => {
241
241
  const AmpPaymentInvoice = await lightsparkClient.createInvoice(
242
242
  getRegtestNodeId(),
243
243
  10_000,
244
- "hi there!",
244
+ "AMP payment invoice memo",
245
245
  InvoiceType.AMP,
246
246
  );
247
247
  expect(AmpPaymentInvoice).toBeDefined();
@@ -252,7 +252,7 @@ describe(p0SuiteName, () => {
252
252
  await lightsparkClient.createInvoice(
253
253
  getRegtestNodeId(),
254
254
  10_000,
255
- "hi there!",
255
+ "Invoice with custom expiration memo",
256
256
  InvoiceType.STANDARD,
257
257
  INVOICE_EXPIRY,
258
258
  );
@@ -263,7 +263,7 @@ describe(p0SuiteName, () => {
263
263
  const AnyPaymentAmountInvoice = await lightsparkClient.createInvoice(
264
264
  getRegtestNodeId(),
265
265
  0,
266
- "hi there!",
266
+ "Any amount invoice memo",
267
267
  InvoiceType.STANDARD,
268
268
  INVOICE_EXPIRY,
269
269
  );
@@ -275,7 +275,7 @@ describe(p0SuiteName, () => {
275
275
  unauthorizedLightsparkClient.createInvoice(
276
276
  getRegtestNodeId(),
277
277
  0,
278
- "hi there!",
278
+ "Unauthorized invoice memo",
279
279
  ),
280
280
  ).rejects.toThrowError();
281
281
  });
@@ -353,7 +353,7 @@ describe(p0SuiteName, () => {
353
353
  const testInvoice = await lightsparkClient.createTestModeInvoice(
354
354
  getRegtestNodeId(),
355
355
  round(satsToFund / 4), // should be some small fraction of the sats we know we have from earlier funding test
356
- "hi there!",
356
+ "Attempt to pay test invoice memo",
357
357
  );
358
358
 
359
359
  if (!testInvoice) {
@@ -372,7 +372,9 @@ describe(p0SuiteName, () => {
372
372
  test(
373
373
  "Should open just-in-time channel from inbound payment",
374
374
  async () => {
375
- const payment = await createTestModePayment();
375
+ const payment = await createTestModePayment(
376
+ "Just-in-time channel payment memo",
377
+ );
376
378
  const { status } = await lightsparkClient.waitForTransactionComplete(
377
379
  payment.id,
378
380
  TRANSACTION_WAIT_TIME,
@@ -404,10 +406,10 @@ describe(p1SuiteName, () => {
404
406
  );
405
407
 
406
408
  test(
407
- "Should listen current payment requests",
409
+ "Should list current payment requests",
408
410
  async () => {
409
411
  for (let i = 0; i < PAGINATION_STEP; i++) {
410
- await createTestModePayment();
412
+ await createTestModePayment(`Recent payment request ${i} memo`);
411
413
  }
412
414
  const requests = await lightsparkClient.getRecentPaymentRequests(
413
415
  getRegtestNodeId(),
@@ -489,7 +491,7 @@ describe(p1SuiteName, () => {
489
491
  const umaInvoice = await lightsparkClient.createUmaInvoice(
490
492
  getRegtestNodeId(),
491
493
  10_000,
492
- "hi there!",
494
+ "UMA invoice memo",
493
495
  );
494
496
  expect(umaInvoice).toBeDefined();
495
497
  const cancelledInvoice = await lightsparkClient.cancelInvoice(
@@ -500,12 +502,12 @@ describe(p1SuiteName, () => {
500
502
  });
501
503
 
502
504
  test(
503
- "Should create STANDARD a test mode invoice",
505
+ "Should create standard a test mode invoice",
504
506
  async () => {
505
507
  testModeInvoices.withMemo = await lightsparkClient.createTestModeInvoice(
506
508
  getRegtestNodeId(),
507
509
  10_000,
508
- "hi there!",
510
+ "Standard test mode invoice memo",
509
511
  );
510
512
  expect(testModeInvoices.withMemo).not.toBeNull();
511
513
  },
@@ -544,7 +546,7 @@ describe(p1SuiteName, () => {
544
546
  const invoiceForTestPayment = await lightsparkClient.createInvoice(
545
547
  regtestNodeId,
546
548
  10_000,
547
- "hi there!",
549
+ "Create test mode payment invoice memo",
548
550
  );
549
551
 
550
552
  if (!invoiceForTestPayment) {