@lightsparkdev/lightspark-sdk 1.2.0 → 1.2.2

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 (57) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/{chunk-5RDIWPBE.js → chunk-D32EWIPX.js} +3 -1
  3. package/dist/{chunk-VTPDR6P4.js → chunk-GLL4KTUT.js} +353 -15
  4. package/dist/env.cjs +3 -1
  5. package/dist/env.d.cts +17 -0
  6. package/dist/env.js +2 -2
  7. package/dist/{index-f040db9f.d.ts → index-eb604025.d.ts} +1377 -15
  8. package/dist/index.cjs +682 -94
  9. package/dist/index.d.cts +41 -0
  10. package/dist/index.d.ts +3 -3
  11. package/dist/index.js +290 -37
  12. package/dist/objects/index.cjs +345 -5
  13. package/dist/objects/index.d.cts +4 -0
  14. package/dist/objects/index.d.ts +1 -1
  15. package/dist/objects/index.js +10 -2
  16. package/dist/{text-encoding-MDIPJAHL.js → text-encoding-26SMKBAQ.js} +3 -1
  17. package/package.json +4 -4
  18. package/src/auth/AccountTokenAuthProvider.ts +15 -11
  19. package/src/client.ts +201 -7
  20. package/src/graphql/ClaimUmaInvitation.ts +21 -0
  21. package/src/graphql/ClaimUmaInvitationWithIncentives.ts +25 -0
  22. package/src/graphql/CreateUmaInvitation.ts +19 -0
  23. package/src/graphql/CreateUmaInvitationWithIncentives.ts +23 -0
  24. package/src/graphql/FetchUmaInvitation.ts +15 -0
  25. package/src/helpers.ts +3 -1
  26. package/src/objects/Account.ts +8 -0
  27. package/src/objects/AccountToChannelsConnection.ts +5 -0
  28. package/src/objects/Channel.ts +31 -0
  29. package/src/objects/ClaimUmaInvitationInput.ts +26 -0
  30. package/src/objects/ClaimUmaInvitationOutput.ts +30 -0
  31. package/src/objects/ClaimUmaInvitationWithIncentivesInput.ts +44 -0
  32. package/src/objects/ClaimUmaInvitationWithIncentivesOutput.ts +33 -0
  33. package/src/objects/CreateInvitationWithIncentivesInput.ts +37 -0
  34. package/src/objects/CreateInvitationWithIncentivesOutput.ts +32 -0
  35. package/src/objects/CreateUmaInvitationInput.ts +22 -0
  36. package/src/objects/CreateUmaInvitationOutput.ts +30 -0
  37. package/src/objects/Entity.ts +13 -0
  38. package/src/objects/GraphNode.ts +28 -0
  39. package/src/objects/IncentivesIneligibilityReason.ts +24 -0
  40. package/src/objects/IncentivesStatus.ts +18 -0
  41. package/src/objects/IncomingPayment.ts +17 -0
  42. package/src/objects/LightsparkNodeWithOSK.ts +61 -0
  43. package/src/objects/LightsparkNodeWithRemoteSigning.ts +60 -0
  44. package/src/objects/OutgoingPayment.ts +20 -0
  45. package/src/objects/OutgoingPaymentAttempt.ts +31 -0
  46. package/src/objects/RegionCode.ts +510 -0
  47. package/src/objects/UmaInvitation.ts +113 -0
  48. package/src/objects/Wallet.ts +12 -0
  49. package/src/objects/WebhookEventType.ts +4 -0
  50. package/src/objects/WithdrawalRequest.ts +17 -0
  51. package/src/objects/index.ts +15 -0
  52. package/src/tests/integration/constants.ts +10 -0
  53. package/src/tests/integration/general-regtest.test.ts +633 -0
  54. package/src/tests/serialization.test.ts +5 -2
  55. package/src/webhooks.ts +1 -1
  56. package/src/tests/integration/client.test.ts +0 -207
  57. /package/dist/{chunk-NIMBE7W3.js → chunk-BMTV3EA2.js} +0 -0
package/dist/index.cjs CHANGED
@@ -33,6 +33,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
33
33
  // ../../node_modules/text-encoding/lib/encoding-indexes.js
