@lightsparkdev/lightspark-sdk 1.9.6 → 1.9.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.
- package/CHANGELOG.md +6 -0
- package/dist/{chunk-INED3BP4.js → chunk-BPPGK6J6.js} +3 -3
- package/dist/{index-B_qpP_0o.d.cts → index-B2mWcZea.d.cts} +49 -41
- package/dist/{index-CZqitvax.d.ts → index-BAeaSQSH.d.ts} +49 -41
- package/dist/index.cjs +243 -236
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +11 -4
- package/dist/objects/index.cjs +2 -2
- package/dist/objects/index.d.cts +1 -1
- package/dist/objects/index.d.ts +1 -1
- package/dist/objects/index.js +1 -1
- package/package.json +1 -1
- package/src/client.ts +9 -2
- package/src/objects/ChannelStatus.ts +2 -2
- package/src/objects/CurrencyUnit.ts +3 -2
- package/src/objects/Entity.ts +1 -1
- package/src/objects/TransactionStatus.ts +3 -2
- package/src/objects/UmaCurrencyAmount.ts +7 -4
- package/src/objects/UmaInvitation.ts +1 -1
- package/src/objects/WalletStatus.ts +2 -2
- package/src/tests/integration/general-regtest.test.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -10834,7 +10834,7 @@ ${FRAGMENT38}
|
|
|
10834
10834
|
var UmaCurrencyAmountFromJson = (obj) => {
|
|
10835
10835
|
return {
|
|
10836
10836
|
value: obj["uma_currency_amount_value"],
|
|
10837
|
-
|
|
10837
|
+
currency: UmaCurrencyFromJson(obj["uma_currency_amount_currency"])
|
|
10838
10838
|
};
|
|
10839
10839
|
};
|
|
10840
10840
|
|
|
@@ -10890,7 +10890,7 @@ fragment UmaInvitationFragment on UmaInvitation {
|
|
|
10890
10890
|
__typename
|
|
10891
10891
|
uma_currency_amount_value: value
|
|
10892
10892
|
uma_currency_amount_currency: currency {
|
|
10893
|
-
|
|
10893
|
+
code
|
|
10894
10894
|
}
|
|
10895
10895
|
}
|
|
10896
10896
|
uma_invitation_cancelled_at: cancelled_at
|
|
@@ -10982,6 +10982,7 @@ export {
|
|
|
10982
10982
|
getInvoiceQuery,
|
|
10983
10983
|
IncentivesIneligibilityReason_default,
|
|
10984
10984
|
IncentivesStatus_default,
|
|
10985
|
+
getUmaCurrencyQuery,
|
|
10985
10986
|
UmaInvitationStatus_default,
|
|
10986
10987
|
UmaInvitationFromJson,
|
|
10987
10988
|
FRAGMENT39 as FRAGMENT5,
|
|
@@ -11049,7 +11050,6 @@ export {
|
|
|
11049
11050
|
getRoutingTransactionQuery,
|
|
11050
11051
|
getSignableQuery,
|
|
11051
11052
|
TransactionType_default,
|
|
11052
|
-
getUmaCurrencyQuery,
|
|
11053
11053
|
WebhookEventType,
|
|
11054
11054
|
WebhookEventType_default
|
|
11055
11055
|
};
|
|
@@ -43,8 +43,9 @@ declare enum CurrencyUnit {
|
|
|
43
43
|
* commonly used in Lightning transactions. *
|
|
44
44
|
*/
|
|
45
45
|
SATOSHI = "SATOSHI",
|
|
46
|
-
/**
|
|
47
|
-
* possible.
|
|
46
|
+
/**
|
|
47
|
+
* 0.001 Satoshi, or 10e-11 Bitcoin. We recommend using the Satoshi unit instead when possible. *
|
|
48
|
+
*/
|
|
48
49
|
MILLISATOSHI = "MILLISATOSHI",
|
|
49
50
|
/** United States Dollar. **/
|
|
50
51
|
USD = "USD",
|
|
@@ -278,8 +279,8 @@ declare enum ChannelStatus {
|
|
|
278
279
|
*/
|
|
279
280
|
UNBALANCED_FOR_SEND = "UNBALANCED_FOR_SEND",
|
|
280
281
|
/**
|
|
281
|
-
* The channel is behaving properly, but its remote balance is much lower than its
|
|
282
|
-
*
|
|
282
|
+
* The channel is behaving properly, but its remote balance is much lower than its local balance
|
|
283
|
+
* so it is not balanced properly for receiving funds. *
|
|
283
284
|
*/
|
|
284
285
|
UNBALANCED_FOR_RECEIVE = "UNBALANCED_FOR_RECEIVE",
|
|
285
286
|
/**
|
|
@@ -858,8 +859,9 @@ declare enum TransactionStatus {
|
|
|
858
859
|
FAILED = "FAILED",
|
|
859
860
|
/** Transaction has been initiated and is currently in-flight. **/
|
|
860
861
|
PENDING = "PENDING",
|
|
861
|
-
/**
|
|
862
|
-
* request.
|
|
862
|
+
/**
|
|
863
|
+
* For transaction type PAYMENT_REQUEST only. No payments have been made to a payment request. *
|
|
864
|
+
*/
|
|
863
865
|
NOT_STARTED = "NOT_STARTED",
|
|
864
866
|
/** For transaction type PAYMENT_REQUEST only. A payment request has expired. **/
|
|
865
867
|
EXPIRED = "EXPIRED",
|
|
@@ -979,8 +981,8 @@ declare enum WalletStatus {
|
|
|
979
981
|
TERMINATING = "TERMINATING",
|
|
980
982
|
/**
|
|
981
983
|
* The wallet has been terminated and is not available in the Lightspark infrastructure anymore.
|
|
982
|
-
*
|
|
983
|
-
* Recovery flow. *
|
|
984
|
+
* It is not connected to the Lightning network and its funds can only be accessed using the
|
|
985
|
+
* Funds Recovery flow. *
|
|
984
986
|
*/
|
|
985
987
|
TERMINATED = "TERMINATED"
|
|
986
988
|
}
|
|
@@ -2933,9 +2935,40 @@ declare enum IncentivesStatus {
|
|
|
2933
2935
|
INELIGIBLE = "INELIGIBLE"
|
|
2934
2936
|
}
|
|
2935
2937
|
|
|
2938
|
+
interface UmaCurrency {
|
|
2939
|
+
/**
|
|
2940
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
2941
|
+
* opaque string.
|
|
2942
|
+
**/
|
|
2943
|
+
id: string;
|
|
2944
|
+
/** The date and time when the entity was first created. **/
|
|
2945
|
+
createdAt: string;
|
|
2946
|
+
/** The date and time when the entity was last updated. **/
|
|
2947
|
+
updatedAt: string;
|
|
2948
|
+
/** The currency code of currency. E.g. USD. **/
|
|
2949
|
+
code: string;
|
|
2950
|
+
/** The symbol of currency. E.g. $. **/
|
|
2951
|
+
symbol: string;
|
|
2952
|
+
/** The full name of currency. E.g. US Dollar. **/
|
|
2953
|
+
name: string;
|
|
2954
|
+
/**
|
|
2955
|
+
* The number of digits after the decimal point for display on the sender side, and to add
|
|
2956
|
+
* clarity around what the `smallest unit` of the currency is. For example, in USD, by
|
|
2957
|
+
* convention, there are 2 digits for cents - $5.95. In this case, `decimals` would be 2. Note
|
|
2958
|
+
* that the multiplier is still always in the smallest unit (cents). In addition to display
|
|
2959
|
+
* purposes, this field can be used to resolve ambiguity in what the multiplier means. For
|
|
2960
|
+
* example, if the currency is `BTC` and the multiplier is 1000, really we're exchanging in
|
|
2961
|
+
* SATs, so `decimals` would be 8.
|
|
2962
|
+
**/
|
|
2963
|
+
decimals: number;
|
|
2964
|
+
/** The typename of the object **/
|
|
2965
|
+
typename: string;
|
|
2966
|
+
}
|
|
2967
|
+
declare const getUmaCurrencyQuery: (id: string) => Query<UmaCurrency>;
|
|
2968
|
+
|
|
2936
2969
|
interface UmaCurrencyAmount {
|
|
2937
2970
|
value: number;
|
|
2938
|
-
|
|
2971
|
+
currency: UmaCurrency;
|
|
2939
2972
|
}
|
|
2940
2973
|
|
|
2941
2974
|
declare enum UmaInvitationStatus {
|
|
@@ -3240,7 +3273,7 @@ declare class LightsparkClient {
|
|
|
3240
3273
|
* @param withdrawalMode The strategy that should be used to withdraw the funds from this node.
|
|
3241
3274
|
* @returns An estimated amount for the L1 withdrawal fees for the specified node, amount, and strategy.
|
|
3242
3275
|
*/
|
|
3243
|
-
|
|
3276
|
+
getWithdrawalFeeEstimate(nodeId: string, amountSats: number, withdrawalMode: WithdrawalMode): Promise<CurrencyAmount>;
|
|
3244
3277
|
/**
|
|
3245
3278
|
* Directly unlocks a node with a signing private key or alias.
|
|
3246
3279
|
*
|
|
@@ -3543,6 +3576,12 @@ declare class LightsparkClient {
|
|
|
3543
3576
|
* @returns The cancelled invitation, or null if cancellation failed.
|
|
3544
3577
|
*/
|
|
3545
3578
|
cancelUmaInvitation(invitationCode: string): Promise<UmaInvitation | null>;
|
|
3579
|
+
/**
|
|
3580
|
+
* Looks up a UMA address to check if it exists.
|
|
3581
|
+
*
|
|
3582
|
+
* @param umaAddress The UMA address to look up.
|
|
3583
|
+
* @returns True if the UMA address exists, false otherwise.
|
|
3584
|
+
*/
|
|
3546
3585
|
lookupUmaAddress(umaAddress: string): Promise<boolean>;
|
|
3547
3586
|
}
|
|
3548
3587
|
|
|
@@ -5091,37 +5130,6 @@ interface SignMessagesOutput {
|
|
|
5091
5130
|
signedPayloads: SignablePayload[];
|
|
5092
5131
|
}
|
|
5093
5132
|
|
|
5094
|
-
interface UmaCurrency {
|
|
5095
|
-
/**
|
|
5096
|
-
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
5097
|
-
* opaque string.
|
|
5098
|
-
**/
|
|
5099
|
-
id: string;
|
|
5100
|
-
/** The date and time when the entity was first created. **/
|
|
5101
|
-
createdAt: string;
|
|
5102
|
-
/** The date and time when the entity was last updated. **/
|
|
5103
|
-
updatedAt: string;
|
|
5104
|
-
/** The currency code of currency. E.g. USD. **/
|
|
5105
|
-
code: string;
|
|
5106
|
-
/** The symbol of currency. E.g. $. **/
|
|
5107
|
-
symbol: string;
|
|
5108
|
-
/** The full name of currency. E.g. US Dollar. **/
|
|
5109
|
-
name: string;
|
|
5110
|
-
/**
|
|
5111
|
-
* The number of digits after the decimal point for display on the sender side, and to add
|
|
5112
|
-
* clarity around what the `smallest unit` of the currency is. For example, in USD, by
|
|
5113
|
-
* convention, there are 2 digits for cents - $5.95. In this case, `decimals` would be 2. Note
|
|
5114
|
-
* that the multiplier is still always in the smallest unit (cents). In addition to display
|
|
5115
|
-
* purposes, this field can be used to resolve ambiguity in what the multiplier means. For
|
|
5116
|
-
* example, if the currency is `BTC` and the multiplier is 1000, really we're exchanging in
|
|
5117
|
-
* SATs, so `decimals` would be 8.
|
|
5118
|
-
**/
|
|
5119
|
-
decimals: number;
|
|
5120
|
-
/** The typename of the object **/
|
|
5121
|
-
typename: string;
|
|
5122
|
-
}
|
|
5123
|
-
declare const getUmaCurrencyQuery: (id: string) => Query<UmaCurrency>;
|
|
5124
|
-
|
|
5125
5133
|
interface UpdateChannelPerCommitmentPointInput {
|
|
5126
5134
|
channelId: string;
|
|
5127
5135
|
perCommitmentPoint: string;
|
|
@@ -43,8 +43,9 @@ declare enum CurrencyUnit {
|
|
|
43
43
|
* commonly used in Lightning transactions. *
|
|
44
44
|
*/
|
|
45
45
|
SATOSHI = "SATOSHI",
|
|
46
|
-
/**
|
|
47
|
-
* possible.
|
|
46
|
+
/**
|
|
47
|
+
* 0.001 Satoshi, or 10e-11 Bitcoin. We recommend using the Satoshi unit instead when possible. *
|
|
48
|
+
*/
|
|
48
49
|
MILLISATOSHI = "MILLISATOSHI",
|
|
49
50
|
/** United States Dollar. **/
|
|
50
51
|
USD = "USD",
|
|
@@ -278,8 +279,8 @@ declare enum ChannelStatus {
|
|
|
278
279
|
*/
|
|
279
280
|
UNBALANCED_FOR_SEND = "UNBALANCED_FOR_SEND",
|
|
280
281
|
/**
|
|
281
|
-
* The channel is behaving properly, but its remote balance is much lower than its
|
|
282
|
-
*
|
|
282
|
+
* The channel is behaving properly, but its remote balance is much lower than its local balance
|
|
283
|
+
* so it is not balanced properly for receiving funds. *
|
|
283
284
|
*/
|
|
284
285
|
UNBALANCED_FOR_RECEIVE = "UNBALANCED_FOR_RECEIVE",
|
|
285
286
|
/**
|
|
@@ -858,8 +859,9 @@ declare enum TransactionStatus {
|
|
|
858
859
|
FAILED = "FAILED",
|
|
859
860
|
/** Transaction has been initiated and is currently in-flight. **/
|
|
860
861
|
PENDING = "PENDING",
|
|
861
|
-
/**
|
|
862
|
-
* request.
|
|
862
|
+
/**
|
|
863
|
+
* For transaction type PAYMENT_REQUEST only. No payments have been made to a payment request. *
|
|
864
|
+
*/
|
|
863
865
|
NOT_STARTED = "NOT_STARTED",
|
|
864
866
|
/** For transaction type PAYMENT_REQUEST only. A payment request has expired. **/
|
|
865
867
|
EXPIRED = "EXPIRED",
|
|
@@ -979,8 +981,8 @@ declare enum WalletStatus {
|
|
|
979
981
|
TERMINATING = "TERMINATING",
|
|
980
982
|
/**
|
|
981
983
|
* The wallet has been terminated and is not available in the Lightspark infrastructure anymore.
|
|
982
|
-
*
|
|
983
|
-
* Recovery flow. *
|
|
984
|
+
* It is not connected to the Lightning network and its funds can only be accessed using the
|
|
985
|
+
* Funds Recovery flow. *
|
|
984
986
|
*/
|
|
985
987
|
TERMINATED = "TERMINATED"
|
|
986
988
|
}
|
|
@@ -2933,9 +2935,40 @@ declare enum IncentivesStatus {
|
|
|
2933
2935
|
INELIGIBLE = "INELIGIBLE"
|
|
2934
2936
|
}
|
|
2935
2937
|
|
|
2938
|
+
interface UmaCurrency {
|
|
2939
|
+
/**
|
|
2940
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
2941
|
+
* opaque string.
|
|
2942
|
+
**/
|
|
2943
|
+
id: string;
|
|
2944
|
+
/** The date and time when the entity was first created. **/
|
|
2945
|
+
createdAt: string;
|
|
2946
|
+
/** The date and time when the entity was last updated. **/
|
|
2947
|
+
updatedAt: string;
|
|
2948
|
+
/** The currency code of currency. E.g. USD. **/
|
|
2949
|
+
code: string;
|
|
2950
|
+
/** The symbol of currency. E.g. $. **/
|
|
2951
|
+
symbol: string;
|
|
2952
|
+
/** The full name of currency. E.g. US Dollar. **/
|
|
2953
|
+
name: string;
|
|
2954
|
+
/**
|
|
2955
|
+
* The number of digits after the decimal point for display on the sender side, and to add
|
|
2956
|
+
* clarity around what the `smallest unit` of the currency is. For example, in USD, by
|
|
2957
|
+
* convention, there are 2 digits for cents - $5.95. In this case, `decimals` would be 2. Note
|
|
2958
|
+
* that the multiplier is still always in the smallest unit (cents). In addition to display
|
|
2959
|
+
* purposes, this field can be used to resolve ambiguity in what the multiplier means. For
|
|
2960
|
+
* example, if the currency is `BTC` and the multiplier is 1000, really we're exchanging in
|
|
2961
|
+
* SATs, so `decimals` would be 8.
|
|
2962
|
+
**/
|
|
2963
|
+
decimals: number;
|
|
2964
|
+
/** The typename of the object **/
|
|
2965
|
+
typename: string;
|
|
2966
|
+
}
|
|
2967
|
+
declare const getUmaCurrencyQuery: (id: string) => Query<UmaCurrency>;
|
|
2968
|
+
|
|
2936
2969
|
interface UmaCurrencyAmount {
|
|
2937
2970
|
value: number;
|
|
2938
|
-
|
|
2971
|
+
currency: UmaCurrency;
|
|
2939
2972
|
}
|
|
2940
2973
|
|
|
2941
2974
|
declare enum UmaInvitationStatus {
|
|
@@ -3240,7 +3273,7 @@ declare class LightsparkClient {
|
|
|
3240
3273
|
* @param withdrawalMode The strategy that should be used to withdraw the funds from this node.
|
|
3241
3274
|
* @returns An estimated amount for the L1 withdrawal fees for the specified node, amount, and strategy.
|
|
3242
3275
|
*/
|
|
3243
|
-
|
|
3276
|
+
getWithdrawalFeeEstimate(nodeId: string, amountSats: number, withdrawalMode: WithdrawalMode): Promise<CurrencyAmount>;
|
|
3244
3277
|
/**
|
|
3245
3278
|
* Directly unlocks a node with a signing private key or alias.
|
|
3246
3279
|
*
|
|
@@ -3543,6 +3576,12 @@ declare class LightsparkClient {
|
|
|
3543
3576
|
* @returns The cancelled invitation, or null if cancellation failed.
|
|
3544
3577
|
*/
|
|
3545
3578
|
cancelUmaInvitation(invitationCode: string): Promise<UmaInvitation | null>;
|
|
3579
|
+
/**
|
|
3580
|
+
* Looks up a UMA address to check if it exists.
|
|
3581
|
+
*
|
|
3582
|
+
* @param umaAddress The UMA address to look up.
|
|
3583
|
+
* @returns True if the UMA address exists, false otherwise.
|
|
3584
|
+
*/
|
|
3546
3585
|
lookupUmaAddress(umaAddress: string): Promise<boolean>;
|
|
3547
3586
|
}
|
|
3548
3587
|
|
|
@@ -5091,37 +5130,6 @@ interface SignMessagesOutput {
|
|
|
5091
5130
|
signedPayloads: SignablePayload[];
|
|
5092
5131
|
}
|
|
5093
5132
|
|
|
5094
|
-
interface UmaCurrency {
|
|
5095
|
-
/**
|
|
5096
|
-
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
5097
|
-
* opaque string.
|
|
5098
|
-
**/
|
|
5099
|
-
id: string;
|
|
5100
|
-
/** The date and time when the entity was first created. **/
|
|
5101
|
-
createdAt: string;
|
|
5102
|
-
/** The date and time when the entity was last updated. **/
|
|
5103
|
-
updatedAt: string;
|
|
5104
|
-
/** The currency code of currency. E.g. USD. **/
|
|
5105
|
-
code: string;
|
|
5106
|
-
/** The symbol of currency. E.g. $. **/
|
|
5107
|
-
symbol: string;
|
|
5108
|
-
/** The full name of currency. E.g. US Dollar. **/
|
|
5109
|
-
name: string;
|
|
5110
|
-
/**
|
|
5111
|
-
* The number of digits after the decimal point for display on the sender side, and to add
|
|
5112
|
-
* clarity around what the `smallest unit` of the currency is. For example, in USD, by
|
|
5113
|
-
* convention, there are 2 digits for cents - $5.95. In this case, `decimals` would be 2. Note
|
|
5114
|
-
* that the multiplier is still always in the smallest unit (cents). In addition to display
|
|
5115
|
-
* purposes, this field can be used to resolve ambiguity in what the multiplier means. For
|
|
5116
|
-
* example, if the currency is `BTC` and the multiplier is 1000, really we're exchanging in
|
|
5117
|
-
* SATs, so `decimals` would be 8.
|
|
5118
|
-
**/
|
|
5119
|
-
decimals: number;
|
|
5120
|
-
/** The typename of the object **/
|
|
5121
|
-
typename: string;
|
|
5122
|
-
}
|
|
5123
|
-
declare const getUmaCurrencyQuery: (id: string) => Query<UmaCurrency>;
|
|
5124
|
-
|
|
5125
5133
|
interface UpdateChannelPerCommitmentPointInput {
|
|
5126
5134
|
channelId: string;
|
|
5127
5135
|
perCommitmentPoint: string;
|