@lightsparkdev/lightspark-sdk 1.1.5 → 1.1.7

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.
@@ -322,6 +322,30 @@ declare class AccountToChannelsConnection {
322
322
  constructor(count: number, entities: Channel[]);
323
323
  }
324
324
 
325
+ /** This is an object representing the balance associated with your Lightspark account. You can retrieve this object to see your balance, which can be broken down into several different categorizations. **/
326
+ type Balances = {
327
+ /**
328
+ * This represents the balance that should be displayed when asked "how much do I own right now?". It
329
+ * represents the amount currently owned, including things that may not be owned soon (e.g. in-flight
330
+ * outgoing payments, in-flight withdrawals, commit fees, etc.). It really is a snapshot of what is
331
+ * officially owned at this instant.
332
+ **/
333
+ ownedBalance: CurrencyAmount;
334
+ /**
335
+ * This represents the balance that should be displayed when asked "how much can I send on Lightning
336
+ * right now?". It represents the amount currently available to be sent on the Lightning network. We
337
+ * remove from the balance all the funds that are temporarily locked (e.g. channel reserves).
338
+ **/
339
+ availableToSendBalance: CurrencyAmount;
340
+ /**
341
+ * This represents the balance that should be displayed when asked "how much money can I withdraw on
342
+ * the Bitcoin network right now?". It represents the amount currently available to withdraw and is
343
+ * usually equal to the `owned_balance` but it does not include in-flight operations (which would
344
+ * likely succeed and therefore likely make your withdrawal fail).
345
+ **/
346
+ availableToWithdrawBalance: CurrencyAmount;
347
+ };
348
+
325
349
  /** This is an object representing a detailed breakdown of the balance for a Lightspark Node. **/
