@breeztech/breez-sdk-spark-react-native 0.3.1 → 0.3.3

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.
Files changed (28) hide show
  1. package/cpp/generated/breez_sdk_spark.cpp +710 -48
  2. package/cpp/generated/breez_sdk_spark.hpp +51 -7
  3. package/lib/commonjs/generated/breez_sdk_common.js +115 -274
  4. package/lib/commonjs/generated/breez_sdk_common.js.map +1 -1
  5. package/lib/commonjs/generated/breez_sdk_spark-ffi.js.map +1 -1
  6. package/lib/commonjs/generated/breez_sdk_spark.js +1165 -67
  7. package/lib/commonjs/generated/breez_sdk_spark.js.map +1 -1
  8. package/lib/module/generated/breez_sdk_common.js +114 -273
  9. package/lib/module/generated/breez_sdk_common.js.map +1 -1
  10. package/lib/module/generated/breez_sdk_spark-ffi.js.map +1 -1
  11. package/lib/module/generated/breez_sdk_spark.js +1163 -65
  12. package/lib/module/generated/breez_sdk_spark.js.map +1 -1
  13. package/lib/typescript/commonjs/src/generated/breez_sdk_common.d.ts +123 -183
  14. package/lib/typescript/commonjs/src/generated/breez_sdk_common.d.ts.map +1 -1
  15. package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts +21 -2
  16. package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts.map +1 -1
  17. package/lib/typescript/commonjs/src/generated/breez_sdk_spark.d.ts +1082 -77
  18. package/lib/typescript/commonjs/src/generated/breez_sdk_spark.d.ts.map +1 -1
  19. package/lib/typescript/module/src/generated/breez_sdk_common.d.ts +123 -183
  20. package/lib/typescript/module/src/generated/breez_sdk_common.d.ts.map +1 -1
  21. package/lib/typescript/module/src/generated/breez_sdk_spark-ffi.d.ts +21 -2
  22. package/lib/typescript/module/src/generated/breez_sdk_spark-ffi.d.ts.map +1 -1
  23. package/lib/typescript/module/src/generated/breez_sdk_spark.d.ts +1082 -77
  24. package/lib/typescript/module/src/generated/breez_sdk_spark.d.ts.map +1 -1
  25. package/package.json +1 -1
  26. package/src/generated/breez_sdk_common.ts +194 -373
  27. package/src/generated/breez_sdk_spark-ffi.ts +55 -2
  28. package/src/generated/breez_sdk_spark.ts +2090 -218
@@ -1177,6 +1177,81 @@ const FfiConverterTypeCurrencyInfo = (() => {
1177
1177
  return new FFIConverter();
1178
1178
  })();
1179
1179
 
