@bennyblader/ddk-rn 0.2.2 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +1 -0
- package/cpp/bennyblader-ddk-rn.cpp +1 -1
- package/cpp/ddk_ffi.cpp +36 -0
- package/cpp/ddk_ffi.hpp +2 -0
- package/lib/commonjs/ddk_ffi-ffi.js.map +1 -1
- package/lib/commonjs/ddk_ffi.js +47 -47
- 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 +47 -48
- 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 +3 -2
- 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 +3 -2
- package/lib/typescript/module/src/ddk_ffi.d.ts.map +1 -1
- package/package.json +4 -3
- package/react-native.config.js +13 -0
- package/scripts/postinstall.js +193 -174
- package/src/ddk_ffi-ffi.ts +199 -49
- package/src/ddk_ffi.ts +1509 -1303
- package/ubrn.config.yaml +23 -0
package/android/build.gradle
CHANGED
|
@@ -133,6 +133,7 @@ dependencies {
|
|
|
133
133
|
//noinspection GradleDynamicVersion
|
|
134
134
|
implementation "com.facebook.react:react-native:+"
|
|
135
135
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
136
|
+
implementation "net.java.dev.jna:jna:5.17.0@aar"
|
|
136
137
|
}
|
|
137
138
|
|
|
138
139
|
if (isNewArchitectureEnabled()) {
|
package/cpp/ddk_ffi.cpp
CHANGED
|
@@ -221,6 +221,8 @@ extern "C" {
|
|
|
221
221
|
RustBuffer output,
|
|
222
222
|
RustCallStatus *uniffi_out_err
|
|
223
223
|
);
|
|
224
|
+
RustBuffer uniffi_ddk_ffi_fn_func_plz_work(RustCallStatus *uniffi_out_err
|
|
225
|
+
);
|
|
224
226
|
RustBuffer uniffi_ddk_ffi_fn_func_sign_fund_transaction_input(
|
|
225
227
|
RustBuffer fund_transaction,
|
|
226
228
|
RustBuffer privkey,
|
|
@@ -474,6 +476,8 @@ extern "C" {
|
|
|
474
476
|
);
|
|
475
477
|
uint16_t uniffi_ddk_ffi_checksum_func_is_dust_output(
|
|
476
478
|
);
|
|
479
|
+
uint16_t uniffi_ddk_ffi_checksum_func_plz_work(
|
|
480
|
+
);
|
|
477
481
|
uint16_t uniffi_ddk_ffi_checksum_func_sign_fund_transaction_input(
|
|
478
482
|
);
|
|
479
483
|
uint16_t uniffi_ddk_ffi_checksum_func_verify_fund_tx_signature(
|
|
@@ -2112,6 +2116,14 @@ NativeDdkFfi::NativeDdkFfi(
|
|
|
2112
2116
|
return this->cpp_uniffi_ddk_ffi_fn_func_is_dust_output(rt, thisVal, args, count);
|
|
2113
2117
|
}
|
|
2114
2118
|
);
|
|
2119
|
+
props["ubrn_uniffi_ddk_ffi_fn_func_plz_work"] = jsi::Function::createFromHostFunction(
|
|
2120
|
+
rt,
|
|
2121
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_ddk_ffi_fn_func_plz_work"),
|
|
2122
|
+
0,
|
|
2123
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2124
|
+
return this->cpp_uniffi_ddk_ffi_fn_func_plz_work(rt, thisVal, args, count);
|
|
2125
|
+
}
|
|
2126
|
+
);
|
|
2115
2127
|
props["ubrn_uniffi_ddk_ffi_fn_func_sign_fund_transaction_input"] = jsi::Function::createFromHostFunction(
|
|
2116
2128
|
rt,
|
|
2117
2129
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_ddk_ffi_fn_func_sign_fund_transaction_input"),
|
|
@@ -2224,6 +2236,14 @@ NativeDdkFfi::NativeDdkFfi(
|
|
|
2224
2236
|
return this->cpp_uniffi_ddk_ffi_checksum_func_is_dust_output(rt, thisVal, args, count);
|
|
2225
2237
|
}
|
|
2226
2238
|
);
|
|
2239
|
+
props["ubrn_uniffi_ddk_ffi_checksum_func_plz_work"] = jsi::Function::createFromHostFunction(
|
|
2240
|
+
rt,
|
|
2241
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_ddk_ffi_checksum_func_plz_work"),
|
|
2242
|
+
0,
|
|
2243
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2244
|
+
return this->cpp_uniffi_ddk_ffi_checksum_func_plz_work(rt, thisVal, args, count);
|
|
2245
|
+
}
|
|
2246
|
+
);
|
|
2227
2247
|
props["ubrn_uniffi_ddk_ffi_checksum_func_sign_fund_transaction_input"] = jsi::Function::createFromHostFunction(
|
|
2228
2248
|
rt,
|
|
2229
2249
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_ddk_ffi_checksum_func_sign_fund_transaction_input"),
|
|
@@ -2421,6 +2441,15 @@ jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_fn_func_is_dust_output(jsi::Runtime&
|
|
|
2421
2441
|
|
|
2422
2442
|
return uniffi_jsi::Bridging<int8_t>::toJs(rt, callInvoker, value);
|
|
2423
2443
|
}
|
|
2444
|
+
jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_fn_func_plz_work(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2445
|
+
RustCallStatus status = uniffi::ddk_ffi::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
2446
|
+
auto value = uniffi_ddk_ffi_fn_func_plz_work(&status
|
|
2447
|
+
);
|
|
2448
|
+
uniffi::ddk_ffi::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
2449
|
+
|
|
2450
|
+
|
|
2451
|
+
return uniffi::ddk_ffi::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
2452
|
+
}
|
|
2424
2453
|
jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_fn_func_sign_fund_transaction_input(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2425
2454
|
RustCallStatus status = uniffi::ddk_ffi::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
2426
2455
|
auto value = uniffi_ddk_ffi_fn_func_sign_fund_transaction_input(uniffi::ddk_ffi::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]), uniffi::ddk_ffi::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]), uniffi::ddk_ffi::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[2]), uniffi_jsi::Bridging<uint32_t>::fromJs(rt, callInvoker, args[3]), uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[4]),
|
|
@@ -2525,6 +2554,13 @@ jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_checksum_func_is_dust_output(jsi::Ru
|
|
|
2525
2554
|
);
|
|
2526
2555
|
|
|
2527
2556
|
|
|
2557
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
2558
|
+
}
|
|
2559
|
+
jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_checksum_func_plz_work(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2560
|
+
auto value = uniffi_ddk_ffi_checksum_func_plz_work(
|
|
2561
|
+
);
|
|
2562
|
+
|
|
2563
|
+
|
|
2528
2564
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
2529
2565
|
}
|
|
2530
2566
|
jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_checksum_func_sign_fund_transaction_input(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
package/cpp/ddk_ffi.hpp
CHANGED
|
@@ -32,6 +32,7 @@ class NativeDdkFfi : public jsi::HostObject {
|
|
|
32
32
|
jsi::Value cpp_uniffi_ddk_ffi_fn_func_get_raw_funding_transaction_input_signature(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
33
33
|
jsi::Value cpp_uniffi_ddk_ffi_fn_func_get_total_input_vsize(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
34
34
|
jsi::Value cpp_uniffi_ddk_ffi_fn_func_is_dust_output(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
35
|
+
jsi::Value cpp_uniffi_ddk_ffi_fn_func_plz_work(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
35
36
|
jsi::Value cpp_uniffi_ddk_ffi_fn_func_sign_fund_transaction_input(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
36
37
|
jsi::Value cpp_uniffi_ddk_ffi_fn_func_verify_fund_tx_signature(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
37
38
|
jsi::Value cpp_uniffi_ddk_ffi_fn_func_version(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
@@ -46,6 +47,7 @@ class NativeDdkFfi : public jsi::HostObject {
|
|
|
46
47
|
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_get_raw_funding_transaction_input_signature(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
47
48
|
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_get_total_input_vsize(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
48
49
|
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_is_dust_output(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
50
|
+
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_plz_work(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
49
51
|
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_sign_fund_transaction_input(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
50
52
|
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_verify_fund_tx_signature(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
51
53
|
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_version(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getter","globalThis","NativeDdkFfi","_default","exports","default","isRustFutureContinuationCallbackTypeCompatible","isUniffiForeignFutureTypeCompatible"],"sourceRoot":"../../src","sources":["ddk_ffi-ffi.ts"],"mappings":";;;;;;AAAA;AACA;;
|
|
1
|
+
{"version":3,"names":["getter","globalThis","NativeDdkFfi","_default","exports","default","isRustFutureContinuationCallbackTypeCompatible","isUniffiForeignFutureTypeCompatible"],"sourceRoot":"../../src","sources":["ddk_ffi-ffi.ts"],"mappings":";;;;;;AAAA;AACA;;AAyJA;AACA;AACA;AACA;AACA;AACA,MAAMA,MAAmC,GAAGA,CAAA,KACzCC,UAAU,CAASC,YAAY;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GACpBL,MAAM,EAErB;AAmHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMM,8CAGL,GAAG,IAAI;AACR,MAAMC,mCAGL,GAAG,IAAI","ignoreList":[]}
|
package/lib/commonjs/ddk_ffi.js
CHANGED
|
@@ -16,6 +16,7 @@ exports.getChangeOutputAndFees = getChangeOutputAndFees;
|
|
|
16
16
|
exports.getRawFundingTransactionInputSignature = getRawFundingTransactionInputSignature;
|
|
17
17
|
exports.getTotalInputVsize = getTotalInputVsize;
|
|
18
18
|
exports.isDustOutput = isDustOutput;
|
|
19
|
+
exports.plzWork = plzWork;
|
|
19
20
|
exports.signFundTransactionInput = signFundTransactionInput;
|
|
20
21
|
exports.verifyFundTxSignature = verifyFundTxSignature;
|
|
21
22
|
exports.version = version;
|
|
@@ -31,9 +32,9 @@ const uniffiCaller = new _uniffiBindgenReactNative.UniffiRustCaller(() => ({
|
|
|
31
32
|
}));
|
|
32
33
|
const uniffiIsDebug =
|
|
33
34
|
// @ts-ignore -- The process global might not be defined
|
|
34
|
-
typeof process !==
|
|
35
|
+
typeof process !== 'object' ||
|
|
35
36
|
// @ts-ignore -- The process global might not be defined
|
|
36
|
-
process?.env?.NODE_ENV !==
|
|
37
|
+
process?.env?.NODE_ENV !== 'production' || true;
|
|
37
38
|
// Public interface members begin here.
|
|
38
39
|
|
|
39
40
|
function createCet(localOutput, localPayoutSerialId, remoteOutput, remotePayoutSerialId, fundTxId, fundVout, lockTime) /*throws*/{
|
|
@@ -124,6 +125,14 @@ function isDustOutput(output) {
|
|
|
124
125
|
})()(FfiConverterTypeTxOutput.lower(output), callStatus);
|
|
125
126
|
}, /*liftString:*/FfiConverterString.lift));
|
|
126
127
|
}
|
|
128
|
+
function plzWork() {
|
|
129
|
+
return FfiConverterString.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
130
|
+
return (() => {
|
|
131
|
+
console.debug(`-- uniffi_ddk_ffi_fn_func_plz_work`);
|
|
132
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_plz_work;
|
|
133
|
+
})()(callStatus);
|
|
134
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
135
|
+
}
|
|
127
136
|
function signFundTransactionInput(fundTransaction, privkey, prevTxId, prevTxVout, value) /*throws*/{
|
|
128
137
|
return FfiConverterTypeTransaction.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
129
138
|
return (() => {
|
|
@@ -189,7 +198,6 @@ const FfiConverterTypeAdaptorSignature = (() => {
|
|
|
189
198
|
return FfiConverterArrayUInt8.allocationSize(value.signature) + FfiConverterArrayUInt8.allocationSize(value.proof);
|
|
190
199
|
}
|
|
191
200
|
}
|
|
192
|
-
;
|
|
193
201
|
return new FFIConverter();
|
|
194
202
|
})();
|
|
195
203
|
/**
|
|
@@ -235,7 +243,6 @@ const FfiConverterTypeChangeOutputAndFees = (() => {
|
|
|
235
243
|
return FfiConverterTypeTxOutput.allocationSize(value.changeOutput) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.fundFee) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.cetFee);
|
|
236
244
|
}
|
|
237
245
|
}
|
|
238
|
-
;
|
|
239
246
|
return new FFIConverter();
|
|
240
247
|
})();
|
|
241
248
|
/**
|
|
@@ -291,7 +298,6 @@ const FfiConverterTypeDlcInputInfo = (() => {
|
|
|
291
298
|
return FfiConverterTypeTransaction.allocationSize(value.fundTx) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.fundVout) + FfiConverterArrayUInt8.allocationSize(value.localFundPubkey) + FfiConverterArrayUInt8.allocationSize(value.remoteFundPubkey) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.fundAmount) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.maxWitnessLen) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.inputSerialId) + FfiConverterArrayUInt8.allocationSize(value.contractId);
|
|
292
299
|
}
|
|
293
300
|
}
|
|
294
|
-
;
|
|
295
301
|
return new FFIConverter();
|
|
296
302
|
})();
|
|
297
303
|
/**
|
|
@@ -335,7 +341,6 @@ const FfiConverterTypeDlcOutcome = (() => {
|
|
|
335
341
|
return _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.localPayout) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.remotePayout);
|
|
336
342
|
}
|
|
337
343
|
}
|
|
338
|
-
;
|
|
339
344
|
return new FFIConverter();
|
|
340
345
|
})();
|
|
341
346
|
/**
|
|
@@ -383,7 +388,6 @@ const FfiConverterTypeDlcTransactions = (() => {
|
|
|
383
388
|
return FfiConverterTypeTransaction.allocationSize(value.fund) + FfiConverterArrayTypeTransaction.allocationSize(value.cets) + FfiConverterTypeTransaction.allocationSize(value.refund) + FfiConverterArrayUInt8.allocationSize(value.fundingScriptPubkey);
|
|
384
389
|
}
|
|
385
390
|
}
|
|
386
|
-
;
|
|
387
391
|
return new FFIConverter();
|
|
388
392
|
})();
|
|
389
393
|
/**
|
|
@@ -427,7 +431,6 @@ const FfiConverterTypeOracleInfo = (() => {
|
|
|
427
431
|
return FfiConverterArrayUInt8.allocationSize(value.publicKey) + FfiConverterArrayArrayUInt8.allocationSize(value.nonces);
|
|
428
432
|
}
|
|
429
433
|
}
|
|
430
|
-
;
|
|
431
434
|
return new FFIConverter();
|
|
432
435
|
})();
|
|
433
436
|
/**
|
|
@@ -485,7 +488,6 @@ const FfiConverterTypePartyParams = (() => {
|
|
|
485
488
|
return FfiConverterArrayUInt8.allocationSize(value.fundPubkey) + FfiConverterArrayUInt8.allocationSize(value.changeScriptPubkey) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.changeSerialId) + FfiConverterArrayUInt8.allocationSize(value.payoutScriptPubkey) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.payoutSerialId) + FfiConverterArrayTypeTxInputInfo.allocationSize(value.inputs) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.inputAmount) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.collateral) + FfiConverterArrayTypeDlcInputInfo.allocationSize(value.dlcInputs);
|
|
486
489
|
}
|
|
487
490
|
}
|
|
488
|
-
;
|
|
489
491
|
return new FFIConverter();
|
|
490
492
|
})();
|
|
491
493
|
/**
|
|
@@ -529,7 +531,6 @@ const FfiConverterTypePayout = (() => {
|
|
|
529
531
|
return _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.offer) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.accept);
|
|
530
532
|
}
|
|
531
533
|
}
|
|
532
|
-
;
|
|
533
534
|
return new FFIConverter();
|
|
534
535
|
})();
|
|
535
536
|
/**
|
|
@@ -579,7 +580,6 @@ const FfiConverterTypeTransaction = (() => {
|
|
|
579
580
|
return _uniffiBindgenReactNative.FfiConverterInt32.allocationSize(value.version) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.lockTime) + FfiConverterArrayTypeTxInput.allocationSize(value.inputs) + FfiConverterArrayTypeTxOutput.allocationSize(value.outputs) + FfiConverterArrayUInt8.allocationSize(value.rawBytes);
|
|
580
581
|
}
|
|
581
582
|
}
|
|
582
|
-
;
|
|
583
583
|
return new FFIConverter();
|
|
584
584
|
})();
|
|
585
585
|
/**
|
|
@@ -629,7 +629,6 @@ const FfiConverterTypeTxInput = (() => {
|
|
|
629
629
|
return FfiConverterString.allocationSize(value.txid) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.vout) + FfiConverterArrayUInt8.allocationSize(value.scriptSig) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.sequence) + FfiConverterArrayArrayUInt8.allocationSize(value.witness);
|
|
630
630
|
}
|
|
631
631
|
}
|
|
632
|
-
;
|
|
633
632
|
return new FFIConverter();
|
|
634
633
|
})();
|
|
635
634
|
/**
|
|
@@ -679,7 +678,6 @@ const FfiConverterTypeTxInputInfo = (() => {
|
|
|
679
678
|
return FfiConverterString.allocationSize(value.txid) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.vout) + FfiConverterArrayUInt8.allocationSize(value.scriptSig) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.maxWitnessLength) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.serialId);
|
|
680
679
|
}
|
|
681
680
|
}
|
|
682
|
-
;
|
|
683
681
|
return new FFIConverter();
|
|
684
682
|
})();
|
|
685
683
|
/**
|
|
@@ -723,7 +721,6 @@ const FfiConverterTypeTxOutput = (() => {
|
|
|
723
721
|
return _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.value) + FfiConverterArrayUInt8.allocationSize(value.scriptPubkey);
|
|
724
722
|
}
|
|
725
723
|
}
|
|
726
|
-
;
|
|
727
724
|
return new FFIConverter();
|
|
728
725
|
})();
|
|
729
726
|
const stringConverter = {
|
|
@@ -752,7 +749,7 @@ const DlcError = exports.DlcError = (() => {
|
|
|
752
749
|
* @private
|
|
753
750
|
* This field is private and should not be used.
|
|
754
751
|
*/
|
|
755
|
-
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] =
|
|
752
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'DlcError';
|
|
756
753
|
/**
|
|
757
754
|
* @private
|
|
758
755
|
* This field is private and should not be used.
|
|
@@ -760,7 +757,7 @@ const DlcError = exports.DlcError = (() => {
|
|
|
760
757
|
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 1;
|
|
761
758
|
tag = DlcError_Tags.InvalidSignature;
|
|
762
759
|
constructor(message) {
|
|
763
|
-
super(
|
|
760
|
+
super('DlcError', 'InvalidSignature', message);
|
|
764
761
|
}
|
|
765
762
|
static instanceOf(e) {
|
|
766
763
|
return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 1;
|
|
@@ -771,7 +768,7 @@ const DlcError = exports.DlcError = (() => {
|
|
|
771
768
|
* @private
|
|
772
769
|
* This field is private and should not be used.
|
|
773
770
|
*/
|
|
774
|
-
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] =
|
|
771
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'DlcError';
|
|
775
772
|
/**
|
|
776
773
|
* @private
|
|
777
774
|
* This field is private and should not be used.
|
|
@@ -779,7 +776,7 @@ const DlcError = exports.DlcError = (() => {
|
|
|
779
776
|
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 2;
|
|
780
777
|
tag = DlcError_Tags.InvalidPublicKey;
|
|
781
778
|
constructor(message) {
|
|
782
|
-
super(
|
|
779
|
+
super('DlcError', 'InvalidPublicKey', message);
|
|
783
780
|
}
|
|
784
781
|
static instanceOf(e) {
|
|
785
782
|
return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 2;
|
|
@@ -790,7 +787,7 @@ const DlcError = exports.DlcError = (() => {
|
|
|
790
787
|
* @private
|
|
791
788
|
* This field is private and should not be used.
|
|
792
789
|
*/
|
|
793
|
-
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] =
|
|
790
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'DlcError';
|
|
794
791
|
/**
|
|
795
792
|
* @private
|
|
796
793
|
* This field is private and should not be used.
|
|
@@ -798,7 +795,7 @@ const DlcError = exports.DlcError = (() => {
|
|
|
798
795
|
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 3;
|
|
799
796
|
tag = DlcError_Tags.InvalidTransaction;
|
|
800
797
|
constructor(message) {
|
|
801
|
-
super(
|
|
798
|
+
super('DlcError', 'InvalidTransaction', message);
|
|
802
799
|
}
|
|
803
800
|
static instanceOf(e) {
|
|
804
801
|
return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 3;
|
|
@@ -809,7 +806,7 @@ const DlcError = exports.DlcError = (() => {
|
|
|
809
806
|
* @private
|
|
810
807
|
* This field is private and should not be used.
|
|
811
808
|
*/
|
|
812
|
-
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] =
|
|
809
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'DlcError';
|
|
813
810
|
/**
|
|
814
811
|
* @private
|
|
815
812
|
* This field is private and should not be used.
|
|
@@ -817,7 +814,7 @@ const DlcError = exports.DlcError = (() => {
|
|
|
817
814
|
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 4;
|
|
818
815
|
tag = DlcError_Tags.InsufficientFunds;
|
|
819
816
|
constructor(message) {
|
|
820
|
-
super(
|
|
817
|
+
super('DlcError', 'InsufficientFunds', message);
|
|
821
818
|
}
|
|
822
819
|
static instanceOf(e) {
|
|
823
820
|
return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 4;
|
|
@@ -828,7 +825,7 @@ const DlcError = exports.DlcError = (() => {
|
|
|
828
825
|
* @private
|
|
829
826
|
* This field is private and should not be used.
|
|
830
827
|
*/
|
|
831
|
-
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] =
|
|
828
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'DlcError';
|
|
832
829
|
/**
|
|
833
830
|
* @private
|
|
834
831
|
* This field is private and should not be used.
|
|
@@ -836,7 +833,7 @@ const DlcError = exports.DlcError = (() => {
|
|
|
836
833
|
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 5;
|
|
837
834
|
tag = DlcError_Tags.InvalidArgument;
|
|
838
835
|
constructor(message) {
|
|
839
|
-
super(
|
|
836
|
+
super('DlcError', 'InvalidArgument', message);
|
|
840
837
|
}
|
|
841
838
|
static instanceOf(e) {
|
|
842
839
|
return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 5;
|
|
@@ -847,7 +844,7 @@ const DlcError = exports.DlcError = (() => {
|
|
|
847
844
|
* @private
|
|
848
845
|
* This field is private and should not be used.
|
|
849
846
|
*/
|
|
850
|
-
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] =
|
|
847
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'DlcError';
|
|
851
848
|
/**
|
|
852
849
|
* @private
|
|
853
850
|
* This field is private and should not be used.
|
|
@@ -855,7 +852,7 @@ const DlcError = exports.DlcError = (() => {
|
|
|
855
852
|
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 6;
|
|
856
853
|
tag = DlcError_Tags.SerializationError;
|
|
857
854
|
constructor(message) {
|
|
858
|
-
super(
|
|
855
|
+
super('DlcError', 'SerializationError', message);
|
|
859
856
|
}
|
|
860
857
|
static instanceOf(e) {
|
|
861
858
|
return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 6;
|
|
@@ -866,7 +863,7 @@ const DlcError = exports.DlcError = (() => {
|
|
|
866
863
|
* @private
|
|
867
864
|
* This field is private and should not be used.
|
|
868
865
|
*/
|
|
869
|
-
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] =
|
|
866
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'DlcError';
|
|
870
867
|
/**
|
|
871
868
|
* @private
|
|
872
869
|
* This field is private and should not be used.
|
|
@@ -874,7 +871,7 @@ const DlcError = exports.DlcError = (() => {
|
|
|
874
871
|
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 7;
|
|
875
872
|
tag = DlcError_Tags.Secp256k1Error;
|
|
876
873
|
constructor(message) {
|
|
877
|
-
super(
|
|
874
|
+
super('DlcError', 'Secp256k1Error', message);
|
|
878
875
|
}
|
|
879
876
|
static instanceOf(e) {
|
|
880
877
|
return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 7;
|
|
@@ -885,7 +882,7 @@ const DlcError = exports.DlcError = (() => {
|
|
|
885
882
|
* @private
|
|
886
883
|
* This field is private and should not be used.
|
|
887
884
|
*/
|
|
888
|
-
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] =
|
|
885
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'DlcError';
|
|
889
886
|
/**
|
|
890
887
|
* @private
|
|
891
888
|
* This field is private and should not be used.
|
|
@@ -893,7 +890,7 @@ const DlcError = exports.DlcError = (() => {
|
|
|
893
890
|
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 8;
|
|
894
891
|
tag = DlcError_Tags.MiniscriptError;
|
|
895
892
|
constructor(message) {
|
|
896
|
-
super(
|
|
893
|
+
super('DlcError', 'MiniscriptError', message);
|
|
897
894
|
}
|
|
898
895
|
static instanceOf(e) {
|
|
899
896
|
return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 8;
|
|
@@ -904,7 +901,7 @@ const DlcError = exports.DlcError = (() => {
|
|
|
904
901
|
* @private
|
|
905
902
|
* This field is private and should not be used.
|
|
906
903
|
*/
|
|
907
|
-
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] =
|
|
904
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'DlcError';
|
|
908
905
|
/**
|
|
909
906
|
* @private
|
|
910
907
|
* This field is private and should not be used.
|
|
@@ -912,7 +909,7 @@ const DlcError = exports.DlcError = (() => {
|
|
|
912
909
|
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 9;
|
|
913
910
|
tag = DlcError_Tags.NetworkError;
|
|
914
911
|
constructor(message) {
|
|
915
|
-
super(
|
|
912
|
+
super('DlcError', 'NetworkError', message);
|
|
916
913
|
}
|
|
917
914
|
static instanceOf(e) {
|
|
918
915
|
return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 9;
|
|
@@ -921,7 +918,7 @@ const DlcError = exports.DlcError = (() => {
|
|
|
921
918
|
|
|
922
919
|
// Utility function which does not rely on instanceof.
|
|
923
920
|
function instanceOf(e) {
|
|
924
|
-
return e[_uniffiBindgenReactNative.uniffiTypeNameSymbol] ===
|
|
921
|
+
return e[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === 'DlcError';
|
|
925
922
|
}
|
|
926
923
|
return {
|
|
927
924
|
InvalidSignature,
|
|
@@ -1021,46 +1018,49 @@ function uniffiEnsureInitialized() {
|
|
|
1021
1018
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ContractVersionMismatch(scaffoldingContractVersion, bindingsContractVersion);
|
|
1022
1019
|
}
|
|
1023
1020
|
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_create_cet() !== 23081) {
|
|
1024
|
-
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch(
|
|
1021
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_create_cet');
|
|
1025
1022
|
}
|
|
1026
1023
|
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_create_cet_adaptor_signature_from_oracle_info() !== 65174) {
|
|
1027
|
-
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch(
|
|
1024
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_create_cet_adaptor_signature_from_oracle_info');
|
|
1028
1025
|
}
|
|
1029
1026
|
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_create_cets() !== 45293) {
|
|
1030
|
-
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch(
|
|
1027
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_create_cets');
|
|
1031
1028
|
}
|
|
1032
1029
|
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_create_dlc_transactions() !== 9500) {
|
|
1033
|
-
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch(
|
|
1030
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_create_dlc_transactions');
|
|
1034
1031
|
}
|
|
1035
1032
|
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_create_fund_tx_locking_script() !== 2761) {
|
|
1036
|
-
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch(
|
|
1033
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_create_fund_tx_locking_script');
|
|
1037
1034
|
}
|
|
1038
1035
|
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_create_refund_transaction() !== 57261) {
|
|
1039
|
-
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch(
|
|
1036
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_create_refund_transaction');
|
|
1040
1037
|
}
|
|
1041
1038
|
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_create_spliced_dlc_transactions() !== 51059) {
|
|
1042
|
-
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch(
|
|
1039
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_create_spliced_dlc_transactions');
|
|
1043
1040
|
}
|
|
1044
1041
|
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_get_change_output_and_fees() !== 44150) {
|
|
1045
|
-
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch(
|
|
1042
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_get_change_output_and_fees');
|
|
1046
1043
|
}
|
|
1047
1044
|
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_get_raw_funding_transaction_input_signature() !== 35708) {
|
|
1048
|
-
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch(
|
|
1045
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_get_raw_funding_transaction_input_signature');
|
|
1049
1046
|
}
|
|
1050
1047
|
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_get_total_input_vsize() !== 38213) {
|
|
1051
|
-
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch(
|
|
1048
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_get_total_input_vsize');
|
|
1052
1049
|
}
|
|
1053
1050
|
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_is_dust_output() !== 64174) {
|
|
1054
|
-
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch(
|
|
1051
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_is_dust_output');
|
|
1052
|
+
}
|
|
1053
|
+
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_plz_work() !== 32972) {
|
|
1054
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_plz_work');
|
|
1055
1055
|
}
|
|
1056
1056
|
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_sign_fund_transaction_input() !== 50531) {
|
|
1057
|
-
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch(
|
|
1057
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_sign_fund_transaction_input');
|
|
1058
1058
|
}
|
|
1059
1059
|
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_verify_fund_tx_signature() !== 27316) {
|
|
1060
|
-
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch(
|
|
1060
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_verify_fund_tx_signature');
|
|
1061
1061
|
}
|
|
1062
1062
|
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_version() !== 22317) {
|
|
1063
|
-
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch(
|
|
1063
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_version');
|
|
1064
1064
|
}
|
|
1065
1065
|
}
|
|
1066
1066
|
var _default = exports.default = Object.freeze({
|