@lightsparkdev/lightspark-sdk 1.9.1 → 1.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @lightsparkdev/lightspark-sdk
2
2
 
3
+ ## 1.9.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 7ae2525: - Add createUmaInvitationWithPayment
8
+ - Add cancelUmaInvitation
9
+ - Remove unneeded crypto-browserify as dependency
10
+ - Updated dependencies [7ae2525]
11
+ - @lightsparkdev/core@1.4.1
12
+ - @lightsparkdev/crypto-wasm@0.1.15
13
+
14
+ ## 1.9.2
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies [5cfff96]
19
+ - @lightsparkdev/core@1.4.0
20
+ - @lightsparkdev/crypto-wasm@0.1.14
21
+
3
22
  ## 1.9.1
4
23
 
5
24
  ### Patch Changes
@@ -3479,6 +3479,30 @@ declare class LightsparkClient {
3479
3479
  * @param level The logging level to use.
3480
3480
  * */
3481
3481
  setLoggingEnabled(enabled: boolean, level?: LoggingLevel): void;
3482
+ /**
3483
+ * Creates an UMA invitation with an attached payment.
3484
+ *
3485
+ * @param inviterUma The UMA of the inviter.
3486
+ * @param amountToSend The amount and currency to send in the smallest unit of the currency (i.e. cents for USD).
3487
+ * @param expiresAt The expiration date/time (Date).
3488
+ * @returns The invitation that was created, or null if creation failed.
3489
+ */
3490
+ createUmaInvitationWithPayment(inviterUma: string, amountToSend: {
3491
+ amount: number;
3492
+ currency: {
3493
+ code: string;
3494
+ name: string;
3495
+ symbol: string;
3496
+ decimals: number;
3497
+ };
3498
+ }, expiresAt: Date): Promise<UmaInvitation | null>;
3499
+ /**
3500
+ * Cancels an UMA invitation by its invite code.
3501
+ *
3502
+ * @param invitationCode The code of the invitation to cancel.
3503
+ * @returns The cancelled invitation, or null if cancellation failed.
3504
+ */
3505
+ cancelUmaInvitation(invitationCode: string): Promise<UmaInvitation | null>;
3482
3506
  }
3483
3507
 
3484
3508
  /** Audit log actor who called the GraphQL mutation **/
@@ -3479,6 +3479,30 @@ declare class LightsparkClient {
3479
3479
  * @param level The logging level to use.
3480
3480
  * */
3481
3481
  setLoggingEnabled(enabled: boolean, level?: LoggingLevel): void;
3482
+ /**
3483
+ * Creates an UMA invitation with an attached payment.
3484
+ *
3485
+ * @param inviterUma The UMA of the inviter.
3486
+ * @param amountToSend The amount and currency to send in the smallest unit of the currency (i.e. cents for USD).
3487
+ * @param expiresAt The expiration date/time (Date).
3488
+ * @returns The invitation that was created, or null if creation failed.
3489
+ */
3490
+ createUmaInvitationWithPayment(inviterUma: string, amountToSend: {
3491
+ amount: number;
3492
+ currency: {
3493
+ code: string;
3494
+ name: string;
3495
+ symbol: string;
3496
+ decimals: number;
3497
+ };
3498
+ }, expiresAt: Date): Promise<UmaInvitation | null>;
3499
+ /**
3500
+ * Cancels an UMA invitation by its invite code.
3501
+ *
3502
+ * @param invitationCode The code of the invitation to cancel.
3503
+ * @returns The cancelled invitation, or null if cancellation failed.
3504
+ */
3505
+ cancelUmaInvitation(invitationCode: string): Promise<UmaInvitation | null>;
3482
3506
  }
3483
3507
 
3484
3508
  /** Audit log actor who called the GraphQL mutation **/
package/dist/index.cjs CHANGED
@@ -178,7 +178,7 @@ var import_core28 = require("@lightsparkdev/core");
178
178
  // package.json
