@breeztech/breez-sdk-spark-react-native 0.20.0-dev1 → 0.21.0

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 (38) hide show
  1. package/BreezSdkSparkReactNative.podspec +6 -0
  2. package/cpp/generated/breez_sdk_spark.cpp +168 -11
  3. package/cpp/generated/breez_sdk_spark.hpp +21 -0
  4. package/lib/commonjs/generated/breez_sdk_spark-ffi.js.map +1 -1
  5. package/lib/commonjs/generated/breez_sdk_spark.js +225 -35
  6. package/lib/commonjs/generated/breez_sdk_spark.js.map +1 -1
  7. package/lib/commonjs/passkey-prf-provider.js +31 -11
  8. package/lib/commonjs/passkey-prf-provider.js.map +1 -1
  9. package/lib/module/generated/breez_sdk_spark-ffi.js.map +1 -1
  10. package/lib/module/generated/breez_sdk_spark.js +224 -34
  11. package/lib/module/generated/breez_sdk_spark.js.map +1 -1
  12. package/lib/module/passkey-prf-provider.js +31 -11
  13. package/lib/module/passkey-prf-provider.js.map +1 -1
  14. package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts +8 -2
  15. package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts.map +1 -1
  16. package/lib/typescript/commonjs/src/generated/breez_sdk_spark.d.ts +811 -26
  17. package/lib/typescript/commonjs/src/generated/breez_sdk_spark.d.ts.map +1 -1
  18. package/lib/typescript/commonjs/src/passkey-prf-provider.d.ts +24 -6
  19. package/lib/typescript/commonjs/src/passkey-prf-provider.d.ts.map +1 -1
  20. package/lib/typescript/module/src/generated/breez_sdk_spark-ffi.d.ts +8 -2
  21. package/lib/typescript/module/src/generated/breez_sdk_spark-ffi.d.ts.map +1 -1
  22. package/lib/typescript/module/src/generated/breez_sdk_spark.d.ts +811 -26
  23. package/lib/typescript/module/src/generated/breez_sdk_spark.d.ts.map +1 -1
  24. package/lib/typescript/module/src/passkey-prf-provider.d.ts +24 -6
  25. package/lib/typescript/module/src/passkey-prf-provider.d.ts.map +1 -1
  26. package/package.json +4 -4
  27. package/plugin/build/index.d.ts +1 -1
  28. package/plugin/build/index.js +3 -1
  29. package/plugin/build/withAndroid.d.ts +1 -1
  30. package/plugin/build/withAndroid.js +1 -1
  31. package/plugin/build/withBinaryArtifacts.d.ts +1 -1
  32. package/plugin/build/withBinaryArtifacts.js +1 -1
  33. package/plugin/build/withIOS.d.ts +1 -1
  34. package/plugin/build/withIOS.js +1 -1
  35. package/scripts/post-ubrn.js +42 -0
  36. package/src/generated/breez_sdk_spark-ffi.ts +18 -1
  37. package/src/generated/breez_sdk_spark.ts +1303 -36
  38. package/src/passkey-prf-provider.ts +41 -12
@@ -1096,6 +1096,149 @@ const FfiConverterTypeAuthorizeTransferRequest = (() => {
1096
1096
  return new FFIConverter();
1097
1097
  })();
1098
1098
 
1099
+ /**
1100
+ * A single payee in a batch send.
1101
+ */
1102
+ export type BatchRecipient = {
1103
+ /**
1104
+ * Spark address or Spark invoice identifying the payee.
1105
+ */
1106
+ paymentRequest: string;
1107
+ /**
1108
+ * Amount to send, in the base units of the asset being sent. Required
1109
+ * unless `payment_request` is an invoice that carries its own amount.
1110
+ */
1111
+ amount: U128 | undefined;
1112
+ /**
1113
+ * Token to send. Unset means sats, which a batch cannot send yet, so a
1114
+ * plain address needs this set. An invoice that names a token does not.
1115
+ */
1116
+ tokenIdentifier: string | undefined;
1117
+ };
1118
+
1119
+ /**
1120
+ * Generated factory for {@link BatchRecipient} record objects.
1121
+ */
1122
+ export const BatchRecipient = (() => {
1123
+ const defaults = () => ({ amount: undefined, tokenIdentifier: undefined });
1124
+ const create = (() => {
1125
+ return uniffiCreateRecord<BatchRecipient, ReturnType<typeof defaults>>(
1126
+ defaults
1127
+ );
1128
+ })();
1129
+ return Object.freeze({
1130
+ /**
1131
+ * Create a frozen instance of {@link BatchRecipient}, with defaults specified
1132
+ * in Rust, in the {@link breez_sdk_spark} crate.
1133
+ */
1134
+ create,
1135
+
1136
+ /**
1137
+ * Create a frozen instance of {@link BatchRecipient}, with defaults specified
1138
+ * in Rust, in the {@link breez_sdk_spark} crate.
1139
+ */
1140
+ new: create,
1141
+
1142
+ /**
1143
+ * Defaults specified in the {@link breez_sdk_spark} crate.
1144
+ */
1145
+ defaults: () => Object.freeze(defaults()) as Partial<BatchRecipient>,
1146
+ });
1147
+ })();
1148
+
1149
+ const FfiConverterTypeBatchRecipient = (() => {
1150
+ type TypeName = BatchRecipient;
1151
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
1152
+ read(from: RustBuffer): TypeName {
1153
+ return {
1154
+ paymentRequest: FfiConverterString.read(from),
1155
+ amount: FfiConverterOptionalTypeu128.read(from),
1156
+ tokenIdentifier: FfiConverterOptionalString.read(from),
1157
+ };
1158
+ }
1159
+ write(value: TypeName, into: RustBuffer): void {
1160
+ FfiConverterString.write(value.paymentRequest, into);
1161
+ FfiConverterOptionalTypeu128.write(value.amount, into);
1162
+ FfiConverterOptionalString.write(value.tokenIdentifier, into);
1163
+ }
1164
+ allocationSize(value: TypeName): number {
1165
+ return (
1166
+ FfiConverterString.allocationSize(value.paymentRequest) +
1167
+ FfiConverterOptionalTypeu128.allocationSize(value.amount) +
1168
+ FfiConverterOptionalString.allocationSize(value.tokenIdentifier)
1169
+ );
1170
+ }
1171
+ }
1172
+ return new FFIConverter();
1173
+ })();
1174
+
1175
+ /**
1176
+ * What a batch debits for one asset.
1177
+ */
1178
+ export type BatchTotal = {
1179
+ /**
1180
+ * The token debited. Unset means sats, which a batch cannot send yet.
1181
+ */
1182
+ tokenIdentifier: string | undefined;
1183
+ /**
1184
+ * Amount in the asset's base units.
1185
+ */
1186
+ amount: U128;
1187
+ };
1188
+
1189
+ /**
1190
+ * Generated factory for {@link BatchTotal} record objects.
1191
+ */
1192
+ export const BatchTotal = (() => {
1193
+ const defaults = () => ({});
1194
+ const create = (() => {
1195
+ return uniffiCreateRecord<BatchTotal, ReturnType<typeof defaults>>(
1196
+ defaults
1197
+ );
1198
+ })();
1199
+ return Object.freeze({
1200
+ /**
1201
+ * Create a frozen instance of {@link BatchTotal}, with defaults specified
1202
+ * in Rust, in the {@link breez_sdk_spark} crate.
1203
+ */
1204
+ create,
1205
+
1206
+ /**
1207
+ * Create a frozen instance of {@link BatchTotal}, with defaults specified
1208
+ * in Rust, in the {@link breez_sdk_spark} crate.
1209
+ */
1210
+ new: create,
1211
+
1212
+ /**
1213
+ * Defaults specified in the {@link breez_sdk_spark} crate.
1214
+ */
1215
+ defaults: () => Object.freeze(defaults()) as Partial<BatchTotal>,
1216
+ });
1217
+ })();
1218
+
1219
+ const FfiConverterTypeBatchTotal = (() => {
1220
+ type TypeName = BatchTotal;
1221
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
1222
+ read(from: RustBuffer): TypeName {
1223
+ return {
1224
+ tokenIdentifier: FfiConverterOptionalString.read(from),
1225
+ amount: FfiConverterTypeu128.read(from),
1226
+ };
1227
+ }
1228
+ write(value: TypeName, into: RustBuffer): void {
1229
+ FfiConverterOptionalString.write(value.tokenIdentifier, into);
1230
+ FfiConverterTypeu128.write(value.amount, into);
1231
+ }
1232
+ allocationSize(value: TypeName): number {
1233
+ return (
1234
+ FfiConverterOptionalString.allocationSize(value.tokenIdentifier) +
1235
+ FfiConverterTypeu128.allocationSize(value.amount)
1236
+ );
1237
+ }
1238
+ }
1239
+ return new FFIConverter();
1240
+ })();
1241
+
1099
1242
  export type Bip21Details = {
1100
1243
  amountSat: /*u64*/ bigint | undefined;
1101
1244
  assetId: string | undefined;
@@ -1963,6 +2106,65 @@ const FfiConverterTypeBolt12OfferDetails = (() => {
1963
2106
  return new FFIConverter();
1964
2107
  })();
1965
2108
 
2109
+ export type BuildUnsignedBatchPackageRequest = {
2110
+ prepareResponse: PrepareSendBatchResponse;
2111
+ };
2112
+
2113
+ /**
2114
+ * Generated factory for {@link BuildUnsignedBatchPackageRequest} record objects.
2115
+ */
2116
+ export const BuildUnsignedBatchPackageRequest = (() => {
2117
+ const defaults = () => ({});
2118
+ const create = (() => {
2119
+ return uniffiCreateRecord<
2120
+ BuildUnsignedBatchPackageRequest,
2121
+ ReturnType<typeof defaults>
2122
+ >(defaults);
2123
+ })();
2124
+ return Object.freeze({
2125
+ /**
2126
+ * Create a frozen instance of {@link BuildUnsignedBatchPackageRequest}, with defaults specified
2127
+ * in Rust, in the {@link breez_sdk_spark} crate.
2128
+ */
2129
+ create,
2130
+
2131
+ /**
2132
+ * Create a frozen instance of {@link BuildUnsignedBatchPackageRequest}, with defaults specified
2133
+ * in Rust, in the {@link breez_sdk_spark} crate.
2134
+ */
2135
+ new: create,
2136
+
2137
+ /**
2138
+ * Defaults specified in the {@link breez_sdk_spark} crate.
2139
+ */
2140
+ defaults: () =>
2141
+ Object.freeze(defaults()) as Partial<BuildUnsignedBatchPackageRequest>,
2142
+ });
2143
+ })();
2144
+
2145
+ const FfiConverterTypeBuildUnsignedBatchPackageRequest = (() => {
2146
+ type TypeName = BuildUnsignedBatchPackageRequest;
2147
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
2148
+ read(from: RustBuffer): TypeName {
2149
+ return {
2150
+ prepareResponse: FfiConverterTypePrepareSendBatchResponse.read(from),
2151
+ };
2152
+ }
2153
+ write(value: TypeName, into: RustBuffer): void {
2154
+ FfiConverterTypePrepareSendBatchResponse.write(
2155
+ value.prepareResponse,
2156
+ into
2157
+ );
2158
+ }
2159
+ allocationSize(value: TypeName): number {
2160
+ return FfiConverterTypePrepareSendBatchResponse.allocationSize(
2161
+ value.prepareResponse
2162
+ );
2163
+ }
2164
+ }
2165
+ return new FFIConverter();
2166
+ })();
2167
+
1966
2168
  export type BuildUnsignedLnurlPayPackageRequest = {
1967
2169
  prepareResponse: PrepareLnurlPayResponse;
1968
2170
  };