1180
+ /**
1181
+ * Configuration for an external input parser
1182
+ */
1183
+ export type ExternalInputParser = {
1184
+ /**
1185
+ * An arbitrary parser provider id
1186
+ */
1187
+ providerId: string;
1188
+ /**
1189
+ * The external parser will be used when an input conforms to this regex
1190
+ */
1191
+ inputRegex: string;
1192
+ /**
1193
+ * The URL of the parser containing a placeholder `<input>` that will be replaced with the
1194
+ * input to be parsed. The input is sanitized using percent encoding.
1195
+ */
1196
+ parserUrl: string;
1197
+ };
1198
+
1199
+ /**
1200
+ * Generated factory for {@link ExternalInputParser} record objects.
1201
+ */
1202
+ export const ExternalInputParser = (() => {
1203
+ const defaults = () => ({});
1204
+ const create = (() => {
1205
+ return uniffiCreateRecord<ExternalInputParser, ReturnType<typeof defaults>>(
1206
+ defaults
1207
+ );
1208
+ })();
1209
+ return Object.freeze({
1210
+ /**
1211
+ * Create a frozen instance of {@link ExternalInputParser}, with defaults specified
1212
+ * in Rust, in the {@link breez_sdk_common} crate.
1213
+ */
1214
+ create,
1215
+
1216
+ /**
1217
+ * Create a frozen instance of {@link ExternalInputParser}, with defaults specified
1218
+ * in Rust, in the {@link breez_sdk_common} crate.
1219
+ */
1220
+ new: create,
1221
+
1222
+ /**
1223
+ * Defaults specified in the {@link breez_sdk_common} crate.
1224
+ */
1225
+ defaults: () => Object.freeze(defaults()) as Partial<ExternalInputParser>,
1226
+ });
1227
+ })();
1228
+
1229
+ const FfiConverterTypeExternalInputParser = (() => {
1230
+ type TypeName = ExternalInputParser;
1231
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
1232
+ read(from: RustBuffer): TypeName {
1233
+ return {
1234
+ providerId: FfiConverterString.read(from),
1235
+ inputRegex: FfiConverterString.read(from),
1236
+ parserUrl: FfiConverterString.read(from),
1237
+ };
1238
+ }
1239
+ write(value: TypeName, into: RustBuffer): void {
1240
+ FfiConverterString.write(value.providerId, into);
1241
+ FfiConverterString.write(value.inputRegex, into);
1242
+ FfiConverterString.write(value.parserUrl, into);
1243
+ }
1244
+ allocationSize(value: TypeName): number {
1245
+ return (
1246
+ FfiConverterString.allocationSize(value.providerId) +
1247
+ FfiConverterString.allocationSize(value.inputRegex) +
1248
+ FfiConverterString.allocationSize(value.parserUrl)
1249
+ );
1250
+ }
1251
+ }
1252
+ return new FFIConverter();
1253
+ })();
1254
+
1180
1255
  /**
1181
1256
  * Wrapper around the [`CurrencyInfo`] of a fiat currency
1182
1257
  */
@@ -2004,58 +2079,6 @@ const FfiConverterTypeRestResponse = (() => {
2004
2079
  return new FFIConverter();
2005
2080
  })();
2006
2081
 
