@lightsparkdev/lightspark-sdk 1.1.4 → 1.1.5
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 +8 -0
- package/dist/{chunk-PZMOKVDK.js → chunk-7UNNCH5S.js} +88 -6
- package/dist/{index-2ac27fbd.d.ts → index-5235e43b.d.ts} +57 -8
- package/dist/index.cjs +90 -10
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -5
- package/dist/objects/index.cjs +88 -6
- package/dist/objects/index.d.ts +1 -1
- package/dist/objects/index.js +1 -1
- package/package.json +2 -4
- package/src/objects/Account.ts +1 -0
- package/src/objects/ChannelSnapshot.ts +57 -0
- package/src/objects/Entity.ts +28 -0
- package/src/objects/IdAndSignature.ts +2 -0
- package/src/objects/LightningTransaction.ts +2 -0
- package/src/objects/OutgoingPayment.ts +30 -0
- package/src/objects/OutgoingPaymentAttempt.ts +35 -0
- package/src/objects/RegisterPaymentInput.ts +14 -0
- package/src/objects/ReleaseChannelPerCommitmentSecretInput.ts +3 -0
- package/src/objects/ReleaseChannelPerCommitmentSecretOutput.ts +1 -0
- package/src/objects/ReleasePaymentPreimageOutput.ts +1 -0
- package/src/objects/RemoteSigningSubEventType.ts +2 -0
- package/src/objects/ScreenNodeInput.ts +5 -0
- package/src/objects/SetInvoicePaymentHashInput.ts +5 -2
- package/src/objects/SignInvoiceInput.ts +3 -0
- package/src/objects/SignInvoiceOutput.ts +1 -0
- package/src/objects/SignMessagesInput.ts +1 -0
- package/src/objects/SignMessagesOutput.ts +1 -0
- package/src/objects/SignablePayloadStatus.ts +2 -0
- package/src/objects/Transaction.ts +2 -0
- package/src/objects/Wallet.ts +1 -0
- package/src/objects/WebhookEventType.ts +6 -0
- package/src/objects/WithdrawalRequestStatus.ts +2 -0
- package/src/objects/index.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -2941,6 +2941,15 @@ import autoBind10 from "auto-bind";
|
|
|
2941
2941
|
// src/objects/OutgoingPaymentAttempt.ts
|
|
2942
2942
|
import autoBind9 from "auto-bind";
|
|
2943
2943
|
|
|
2944
|
+
// src/objects/ChannelSnapshot.ts
|
|
2945
|
+
var ChannelSnapshotFromJson = (obj) => {
|
|
2946
|
+
return {
|
|
2947
|
+
localBalance: !!obj["channel_snapshot_local_balance"] ? CurrencyAmountFromJson(obj["channel_snapshot_local_balance"]) : void 0,
|
|
2948
|
+
localUnsettledBalance: !!obj["channel_snapshot_local_unsettled_balance"] ? CurrencyAmountFromJson(obj["channel_snapshot_local_unsettled_balance"]) : void 0,
|
|
2949
|
+
localChannelReserve: !!obj["channel_snapshot_local_channel_reserve"] ? CurrencyAmountFromJson(obj["channel_snapshot_local_channel_reserve"]) : void 0
|
|
2950
|
+
};
|
|
2951
|
+
};
|
|
2952
|
+
|
|
2944
2953
|
// src/objects/HtlcAttemptFailureCode.ts
|
|
2945
2954
|
var HtlcAttemptFailureCode = /* @__PURE__ */ ((HtlcAttemptFailureCode2) => {
|
|
2946
2955
|
HtlcAttemptFailureCode2["FUTURE_VALUE"] = "FUTURE_VALUE";
|
|
@@ -3063,7 +3072,7 @@ var OutgoingPaymentAttemptToHopsConnectionFromJson = (obj) => {
|
|
|
3063
3072
|
|
|
3064
3073
|
// src/objects/OutgoingPaymentAttempt.ts
|
|
3065
3074
|
var OutgoingPaymentAttempt = class {
|
|
3066
|
-
constructor(id, createdAt, updatedAt, status, outgoingPaymentId, typename, failureCode, failureSourceIndex, resolvedAt, amount, fees) {
|
|
3075
|
+
constructor(id, createdAt, updatedAt, status, outgoingPaymentId, typename, failureCode, failureSourceIndex, resolvedAt, amount, fees, channelSnapshot) {
|
|
3067
3076
|
this.id = id;
|
|
3068
3077
|
this.createdAt = createdAt;
|
|
3069
3078
|
this.updatedAt = updatedAt;
|
|
@@ -3075,6 +3084,7 @@ var OutgoingPaymentAttempt = class {
|
|
|
3075
3084
|
this.resolvedAt = resolvedAt;
|
|
3076
3085
|
this.amount = amount;
|
|
3077
3086
|
this.fees = fees;
|
|
3087
|
+
this.channelSnapshot = channelSnapshot;
|
|
3078
3088
|
autoBind9(this);
|
|
3079
3089
|
}
|
|
3080
3090
|
async getHops(client, first = void 0, after = void 0) {
|
|
@@ -3163,7 +3173,10 @@ var OutgoingPaymentAttemptFromJson = (obj) => {
|
|
|
3163
3173
|
obj["outgoing_payment_attempt_failure_source_index"],
|
|
3164
3174
|
obj["outgoing_payment_attempt_resolved_at"],
|
|
3165
3175
|
!!obj["outgoing_payment_attempt_amount"] ? CurrencyAmountFromJson(obj["outgoing_payment_attempt_amount"]) : void 0,
|
|
3166
|
-
!!obj["outgoing_payment_attempt_fees"] ? CurrencyAmountFromJson(obj["outgoing_payment_attempt_fees"]) : void 0
|
|
3176
|
+
!!obj["outgoing_payment_attempt_fees"] ? CurrencyAmountFromJson(obj["outgoing_payment_attempt_fees"]) : void 0,
|
|
3177
|
+
!!obj["outgoing_payment_attempt_channel_snapshot"] ? ChannelSnapshotFromJson(
|
|
3178
|
+
obj["outgoing_payment_attempt_channel_snapshot"]
|
|
3179
|
+
) : void 0
|
|
3167
3180
|
);
|
|
3168
3181
|
};
|
|
3169
3182
|
var FRAGMENT14 = `
|
|
@@ -3195,6 +3208,33 @@ fragment OutgoingPaymentAttemptFragment on OutgoingPaymentAttempt {
|
|
|
3195
3208
|
outgoing_payment_attempt_outgoing_payment: outgoing_payment {
|
|
3196
3209
|
id
|
|
3197
3210
|
}
|
|
3211
|
+
outgoing_payment_attempt_channel_snapshot: channel_snapshot {
|
|
3212
|
+
__typename
|
|
3213
|
+
channel_snapshot_local_balance: local_balance {
|
|
3214
|
+
__typename
|
|
3215
|
+
currency_amount_original_value: original_value
|
|
3216
|
+
currency_amount_original_unit: original_unit
|
|
3217
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3218
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3219
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3220
|
+
}
|
|
3221
|
+
channel_snapshot_local_unsettled_balance: local_unsettled_balance {
|
|
3222
|
+
__typename
|
|
3223
|
+
currency_amount_original_value: original_value
|
|
3224
|
+
currency_amount_original_unit: original_unit
|
|
3225
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3226
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3227
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3228
|
+
}
|
|
3229
|
+
channel_snapshot_local_channel_reserve: local_channel_reserve {
|
|
3230
|
+
__typename
|
|
3231
|
+
currency_amount_original_value: original_value
|
|
3232
|
+
currency_amount_original_unit: original_unit
|
|
3233
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3234
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3235
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3236
|
+
}
|
|
3237
|
+
}
|
|
3198
3238
|
}`;
|
|
3199
3239
|
var OutgoingPaymentAttempt_default = OutgoingPaymentAttempt;
|
|
3200
3240
|
|
|
@@ -3260,7 +3300,7 @@ var RichTextFromJson = (obj) => {
|
|
|
3260
3300
|
|
|
3261
3301
|
// src/objects/OutgoingPayment.ts
|
|
3262
3302
|
var OutgoingPayment = class {
|
|
3263
|
-
constructor(id, createdAt, updatedAt, status, amount, originId, typename, resolvedAt, transactionHash, destinationId, fees, paymentRequestData, failureReason, failureMessage, umaPostTransactionData) {
|
|
3303
|
+
constructor(id, createdAt, updatedAt, status, amount, originId, typename, resolvedAt, transactionHash, destinationId, fees, paymentRequestData, failureReason, failureMessage, umaPostTransactionData, paymentPreimage) {
|
|
3264
3304
|
this.id = id;
|
|
3265
3305
|
this.createdAt = createdAt;
|
|
3266
3306
|
this.updatedAt = updatedAt;
|
|
@@ -3276,6 +3316,7 @@ var OutgoingPayment = class {
|
|
|
3276
3316
|
this.failureReason = failureReason;
|
|
3277
3317
|
this.failureMessage = failureMessage;
|
|
3278
3318
|
this.umaPostTransactionData = umaPostTransactionData;
|
|
3319
|
+
this.paymentPreimage = paymentPreimage;
|
|
3279
3320
|
autoBind10(this);
|
|
3280
3321
|
}
|
|
3281
3322
|
async getAttempts(client, first = void 0, after = void 0) {
|
|
@@ -3322,6 +3363,33 @@ query FetchOutgoingPaymentToAttemptsConnection($entity_id: ID!, $first: Int, $af
|
|
|
3322
3363
|
outgoing_payment_attempt_outgoing_payment: outgoing_payment {
|
|
3323
3364
|
id
|
|
3324
3365
|
}
|
|
3366
|
+
outgoing_payment_attempt_channel_snapshot: channel_snapshot {
|
|
3367
|
+
__typename
|
|
3368
|
+
channel_snapshot_local_balance: local_balance {
|
|
3369
|
+
__typename
|
|
3370
|
+
currency_amount_original_value: original_value
|
|
3371
|
+
currency_amount_original_unit: original_unit
|
|
3372
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3373
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3374
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3375
|
+
}
|
|
3376
|
+
channel_snapshot_local_unsettled_balance: local_unsettled_balance {
|
|
3377
|
+
__typename
|
|
3378
|
+
currency_amount_original_value: original_value
|
|
3379
|
+
currency_amount_original_unit: original_unit
|
|
3380
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3381
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3382
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3383
|
+
}
|
|
3384
|
+
channel_snapshot_local_channel_reserve: local_channel_reserve {
|
|
3385
|
+
__typename
|
|
3386
|
+
currency_amount_original_value: original_value
|
|
3387
|
+
currency_amount_original_unit: original_unit
|
|
3388
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3389
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3390
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3391
|
+
}
|
|
3392
|
+
}
|
|
3325
3393
|
}
|
|
3326
3394
|
}
|
|
3327
3395
|
}
|
|
@@ -3371,7 +3439,8 @@ var OutgoingPaymentFromJson = (obj) => {
|
|
|
3371
3439
|
!!obj["outgoing_payment_failure_message"] ? RichTextFromJson(obj["outgoing_payment_failure_message"]) : void 0,
|
|
3372
3440
|
obj["outgoing_payment_uma_post_transaction_data"]?.map(
|
|
3373
3441
|
(e) => PostTransactionDataFromJson(e)
|
|
3374
|
-
)
|
|
3442
|
+
),
|
|
3443
|
+
obj["outgoing_payment_payment_preimage"]
|
|
3375
3444
|
);
|
|
3376
3445
|
};
|
|
3377
3446
|
var FRAGMENT15 = `
|
|
@@ -3662,6 +3731,7 @@ fragment OutgoingPaymentFragment on OutgoingPayment {
|
|
|
3662
3731
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3663
3732
|
}
|
|
3664
3733
|
}
|
|
3734
|
+
outgoing_payment_payment_preimage: payment_preimage
|
|
3665
3735
|
}`;
|
|
3666
3736
|
var OutgoingPayment_default = OutgoingPayment;
|
|
3667
3737
|
|
|
@@ -3768,7 +3838,8 @@ var TransactionFromJson = (obj) => {
|
|
|
3768
3838
|
!!obj["outgoing_payment_failure_message"] ? RichTextFromJson(obj["outgoing_payment_failure_message"]) : void 0,
|
|
3769
3839
|
obj["outgoing_payment_uma_post_transaction_data"]?.map(
|
|
3770
3840
|
(e) => PostTransactionDataFromJson(e)
|
|
3771
|
-
)
|
|
3841
|
+
),
|
|
3842
|
+
obj["outgoing_payment_payment_preimage"]
|
|
3772
3843
|
);
|
|
3773
3844
|
}
|
|
3774
3845
|
if (obj["__typename"] == "RoutingTransaction") {
|
|
@@ -4232,6 +4303,7 @@ fragment TransactionFragment on Transaction {
|
|
|
4232
4303
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
4233
4304
|
}
|
|
4234
4305
|
}
|
|
4306
|
+
outgoing_payment_payment_preimage: payment_preimage
|
|
4235
4307
|
}
|
|
4236
4308
|
... on RoutingTransaction {
|
|
4237
4309
|
__typename
|
|
@@ -4853,6 +4925,7 @@ query FetchWalletToTransactionsConnection($entity_id: ID!, $first: Int, $after:
|
|
|
4853
4925
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
4854
4926
|
}
|
|
4855
4927
|
}
|
|
4928
|
+
outgoing_payment_payment_preimage: payment_preimage
|
|
4856
4929
|
}
|
|
4857
4930
|
... on RoutingTransaction {
|
|
4858
4931
|
__typename
|
|
@@ -6403,6 +6476,7 @@ query FetchAccountToTransactionsConnection($first: Int, $after: String, $types:
|
|
|
6403
6476
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6404
6477
|
}
|
|
6405
6478
|
}
|
|
6479
|
+
outgoing_payment_payment_preimage: payment_preimage
|
|
6406
6480
|
}
|
|
6407
6481
|
... on RoutingTransaction {
|
|
6408
6482
|
__typename
|
|
@@ -7055,6 +7129,7 @@ var SignablePayloadStatus = /* @__PURE__ */ ((SignablePayloadStatus2) => {
|
|
|
7055
7129
|
SignablePayloadStatus2["CREATED"] = "CREATED";
|
|
7056
7130
|
SignablePayloadStatus2["SIGNED"] = "SIGNED";
|
|
7057
7131
|
SignablePayloadStatus2["VALIDATION_FAILED"] = "VALIDATION_FAILED";
|
|
7132
|
+
SignablePayloadStatus2["INVALID_SIGNATURE"] = "INVALID_SIGNATURE";
|
|
7058
7133
|
return SignablePayloadStatus2;
|
|
7059
7134
|
})(SignablePayloadStatus || {});
|
|
7060
7135
|
var SignablePayloadStatus_default = SignablePayloadStatus;
|
|
@@ -7542,7 +7617,8 @@ var LightningTransactionFromJson = (obj) => {
|
|
|
7542
7617
|
!!obj["outgoing_payment_failure_message"] ? RichTextFromJson(obj["outgoing_payment_failure_message"]) : void 0,
|
|
7543
7618
|
obj["outgoing_payment_uma_post_transaction_data"]?.map(
|
|
7544
7619
|
(e) => PostTransactionDataFromJson(e)
|
|
7545
|
-
)
|
|
7620
|
+
),
|
|
7621
|
+
obj["outgoing_payment_payment_preimage"]
|
|
7546
7622
|
);
|
|
7547
7623
|
}
|
|
7548
7624
|
if (obj["__typename"] == "RoutingTransaction") {
|
|
@@ -7892,6 +7968,7 @@ fragment LightningTransactionFragment on LightningTransaction {
|
|
|
7892
7968
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
7893
7969
|
}
|
|
7894
7970
|
}
|
|
7971
|
+
outgoing_payment_payment_preimage: payment_preimage
|
|
7895
7972
|
}
|
|
7896
7973
|
... on RoutingTransaction {
|
|
7897
7974
|
__typename
|
|
@@ -8295,6 +8372,7 @@ var RemoteSigningSubEventType = /* @__PURE__ */ ((RemoteSigningSubEventType2) =>
|
|
|
8295
8372
|
RemoteSigningSubEventType2["DERIVE_KEY_AND_SIGN"] = "DERIVE_KEY_AND_SIGN";
|
|
8296
8373
|
RemoteSigningSubEventType2["RELEASE_PAYMENT_PREIMAGE"] = "RELEASE_PAYMENT_PREIMAGE";
|
|
8297
8374
|
RemoteSigningSubEventType2["REQUEST_INVOICE_PAYMENT_HASH"] = "REQUEST_INVOICE_PAYMENT_HASH";
|
|
8375
|
+
RemoteSigningSubEventType2["REVEAL_COUNTERPARTY_PER_COMMITMENT_SECRET"] = "REVEAL_COUNTERPARTY_PER_COMMITMENT_SECRET";
|
|
8298
8376
|
return RemoteSigningSubEventType2;
|
|
8299
8377
|
})(RemoteSigningSubEventType || {});
|
|
8300
8378
|
var RemoteSigningSubEventType_default = RemoteSigningSubEventType;
|
|
@@ -8478,6 +8556,8 @@ fragment TransactionUpdateFragment on Transaction {
|
|
|
8478
8556
|
var WebhookEventType = /* @__PURE__ */ ((WebhookEventType2) => {
|
|
8479
8557
|
WebhookEventType2["FUTURE_VALUE"] = "FUTURE_VALUE";
|
|
8480
8558
|
WebhookEventType2["PAYMENT_FINISHED"] = "PAYMENT_FINISHED";
|
|
8559
|
+
WebhookEventType2["WITHDRAWAL_FINISHED"] = "WITHDRAWAL_FINISHED";
|
|
8560
|
+
WebhookEventType2["FUNDS_RECEIVED"] = "FUNDS_RECEIVED";
|
|
8481
8561
|
WebhookEventType2["NODE_STATUS"] = "NODE_STATUS";
|
|
8482
8562
|
WebhookEventType2["WALLET_STATUS"] = "WALLET_STATUS";
|
|
8483
8563
|
WebhookEventType2["WALLET_OUTGOING_PAYMENT_FINISHED"] = "WALLET_OUTGOING_PAYMENT_FINISHED";
|
|
@@ -8485,6 +8565,7 @@ var WebhookEventType = /* @__PURE__ */ ((WebhookEventType2) => {
|
|
|
8485
8565
|
WebhookEventType2["WALLET_WITHDRAWAL_FINISHED"] = "WALLET_WITHDRAWAL_FINISHED";
|
|
8486
8566
|
WebhookEventType2["WALLET_FUNDS_RECEIVED"] = "WALLET_FUNDS_RECEIVED";
|
|
8487
8567
|
WebhookEventType2["REMOTE_SIGNING"] = "REMOTE_SIGNING";
|
|
8568
|
+
WebhookEventType2["LOW_BALANCE"] = "LOW_BALANCE";
|
|
8488
8569
|
return WebhookEventType2;
|
|
8489
8570
|
})(WebhookEventType || {});
|
|
8490
8571
|
var WebhookEventType_default = WebhookEventType;
|
|
@@ -8565,6 +8646,7 @@ import autoBind13 from "auto-bind";
|
|
|
8565
8646
|
// src/objects/WithdrawalRequestStatus.ts
|
|
8566
8647
|
var WithdrawalRequestStatus = /* @__PURE__ */ ((WithdrawalRequestStatus2) => {
|
|
8567
8648
|
WithdrawalRequestStatus2["FUTURE_VALUE"] = "FUTURE_VALUE";
|
|
8649
|
+
WithdrawalRequestStatus2["CREATED"] = "CREATED";
|
|
8568
8650
|
WithdrawalRequestStatus2["FAILED"] = "FAILED";
|
|
8569
8651
|
WithdrawalRequestStatus2["IN_PROGRESS"] = "IN_PROGRESS";
|
|
8570
8652
|
WithdrawalRequestStatus2["SUCCESSFUL"] = "SUCCESSFUL";
|
|
@@ -923,6 +923,12 @@ declare enum InvoiceType {
|
|
|
923
923
|
AMP = "AMP"
|
|
924
924
|
}
|
|
925
925
|
|
|
926
|
+
type ChannelSnapshot = {
|
|
927
|
+
localBalance?: CurrencyAmount;
|
|
928
|
+
localUnsettledBalance?: CurrencyAmount;
|
|
929
|
+
localChannelReserve?: CurrencyAmount;
|
|
930
|
+
};
|
|
931
|
+
|
|
926
932
|
/** This is an enum representing a particular reason why an htlc sent over the Lightning Network may have failed. **/
|
|
927
933
|
declare enum HtlcAttemptFailureCode {
|
|
928
934
|
/**
|
|
@@ -1027,7 +1033,8 @@ declare class OutgoingPaymentAttempt implements Entity {
|
|
|
1027
1033
|
readonly resolvedAt?: string | undefined;
|
|
1028
1034
|
readonly amount?: CurrencyAmount | undefined;
|
|
1029
1035
|
readonly fees?: CurrencyAmount | undefined;
|
|
1030
|
-
|
|
1036
|
+
readonly channelSnapshot?: ChannelSnapshot | undefined;
|
|
1037
|
+
constructor(id: string, createdAt: string, updatedAt: string, status: OutgoingPaymentAttemptStatus, outgoingPaymentId: string, typename: string, failureCode?: HtlcAttemptFailureCode | undefined, failureSourceIndex?: number | undefined, resolvedAt?: string | undefined, amount?: CurrencyAmount | undefined, fees?: CurrencyAmount | undefined, channelSnapshot?: ChannelSnapshot | undefined);
|
|
1031
1038
|
getHops(client: LightsparkClient, first?: number | undefined, after?: string | undefined): Promise<OutgoingPaymentAttemptToHopsConnection>;
|
|
1032
1039
|
static getOutgoingPaymentAttemptQuery(id: string): Query<OutgoingPaymentAttempt>;
|
|
1033
1040
|
}
|
|
@@ -1068,7 +1075,8 @@ declare class OutgoingPayment implements LightningTransaction {
|
|
|
1068
1075
|
readonly failureReason?: PaymentFailureReason | undefined;
|
|
1069
1076
|
readonly failureMessage?: RichText | undefined;
|
|
1070
1077
|
readonly umaPostTransactionData?: PostTransactionData[] | undefined;
|
|
1071
|
-
|
|
1078
|
+
readonly paymentPreimage?: string | undefined;
|
|
1079
|
+
constructor(id: string, createdAt: string, updatedAt: string, status: TransactionStatus, amount: CurrencyAmount, originId: string, typename: string, resolvedAt?: string | undefined, transactionHash?: string | undefined, destinationId?: string | undefined, fees?: CurrencyAmount | undefined, paymentRequestData?: PaymentRequestData | undefined, failureReason?: PaymentFailureReason | undefined, failureMessage?: RichText | undefined, umaPostTransactionData?: PostTransactionData[] | undefined, paymentPreimage?: string | undefined);
|
|
1072
1080
|
getAttempts(client: LightsparkClient, first?: number | undefined, after?: string | undefined): Promise<OutgoingPaymentToAttemptsConnection>;
|
|
1073
1081
|
static getOutgoingPaymentQuery(id: string): Query<OutgoingPayment>;
|
|
1074
1082
|
}
|
|
@@ -1136,6 +1144,7 @@ declare enum WithdrawalRequestStatus {
|
|
|
1136
1144
|
* Clients should support unknown values as more of them could be added without notice.
|
|
1137
1145
|
*/
|
|
1138
1146
|
FUTURE_VALUE = "FUTURE_VALUE",
|
|
1147
|
+
CREATED = "CREATED",
|
|
1139
1148
|
FAILED = "FAILED",
|
|
1140
1149
|
IN_PROGRESS = "IN_PROGRESS",
|
|
1141
1150
|
SUCCESSFUL = "SUCCESSFUL"
|
|
@@ -1788,7 +1797,8 @@ declare enum SignablePayloadStatus {
|
|
|
1788
1797
|
FUTURE_VALUE = "FUTURE_VALUE",
|
|
1789
1798
|
CREATED = "CREATED",
|
|
1790
1799
|
SIGNED = "SIGNED",
|
|
1791
|
-
VALIDATION_FAILED = "VALIDATION_FAILED"
|
|
1800
|
+
VALIDATION_FAILED = "VALIDATION_FAILED",
|
|
1801
|
+
INVALID_SIGNATURE = "INVALID_SIGNATURE"
|
|
1792
1802
|
}
|
|
1793
1803
|
|
|
1794
1804
|
type SignablePayload = Entity & {
|
|
@@ -1902,7 +1912,9 @@ declare class GraphNode implements Node {
|
|
|
1902
1912
|
}
|
|
1903
1913
|
|
|
1904
1914
|
type IdAndSignature = {
|
|
1915
|
+
/** The id of the message. **/
|
|
1905
1916
|
id: string;
|
|
1917
|
+
/** The signature of the message. **/
|
|
1906
1918
|
signature: string;
|
|
1907
1919
|
};
|
|
1908
1920
|
|
|
@@ -2042,9 +2054,23 @@ type PayUmaInvoiceInput = {
|
|
|
2042
2054
|
};
|
|
2043
2055
|
|
|
2044
2056
|
type RegisterPaymentInput = {
|
|
2057
|
+
/**
|
|
2058
|
+
* The compliance provider that is going to screen the node. You need to be a customer of the selected
|
|
2059
|
+
* provider and store the API key on the Lightspark account setting page.
|
|
2060
|
+
**/
|
|
2045
2061
|
provider: ComplianceProvider;
|
|
2062
|
+
/**
|
|
2063
|
+
* The Lightspark ID of the lightning payment you want to register. It can be the id of either an
|
|
2064
|
+
* OutgoingPayment or an IncomingPayment.
|
|
2065
|
+
**/
|
|
2046
2066
|
paymentId: string;
|
|
2067
|
+
/**
|
|
2068
|
+
* The public key of the counterparty lightning node, which would be the public key of the recipient
|
|
2069
|
+
* node if it is to register an outgoing payment, or the public key of the sender node if it is to
|
|
2070
|
+
* register an incoming payment.
|
|
2071
|
+
**/
|
|
2047
2072
|
nodePubkey: string;
|
|
2073
|
+
/** Indicates whether this payment is an OutgoingPayment or an IncomingPayment. **/
|
|
2048
2074
|
direction: PaymentDirection;
|
|
2049
2075
|
};
|
|
2050
2076
|
|
|
@@ -2053,12 +2079,16 @@ type RegisterPaymentOutput = {
|
|
|
2053
2079
|
};
|
|
2054
2080
|
|
|
2055
2081
|
type ReleaseChannelPerCommitmentSecretInput = {
|
|
2082
|
+
/** The unique identifier of the channel. **/
|
|
2056
2083
|
channelId: string;
|
|
2084
|
+
/** The per-commitment secret to be released. **/
|
|
2057
2085
|
perCommitmentSecret: string;
|
|
2086
|
+
/** The index associated with the per-commitment secret. **/
|
|
2058
2087
|
perCommitmentIndex: number;
|
|
2059
2088
|
};
|
|
2060
2089
|
|
|
2061
2090
|
type ReleaseChannelPerCommitmentSecretOutput = {
|
|
2091
|
+
/** The channel object after the per-commitment secret release operation. **/
|
|
2062
2092
|
channelId: string;
|
|
2063
2093
|
};
|
|
2064
2094
|
|
|
@@ -2070,6 +2100,7 @@ type ReleasePaymentPreimageInput = {
|
|
|
2070
2100
|
};
|
|
2071
2101
|
|
|
2072
2102
|
type ReleasePaymentPreimageOutput = {
|
|
2103
|
+
/** The invoice of the transaction. **/
|
|
2073
2104
|
invoiceId: string;
|
|
2074
2105
|
};
|
|
2075
2106
|
|
|
@@ -2086,7 +2117,8 @@ declare enum RemoteSigningSubEventType {
|
|
|
2086
2117
|
SIGN_INVOICE = "SIGN_INVOICE",
|
|
2087
2118
|
DERIVE_KEY_AND_SIGN = "DERIVE_KEY_AND_SIGN",
|
|
2088
2119
|
RELEASE_PAYMENT_PREIMAGE = "RELEASE_PAYMENT_PREIMAGE",
|
|
2089
|
-
REQUEST_INVOICE_PAYMENT_HASH = "REQUEST_INVOICE_PAYMENT_HASH"
|
|
2120
|
+
REQUEST_INVOICE_PAYMENT_HASH = "REQUEST_INVOICE_PAYMENT_HASH",
|
|
2121
|
+
REVEAL_COUNTERPARTY_PER_COMMITMENT_SECRET = "REVEAL_COUNTERPARTY_PER_COMMITMENT_SECRET"
|
|
2090
2122
|
}
|
|
2091
2123
|
|
|
2092
2124
|
type RequestWithdrawalInput = {
|
|
@@ -2158,7 +2190,12 @@ type RoutingTransaction = LightningTransaction & Transaction & Entity & {
|
|
|
2158
2190
|
declare const getRoutingTransactionQuery: (id: string) => Query<RoutingTransaction>;
|
|
2159
2191
|
|
|
2160
2192
|
type ScreenNodeInput = {
|
|
2193
|
+
/**
|
|
2194
|
+
* The compliance provider that is going to screen the node. You need to be a customer of the selected
|
|
2195
|
+
* provider and store the API key on the Lightspark account setting page.
|
|
2196
|
+
**/
|
|
2161
2197
|
provider: ComplianceProvider;
|
|
2198
|
+
/** The public key of the lightning node that needs to be screened. **/
|
|
2162
2199
|
nodePubkey: string;
|
|
2163
2200
|
};
|
|
2164
2201
|
|
|
@@ -2189,8 +2226,11 @@ type SetInvoicePaymentHashInput = {
|
|
|
2189
2226
|
invoiceId: string;
|
|
2190
2227
|
/** The 32-byte hash of the payment preimage. **/
|
|
2191
2228
|
paymentHash: string;
|
|
2192
|
-
/**
|
|
2193
|
-
|
|
2229
|
+
/**
|
|
2230
|
+
* The 32-byte nonce used to generate the invoice preimage if applicable. It will later be included in
|
|
2231
|
+
* RELEASE_PAYMENT_PREIMAGE webhook to help recover the raw preimage.
|
|
2232
|
+
**/
|
|
2233
|
+
preimageNonce?: string;
|
|
2194
2234
|
};
|
|
2195
2235
|
|
|
2196
2236
|
type SetInvoicePaymentHashOutput = {
|
|
@@ -2213,20 +2253,26 @@ type Signable = Entity & {
|
|
|
2213
2253
|
declare const getSignableQuery: (id: string) => Query<Signable>;
|
|
2214
2254
|
|
|
2215
2255
|
type SignInvoiceInput = {
|
|
2256
|
+
/** The unique identifier of the invoice to be signed. **/
|
|
2216
2257
|
invoiceId: string;
|
|
2258
|
+
/** The cryptographic signature for the invoice. **/
|
|
2217
2259
|
signature: string;
|
|
2260
|
+
/** The recovery identifier for the signature. **/
|
|
2218
2261
|
recoveryId: number;
|
|
2219
2262
|
};
|
|
2220
2263
|
|
|
2221
2264
|
type SignInvoiceOutput = {
|
|
2265
|
+
/** The signed invoice object. **/
|
|
2222
2266
|
invoiceId: string;
|
|
2223
2267
|
};
|
|
2224
2268
|
|
|
2225
2269
|
type SignMessagesInput = {
|
|
2270
|
+
/** The list of the message ids and signatures. **/
|
|
2226
2271
|
signatures: IdAndSignature[];
|
|
2227
2272
|
};
|
|
2228
2273
|
|
|
2229
2274
|
type SignMessagesOutput = {
|
|
2275
|
+
/** The list of signed payloads. **/
|
|
2230
2276
|
signedPayloads: SignablePayload[];
|
|
2231
2277
|
};
|
|
2232
2278
|
|
|
@@ -2257,13 +2303,16 @@ declare enum WebhookEventType {
|
|
|
2257
2303
|
*/
|
|
2258
2304
|
FUTURE_VALUE = "FUTURE_VALUE",
|
|
2259
2305
|
PAYMENT_FINISHED = "PAYMENT_FINISHED",
|
|
2306
|
+
WITHDRAWAL_FINISHED = "WITHDRAWAL_FINISHED",
|
|
2307
|
+
FUNDS_RECEIVED = "FUNDS_RECEIVED",
|
|
2260
2308
|
NODE_STATUS = "NODE_STATUS",
|
|
2261
2309
|
WALLET_STATUS = "WALLET_STATUS",
|
|
2262
2310
|
WALLET_OUTGOING_PAYMENT_FINISHED = "WALLET_OUTGOING_PAYMENT_FINISHED",
|
|
2263
2311
|
WALLET_INCOMING_PAYMENT_FINISHED = "WALLET_INCOMING_PAYMENT_FINISHED",
|
|
2264
2312
|
WALLET_WITHDRAWAL_FINISHED = "WALLET_WITHDRAWAL_FINISHED",
|
|
2265
2313
|
WALLET_FUNDS_RECEIVED = "WALLET_FUNDS_RECEIVED",
|
|
2266
|
-
REMOTE_SIGNING = "REMOTE_SIGNING"
|
|
2314
|
+
REMOTE_SIGNING = "REMOTE_SIGNING",
|
|
2315
|
+
LOW_BALANCE = "LOW_BALANCE"
|
|
2267
2316
|
}
|
|
2268
2317
|
|
|
2269
2318
|
/** This object represents an L1 withdrawal from your Lightspark Node to any Bitcoin wallet. You can retrieve this object to receive detailed information about any L1 withdrawal associated with your Lightspark Node or account. **/
|
|
@@ -2311,4 +2360,4 @@ type Withdrawal = OnChainTransaction & Transaction & Entity & {
|
|
|
2311
2360
|
};
|
|
2312
2361
|
declare const getWithdrawalQuery: (id: string) => Query<Withdrawal>;
|
|
2313
2362
|
|
|
2314
|
-
export {
|
|
2363
|
+
export { IncomingPayment as $, Account as A, Balances as B, Channel as C, CreateTestModeInvoiceInput as D, CreateTestModeInvoiceOutput as E, CreateTestModePaymentInput as F, CreateTestModePaymentoutput as G, CreateUmaInvoiceInput as H, CurrencyAmount as I, CurrencyUnit as J, DeclineToSignMessagesInput as K, LightsparkClient as L, DeclineToSignMessagesOutput as M, DeleteApiTokenInput as N, DeleteApiTokenOutput as O, Deposit as P, getDepositQuery as Q, Entity as R, FeeEstimate as S, FundNodeInput as T, FundNodeOutput as U, GraphNode as V, WebhookEventType as W, Hop as X, getHopQuery as Y, HtlcAttemptFailureCode as Z, IdAndSignature as _, AccountToApiTokensConnection as a, SendPaymentOutput as a$, IncomingPaymentAttempt as a0, getIncomingPaymentAttemptQuery as a1, IncomingPaymentAttemptStatus as a2, IncomingPaymentToAttemptsConnection as a3, Invoice as a4, getInvoiceQuery as a5, InvoiceData as a6, InvoiceType as a7, LightningFeeEstimateForInvoiceInput as a8, LightningFeeEstimateForNodeInput as a9, PaymentDirection as aA, PaymentFailureReason as aB, PaymentRequest as aC, getPaymentRequestQuery as aD, PaymentRequestData as aE, PaymentRequestStatus as aF, PayUmaInvoiceInput as aG, Permission as aH, PostTransactionData as aI, RegisterPaymentInput as aJ, RegisterPaymentOutput as aK, ReleaseChannelPerCommitmentSecretInput as aL, ReleaseChannelPerCommitmentSecretOutput as aM, ReleasePaymentPreimageInput as aN, ReleasePaymentPreimageOutput as aO, RemoteSigningSubEventType as aP, RequestWithdrawalInput as aQ, RequestWithdrawalOutput as aR, RichText as aS, RiskRating as aT, RoutingTransaction as aU, getRoutingTransactionQuery as aV, RoutingTransactionFailureReason as aW, ScreenNodeInput as aX, ScreenNodeOutput as aY, Secret as aZ, SendPaymentInput as a_, LightningFeeEstimateOutput as aa, LightningTransaction as ab, getLightningTransactionQuery as ac, LightsparkNode as ad, LightsparkNodeOwner as ae, getLightsparkNodeOwnerQuery as af, LightsparkNodeStatus as ag, LightsparkNodeToChannelsConnection as ah, LightsparkNodeWithOSK as ai, LightsparkNodeWithRemoteSigning as aj, Node as ak, NodeAddress as al, NodeAddressType as am, NodeToAddressesConnection as an, OnChainTransaction as ao, getOnChainTransactionQuery as ap, OutgoingPayment as aq, OutgoingPaymentAttempt as ar, OutgoingPaymentAttemptStatus as as, OutgoingPaymentAttemptToHopsConnection as at, OutgoingPaymentsForInvoiceQueryInput as au, OutgoingPaymentsForInvoiceQueryOutput as av, OutgoingPaymentToAttemptsConnection as aw, PageInfo as ax, PayInvoiceInput as ay, PayInvoiceOutput as az, AccountToChannelsConnection as b, SetInvoicePaymentHashInput as b0, SetInvoicePaymentHashOutput as b1, Signable as b2, getSignableQuery as b3, SignablePayload as b4, getSignablePayloadQuery as b5, SignablePayloadStatus as b6, SignInvoiceInput as b7, SignInvoiceOutput as b8, SignMessagesInput as b9, SignMessagesOutput as ba, SingleNodeDashboard as bb, Transaction as bc, getTransactionQuery as bd, TransactionFailures as be, TransactionStatus as bf, TransactionType as bg, TransactionUpdate as bh, UpdateChannelPerCommitmentPointInput as bi, UpdateChannelPerCommitmentPointOutput as bj, UpdateNodeSharedSecretInput as bk, UpdateNodeSharedSecretOutput as bl, Wallet as bm, WalletStatus as bn, WalletToPaymentRequestsConnection as bo, WalletToTransactionsConnection as bp, Withdrawal as bq, getWithdrawalQuery as br, WithdrawalMode as bs, WithdrawalRequest as bt, WithdrawalRequestStatus as bu, WithdrawalRequestToChannelClosingTransactionsConnection as bv, WithdrawalRequestToChannelOpeningTransactionsConnection as bw, AccountToNodesConnection as c, AccountToPaymentRequestsConnection as d, AccountToTransactionsConnection as e, AccountToWalletsConnection as f, ApiToken as g, getApiTokenQuery as h, BlockchainBalance as i, ChannelClosingTransaction as j, getChannelClosingTransactionQuery as k, ChannelFees as l, ChannelOpeningTransaction as m, getChannelOpeningTransactionQuery as n, ChannelSnapshot as o, ChannelStatus as p, ChannelToTransactionsConnection as q, ComplianceProvider as r, Connection as s, CreateApiTokenInput as t, CreateApiTokenOutput as u, CreateInvoiceInput as v, CreateInvoiceOutput as w, CreateLnurlInvoiceInput as x, CreateNodeWalletAddressInput as y, CreateNodeWalletAddressOutput as z };
|