@@ -3986,6 +4188,77 @@ const FfiConverterTypeCreateIssuerTokenRequest = (() => {
3986
4188
  return new FFIConverter();
3987
4189
  })();
3988
4190
 
4191
+ /**
4192
+ * A newly created credential, plus the PRF outputs when the platform
4193
+ * evaluated them during the create ceremony itself.
4194
+ *
4195
+ * `seeds` present means no assertion is needed: the caller skips the
4196
+ * second ceremony, and with it the window in which a credential exists
4197
+ * but is not yet resolvable. Absent means the platform returned no PRF
4198
+ * results at create (or dropped one of a pair), so the caller derives
4199
+ * through [`super::PrfProvider::derive_seeds`] as before.
4200
+ */
4201
+ export type CreatePasskeyOutput = {
4202
+ credential: PasskeyCredential;
4203
+ /**
4204
+ * One output per requested salt, in request order.
4205
+ */
4206
+ seeds: Array<ArrayBuffer> | undefined;
4207
+ };
4208
+
4209
+ /**
4210
+ * Generated factory for {@link CreatePasskeyOutput} record objects.
4211
+ */
4212
+ export const CreatePasskeyOutput = (() => {
4213
+ const defaults = () => ({});
4214
+ const create = (() => {
4215
+ return uniffiCreateRecord<CreatePasskeyOutput, ReturnType<typeof defaults>>(
4216
+ defaults
4217
+ );
4218
+ })();
4219
+ return Object.freeze({
4220
+ /**
4221
+ * Create a frozen instance of {@link CreatePasskeyOutput}, with defaults specified
4222
+ * in Rust, in the {@link breez_sdk_spark} crate.
4223
+ */
4224
+ create,
4225
+
4226
+ /**
4227
+ * Create a frozen instance of {@link CreatePasskeyOutput}, with defaults specified
4228
+ * in Rust, in the {@link breez_sdk_spark} crate.
4229
+ */
4230
+ new: create,
4231
+
4232
+ /**
4233
+ * Defaults specified in the {@link breez_sdk_spark} crate.
4234
+ */
4235
+ defaults: () => Object.freeze(defaults()) as Partial<CreatePasskeyOutput>,
4236
+ });
4237
+ })();
4238
+
4239
+ const FfiConverterTypeCreatePasskeyOutput = (() => {
4240
+ type TypeName = CreatePasskeyOutput;
4241
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
4242
+ read(from: RustBuffer): TypeName {
4243
+ return {
4244
+ credential: FfiConverterTypePasskeyCredential.read(from),
4245
+ seeds: FfiConverterOptionalArrayArrayBuffer.read(from),
4246
+ };
4247
+ }
4248
+ write(value: TypeName, into: RustBuffer): void {
4249
+ FfiConverterTypePasskeyCredential.write(value.credential, into);
4250
+ FfiConverterOptionalArrayArrayBuffer.write(value.seeds, into);
4251
+ }
4252
+ allocationSize(value: TypeName): number {
4253
+ return (
4254
+ FfiConverterTypePasskeyCredential.allocationSize(value.credential) +
4255
+ FfiConverterOptionalArrayArrayBuffer.allocationSize(value.seeds)
4256
+ );
4257
+ }
4258
+ }
4259
+ return new FFIConverter();
4260
+ })();
4261
+
3989
4262
  export type Credentials = {
3990
4263
  username: string;
3991
4264
  password: string;
@@ -10956,6 +11229,135 @@ const FfiConverterTypePrepareLnurlPayResponse = (() => {
10956
11229
  return new FFIConverter();
10957
11230
  })();
10958
11231
 
11232
+ export type PrepareSendBatchRequest = {
11233
+ /**
11234
+ * The payees, all paid by one transaction. They may span several tokens,
11235
+ * and may mix Spark addresses with Spark invoices. Once a Spark invoice is
11236
+ * among them, every recipient must be paid in the same token.
11237
+ */
11238
+ recipients: Array<BatchRecipient>;
11239
+ };
11240
+
11241
+ /**
11242
+ * Generated factory for {@link PrepareSendBatchRequest} record objects.
11243
+ */
11244
+ export const PrepareSendBatchRequest = (() => {
11245
+ const defaults = () => ({});
11246
+ const create = (() => {
11247
+ return uniffiCreateRecord<
11248
+ PrepareSendBatchRequest,
11249
+ ReturnType<typeof defaults>
11250
+ >(defaults);
11251
+ })();
11252
+ return Object.freeze({
11253
+ /**
11254
+ * Create a frozen instance of {@link PrepareSendBatchRequest}, with defaults specified
11255
+ * in Rust, in the {@link breez_sdk_spark} crate.
11256
+ */
11257
+ create,
11258
+
11259
+ /**
11260
+ * Create a frozen instance of {@link PrepareSendBatchRequest}, with defaults specified
11261
+ * in Rust, in the {@link breez_sdk_spark} crate.
11262
+ */
11263
+ new: create,
11264
+
11265
+ /**
11266
+ * Defaults specified in the {@link breez_sdk_spark} crate.
11267
+ */
11268
+ defaults: () =>
11269
+ Object.freeze(defaults()) as Partial<PrepareSendBatchRequest>,
11270
+ });
11271
+ })();
11272
+
11273
+ const FfiConverterTypePrepareSendBatchRequest = (() => {
11274
+ type TypeName = PrepareSendBatchRequest;
11275
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
11276
+ read(from: RustBuffer): TypeName {
11277
+ return {
11278
+ recipients: FfiConverterArrayTypeBatchRecipient.read(from),
11279
+ };
11280
+ }
11281
+ write(value: TypeName, into: RustBuffer): void {
11282
+ FfiConverterArrayTypeBatchRecipient.write(value.recipients, into);
11283
+ }
11284
+ allocationSize(value: TypeName): number {
11285
+ return FfiConverterArrayTypeBatchRecipient.allocationSize(
11286
+ value.recipients
11287
+ );
11288
+ }
11289
+ }
11290
+ return new FFIConverter();
11291
+ })();
11292
+
11293
+ export type PrepareSendBatchResponse = {
11294
+ /**
11295
+ * The payees in the order they were requested, which is the order their
11296
+ * payments come back in.
11297
+ */
11298
+ recipients: Array<ResolvedBatchRecipient>;
11299
+ /**
11300
+ * What the batch debits, one entry per distinct asset.
11301
+ */
11302
+ totals: Array<BatchTotal>;
11303
+ };
11304
+
11305
+ /**
11306
+ * Generated factory for {@link PrepareSendBatchResponse} record objects.
11307
+ */
11308
+ export const PrepareSendBatchResponse = (() => {
11309
+ const defaults = () => ({});
11310
+ const create = (() => {
11311
+ return uniffiCreateRecord<
11312
+ PrepareSendBatchResponse,
11313
+ ReturnType<typeof defaults>
11314
+ >(defaults);
11315
+ })();
11316
+ return Object.freeze({
11317
+ /**
11318
+ * Create a frozen instance of {@link PrepareSendBatchResponse}, with defaults specified
11319
+ * in Rust, in the {@link breez_sdk_spark} crate.
11320
+ */
11321
+ create,
11322
+
11323
+ /**
11324
+ * Create a frozen instance of {@link PrepareSendBatchResponse}, with defaults specified
11325
+ * in Rust, in the {@link breez_sdk_spark} crate.
11326
+ */
11327
+ new: create,
11328
+
11329
+ /**
11330
+ * Defaults specified in the {@link breez_sdk_spark} crate.
11331
+ */
11332
+ defaults: () =>
11333
+ Object.freeze(defaults()) as Partial<PrepareSendBatchResponse>,
11334
+ });
11335
+ })();
11336
+
11337
+ const FfiConverterTypePrepareSendBatchResponse = (() => {
11338
+ type TypeName = PrepareSendBatchResponse;
11339
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
11340
+ read(from: RustBuffer): TypeName {
11341
+ return {
11342
+ recipients: FfiConverterArrayTypeResolvedBatchRecipient.read(from),
11343
+ totals: FfiConverterArrayTypeBatchTotal.read(from),
11344
+ };
11345
+ }
11346
+ write(value: TypeName, into: RustBuffer): void {
11347
+ FfiConverterArrayTypeResolvedBatchRecipient.write(value.recipients, into);
11348
+ FfiConverterArrayTypeBatchTotal.write(value.totals, into);
11349
+ }
11350
+ allocationSize(value: TypeName): number {
11351
+ return (
11352
+ FfiConverterArrayTypeResolvedBatchRecipient.allocationSize(
11353
+ value.recipients
11354
+ ) + FfiConverterArrayTypeBatchTotal.allocationSize(value.totals)
11355
+ );
11356
+ }
11357
+ }
11358
+ return new FFIConverter();
11359
+ })();
11360
+
10959
11361
  export type PrepareSendPaymentRequest = {
10960
11362
  paymentRequest: PaymentRequest;
10961
11363
  /**
@@ -12627,6 +13029,80 @@ const FfiConverterTypeRegisterWebhookResponse = (() => {
12627
13029
  return new FFIConverter();
12628
13030
  })();
12629
13031
 
13032
+ /**
13033
+ * A recipient after prepare has resolved the asset and amount it is owed.
13034
+ */
13035
+ export type ResolvedBatchRecipient = {
13036
+ destination: BatchDestination;
13037
+ /**
13038
+ * Amount in the base units of the asset this recipient is paid in.
13039
+ */
13040
+ amount: U128;
13041
+ /**
13042
+ * The token this recipient is paid in. Unset means sats, which a batch
13043
+ * cannot send yet.
13044
+ */
13045
+ tokenIdentifier: string | undefined;
13046
+ };
13047
+
13048
+ /**
13049
+ * Generated factory for {@link ResolvedBatchRecipient} record objects.
13050
+ */
13051
+ export const ResolvedBatchRecipient = (() => {
13052
+ const defaults = () => ({});
13053
+ const create = (() => {
13054
+ return uniffiCreateRecord<
13055
+ ResolvedBatchRecipient,
13056
+ ReturnType<typeof defaults>
13057
+ >(defaults);
13058
+ })();
13059
+ return Object.freeze({
13060
+ /**
13061
+ * Create a frozen instance of {@link ResolvedBatchRecipient}, with defaults specified
13062
+ * in Rust, in the {@link breez_sdk_spark} crate.
13063
+ */
13064
+ create,
13065
+
13066
+ /**
13067
+ * Create a frozen instance of {@link ResolvedBatchRecipient}, with defaults specified
13068
+ * in Rust, in the {@link breez_sdk_spark} crate.
13069
+ */
13070
+ new: create,
13071
+
13072
+ /**
13073
+ * Defaults specified in the {@link breez_sdk_spark} crate.
13074
+ */
13075
+ defaults: () =>
13076
+ Object.freeze(defaults()) as Partial<ResolvedBatchRecipient>,
13077
+ });
13078
+ })();
13079
+
13080
+ const FfiConverterTypeResolvedBatchRecipient = (() => {
13081
+ type TypeName = ResolvedBatchRecipient;
13082
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
13083
+ read(from: RustBuffer): TypeName {
13084
+ return {
13085
+ destination: FfiConverterTypeBatchDestination.read(from),
13086
+ amount: FfiConverterTypeu128.read(from),
13087
+ tokenIdentifier: FfiConverterOptionalString.read(from),
13088
+ };
13089
+ }
13090
+ write(value: TypeName, into: RustBuffer): void {
13091
+ FfiConverterTypeBatchDestination.write(value.destination, into);
13092
+ FfiConverterTypeu128.write(value.amount, into);
13093
+ FfiConverterOptionalString.write(value.tokenIdentifier, into);
13094
+ }
13095
+ allocationSize(value: TypeName): number {
13096
+ return (
13097
+ FfiConverterTypeBatchDestination.allocationSize(value.destination) +
13098
+ FfiConverterTypeu128.allocationSize(value.amount) +
13099
+ FfiConverterOptionalString.allocationSize(value.tokenIdentifier)
13100
+ );
13101
+ }
13102
+ }
13103
+ return new FFIConverter();
13104
+ })();
13105
+
12630
13106
  export type RestResponse = {
12631
13107
  status: /*u16*/ number;
12632
13108
  body: string;
@@ -12897,6 +13373,119 @@ const FfiConverterTypeSecretBytes = (() => {
12897
13373
  return new FFIConverter();
12898
13374
  })();
12899
13375
 
13376
+ export type SendBatchRequest = {
13377
+ prepareResponse: PrepareSendBatchResponse;
13378
+ };
13379
+
13380
+ /**
13381
+ * Generated factory for {@link SendBatchRequest} record objects.
13382
+ */
13383
+ export const SendBatchRequest = (() => {
13384
+ const defaults = () => ({});
13385
+ const create = (() => {
13386
+ return uniffiCreateRecord<SendBatchRequest, ReturnType<typeof defaults>>(
13387
+ defaults
13388
+ );
13389
+ })();
13390
+ return Object.freeze({
13391
+ /**
13392
+ * Create a frozen instance of {@link SendBatchRequest}, with defaults specified
13393
+ * in Rust, in the {@link breez_sdk_spark} crate.
13394
+ */
13395
+ create,
13396
+
13397
+ /**
13398
+ * Create a frozen instance of {@link SendBatchRequest}, with defaults specified
13399
+ * in Rust, in the {@link breez_sdk_spark} crate.
13400
+ */
13401
+ new: create,
13402
+
13403
+ /**
13404
+ * Defaults specified in the {@link breez_sdk_spark} crate.
13405
+ */
13406
+ defaults: () => Object.freeze(defaults()) as Partial<SendBatchRequest>,
13407
+ });
13408
+ })();
13409
+
13410
+ const FfiConverterTypeSendBatchRequest = (() => {
13411
+ type TypeName = SendBatchRequest;
13412
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
13413
+ read(from: RustBuffer): TypeName {
13414
+ return {
13415
+ prepareResponse: FfiConverterTypePrepareSendBatchResponse.read(from),
13416
+ };
13417
+ }
13418
+ write(value: TypeName, into: RustBuffer): void {
13419
+ FfiConverterTypePrepareSendBatchResponse.write(
13420
+ value.prepareResponse,
13421
+ into
13422
+ );
13423
+ }
13424
+ allocationSize(value: TypeName): number {
13425
+ return FfiConverterTypePrepareSendBatchResponse.allocationSize(
13426
+ value.prepareResponse
13427
+ );
13428
+ }
13429
+ }
13430
+ return new FFIConverter();
13431
+ })();
13432
+
13433
+ export type SendBatchResponse = {
13434
+ /**
13435
+ * One payment per recipient, in recipient order, all sharing a transaction
13436
+ * hash.
13437
+ */
13438
+ payments: Array<Payment>;
13439
+ };
13440
+
13441
+ /**
13442
+ * Generated factory for {@link SendBatchResponse} record objects.
13443
+ */
13444
+ export const SendBatchResponse = (() => {
13445
+ const defaults = () => ({});
13446
+ const create = (() => {
13447
+ return uniffiCreateRecord<SendBatchResponse, ReturnType<typeof defaults>>(
13448
+ defaults
13449
+ );
13450
+ })();
13451
+ return Object.freeze({
13452
+ /**
13453
+ * Create a frozen instance of {@link SendBatchResponse}, with defaults specified
13454
+ * in Rust, in the {@link breez_sdk_spark} crate.
13455
+ */
13456
+ create,
13457
+
13458
+ /**
13459
+ * Create a frozen instance of {@link SendBatchResponse}, with defaults specified
13460
+ * in Rust, in the {@link breez_sdk_spark} crate.
13461
+ */
13462
+ new: create,
13463
+
13464
+ /**
13465
+ * Defaults specified in the {@link breez_sdk_spark} crate.
13466
+ */
13467
+ defaults: () => Object.freeze(defaults()) as Partial<SendBatchResponse>,
13468
+ });
13469
+ })();
13470
+
13471
+ const FfiConverterTypeSendBatchResponse = (() => {
13472
+ type TypeName = SendBatchResponse;
13473
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
13474
+ read(from: RustBuffer): TypeName {
13475
+ return {
13476
+ payments: FfiConverterArrayTypePayment.read(from),
13477
+ };
13478
+ }
13479
+ write(value: TypeName, into: RustBuffer): void {
13480
+ FfiConverterArrayTypePayment.write(value.payments, into);
13481
+ }
13482
+ allocationSize(value: TypeName): number {
13483
+ return FfiConverterArrayTypePayment.allocationSize(value.payments);
13484
+ }
13485
+ }
13486
+ return new FFIConverter();
13487
+ })();
13488
+
12900
13489
  export type SendOnchainFeeQuote = {
12901
13490
  id: string;
12902
13491
  expiresAt: /*u64*/ bigint;
@@ -17808,6 +18397,150 @@ const FfiConverterTypeAutoOptimizationEvent = (() => {
17808
18397
  return new FFIConverter();
17809
18398
  })();
17810
18399
 
18400
+ // Enum: BatchDestination
18401
+ export enum BatchDestination_Tags {
18402
+ SparkAddress = 'SparkAddress',
18403
+ SparkInvoice = 'SparkInvoice',
18404
+ }
18405
+ /**
18406
+ * Where a batch recipient is paid, once prepare has decoded its payment request.
18407
+ */
18408
+ export const BatchDestination = (() => {
18409
+ type SparkAddress__interface = {
18410
+ tag: BatchDestination_Tags.SparkAddress;
18411
+ inner: Readonly<{ address: string }>;
18412
+ };
18413
+
18414
+ class SparkAddress_ extends UniffiEnum implements SparkAddress__interface {
18415
+ /**
18416
+ * @private
18417
+ * This field is private and should not be used, use `tag` instead.
18418
+ */
18419
+ readonly [uniffiTypeNameSymbol] = 'BatchDestination';
18420
+ readonly tag = BatchDestination_Tags.SparkAddress;
18421
+ readonly inner: Readonly<{ address: string }>;
18422
+ constructor(inner: { address: string }) {
18423
+ super('BatchDestination', 'SparkAddress');
18424
+ this.inner = Object.freeze(inner);
18425
+ }
18426
+
18427
+ static new(inner: { address: string }): SparkAddress_ {
18428
+ return new SparkAddress_(inner);
18429
+ }
18430
+
18431
+ static instanceOf(obj: any): obj is SparkAddress_ {
18432
+ return obj.tag === BatchDestination_Tags.SparkAddress;
18433
+ }
18434
+ }
18435
+
18436
+ type SparkInvoice__interface = {
18437
+ tag: BatchDestination_Tags.SparkInvoice;
18438
+ inner: Readonly<{ invoiceDetails: SparkInvoiceDetails }>;
18439
+ };
18440
+
18441
+ class SparkInvoice_ extends UniffiEnum implements SparkInvoice__interface {
18442
+ /**
18443
+ * @private
18444
+ * This field is private and should not be used, use `tag` instead.
18445
+ */
18446
+ readonly [uniffiTypeNameSymbol] = 'BatchDestination';
18447
+ readonly tag = BatchDestination_Tags.SparkInvoice;
18448
+ readonly inner: Readonly<{ invoiceDetails: SparkInvoiceDetails }>;
18449
+ constructor(inner: { invoiceDetails: SparkInvoiceDetails }) {
18450
+ super('BatchDestination', 'SparkInvoice');
18451
+ this.inner = Object.freeze(inner);
18452
+ }
18453
+
18454
+ static new(inner: { invoiceDetails: SparkInvoiceDetails }): SparkInvoice_ {
18455
+ return new SparkInvoice_(inner);
18456
+ }
18457
+
18458
+ static instanceOf(obj: any): obj is SparkInvoice_ {
18459
+ return obj.tag === BatchDestination_Tags.SparkInvoice;
18460
+ }
18461
+ }
18462
+
18463
+ function instanceOf(obj: any): obj is BatchDestination {
18464
+ return obj[uniffiTypeNameSymbol] === 'BatchDestination';
18465
+ }
18466
+
18467
+ return Object.freeze({
18468
+ instanceOf,
18469
+ SparkAddress: SparkAddress_,
18470
+ SparkInvoice: SparkInvoice_,
18471
+ });
18472
+ })();
18473
+
18474
+ /**
18475
+ * Where a batch recipient is paid, once prepare has decoded its payment request.
18476
+ */
18477
+
18478
+ export type BatchDestination = InstanceType<
18479
+ (typeof BatchDestination)[keyof Omit<typeof BatchDestination, 'instanceOf'>]
18480
+ >;
18481
+
18482
+ // FfiConverter for enum BatchDestination
18483
+ const FfiConverterTypeBatchDestination = (() => {
18484
+ const ordinalConverter = FfiConverterInt32;
18485
+ type TypeName = BatchDestination;
18486
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
18487
+ read(from: RustBuffer): TypeName {
18488
+ switch (ordinalConverter.read(from)) {
18489
+ case 1:
18490
+ return new BatchDestination.SparkAddress({
18491
+ address: FfiConverterString.read(from),
18492
+ });
18493
+ case 2:
18494
+ return new BatchDestination.SparkInvoice({
18495
+ invoiceDetails: FfiConverterTypeSparkInvoiceDetails.read(from),
18496
+ });
18497
+ default:
18498
+ throw new UniffiInternalError.UnexpectedEnumCase();
18499
+ }
18500
+ }
18501
+ write(value: TypeName, into: RustBuffer): void {
18502
+ switch (value.tag) {
18503
+ case BatchDestination_Tags.SparkAddress: {
18504
+ ordinalConverter.write(1, into);
18505
+ const inner = value.inner;
18506
+ FfiConverterString.write(inner.address, into);
18507
+ return;
18508
+ }
18509
+ case BatchDestination_Tags.SparkInvoice: {
18510
+ ordinalConverter.write(2, into);
18511
+ const inner = value.inner;
18512
+ FfiConverterTypeSparkInvoiceDetails.write(inner.invoiceDetails, into);
18513
+ return;
18514
+ }
18515
+ default:
18516
+ // Throwing from here means that BatchDestination_Tags hasn't matched an ordinal.
18517
+ throw new UniffiInternalError.UnexpectedEnumCase();
18518
+ }
18519
+ }
18520
+ allocationSize(value: TypeName): number {
18521
+ switch (value.tag) {
18522
+ case BatchDestination_Tags.SparkAddress: {
18523
+ const inner = value.inner;
18524
+ let size = ordinalConverter.allocationSize(1);
18525
+ size += FfiConverterString.allocationSize(inner.address);
18526
+ return size;
18527
+ }
18528
+ case BatchDestination_Tags.SparkInvoice: {
18529
+ const inner = value.inner;
18530
+ let size = ordinalConverter.allocationSize(2);
18531
+ size += FfiConverterTypeSparkInvoiceDetails.allocationSize(
18532
+ inner.invoiceDetails
18533
+ );
18534
+ return size;
18535
+ }
18536
+ default:
18537
+ throw new UniffiInternalError.UnexpectedEnumCase();
18538
+ }
18539
+ }
18540
+ }
18541
+ return new FFIConverter();
18542
+ })();
18543
+
17811
18544
  export enum BitcoinNetwork {
17812
18545
  /**
17813
18546
  * Mainnet
@@ -23884,6 +24617,7 @@ export enum PasskeyError_Tags {
23884
24617
  InvalidPrfOutput = 'InvalidPrfOutput',
23885
24618
  MnemonicError = 'MnemonicError',
23886
24619
  InvalidSalt = 'InvalidSalt',
24620
+ CreatedButNotDerived = 'CreatedButNotDerived',
23887
24621
  Generic = 'Generic',
23888
24622
  }
23889
24623
  /**
@@ -24191,6 +24925,66 @@ export const PasskeyError = (() => {
24191
24925
  }
24192
24926
  }
24193
24927
 
24928
+ type CreatedButNotDerived__interface = {
24929
+ tag: PasskeyError_Tags.CreatedButNotDerived;
24930
+ inner: Readonly<{ credentialId: ArrayBuffer; source: PrfProviderError }>;
24931
+ };
24932
+
24933
+ /**
24934
+ * Registration created the credential, then the derive that
24935
+ * followed it failed. The passkey exists on the device: recover by
24936
+ * signing in pinned to `credential_id`. Registering again would
24937
+ * leave this one behind, owning a wallet nothing points to.
24938
+ *
24939
+ * Only wraps a [`PrfProviderError`], so hosts unwrap once and keep
24940
+ * the arms they already have. Failures that are not the
24941
+ * authenticator's (mnemonic, key derivation, invalid PRF output)
24942
+ * propagate as their own variant, unwrapped.
24943
+ */
24944
+ class CreatedButNotDerived_
24945
+ extends UniffiError
24946
+ implements CreatedButNotDerived__interface
24947
+ {
24948
+ /**
24949
+ * @private
24950
+ * This field is private and should not be used, use `tag` instead.
24951
+ */
24952
+ readonly [uniffiTypeNameSymbol] = 'PasskeyError';
24953
+ readonly tag = PasskeyError_Tags.CreatedButNotDerived;
24954
+ readonly inner: Readonly<{
24955
+ credentialId: ArrayBuffer;
24956
+ source: PrfProviderError;
24957
+ }>;
24958
+ constructor(inner: {
24959
+ credentialId: ArrayBuffer;
24960
+ source: PrfProviderError;
24961
+ }) {
24962
+ super('PasskeyError', 'CreatedButNotDerived');
24963
+ this.inner = Object.freeze(inner);
24964
+ }
24965
+
24966
+ static new(inner: {
24967
+ credentialId: ArrayBuffer;
24968
+ source: PrfProviderError;
24969
+ }): CreatedButNotDerived_ {
24970
+ return new CreatedButNotDerived_(inner);
24971
+ }
24972
+
24973
+ static instanceOf(obj: any): obj is CreatedButNotDerived_ {
24974
+ return obj.tag === PasskeyError_Tags.CreatedButNotDerived;
24975
+ }
24976
+
24977
+ static hasInner(obj: any): obj is CreatedButNotDerived_ {
24978
+ return CreatedButNotDerived_.instanceOf(obj);
24979
+ }
24980
+
24981
+ static getInner(
24982
+ obj: CreatedButNotDerived_
24983
+ ): Readonly<{ credentialId: ArrayBuffer; source: PrfProviderError }> {
24984
+ return obj.inner;
24985
+ }
24986
+ }
24987
+
24194
24988
  type Generic__interface = {
24195
24989
  tag: PasskeyError_Tags.Generic;
24196
24990
  inner: Readonly<[string]>;
@@ -24240,6 +25034,7 @@ export const PasskeyError = (() => {
24240
25034
  InvalidPrfOutput: InvalidPrfOutput_,
24241
25035
  MnemonicError: MnemonicError_,
24242
25036
  InvalidSalt: InvalidSalt_,
25037
+ CreatedButNotDerived: CreatedButNotDerived_,
24243
25038
  Generic: Generic_,
24244
25039
  });
24245
25040
  })();