2007
- export type SatsPaymentDetails = {
2008
- amount: /*u64*/ bigint | undefined;
2009
- };
2010
-
2011
- /**
2012
- * Generated factory for {@link SatsPaymentDetails} record objects.
2013
- */
2014
- export const SatsPaymentDetails = (() => {
2015
- const defaults = () => ({});
2016
- const create = (() => {
2017
- return uniffiCreateRecord<SatsPaymentDetails, ReturnType<typeof defaults>>(
2018
- defaults
2019
- );
2020
- })();
2021
- return Object.freeze({
2022
- /**
2023
- * Create a frozen instance of {@link SatsPaymentDetails}, with defaults specified
2024
- * in Rust, in the {@link breez_sdk_common} crate.
2025
- */
2026
- create,
2027
-
2028
- /**
2029
- * Create a frozen instance of {@link SatsPaymentDetails}, with defaults specified
2030
- * in Rust, in the {@link breez_sdk_common} crate.
2031
- */
2032
- new: create,
2033
-
2034
- /**
2035
- * Defaults specified in the {@link breez_sdk_common} crate.
2036
- */
2037
- defaults: () => Object.freeze(defaults()) as Partial<SatsPaymentDetails>,
2038
- });
2039
- })();
2040
-
2041
- const FfiConverterTypeSatsPaymentDetails = (() => {
2042
- type TypeName = SatsPaymentDetails;
2043
- class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
2044
- read(from: RustBuffer): TypeName {
2045
- return {
2046
- amount: FfiConverterOptionalUInt64.read(from),
2047
- };
2048
- }
2049
- write(value: TypeName, into: RustBuffer): void {
2050
- FfiConverterOptionalUInt64.write(value.amount, into);
2051
- }
2052
- allocationSize(value: TypeName): number {
2053
- return FfiConverterOptionalUInt64.allocationSize(value.amount);
2054
- }
2055
- }
2056
- return new FFIConverter();
2057
- })();
2058
-
2059
2082
  export type SilentPaymentAddressDetails = {
2060
2083
  address: string;
2061
2084
  network: BitcoinNetwork;
@@ -2120,81 +2143,16 @@ const FfiConverterTypeSilentPaymentAddressDetails = (() => {
2120
2143
  return new FFIConverter();
2121
2144
  })();
2122
2145
 
2123
- export type SparkAddress = {
2124
- identityPublicKey: string;
2125
- network: BitcoinNetwork;
2126
- sparkInvoiceFields: SparkInvoiceFields | undefined;
2127
- signature: string | undefined;
2128
- };
2129
-
2130
- /**
2131
- * Generated factory for {@link SparkAddress} record objects.
2132
- */
2133
- export const SparkAddress = (() => {
2134
- const defaults = () => ({});
2135
- const create = (() => {
2136
- return uniffiCreateRecord<SparkAddress, ReturnType<typeof defaults>>(
2137
- defaults
2138
- );
2139
- })();
2140
- return Object.freeze({
2141
- /**
2142
- * Create a frozen instance of {@link SparkAddress}, with defaults specified
2143
- * in Rust, in the {@link breez_sdk_common} crate.
2144
- */
2145
- create,
2146
-
2147
- /**
2148
- * Create a frozen instance of {@link SparkAddress}, with defaults specified
2149
- * in Rust, in the {@link breez_sdk_common} crate.
2150
- */
2151
- new: create,
2152
-
2153
- /**
2154
- * Defaults specified in the {@link breez_sdk_common} crate.
2155
- */
2156
- defaults: () => Object.freeze(defaults()) as Partial<SparkAddress>,
2157
- });
2158
- })();
2159
-
2160
- const FfiConverterTypeSparkAddress = (() => {
2161
- type TypeName = SparkAddress;
2162
- class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
2163
- read(from: RustBuffer): TypeName {
2164
- return {
2165
- identityPublicKey: FfiConverterString.read(from),
2166
- network: FfiConverterTypeBitcoinNetwork.read(from),
2167
- sparkInvoiceFields:
2168
- FfiConverterOptionalTypeSparkInvoiceFields.read(from),
2169
- signature: FfiConverterOptionalString.read(from),
2170
- };
2171
- }
2172
- write(value: TypeName, into: RustBuffer): void {
2173
- FfiConverterString.write(value.identityPublicKey, into);
2174
- FfiConverterTypeBitcoinNetwork.write(value.network, into);
2175
- FfiConverterOptionalTypeSparkInvoiceFields.write(
2176
- value.sparkInvoiceFields,
2177
- into
2178
- );
2179
- FfiConverterOptionalString.write(value.signature, into);
2180
- }
2181
- allocationSize(value: TypeName): number {
2182
- return (
2183
- FfiConverterString.allocationSize(value.identityPublicKey) +
2184
- FfiConverterTypeBitcoinNetwork.allocationSize(value.network) +
2185
- FfiConverterOptionalTypeSparkInvoiceFields.allocationSize(
2186
- value.sparkInvoiceFields
2187
- ) +
2188
- FfiConverterOptionalString.allocationSize(value.signature)
2189
- );
2190
- }
2191
- }
2192
- return new FFIConverter();
2193
- })();
2194
-
2195
2146
  export type SparkAddressDetails = {
2147
+ /**
2148
+ * The raw address string
2149
+ */
2196
2150
  address: string;
2197
- decodedAddress: SparkAddress;
2151
+ /**
2152
+ * The identity public key of the address owner
2153
+ */
2154
+ identityPublicKey: string;
2155
+ network: BitcoinNetwork;
2198
2156
  source: PaymentRequestSource;
2199
2157
  };
2200
2158
 
