@lightsparkdev/lightspark-sdk 1.2.1 → 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 (37) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/{chunk-VTPDR6P4.js → chunk-GLL4KTUT.js} +353 -15
  3. package/dist/{index-5acc6526.d.ts → index-eb604025.d.ts} +662 -3
  4. package/dist/index.cjs +654 -76
  5. package/dist/index.d.cts +2 -2
  6. package/dist/index.d.ts +2 -2
  7. package/dist/index.js +265 -17
  8. package/dist/objects/index.cjs +345 -5
  9. package/dist/objects/index.d.cts +1 -1
  10. package/dist/objects/index.d.ts +1 -1
  11. package/dist/objects/index.js +9 -1
  12. package/package.json +1 -1
  13. package/src/client.ts +194 -1
  14. package/src/graphql/ClaimUmaInvitation.ts +21 -0
  15. package/src/graphql/ClaimUmaInvitationWithIncentives.ts +25 -0
  16. package/src/graphql/CreateUmaInvitation.ts +19 -0
  17. package/src/graphql/CreateUmaInvitationWithIncentives.ts +23 -0
  18. package/src/graphql/FetchUmaInvitation.ts +15 -0
  19. package/src/objects/ClaimUmaInvitationInput.ts +26 -0
  20. package/src/objects/ClaimUmaInvitationOutput.ts +30 -0
  21. package/src/objects/ClaimUmaInvitationWithIncentivesInput.ts +44 -0
  22. package/src/objects/ClaimUmaInvitationWithIncentivesOutput.ts +33 -0
  23. package/src/objects/CreateInvitationWithIncentivesInput.ts +37 -0
  24. package/src/objects/CreateInvitationWithIncentivesOutput.ts +32 -0
  25. package/src/objects/CreateUmaInvitationInput.ts +22 -0
  26. package/src/objects/CreateUmaInvitationOutput.ts +30 -0
  27. package/src/objects/Entity.ts +13 -0
  28. package/src/objects/IncentivesIneligibilityReason.ts +24 -0
  29. package/src/objects/IncentivesStatus.ts +18 -0
  30. package/src/objects/OutgoingPayment.ts +1 -0
  31. package/src/objects/OutgoingPaymentAttempt.ts +6 -1
  32. package/src/objects/RegionCode.ts +510 -0
  33. package/src/objects/UmaInvitation.ts +113 -0
  34. package/src/objects/WebhookEventType.ts +4 -0
  35. package/src/objects/index.ts +15 -0
  36. package/src/tests/integration/constants.ts +0 -3
  37. package/src/tests/integration/general-regtest.test.ts +177 -196
