@lightsparkdev/lightspark-sdk 0.4.8 → 0.4.10
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 +12 -0
- package/dist/{chunk-YTXDF6SQ.js → chunk-NXUFC5J7.js} +950 -246
- package/dist/{index-adeff42d.d.ts → index-3ffe9e7b.d.ts} +194 -56
- package/dist/index.cjs +962 -254
- package/dist/index.d.ts +2 -2
- package/dist/index.js +15 -9
- package/dist/objects/index.cjs +952 -246
- package/dist/objects/index.d.ts +1 -1
- package/dist/objects/index.js +5 -1
- package/package.json +1 -2
- package/src/client.ts +13 -14
- package/src/objects/Account.ts +36 -30
- package/src/objects/AccountToApiTokensConnection.ts +11 -6
- package/src/objects/AccountToNodesConnection.ts +11 -6
- package/src/objects/AccountToPaymentRequestsConnection.ts +20 -15
- package/src/objects/AccountToTransactionsConnection.ts +19 -14
- package/src/objects/AccountToWalletsConnection.ts +11 -6
- package/src/objects/ApiToken.ts +2 -1
- package/src/objects/Balances.ts +1 -0
- package/src/objects/BitcoinNetwork.ts +2 -1
- package/src/objects/BlockchainBalance.ts +1 -1
- package/src/objects/Channel.ts +2 -2
- package/src/objects/ChannelClosingTransaction.ts +2 -2
- package/src/objects/ChannelFees.ts +1 -0
- package/src/objects/ChannelOpeningTransaction.ts +2 -2
- package/src/objects/ChannelStatus.ts +1 -0
- package/src/objects/Connection.ts +387 -0
- package/src/objects/CreateInvoiceInput.ts +12 -0
- package/src/objects/CreateLnurlInvoiceInput.ts +10 -0
- package/src/objects/CreateTestModePaymentoutput.ts +1 -0
- package/src/objects/CryptoSanctionsScreeningProvider.ts +14 -0
- package/src/objects/CurrencyAmount.ts +1 -1
- package/src/objects/CurrencyUnit.ts +1 -0
- package/src/objects/Deposit.ts +2 -2
- package/src/objects/Entity.ts +1 -1
- package/src/objects/FeeEstimate.ts +1 -0
- package/src/objects/GraphNode.ts +2 -2
- package/src/objects/Hop.ts +2 -2
- package/src/objects/HtlcAttemptFailureCode.ts +1 -0
- package/src/objects/IncomingPayment.ts +19 -6
- package/src/objects/IncomingPaymentAttempt.ts +2 -2
- package/src/objects/IncomingPaymentAttemptStatus.ts +1 -1
- package/src/objects/IncomingPaymentToAttemptsConnection.ts +21 -1
- package/src/objects/Invoice.ts +2 -2
- package/src/objects/InvoiceData.ts +1 -1
- package/src/objects/InvoiceType.ts +1 -0
- package/src/objects/LightningTransaction.ts +2 -2
- package/src/objects/LightsparkNode.ts +12 -6
- package/src/objects/LightsparkNodeOwner.ts +2 -2
- package/src/objects/LightsparkNodePurpose.ts +1 -0
- package/src/objects/LightsparkNodeToChannelsConnection.ts +11 -6
- package/src/objects/Node.ts +2 -3
- package/src/objects/NodeAddress.ts +1 -1
- package/src/objects/NodeAddressType.ts +1 -1
- package/src/objects/OnChainTransaction.ts +2 -3
- package/src/objects/OutgoingPayment.ts +14 -6
- package/src/objects/OutgoingPaymentAttempt.ts +14 -6
- package/src/objects/OutgoingPaymentAttemptStatus.ts +1 -1
- package/src/objects/OutgoingPaymentAttemptToHopsConnection.ts +21 -1
- package/src/objects/OutgoingPaymentToAttemptsConnection.ts +21 -1
- package/src/objects/PageInfo.ts +1 -0
- package/src/objects/PaymentFailureReason.ts +1 -0
- package/src/objects/PaymentRequest.ts +2 -2
- package/src/objects/PaymentRequestData.ts +1 -1
- package/src/objects/PaymentRequestStatus.ts +1 -0
- package/src/objects/Permission.ts +1 -0
- package/src/objects/RiskRating.ts +18 -0
- package/src/objects/RoutingTransaction.ts +2 -2
- package/src/objects/RoutingTransactionFailureReason.ts +1 -0
- package/src/objects/ScreenBitcoinAddressesInput.ts +23 -0
- package/src/objects/ScreenBitcoinAddressesOutput.ts +25 -0
- package/src/objects/Transaction.ts +2 -2
- package/src/objects/TransactionFailures.ts +1 -0
- package/src/objects/TransactionStatus.ts +1 -0
- package/src/objects/TransactionType.ts +1 -0
- package/src/objects/Wallet.ts +632 -7
- package/src/objects/WalletStatus.ts +1 -0
- package/src/objects/WalletToPaymentRequestsConnection.ts +57 -0
- package/src/objects/WalletToTransactionsConnection.ts +57 -0
- package/src/objects/WebhookEventType.ts +3 -0
- package/src/objects/Withdrawal.ts +2 -2
- package/src/objects/WithdrawalMode.ts +1 -0
- package/src/objects/WithdrawalRequest.ts +2 -1
- package/src/objects/WithdrawalRequestStatus.ts +1 -0
- package/src/objects/index.ts +7 -0
- package/src/objects/.eslintrc.cjs +0 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AuthProvider } from '@lightsparkdev/core';
|
|
2
|
-
import { W as WebhookEventType } from './index-
|
|
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 ApiToken, B as Balances, i as BitcoinNetwork, j as BlockchainBalance, C as Channel, k as ChannelClosingTransaction, m as ChannelFees, n as ChannelOpeningTransaction, p as ChannelStatus, q as ChannelToTransactionsConnection, r as
|
|
2
|
+
import { W as WebhookEventType } from './index-3ffe9e7b.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 ApiToken, B as Balances, i as BitcoinNetwork, j as BlockchainBalance, C as Channel, k as ChannelClosingTransaction, m as ChannelFees, n as ChannelOpeningTransaction, p as ChannelStatus, q as ChannelToTransactionsConnection, r as Connection, s as CreateApiTokenInput, t as CreateApiTokenOutput, u as CreateInvoiceInput, v as CreateInvoiceOutput, w as CreateLnurlInvoiceInput, x as CreateNodeWalletAddressInput, y as CreateNodeWalletAddressOutput, z as CreateTestModeInvoiceInput, D as CreateTestModeInvoiceOutput, E as CreateTestModePaymentInput, F as CreateTestModePaymentoutput, G as CryptoSanctionsScreeningProvider, H as CurrencyAmount, I as CurrencyUnit, J as DeleteApiTokenInput, K as DeleteApiTokenOutput, M as Deposit, O as Entity, P as FeeEstimate, Q as FundNodeInput, R as FundNodeOutput, S as GraphNode, T as Hop, V as HtlcAttemptFailureCode, X as IncomingPayment, Y as IncomingPaymentAttempt, _ as IncomingPaymentAttemptStatus, $ as IncomingPaymentToAttemptsConnection, a0 as Invoice, a2 as InvoiceData, a3 as InvoiceType, a4 as LightningFeeEstimateForInvoiceInput, a5 as LightningFeeEstimateForNodeInput, a6 as LightningFeeEstimateOutput, a7 as LightningTransaction, L as LightsparkClient, a9 as LightsparkNode, aa as LightsparkNodeOwner, ac as LightsparkNodePurpose, ad as LightsparkNodeStatus, ae as LightsparkNodeToChannelsConnection, af as Node, ag as NodeAddress, ah as NodeAddressType, ai as NodeToAddressesConnection, aj as OnChainTransaction, al as OutgoingPayment, am as OutgoingPaymentAttempt, an as OutgoingPaymentAttemptStatus, ao as OutgoingPaymentAttemptToHopsConnection, ap as OutgoingPaymentToAttemptsConnection, aq as PageInfo, ar as PayInvoiceInput, as as PayInvoiceOutput, at as PaymentFailureReason, au as PaymentRequest, aw as PaymentRequestData, ax as PaymentRequestStatus, ay as Permission, az as RequestWithdrawalInput, aA as RequestWithdrawalOutput, aB as RichText, aC as RiskRating, aD as RoutingTransaction, aF as RoutingTransactionFailureReason, aG as ScreenBitcoinAddressesInput, aH as ScreenBitcoinAddressesOutput, aI as Secret, aJ as SendPaymentInput, aK as SendPaymentOutput, aL as SingleNodeDashboard, aM as Transaction, aO as TransactionFailures, aP as TransactionStatus, aQ as TransactionType, aR as TransactionUpdate, aS as Wallet, aT as WalletStatus, aU as WalletToPaymentRequestsConnection, aV as WalletToTransactionsConnection, aW as Withdrawal, aY as WithdrawalMode, aZ as WithdrawalRequest, a_ as WithdrawalRequestStatus, a$ as WithdrawalRequestToChannelClosingTransactionsConnection, b0 as WithdrawalRequestToChannelOpeningTransactionsConnection, h as getApiTokenQuery, l as getChannelClosingTransactionQuery, o as getChannelOpeningTransactionQuery, N as getDepositQuery, U as getHopQuery, Z as getIncomingPaymentAttemptQuery, a1 as getInvoiceQuery, a8 as getLightningTransactionQuery, ab as getLightsparkNodeOwnerQuery, ak as getOnChainTransactionQuery, av as getPaymentRequestQuery, aE as getRoutingTransactionQuery, aN as getTransactionQuery, aX as getWithdrawalQuery } from './index-3ffe9e7b.js';
|
|
4
4
|
import 'zen-observable';
|
|
5
5
|
|
|
6
6
|
declare class AccountTokenAuthProvider implements AuthProvider {
|
package/dist/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
BitcoinNetwork_default,
|
|
6
6
|
ChannelStatus_default,
|
|
7
7
|
Channel_default,
|
|
8
|
+
CryptoSanctionsScreeningProvider_default,
|
|
8
9
|
CurrencyAmountFromJson,
|
|
9
10
|
CurrencyUnit_default,
|
|
10
11
|
FRAGMENT,
|
|
@@ -37,6 +38,7 @@ import {
|
|
|
37
38
|
PaymentFailureReason_default,
|
|
38
39
|
PaymentRequestStatus_default,
|
|
39
40
|
Permission_default,
|
|
41
|
+
RiskRating_default,
|
|
40
42
|
RoutingTransactionFailureReason_default,
|
|
41
43
|
TransactionFromJson,
|
|
42
44
|
TransactionStatus_default,
|
|
@@ -64,7 +66,7 @@ import {
|
|
|
64
66
|
getRoutingTransactionQuery,
|
|
65
67
|
getTransactionQuery,
|
|
66
68
|
getWithdrawalQuery
|
|
67
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-NXUFC5J7.js";
|
|
68
70
|
import "./chunk-NIMBE7W3.js";
|
|
69
71
|
|
|
70
72
|
// src/auth/AccountTokenAuthProvider.ts
|
|
@@ -115,7 +117,7 @@ import { createHash } from "crypto";
|
|
|
115
117
|
// package.json
|
|
116
118
|
var package_default = {
|
|
117
119
|
name: "@lightsparkdev/lightspark-sdk",
|
|
118
|
-
version: "0.4.
|
|
120
|
+
version: "0.4.10",
|
|
119
121
|
description: "Lightspark JS SDK",
|
|
120
122
|
author: "Lightspark Inc.",
|
|
121
123
|
keywords: [
|
|
@@ -199,7 +201,6 @@ var package_default = {
|
|
|
199
201
|
},
|
|
200
202
|
devDependencies: {
|
|
201
203
|
"@lightsparkdev/eslint-config": "*",
|
|
202
|
-
"@lightsparkdev/gql": "0.0.2",
|
|
203
204
|
"@lightsparkdev/tsconfig": "0.0.0",
|
|
204
205
|
"@types/crypto-js": "^4.1.1",
|
|
205
206
|
"@types/jest": "^29.5.2",
|
|
@@ -842,11 +843,14 @@ var LightsparkClient = class {
|
|
|
842
843
|
* @returns A zen-observable that emits transaction updates for the given node IDs.
|
|
843
844
|
*/
|
|
844
845
|
listenToTransactions(nodeIds) {
|
|
845
|
-
const response = this.requester.subscribe(
|
|
846
|
-
|
|
847
|
-
|
|
846
|
+
const response = this.requester.subscribe(
|
|
847
|
+
TransactionSubscription,
|
|
848
|
+
{
|
|
849
|
+
nodeIds
|
|
850
|
+
}
|
|
851
|
+
);
|
|
848
852
|
return response.map(
|
|
849
|
-
(response2) => response2
|
|
853
|
+
(response2) => response2?.data?.transactions && TransactionUpdateFromJson(response2.data.transactions)
|
|
850
854
|
);
|
|
851
855
|
}
|
|
852
856
|
/**
|
|
@@ -1083,7 +1087,7 @@ var LightsparkClient = class {
|
|
|
1083
1087
|
}
|
|
1084
1088
|
);
|
|
1085
1089
|
return CurrencyAmountFromJson(
|
|
1086
|
-
response.lightning_fee_estimate_for_invoice.
|
|
1090
|
+
response.lightning_fee_estimate_for_invoice.lightning_fee_estimate_output_fee_estimate
|
|
1087
1091
|
);
|
|
1088
1092
|
}
|
|
1089
1093
|
/**
|
|
@@ -1104,7 +1108,7 @@ var LightsparkClient = class {
|
|
|
1104
1108
|
}
|
|
1105
1109
|
);
|
|
1106
1110
|
return CurrencyAmountFromJson(
|
|
1107
|
-
response.lightning_fee_estimate_for_node.
|
|
1111
|
+
response.lightning_fee_estimate_for_node.lightning_fee_estimate_output_fee_estimate
|
|
1108
1112
|
);
|
|
1109
1113
|
}
|
|
1110
1114
|
/**
|
|
@@ -1436,6 +1440,7 @@ export {
|
|
|
1436
1440
|
BitcoinNetwork_default as BitcoinNetwork,
|
|
1437
1441
|
Channel_default as Channel,
|
|
1438
1442
|
ChannelStatus_default as ChannelStatus,
|
|
1443
|
+
CryptoSanctionsScreeningProvider_default as CryptoSanctionsScreeningProvider,
|
|
1439
1444
|
CurrencyUnit_default as CurrencyUnit,
|
|
1440
1445
|
GraphNode_default as GraphNode,
|
|
1441
1446
|
HtlcAttemptFailureCode_default as HtlcAttemptFailureCode,
|
|
@@ -1454,6 +1459,7 @@ export {
|
|
|
1454
1459
|
PaymentFailureReason_default as PaymentFailureReason,
|
|
1455
1460
|
PaymentRequestStatus_default as PaymentRequestStatus,
|
|
1456
1461
|
Permission_default as Permission,
|
|
1462
|
+
RiskRating_default as RiskRating,
|
|
1457
1463
|
RoutingTransactionFailureReason_default as RoutingTransactionFailureReason,
|
|
1458
1464
|
TransactionStatus_default as TransactionStatus,
|
|
1459
1465
|
TransactionType_default as TransactionType,
|