@@ -2234,19 +2192,22 @@ const FfiConverterTypeSparkAddressDetails = (() => {
2234
2192
  read(from: RustBuffer): TypeName {
2235
2193
  return {
2236
2194
  address: FfiConverterString.read(from),
2237
- decodedAddress: FfiConverterTypeSparkAddress.read(from),
2195
+ identityPublicKey: FfiConverterString.read(from),
2196
+ network: FfiConverterTypeBitcoinNetwork.read(from),
2238
2197
  source: FfiConverterTypePaymentRequestSource.read(from),
2239
2198
  };
2240
2199
  }
2241
2200
  write(value: TypeName, into: RustBuffer): void {
2242
2201
  FfiConverterString.write(value.address, into);
2243
- FfiConverterTypeSparkAddress.write(value.decodedAddress, into);
2202
+ FfiConverterString.write(value.identityPublicKey, into);
2203
+ FfiConverterTypeBitcoinNetwork.write(value.network, into);
2244
2204
  FfiConverterTypePaymentRequestSource.write(value.source, into);
2245
2205
  }
2246
2206
  allocationSize(value: TypeName): number {
2247
2207
  return (
2248
2208
  FfiConverterString.allocationSize(value.address) +
2249
- FfiConverterTypeSparkAddress.allocationSize(value.decodedAddress) +
2209
+ FfiConverterString.allocationSize(value.identityPublicKey) +
2210
+ FfiConverterTypeBitcoinNetwork.allocationSize(value.network) +
2250
2211
  FfiConverterTypePaymentRequestSource.allocationSize(value.source)
2251
2212
  );
2252
2213
  }
@@ -2254,34 +2215,57 @@ const FfiConverterTypeSparkAddressDetails = (() => {
2254
2215
  return new FFIConverter();
2255
2216
  })();
2256
2217
 
2257
- export type SparkInvoiceFields = {
2258
- id: string;
2259
- version: /*u32*/ number;
2260
- memo: string | undefined;
2261
- senderPublicKey: string | undefined;
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
+ */
2262
2239
  expiryTime: /*u64*/ bigint | undefined;
2263
- paymentType: SparkAddressPaymentType | undefined;
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;
2264
2248
  };
2265
2249
 
2266
2250
  /**
2267
- * Generated factory for {@link SparkInvoiceFields} record objects.
2251
+ * Generated factory for {@link SparkInvoiceDetails} record objects.
2268
2252
  */
2269
- export const SparkInvoiceFields = (() => {
2253
+ export const SparkInvoiceDetails = (() => {
2270
2254
  const defaults = () => ({});
2271
2255
  const create = (() => {
2272
- return uniffiCreateRecord<SparkInvoiceFields, ReturnType<typeof defaults>>(
2256
+ return uniffiCreateRecord<SparkInvoiceDetails, ReturnType<typeof defaults>>(
2273
2257
  defaults
2274
2258
  );
2275
2259
  })();
2276
2260
  return Object.freeze({
2277
2261
  /**
2278
- * Create a frozen instance of {@link SparkInvoiceFields}, with defaults specified
2262
+ * Create a frozen instance of {@link SparkInvoiceDetails}, with defaults specified
2279
2263
  * in Rust, in the {@link breez_sdk_common} crate.
2280
2264
  */
2281
2265
  create,
2282
2266
 
2283
2267
  /**
2284
- * Create a frozen instance of {@link SparkInvoiceFields}, with defaults specified
2268
+ * Create a frozen instance of {@link SparkInvoiceDetails}, with defaults specified
2285
2269
  * in Rust, in the {@link breez_sdk_common} crate.
2286
2270
  */
2287
2271
  new: create,
@@ -2289,44 +2273,45 @@ export const SparkInvoiceFields = (() => {
2289
2273
  /**
2290
2274
  * Defaults specified in the {@link breez_sdk_common} crate.
2291
2275
  */
2292
- defaults: () => Object.freeze(defaults()) as Partial<SparkInvoiceFields>,
2276
+ defaults: () => Object.freeze(defaults()) as Partial<SparkInvoiceDetails>,
2293
2277
  });
2294
2278
  })();
2295
2279
 
2296
- const FfiConverterTypeSparkInvoiceFields = (() => {
2297
- type TypeName = SparkInvoiceFields;
2280
+ const FfiConverterTypeSparkInvoiceDetails = (() => {
2281
+ type TypeName = SparkInvoiceDetails;
2298
2282
  class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
2299
2283
  read(from: RustBuffer): TypeName {
2300
2284
  return {
2301
- id: FfiConverterString.read(from),
2302
- version: FfiConverterUInt32.read(from),
2303
- memo: FfiConverterOptionalString.read(from),
2304
- senderPublicKey: FfiConverterOptionalString.read(from),
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),
2305
2290
  expiryTime: FfiConverterOptionalUInt64.read(from),
2306
- paymentType: FfiConverterOptionalTypeSparkAddressPaymentType.read(from),
2291
+ description: FfiConverterOptionalString.read(from),
2292
+ senderPublicKey: FfiConverterOptionalString.read(from),
2307
2293
  };
2308
2294
  }
2309
2295
  write(value: TypeName, into: RustBuffer): void {
2310
- FfiConverterString.write(value.id, into);
2311
- FfiConverterUInt32.write(value.version, into);
2312
- FfiConverterOptionalString.write(value.memo, into);
2313
- FfiConverterOptionalString.write(value.senderPublicKey, into);
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);
2314
2301
  FfiConverterOptionalUInt64.write(value.expiryTime, into);
2315
- FfiConverterOptionalTypeSparkAddressPaymentType.write(
2316
- value.paymentType,
2317
- into
2318
- );
2302
+ FfiConverterOptionalString.write(value.description, into);
2303
+ FfiConverterOptionalString.write(value.senderPublicKey, into);
2319
2304
  }
2320
2305
  allocationSize(value: TypeName): number {
2321
2306
  return (
2322
- FfiConverterString.allocationSize(value.id) +
2323
- FfiConverterUInt32.allocationSize(value.version) +
2324
- FfiConverterOptionalString.allocationSize(value.memo) +
2325
- FfiConverterOptionalString.allocationSize(value.senderPublicKey) +
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) +
2326
2312
  FfiConverterOptionalUInt64.allocationSize(value.expiryTime) +
2327
- FfiConverterOptionalTypeSparkAddressPaymentType.allocationSize(
2328
- value.paymentType
2329
- )
2313
+ FfiConverterOptionalString.allocationSize(value.description) +
2314
+ FfiConverterOptionalString.allocationSize(value.senderPublicKey)
2330
2315
  );
2331
2316
  }
2332
2317
  }
@@ -2400,65 +2385,6 @@ const FfiConverterTypeSymbol = (() => {
2400
2385
  return new FFIConverter();
2401
2386
  })();
2402
2387
 
2403
- export type TokensPaymentDetails = {
2404
- tokenIdentifier: string | undefined;
2405
- amount: CommonU128 | undefined;
2406
- };
2407
-
2408
- /**
2409
- * Generated factory for {@link TokensPaymentDetails} record objects.
2410
- */
2411
- export const TokensPaymentDetails = (() => {
2412
- const defaults = () => ({});
2413
- const create = (() => {
2414
- return uniffiCreateRecord<
2415
- TokensPaymentDetails,
2416
- ReturnType<typeof defaults>
2417
- >(defaults);
2418
- })();
2419
- return Object.freeze({
2420
- /**
2421
- * Create a frozen instance of {@link TokensPaymentDetails}, with defaults specified
2422
- * in Rust, in the {@link breez_sdk_common} crate.
2423
- */
2424
- create,
2425
-
2426
- /**
2427
- * Create a frozen instance of {@link TokensPaymentDetails}, with defaults specified
2428
- * in Rust, in the {@link breez_sdk_common} crate.
2429
- */
2430
- new: create,
2431
-
2432
- /**
2433
- * Defaults specified in the {@link breez_sdk_common} crate.
2434
- */
2435
- defaults: () => Object.freeze(defaults()) as Partial<TokensPaymentDetails>,
2436
- });
2437
- })();
2438
-
2439
- const FfiConverterTypeTokensPaymentDetails = (() => {
2440
- type TypeName = TokensPaymentDetails;
2441
- class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
2442
- read(from: RustBuffer): TypeName {
2443
- return {
2444
- tokenIdentifier: FfiConverterOptionalString.read(from),
2445
- amount: FfiConverterOptionalTypecommon_u128.read(from),
2446
- };
2447
- }
2448
- write(value: TypeName, into: RustBuffer): void {
2449
- FfiConverterOptionalString.write(value.tokenIdentifier, into);
2450
- FfiConverterOptionalTypecommon_u128.write(value.amount, into);
2451
- }
2452
- allocationSize(value: TypeName): number {
2453
- return (
2454
- FfiConverterOptionalString.allocationSize(value.tokenIdentifier) +
2455
- FfiConverterOptionalTypecommon_u128.allocationSize(value.amount)
2456
- );
2457
- }
2458
- }
2459
- return new FFIConverter();
2460
- })();
2461
-
2462
2388
  export type UrlSuccessActionData = {
2463
2389
  /**
2464
2390
  * Contents description, up to 144 characters
@@ -2967,6 +2893,7 @@ export enum InputType_Tags {
2967
2893
  Bolt12InvoiceRequest = 'Bolt12InvoiceRequest',
2968
2894
  LnurlWithdraw = 'LnurlWithdraw',
2969
2895
  SparkAddress = 'SparkAddress',
2896
+ SparkInvoice = 'SparkInvoice',
2970
2897
  }
2971
2898
  export const InputType = (() => {
2972
2899
  type BitcoinAddress__interface = {
@@ -3332,6 +3259,33 @@ export const InputType = (() => {
3332
3259
  }
3333
3260
  }
3334
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
+
3335
3289
  function instanceOf(obj: any): obj is InputType {
3336
3290
  return obj[uniffiTypeNameSymbol] === 'InputType';
3337
3291
  }
@@ -3351,6 +3305,7 @@ export const InputType = (() => {
3351
3305
  Bolt12InvoiceRequest: Bolt12InvoiceRequest_,
3352
3306
  LnurlWithdraw: LnurlWithdraw_,
3353
3307
  SparkAddress: SparkAddress_,
3308
+ SparkInvoice: SparkInvoice_,
3354
3309
  });
3355
3310
  })();
3356
3311
 
@@ -3413,6 +3368,10 @@ const FfiConverterTypeInputType = (() => {
3413
3368
  return new InputType.SparkAddress(
3414
3369
  FfiConverterTypeSparkAddressDetails.read(from)
3415
3370
  );
3371
+ case 14:
3372
+ return new InputType.SparkInvoice(
3373
+ FfiConverterTypeSparkInvoiceDetails.read(from)
3374
+ );
3416
3375
  default:
3417
3376
  throw new UniffiInternalError.UnexpectedEnumCase();
3418
3377
  }
@@ -3497,6 +3456,12 @@ const FfiConverterTypeInputType = (() => {
3497
3456
  FfiConverterTypeSparkAddressDetails.write(inner[0], into);
3498
3457
  return;
3499
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
+ }
3500
3465
  default:
3501
3466
  // Throwing from here means that InputType_Tags hasn't matched an ordinal.
3502
3467
  throw new UniffiInternalError.UnexpectedEnumCase();
@@ -3596,6 +3561,12 @@ const FfiConverterTypeInputType = (() => {
3596
3561
  size += FfiConverterTypeSparkAddressDetails.allocationSize(inner[0]);
3597
3562
  return size;
3598
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
+ }
3599
3570
  default:
3600
3571
  throw new UniffiInternalError.UnexpectedEnumCase();
3601
3572
  }
@@ -4348,144 +4319,6 @@ const FfiConverterTypeServiceConnectivityError = (() => {
4348
4319
  return new FFIConverter();
4349
4320
  })();
4350
4321
 
4351
- // Enum: SparkAddressPaymentType
4352
- export enum SparkAddressPaymentType_Tags {
4353
- TokensPayment = 'TokensPayment',
4354
- SatsPayment = 'SatsPayment',
4355
- }
4356
- export const SparkAddressPaymentType = (() => {
4357
- type TokensPayment__interface = {
4358
- tag: SparkAddressPaymentType_Tags.TokensPayment;
4359
- inner: Readonly<[TokensPaymentDetails]>;
4360
- };
4361
-
4362
- class TokensPayment_ extends UniffiEnum implements TokensPayment__interface {
4363
- /**
4364
- * @private
4365
- * This field is private and should not be used, use `tag` instead.
4366
- */
4367
- readonly [uniffiTypeNameSymbol] = 'SparkAddressPaymentType';
4368
- readonly tag = SparkAddressPaymentType_Tags.TokensPayment;
4369
- readonly inner: Readonly<[TokensPaymentDetails]>;
4370
- constructor(v0: TokensPaymentDetails) {
4371
- super('SparkAddressPaymentType', 'TokensPayment');
4372
- this.inner = Object.freeze([v0]);
4373
- }
4374
-
4375
- static new(v0: TokensPaymentDetails): TokensPayment_ {
4376
- return new TokensPayment_(v0);
4377
- }
4378
-
4379
- static instanceOf(obj: any): obj is TokensPayment_ {
4380
- return obj.tag === SparkAddressPaymentType_Tags.TokensPayment;
4381
- }
4382
- }
4383
-
4384
- type SatsPayment__interface = {
4385
- tag: SparkAddressPaymentType_Tags.SatsPayment;
4386
- inner: Readonly<[SatsPaymentDetails]>;
4387
- };
4388
-
4389
- class SatsPayment_ extends UniffiEnum implements SatsPayment__interface {
4390
- /**
4391
- * @private
4392
- * This field is private and should not be used, use `tag` instead.
4393
- */
4394
- readonly [uniffiTypeNameSymbol] = 'SparkAddressPaymentType';
4395
- readonly tag = SparkAddressPaymentType_Tags.SatsPayment;
4396
- readonly inner: Readonly<[SatsPaymentDetails]>;
4397
- constructor(v0: SatsPaymentDetails) {
4398
- super('SparkAddressPaymentType', 'SatsPayment');
4399
- this.inner = Object.freeze([v0]);
4400
- }
4401
-
4402
- static new(v0: SatsPaymentDetails): SatsPayment_ {
4403
- return new SatsPayment_(v0);
4404
- }
4405
-
4406
- static instanceOf(obj: any): obj is SatsPayment_ {
4407
- return obj.tag === SparkAddressPaymentType_Tags.SatsPayment;
4408
- }
4409
- }
4410
-
4411
- function instanceOf(obj: any): obj is SparkAddressPaymentType {
4412
- return obj[uniffiTypeNameSymbol] === 'SparkAddressPaymentType';
4413
- }
4414
-
4415
- return Object.freeze({
4416
- instanceOf,
4417
- TokensPayment: TokensPayment_,
4418
- SatsPayment: SatsPayment_,
4419
- });
4420
- })();
4421
-
4422
- export type SparkAddressPaymentType = InstanceType<
4423
- (typeof SparkAddressPaymentType)[keyof Omit<
4424
- typeof SparkAddressPaymentType,
4425
- 'instanceOf'
4426
- >]
4427
- >;
4428
-
4429
- // FfiConverter for enum SparkAddressPaymentType
4430
- const FfiConverterTypeSparkAddressPaymentType = (() => {
4431
- const ordinalConverter = FfiConverterInt32;
4432
- type TypeName = SparkAddressPaymentType;
4433
- class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
4434
- read(from: RustBuffer): TypeName {
4435
- switch (ordinalConverter.read(from)) {
4436
- case 1:
4437
- return new SparkAddressPaymentType.TokensPayment(
4438
- FfiConverterTypeTokensPaymentDetails.read(from)
4439
- );
4440
- case 2:
4441
- return new SparkAddressPaymentType.SatsPayment(
4442
- FfiConverterTypeSatsPaymentDetails.read(from)
4443
- );
4444
- default:
4445
- throw new UniffiInternalError.UnexpectedEnumCase();
4446
- }
4447
- }
4448
- write(value: TypeName, into: RustBuffer): void {
4449
- switch (value.tag) {
4450
- case SparkAddressPaymentType_Tags.TokensPayment: {
4451
- ordinalConverter.write(1, into);
4452
- const inner = value.inner;
4453
- FfiConverterTypeTokensPaymentDetails.write(inner[0], into);
4454
- return;
4455
- }
4456
- case SparkAddressPaymentType_Tags.SatsPayment: {
4457
- ordinalConverter.write(2, into);
4458
- const inner = value.inner;
4459
- FfiConverterTypeSatsPaymentDetails.write(inner[0], into);
4460
- return;
4461
- }
4462
- default:
4463
- // Throwing from here means that SparkAddressPaymentType_Tags hasn't matched an ordinal.
4464
- throw new UniffiInternalError.UnexpectedEnumCase();
4465
- }
4466
- }
4467
- allocationSize(value: TypeName): number {
4468
- switch (value.tag) {
4469
- case SparkAddressPaymentType_Tags.TokensPayment: {
4470
- const inner = value.inner;
4471
- let size = ordinalConverter.allocationSize(1);
4472
- size += FfiConverterTypeTokensPaymentDetails.allocationSize(inner[0]);
4473
- return size;
4474
- }
4475
- case SparkAddressPaymentType_Tags.SatsPayment: {
4476
- const inner = value.inner;
4477
- let size = ordinalConverter.allocationSize(2);
4478
- size += FfiConverterTypeSatsPaymentDetails.allocationSize(inner[0]);
4479
- return size;
4480
- }
4481
- default:
4482
- throw new UniffiInternalError.UnexpectedEnumCase();
4483
- }
4484
- }
4485
- }
4486
- return new FFIConverter();
4487
- })();
4488
-
4489
4322
  // Enum: SuccessAction
4490
4323
  export enum SuccessAction_Tags {
4491
4324
  Aes = 'Aes',
@@ -5674,11 +5507,6 @@ const uniffiCallbackInterfaceRestClient: {
5674
5507
  // FfiConverter for boolean | undefined
5675
5508
  const FfiConverterOptionalBool = new FfiConverterOptional(FfiConverterBool);
5676
5509
 
5677
- // FfiConverter for SparkInvoiceFields | undefined
5678
- const FfiConverterOptionalTypeSparkInvoiceFields = new FfiConverterOptional(
5679
- FfiConverterTypeSparkInvoiceFields
5680
- );
5681
-
5682
5510
  // FfiConverter for Symbol | undefined
5683
5511
  const FfiConverterOptionalTypeSymbol = new FfiConverterOptional(
5684
5512
  FfiConverterTypeSymbol
@@ -5744,10 +5572,6 @@ const FfiConverterOptionalTypeAmount = new FfiConverterOptional(
5744
5572
  FfiConverterTypeAmount
5745
5573
  );
5746
5574
 
5747
- // FfiConverter for SparkAddressPaymentType | undefined
5748
- const FfiConverterOptionalTypeSparkAddressPaymentType =
5749
- new FfiConverterOptional(FfiConverterTypeSparkAddressPaymentType);
5750
-
5751
5575
  // FfiConverter for Map<string, string> | undefined
5752
5576
  const FfiConverterOptionalMapStringString = new FfiConverterOptional(
5753
5577
  FfiConverterMapStringString
@@ -5847,6 +5671,7 @@ export default Object.freeze({
5847
5671
  FfiConverterTypeBolt12OfferBlindedPath,
5848
5672
  FfiConverterTypeBolt12OfferDetails,
5849
5673
  FfiConverterTypeCurrencyInfo,
5674
+ FfiConverterTypeExternalInputParser,
5850
5675
  FfiConverterTypeFiatCurrency,
5851
5676
  FfiConverterTypeFiatService,
5852
5677
  FfiConverterTypeInputType,
@@ -5863,16 +5688,12 @@ export default Object.freeze({
5863
5688
  FfiConverterTypeRate,
5864
5689
  FfiConverterTypeRestClient,
5865
5690
  FfiConverterTypeRestResponse,
5866
- FfiConverterTypeSatsPaymentDetails,
5867
5691
  FfiConverterTypeSilentPaymentAddressDetails,
5868
- FfiConverterTypeSparkAddress,
5869
5692
  FfiConverterTypeSparkAddressDetails,
5870
- FfiConverterTypeSparkAddressPaymentType,
5871
- FfiConverterTypeSparkInvoiceFields,
5693
+ FfiConverterTypeSparkInvoiceDetails,
5872
5694
  FfiConverterTypeSuccessAction,
5873
5695
  FfiConverterTypeSuccessActionProcessed,
5874
5696
  FfiConverterTypeSymbol,
5875
- FfiConverterTypeTokensPaymentDetails,
5876
5697
  FfiConverterTypeUrlSuccessActionData,
5877
5698
  FfiConverterTypecommon_u128,
5878
5699
  },