179
179
  var package_default = {
180
180
  name: "@lightsparkdev/lightspark-sdk",
181
- version: "1.9.1",
181
+ version: "1.9.3",
182
182
  description: "Lightspark JS SDK",
183
183
  author: "Lightspark Inc.",
184
184
  keywords: [
@@ -247,9 +247,8 @@ var package_default = {
247
247
  },
248
248
  license: "Apache-2.0",
249
249
  dependencies: {
250
- "@lightsparkdev/core": "1.3.1",
251
- "@lightsparkdev/crypto-wasm": "0.1.13",
252
- "crypto-browserify": "^3.12.0",
250
+ "@lightsparkdev/core": "1.4.1",
251
+ "@lightsparkdev/crypto-wasm": "0.1.15",
253
252
  dayjs: "^1.11.7",
254
253
  dotenv: "^16.3.1",
255
254
  graphql: "^16.6.0",
@@ -3190,6 +3189,23 @@ ${FRAGMENT10}
3190
3189
  };
3191
3190
  };
3192
3191
 
3192
+ // src/graphql/CancelUmaInvitation.ts
3193
+ var CancelUmaInvitation = `
3194
+ mutation CancelUmaInvitation(
3195
+ $inviteCode: String!
3196
+ ) {
3197
+ cancel_uma_invitation(input: {
3198
+ invite_code: $inviteCode
3199
+ }) {
3200
+ invitation {
3201
+ ...UmaInvitationFragment
3202
+ }
3203
+ }
3204
+ }
3205
+
3206
+ ${FRAGMENT10}
3207
+ `;
3208
+
3193
3209
  // src/graphql/ClaimUmaInvitation.ts
3194
3210
  var ClaimUmaInvitation = `
3195
3211
  mutation ClaimUmaInvitation(
@@ -3738,6 +3754,29 @@ var CreateUmaInvitationWithIncentives = `
3738
3754
  ${FRAGMENT10}
3739
3755
  `;
3740
3756
 
3757
+ // src/graphql/CreateUmaInvitationWithPayment.ts
3758
+ var CreateUmaInvitationWithPayment = `
3759
+ mutation CreateUmaInvitationWithPayment(
3760
+ $inviterUma: String!
3761
+ $paymentAmount: Int!
3762
+ $paymentCurrency: UmaCurrencyInput!
3763
+ $expiresAt: DateTime!
3764
+ ) {
3765
+ create_uma_invitation_with_payment(input: {
3766
+ inviter_uma: $inviterUma
3767
+ payment_amount: $paymentAmount
3768
+ payment_currency: $paymentCurrency
3769
+ expires_at: $expiresAt
3770
+ }) {
3771
+ invitation {
3772
+ ...UmaInvitationFragment
3773
+ }
3774
+ }
3775
+ }
3776
+
3777
+ ${FRAGMENT10}
3778
+ `;
3779
+
3741
3780
  // src/graphql/CreateUmaInvoice.ts
3742
3781
  var CreateUmaInvoice = `
3743
3782
  mutation CreateUmaInvoice(
@@ -11801,6 +11840,61 @@ var LightsparkClient = class {
11801
11840
  import_core28.logger.setEnabled(enabled, level);
11802
11841
  logger.setEnabled(enabled, level);
11803
11842
  }
11843
+ /**
11844
+ * Creates an UMA invitation with an attached payment.
11845
+ *
11846
+ * @param inviterUma The UMA of the inviter.
11847
+ * @param amountToSend The amount and currency to send in the smallest unit of the currency (i.e. cents for USD).
11848
+ * @param expiresAt The expiration date/time (Date).
11849
+ * @returns The invitation that was created, or null if creation failed.
11850
+ */
11851
+ async createUmaInvitationWithPayment(inviterUma, amountToSend, expiresAt) {
11852
+ return await this.executeRawQuery({
11853
+ queryPayload: CreateUmaInvitationWithPayment,
11854
+ variables: {
11855
+ inviterUma,
11856
+ paymentAmount: amountToSend.amount,
11857
+ paymentCurrency: amountToSend.currency,
11858
+ expiresAt: expiresAt.toISOString()
11859
+ },
11860
+ constructObject: (responseJson) => {
11861
+ if (!responseJson.create_uma_invitation_with_payment?.invitation) {
11862
+ throw new import_core28.LightsparkException(
11863
+ "CreateUmaInvitationWithPaymentError",
11864
+ "Unable to create UMA invitation with payment"
11865
+ );
11866
+ }
11867
+ return UmaInvitationFromJson(
11868
+ responseJson.create_uma_invitation_with_payment.invitation
11869
+ );
11870
+ }
11871
+ });
11872
+ }
11873
+ /**
11874
+ * Cancels an UMA invitation by its invite code.
11875
+ *
11876
+ * @param invitationCode The code of the invitation to cancel.
11877
+ * @returns The cancelled invitation, or null if cancellation failed.
11878
+ */
11879
+ async cancelUmaInvitation(invitationCode) {
11880
+ return await this.executeRawQuery({
11881
+ queryPayload: CancelUmaInvitation,
11882
+ variables: {
11883
+ inviteCode: invitationCode
11884
+ },
11885
+ constructObject: (responseJson) => {
11886
+ if (!responseJson.cancel_uma_invitation?.invitation) {
11887
+ throw new import_core28.LightsparkException(
11888
+ "CancelUmaInvitationError",
11889
+ "Unable to cancel UMA invitation"
11890
+ );
11891
+ }
11892
+ return UmaInvitationFromJson(
11893
+ responseJson.cancel_uma_invitation.invitation
11894
+ );
11895
+ }
11896
+ });
11897
+ }
11804
11898
  };
11805
11899
  var client_default = LightsparkClient;
11806
11900
 
package/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { AuthProvider } from '@lightsparkdev/core';
2
- import { W as WebhookEventType, L as LightsparkClient } from './index-BxC6kyLD.cjs';
3
- export { A as Account, a as AccountToApiTokensConnection, b as AccountToChannelsConnection, c as AccountToNodesConnection, d as AccountToPaymentRequestsConnection, e as AccountToTransactionsConnection, f as AccountToWalletsConnection, g as AccountToWithdrawalRequestsConnection, h as ApiToken, j as AuditLogActor, B as Balances, l as BlockchainBalance, C as CancelInvoiceInput, m as CancelInvoiceOutput, n as Channel, o as ChannelClosingTransaction, q as ChannelFees, r as ChannelOpeningTransaction, t as ChannelSnapshot, v as ChannelStatus, w as ChannelToTransactionsConnection, x as ClaimUmaInvitationInput, y as ClaimUmaInvitationOutput, z as ClaimUmaInvitationWithIncentivesInput, D as ClaimUmaInvitationWithIncentivesOutput, E as ComplianceProvider, F as Connection, G as CreateApiTokenInput, H as CreateApiTokenOutput, I as CreateInvitationWithIncentivesInput, J as CreateInvitationWithIncentivesOutput, K as CreateInvoiceInput, M as CreateInvoiceOutput, N as CreateLnurlInvoiceInput, O as CreateNodeWalletAddressInput, P as CreateNodeWalletAddressOutput, Q as CreateOfferInput, R as CreateOfferOutput, S as CreateTestModeInvoiceInput, T as CreateTestModeInvoiceOutput, U as CreateTestModePaymentInput, V as CreateTestModePaymentoutput, X as CreateUmaInvitationInput, Y as CreateUmaInvitationOutput, Z as CreateUmaInvoiceInput, _ as CurrencyAmount, $ as CurrencyAmountInput, a0 as CurrencyUnit, a1 as DailyLiquidityForecast, a2 as DeclineToSignMessagesInput, a3 as DeclineToSignMessagesOutput, a4 as DeleteApiTokenInput, a5 as DeleteApiTokenOutput, a6 as Deposit, a8 as Entity, a9 as FailHtlcsInput, aa as FailHtlcsOutput, ab as FeeEstimate, ac as FundNodeInput, ad as FundNodeOutput, ae as GraphNode, af as Hop, ah as HtlcAttemptFailureCode, ai as IdAndSignature, aj as IncentivesIneligibilityReason, ak as IncentivesStatus, al as IncomingPayment, am as IncomingPaymentAttempt, ao as IncomingPaymentAttemptStatus, at as IncomingPaymentToAttemptsConnection, ap as IncomingPaymentsForInvoiceQueryInput, aq as IncomingPaymentsForInvoiceQueryOutput, ar as IncomingPaymentsForPaymentHashQueryInput, as as IncomingPaymentsForPaymentHashQueryOutput, au as Invoice, aw as InvoiceData, ax as InvoiceForPaymentHashInput, ay as InvoiceForPaymentHashOutput, az as InvoiceType, aA as LightningFeeEstimateForInvoiceInput, aB as LightningFeeEstimateForNodeInput, aC as LightningFeeEstimateOutput, aD as LightningPaymentDirection, aE as LightningTransaction, aG as LightsparkNode, aI as LightsparkNodeOwner, aK as LightsparkNodeStatus, aL as LightsparkNodeToChannelsConnection, aM as LightsparkNodeToDailyLiquidityForecastsConnection, aN as LightsparkNodeWithOSK, aO as LightsparkNodeWithRemoteSigning, aP as MultiSigAddressValidationParameters, aQ as Node, aS as NodeAddress, aT as NodeAddressType, aU as NodeToAddressesConnection, aV as Offer, aX as OfferData, aZ as OnChainFeeTarget, a_ as OnChainTransaction, b0 as OutgoingPayment, b1 as OutgoingPaymentAttempt, b2 as OutgoingPaymentAttemptStatus, b3 as OutgoingPaymentAttemptToHopsConnection, b4 as OutgoingPaymentForIdempotencyKeyInput, b5 as OutgoingPaymentForIdempotencyKeyOutput, ba as OutgoingPaymentToAttemptsConnection, b6 as OutgoingPaymentsForInvoiceQueryInput, b7 as OutgoingPaymentsForInvoiceQueryOutput, b8 as OutgoingPaymentsForPaymentHashQueryInput, b9 as OutgoingPaymentsForPaymentHashQueryOutput, bb as PageInfo, bc as PayInvoiceInput, bd as PayInvoiceOutput, bk as PayOfferInput, bl as PayOfferOutput, bm as PayTestModeInvoiceInput, bn as PayUmaInvoiceInput, be as PaymentDirection, bf as PaymentFailureReason, bg as PaymentRequest, bi as PaymentRequestData, bj as PaymentRequestStatus, bo as Permission, bp as PostTransactionData, bq as RegionCode, br as RegisterPaymentInput, bs as RegisterPaymentOutput, bt as ReleaseChannelPerCommitmentSecretInput, bu as ReleaseChannelPerCommitmentSecretOutput, bv as ReleasePaymentPreimageInput, bw as ReleasePaymentPreimageOutput, bx as RemoteSigningSubEventType, by as RequestInitiator, bz as RequestWithdrawalInput, bA as RequestWithdrawalOutput, bB as RichText, bC as RiskRating, bD as RoutingTransaction, bF as RoutingTransactionFailureReason, bG as ScreenNodeInput, bH as ScreenNodeOutput, bI as Secret, bJ as SendPaymentInput, bK as SendPaymentOutput, bL as SetInvoicePaymentHashInput, bM as SetInvoicePaymentHashOutput, bS as SignInvoiceInput, bT as SignInvoiceOutput, bU as SignMessagesInput, bV as SignMessagesOutput, bN as Signable, bP as SignablePayload, bR as SignablePayloadStatus, bW as SingleNodeDashboard, bX as Transaction, bZ as TransactionFailures, b_ as TransactionStatus, b$ as TransactionType, c0 as TransactionUpdate, c1 as UmaInvitation, c3 as UpdateChannelPerCommitmentPointInput, c4 as UpdateChannelPerCommitmentPointOutput, c5 as UpdateNodeSharedSecretInput, c6 as UpdateNodeSharedSecretOutput, c7 as Wallet, c8 as WalletStatus, c9 as WalletToPaymentRequestsConnection, ca as WalletToTransactionsConnection, cb as WalletToWithdrawalRequestsConnection, cc as Withdrawal, ce as WithdrawalFeeEstimateInput, cf as WithdrawalFeeEstimateOutput, cg as WithdrawalMode, ch as WithdrawalRequest, ci as WithdrawalRequestStatus, cj as WithdrawalRequestToChannelClosingTransactionsConnection, ck as WithdrawalRequestToChannelOpeningTransactionsConnection, cl as WithdrawalRequestToWithdrawalsConnection, i as getApiTokenQuery, k as getAuditLogActorQuery, p as getChannelClosingTransactionQuery, s as getChannelOpeningTransactionQuery, u as getChannelSnapshotQuery, a7 as getDepositQuery, ag as getHopQuery, an as getIncomingPaymentAttemptQuery, av as getInvoiceQuery, aF as getLightningTransactionQuery, aJ as getLightsparkNodeOwnerQuery, aH as getLightsparkNodeQuery, aR as getNodeQuery, aY as getOfferDataQuery, aW as getOfferQuery, a$ as getOnChainTransactionQuery, bh as getPaymentRequestQuery, bE as getRoutingTransactionQuery, bQ as getSignablePayloadQuery, bO as getSignableQuery, bY as getTransactionQuery, c2 as getUmaInvitationQuery, cd as getWithdrawalQuery } from './index-BxC6kyLD.cjs';
2
+ import { W as WebhookEventType, L as LightsparkClient } from './index-C6o63fFW.cjs';
3
+ export { A as Account, a as AccountToApiTokensConnection, b as AccountToChannelsConnection, c as AccountToNodesConnection, d as AccountToPaymentRequestsConnection, e as AccountToTransactionsConnection, f as AccountToWalletsConnection, g as AccountToWithdrawalRequestsConnection, h as ApiToken, j as AuditLogActor, B as Balances, l as BlockchainBalance, C as CancelInvoiceInput, m as CancelInvoiceOutput, n as Channel, o as ChannelClosingTransaction, q as ChannelFees, r as ChannelOpeningTransaction, t as ChannelSnapshot, v as ChannelStatus, w as ChannelToTransactionsConnection, x as ClaimUmaInvitationInput, y as ClaimUmaInvitationOutput, z as ClaimUmaInvitationWithIncentivesInput, D as ClaimUmaInvitationWithIncentivesOutput, E as ComplianceProvider, F as Connection, G as CreateApiTokenInput, H as CreateApiTokenOutput, I as CreateInvitationWithIncentivesInput, J as CreateInvitationWithIncentivesOutput, K as CreateInvoiceInput, M as CreateInvoiceOutput, N as CreateLnurlInvoiceInput, O as CreateNodeWalletAddressInput, P as CreateNodeWalletAddressOutput, Q as CreateOfferInput, R as CreateOfferOutput, S as CreateTestModeInvoiceInput, T as CreateTestModeInvoiceOutput, U as CreateTestModePaymentInput, V as CreateTestModePaymentoutput, X as CreateUmaInvitationInput, Y as CreateUmaInvitationOutput, Z as CreateUmaInvoiceInput, _ as CurrencyAmount, $ as CurrencyAmountInput, a0 as CurrencyUnit, a1 as DailyLiquidityForecast, a2 as DeclineToSignMessagesInput, a3 as DeclineToSignMessagesOutput, a4 as DeleteApiTokenInput, a5 as DeleteApiTokenOutput, a6 as Deposit, a8 as Entity, a9 as FailHtlcsInput, aa as FailHtlcsOutput, ab as FeeEstimate, ac as FundNodeInput, ad as FundNodeOutput, ae as GraphNode, af as Hop, ah as HtlcAttemptFailureCode, ai as IdAndSignature, aj as IncentivesIneligibilityReason, ak as IncentivesStatus, al as IncomingPayment, am as IncomingPaymentAttempt, ao as IncomingPaymentAttemptStatus, at as IncomingPaymentToAttemptsConnection, ap as IncomingPaymentsForInvoiceQueryInput, aq as IncomingPaymentsForInvoiceQueryOutput, ar as IncomingPaymentsForPaymentHashQueryInput, as as IncomingPaymentsForPaymentHashQueryOutput, au as Invoice, aw as InvoiceData, ax as InvoiceForPaymentHashInput, ay as InvoiceForPaymentHashOutput, az as InvoiceType, aA as LightningFeeEstimateForInvoiceInput, aB as LightningFeeEstimateForNodeInput, aC as LightningFeeEstimateOutput, aD as LightningPaymentDirection, aE as LightningTransaction, aG as LightsparkNode, aI as LightsparkNodeOwner, aK as LightsparkNodeStatus, aL as LightsparkNodeToChannelsConnection, aM as LightsparkNodeToDailyLiquidityForecastsConnection, aN as LightsparkNodeWithOSK, aO as LightsparkNodeWithRemoteSigning, aP as MultiSigAddressValidationParameters, aQ as Node, aS as NodeAddress, aT as NodeAddressType, aU as NodeToAddressesConnection, aV as Offer, aX as OfferData, aZ as OnChainFeeTarget, a_ as OnChainTransaction, b0 as OutgoingPayment, b1 as OutgoingPaymentAttempt, b2 as OutgoingPaymentAttemptStatus, b3 as OutgoingPaymentAttemptToHopsConnection, b4 as OutgoingPaymentForIdempotencyKeyInput, b5 as OutgoingPaymentForIdempotencyKeyOutput, ba as OutgoingPaymentToAttemptsConnection, b6 as OutgoingPaymentsForInvoiceQueryInput, b7 as OutgoingPaymentsForInvoiceQueryOutput, b8 as OutgoingPaymentsForPaymentHashQueryInput, b9 as OutgoingPaymentsForPaymentHashQueryOutput, bb as PageInfo, bc as PayInvoiceInput, bd as PayInvoiceOutput, bk as PayOfferInput, bl as PayOfferOutput, bm as PayTestModeInvoiceInput, bn as PayUmaInvoiceInput, be as PaymentDirection, bf as PaymentFailureReason, bg as PaymentRequest, bi as PaymentRequestData, bj as PaymentRequestStatus, bo as Permission, bp as PostTransactionData, bq as RegionCode, br as RegisterPaymentInput, bs as RegisterPaymentOutput, bt as ReleaseChannelPerCommitmentSecretInput, bu as ReleaseChannelPerCommitmentSecretOutput, bv as ReleasePaymentPreimageInput, bw as ReleasePaymentPreimageOutput, bx as RemoteSigningSubEventType, by as RequestInitiator, bz as RequestWithdrawalInput, bA as RequestWithdrawalOutput, bB as RichText, bC as RiskRating, bD as RoutingTransaction, bF as RoutingTransactionFailureReason, bG as ScreenNodeInput, bH as ScreenNodeOutput, bI as Secret, bJ as SendPaymentInput, bK as SendPaymentOutput, bL as SetInvoicePaymentHashInput, bM as SetInvoicePaymentHashOutput, bS as SignInvoiceInput, bT as SignInvoiceOutput, bU as SignMessagesInput, bV as SignMessagesOutput, bN as Signable, bP as SignablePayload, bR as SignablePayloadStatus, bW as SingleNodeDashboard, bX as Transaction, bZ as TransactionFailures, b_ as TransactionStatus, b$ as TransactionType, c0 as TransactionUpdate, c1 as UmaInvitation, c3 as UpdateChannelPerCommitmentPointInput, c4 as UpdateChannelPerCommitmentPointOutput, c5 as UpdateNodeSharedSecretInput, c6 as UpdateNodeSharedSecretOutput, c7 as Wallet, c8 as WalletStatus, c9 as WalletToPaymentRequestsConnection, ca as WalletToTransactionsConnection, cb as WalletToWithdrawalRequestsConnection, cc as Withdrawal, ce as WithdrawalFeeEstimateInput, cf as WithdrawalFeeEstimateOutput, cg as WithdrawalMode, ch as WithdrawalRequest, ci as WithdrawalRequestStatus, cj as WithdrawalRequestToChannelClosingTransactionsConnection, ck as WithdrawalRequestToChannelOpeningTransactionsConnection, cl as WithdrawalRequestToWithdrawalsConnection, i as getApiTokenQuery, k as getAuditLogActorQuery, p as getChannelClosingTransactionQuery, s as getChannelOpeningTransactionQuery, u as getChannelSnapshotQuery, a7 as getDepositQuery, ag as getHopQuery, an as getIncomingPaymentAttemptQuery, av as getInvoiceQuery, aF as getLightningTransactionQuery, aJ as getLightsparkNodeOwnerQuery, aH as getLightsparkNodeQuery, aR as getNodeQuery, aY as getOfferDataQuery, aW as getOfferQuery, a$ as getOnChainTransactionQuery, bh as getPaymentRequestQuery, bE as getRoutingTransactionQuery, bQ as getSignablePayloadQuery, bO as getSignableQuery, bY as getTransactionQuery, c2 as getUmaInvitationQuery, cd as getWithdrawalQuery } from './index-C6o63fFW.cjs';
4
4
  import { B as BitcoinNetwork } from './BitcoinNetwork-CIfB1c0X.cjs';
5
5
  import 'zen-observable';
6
6
 
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { AuthProvider } from '@lightsparkdev/core';
2
- import { W as WebhookEventType, L as LightsparkClient } from './index-B4pktcM-.js';
3
- export { A as Account, a as AccountToApiTokensConnection, b as AccountToChannelsConnection, c as AccountToNodesConnection, d as AccountToPaymentRequestsConnection, e as AccountToTransactionsConnection, f as AccountToWalletsConnection, g as AccountToWithdrawalRequestsConnection, h as ApiToken, j as AuditLogActor, B as Balances, l as BlockchainBalance, C as CancelInvoiceInput, m as CancelInvoiceOutput, n as Channel, o as ChannelClosingTransaction, q as ChannelFees, r as ChannelOpeningTransaction, t as ChannelSnapshot, v as ChannelStatus, w as ChannelToTransactionsConnection, x as ClaimUmaInvitationInput, y as ClaimUmaInvitationOutput, z as ClaimUmaInvitationWithIncentivesInput, D as ClaimUmaInvitationWithIncentivesOutput, E as ComplianceProvider, F as Connection, G as CreateApiTokenInput, H as CreateApiTokenOutput, I as CreateInvitationWithIncentivesInput, J as CreateInvitationWithIncentivesOutput, K as CreateInvoiceInput, M as CreateInvoiceOutput, N as CreateLnurlInvoiceInput, O as CreateNodeWalletAddressInput, P as CreateNodeWalletAddressOutput, Q as CreateOfferInput, R as CreateOfferOutput, S as CreateTestModeInvoiceInput, T as CreateTestModeInvoiceOutput, U as CreateTestModePaymentInput, V as CreateTestModePaymentoutput, X as CreateUmaInvitationInput, Y as CreateUmaInvitationOutput, Z as CreateUmaInvoiceInput, _ as CurrencyAmount, $ as CurrencyAmountInput, a0 as CurrencyUnit, a1 as DailyLiquidityForecast, a2 as DeclineToSignMessagesInput, a3 as DeclineToSignMessagesOutput, a4 as DeleteApiTokenInput, a5 as DeleteApiTokenOutput, a6 as Deposit, a8 as Entity, a9 as FailHtlcsInput, aa as FailHtlcsOutput, ab as FeeEstimate, ac as FundNodeInput, ad as FundNodeOutput, ae as GraphNode, af as Hop, ah as HtlcAttemptFailureCode, ai as IdAndSignature, aj as IncentivesIneligibilityReason, ak as IncentivesStatus, al as IncomingPayment, am as IncomingPaymentAttempt, ao as IncomingPaymentAttemptStatus, at as IncomingPaymentToAttemptsConnection, ap as IncomingPaymentsForInvoiceQueryInput, aq as IncomingPaymentsForInvoiceQueryOutput, ar as IncomingPaymentsForPaymentHashQueryInput, as as IncomingPaymentsForPaymentHashQueryOutput, au as Invoice, aw as InvoiceData, ax as InvoiceForPaymentHashInput, ay as InvoiceForPaymentHashOutput, az as InvoiceType, aA as LightningFeeEstimateForInvoiceInput, aB as LightningFeeEstimateForNodeInput, aC as LightningFeeEstimateOutput, aD as LightningPaymentDirection, aE as LightningTransaction, aG as LightsparkNode, aI as LightsparkNodeOwner, aK as LightsparkNodeStatus, aL as LightsparkNodeToChannelsConnection, aM as LightsparkNodeToDailyLiquidityForecastsConnection, aN as LightsparkNodeWithOSK, aO as LightsparkNodeWithRemoteSigning, aP as MultiSigAddressValidationParameters, aQ as Node, aS as NodeAddress, aT as NodeAddressType, aU as NodeToAddressesConnection, aV as Offer, aX as OfferData, aZ as OnChainFeeTarget, a_ as OnChainTransaction, b0 as OutgoingPayment, b1 as OutgoingPaymentAttempt, b2 as OutgoingPaymentAttemptStatus, b3 as OutgoingPaymentAttemptToHopsConnection, b4 as OutgoingPaymentForIdempotencyKeyInput, b5 as OutgoingPaymentForIdempotencyKeyOutput, ba as OutgoingPaymentToAttemptsConnection, b6 as OutgoingPaymentsForInvoiceQueryInput, b7 as OutgoingPaymentsForInvoiceQueryOutput, b8 as OutgoingPaymentsForPaymentHashQueryInput, b9 as OutgoingPaymentsForPaymentHashQueryOutput, bb as PageInfo, bc as PayInvoiceInput, bd as PayInvoiceOutput, bk as PayOfferInput, bl as PayOfferOutput, bm as PayTestModeInvoiceInput, bn as PayUmaInvoiceInput, be as PaymentDirection, bf as PaymentFailureReason, bg as PaymentRequest, bi as PaymentRequestData, bj as PaymentRequestStatus, bo as Permission, bp as PostTransactionData, bq as RegionCode, br as RegisterPaymentInput, bs as RegisterPaymentOutput, bt as ReleaseChannelPerCommitmentSecretInput, bu as ReleaseChannelPerCommitmentSecretOutput, bv as ReleasePaymentPreimageInput, bw as ReleasePaymentPreimageOutput, bx as RemoteSigningSubEventType, by as RequestInitiator, bz as RequestWithdrawalInput, bA as RequestWithdrawalOutput, bB as RichText, bC as RiskRating, bD as RoutingTransaction, bF as RoutingTransactionFailureReason, bG as ScreenNodeInput, bH as ScreenNodeOutput, bI as Secret, bJ as SendPaymentInput, bK as SendPaymentOutput, bL as SetInvoicePaymentHashInput, bM as SetInvoicePaymentHashOutput, bS as SignInvoiceInput, bT as SignInvoiceOutput, bU as SignMessagesInput, bV as SignMessagesOutput, bN as Signable, bP as SignablePayload, bR as SignablePayloadStatus, bW as SingleNodeDashboard, bX as Transaction, bZ as TransactionFailures, b_ as TransactionStatus, b$ as TransactionType, c0 as TransactionUpdate, c1 as UmaInvitation, c3 as UpdateChannelPerCommitmentPointInput, c4 as UpdateChannelPerCommitmentPointOutput, c5 as UpdateNodeSharedSecretInput, c6 as UpdateNodeSharedSecretOutput, c7 as Wallet, c8 as WalletStatus, c9 as WalletToPaymentRequestsConnection, ca as WalletToTransactionsConnection, cb as WalletToWithdrawalRequestsConnection, cc as Withdrawal, ce as WithdrawalFeeEstimateInput, cf as WithdrawalFeeEstimateOutput, cg as WithdrawalMode, ch as WithdrawalRequest, ci as WithdrawalRequestStatus, cj as WithdrawalRequestToChannelClosingTransactionsConnection, ck as WithdrawalRequestToChannelOpeningTransactionsConnection, cl as WithdrawalRequestToWithdrawalsConnection, i as getApiTokenQuery, k as getAuditLogActorQuery, p as getChannelClosingTransactionQuery, s as getChannelOpeningTransactionQuery, u as getChannelSnapshotQuery, a7 as getDepositQuery, ag as getHopQuery, an as getIncomingPaymentAttemptQuery, av as getInvoiceQuery, aF as getLightningTransactionQuery, aJ as getLightsparkNodeOwnerQuery, aH as getLightsparkNodeQuery, aR as getNodeQuery, aY as getOfferDataQuery, aW as getOfferQuery, a$ as getOnChainTransactionQuery, bh as getPaymentRequestQuery, bE as getRoutingTransactionQuery, bQ as getSignablePayloadQuery, bO as getSignableQuery, bY as getTransactionQuery, c2 as getUmaInvitationQuery, cd as getWithdrawalQuery } from './index-B4pktcM-.js';
2
+ import { W as WebhookEventType, L as LightsparkClient } from './index-CzCane7X.js';
3
+ export { A as Account, a as AccountToApiTokensConnection, b as AccountToChannelsConnection, c as AccountToNodesConnection, d as AccountToPaymentRequestsConnection, e as AccountToTransactionsConnection, f as AccountToWalletsConnection, g as AccountToWithdrawalRequestsConnection, h as ApiToken, j as AuditLogActor, B as Balances, l as BlockchainBalance, C as CancelInvoiceInput, m as CancelInvoiceOutput, n as Channel, o as ChannelClosingTransaction, q as ChannelFees, r as ChannelOpeningTransaction, t as ChannelSnapshot, v as ChannelStatus, w as ChannelToTransactionsConnection, x as ClaimUmaInvitationInput, y as ClaimUmaInvitationOutput, z as ClaimUmaInvitationWithIncentivesInput, D as ClaimUmaInvitationWithIncentivesOutput, E as ComplianceProvider, F as Connection, G as CreateApiTokenInput, H as CreateApiTokenOutput, I as CreateInvitationWithIncentivesInput, J as CreateInvitationWithIncentivesOutput, K as CreateInvoiceInput, M as CreateInvoiceOutput, N as CreateLnurlInvoiceInput, O as CreateNodeWalletAddressInput, P as CreateNodeWalletAddressOutput, Q as CreateOfferInput, R as CreateOfferOutput, S as CreateTestModeInvoiceInput, T as CreateTestModeInvoiceOutput, U as CreateTestModePaymentInput, V as CreateTestModePaymentoutput, X as CreateUmaInvitationInput, Y as CreateUmaInvitationOutput, Z as CreateUmaInvoiceInput, _ as CurrencyAmount, $ as CurrencyAmountInput, a0 as CurrencyUnit, a1 as DailyLiquidityForecast, a2 as DeclineToSignMessagesInput, a3 as DeclineToSignMessagesOutput, a4 as DeleteApiTokenInput, a5 as DeleteApiTokenOutput, a6 as Deposit, a8 as Entity, a9 as FailHtlcsInput, aa as FailHtlcsOutput, ab as FeeEstimate, ac as FundNodeInput, ad as FundNodeOutput, ae as GraphNode, af as Hop, ah as HtlcAttemptFailureCode, ai as IdAndSignature, aj as IncentivesIneligibilityReason, ak as IncentivesStatus, al as IncomingPayment, am as IncomingPaymentAttempt, ao as IncomingPaymentAttemptStatus, at as IncomingPaymentToAttemptsConnection, ap as IncomingPaymentsForInvoiceQueryInput, aq as IncomingPaymentsForInvoiceQueryOutput, ar as IncomingPaymentsForPaymentHashQueryInput, as as IncomingPaymentsForPaymentHashQueryOutput, au as Invoice, aw as InvoiceData, ax as InvoiceForPaymentHashInput, ay as InvoiceForPaymentHashOutput, az as InvoiceType, aA as LightningFeeEstimateForInvoiceInput, aB as LightningFeeEstimateForNodeInput, aC as LightningFeeEstimateOutput, aD as LightningPaymentDirection, aE as LightningTransaction, aG as LightsparkNode, aI as LightsparkNodeOwner, aK as LightsparkNodeStatus, aL as LightsparkNodeToChannelsConnection, aM as LightsparkNodeToDailyLiquidityForecastsConnection, aN as LightsparkNodeWithOSK, aO as LightsparkNodeWithRemoteSigning, aP as MultiSigAddressValidationParameters, aQ as Node, aS as NodeAddress, aT as NodeAddressType, aU as NodeToAddressesConnection, aV as Offer, aX as OfferData, aZ as OnChainFeeTarget, a_ as OnChainTransaction, b0 as OutgoingPayment, b1 as OutgoingPaymentAttempt, b2 as OutgoingPaymentAttemptStatus, b3 as OutgoingPaymentAttemptToHopsConnection, b4 as OutgoingPaymentForIdempotencyKeyInput, b5 as OutgoingPaymentForIdempotencyKeyOutput, ba as OutgoingPaymentToAttemptsConnection, b6 as OutgoingPaymentsForInvoiceQueryInput, b7 as OutgoingPaymentsForInvoiceQueryOutput, b8 as OutgoingPaymentsForPaymentHashQueryInput, b9 as OutgoingPaymentsForPaymentHashQueryOutput, bb as PageInfo, bc as PayInvoiceInput, bd as PayInvoiceOutput, bk as PayOfferInput, bl as PayOfferOutput, bm as PayTestModeInvoiceInput, bn as PayUmaInvoiceInput, be as PaymentDirection, bf as PaymentFailureReason, bg as PaymentRequest, bi as PaymentRequestData, bj as PaymentRequestStatus, bo as Permission, bp as PostTransactionData, bq as RegionCode, br as RegisterPaymentInput, bs as RegisterPaymentOutput, bt as ReleaseChannelPerCommitmentSecretInput, bu as ReleaseChannelPerCommitmentSecretOutput, bv as ReleasePaymentPreimageInput, bw as ReleasePaymentPreimageOutput, bx as RemoteSigningSubEventType, by as RequestInitiator, bz as RequestWithdrawalInput, bA as RequestWithdrawalOutput, bB as RichText, bC as RiskRating, bD as RoutingTransaction, bF as RoutingTransactionFailureReason, bG as ScreenNodeInput, bH as ScreenNodeOutput, bI as Secret, bJ as SendPaymentInput, bK as SendPaymentOutput, bL as SetInvoicePaymentHashInput, bM as SetInvoicePaymentHashOutput, bS as SignInvoiceInput, bT as SignInvoiceOutput, bU as SignMessagesInput, bV as SignMessagesOutput, bN as Signable, bP as SignablePayload, bR as SignablePayloadStatus, bW as SingleNodeDashboard, bX as Transaction, bZ as TransactionFailures, b_ as TransactionStatus, b$ as TransactionType, c0 as TransactionUpdate, c1 as UmaInvitation, c3 as UpdateChannelPerCommitmentPointInput, c4 as UpdateChannelPerCommitmentPointOutput, c5 as UpdateNodeSharedSecretInput, c6 as UpdateNodeSharedSecretOutput, c7 as Wallet, c8 as WalletStatus, c9 as WalletToPaymentRequestsConnection, ca as WalletToTransactionsConnection, cb as WalletToWithdrawalRequestsConnection, cc as Withdrawal, ce as WithdrawalFeeEstimateInput, cf as WithdrawalFeeEstimateOutput, cg as WithdrawalMode, ch as WithdrawalRequest, ci as WithdrawalRequestStatus, cj as WithdrawalRequestToChannelClosingTransactionsConnection, ck as WithdrawalRequestToChannelOpeningTransactionsConnection, cl as WithdrawalRequestToWithdrawalsConnection, i as getApiTokenQuery, k as getAuditLogActorQuery, p as getChannelClosingTransactionQuery, s as getChannelOpeningTransactionQuery, u as getChannelSnapshotQuery, a7 as getDepositQuery, ag as getHopQuery, an as getIncomingPaymentAttemptQuery, av as getInvoiceQuery, aF as getLightningTransactionQuery, aJ as getLightsparkNodeOwnerQuery, aH as getLightsparkNodeQuery, aR as getNodeQuery, aY as getOfferDataQuery, aW as getOfferQuery, a$ as getOnChainTransactionQuery, bh as getPaymentRequestQuery, bE as getRoutingTransactionQuery, bQ as getSignablePayloadQuery, bO as getSignableQuery, bY as getTransactionQuery, c2 as getUmaInvitationQuery, cd as getWithdrawalQuery } from './index-CzCane7X.js';
4
4
  import { B as BitcoinNetwork } from './BitcoinNetwork-CIfB1c0X.js';
5
5
  import 'zen-observable';
6
6
 
package/dist/index.js CHANGED
@@ -153,7 +153,7 @@ import {
153
153
  // package.json
154
154
  var package_default = {
155
155
  name: "@lightsparkdev/lightspark-sdk",
156
- version: "1.9.1",
156
+ version: "1.9.3",
157
157
  description: "Lightspark JS SDK",
158
158
  author: "Lightspark Inc.",
159
159
  keywords: [
@@ -222,9 +222,8 @@ var package_default = {
222
222
  },
223
223
  license: "Apache-2.0",
224
224
  dependencies: {
225
- "@lightsparkdev/core": "1.3.1",
226
- "@lightsparkdev/crypto-wasm": "0.1.13",
227
- "crypto-browserify": "^3.12.0",
225
+ "@lightsparkdev/core": "1.4.1",
226
+ "@lightsparkdev/crypto-wasm": "0.1.15",
228
227
  dayjs: "^1.11.7",
229
228
  dotenv: "^16.3.1",
230
229
  graphql: "^16.6.0",
@@ -469,6 +468,23 @@ var CancelInvoice = `
469
468
  ${FRAGMENT4}
470
469
  `;
471
470
 
471
+ // src/graphql/CancelUmaInvitation.ts
472
+ var CancelUmaInvitation = `
473
+ mutation CancelUmaInvitation(
474
+ $inviteCode: String!
475
+ ) {
476
+ cancel_uma_invitation(input: {
477
+ invite_code: $inviteCode
478
+ }) {
479
+ invitation {
480
+ ...UmaInvitationFragment
481
+ }
482
+ }
483
+ }
484
+
485
+ ${FRAGMENT5}
486
+ `;
487
+
472
488
  // src/graphql/ClaimUmaInvitation.ts
473
489
  var ClaimUmaInvitation = `
474
490
  mutation ClaimUmaInvitation(
@@ -678,6 +694,29 @@ var CreateUmaInvitationWithIncentives = `
678
694
  ${FRAGMENT5}
679
695
  `;
680
696
 
697
+ // src/graphql/CreateUmaInvitationWithPayment.ts
698
+ var CreateUmaInvitationWithPayment = `
699
+ mutation CreateUmaInvitationWithPayment(
700
+ $inviterUma: String!
701
+ $paymentAmount: Int!
702
+ $paymentCurrency: UmaCurrencyInput!
703
+ $expiresAt: DateTime!
704
+ ) {
705
+ create_uma_invitation_with_payment(input: {
706
+ inviter_uma: $inviterUma
707
+ payment_amount: $paymentAmount
708
+ payment_currency: $paymentCurrency
709
+ expires_at: $expiresAt
710
+ }) {
711
+ invitation {
712
+ ...UmaInvitationFragment
713
+ }
714
+ }
715
+ }
716
+
717
+ ${FRAGMENT5}
718
+ `;
719
+
681
720
  // src/graphql/CreateUmaInvoice.ts
682
721
  var CreateUmaInvoice = `
683
722
  mutation CreateUmaInvoice(
@@ -2614,6 +2653,61 @@ var LightsparkClient = class {
2614
2653
  coreLogger.setEnabled(enabled, level);
2615
2654
  logger.setEnabled(enabled, level);
2616
2655
  }
2656
+ /**
2657
+ * Creates an UMA invitation with an attached payment.
2658
+ *
2659
+ * @param inviterUma The UMA of the inviter.
2660
+ * @param amountToSend The amount and currency to send in the smallest unit of the currency (i.e. cents for USD).
2661
+ * @param expiresAt The expiration date/time (Date).
2662
+ * @returns The invitation that was created, or null if creation failed.
2663
+ */
2664
+ async createUmaInvitationWithPayment(inviterUma, amountToSend, expiresAt) {
2665
+ return await this.executeRawQuery({
2666
+ queryPayload: CreateUmaInvitationWithPayment,
2667
+ variables: {
2668
+ inviterUma,
2669
+ paymentAmount: amountToSend.amount,
2670
+ paymentCurrency: amountToSend.currency,
2671
+ expiresAt: expiresAt.toISOString()
2672
+ },
2673
+ constructObject: (responseJson) => {
2674
+ if (!responseJson.create_uma_invitation_with_payment?.invitation) {
2675
+ throw new LightsparkException(
2676
+ "CreateUmaInvitationWithPaymentError",
2677
+ "Unable to create UMA invitation with payment"
2678
+ );
2679
+ }
2680
+ return UmaInvitationFromJson(
2681
+ responseJson.create_uma_invitation_with_payment.invitation
2682
+ );
2683
+ }
2684
+ });
2685
+ }
2686
+ /**
2687
+ * Cancels an UMA invitation by its invite code.
2688
+ *
2689
+ * @param invitationCode The code of the invitation to cancel.
2690
+ * @returns The cancelled invitation, or null if cancellation failed.
2691
+ */
2692
+ async cancelUmaInvitation(invitationCode) {
2693
+ return await this.executeRawQuery({
2694
+ queryPayload: CancelUmaInvitation,
2695
+ variables: {
2696
+ inviteCode: invitationCode
2697
+ },
2698
+ constructObject: (responseJson) => {
2699
+ if (!responseJson.cancel_uma_invitation?.invitation) {
2700
+ throw new LightsparkException(
2701
+ "CancelUmaInvitationError",
2702
+ "Unable to cancel UMA invitation"
2703
+ );
2704
+ }
2705
+ return UmaInvitationFromJson(
2706
+ responseJson.cancel_uma_invitation.invitation
2707
+ );
2708
+ }
2709
+ });
2710
+ }
2617
2711
  };
2618
2712
  var client_default = LightsparkClient;
2619
2713
 
@@ -1,4 +1,4 @@
1
- export { A as Account, a as AccountToApiTokensConnection, b as AccountToChannelsConnection, c as AccountToNodesConnection, d as AccountToPaymentRequestsConnection, e as AccountToTransactionsConnection, f as AccountToWalletsConnection, g as AccountToWithdrawalRequestsConnection, h as ApiToken, j as AuditLogActor, B as Balances, l as BlockchainBalance, C as CancelInvoiceInput, m as CancelInvoiceOutput, n as Channel, o as ChannelClosingTransaction, q as ChannelFees, r as ChannelOpeningTransaction, t as ChannelSnapshot, v as ChannelStatus, w as ChannelToTransactionsConnection, x as ClaimUmaInvitationInput, y as ClaimUmaInvitationOutput, z as ClaimUmaInvitationWithIncentivesInput, D as ClaimUmaInvitationWithIncentivesOutput, E as ComplianceProvider, F as Connection, G as CreateApiTokenInput, H as CreateApiTokenOutput, I as CreateInvitationWithIncentivesInput, J as CreateInvitationWithIncentivesOutput, K as CreateInvoiceInput, M as CreateInvoiceOutput, N as CreateLnurlInvoiceInput, O as CreateNodeWalletAddressInput, P as CreateNodeWalletAddressOutput, Q as CreateOfferInput, R as CreateOfferOutput, S as CreateTestModeInvoiceInput, T as CreateTestModeInvoiceOutput, U as CreateTestModePaymentInput, V as CreateTestModePaymentoutput, X as CreateUmaInvitationInput, Y as CreateUmaInvitationOutput, Z as CreateUmaInvoiceInput, _ as CurrencyAmount, $ as CurrencyAmountInput, a0 as CurrencyUnit, a1 as DailyLiquidityForecast, a2 as DeclineToSignMessagesInput, a3 as DeclineToSignMessagesOutput, a4 as DeleteApiTokenInput, a5 as DeleteApiTokenOutput, a6 as Deposit, a8 as Entity, a9 as FailHtlcsInput, aa as FailHtlcsOutput, ab as FeeEstimate, ac as FundNodeInput, ad as FundNodeOutput, ae as GraphNode, af as Hop, ah as HtlcAttemptFailureCode, ai as IdAndSignature, aj as IncentivesIneligibilityReason, ak as IncentivesStatus, al as IncomingPayment, am as IncomingPaymentAttempt, ao as IncomingPaymentAttemptStatus, at as IncomingPaymentToAttemptsConnection, ap as IncomingPaymentsForInvoiceQueryInput, aq as IncomingPaymentsForInvoiceQueryOutput, ar as IncomingPaymentsForPaymentHashQueryInput, as as IncomingPaymentsForPaymentHashQueryOutput, au as Invoice, aw as InvoiceData, ax as InvoiceForPaymentHashInput, ay as InvoiceForPaymentHashOutput, az as InvoiceType, aA as LightningFeeEstimateForInvoiceInput, aB as LightningFeeEstimateForNodeInput, aC as LightningFeeEstimateOutput, aD as LightningPaymentDirection, aE as LightningTransaction, aG as LightsparkNode, aI as LightsparkNodeOwner, aK as LightsparkNodeStatus, aL as LightsparkNodeToChannelsConnection, aM as LightsparkNodeToDailyLiquidityForecastsConnection, aN as LightsparkNodeWithOSK, aO as LightsparkNodeWithRemoteSigning, aP as MultiSigAddressValidationParameters, aQ as Node, aS as NodeAddress, aT as NodeAddressType, aU as NodeToAddressesConnection, aV as Offer, aX as OfferData, aZ as OnChainFeeTarget, a_ as OnChainTransaction, b0 as OutgoingPayment, b1 as OutgoingPaymentAttempt, b2 as OutgoingPaymentAttemptStatus, b3 as OutgoingPaymentAttemptToHopsConnection, b4 as OutgoingPaymentForIdempotencyKeyInput, b5 as OutgoingPaymentForIdempotencyKeyOutput, ba as OutgoingPaymentToAttemptsConnection, b6 as OutgoingPaymentsForInvoiceQueryInput, b7 as OutgoingPaymentsForInvoiceQueryOutput, b8 as OutgoingPaymentsForPaymentHashQueryInput, b9 as OutgoingPaymentsForPaymentHashQueryOutput, bb as PageInfo, bc as PayInvoiceInput, bd as PayInvoiceOutput, bk as PayOfferInput, bl as PayOfferOutput, bm as PayTestModeInvoiceInput, bn as PayUmaInvoiceInput, be as PaymentDirection, bf as PaymentFailureReason, bg as PaymentRequest, bi as PaymentRequestData, bj as PaymentRequestStatus, bo as Permission, bp as PostTransactionData, bq as RegionCode, br as RegisterPaymentInput, bs as RegisterPaymentOutput, bt as ReleaseChannelPerCommitmentSecretInput, bu as ReleaseChannelPerCommitmentSecretOutput, bv as ReleasePaymentPreimageInput, bw as ReleasePaymentPreimageOutput, bx as RemoteSigningSubEventType, by as RequestInitiator, bz as RequestWithdrawalInput, bA as RequestWithdrawalOutput, bB as RichText, bC as RiskRating, bD as RoutingTransaction, bF as RoutingTransactionFailureReason, bG as ScreenNodeInput, bH as ScreenNodeOutput, bI as Secret, bJ as SendPaymentInput, bK as SendPaymentOutput, bL as SetInvoicePaymentHashInput, bM as SetInvoicePaymentHashOutput, bS as SignInvoiceInput, bT as SignInvoiceOutput, bU as SignMessagesInput, bV as SignMessagesOutput, bN as Signable, bP as SignablePayload, bR as SignablePayloadStatus, bW as SingleNodeDashboard, bX as Transaction, bZ as TransactionFailures, b_ as TransactionStatus, b$ as TransactionType, c0 as TransactionUpdate, c1 as UmaInvitation, c3 as UpdateChannelPerCommitmentPointInput, c4 as UpdateChannelPerCommitmentPointOutput, c5 as UpdateNodeSharedSecretInput, c6 as UpdateNodeSharedSecretOutput, c7 as Wallet, c8 as WalletStatus, c9 as WalletToPaymentRequestsConnection, ca as WalletToTransactionsConnection, cb as WalletToWithdrawalRequestsConnection, W as WebhookEventType, cc as Withdrawal, ce as WithdrawalFeeEstimateInput, cf as WithdrawalFeeEstimateOutput, cg as WithdrawalMode, ch as WithdrawalRequest, ci as WithdrawalRequestStatus, cj as WithdrawalRequestToChannelClosingTransactionsConnection, ck as WithdrawalRequestToChannelOpeningTransactionsConnection, cl as WithdrawalRequestToWithdrawalsConnection, i as getApiTokenQuery, k as getAuditLogActorQuery, p as getChannelClosingTransactionQuery, s as getChannelOpeningTransactionQuery, u as getChannelSnapshotQuery, a7 as getDepositQuery, ag as getHopQuery, an as getIncomingPaymentAttemptQuery, av as getInvoiceQuery, aF as getLightningTransactionQuery, aJ as getLightsparkNodeOwnerQuery, aH as getLightsparkNodeQuery, aR as getNodeQuery, aY as getOfferDataQuery, aW as getOfferQuery, a$ as getOnChainTransactionQuery, bh as getPaymentRequestQuery, bE as getRoutingTransactionQuery, bQ as getSignablePayloadQuery, bO as getSignableQuery, bY as getTransactionQuery, c2 as getUmaInvitationQuery, cd as getWithdrawalQuery } from '../index-BxC6kyLD.cjs';
1
+ export { A as Account, a as AccountToApiTokensConnection, b as AccountToChannelsConnection, c as AccountToNodesConnection, d as AccountToPaymentRequestsConnection, e as AccountToTransactionsConnection, f as AccountToWalletsConnection, g as AccountToWithdrawalRequestsConnection, h as ApiToken, j as AuditLogActor, B as Balances, l as BlockchainBalance, C as CancelInvoiceInput, m as CancelInvoiceOutput, n as Channel, o as ChannelClosingTransaction, q as ChannelFees, r as ChannelOpeningTransaction, t as ChannelSnapshot, v as ChannelStatus, w as ChannelToTransactionsConnection, x as ClaimUmaInvitationInput, y as ClaimUmaInvitationOutput, z as ClaimUmaInvitationWithIncentivesInput, D as ClaimUmaInvitationWithIncentivesOutput, E as ComplianceProvider, F as Connection, G as CreateApiTokenInput, H as CreateApiTokenOutput, I as CreateInvitationWithIncentivesInput, J as CreateInvitationWithIncentivesOutput, K as CreateInvoiceInput, M as CreateInvoiceOutput, N as CreateLnurlInvoiceInput, O as CreateNodeWalletAddressInput, P as CreateNodeWalletAddressOutput, Q as CreateOfferInput, R as CreateOfferOutput, S as CreateTestModeInvoiceInput, T as CreateTestModeInvoiceOutput, U as CreateTestModePaymentInput, V as CreateTestModePaymentoutput, X as CreateUmaInvitationInput, Y as CreateUmaInvitationOutput, Z as CreateUmaInvoiceInput, _ as CurrencyAmount, $ as CurrencyAmountInput, a0 as CurrencyUnit, a1 as DailyLiquidityForecast, a2 as DeclineToSignMessagesInput, a3 as DeclineToSignMessagesOutput, a4 as DeleteApiTokenInput, a5 as DeleteApiTokenOutput, a6 as Deposit, a8 as Entity, a9 as FailHtlcsInput, aa as FailHtlcsOutput, ab as FeeEstimate, ac as FundNodeInput, ad as FundNodeOutput, ae as GraphNode, af as Hop, ah as HtlcAttemptFailureCode, ai as IdAndSignature, aj as IncentivesIneligibilityReason, ak as IncentivesStatus, al as IncomingPayment, am as IncomingPaymentAttempt, ao as IncomingPaymentAttemptStatus, at as IncomingPaymentToAttemptsConnection, ap as IncomingPaymentsForInvoiceQueryInput, aq as IncomingPaymentsForInvoiceQueryOutput, ar as IncomingPaymentsForPaymentHashQueryInput, as as IncomingPaymentsForPaymentHashQueryOutput, au as Invoice, aw as InvoiceData, ax as InvoiceForPaymentHashInput, ay as InvoiceForPaymentHashOutput, az as InvoiceType, aA as LightningFeeEstimateForInvoiceInput, aB as LightningFeeEstimateForNodeInput, aC as LightningFeeEstimateOutput, aD as LightningPaymentDirection, aE as LightningTransaction, aG as LightsparkNode, aI as LightsparkNodeOwner, aK as LightsparkNodeStatus, aL as LightsparkNodeToChannelsConnection, aM as LightsparkNodeToDailyLiquidityForecastsConnection, aN as LightsparkNodeWithOSK, aO as LightsparkNodeWithRemoteSigning, aP as MultiSigAddressValidationParameters, aQ as Node, aS as NodeAddress, aT as NodeAddressType, aU as NodeToAddressesConnection, aV as Offer, aX as OfferData, aZ as OnChainFeeTarget, a_ as OnChainTransaction, b0 as OutgoingPayment, b1 as OutgoingPaymentAttempt, b2 as OutgoingPaymentAttemptStatus, b3 as OutgoingPaymentAttemptToHopsConnection, b4 as OutgoingPaymentForIdempotencyKeyInput, b5 as OutgoingPaymentForIdempotencyKeyOutput, ba as OutgoingPaymentToAttemptsConnection, b6 as OutgoingPaymentsForInvoiceQueryInput, b7 as OutgoingPaymentsForInvoiceQueryOutput, b8 as OutgoingPaymentsForPaymentHashQueryInput, b9 as OutgoingPaymentsForPaymentHashQueryOutput, bb as PageInfo, bc as PayInvoiceInput, bd as PayInvoiceOutput, bk as PayOfferInput, bl as PayOfferOutput, bm as PayTestModeInvoiceInput, bn as PayUmaInvoiceInput, be as PaymentDirection, bf as PaymentFailureReason, bg as PaymentRequest, bi as PaymentRequestData, bj as PaymentRequestStatus, bo as Permission, bp as PostTransactionData, bq as RegionCode, br as RegisterPaymentInput, bs as RegisterPaymentOutput, bt as ReleaseChannelPerCommitmentSecretInput, bu as ReleaseChannelPerCommitmentSecretOutput, bv as ReleasePaymentPreimageInput, bw as ReleasePaymentPreimageOutput, bx as RemoteSigningSubEventType, by as RequestInitiator, bz as RequestWithdrawalInput, bA as RequestWithdrawalOutput, bB as RichText, bC as RiskRating, bD as RoutingTransaction, bF as RoutingTransactionFailureReason, bG as ScreenNodeInput, bH as ScreenNodeOutput, bI as Secret, bJ as SendPaymentInput, bK as SendPaymentOutput, bL as SetInvoicePaymentHashInput, bM as SetInvoicePaymentHashOutput, bS as SignInvoiceInput, bT as SignInvoiceOutput, bU as SignMessagesInput, bV as SignMessagesOutput, bN as Signable, bP as SignablePayload, bR as SignablePayloadStatus, bW as SingleNodeDashboard, bX as Transaction, bZ as TransactionFailures, b_ as TransactionStatus, b$ as TransactionType, c0 as TransactionUpdate, c1 as UmaInvitation, c3 as UpdateChannelPerCommitmentPointInput, c4 as UpdateChannelPerCommitmentPointOutput, c5 as UpdateNodeSharedSecretInput, c6 as UpdateNodeSharedSecretOutput, c7 as Wallet, c8 as WalletStatus, c9 as WalletToPaymentRequestsConnection, ca as WalletToTransactionsConnection, cb as WalletToWithdrawalRequestsConnection, W as WebhookEventType, cc as Withdrawal, ce as WithdrawalFeeEstimateInput, cf as WithdrawalFeeEstimateOutput, cg as WithdrawalMode, ch as WithdrawalRequest, ci as WithdrawalRequestStatus, cj as WithdrawalRequestToChannelClosingTransactionsConnection, ck as WithdrawalRequestToChannelOpeningTransactionsConnection, cl as WithdrawalRequestToWithdrawalsConnection, i as getApiTokenQuery, k as getAuditLogActorQuery, p as getChannelClosingTransactionQuery, s as getChannelOpeningTransactionQuery, u as getChannelSnapshotQuery, a7 as getDepositQuery, ag as getHopQuery, an as getIncomingPaymentAttemptQuery, av as getInvoiceQuery, aF as getLightningTransactionQuery, aJ as getLightsparkNodeOwnerQuery, aH as getLightsparkNodeQuery, aR as getNodeQuery, aY as getOfferDataQuery, aW as getOfferQuery, a$ as getOnChainTransactionQuery, bh as getPaymentRequestQuery, bE as getRoutingTransactionQuery, bQ as getSignablePayloadQuery, bO as getSignableQuery, bY as getTransactionQuery, c2 as getUmaInvitationQuery, cd as getWithdrawalQuery } from '../index-C6o63fFW.cjs';
2
2
  export { B as BitcoinNetwork } from '../BitcoinNetwork-CIfB1c0X.cjs';
3
3
  import '@lightsparkdev/core';
4
4
  import 'zen-observable';
@@ -1,4 +1,4 @@
1
- export { A as Account, a as AccountToApiTokensConnection, b as AccountToChannelsConnection, c as AccountToNodesConnection, d as AccountToPaymentRequestsConnection, e as AccountToTransactionsConnection, f as AccountToWalletsConnection, g as AccountToWithdrawalRequestsConnection, h as ApiToken, j as AuditLogActor, B as Balances, l as BlockchainBalance, C as CancelInvoiceInput, m as CancelInvoiceOutput, n as Channel, o as ChannelClosingTransaction, q as ChannelFees, r as ChannelOpeningTransaction, t as ChannelSnapshot, v as ChannelStatus, w as ChannelToTransactionsConnection, x as ClaimUmaInvitationInput, y as ClaimUmaInvitationOutput, z as ClaimUmaInvitationWithIncentivesInput, D as ClaimUmaInvitationWithIncentivesOutput, E as ComplianceProvider, F as Connection, G as CreateApiTokenInput, H as CreateApiTokenOutput, I as CreateInvitationWithIncentivesInput, J as CreateInvitationWithIncentivesOutput, K as CreateInvoiceInput, M as CreateInvoiceOutput, N as CreateLnurlInvoiceInput, O as CreateNodeWalletAddressInput, P as CreateNodeWalletAddressOutput, Q as CreateOfferInput, R as CreateOfferOutput, S as CreateTestModeInvoiceInput, T as CreateTestModeInvoiceOutput, U as CreateTestModePaymentInput, V as CreateTestModePaymentoutput, X as CreateUmaInvitationInput, Y as CreateUmaInvitationOutput, Z as CreateUmaInvoiceInput, _ as CurrencyAmount, $ as CurrencyAmountInput, a0 as CurrencyUnit, a1 as DailyLiquidityForecast, a2 as DeclineToSignMessagesInput, a3 as DeclineToSignMessagesOutput, a4 as DeleteApiTokenInput, a5 as DeleteApiTokenOutput, a6 as Deposit, a8 as Entity, a9 as FailHtlcsInput, aa as FailHtlcsOutput, ab as FeeEstimate, ac as FundNodeInput, ad as FundNodeOutput, ae as GraphNode, af as Hop, ah as HtlcAttemptFailureCode, ai as IdAndSignature, aj as IncentivesIneligibilityReason, ak as IncentivesStatus, al as IncomingPayment, am as IncomingPaymentAttempt, ao as IncomingPaymentAttemptStatus, at as IncomingPaymentToAttemptsConnection, ap as IncomingPaymentsForInvoiceQueryInput, aq as IncomingPaymentsForInvoiceQueryOutput, ar as IncomingPaymentsForPaymentHashQueryInput, as as IncomingPaymentsForPaymentHashQueryOutput, au as Invoice, aw as InvoiceData, ax as InvoiceForPaymentHashInput, ay as InvoiceForPaymentHashOutput, az as InvoiceType, aA as LightningFeeEstimateForInvoiceInput, aB as LightningFeeEstimateForNodeInput, aC as LightningFeeEstimateOutput, aD as LightningPaymentDirection, aE as LightningTransaction, aG as LightsparkNode, aI as LightsparkNodeOwner, aK as LightsparkNodeStatus, aL as LightsparkNodeToChannelsConnection, aM as LightsparkNodeToDailyLiquidityForecastsConnection, aN as LightsparkNodeWithOSK, aO as LightsparkNodeWithRemoteSigning, aP as MultiSigAddressValidationParameters, aQ as Node, aS as NodeAddress, aT as NodeAddressType, aU as NodeToAddressesConnection, aV as Offer, aX as OfferData, aZ as OnChainFeeTarget, a_ as OnChainTransaction, b0 as OutgoingPayment, b1 as OutgoingPaymentAttempt, b2 as OutgoingPaymentAttemptStatus, b3 as OutgoingPaymentAttemptToHopsConnection, b4 as OutgoingPaymentForIdempotencyKeyInput, b5 as OutgoingPaymentForIdempotencyKeyOutput, ba as OutgoingPaymentToAttemptsConnection, b6 as OutgoingPaymentsForInvoiceQueryInput, b7 as OutgoingPaymentsForInvoiceQueryOutput, b8 as OutgoingPaymentsForPaymentHashQueryInput, b9 as OutgoingPaymentsForPaymentHashQueryOutput, bb as PageInfo, bc as PayInvoiceInput, bd as PayInvoiceOutput, bk as PayOfferInput, bl as PayOfferOutput, bm as PayTestModeInvoiceInput, bn as PayUmaInvoiceInput, be as PaymentDirection, bf as PaymentFailureReason, bg as PaymentRequest, bi as PaymentRequestData, bj as PaymentRequestStatus, bo as Permission, bp as PostTransactionData, bq as RegionCode, br as RegisterPaymentInput, bs as RegisterPaymentOutput, bt as ReleaseChannelPerCommitmentSecretInput, bu as ReleaseChannelPerCommitmentSecretOutput, bv as ReleasePaymentPreimageInput, bw as ReleasePaymentPreimageOutput, bx as RemoteSigningSubEventType, by as RequestInitiator, bz as RequestWithdrawalInput, bA as RequestWithdrawalOutput, bB as RichText, bC as RiskRating, bD as RoutingTransaction, bF as RoutingTransactionFailureReason, bG as ScreenNodeInput, bH as ScreenNodeOutput, bI as Secret, bJ as SendPaymentInput, bK as SendPaymentOutput, bL as SetInvoicePaymentHashInput, bM as SetInvoicePaymentHashOutput, bS as SignInvoiceInput, bT as SignInvoiceOutput, bU as SignMessagesInput, bV as SignMessagesOutput, bN as Signable, bP as SignablePayload, bR as SignablePayloadStatus, bW as SingleNodeDashboard, bX as Transaction, bZ as TransactionFailures, b_ as TransactionStatus, b$ as TransactionType, c0 as TransactionUpdate, c1 as UmaInvitation, c3 as UpdateChannelPerCommitmentPointInput, c4 as UpdateChannelPerCommitmentPointOutput, c5 as UpdateNodeSharedSecretInput, c6 as UpdateNodeSharedSecretOutput, c7 as Wallet, c8 as WalletStatus, c9 as WalletToPaymentRequestsConnection, ca as WalletToTransactionsConnection, cb as WalletToWithdrawalRequestsConnection, W as WebhookEventType, cc as Withdrawal, ce as WithdrawalFeeEstimateInput, cf as WithdrawalFeeEstimateOutput, cg as WithdrawalMode, ch as WithdrawalRequest, ci as WithdrawalRequestStatus, cj as WithdrawalRequestToChannelClosingTransactionsConnection, ck as WithdrawalRequestToChannelOpeningTransactionsConnection, cl as WithdrawalRequestToWithdrawalsConnection, i as getApiTokenQuery, k as getAuditLogActorQuery, p as getChannelClosingTransactionQuery, s as getChannelOpeningTransactionQuery, u as getChannelSnapshotQuery, a7 as getDepositQuery, ag as getHopQuery, an as getIncomingPaymentAttemptQuery, av as getInvoiceQuery, aF as getLightningTransactionQuery, aJ as getLightsparkNodeOwnerQuery, aH as getLightsparkNodeQuery, aR as getNodeQuery, aY as getOfferDataQuery, aW as getOfferQuery, a$ as getOnChainTransactionQuery, bh as getPaymentRequestQuery, bE as getRoutingTransactionQuery, bQ as getSignablePayloadQuery, bO as getSignableQuery, bY as getTransactionQuery, c2 as getUmaInvitationQuery, cd as getWithdrawalQuery } from '../index-B4pktcM-.js';
1
+ export { A as Account, a as AccountToApiTokensConnection, b as AccountToChannelsConnection, c as AccountToNodesConnection, d as AccountToPaymentRequestsConnection, e as AccountToTransactionsConnection, f as AccountToWalletsConnection, g as AccountToWithdrawalRequestsConnection, h as ApiToken, j as AuditLogActor, B as Balances, l as BlockchainBalance, C as CancelInvoiceInput, m as CancelInvoiceOutput, n as Channel, o as ChannelClosingTransaction, q as ChannelFees, r as ChannelOpeningTransaction, t as ChannelSnapshot, v as ChannelStatus, w as ChannelToTransactionsConnection, x as ClaimUmaInvitationInput, y as ClaimUmaInvitationOutput, z as ClaimUmaInvitationWithIncentivesInput, D as ClaimUmaInvitationWithIncentivesOutput, E as ComplianceProvider, F as Connection, G as CreateApiTokenInput, H as CreateApiTokenOutput, I as CreateInvitationWithIncentivesInput, J as CreateInvitationWithIncentivesOutput, K as CreateInvoiceInput, M as CreateInvoiceOutput, N as CreateLnurlInvoiceInput, O as CreateNodeWalletAddressInput, P as CreateNodeWalletAddressOutput, Q as CreateOfferInput, R as CreateOfferOutput, S as CreateTestModeInvoiceInput, T as CreateTestModeInvoiceOutput, U as CreateTestModePaymentInput, V as CreateTestModePaymentoutput, X as CreateUmaInvitationInput, Y as CreateUmaInvitationOutput, Z as CreateUmaInvoiceInput, _ as CurrencyAmount, $ as CurrencyAmountInput, a0 as CurrencyUnit, a1 as DailyLiquidityForecast, a2 as DeclineToSignMessagesInput, a3 as DeclineToSignMessagesOutput, a4 as DeleteApiTokenInput, a5 as DeleteApiTokenOutput, a6 as Deposit, a8 as Entity, a9 as FailHtlcsInput, aa as FailHtlcsOutput, ab as FeeEstimate, ac as FundNodeInput, ad as FundNodeOutput, ae as GraphNode, af as Hop, ah as HtlcAttemptFailureCode, ai as IdAndSignature, aj as IncentivesIneligibilityReason, ak as IncentivesStatus, al as IncomingPayment, am as IncomingPaymentAttempt, ao as IncomingPaymentAttemptStatus, at as IncomingPaymentToAttemptsConnection, ap as IncomingPaymentsForInvoiceQueryInput, aq as IncomingPaymentsForInvoiceQueryOutput, ar as IncomingPaymentsForPaymentHashQueryInput, as as IncomingPaymentsForPaymentHashQueryOutput, au as Invoice, aw as InvoiceData, ax as InvoiceForPaymentHashInput, ay as InvoiceForPaymentHashOutput, az as InvoiceType, aA as LightningFeeEstimateForInvoiceInput, aB as LightningFeeEstimateForNodeInput, aC as LightningFeeEstimateOutput, aD as LightningPaymentDirection, aE as LightningTransaction, aG as LightsparkNode, aI as LightsparkNodeOwner, aK as LightsparkNodeStatus, aL as LightsparkNodeToChannelsConnection, aM as LightsparkNodeToDailyLiquidityForecastsConnection, aN as LightsparkNodeWithOSK, aO as LightsparkNodeWithRemoteSigning, aP as MultiSigAddressValidationParameters, aQ as Node, aS as NodeAddress, aT as NodeAddressType, aU as NodeToAddressesConnection, aV as Offer, aX as OfferData, aZ as OnChainFeeTarget, a_ as OnChainTransaction, b0 as OutgoingPayment, b1 as OutgoingPaymentAttempt, b2 as OutgoingPaymentAttemptStatus, b3 as OutgoingPaymentAttemptToHopsConnection, b4 as OutgoingPaymentForIdempotencyKeyInput, b5 as OutgoingPaymentForIdempotencyKeyOutput, ba as OutgoingPaymentToAttemptsConnection, b6 as OutgoingPaymentsForInvoiceQueryInput, b7 as OutgoingPaymentsForInvoiceQueryOutput, b8 as OutgoingPaymentsForPaymentHashQueryInput, b9 as OutgoingPaymentsForPaymentHashQueryOutput, bb as PageInfo, bc as PayInvoiceInput, bd as PayInvoiceOutput, bk as PayOfferInput, bl as PayOfferOutput, bm as PayTestModeInvoiceInput, bn as PayUmaInvoiceInput, be as PaymentDirection, bf as PaymentFailureReason, bg as PaymentRequest, bi as PaymentRequestData, bj as PaymentRequestStatus, bo as Permission, bp as PostTransactionData, bq as RegionCode, br as RegisterPaymentInput, bs as RegisterPaymentOutput, bt as ReleaseChannelPerCommitmentSecretInput, bu as ReleaseChannelPerCommitmentSecretOutput, bv as ReleasePaymentPreimageInput, bw as ReleasePaymentPreimageOutput, bx as RemoteSigningSubEventType, by as RequestInitiator, bz as RequestWithdrawalInput, bA as RequestWithdrawalOutput, bB as RichText, bC as RiskRating, bD as RoutingTransaction, bF as RoutingTransactionFailureReason, bG as ScreenNodeInput, bH as ScreenNodeOutput, bI as Secret, bJ as SendPaymentInput, bK as SendPaymentOutput, bL as SetInvoicePaymentHashInput, bM as SetInvoicePaymentHashOutput, bS as SignInvoiceInput, bT as SignInvoiceOutput, bU as SignMessagesInput, bV as SignMessagesOutput, bN as Signable, bP as SignablePayload, bR as SignablePayloadStatus, bW as SingleNodeDashboard, bX as Transaction, bZ as TransactionFailures, b_ as TransactionStatus, b$ as TransactionType, c0 as TransactionUpdate, c1 as UmaInvitation, c3 as UpdateChannelPerCommitmentPointInput, c4 as UpdateChannelPerCommitmentPointOutput, c5 as UpdateNodeSharedSecretInput, c6 as UpdateNodeSharedSecretOutput, c7 as Wallet, c8 as WalletStatus, c9 as WalletToPaymentRequestsConnection, ca as WalletToTransactionsConnection, cb as WalletToWithdrawalRequestsConnection, W as WebhookEventType, cc as Withdrawal, ce as WithdrawalFeeEstimateInput, cf as WithdrawalFeeEstimateOutput, cg as WithdrawalMode, ch as WithdrawalRequest, ci as WithdrawalRequestStatus, cj as WithdrawalRequestToChannelClosingTransactionsConnection, ck as WithdrawalRequestToChannelOpeningTransactionsConnection, cl as WithdrawalRequestToWithdrawalsConnection, i as getApiTokenQuery, k as getAuditLogActorQuery, p as getChannelClosingTransactionQuery, s as getChannelOpeningTransactionQuery, u as getChannelSnapshotQuery, a7 as getDepositQuery, ag as getHopQuery, an as getIncomingPaymentAttemptQuery, av as getInvoiceQuery, aF as getLightningTransactionQuery, aJ as getLightsparkNodeOwnerQuery, aH as getLightsparkNodeQuery, aR as getNodeQuery, aY as getOfferDataQuery, aW as getOfferQuery, a$ as getOnChainTransactionQuery, bh as getPaymentRequestQuery, bE as getRoutingTransactionQuery, bQ as getSignablePayloadQuery, bO as getSignableQuery, bY as getTransactionQuery, c2 as getUmaInvitationQuery, cd as getWithdrawalQuery } from '../index-CzCane7X.js';
2
2
  export { B as BitcoinNetwork } from '../BitcoinNetwork-CIfB1c0X.js';
3
3
  import '@lightsparkdev/core';
4
4
  import 'zen-observable';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightsparkdev/lightspark-sdk",
3
- "version": "1.9.1",
3
+ "version": "1.9.3",
4
4
  "description": "Lightspark JS SDK",
5
5
  "author": "Lightspark Inc.",
6
6
  "keywords": [
@@ -69,9 +69,8 @@
69
69
  },
70
70
  "license": "Apache-2.0",
71
71
  "dependencies": {
72
- "@lightsparkdev/core": "1.3.1",
73
- "@lightsparkdev/crypto-wasm": "0.1.13",
74
- "crypto-browserify": "^3.12.0",
72
+ "@lightsparkdev/core": "1.4.1",
73
+ "@lightsparkdev/crypto-wasm": "0.1.15",
75
74
  "dayjs": "^1.11.7",
76
75
  "dotenv": "^16.3.1",
77
76
  "graphql": "^16.6.0",
package/src/client.ts CHANGED
@@ -29,6 +29,7 @@ import NodeKeyLoaderCache from "./NodeKeyLoaderCache.js";
29
29
  import { type SigningKeyLoaderArgs } from "./SigningKeyLoader.js";
30
30
  import { BitcoinFeeEstimate as BitcoinFeeEstimateQuery } from "./graphql/BitcoinFeeEstimate.js";
31
31
  import { CancelInvoice } from "./graphql/CancelInvoice.js";
32
+ import { CancelUmaInvitation } from "./graphql/CancelUmaInvitation.js";
32
33
  import { ClaimUmaInvitation } from "./graphql/ClaimUmaInvitation.js";
33
34
  import { ClaimUmaInvitationWithIncentives } from "./graphql/ClaimUmaInvitationWithIncentives.js";
34
35
  import { CreateApiToken } from "./graphql/CreateApiToken.js";
@@ -40,6 +41,7 @@ import { CreateTestModeInvoice } from "./graphql/CreateTestModeInvoice.js";
40
41
  import { CreateTestModePayment } from "./graphql/CreateTestModePayment.js";
41
42
  import { CreateUmaInvitation } from "./graphql/CreateUmaInvitation.js";
42
43
  import { CreateUmaInvitationWithIncentives } from "./graphql/CreateUmaInvitationWithIncentives.js";
44
+ import { CreateUmaInvitationWithPayment } from "./graphql/CreateUmaInvitationWithPayment.js";
43
45
  import { CreateUmaInvoice } from "./graphql/CreateUmaInvoice.js";
44
46
  import { DecodeInvoice } from "./graphql/DecodeInvoice.js";
45
47
  import { DeleteApiToken } from "./graphql/DeleteApiToken.js";
@@ -1737,6 +1739,85 @@ class LightsparkClient {
1737
1739
  coreLogger.setEnabled(enabled, level);
1738
1740
  logger.setEnabled(enabled, level);
1739
1741
  }
1742
+
1743
+ /**
1744
+ * Creates an UMA invitation with an attached payment.
1745
+ *
1746
+ * @param inviterUma The UMA of the inviter.
1747
+ * @param amountToSend The amount and currency to send in the smallest unit of the currency (i.e. cents for USD).
1748
+ * @param expiresAt The expiration date/time (Date).
1749
+ * @returns The invitation that was created, or null if creation failed.
1750
+ */
1751
+ public async createUmaInvitationWithPayment(
1752
+ inviterUma: string,
1753
+ amountToSend: {
1754
+ amount: number;
1755
+ currency: {
1756
+ code: string;
1757
+ name: string;
1758
+ symbol: string;
1759
+ decimals: number;
1760
+ };
1761
+ },
1762
+ expiresAt: Date,
1763
+ ): Promise<UmaInvitation | null> {
1764
+ return await this.executeRawQuery({
1765
+ queryPayload: CreateUmaInvitationWithPayment,
1766
+ variables: {
1767
+ inviterUma,
1768
+ paymentAmount: amountToSend.amount,
1769
+ paymentCurrency: amountToSend.currency,
1770
+ expiresAt: expiresAt.toISOString(),
1771
+ },
1772
+ constructObject: (responseJson: {
1773
+ create_uma_invitation_with_payment: {
1774
+ invitation: any; // eslint-disable-line @typescript-eslint/no-explicit-any
1775
+ } | null;
1776
+ }) => {
1777
+ if (!responseJson.create_uma_invitation_with_payment?.invitation) {
1778
+ throw new LightsparkException(
1779
+ "CreateUmaInvitationWithPaymentError",
1780
+ "Unable to create UMA invitation with payment",
1781
+ );
1782
+ }
1783
+ return UmaInvitationFromJson(
1784
+ responseJson.create_uma_invitation_with_payment.invitation,
1785
+ );
1786
+ },
1787
+ });
1788
+ }
1789
+
1790
+ /**
1791
+ * Cancels an UMA invitation by its invite code.
1792
+ *
1793
+ * @param invitationCode The code of the invitation to cancel.
1794
+ * @returns The cancelled invitation, or null if cancellation failed.
1795
+ */
1796
+ public async cancelUmaInvitation(
1797
+ invitationCode: string,
1798
+ ): Promise<UmaInvitation | null> {
1799
+ return await this.executeRawQuery({
1800
+ queryPayload: CancelUmaInvitation,
1801
+ variables: {
1802
+ inviteCode: invitationCode,
1803
+ },
1804
+ constructObject: (responseJson: {
1805
+ cancel_uma_invitation: {
1806
+ invitation: any; // eslint-disable-line @typescript-eslint/no-explicit-any
1807
+ } | null;
1808
+ }) => {
1809
+ if (!responseJson.cancel_uma_invitation?.invitation) {
1810
+ throw new LightsparkException(
1811
+ "CancelUmaInvitationError",
1812
+ "Unable to cancel UMA invitation",
1813
+ );
1814
+ }
1815
+ return UmaInvitationFromJson(
1816
+ responseJson.cancel_uma_invitation.invitation,
1817
+ );
1818
+ },
1819
+ });
1820
+ }
1740
1821
  }
1741
1822
 
1742
1823
  export default LightsparkClient;
@@ -0,0 +1,19 @@
1
+ // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
+
3
+ import { FRAGMENT as UmaInvitationFragment } from "../objects/UmaInvitation.js";
4
+
5
+ export const CancelUmaInvitation = `
6
+ mutation CancelUmaInvitation(
7
+ $inviteCode: String!
8
+ ) {
9
+ cancel_uma_invitation(input: {
10
+ invite_code: $inviteCode
11
+ }) {
12
+ invitation {
13
+ ...UmaInvitationFragment
14
+ }
15
+ }
16
+ }
17
+
18
+ ${UmaInvitationFragment}
19
+ `;
@@ -0,0 +1,25 @@
1
+ // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
+
3
+ import { FRAGMENT as UmaInvitationFragment } from "../objects/UmaInvitation.js";
4
+
5
+ export const CreateUmaInvitationWithPayment = `
6
+ mutation CreateUmaInvitationWithPayment(
7
+ $inviterUma: String!
8
+ $paymentAmount: Int!
9
+ $paymentCurrency: UmaCurrencyInput!
10
+ $expiresAt: DateTime!
11
+ ) {
12
+ create_uma_invitation_with_payment(input: {
13
+ inviter_uma: $inviterUma
14
+ payment_amount: $paymentAmount
15
+ payment_currency: $paymentCurrency
16
+ expires_at: $expiresAt
17
+ }) {
18
+ invitation {
19
+ ...UmaInvitationFragment
20
+ }
21
+ }
22
+ }
23
+
24
+ ${UmaInvitationFragment}
25
+ `;