326
350
  type BlockchainBalance = {
327
351
  /** The total wallet balance, including unconfirmed UTXOs. **/
@@ -408,7 +432,8 @@ declare class LightsparkNode implements Node {
408
432
  readonly localBalance?: CurrencyAmount | undefined;
409
433
  readonly remoteBalance?: CurrencyAmount | undefined;
410
434
  readonly blockchainBalance?: BlockchainBalance | undefined;
411
- constructor(id: string, createdAt: string, updatedAt: string, bitcoinNetwork: BitcoinNetwork, displayName: string, ownerId: string, umaPrescreeningUtxos: string[], typename: string, alias?: string | undefined, color?: string | undefined, conductivity?: number | undefined, publicKey?: string | undefined, status?: LightsparkNodeStatus | undefined, totalBalance?: CurrencyAmount | undefined, totalLocalBalance?: CurrencyAmount | undefined, localBalance?: CurrencyAmount | undefined, remoteBalance?: CurrencyAmount | undefined, blockchainBalance?: BlockchainBalance | undefined);
435
+ readonly balances?: Balances | undefined;
436
+ constructor(id: string, createdAt: string, updatedAt: string, bitcoinNetwork: BitcoinNetwork, displayName: string, ownerId: string, umaPrescreeningUtxos: string[], typename: string, alias?: string | undefined, color?: string | undefined, conductivity?: number | undefined, publicKey?: string | undefined, status?: LightsparkNodeStatus | undefined, totalBalance?: CurrencyAmount | undefined, totalLocalBalance?: CurrencyAmount | undefined, localBalance?: CurrencyAmount | undefined, remoteBalance?: CurrencyAmount | undefined, blockchainBalance?: BlockchainBalance | undefined, balances?: Balances | undefined);
412
437
  getAddresses(client: LightsparkClient, first?: number | undefined, types?: NodeAddressType[] | undefined): Promise<NodeToAddressesConnection>;
413
438
  getChannels(client: LightsparkClient, first?: number | undefined, statuses?: ChannelStatus[] | undefined, after?: string | undefined): Promise<LightsparkNodeToChannelsConnection>;
414
439
  static getLightsparkNodeQuery(id: string): Query<LightsparkNode>;
@@ -556,30 +581,6 @@ type AccountToTransactionsConnection = Connection & {
556
581
  totalAmountTransacted?: CurrencyAmount;
557
582
  };
558
583
 
559
- /** This is an object representing the balance associated with your Lightspark account. You can retrieve this object to see your balance, which can be broken down into several different categorizations. **/
560
- type Balances = {
561
- /**
562
- * This represents the balance that should be displayed when asked "how much do I own right now?". It
563
- * represents the amount currently owned, including things that may not be owned soon (e.g. in-flight
564
- * outgoing payments, in-flight withdrawals, commit fees, etc.). It really is a snapshot of what is
565
- * officially owned at this instant.
566
- **/
567
- ownedBalance: CurrencyAmount;
568
- /**
569
- * This represents the balance that should be displayed when asked "how much can I send on Lightning
570
- * right now?". It represents the amount currently available to be sent on the Lightning network. We
571
- * remove from the balance all the funds that are temporarily locked (e.g. channel reserves).
572
- **/
573
- availableToSendBalance: CurrencyAmount;
574
- /**
575
- * This represents the balance that should be displayed when asked "how much money can I withdraw on
576
- * the Bitcoin network right now?". It represents the amount currently available to withdraw and is
577
- * usually equal to the `owned_balance` but it does not include in-flight operations (which would
578
- * likely succeed and therefore likely make your withdrawal fail).
579
- **/
580
- availableToWithdrawBalance: CurrencyAmount;
581
- };
582
-
583
584
  /** This is an object representing the owner of a LightsparkNode. **/
584
585
  type LightsparkNodeOwner = Entity & {
585
586
  /**
@@ -924,9 +925,13 @@ declare enum InvoiceType {
924
925
  }
925
926
 
926
927
  type ChannelSnapshot = {
928
+ channelId: string;
929
+ timestamp: string;
927
930
  localBalance?: CurrencyAmount;
928
931
  localUnsettledBalance?: CurrencyAmount;
929
932
  localChannelReserve?: CurrencyAmount;
933
+ remoteBalance?: CurrencyAmount;
934
+ remoteUnsettledBalance?: CurrencyAmount;
930
935
  };
931
936
 
932
937
  /** This is an enum representing a particular reason why an htlc sent over the Lightning Network may have failed. **/
@@ -960,6 +965,7 @@ declare enum HtlcAttemptFailureCode {
960
965
  EXPIRY_TOO_FAR = "EXPIRY_TOO_FAR",
961
966
  MPP_TIMEOUT = "MPP_TIMEOUT",
962
967
  INVALID_ONION_PAYLOAD = "INVALID_ONION_PAYLOAD",
968
+ INVALID_ONION_BLINDING = "INVALID_ONION_BLINDING",
963
969
  INTERNAL_FAILURE = "INTERNAL_FAILURE",
964
970
  UNKNOWN_FAILURE = "UNKNOWN_FAILURE",
965
971
  UNREADABLE_FAILURE = "UNREADABLE_FAILURE"
@@ -1969,8 +1975,9 @@ declare class LightsparkNodeWithOSK implements LightsparkNode {
1969
1975
  readonly localBalance?: CurrencyAmount | undefined;
1970
1976
  readonly remoteBalance?: CurrencyAmount | undefined;
1971
1977
  readonly blockchainBalance?: BlockchainBalance | undefined;
1978
+ readonly balances?: Balances | undefined;
1972
1979
  readonly encryptedSigningPrivateKey?: Secret | undefined;
1973
- constructor(id: string, createdAt: string, updatedAt: string, bitcoinNetwork: BitcoinNetwork, displayName: string, ownerId: string, umaPrescreeningUtxos: string[], typename: string, alias?: string | undefined, color?: string | undefined, conductivity?: number | undefined, publicKey?: string | undefined, status?: LightsparkNodeStatus | undefined, totalBalance?: CurrencyAmount | undefined, totalLocalBalance?: CurrencyAmount | undefined, localBalance?: CurrencyAmount | undefined, remoteBalance?: CurrencyAmount | undefined, blockchainBalance?: BlockchainBalance | undefined, encryptedSigningPrivateKey?: Secret | undefined);
1980
+ constructor(id: string, createdAt: string, updatedAt: string, bitcoinNetwork: BitcoinNetwork, displayName: string, ownerId: string, umaPrescreeningUtxos: string[], typename: string, alias?: string | undefined, color?: string | undefined, conductivity?: number | undefined, publicKey?: string | undefined, status?: LightsparkNodeStatus | undefined, totalBalance?: CurrencyAmount | undefined, totalLocalBalance?: CurrencyAmount | undefined, localBalance?: CurrencyAmount | undefined, remoteBalance?: CurrencyAmount | undefined, blockchainBalance?: BlockchainBalance | undefined, balances?: Balances | undefined, encryptedSigningPrivateKey?: Secret | undefined);
1974
1981
  getAddresses(client: LightsparkClient, first?: number | undefined, types?: NodeAddressType[] | undefined): Promise<NodeToAddressesConnection>;
1975
1982
  getChannels(client: LightsparkClient, first?: number | undefined, statuses?: ChannelStatus[] | undefined, after?: string | undefined): Promise<LightsparkNodeToChannelsConnection>;
1976
1983
  static getLightsparkNodeWithOSKQuery(id: string): Query<LightsparkNodeWithOSK>;
@@ -1996,7 +2003,8 @@ declare class LightsparkNodeWithRemoteSigning implements LightsparkNode {
1996
2003
  readonly localBalance?: CurrencyAmount | undefined;
1997
2004
  readonly remoteBalance?: CurrencyAmount | undefined;
1998
2005
  readonly blockchainBalance?: BlockchainBalance | undefined;
1999
- constructor(id: string, createdAt: string, updatedAt: string, bitcoinNetwork: BitcoinNetwork, displayName: string, ownerId: string, umaPrescreeningUtxos: string[], typename: string, alias?: string | undefined, color?: string | undefined, conductivity?: number | undefined, publicKey?: string | undefined, status?: LightsparkNodeStatus | undefined, totalBalance?: CurrencyAmount | undefined, totalLocalBalance?: CurrencyAmount | undefined, localBalance?: CurrencyAmount | undefined, remoteBalance?: CurrencyAmount | undefined, blockchainBalance?: BlockchainBalance | undefined);
2006
+ readonly balances?: Balances | undefined;
2007
+ constructor(id: string, createdAt: string, updatedAt: string, bitcoinNetwork: BitcoinNetwork, displayName: string, ownerId: string, umaPrescreeningUtxos: string[], typename: string, alias?: string | undefined, color?: string | undefined, conductivity?: number | undefined, publicKey?: string | undefined, status?: LightsparkNodeStatus | undefined, totalBalance?: CurrencyAmount | undefined, totalLocalBalance?: CurrencyAmount | undefined, localBalance?: CurrencyAmount | undefined, remoteBalance?: CurrencyAmount | undefined, blockchainBalance?: BlockchainBalance | undefined, balances?: Balances | undefined);
2000
2008
  getAddresses(client: LightsparkClient, first?: number | undefined, types?: NodeAddressType[] | undefined): Promise<NodeToAddressesConnection>;
2001
2009
  getChannels(client: LightsparkClient, first?: number | undefined, statuses?: ChannelStatus[] | undefined, after?: string | undefined): Promise<LightsparkNodeToChannelsConnection>;
2002
2010
  static getLightsparkNodeWithRemoteSigningQuery(id: string): Query<LightsparkNodeWithRemoteSigning>;