package/dist/index.cjs CHANGED
@@ -1850,6 +1850,8 @@ __export(src_exports, {
1850
1850
  CurrencyUnit: () => CurrencyUnit_default,
1851
1851
  GraphNode: () => GraphNode_default,
1852
1852
  HtlcAttemptFailureCode: () => HtlcAttemptFailureCode_default,
1853
+ IncentivesIneligibilityReason: () => IncentivesIneligibilityReason_default,
1854
+ IncentivesStatus: () => IncentivesStatus_default,
1853
1855
  IncomingPayment: () => IncomingPayment_default,
1854
1856
  IncomingPaymentAttemptStatus: () => IncomingPaymentAttemptStatus_default,
1855
1857
  InvoiceType: () => InvoiceType_default,
@@ -1865,6 +1867,7 @@ __export(src_exports, {
1865
1867
  PaymentFailureReason: () => PaymentFailureReason_default,
1866
1868
  PaymentRequestStatus: () => PaymentRequestStatus_default,
1867
1869
  Permission: () => Permission_default,
1870
+ RegionCode: () => RegionCode_default,
1868
1871
  RemoteSigningSubEventType: () => RemoteSigningSubEventType_default,
1869
1872
  RemoteSigningWebhookHandler: () => RemoteSigningWebhookHandler,
1870
1873
  RiskRating: () => RiskRating_default,
@@ -1898,6 +1901,7 @@ __export(src_exports, {
1898
1901
  getSignablePayloadQuery: () => getSignablePayloadQuery,
1899
1902
  getSignableQuery: () => getSignableQuery,
1900
1903
  getTransactionQuery: () => getTransactionQuery,
1904
+ getUmaInvitationQuery: () => getUmaInvitationQuery,
1901
1905
  getWithdrawalQuery: () => getWithdrawalQuery,
1902
1906
  isBitcoinNetwork: () => isBitcoinNetwork,
1903
1907
  verifyAndParseWebhook: () => verifyAndParseWebhook
@@ -1945,7 +1949,7 @@ var import_core9 = require("@lightsparkdev/core");
1945
1949
  // package.json
1946
1950
  var package_default = {
1947
1951
  name: "@lightsparkdev/lightspark-sdk",
1948
- version: "1.2.1",
1952
+ version: "1.2.2",
1949
1953
  description: "Lightspark JS SDK",
1950
1954
  author: "Lightspark Inc.",
1951
1955
  keywords: [
@@ -2146,6 +2150,117 @@ var BitcoinFeeEstimate = `
2146
2150
  ${FRAGMENT2}
2147
2151
  `;
2148
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
+
2149
2264
  // src/objects/Permission.ts
2150
2265
  var Permission = /* @__PURE__ */ ((Permission2) => {
2151
2266
  Permission2["FUTURE_VALUE"] = "FUTURE_VALUE";
@@ -2179,7 +2294,7 @@ var ApiTokenFromJson = (obj) => {
2179
2294
  typename: "ApiToken"
2180
2295
  };
2181
2296
  };
2182
- var FRAGMENT3 = `
2297
+ var FRAGMENT4 = `
2183
2298
  fragment ApiTokenFragment on ApiToken {
2184
2299
  __typename
2185
2300
  api_token_id: id
@@ -2200,7 +2315,7 @@ query GetApiToken($id: ID!) {
2200
2315
  }
2201
2316
  }
2202
2317
 
2203
- ${FRAGMENT3}
2318
+ ${FRAGMENT4}
2204
2319
  `,
2205
2320
  variables: { id },
2206
2321
  constructObject: (data) => ApiTokenFromJson(data.entity)
@@ -2224,7 +2339,7 @@ var CreateApiToken = `
2224
2339
  }
2225
2340
  }
2226
2341
 
2227
- ${FRAGMENT3}
2342
+ ${FRAGMENT4}
2228
2343
  `;
2229
2344
 
2230
2345
  // src/graphql/CreateInvoice.ts
@@ -2389,7 +2504,7 @@ query GetGraphNode($id: ID!) {
2389
2504
  }
2390
2505
  }
2391
2506
 
2392
- ${FRAGMENT4}
2507
+ ${FRAGMENT5}
2393
2508
  `,
2394
2509
  variables: { id },
2395
2510
  constructObject: (data) => GraphNodeFromJson(data.entity)
@@ -2424,7 +2539,7 @@ var GraphNodeFromJson = (obj) => {
2424
2539
  obj["graph_node_public_key"]
2425
2540
  );
2426
2541
  };
2427
- var FRAGMENT4 = `
2542
+ var FRAGMENT5 = `
2428
2543
  fragment GraphNodeFragment on GraphNode {
2429
2544
  __typename
2430
2545
  graph_node_id: id
@@ -2613,7 +2728,7 @@ query GetChannel($id: ID!) {
2613
2728
  }
2614
2729
  }
2615
2730
 
2616
- ${FRAGMENT5}
2731
+ ${FRAGMENT6}
2617
2732
  `,
2618
2733
  variables: { id },
2619
2734
  constructObject: (data) => ChannelFromJson(data.entity)
@@ -2666,7 +2781,7 @@ var ChannelFromJson = (obj) => {
2666
2781
  obj["channel_short_channel_id"]
2667
2782
  );
2668
2783
  };
2669
- var FRAGMENT5 = `
2784
+ var FRAGMENT6 = `
2670
2785
  fragment ChannelFragment on Channel {
2671
2786
  __typename
2672
2787
  channel_id: id
@@ -2990,7 +3105,7 @@ query GetLightsparkNodeWithOSK($id: ID!) {
2990
3105
  }
2991
3106
  }
2992
3107
 
2993
- ${FRAGMENT6}
3108
+ ${FRAGMENT7}
2994
3109
  `,
2995
3110
  variables: { id },
2996
3111
  constructObject: (data) => LightsparkNodeWithOSKFromJson(data.entity)
@@ -3051,7 +3166,7 @@ var LightsparkNodeWithOSKFromJson = (obj) => {
3051
3166
  ) : void 0
3052
3167
  );
3053
3168
  };
3054
- var FRAGMENT6 = `
3169
+ var FRAGMENT7 = `
3055
3170
  fragment LightsparkNodeWithOSKFragment on LightsparkNodeWithOSK {
3056
3171
  __typename
3057
3172
  lightspark_node_with_o_s_k_id: id
@@ -3375,7 +3490,7 @@ query GetLightsparkNodeWithRemoteSigning($id: ID!) {
3375
3490
  }
3376
3491
  }
3377
3492
 
3378
- ${FRAGMENT7}
3493
+ ${FRAGMENT8}
3379
3494
  `,
3380
3495
  variables: { id },
3381
3496
  constructObject: (data) => LightsparkNodeWithRemoteSigningFromJson(data.entity)
@@ -3438,7 +3553,7 @@ var LightsparkNodeWithRemoteSigningFromJson = (obj) => {
3438
3553
  !!obj["lightspark_node_with_remote_signing_balances"] ? BalancesFromJson(obj["lightspark_node_with_remote_signing_balances"]) : void 0
3439
3554
  );
3440
3555
  };
3441
- var FRAGMENT7 = `
3556
+ var FRAGMENT8 = `
3442
3557
  fragment LightsparkNodeWithRemoteSigningFragment on LightsparkNodeWithRemoteSigning {
3443
3558
  __typename
3444
3559
  lightspark_node_with_remote_signing_id: id
@@ -3734,7 +3849,7 @@ var NodeToJson = (obj) => {
3734
3849
  `Couldn't find a concrete type for interface Node corresponding to the typename=${obj.typename}`
3735
3850
  );
3736
3851
  };
3737
- var FRAGMENT8 = `
3852
+ var FRAGMENT9 = `
3738
3853
  fragment NodeFragment on Node {
3739
3854
  __typename
3740
3855
  ... on GraphNode {
@@ -4020,7 +4135,7 @@ query GetNode($id: ID!) {
4020
4135
  }
4021
4136
  }
4022
4137
 
4023
- ${FRAGMENT8}
4138
+ ${FRAGMENT9}
4024
4139
  `,
4025
4140
  variables: { id },
4026
4141
  constructObject: (data) => NodeFromJson(data.entity)
@@ -4041,7 +4156,7 @@ var InvoiceDataFromJson = (obj) => {
4041
4156
  memo: obj["invoice_data_memo"]
4042
4157
  };
4043
4158
  };
4044
- var FRAGMENT9 = `
4159
+ var FRAGMENT10 = `
4045
4160
  fragment InvoiceDataFragment on InvoiceData {
4046
4161
  __typename
4047
4162
  invoice_data_encoded_payment_request: encoded_payment_request
@@ -4355,7 +4470,7 @@ var InvoiceFromJson = (obj) => {
4355
4470
  amountPaid: !!obj["invoice_amount_paid"] ? CurrencyAmountFromJson(obj["invoice_amount_paid"]) : void 0
4356
4471
  };
4357
4472
  };
4358
- var FRAGMENT10 = `
4473
+ var FRAGMENT11 = `
4359
4474
  fragment InvoiceFragment on Invoice {
4360
4475
  __typename
4361
4476
  invoice_id: id
@@ -4673,7 +4788,7 @@ query GetInvoice($id: ID!) {
4673
4788
  }
4674
4789
  }
4675
4790
 
4676
- ${FRAGMENT10}
4791
+ ${FRAGMENT11}
4677
4792
  `,
4678
4793
  variables: { id },
4679
4794
  constructObject: (data) => InvoiceFromJson(data.entity)
@@ -4699,7 +4814,7 @@ mutation CreateLnurlInvoice(
4699
4814
  }
4700
4815
  }
4701
4816
  }
4702
- ${FRAGMENT10}
4817
+ ${FRAGMENT11}
4703
4818
  `;
4704
4819
 
4705
4820
  // src/graphql/CreateNodeWalletAddress.ts
@@ -4761,7 +4876,7 @@ var IncomingPaymentAttemptFromJson = (obj) => {
4761
4876
  resolvedAt: obj["incoming_payment_attempt_resolved_at"]
4762
4877
  };
4763
4878
  };
4764
- var FRAGMENT11 = `
4879
+ var FRAGMENT12 = `
4765
4880
  fragment IncomingPaymentAttemptFragment on IncomingPaymentAttempt {
4766
4881
  __typename
4767
4882
  incoming_payment_attempt_id: id
@@ -4792,7 +4907,7 @@ query GetIncomingPaymentAttempt($id: ID!) {
4792
4907
  }
4793
4908
  }
4794
4909
 
4795
- ${FRAGMENT11}
4910
+ ${FRAGMENT12}
4796
4911
  `,
4797
4912
  variables: { id },
4798
4913
  constructObject: (data) => IncomingPaymentAttemptFromJson(data.entity)
@@ -4919,7 +5034,7 @@ query GetIncomingPayment($id: ID!) {
4919
5034
  }
4920
5035
  }
