@bennyblader/ddk-rn 0.3.42 → 0.4.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.
- package/DdkRn.podspec +1 -1
- package/README.md +14 -0
- package/android/CMakeLists.txt +6 -3
- package/android/build.gradle +0 -1
- package/android/cpp-adapter.cpp +6 -26
- package/android/src/main/jniLibs/arm64-v8a/libddk_ffi.so +0 -0
- package/android/src/main/jniLibs/armeabi-v7a/libddk_ffi.so +0 -0
- package/android/src/main/jniLibs/x86/libddk_ffi.so +0 -0
- package/android/src/main/jniLibs/x86_64/libddk_ffi.so +0 -0
- package/cpp/bennyblader-ddk-rn.cpp +1 -1
- package/cpp/ddk_ffi.cpp +2361 -2671
- package/cpp/ddk_ffi.hpp +86 -255
- package/ios/DdkRn.xcframework/Info.plist +43 -0
- package/ios/DdkRn.xcframework/ios-arm64/libddk_ffi.a +0 -0
- package/ios/DdkRn.xcframework/ios-arm64-simulator/libddk_ffi.a +0 -0
- package/lib/commonjs/ddk_ffi-ffi.js +6 -29
- package/lib/commonjs/ddk_ffi-ffi.js.map +1 -1
- package/lib/commonjs/ddk_ffi.js +961 -944
- package/lib/commonjs/ddk_ffi.js.map +1 -1
- package/lib/module/ddk_ffi-ffi.js +6 -29
- package/lib/module/ddk_ffi-ffi.js.map +1 -1
- package/lib/module/ddk_ffi.js +924 -896
- package/lib/module/ddk_ffi.js.map +1 -1
- package/lib/typescript/commonjs/src/ddk_ffi-ffi.d.ts +71 -96
- package/lib/typescript/commonjs/src/ddk_ffi-ffi.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ddk_ffi.d.ts +500 -471
- package/lib/typescript/commonjs/src/ddk_ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/ddk_ffi-ffi.d.ts +71 -96
- package/lib/typescript/module/src/ddk_ffi-ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/ddk_ffi.d.ts +500 -471
- package/lib/typescript/module/src/ddk_ffi.d.ts.map +1 -1
- package/package.json +8 -38
- package/src/ddk_ffi-ffi.ts +419 -170
- package/src/ddk_ffi.ts +2648 -1939
- package/ubrn.config.yaml +18 -1
- package/ddk-ffi/Cargo.lock +0 -1013
- package/ddk-ffi/Cargo.toml +0 -36
- package/ddk-ffi/build.rs +0 -3
- package/ddk-ffi/rust-toolchain.toml +0 -10
- package/ddk-ffi/src/ddk_ffi.udl +0 -376
- package/ddk-ffi/src/lib.rs +0 -2509
- package/ddk-ffi/src/uniffi-bindgen.rs +0 -3
- package/ddk-ffi/uniffi.toml +0 -18
- package/scripts/apply-hotfix.js +0 -96
- package/scripts/postinstall.js +0 -298
- package/scripts/prepare-rust-src.js +0 -51
package/lib/commonjs/ddk_ffi.js
CHANGED
|
@@ -3,12 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.TxOutput = exports.TxInputInfo = exports.TxInput = exports.Transaction = exports.Payout = exports.PartyParams = exports.OracleInfo = exports.
|
|
7
|
-
exports.addSignatureToTransaction = addSignatureToTransaction;
|
|
6
|
+
exports.TxOutput = exports.TxInputInfo = exports.TxInput = exports.Transaction = exports.Payout = exports.PartyParams = exports.OracleInfo = exports.ExtendedKey = exports.DlcTransactions = exports.DlcInputInfo = exports.DlcError_Tags = exports.DlcError = exports.ChangeOutputAndFees = exports.CetAdaptorSignatureDebugInfo = exports.AdaptorSignature = void 0;
|
|
8
7
|
exports.convertMnemonicToSeed = convertMnemonicToSeed;
|
|
9
8
|
exports.createCet = createCet;
|
|
10
9
|
exports.createCetAdaptorPointsFromOracleInfo = createCetAdaptorPointsFromOracleInfo;
|
|
11
|
-
exports.createCetAdaptorSignatureFromOracleInfo = createCetAdaptorSignatureFromOracleInfo;
|
|
12
10
|
exports.createCetAdaptorSigsFromOracleInfo = createCetAdaptorSigsFromOracleInfo;
|
|
13
11
|
exports.createCetAdaptorSigsFromPoints = createCetAdaptorSigsFromPoints;
|
|
14
12
|
exports.createCets = createCets;
|
|
@@ -21,285 +19,284 @@ exports.createSplicedDlcTransactions = createSplicedDlcTransactions;
|
|
|
21
19
|
exports.createXprivFromParentPath = createXprivFromParentPath;
|
|
22
20
|
exports.default = void 0;
|
|
23
21
|
exports.extractEcdsaSignatureFromOracleSignatures = extractEcdsaSignatureFromOracleSignatures;
|
|
24
|
-
exports.getCetAdaptorSignatureInputs = getCetAdaptorSignatureInputs;
|
|
25
|
-
exports.getCetSighash = getCetSighash;
|
|
26
|
-
exports.getChangeOutputAndFees = getChangeOutputAndFees;
|
|
27
22
|
exports.getPubkeyFromExtkey = getPubkeyFromExtkey;
|
|
28
|
-
exports.getRawFundingTransactionInputSignature = getRawFundingTransactionInputSignature;
|
|
29
23
|
exports.getTotalInputVsize = getTotalInputVsize;
|
|
30
24
|
exports.getXpubFromXpriv = getXpubFromXpriv;
|
|
31
|
-
exports.isDustOutput = isDustOutput;
|
|
32
|
-
exports.signCet = signCet;
|
|
33
|
-
exports.signFundTransactionInput = signFundTransactionInput;
|
|
34
|
-
exports.signMultiSigInput = signMultiSigInput;
|
|
35
|
-
exports.verifyCetAdaptorSigFromOracleInfo = verifyCetAdaptorSigFromOracleInfo;
|
|
36
25
|
exports.verifyCetAdaptorSigsFromOracleInfo = verifyCetAdaptorSigsFromOracleInfo;
|
|
37
|
-
exports.verifyFundTxSignature = verifyFundTxSignature;
|
|
38
26
|
exports.version = version;
|
|
39
27
|
var _ddk_ffiFfi = _interopRequireDefault(require("./ddk_ffi-ffi.js"));
|
|
40
|
-
var
|
|
28
|
+
var _core = require("@ubjs/core");
|
|
41
29
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
42
30
|
// This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate.
|
|
43
31
|
// Trust me, you don't want to mess with it!
|
|
32
|
+
/* tslint:disable */
|
|
33
|
+
/* eslint-disable */
|
|
34
|
+
// @ts-nocheck
|
|
44
35
|
|
|
45
|
-
|
|
46
|
-
const uniffiCaller = new _uniffiBindgenReactNative.UniffiRustCaller(() => ({
|
|
36
|
+
const uniffiCaller = new _core.UniffiRustCaller(() => ({
|
|
47
37
|
code: 0
|
|
48
38
|
}));
|
|
49
39
|
const uniffiIsDebug =
|
|
50
40
|
// @ts-ignore -- The process global might not be defined
|
|
51
|
-
typeof process !==
|
|
41
|
+
typeof process !== 'object' ||
|
|
52
42
|
// @ts-ignore -- The process global might not be defined
|
|
53
|
-
process?.env?.NODE_ENV !==
|
|
43
|
+
process?.env?.NODE_ENV !== 'production' || false;
|
|
44
|
+
|
|
54
45
|
// Public interface members begin here.
|
|
55
46
|
|
|
56
|
-
function addSignatureToTransaction(tx, signature, pubkey, inputIndex) /*throws*/{
|
|
57
|
-
return FfiConverterTypeTransaction.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
58
|
-
return (() => {
|
|
59
|
-
console.debug(`-- uniffi_ddk_ffi_fn_func_add_signature_to_transaction`);
|
|
60
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_add_signature_to_transaction;
|
|
61
|
-
})()(FfiConverterTypeTransaction.lower(tx), FfiConverterArrayUInt8.lower(signature), FfiConverterArrayUInt8.lower(pubkey), _uniffiBindgenReactNative.FfiConverterUInt32.lower(inputIndex), callStatus);
|
|
62
|
-
}, /*liftString:*/FfiConverterString.lift));
|
|
63
|
-
}
|
|
64
47
|
function convertMnemonicToSeed(mnemonic, passphrase) /*throws*/{
|
|
65
|
-
return
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
48
|
+
return (__rb => {
|
|
49
|
+
try {
|
|
50
|
+
return _core.FfiConverterArrayBuffer.lift(__rb);
|
|
51
|
+
} finally {
|
|
52
|
+
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
53
|
+
}
|
|
54
|
+
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
55
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_convert_mnemonic_to_seed(FfiConverterString.lower(mnemonic, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterOptionalString.lower(passphrase, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
56
|
+
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
71
57
|
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Create a single CET
|
|
61
|
+
*/
|
|
72
62
|
function createCet(localOutput, localPayoutSerialId, remoteOutput, remotePayoutSerialId, fundTxId, fundVout, lockTime) /*throws*/{
|
|
73
|
-
return
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
63
|
+
return (__rb => {
|
|
64
|
+
try {
|
|
65
|
+
return FfiConverterTypeTransaction.lift(__rb);
|
|
66
|
+
} finally {
|
|
67
|
+
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
68
|
+
}
|
|
69
|
+
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
70
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_create_cet(FfiConverterTypeTxOutput.lower(localOutput, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt64.lower(localPayoutSerialId, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterTypeTxOutput.lower(remoteOutput, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt64.lower(remotePayoutSerialId, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterString.lower(fundTxId, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt32.lower(fundVout, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt32.lower(lockTime, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
71
|
+
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
79
72
|
}
|
|
80
73
|
function createCetAdaptorPointsFromOracleInfo(oracleInfo, msgs) /*throws*/{
|
|
81
|
-
return
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
return (() => {
|
|
91
|
-
console.debug(`-- uniffi_ddk_ffi_fn_func_create_cet_adaptor_signature_from_oracle_info`);
|
|
92
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_create_cet_adaptor_signature_from_oracle_info;
|
|
93
|
-
})()(FfiConverterTypeTransaction.lower(cet), FfiConverterTypeOracleInfo.lower(oracleInfo), FfiConverterArrayUInt8.lower(fundingSk), FfiConverterArrayUInt8.lower(fundingScriptPubkey), _uniffiBindgenReactNative.FfiConverterUInt64.lower(totalCollateral), FfiConverterArrayArrayUInt8.lower(msgs), callStatus);
|
|
94
|
-
}, /*liftString:*/FfiConverterString.lift));
|
|
74
|
+
return (__rb => {
|
|
75
|
+
try {
|
|
76
|
+
return FfiConverterSequenceBytes.lift(__rb);
|
|
77
|
+
} finally {
|
|
78
|
+
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
79
|
+
}
|
|
80
|
+
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
81
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_create_cet_adaptor_points_from_oracle_info(FfiConverterSequenceTypeOracleInfo.lower(oracleInfo, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterSequenceSequenceSequenceBytes.lower(msgs, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
82
|
+
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
95
83
|
}
|
|
96
84
|
function createCetAdaptorSigsFromOracleInfo(cets, oracleInfo, fundingSecretKey, fundingScriptPubkey, fundOutputValue, msgs) /*throws*/{
|
|
97
|
-
return
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
85
|
+
return (__rb => {
|
|
86
|
+
try {
|
|
87
|
+
return FfiConverterSequenceTypeAdaptorSignature.lift(__rb);
|
|
88
|
+
} finally {
|
|
89
|
+
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
90
|
+
}
|
|
91
|
+
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
92
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_create_cet_adaptor_sigs_from_oracle_info(FfiConverterSequenceTypeTransaction.lower(cets, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterSequenceTypeOracleInfo.lower(oracleInfo, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterArrayBuffer.lower(fundingSecretKey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterArrayBuffer.lower(fundingScriptPubkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt64.lower(fundOutputValue, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterSequenceSequenceSequenceBytes.lower(msgs, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
93
|
+
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
103
94
|
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Create adaptor signatures from pre-computed adaptor points.
|
|
98
|
+
*/
|
|
104
99
|
function createCetAdaptorSigsFromPoints(cets, adaptorPoints, fundingSecretKey, fundingScriptPubkey, fundOutputValue) /*throws*/{
|
|
105
|
-
return
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
100
|
+
return (__rb => {
|
|
101
|
+
try {
|
|
102
|
+
return FfiConverterSequenceTypeAdaptorSignature.lift(__rb);
|
|
103
|
+
} finally {
|
|
104
|
+
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
105
|
+
}
|
|
106
|
+
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
107
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_create_cet_adaptor_sigs_from_points(FfiConverterSequenceTypeTransaction.lower(cets, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterSequenceBytes.lower(adaptorPoints, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterArrayBuffer.lower(fundingSecretKey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterArrayBuffer.lower(fundingScriptPubkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt64.lower(fundOutputValue, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
108
|
+
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
111
109
|
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Create multiple CETs
|
|
113
|
+
*/
|
|
112
114
|
function createCets(fundTxId, fundVout, localFinalScriptPubkey, remoteFinalScriptPubkey, outcomes, lockTime, localSerialId, remoteSerialId) /*throws*/{
|
|
113
|
-
return
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
115
|
+
return (__rb => {
|
|
116
|
+
try {
|
|
117
|
+
return FfiConverterSequenceTypeTransaction.lift(__rb);
|
|
118
|
+
} finally {
|
|
119
|
+
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
120
|
+
}
|
|
121
|
+
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
122
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_create_cets(FfiConverterString.lower(fundTxId, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt32.lower(fundVout, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterArrayBuffer.lower(localFinalScriptPubkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterArrayBuffer.lower(remoteFinalScriptPubkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterSequenceTypePayout.lower(outcomes, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt32.lower(lockTime, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt64.lower(localSerialId, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt64.lower(remoteSerialId, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
123
|
+
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
119
124
|
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Create complete DLC transactions
|
|
128
|
+
*/
|
|
120
129
|
function createDlcTransactions(outcomes, localParams, remoteParams, refundLocktime, feeRate, fundLockTime, cetLockTime, fundOutputSerialId, contractFlags) /*throws*/{
|
|
121
|
-
return
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
130
|
+
return (__rb => {
|
|
131
|
+
try {
|
|
132
|
+
return FfiConverterTypeDlcTransactions.lift(__rb);
|
|
133
|
+
} finally {
|
|
134
|
+
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
135
|
+
}
|
|
136
|
+
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
137
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_create_dlc_transactions(FfiConverterSequenceTypePayout.lower(outcomes, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterTypePartyParams.lower(localParams, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterTypePartyParams.lower(remoteParams, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt32.lower(refundLocktime, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt64.lower(feeRate, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt32.lower(fundLockTime, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt32.lower(cetLockTime, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt64.lower(fundOutputSerialId, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt8.lower(contractFlags, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
138
|
+
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
127
139
|
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Derive child extended private key from parent extended key
|
|
143
|
+
* Input: 78-byte encoded xpriv, Output: 78-byte encoded xpriv
|
|
144
|
+
*/
|
|
128
145
|
function createExtkeyFromParentPath(extkey, path) /*throws*/{
|
|
129
|
-
return
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
146
|
+
return (__rb => {
|
|
147
|
+
try {
|
|
148
|
+
return _core.FfiConverterArrayBuffer.lift(__rb);
|
|
149
|
+
} finally {
|
|
150
|
+
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
151
|
+
}
|
|
152
|
+
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
153
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_create_extkey_from_parent_path(_core.FfiConverterArrayBuffer.lower(extkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterString.lower(path, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
154
|
+
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
135
155
|
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Create master extended private key from 64-byte seed
|
|
159
|
+
* Returns 78-byte encoded xpriv
|
|
160
|
+
*/
|
|
136
161
|
function createExtkeyFromSeed(seed, network) /*throws*/{
|
|
137
|
-
return
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
162
|
+
return (__rb => {
|
|
163
|
+
try {
|
|
164
|
+
return _core.FfiConverterArrayBuffer.lift(__rb);
|
|
165
|
+
} finally {
|
|
166
|
+
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
167
|
+
}
|
|
168
|
+
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
169
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_create_extkey_from_seed(_core.FfiConverterArrayBuffer.lower(seed, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterString.lower(network, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
170
|
+
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
143
171
|
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Create a funding script pubkey for DLC transactions
|
|
175
|
+
*/
|
|
144
176
|
function createFundTxLockingScript(localFundPubkey, remoteFundPubkey) /*throws*/{
|
|
145
|
-
return
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
177
|
+
return (__rb => {
|
|
178
|
+
try {
|
|
179
|
+
return _core.FfiConverterArrayBuffer.lift(__rb);
|
|
180
|
+
} finally {
|
|
181
|
+
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
182
|
+
}
|
|
183
|
+
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
184
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_create_fund_tx_locking_script(_core.FfiConverterArrayBuffer.lower(localFundPubkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterArrayBuffer.lower(remoteFundPubkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
185
|
+
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
151
186
|
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Create a refund transaction
|
|
190
|
+
*/
|
|
152
191
|
function createRefundTransaction(localFinalScriptPubkey, remoteFinalScriptPubkey, localAmount, remoteAmount, lockTime, fundTxId, fundVout) /*throws*/{
|
|
153
|
-
return
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
192
|
+
return (__rb => {
|
|
193
|
+
try {
|
|
194
|
+
return FfiConverterTypeTransaction.lift(__rb);
|
|
195
|
+
} finally {
|
|
196
|
+
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
197
|
+
}
|
|
198
|
+
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
199
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_create_refund_transaction(_core.FfiConverterArrayBuffer.lower(localFinalScriptPubkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterArrayBuffer.lower(remoteFinalScriptPubkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt64.lower(localAmount, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt64.lower(remoteAmount, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt32.lower(lockTime, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterString.lower(fundTxId, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt32.lower(fundVout, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
200
|
+
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
159
201
|
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Create spliced DLC transactions
|
|
205
|
+
*/
|
|
160
206
|
function createSplicedDlcTransactions(outcomes, localParams, remoteParams, refundLocktime, feeRate, fundLockTime, cetLockTime, fundOutputSerialId, contractFlags) /*throws*/{
|
|
161
|
-
return
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
207
|
+
return (__rb => {
|
|
208
|
+
try {
|
|
209
|
+
return FfiConverterTypeDlcTransactions.lift(__rb);
|
|
210
|
+
} finally {
|
|
211
|
+
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
212
|
+
}
|
|
213
|
+
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
214
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_create_spliced_dlc_transactions(FfiConverterSequenceTypePayout.lower(outcomes, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterTypePartyParams.lower(localParams, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterTypePartyParams.lower(remoteParams, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt32.lower(refundLocktime, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt64.lower(feeRate, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt32.lower(fundLockTime, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt32.lower(cetLockTime, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt64.lower(fundOutputSerialId, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt8.lower(contractFlags, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
215
|
+
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
167
216
|
}
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* DEPRECATED: Use create_extkey_from_seed + create_extkey_from_parent_path instead
|
|
220
|
+
* This function handles both seeds (64 bytes) and xprivs (78 bytes) which is confusing
|
|
221
|
+
*/
|
|
168
222
|
function createXprivFromParentPath(seedOrXpriv, baseDerivationPath, network, path) /*throws*/{
|
|
169
|
-
return
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
223
|
+
return (__rb => {
|
|
224
|
+
try {
|
|
225
|
+
return _core.FfiConverterArrayBuffer.lift(__rb);
|
|
226
|
+
} finally {
|
|
227
|
+
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
228
|
+
}
|
|
229
|
+
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
230
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_create_xpriv_from_parent_path(_core.FfiConverterArrayBuffer.lower(seedOrXpriv, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterString.lower(baseDerivationPath, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterString.lower(network, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterString.lower(path, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
231
|
+
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
175
232
|
}
|
|
176
233
|
function extractEcdsaSignatureFromOracleSignatures(oracleSignatures, adaptorSignature) /*throws*/{
|
|
177
|
-
return
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
return (() => {
|
|
187
|
-
console.debug(`-- uniffi_ddk_ffi_fn_func_get_cet_adaptor_signature_inputs`);
|
|
188
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_get_cet_adaptor_signature_inputs;
|
|
189
|
-
})()(FfiConverterTypeTransaction.lower(cet), FfiConverterArrayTypeOracleInfo.lower(oracleInfo), FfiConverterArrayUInt8.lower(fundingScriptPubkey), _uniffiBindgenReactNative.FfiConverterUInt64.lower(fundOutputValue), FfiConverterArrayArrayArrayUInt8.lower(msgs), callStatus);
|
|
190
|
-
}, /*liftString:*/FfiConverterString.lift));
|
|
191
|
-
}
|
|
192
|
-
function getCetSighash(cet, fundingScriptPubkey, fundOutputValue) /*throws*/{
|
|
193
|
-
return FfiConverterArrayUInt8.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
194
|
-
return (() => {
|
|
195
|
-
console.debug(`-- uniffi_ddk_ffi_fn_func_get_cet_sighash`);
|
|
196
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_get_cet_sighash;
|
|
197
|
-
})()(FfiConverterTypeTransaction.lower(cet), FfiConverterArrayUInt8.lower(fundingScriptPubkey), _uniffiBindgenReactNative.FfiConverterUInt64.lower(fundOutputValue), callStatus);
|
|
198
|
-
}, /*liftString:*/FfiConverterString.lift));
|
|
199
|
-
}
|
|
200
|
-
function getChangeOutputAndFees(params, feeRate) /*throws*/{
|
|
201
|
-
return FfiConverterTypeChangeOutputAndFees.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
202
|
-
return (() => {
|
|
203
|
-
console.debug(`-- uniffi_ddk_ffi_fn_func_get_change_output_and_fees`);
|
|
204
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_get_change_output_and_fees;
|
|
205
|
-
})()(FfiConverterTypePartyParams.lower(params), _uniffiBindgenReactNative.FfiConverterUInt64.lower(feeRate), callStatus);
|
|
206
|
-
}, /*liftString:*/FfiConverterString.lift));
|
|
234
|
+
return (__rb => {
|
|
235
|
+
try {
|
|
236
|
+
return _core.FfiConverterArrayBuffer.lift(__rb);
|
|
237
|
+
} finally {
|
|
238
|
+
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
239
|
+
}
|
|
240
|
+
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
241
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_extract_ecdsa_signature_from_oracle_signatures(FfiConverterSequenceBytes.lower(oracleSignatures, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterArrayBuffer.lower(adaptorSignature, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
242
|
+
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
207
243
|
}
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Extract public key from extended key (private or public)
|
|
247
|
+
* Input: 78-byte encoded xpriv/xpub, Output: 33-byte compressed public key
|
|
248
|
+
*/
|
|
208
249
|
function getPubkeyFromExtkey(extkey, network) /*throws*/{
|
|
209
|
-
return
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
return (() => {
|
|
219
|
-
console.debug(`-- uniffi_ddk_ffi_fn_func_get_raw_funding_transaction_input_signature`);
|
|
220
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_get_raw_funding_transaction_input_signature;
|
|
221
|
-
})()(FfiConverterTypeTransaction.lower(fundingTransaction), FfiConverterArrayUInt8.lower(privkey), FfiConverterString.lower(prevTxId), _uniffiBindgenReactNative.FfiConverterUInt32.lower(prevTxVout), _uniffiBindgenReactNative.FfiConverterUInt64.lower(value), callStatus);
|
|
222
|
-
}, /*liftString:*/FfiConverterString.lift));
|
|
250
|
+
return (__rb => {
|
|
251
|
+
try {
|
|
252
|
+
return _core.FfiConverterArrayBuffer.lift(__rb);
|
|
253
|
+
} finally {
|
|
254
|
+
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
255
|
+
}
|
|
256
|
+
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
257
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_get_pubkey_from_extkey(_core.FfiConverterArrayBuffer.lower(extkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterString.lower(network, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
258
|
+
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
223
259
|
}
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Get total input virtual size for fee calculation
|
|
263
|
+
*/
|
|
224
264
|
function getTotalInputVsize(inputs) {
|
|
225
|
-
return
|
|
226
|
-
return (()
|
|
227
|
-
|
|
228
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_get_total_input_vsize;
|
|
229
|
-
})()(FfiConverterArrayTypeTxInputInfo.lower(inputs), callStatus);
|
|
230
|
-
}, /*liftString:*/FfiConverterString.lift));
|
|
265
|
+
return _core.FfiConverterUInt32.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
266
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_get_total_input_vsize(FfiConverterSequenceTypeTxInputInfo.lower(inputs, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
267
|
+
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
231
268
|
}
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Convert extended private key to extended public key
|
|
272
|
+
* Input: 78-byte encoded xpriv, Output: 78-byte encoded xpub
|
|
273
|
+
*/
|
|
232
274
|
function getXpubFromXpriv(xpriv, network) /*throws*/{
|
|
233
|
-
return
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
return (() => {
|
|
243
|
-
console.debug(`-- uniffi_ddk_ffi_fn_func_is_dust_output`);
|
|
244
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_is_dust_output;
|
|
245
|
-
})()(FfiConverterTypeTxOutput.lower(output), callStatus);
|
|
246
|
-
}, /*liftString:*/FfiConverterString.lift));
|
|
247
|
-
}
|
|
248
|
-
function signCet(cet, adaptorSignature, oracleSignatures, fundingSecretKey, otherPubkey, fundingScriptPubkey, fundOutputValue) /*throws*/{
|
|
249
|
-
return FfiConverterTypeTransaction.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
250
|
-
return (() => {
|
|
251
|
-
console.debug(`-- uniffi_ddk_ffi_fn_func_sign_cet`);
|
|
252
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_sign_cet;
|
|
253
|
-
})()(FfiConverterTypeTransaction.lower(cet), FfiConverterArrayUInt8.lower(adaptorSignature), FfiConverterArrayArrayUInt8.lower(oracleSignatures), FfiConverterArrayUInt8.lower(fundingSecretKey), FfiConverterArrayUInt8.lower(otherPubkey), FfiConverterArrayUInt8.lower(fundingScriptPubkey), _uniffiBindgenReactNative.FfiConverterUInt64.lower(fundOutputValue), callStatus);
|
|
254
|
-
}, /*liftString:*/FfiConverterString.lift));
|
|
255
|
-
}
|
|
256
|
-
function signFundTransactionInput(fundTransaction, privkey, prevTxId, prevTxVout, value) /*throws*/{
|
|
257
|
-
return FfiConverterTypeTransaction.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
258
|
-
return (() => {
|
|
259
|
-
console.debug(`-- uniffi_ddk_ffi_fn_func_sign_fund_transaction_input`);
|
|
260
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_sign_fund_transaction_input;
|
|
261
|
-
})()(FfiConverterTypeTransaction.lower(fundTransaction), FfiConverterArrayUInt8.lower(privkey), FfiConverterString.lower(prevTxId), _uniffiBindgenReactNative.FfiConverterUInt32.lower(prevTxVout), _uniffiBindgenReactNative.FfiConverterUInt64.lower(value), callStatus);
|
|
262
|
-
}, /*liftString:*/FfiConverterString.lift));
|
|
263
|
-
}
|
|
264
|
-
function signMultiSigInput(tx, dlcInput, localPrivkey, remoteSignature) /*throws*/{
|
|
265
|
-
return FfiConverterTypeTransaction.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
266
|
-
return (() => {
|
|
267
|
-
console.debug(`-- uniffi_ddk_ffi_fn_func_sign_multi_sig_input`);
|
|
268
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_sign_multi_sig_input;
|
|
269
|
-
})()(FfiConverterTypeTransaction.lower(tx), FfiConverterTypeDlcInputInfo.lower(dlcInput), FfiConverterArrayUInt8.lower(localPrivkey), FfiConverterArrayUInt8.lower(remoteSignature), callStatus);
|
|
270
|
-
}, /*liftString:*/FfiConverterString.lift));
|
|
275
|
+
return (__rb => {
|
|
276
|
+
try {
|
|
277
|
+
return _core.FfiConverterArrayBuffer.lift(__rb);
|
|
278
|
+
} finally {
|
|
279
|
+
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
280
|
+
}
|
|
281
|
+
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
282
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_get_xpub_from_xpriv(_core.FfiConverterArrayBuffer.lower(xpriv, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterString.lower(network, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
283
|
+
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
271
284
|
}
|
|
272
|
-
function
|
|
273
|
-
return
|
|
274
|
-
return (()
|
|
275
|
-
|
|
276
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_verify_cet_adaptor_sig_from_oracle_info;
|
|
277
|
-
})()(FfiConverterTypeAdaptorSignature.lower(adaptorSig), FfiConverterTypeTransaction.lower(cet), FfiConverterArrayTypeOracleInfo.lower(oracleInfo), FfiConverterArrayUInt8.lower(pubkey), FfiConverterArrayUInt8.lower(fundingScriptPubkey), _uniffiBindgenReactNative.FfiConverterUInt64.lower(totalCollateral), FfiConverterArrayArrayArrayUInt8.lower(msgs), callStatus);
|
|
278
|
-
}, /*liftString:*/FfiConverterString.lift));
|
|
279
|
-
}
|
|
280
|
-
function verifyCetAdaptorSigsFromOracleInfo(adaptorSigs, cets, oracleInfo, pubkey, fundingScriptPubkey, totalCollateral, msgs) {
|
|
281
|
-
return _uniffiBindgenReactNative.FfiConverterBool.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
282
|
-
return (() => {
|
|
283
|
-
console.debug(`-- uniffi_ddk_ffi_fn_func_verify_cet_adaptor_sigs_from_oracle_info`);
|
|
284
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_verify_cet_adaptor_sigs_from_oracle_info;
|
|
285
|
-
})()(FfiConverterArrayTypeAdaptorSignature.lower(adaptorSigs), FfiConverterArrayTypeTransaction.lower(cets), FfiConverterArrayTypeOracleInfo.lower(oracleInfo), FfiConverterArrayUInt8.lower(pubkey), FfiConverterArrayUInt8.lower(fundingScriptPubkey), _uniffiBindgenReactNative.FfiConverterUInt64.lower(totalCollateral), FfiConverterArrayArrayArrayArrayUInt8.lower(msgs), callStatus);
|
|
286
|
-
}, /*liftString:*/FfiConverterString.lift));
|
|
287
|
-
}
|
|
288
|
-
function verifyFundTxSignature(fundTx, signature, pubkey, txid, vout, inputAmount) /*throws*/{
|
|
289
|
-
return _uniffiBindgenReactNative.FfiConverterBool.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
290
|
-
return (() => {
|
|
291
|
-
console.debug(`-- uniffi_ddk_ffi_fn_func_verify_fund_tx_signature`);
|
|
292
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_verify_fund_tx_signature;
|
|
293
|
-
})()(FfiConverterTypeTransaction.lower(fundTx), FfiConverterArrayUInt8.lower(signature), FfiConverterArrayUInt8.lower(pubkey), FfiConverterString.lower(txid), _uniffiBindgenReactNative.FfiConverterUInt32.lower(vout), _uniffiBindgenReactNative.FfiConverterUInt64.lower(inputAmount), callStatus);
|
|
294
|
-
}, /*liftString:*/FfiConverterString.lift));
|
|
285
|
+
function verifyCetAdaptorSigsFromOracleInfo(adaptorSigs, cets, oracleInfos, pubkey, fundingScriptPubkey, totalCollateral, msgs) {
|
|
286
|
+
return _core.FfiConverterBool.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
287
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_verify_cet_adaptor_sigs_from_oracle_info(FfiConverterSequenceTypeAdaptorSignature.lower(adaptorSigs, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterSequenceTypeTransaction.lower(cets, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterSequenceTypeOracleInfo.lower(oracleInfos, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterArrayBuffer.lower(pubkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterArrayBuffer.lower(fundingScriptPubkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt64.lower(totalCollateral, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterSequenceSequenceSequenceBytes.lower(msgs, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
288
|
+
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
295
289
|
}
|
|
296
290
|
function version() {
|
|
297
|
-
return
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
291
|
+
return (__rb => {
|
|
292
|
+
try {
|
|
293
|
+
return FfiConverterString.lift(__rb);
|
|
294
|
+
} finally {
|
|
295
|
+
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
296
|
+
}
|
|
297
|
+
})(uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
298
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_version(callStatus);
|
|
299
|
+
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
303
300
|
}
|
|
304
301
|
/**
|
|
305
302
|
* Generated factory for {@link AdaptorSignature} record objects.
|
|
@@ -307,596 +304,651 @@ function version() {
|
|
|
307
304
|
const AdaptorSignature = exports.AdaptorSignature = (() => {
|
|
308
305
|
const defaults = () => ({});
|
|
309
306
|
const create = (() => {
|
|
310
|
-
return (0,
|
|
307
|
+
return (0, _core.uniffiCreateRecord)(defaults);
|
|
311
308
|
})();
|
|
312
309
|
return Object.freeze({
|
|
313
|
-
/**
|
|
314
|
-
* Create a frozen instance of {@link AdaptorSignature}, with defaults specified
|
|
315
|
-
* in Rust, in the {@link ddk_ffi} crate.
|
|
316
|
-
*/
|
|
317
310
|
create,
|
|
318
|
-
/**
|
|
319
|
-
* Create a frozen instance of {@link AdaptorSignature}, with defaults specified
|
|
320
|
-
* in Rust, in the {@link ddk_ffi} crate.
|
|
321
|
-
*/
|
|
322
311
|
new: create,
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
312
|
+
defaults: () => Object.freeze(defaults()),
|
|
313
|
+
verifyFromOracleInfo(self_, cet, oracleInfos, pubkey, fundingScriptPubkey, totalCollateral, msgs) {
|
|
314
|
+
return _core.FfiConverterBool.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
315
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_method_adaptorsignature_verify_from_oracle_info(FfiConverterTypeAdaptorSignature.lower(self_, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterTypeTransaction.lower(cet, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterSequenceTypeOracleInfo.lower(oracleInfos, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterArrayBuffer.lower(pubkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterArrayBuffer.lower(fundingScriptPubkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt64.lower(totalCollateral, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterSequenceSequenceBytes.lower(msgs, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
316
|
+
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
317
|
+
}
|
|
327
318
|
});
|
|
328
319
|
})();
|
|
329
320
|
const FfiConverterTypeAdaptorSignature = (() => {
|
|
330
|
-
class FFIConverter extends
|
|
321
|
+
class FFIConverter extends _core.AbstractFfiConverterByteArray {
|
|
331
322
|
read(from) {
|
|
332
323
|
return {
|
|
333
|
-
signature:
|
|
334
|
-
proof:
|
|
324
|
+
signature: _core.FfiConverterArrayBuffer.read(from),
|
|
325
|
+
proof: _core.FfiConverterArrayBuffer.read(from)
|
|
335
326
|
};
|
|
336
327
|
}
|
|
337
328
|
write(value, into) {
|
|
338
|
-
|
|
339
|
-
|
|
329
|
+
_core.FfiConverterArrayBuffer.write(value.signature, into);
|
|
330
|
+
_core.FfiConverterArrayBuffer.write(value.proof, into);
|
|
340
331
|
}
|
|
341
332
|
allocationSize(value) {
|
|
342
|
-
return
|
|
333
|
+
return _core.FfiConverterArrayBuffer.allocationSize(value.signature) + _core.FfiConverterArrayBuffer.allocationSize(value.proof);
|
|
343
334
|
}
|
|
344
335
|
}
|
|
345
|
-
;
|
|
346
336
|
return new FFIConverter();
|
|
347
337
|
})();
|
|
338
|
+
|
|
339
|
+
// Hermes (React Native ≥ 0.74) ships TextEncoder and encodeInto, but not
|
|
340
|
+
// TextDecoder. For single-string decode (bytesToString), we polyfill via the
|
|
341
|
+
// C++ string_from_buffer helper using a duck-typed object matching the
|
|
342
|
+
// standard TextDecoder.decode signature. Once Hermes ships a real
|
|
343
|
+
// TextDecoder, the `typeof` check will pick it up automatically.
|
|
344
|
+
//
|
|
345
|
+
// For array-of-strings decode (readStringFromBuffer), we keep a dedicated C++
|
|
346
|
+
// helper: the polyfill path (new Uint8Array view + decode) measured ~40%
|
|
347
|
+
// slower on getStringArray benchmarks than a direct (buf, offset, length)
|
|
348
|
+
// call, due to the per-read view allocation and extra property lookups in
|
|
349
|
+
// string_from_buffer.
|
|
350
|
+
const stringConverter = (() => {
|
|
351
|
+
const encoder = new TextEncoder();
|
|
352
|
+
const decoder = typeof TextDecoder !== 'undefined' ? new TextDecoder() : {
|
|
353
|
+
decode: bytes => (0, _ddk_ffiFfi.default)().ubrn_uniffi_internal_fn_func_ffi__string_from_buffer(bytes, undefined)
|
|
354
|
+
};
|
|
355
|
+
return {
|
|
356
|
+
// Single-string lower() uses the C++ helper — TextEncoder.encode
|
|
357
|
+
// measured ~43% slower on takeString benchmarks.
|
|
358
|
+
stringToBytes: s => (0, _ddk_ffiFfi.default)().ubrn_uniffi_internal_fn_func_ffi__string_to_buffer(s, undefined),
|
|
359
|
+
bytesToString: ab => decoder.decode(ab),
|
|
360
|
+
// Direct C++ call — bypasses uniffiCaller.rustCall() overhead.
|
|
361
|
+
// Matters for N-element arrays.
|
|
362
|
+
stringByteLength: s => (0, _ddk_ffiFfi.default)().ubrn_uniffi_internal_fn_func_ffi__string_to_byte_length(s, undefined),
|
|
363
|
+
// Encode directly into the RustBuffer backing store via
|
|
364
|
+
// TextEncoder.encodeInto — zero intermediate allocation. Replaces
|
|
365
|
+
// the old C++ write_string_into_buffer helper.
|
|
366
|
+
writeStringIntoBuffer: (s, buf, offset) => {
|
|
367
|
+
const view = new Uint8Array(buf.arrayBuffer, offset, buf.arrayBuffer.byteLength - offset);
|
|
368
|
+
return encoder.encodeInto(s, view).written;
|
|
369
|
+
},
|
|
370
|
+
// Dedicated C++ helper — avoids per-read Uint8Array allocation and
|
|
371
|
+
// the double property-lookup in string_from_buffer.
|
|
372
|
+
readStringFromBuffer: (buf, offset, length) => (0, _ddk_ffiFfi.default)().ubrn_uniffi_internal_fn_func_ffi__read_string_from_buffer(buf, offset, length)
|
|
373
|
+
};
|
|
374
|
+
})();
|
|
375
|
+
const FfiConverterString = (0, _core.uniffiCreateFfiConverterString)(stringConverter);
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* Debug info for CET adaptor signature inputs.
|
|
379
|
+
*
|
|
380
|
+
* Contains all the values that go into creating an adaptor signature,
|
|
381
|
+
* useful for comparing with external signers during debugging.
|
|
382
|
+
*
|
|
383
|
+
* This struct is intentionally always available (not feature-gated)
|
|
384
|
+
* to support production debugging scenarios.
|
|
385
|
+
*/
|
|
386
|
+
|
|
348
387
|
/**
|
|
349
388
|
* Generated factory for {@link CetAdaptorSignatureDebugInfo} record objects.
|
|
350
389
|
*/
|
|
351
390
|
const CetAdaptorSignatureDebugInfo = exports.CetAdaptorSignatureDebugInfo = (() => {
|
|
352
391
|
const defaults = () => ({});
|
|
353
392
|
const create = (() => {
|
|
354
|
-
return (0,
|
|
393
|
+
return (0, _core.uniffiCreateRecord)(defaults);
|
|
355
394
|
})();
|
|
356
395
|
return Object.freeze({
|
|
357
|
-
/**
|
|
358
|
-
* Create a frozen instance of {@link CetAdaptorSignatureDebugInfo}, with defaults specified
|
|
359
|
-
* in Rust, in the {@link ddk_ffi} crate.
|
|
360
|
-
*/
|
|
361
396
|
create,
|
|
362
|
-
/**
|
|
363
|
-
* Create a frozen instance of {@link CetAdaptorSignatureDebugInfo}, with defaults specified
|
|
364
|
-
* in Rust, in the {@link ddk_ffi} crate.
|
|
365
|
-
*/
|
|
366
397
|
new: create,
|
|
367
|
-
/**
|
|
368
|
-
* Defaults specified in the {@link ddk_ffi} crate.
|
|
369
|
-
*/
|
|
370
398
|
defaults: () => Object.freeze(defaults())
|
|
371
399
|
});
|
|
372
400
|
})();
|
|
373
401
|
const FfiConverterTypeCetAdaptorSignatureDebugInfo = (() => {
|
|
374
|
-
class FFIConverter extends
|
|
402
|
+
class FFIConverter extends _core.AbstractFfiConverterByteArray {
|
|
375
403
|
read(from) {
|
|
376
404
|
return {
|
|
377
|
-
sighash:
|
|
378
|
-
adaptorPoint:
|
|
379
|
-
inputIndex:
|
|
380
|
-
scriptPubkey:
|
|
381
|
-
value:
|
|
405
|
+
sighash: _core.FfiConverterArrayBuffer.read(from),
|
|
406
|
+
adaptorPoint: _core.FfiConverterArrayBuffer.read(from),
|
|
407
|
+
inputIndex: _core.FfiConverterUInt32.read(from),
|
|
408
|
+
scriptPubkey: _core.FfiConverterArrayBuffer.read(from),
|
|
409
|
+
value: _core.FfiConverterUInt64.read(from),
|
|
382
410
|
cetTxid: FfiConverterString.read(from),
|
|
383
|
-
cetRaw:
|
|
411
|
+
cetRaw: _core.FfiConverterArrayBuffer.read(from)
|
|
384
412
|
};
|
|
385
413
|
}
|
|
386
414
|
write(value, into) {
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
415
|
+
_core.FfiConverterArrayBuffer.write(value.sighash, into);
|
|
416
|
+
_core.FfiConverterArrayBuffer.write(value.adaptorPoint, into);
|
|
417
|
+
_core.FfiConverterUInt32.write(value.inputIndex, into);
|
|
418
|
+
_core.FfiConverterArrayBuffer.write(value.scriptPubkey, into);
|
|
419
|
+
_core.FfiConverterUInt64.write(value.value, into);
|
|
392
420
|
FfiConverterString.write(value.cetTxid, into);
|
|
393
|
-
|
|
421
|
+
_core.FfiConverterArrayBuffer.write(value.cetRaw, into);
|
|
394
422
|
}
|
|
395
423
|
allocationSize(value) {
|
|
396
|
-
return
|
|
424
|
+
return _core.FfiConverterArrayBuffer.allocationSize(value.sighash) + _core.FfiConverterArrayBuffer.allocationSize(value.adaptorPoint) + _core.FfiConverterUInt32.allocationSize(value.inputIndex) + _core.FfiConverterArrayBuffer.allocationSize(value.scriptPubkey) + _core.FfiConverterUInt64.allocationSize(value.value) + FfiConverterString.allocationSize(value.cetTxid) + _core.FfiConverterArrayBuffer.allocationSize(value.cetRaw);
|
|
397
425
|
}
|
|
398
426
|
}
|
|
399
|
-
;
|
|
400
427
|
return new FFIConverter();
|
|
401
428
|
})();
|
|
402
429
|
/**
|
|
403
|
-
* Generated factory for {@link
|
|
430
|
+
* Generated factory for {@link TxOutput} record objects.
|
|
404
431
|
*/
|
|
405
|
-
const
|
|
432
|
+
const TxOutput = exports.TxOutput = (() => {
|
|
406
433
|
const defaults = () => ({});
|
|
407
434
|
const create = (() => {
|
|
408
|
-
return (0,
|
|
435
|
+
return (0, _core.uniffiCreateRecord)(defaults);
|
|
409
436
|
})();
|
|
410
437
|
return Object.freeze({
|
|
411
|
-
/**
|
|
412
|
-
* Create a frozen instance of {@link ChangeOutputAndFees}, with defaults specified
|
|
413
|
-
* in Rust, in the {@link ddk_ffi} crate.
|
|
414
|
-
*/
|
|
415
438
|
create,
|
|
416
|
-
/**
|
|
417
|
-
* Create a frozen instance of {@link ChangeOutputAndFees}, with defaults specified
|
|
418
|
-
* in Rust, in the {@link ddk_ffi} crate.
|
|
419
|
-
*/
|
|
420
439
|
new: create,
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
440
|
+
defaults: () => Object.freeze(defaults()),
|
|
441
|
+
isDust(self_) {
|
|
442
|
+
return _core.FfiConverterBool.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
443
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_method_txoutput_is_dust(FfiConverterTypeTxOutput.lower(self_, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
444
|
+
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
445
|
+
}
|
|
425
446
|
});
|
|
426
447
|
})();
|
|
427
|
-
const
|
|
428
|
-
class FFIConverter extends
|
|
448
|
+
const FfiConverterTypeTxOutput = (() => {
|
|
449
|
+
class FFIConverter extends _core.AbstractFfiConverterByteArray {
|
|
429
450
|
read(from) {
|
|
430
451
|
return {
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
cetFee: _uniffiBindgenReactNative.FfiConverterUInt64.read(from)
|
|
452
|
+
value: _core.FfiConverterUInt64.read(from),
|
|
453
|
+
scriptPubkey: _core.FfiConverterArrayBuffer.read(from)
|
|
434
454
|
};
|
|
435
455
|
}
|
|
436
456
|
write(value, into) {
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
_uniffiBindgenReactNative.FfiConverterUInt64.write(value.cetFee, into);
|
|
457
|
+
_core.FfiConverterUInt64.write(value.value, into);
|
|
458
|
+
_core.FfiConverterArrayBuffer.write(value.scriptPubkey, into);
|
|
440
459
|
}
|
|
441
460
|
allocationSize(value) {
|
|
442
|
-
return
|
|
461
|
+
return _core.FfiConverterUInt64.allocationSize(value.value) + _core.FfiConverterArrayBuffer.allocationSize(value.scriptPubkey);
|
|
443
462
|
}
|
|
444
463
|
}
|
|
445
|
-
;
|
|
446
464
|
return new FFIConverter();
|
|
447
465
|
})();
|
|
448
466
|
/**
|
|
449
|
-
* Generated factory for {@link
|
|
467
|
+
* Generated factory for {@link ChangeOutputAndFees} record objects.
|
|
450
468
|
*/
|
|
451
|
-
const
|
|
469
|
+
const ChangeOutputAndFees = exports.ChangeOutputAndFees = (() => {
|
|
452
470
|
const defaults = () => ({});
|
|
453
471
|
const create = (() => {
|
|
454
|
-
return (0,
|
|
472
|
+
return (0, _core.uniffiCreateRecord)(defaults);
|
|
455
473
|
})();
|
|
456
474
|
return Object.freeze({
|
|
457
|
-
/**
|
|
458
|
-
* Create a frozen instance of {@link DlcInputInfo}, with defaults specified
|
|
459
|
-
* in Rust, in the {@link ddk_ffi} crate.
|
|
460
|
-
*/
|
|
461
475
|
create,
|
|
462
|
-
/**
|
|
463
|
-
* Create a frozen instance of {@link DlcInputInfo}, with defaults specified
|
|
464
|
-
* in Rust, in the {@link ddk_ffi} crate.
|
|
465
|
-
*/
|
|
466
476
|
new: create,
|
|
467
|
-
/**
|
|
468
|
-
* Defaults specified in the {@link ddk_ffi} crate.
|
|
469
|
-
*/
|
|
470
477
|
defaults: () => Object.freeze(defaults())
|
|
471
478
|
});
|
|
472
479
|
})();
|
|
473
|
-
const
|
|
474
|
-
class FFIConverter extends
|
|
480
|
+
const FfiConverterTypeChangeOutputAndFees = (() => {
|
|
481
|
+
class FFIConverter extends _core.AbstractFfiConverterByteArray {
|
|
475
482
|
read(from) {
|
|
476
483
|
return {
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
remoteFundPubkey: FfiConverterArrayUInt8.read(from),
|
|
481
|
-
fundAmount: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
|
|
482
|
-
maxWitnessLen: _uniffiBindgenReactNative.FfiConverterUInt32.read(from),
|
|
483
|
-
inputSerialId: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
|
|
484
|
-
contractId: FfiConverterArrayUInt8.read(from)
|
|
484
|
+
changeOutput: FfiConverterTypeTxOutput.read(from),
|
|
485
|
+
fundFee: _core.FfiConverterUInt64.read(from),
|
|
486
|
+
cetFee: _core.FfiConverterUInt64.read(from)
|
|
485
487
|
};
|
|
486
488
|
}
|
|
487
489
|
write(value, into) {
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
FfiConverterArrayUInt8.write(value.remoteFundPubkey, into);
|
|
492
|
-
_uniffiBindgenReactNative.FfiConverterUInt64.write(value.fundAmount, into);
|
|
493
|
-
_uniffiBindgenReactNative.FfiConverterUInt32.write(value.maxWitnessLen, into);
|
|
494
|
-
_uniffiBindgenReactNative.FfiConverterUInt64.write(value.inputSerialId, into);
|
|
495
|
-
FfiConverterArrayUInt8.write(value.contractId, into);
|
|
490
|
+
FfiConverterTypeTxOutput.write(value.changeOutput, into);
|
|
491
|
+
_core.FfiConverterUInt64.write(value.fundFee, into);
|
|
492
|
+
_core.FfiConverterUInt64.write(value.cetFee, into);
|
|
496
493
|
}
|
|
497
494
|
allocationSize(value) {
|
|
498
|
-
return
|
|
495
|
+
return FfiConverterTypeTxOutput.allocationSize(value.changeOutput) + _core.FfiConverterUInt64.allocationSize(value.fundFee) + _core.FfiConverterUInt64.allocationSize(value.cetFee);
|
|
499
496
|
}
|
|
500
497
|
}
|
|
501
|
-
;
|
|
502
498
|
return new FFIConverter();
|
|
503
499
|
})();
|
|
504
500
|
/**
|
|
505
|
-
* Generated factory for {@link
|
|
501
|
+
* Generated factory for {@link TxInput} record objects.
|
|
506
502
|
*/
|
|
507
|
-
const
|
|
503
|
+
const TxInput = exports.TxInput = (() => {
|
|
508
504
|
const defaults = () => ({});
|
|
509
505
|
const create = (() => {
|
|
510
|
-
return (0,
|
|
506
|
+
return (0, _core.uniffiCreateRecord)(defaults);
|
|
511
507
|
})();
|
|
512
508
|
return Object.freeze({
|
|
513
|
-
/**
|
|
514
|
-
* Create a frozen instance of {@link DlcTransactions}, with defaults specified
|
|
515
|
-
* in Rust, in the {@link ddk_ffi} crate.
|
|
516
|
-
*/
|
|
517
509
|
create,
|
|
518
|
-
/**
|
|
519
|
-
* Create a frozen instance of {@link DlcTransactions}, with defaults specified
|
|
520
|
-
* in Rust, in the {@link ddk_ffi} crate.
|
|
521
|
-
*/
|
|
522
510
|
new: create,
|
|
523
|
-
/**
|
|
524
|
-
* Defaults specified in the {@link ddk_ffi} crate.
|
|
525
|
-
*/
|
|
526
511
|
defaults: () => Object.freeze(defaults())
|
|
527
512
|
});
|
|
528
513
|
})();
|
|
529
|
-
const
|
|
530
|
-
class FFIConverter extends
|
|
514
|
+
const FfiConverterTypeTxInput = (() => {
|
|
515
|
+
class FFIConverter extends _core.AbstractFfiConverterByteArray {
|
|
531
516
|
read(from) {
|
|
532
517
|
return {
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
518
|
+
txid: FfiConverterString.read(from),
|
|
519
|
+
vout: _core.FfiConverterUInt32.read(from),
|
|
520
|
+
scriptSig: _core.FfiConverterArrayBuffer.read(from),
|
|
521
|
+
sequence: _core.FfiConverterUInt32.read(from),
|
|
522
|
+
witness: FfiConverterSequenceBytes.read(from)
|
|
537
523
|
};
|
|
538
524
|
}
|
|
539
525
|
write(value, into) {
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
526
|
+
FfiConverterString.write(value.txid, into);
|
|
527
|
+
_core.FfiConverterUInt32.write(value.vout, into);
|
|
528
|
+
_core.FfiConverterArrayBuffer.write(value.scriptSig, into);
|
|
529
|
+
_core.FfiConverterUInt32.write(value.sequence, into);
|
|
530
|
+
FfiConverterSequenceBytes.write(value.witness, into);
|
|
544
531
|
}
|
|
545
532
|
allocationSize(value) {
|
|
546
|
-
return
|
|
533
|
+
return FfiConverterString.allocationSize(value.txid) + _core.FfiConverterUInt32.allocationSize(value.vout) + _core.FfiConverterArrayBuffer.allocationSize(value.scriptSig) + _core.FfiConverterUInt32.allocationSize(value.sequence) + FfiConverterSequenceBytes.allocationSize(value.witness);
|
|
547
534
|
}
|
|
548
535
|
}
|
|
549
|
-
;
|
|
550
536
|
return new FFIConverter();
|
|
551
537
|
})();
|
|
552
538
|
/**
|
|
553
|
-
* Generated factory for {@link
|
|
539
|
+
* Generated factory for {@link Transaction} record objects.
|
|
554
540
|
*/
|
|
555
|
-
const
|
|
541
|
+
const Transaction = exports.Transaction = (() => {
|
|
556
542
|
const defaults = () => ({});
|
|
557
543
|
const create = (() => {
|
|
558
|
-
return (0,
|
|
544
|
+
return (0, _core.uniffiCreateRecord)(defaults);
|
|
559
545
|
})();
|
|
560
546
|
return Object.freeze({
|
|
561
|
-
/**
|
|
562
|
-
* Create a frozen instance of {@link OracleInfo}, with defaults specified
|
|
563
|
-
* in Rust, in the {@link ddk_ffi} crate.
|
|
564
|
-
*/
|
|
565
547
|
create,
|
|
566
|
-
/**
|
|
567
|
-
* Create a frozen instance of {@link OracleInfo}, with defaults specified
|
|
568
|
-
* in Rust, in the {@link ddk_ffi} crate.
|
|
569
|
-
*/
|
|
570
548
|
new: create,
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
549
|
+
defaults: () => Object.freeze(defaults()),
|
|
550
|
+
addSignature(self_, signature, pubkey, inputIndex) {
|
|
551
|
+
return (__rb => {
|
|
552
|
+
try {
|
|
553
|
+
return FfiConverterTypeTransaction.lift(__rb);
|
|
554
|
+
} finally {
|
|
555
|
+
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
556
|
+
}
|
|
557
|
+
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
558
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_method_transaction_add_signature(FfiConverterTypeTransaction.lower(self_, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterArrayBuffer.lower(signature, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterArrayBuffer.lower(pubkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt32.lower(inputIndex, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
559
|
+
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
560
|
+
},
|
|
561
|
+
cetAdaptorSignatureFromOracleInfo(self_, oracleInfo, fundingSk, fundingScriptPubkey, totalCollateral, msgs) {
|
|
562
|
+
return (__rb => {
|
|
563
|
+
try {
|
|
564
|
+
return FfiConverterTypeAdaptorSignature.lift(__rb);
|
|
565
|
+
} finally {
|
|
566
|
+
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
567
|
+
}
|
|
568
|
+
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
569
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_method_transaction_cet_adaptor_signature_from_oracle_info(FfiConverterTypeTransaction.lower(self_, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterTypeOracleInfo.lower(oracleInfo, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterArrayBuffer.lower(fundingSk, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterArrayBuffer.lower(fundingScriptPubkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt64.lower(totalCollateral, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterSequenceBytes.lower(msgs, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
570
|
+
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
571
|
+
},
|
|
572
|
+
cetAdaptorSignatureInputs(self_, oracleInfo, fundingScriptPubkey, fundOutputValue, msgs) {
|
|
573
|
+
return (__rb => {
|
|
574
|
+
try {
|
|
575
|
+
return FfiConverterTypeCetAdaptorSignatureDebugInfo.lift(__rb);
|
|
576
|
+
} finally {
|
|
577
|
+
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
578
|
+
}
|
|
579
|
+
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
580
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_method_transaction_cet_adaptor_signature_inputs(FfiConverterTypeTransaction.lower(self_, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterSequenceTypeOracleInfo.lower(oracleInfo, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterArrayBuffer.lower(fundingScriptPubkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt64.lower(fundOutputValue, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterSequenceSequenceBytes.lower(msgs, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
581
|
+
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
582
|
+
},
|
|
583
|
+
cetSighash(self_, fundingScriptPubkey, fundOutputValue) {
|
|
584
|
+
return (__rb => {
|
|
585
|
+
try {
|
|
586
|
+
return _core.FfiConverterArrayBuffer.lift(__rb);
|
|
587
|
+
} finally {
|
|
588
|
+
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
589
|
+
}
|
|
590
|
+
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
591
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_method_transaction_cet_sighash(FfiConverterTypeTransaction.lower(self_, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterArrayBuffer.lower(fundingScriptPubkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt64.lower(fundOutputValue, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
592
|
+
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
593
|
+
},
|
|
594
|
+
rawFundingInputSignature(self_, privkey, prevTxId, prevTxVout, value) {
|
|
595
|
+
return (__rb => {
|
|
596
|
+
try {
|
|
597
|
+
return _core.FfiConverterArrayBuffer.lift(__rb);
|
|
598
|
+
} finally {
|
|
599
|
+
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
600
|
+
}
|
|
601
|
+
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
602
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_method_transaction_raw_funding_input_signature(FfiConverterTypeTransaction.lower(self_, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterArrayBuffer.lower(privkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterString.lower(prevTxId, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt32.lower(prevTxVout, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt64.lower(value, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
603
|
+
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
604
|
+
},
|
|
605
|
+
signCet(self_, adaptorSignature, oracleSignatures, fundingSecretKey, otherPubkey, fundingScriptPubkey, fundOutputValue) {
|
|
606
|
+
return (__rb => {
|
|
607
|
+
try {
|
|
608
|
+
return FfiConverterTypeTransaction.lift(__rb);
|
|
609
|
+
} finally {
|
|
610
|
+
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
611
|
+
}
|
|
612
|
+
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
613
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_method_transaction_sign_cet(FfiConverterTypeTransaction.lower(self_, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterArrayBuffer.lower(adaptorSignature, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterSequenceBytes.lower(oracleSignatures, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterArrayBuffer.lower(fundingSecretKey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterArrayBuffer.lower(otherPubkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterArrayBuffer.lower(fundingScriptPubkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt64.lower(fundOutputValue, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
614
|
+
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
615
|
+
},
|
|
616
|
+
signFundInput(self_, privkey, prevTxId, prevTxVout, value) {
|
|
617
|
+
return (__rb => {
|
|
618
|
+
try {
|
|
619
|
+
return FfiConverterTypeTransaction.lift(__rb);
|
|
620
|
+
} finally {
|
|
621
|
+
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
622
|
+
}
|
|
623
|
+
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
624
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_method_transaction_sign_fund_input(FfiConverterTypeTransaction.lower(self_, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterArrayBuffer.lower(privkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterString.lower(prevTxId, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt32.lower(prevTxVout, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt64.lower(value, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
625
|
+
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
626
|
+
},
|
|
627
|
+
signMultiSigInput(self_, dlcInput, localPrivkey, remoteSignature) {
|
|
628
|
+
return (__rb => {
|
|
629
|
+
try {
|
|
630
|
+
return FfiConverterTypeTransaction.lift(__rb);
|
|
631
|
+
} finally {
|
|
632
|
+
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
633
|
+
}
|
|
634
|
+
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
635
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_method_transaction_sign_multi_sig_input(FfiConverterTypeTransaction.lower(self_, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterTypeDlcInputInfo.lower(dlcInput, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterArrayBuffer.lower(localPrivkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterArrayBuffer.lower(remoteSignature, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
636
|
+
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
637
|
+
},
|
|
638
|
+
verifyFundSignature(self_, signature, pubkey, txid, vout, inputAmount) {
|
|
639
|
+
return _core.FfiConverterBool.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
640
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_method_transaction_verify_fund_signature(FfiConverterTypeTransaction.lower(self_, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterArrayBuffer.lower(signature, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterArrayBuffer.lower(pubkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterString.lower(txid, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt32.lower(vout, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt64.lower(inputAmount, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
641
|
+
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
642
|
+
}
|
|
575
643
|
});
|
|
576
644
|
})();
|
|
577
|
-
const
|
|
578
|
-
class FFIConverter extends
|
|
645
|
+
const FfiConverterTypeTransaction = (() => {
|
|
646
|
+
class FFIConverter extends _core.AbstractFfiConverterByteArray {
|
|
579
647
|
read(from) {
|
|
580
648
|
return {
|
|
581
|
-
|
|
582
|
-
|
|
649
|
+
version: _core.FfiConverterInt32.read(from),
|
|
650
|
+
lockTime: _core.FfiConverterUInt32.read(from),
|
|
651
|
+
inputs: FfiConverterSequenceTypeTxInput.read(from),
|
|
652
|
+
outputs: FfiConverterSequenceTypeTxOutput.read(from),
|
|
653
|
+
rawBytes: _core.FfiConverterArrayBuffer.read(from)
|
|
583
654
|
};
|
|
584
655
|
}
|
|
585
656
|
write(value, into) {
|
|
586
|
-
|
|
587
|
-
|
|
657
|
+
_core.FfiConverterInt32.write(value.version, into);
|
|
658
|
+
_core.FfiConverterUInt32.write(value.lockTime, into);
|
|
659
|
+
FfiConverterSequenceTypeTxInput.write(value.inputs, into);
|
|
660
|
+
FfiConverterSequenceTypeTxOutput.write(value.outputs, into);
|
|
661
|
+
_core.FfiConverterArrayBuffer.write(value.rawBytes, into);
|
|
588
662
|
}
|
|
589
663
|
allocationSize(value) {
|
|
590
|
-
return
|
|
664
|
+
return _core.FfiConverterInt32.allocationSize(value.version) + _core.FfiConverterUInt32.allocationSize(value.lockTime) + FfiConverterSequenceTypeTxInput.allocationSize(value.inputs) + FfiConverterSequenceTypeTxOutput.allocationSize(value.outputs) + _core.FfiConverterArrayBuffer.allocationSize(value.rawBytes);
|
|
591
665
|
}
|
|
592
666
|
}
|
|
593
|
-
;
|
|
594
667
|
return new FFIConverter();
|
|
595
668
|
})();
|
|
596
669
|
/**
|
|
597
|
-
* Generated factory for {@link
|
|
670
|
+
* Generated factory for {@link DlcInputInfo} record objects.
|
|
598
671
|
*/
|
|
599
|
-
const
|
|
672
|
+
const DlcInputInfo = exports.DlcInputInfo = (() => {
|
|
600
673
|
const defaults = () => ({});
|
|
601
674
|
const create = (() => {
|
|
602
|
-
return (0,
|
|
675
|
+
return (0, _core.uniffiCreateRecord)(defaults);
|
|
603
676
|
})();
|
|
604
677
|
return Object.freeze({
|
|
605
|
-
/**
|
|
606
|
-
* Create a frozen instance of {@link PartyParams}, with defaults specified
|
|
607
|
-
* in Rust, in the {@link ddk_ffi} crate.
|
|
608
|
-
*/
|
|
609
678
|
create,
|
|
610
|
-
/**
|
|
611
|
-
* Create a frozen instance of {@link PartyParams}, with defaults specified
|
|
612
|
-
* in Rust, in the {@link ddk_ffi} crate.
|
|
613
|
-
*/
|
|
614
679
|
new: create,
|
|
615
|
-
/**
|
|
616
|
-
* Defaults specified in the {@link ddk_ffi} crate.
|
|
617
|
-
*/
|
|
618
680
|
defaults: () => Object.freeze(defaults())
|
|
619
681
|
});
|
|
620
682
|
})();
|
|
621
|
-
const
|
|
622
|
-
class FFIConverter extends
|
|
683
|
+
const FfiConverterTypeDlcInputInfo = (() => {
|
|
684
|
+
class FFIConverter extends _core.AbstractFfiConverterByteArray {
|
|
623
685
|
read(from) {
|
|
624
686
|
return {
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
dlcInputs: FfiConverterArrayTypeDlcInputInfo.read(from)
|
|
687
|
+
fundTx: FfiConverterTypeTransaction.read(from),
|
|
688
|
+
fundVout: _core.FfiConverterUInt32.read(from),
|
|
689
|
+
localFundPubkey: _core.FfiConverterArrayBuffer.read(from),
|
|
690
|
+
remoteFundPubkey: _core.FfiConverterArrayBuffer.read(from),
|
|
691
|
+
fundAmount: _core.FfiConverterUInt64.read(from),
|
|
692
|
+
maxWitnessLen: _core.FfiConverterUInt32.read(from),
|
|
693
|
+
inputSerialId: _core.FfiConverterUInt64.read(from),
|
|
694
|
+
contractId: _core.FfiConverterArrayBuffer.read(from)
|
|
634
695
|
};
|
|
635
696
|
}
|
|
636
697
|
write(value, into) {
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
FfiConverterArrayTypeDlcInputInfo.write(value.dlcInputs, into);
|
|
698
|
+
FfiConverterTypeTransaction.write(value.fundTx, into);
|
|
699
|
+
_core.FfiConverterUInt32.write(value.fundVout, into);
|
|
700
|
+
_core.FfiConverterArrayBuffer.write(value.localFundPubkey, into);
|
|
701
|
+
_core.FfiConverterArrayBuffer.write(value.remoteFundPubkey, into);
|
|
702
|
+
_core.FfiConverterUInt64.write(value.fundAmount, into);
|
|
703
|
+
_core.FfiConverterUInt32.write(value.maxWitnessLen, into);
|
|
704
|
+
_core.FfiConverterUInt64.write(value.inputSerialId, into);
|
|
705
|
+
_core.FfiConverterArrayBuffer.write(value.contractId, into);
|
|
646
706
|
}
|
|
647
707
|
allocationSize(value) {
|
|
648
|
-
return
|
|
708
|
+
return FfiConverterTypeTransaction.allocationSize(value.fundTx) + _core.FfiConverterUInt32.allocationSize(value.fundVout) + _core.FfiConverterArrayBuffer.allocationSize(value.localFundPubkey) + _core.FfiConverterArrayBuffer.allocationSize(value.remoteFundPubkey) + _core.FfiConverterUInt64.allocationSize(value.fundAmount) + _core.FfiConverterUInt32.allocationSize(value.maxWitnessLen) + _core.FfiConverterUInt64.allocationSize(value.inputSerialId) + _core.FfiConverterArrayBuffer.allocationSize(value.contractId);
|
|
649
709
|
}
|
|
650
710
|
}
|
|
651
|
-
;
|
|
652
711
|
return new FFIConverter();
|
|
653
712
|
})();
|
|
654
713
|
/**
|
|
655
|
-
* Generated factory for {@link
|
|
714
|
+
* Generated factory for {@link DlcTransactions} record objects.
|
|
656
715
|
*/
|
|
657
|
-
const
|
|
716
|
+
const DlcTransactions = exports.DlcTransactions = (() => {
|
|
658
717
|
const defaults = () => ({});
|
|
659
718
|
const create = (() => {
|
|
660
|
-
return (0,
|
|
719
|
+
return (0, _core.uniffiCreateRecord)(defaults);
|
|
661
720
|
})();
|
|
662
721
|
return Object.freeze({
|
|
663
|
-
/**
|
|
664
|
-
* Create a frozen instance of {@link Payout}, with defaults specified
|
|
665
|
-
* in Rust, in the {@link ddk_ffi} crate.
|
|
666
|
-
*/
|
|
667
722
|
create,
|
|
668
|
-
/**
|
|
669
|
-
* Create a frozen instance of {@link Payout}, with defaults specified
|
|
670
|
-
* in Rust, in the {@link ddk_ffi} crate.
|
|
671
|
-
*/
|
|
672
723
|
new: create,
|
|
673
|
-
/**
|
|
674
|
-
* Defaults specified in the {@link ddk_ffi} crate.
|
|
675
|
-
*/
|
|
676
724
|
defaults: () => Object.freeze(defaults())
|
|
677
725
|
});
|
|
678
726
|
})();
|
|
679
|
-
const
|
|
680
|
-
class FFIConverter extends
|
|
727
|
+
const FfiConverterTypeDlcTransactions = (() => {
|
|
728
|
+
class FFIConverter extends _core.AbstractFfiConverterByteArray {
|
|
681
729
|
read(from) {
|
|
682
730
|
return {
|
|
683
|
-
|
|
684
|
-
|
|
731
|
+
fund: FfiConverterTypeTransaction.read(from),
|
|
732
|
+
cets: FfiConverterSequenceTypeTransaction.read(from),
|
|
733
|
+
refund: FfiConverterTypeTransaction.read(from),
|
|
734
|
+
fundingScriptPubkey: _core.FfiConverterArrayBuffer.read(from)
|
|
685
735
|
};
|
|
686
736
|
}
|
|
687
737
|
write(value, into) {
|
|
688
|
-
|
|
689
|
-
|
|
738
|
+
FfiConverterTypeTransaction.write(value.fund, into);
|
|
739
|
+
FfiConverterSequenceTypeTransaction.write(value.cets, into);
|
|
740
|
+
FfiConverterTypeTransaction.write(value.refund, into);
|
|
741
|
+
_core.FfiConverterArrayBuffer.write(value.fundingScriptPubkey, into);
|
|
690
742
|
}
|
|
691
743
|
allocationSize(value) {
|
|
692
|
-
return
|
|
744
|
+
return FfiConverterTypeTransaction.allocationSize(value.fund) + FfiConverterSequenceTypeTransaction.allocationSize(value.cets) + FfiConverterTypeTransaction.allocationSize(value.refund) + _core.FfiConverterArrayBuffer.allocationSize(value.fundingScriptPubkey);
|
|
693
745
|
}
|
|
694
746
|
}
|
|
695
|
-
;
|
|
696
747
|
return new FFIConverter();
|
|
697
748
|
})();
|
|
698
749
|
/**
|
|
699
|
-
* Generated factory for {@link
|
|
750
|
+
* Generated factory for {@link OracleInfo} record objects.
|
|
700
751
|
*/
|
|
701
|
-
const
|
|
752
|
+
const OracleInfo = exports.OracleInfo = (() => {
|
|
702
753
|
const defaults = () => ({});
|
|
703
754
|
const create = (() => {
|
|
704
|
-
return (0,
|
|
755
|
+
return (0, _core.uniffiCreateRecord)(defaults);
|
|
705
756
|
})();
|
|
706
757
|
return Object.freeze({
|
|
707
|
-
/**
|
|
708
|
-
* Create a frozen instance of {@link Transaction}, with defaults specified
|
|
709
|
-
* in Rust, in the {@link ddk_ffi} crate.
|
|
710
|
-
*/
|
|
711
758
|
create,
|
|
712
|
-
/**
|
|
713
|
-
* Create a frozen instance of {@link Transaction}, with defaults specified
|
|
714
|
-
* in Rust, in the {@link ddk_ffi} crate.
|
|
715
|
-
*/
|
|
716
759
|
new: create,
|
|
717
|
-
/**
|
|
718
|
-
* Defaults specified in the {@link ddk_ffi} crate.
|
|
719
|
-
*/
|
|
720
760
|
defaults: () => Object.freeze(defaults())
|
|
721
761
|
});
|
|
722
762
|
})();
|
|
723
|
-
const
|
|
724
|
-
class FFIConverter extends
|
|
763
|
+
const FfiConverterTypeOracleInfo = (() => {
|
|
764
|
+
class FFIConverter extends _core.AbstractFfiConverterByteArray {
|
|
725
765
|
read(from) {
|
|
726
766
|
return {
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
inputs: FfiConverterArrayTypeTxInput.read(from),
|
|
730
|
-
outputs: FfiConverterArrayTypeTxOutput.read(from),
|
|
731
|
-
rawBytes: FfiConverterArrayUInt8.read(from)
|
|
767
|
+
publicKey: _core.FfiConverterArrayBuffer.read(from),
|
|
768
|
+
nonces: FfiConverterSequenceBytes.read(from)
|
|
732
769
|
};
|
|
733
770
|
}
|
|
734
771
|
write(value, into) {
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
FfiConverterArrayTypeTxInput.write(value.inputs, into);
|
|
738
|
-
FfiConverterArrayTypeTxOutput.write(value.outputs, into);
|
|
739
|
-
FfiConverterArrayUInt8.write(value.rawBytes, into);
|
|
772
|
+
_core.FfiConverterArrayBuffer.write(value.publicKey, into);
|
|
773
|
+
FfiConverterSequenceBytes.write(value.nonces, into);
|
|
740
774
|
}
|
|
741
775
|
allocationSize(value) {
|
|
742
|
-
return
|
|
776
|
+
return _core.FfiConverterArrayBuffer.allocationSize(value.publicKey) + FfiConverterSequenceBytes.allocationSize(value.nonces);
|
|
743
777
|
}
|
|
744
778
|
}
|
|
745
|
-
;
|
|
746
779
|
return new FFIConverter();
|
|
747
780
|
})();
|
|
748
781
|
/**
|
|
749
|
-
* Generated factory for {@link
|
|
782
|
+
* Generated factory for {@link TxInputInfo} record objects.
|
|
750
783
|
*/
|
|
751
|
-
const
|
|
784
|
+
const TxInputInfo = exports.TxInputInfo = (() => {
|
|
752
785
|
const defaults = () => ({});
|
|
753
786
|
const create = (() => {
|
|
754
|
-
return (0,
|
|
787
|
+
return (0, _core.uniffiCreateRecord)(defaults);
|
|
755
788
|
})();
|
|
756
789
|
return Object.freeze({
|
|
757
|
-
/**
|
|
758
|
-
* Create a frozen instance of {@link TxInput}, with defaults specified
|
|
759
|
-
* in Rust, in the {@link ddk_ffi} crate.
|
|
760
|
-
*/
|
|
761
790
|
create,
|
|
762
|
-
/**
|
|
763
|
-
* Create a frozen instance of {@link TxInput}, with defaults specified
|
|
764
|
-
* in Rust, in the {@link ddk_ffi} crate.
|
|
765
|
-
*/
|
|
766
791
|
new: create,
|
|
767
|
-
/**
|
|
768
|
-
* Defaults specified in the {@link ddk_ffi} crate.
|
|
769
|
-
*/
|
|
770
792
|
defaults: () => Object.freeze(defaults())
|
|
771
793
|
});
|
|
772
794
|
})();
|
|
773
|
-
const
|
|
774
|
-
class FFIConverter extends
|
|
795
|
+
const FfiConverterTypeTxInputInfo = (() => {
|
|
796
|
+
class FFIConverter extends _core.AbstractFfiConverterByteArray {
|
|
775
797
|
read(from) {
|
|
776
798
|
return {
|
|
777
799
|
txid: FfiConverterString.read(from),
|
|
778
|
-
vout:
|
|
779
|
-
scriptSig:
|
|
780
|
-
|
|
781
|
-
|
|
800
|
+
vout: _core.FfiConverterUInt32.read(from),
|
|
801
|
+
scriptSig: _core.FfiConverterArrayBuffer.read(from),
|
|
802
|
+
maxWitnessLength: _core.FfiConverterUInt32.read(from),
|
|
803
|
+
serialId: _core.FfiConverterUInt64.read(from)
|
|
782
804
|
};
|
|
783
805
|
}
|
|
784
806
|
write(value, into) {
|
|
785
807
|
FfiConverterString.write(value.txid, into);
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
808
|
+
_core.FfiConverterUInt32.write(value.vout, into);
|
|
809
|
+
_core.FfiConverterArrayBuffer.write(value.scriptSig, into);
|
|
810
|
+
_core.FfiConverterUInt32.write(value.maxWitnessLength, into);
|
|
811
|
+
_core.FfiConverterUInt64.write(value.serialId, into);
|
|
790
812
|
}
|
|
791
813
|
allocationSize(value) {
|
|
792
|
-
return FfiConverterString.allocationSize(value.txid) +
|
|
814
|
+
return FfiConverterString.allocationSize(value.txid) + _core.FfiConverterUInt32.allocationSize(value.vout) + _core.FfiConverterArrayBuffer.allocationSize(value.scriptSig) + _core.FfiConverterUInt32.allocationSize(value.maxWitnessLength) + _core.FfiConverterUInt64.allocationSize(value.serialId);
|
|
793
815
|
}
|
|
794
816
|
}
|
|
795
|
-
;
|
|
796
817
|
return new FFIConverter();
|
|
797
818
|
})();
|
|
798
819
|
/**
|
|
799
|
-
* Generated factory for {@link
|
|
820
|
+
* Generated factory for {@link PartyParams} record objects.
|
|
800
821
|
*/
|
|
801
|
-
const
|
|
822
|
+
const PartyParams = exports.PartyParams = (() => {
|
|
802
823
|
const defaults = () => ({});
|
|
803
824
|
const create = (() => {
|
|
804
|
-
return (0,
|
|
825
|
+
return (0, _core.uniffiCreateRecord)(defaults);
|
|
805
826
|
})();
|
|
806
827
|
return Object.freeze({
|
|
807
|
-
/**
|
|
808
|
-
* Create a frozen instance of {@link TxInputInfo}, with defaults specified
|
|
809
|
-
* in Rust, in the {@link ddk_ffi} crate.
|
|
810
|
-
*/
|
|
811
828
|
create,
|
|
812
|
-
/**
|
|
813
|
-
* Create a frozen instance of {@link TxInputInfo}, with defaults specified
|
|
814
|
-
* in Rust, in the {@link ddk_ffi} crate.
|
|
815
|
-
*/
|
|
816
829
|
new: create,
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
830
|
+
defaults: () => Object.freeze(defaults()),
|
|
831
|
+
changeOutputAndFees(self_, feeRate) {
|
|
832
|
+
return (__rb => {
|
|
833
|
+
try {
|
|
834
|
+
return FfiConverterTypeChangeOutputAndFees.lift(__rb);
|
|
835
|
+
} finally {
|
|
836
|
+
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
837
|
+
}
|
|
838
|
+
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
839
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_method_partyparams_change_output_and_fees(FfiConverterTypePartyParams.lower(self_, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt64.lower(feeRate, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
840
|
+
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
841
|
+
}
|
|
821
842
|
});
|
|
822
843
|
})();
|
|
823
|
-
const
|
|
824
|
-
class FFIConverter extends
|
|
844
|
+
const FfiConverterTypePartyParams = (() => {
|
|
845
|
+
class FFIConverter extends _core.AbstractFfiConverterByteArray {
|
|
825
846
|
read(from) {
|
|
826
847
|
return {
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
848
|
+
fundPubkey: _core.FfiConverterArrayBuffer.read(from),
|
|
849
|
+
changeScriptPubkey: _core.FfiConverterArrayBuffer.read(from),
|
|
850
|
+
changeSerialId: _core.FfiConverterUInt64.read(from),
|
|
851
|
+
payoutScriptPubkey: _core.FfiConverterArrayBuffer.read(from),
|
|
852
|
+
payoutSerialId: _core.FfiConverterUInt64.read(from),
|
|
853
|
+
inputs: FfiConverterSequenceTypeTxInputInfo.read(from),
|
|
854
|
+
inputAmount: _core.FfiConverterUInt64.read(from),
|
|
855
|
+
collateral: _core.FfiConverterUInt64.read(from),
|
|
856
|
+
dlcInputs: FfiConverterSequenceTypeDlcInputInfo.read(from)
|
|
832
857
|
};
|
|
833
858
|
}
|
|
834
859
|
write(value, into) {
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
860
|
+
_core.FfiConverterArrayBuffer.write(value.fundPubkey, into);
|
|
861
|
+
_core.FfiConverterArrayBuffer.write(value.changeScriptPubkey, into);
|
|
862
|
+
_core.FfiConverterUInt64.write(value.changeSerialId, into);
|
|
863
|
+
_core.FfiConverterArrayBuffer.write(value.payoutScriptPubkey, into);
|
|
864
|
+
_core.FfiConverterUInt64.write(value.payoutSerialId, into);
|
|
865
|
+
FfiConverterSequenceTypeTxInputInfo.write(value.inputs, into);
|
|
866
|
+
_core.FfiConverterUInt64.write(value.inputAmount, into);
|
|
867
|
+
_core.FfiConverterUInt64.write(value.collateral, into);
|
|
868
|
+
FfiConverterSequenceTypeDlcInputInfo.write(value.dlcInputs, into);
|
|
840
869
|
}
|
|
841
870
|
allocationSize(value) {
|
|
842
|
-
return
|
|
871
|
+
return _core.FfiConverterArrayBuffer.allocationSize(value.fundPubkey) + _core.FfiConverterArrayBuffer.allocationSize(value.changeScriptPubkey) + _core.FfiConverterUInt64.allocationSize(value.changeSerialId) + _core.FfiConverterArrayBuffer.allocationSize(value.payoutScriptPubkey) + _core.FfiConverterUInt64.allocationSize(value.payoutSerialId) + FfiConverterSequenceTypeTxInputInfo.allocationSize(value.inputs) + _core.FfiConverterUInt64.allocationSize(value.inputAmount) + _core.FfiConverterUInt64.allocationSize(value.collateral) + FfiConverterSequenceTypeDlcInputInfo.allocationSize(value.dlcInputs);
|
|
843
872
|
}
|
|
844
873
|
}
|
|
845
|
-
;
|
|
846
874
|
return new FFIConverter();
|
|
847
875
|
})();
|
|
848
876
|
/**
|
|
849
|
-
* Generated factory for {@link
|
|
877
|
+
* Generated factory for {@link Payout} record objects.
|
|
850
878
|
*/
|
|
851
|
-
const
|
|
879
|
+
const Payout = exports.Payout = (() => {
|
|
852
880
|
const defaults = () => ({});
|
|
853
881
|
const create = (() => {
|
|
854
|
-
return (0,
|
|
882
|
+
return (0, _core.uniffiCreateRecord)(defaults);
|
|
855
883
|
})();
|
|
856
884
|
return Object.freeze({
|
|
857
|
-
/**
|
|
858
|
-
* Create a frozen instance of {@link TxOutput}, with defaults specified
|
|
859
|
-
* in Rust, in the {@link ddk_ffi} crate.
|
|
860
|
-
*/
|
|
861
885
|
create,
|
|
862
|
-
/**
|
|
863
|
-
* Create a frozen instance of {@link TxOutput}, with defaults specified
|
|
864
|
-
* in Rust, in the {@link ddk_ffi} crate.
|
|
865
|
-
*/
|
|
866
886
|
new: create,
|
|
867
|
-
/**
|
|
868
|
-
* Defaults specified in the {@link ddk_ffi} crate.
|
|
869
|
-
*/
|
|
870
887
|
defaults: () => Object.freeze(defaults())
|
|
871
888
|
});
|
|
872
889
|
})();
|
|
873
|
-
const
|
|
874
|
-
class FFIConverter extends
|
|
890
|
+
const FfiConverterTypePayout = (() => {
|
|
891
|
+
class FFIConverter extends _core.AbstractFfiConverterByteArray {
|
|
875
892
|
read(from) {
|
|
876
893
|
return {
|
|
877
|
-
|
|
878
|
-
|
|
894
|
+
offer: _core.FfiConverterUInt64.read(from),
|
|
895
|
+
accept: _core.FfiConverterUInt64.read(from)
|
|
879
896
|
};
|
|
880
897
|
}
|
|
881
898
|
write(value, into) {
|
|
882
|
-
|
|
883
|
-
|
|
899
|
+
_core.FfiConverterUInt64.write(value.offer, into);
|
|
900
|
+
_core.FfiConverterUInt64.write(value.accept, into);
|
|
901
|
+
}
|
|
902
|
+
allocationSize(value) {
|
|
903
|
+
return _core.FfiConverterUInt64.allocationSize(value.offer) + _core.FfiConverterUInt64.allocationSize(value.accept);
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
return new FFIConverter();
|
|
907
|
+
})();
|
|
908
|
+
let ExtendedKey = exports.ExtendedKey = /*#__PURE__*/function (ExtendedKey) {
|
|
909
|
+
ExtendedKey[ExtendedKey["InvalidMnemonic"] = 0] = "InvalidMnemonic";
|
|
910
|
+
ExtendedKey[ExtendedKey["InvalidXpriv"] = 1] = "InvalidXpriv";
|
|
911
|
+
ExtendedKey[ExtendedKey["InvalidXpub"] = 2] = "InvalidXpub";
|
|
912
|
+
ExtendedKey[ExtendedKey["InvalidDerivationPath"] = 3] = "InvalidDerivationPath";
|
|
913
|
+
return ExtendedKey;
|
|
914
|
+
}({});
|
|
915
|
+
const FfiConverterTypeExtendedKey = (() => {
|
|
916
|
+
const ordinalConverter = _core.FfiConverterInt32;
|
|
917
|
+
class FFIConverter extends _core.AbstractFfiConverterByteArray {
|
|
918
|
+
read(from) {
|
|
919
|
+
switch (ordinalConverter.read(from)) {
|
|
920
|
+
case 1:
|
|
921
|
+
return ExtendedKey.InvalidMnemonic;
|
|
922
|
+
case 2:
|
|
923
|
+
return ExtendedKey.InvalidXpriv;
|
|
924
|
+
case 3:
|
|
925
|
+
return ExtendedKey.InvalidXpub;
|
|
926
|
+
case 4:
|
|
927
|
+
return ExtendedKey.InvalidDerivationPath;
|
|
928
|
+
default:
|
|
929
|
+
throw new _core.UniffiInternalError.UnexpectedEnumCase();
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
write(value, into) {
|
|
933
|
+
switch (value) {
|
|
934
|
+
case ExtendedKey.InvalidMnemonic:
|
|
935
|
+
return ordinalConverter.write(1, into);
|
|
936
|
+
case ExtendedKey.InvalidXpriv:
|
|
937
|
+
return ordinalConverter.write(2, into);
|
|
938
|
+
case ExtendedKey.InvalidXpub:
|
|
939
|
+
return ordinalConverter.write(3, into);
|
|
940
|
+
case ExtendedKey.InvalidDerivationPath:
|
|
941
|
+
return ordinalConverter.write(4, into);
|
|
942
|
+
}
|
|
884
943
|
}
|
|
885
944
|
allocationSize(value) {
|
|
886
|
-
return
|
|
945
|
+
return ordinalConverter.allocationSize(0);
|
|
887
946
|
}
|
|
888
947
|
}
|
|
889
|
-
;
|
|
890
948
|
return new FFIConverter();
|
|
891
949
|
})();
|
|
892
|
-
const stringConverter = {
|
|
893
|
-
stringToBytes: s => uniffiCaller.rustCall(status => (0, _ddk_ffiFfi.default)().ubrn_uniffi_internal_fn_func_ffi__string_to_arraybuffer(s, status)),
|
|
894
|
-
bytesToString: ab => uniffiCaller.rustCall(status => (0, _ddk_ffiFfi.default)().ubrn_uniffi_internal_fn_func_ffi__arraybuffer_to_string(ab, status)),
|
|
895
|
-
stringByteLength: s => uniffiCaller.rustCall(status => (0, _ddk_ffiFfi.default)().ubrn_uniffi_internal_fn_func_ffi__string_to_byte_length(s, status))
|
|
896
|
-
};
|
|
897
|
-
const FfiConverterString = (0, _uniffiBindgenReactNative.uniffiCreateFfiConverterString)(stringConverter);
|
|
898
950
|
|
|
899
|
-
//
|
|
951
|
+
// Error type: DlcError
|
|
900
952
|
let DlcError_Tags = exports.DlcError_Tags = /*#__PURE__*/function (DlcError_Tags) {
|
|
901
953
|
DlcError_Tags["InvalidSignature"] = "InvalidSignature";
|
|
902
954
|
DlcError_Tags["InvalidPublicKey"] = "InvalidPublicKey";
|
|
@@ -911,427 +963,428 @@ let DlcError_Tags = exports.DlcError_Tags = /*#__PURE__*/function (DlcError_Tags
|
|
|
911
963
|
return DlcError_Tags;
|
|
912
964
|
}({});
|
|
913
965
|
const DlcError = exports.DlcError = (() => {
|
|
914
|
-
class
|
|
915
|
-
/**
|
|
916
|
-
* @private
|
|
917
|
-
* This field is private and should not be used.
|
|
918
|
-
*/
|
|
919
|
-
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "DlcError";
|
|
966
|
+
class InvalidSignature_ extends _core.UniffiError {
|
|
920
967
|
/**
|
|
921
968
|
* @private
|
|
922
|
-
* This field is private and should not be used.
|
|
969
|
+
* This field is private and should not be used, use `tag` instead.
|
|
923
970
|
*/
|
|
924
|
-
[
|
|
971
|
+
[_core.uniffiTypeNameSymbol] = 'DlcError';
|
|
925
972
|
tag = DlcError_Tags.InvalidSignature;
|
|
926
|
-
constructor(
|
|
927
|
-
super(
|
|
973
|
+
constructor() {
|
|
974
|
+
super('DlcError', 'InvalidSignature');
|
|
975
|
+
}
|
|
976
|
+
static new() {
|
|
977
|
+
return new InvalidSignature_();
|
|
978
|
+
}
|
|
979
|
+
static instanceOf(obj) {
|
|
980
|
+
return obj.tag === DlcError_Tags.InvalidSignature;
|
|
928
981
|
}
|
|
929
|
-
static
|
|
930
|
-
return
|
|
982
|
+
static hasInner(obj) {
|
|
983
|
+
return false;
|
|
931
984
|
}
|
|
932
985
|
}
|
|
933
|
-
class
|
|
986
|
+
class InvalidPublicKey_ extends _core.UniffiError {
|
|
934
987
|
/**
|
|
935
988
|
* @private
|
|
936
|
-
* This field is private and should not be used.
|
|
989
|
+
* This field is private and should not be used, use `tag` instead.
|
|
937
990
|
*/
|
|
938
|
-
[
|
|
939
|
-
/**
|
|
940
|
-
* @private
|
|
941
|
-
* This field is private and should not be used.
|
|
942
|
-
*/
|
|
943
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 2;
|
|
991
|
+
[_core.uniffiTypeNameSymbol] = 'DlcError';
|
|
944
992
|
tag = DlcError_Tags.InvalidPublicKey;
|
|
945
|
-
constructor(
|
|
946
|
-
super(
|
|
993
|
+
constructor() {
|
|
994
|
+
super('DlcError', 'InvalidPublicKey');
|
|
995
|
+
}
|
|
996
|
+
static new() {
|
|
997
|
+
return new InvalidPublicKey_();
|
|
947
998
|
}
|
|
948
|
-
static instanceOf(
|
|
949
|
-
return
|
|
999
|
+
static instanceOf(obj) {
|
|
1000
|
+
return obj.tag === DlcError_Tags.InvalidPublicKey;
|
|
1001
|
+
}
|
|
1002
|
+
static hasInner(obj) {
|
|
1003
|
+
return false;
|
|
950
1004
|
}
|
|
951
1005
|
}
|
|
952
|
-
class
|
|
1006
|
+
class InvalidTransaction_ extends _core.UniffiError {
|
|
953
1007
|
/**
|
|
954
1008
|
* @private
|
|
955
|
-
* This field is private and should not be used.
|
|
1009
|
+
* This field is private and should not be used, use `tag` instead.
|
|
956
1010
|
*/
|
|
957
|
-
[
|
|
958
|
-
/**
|
|
959
|
-
* @private
|
|
960
|
-
* This field is private and should not be used.
|
|
961
|
-
*/
|
|
962
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 3;
|
|
1011
|
+
[_core.uniffiTypeNameSymbol] = 'DlcError';
|
|
963
1012
|
tag = DlcError_Tags.InvalidTransaction;
|
|
964
|
-
constructor(
|
|
965
|
-
super(
|
|
1013
|
+
constructor() {
|
|
1014
|
+
super('DlcError', 'InvalidTransaction');
|
|
1015
|
+
}
|
|
1016
|
+
static new() {
|
|
1017
|
+
return new InvalidTransaction_();
|
|
1018
|
+
}
|
|
1019
|
+
static instanceOf(obj) {
|
|
1020
|
+
return obj.tag === DlcError_Tags.InvalidTransaction;
|
|
966
1021
|
}
|
|
967
|
-
static
|
|
968
|
-
return
|
|
1022
|
+
static hasInner(obj) {
|
|
1023
|
+
return false;
|
|
969
1024
|
}
|
|
970
1025
|
}
|
|
971
|
-
class
|
|
972
|
-
/**
|
|
973
|
-
* @private
|
|
974
|
-
* This field is private and should not be used.
|
|
975
|
-
*/
|
|
976
|
-
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "DlcError";
|
|
1026
|
+
class InsufficientFunds_ extends _core.UniffiError {
|
|
977
1027
|
/**
|
|
978
1028
|
* @private
|
|
979
|
-
* This field is private and should not be used.
|
|
1029
|
+
* This field is private and should not be used, use `tag` instead.
|
|
980
1030
|
*/
|
|
981
|
-
[
|
|
1031
|
+
[_core.uniffiTypeNameSymbol] = 'DlcError';
|
|
982
1032
|
tag = DlcError_Tags.InsufficientFunds;
|
|
983
|
-
constructor(
|
|
984
|
-
super(
|
|
1033
|
+
constructor() {
|
|
1034
|
+
super('DlcError', 'InsufficientFunds');
|
|
985
1035
|
}
|
|
986
|
-
static
|
|
987
|
-
return
|
|
1036
|
+
static new() {
|
|
1037
|
+
return new InsufficientFunds_();
|
|
1038
|
+
}
|
|
1039
|
+
static instanceOf(obj) {
|
|
1040
|
+
return obj.tag === DlcError_Tags.InsufficientFunds;
|
|
1041
|
+
}
|
|
1042
|
+
static hasInner(obj) {
|
|
1043
|
+
return false;
|
|
988
1044
|
}
|
|
989
1045
|
}
|
|
990
|
-
class
|
|
991
|
-
/**
|
|
992
|
-
* @private
|
|
993
|
-
* This field is private and should not be used.
|
|
994
|
-
*/
|
|
995
|
-
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "DlcError";
|
|
1046
|
+
class InvalidArgument_ extends _core.UniffiError {
|
|
996
1047
|
/**
|
|
997
1048
|
* @private
|
|
998
|
-
* This field is private and should not be used.
|
|
1049
|
+
* This field is private and should not be used, use `tag` instead.
|
|
999
1050
|
*/
|
|
1000
|
-
[
|
|
1051
|
+
[_core.uniffiTypeNameSymbol] = 'DlcError';
|
|
1001
1052
|
tag = DlcError_Tags.InvalidArgument;
|
|
1002
|
-
constructor(
|
|
1003
|
-
super(
|
|
1053
|
+
constructor(inner) {
|
|
1054
|
+
super('DlcError', 'InvalidArgument');
|
|
1055
|
+
this.inner = Object.freeze(inner);
|
|
1056
|
+
}
|
|
1057
|
+
static new(inner) {
|
|
1058
|
+
return new InvalidArgument_(inner);
|
|
1004
1059
|
}
|
|
1005
|
-
static instanceOf(
|
|
1006
|
-
return
|
|
1060
|
+
static instanceOf(obj) {
|
|
1061
|
+
return obj.tag === DlcError_Tags.InvalidArgument;
|
|
1062
|
+
}
|
|
1063
|
+
static hasInner(obj) {
|
|
1064
|
+
return InvalidArgument_.instanceOf(obj);
|
|
1065
|
+
}
|
|
1066
|
+
static getInner(obj) {
|
|
1067
|
+
return obj.inner;
|
|
1007
1068
|
}
|
|
1008
1069
|
}
|
|
1009
|
-
class
|
|
1010
|
-
/**
|
|
1011
|
-
* @private
|
|
1012
|
-
* This field is private and should not be used.
|
|
1013
|
-
*/
|
|
1014
|
-
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "DlcError";
|
|
1070
|
+
class SerializationError_ extends _core.UniffiError {
|
|
1015
1071
|
/**
|
|
1016
1072
|
* @private
|
|
1017
|
-
* This field is private and should not be used.
|
|
1073
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1018
1074
|
*/
|
|
1019
|
-
[
|
|
1075
|
+
[_core.uniffiTypeNameSymbol] = 'DlcError';
|
|
1020
1076
|
tag = DlcError_Tags.SerializationError;
|
|
1021
|
-
constructor(
|
|
1022
|
-
super(
|
|
1077
|
+
constructor() {
|
|
1078
|
+
super('DlcError', 'SerializationError');
|
|
1079
|
+
}
|
|
1080
|
+
static new() {
|
|
1081
|
+
return new SerializationError_();
|
|
1023
1082
|
}
|
|
1024
|
-
static instanceOf(
|
|
1025
|
-
return
|
|
1083
|
+
static instanceOf(obj) {
|
|
1084
|
+
return obj.tag === DlcError_Tags.SerializationError;
|
|
1085
|
+
}
|
|
1086
|
+
static hasInner(obj) {
|
|
1087
|
+
return false;
|
|
1026
1088
|
}
|
|
1027
1089
|
}
|
|
1028
|
-
class
|
|
1029
|
-
/**
|
|
1030
|
-
* @private
|
|
1031
|
-
* This field is private and should not be used.
|
|
1032
|
-
*/
|
|
1033
|
-
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "DlcError";
|
|
1090
|
+
class Secp256k1Error_ extends _core.UniffiError {
|
|
1034
1091
|
/**
|
|
1035
1092
|
* @private
|
|
1036
|
-
* This field is private and should not be used.
|
|
1093
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1037
1094
|
*/
|
|
1038
|
-
[
|
|
1095
|
+
[_core.uniffiTypeNameSymbol] = 'DlcError';
|
|
1039
1096
|
tag = DlcError_Tags.Secp256k1Error;
|
|
1040
|
-
constructor(
|
|
1041
|
-
super(
|
|
1097
|
+
constructor(inner) {
|
|
1098
|
+
super('DlcError', 'Secp256k1Error');
|
|
1099
|
+
this.inner = Object.freeze(inner);
|
|
1100
|
+
}
|
|
1101
|
+
static new(inner) {
|
|
1102
|
+
return new Secp256k1Error_(inner);
|
|
1103
|
+
}
|
|
1104
|
+
static instanceOf(obj) {
|
|
1105
|
+
return obj.tag === DlcError_Tags.Secp256k1Error;
|
|
1042
1106
|
}
|
|
1043
|
-
static
|
|
1044
|
-
return instanceOf(
|
|
1107
|
+
static hasInner(obj) {
|
|
1108
|
+
return Secp256k1Error_.instanceOf(obj);
|
|
1109
|
+
}
|
|
1110
|
+
static getInner(obj) {
|
|
1111
|
+
return obj.inner;
|
|
1045
1112
|
}
|
|
1046
1113
|
}
|
|
1047
|
-
class
|
|
1048
|
-
/**
|
|
1049
|
-
* @private
|
|
1050
|
-
* This field is private and should not be used.
|
|
1051
|
-
*/
|
|
1052
|
-
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "DlcError";
|
|
1114
|
+
class MiniscriptError_ extends _core.UniffiError {
|
|
1053
1115
|
/**
|
|
1054
1116
|
* @private
|
|
1055
|
-
* This field is private and should not be used.
|
|
1117
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1056
1118
|
*/
|
|
1057
|
-
[
|
|
1119
|
+
[_core.uniffiTypeNameSymbol] = 'DlcError';
|
|
1058
1120
|
tag = DlcError_Tags.MiniscriptError;
|
|
1059
|
-
constructor(
|
|
1060
|
-
super(
|
|
1121
|
+
constructor() {
|
|
1122
|
+
super('DlcError', 'MiniscriptError');
|
|
1123
|
+
}
|
|
1124
|
+
static new() {
|
|
1125
|
+
return new MiniscriptError_();
|
|
1126
|
+
}
|
|
1127
|
+
static instanceOf(obj) {
|
|
1128
|
+
return obj.tag === DlcError_Tags.MiniscriptError;
|
|
1061
1129
|
}
|
|
1062
|
-
static
|
|
1063
|
-
return
|
|
1130
|
+
static hasInner(obj) {
|
|
1131
|
+
return false;
|
|
1064
1132
|
}
|
|
1065
1133
|
}
|
|
1066
|
-
class
|
|
1134
|
+
class InvalidNetwork_ extends _core.UniffiError {
|
|
1067
1135
|
/**
|
|
1068
1136
|
* @private
|
|
1069
|
-
* This field is private and should not be used.
|
|
1137
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1070
1138
|
*/
|
|
1071
|
-
[
|
|
1072
|
-
/**
|
|
1073
|
-
* @private
|
|
1074
|
-
* This field is private and should not be used.
|
|
1075
|
-
*/
|
|
1076
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 9;
|
|
1139
|
+
[_core.uniffiTypeNameSymbol] = 'DlcError';
|
|
1077
1140
|
tag = DlcError_Tags.InvalidNetwork;
|
|
1078
|
-
constructor(
|
|
1079
|
-
super(
|
|
1141
|
+
constructor() {
|
|
1142
|
+
super('DlcError', 'InvalidNetwork');
|
|
1080
1143
|
}
|
|
1081
|
-
static
|
|
1082
|
-
return
|
|
1144
|
+
static new() {
|
|
1145
|
+
return new InvalidNetwork_();
|
|
1146
|
+
}
|
|
1147
|
+
static instanceOf(obj) {
|
|
1148
|
+
return obj.tag === DlcError_Tags.InvalidNetwork;
|
|
1149
|
+
}
|
|
1150
|
+
static hasInner(obj) {
|
|
1151
|
+
return false;
|
|
1083
1152
|
}
|
|
1084
1153
|
}
|
|
1085
|
-
class
|
|
1086
|
-
/**
|
|
1087
|
-
* @private
|
|
1088
|
-
* This field is private and should not be used.
|
|
1089
|
-
*/
|
|
1090
|
-
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "DlcError";
|
|
1154
|
+
class KeyError_ extends _core.UniffiError {
|
|
1091
1155
|
/**
|
|
1092
1156
|
* @private
|
|
1093
|
-
* This field is private and should not be used.
|
|
1157
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1094
1158
|
*/
|
|
1095
|
-
[
|
|
1159
|
+
[_core.uniffiTypeNameSymbol] = 'DlcError';
|
|
1096
1160
|
tag = DlcError_Tags.KeyError;
|
|
1097
|
-
constructor(
|
|
1098
|
-
super(
|
|
1161
|
+
constructor(inner) {
|
|
1162
|
+
super('DlcError', 'KeyError');
|
|
1163
|
+
this.inner = Object.freeze(inner);
|
|
1164
|
+
}
|
|
1165
|
+
static new(inner) {
|
|
1166
|
+
return new KeyError_(inner);
|
|
1099
1167
|
}
|
|
1100
|
-
static instanceOf(
|
|
1101
|
-
return
|
|
1168
|
+
static instanceOf(obj) {
|
|
1169
|
+
return obj.tag === DlcError_Tags.KeyError;
|
|
1170
|
+
}
|
|
1171
|
+
static hasInner(obj) {
|
|
1172
|
+
return KeyError_.instanceOf(obj);
|
|
1173
|
+
}
|
|
1174
|
+
static getInner(obj) {
|
|
1175
|
+
return obj.inner;
|
|
1102
1176
|
}
|
|
1103
1177
|
}
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
function instanceOf(e) {
|
|
1107
|
-
return e[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === "DlcError";
|
|
1178
|
+
function instanceOf(obj) {
|
|
1179
|
+
return obj[_core.uniffiTypeNameSymbol] === 'DlcError';
|
|
1108
1180
|
}
|
|
1109
|
-
return {
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
};
|
|
1181
|
+
return Object.freeze({
|
|
1182
|
+
instanceOf,
|
|
1183
|
+
InvalidSignature: InvalidSignature_,
|
|
1184
|
+
InvalidPublicKey: InvalidPublicKey_,
|
|
1185
|
+
InvalidTransaction: InvalidTransaction_,
|
|
1186
|
+
InsufficientFunds: InsufficientFunds_,
|
|
1187
|
+
InvalidArgument: InvalidArgument_,
|
|
1188
|
+
SerializationError: SerializationError_,
|
|
1189
|
+
Secp256k1Error: Secp256k1Error_,
|
|
1190
|
+
MiniscriptError: MiniscriptError_,
|
|
1191
|
+
InvalidNetwork: InvalidNetwork_,
|
|
1192
|
+
KeyError: KeyError_
|
|
1193
|
+
});
|
|
1122
1194
|
})();
|
|
1123
|
-
|
|
1124
|
-
// Union type for DlcError error type.
|
|
1125
|
-
|
|
1195
|
+
// FfiConverter for enum DlcError
|
|
1126
1196
|
const FfiConverterTypeDLCError = (() => {
|
|
1127
|
-
const
|
|
1128
|
-
class
|
|
1197
|
+
const ordinalConverter = _core.FfiConverterInt32;
|
|
1198
|
+
class FFIConverter extends _core.AbstractFfiConverterByteArray {
|
|
1129
1199
|
read(from) {
|
|
1130
|
-
switch (
|
|
1200
|
+
switch (ordinalConverter.read(from)) {
|
|
1131
1201
|
case 1:
|
|
1132
|
-
return new DlcError.InvalidSignature(
|
|
1202
|
+
return new DlcError.InvalidSignature();
|
|
1133
1203
|
case 2:
|
|
1134
|
-
return new DlcError.InvalidPublicKey(
|
|
1204
|
+
return new DlcError.InvalidPublicKey();
|
|
1135
1205
|
case 3:
|
|
1136
|
-
return new DlcError.InvalidTransaction(
|
|
1206
|
+
return new DlcError.InvalidTransaction();
|
|
1137
1207
|
case 4:
|
|
1138
|
-
return new DlcError.InsufficientFunds(
|
|
1208
|
+
return new DlcError.InsufficientFunds();
|
|
1139
1209
|
case 5:
|
|
1140
|
-
return new DlcError.InvalidArgument(
|
|
1210
|
+
return new DlcError.InvalidArgument({
|
|
1211
|
+
message: FfiConverterString.read(from)
|
|
1212
|
+
});
|
|
1141
1213
|
case 6:
|
|
1142
|
-
return new DlcError.SerializationError(
|
|
1214
|
+
return new DlcError.SerializationError();
|
|
1143
1215
|
case 7:
|
|
1144
|
-
return new DlcError.Secp256k1Error(
|
|
1216
|
+
return new DlcError.Secp256k1Error({
|
|
1217
|
+
message: FfiConverterString.read(from)
|
|
1218
|
+
});
|
|
1145
1219
|
case 8:
|
|
1146
|
-
return new DlcError.MiniscriptError(
|
|
1220
|
+
return new DlcError.MiniscriptError();
|
|
1147
1221
|
case 9:
|
|
1148
|
-
return new DlcError.InvalidNetwork(
|
|
1222
|
+
return new DlcError.InvalidNetwork();
|
|
1149
1223
|
case 10:
|
|
1150
|
-
return new DlcError.KeyError(
|
|
1224
|
+
return new DlcError.KeyError({
|
|
1225
|
+
key: FfiConverterTypeExtendedKey.read(from)
|
|
1226
|
+
});
|
|
1151
1227
|
default:
|
|
1152
|
-
throw new
|
|
1228
|
+
throw new _core.UniffiInternalError.UnexpectedEnumCase();
|
|
1153
1229
|
}
|
|
1154
1230
|
}
|
|
1155
1231
|
write(value, into) {
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
}
|
|
1214
|
-
class InvalidXpub extends _uniffiBindgenReactNative.UniffiError {
|
|
1215
|
-
/**
|
|
1216
|
-
* @private
|
|
1217
|
-
* This field is private and should not be used.
|
|
1218
|
-
*/
|
|
1219
|
-
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "ExtendedKey";
|
|
1220
|
-
/**
|
|
1221
|
-
* @private
|
|
1222
|
-
* This field is private and should not be used.
|
|
1223
|
-
*/
|
|
1224
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 3;
|
|
1225
|
-
tag = ExtendedKey_Tags.InvalidXpub;
|
|
1226
|
-
constructor(message) {
|
|
1227
|
-
super("ExtendedKey", "InvalidXpub", message);
|
|
1228
|
-
}
|
|
1229
|
-
static instanceOf(e) {
|
|
1230
|
-
return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 3;
|
|
1231
|
-
}
|
|
1232
|
-
}
|
|
1233
|
-
class InvalidDerivationPath extends _uniffiBindgenReactNative.UniffiError {
|
|
1234
|
-
/**
|
|
1235
|
-
* @private
|
|
1236
|
-
* This field is private and should not be used.
|
|
1237
|
-
*/
|
|
1238
|
-
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "ExtendedKey";
|
|
1239
|
-
/**
|
|
1240
|
-
* @private
|
|
1241
|
-
* This field is private and should not be used.
|
|
1242
|
-
*/
|
|
1243
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 4;
|
|
1244
|
-
tag = ExtendedKey_Tags.InvalidDerivationPath;
|
|
1245
|
-
constructor(message) {
|
|
1246
|
-
super("ExtendedKey", "InvalidDerivationPath", message);
|
|
1247
|
-
}
|
|
1248
|
-
static instanceOf(e) {
|
|
1249
|
-
return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 4;
|
|
1250
|
-
}
|
|
1251
|
-
}
|
|
1252
|
-
|
|
1253
|
-
// Utility function which does not rely on instanceof.
|
|
1254
|
-
function instanceOf(e) {
|
|
1255
|
-
return e[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === "ExtendedKey";
|
|
1256
|
-
}
|
|
1257
|
-
return {
|
|
1258
|
-
InvalidMnemonic,
|
|
1259
|
-
InvalidXpriv,
|
|
1260
|
-
InvalidXpub,
|
|
1261
|
-
InvalidDerivationPath,
|
|
1262
|
-
instanceOf
|
|
1263
|
-
};
|
|
1264
|
-
})();
|
|
1265
|
-
|
|
1266
|
-
// Union type for ExtendedKey error type.
|
|
1267
|
-
|
|
1268
|
-
const FfiConverterTypeExtendedKey = (() => {
|
|
1269
|
-
const intConverter = _uniffiBindgenReactNative.FfiConverterInt32;
|
|
1270
|
-
class FfiConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1271
|
-
read(from) {
|
|
1272
|
-
switch (intConverter.read(from)) {
|
|
1273
|
-
case 1:
|
|
1274
|
-
return new ExtendedKey.InvalidMnemonic(FfiConverterString.read(from));
|
|
1275
|
-
case 2:
|
|
1276
|
-
return new ExtendedKey.InvalidXpriv(FfiConverterString.read(from));
|
|
1277
|
-
case 3:
|
|
1278
|
-
return new ExtendedKey.InvalidXpub(FfiConverterString.read(from));
|
|
1279
|
-
case 4:
|
|
1280
|
-
return new ExtendedKey.InvalidDerivationPath(FfiConverterString.read(from));
|
|
1232
|
+
switch (value.tag) {
|
|
1233
|
+
case DlcError_Tags.InvalidSignature:
|
|
1234
|
+
{
|
|
1235
|
+
ordinalConverter.write(1, into);
|
|
1236
|
+
return;
|
|
1237
|
+
}
|
|
1238
|
+
case DlcError_Tags.InvalidPublicKey:
|
|
1239
|
+
{
|
|
1240
|
+
ordinalConverter.write(2, into);
|
|
1241
|
+
return;
|
|
1242
|
+
}
|
|
1243
|
+
case DlcError_Tags.InvalidTransaction:
|
|
1244
|
+
{
|
|
1245
|
+
ordinalConverter.write(3, into);
|
|
1246
|
+
return;
|
|
1247
|
+
}
|
|
1248
|
+
case DlcError_Tags.InsufficientFunds:
|
|
1249
|
+
{
|
|
1250
|
+
ordinalConverter.write(4, into);
|
|
1251
|
+
return;
|
|
1252
|
+
}
|
|
1253
|
+
case DlcError_Tags.InvalidArgument:
|
|
1254
|
+
{
|
|
1255
|
+
ordinalConverter.write(5, into);
|
|
1256
|
+
const inner = value.inner;
|
|
1257
|
+
FfiConverterString.write(inner.message, into);
|
|
1258
|
+
return;
|
|
1259
|
+
}
|
|
1260
|
+
case DlcError_Tags.SerializationError:
|
|
1261
|
+
{
|
|
1262
|
+
ordinalConverter.write(6, into);
|
|
1263
|
+
return;
|
|
1264
|
+
}
|
|
1265
|
+
case DlcError_Tags.Secp256k1Error:
|
|
1266
|
+
{
|
|
1267
|
+
ordinalConverter.write(7, into);
|
|
1268
|
+
const inner = value.inner;
|
|
1269
|
+
FfiConverterString.write(inner.message, into);
|
|
1270
|
+
return;
|
|
1271
|
+
}
|
|
1272
|
+
case DlcError_Tags.MiniscriptError:
|
|
1273
|
+
{
|
|
1274
|
+
ordinalConverter.write(8, into);
|
|
1275
|
+
return;
|
|
1276
|
+
}
|
|
1277
|
+
case DlcError_Tags.InvalidNetwork:
|
|
1278
|
+
{
|
|
1279
|
+
ordinalConverter.write(9, into);
|
|
1280
|
+
return;
|
|
1281
|
+
}
|
|
1282
|
+
case DlcError_Tags.KeyError:
|
|
1283
|
+
{
|
|
1284
|
+
ordinalConverter.write(10, into);
|
|
1285
|
+
const inner = value.inner;
|
|
1286
|
+
FfiConverterTypeExtendedKey.write(inner.key, into);
|
|
1287
|
+
return;
|
|
1288
|
+
}
|
|
1281
1289
|
default:
|
|
1282
|
-
|
|
1290
|
+
// Throwing from here means that DlcError_Tags hasn't matched an ordinal.
|
|
1291
|
+
throw new _core.UniffiInternalError.UnexpectedEnumCase();
|
|
1283
1292
|
}
|
|
1284
1293
|
}
|
|
1285
|
-
write(value, into) {
|
|
1286
|
-
const obj = value;
|
|
1287
|
-
const index = obj[_uniffiBindgenReactNative.variantOrdinalSymbol];
|
|
1288
|
-
intConverter.write(index, into);
|
|
1289
|
-
}
|
|
1290
1294
|
allocationSize(value) {
|
|
1291
|
-
|
|
1295
|
+
switch (value.tag) {
|
|
1296
|
+
case DlcError_Tags.InvalidSignature:
|
|
1297
|
+
{
|
|
1298
|
+
return ordinalConverter.allocationSize(1);
|
|
1299
|
+
}
|
|
1300
|
+
case DlcError_Tags.InvalidPublicKey:
|
|
1301
|
+
{
|
|
1302
|
+
return ordinalConverter.allocationSize(2);
|
|
1303
|
+
}
|
|
1304
|
+
case DlcError_Tags.InvalidTransaction:
|
|
1305
|
+
{
|
|
1306
|
+
return ordinalConverter.allocationSize(3);
|
|
1307
|
+
}
|
|
1308
|
+
case DlcError_Tags.InsufficientFunds:
|
|
1309
|
+
{
|
|
1310
|
+
return ordinalConverter.allocationSize(4);
|
|
1311
|
+
}
|
|
1312
|
+
case DlcError_Tags.InvalidArgument:
|
|
1313
|
+
{
|
|
1314
|
+
const inner = value.inner;
|
|
1315
|
+
let size = ordinalConverter.allocationSize(5);
|
|
1316
|
+
size += FfiConverterString.allocationSize(inner.message);
|
|
1317
|
+
return size;
|
|
1318
|
+
}
|
|
1319
|
+
case DlcError_Tags.SerializationError:
|
|
1320
|
+
{
|
|
1321
|
+
return ordinalConverter.allocationSize(6);
|
|
1322
|
+
}
|
|
1323
|
+
case DlcError_Tags.Secp256k1Error:
|
|
1324
|
+
{
|
|
1325
|
+
const inner = value.inner;
|
|
1326
|
+
let size = ordinalConverter.allocationSize(7);
|
|
1327
|
+
size += FfiConverterString.allocationSize(inner.message);
|
|
1328
|
+
return size;
|
|
1329
|
+
}
|
|
1330
|
+
case DlcError_Tags.MiniscriptError:
|
|
1331
|
+
{
|
|
1332
|
+
return ordinalConverter.allocationSize(8);
|
|
1333
|
+
}
|
|
1334
|
+
case DlcError_Tags.InvalidNetwork:
|
|
1335
|
+
{
|
|
1336
|
+
return ordinalConverter.allocationSize(9);
|
|
1337
|
+
}
|
|
1338
|
+
case DlcError_Tags.KeyError:
|
|
1339
|
+
{
|
|
1340
|
+
const inner = value.inner;
|
|
1341
|
+
let size = ordinalConverter.allocationSize(10);
|
|
1342
|
+
size += FfiConverterTypeExtendedKey.allocationSize(inner.key);
|
|
1343
|
+
return size;
|
|
1344
|
+
}
|
|
1345
|
+
default:
|
|
1346
|
+
throw new _core.UniffiInternalError.UnexpectedEnumCase();
|
|
1347
|
+
}
|
|
1292
1348
|
}
|
|
1293
1349
|
}
|
|
1294
|
-
return new
|
|
1350
|
+
return new FFIConverter();
|
|
1295
1351
|
})();
|
|
1296
1352
|
|
|
1297
|
-
// FfiConverter for
|
|
1298
|
-
const
|
|
1299
|
-
|
|
1300
|
-
// FfiConverter for Array<AdaptorSignature>
|
|
1301
|
-
const FfiConverterArrayTypeAdaptorSignature = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeAdaptorSignature);
|
|
1302
|
-
|
|
1303
|
-
// FfiConverter for Array<DlcInputInfo>
|
|
1304
|
-
const FfiConverterArrayTypeDlcInputInfo = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeDlcInputInfo);
|
|
1353
|
+
// FfiConverter for Array<ArrayBuffer>
|
|
1354
|
+
const FfiConverterSequenceBytes = new _core.FfiConverterArray(_core.FfiConverterArrayBuffer);
|
|
1305
1355
|
|
|
1306
|
-
// FfiConverter for Array<
|
|
1307
|
-
const
|
|
1356
|
+
// FfiConverter for Array<TxInput>
|
|
1357
|
+
const FfiConverterSequenceTypeTxInput = new _core.FfiConverterArray(FfiConverterTypeTxInput);
|
|
1308
1358
|
|
|
1309
|
-
// FfiConverter for Array<
|
|
1310
|
-
const
|
|
1359
|
+
// FfiConverter for Array<TxOutput>
|
|
1360
|
+
const FfiConverterSequenceTypeTxOutput = new _core.FfiConverterArray(FfiConverterTypeTxOutput);
|
|
1311
1361
|
|
|
1312
1362
|
// FfiConverter for Array<Transaction>
|
|
1313
|
-
const
|
|
1314
|
-
|
|
1315
|
-
// FfiConverter for Array<TxInput>
|
|
1316
|
-
const FfiConverterArrayTypeTxInput = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeTxInput);
|
|
1363
|
+
const FfiConverterSequenceTypeTransaction = new _core.FfiConverterArray(FfiConverterTypeTransaction);
|
|
1317
1364
|
|
|
1318
1365
|
// FfiConverter for Array<TxInputInfo>
|
|
1319
|
-
const
|
|
1366
|
+
const FfiConverterSequenceTypeTxInputInfo = new _core.FfiConverterArray(FfiConverterTypeTxInputInfo);
|
|
1320
1367
|
|
|
1321
|
-
// FfiConverter for Array<
|
|
1322
|
-
const
|
|
1368
|
+
// FfiConverter for Array<DlcInputInfo>
|
|
1369
|
+
const FfiConverterSequenceTypeDlcInputInfo = new _core.FfiConverterArray(FfiConverterTypeDlcInputInfo);
|
|
1323
1370
|
|
|
1324
|
-
// FfiConverter for
|
|
1325
|
-
const
|
|
1371
|
+
// FfiConverter for string | undefined
|
|
1372
|
+
const FfiConverterOptionalString = new _core.FfiConverterOptional(FfiConverterString);
|
|
1373
|
+
|
|
1374
|
+
// FfiConverter for Array<OracleInfo>
|
|
1375
|
+
const FfiConverterSequenceTypeOracleInfo = new _core.FfiConverterArray(FfiConverterTypeOracleInfo);
|
|
1326
1376
|
|
|
1327
|
-
// FfiConverter for Array<Array
|
|
1328
|
-
const
|
|
1377
|
+
// FfiConverter for Array<Array<ArrayBuffer>>
|
|
1378
|
+
const FfiConverterSequenceSequenceBytes = new _core.FfiConverterArray(FfiConverterSequenceBytes);
|
|
1329
1379
|
|
|
1330
|
-
// FfiConverter for Array<Array<Array
|
|
1331
|
-
const
|
|
1380
|
+
// FfiConverter for Array<Array<Array<ArrayBuffer>>>
|
|
1381
|
+
const FfiConverterSequenceSequenceSequenceBytes = new _core.FfiConverterArray(FfiConverterSequenceSequenceBytes);
|
|
1332
1382
|
|
|
1333
|
-
// FfiConverter for Array<
|
|
1334
|
-
const
|
|
1383
|
+
// FfiConverter for Array<AdaptorSignature>
|
|
1384
|
+
const FfiConverterSequenceTypeAdaptorSignature = new _core.FfiConverterArray(FfiConverterTypeAdaptorSignature);
|
|
1385
|
+
|
|
1386
|
+
// FfiConverter for Array<Payout>
|
|
1387
|
+
const FfiConverterSequenceTypePayout = new _core.FfiConverterArray(FfiConverterTypePayout);
|
|
1335
1388
|
|
|
1336
1389
|
/**
|
|
1337
1390
|
* This should be called before anything else.
|
|
@@ -1345,104 +1398,68 @@ const FfiConverterArrayArrayArrayArrayUInt8 = new _uniffiBindgenReactNative.FfiC
|
|
|
1345
1398
|
*/
|
|
1346
1399
|
function uniffiEnsureInitialized() {
|
|
1347
1400
|
// Get the bindings contract version from our ComponentInterface
|
|
1348
|
-
const bindingsContractVersion =
|
|
1401
|
+
const bindingsContractVersion = 30;
|
|
1349
1402
|
// Get the scaffolding contract version by calling the into the dylib
|
|
1350
1403
|
const scaffoldingContractVersion = (0, _ddk_ffiFfi.default)().ubrn_ffi_ddk_ffi_uniffi_contract_version();
|
|
1351
1404
|
if (bindingsContractVersion !== scaffoldingContractVersion) {
|
|
1352
|
-
throw new
|
|
1353
|
-
}
|
|
1354
|
-
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_add_signature_to_transaction() !== 1337) {
|
|
1355
|
-
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_add_signature_to_transaction");
|
|
1356
|
-
}
|
|
1357
|
-
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_convert_mnemonic_to_seed() !== 65049) {
|
|
1358
|
-
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_convert_mnemonic_to_seed");
|
|
1359
|
-
}
|
|
1360
|
-
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_create_cet() !== 23081) {
|
|
1361
|
-
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_create_cet");
|
|
1362
|
-
}
|
|
1363
|
-
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_create_cet_adaptor_points_from_oracle_info() !== 6552) {
|
|
1364
|
-
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_create_cet_adaptor_points_from_oracle_info");
|
|
1365
|
-
}
|
|
1366
|
-
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_create_cet_adaptor_signature_from_oracle_info() !== 65174) {
|
|
1367
|
-
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_create_cet_adaptor_signature_from_oracle_info");
|
|
1368
|
-
}
|
|
1369
|
-
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_create_cet_adaptor_sigs_from_oracle_info() !== 15699) {
|
|
1370
|
-
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_create_cet_adaptor_sigs_from_oracle_info");
|
|
1371
|
-
}
|
|
1372
|
-
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_create_cet_adaptor_sigs_from_points() !== 33705) {
|
|
1373
|
-
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_create_cet_adaptor_sigs_from_points");
|
|
1374
|
-
}
|
|
1375
|
-
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_create_cets() !== 50529) {
|
|
1376
|
-
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_create_cets");
|
|
1377
|
-
}
|
|
1378
|
-
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_create_dlc_transactions() !== 51134) {
|
|
1379
|
-
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_create_dlc_transactions");
|
|
1380
|
-
}
|
|
1381
|
-
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_create_extkey_from_parent_path() !== 26671) {
|
|
1382
|
-
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_create_extkey_from_parent_path");
|
|
1383
|
-
}
|
|
1384
|
-
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_create_extkey_from_seed() !== 12526) {
|
|
1385
|
-
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_create_extkey_from_seed");
|
|
1386
|
-
}
|
|
1387
|
-
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_create_fund_tx_locking_script() !== 2761) {
|
|
1388
|
-
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_create_fund_tx_locking_script");
|
|
1405
|
+
throw new _core.UniffiInternalError.ContractVersionMismatch(scaffoldingContractVersion, bindingsContractVersion);
|
|
1389
1406
|
}
|
|
1390
|
-
if ((0, _ddk_ffiFfi.default)().
|
|
1391
|
-
throw new
|
|
1407
|
+
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_convert_mnemonic_to_seed() !== 29793) {
|
|
1408
|
+
throw new _core.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_convert_mnemonic_to_seed');
|
|
1392
1409
|
}
|
|
1393
|
-
if ((0, _ddk_ffiFfi.default)().
|
|
1394
|
-
throw new
|
|
1410
|
+
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_create_cet() !== 62951) {
|
|
1411
|
+
throw new _core.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_create_cet');
|
|
1395
1412
|
}
|
|
1396
|
-
if ((0, _ddk_ffiFfi.default)().
|
|
1397
|
-
throw new
|
|
1413
|
+
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_create_cet_adaptor_points_from_oracle_info() !== 14977) {
|
|
1414
|
+
throw new _core.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_create_cet_adaptor_points_from_oracle_info');
|
|
1398
1415
|
}
|
|
1399
|
-
if ((0, _ddk_ffiFfi.default)().
|
|
1400
|
-
throw new
|
|
1416
|
+
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_create_cet_adaptor_sigs_from_oracle_info() !== 5605) {
|
|
1417
|
+
throw new _core.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_create_cet_adaptor_sigs_from_oracle_info');
|
|
1401
1418
|
}
|
|
1402
|
-
if ((0, _ddk_ffiFfi.default)().
|
|
1403
|
-
throw new
|
|
1419
|
+
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_create_cet_adaptor_sigs_from_points() !== 39452) {
|
|
1420
|
+
throw new _core.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_create_cet_adaptor_sigs_from_points');
|
|
1404
1421
|
}
|
|
1405
|
-
if ((0, _ddk_ffiFfi.default)().
|
|
1406
|
-
throw new
|
|
1422
|
+
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_create_cets() !== 22051) {
|
|
1423
|
+
throw new _core.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_create_cets');
|
|
1407
1424
|
}
|
|
1408
|
-
if ((0, _ddk_ffiFfi.default)().
|
|
1409
|
-
throw new
|
|
1425
|
+
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_create_dlc_transactions() !== 60266) {
|
|
1426
|
+
throw new _core.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_create_dlc_transactions');
|
|
1410
1427
|
}
|
|
1411
|
-
if ((0, _ddk_ffiFfi.default)().
|
|
1412
|
-
throw new
|
|
1428
|
+
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_create_extkey_from_parent_path() !== 23090) {
|
|
1429
|
+
throw new _core.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_create_extkey_from_parent_path');
|
|
1413
1430
|
}
|
|
1414
|
-
if ((0, _ddk_ffiFfi.default)().
|
|
1415
|
-
throw new
|
|
1431
|
+
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_create_extkey_from_seed() !== 45469) {
|
|
1432
|
+
throw new _core.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_create_extkey_from_seed');
|
|
1416
1433
|
}
|
|
1417
|
-
if ((0, _ddk_ffiFfi.default)().
|
|
1418
|
-
throw new
|
|
1434
|
+
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_create_fund_tx_locking_script() !== 37235) {
|
|
1435
|
+
throw new _core.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_create_fund_tx_locking_script');
|
|
1419
1436
|
}
|
|
1420
|
-
if ((0, _ddk_ffiFfi.default)().
|
|
1421
|
-
throw new
|
|
1437
|
+
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_create_refund_transaction() !== 40230) {
|
|
1438
|
+
throw new _core.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_create_refund_transaction');
|
|
1422
1439
|
}
|
|
1423
|
-
if ((0, _ddk_ffiFfi.default)().
|
|
1424
|
-
throw new
|
|
1440
|
+
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_create_spliced_dlc_transactions() !== 55101) {
|
|
1441
|
+
throw new _core.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_create_spliced_dlc_transactions');
|
|
1425
1442
|
}
|
|
1426
|
-
if ((0, _ddk_ffiFfi.default)().
|
|
1427
|
-
throw new
|
|
1443
|
+
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_create_xpriv_from_parent_path() !== 7895) {
|
|
1444
|
+
throw new _core.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_create_xpriv_from_parent_path');
|
|
1428
1445
|
}
|
|
1429
|
-
if ((0, _ddk_ffiFfi.default)().
|
|
1430
|
-
throw new
|
|
1446
|
+
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_extract_ecdsa_signature_from_oracle_signatures() !== 4868) {
|
|
1447
|
+
throw new _core.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_extract_ecdsa_signature_from_oracle_signatures');
|
|
1431
1448
|
}
|
|
1432
|
-
if ((0, _ddk_ffiFfi.default)().
|
|
1433
|
-
throw new
|
|
1449
|
+
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_get_pubkey_from_extkey() !== 18050) {
|
|
1450
|
+
throw new _core.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_get_pubkey_from_extkey');
|
|
1434
1451
|
}
|
|
1435
|
-
if ((0, _ddk_ffiFfi.default)().
|
|
1436
|
-
throw new
|
|
1452
|
+
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_get_total_input_vsize() !== 2998) {
|
|
1453
|
+
throw new _core.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_get_total_input_vsize');
|
|
1437
1454
|
}
|
|
1438
|
-
if ((0, _ddk_ffiFfi.default)().
|
|
1439
|
-
throw new
|
|
1455
|
+
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_get_xpub_from_xpriv() !== 8843) {
|
|
1456
|
+
throw new _core.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_get_xpub_from_xpriv');
|
|
1440
1457
|
}
|
|
1441
|
-
if ((0, _ddk_ffiFfi.default)().
|
|
1442
|
-
throw new
|
|
1458
|
+
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_verify_cet_adaptor_sigs_from_oracle_info() !== 32235) {
|
|
1459
|
+
throw new _core.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_verify_cet_adaptor_sigs_from_oracle_info');
|
|
1443
1460
|
}
|
|
1444
|
-
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_version() !==
|
|
1445
|
-
throw new
|
|
1461
|
+
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_version() !== 2994) {
|
|
1462
|
+
throw new _core.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_version');
|
|
1446
1463
|
}
|
|
1447
1464
|
}
|
|
1448
1465
|
var _default = exports.default = Object.freeze({
|