@breeztech/breez-sdk-spark-react-native 0.3.2 → 0.3.4
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/android/cpp-adapter.cpp +6 -26
- package/cpp/generated/breez_sdk_spark.cpp +147 -0
- package/cpp/generated/breez_sdk_spark.hpp +18 -0
- package/lib/commonjs/generated/breez_sdk_common.js +64 -274
- 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 +589 -24
- package/lib/commonjs/generated/breez_sdk_spark.js.map +1 -1
- package/lib/module/generated/breez_sdk_common.js +63 -273
- 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 +588 -23
- package/lib/module/generated/breez_sdk_spark.js.map +1 -1
- package/lib/typescript/commonjs/src/generated/breez_sdk_common.d.ts +79 -183
- 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 +6 -0
- 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 +571 -19
- 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 +79 -183
- 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 +6 -0
- 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 +571 -19
- 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 +118 -373
- package/src/generated/breez_sdk_spark-ffi.ts +15 -0
- package/src/generated/breez_sdk_spark.ts +1076 -41
|
@@ -2079,58 +2079,6 @@ const FfiConverterTypeRestResponse = (() => {
|
|
|
2079
2079
|
return new FFIConverter();
|
|
2080
2080
|
})();
|
|
2081
2081
|
|
|
2082
|
-
export type SatsPaymentDetails = {
|
|
2083
|
-
amount: /*u64*/ bigint | undefined;
|
|
2084
|
-
};
|
|
2085
|
-
|
|
2086
|
-
/**
|
|
2087
|
-
* Generated factory for {@link SatsPaymentDetails} record objects.
|
|
2088
|
-
*/
|
|
2089
|
-
export const SatsPaymentDetails = (() => {
|
|
2090
|
-
const defaults = () => ({});
|
|
2091
|
-
const create = (() => {
|
|
2092
|
-
return uniffiCreateRecord<SatsPaymentDetails, ReturnType<typeof defaults>>(
|
|
2093
|
-
defaults
|
|
2094
|
-
);
|
|
2095
|
-
})();
|
|
2096
|
-
return Object.freeze({
|
|
2097
|
-
/**
|
|
2098
|
-
* Create a frozen instance of {@link SatsPaymentDetails}, with defaults specified
|
|
2099
|
-
* in Rust, in the {@link breez_sdk_common} crate.
|
|
2100
|
-
*/
|
|
2101
|
-
create,
|
|
2102
|
-
|
|
2103
|
-
/**
|
|
2104
|
-
* Create a frozen instance of {@link SatsPaymentDetails}, with defaults specified
|
|
2105
|
-
* in Rust, in the {@link breez_sdk_common} crate.
|
|
2106
|
-
*/
|
|
2107
|
-
new: create,
|
|
2108
|
-
|
|
2109
|
-
/**
|
|
2110
|
-
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
2111
|
-
*/
|
|
2112
|
-
defaults: () => Object.freeze(defaults()) as Partial<SatsPaymentDetails>,
|
|
2113
|
-
});
|
|
2114
|
-
})();
|
|
2115
|
-
|
|
2116
|
-
const FfiConverterTypeSatsPaymentDetails = (() => {
|
|
2117
|
-
type TypeName = SatsPaymentDetails;
|
|
2118
|
-
class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
|
|
2119
|
-
read(from: RustBuffer): TypeName {
|
|
2120
|
-
return {
|
|
2121
|
-
amount: FfiConverterOptionalUInt64.read(from),
|
|
2122
|
-
};
|
|
2123
|
-
}
|
|
2124
|
-
write(value: TypeName, into: RustBuffer): void {
|
|
2125
|
-
FfiConverterOptionalUInt64.write(value.amount, into);
|
|
2126
|
-
}
|
|
2127
|
-
allocationSize(value: TypeName): number {
|
|
2128
|
-
return FfiConverterOptionalUInt64.allocationSize(value.amount);
|
|
2129
|
-
}
|
|
2130
|
-
}
|
|
2131
|
-
return new FFIConverter();
|
|
2132
|
-
})();
|
|
2133
|
-
|
|
2134
2082
|
export type SilentPaymentAddressDetails = {
|
|
2135
2083
|
address: string;
|
|
2136
2084
|
network: BitcoinNetwork;
|
|
@@ -2195,81 +2143,16 @@ const FfiConverterTypeSilentPaymentAddressDetails = (() => {
|
|
|
2195
2143
|
return new FFIConverter();
|
|
2196
2144
|
})();
|
|
2197
2145
|
|
|
2198
|
-
export type SparkAddress = {
|
|
2199
|
-
identityPublicKey: string;
|
|
2200
|
-
network: BitcoinNetwork;
|
|
2201
|
-
sparkInvoiceFields: SparkInvoiceFields | undefined;
|
|
2202
|
-
signature: string | undefined;
|
|
2203
|
-
};
|
|
2204
|
-
|
|
2205
|
-
/**
|
|
2206
|
-
* Generated factory for {@link SparkAddress} record objects.
|
|
2207
|
-
*/
|
|
2208
|
-
export const SparkAddress = (() => {
|
|
2209
|
-
const defaults = () => ({});
|
|
2210
|
-
const create = (() => {
|
|
2211
|
-
return uniffiCreateRecord<SparkAddress, ReturnType<typeof defaults>>(
|
|
2212
|
-
defaults
|
|
2213
|
-
);
|
|
2214
|
-
})();
|
|
2215
|
-
return Object.freeze({
|
|
2216
|
-
/**
|
|
2217
|
-
* Create a frozen instance of {@link SparkAddress}, with defaults specified
|
|
2218
|
-
* in Rust, in the {@link breez_sdk_common} crate.
|
|
2219
|
-
*/
|
|
2220
|
-
create,
|
|
2221
|
-
|
|
2222
|
-
/**
|
|
2223
|
-
* Create a frozen instance of {@link SparkAddress}, with defaults specified
|
|
2224
|
-
* in Rust, in the {@link breez_sdk_common} crate.
|
|
2225
|
-
*/
|
|
2226
|
-
new: create,
|
|
2227
|
-
|
|
2228
|
-
/**
|
|
2229
|
-
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
2230
|
-
*/
|
|
2231
|
-
defaults: () => Object.freeze(defaults()) as Partial<SparkAddress>,
|
|
2232
|
-
});
|
|
2233
|
-
})();
|
|
2234
|
-
|
|
2235
|
-
const FfiConverterTypeSparkAddress = (() => {
|
|
2236
|
-
type TypeName = SparkAddress;
|
|
2237
|
-
class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
|
|
2238
|
-
read(from: RustBuffer): TypeName {
|
|
2239
|
-
return {
|
|
2240
|
-
identityPublicKey: FfiConverterString.read(from),
|
|
2241
|
-
network: FfiConverterTypeBitcoinNetwork.read(from),
|
|
2242
|
-
sparkInvoiceFields:
|
|
2243
|
-
FfiConverterOptionalTypeSparkInvoiceFields.read(from),
|
|
2244
|
-
signature: FfiConverterOptionalString.read(from),
|
|
2245
|
-
};
|
|
2246
|
-
}
|
|
2247
|
-
write(value: TypeName, into: RustBuffer): void {
|
|
2248
|
-
FfiConverterString.write(value.identityPublicKey, into);
|
|
2249
|
-
FfiConverterTypeBitcoinNetwork.write(value.network, into);
|
|
2250
|
-
FfiConverterOptionalTypeSparkInvoiceFields.write(
|
|
2251
|
-
value.sparkInvoiceFields,
|
|
2252
|
-
into
|
|
2253
|
-
);
|
|
2254
|
-
FfiConverterOptionalString.write(value.signature, into);
|
|
2255
|
-
}
|
|
2256
|
-
allocationSize(value: TypeName): number {
|
|
2257
|
-
return (
|
|
2258
|
-
FfiConverterString.allocationSize(value.identityPublicKey) +
|
|
2259
|
-
FfiConverterTypeBitcoinNetwork.allocationSize(value.network) +
|
|
2260
|
-
FfiConverterOptionalTypeSparkInvoiceFields.allocationSize(
|
|
2261
|
-
value.sparkInvoiceFields
|
|
2262
|
-
) +
|
|
2263
|
-
FfiConverterOptionalString.allocationSize(value.signature)
|
|
2264
|
-
);
|
|
2265
|
-
}
|
|
2266
|
-
}
|
|
2267
|
-
return new FFIConverter();
|
|
2268
|
-
})();
|
|
2269
|
-
|
|
2270
2146
|
export type SparkAddressDetails = {
|
|
2147
|
+
/**
|
|
2148
|
+
* The raw address string
|
|
2149
|
+
*/
|
|
2271
2150
|
address: string;
|
|
2272
|
-
|
|
2151
|
+
/**
|
|
2152
|
+
* The identity public key of the address owner
|
|
2153
|
+
*/
|
|
2154
|
+
identityPublicKey: string;
|
|
2155
|
+
network: BitcoinNetwork;
|
|
2273
2156
|
source: PaymentRequestSource;
|
|
2274
2157
|
};
|
|
2275
2158
|
|
|
@@ -2309,19 +2192,22 @@ const FfiConverterTypeSparkAddressDetails = (() => {
|
|
|
2309
2192
|
read(from: RustBuffer): TypeName {
|
|
2310
2193
|
return {
|
|
2311
2194
|
address: FfiConverterString.read(from),
|
|
2312
|
-
|
|
2195
|
+
identityPublicKey: FfiConverterString.read(from),
|
|
2196
|
+
network: FfiConverterTypeBitcoinNetwork.read(from),
|
|
2313
2197
|
source: FfiConverterTypePaymentRequestSource.read(from),
|
|
2314
2198
|
};
|
|
2315
2199
|
}
|
|
2316
2200
|
write(value: TypeName, into: RustBuffer): void {
|
|
2317
2201
|
FfiConverterString.write(value.address, into);
|
|
2318
|
-
|
|
2202
|
+
FfiConverterString.write(value.identityPublicKey, into);
|
|
2203
|
+
FfiConverterTypeBitcoinNetwork.write(value.network, into);
|
|
2319
2204
|
FfiConverterTypePaymentRequestSource.write(value.source, into);
|
|
2320
2205
|
}
|
|
2321
2206
|
allocationSize(value: TypeName): number {
|
|
2322
2207
|
return (
|
|
2323
2208
|
FfiConverterString.allocationSize(value.address) +
|
|
2324
|
-
|
|
2209
|
+
FfiConverterString.allocationSize(value.identityPublicKey) +
|
|
2210
|
+
FfiConverterTypeBitcoinNetwork.allocationSize(value.network) +
|
|
2325
2211
|
FfiConverterTypePaymentRequestSource.allocationSize(value.source)
|
|
2326
2212
|
);
|
|
2327
2213
|
}
|
|
@@ -2329,34 +2215,57 @@ const FfiConverterTypeSparkAddressDetails = (() => {
|
|
|
2329
2215
|
return new FFIConverter();
|
|
2330
2216
|
})();
|
|
2331
2217
|
|
|
2332
|
-
export type
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2218
|
+
export type SparkInvoiceDetails = {
|
|
2219
|
+
/**
|
|
2220
|
+
* The raw invoice string
|
|
2221
|
+
*/
|
|
2222
|
+
invoice: string;
|
|
2223
|
+
/**
|
|
2224
|
+
* The identity public key of the invoice issuer
|
|
2225
|
+
*/
|
|
2226
|
+
identityPublicKey: string;
|
|
2227
|
+
network: BitcoinNetwork;
|
|
2228
|
+
/**
|
|
2229
|
+
* Optional amount denominated in sats if `token_identifier` is absent, otherwise in the token base units
|
|
2230
|
+
*/
|
|
2231
|
+
amount: CommonU128 | undefined;
|
|
2232
|
+
/**
|
|
2233
|
+
* The token identifier of the token payment. Absence indicates a Bitcoin payment.
|
|
2234
|
+
*/
|
|
2235
|
+
tokenIdentifier: string | undefined;
|
|
2236
|
+
/**
|
|
2237
|
+
* Optional expiry time. If not provided, the invoice will never expire.
|
|
2238
|
+
*/
|
|
2337
2239
|
expiryTime: /*u64*/ bigint | undefined;
|
|
2338
|
-
|
|
2240
|
+
/**
|
|
2241
|
+
* Optional description.
|
|
2242
|
+
*/
|
|
2243
|
+
description: string | undefined;
|
|
2244
|
+
/**
|
|
2245
|
+
* If set, the invoice may only be fulfilled by a payer with this public key.
|
|
2246
|
+
*/
|
|
2247
|
+
senderPublicKey: string | undefined;
|
|
2339
2248
|
};
|
|
2340
2249
|
|
|
2341
2250
|
/**
|
|
2342
|
-
* Generated factory for {@link
|
|
2251
|
+
* Generated factory for {@link SparkInvoiceDetails} record objects.
|
|
2343
2252
|
*/
|
|
2344
|
-
export const
|
|
2253
|
+
export const SparkInvoiceDetails = (() => {
|
|
2345
2254
|
const defaults = () => ({});
|
|
2346
2255
|
const create = (() => {
|
|
2347
|
-
return uniffiCreateRecord<
|
|
2256
|
+
return uniffiCreateRecord<SparkInvoiceDetails, ReturnType<typeof defaults>>(
|
|
2348
2257
|
defaults
|
|
2349
2258
|
);
|
|
2350
2259
|
})();
|
|
2351
2260
|
return Object.freeze({
|
|
2352
2261
|
/**
|
|
2353
|
-
* Create a frozen instance of {@link
|
|
2262
|
+
* Create a frozen instance of {@link SparkInvoiceDetails}, with defaults specified
|
|
2354
2263
|
* in Rust, in the {@link breez_sdk_common} crate.
|
|
2355
2264
|
*/
|
|
2356
2265
|
create,
|
|
2357
2266
|
|
|
2358
2267
|
/**
|
|
2359
|
-
* Create a frozen instance of {@link
|
|
2268
|
+
* Create a frozen instance of {@link SparkInvoiceDetails}, with defaults specified
|
|
2360
2269
|
* in Rust, in the {@link breez_sdk_common} crate.
|
|
2361
2270
|
*/
|
|
2362
2271
|
new: create,
|
|
@@ -2364,44 +2273,45 @@ export const SparkInvoiceFields = (() => {
|
|
|
2364
2273
|
/**
|
|
2365
2274
|
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
2366
2275
|
*/
|
|
2367
|
-
defaults: () => Object.freeze(defaults()) as Partial<
|
|
2276
|
+
defaults: () => Object.freeze(defaults()) as Partial<SparkInvoiceDetails>,
|
|
2368
2277
|
});
|
|
2369
2278
|
})();
|
|
2370
2279
|
|
|
2371
|
-
const
|
|
2372
|
-
type TypeName =
|
|
2280
|
+
const FfiConverterTypeSparkInvoiceDetails = (() => {
|
|
2281
|
+
type TypeName = SparkInvoiceDetails;
|
|
2373
2282
|
class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
|
|
2374
2283
|
read(from: RustBuffer): TypeName {
|
|
2375
2284
|
return {
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2285
|
+
invoice: FfiConverterString.read(from),
|
|
2286
|
+
identityPublicKey: FfiConverterString.read(from),
|
|
2287
|
+
network: FfiConverterTypeBitcoinNetwork.read(from),
|
|
2288
|
+
amount: FfiConverterOptionalTypecommon_u128.read(from),
|
|
2289
|
+
tokenIdentifier: FfiConverterOptionalString.read(from),
|
|
2380
2290
|
expiryTime: FfiConverterOptionalUInt64.read(from),
|
|
2381
|
-
|
|
2291
|
+
description: FfiConverterOptionalString.read(from),
|
|
2292
|
+
senderPublicKey: FfiConverterOptionalString.read(from),
|
|
2382
2293
|
};
|
|
2383
2294
|
}
|
|
2384
2295
|
write(value: TypeName, into: RustBuffer): void {
|
|
2385
|
-
FfiConverterString.write(value.
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2296
|
+
FfiConverterString.write(value.invoice, into);
|
|
2297
|
+
FfiConverterString.write(value.identityPublicKey, into);
|
|
2298
|
+
FfiConverterTypeBitcoinNetwork.write(value.network, into);
|
|
2299
|
+
FfiConverterOptionalTypecommon_u128.write(value.amount, into);
|
|
2300
|
+
FfiConverterOptionalString.write(value.tokenIdentifier, into);
|
|
2389
2301
|
FfiConverterOptionalUInt64.write(value.expiryTime, into);
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
into
|
|
2393
|
-
);
|
|
2302
|
+
FfiConverterOptionalString.write(value.description, into);
|
|
2303
|
+
FfiConverterOptionalString.write(value.senderPublicKey, into);
|
|
2394
2304
|
}
|
|
2395
2305
|
allocationSize(value: TypeName): number {
|
|
2396
2306
|
return (
|
|
2397
|
-
FfiConverterString.allocationSize(value.
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2307
|
+
FfiConverterString.allocationSize(value.invoice) +
|
|
2308
|
+
FfiConverterString.allocationSize(value.identityPublicKey) +
|
|
2309
|
+
FfiConverterTypeBitcoinNetwork.allocationSize(value.network) +
|
|
2310
|
+
FfiConverterOptionalTypecommon_u128.allocationSize(value.amount) +
|
|
2311
|
+
FfiConverterOptionalString.allocationSize(value.tokenIdentifier) +
|
|
2401
2312
|
FfiConverterOptionalUInt64.allocationSize(value.expiryTime) +
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
)
|
|
2313
|
+
FfiConverterOptionalString.allocationSize(value.description) +
|
|
2314
|
+
FfiConverterOptionalString.allocationSize(value.senderPublicKey)
|
|
2405
2315
|
);
|
|
2406
2316
|
}
|
|
2407
2317
|
}
|
|
@@ -2475,65 +2385,6 @@ const FfiConverterTypeSymbol = (() => {
|
|
|
2475
2385
|
return new FFIConverter();
|
|
2476
2386
|
})();
|
|
2477
2387
|
|
|
2478
|
-
export type TokensPaymentDetails = {
|
|
2479
|
-
tokenIdentifier: string | undefined;
|
|
2480
|
-
amount: CommonU128 | undefined;
|
|
2481
|
-
};
|
|
2482
|
-
|
|
2483
|
-
/**
|
|
2484
|
-
* Generated factory for {@link TokensPaymentDetails} record objects.
|
|
2485
|
-
*/
|
|
2486
|
-
export const TokensPaymentDetails = (() => {
|
|
2487
|
-
const defaults = () => ({});
|
|
2488
|
-
const create = (() => {
|
|
2489
|
-
return uniffiCreateRecord<
|
|
2490
|
-
TokensPaymentDetails,
|
|
2491
|
-
ReturnType<typeof defaults>
|
|
2492
|
-
>(defaults);
|
|
2493
|
-
})();
|
|
2494
|
-
return Object.freeze({
|
|
2495
|
-
/**
|
|
2496
|
-
* Create a frozen instance of {@link TokensPaymentDetails}, with defaults specified
|
|
2497
|
-
* in Rust, in the {@link breez_sdk_common} crate.
|
|
2498
|
-
*/
|
|
2499
|
-
create,
|
|
2500
|
-
|
|
2501
|
-
/**
|
|
2502
|
-
* Create a frozen instance of {@link TokensPaymentDetails}, with defaults specified
|
|
2503
|
-
* in Rust, in the {@link breez_sdk_common} crate.
|
|
2504
|
-
*/
|
|
2505
|
-
new: create,
|
|
2506
|
-
|
|
2507
|
-
/**
|
|
2508
|
-
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
2509
|
-
*/
|
|
2510
|
-
defaults: () => Object.freeze(defaults()) as Partial<TokensPaymentDetails>,
|
|
2511
|
-
});
|
|
2512
|
-
})();
|
|
2513
|
-
|
|
2514
|
-
const FfiConverterTypeTokensPaymentDetails = (() => {
|
|
2515
|
-
type TypeName = TokensPaymentDetails;
|
|
2516
|
-
class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
|
|
2517
|
-
read(from: RustBuffer): TypeName {
|
|
2518
|
-
return {
|
|
2519
|
-
tokenIdentifier: FfiConverterOptionalString.read(from),
|
|
2520
|
-
amount: FfiConverterOptionalTypecommon_u128.read(from),
|
|
2521
|
-
};
|
|
2522
|
-
}
|
|
2523
|
-
write(value: TypeName, into: RustBuffer): void {
|
|
2524
|
-
FfiConverterOptionalString.write(value.tokenIdentifier, into);
|
|
2525
|
-
FfiConverterOptionalTypecommon_u128.write(value.amount, into);
|
|
2526
|
-
}
|
|
2527
|
-
allocationSize(value: TypeName): number {
|
|
2528
|
-
return (
|
|
2529
|
-
FfiConverterOptionalString.allocationSize(value.tokenIdentifier) +
|
|
2530
|
-
FfiConverterOptionalTypecommon_u128.allocationSize(value.amount)
|
|
2531
|
-
);
|
|
2532
|
-
}
|
|
2533
|
-
}
|
|
2534
|
-
return new FFIConverter();
|
|
2535
|
-
})();
|
|
2536
|
-
|
|
2537
2388
|
export type UrlSuccessActionData = {
|
|
2538
2389
|
/**
|
|
2539
2390
|
* Contents description, up to 144 characters
|
|
@@ -3042,6 +2893,7 @@ export enum InputType_Tags {
|
|
|
3042
2893
|
Bolt12InvoiceRequest = 'Bolt12InvoiceRequest',
|
|
3043
2894
|
LnurlWithdraw = 'LnurlWithdraw',
|
|
3044
2895
|
SparkAddress = 'SparkAddress',
|
|
2896
|
+
SparkInvoice = 'SparkInvoice',
|
|
3045
2897
|
}
|
|
3046
2898
|
export const InputType = (() => {
|
|
3047
2899
|
type BitcoinAddress__interface = {
|
|
@@ -3407,6 +3259,33 @@ export const InputType = (() => {
|
|
|
3407
3259
|
}
|
|
3408
3260
|
}
|
|
3409
3261
|
|
|
3262
|
+
type SparkInvoice__interface = {
|
|
3263
|
+
tag: InputType_Tags.SparkInvoice;
|
|
3264
|
+
inner: Readonly<[SparkInvoiceDetails]>;
|
|
3265
|
+
};
|
|
3266
|
+
|
|
3267
|
+
class SparkInvoice_ extends UniffiEnum implements SparkInvoice__interface {
|
|
3268
|
+
/**
|
|
3269
|
+
* @private
|
|
3270
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3271
|
+
*/
|
|
3272
|
+
readonly [uniffiTypeNameSymbol] = 'InputType';
|
|
3273
|
+
readonly tag = InputType_Tags.SparkInvoice;
|
|
3274
|
+
readonly inner: Readonly<[SparkInvoiceDetails]>;
|
|
3275
|
+
constructor(v0: SparkInvoiceDetails) {
|
|
3276
|
+
super('InputType', 'SparkInvoice');
|
|
3277
|
+
this.inner = Object.freeze([v0]);
|
|
3278
|
+
}
|
|
3279
|
+
|
|
3280
|
+
static new(v0: SparkInvoiceDetails): SparkInvoice_ {
|
|
3281
|
+
return new SparkInvoice_(v0);
|
|
3282
|
+
}
|
|
3283
|
+
|
|
3284
|
+
static instanceOf(obj: any): obj is SparkInvoice_ {
|
|
3285
|
+
return obj.tag === InputType_Tags.SparkInvoice;
|
|
3286
|
+
}
|
|
3287
|
+
}
|
|
3288
|
+
|
|
3410
3289
|
function instanceOf(obj: any): obj is InputType {
|
|
3411
3290
|
return obj[uniffiTypeNameSymbol] === 'InputType';
|
|
3412
3291
|
}
|
|
@@ -3426,6 +3305,7 @@ export const InputType = (() => {
|
|
|
3426
3305
|
Bolt12InvoiceRequest: Bolt12InvoiceRequest_,
|
|
3427
3306
|
LnurlWithdraw: LnurlWithdraw_,
|
|
3428
3307
|
SparkAddress: SparkAddress_,
|
|
3308
|
+
SparkInvoice: SparkInvoice_,
|
|
3429
3309
|
});
|
|
3430
3310
|
})();
|
|
3431
3311
|
|
|
@@ -3488,6 +3368,10 @@ const FfiConverterTypeInputType = (() => {
|
|
|
3488
3368
|
return new InputType.SparkAddress(
|
|
3489
3369
|
FfiConverterTypeSparkAddressDetails.read(from)
|
|
3490
3370
|
);
|
|
3371
|
+
case 14:
|
|
3372
|
+
return new InputType.SparkInvoice(
|
|
3373
|
+
FfiConverterTypeSparkInvoiceDetails.read(from)
|
|
3374
|
+
);
|
|
3491
3375
|
default:
|
|
3492
3376
|
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
3493
3377
|
}
|
|
@@ -3572,6 +3456,12 @@ const FfiConverterTypeInputType = (() => {
|
|
|
3572
3456
|
FfiConverterTypeSparkAddressDetails.write(inner[0], into);
|
|
3573
3457
|
return;
|
|
3574
3458
|
}
|
|
3459
|
+
case InputType_Tags.SparkInvoice: {
|
|
3460
|
+
ordinalConverter.write(14, into);
|
|
3461
|
+
const inner = value.inner;
|
|
3462
|
+
FfiConverterTypeSparkInvoiceDetails.write(inner[0], into);
|
|
3463
|
+
return;
|
|
3464
|
+
}
|
|
3575
3465
|
default:
|
|
3576
3466
|
// Throwing from here means that InputType_Tags hasn't matched an ordinal.
|
|
3577
3467
|
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
@@ -3671,6 +3561,12 @@ const FfiConverterTypeInputType = (() => {
|
|
|
3671
3561
|
size += FfiConverterTypeSparkAddressDetails.allocationSize(inner[0]);
|
|
3672
3562
|
return size;
|
|
3673
3563
|
}
|
|
3564
|
+
case InputType_Tags.SparkInvoice: {
|
|
3565
|
+
const inner = value.inner;
|
|
3566
|
+
let size = ordinalConverter.allocationSize(14);
|
|
3567
|
+
size += FfiConverterTypeSparkInvoiceDetails.allocationSize(inner[0]);
|
|
3568
|
+
return size;
|
|
3569
|
+
}
|
|
3674
3570
|
default:
|
|
3675
3571
|
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
3676
3572
|
}
|
|
@@ -4423,144 +4319,6 @@ const FfiConverterTypeServiceConnectivityError = (() => {
|
|
|
4423
4319
|
return new FFIConverter();
|
|
4424
4320
|
})();
|
|
4425
4321
|
|
|
4426
|
-
// Enum: SparkAddressPaymentType
|
|
4427
|
-
export enum SparkAddressPaymentType_Tags {
|
|
4428
|
-
TokensPayment = 'TokensPayment',
|
|
4429
|
-
SatsPayment = 'SatsPayment',
|
|
4430
|
-
}
|
|
4431
|
-
export const SparkAddressPaymentType = (() => {
|
|
4432
|
-
type TokensPayment__interface = {
|
|
4433
|
-
tag: SparkAddressPaymentType_Tags.TokensPayment;
|
|
4434
|
-
inner: Readonly<[TokensPaymentDetails]>;
|
|
4435
|
-
};
|
|
4436
|
-
|
|
4437
|
-
class TokensPayment_ extends UniffiEnum implements TokensPayment__interface {
|
|
4438
|
-
/**
|
|
4439
|
-
* @private
|
|
4440
|
-
* This field is private and should not be used, use `tag` instead.
|
|
4441
|
-
*/
|
|
4442
|
-
readonly [uniffiTypeNameSymbol] = 'SparkAddressPaymentType';
|
|
4443
|
-
readonly tag = SparkAddressPaymentType_Tags.TokensPayment;
|
|
4444
|
-
readonly inner: Readonly<[TokensPaymentDetails]>;
|
|
4445
|
-
constructor(v0: TokensPaymentDetails) {
|
|
4446
|
-
super('SparkAddressPaymentType', 'TokensPayment');
|
|
4447
|
-
this.inner = Object.freeze([v0]);
|
|
4448
|
-
}
|
|
4449
|
-
|
|
4450
|
-
static new(v0: TokensPaymentDetails): TokensPayment_ {
|
|
4451
|
-
return new TokensPayment_(v0);
|
|
4452
|
-
}
|
|
4453
|
-
|
|
4454
|
-
static instanceOf(obj: any): obj is TokensPayment_ {
|
|
4455
|
-
return obj.tag === SparkAddressPaymentType_Tags.TokensPayment;
|
|
4456
|
-
}
|
|
4457
|
-
}
|
|
4458
|
-
|
|
4459
|
-
type SatsPayment__interface = {
|
|
4460
|
-
tag: SparkAddressPaymentType_Tags.SatsPayment;
|
|
4461
|
-
inner: Readonly<[SatsPaymentDetails]>;
|
|
4462
|
-
};
|
|
4463
|
-
|
|
4464
|
-
class SatsPayment_ extends UniffiEnum implements SatsPayment__interface {
|
|
4465
|
-
/**
|
|
4466
|
-
* @private
|
|
4467
|
-
* This field is private and should not be used, use `tag` instead.
|
|
4468
|
-
*/
|
|
4469
|
-
readonly [uniffiTypeNameSymbol] = 'SparkAddressPaymentType';
|
|
4470
|
-
readonly tag = SparkAddressPaymentType_Tags.SatsPayment;
|
|
4471
|
-
readonly inner: Readonly<[SatsPaymentDetails]>;
|
|
4472
|
-
constructor(v0: SatsPaymentDetails) {
|
|
4473
|
-
super('SparkAddressPaymentType', 'SatsPayment');
|
|
4474
|
-
this.inner = Object.freeze([v0]);
|
|
4475
|
-
}
|
|
4476
|
-
|
|
4477
|
-
static new(v0: SatsPaymentDetails): SatsPayment_ {
|
|
4478
|
-
return new SatsPayment_(v0);
|
|
4479
|
-
}
|
|
4480
|
-
|
|
4481
|
-
static instanceOf(obj: any): obj is SatsPayment_ {
|
|
4482
|
-
return obj.tag === SparkAddressPaymentType_Tags.SatsPayment;
|
|
4483
|
-
}
|
|
4484
|
-
}
|
|
4485
|
-
|
|
4486
|
-
function instanceOf(obj: any): obj is SparkAddressPaymentType {
|
|
4487
|
-
return obj[uniffiTypeNameSymbol] === 'SparkAddressPaymentType';
|
|
4488
|
-
}
|
|
4489
|
-
|
|
4490
|
-
return Object.freeze({
|
|
4491
|
-
instanceOf,
|
|
4492
|
-
TokensPayment: TokensPayment_,
|
|
4493
|
-
SatsPayment: SatsPayment_,
|
|
4494
|
-
});
|
|
4495
|
-
})();
|
|
4496
|
-
|
|
4497
|
-
export type SparkAddressPaymentType = InstanceType<
|
|
4498
|
-
(typeof SparkAddressPaymentType)[keyof Omit<
|
|
4499
|
-
typeof SparkAddressPaymentType,
|
|
4500
|
-
'instanceOf'
|
|
4501
|
-
>]
|
|
4502
|
-
>;
|
|
4503
|
-
|
|
4504
|
-
// FfiConverter for enum SparkAddressPaymentType
|
|
4505
|
-
const FfiConverterTypeSparkAddressPaymentType = (() => {
|
|
4506
|
-
const ordinalConverter = FfiConverterInt32;
|
|
4507
|
-
type TypeName = SparkAddressPaymentType;
|
|
4508
|
-
class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
|
|
4509
|
-
read(from: RustBuffer): TypeName {
|
|
4510
|
-
switch (ordinalConverter.read(from)) {
|
|
4511
|
-
case 1:
|
|
4512
|
-
return new SparkAddressPaymentType.TokensPayment(
|
|
4513
|
-
FfiConverterTypeTokensPaymentDetails.read(from)
|
|
4514
|
-
);
|
|
4515
|
-
case 2:
|
|
4516
|
-
return new SparkAddressPaymentType.SatsPayment(
|
|
4517
|
-
FfiConverterTypeSatsPaymentDetails.read(from)
|
|
4518
|
-
);
|
|
4519
|
-
default:
|
|
4520
|
-
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
4521
|
-
}
|
|
4522
|
-
}
|
|
4523
|
-
write(value: TypeName, into: RustBuffer): void {
|
|
4524
|
-
switch (value.tag) {
|
|
4525
|
-
case SparkAddressPaymentType_Tags.TokensPayment: {
|
|
4526
|
-
ordinalConverter.write(1, into);
|
|
4527
|
-
const inner = value.inner;
|
|
4528
|
-
FfiConverterTypeTokensPaymentDetails.write(inner[0], into);
|
|
4529
|
-
return;
|
|
4530
|
-
}
|
|
4531
|
-
case SparkAddressPaymentType_Tags.SatsPayment: {
|
|
4532
|
-
ordinalConverter.write(2, into);
|
|
4533
|
-
const inner = value.inner;
|
|
4534
|
-
FfiConverterTypeSatsPaymentDetails.write(inner[0], into);
|
|
4535
|
-
return;
|
|
4536
|
-
}
|
|
4537
|
-
default:
|
|
4538
|
-
// Throwing from here means that SparkAddressPaymentType_Tags hasn't matched an ordinal.
|
|
4539
|
-
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
4540
|
-
}
|
|
4541
|
-
}
|
|
4542
|
-
allocationSize(value: TypeName): number {
|
|
4543
|
-
switch (value.tag) {
|
|
4544
|
-
case SparkAddressPaymentType_Tags.TokensPayment: {
|
|
4545
|
-
const inner = value.inner;
|
|
4546
|
-
let size = ordinalConverter.allocationSize(1);
|
|
4547
|
-
size += FfiConverterTypeTokensPaymentDetails.allocationSize(inner[0]);
|
|
4548
|
-
return size;
|
|
4549
|
-
}
|
|
4550
|
-
case SparkAddressPaymentType_Tags.SatsPayment: {
|
|
4551
|
-
const inner = value.inner;
|
|
4552
|
-
let size = ordinalConverter.allocationSize(2);
|
|
4553
|
-
size += FfiConverterTypeSatsPaymentDetails.allocationSize(inner[0]);
|
|
4554
|
-
return size;
|
|
4555
|
-
}
|
|
4556
|
-
default:
|
|
4557
|
-
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
4558
|
-
}
|
|
4559
|
-
}
|
|
4560
|
-
}
|
|
4561
|
-
return new FFIConverter();
|
|
4562
|
-
})();
|
|
4563
|
-
|
|
4564
4322
|
// Enum: SuccessAction
|
|
4565
4323
|
export enum SuccessAction_Tags {
|
|
4566
4324
|
Aes = 'Aes',
|
|
@@ -5749,11 +5507,6 @@ const uniffiCallbackInterfaceRestClient: {
|
|
|
5749
5507
|
// FfiConverter for boolean | undefined
|
|
5750
5508
|
const FfiConverterOptionalBool = new FfiConverterOptional(FfiConverterBool);
|
|
5751
5509
|
|
|
5752
|
-
// FfiConverter for SparkInvoiceFields | undefined
|
|
5753
|
-
const FfiConverterOptionalTypeSparkInvoiceFields = new FfiConverterOptional(
|
|
5754
|
-
FfiConverterTypeSparkInvoiceFields
|
|
5755
|
-
);
|
|
5756
|
-
|
|
5757
5510
|
// FfiConverter for Symbol | undefined
|
|
5758
5511
|
const FfiConverterOptionalTypeSymbol = new FfiConverterOptional(
|
|
5759
5512
|
FfiConverterTypeSymbol
|
|
@@ -5819,10 +5572,6 @@ const FfiConverterOptionalTypeAmount = new FfiConverterOptional(
|
|
|
5819
5572
|
FfiConverterTypeAmount
|
|
5820
5573
|
);
|
|
5821
5574
|
|
|
5822
|
-
// FfiConverter for SparkAddressPaymentType | undefined
|
|
5823
|
-
const FfiConverterOptionalTypeSparkAddressPaymentType =
|
|
5824
|
-
new FfiConverterOptional(FfiConverterTypeSparkAddressPaymentType);
|
|
5825
|
-
|
|
5826
5575
|
// FfiConverter for Map<string, string> | undefined
|
|
5827
5576
|
const FfiConverterOptionalMapStringString = new FfiConverterOptional(
|
|
5828
5577
|
FfiConverterMapStringString
|
|
@@ -5939,16 +5688,12 @@ export default Object.freeze({
|
|
|
5939
5688
|
FfiConverterTypeRate,
|
|
5940
5689
|
FfiConverterTypeRestClient,
|
|
5941
5690
|
FfiConverterTypeRestResponse,
|
|
5942
|
-
FfiConverterTypeSatsPaymentDetails,
|
|
5943
5691
|
FfiConverterTypeSilentPaymentAddressDetails,
|
|
5944
|
-
FfiConverterTypeSparkAddress,
|
|
5945
5692
|
FfiConverterTypeSparkAddressDetails,
|
|
5946
|
-
|
|
5947
|
-
FfiConverterTypeSparkInvoiceFields,
|
|
5693
|
+
FfiConverterTypeSparkInvoiceDetails,
|
|
5948
5694
|
FfiConverterTypeSuccessAction,
|
|
5949
5695
|
FfiConverterTypeSuccessActionProcessed,
|
|
5950
5696
|
FfiConverterTypeSymbol,
|
|
5951
|
-
FfiConverterTypeTokensPaymentDetails,
|
|
5952
5697
|
FfiConverterTypeUrlSuccessActionData,
|
|
5953
5698
|
FfiConverterTypecommon_u128,
|
|
5954
5699
|
},
|
|
@@ -63,6 +63,10 @@ interface NativeModuleInterface {
|
|
|
63
63
|
ptr: bigint,
|
|
64
64
|
req: Uint8Array
|
|
65
65
|
): bigint;
|
|
66
|
+
ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_check_message(
|
|
67
|
+
ptr: bigint,
|
|
68
|
+
request: Uint8Array
|
|
69
|
+
): bigint;
|
|
66
70
|
ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_claim_deposit(
|
|
67
71
|
ptr: bigint,
|
|
68
72
|
request: Uint8Array
|
|
@@ -106,6 +110,10 @@ interface NativeModuleInterface {
|
|
|
106
110
|
ptr: bigint,
|
|
107
111
|
request: Uint8Array
|
|
108
112
|
): bigint;
|
|
113
|
+
ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_lnurl_withdraw(
|
|
114
|
+
ptr: bigint,
|
|
115
|
+
request: Uint8Array
|
|
116
|
+
): bigint;
|
|
109
117
|
ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_parse(
|
|
110
118
|
ptr: bigint,
|
|
111
119
|
input: Uint8Array
|
|
@@ -138,6 +146,10 @@ interface NativeModuleInterface {
|
|
|
138
146
|
ptr: bigint,
|
|
139
147
|
request: Uint8Array
|
|
140
148
|
): bigint;
|
|
149
|
+
ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_sign_message(
|
|
150
|
+
ptr: bigint,
|
|
151
|
+
request: Uint8Array
|
|
152
|
+
): bigint;
|
|
141
153
|
ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet(
|
|
142
154
|
ptr: bigint,
|
|
143
155
|
request: Uint8Array
|
|
@@ -430,6 +442,7 @@ interface NativeModuleInterface {
|
|
|
430
442
|
ubrn_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_broadcast_transaction(): number;
|
|
431
443
|
ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_add_event_listener(): number;
|
|
432
444
|
ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_check_lightning_address_available(): number;
|
|
445
|
+
ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_check_message(): number;
|
|
433
446
|
ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_deposit(): number;
|
|
434
447
|
ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_delete_lightning_address(): number;
|
|
435
448
|
ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_disconnect(): number;
|
|
@@ -442,6 +455,7 @@ interface NativeModuleInterface {
|
|
|
442
455
|
ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_list_payments(): number;
|
|
443
456
|
ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_list_unclaimed_deposits(): number;
|
|
444
457
|
ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_pay(): number;
|
|
458
|
+
ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_withdraw(): number;
|
|
445
459
|
ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_parse(): number;
|
|
446
460
|
ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_lnurl_pay(): number;
|
|
447
461
|
ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_send_payment(): number;
|
|
@@ -450,6 +464,7 @@ interface NativeModuleInterface {
|
|
|
450
464
|
ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_register_lightning_address(): number;
|
|
451
465
|
ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_remove_event_listener(): number;
|
|
452
466
|
ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment(): number;
|
|
467
|
+
ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_sign_message(): number;
|
|
453
468
|
ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet(): number;
|
|
454
469
|
ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_wait_for_payment(): number;
|
|
455
470
|
ubrn_uniffi_breez_sdk_spark_checksum_method_paymentobserver_before_send(): number;
|