4921
5036
 
4922
- ${FRAGMENT12}
5037
+ ${FRAGMENT13}
4923
5038
  `,
4924
5039
  variables: { id },
4925
5040
  constructObject: (data) => IncomingPaymentFromJson(data.entity)
@@ -4958,7 +5073,7 @@ var IncomingPaymentFromJson = (obj) => {
4958
5073
  )
4959
5074
  );
4960
5075
  };
4961
- var FRAGMENT12 = `
5076
+ var FRAGMENT13 = `
4962
5077
  fragment IncomingPaymentFragment on IncomingPayment {
4963
5078
  __typename
4964
5079
  incoming_payment_id: id
@@ -5014,7 +5129,45 @@ mutation CreateTestModePayment(
5014
5129
  }
5015
5130
  }
5016
5131
 
5017
- ${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}
5018
5171
  `;
5019
5172
 
5020
5173
  // src/graphql/CreateUmaInvoice.ts
@@ -5036,7 +5189,7 @@ mutation CreateUmaInvoice(
5036
5189
  }
5037
5190
  }
5038
5191
  }
5039
- ${FRAGMENT10}
5192
+ ${FRAGMENT11}
5040
5193
  `;
5041
5194
 
5042
5195
  // src/graphql/DecodeInvoice.ts
@@ -5050,7 +5203,7 @@ var DecodeInvoice = `
5050
5203
  }
5051
5204
  }
5052
5205
 
5053
- ${FRAGMENT9}
5206
+ ${FRAGMENT10}
5054
5207
  `;
5055
5208
 
5056
5209
  // src/graphql/DeleteApiToken.ts
@@ -5066,6 +5219,19 @@ var DeleteApiToken = `
5066
5219
  }
5067
5220
  `;
5068
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
+
5069
5235
  // src/graphql/FundNode.ts
5070
5236
  var FundNode = `
5071
5237
  mutation FundNode(
@@ -5083,7 +5249,7 @@ ${FRAGMENT}
5083
5249
  `;
5084
5250
 
5085
5251
  // src/objects/LightningFeeEstimateOutput.ts
5086
- var FRAGMENT13 = `
5252
+ var FRAGMENT14 = `
5087
5253
  fragment LightningFeeEstimateOutputFragment on LightningFeeEstimateOutput {
5088
5254
  __typename
5089
5255
  lightning_fee_estimate_output_fee_estimate: fee_estimate {
@@ -5112,7 +5278,7 @@ var LightningFeeEstimateForInvoice = `
5112
5278
  }
5113
5279
  }