34
34
  var require_encoding_indexes = __commonJS({
35
35
  "../../node_modules/text-encoding/lib/encoding-indexes.js"(exports, module2) {
36
+ "use strict";
36
37
  (function(global) {
37
38
  "use strict";
38
39
  if (typeof module2 !== "undefined" && module2.exports) {
@@ -80,6 +81,7 @@ var require_encoding_indexes = __commonJS({
80
81
  // ../../node_modules/text-encoding/lib/encoding.js
81
82
  var require_encoding = __commonJS({
82
83
  "../../node_modules/text-encoding/lib/encoding.js"(exports, module2) {
84
+ "use strict";
83
85
  (function(global) {
84
86
  "use strict";
85
87
  if (typeof module2 !== "undefined" && module2.exports && !global["encoding-indexes"]) {
@@ -1826,6 +1828,7 @@ var require_encoding = __commonJS({
1826
1828
  // ../../node_modules/text-encoding/index.js
1827
1829
  var require_text_encoding = __commonJS({
1828
1830
  "../../node_modules/text-encoding/index.js"(exports, module2) {
1831
+ "use strict";
1829
1832
  var encoding = require_encoding();
1830
1833
  module2.exports = {
1831
1834
  TextEncoder: encoding.TextEncoder,
@@ -1847,6 +1850,8 @@ __export(src_exports, {
1847
1850
  CurrencyUnit: () => CurrencyUnit_default,
1848
1851
  GraphNode: () => GraphNode_default,
1849
1852
  HtlcAttemptFailureCode: () => HtlcAttemptFailureCode_default,
1853
+ IncentivesIneligibilityReason: () => IncentivesIneligibilityReason_default,
1854
+ IncentivesStatus: () => IncentivesStatus_default,
1850
1855
  IncomingPayment: () => IncomingPayment_default,
1851
1856
  IncomingPaymentAttemptStatus: () => IncomingPaymentAttemptStatus_default,
1852
1857
  InvoiceType: () => InvoiceType_default,
@@ -1862,6 +1867,7 @@ __export(src_exports, {
1862
1867
  PaymentFailureReason: () => PaymentFailureReason_default,
1863
1868
  PaymentRequestStatus: () => PaymentRequestStatus_default,
1864
1869
  Permission: () => Permission_default,
1870
+ RegionCode: () => RegionCode_default,
1865
1871
  RemoteSigningSubEventType: () => RemoteSigningSubEventType_default,
1866
1872
  RemoteSigningWebhookHandler: () => RemoteSigningWebhookHandler,
1867
1873
  RiskRating: () => RiskRating_default,
@@ -1895,6 +1901,7 @@ __export(src_exports, {
1895
1901
  getSignablePayloadQuery: () => getSignablePayloadQuery,
1896
1902
  getSignableQuery: () => getSignableQuery,
1897
1903
  getTransactionQuery: () => getTransactionQuery,
1904
+ getUmaInvitationQuery: () => getUmaInvitationQuery,
1898
1905
  getWithdrawalQuery: () => getWithdrawalQuery,
1899
1906
  isBitcoinNetwork: () => isBitcoinNetwork,
1900
1907
  verifyAndParseWebhook: () => verifyAndParseWebhook
@@ -1914,19 +1921,23 @@ var AccountTokenAuthProvider = class {
1914
1921
  (0, import_auto_bind.default)(this);
1915
1922
  }
1916
1923
  utf8AuthBytes;
1917
- async addWsConnectionParams(params) {
1918
- return Object.assign({}, params, {
1919
- client_id: this.apiTokenClientId,
1920
- client_secret: this.apiTokenClientSecret
1921
- });
1924
+ addWsConnectionParams(params) {
1925
+ return Promise.resolve(
1926
+ Object.assign({}, params, {
1927
+ client_id: this.apiTokenClientId,
1928
+ client_secret: this.apiTokenClientSecret
1929
+ })
1930
+ );
1922
1931
  }
1923
- async addAuthHeaders(headers) {
1924
- return Object.assign({}, headers, {
1925
- authorization: `Basic ${(0, import_core.b64encode)(this.utf8AuthBytes)}`
1926
- });
1932
+ addAuthHeaders(headers) {
1933
+ return Promise.resolve(
1934
+ Object.assign({}, headers, {
1935
+ authorization: `Basic ${(0, import_core.b64encode)(this.utf8AuthBytes)}`
1936
+ })
1937
+ );
1927
1938
  }
1928
- async isAuthorized() {
1929
- return true;
1939
+ isAuthorized() {
1940
+ return Promise.resolve(true);
1930
1941
  }
1931
1942
  };
1932
1943
  var AccountTokenAuthProvider_default = AccountTokenAuthProvider;
@@ -1938,7 +1949,7 @@ var import_core9 = require("@lightsparkdev/core");
1938
1949
  // package.json
1939
1950
  var package_default = {
1940
1951
  name: "@lightsparkdev/lightspark-sdk",
1941
- version: "1.2.0",
1952
+ version: "1.2.2",
1942
1953
  description: "Lightspark JS SDK",
1943
1954
  author: "Lightspark Inc.",
1944
1955
  keywords: [
@@ -2026,7 +2037,7 @@ var package_default = {
2026
2037
  },
2027
2038
  license: "Apache-2.0",
2028
2039
  dependencies: {
2029
- "@lightsparkdev/core": "1.0.9",
2040
+ "@lightsparkdev/core": "1.0.10",
2030
2041
  "@lightsparkdev/crypto-wasm": "0.1.2",
2031
2042
  "auto-bind": "^5.0.1",
2032
2043
  "crypto-browserify": "^3.12.0",
@@ -2048,10 +2059,10 @@ var package_default = {
2048
2059
  "eslint-watch": "^8.0.0",
2049
2060
  jest: "^29.6.2",
2050
2061
  prettier: "3.0.3",
2051
- "prettier-plugin-organize-imports": "^3.2.2",
2062
+ "prettier-plugin-organize-imports": "^3.2.4",
2052
2063
  "ts-jest": "^29.1.1",
2053
2064
  "tsc-absolute": "^1.0.1",
2054
- tsup: "^6.7.0",
2065
+ tsup: "^7.2.0",
2055
2066
  typedoc: "^0.24.7",
2056
2067
  typescript: "^4.9.5"
2057
2068
  }
@@ -2139,6 +2150,117 @@ var BitcoinFeeEstimate = `
2139
2150
  ${FRAGMENT2}
2140
2151
  `;
2141
2152
 
2153
+ // src/objects/IncentivesIneligibilityReason.ts
2154
+ var IncentivesIneligibilityReason = /* @__PURE__ */ ((IncentivesIneligibilityReason2) => {
2155
+ IncentivesIneligibilityReason2["FUTURE_VALUE"] = "FUTURE_VALUE";
2156
+ IncentivesIneligibilityReason2["DISABLED"] = "DISABLED";
2157
+ IncentivesIneligibilityReason2["SENDER_NOT_ELIGIBLE"] = "SENDER_NOT_ELIGIBLE";
2158
+ IncentivesIneligibilityReason2["RECEIVER_NOT_ELIGIBLE"] = "RECEIVER_NOT_ELIGIBLE";
2159
+ IncentivesIneligibilityReason2["SENDING_VASP_NOT_ELIGIBLE"] = "SENDING_VASP_NOT_ELIGIBLE";
2160
+ IncentivesIneligibilityReason2["RECEIVING_VASP_NOT_ELIGIBLE"] = "RECEIVING_VASP_NOT_ELIGIBLE";
2161
+ IncentivesIneligibilityReason2["NOT_CROSS_BORDER"] = "NOT_CROSS_BORDER";
2162
+ return IncentivesIneligibilityReason2;
2163
+ })(IncentivesIneligibilityReason || {});
2164
+ var IncentivesIneligibilityReason_default = IncentivesIneligibilityReason;
2165
+
2166
+ // src/objects/IncentivesStatus.ts
2167
+ var IncentivesStatus = /* @__PURE__ */ ((IncentivesStatus2) => {
2168
+ IncentivesStatus2["FUTURE_VALUE"] = "FUTURE_VALUE";
2169
+ IncentivesStatus2["PENDING"] = "PENDING";
2170
+ IncentivesStatus2["VALIDATED"] = "VALIDATED";
2171
+ IncentivesStatus2["INELIGIBLE"] = "INELIGIBLE";
2172
+ return IncentivesStatus2;
2173
+ })(IncentivesStatus || {});
2174
+ var IncentivesStatus_default = IncentivesStatus;
2175
+
2176
+ // src/objects/UmaInvitation.ts
2177
+ var UmaInvitationFromJson = (obj) => {
2178
+ return {
2179
+ id: obj["uma_invitation_id"],
2180
+ createdAt: obj["uma_invitation_created_at"],
2181
+ updatedAt: obj["uma_invitation_updated_at"],
2182
+ code: obj["uma_invitation_code"],
2183
+ url: obj["uma_invitation_url"],
2184
+ inviterUma: obj["uma_invitation_inviter_uma"],
2185
+ incentivesStatus: IncentivesStatus_default[obj["uma_invitation_incentives_status"]] ?? IncentivesStatus_default.FUTURE_VALUE,
2186
+ typename: "UmaInvitation",
2187
+ inviteeUma: obj["uma_invitation_invitee_uma"],
2188
+ incentivesIneligibilityReason: !!obj["uma_invitation_incentives_ineligibility_reason"] ? IncentivesIneligibilityReason_default[obj["uma_invitation_incentives_ineligibility_reason"]] ?? IncentivesIneligibilityReason_default.FUTURE_VALUE : null
2189
+ };
2190
+ };
2191
+ var FRAGMENT3 = `
2192
+ fragment UmaInvitationFragment on UmaInvitation {
2193
+ __typename
2194
+ uma_invitation_id: id
2195
+ uma_invitation_created_at: created_at
2196
+ uma_invitation_updated_at: updated_at
2197
+ uma_invitation_code: code
2198
+ uma_invitation_url: url
2199
+ uma_invitation_inviter_uma: inviter_uma
2200
+ uma_invitation_invitee_uma: invitee_uma
2201
+ uma_invitation_incentives_status: incentives_status
2202
+ uma_invitation_incentives_ineligibility_reason: incentives_ineligibility_reason
2203
+ }`;
2204
+ var getUmaInvitationQuery = (id) => {
2205
+ return {
2206
+ queryPayload: `
2207
+ query GetUmaInvitation($id: ID!) {
2208
+ entity(id: $id) {
2209
+ ... on UmaInvitation {
2210
+ ...UmaInvitationFragment
2211
+ }
2212
+ }
2213
+ }
2214
+
2215
+ ${FRAGMENT3}
2216
+ `,
2217
+ variables: { id },
2218
+ constructObject: (data) => UmaInvitationFromJson(data.entity)
2219
+ };
2220
+ };
2221
+
2222
+ // src/graphql/ClaimUmaInvitation.ts
2223
+ var ClaimUmaInvitation = `
2224
+ mutation ClaimUmaInvitation(
2225
+ $invitationCode: String!
2226
+ $inviteeUma: String!
2227
+ ) {
2228
+ claim_uma_invitation(input: {
2229
+ invitation_code: $invitationCode
2230
+ invitee_uma: $inviteeUma
2231
+ }) {
2232
+ invitation {
2233
+ ...UmaInvitationFragment
2234
+ }
2235
+ }
2236
+ }
2237
+
2238
+ ${FRAGMENT3}
2239
+ `;
2240
+
2241
+ // src/graphql/ClaimUmaInvitationWithIncentives.ts
2242
+ var ClaimUmaInvitationWithIncentives = `
2243
+ mutation ClaimUmaInvitationWithIncentives(
2244
+ $invitationCode: String!
2245
+ $inviteeUma: String!
2246
+ $inviteePhoneHash: String!
2247
+ $inviteeRegion: RegionCode!
2248
+ ) {
2249
+ claim_uma_invitation_with_incentives(input: {
2250
+ invitation_code: $invitationCode
2251
+ invitee_uma: $inviteeUma
2252
+ invitee_phone_hash: $inviteePhoneHash
2253
+ invitee_region: $inviteeRegion
2254
+ }) {
2255
+ invitation {
2256
+ ...UmaInvitationFragment
2257
+ }
2258
+ }
2259
+ }
2260
+
2261
+ ${FRAGMENT3}
2262
+ `;
2263
+
2142
2264
  // src/objects/Permission.ts
2143
2265
  var Permission = /* @__PURE__ */ ((Permission2) => {
2144
2266
  Permission2["FUTURE_VALUE"] = "FUTURE_VALUE";
@@ -2172,7 +2294,7 @@ var ApiTokenFromJson = (obj) => {
2172
2294
  typename: "ApiToken"
2173
2295
  };
2174
2296
  };
2175
- var FRAGMENT3 = `
2297
+ var FRAGMENT4 = `
2176
2298
  fragment ApiTokenFragment on ApiToken {
2177
2299
  __typename
2178
2300
  api_token_id: id
@@ -2193,7 +2315,7 @@ query GetApiToken($id: ID!) {
2193
2315
  }
2194
2316
  }
2195
2317
 
2196
- ${FRAGMENT3}
2318
+ ${FRAGMENT4}
2197
2319
  `,
2198
2320
  variables: { id },
2199
2321
  constructObject: (data) => ApiTokenFromJson(data.entity)
@@ -2217,7 +2339,7 @@ var CreateApiToken = `
2217
2339
  }
2218
2340
  }
2219
2341
 
2220
- ${FRAGMENT3}
2342
+ ${FRAGMENT4}
2221
2343
  `;
2222
2344
 
2223
2345
  // src/graphql/CreateInvoice.ts
@@ -2382,7 +2504,7 @@ query GetGraphNode($id: ID!) {
2382
2504
  }
2383
2505
  }
2384
2506
 
2385
- ${FRAGMENT4}
2507
+ ${FRAGMENT5}
2386
2508
  `,
2387
2509
  variables: { id },
2388
2510
  constructObject: (data) => GraphNodeFromJson(data.entity)
@@ -2417,7 +2539,7 @@ var GraphNodeFromJson = (obj) => {
2417
2539
  obj["graph_node_public_key"]
2418
2540
  );
2419
2541
  };
2420
- var FRAGMENT4 = `
2542
+ var FRAGMENT5 = `
2421
2543
  fragment GraphNodeFragment on GraphNode {
2422
2544
  __typename
2423
2545
  graph_node_id: id
@@ -2606,7 +2728,7 @@ query GetChannel($id: ID!) {
2606
2728
  }
2607
2729
  }
2608
2730
 
2609
- ${FRAGMENT5}
2731
+ ${FRAGMENT6}
2610
2732
  `,
2611
2733
  variables: { id },
2612
2734
  constructObject: (data) => ChannelFromJson(data.entity)
@@ -2659,7 +2781,7 @@ var ChannelFromJson = (obj) => {
2659
2781
  obj["channel_short_channel_id"]
2660
2782
  );
2661
2783
  };
2662
- var FRAGMENT5 = `
2784
+ var FRAGMENT6 = `
2663
2785
  fragment ChannelFragment on Channel {
2664
2786
  __typename
2665
2787
  channel_id: id
@@ -2983,7 +3105,7 @@ query GetLightsparkNodeWithOSK($id: ID!) {
2983
3105
  }
2984
3106
  }
2985
3107
 
2986
- ${FRAGMENT6}
3108
+ ${FRAGMENT7}
2987
3109
  `,
2988
3110
  variables: { id },
2989
3111
  constructObject: (data) => LightsparkNodeWithOSKFromJson(data.entity)
@@ -3044,7 +3166,7 @@ var LightsparkNodeWithOSKFromJson = (obj) => {
3044
3166
  ) : void 0
3045
3167
  );
3046
3168
  };
3047
- var FRAGMENT6 = `
3169
+ var FRAGMENT7 = `
3048
3170
  fragment LightsparkNodeWithOSKFragment on LightsparkNodeWithOSK {
3049
3171
  __typename
3050
3172
  lightspark_node_with_o_s_k_id: id
@@ -3368,7 +3490,7 @@ query GetLightsparkNodeWithRemoteSigning($id: ID!) {
3368
3490
  }
3369
3491
  }
3370
3492
 
3371
- ${FRAGMENT7}
3493
+ ${FRAGMENT8}
3372
3494
  `,
3373
3495
  variables: { id },
3374
3496
  constructObject: (data) => LightsparkNodeWithRemoteSigningFromJson(data.entity)
@@ -3431,7 +3553,7 @@ var LightsparkNodeWithRemoteSigningFromJson = (obj) => {
3431
3553
  !!obj["lightspark_node_with_remote_signing_balances"] ? BalancesFromJson(obj["lightspark_node_with_remote_signing_balances"]) : void 0
3432
3554
  );
3433
3555
  };
3434
- var FRAGMENT7 = `
3556
+ var FRAGMENT8 = `
3435
3557
  fragment LightsparkNodeWithRemoteSigningFragment on LightsparkNodeWithRemoteSigning {
3436
3558
  __typename
3437
3559
  lightspark_node_with_remote_signing_id: id
@@ -3727,7 +3849,7 @@ var NodeToJson = (obj) => {
3727
3849
  `Couldn't find a concrete type for interface Node corresponding to the typename=${obj.typename}`
3728
3850
  );
3729
3851
  };
3730
- var FRAGMENT8 = `
3852
+ var FRAGMENT9 = `
3731
3853
  fragment NodeFragment on Node {
3732
3854
  __typename
3733
3855
  ... on GraphNode {
@@ -4013,7 +4135,7 @@ query GetNode($id: ID!) {
4013
4135
  }
4014
4136
  }
4015
4137
 
4016
- ${FRAGMENT8}
4138
+ ${FRAGMENT9}
4017
4139
  `,
4018
4140
  variables: { id },
4019
4141
  constructObject: (data) => NodeFromJson(data.entity)
@@ -4034,7 +4156,7 @@ var InvoiceDataFromJson = (obj) => {
4034
4156
  memo: obj["invoice_data_memo"]
4035
4157
  };
4036
4158
  };
4037
- var FRAGMENT9 = `
4159
+ var FRAGMENT10 = `
4038
4160
  fragment InvoiceDataFragment on InvoiceData {
4039
4161
  __typename
4040
4162
  invoice_data_encoded_payment_request: encoded_payment_request
@@ -4348,7 +4470,7 @@ var InvoiceFromJson = (obj) => {
4348
4470
  amountPaid: !!obj["invoice_amount_paid"] ? CurrencyAmountFromJson(obj["invoice_amount_paid"]) : void 0
4349
4471
  };
4350
4472
  };
4351
- var FRAGMENT10 = `
4473
+ var FRAGMENT11 = `
4352
4474
  fragment InvoiceFragment on Invoice {
4353
4475
  __typename
4354
4476
  invoice_id: id
@@ -4666,7 +4788,7 @@ query GetInvoice($id: ID!) {
4666
4788
  }
4667
4789
  }
4668
4790
 
4669
- ${FRAGMENT10}
4791
+ ${FRAGMENT11}
4670
4792
  `,
4671
4793
  variables: { id },
4672
4794
  constructObject: (data) => InvoiceFromJson(data.entity)
@@ -4692,7 +4814,7 @@ mutation CreateLnurlInvoice(
4692
4814
  }
4693
4815
  }
4694
4816
  }
4695
- ${FRAGMENT10}
4817
+ ${FRAGMENT11}
4696
4818
  `;
4697
4819
 
4698
4820
  // src/graphql/CreateNodeWalletAddress.ts
@@ -4754,7 +4876,7 @@ var IncomingPaymentAttemptFromJson = (obj) => {
4754
4876
  resolvedAt: obj["incoming_payment_attempt_resolved_at"]
4755
4877
  };
4756
4878
  };
4757
- var FRAGMENT11 = `
4879
+ var FRAGMENT12 = `
4758
4880
  fragment IncomingPaymentAttemptFragment on IncomingPaymentAttempt {
4759
4881
  __typename
4760
4882
  incoming_payment_attempt_id: id
@@ -4785,7 +4907,7 @@ query GetIncomingPaymentAttempt($id: ID!) {
4785
4907
  }
4786
4908
  }
4787
4909
 
4788
- ${FRAGMENT11}
4910
+ ${FRAGMENT12}
4789
4911
  `,
4790
4912
  variables: { id },
4791
4913
  constructObject: (data) => IncomingPaymentAttemptFromJson(data.entity)
@@ -4912,7 +5034,7 @@ query GetIncomingPayment($id: ID!) {
4912
5034
  }
4913
5035
  }
4914
5036
 
4915
- ${FRAGMENT12}
5037
+ ${FRAGMENT13}
4916
5038
  `,
4917
5039
  variables: { id },
4918
5040
  constructObject: (data) => IncomingPaymentFromJson(data.entity)
@@ -4951,7 +5073,7 @@ var IncomingPaymentFromJson = (obj) => {
4951
5073
  )
4952
5074
  );
4953
5075
  };
4954
- var FRAGMENT12 = `
5076
+ var FRAGMENT13 = `
4955
5077
  fragment IncomingPaymentFragment on IncomingPayment {
4956
5078
  __typename
4957
5079
  incoming_payment_id: id
@@ -5007,7 +5129,45 @@ mutation CreateTestModePayment(
5007
5129
  }
5008
5130
  }
5009
5131
 
5010
- ${FRAGMENT12}
5132
+ ${FRAGMENT13}
5133
+ `;
5134
+
5135
+ // src/graphql/CreateUmaInvitation.ts
5136
+ var CreateUmaInvitation = `
5137
+ mutation CreateUmaInvitation(
5138
+ $inviterUma: String!
5139
+ ) {
5140
+ create_uma_invitation(input: {
5141
+ inviter_uma: $inviterUma
5142
+ }) {
5143
+ invitation {
5144
+ ...UmaInvitationFragment
5145
+ }
5146
+ }
5147
+ }
5148
+
5149
+ ${FRAGMENT3}
5150
+ `;
5151
+
5152
+ // src/graphql/CreateUmaInvitationWithIncentives.ts
5153
+ var CreateUmaInvitationWithIncentives = `
5154
+ mutation CreateUmaInvitationWithIncentives(
5155
+ $inviterUma: String!
5156
+ $inviterPhoneHash: String!
5157
+ $inviterRegion: RegionCode!
5158
+ ) {
5159
+ create_uma_invitation_with_incentives(input: {
5160
+ inviter_uma: $inviterUma
5161
+ inviter_phone_hash: $inviterPhoneHash
5162
+ inviter_region: $inviterRegion
5163
+ }) {
5164
+ invitation {
5165
+ ...UmaInvitationFragment
5166
+ }
5167
+ }
5168
+ }
5169
+
5170
+ ${FRAGMENT3}
5011
5171
  `;
5012
5172
 
5013
5173
  // src/graphql/CreateUmaInvoice.ts
@@ -5029,7 +5189,7 @@ mutation CreateUmaInvoice(
5029
5189
  }
5030
5190
  }
5031
5191
  }
5032
- ${FRAGMENT10}
5192
+ ${FRAGMENT11}
5033
5193
  `;
5034
5194
 
5035
5195
  // src/graphql/DecodeInvoice.ts
@@ -5043,7 +5203,7 @@ var DecodeInvoice = `
5043
5203
  }
5044
5204
  }
5045
5205
 
5046
- ${FRAGMENT9}
5206
+ ${FRAGMENT10}
5047
5207
  `;
5048
5208
 
5049
5209
  // src/graphql/DeleteApiToken.ts
@@ -5059,6 +5219,19 @@ var DeleteApiToken = `
5059
5219
  }
5060
5220
  `;
5061
5221
 
5222
+ // src/graphql/FetchUmaInvitation.ts
5223
+ var FetchUmaInvitation = `
5224
+ query FetchUmaInvitation(
5225
+ $invitationCode: String!
5226
+ ) {
5227
+ uma_invitation_by_code(code: $invitationCode) {
5228
+ ...UmaInvitationFragment
5229
+ }
5230
+ }
5231
+
5232
+ ${FRAGMENT3}
5233
+ `;
5234
+
5062
5235
  // src/graphql/FundNode.ts
5063
5236
  var FundNode = `
5064
5237
  mutation FundNode(
@@ -5076,7 +5249,7 @@ ${FRAGMENT}
5076
5249
  `;
5077
5250
 
5078
5251
  // src/objects/LightningFeeEstimateOutput.ts
5079
- var FRAGMENT13 = `
5252
+ var FRAGMENT14 = `
5080
5253
  fragment LightningFeeEstimateOutputFragment on LightningFeeEstimateOutput {
5081
5254
  __typename
5082
5255
  lightning_fee_estimate_output_fee_estimate: fee_estimate {
@@ -5105,7 +5278,7 @@ var LightningFeeEstimateForInvoice = `
5105
5278
  }
5106
5279
  }
5107
5280
 
5108
- ${FRAGMENT13}
5281
+ ${FRAGMENT14}
5109
5282
  `;
5110
5283
 
5111
5284
  // src/graphql/LightningFeeEstimateForNode.ts
@@ -5124,7 +5297,7 @@ var LightningFeeEstimateForNode = `
5124
5297
  }
5125
5298
  }
5126
5299
 
5127
- ${FRAGMENT13}
5300
+ ${FRAGMENT14}
5128
5301
  `;
5129
5302
 
5130
5303
  // src/graphql/MultiNodeDashboard.ts
@@ -5292,7 +5465,7 @@ var HopFromJson = (obj) => {
5292
5465
  expiryBlockHeight: obj["hop_expiry_block_height"]
5293
5466
  };
5294
5467
  };
5295
- var FRAGMENT14 = `
5468
+ var FRAGMENT15 = `
5296
5469
  fragment HopFragment on Hop {
5297
5470
  __typename
5298
5471
  hop_id: id
@@ -5332,7 +5505,7 @@ query GetHop($id: ID!) {
5332
5505
  }
5333
5506
  }
5334
5507
 
5335
- ${FRAGMENT14}
5508
+ ${FRAGMENT15}
5336
5509
  `,
5337
5510
  variables: { id },
5338
5511
  constructObject: (data) => HopFromJson(data.entity)
@@ -5355,11 +5528,12 @@ var OutgoingPaymentAttemptToHopsConnectionFromJson = (obj) => {
5355
5528
 
5356
5529
  // src/objects/OutgoingPaymentAttempt.ts
5357
5530
  var OutgoingPaymentAttempt = class {
5358
- constructor(id, createdAt, updatedAt, status, outgoingPaymentId, typename, failureCode, failureSourceIndex, resolvedAt, amount, fees, channelSnapshot) {
5531
+ constructor(id, createdAt, updatedAt, status, attemptedAt, outgoingPaymentId, typename, failureCode, failureSourceIndex, resolvedAt, amount, fees, channelSnapshot) {
5359
5532
  this.id = id;
5360
5533
  this.createdAt = createdAt;
5361
5534
  this.updatedAt = updatedAt;
5362
5535
  this.status = status;
5536
+ this.attemptedAt = attemptedAt;
5363
5537
  this.outgoingPaymentId = outgoingPaymentId;
5364
5538
  this.typename = typename;
5365
5539
  this.failureCode = failureCode;
@@ -5437,7 +5611,7 @@ query GetOutgoingPaymentAttempt($id: ID!) {
5437
5611
  }
5438
5612
  }
5439
5613
 
5440
- ${FRAGMENT15}
5614
+ ${FRAGMENT16}
5441
5615
  `,
5442
5616
  variables: { id },
5443
5617
  constructObject: (data) => OutgoingPaymentAttemptFromJson(data.entity)
@@ -5452,6 +5626,7 @@ ${FRAGMENT15}
5452
5626
  outgoing_payment_attempt_status: this.status,
5453
5627
  outgoing_payment_attempt_failure_code: this.failureCode,
5454
5628
  outgoing_payment_attempt_failure_source_index: this.failureSourceIndex,
5629
+ outgoing_payment_attempt_attempted_at: this.attemptedAt,
5455
5630
  outgoing_payment_attempt_resolved_at: this.resolvedAt,
5456
5631
  outgoing_payment_attempt_amount: this.amount ? CurrencyAmountToJson(this.amount) : void 0,
5457
5632
  outgoing_payment_attempt_fees: this.fees ? CurrencyAmountToJson(this.fees) : void 0,
@@ -5466,6 +5641,7 @@ var OutgoingPaymentAttemptFromJson = (obj) => {
5466
5641
  obj["outgoing_payment_attempt_created_at"],
5467
5642
  obj["outgoing_payment_attempt_updated_at"],
5468
5643
  OutgoingPaymentAttemptStatus_default[obj["outgoing_payment_attempt_status"]] ?? OutgoingPaymentAttemptStatus_default.FUTURE_VALUE,
5644
+ obj["outgoing_payment_attempt_attempted_at"],
5469
5645
  obj["outgoing_payment_attempt_outgoing_payment"].id,
5470
5646
  "OutgoingPaymentAttempt",
5471
5647
  !!obj["outgoing_payment_attempt_failure_code"] ? HtlcAttemptFailureCode_default[obj["outgoing_payment_attempt_failure_code"]] ?? HtlcAttemptFailureCode_default.FUTURE_VALUE : null,
@@ -5478,7 +5654,7 @@ var OutgoingPaymentAttemptFromJson = (obj) => {
5478
5654
  ) : void 0
5479
5655
  );
5480
5656
  };
5481
- var FRAGMENT15 = `
5657
+ var FRAGMENT16 = `
5482
5658
  fragment OutgoingPaymentAttemptFragment on OutgoingPaymentAttempt {
5483
5659
  __typename
5484
5660
  outgoing_payment_attempt_id: id
@@ -5487,6 +5663,7 @@ fragment OutgoingPaymentAttemptFragment on OutgoingPaymentAttempt {
5487
5663
  outgoing_payment_attempt_status: status
5488
5664
  outgoing_payment_attempt_failure_code: failure_code
5489
5665
  outgoing_payment_attempt_failure_source_index: failure_source_index
5666
+ outgoing_payment_attempt_attempted_at: attempted_at
5490
5667
  outgoing_payment_attempt_resolved_at: resolved_at
5491
5668
  outgoing_payment_attempt_amount: amount {
5492
5669
  __typename
@@ -5687,6 +5864,7 @@ query FetchOutgoingPaymentToAttemptsConnection($entity_id: ID!, $first: Int, $af
5687
5864
  outgoing_payment_attempt_status: status
5688
5865
  outgoing_payment_attempt_failure_code: failure_code
5689
5866
  outgoing_payment_attempt_failure_source_index: failure_source_index
5867
+ outgoing_payment_attempt_attempted_at: attempted_at
5690
5868
  outgoing_payment_attempt_resolved_at: resolved_at
5691
5869
  outgoing_payment_attempt_amount: amount {
5692
5870
  __typename
@@ -5778,7 +5956,7 @@ query GetOutgoingPayment($id: ID!) {
5778
5956
  }
5779
5957
  }
5780
5958
 
5781
- ${FRAGMENT16}
5959
+ ${FRAGMENT17}
5782
5960
  `,
5783
5961
  variables: { id },
5784
5962
  constructObject: (data) => OutgoingPaymentFromJson(data.entity)
@@ -5827,7 +6005,7 @@ var OutgoingPaymentFromJson = (obj) => {
5827
6005
  obj["outgoing_payment_payment_preimage"]
5828
6006
  );
5829
6007
  };
5830
- var FRAGMENT16 = `
6008
+ var FRAGMENT17 = `
5831
6009
  fragment OutgoingPaymentFragment on OutgoingPayment {
5832
6010
  __typename
5833
6011
  outgoing_payment_id: id
@@ -6197,7 +6375,7 @@ var PayInvoice = `
6197
6375
  }
6198
6376
  }
6199
6377
 
6200
- ${FRAGMENT16}
6378
+ ${FRAGMENT17}
6201
6379
  `;
6202
6380
 
6203
6381
  // src/objects/PaymentRequest.ts
@@ -6219,7 +6397,7 @@ var PaymentRequestFromJson = (obj) => {
6219
6397
  `Couldn't find a concrete type for interface PaymentRequest corresponding to the typename=${obj["__typename"]}`
6220
6398
  );
6221
6399
  };
6222
- var FRAGMENT17 = `
6400
+ var FRAGMENT18 = `
6223
6401
  fragment PaymentRequestFragment on PaymentRequest {
6224
6402
  __typename
6225
6403
  ... on Invoice {
@@ -6540,7 +6718,7 @@ query GetPaymentRequest($id: ID!) {
6540
6718
  }
6541
6719
  }
6542
6720
 
6543
- ${FRAGMENT17}
6721
+ ${FRAGMENT18}
6544
6722
  `,
6545
6723
  variables: { id },
6546
6724
  constructObject: (data) => PaymentRequestFromJson(data.entity)
@@ -6575,7 +6753,7 @@ query PaymentRequestsForNode(
6575
6753
  }
6576
6754
  }
6577
6755
 
6578
- ${FRAGMENT17}
6756
+ ${FRAGMENT18}
6579
6757
  `;
6580
6758
 
6581
6759
  // src/graphql/PayUmaInvoice.ts
@@ -6602,7 +6780,7 @@ var PayUmaInvoice = `
6602
6780
  }
6603
6781
  }
6604
6782
 
6605
- ${FRAGMENT16}
6783
+ ${FRAGMENT17}
6606
6784
  `;
6607
6785
 
6608
6786
  // src/objects/WithdrawalRequest.ts
@@ -6647,7 +6825,7 @@ var ChannelClosingTransactionFromJson = (obj) => {
6647
6825
  channelId: obj["channel_closing_transaction_channel"]?.id ?? void 0
6648
6826
  };
6649
6827
  };
6650
- var FRAGMENT18 = `
6828
+ var FRAGMENT19 = `
6651
6829
  fragment ChannelClosingTransactionFragment on ChannelClosingTransaction {
6652
6830
  __typename
6653
6831
  channel_closing_transaction_id: id
@@ -6691,7 +6869,7 @@ query GetChannelClosingTransaction($id: ID!) {
6691
6869
  }
6692
6870
  }
6693
6871
 
6694
- ${FRAGMENT18}
6872
+ ${FRAGMENT19}
6695
6873
  `,
6696
6874
  variables: { id },
6697
6875
  constructObject: (data) => ChannelClosingTransactionFromJson(data.entity)
@@ -6728,7 +6906,7 @@ var ChannelOpeningTransactionFromJson = (obj) => {
6728
6906
  channelId: obj["channel_opening_transaction_channel"]?.id ?? void 0
6729
6907
  };
6730
6908
  };
6731
- var FRAGMENT19 = `
6909
+ var FRAGMENT20 = `
6732
6910
  fragment ChannelOpeningTransactionFragment on ChannelOpeningTransaction {
6733
6911
  __typename
6734
6912
  channel_opening_transaction_id: id
@@ -6772,7 +6950,7 @@ query GetChannelOpeningTransaction($id: ID!) {
6772
6950
  }
6773
6951
  }
6774
6952
 
6775
- ${FRAGMENT19}
6953
+ ${FRAGMENT20}
6776
6954
  `,
6777
6955
  variables: { id },
6778
6956
  constructObject: (data) => ChannelOpeningTransactionFromJson(data.entity)
@@ -6941,7 +7119,7 @@ query GetWithdrawalRequest($id: ID!) {
6941
7119
  }
6942
7120
  }
6943
7121
 
6944
- ${FRAGMENT20}
7122
+ ${FRAGMENT21}
6945
7123
  `,
6946
7124
  variables: { id },
6947
7125
  constructObject: (data) => WithdrawalRequestFromJson(data.entity)
@@ -6978,7 +7156,7 @@ var WithdrawalRequestFromJson = (obj) => {
6978
7156
  obj["withdrawal_request_withdrawal"]?.id ?? void 0
6979
7157
  );
6980
7158
  };
6981
- var FRAGMENT20 = `
7159
+ var FRAGMENT21 = `
6982
7160
  fragment WithdrawalRequestFragment on WithdrawalRequest {
6983
7161
  __typename
6984
7162
  withdrawal_request_id: id
@@ -7030,7 +7208,7 @@ var RequestWithdrawal = `
7030
7208
  }
7031
7209
  }
7032
7210
 
7033
- ${FRAGMENT20}
7211
+ ${FRAGMENT21}
7034
7212
  `;
7035
7213
 
7036
7214
  // src/graphql/SendPayment.ts
@@ -7057,7 +7235,7 @@ var SendPayment = `
7057
7235
  }
7058
7236
  }
7059
7237
 
7060
- ${FRAGMENT16}
7238
+ ${FRAGMENT17}
7061
7239
  `;
7062
7240
 
7063
7241
  // src/objects/Transaction.ts
@@ -7210,7 +7388,7 @@ var TransactionFromJson = (obj) => {
7210
7388
  `Couldn't find a concrete type for interface Transaction corresponding to the typename=${obj["__typename"]}`
7211
7389
  );
7212
7390
  };
7213
- var FRAGMENT21 = `
7391
+ var FRAGMENT22 = `
7214
7392
  fragment TransactionFragment on Transaction {
7215
7393
  __typename
7216
7394
  ... on ChannelClosingTransaction {
@@ -7767,7 +7945,7 @@ query GetTransaction($id: ID!) {
7767
7945
  }
7768
7946
  }
7769
7947
 
7770
- ${FRAGMENT21}
7948
+ ${FRAGMENT22}
7771
7949
  `,
7772
7950
  variables: { id },
7773
7951
  constructObject: (data) => TransactionFromJson(data.entity)
@@ -7882,7 +8060,7 @@ query SingleNodeDashboard(
7882
8060
  }
7883
8061
  }
7884
8062
 
7885
- ${FRAGMENT21}
8063
+ ${FRAGMENT22}
7886
8064
  ${FRAGMENT}
7887
8065
  `;
7888
8066
 
@@ -7921,7 +8099,7 @@ query TransactionsForNode(
7921
8099
  }
7922
8100
  }
7923
8101
 
7924
- ${FRAGMENT21}
8102
+ ${FRAGMENT22}
7925
8103
  ${FRAGMENT}
7926
8104
  `;
7927
8105
 
@@ -7938,7 +8116,7 @@ var TransactionUpdateFromJson = (obj) => {
7938
8116
  transactionHash: obj["transaction_hash"]
7939
8117
  };
7940
8118
  };
7941
- var FRAGMENT22 = `
8119
+ var FRAGMENT23 = `
7942
8120
  fragment TransactionUpdateFragment on Transaction {
7943
8121
  __typename
7944
8122
  id
@@ -7968,7 +8146,7 @@ subscription TransactionSubscription(
7968
8146
  }
7969
8147
  }
7970
8148
 
7971
- ${FRAGMENT22}
8149
+ ${FRAGMENT23}
7972
8150
  `;
7973
8151
 
7974
8152
  // src/NodeKeyLoaderCache.ts
@@ -8268,7 +8446,7 @@ var LightsparkNodeFromJson = (obj) => {
8268
8446
  `Couldn't find a concrete type for interface LightsparkNode corresponding to the typename=${obj["__typename"]}`
8269
8447
  );
8270
8448
  };
8271
- var FRAGMENT23 = `
8449
+ var FRAGMENT24 = `
8272
8450
  fragment LightsparkNodeFragment on LightsparkNode {
8273
8451
  __typename
8274
8452
  ... on LightsparkNodeWithOSK {
@@ -8542,7 +8720,7 @@ query GetLightsparkNode($id: ID!) {
8542
8720
  }
8543
8721
  }
8544
8722
 
8545
- ${FRAGMENT23}
8723
+ ${FRAGMENT24}
8546
8724
  `,
8547
8725
  variables: { id },
8548
8726
  constructObject: (data) => LightsparkNodeFromJson(data.entity)
@@ -9652,7 +9830,7 @@ query GetWallet($id: ID!) {
9652
9830
  }
9653
9831
  }
9654
9832
 
9655
- ${FRAGMENT24}
9833
+ ${FRAGMENT25}
9656
9834
  `,
9657
9835
  variables: { id },
9658
9836
  constructObject: (data) => WalletFromJson(data.entity)
@@ -9685,7 +9863,7 @@ var WalletFromJson = (obj) => {
9685
9863
  obj["wallet_account"]?.id ?? void 0
9686
9864
  );
9687
9865
  };
9688
- var FRAGMENT24 = `
9866
+ var FRAGMENT25 = `
9689
9867
  fragment WalletFragment on Wallet {
9690
9868
  __typename
9691
9869
  wallet_id: id
@@ -11390,7 +11568,7 @@ query GetAccount {
11390
11568
  }
11391
11569
  }
11392
11570
 
11393
- ${FRAGMENT25}
11571
+ ${FRAGMENT26}
11394
11572
  `,
11395
11573
  variables: {},
11396
11574
  constructObject: (data) => AccountFromJson(data.current_account)
@@ -11415,7 +11593,7 @@ var AccountFromJson = (obj) => {
11415
11593
  obj["account_name"]
11416
11594
  );
11417
11595
  };
11418
- var FRAGMENT25 = `
11596
+ var FRAGMENT26 = `
11419
11597
  fragment AccountFragment on Account {
11420
11598
  __typename
11421
11599
  account_id: id
@@ -11440,7 +11618,8 @@ var LightsparkClient = class {
11440
11618
  /**
11441
11619
  * Constructs a new LightsparkClient.
11442
11620
  *
11443
- * @param authProvider The auth provider to use for authentication. Defaults to a stub auth provider. For server-side
11621
+ * @param authProvider The auth provider to use for authentication. Defaults to a stub auth provider.
11622
+ * For server-side
11444
11623
  * use, you should use the `AccountTokenAuthProvider`.
11445
11624
  * @param serverUrl The base URL of the server to connect to. Defaults to lightspark production.
11446
11625
  * @param cryptoImpl The crypto implementation to use. Defaults to web and node compatible crypto.
@@ -11497,7 +11676,7 @@ var LightsparkClient = class {
11497
11676
  *
11498
11677
  * @param authProvider
11499
11678
  */
11500
- async setAuthProvider(authProvider) {
11679
+ setAuthProvider(authProvider) {
11501
11680
  this.requester = new import_core9.Requester(
11502
11681
  this.nodeKeyCache,
11503
11682
  this.LIGHTSPARK_SDK_ENDPOINT,
@@ -12207,6 +12386,151 @@ var LightsparkClient = class {
12207
12386
  }
12208
12387
  });
12209
12388
  }
12389
+ /**
12390
+ * Creates an UMA invitation. If you are part of the incentive program, you should use
12391
+ * [createUmaInvitationWithIncentives].
12392
+ *
12393
+ * @param inviterUma The UMA of the inviter.
12394
+ * @returns The invitation that was created.
12395
+ */
12396
+ async createUmaInvitation(inviterUma) {
12397
+ return await this.executeRawQuery({
12398
+ queryPayload: CreateUmaInvitation,
12399
+ variables: {
12400
+ inviterUma
12401
+ },
12402
+ constructObject: (responseJson) => {
12403
+ if (!responseJson.create_uma_invitation?.invitation) {
12404
+ throw new import_core9.LightsparkException(
12405
+ "CreateUmaInvitationError",
12406
+ "Unable to create UMA invitation"
12407
+ );
12408
+ }
12409
+ return UmaInvitationFromJson(
12410
+ responseJson.create_uma_invitation?.invitation
12411
+ );
12412
+ }
12413
+ });
12414
+ }
12415
+ /**
12416
+ * Creates an UMA invitation as part of the incentive program.
12417
+ * @param inviterUma The UMA of the inviter.
12418
+ * @param inviterPhoneNumber The phone number of the inviter in E164 format.
12419
+ * @param inviterRegion The region of the inviter.
12420
+ * @returns The invitation that was created.
12421
+ */
12422
+ async createUmaInvitationWithIncentives(inviterUma, inviterPhoneNumber, inviterRegion) {
12423
+ const inviterPhoneHash = await this.hashPhoneNumber(inviterPhoneNumber);
12424
+ return await this.executeRawQuery({
12425
+ queryPayload: CreateUmaInvitationWithIncentives,
12426
+ variables: {
12427
+ inviterUma,
12428
+ inviterPhoneHash,
12429
+ inviterRegion
12430
+ },
12431
+ constructObject: (responseJson) => {
12432
+ if (!responseJson.create_uma_invitation_with_incentives?.invitation) {
12433
+ throw new import_core9.LightsparkException(
12434
+ "CreateUmaInvitationError",
12435
+ "Unable to create UMA invitation"
12436
+ );
12437
+ }
12438
+ return UmaInvitationFromJson(
12439
+ responseJson.create_uma_invitation_with_incentives?.invitation
12440
+ );
12441
+ }
12442
+ });
12443
+ }
12444
+ /**
12445
+ * Claims an UMA invitation. If you are part of the incentive program, you should use
12446
+ * [claimUmaInvitationWithIncentives].
12447
+ *
12448
+ * @param invitationCode The invitation code to claim.
12449
+ * @param inviteeUma The UMA of the invitee.
12450
+ * @returns The invitation that was claimed.
12451
+ */
12452
+ async claimUmaInvitation(invitationCode, inviteeUma) {
12453
+ return await this.executeRawQuery({
12454
+ queryPayload: ClaimUmaInvitation,
12455
+ variables: {
12456
+ invitationCode,
12457
+ inviteeUma
12458
+ },
12459
+ constructObject: (responseJson) => {
12460
+ if (!responseJson.claim_uma_invitation?.invitation) {
12461
+ throw new import_core9.LightsparkException(
12462
+ "ClaimUmaInvitationError",
12463
+ "Unable to claim UMA invitation"
12464
+ );
12465
+ }
12466
+ return UmaInvitationFromJson(
12467
+ responseJson.claim_uma_invitation?.invitation
12468
+ );
12469
+ }
12470
+ });
12471
+ }
12472
+ /**
12473
+ * Claims an UMA invitation as part of the incentive program.
12474
+ *
12475
+ * @param invitationCode The invitation code to claim.
12476
+ * @param inviteeUma The UMA of the invitee.
12477
+ * @param inviteePhoneNumber The phone number of the invitee in E164 format.
12478
+ * @param inviteeRegion The region of the invitee.
12479
+ * @returns The invitation that was claimed.
12480
+ */
12481
+ async claimUmaInvitationWithIncentives(invitationCode, inviteeUma, inviteePhoneNumber, inviteeRegion) {
12482
+ const inviteePhoneHash = await this.hashPhoneNumber(inviteePhoneNumber);
12483
+ return await this.executeRawQuery({
12484
+ queryPayload: ClaimUmaInvitationWithIncentives,
12485
+ variables: {
12486
+ invitationCode,
12487
+ inviteeUma,
12488
+ inviteePhoneHash,
12489
+ inviteeRegion
12490
+ },
12491
+ constructObject: (responseJson) => {
12492
+ if (!responseJson.claim_uma_invitation_with_incentives?.invitation) {
12493
+ throw new import_core9.LightsparkException(
12494
+ "ClaimUmaInvitationError",
12495
+ "Unable to claim UMA invitation"
12496
+ );
12497
+ }
12498
+ return UmaInvitationFromJson(
12499
+ responseJson.claim_uma_invitation_with_incentives?.invitation
12500
+ );
12501
+ }
12502
+ });
12503
+ }
12504
+ /**
12505
+ * Fetches an UMA invitation by its invitation code.
12506
+ *
12507
+ * @param invitationCode The code of the invitation to fetch.
12508
+ * @returns The invitation with the given code, or null if no invitation exists with that code.
12509
+ */
12510
+ async fetchUmaInvitation(invitationCode) {
12511
+ return await this.executeRawQuery({
12512
+ queryPayload: FetchUmaInvitation,
12513
+ variables: {
12514
+ invitationCode
12515
+ },
12516
+ constructObject: (responseJson) => {
12517
+ if (!responseJson.uma_invitation_by_code) {
12518
+ return null;
12519
+ }
12520
+ return UmaInvitationFromJson(responseJson.uma_invitation_by_code);
12521
+ }
12522
+ });
12523
+ }
12524
+ async hashPhoneNumber(e164PhoneNumber) {
12525
+ const e164PhoneRegex = /^\+[1-9]\d{1,14}$/;
12526
+ if (!e164PhoneRegex.test(e164PhoneNumber)) {
12527
+ throw new import_core9.LightsparkException(
12528
+ "InvalidPhoneNumber",
12529
+ "Invalid phone number. Phone number must be in E164 format."
12530
+ );
12531
+ }
12532
+ return await (0, import_core9.createSha256Hash)(e164PhoneNumber, true);
12533
+ }
12210
12534
  /**
12211
12535
  * Executes a raw `Query` against the Lightspark API.
12212
12536
  *
@@ -12235,7 +12559,9 @@ var isBitcoinNetwork = (bitcoinNetwork) => {
12235
12559
  var assertValidBitcoinNetwork = (bitcoinNetwork) => {
12236
12560
  if (!isBitcoinNetwork(bitcoinNetwork)) {
12237
12561
  throw new Error(
12238
- `Invalid bitcoin network ${bitcoinNetwork}. Valid networks: ${BITCOIN_NETWORKS}`
12562
+ `Invalid bitcoin network ${bitcoinNetwork}. Valid networks: ${BITCOIN_NETWORKS.join(
12563
+ ", "
12564
+ )}`
12239
12565
  );
12240
12566
  }
12241
12567
  };
@@ -12244,6 +12570,262 @@ var getBitcoinNetworkOrThrow = (bitcoinNetwork) => {
12244
12570
  return bitcoinNetwork;
12245
12571
  };
12246
12572
 
12573
+ // src/objects/RegionCode.ts
12574
+ var RegionCode = /* @__PURE__ */ ((RegionCode2) => {
12575
+ RegionCode2["FUTURE_VALUE"] = "FUTURE_VALUE";
12576
+ RegionCode2["AF"] = "AF";
12577
+ RegionCode2["AX"] = "AX";
12578
+ RegionCode2["AL"] = "AL";
12579
+ RegionCode2["DZ"] = "DZ";
12580
+ RegionCode2["AS"] = "AS";
12581
+ RegionCode2["AD"] = "AD";
12582
+ RegionCode2["AO"] = "AO";
12583
+ RegionCode2["AI"] = "AI";
12584
+ RegionCode2["AQ"] = "AQ";
12585
+ RegionCode2["AG"] = "AG";
12586
+ RegionCode2["AR"] = "AR";
12587
+ RegionCode2["AM"] = "AM";
12588
+ RegionCode2["AW"] = "AW";
12589
+ RegionCode2["AU"] = "AU";
12590
+ RegionCode2["AT"] = "AT";
12591
+ RegionCode2["AZ"] = "AZ";
12592
+ RegionCode2["BS"] = "BS";
12593
+ RegionCode2["BH"] = "BH";
12594
+ RegionCode2["BD"] = "BD";
12595
+ RegionCode2["BB"] = "BB";
12596
+ RegionCode2["BY"] = "BY";
12597
+ RegionCode2["BE"] = "BE";
12598
+ RegionCode2["BZ"] = "BZ";
12599
+ RegionCode2["BJ"] = "BJ";
12600
+ RegionCode2["BM"] = "BM";
12601
+ RegionCode2["BT"] = "BT";
12602
+ RegionCode2["BO"] = "BO";
12603
+ RegionCode2["BQ"] = "BQ";
12604
+ RegionCode2["BA"] = "BA";
12605
+ RegionCode2["BW"] = "BW";
12606
+ RegionCode2["BV"] = "BV";
12607
+ RegionCode2["BR"] = "BR";
12608
+ RegionCode2["IO"] = "IO";
12609
+ RegionCode2["BN"] = "BN";
12610
+ RegionCode2["BG"] = "BG";
12611
+ RegionCode2["BF"] = "BF";
12612
+ RegionCode2["BI"] = "BI";
12613
+ RegionCode2["KH"] = "KH";
12614
+ RegionCode2["CM"] = "CM";
12615
+ RegionCode2["CA"] = "CA";
12616
+ RegionCode2["CV"] = "CV";
12617
+ RegionCode2["KY"] = "KY";
12618
+ RegionCode2["CF"] = "CF";
12619
+ RegionCode2["TD"] = "TD";
12620
+ RegionCode2["CL"] = "CL";
12621
+ RegionCode2["CN"] = "CN";
12622
+ RegionCode2["CX"] = "CX";
12623
+ RegionCode2["CC"] = "CC";
12624
+ RegionCode2["CO"] = "CO";
12625
+ RegionCode2["KM"] = "KM";
12626
+ RegionCode2["CG"] = "CG";
12627
+ RegionCode2["CD"] = "CD";
12628
+ RegionCode2["CK"] = "CK";
12629
+ RegionCode2["CR"] = "CR";
12630
+ RegionCode2["CI"] = "CI";
12631
+ RegionCode2["HR"] = "HR";
12632
+ RegionCode2["CU"] = "CU";
12633
+ RegionCode2["CW"] = "CW";
12634
+ RegionCode2["CY"] = "CY";
12635
+ RegionCode2["CZ"] = "CZ";
12636
+ RegionCode2["DK"] = "DK";
12637
+ RegionCode2["DJ"] = "DJ";
12638
+ RegionCode2["DM"] = "DM";
12639
+ RegionCode2["DO"] = "DO";
12640
+ RegionCode2["EC"] = "EC";
12641
+ RegionCode2["EG"] = "EG";
12642
+ RegionCode2["SV"] = "SV";
12643
+ RegionCode2["GQ"] = "GQ";
12644
+ RegionCode2["ER"] = "ER";
12645
+ RegionCode2["EE"] = "EE";
12646
+ RegionCode2["ET"] = "ET";
12647
+ RegionCode2["FK"] = "FK";
12648
+ RegionCode2["FO"] = "FO";
12649
+ RegionCode2["FJ"] = "FJ";
12650
+ RegionCode2["FI"] = "FI";
12651
+ RegionCode2["FR"] = "FR";
12652
+ RegionCode2["GF"] = "GF";
12653
+ RegionCode2["PF"] = "PF";
12654
+ RegionCode2["TF"] = "TF";
12655
+ RegionCode2["GA"] = "GA";
12656
+ RegionCode2["GM"] = "GM";
12657
+ RegionCode2["GE"] = "GE";
12658
+ RegionCode2["DE"] = "DE";
12659
+ RegionCode2["GH"] = "GH";
12660
+ RegionCode2["GI"] = "GI";
12661
+ RegionCode2["GR"] = "GR";
12662
+ RegionCode2["GL"] = "GL";
12663
+ RegionCode2["GD"] = "GD";
12664
+ RegionCode2["GP"] = "GP";
12665
+ RegionCode2["GU"] = "GU";
12666
+ RegionCode2["GT"] = "GT";
12667
+ RegionCode2["GG"] = "GG";
12668
+ RegionCode2["GN"] = "GN";
12669
+ RegionCode2["GW"] = "GW";
12670
+ RegionCode2["GY"] = "GY";
12671
+ RegionCode2["HT"] = "HT";
12672
+ RegionCode2["HM"] = "HM";
12673
+ RegionCode2["VA"] = "VA";
12674
+ RegionCode2["HN"] = "HN";
12675
+ RegionCode2["HK"] = "HK";
12676
+ RegionCode2["HU"] = "HU";
12677
+ RegionCode2["IS"] = "IS";
12678
+ RegionCode2["IN"] = "IN";
12679
+ RegionCode2["ID"] = "ID";
12680
+ RegionCode2["IR"] = "IR";
12681
+ RegionCode2["IQ"] = "IQ";
12682
+ RegionCode2["IE"] = "IE";
12683
+ RegionCode2["IM"] = "IM";
12684
+ RegionCode2["IL"] = "IL";
12685
+ RegionCode2["IT"] = "IT";
12686
+ RegionCode2["JM"] = "JM";
12687
+ RegionCode2["JP"] = "JP";
12688
+ RegionCode2["JE"] = "JE";
12689
+ RegionCode2["JO"] = "JO";
12690
+ RegionCode2["KZ"] = "KZ";
12691
+ RegionCode2["KE"] = "KE";
12692
+ RegionCode2["KI"] = "KI";
12693
+ RegionCode2["KP"] = "KP";
12694
+ RegionCode2["KR"] = "KR";
12695
+ RegionCode2["KW"] = "KW";
12696
+ RegionCode2["KG"] = "KG";
12697
+ RegionCode2["LA"] = "LA";
12698
+ RegionCode2["LV"] = "LV";
12699
+ RegionCode2["LB"] = "LB";
12700
+ RegionCode2["LS"] = "LS";
12701
+ RegionCode2["LR"] = "LR";
12702
+ RegionCode2["LY"] = "LY";
12703
+ RegionCode2["LI"] = "LI";
12704
+ RegionCode2["LT"] = "LT";
12705
+ RegionCode2["LU"] = "LU";
12706
+ RegionCode2["MO"] = "MO";
12707
+ RegionCode2["MK"] = "MK";
12708
+ RegionCode2["MG"] = "MG";
12709
+ RegionCode2["MW"] = "MW";
12710
+ RegionCode2["MY"] = "MY";
12711
+ RegionCode2["MV"] = "MV";
12712
+ RegionCode2["ML"] = "ML";
12713
+ RegionCode2["MT"] = "MT";
12714
+ RegionCode2["MH"] = "MH";
12715
+ RegionCode2["MQ"] = "MQ";
12716
+ RegionCode2["MR"] = "MR";
12717
+ RegionCode2["MU"] = "MU";
12718
+ RegionCode2["YT"] = "YT";
12719
+ RegionCode2["MX"] = "MX";
12720
+ RegionCode2["FM"] = "FM";
12721
+ RegionCode2["MD"] = "MD";
12722
+ RegionCode2["MC"] = "MC";
12723
+ RegionCode2["MN"] = "MN";
12724
+ RegionCode2["ME"] = "ME";
12725
+ RegionCode2["MS"] = "MS";
12726
+ RegionCode2["MA"] = "MA";
12727
+ RegionCode2["MZ"] = "MZ";
12728
+ RegionCode2["MM"] = "MM";
12729
+ RegionCode2["NA"] = "NA";
12730
+ RegionCode2["NR"] = "NR";
12731
+ RegionCode2["NP"] = "NP";
12732
+ RegionCode2["NL"] = "NL";
12733
+ RegionCode2["NC"] = "NC";
12734
+ RegionCode2["NZ"] = "NZ";
12735
+ RegionCode2["NI"] = "NI";
12736
+ RegionCode2["NE"] = "NE";
12737
+ RegionCode2["NG"] = "NG";
12738
+ RegionCode2["NU"] = "NU";
12739
+ RegionCode2["NF"] = "NF";
12740
+ RegionCode2["MP"] = "MP";
12741
+ RegionCode2["NO"] = "NO";
12742
+ RegionCode2["OM"] = "OM";
12743
+ RegionCode2["PK"] = "PK";
12744
+ RegionCode2["PW"] = "PW";
12745
+ RegionCode2["PS"] = "PS";
12746
+ RegionCode2["PA"] = "PA";
12747
+ RegionCode2["PG"] = "PG";
12748
+ RegionCode2["PY"] = "PY";
12749
+ RegionCode2["PE"] = "PE";
12750
+ RegionCode2["PH"] = "PH";
12751
+ RegionCode2["PN"] = "PN";
12752
+ RegionCode2["PL"] = "PL";
12753
+ RegionCode2["PT"] = "PT";
12754
+ RegionCode2["PR"] = "PR";
12755
+ RegionCode2["QA"] = "QA";
12756
+ RegionCode2["RE"] = "RE";
12757
+ RegionCode2["RO"] = "RO";
12758
+ RegionCode2["RU"] = "RU";
12759
+ RegionCode2["RW"] = "RW";
12760
+ RegionCode2["BL"] = "BL";
12761
+ RegionCode2["SH"] = "SH";
12762
+ RegionCode2["KN"] = "KN";
12763
+ RegionCode2["LC"] = "LC";
12764
+ RegionCode2["MF"] = "MF";
12765
+ RegionCode2["PM"] = "PM";
12766
+ RegionCode2["VC"] = "VC";
12767
+ RegionCode2["WS"] = "WS";
12768
+ RegionCode2["SM"] = "SM";
12769
+ RegionCode2["ST"] = "ST";
12770
+ RegionCode2["SA"] = "SA";
12771
+ RegionCode2["SN"] = "SN";
12772
+ RegionCode2["RS"] = "RS";
12773
+ RegionCode2["SC"] = "SC";
12774
+ RegionCode2["SL"] = "SL";
12775
+ RegionCode2["SG"] = "SG";
12776
+ RegionCode2["SX"] = "SX";
12777
+ RegionCode2["SK"] = "SK";
12778
+ RegionCode2["SI"] = "SI";
12779
+ RegionCode2["SB"] = "SB";
12780
+ RegionCode2["SO"] = "SO";
12781
+ RegionCode2["ZA"] = "ZA";
12782
+ RegionCode2["GS"] = "GS";
12783
+ RegionCode2["SS"] = "SS";
12784
+ RegionCode2["ES"] = "ES";
12785
+ RegionCode2["LK"] = "LK";
12786
+ RegionCode2["SD"] = "SD";
12787
+ RegionCode2["SR"] = "SR";
12788
+ RegionCode2["SJ"] = "SJ";
12789
+ RegionCode2["SZ"] = "SZ";
12790
+ RegionCode2["SE"] = "SE";
12791
+ RegionCode2["CH"] = "CH";
12792
+ RegionCode2["SY"] = "SY";
12793
+ RegionCode2["TW"] = "TW";
12794
+ RegionCode2["TJ"] = "TJ";
12795
+ RegionCode2["TZ"] = "TZ";
12796
+ RegionCode2["TH"] = "TH";
12797
+ RegionCode2["TL"] = "TL";
12798
+ RegionCode2["TG"] = "TG";
12799
+ RegionCode2["TK"] = "TK";
12800
+ RegionCode2["TO"] = "TO";
12801
+ RegionCode2["TT"] = "TT";
12802
+ RegionCode2["TN"] = "TN";
12803
+ RegionCode2["TR"] = "TR";
12804
+ RegionCode2["TM"] = "TM";
12805
+ RegionCode2["TC"] = "TC";
12806
+ RegionCode2["TV"] = "TV";
12807
+ RegionCode2["UG"] = "UG";
12808
+ RegionCode2["UA"] = "UA";
12809
+ RegionCode2["AE"] = "AE";
12810
+ RegionCode2["GB"] = "GB";
12811
+ RegionCode2["US"] = "US";
12812
+ RegionCode2["UM"] = "UM";
12813
+ RegionCode2["UY"] = "UY";
12814
+ RegionCode2["UZ"] = "UZ";
12815
+ RegionCode2["VU"] = "VU";
12816
+ RegionCode2["VE"] = "VE";
12817
+ RegionCode2["VN"] = "VN";
12818
+ RegionCode2["VG"] = "VG";
12819
+ RegionCode2["VI"] = "VI";
12820
+ RegionCode2["WF"] = "WF";
12821
+ RegionCode2["EH"] = "EH";
12822
+ RegionCode2["YE"] = "YE";
12823
+ RegionCode2["ZM"] = "ZM";
12824
+ RegionCode2["ZW"] = "ZW";
12825
+ return RegionCode2;
12826
+ })(RegionCode || {});
12827
+ var RegionCode_default = RegionCode;
12828
+
12247
12829
  // src/objects/ComplianceProvider.ts
12248
12830
  var ComplianceProvider = /* @__PURE__ */ ((ComplianceProvider2) => {
12249
12831
  ComplianceProvider2["FUTURE_VALUE"] = "FUTURE_VALUE";
@@ -12281,7 +12863,7 @@ var SignablePayloadFromJson = (obj) => {
12281
12863
  mulTweak: obj["signable_payload_mul_tweak"]
12282
12864
  };
12283
12865
  };
12284
- var FRAGMENT26 = `
12866
+ var FRAGMENT27 = `
12285
12867
  fragment SignablePayloadFragment on SignablePayload {
12286
12868
  __typename
12287
12869
  signable_payload_id: id
@@ -12307,7 +12889,7 @@ query GetSignablePayload($id: ID!) {
12307
12889
  }
12308
12890
  }
12309
12891
 
12310
- ${FRAGMENT26}
12892
+ ${FRAGMENT27}
12311
12893
  `,
12312
12894
  variables: { id },
12313
12895
  constructObject: (data) => SignablePayloadFromJson(data.entity)
@@ -12333,7 +12915,7 @@ var DepositFromJson = (obj) => {
12333
12915
  numConfirmations: obj["deposit_num_confirmations"]
12334
12916
  };
12335
12917
  };
12336
- var FRAGMENT27 = `
12918
+ var FRAGMENT28 = `
12337
12919
  fragment DepositFragment on Deposit {
12338
12920
  __typename
12339
12921
  deposit_id: id
@@ -12377,7 +12959,7 @@ query GetDeposit($id: ID!) {
12377
12959
  }
12378
12960
  }
12379
12961
 
12380
- ${FRAGMENT27}
12962
+ ${FRAGMENT28}
12381
12963
  `,
12382
12964
  variables: { id },
12383
12965
  constructObject: (data) => DepositFromJson(data.entity)
@@ -12450,7 +13032,7 @@ var LightningTransactionFromJson = (obj) => {
12450
13032
  `Couldn't find a concrete type for interface LightningTransaction corresponding to the typename=${obj["__typename"]}`
12451
13033
  );
12452
13034
  };
12453
- var FRAGMENT28 = `
13035
+ var FRAGMENT29 = `
12454
13036
  fragment LightningTransactionFragment on LightningTransaction {
12455
13037
  __typename
12456
13038
  ... on IncomingPayment {
@@ -12879,7 +13461,7 @@ query GetLightningTransaction($id: ID!) {
12879
13461
  }
12880
13462
  }
12881
13463
 
12882
- ${FRAGMENT28}
13464
+ ${FRAGMENT29}
12883
13465
  `,
12884
13466
  variables: { id },
12885
13467
  constructObject: (data) => LightningTransactionFromJson(data.entity)
@@ -12916,7 +13498,7 @@ var LightsparkNodeOwnerFromJson = (obj) => {
12916
13498
  `Couldn't find a concrete type for interface LightsparkNodeOwner corresponding to the typename=${obj["__typename"]}`
12917
13499
  );
12918
13500
  };
12919
- var FRAGMENT29 = `
13501
+ var FRAGMENT30 = `
12920
13502
  fragment LightsparkNodeOwnerFragment on LightsparkNodeOwner {
12921
13503
  __typename
12922
13504
  ... on Account {
@@ -12977,7 +13559,7 @@ query GetLightsparkNodeOwner($id: ID!) {
12977
13559
  }
12978
13560
  }
12979
13561
 
12980
- ${FRAGMENT29}
13562
+ ${FRAGMENT30}
12981
13563
  `,
12982
13564
  variables: { id },
12983
13565
  constructObject: (data) => LightsparkNodeOwnerFromJson(data.entity)
@@ -13064,7 +13646,7 @@ var OnChainTransactionFromJson = (obj) => {
13064
13646
  `Couldn't find a concrete type for interface OnChainTransaction corresponding to the typename=${obj["__typename"]}`
13065
13647
  );
13066
13648
  };
13067
- var FRAGMENT30 = `
13649
+ var FRAGMENT31 = `
13068
13650
  fragment OnChainTransactionFragment on OnChainTransaction {
13069
13651
  __typename
13070
13652
  ... on ChannelClosingTransaction {
@@ -13207,7 +13789,7 @@ query GetOnChainTransaction($id: ID!) {
13207
13789
  }
13208
13790
  }
13209
13791
 
13210
- ${FRAGMENT30}
13792
+ ${FRAGMENT31}
13211
13793
  `,
13212
13794
  variables: { id },
13213
13795
  constructObject: (data) => OnChainTransactionFromJson(data.entity)
@@ -13266,7 +13848,7 @@ var RoutingTransactionFromJson = (obj) => {
13266
13848
  failureReason: !!obj["routing_transaction_failure_reason"] ? RoutingTransactionFailureReason_default[obj["routing_transaction_failure_reason"]] ?? RoutingTransactionFailureReason_default.FUTURE_VALUE : null
13267
13849
  };
13268
13850
  };
13269
- var FRAGMENT31 = `
13851
+ var FRAGMENT32 = `
13270
13852
  fragment RoutingTransactionFragment on RoutingTransaction {
13271
13853
  __typename
13272
13854
  routing_transaction_id: id
@@ -13314,7 +13896,7 @@ query GetRoutingTransaction($id: ID!) {
13314
13896
  }
13315
13897
  }
13316
13898
 
13317
- ${FRAGMENT31}
13899
+ ${FRAGMENT32}
13318
13900
  `,
13319
13901
  variables: { id },
13320
13902
  constructObject: (data) => RoutingTransactionFromJson(data.entity)
@@ -13330,7 +13912,7 @@ var SignableFromJson = (obj) => {
13330
13912
  typename: "Signable"
13331
13913
  };
13332
13914
  };
13333
- var FRAGMENT32 = `
13915
+ var FRAGMENT33 = `
13334
13916
  fragment SignableFragment on Signable {
13335
13917
  __typename
13336
13918
  signable_id: id
@@ -13348,7 +13930,7 @@ query GetSignable($id: ID!) {
13348
13930
  }
13349
13931
  }
13350
13932
 
13351
- ${FRAGMENT32}
13933
+ ${FRAGMENT33}
13352
13934
  `,
13353
13935
  variables: { id },
13354
13936
  constructObject: (data) => SignableFromJson(data.entity)
@@ -13376,9 +13958,11 @@ var TransactionType_default = TransactionType;
13376
13958
  var WebhookEventType = /* @__PURE__ */ ((WebhookEventType2) => {
13377
13959
  WebhookEventType2["FUTURE_VALUE"] = "FUTURE_VALUE";
13378
13960
  WebhookEventType2["PAYMENT_FINISHED"] = "PAYMENT_FINISHED";
13961
+ WebhookEventType2["FORCE_CLOSURE"] = "FORCE_CLOSURE";
13379
13962
  WebhookEventType2["WITHDRAWAL_FINISHED"] = "WITHDRAWAL_FINISHED";
13380
13963
  WebhookEventType2["FUNDS_RECEIVED"] = "FUNDS_RECEIVED";
13381
13964
  WebhookEventType2["NODE_STATUS"] = "NODE_STATUS";
13965
+ WebhookEventType2["UMA_INVITATION_CLAIMED"] = "UMA_INVITATION_CLAIMED";
13382
13966
  WebhookEventType2["WALLET_STATUS"] = "WALLET_STATUS";
13383
13967
  WebhookEventType2["WALLET_OUTGOING_PAYMENT_FINISHED"] = "WALLET_OUTGOING_PAYMENT_FINISHED";
13384
13968
  WebhookEventType2["WALLET_INCOMING_PAYMENT_FINISHED"] = "WALLET_INCOMING_PAYMENT_FINISHED";
@@ -13409,7 +13993,7 @@ var WithdrawalFromJson = (obj) => {
13409
13993
  numConfirmations: obj["withdrawal_num_confirmations"]
13410
13994
  };
13411
13995
  };
13412
- var FRAGMENT33 = `
13996
+ var FRAGMENT34 = `
13413
13997
  fragment WithdrawalFragment on Withdrawal {
13414
13998
  __typename
13415
13999
  withdrawal_id: id
@@ -13453,7 +14037,7 @@ query GetWithdrawal($id: ID!) {
13453
14037
  }
13454
14038
  }
13455
14039
 
13456
- ${FRAGMENT33}
14040
+ ${FRAGMENT34}
13457
14041
  `,
13458
14042
  variables: { id },
13459
14043
  constructObject: (data) => WithdrawalFromJson(data.entity)
@@ -13505,7 +14089,7 @@ var RemoteSigningWebhookHandler = class {
13505
14089
  this.validator
13506
14090
  );
13507
14091
  const variables = JSON.parse(response.variables);
13508
- this.client.executeRawQuery({
14092
+ return this.client.executeRawQuery({
13509
14093
  queryPayload: response.query,
13510
14094
  variables,
13511
14095
  constructObject: (rawData) => rawData
@@ -13524,6 +14108,8 @@ var RemoteSigningWebhookHandler = class {
13524
14108
  CurrencyUnit,
13525
14109
  GraphNode,
13526
14110
  HtlcAttemptFailureCode,
14111
+ IncentivesIneligibilityReason,
14112
+ IncentivesStatus,
13527
14113
  IncomingPayment,
13528
14114
  IncomingPaymentAttemptStatus,
13529
14115
  InvoiceType,
@@ -13539,6 +14125,7 @@ var RemoteSigningWebhookHandler = class {
13539
14125
  PaymentFailureReason,
13540
14126
  PaymentRequestStatus,
13541
14127
  Permission,
14128
+ RegionCode,
13542
14129
  RemoteSigningSubEventType,
13543
14130
  RemoteSigningWebhookHandler,
13544
14131
  RiskRating,
@@ -13572,6 +14159,7 @@ var RemoteSigningWebhookHandler = class {
13572
14159
  getSignablePayloadQuery,
13573
14160
  getSignableQuery,
13574
14161
  getTransactionQuery,
14162
+ getUmaInvitationQuery,
13575
14163
  getWithdrawalQuery,
13576
14164
  isBitcoinNetwork,
13577
14165
  verifyAndParseWebhook