@bennyblader/ddk-rn 0.3.33 → 0.3.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cpp/ddk_ffi.cpp +43 -0
- package/cpp/ddk_ffi.hpp +2 -0
- package/ddk-ffi/Cargo.lock +1 -1
- package/ddk-ffi/Cargo.toml +2 -2
- package/ddk-ffi/src/ddk_ffi.udl +9 -0
- package/ddk-ffi/src/lib.rs +57 -0
- package/lib/commonjs/ddk_ffi-ffi.js.map +1 -1
- package/lib/commonjs/ddk_ffi.js +12 -0
- package/lib/commonjs/ddk_ffi.js.map +1 -1
- package/lib/module/ddk_ffi-ffi.js.map +1 -1
- package/lib/module/ddk_ffi.js +11 -0
- package/lib/module/ddk_ffi.js.map +1 -1
- package/lib/typescript/commonjs/src/ddk_ffi-ffi.d.ts +2 -0
- package/lib/typescript/commonjs/src/ddk_ffi-ffi.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ddk_ffi.d.ts +1 -0
- package/lib/typescript/commonjs/src/ddk_ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/ddk_ffi-ffi.d.ts +2 -0
- package/lib/typescript/module/src/ddk_ffi-ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/ddk_ffi.d.ts +1 -0
- package/lib/typescript/module/src/ddk_ffi.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/ddk_ffi-ffi.ts +9 -0
- package/src/ddk_ffi.ts +40 -0
package/src/ddk_ffi-ffi.ts
CHANGED
|
@@ -68,6 +68,14 @@ interface NativeModuleInterface {
|
|
|
68
68
|
msgs: Uint8Array,
|
|
69
69
|
uniffi_out_err: UniffiRustCallStatus
|
|
70
70
|
): Uint8Array;
|
|
71
|
+
ubrn_uniffi_ddk_ffi_fn_func_create_cet_adaptor_sigs_from_points(
|
|
72
|
+
cets: Uint8Array,
|
|
73
|
+
adaptorPoints: Uint8Array,
|
|
74
|
+
fundingSecretKey: Uint8Array,
|
|
75
|
+
fundingScriptPubkey: Uint8Array,
|
|
76
|
+
fundOutputValue: bigint,
|
|
77
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
78
|
+
): Uint8Array;
|
|
71
79
|
ubrn_uniffi_ddk_ffi_fn_func_create_cets(
|
|
72
80
|
fundTxId: Uint8Array,
|
|
73
81
|
fundVout: number,
|
|
@@ -246,6 +254,7 @@ interface NativeModuleInterface {
|
|
|
246
254
|
ubrn_uniffi_ddk_ffi_checksum_func_create_cet_adaptor_points_from_oracle_info(): number;
|
|
247
255
|
ubrn_uniffi_ddk_ffi_checksum_func_create_cet_adaptor_signature_from_oracle_info(): number;
|
|
248
256
|
ubrn_uniffi_ddk_ffi_checksum_func_create_cet_adaptor_sigs_from_oracle_info(): number;
|
|
257
|
+
ubrn_uniffi_ddk_ffi_checksum_func_create_cet_adaptor_sigs_from_points(): number;
|
|
249
258
|
ubrn_uniffi_ddk_ffi_checksum_func_create_cets(): number;
|
|
250
259
|
ubrn_uniffi_ddk_ffi_checksum_func_create_dlc_transactions(): number;
|
|
251
260
|
ubrn_uniffi_ddk_ffi_checksum_func_create_extkey_from_parent_path(): number;
|
package/src/ddk_ffi.ts
CHANGED
|
@@ -242,6 +242,38 @@ export function createCetAdaptorSigsFromOracleInfo(
|
|
|
242
242
|
)
|
|
243
243
|
);
|
|
244
244
|
}
|
|
245
|
+
export function createCetAdaptorSigsFromPoints(
|
|
246
|
+
cets: Array<Transaction>,
|
|
247
|
+
adaptorPoints: Array<Array</*u8*/ number>>,
|
|
248
|
+
fundingSecretKey: Array</*u8*/ number>,
|
|
249
|
+
fundingScriptPubkey: Array</*u8*/ number>,
|
|
250
|
+
fundOutputValue: /*u64*/ bigint
|
|
251
|
+
): Array<AdaptorSignature> /*throws*/ {
|
|
252
|
+
return FfiConverterArrayTypeAdaptorSignature.lift(
|
|
253
|
+
uniffiCaller.rustCallWithError(
|
|
254
|
+
/*liftError:*/ FfiConverterTypeDLCError.lift.bind(
|
|
255
|
+
FfiConverterTypeDLCError
|
|
256
|
+
),
|
|
257
|
+
/*caller:*/ (callStatus) => {
|
|
258
|
+
return (() => {
|
|
259
|
+
console.debug(
|
|
260
|
+
`-- uniffi_ddk_ffi_fn_func_create_cet_adaptor_sigs_from_points`
|
|
261
|
+
);
|
|
262
|
+
return nativeModule()
|
|
263
|
+
.ubrn_uniffi_ddk_ffi_fn_func_create_cet_adaptor_sigs_from_points;
|
|
264
|
+
})()(
|
|
265
|
+
FfiConverterArrayTypeTransaction.lower(cets),
|
|
266
|
+
FfiConverterArrayArrayUInt8.lower(adaptorPoints),
|
|
267
|
+
FfiConverterArrayUInt8.lower(fundingSecretKey),
|
|
268
|
+
FfiConverterArrayUInt8.lower(fundingScriptPubkey),
|
|
269
|
+
FfiConverterUInt64.lower(fundOutputValue),
|
|
270
|
+
callStatus
|
|
271
|
+
);
|
|
272
|
+
},
|
|
273
|
+
/*liftString:*/ FfiConverterString.lift
|
|
274
|
+
)
|
|
275
|
+
);
|
|
276
|
+
}
|
|
245
277
|
export function createCets(
|
|
246
278
|
fundTxId: string,
|
|
247
279
|
fundVout: /*u32*/ number,
|
|
@@ -2338,6 +2370,14 @@ function uniffiEnsureInitialized() {
|
|
|
2338
2370
|
'uniffi_ddk_ffi_checksum_func_create_cet_adaptor_sigs_from_oracle_info'
|
|
2339
2371
|
);
|
|
2340
2372
|
}
|
|
2373
|
+
if (
|
|
2374
|
+
nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_create_cet_adaptor_sigs_from_points() !==
|
|
2375
|
+
33705
|
|
2376
|
+
) {
|
|
2377
|
+
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
2378
|
+
'uniffi_ddk_ffi_checksum_func_create_cet_adaptor_sigs_from_points'
|
|
2379
|
+
);
|
|
2380
|
+
}
|
|
2341
2381
|
if (
|
|
2342
2382
|
nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_create_cets() !== 50529
|
|
2343
2383
|
) {
|