5114
5280
 
5115
- ${FRAGMENT13}
5281
+ ${FRAGMENT14}
5116
5282
  `;
5117
5283
 
5118
5284
  // src/graphql/LightningFeeEstimateForNode.ts
@@ -5131,7 +5297,7 @@ var LightningFeeEstimateForNode = `
5131
5297
  }
5132
5298
  }
5133
5299
 
5134
- ${FRAGMENT13}
5300
+ ${FRAGMENT14}
5135
5301
  `;
5136
5302
 
5137
5303
  // src/graphql/MultiNodeDashboard.ts
@@ -5299,7 +5465,7 @@ var HopFromJson = (obj) => {
5299
5465
  expiryBlockHeight: obj["hop_expiry_block_height"]
5300
5466
  };
5301
5467
  };
5302
- var FRAGMENT14 = `
5468
+ var FRAGMENT15 = `
5303
5469
  fragment HopFragment on Hop {
5304
5470
  __typename
5305
5471
  hop_id: id
@@ -5339,7 +5505,7 @@ query GetHop($id: ID!) {
5339
5505
  }
5340
5506
  }
5341
5507
 
5342
- ${FRAGMENT14}
5508
+ ${FRAGMENT15}
5343
5509
  `,
5344
5510
  variables: { id },
5345
5511
  constructObject: (data) => HopFromJson(data.entity)
@@ -5362,11 +5528,12 @@ var OutgoingPaymentAttemptToHopsConnectionFromJson = (obj) => {
5362
5528
 
5363
5529
  // src/objects/OutgoingPaymentAttempt.ts
5364
5530
  var OutgoingPaymentAttempt = class {
5365
- 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) {
5366
5532
  this.id = id;
5367
5533
  this.createdAt = createdAt;
5368
5534
  this.updatedAt = updatedAt;
5369
5535
  this.status = status;
5536
+ this.attemptedAt = attemptedAt;
5370
5537
  this.outgoingPaymentId = outgoingPaymentId;
5371
5538
  this.typename = typename;
5372
5539
  this.failureCode = failureCode;
@@ -5444,7 +5611,7 @@ query GetOutgoingPaymentAttempt($id: ID!) {
5444
5611
  }
5445
5612
  }
5446
5613
 
5447
- ${FRAGMENT15}
5614
+ ${FRAGMENT16}
5448
5615
  `,
5449
5616
  variables: { id },
5450
5617
  constructObject: (data) => OutgoingPaymentAttemptFromJson(data.entity)
@@ -5459,6 +5626,7 @@ ${FRAGMENT15}
5459
5626
  outgoing_payment_attempt_status: this.status,
5460
5627
  outgoing_payment_attempt_failure_code: this.failureCode,
5461
5628
  outgoing_payment_attempt_failure_source_index: this.failureSourceIndex,
5629
+ outgoing_payment_attempt_attempted_at: this.attemptedAt,
5462
5630
  outgoing_payment_attempt_resolved_at: this.resolvedAt,
5463
5631
  outgoing_payment_attempt_amount: this.amount ? CurrencyAmountToJson(this.amount) : void 0,
5464
5632
  outgoing_payment_attempt_fees: this.fees ? CurrencyAmountToJson(this.fees) : void 0,
@@ -5473,6 +5641,7 @@ var OutgoingPaymentAttemptFromJson = (obj) => {
5473
5641
  obj["outgoing_payment_attempt_created_at"],
5474
5642
  obj["outgoing_payment_attempt_updated_at"],
5475
5643
  OutgoingPaymentAttemptStatus_default[obj["outgoing_payment_attempt_status"]] ?? OutgoingPaymentAttemptStatus_default.FUTURE_VALUE,
5644
+ obj["outgoing_payment_attempt_attempted_at"],
5476
5645
  obj["outgoing_payment_attempt_outgoing_payment"].id,
5477
5646
  "OutgoingPaymentAttempt",
5478
5647
  !!obj["outgoing_payment_attempt_failure_code"] ? HtlcAttemptFailureCode_default[obj["outgoing_payment_attempt_failure_code"]] ?? HtlcAttemptFailureCode_default.FUTURE_VALUE : null,
@@ -5485,7 +5654,7 @@ var OutgoingPaymentAttemptFromJson = (obj) => {
5485
5654
  ) : void 0
5486
5655
  );
5487
5656
  };
5488
- var FRAGMENT15 = `
5657
+ var FRAGMENT16 = `
5489
5658
  fragment OutgoingPaymentAttemptFragment on OutgoingPaymentAttempt {
5490
5659
  __typename
5491
5660
  outgoing_payment_attempt_id: id
@@ -5494,6 +5663,7 @@ fragment OutgoingPaymentAttemptFragment on OutgoingPaymentAttempt {
5494
5663
  outgoing_payment_attempt_status: status
5495
5664
  outgoing_payment_attempt_failure_code: failure_code
5496
5665
  outgoing_payment_attempt_failure_source_index: failure_source_index
5666
+ outgoing_payment_attempt_attempted_at: attempted_at
5497
5667
  outgoing_payment_attempt_resolved_at: resolved_at
5498
5668
  outgoing_payment_attempt_amount: amount {
5499
5669
  __typename
@@ -5694,6 +5864,7 @@ query FetchOutgoingPaymentToAttemptsConnection($entity_id: ID!, $first: Int, $af
5694
5864
  outgoing_payment_attempt_status: status
5695
5865
  outgoing_payment_attempt_failure_code: failure_code
5696
5866
  outgoing_payment_attempt_failure_source_index: failure_source_index
5867
+ outgoing_payment_attempt_attempted_at: attempted_at
5697
5868
  outgoing_payment_attempt_resolved_at: resolved_at
5698
5869
  outgoing_payment_attempt_amount: amount {
5699
5870
  __typename
@@ -5785,7 +5956,7 @@ query GetOutgoingPayment($id: ID!) {
5785
5956
  }
5786
5957
  }
5787
5958
 
5788
- ${FRAGMENT16}
5959
+ ${FRAGMENT17}
5789
5960
  `,
5790
5961
  variables: { id },
5791
5962
  constructObject: (data) => OutgoingPaymentFromJson(data.entity)
@@ -5834,7 +6005,7 @@ var OutgoingPaymentFromJson = (obj) => {
5834
6005
  obj["outgoing_payment_payment_preimage"]
5835
6006
  );
5836
6007
  };