@@ -24288,6 +25083,11 @@ const FfiConverterTypePasskeyError = (() => {
24288
25083
  case 8:
24289
25084
  return new PasskeyError.InvalidSalt(FfiConverterString.read(from));
24290
25085
  case 9:
25086
+ return new PasskeyError.CreatedButNotDerived({
25087
+ credentialId: FfiConverterArrayBuffer.read(from),
25088
+ source: FfiConverterTypePrfProviderError.read(from),
25089
+ });
25090
+ case 10:
24291
25091
  return new PasskeyError.Generic(FfiConverterString.read(from));
24292
25092
  default:
24293
25093
  throw new UniffiInternalError.UnexpectedEnumCase();
@@ -24343,9 +25143,16 @@ const FfiConverterTypePasskeyError = (() => {
24343
25143
  FfiConverterString.write(inner[0], into);
24344
25144
  return;
24345
25145
  }
24346
- case PasskeyError_Tags.Generic: {
25146
+ case PasskeyError_Tags.CreatedButNotDerived: {
24347
25147
  ordinalConverter.write(9, into);
24348
25148
  const inner = value.inner;
25149
+ FfiConverterArrayBuffer.write(inner.credentialId, into);
25150
+ FfiConverterTypePrfProviderError.write(inner.source, into);
25151
+ return;
25152
+ }
25153
+ case PasskeyError_Tags.Generic: {
25154
+ ordinalConverter.write(10, into);
25155
+ const inner = value.inner;
24349
25156
  FfiConverterString.write(inner[0], into);
24350
25157
  return;
24351
25158
  }
@@ -24404,9 +25211,16 @@ const FfiConverterTypePasskeyError = (() => {
24404
25211
  size += FfiConverterString.allocationSize(inner[0]);
24405
25212
  return size;
24406
25213
  }
24407
- case PasskeyError_Tags.Generic: {
25214
+ case PasskeyError_Tags.CreatedButNotDerived: {
24408
25215
  const inner = value.inner;
24409
25216
  let size = ordinalConverter.allocationSize(9);
25217
+ size += FfiConverterArrayBuffer.allocationSize(inner.credentialId);
25218
+ size += FfiConverterTypePrfProviderError.allocationSize(inner.source);
25219
+ return size;
25220
+ }
25221
+ case PasskeyError_Tags.Generic: {
25222
+ const inner = value.inner;
25223
+ let size = ordinalConverter.allocationSize(10);
24410
25224
  size += FfiConverterString.allocationSize(inner[0]);
24411
25225
  return size;
24412
25226
  }
@@ -26626,6 +27440,7 @@ const FfiConverterTypePublishSignedLnurlPayResponse = (() => {
26626
27440
  export enum PublishSignedTransferPackageResponse_Tags {
26627
27441
  SwapCompleted = 'SwapCompleted',
26628
27442
  PaymentSent = 'PaymentSent',
27443
+ PaymentsSent = 'PaymentsSent',
26629
27444
  }
26630
27445
  export const PublishSignedTransferPackageResponse = (() => {
26631
27446
  type SwapCompleted__interface = {
@@ -26681,6 +27496,37 @@ export const PublishSignedTransferPackageResponse = (() => {
26681
27496
  }
26682
27497
  }
26683
27498
 
27499
+ type PaymentsSent__interface = {
27500
+ tag: PublishSignedTransferPackageResponse_Tags.PaymentsSent;
27501
+ inner: Readonly<{ payments: Array<Payment> }>;
27502
+ };
27503
+
27504
+ /**
27505
+ * Returned for a batch package: one payment per recipient, in recipient
27506
+ * order.
27507
+ */
27508
+ class PaymentsSent_ extends UniffiEnum implements PaymentsSent__interface {
27509
+ /**
27510
+ * @private
27511
+ * This field is private and should not be used, use `tag` instead.
27512
+ */
27513
+ readonly [uniffiTypeNameSymbol] = 'PublishSignedTransferPackageResponse';
27514
+ readonly tag = PublishSignedTransferPackageResponse_Tags.PaymentsSent;
27515
+ readonly inner: Readonly<{ payments: Array<Payment> }>;
27516
+ constructor(inner: { payments: Array<Payment> }) {
27517
+ super('PublishSignedTransferPackageResponse', 'PaymentsSent');
27518
+ this.inner = Object.freeze(inner);
27519
+ }
27520
+
27521
+ static new(inner: { payments: Array<Payment> }): PaymentsSent_ {
27522
+ return new PaymentsSent_(inner);
27523
+ }
27524
+
27525
+ static instanceOf(obj: any): obj is PaymentsSent_ {
27526
+ return obj.tag === PublishSignedTransferPackageResponse_Tags.PaymentsSent;
27527
+ }
27528
+ }
27529
+
26684
27530
  function instanceOf(obj: any): obj is PublishSignedTransferPackageResponse {
26685
27531
  return obj[uniffiTypeNameSymbol] === 'PublishSignedTransferPackageResponse';
26686
27532
  }
@@ -26689,6 +27535,7 @@ export const PublishSignedTransferPackageResponse = (() => {
26689
27535
  instanceOf,
26690
27536
  SwapCompleted: SwapCompleted_,
26691
27537
  PaymentSent: PaymentSent_,
27538
+ PaymentsSent: PaymentsSent_,
26692
27539
  });
26693
27540
  })();
26694
27541
 
@@ -26712,6 +27559,10 @@ const FfiConverterTypePublishSignedTransferPackageResponse = (() => {
26712
27559
  return new PublishSignedTransferPackageResponse.PaymentSent({
26713
27560
  payment: FfiConverterTypePayment.read(from),
26714
27561
  });
27562
+ case 3:
27563
+ return new PublishSignedTransferPackageResponse.PaymentsSent({
27564
+ payments: FfiConverterArrayTypePayment.read(from),
27565
+ });
26715
27566
  default:
26716
27567
  throw new UniffiInternalError.UnexpectedEnumCase();
26717
27568
  }
@@ -26728,6 +27579,12 @@ const FfiConverterTypePublishSignedTransferPackageResponse = (() => {
26728
27579
  FfiConverterTypePayment.write(inner.payment, into);
26729
27580
  return;
26730
27581
  }
27582
+ case PublishSignedTransferPackageResponse_Tags.PaymentsSent: {
27583
+ ordinalConverter.write(3, into);
27584
+ const inner = value.inner;
27585
+ FfiConverterArrayTypePayment.write(inner.payments, into);
27586
+ return;
27587
+ }
26731
27588
  default:
26732
27589
  // Throwing from here means that PublishSignedTransferPackageResponse_Tags hasn't matched an ordinal.
26733
27590
  throw new UniffiInternalError.UnexpectedEnumCase();
@@ -26744,6 +27601,12 @@ const FfiConverterTypePublishSignedTransferPackageResponse = (() => {
26744
27601
  size += FfiConverterTypePayment.allocationSize(inner.payment);
26745
27602
  return size;
26746
27603
  }
27604
+ case PublishSignedTransferPackageResponse_Tags.PaymentsSent: {
27605
+ const inner = value.inner;
27606
+ let size = ordinalConverter.allocationSize(3);
27607
+ size += FfiConverterArrayTypePayment.allocationSize(inner.payments);
27608
+ return size;
27609
+ }
26747
27610
  default:
26748
27611
  throw new UniffiInternalError.UnexpectedEnumCase();
26749
27612
  }
@@ -27150,6 +28013,7 @@ export const SdkError = (() => {
27150
28013
 
27151
28014
  type InsufficientFunds__interface = {
27152
28015
  tag: SdkError_Tags.InsufficientFunds;
28016
+ inner: Readonly<{ tokenIdentifier: string | undefined }>;
27153
28017
  };
27154
28018
 
27155
28019
  class InsufficientFunds_
@@ -27162,12 +28026,24 @@ export const SdkError = (() => {
27162
28026
  */
27163
28027
  readonly [uniffiTypeNameSymbol] = 'SdkError';
27164
28028
  readonly tag = SdkError_Tags.InsufficientFunds;
27165
- constructor() {
28029
+ readonly inner: Readonly<{ tokenIdentifier: string | undefined }>;
28030
+ constructor(inner: {
28031
+ /**
28032
+ * The token that cannot cover the payment. Unset when the shortfall is
28033
+ * in sats or when no single token can be named.
28034
+ */ tokenIdentifier: string | undefined;
28035
+ }) {
27166
28036
  super('SdkError', 'InsufficientFunds');
28037
+ this.inner = Object.freeze(inner);
27167
28038
  }
27168
28039
 
27169
- static new(): InsufficientFunds_ {
27170
- return new InsufficientFunds_();
28040
+ static new(inner: {
28041
+ /**
28042
+ * The token that cannot cover the payment. Unset when the shortfall is
28043
+ * in sats or when no single token can be named.
28044
+ */ tokenIdentifier: string | undefined;
28045
+ }): InsufficientFunds_ {
28046
+ return new InsufficientFunds_(inner);
27171
28047
  }
27172
28048
 
27173
28049
  static instanceOf(obj: any): obj is InsufficientFunds_ {
@@ -27175,7 +28051,13 @@ export const SdkError = (() => {
27175
28051
  }
27176
28052
 
27177
28053
  static hasInner(obj: any): obj is InsufficientFunds_ {
27178
- return false;
28054
+ return InsufficientFunds_.instanceOf(obj);
28055
+ }
28056
+
28057
+ static getInner(
28058
+ obj: InsufficientFunds_
28059
+ ): Readonly<{ tokenIdentifier: string | undefined }> {
28060
+ return obj.inner;
27179
28061
  }
27180
28062
  }
27181
28063
 
@@ -27781,7 +28663,9 @@ const FfiConverterTypeSdkError = (() => {
27781
28663
  case 1:
27782
28664
  return new SdkError.SparkError(FfiConverterString.read(from));
27783
28665
  case 2:
27784
- return new SdkError.InsufficientFunds();
28666
+ return new SdkError.InsufficientFunds({
28667
+ tokenIdentifier: FfiConverterOptionalString.read(from),
28668
+ });
27785
28669
  case 3:
27786
28670
  return new SdkError.InvalidUuid(FfiConverterString.read(from));
27787
28671
  case 4:
@@ -27838,6 +28722,8 @@ const FfiConverterTypeSdkError = (() => {
27838
28722
  }
27839
28723
  case SdkError_Tags.InsufficientFunds: {
27840
28724
  ordinalConverter.write(2, into);
28725
+ const inner = value.inner;
28726
+ FfiConverterOptionalString.write(inner.tokenIdentifier, into);
27841
28727
  return;
27842
28728
  }
27843
28729
  case SdkError_Tags.InvalidUuid: {
@@ -27940,7 +28826,12 @@ const FfiConverterTypeSdkError = (() => {
27940
28826
  return size;
27941
28827
  }
27942
28828
  case SdkError_Tags.InsufficientFunds: {
27943
- return ordinalConverter.allocationSize(2);
28829
+ const inner = value.inner;
28830
+ let size = ordinalConverter.allocationSize(2);
28831
+ size += FfiConverterOptionalString.allocationSize(
28832
+ inner.tokenIdentifier
28833
+ );
28834
+ return size;
27944
28835
  }
27945
28836
  case SdkError_Tags.InvalidUuid: {
27946
28837
  const inner = value.inner;
@@ -32751,6 +33642,7 @@ export enum UnsignedTransferPackage_Tags {
32751
33642
  Swap = 'Swap',
32752
33643
  Transfer = 'Transfer',
32753
33644
  Token = 'Token',
33645
+ TokenBatch = 'TokenBatch',
32754
33646
  }
32755
33647
  export const UnsignedTransferPackage = (() => {
32756
33648
  type Swap__interface = {
@@ -32910,6 +33802,71 @@ export const UnsignedTransferPackage = (() => {
32910
33802
  }
32911
33803
  }
32912
33804
 
33805
+ type TokenBatch__interface = {
33806
+ tag: UnsignedTransferPackage_Tags.TokenBatch;
33807
+ inner: Readonly<{
33808
+ prepareTokenTransaction: ExternalPrepareTokenTransactionRequest;
33809
+ tokenContext: ArrayBuffer;
33810
+ totals: Array<BatchTotal>;
33811
+ isSwap: boolean;
33812
+ }>;
33813
+ };
33814
+
33815
+ /**
33816
+ * One token transaction paying several recipients. Publishing it returns
33817
+ * `PaymentsSent` with one payment per recipient.
33818
+ */
33819
+ class TokenBatch_ extends UniffiEnum implements TokenBatch__interface {
33820
+ /**
33821
+ * @private
33822
+ * This field is private and should not be used, use `tag` instead.
33823
+ */
33824
+ readonly [uniffiTypeNameSymbol] = 'UnsignedTransferPackage';
33825
+ readonly tag = UnsignedTransferPackage_Tags.TokenBatch;
33826
+ readonly inner: Readonly<{
33827
+ prepareTokenTransaction: ExternalPrepareTokenTransactionRequest;
33828
+ tokenContext: ArrayBuffer;
33829
+ totals: Array<BatchTotal>;
33830
+ isSwap: boolean;
33831
+ }>;
33832
+ constructor(inner: {
33833
+ prepareTokenTransaction: ExternalPrepareTokenTransactionRequest;
33834
+ tokenContext: ArrayBuffer;
33835
+ /**
33836
+ * What the batch debits, per token. A batch spanning tokens has no
33837
+ * single amount to report.
33838
+ */ totals: Array<BatchTotal>;
33839
+ /**
33840
+ * When set, this package re-shapes the wallet's token outputs instead of
33841
+ * sending a payment. Publishing it returns `SwapCompleted`: rebuild the
33842
+ * original send from the same prepare response and submit again.
33843
+ */ isSwap: boolean;
33844
+ }) {
33845
+ super('UnsignedTransferPackage', 'TokenBatch');
33846
+ this.inner = Object.freeze(inner);
33847
+ }
33848
+
33849
+ static new(inner: {
33850
+ prepareTokenTransaction: ExternalPrepareTokenTransactionRequest;
33851
+ tokenContext: ArrayBuffer;
33852
+ /**
33853
+ * What the batch debits, per token. A batch spanning tokens has no
33854
+ * single amount to report.
33855
+ */ totals: Array<BatchTotal>;
33856
+ /**
33857
+ * When set, this package re-shapes the wallet's token outputs instead of
33858
+ * sending a payment. Publishing it returns `SwapCompleted`: rebuild the
33859
+ * original send from the same prepare response and submit again.
33860
+ */ isSwap: boolean;
33861
+ }): TokenBatch_ {
33862
+ return new TokenBatch_(inner);
33863
+ }
33864
+
33865
+ static instanceOf(obj: any): obj is TokenBatch_ {
33866
+ return obj.tag === UnsignedTransferPackage_Tags.TokenBatch;
33867
+ }
33868
+ }
33869
+
32913
33870
  function instanceOf(obj: any): obj is UnsignedTransferPackage {
32914
33871
  return obj[uniffiTypeNameSymbol] === 'UnsignedTransferPackage';
32915
33872
  }
@@ -32919,6 +33876,7 @@ export const UnsignedTransferPackage = (() => {
32919
33876
  Swap: Swap_,
32920
33877
  Transfer: Transfer_,
32921
33878
  Token: Token_,
33879
+ TokenBatch: TokenBatch_,
32922
33880
  });
32923
33881
  })();
32924
33882
 
@@ -32962,6 +33920,14 @@ const FfiConverterTypeUnsignedTransferPackage = (() => {
32962
33920
  fee: FfiConverterTypeu128.read(from),
32963
33921
  isSwap: FfiConverterBool.read(from),
32964
33922
  });
33923
+ case 4:
33924
+ return new UnsignedTransferPackage.TokenBatch({
33925
+ prepareTokenTransaction:
33926
+ FfiConverterTypeExternalPrepareTokenTransactionRequest.read(from),
33927
+ tokenContext: FfiConverterArrayBuffer.read(from),
33928
+ totals: FfiConverterArrayTypeBatchTotal.read(from),
33929
+ isSwap: FfiConverterBool.read(from),
33930
+ });
32965
33931
  default:
32966
33932
  throw new UniffiInternalError.UnexpectedEnumCase();
32967
33933
  }
@@ -33006,6 +33972,18 @@ const FfiConverterTypeUnsignedTransferPackage = (() => {
33006
33972
  FfiConverterBool.write(inner.isSwap, into);
33007
33973
  return;
33008
33974
  }
33975
+ case UnsignedTransferPackage_Tags.TokenBatch: {
33976
+ ordinalConverter.write(4, into);
33977
+ const inner = value.inner;
33978
+ FfiConverterTypeExternalPrepareTokenTransactionRequest.write(
33979
+ inner.prepareTokenTransaction,
33980
+ into
33981
+ );
33982
+ FfiConverterArrayBuffer.write(inner.tokenContext, into);
33983
+ FfiConverterArrayTypeBatchTotal.write(inner.totals, into);
33984
+ FfiConverterBool.write(inner.isSwap, into);
33985
+ return;
33986
+ }
33009
33987
  default:
33010
33988
  // Throwing from here means that UnsignedTransferPackage_Tags hasn't matched an ordinal.
33011
33989
  throw new UniffiInternalError.UnexpectedEnumCase();
@@ -33049,6 +34027,18 @@ const FfiConverterTypeUnsignedTransferPackage = (() => {
33049
34027
  size += FfiConverterBool.allocationSize(inner.isSwap);
33050
34028
  return size;
33051
34029
  }
34030
+ case UnsignedTransferPackage_Tags.TokenBatch: {
34031
+ const inner = value.inner;
34032
+ let size = ordinalConverter.allocationSize(4);
34033
+ size +=
34034
+ FfiConverterTypeExternalPrepareTokenTransactionRequest.allocationSize(
34035
+ inner.prepareTokenTransaction
34036
+ );
34037
+ size += FfiConverterArrayBuffer.allocationSize(inner.tokenContext);
34038
+ size += FfiConverterArrayTypeBatchTotal.allocationSize(inner.totals);
34039
+ size += FfiConverterBool.allocationSize(inner.isSwap);
34040
+ return size;
34041
+ }
33052
34042
  default:
33053
34043
  throw new UniffiInternalError.UnexpectedEnumCase();
33054
34044
  }
@@ -34291,6 +35281,17 @@ export interface BreezSdkInterface {
34291
35281
  request: AuthorizeTransferRequest,
34292
35282
  asyncOpts_?: { signal: AbortSignal }
34293
35283
  ): /*throws*/ Promise<TransferAuthorization>;
35284
+ /**
35285
+ * Builds the unsigned package for the batch prepared by
35286
+ * [`BreezSdk::prepare_send_batch`], for signing outside the SDK.
35287
+ *
35288
+ * Publish the signed package with
35289
+ * [`BreezSdk::publish_signed_transfer_package`], which returns every payment.
35290
+ */
35291
+ buildUnsignedBatchPackage(
35292
+ request: BuildUnsignedBatchPackageRequest,
35293
+ asyncOpts_?: { signal: AbortSignal }
35294
+ ): /*throws*/ Promise<UnsignedTransferPackage>;
34294
35295
  buildUnsignedLnurlPayPackage(
34295
35296
  request: BuildUnsignedLnurlPayPackageRequest,
34296
35297
  asyncOpts_?: { signal: AbortSignal }
@@ -34567,6 +35568,24 @@ export interface BreezSdkInterface {
34567
35568
  request: PrepareLnurlPayRequest,
34568
35569
  asyncOpts_?: { signal: AbortSignal }
34569
35570
  ): /*throws*/ Promise<PrepareLnurlPayResponse>;
35571
+ /**
35572
+ * Prepares a send to several payees, all paid by one transaction.
35573
+ *
35574
+ * Each recipient is a Spark address or a Spark invoice, and one batch may
35575
+ * span several tokens. The response resolves every invoice into the asset
35576
+ * and amount it requests, and reports what the batch debits per asset.
35577
+ *
35578
+ * A batch pays tokens: sending sats to several payees at once is not
35579
+ * supported yet, so a recipient that resolves to sats is rejected.
35580
+ *
35581
+ * A batch that pays a Spark invoice is limited to a single token: the
35582
+ * operators reject a transaction that carries an invoice and pays more
35583
+ * than one. Send those as one batch per token.
35584
+ */
35585
+ prepareSendBatch(
35586
+ request: PrepareSendBatchRequest,
35587
+ asyncOpts_?: { signal: AbortSignal }
35588
+ ): /*throws*/ Promise<PrepareSendBatchResponse>;
34570
35589
  prepareSendPayment(
34571
35590
  request: PrepareSendPaymentRequest,
34572
35591
  asyncOpts_?: { signal: AbortSignal }
@@ -34655,6 +35674,20 @@ export interface BreezSdkInterface {
34655
35674
  id: string,
34656
35675
  asyncOpts_?: { signal: AbortSignal }
34657
35676
  ): Promise<boolean>;
35677
+ /**
35678
+ * Sends the batch prepared by [`BreezSdk::prepare_send_batch`], returning
35679
+ * one payment per recipient in recipient order.
35680
+ *
35681
+ * Retrying after a failure that leaves the outcome unknown may pay twice:
35682
+ * a token transfer has no idempotency key, since the operator can only be
35683
+ * asked about a transaction by a hash that is computed while broadcasting.
35684
+ * Look for the batch with a `Token` payment details filter on the
35685
+ * transaction hash before sending it again.
35686
+ */
35687
+ sendBatch(
35688
+ request: SendBatchRequest,
35689
+ asyncOpts_?: { signal: AbortSignal }
35690
+ ): /*throws*/ Promise<SendBatchResponse>;
34658
35691
  sendPayment(
34659
35692
  request: SendPaymentRequest,
34660
35693
  asyncOpts_?: { signal: AbortSignal }
@@ -34897,6 +35930,52 @@ export class BreezSdk
34897
35930
  }
34898
35931
  }
34899
35932
 
35933
+ /**
35934
+ * Builds the unsigned package for the batch prepared by
35935
+ * [`BreezSdk::prepare_send_batch`], for signing outside the SDK.
35936
+ *
35937
+ * Publish the signed package with
35938
+ * [`BreezSdk::publish_signed_transfer_package`], which returns every payment.
35939
+ */
35940
+ public async buildUnsignedBatchPackage(
35941
+ request: BuildUnsignedBatchPackageRequest,
35942
+ asyncOpts_?: { signal: AbortSignal }
35943
+ ): Promise<UnsignedTransferPackage> /*throws*/ {
35944
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
35945
+ try {
35946
+ return await uniffiRustCallAsync(
35947
+ /*rustCaller:*/ uniffiCaller,
35948
+ /*rustFutureFunc:*/ () => {
35949
+ return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_build_unsigned_batch_package(
35950
+ uniffiTypeBreezSdkObjectFactory.clonePointer(this),
35951
+ FfiConverterTypeBuildUnsignedBatchPackageRequest.lower(request)
35952
+ );
35953
+ },
35954
+ /*pollFunc:*/ nativeModule()
35955
+ .ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
35956
+ /*cancelFunc:*/ nativeModule()
35957
+ .ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,
35958
+ /*completeFunc:*/ nativeModule()
35959
+ .ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
35960
+ /*freeFunc:*/ nativeModule()
35961
+ .ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,
35962
+ /*liftFunc:*/ FfiConverterTypeUnsignedTransferPackage.lift.bind(
35963
+ FfiConverterTypeUnsignedTransferPackage
35964
+ ),
35965
+ /*liftString:*/ FfiConverterString.lift,
35966
+ /*asyncOpts:*/ asyncOpts_,
35967
+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(
35968
+ FfiConverterTypeSdkError
35969
+ )
35970
+ );
35971
+ } catch (__error: any) {
35972
+ if (uniffiIsDebug && __error instanceof Error) {
35973
+ __error.stack = __stack;
35974
+ }
35975
+ throw __error;
35976
+ }
35977
+ }
35978
+
34900
35979
  public async buildUnsignedLnurlPayPackage(
34901
35980
  request: BuildUnsignedLnurlPayPackageRequest,
34902
35981
  asyncOpts_?: { signal: AbortSignal }
@@ -36223,6 +37302,59 @@ export class BreezSdk
36223
37302
  }
36224
37303
  }
36225
37304
 
37305
+ /**
37306
+ * Prepares a send to several payees, all paid by one transaction.
37307
+ *
37308
+ * Each recipient is a Spark address or a Spark invoice, and one batch may
37309
+ * span several tokens. The response resolves every invoice into the asset
37310
+ * and amount it requests, and reports what the batch debits per asset.
37311
+ *
37312
+ * A batch pays tokens: sending sats to several payees at once is not
37313
+ * supported yet, so a recipient that resolves to sats is rejected.
37314
+ *
37315
+ * A batch that pays a Spark invoice is limited to a single token: the
37316
+ * operators reject a transaction that carries an invoice and pays more
37317
+ * than one. Send those as one batch per token.
37318
+ */
37319
+ public async prepareSendBatch(
37320
+ request: PrepareSendBatchRequest,
37321
+ asyncOpts_?: { signal: AbortSignal }
37322
+ ): Promise<PrepareSendBatchResponse> /*throws*/ {
37323
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
37324
+ try {
37325
+ return await uniffiRustCallAsync(
37326
+ /*rustCaller:*/ uniffiCaller,
37327
+ /*rustFutureFunc:*/ () => {
37328
+ return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_prepare_send_batch(
37329
+ uniffiTypeBreezSdkObjectFactory.clonePointer(this),
37330
+ FfiConverterTypePrepareSendBatchRequest.lower(request)
37331
+ );
37332
+ },
37333
+ /*pollFunc:*/ nativeModule()
37334
+ .ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
37335
+ /*cancelFunc:*/ nativeModule()
37336
+ .ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,
37337
+ /*completeFunc:*/ nativeModule()
37338
+ .ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
37339
+ /*freeFunc:*/ nativeModule()
37340
+ .ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,
37341
+ /*liftFunc:*/ FfiConverterTypePrepareSendBatchResponse.lift.bind(
37342
+ FfiConverterTypePrepareSendBatchResponse
37343
+ ),
37344
+ /*liftString:*/ FfiConverterString.lift,
37345
+ /*asyncOpts:*/ asyncOpts_,
37346
+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(
37347
+ FfiConverterTypeSdkError
37348
+ )
37349
+ );
37350
+ } catch (__error: any) {
37351
+ if (uniffiIsDebug && __error instanceof Error) {
37352
+ __error.stack = __stack;
37353
+ }
37354
+ throw __error;
37355
+ }
37356
+ }
37357
+
36226
37358
  public async prepareSendPayment(
36227
37359
  request: PrepareSendPaymentRequest,
36228
37360
  asyncOpts_?: { signal: AbortSignal }
@@ -36689,6 +37821,55 @@ export class BreezSdk
36689
37821
  }
36690
37822
  }
36691
37823
 
37824
+ /**
37825
+ * Sends the batch prepared by [`BreezSdk::prepare_send_batch`], returning
37826
+ * one payment per recipient in recipient order.
37827
+ *
37828
+ * Retrying after a failure that leaves the outcome unknown may pay twice:
37829
+ * a token transfer has no idempotency key, since the operator can only be
37830
+ * asked about a transaction by a hash that is computed while broadcasting.
37831
+ * Look for the batch with a `Token` payment details filter on the
37832
+ * transaction hash before sending it again.
37833
+ */
37834
+ public async sendBatch(
37835
+ request: SendBatchRequest,
37836
+ asyncOpts_?: { signal: AbortSignal }
37837
+ ): Promise<SendBatchResponse> /*throws*/ {
37838
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
37839
+ try {
37840
+ return await uniffiRustCallAsync(
37841
+ /*rustCaller:*/ uniffiCaller,
37842
+ /*rustFutureFunc:*/ () => {
37843
+ return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_send_batch(
37844
+ uniffiTypeBreezSdkObjectFactory.clonePointer(this),
37845
+ FfiConverterTypeSendBatchRequest.lower(request)
37846
+ );
37847
+ },
37848
+ /*pollFunc:*/ nativeModule()
37849
+ .ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
37850
+ /*cancelFunc:*/ nativeModule()
37851
+ .ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,
37852
+ /*completeFunc:*/ nativeModule()
37853
+ .ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
37854
+ /*freeFunc:*/ nativeModule()
37855
+ .ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,
37856
+ /*liftFunc:*/ FfiConverterTypeSendBatchResponse.lift.bind(
37857
+ FfiConverterTypeSendBatchResponse
37858
+ ),
37859
+ /*liftString:*/ FfiConverterString.lift,
37860
+ /*asyncOpts:*/ asyncOpts_,
37861
+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(
37862
+ FfiConverterTypeSdkError
37863
+ )
37864
+ );
37865
+ } catch (__error: any) {
37866
+ if (uniffiIsDebug && __error instanceof Error) {
37867
+ __error.stack = __stack;
37868
+ }
37869
+ throw __error;
37870
+ }
37871
+ }
37872
+
36692
37873
  public async sendPayment(
36693
37874
  request: SendPaymentRequest,
36694
37875
  asyncOpts_?: { signal: AbortSignal }
@@ -41092,10 +42273,12 @@ export interface PasskeyClientInterface {
41092
42273
  */
41093
42274
  labels(): PasskeyLabelsInterface;
41094
42275
  /**
41095
- * First-time setup. Drives [`PrfProvider::create_passkey`] (one
41096
- * ceremony) followed by the wallet-derivation flow that backs
41097
- * [`Passkey::setup_wallet`] (one ceremony, dual-salt where
41098
- * supported). The label is always published on success.
42276
+ * First-time setup. Drives [`PrfProvider::create_passkey`], which
42277
+ * returns the seeds inline where the platform evaluates PRF during
42278
+ * the create ceremony; otherwise the wallet-derivation flow behind
42279
+ * [`Passkey::setup_wallet`] runs as a second ceremony. The label is
42280
+ * validated before anything is created, and published in the
42281
+ * background: it may still be in flight when this returns `Ok`.
41099
42282
  */
41100
42283
  register(
41101
42284
  request: RegisterRequest,
@@ -41281,10 +42464,12 @@ export class PasskeyClient
41281
42464
  }
41282
42465
 
41283
42466
  /**
41284
- * First-time setup. Drives [`PrfProvider::create_passkey`] (one
41285
- * ceremony) followed by the wallet-derivation flow that backs
41286
- * [`Passkey::setup_wallet`] (one ceremony, dual-salt where
41287
- * supported). The label is always published on success.
42467
+ * First-time setup. Drives [`PrfProvider::create_passkey`], which
42468
+ * returns the seeds inline where the platform evaluates PRF during
42469
+ * the create ceremony; otherwise the wallet-derivation flow behind
42470
+ * [`Passkey::setup_wallet`] runs as a second ceremony. The label is
42471
+ * validated before anything is created, and published in the
42472
+ * background: it may still be in flight when this returns `Ok`.
41288
42473
  */
41289
42474
  public async register(
41290
42475
  request: RegisterRequest,
@@ -42022,20 +43207,35 @@ export interface PrfProvider {
42022
43207
  signal: AbortSignal;
42023
43208
  }): /*throws*/ Promise<boolean>;
42024
43209
  /**
42025
- * Explicit registration. Platform passkey providers override this to
42026
- * drive the OS create ceremony and surface the credential metadata
42027
- * hosts need for `exclude_credentials` bookkeeping. CLI / hardware
42028
- * providers register lazily in [`Self::derive_seeds`] and inherit the
42029
- * default `PrfNotSupported`.
43210
+ * Explicit registration: drive the OS create ceremony, and where the
43211
+ * platform supports it, evaluate PRF for `salts` in the same
43212
+ * ceremony. Platform passkey providers override this to surface the
43213
+ * credential metadata hosts need for `exclude_credentials`
43214
+ * bookkeeping. CLI / hardware providers register lazily in
43215
+ * [`Self::derive_seeds`] and inherit the default `PrfNotSupported`.
42030
43216
  *
42031
43217
  * `exclude_credentials` lists already-registered IDs and surfaces
42032
43218
  * duplicates as `CredentialAlreadyExists`. The `user.id` is always
42033
43219
  * provider-minted and returned on `PasskeyCredential.user_id`.
43220
+ *
43221
+ * Returning seeds removes the assertion that would otherwise follow
43222
+ * a create, and with it the window where the new credential exists
43223
+ * but the platform cannot yet resolve it. Return `seeds: None` for
43224
+ * anything short of one output per salt (some authenticators drop
43225
+ * `prf.eval.second`): a partial result is not usable, and the caller
43226
+ * falls back to [`Self::derive_seeds`]. Empty `salts` means the
43227
+ * caller wants the credential only.
43228
+ *
43229
+ * Seeds returned here must equal what [`Self::derive_seeds`] would
43230
+ * return for the same salts. The wallet is derived from them either
43231
+ * way, so a mismatch means register and sign-in land on different
43232
+ * wallets, and the one register created is unreachable.
42034
43233
  */
42035
43234
  createPasskey(
42036
43235
  excludeCredentials: Array<ArrayBuffer>,
43236
+ salts: Array<string>,
42037
43237
  asyncOpts_?: { signal: AbortSignal }
42038
- ): /*throws*/ Promise<PasskeyCredential>;
43238
+ ): /*throws*/ Promise<CreatePasskeyOutput>;
42039
43239
  /**
42040
43240
  * Advisory check against the platform's out-of-band verification
42041
43241
  * source (iOS AASA / Android assetlinks / browser rpId scope).
@@ -42172,20 +43372,35 @@ export class PrfProviderImpl
42172
43372
  }
42173
43373
 
42174
43374
  /**
42175
- * Explicit registration. Platform passkey providers override this to
42176
- * drive the OS create ceremony and surface the credential metadata
42177
- * hosts need for `exclude_credentials` bookkeeping. CLI / hardware
42178
- * providers register lazily in [`Self::derive_seeds`] and inherit the
42179
- * default `PrfNotSupported`.
43375
+ * Explicit registration: drive the OS create ceremony, and where the
43376
+ * platform supports it, evaluate PRF for `salts` in the same
43377
+ * ceremony. Platform passkey providers override this to surface the
43378
+ * credential metadata hosts need for `exclude_credentials`
43379
+ * bookkeeping. CLI / hardware providers register lazily in
43380
+ * [`Self::derive_seeds`] and inherit the default `PrfNotSupported`.
42180
43381
  *
42181
43382
  * `exclude_credentials` lists already-registered IDs and surfaces
42182
43383
  * duplicates as `CredentialAlreadyExists`. The `user.id` is always
42183
43384
  * provider-minted and returned on `PasskeyCredential.user_id`.
43385
+ *
43386
+ * Returning seeds removes the assertion that would otherwise follow
43387
+ * a create, and with it the window where the new credential exists
43388
+ * but the platform cannot yet resolve it. Return `seeds: None` for
43389
+ * anything short of one output per salt (some authenticators drop
43390
+ * `prf.eval.second`): a partial result is not usable, and the caller
43391
+ * falls back to [`Self::derive_seeds`]. Empty `salts` means the
43392
+ * caller wants the credential only.
43393
+ *
43394
+ * Seeds returned here must equal what [`Self::derive_seeds`] would
43395
+ * return for the same salts. The wallet is derived from them either
43396
+ * way, so a mismatch means register and sign-in land on different
43397
+ * wallets, and the one register created is unreachable.
42184
43398
  */
42185
43399
  public async createPasskey(
42186
43400
  excludeCredentials: Array<ArrayBuffer>,
43401
+ salts: Array<string>,
42187
43402
  asyncOpts_?: { signal: AbortSignal }
42188
- ): Promise<PasskeyCredential> /*throws*/ {
43403
+ ): Promise<CreatePasskeyOutput> /*throws*/ {
42189
43404
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
42190
43405
  try {
42191
43406
  return await uniffiRustCallAsync(
@@ -42193,7 +43408,8 @@ export class PrfProviderImpl
42193
43408
  /*rustFutureFunc:*/ () => {
42194
43409
  return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_prfprovider_create_passkey(
42195
43410
  uniffiTypePrfProviderImplObjectFactory.clonePointer(this),
42196
- FfiConverterArrayArrayBuffer.lower(excludeCredentials)
43411
+ FfiConverterArrayArrayBuffer.lower(excludeCredentials),
43412
+ FfiConverterArrayString.lower(salts)
42197
43413
  );
42198
43414
  },
42199
43415
  /*pollFunc:*/ nativeModule()
@@ -42204,8 +43420,8 @@ export class PrfProviderImpl
42204
43420
  .ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
42205
43421
  /*freeFunc:*/ nativeModule()
42206
43422
  .ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,
42207
- /*liftFunc:*/ FfiConverterTypePasskeyCredential.lift.bind(
42208
- FfiConverterTypePasskeyCredential
43423
+ /*liftFunc:*/ FfiConverterTypeCreatePasskeyOutput.lift.bind(
43424
+ FfiConverterTypeCreatePasskeyOutput
42209
43425
  ),
42210
43426
  /*liftString:*/ FfiConverterString.lift,
42211
43427
  /*asyncOpts:*/ asyncOpts_,
@@ -42462,24 +43678,26 @@ const uniffiCallbackInterfacePrfProvider: {
42462
43678
  createPasskey: (
42463
43679
  uniffiHandle: bigint,
42464
43680
  excludeCredentials: Uint8Array,
43681
+ salts: Uint8Array,
42465
43682
  uniffiFutureCallback: UniffiForeignFutureCompleteRustBuffer,
42466
43683
  uniffiCallbackData: bigint
42467
43684
  ) => {
42468
43685
  const uniffiMakeCall = async (
42469
43686
  signal: AbortSignal
42470
- ): Promise<PasskeyCredential> => {
43687
+ ): Promise<CreatePasskeyOutput> => {
42471
43688
  const jsCallback = FfiConverterTypePrfProvider.lift(uniffiHandle);
42472
43689
  return await jsCallback.createPasskey(
42473
43690
  FfiConverterArrayArrayBuffer.lift(excludeCredentials),
43691
+ FfiConverterArrayString.lift(salts),
42474
43692
  { signal }
42475
43693
  );
42476
43694
  };
42477
- const uniffiHandleSuccess = (returnValue: PasskeyCredential) => {
43695
+ const uniffiHandleSuccess = (returnValue: CreatePasskeyOutput) => {
42478
43696
  uniffiFutureCallback.call(
42479
43697
  uniffiFutureCallback,
42480
43698
  uniffiCallbackData,
42481
43699
  /* UniffiForeignFutureStructRustBuffer */ {
42482
- returnValue: FfiConverterTypePasskeyCredential.lower(returnValue),
43700
+ returnValue: FfiConverterTypeCreatePasskeyOutput.lower(returnValue),
42483
43701
  callStatus: uniffiCaller.createCallStatus(),
42484
43702
  }
42485
43703
  );
@@ -48397,6 +49615,16 @@ const FfiConverterArrayArrayBuffer = new FfiConverterArray(
48397
49615
  FfiConverterArrayBuffer
48398
49616
  );
48399
49617
 
49618
+ // FfiConverter for Array<BatchRecipient>
49619
+ const FfiConverterArrayTypeBatchRecipient = new FfiConverterArray(
49620
+ FfiConverterTypeBatchRecipient
49621
+ );
49622
+
49623
+ // FfiConverter for Array<BatchTotal>
49624
+ const FfiConverterArrayTypeBatchTotal = new FfiConverterArray(
49625
+ FfiConverterTypeBatchTotal
49626
+ );
49627
+
48400
49628
  // FfiConverter for Array<Bip21Extra>
48401
49629
  const FfiConverterArrayTypeBip21Extra = new FfiConverterArray(
48402
49630
  FfiConverterTypeBip21Extra
@@ -48545,6 +49773,11 @@ const FfiConverterArrayTypeRecord = new FfiConverterArray(
48545
49773
  FfiConverterTypeRecord
48546
49774
  );
48547
49775
 
49776
+ // FfiConverter for Array<ResolvedBatchRecipient>
49777
+ const FfiConverterArrayTypeResolvedBatchRecipient = new FfiConverterArray(
49778
+ FfiConverterTypeResolvedBatchRecipient
49779
+ );
49780
+
48548
49781
  // FfiConverter for Array<SetLnurlMetadataItem>
48549
49782
  const FfiConverterArrayTypeSetLnurlMetadataItem = new FfiConverterArray(
48550
49783
  FfiConverterTypeSetLnurlMetadataItem
@@ -49013,6 +50246,14 @@ function uniffiEnsureInitialized() {
49013
50246
  'uniffi_breez_sdk_spark_checksum_method_breezsdk_authorize_lightning_address_transfer'
49014
50247
  );
49015
50248
  }
50249
+ if (
50250
+ nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_build_unsigned_batch_package() !==
50251
+ 52999
50252
+ ) {
50253
+ throw new UniffiInternalError.ApiChecksumMismatch(
50254
+ 'uniffi_breez_sdk_spark_checksum_method_breezsdk_build_unsigned_batch_package'
50255
+ );
50256
+ }
49016
50257
  if (
49017
50258
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_build_unsigned_lnurl_pay_package() !==
49018
50259
  23822
@@ -49261,6 +50502,14 @@ function uniffiEnsureInitialized() {
49261
50502
  'uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_lnurl_pay'
49262
50503
  );
49263
50504
  }
50505
+ if (
50506
+ nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_send_batch() !==
50507
+ 59347
50508
+ ) {
50509
+ throw new UniffiInternalError.ApiChecksumMismatch(
50510
+ 'uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_send_batch'
50511
+ );
50512
+ }
49264
50513
  if (
49265
50514
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_send_payment() !==
49266
50515
  34185
@@ -49349,6 +50598,14 @@ function uniffiEnsureInitialized() {
49349
50598
  'uniffi_breez_sdk_spark_checksum_method_breezsdk_remove_event_listener'
49350
50599
  );
49351
50600
  }
50601
+ if (
50602
+ nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_send_batch() !==
50603
+ 34563
50604
+ ) {
50605
+ throw new UniffiInternalError.ApiChecksumMismatch(
50606
+ 'uniffi_breez_sdk_spark_checksum_method_breezsdk_send_batch'
50607
+ );
50608
+ }
49352
50609
  if (
49353
50610
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment() !==
49354
50611
  54349
@@ -49679,7 +50936,7 @@ function uniffiEnsureInitialized() {
49679
50936
  }
49680
50937
  if (
49681
50938
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_passkeyclient_register() !==
49682
- 18330
50939
+ 27748
49683
50940
  ) {
49684
50941
  throw new UniffiInternalError.ApiChecksumMismatch(
49685
50942
  'uniffi_breez_sdk_spark_checksum_method_passkeyclient_register'
@@ -49743,7 +51000,7 @@ function uniffiEnsureInitialized() {
49743
51000
  }
49744
51001
  if (
49745
51002
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_prfprovider_create_passkey() !==
49746
- 1967
51003
+ 61235
49747
51004
  ) {
49748
51005
  throw new UniffiInternalError.ApiChecksumMismatch(
49749
51006
  'uniffi_breez_sdk_spark_checksum_method_prfprovider_create_passkey'
@@ -50273,6 +51530,9 @@ export default Object.freeze({
50273
51530
  FfiConverterTypeAssetFilter,
50274
51531
  FfiConverterTypeAuthorizeTransferRequest,
50275
51532
  FfiConverterTypeAutoOptimizationEvent,
51533
+ FfiConverterTypeBatchDestination,
51534
+ FfiConverterTypeBatchRecipient,
51535
+ FfiConverterTypeBatchTotal,
50276
51536
  FfiConverterTypeBip21Details,
50277
51537
  FfiConverterTypeBip21Extra,
50278
51538
  FfiConverterTypeBitcoinAddressDetails,
@@ -50290,6 +51550,7 @@ export default Object.freeze({
50290
51550
  FfiConverterTypeBolt12OfferDetails,
50291
51551
  FfiConverterTypeBreezSdk,
50292
51552
  FfiConverterTypeBuildTransferPackageOptions,
51553
+ FfiConverterTypeBuildUnsignedBatchPackageRequest,
50293
51554
  FfiConverterTypeBuildUnsignedLnurlPayPackageRequest,
50294
51555
  FfiConverterTypeBuildUnsignedTransferPackageRequest,
50295
51556
  FfiConverterTypeBurnIssuerTokenRequest,
@@ -50330,6 +51591,7 @@ export default Object.freeze({
50330
51591
  FfiConverterTypeCpfpInput,
50331
51592
  FfiConverterTypeCpfpSigner,
50332
51593
  FfiConverterTypeCreateIssuerTokenRequest,
51594
+ FfiConverterTypeCreatePasskeyOutput,
50333
51595
  FfiConverterTypeCredentials,
50334
51596
  FfiConverterTypeCrossChainAddressDetails,
50335
51597
  FfiConverterTypeCrossChainAddressFamily,
@@ -50467,6 +51729,8 @@ export default Object.freeze({
50467
51729
  FfiConverterTypePerBranchFunding,
50468
51730
  FfiConverterTypePrepareLnurlPayRequest,
50469
51731
  FfiConverterTypePrepareLnurlPayResponse,
51732
+ FfiConverterTypePrepareSendBatchRequest,
51733
+ FfiConverterTypePrepareSendBatchResponse,
50470
51734
  FfiConverterTypePrepareSendPaymentRequest,
50471
51735
  FfiConverterTypePrepareSendPaymentResponse,
50472
51736
  FfiConverterTypePrepareUnilateralExitRequest,
@@ -50498,6 +51762,7 @@ export default Object.freeze({
50498
51762
  FfiConverterTypeRegisterResponse,
50499
51763
  FfiConverterTypeRegisterWebhookRequest,
50500
51764
  FfiConverterTypeRegisterWebhookResponse,
51765
+ FfiConverterTypeResolvedBatchRecipient,
50501
51766
  FfiConverterTypeResolvedStores,
50502
51767
  FfiConverterTypeRestClient,
50503
51768
  FfiConverterTypeRestResponse,
@@ -50509,6 +51774,8 @@ export default Object.freeze({
50509
51774
  FfiConverterTypeSdkEvent,
50510
51775
  FfiConverterTypeSecretBytes,
50511
51776
  FfiConverterTypeSeed,
51777
+ FfiConverterTypeSendBatchRequest,
51778
+ FfiConverterTypeSendBatchResponse,
50512
51779
  FfiConverterTypeSendOnchainFeeQuote,
50513
51780
  FfiConverterTypeSendOnchainSpeedFeeQuote,
50514
51781
  FfiConverterTypeSendPaymentMethod,