@breeztech/breez-sdk-spark-react-native 0.2.6 → 0.3.0-rc2
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/cpp/generated/breez_sdk_spark.cpp +66 -338
- package/cpp/generated/breez_sdk_spark.hpp +7 -45
- package/lib/commonjs/generated/breez_sdk_common.js +41 -4
- package/lib/commonjs/generated/breez_sdk_common.js.map +1 -1
- package/lib/commonjs/generated/breez_sdk_spark-ffi.js.map +1 -1
- package/lib/commonjs/generated/breez_sdk_spark.js +504 -139
- package/lib/commonjs/generated/breez_sdk_spark.js.map +1 -1
- package/lib/module/generated/breez_sdk_common.js +41 -4
- package/lib/module/generated/breez_sdk_common.js.map +1 -1
- package/lib/module/generated/breez_sdk_spark-ffi.js.map +1 -1
- package/lib/module/generated/breez_sdk_spark.js +504 -139
- package/lib/module/generated/breez_sdk_spark.js.map +1 -1
- package/lib/typescript/commonjs/src/generated/breez_sdk_common.d.ts +13 -1
- package/lib/typescript/commonjs/src/generated/breez_sdk_common.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts +4 -14
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark.d.ts +373 -63
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/breez_sdk_common.d.ts +13 -1
- package/lib/typescript/module/src/generated/breez_sdk_common.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/breez_sdk_spark-ffi.d.ts +4 -14
- package/lib/typescript/module/src/generated/breez_sdk_spark-ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/breez_sdk_spark.d.ts +373 -63
- package/lib/typescript/module/src/generated/breez_sdk_spark.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/generated/breez_sdk_common.ts +47 -4
- package/src/generated/breez_sdk_spark-ffi.ts +7 -42
- package/src/generated/breez_sdk_spark.ts +769 -365
|
@@ -244,6 +244,10 @@ export type GetInfoResponse = {
|
|
|
244
244
|
* The balance in satoshis
|
|
245
245
|
*/
|
|
246
246
|
balanceSats: bigint;
|
|
247
|
+
/**
|
|
248
|
+
* The balances of the tokens in the wallet keyed by the token identifier
|
|
249
|
+
*/
|
|
250
|
+
tokenBalances: Map<string, TokenBalance>;
|
|
247
251
|
};
|
|
248
252
|
/**
|
|
249
253
|
* Generated factory for {@link GetInfoResponse} record objects.
|
|
@@ -308,6 +312,50 @@ export declare const GetPaymentResponse: Readonly<{
|
|
|
308
312
|
*/
|
|
309
313
|
defaults: () => Partial<GetPaymentResponse>;
|
|
310
314
|
}>;
|
|
315
|
+
export type GetTokensMetadataRequest = {
|
|
316
|
+
tokenIdentifiers: Array<string>;
|
|
317
|
+
};
|
|
318
|
+
/**
|
|
319
|
+
* Generated factory for {@link GetTokensMetadataRequest} record objects.
|
|
320
|
+
*/
|
|
321
|
+
export declare const GetTokensMetadataRequest: Readonly<{
|
|
322
|
+
/**
|
|
323
|
+
* Create a frozen instance of {@link GetTokensMetadataRequest}, with defaults specified
|
|
324
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
325
|
+
*/
|
|
326
|
+
create: (partial: Partial<GetTokensMetadataRequest> & Required<Omit<GetTokensMetadataRequest, never>>) => GetTokensMetadataRequest;
|
|
327
|
+
/**
|
|
328
|
+
* Create a frozen instance of {@link GetTokensMetadataRequest}, with defaults specified
|
|
329
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
330
|
+
*/
|
|
331
|
+
new: (partial: Partial<GetTokensMetadataRequest> & Required<Omit<GetTokensMetadataRequest, never>>) => GetTokensMetadataRequest;
|
|
332
|
+
/**
|
|
333
|
+
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
334
|
+
*/
|
|
335
|
+
defaults: () => Partial<GetTokensMetadataRequest>;
|
|
336
|
+
}>;
|
|
337
|
+
export type GetTokensMetadataResponse = {
|
|
338
|
+
tokensMetadata: Array<TokenMetadata>;
|
|
339
|
+
};
|
|
340
|
+
/**
|
|
341
|
+
* Generated factory for {@link GetTokensMetadataResponse} record objects.
|
|
342
|
+
*/
|
|
343
|
+
export declare const GetTokensMetadataResponse: Readonly<{
|
|
344
|
+
/**
|
|
345
|
+
* Create a frozen instance of {@link GetTokensMetadataResponse}, with defaults specified
|
|
346
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
347
|
+
*/
|
|
348
|
+
create: (partial: Partial<GetTokensMetadataResponse> & Required<Omit<GetTokensMetadataResponse, never>>) => GetTokensMetadataResponse;
|
|
349
|
+
/**
|
|
350
|
+
* Create a frozen instance of {@link GetTokensMetadataResponse}, with defaults specified
|
|
351
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
352
|
+
*/
|
|
353
|
+
new: (partial: Partial<GetTokensMetadataResponse> & Required<Omit<GetTokensMetadataResponse, never>>) => GetTokensMetadataResponse;
|
|
354
|
+
/**
|
|
355
|
+
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
356
|
+
*/
|
|
357
|
+
defaults: () => Partial<GetTokensMetadataResponse>;
|
|
358
|
+
}>;
|
|
311
359
|
export type LightningAddressInfo = {
|
|
312
360
|
description: string;
|
|
313
361
|
lightningAddress: string;
|
|
@@ -390,9 +438,20 @@ export declare const ListFiatRatesResponse: Readonly<{
|
|
|
390
438
|
defaults: () => Partial<ListFiatRatesResponse>;
|
|
391
439
|
}>;
|
|
392
440
|
/**
|
|
393
|
-
* Request to list payments with pagination
|
|
441
|
+
* Request to list payments with optional filters and pagination
|
|
394
442
|
*/
|
|
395
443
|
export type ListPaymentsRequest = {
|
|
444
|
+
typeFilter: Array<PaymentType> | undefined;
|
|
445
|
+
statusFilter: Array<PaymentStatus> | undefined;
|
|
446
|
+
assetFilter: AssetFilter | undefined;
|
|
447
|
+
/**
|
|
448
|
+
* Only include payments created after this timestamp (inclusive)
|
|
449
|
+
*/
|
|
450
|
+
fromTimestamp: /*u64*/ bigint | undefined;
|
|
451
|
+
/**
|
|
452
|
+
* Only include payments created before this timestamp (exclusive)
|
|
453
|
+
*/
|
|
454
|
+
toTimestamp: /*u64*/ bigint | undefined;
|
|
396
455
|
/**
|
|
397
456
|
* Number of records to skip
|
|
398
457
|
*/
|
|
@@ -401,6 +460,7 @@ export type ListPaymentsRequest = {
|
|
|
401
460
|
* Maximum number of records to return
|
|
402
461
|
*/
|
|
403
462
|
limit: /*u32*/ number | undefined;
|
|
463
|
+
sortAscending: boolean | undefined;
|
|
404
464
|
};
|
|
405
465
|
/**
|
|
406
466
|
* Generated factory for {@link ListPaymentsRequest} record objects.
|
|
@@ -410,12 +470,12 @@ export declare const ListPaymentsRequest: Readonly<{
|
|
|
410
470
|
* Create a frozen instance of {@link ListPaymentsRequest}, with defaults specified
|
|
411
471
|
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
412
472
|
*/
|
|
413
|
-
create: (partial: Partial<ListPaymentsRequest> & Required<Omit<ListPaymentsRequest, "offset" | "limit">>) => ListPaymentsRequest;
|
|
473
|
+
create: (partial: Partial<ListPaymentsRequest> & Required<Omit<ListPaymentsRequest, "typeFilter" | "statusFilter" | "assetFilter" | "fromTimestamp" | "toTimestamp" | "offset" | "limit" | "sortAscending">>) => ListPaymentsRequest;
|
|
414
474
|
/**
|
|
415
475
|
* Create a frozen instance of {@link ListPaymentsRequest}, with defaults specified
|
|
416
476
|
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
417
477
|
*/
|
|
418
|
-
new: (partial: Partial<ListPaymentsRequest> & Required<Omit<ListPaymentsRequest, "offset" | "limit">>) => ListPaymentsRequest;
|
|
478
|
+
new: (partial: Partial<ListPaymentsRequest> & Required<Omit<ListPaymentsRequest, "typeFilter" | "statusFilter" | "assetFilter" | "fromTimestamp" | "toTimestamp" | "offset" | "limit" | "sortAscending">>) => ListPaymentsRequest;
|
|
419
479
|
/**
|
|
420
480
|
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
421
481
|
*/
|
|
@@ -608,11 +668,11 @@ export type Payment = {
|
|
|
608
668
|
/**
|
|
609
669
|
* Amount in satoshis
|
|
610
670
|
*/
|
|
611
|
-
amount:
|
|
671
|
+
amount: U128;
|
|
612
672
|
/**
|
|
613
673
|
* Fee paid in satoshis
|
|
614
674
|
*/
|
|
615
|
-
fees:
|
|
675
|
+
fees: U128;
|
|
616
676
|
/**
|
|
617
677
|
* Timestamp of when the payment was created
|
|
618
678
|
*/
|
|
@@ -726,7 +786,16 @@ export declare const PrepareLnurlPayResponse: Readonly<{
|
|
|
726
786
|
}>;
|
|
727
787
|
export type PrepareSendPaymentRequest = {
|
|
728
788
|
paymentRequest: string;
|
|
729
|
-
|
|
789
|
+
/**
|
|
790
|
+
* Amount to send. By default is denominated in sats.
|
|
791
|
+
* If a token identifier is provided, the amount will be denominated in the token base units.
|
|
792
|
+
*/
|
|
793
|
+
amount: U128 | undefined;
|
|
794
|
+
/**
|
|
795
|
+
* If provided, the payment will be for a token
|
|
796
|
+
* May only be provided if the payment request is a spark address
|
|
797
|
+
*/
|
|
798
|
+
tokenIdentifier: string | undefined;
|
|
730
799
|
};
|
|
731
800
|
/**
|
|
732
801
|
* Generated factory for {@link PrepareSendPaymentRequest} record objects.
|
|
@@ -736,12 +805,12 @@ export declare const PrepareSendPaymentRequest: Readonly<{
|
|
|
736
805
|
* Create a frozen instance of {@link PrepareSendPaymentRequest}, with defaults specified
|
|
737
806
|
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
738
807
|
*/
|
|
739
|
-
create: (partial: Partial<PrepareSendPaymentRequest> & Required<Omit<PrepareSendPaymentRequest, "
|
|
808
|
+
create: (partial: Partial<PrepareSendPaymentRequest> & Required<Omit<PrepareSendPaymentRequest, "amount" | "tokenIdentifier">>) => PrepareSendPaymentRequest;
|
|
740
809
|
/**
|
|
741
810
|
* Create a frozen instance of {@link PrepareSendPaymentRequest}, with defaults specified
|
|
742
811
|
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
743
812
|
*/
|
|
744
|
-
new: (partial: Partial<PrepareSendPaymentRequest> & Required<Omit<PrepareSendPaymentRequest, "
|
|
813
|
+
new: (partial: Partial<PrepareSendPaymentRequest> & Required<Omit<PrepareSendPaymentRequest, "amount" | "tokenIdentifier">>) => PrepareSendPaymentRequest;
|
|
745
814
|
/**
|
|
746
815
|
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
747
816
|
*/
|
|
@@ -749,7 +818,16 @@ export declare const PrepareSendPaymentRequest: Readonly<{
|
|
|
749
818
|
}>;
|
|
750
819
|
export type PrepareSendPaymentResponse = {
|
|
751
820
|
paymentMethod: SendPaymentMethod;
|
|
752
|
-
|
|
821
|
+
/**
|
|
822
|
+
* Amount to send. By default is denominated in sats.
|
|
823
|
+
* If a token identifier is provided, the amount will be denominated in the token base units.
|
|
824
|
+
*/
|
|
825
|
+
amount: U128;
|
|
826
|
+
/**
|
|
827
|
+
* The presence of this field indicates that the payment is for a token
|
|
828
|
+
* If empty, it is a Bitcoin payment
|
|
829
|
+
*/
|
|
830
|
+
tokenIdentifier: string | undefined;
|
|
753
831
|
};
|
|
754
832
|
/**
|
|
755
833
|
* Generated factory for {@link PrepareSendPaymentResponse} record objects.
|
|
@@ -1026,6 +1104,63 @@ export declare const SyncWalletResponse: Readonly<{
|
|
|
1026
1104
|
*/
|
|
1027
1105
|
defaults: () => Partial<SyncWalletResponse>;
|
|
1028
1106
|
}>;
|
|
1107
|
+
export type TokenBalance = {
|
|
1108
|
+
balance: U128;
|
|
1109
|
+
tokenMetadata: TokenMetadata;
|
|
1110
|
+
};
|
|
1111
|
+
/**
|
|
1112
|
+
* Generated factory for {@link TokenBalance} record objects.
|
|
1113
|
+
*/
|
|
1114
|
+
export declare const TokenBalance: Readonly<{
|
|
1115
|
+
/**
|
|
1116
|
+
* Create a frozen instance of {@link TokenBalance}, with defaults specified
|
|
1117
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
1118
|
+
*/
|
|
1119
|
+
create: (partial: Partial<TokenBalance> & Required<Omit<TokenBalance, never>>) => TokenBalance;
|
|
1120
|
+
/**
|
|
1121
|
+
* Create a frozen instance of {@link TokenBalance}, with defaults specified
|
|
1122
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
1123
|
+
*/
|
|
1124
|
+
new: (partial: Partial<TokenBalance> & Required<Omit<TokenBalance, never>>) => TokenBalance;
|
|
1125
|
+
/**
|
|
1126
|
+
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
1127
|
+
*/
|
|
1128
|
+
defaults: () => Partial<TokenBalance>;
|
|
1129
|
+
}>;
|
|
1130
|
+
export type TokenMetadata = {
|
|
1131
|
+
identifier: string;
|
|
1132
|
+
/**
|
|
1133
|
+
* Hex representation of the issuer public key
|
|
1134
|
+
*/
|
|
1135
|
+
issuerPublicKey: string;
|
|
1136
|
+
name: string;
|
|
1137
|
+
ticker: string;
|
|
1138
|
+
/**
|
|
1139
|
+
* Number of decimals the token uses
|
|
1140
|
+
*/
|
|
1141
|
+
decimals: number;
|
|
1142
|
+
maxSupply: U128;
|
|
1143
|
+
isFreezable: boolean;
|
|
1144
|
+
};
|
|
1145
|
+
/**
|
|
1146
|
+
* Generated factory for {@link TokenMetadata} record objects.
|
|
1147
|
+
*/
|
|
1148
|
+
export declare const TokenMetadata: Readonly<{
|
|
1149
|
+
/**
|
|
1150
|
+
* Create a frozen instance of {@link TokenMetadata}, with defaults specified
|
|
1151
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
1152
|
+
*/
|
|
1153
|
+
create: (partial: Partial<TokenMetadata> & Required<Omit<TokenMetadata, never>>) => TokenMetadata;
|
|
1154
|
+
/**
|
|
1155
|
+
* Create a frozen instance of {@link TokenMetadata}, with defaults specified
|
|
1156
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
1157
|
+
*/
|
|
1158
|
+
new: (partial: Partial<TokenMetadata> & Required<Omit<TokenMetadata, never>>) => TokenMetadata;
|
|
1159
|
+
/**
|
|
1160
|
+
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
1161
|
+
*/
|
|
1162
|
+
defaults: () => Partial<TokenMetadata>;
|
|
1163
|
+
}>;
|
|
1029
1164
|
export type TxStatus = {
|
|
1030
1165
|
confirmed: boolean;
|
|
1031
1166
|
blockHeight: /*u32*/ number | undefined;
|
|
@@ -1119,6 +1254,94 @@ export declare const WaitForPaymentResponse: Readonly<{
|
|
|
1119
1254
|
*/
|
|
1120
1255
|
defaults: () => Partial<WaitForPaymentResponse>;
|
|
1121
1256
|
}>;
|
|
1257
|
+
/**
|
|
1258
|
+
* Typealias from the type name used in the UDL file to the custom type. This
|
|
1259
|
+
* is needed because the UDL type name is used in function/method signatures.
|
|
1260
|
+
*/
|
|
1261
|
+
export type U128 = bigint;
|
|
1262
|
+
export declare enum AssetFilter_Tags {
|
|
1263
|
+
Bitcoin = "Bitcoin",
|
|
1264
|
+
Token = "Token"
|
|
1265
|
+
}
|
|
1266
|
+
/**
|
|
1267
|
+
* A field of [`ListPaymentsRequest`] when listing payments filtered by asset
|
|
1268
|
+
*/
|
|
1269
|
+
export declare const AssetFilter: Readonly<{
|
|
1270
|
+
instanceOf: (obj: any) => obj is AssetFilter;
|
|
1271
|
+
Bitcoin: {
|
|
1272
|
+
new (): {
|
|
1273
|
+
readonly tag: AssetFilter_Tags.Bitcoin;
|
|
1274
|
+
/**
|
|
1275
|
+
* @private
|
|
1276
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1277
|
+
*/
|
|
1278
|
+
readonly [uniffiTypeNameSymbol]: "AssetFilter";
|
|
1279
|
+
};
|
|
1280
|
+
"new"(): {
|
|
1281
|
+
readonly tag: AssetFilter_Tags.Bitcoin;
|
|
1282
|
+
/**
|
|
1283
|
+
* @private
|
|
1284
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1285
|
+
*/
|
|
1286
|
+
readonly [uniffiTypeNameSymbol]: "AssetFilter";
|
|
1287
|
+
};
|
|
1288
|
+
instanceOf(obj: any): obj is {
|
|
1289
|
+
readonly tag: AssetFilter_Tags.Bitcoin;
|
|
1290
|
+
/**
|
|
1291
|
+
* @private
|
|
1292
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1293
|
+
*/
|
|
1294
|
+
readonly [uniffiTypeNameSymbol]: "AssetFilter";
|
|
1295
|
+
};
|
|
1296
|
+
};
|
|
1297
|
+
Token: {
|
|
1298
|
+
new (inner: {
|
|
1299
|
+
/**
|
|
1300
|
+
* Optional token identifier to filter by
|
|
1301
|
+
*/ tokenIdentifier: string | undefined;
|
|
1302
|
+
}): {
|
|
1303
|
+
readonly tag: AssetFilter_Tags.Token;
|
|
1304
|
+
readonly inner: Readonly<{
|
|
1305
|
+
tokenIdentifier: string | undefined;
|
|
1306
|
+
}>;
|
|
1307
|
+
/**
|
|
1308
|
+
* @private
|
|
1309
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1310
|
+
*/
|
|
1311
|
+
readonly [uniffiTypeNameSymbol]: "AssetFilter";
|
|
1312
|
+
};
|
|
1313
|
+
"new"(inner: {
|
|
1314
|
+
/**
|
|
1315
|
+
* Optional token identifier to filter by
|
|
1316
|
+
*/ tokenIdentifier: string | undefined;
|
|
1317
|
+
}): {
|
|
1318
|
+
readonly tag: AssetFilter_Tags.Token;
|
|
1319
|
+
readonly inner: Readonly<{
|
|
1320
|
+
tokenIdentifier: string | undefined;
|
|
1321
|
+
}>;
|
|
1322
|
+
/**
|
|
1323
|
+
* @private
|
|
1324
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1325
|
+
*/
|
|
1326
|
+
readonly [uniffiTypeNameSymbol]: "AssetFilter";
|
|
1327
|
+
};
|
|
1328
|
+
instanceOf(obj: any): obj is {
|
|
1329
|
+
readonly tag: AssetFilter_Tags.Token;
|
|
1330
|
+
readonly inner: Readonly<{
|
|
1331
|
+
tokenIdentifier: string | undefined;
|
|
1332
|
+
}>;
|
|
1333
|
+
/**
|
|
1334
|
+
* @private
|
|
1335
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1336
|
+
*/
|
|
1337
|
+
readonly [uniffiTypeNameSymbol]: "AssetFilter";
|
|
1338
|
+
};
|
|
1339
|
+
};
|
|
1340
|
+
}>;
|
|
1341
|
+
/**
|
|
1342
|
+
* A field of [`ListPaymentsRequest`] when listing payments filtered by asset
|
|
1343
|
+
*/
|
|
1344
|
+
export type AssetFilter = InstanceType<(typeof AssetFilter)[keyof Omit<typeof AssetFilter, 'instanceOf'>]>;
|
|
1122
1345
|
export declare enum ChainServiceError_Tags {
|
|
1123
1346
|
InvalidAddress = "InvalidAddress",
|
|
1124
1347
|
ServiceConnectivity = "ServiceConnectivity",
|
|
@@ -1591,6 +1814,7 @@ export declare enum OnchainConfirmationSpeed {
|
|
|
1591
1814
|
}
|
|
1592
1815
|
export declare enum PaymentDetails_Tags {
|
|
1593
1816
|
Spark = "Spark",
|
|
1817
|
+
Token = "Token",
|
|
1594
1818
|
Lightning = "Lightning",
|
|
1595
1819
|
Withdraw = "Withdraw",
|
|
1596
1820
|
Deposit = "Deposit"
|
|
@@ -1623,6 +1847,50 @@ export declare const PaymentDetails: Readonly<{
|
|
|
1623
1847
|
readonly [uniffiTypeNameSymbol]: "PaymentDetails";
|
|
1624
1848
|
};
|
|
1625
1849
|
};
|
|
1850
|
+
Token: {
|
|
1851
|
+
new (inner: {
|
|
1852
|
+
metadata: TokenMetadata;
|
|
1853
|
+
txHash: string;
|
|
1854
|
+
}): {
|
|
1855
|
+
readonly tag: PaymentDetails_Tags.Token;
|
|
1856
|
+
readonly inner: Readonly<{
|
|
1857
|
+
metadata: TokenMetadata;
|
|
1858
|
+
txHash: string;
|
|
1859
|
+
}>;
|
|
1860
|
+
/**
|
|
1861
|
+
* @private
|
|
1862
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1863
|
+
*/
|
|
1864
|
+
readonly [uniffiTypeNameSymbol]: "PaymentDetails";
|
|
1865
|
+
};
|
|
1866
|
+
"new"(inner: {
|
|
1867
|
+
metadata: TokenMetadata;
|
|
1868
|
+
txHash: string;
|
|
1869
|
+
}): {
|
|
1870
|
+
readonly tag: PaymentDetails_Tags.Token;
|
|
1871
|
+
readonly inner: Readonly<{
|
|
1872
|
+
metadata: TokenMetadata;
|
|
1873
|
+
txHash: string;
|
|
1874
|
+
}>;
|
|
1875
|
+
/**
|
|
1876
|
+
* @private
|
|
1877
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1878
|
+
*/
|
|
1879
|
+
readonly [uniffiTypeNameSymbol]: "PaymentDetails";
|
|
1880
|
+
};
|
|
1881
|
+
instanceOf(obj: any): obj is {
|
|
1882
|
+
readonly tag: PaymentDetails_Tags.Token;
|
|
1883
|
+
readonly inner: Readonly<{
|
|
1884
|
+
metadata: TokenMetadata;
|
|
1885
|
+
txHash: string;
|
|
1886
|
+
}>;
|
|
1887
|
+
/**
|
|
1888
|
+
* @private
|
|
1889
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1890
|
+
*/
|
|
1891
|
+
readonly [uniffiTypeNameSymbol]: "PaymentDetails";
|
|
1892
|
+
};
|
|
1893
|
+
};
|
|
1626
1894
|
Lightning: {
|
|
1627
1895
|
new (inner: {
|
|
1628
1896
|
/**
|
|
@@ -1798,9 +2066,10 @@ export type PaymentDetails = InstanceType<(typeof PaymentDetails)[keyof Omit<typ
|
|
|
1798
2066
|
export declare enum PaymentMethod {
|
|
1799
2067
|
Lightning = 0,
|
|
1800
2068
|
Spark = 1,
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
2069
|
+
Token = 2,
|
|
2070
|
+
Deposit = 3,
|
|
2071
|
+
Withdraw = 4,
|
|
2072
|
+
Unknown = 5
|
|
1804
2073
|
}
|
|
1805
2074
|
/**
|
|
1806
2075
|
* The status of a payment
|
|
@@ -3132,12 +3401,20 @@ export declare const SendPaymentMethod: Readonly<{
|
|
|
3132
3401
|
SparkAddress: {
|
|
3133
3402
|
new (inner: {
|
|
3134
3403
|
address: string;
|
|
3135
|
-
|
|
3404
|
+
/**
|
|
3405
|
+
* Fee to pay for the transaction
|
|
3406
|
+
* Denominated in sats if token identifier is empty, otherwise in the token base units
|
|
3407
|
+
*/ fee: U128;
|
|
3408
|
+
/**
|
|
3409
|
+
* The presence of this field indicates that the payment is for a token
|
|
3410
|
+
* If empty, it is a Bitcoin payment
|
|
3411
|
+
*/ tokenIdentifier: string | undefined;
|
|
3136
3412
|
}): {
|
|
3137
3413
|
readonly tag: SendPaymentMethod_Tags.SparkAddress;
|
|
3138
3414
|
readonly inner: Readonly<{
|
|
3139
3415
|
address: string;
|
|
3140
|
-
|
|
3416
|
+
fee: U128;
|
|
3417
|
+
tokenIdentifier: string | undefined;
|
|
3141
3418
|
}>;
|
|
3142
3419
|
/**
|
|
3143
3420
|
* @private
|
|
@@ -3147,12 +3424,20 @@ export declare const SendPaymentMethod: Readonly<{
|
|
|
3147
3424
|
};
|
|
3148
3425
|
"new"(inner: {
|
|
3149
3426
|
address: string;
|
|
3150
|
-
|
|
3427
|
+
/**
|
|
3428
|
+
* Fee to pay for the transaction
|
|
3429
|
+
* Denominated in sats if token identifier is empty, otherwise in the token base units
|
|
3430
|
+
*/ fee: U128;
|
|
3431
|
+
/**
|
|
3432
|
+
* The presence of this field indicates that the payment is for a token
|
|
3433
|
+
* If empty, it is a Bitcoin payment
|
|
3434
|
+
*/ tokenIdentifier: string | undefined;
|
|
3151
3435
|
}): {
|
|
3152
3436
|
readonly tag: SendPaymentMethod_Tags.SparkAddress;
|
|
3153
3437
|
readonly inner: Readonly<{
|
|
3154
3438
|
address: string;
|
|
3155
|
-
|
|
3439
|
+
fee: U128;
|
|
3440
|
+
tokenIdentifier: string | undefined;
|
|
3156
3441
|
}>;
|
|
3157
3442
|
/**
|
|
3158
3443
|
* @private
|
|
@@ -3164,7 +3449,8 @@ export declare const SendPaymentMethod: Readonly<{
|
|
|
3164
3449
|
readonly tag: SendPaymentMethod_Tags.SparkAddress;
|
|
3165
3450
|
readonly inner: Readonly<{
|
|
3166
3451
|
address: string;
|
|
3167
|
-
|
|
3452
|
+
fee: U128;
|
|
3453
|
+
tokenIdentifier: string | undefined;
|
|
3168
3454
|
}>;
|
|
3169
3455
|
/**
|
|
3170
3456
|
* @private
|
|
@@ -3747,6 +4033,17 @@ export interface BreezSdkInterface {
|
|
|
3747
4033
|
getPayment(request: GetPaymentRequest, asyncOpts_?: {
|
|
3748
4034
|
signal: AbortSignal;
|
|
3749
4035
|
}): Promise<GetPaymentResponse>;
|
|
4036
|
+
/**
|
|
4037
|
+
* Returns the metadata for the given token identifiers.
|
|
4038
|
+
*
|
|
4039
|
+
* Results are not guaranteed to be in the same order as the input token identifiers.
|
|
4040
|
+
*
|
|
4041
|
+
* If the metadata is not found locally in cache, it will be queried from
|
|
4042
|
+
* the Spark network and then cached.
|
|
4043
|
+
*/
|
|
4044
|
+
getTokensMetadata(request: GetTokensMetadataRequest, asyncOpts_?: {
|
|
4045
|
+
signal: AbortSignal;
|
|
4046
|
+
}): Promise<GetTokensMetadataResponse>;
|
|
3750
4047
|
/**
|
|
3751
4048
|
* List fiat currencies for which there is a known exchange rate,
|
|
3752
4049
|
* sorted by the canonical name of the currency.
|
|
@@ -3785,7 +4082,6 @@ export interface BreezSdkInterface {
|
|
|
3785
4082
|
lnurlPay(request: LnurlPayRequest, asyncOpts_?: {
|
|
3786
4083
|
signal: AbortSignal;
|
|
3787
4084
|
}): Promise<LnurlPayResponse>;
|
|
3788
|
-
pollLightningSendPayment(payment: Payment, sspId: string): void;
|
|
3789
4085
|
prepareLnurlPay(request: PrepareLnurlPayRequest, asyncOpts_?: {
|
|
3790
4086
|
signal: AbortSignal;
|
|
3791
4087
|
}): Promise<PrepareLnurlPayResponse>;
|
|
@@ -3795,12 +4091,6 @@ export interface BreezSdkInterface {
|
|
|
3795
4091
|
receivePayment(request: ReceivePaymentRequest, asyncOpts_?: {
|
|
3796
4092
|
signal: AbortSignal;
|
|
3797
4093
|
}): Promise<ReceivePaymentResponse>;
|
|
3798
|
-
/**
|
|
3799
|
-
* Attempts to recover a lightning address from the lnurl server.
|
|
3800
|
-
*/
|
|
3801
|
-
recoverLightningAddress(asyncOpts_?: {
|
|
3802
|
-
signal: AbortSignal;
|
|
3803
|
-
}): Promise<LightningAddressInfo | undefined>;
|
|
3804
4094
|
refundDeposit(request: RefundDepositRequest, asyncOpts_?: {
|
|
3805
4095
|
signal: AbortSignal;
|
|
3806
4096
|
}): Promise<RefundDepositResponse>;
|
|
@@ -3821,21 +4111,9 @@ export interface BreezSdkInterface {
|
|
|
3821
4111
|
removeEventListener(id: string, asyncOpts_?: {
|
|
3822
4112
|
signal: AbortSignal;
|
|
3823
4113
|
}): Promise<boolean>;
|
|
3824
|
-
sendBitcoinAddress(address: BitcoinAddressDetails, feeQuote: SendOnchainFeeQuote, request: SendPaymentRequest, asyncOpts_?: {
|
|
3825
|
-
signal: AbortSignal;
|
|
3826
|
-
}): Promise<SendPaymentResponse>;
|
|
3827
|
-
sendBolt11Invoice(invoiceDetails: Bolt11InvoiceDetails, sparkTransferFeeSats: /*u64*/ bigint | undefined, lightningFeeSats: bigint, request: SendPaymentRequest, asyncOpts_?: {
|
|
3828
|
-
signal: AbortSignal;
|
|
3829
|
-
}): Promise<SendPaymentResponse>;
|
|
3830
4114
|
sendPayment(request: SendPaymentRequest, asyncOpts_?: {
|
|
3831
4115
|
signal: AbortSignal;
|
|
3832
4116
|
}): Promise<SendPaymentResponse>;
|
|
3833
|
-
sendPaymentInternal(request: SendPaymentRequest, suppressPaymentEvent: boolean, asyncOpts_?: {
|
|
3834
|
-
signal: AbortSignal;
|
|
3835
|
-
}): Promise<SendPaymentResponse>;
|
|
3836
|
-
sendSparkAddress(address: string, request: SendPaymentRequest, asyncOpts_?: {
|
|
3837
|
-
signal: AbortSignal;
|
|
3838
|
-
}): Promise<SendPaymentResponse>;
|
|
3839
4117
|
/**
|
|
3840
4118
|
* Synchronizes the wallet with the Spark network
|
|
3841
4119
|
*/
|
|
@@ -3903,6 +4181,17 @@ export declare class BreezSdk extends UniffiAbstractObject implements BreezSdkIn
|
|
|
3903
4181
|
getPayment(request: GetPaymentRequest, asyncOpts_?: {
|
|
3904
4182
|
signal: AbortSignal;
|
|
3905
4183
|
}): Promise<GetPaymentResponse>;
|
|
4184
|
+
/**
|
|
4185
|
+
* Returns the metadata for the given token identifiers.
|
|
4186
|
+
*
|
|
4187
|
+
* Results are not guaranteed to be in the same order as the input token identifiers.
|
|
4188
|
+
*
|
|
4189
|
+
* If the metadata is not found locally in cache, it will be queried from
|
|
4190
|
+
* the Spark network and then cached.
|
|
4191
|
+
*/
|
|
4192
|
+
getTokensMetadata(request: GetTokensMetadataRequest, asyncOpts_?: {
|
|
4193
|
+
signal: AbortSignal;
|
|
4194
|
+
}): Promise<GetTokensMetadataResponse>;
|
|
3906
4195
|
/**
|
|
3907
4196
|
* List fiat currencies for which there is a known exchange rate,
|
|
3908
4197
|
* sorted by the canonical name of the currency.
|
|
@@ -3941,7 +4230,6 @@ export declare class BreezSdk extends UniffiAbstractObject implements BreezSdkIn
|
|
|
3941
4230
|
lnurlPay(request: LnurlPayRequest, asyncOpts_?: {
|
|
3942
4231
|
signal: AbortSignal;
|
|
3943
4232
|
}): Promise<LnurlPayResponse>;
|
|
3944
|
-
pollLightningSendPayment(payment: Payment, sspId: string): void;
|
|
3945
4233
|
prepareLnurlPay(request: PrepareLnurlPayRequest, asyncOpts_?: {
|
|
3946
4234
|
signal: AbortSignal;
|
|
3947
4235
|
}): Promise<PrepareLnurlPayResponse>;
|
|
@@ -3951,12 +4239,6 @@ export declare class BreezSdk extends UniffiAbstractObject implements BreezSdkIn
|
|
|
3951
4239
|
receivePayment(request: ReceivePaymentRequest, asyncOpts_?: {
|
|
3952
4240
|
signal: AbortSignal;
|
|
3953
4241
|
}): Promise<ReceivePaymentResponse>;
|
|
3954
|
-
/**
|
|
3955
|
-
* Attempts to recover a lightning address from the lnurl server.
|
|
3956
|
-
*/
|
|
3957
|
-
recoverLightningAddress(asyncOpts_?: {
|
|
3958
|
-
signal: AbortSignal;
|
|
3959
|
-
}): Promise<LightningAddressInfo | undefined>;
|
|
3960
4242
|
refundDeposit(request: RefundDepositRequest, asyncOpts_?: {
|
|
3961
4243
|
signal: AbortSignal;
|
|
3962
4244
|
}): Promise<RefundDepositResponse>;
|
|
@@ -3977,21 +4259,9 @@ export declare class BreezSdk extends UniffiAbstractObject implements BreezSdkIn
|
|
|
3977
4259
|
removeEventListener(id: string, asyncOpts_?: {
|
|
3978
4260
|
signal: AbortSignal;
|
|
3979
4261
|
}): Promise<boolean>;
|
|
3980
|
-
sendBitcoinAddress(address: BitcoinAddressDetails, feeQuote: SendOnchainFeeQuote, request: SendPaymentRequest, asyncOpts_?: {
|
|
3981
|
-
signal: AbortSignal;
|
|
3982
|
-
}): Promise<SendPaymentResponse>;
|
|
3983
|
-
sendBolt11Invoice(invoiceDetails: Bolt11InvoiceDetails, sparkTransferFeeSats: /*u64*/ bigint | undefined, lightningFeeSats: bigint, request: SendPaymentRequest, asyncOpts_?: {
|
|
3984
|
-
signal: AbortSignal;
|
|
3985
|
-
}): Promise<SendPaymentResponse>;
|
|
3986
4262
|
sendPayment(request: SendPaymentRequest, asyncOpts_?: {
|
|
3987
4263
|
signal: AbortSignal;
|
|
3988
4264
|
}): Promise<SendPaymentResponse>;
|
|
3989
|
-
sendPaymentInternal(request: SendPaymentRequest, suppressPaymentEvent: boolean, asyncOpts_?: {
|
|
3990
|
-
signal: AbortSignal;
|
|
3991
|
-
}): Promise<SendPaymentResponse>;
|
|
3992
|
-
sendSparkAddress(address: string, request: SendPaymentRequest, asyncOpts_?: {
|
|
3993
|
-
signal: AbortSignal;
|
|
3994
|
-
}): Promise<SendPaymentResponse>;
|
|
3995
4265
|
/**
|
|
3996
4266
|
* Synchronizes the wallet with the Spark network
|
|
3997
4267
|
*/
|
|
@@ -4133,18 +4403,17 @@ export interface Storage {
|
|
|
4133
4403
|
signal: AbortSignal;
|
|
4134
4404
|
}): Promise<void>;
|
|
4135
4405
|
/**
|
|
4136
|
-
* Lists payments with pagination
|
|
4406
|
+
* Lists payments with optional filters and pagination
|
|
4137
4407
|
*
|
|
4138
4408
|
* # Arguments
|
|
4139
4409
|
*
|
|
4140
|
-
* * `
|
|
4141
|
-
* * `limit` - Maximum number of records to return
|
|
4410
|
+
* * `list_payments_request` - The request to list payments
|
|
4142
4411
|
*
|
|
4143
4412
|
* # Returns
|
|
4144
4413
|
*
|
|
4145
4414
|
* A vector of payments or a `StorageError`
|
|
4146
4415
|
*/
|
|
4147
|
-
listPayments(
|
|
4416
|
+
listPayments(request: ListPaymentsRequest, asyncOpts_?: {
|
|
4148
4417
|
signal: AbortSignal;
|
|
4149
4418
|
}): Promise<Array<Payment>>;
|
|
4150
4419
|
/**
|
|
@@ -4273,18 +4542,17 @@ export declare class StorageImpl extends UniffiAbstractObject implements Storage
|
|
|
4273
4542
|
signal: AbortSignal;
|
|
4274
4543
|
}): Promise<void>;
|
|
4275
4544
|
/**
|
|
4276
|
-
* Lists payments with pagination
|
|
4545
|
+
* Lists payments with optional filters and pagination
|
|
4277
4546
|
*
|
|
4278
4547
|
* # Arguments
|
|
4279
4548
|
*
|
|
4280
|
-
* * `
|
|
4281
|
-
* * `limit` - Maximum number of records to return
|
|
4549
|
+
* * `list_payments_request` - The request to list payments
|
|
4282
4550
|
*
|
|
4283
4551
|
* # Returns
|
|
4284
4552
|
*
|
|
4285
4553
|
* A vector of payments or a `StorageError`
|
|
4286
4554
|
*/
|
|
4287
|
-
listPayments(
|
|
4555
|
+
listPayments(request: ListPaymentsRequest, asyncOpts_?: {
|
|
4288
4556
|
signal: AbortSignal;
|
|
4289
4557
|
}): Promise<Array<Payment>>;
|
|
4290
4558
|
/**
|
|
@@ -4414,6 +4682,13 @@ declare function uniffiEnsureInitialized(): void;
|
|
|
4414
4682
|
declare const _default: Readonly<{
|
|
4415
4683
|
initialize: typeof uniffiEnsureInitialized;
|
|
4416
4684
|
converters: {
|
|
4685
|
+
FfiConverterTypeAssetFilter: {
|
|
4686
|
+
read(from: RustBuffer): AssetFilter;
|
|
4687
|
+
write(value: AssetFilter, into: RustBuffer): void;
|
|
4688
|
+
allocationSize(value: AssetFilter): number;
|
|
4689
|
+
lift(value: UniffiByteArray): AssetFilter;
|
|
4690
|
+
lower(value: AssetFilter): UniffiByteArray;
|
|
4691
|
+
};
|
|
4417
4692
|
FfiConverterTypeBitcoinChainService: FfiConverterObjectWithCallbacks<BitcoinChainService>;
|
|
4418
4693
|
FfiConverterTypeBreezSdk: FfiConverterObject<BreezSdkInterface>;
|
|
4419
4694
|
FfiConverterTypeCheckLightningAddressRequest: {
|
|
@@ -4507,6 +4782,20 @@ declare const _default: Readonly<{
|
|
|
4507
4782
|
lift(value: UniffiByteArray): GetPaymentResponse;
|
|
4508
4783
|
lower(value: GetPaymentResponse): UniffiByteArray;
|
|
4509
4784
|
};
|
|
4785
|
+
FfiConverterTypeGetTokensMetadataRequest: {
|
|
4786
|
+
read(from: RustBuffer): GetTokensMetadataRequest;
|
|
4787
|
+
write(value: GetTokensMetadataRequest, into: RustBuffer): void;
|
|
4788
|
+
allocationSize(value: GetTokensMetadataRequest): number;
|
|
4789
|
+
lift(value: UniffiByteArray): GetTokensMetadataRequest;
|
|
4790
|
+
lower(value: GetTokensMetadataRequest): UniffiByteArray;
|
|
4791
|
+
};
|
|
4792
|
+
FfiConverterTypeGetTokensMetadataResponse: {
|
|
4793
|
+
read(from: RustBuffer): GetTokensMetadataResponse;
|
|
4794
|
+
write(value: GetTokensMetadataResponse, into: RustBuffer): void;
|
|
4795
|
+
allocationSize(value: GetTokensMetadataResponse): number;
|
|
4796
|
+
lift(value: UniffiByteArray): GetTokensMetadataResponse;
|
|
4797
|
+
lower(value: GetTokensMetadataResponse): UniffiByteArray;
|
|
4798
|
+
};
|
|
4510
4799
|
FfiConverterTypeKeySetType: {
|
|
4511
4800
|
read(from: RustBuffer): KeySetType;
|
|
4512
4801
|
write(value: KeySetType, into: RustBuffer): void;
|
|
@@ -4789,6 +5078,20 @@ declare const _default: Readonly<{
|
|
|
4789
5078
|
lift(value: UniffiByteArray): SyncWalletResponse;
|
|
4790
5079
|
lower(value: SyncWalletResponse): UniffiByteArray;
|
|
4791
5080
|
};
|
|
5081
|
+
FfiConverterTypeTokenBalance: {
|
|
5082
|
+
read(from: RustBuffer): TokenBalance;
|
|
5083
|
+
write(value: TokenBalance, into: RustBuffer): void;
|
|
5084
|
+
allocationSize(value: TokenBalance): number;
|
|
5085
|
+
lift(value: UniffiByteArray): TokenBalance;
|
|
5086
|
+
lower(value: TokenBalance): UniffiByteArray;
|
|
5087
|
+
};
|
|
5088
|
+
FfiConverterTypeTokenMetadata: {
|
|
5089
|
+
read(from: RustBuffer): TokenMetadata;
|
|
5090
|
+
write(value: TokenMetadata, into: RustBuffer): void;
|
|
5091
|
+
allocationSize(value: TokenMetadata): number;
|
|
5092
|
+
lift(value: UniffiByteArray): TokenMetadata;
|
|
5093
|
+
lower(value: TokenMetadata): UniffiByteArray;
|
|
5094
|
+
};
|
|
4792
5095
|
FfiConverterTypeTxStatus: {
|
|
4793
5096
|
read(from: RustBuffer): TxStatus;
|
|
4794
5097
|
write(value: TxStatus, into: RustBuffer): void;
|
|
@@ -4831,6 +5134,13 @@ declare const _default: Readonly<{
|
|
|
4831
5134
|
lift(value: UniffiByteArray): WaitForPaymentResponse;
|
|
4832
5135
|
lower(value: WaitForPaymentResponse): UniffiByteArray;
|
|
4833
5136
|
};
|
|
5137
|
+
FfiConverterTypeu128: {
|
|
5138
|
+
lift(value: Uint8Array<ArrayBufferLike>): bigint;
|
|
5139
|
+
lower(value: bigint): Uint8Array<ArrayBufferLike>;
|
|
5140
|
+
read(from: RustBuffer): bigint;
|
|
5141
|
+
write(value: bigint, into: RustBuffer): void;
|
|
5142
|
+
allocationSize(value: bigint): number;
|
|
5143
|
+
};
|
|
4834
5144
|
};
|
|
4835
5145
|
}>;
|
|
4836
5146
|
export default _default;
|