5837
- var FRAGMENT16 = `
6008
+ var FRAGMENT17 = `
5838
6009
  fragment OutgoingPaymentFragment on OutgoingPayment {
5839
6010
  __typename
5840
6011
  outgoing_payment_id: id
@@ -6204,7 +6375,7 @@ var PayInvoice = `
6204
6375
  }
6205
6376
  }
6206
6377
 
6207
- ${FRAGMENT16}
6378
+ ${FRAGMENT17}
6208
6379
  `;
6209
6380
 
6210
6381
  // src/objects/PaymentRequest.ts
@@ -6226,7 +6397,7 @@ var PaymentRequestFromJson = (obj) => {
6226
6397
  `Couldn't find a concrete type for interface PaymentRequest corresponding to the typename=${obj["__typename"]}`
6227
6398
  );
6228
6399
  };
6229
- var FRAGMENT17 = `
6400
+ var FRAGMENT18 = `
6230
6401
  fragment PaymentRequestFragment on PaymentRequest {
6231
6402
  __typename
6232
6403
  ... on Invoice {
@@ -6547,7 +6718,7 @@ query GetPaymentRequest($id: ID!) {
6547
6718
  }
6548
6719
  }
6549
6720
 
6550
- ${FRAGMENT17}
6721
+ ${FRAGMENT18}
6551
6722
  `,
6552
6723
  variables: { id },
6553
6724
  constructObject: (data) => PaymentRequestFromJson(data.entity)
@@ -6582,7 +6753,7 @@ query PaymentRequestsForNode(
6582
6753
  }
6583
6754
  }
6584
6755
 
6585
- ${FRAGMENT17}
6756
+ ${FRAGMENT18}
6586
6757
  `;
6587
6758
 
6588
6759
  // src/graphql/PayUmaInvoice.ts
@@ -6609,7 +6780,7 @@ var PayUmaInvoice = `
6609
6780
  }
6610
6781
  }
6611
6782
 
6612
- ${FRAGMENT16}
6783
+ ${FRAGMENT17}
6613
6784
  `;
6614
6785
 
6615
6786
  // src/objects/WithdrawalRequest.ts
@@ -6654,7 +6825,7 @@ var ChannelClosingTransactionFromJson = (obj) => {
6654
6825
  channelId: obj["channel_closing_transaction_channel"]?.id ?? void 0
6655
6826
  };
6656
6827
  };
6657
- var FRAGMENT18 = `
6828
+ var FRAGMENT19 = `
6658
6829
  fragment ChannelClosingTransactionFragment on ChannelClosingTransaction {
6659
6830
  __typename
6660
6831
  channel_closing_transaction_id: id
@@ -6698,7 +6869,7 @@ query GetChannelClosingTransaction($id: ID!) {
6698
6869
  }
6699
6870
  }
6700
6871
 
6701
- ${FRAGMENT18}
6872
+ ${FRAGMENT19}
6702
6873
  `,
6703
6874
  variables: { id },
6704
6875
  constructObject: (data) => ChannelClosingTransactionFromJson(data.entity)
@@ -6735,7 +6906,7 @@ var ChannelOpeningTransactionFromJson = (obj) => {
6735
6906
  channelId: obj["channel_opening_transaction_channel"]?.id ?? void 0
6736
6907
  };
6737
6908
  };
6738
- var FRAGMENT19 = `
6909
+ var FRAGMENT20 = `
6739
6910
  fragment ChannelOpeningTransactionFragment on ChannelOpeningTransaction {
6740
6911
  __typename
6741
6912
  channel_opening_transaction_id: id
@@ -6779,7 +6950,7 @@ query GetChannelOpeningTransaction($id: ID!) {
6779
6950
  }
6780
6951
  }
6781
6952
 
6782
- ${FRAGMENT19}
6953
+ ${FRAGMENT20}
6783
6954
  `,
6784
6955
  variables: { id },
6785
6956
  constructObject: (data) => ChannelOpeningTransactionFromJson(data.entity)
@@ -6948,7 +7119,7 @@ query GetWithdrawalRequest($id: ID!) {
6948
7119
  }
6949
7120
  }
6950
7121
 
