@lightsparkdev/lightspark-sdk 0.1.7 → 0.2.0
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 +11 -0
- package/dist/Withdrawal-ebb4865c.d.ts +1688 -0
- package/dist/chunk-XFOVS6EY.js +5524 -0
- package/dist/index.cjs +25 -9
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/objects/index.cjs +24 -8
- package/dist/objects/index.d.ts +1 -1
- package/dist/objects/index.js +1 -1
- package/package.json +2 -2
- package/src/client.ts +0 -1
- package/src/objects/Account.ts +2 -2
- package/src/objects/Entity.ts +10 -2
- package/src/objects/Invoice.ts +1 -1
- package/src/objects/InvoiceData.ts +10 -1
- package/src/objects/LightningTransaction.ts +1 -1
- package/src/objects/LightsparkNodeStatus.ts +2 -0
- package/src/objects/OutgoingPayment.ts +1 -1
- package/src/objects/PaymentRequest.ts +1 -1
- package/src/objects/PaymentRequestData.ts +1 -1
- package/src/objects/Transaction.ts +1 -1
- package/src/objects/WebhookEventType.ts +10 -0
- package/src/objects/WithdrawalRequest.ts +12 -0
|
@@ -10,6 +10,16 @@ export enum WebhookEventType {
|
|
|
10
10
|
PAYMENT_FINISHED = "PAYMENT_FINISHED",
|
|
11
11
|
|
|
12
12
|
NODE_STATUS = "NODE_STATUS",
|
|
13
|
+
|
|
14
|
+
WALLET_STATUS = "WALLET_STATUS",
|
|
15
|
+
|
|
16
|
+
WALLET_OUTGOING_PAYMENT_FINISHED = "WALLET_OUTGOING_PAYMENT_FINISHED",
|
|
17
|
+
|
|
18
|
+
WALLET_INCOMING_PAYMENT_FINISHED = "WALLET_INCOMING_PAYMENT_FINISHED",
|
|
19
|
+
|
|
20
|
+
WALLET_WITHDRAWAL_FINISHED = "WALLET_WITHDRAWAL_FINISHED",
|
|
21
|
+
|
|
22
|
+
WALLET_FUNDS_RECEIVED = "WALLET_FUNDS_RECEIVED",
|
|
13
23
|
}
|
|
14
24
|
|
|
15
25
|
export default WebhookEventType;
|
|
@@ -24,6 +24,7 @@ class WithdrawalRequest implements Entity {
|
|
|
24
24
|
public readonly withdrawalMode: WithdrawalMode,
|
|
25
25
|
public readonly status: WithdrawalRequestStatus,
|
|
26
26
|
public readonly typename: string,
|
|
27
|
+
public readonly estimatedAmount?: CurrencyAmount,
|
|
27
28
|
public readonly completedAt?: string,
|
|
28
29
|
public readonly withdrawalId?: string
|
|
29
30
|
) {
|
|
@@ -193,6 +194,9 @@ export const WithdrawalRequestFromJson = (obj: any): WithdrawalRequest => {
|
|
|
193
194
|
WithdrawalRequestStatus[obj["withdrawal_request_status"]] ??
|
|
194
195
|
WithdrawalRequestStatus.FUTURE_VALUE,
|
|
195
196
|
"WithdrawalRequest",
|
|
197
|
+
!!obj["withdrawal_request_estimated_amount"]
|
|
198
|
+
? CurrencyAmountFromJson(obj["withdrawal_request_estimated_amount"])
|
|
199
|
+
: undefined,
|
|
196
200
|
obj["withdrawal_request_completed_at"],
|
|
197
201
|
obj["withdrawal_request_withdrawal"]?.id ?? undefined
|
|
198
202
|
);
|
|
@@ -212,6 +216,14 @@ fragment WithdrawalRequestFragment on WithdrawalRequest {
|
|
|
212
216
|
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
213
217
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
214
218
|
}
|
|
219
|
+
withdrawal_request_estimated_amount: estimated_amount {
|
|
220
|
+
__typename
|
|
221
|
+
currency_amount_original_value: original_value
|
|
222
|
+
currency_amount_original_unit: original_unit
|
|
223
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
224
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
225
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
226
|
+
}
|
|
215
227
|
withdrawal_request_bitcoin_address: bitcoin_address
|
|
216
228
|
withdrawal_request_withdrawal_mode: withdrawal_mode
|
|
217
229
|
withdrawal_request_status: status
|