6951
- ${FRAGMENT20}
7122
+ ${FRAGMENT21}
6952
7123
  `,
6953
7124
  variables: { id },
6954
7125
  constructObject: (data) => WithdrawalRequestFromJson(data.entity)
@@ -6985,7 +7156,7 @@ var WithdrawalRequestFromJson = (obj) => {
6985
7156
  obj["withdrawal_request_withdrawal"]?.id ?? void 0
6986
7157
  );
6987
7158
  };
6988
- var FRAGMENT20 = `
7159
+ var FRAGMENT21 = `
6989
7160
  fragment WithdrawalRequestFragment on WithdrawalRequest {
6990
7161
  __typename
6991
7162
  withdrawal_request_id: id
@@ -7037,7 +7208,7 @@ var RequestWithdrawal = `
7037
7208
  }
7038
7209
  }
7039
7210
 
7040
- ${FRAGMENT20}
7211
+ ${FRAGMENT21}
7041
7212
  `;
7042
7213
 
7043
7214
  // src/graphql/SendPayment.ts
@@ -7064,7 +7235,7 @@ var SendPayment = `
7064
7235
  }
7065
7236
  }
7066
7237
 
7067
- ${FRAGMENT16}
7238
+ ${FRAGMENT17}
7068
7239
  `;
7069
7240
 
7070
7241
  // src/objects/Transaction.ts
@@ -7217,7 +7388,7 @@ var TransactionFromJson = (obj) => {
7217
7388
  `Couldn't find a concrete type for interface Transaction corresponding to the typename=${obj["__typename"]}`
7218
7389
  );
7219
7390
  };
7220
- var FRAGMENT21 = `
7391
+ var FRAGMENT22 = `
7221
7392
  fragment TransactionFragment on Transaction {
7222
7393
  __typename
7223
7394
  ... on ChannelClosingTransaction {
@@ -7774,7 +7945,7 @@ query GetTransaction($id: ID!) {
7774
7945
  }
7775
7946
  }
7776
7947
 
7777
- ${FRAGMENT21}
7948
+ ${FRAGMENT22}
7778
7949
  `,
7779
7950
  variables: { id },
7780
7951
  constructObject: (data) => TransactionFromJson(data.entity)
@@ -7889,7 +8060,7 @@ query SingleNodeDashboard(
7889
8060
  }
7890
8061
  }
7891
8062
 
7892
- ${FRAGMENT21}
8063
+ ${FRAGMENT22}
7893
8064
  ${FRAGMENT}
7894
8065
  `;
7895
8066
 
@@ -7928,7 +8099,7 @@ query TransactionsForNode(
7928
8099
  }
7929
8100
  }
7930
8101
 
7931
- ${FRAGMENT21}
8102
+ ${FRAGMENT22}
7932
8103
  ${FRAGMENT}
7933
8104
  `;
7934
8105
 
@@ -7945,7 +8116,7 @@ var TransactionUpdateFromJson = (obj) => {
7945
8116
  transactionHash: obj["transaction_hash"]
7946
8117
  };
7947
8118
  };
7948
- var FRAGMENT22 = `
8119
+ var FRAGMENT23 = `
7949
8120
  fragment TransactionUpdateFragment on Transaction {
7950
8121
  __typename
7951
8122
  id
@@ -7975,7 +8146,7 @@ subscription TransactionSubscription(
7975
8146
  }
7976
8147
  }
7977
8148
 
7978
- ${FRAGMENT22}
8149
+ ${FRAGMENT23}
7979
8150
  `;
7980
8151
 
7981
8152
  // src/NodeKeyLoaderCache.ts
@@ -8275,7 +8446,7 @@ var LightsparkNodeFromJson = (obj) => {
8275
8446
  `Couldn't find a concrete type for interface LightsparkNode corresponding to the typename=${obj["__typename"]}`
8276
8447
  );
8277
8448
  };
8278
- var FRAGMENT23 = `
8449
+ var FRAGMENT24 = `
8279
8450
  fragment LightsparkNodeFragment on LightsparkNode {
8280
8451
  __typename
8281
8452
  ... on LightsparkNodeWithOSK {
@@ -8549,7 +8720,7 @@ query GetLightsparkNode($id: ID!) {
8549
8720
  }
8550
8721
  }
8551
8722
 
8552
- ${FRAGMENT23}
8723
+ ${FRAGMENT24}
8553
8724
  `,
8554
8725
  variables: { id },
8555
8726
  constructObject: (data) => LightsparkNodeFromJson(data.entity)
@@ -9659,7 +9830,7 @@ query GetWallet($id: ID!) {
9659
9830
  }
9660
9831
  }
9661
9832
 
9662
- ${FRAGMENT24}
9833
+ ${FRAGMENT25}
9663
9834
  `,
9664
9835
  variables: { id },
9665
9836
  constructObject: (data) => WalletFromJson(data.entity)
@@ -9692,7 +9863,7 @@ var WalletFromJson = (obj) => {
9692
9863
  obj["wallet_account"]?.id ?? void 0
9693
9864
  );
9694
9865
  };
9695
- var FRAGMENT24 = `
9866
+ var FRAGMENT25 = `
9696
9867
  fragment WalletFragment on Wallet {
9697
9868
  __typename
9698
9869
  wallet_id: id
@@ -11397,7 +11568,7 @@ query GetAccount {
11397
11568
  }
11398
11569
  }
11399
11570
 
11400
- ${FRAGMENT25}
11571
+ ${FRAGMENT26}
11401
11572
  `,
11402
11573
  variables: {},
11403
11574
  constructObject: (data) => AccountFromJson(data.current_account)
@@ -11422,7 +11593,7 @@ var AccountFromJson = (obj) => {
11422
11593
  obj["account_name"]
11423
11594
  );
11424
11595
  };
11425
- var FRAGMENT25 = `
11596
+ var FRAGMENT26 = `
11426
11597
  fragment AccountFragment on Account {
11427
11598
  __typename
11428
11599
  account_id: id
@@ -12215,6 +12386,151 @@ var LightsparkClient = class {
12215
12386
  }
12216
12387
  });
12217
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
+ }
12218
12534
  /**
12219
12535
  * Executes a raw `Query` against the Lightspark API.
12220
12536
  *
@@ -12254,6 +12570,262 @@ var getBitcoinNetworkOrThrow = (bitcoinNetwork) => {
12254
12570
  return bitcoinNetwork;
12255
12571
  };
12256
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
+
12257
12829
  // src/objects/ComplianceProvider.ts
12258
12830
  var ComplianceProvider = /* @__PURE__ */ ((ComplianceProvider2) => {
12259
12831
  ComplianceProvider2["FUTURE_VALUE"] = "FUTURE_VALUE";
@@ -12291,7 +12863,7 @@ var SignablePayloadFromJson = (obj) => {
12291
12863
  mulTweak: obj["signable_payload_mul_tweak"]
12292
12864
  };
12293
12865
  };
12294
- var FRAGMENT26 = `
12866
+ var FRAGMENT27 = `
12295
12867
  fragment SignablePayloadFragment on SignablePayload {
12296
12868
  __typename
12297
12869
  signable_payload_id: id
@@ -12317,7 +12889,7 @@ query GetSignablePayload($id: ID!) {
12317
12889
  }
12318
12890
  }
12319
12891
 
12320
- ${FRAGMENT26}
12892
+ ${FRAGMENT27}
12321
12893
  `,
12322
12894
  variables: { id },
12323
12895
  constructObject: (data) => SignablePayloadFromJson(data.entity)
@@ -12343,7 +12915,7 @@ var DepositFromJson = (obj) => {
12343
12915
  numConfirmations: obj["deposit_num_confirmations"]
12344
12916
  };
12345
12917
  };
12346
- var FRAGMENT27 = `
12918
+ var FRAGMENT28 = `
12347
12919
  fragment DepositFragment on Deposit {
12348
12920
  __typename
12349
12921
  deposit_id: id
@@ -12387,7 +12959,7 @@ query GetDeposit($id: ID!) {
12387
12959
  }
12388
12960
  }
12389
12961
 
12390
- ${FRAGMENT27}
12962
+ ${FRAGMENT28}
12391
12963
  `,
12392
12964
  variables: { id },
12393
12965
  constructObject: (data) => DepositFromJson(data.entity)
@@ -12460,7 +13032,7 @@ var LightningTransactionFromJson = (obj) => {
12460
13032
  `Couldn't find a concrete type for interface LightningTransaction corresponding to the typename=${obj["__typename"]}`
12461
13033
  );
12462
13034
  };
12463
- var FRAGMENT28 = `
13035
+ var FRAGMENT29 = `
12464
13036
  fragment LightningTransactionFragment on LightningTransaction {
12465
13037
  __typename
12466
13038
  ... on IncomingPayment {
@@ -12889,7 +13461,7 @@ query GetLightningTransaction($id: ID!) {
12889
13461
  }
12890
13462
  }
12891
13463
 
12892
- ${FRAGMENT28}
13464
+ ${FRAGMENT29}
12893
13465
  `,
12894
13466
  variables: { id },
12895
13467
  constructObject: (data) => LightningTransactionFromJson(data.entity)
@@ -12926,7 +13498,7 @@ var LightsparkNodeOwnerFromJson = (obj) => {
12926
13498
  `Couldn't find a concrete type for interface LightsparkNodeOwner corresponding to the typename=${obj["__typename"]}`
12927
13499
  );
12928
13500
  };
12929
- var FRAGMENT29 = `
13501
+ var FRAGMENT30 = `
12930
13502
  fragment LightsparkNodeOwnerFragment on LightsparkNodeOwner {
12931
13503
  __typename
12932
13504
  ... on Account {
@@ -12987,7 +13559,7 @@ query GetLightsparkNodeOwner($id: ID!) {
12987
13559
  }
12988
13560
  }
12989
13561
 
12990
- ${FRAGMENT29}
13562
+ ${FRAGMENT30}
12991
13563
  `,
12992
13564
  variables: { id },
12993
13565
  constructObject: (data) => LightsparkNodeOwnerFromJson(data.entity)
@@ -13074,7 +13646,7 @@ var OnChainTransactionFromJson = (obj) => {
13074
13646
  `Couldn't find a concrete type for interface OnChainTransaction corresponding to the typename=${obj["__typename"]}`
13075
13647
  );
13076
13648
  };
13077
- var FRAGMENT30 = `
13649
+ var FRAGMENT31 = `
13078
13650
  fragment OnChainTransactionFragment on OnChainTransaction {
13079
13651
  __typename
13080
13652
  ... on ChannelClosingTransaction {
@@ -13217,7 +13789,7 @@ query GetOnChainTransaction($id: ID!) {
13217
13789
  }
13218
13790
  }
13219
13791
 
13220
- ${FRAGMENT30}
13792
+ ${FRAGMENT31}
13221
13793
  `,
13222
13794
  variables: { id },
13223
13795
  constructObject: (data) => OnChainTransactionFromJson(data.entity)
@@ -13276,7 +13848,7 @@ var RoutingTransactionFromJson = (obj) => {
13276
13848
  failureReason: !!obj["routing_transaction_failure_reason"] ? RoutingTransactionFailureReason_default[obj["routing_transaction_failure_reason"]] ?? RoutingTransactionFailureReason_default.FUTURE_VALUE : null
13277
13849
  };
13278
13850
  };
13279
- var FRAGMENT31 = `
13851
+ var FRAGMENT32 = `
13280
13852
  fragment RoutingTransactionFragment on RoutingTransaction {
13281
13853
  __typename
13282
13854
  routing_transaction_id: id
@@ -13324,7 +13896,7 @@ query GetRoutingTransaction($id: ID!) {
13324
13896
  }
13325
13897
  }
13326
13898
 
13327
- ${FRAGMENT31}
13899
+ ${FRAGMENT32}
13328
13900
  `,
13329
13901
  variables: { id },
13330
13902
  constructObject: (data) => RoutingTransactionFromJson(data.entity)
@@ -13340,7 +13912,7 @@ var SignableFromJson = (obj) => {
13340
13912
  typename: "Signable"
13341
13913
  };
13342
13914
  };
13343
- var FRAGMENT32 = `
13915
+ var FRAGMENT33 = `
13344
13916
  fragment SignableFragment on Signable {
13345
13917
  __typename
13346
13918
  signable_id: id
@@ -13358,7 +13930,7 @@ query GetSignable($id: ID!) {
13358
13930
  }
13359
13931
  }
13360
13932
 
13361
- ${FRAGMENT32}
13933
+ ${FRAGMENT33}
13362
13934
  `,
13363
13935
  variables: { id },
13364
13936
  constructObject: (data) => SignableFromJson(data.entity)
@@ -13386,9 +13958,11 @@ var TransactionType_default = TransactionType;
13386
13958
  var WebhookEventType = /* @__PURE__ */ ((WebhookEventType2) => {
13387
13959
  WebhookEventType2["FUTURE_VALUE"] = "FUTURE_VALUE";
13388
13960
  WebhookEventType2["PAYMENT_FINISHED"] = "PAYMENT_FINISHED";
13961
+ WebhookEventType2["FORCE_CLOSURE"] = "FORCE_CLOSURE";
13389
13962
  WebhookEventType2["WITHDRAWAL_FINISHED"] = "WITHDRAWAL_FINISHED";
13390
13963
  WebhookEventType2["FUNDS_RECEIVED"] = "FUNDS_RECEIVED";
13391
13964
  WebhookEventType2["NODE_STATUS"] = "NODE_STATUS";
13965
+ WebhookEventType2["UMA_INVITATION_CLAIMED"] = "UMA_INVITATION_CLAIMED";
13392
13966
  WebhookEventType2["WALLET_STATUS"] = "WALLET_STATUS";
13393
13967
  WebhookEventType2["WALLET_OUTGOING_PAYMENT_FINISHED"] = "WALLET_OUTGOING_PAYMENT_FINISHED";
13394
13968
  WebhookEventType2["WALLET_INCOMING_PAYMENT_FINISHED"] = "WALLET_INCOMING_PAYMENT_FINISHED";
@@ -13419,7 +13993,7 @@ var WithdrawalFromJson = (obj) => {
13419
13993
  numConfirmations: obj["withdrawal_num_confirmations"]
13420
13994
  };
13421
13995
  };
13422
- var FRAGMENT33 = `
13996
+ var FRAGMENT34 = `
13423
13997
  fragment WithdrawalFragment on Withdrawal {
13424
13998
  __typename
13425
13999
  withdrawal_id: id
@@ -13463,7 +14037,7 @@ query GetWithdrawal($id: ID!) {
13463
14037
  }
13464
14038
  }
13465
14039
 
13466
- ${FRAGMENT33}
14040
+ ${FRAGMENT34}
13467
14041
  `,
13468
14042
  variables: { id },
13469
14043
  constructObject: (data) => WithdrawalFromJson(data.entity)
@@ -13534,6 +14108,8 @@ var RemoteSigningWebhookHandler = class {
13534
14108
  CurrencyUnit,
13535
14109
  GraphNode,
13536
14110
  HtlcAttemptFailureCode,
14111
+ IncentivesIneligibilityReason,
14112
+ IncentivesStatus,
13537
14113
  IncomingPayment,
13538
14114
  IncomingPaymentAttemptStatus,
13539
14115
  InvoiceType,
@@ -13549,6 +14125,7 @@ var RemoteSigningWebhookHandler = class {
13549
14125
  PaymentFailureReason,
13550
14126
  PaymentRequestStatus,
13551
14127
  Permission,
14128
+ RegionCode,
13552
14129
  RemoteSigningSubEventType,
13553
14130
  RemoteSigningWebhookHandler,
13554
14131
  RiskRating,
@@ -13582,6 +14159,7 @@ var RemoteSigningWebhookHandler = class {
13582
14159
  getSignablePayloadQuery,
13583
14160
  getSignableQuery,
13584
14161
  getTransactionQuery,
14162
+ getUmaInvitationQuery,
13585
14163
  getWithdrawalQuery,
13586
14164
  isBitcoinNetwork,
13587
14165
  verifyAndParseWebhook