@bennyblader/ddk-rn 1.0.0-rc1 → 1.0.0-rc2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/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/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.js +142 -142
- package/lib/commonjs/ddk_ffi.js.map +1 -1
- package/lib/module/ddk_ffi.js +143 -143
- package/lib/module/ddk_ffi.js.map +1 -1
- package/lib/typescript/commonjs/src/ddk_ffi.d.ts +79 -79
- package/lib/typescript/commonjs/src/ddk_ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/ddk_ffi.d.ts +79 -79
- package/lib/typescript/module/src/ddk_ffi.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/ddk_ffi.ts +347 -394
package/lib/commonjs/ddk_ffi.js
CHANGED
|
@@ -77,7 +77,7 @@ function acceptOffer(offer, params, keys, newTemporaryContractId) /*throws*/{
|
|
|
77
77
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
78
78
|
}
|
|
79
79
|
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeContractError.lift.bind(FfiConverterTypeContractError), /*caller:*/callStatus => {
|
|
80
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_accept_offer(_core.
|
|
80
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_accept_offer(_core.FfiConverterUint8Array.lower(offer, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterTypeAcceptOfferParams.lower(params, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterTypeContractKeyProvider.lower(keys, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(newTemporaryContractId, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
81
81
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
82
82
|
}
|
|
83
83
|
|
|
@@ -88,7 +88,7 @@ function acceptOffer(offer, params, keys, newTemporaryContractId) /*throws*/{
|
|
|
88
88
|
function chainHashFromNetwork(network) /*throws*/{
|
|
89
89
|
return (__rb => {
|
|
90
90
|
try {
|
|
91
|
-
return _core.
|
|
91
|
+
return _core.FfiConverterUint8Array.lift(__rb);
|
|
92
92
|
} finally {
|
|
93
93
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
94
94
|
}
|
|
@@ -104,12 +104,12 @@ function chainHashFromNetwork(network) /*throws*/{
|
|
|
104
104
|
function computeContractId(offer, accept) /*throws*/{
|
|
105
105
|
return (__rb => {
|
|
106
106
|
try {
|
|
107
|
-
return _core.
|
|
107
|
+
return _core.FfiConverterUint8Array.lift(__rb);
|
|
108
108
|
} finally {
|
|
109
109
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
110
110
|
}
|
|
111
111
|
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeContractError.lift.bind(FfiConverterTypeContractError), /*caller:*/callStatus => {
|
|
112
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_compute_contract_id(_core.
|
|
112
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_compute_contract_id(_core.FfiConverterUint8Array.lower(offer, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(accept, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
113
113
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
114
114
|
}
|
|
115
115
|
|
|
@@ -130,13 +130,13 @@ function contractInfoPayouts(contractInfo) /*throws*/{
|
|
|
130
130
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
131
131
|
}
|
|
132
132
|
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeContractError.lift.bind(FfiConverterTypeContractError), /*caller:*/callStatus => {
|
|
133
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_contract_info_payouts(_core.
|
|
133
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_contract_info_payouts(_core.FfiConverterUint8Array.lower(contractInfo, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
134
134
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
135
135
|
}
|
|
136
136
|
function convertMnemonicToSeed(mnemonic, passphrase) /*throws*/{
|
|
137
137
|
return (__rb => {
|
|
138
138
|
try {
|
|
139
|
-
return _core.
|
|
139
|
+
return _core.FfiConverterUint8Array.lift(__rb);
|
|
140
140
|
} finally {
|
|
141
141
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
142
142
|
}
|
|
@@ -178,7 +178,7 @@ function createCetAdaptorSigsFromOracleInfo(cets, oracleInfo, fundingSecretKey,
|
|
|
178
178
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
179
179
|
}
|
|
180
180
|
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
181
|
-
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.
|
|
181
|
+
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.FfiConverterUint8Array.lower(fundingSecretKey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.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);
|
|
182
182
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
183
183
|
}
|
|
184
184
|
|
|
@@ -193,7 +193,7 @@ function createCetAdaptorSigsFromPoints(cets, adaptorPoints, fundingSecretKey, f
|
|
|
193
193
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
194
194
|
}
|
|
195
195
|
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
196
|
-
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.
|
|
196
|
+
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.FfiConverterUint8Array.lower(fundingSecretKey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(fundingScriptPubkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt64.lower(fundOutputValue, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
197
197
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
198
198
|
}
|
|
199
199
|
|
|
@@ -208,7 +208,7 @@ function createCets(fundTxId, fundVout, localFinalScriptPubkey, remoteFinalScrip
|
|
|
208
208
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
209
209
|
}
|
|
210
210
|
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
211
|
-
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.
|
|
211
|
+
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.FfiConverterUint8Array.lower(localFinalScriptPubkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.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);
|
|
212
212
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
213
213
|
}
|
|
214
214
|
|
|
@@ -222,12 +222,12 @@ function createCets(fundTxId, fundVout, localFinalScriptPubkey, remoteFinalScrip
|
|
|
222
222
|
function createDlcSpliceInput(prevOffer, prevAccept, localParty, inputSerialId, maxWitnessLen) /*throws*/{
|
|
223
223
|
return (__rb => {
|
|
224
224
|
try {
|
|
225
|
-
return _core.
|
|
225
|
+
return _core.FfiConverterUint8Array.lift(__rb);
|
|
226
226
|
} finally {
|
|
227
227
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
228
228
|
}
|
|
229
229
|
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeContractError.lift.bind(FfiConverterTypeContractError), /*caller:*/callStatus => {
|
|
230
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_create_dlc_splice_input(_core.
|
|
230
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_create_dlc_splice_input(_core.FfiConverterUint8Array.lower(prevOffer, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(prevAccept, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterTypeParty.lower(localParty, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterOptionalUInt64.lower(inputSerialId, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt16.lower(maxWitnessLen, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
231
231
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
232
232
|
}
|
|
233
233
|
|
|
@@ -253,12 +253,12 @@ function createDlcTransactions(outcomes, localParams, remoteParams, refundLockti
|
|
|
253
253
|
function createExtkeyFromParentPath(extkey, path) /*throws*/{
|
|
254
254
|
return (__rb => {
|
|
255
255
|
try {
|
|
256
|
-
return _core.
|
|
256
|
+
return _core.FfiConverterUint8Array.lift(__rb);
|
|
257
257
|
} finally {
|
|
258
258
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
259
259
|
}
|
|
260
260
|
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
261
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_create_extkey_from_parent_path(_core.
|
|
261
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_create_extkey_from_parent_path(_core.FfiConverterUint8Array.lower(extkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterString.lower(path, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
262
262
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
263
263
|
}
|
|
264
264
|
|
|
@@ -269,12 +269,12 @@ function createExtkeyFromParentPath(extkey, path) /*throws*/{
|
|
|
269
269
|
function createExtkeyFromSeed(seed, network) /*throws*/{
|
|
270
270
|
return (__rb => {
|
|
271
271
|
try {
|
|
272
|
-
return _core.
|
|
272
|
+
return _core.FfiConverterUint8Array.lift(__rb);
|
|
273
273
|
} finally {
|
|
274
274
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
275
275
|
}
|
|
276
276
|
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
277
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_create_extkey_from_seed(_core.
|
|
277
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_create_extkey_from_seed(_core.FfiConverterUint8Array.lower(seed, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterString.lower(network, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
278
278
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
279
279
|
}
|
|
280
280
|
|
|
@@ -284,12 +284,12 @@ function createExtkeyFromSeed(seed, network) /*throws*/{
|
|
|
284
284
|
function createFundTxLockingScript(localFundPubkey, remoteFundPubkey) /*throws*/{
|
|
285
285
|
return (__rb => {
|
|
286
286
|
try {
|
|
287
|
-
return _core.
|
|
287
|
+
return _core.FfiConverterUint8Array.lift(__rb);
|
|
288
288
|
} finally {
|
|
289
289
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
290
290
|
}
|
|
291
291
|
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
292
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_create_fund_tx_locking_script(_core.
|
|
292
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_create_fund_tx_locking_script(_core.FfiConverterUint8Array.lower(localFundPubkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(remoteFundPubkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
293
293
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
294
294
|
}
|
|
295
295
|
|
|
@@ -299,12 +299,12 @@ function createFundTxLockingScript(localFundPubkey, remoteFundPubkey) /*throws*/
|
|
|
299
299
|
function createFundingPsbt(offer, accept) /*throws*/{
|
|
300
300
|
return (__rb => {
|
|
301
301
|
try {
|
|
302
|
-
return _core.
|
|
302
|
+
return _core.FfiConverterUint8Array.lift(__rb);
|
|
303
303
|
} finally {
|
|
304
304
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
305
305
|
}
|
|
306
306
|
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeContractError.lift.bind(FfiConverterTypeContractError), /*caller:*/callStatus => {
|
|
307
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_create_funding_psbt(_core.
|
|
307
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_create_funding_psbt(_core.FfiConverterUint8Array.lower(offer, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(accept, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
308
308
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
309
309
|
}
|
|
310
310
|
|
|
@@ -314,7 +314,7 @@ function createFundingPsbt(offer, accept) /*throws*/{
|
|
|
314
314
|
function createOffer(params) /*throws*/{
|
|
315
315
|
return (__rb => {
|
|
316
316
|
try {
|
|
317
|
-
return _core.
|
|
317
|
+
return _core.FfiConverterUint8Array.lift(__rb);
|
|
318
318
|
} finally {
|
|
319
319
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
320
320
|
}
|
|
@@ -334,7 +334,7 @@ function createRefundTransaction(localFinalScriptPubkey, remoteFinalScriptPubkey
|
|
|
334
334
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
335
335
|
}
|
|
336
336
|
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
337
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_create_refund_transaction(_core.
|
|
337
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_create_refund_transaction(_core.FfiConverterUint8Array.lower(localFinalScriptPubkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.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);
|
|
338
338
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
339
339
|
}
|
|
340
340
|
|
|
@@ -360,12 +360,12 @@ function createSplicedDlcTransactions(outcomes, localParams, remoteParams, refun
|
|
|
360
360
|
function createXprivFromParentPath(seedOrXpriv, baseDerivationPath, network, path) /*throws*/{
|
|
361
361
|
return (__rb => {
|
|
362
362
|
try {
|
|
363
|
-
return _core.
|
|
363
|
+
return _core.FfiConverterUint8Array.lift(__rb);
|
|
364
364
|
} finally {
|
|
365
365
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
366
366
|
}
|
|
367
367
|
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
368
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_create_xpriv_from_parent_path(_core.
|
|
368
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_create_xpriv_from_parent_path(_core.FfiConverterUint8Array.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);
|
|
369
369
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
370
370
|
}
|
|
371
371
|
|
|
@@ -389,18 +389,18 @@ function dlcTransactionsFromMessages(offer, accept) /*throws*/{
|
|
|
389
389
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
390
390
|
}
|
|
391
391
|
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeContractError.lift.bind(FfiConverterTypeContractError), /*caller:*/callStatus => {
|
|
392
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_dlc_transactions_from_messages(_core.
|
|
392
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_dlc_transactions_from_messages(_core.FfiConverterUint8Array.lower(offer, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(accept, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
393
393
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
394
394
|
}
|
|
395
395
|
function extractEcdsaSignatureFromOracleSignatures(oracleSignatures, adaptorSignature) /*throws*/{
|
|
396
396
|
return (__rb => {
|
|
397
397
|
try {
|
|
398
|
-
return _core.
|
|
398
|
+
return _core.FfiConverterUint8Array.lift(__rb);
|
|
399
399
|
} finally {
|
|
400
400
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
401
401
|
}
|
|
402
402
|
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
403
|
-
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.
|
|
403
|
+
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.FfiConverterUint8Array.lower(adaptorSignature, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
404
404
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
405
405
|
}
|
|
406
406
|
|
|
@@ -411,12 +411,12 @@ function extractEcdsaSignatureFromOracleSignatures(oracleSignatures, adaptorSign
|
|
|
411
411
|
function finalizeSign(offer, accept, sign, signedFundingPsbt) /*throws*/{
|
|
412
412
|
return (__rb => {
|
|
413
413
|
try {
|
|
414
|
-
return _core.
|
|
414
|
+
return _core.FfiConverterUint8Array.lift(__rb);
|
|
415
415
|
} finally {
|
|
416
416
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
417
417
|
}
|
|
418
418
|
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeContractError.lift.bind(FfiConverterTypeContractError), /*caller:*/callStatus => {
|
|
419
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_finalize_sign(_core.
|
|
419
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_finalize_sign(_core.FfiConverterUint8Array.lower(offer, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(accept, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(sign, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(signedFundingPsbt, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
420
420
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
421
421
|
}
|
|
422
422
|
|
|
@@ -428,12 +428,12 @@ function finalizeSign(offer, accept, sign, signedFundingPsbt) /*throws*/{
|
|
|
428
428
|
function finalizeSignSpliced(offer, accept, sign, signedFundingPsbt, keys, spliceKeys) /*throws*/{
|
|
429
429
|
return (__rb => {
|
|
430
430
|
try {
|
|
431
|
-
return _core.
|
|
431
|
+
return _core.FfiConverterUint8Array.lift(__rb);
|
|
432
432
|
} finally {
|
|
433
433
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
434
434
|
}
|
|
435
435
|
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeContractError.lift.bind(FfiConverterTypeContractError), /*caller:*/callStatus => {
|
|
436
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_finalize_sign_spliced(_core.
|
|
436
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_finalize_sign_spliced(_core.FfiConverterUint8Array.lower(offer, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(accept, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(sign, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(signedFundingPsbt, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterTypeContractKeyProvider.lower(keys, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterSequenceTypeSpliceKeyRef.lower(spliceKeys, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
437
437
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
438
438
|
}
|
|
439
439
|
|
|
@@ -454,12 +454,12 @@ function finalizeSignSpliced(offer, accept, sign, signedFundingPsbt, keys, splic
|
|
|
454
454
|
function fundingInput(previousTransaction, vout, inputSerialId, sequence, maxWitnessLen, redeemScript) /*throws*/{
|
|
455
455
|
return (__rb => {
|
|
456
456
|
try {
|
|
457
|
-
return _core.
|
|
457
|
+
return _core.FfiConverterUint8Array.lift(__rb);
|
|
458
458
|
} finally {
|
|
459
459
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
460
460
|
}
|
|
461
461
|
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeContractError.lift.bind(FfiConverterTypeContractError), /*caller:*/callStatus => {
|
|
462
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_funding_input(_core.
|
|
462
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_funding_input(_core.FfiConverterUint8Array.lower(previousTransaction, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt32.lower(vout, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterOptionalUInt64.lower(inputSerialId, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt32.lower(sequence, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt16.lower(maxWitnessLen, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(redeemScript, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
463
463
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
464
464
|
}
|
|
465
465
|
|
|
@@ -470,12 +470,12 @@ function fundingInput(previousTransaction, vout, inputSerialId, sequence, maxWit
|
|
|
470
470
|
function getPubkeyFromExtkey(extkey, network) /*throws*/{
|
|
471
471
|
return (__rb => {
|
|
472
472
|
try {
|
|
473
|
-
return _core.
|
|
473
|
+
return _core.FfiConverterUint8Array.lift(__rb);
|
|
474
474
|
} finally {
|
|
475
475
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
476
476
|
}
|
|
477
477
|
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
478
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_get_pubkey_from_extkey(_core.
|
|
478
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_get_pubkey_from_extkey(_core.FfiConverterUint8Array.lower(extkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterString.lower(network, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
479
479
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
480
480
|
}
|
|
481
481
|
|
|
@@ -495,12 +495,12 @@ function getTotalInputVsize(inputs) {
|
|
|
495
495
|
function getXpubFromXpriv(xpriv, network) /*throws*/{
|
|
496
496
|
return (__rb => {
|
|
497
497
|
try {
|
|
498
|
-
return _core.
|
|
498
|
+
return _core.FfiConverterUint8Array.lift(__rb);
|
|
499
499
|
} finally {
|
|
500
500
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
501
501
|
}
|
|
502
502
|
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
503
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_get_xpub_from_xpriv(_core.
|
|
503
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_get_xpub_from_xpriv(_core.FfiConverterUint8Array.lower(xpriv, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterString.lower(network, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
504
504
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
505
505
|
}
|
|
506
506
|
|
|
@@ -517,7 +517,7 @@ function signAccept(offer, accept, keys, temporaryContractId, signedFundingPsbt)
|
|
|
517
517
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
518
518
|
}
|
|
519
519
|
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeContractError.lift.bind(FfiConverterTypeContractError), /*caller:*/callStatus => {
|
|
520
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_sign_accept(_core.
|
|
520
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_sign_accept(_core.FfiConverterUint8Array.lower(offer, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(accept, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterTypeContractKeyProvider.lower(keys, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(temporaryContractId, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(signedFundingPsbt, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
521
521
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
522
522
|
}
|
|
523
523
|
|
|
@@ -534,7 +534,7 @@ function signAcceptSpliced(offer, accept, keys, temporaryContractId, signedFundi
|
|
|
534
534
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
535
535
|
}
|
|
536
536
|
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeContractError.lift.bind(FfiConverterTypeContractError), /*caller:*/callStatus => {
|
|
537
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_sign_accept_spliced(_core.
|
|
537
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_sign_accept_spliced(_core.FfiConverterUint8Array.lower(offer, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(accept, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterTypeContractKeyProvider.lower(keys, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(temporaryContractId, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(signedFundingPsbt, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterSequenceTypeSpliceKeyRef.lower(spliceKeys, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
538
538
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
539
539
|
}
|
|
540
540
|
|
|
@@ -562,12 +562,12 @@ function signAcceptSpliced(offer, accept, keys, temporaryContractId, signedFundi
|
|
|
562
562
|
function signContractCet(offer, accept, sign, keys, temporaryContractId, attestations) /*throws*/{
|
|
563
563
|
return (__rb => {
|
|
564
564
|
try {
|
|
565
|
-
return _core.
|
|
565
|
+
return _core.FfiConverterUint8Array.lift(__rb);
|
|
566
566
|
} finally {
|
|
567
567
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
568
568
|
}
|
|
569
569
|
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeContractError.lift.bind(FfiConverterTypeContractError), /*caller:*/callStatus => {
|
|
570
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_sign_contract_cet(_core.
|
|
570
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_sign_contract_cet(_core.FfiConverterUint8Array.lower(offer, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(accept, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(sign, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterTypeContractKeyProvider.lower(keys, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(temporaryContractId, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterSequenceTypeOracleAttestationRef.lower(attestations, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
571
571
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
572
572
|
}
|
|
573
573
|
|
|
@@ -585,12 +585,12 @@ function signContractCet(offer, accept, sign, keys, temporaryContractId, attesta
|
|
|
585
585
|
function signContractRefund(offer, accept, sign, keys, temporaryContractId) /*throws*/{
|
|
586
586
|
return (__rb => {
|
|
587
587
|
try {
|
|
588
|
-
return _core.
|
|
588
|
+
return _core.FfiConverterUint8Array.lift(__rb);
|
|
589
589
|
} finally {
|
|
590
590
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
591
591
|
}
|
|
592
592
|
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeContractError.lift.bind(FfiConverterTypeContractError), /*caller:*/callStatus => {
|
|
593
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_sign_contract_refund(_core.
|
|
593
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_sign_contract_refund(_core.FfiConverterUint8Array.lower(offer, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(accept, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(sign, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterTypeContractKeyProvider.lower(keys, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(temporaryContractId, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
594
594
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
595
595
|
}
|
|
596
596
|
|
|
@@ -604,12 +604,12 @@ function signContractRefund(offer, accept, sign, keys, temporaryContractId) /*th
|
|
|
604
604
|
function signFundingPsbtWithDescriptor(offer, accept, fundingPsbt, descriptor, inputs) /*throws*/{
|
|
605
605
|
return (__rb => {
|
|
606
606
|
try {
|
|
607
|
-
return _core.
|
|
607
|
+
return _core.FfiConverterUint8Array.lift(__rb);
|
|
608
608
|
} finally {
|
|
609
609
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
610
610
|
}
|
|
611
611
|
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeContractError.lift.bind(FfiConverterTypeContractError), /*caller:*/callStatus => {
|
|
612
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_sign_funding_psbt_with_descriptor(_core.
|
|
612
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_sign_funding_psbt_with_descriptor(_core.FfiConverterUint8Array.lower(offer, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(accept, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(fundingPsbt, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterString.lower(descriptor, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterSequenceTypeDescriptorInput.lower(inputs, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
613
613
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
614
614
|
}
|
|
615
615
|
|
|
@@ -621,7 +621,7 @@ function signFundingPsbtWithDescriptor(offer, accept, fundingPsbt, descriptor, i
|
|
|
621
621
|
*/
|
|
622
622
|
function validateAccept(offer, accept) /*throws*/{
|
|
623
623
|
uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeContractError.lift.bind(FfiConverterTypeContractError), /*caller:*/callStatus => {
|
|
624
|
-
(0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_validate_accept(_core.
|
|
624
|
+
(0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_validate_accept(_core.FfiConverterUint8Array.lower(offer, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(accept, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
625
625
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString));
|
|
626
626
|
}
|
|
627
627
|
|
|
@@ -637,7 +637,7 @@ function validateAccept(offer, accept) /*throws*/{
|
|
|
637
637
|
*/
|
|
638
638
|
function validateOffer(offer, minTimeoutInterval, maxTimeoutInterval) /*throws*/{
|
|
639
639
|
uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeContractError.lift.bind(FfiConverterTypeContractError), /*caller:*/callStatus => {
|
|
640
|
-
(0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_validate_offer(_core.
|
|
640
|
+
(0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_validate_offer(_core.FfiConverterUint8Array.lower(offer, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt32.lower(minTimeoutInterval, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt32.lower(maxTimeoutInterval, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
641
641
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString));
|
|
642
642
|
}
|
|
643
643
|
|
|
@@ -649,12 +649,12 @@ function validateOffer(offer, minTimeoutInterval, maxTimeoutInterval) /*throws*/
|
|
|
649
649
|
*/
|
|
650
650
|
function validateSign(offer, accept, sign) /*throws*/{
|
|
651
651
|
uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeContractError.lift.bind(FfiConverterTypeContractError), /*caller:*/callStatus => {
|
|
652
|
-
(0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_validate_sign(_core.
|
|
652
|
+
(0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_validate_sign(_core.FfiConverterUint8Array.lower(offer, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(accept, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(sign, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
653
653
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString));
|
|
654
654
|
}
|
|
655
655
|
function verifyCetAdaptorSigsFromOracleInfo(adaptorSigs, cets, oracleInfos, pubkey, fundingScriptPubkey, totalCollateral, msgs) {
|
|
656
656
|
return _core.FfiConverterBool.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
657
|
-
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.
|
|
657
|
+
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.FfiConverterUint8Array.lower(pubkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.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);
|
|
658
658
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
659
659
|
}
|
|
660
660
|
function version() {
|
|
@@ -691,24 +691,24 @@ const FfiConverterTypeContractPartyParams = (() => {
|
|
|
691
691
|
class FFIConverter extends _core.AbstractFfiConverterByteArray {
|
|
692
692
|
read(from) {
|
|
693
693
|
return {
|
|
694
|
-
fundingPubkey: _core.
|
|
694
|
+
fundingPubkey: _core.FfiConverterUint8Array.read(from),
|
|
695
695
|
fundingInputs: FfiConverterSequenceBytes.read(from),
|
|
696
|
-
payoutSpk: _core.
|
|
696
|
+
payoutSpk: _core.FfiConverterUint8Array.read(from),
|
|
697
697
|
payoutSerialId: FfiConverterOptionalUInt64.read(from),
|
|
698
|
-
changeSpk: _core.
|
|
698
|
+
changeSpk: _core.FfiConverterUint8Array.read(from),
|
|
699
699
|
changeSerialId: FfiConverterOptionalUInt64.read(from)
|
|
700
700
|
};
|
|
701
701
|
}
|
|
702
702
|
write(value, into) {
|
|
703
|
-
_core.
|
|
703
|
+
_core.FfiConverterUint8Array.write(value.fundingPubkey, into);
|
|
704
704
|
FfiConverterSequenceBytes.write(value.fundingInputs, into);
|
|
705
|
-
_core.
|
|
705
|
+
_core.FfiConverterUint8Array.write(value.payoutSpk, into);
|
|
706
706
|
FfiConverterOptionalUInt64.write(value.payoutSerialId, into);
|
|
707
|
-
_core.
|
|
707
|
+
_core.FfiConverterUint8Array.write(value.changeSpk, into);
|
|
708
708
|
FfiConverterOptionalUInt64.write(value.changeSerialId, into);
|
|
709
709
|
}
|
|
710
710
|
allocationSize(value) {
|
|
711
|
-
return _core.
|
|
711
|
+
return _core.FfiConverterUint8Array.allocationSize(value.fundingPubkey) + FfiConverterSequenceBytes.allocationSize(value.fundingInputs) + _core.FfiConverterUint8Array.allocationSize(value.payoutSpk) + FfiConverterOptionalUInt64.allocationSize(value.payoutSerialId) + _core.FfiConverterUint8Array.allocationSize(value.changeSpk) + FfiConverterOptionalUInt64.allocationSize(value.changeSerialId);
|
|
712
712
|
}
|
|
713
713
|
}
|
|
714
714
|
return new FFIConverter();
|
|
@@ -810,7 +810,7 @@ const FfiConverterTypeTxInput = (() => {
|
|
|
810
810
|
return {
|
|
811
811
|
txid: FfiConverterString.read(from),
|
|
812
812
|
vout: _core.FfiConverterUInt32.read(from),
|
|
813
|
-
scriptSig: _core.
|
|
813
|
+
scriptSig: _core.FfiConverterUint8Array.read(from),
|
|
814
814
|
sequence: _core.FfiConverterUInt32.read(from),
|
|
815
815
|
witness: FfiConverterSequenceBytes.read(from)
|
|
816
816
|
};
|
|
@@ -818,12 +818,12 @@ const FfiConverterTypeTxInput = (() => {
|
|
|
818
818
|
write(value, into) {
|
|
819
819
|
FfiConverterString.write(value.txid, into);
|
|
820
820
|
_core.FfiConverterUInt32.write(value.vout, into);
|
|
821
|
-
_core.
|
|
821
|
+
_core.FfiConverterUint8Array.write(value.scriptSig, into);
|
|
822
822
|
_core.FfiConverterUInt32.write(value.sequence, into);
|
|
823
823
|
FfiConverterSequenceBytes.write(value.witness, into);
|
|
824
824
|
}
|
|
825
825
|
allocationSize(value) {
|
|
826
|
-
return FfiConverterString.allocationSize(value.txid) + _core.FfiConverterUInt32.allocationSize(value.vout) + _core.
|
|
826
|
+
return FfiConverterString.allocationSize(value.txid) + _core.FfiConverterUInt32.allocationSize(value.vout) + _core.FfiConverterUint8Array.allocationSize(value.scriptSig) + _core.FfiConverterUInt32.allocationSize(value.sequence) + FfiConverterSequenceBytes.allocationSize(value.witness);
|
|
827
827
|
}
|
|
828
828
|
}
|
|
829
829
|
return new FFIConverter();
|
|
@@ -852,15 +852,15 @@ const FfiConverterTypeTxOutput = (() => {
|
|
|
852
852
|
read(from) {
|
|
853
853
|
return {
|
|
854
854
|
value: _core.FfiConverterUInt64.read(from),
|
|
855
|
-
scriptPubkey: _core.
|
|
855
|
+
scriptPubkey: _core.FfiConverterUint8Array.read(from)
|
|
856
856
|
};
|
|
857
857
|
}
|
|
858
858
|
write(value, into) {
|
|
859
859
|
_core.FfiConverterUInt64.write(value.value, into);
|
|
860
|
-
_core.
|
|
860
|
+
_core.FfiConverterUint8Array.write(value.scriptPubkey, into);
|
|
861
861
|
}
|
|
862
862
|
allocationSize(value) {
|
|
863
|
-
return _core.FfiConverterUInt64.allocationSize(value.value) + _core.
|
|
863
|
+
return _core.FfiConverterUInt64.allocationSize(value.value) + _core.FfiConverterUint8Array.allocationSize(value.scriptPubkey);
|
|
864
864
|
}
|
|
865
865
|
}
|
|
866
866
|
return new FFIConverter();
|
|
@@ -885,7 +885,7 @@ const Transaction = exports.Transaction = (() => {
|
|
|
885
885
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
886
886
|
}
|
|
887
887
|
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
888
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_method_transaction_add_signature(FfiConverterTypeTransaction.lower(self_, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.
|
|
888
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_method_transaction_add_signature(FfiConverterTypeTransaction.lower(self_, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(signature, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(pubkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt32.lower(inputIndex, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
889
889
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
890
890
|
},
|
|
891
891
|
cetAdaptorSignatureFromOracleInfo(self_, oracleInfo, fundingSk, fundingScriptPubkey, totalCollateral, msgs) {
|
|
@@ -896,7 +896,7 @@ const Transaction = exports.Transaction = (() => {
|
|
|
896
896
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
897
897
|
}
|
|
898
898
|
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
899
|
-
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.
|
|
899
|
+
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.FfiConverterUint8Array.lower(fundingSk, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.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);
|
|
900
900
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
901
901
|
},
|
|
902
902
|
cetAdaptorSignatureInputs(self_, oracleInfo, fundingScriptPubkey, fundOutputValue, msgs) {
|
|
@@ -907,29 +907,29 @@ const Transaction = exports.Transaction = (() => {
|
|
|
907
907
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
908
908
|
}
|
|
909
909
|
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
910
|
-
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.
|
|
910
|
+
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.FfiConverterUint8Array.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);
|
|
911
911
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
912
912
|
},
|
|
913
913
|
cetSighash(self_, fundingScriptPubkey, fundOutputValue) {
|
|
914
914
|
return (__rb => {
|
|
915
915
|
try {
|
|
916
|
-
return _core.
|
|
916
|
+
return _core.FfiConverterUint8Array.lift(__rb);
|
|
917
917
|
} finally {
|
|
918
918
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
919
919
|
}
|
|
920
920
|
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
921
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_method_transaction_cet_sighash(FfiConverterTypeTransaction.lower(self_, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.
|
|
921
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_method_transaction_cet_sighash(FfiConverterTypeTransaction.lower(self_, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(fundingScriptPubkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt64.lower(fundOutputValue, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
922
922
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
923
923
|
},
|
|
924
924
|
rawFundingInputSignature(self_, privkey, prevTxId, prevTxVout, value) {
|
|
925
925
|
return (__rb => {
|
|
926
926
|
try {
|
|
927
|
-
return _core.
|
|
927
|
+
return _core.FfiConverterUint8Array.lift(__rb);
|
|
928
928
|
} finally {
|
|
929
929
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
930
930
|
}
|
|
931
931
|
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
932
|
-
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.
|
|
932
|
+
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.FfiConverterUint8Array.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);
|
|
933
933
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
934
934
|
},
|
|
935
935
|
signCet(self_, adaptorSignature, oracleSignatures, fundingSecretKey, otherPubkey, fundingScriptPubkey, fundOutputValue) {
|
|
@@ -940,7 +940,7 @@ const Transaction = exports.Transaction = (() => {
|
|
|
940
940
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
941
941
|
}
|
|
942
942
|
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
943
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_method_transaction_sign_cet(FfiConverterTypeTransaction.lower(self_, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.
|
|
943
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_method_transaction_sign_cet(FfiConverterTypeTransaction.lower(self_, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(adaptorSignature, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterSequenceBytes.lower(oracleSignatures, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(fundingSecretKey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(otherPubkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(fundingScriptPubkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUInt64.lower(fundOutputValue, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
944
944
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
945
945
|
},
|
|
946
946
|
signFundInput(self_, privkey, prevTxId, prevTxVout, value) {
|
|
@@ -951,7 +951,7 @@ const Transaction = exports.Transaction = (() => {
|
|
|
951
951
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
952
952
|
}
|
|
953
953
|
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
954
|
-
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.
|
|
954
|
+
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.FfiConverterUint8Array.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);
|
|
955
955
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
956
956
|
},
|
|
957
957
|
signMultiSigInput(self_, dlcInput, localPrivkey, remoteSignature) {
|
|
@@ -962,12 +962,12 @@ const Transaction = exports.Transaction = (() => {
|
|
|
962
962
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
963
963
|
}
|
|
964
964
|
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
965
|
-
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.
|
|
965
|
+
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.FfiConverterUint8Array.lower(localPrivkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.lower(remoteSignature, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
966
966
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
967
967
|
},
|
|
968
968
|
verifyFundSignature(self_, signature, pubkey, txid, vout, inputAmount) {
|
|
969
969
|
return _core.FfiConverterBool.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
970
|
-
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.
|
|
970
|
+
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.FfiConverterUint8Array.lower(signature, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.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);
|
|
971
971
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
972
972
|
}
|
|
973
973
|
});
|
|
@@ -980,7 +980,7 @@ const FfiConverterTypeTransaction = (() => {
|
|
|
980
980
|
lockTime: _core.FfiConverterUInt32.read(from),
|
|
981
981
|
inputs: FfiConverterSequenceTypeTxInput.read(from),
|
|
982
982
|
outputs: FfiConverterSequenceTypeTxOutput.read(from),
|
|
983
|
-
rawBytes: _core.
|
|
983
|
+
rawBytes: _core.FfiConverterUint8Array.read(from)
|
|
984
984
|
};
|
|
985
985
|
}
|
|
986
986
|
write(value, into) {
|
|
@@ -988,10 +988,10 @@ const FfiConverterTypeTransaction = (() => {
|
|
|
988
988
|
_core.FfiConverterUInt32.write(value.lockTime, into);
|
|
989
989
|
FfiConverterSequenceTypeTxInput.write(value.inputs, into);
|
|
990
990
|
FfiConverterSequenceTypeTxOutput.write(value.outputs, into);
|
|
991
|
-
_core.
|
|
991
|
+
_core.FfiConverterUint8Array.write(value.rawBytes, into);
|
|
992
992
|
}
|
|
993
993
|
allocationSize(value) {
|
|
994
|
-
return _core.FfiConverterInt32.allocationSize(value.version) + _core.FfiConverterUInt32.allocationSize(value.lockTime) + FfiConverterSequenceTypeTxInput.allocationSize(value.inputs) + FfiConverterSequenceTypeTxOutput.allocationSize(value.outputs) + _core.
|
|
994
|
+
return _core.FfiConverterInt32.allocationSize(value.version) + _core.FfiConverterUInt32.allocationSize(value.lockTime) + FfiConverterSequenceTypeTxInput.allocationSize(value.inputs) + FfiConverterSequenceTypeTxOutput.allocationSize(value.outputs) + _core.FfiConverterUint8Array.allocationSize(value.rawBytes);
|
|
995
995
|
}
|
|
996
996
|
}
|
|
997
997
|
return new FFIConverter();
|
|
@@ -1017,17 +1017,17 @@ const FfiConverterTypeDlcTransactions = (() => {
|
|
|
1017
1017
|
fund: FfiConverterTypeTransaction.read(from),
|
|
1018
1018
|
cets: FfiConverterSequenceTypeTransaction.read(from),
|
|
1019
1019
|
refund: FfiConverterTypeTransaction.read(from),
|
|
1020
|
-
fundingScriptPubkey: _core.
|
|
1020
|
+
fundingScriptPubkey: _core.FfiConverterUint8Array.read(from)
|
|
1021
1021
|
};
|
|
1022
1022
|
}
|
|
1023
1023
|
write(value, into) {
|
|
1024
1024
|
FfiConverterTypeTransaction.write(value.fund, into);
|
|
1025
1025
|
FfiConverterSequenceTypeTransaction.write(value.cets, into);
|
|
1026
1026
|
FfiConverterTypeTransaction.write(value.refund, into);
|
|
1027
|
-
_core.
|
|
1027
|
+
_core.FfiConverterUint8Array.write(value.fundingScriptPubkey, into);
|
|
1028
1028
|
}
|
|
1029
1029
|
allocationSize(value) {
|
|
1030
|
-
return FfiConverterTypeTransaction.allocationSize(value.fund) + FfiConverterSequenceTypeTransaction.allocationSize(value.cets) + FfiConverterTypeTransaction.allocationSize(value.refund) + _core.
|
|
1030
|
+
return FfiConverterTypeTransaction.allocationSize(value.fund) + FfiConverterSequenceTypeTransaction.allocationSize(value.cets) + FfiConverterTypeTransaction.allocationSize(value.refund) + _core.FfiConverterUint8Array.allocationSize(value.fundingScriptPubkey);
|
|
1031
1031
|
}
|
|
1032
1032
|
}
|
|
1033
1033
|
return new FFIConverter();
|
|
@@ -1055,18 +1055,18 @@ const FfiConverterTypeAcceptResult = (() => {
|
|
|
1055
1055
|
class FFIConverter extends _core.AbstractFfiConverterByteArray {
|
|
1056
1056
|
read(from) {
|
|
1057
1057
|
return {
|
|
1058
|
-
accept: _core.
|
|
1058
|
+
accept: _core.FfiConverterUint8Array.read(from),
|
|
1059
1059
|
transactions: FfiConverterTypeDlcTransactions.read(from),
|
|
1060
|
-
fundingPsbt: _core.
|
|
1060
|
+
fundingPsbt: _core.FfiConverterUint8Array.read(from)
|
|
1061
1061
|
};
|
|
1062
1062
|
}
|
|
1063
1063
|
write(value, into) {
|
|
1064
|
-
_core.
|
|
1064
|
+
_core.FfiConverterUint8Array.write(value.accept, into);
|
|
1065
1065
|
FfiConverterTypeDlcTransactions.write(value.transactions, into);
|
|
1066
|
-
_core.
|
|
1066
|
+
_core.FfiConverterUint8Array.write(value.fundingPsbt, into);
|
|
1067
1067
|
}
|
|
1068
1068
|
allocationSize(value) {
|
|
1069
|
-
return _core.
|
|
1069
|
+
return _core.FfiConverterUint8Array.allocationSize(value.accept) + FfiConverterTypeDlcTransactions.allocationSize(value.transactions) + _core.FfiConverterUint8Array.allocationSize(value.fundingPsbt);
|
|
1070
1070
|
}
|
|
1071
1071
|
}
|
|
1072
1072
|
return new FFIConverter();
|
|
@@ -1085,7 +1085,7 @@ const AdaptorSignature = exports.AdaptorSignature = (() => {
|
|
|
1085
1085
|
defaults: () => Object.freeze(defaults()),
|
|
1086
1086
|
verifyFromOracleInfo(self_, cet, oracleInfos, pubkey, fundingScriptPubkey, totalCollateral, msgs) {
|
|
1087
1087
|
return _core.FfiConverterBool.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
1088
|
-
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.
|
|
1088
|
+
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.FfiConverterUint8Array.lower(pubkey, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), _core.FfiConverterUint8Array.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);
|
|
1089
1089
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
1090
1090
|
}
|
|
1091
1091
|
});
|
|
@@ -1094,16 +1094,16 @@ const FfiConverterTypeAdaptorSignature = (() => {
|
|
|
1094
1094
|
class FFIConverter extends _core.AbstractFfiConverterByteArray {
|
|
1095
1095
|
read(from) {
|
|
1096
1096
|
return {
|
|
1097
|
-
signature: _core.
|
|
1098
|
-
proof: _core.
|
|
1097
|
+
signature: _core.FfiConverterUint8Array.read(from),
|
|
1098
|
+
proof: _core.FfiConverterUint8Array.read(from)
|
|
1099
1099
|
};
|
|
1100
1100
|
}
|
|
1101
1101
|
write(value, into) {
|
|
1102
|
-
_core.
|
|
1103
|
-
_core.
|
|
1102
|
+
_core.FfiConverterUint8Array.write(value.signature, into);
|
|
1103
|
+
_core.FfiConverterUint8Array.write(value.proof, into);
|
|
1104
1104
|
}
|
|
1105
1105
|
allocationSize(value) {
|
|
1106
|
-
return _core.
|
|
1106
|
+
return _core.FfiConverterUint8Array.allocationSize(value.signature) + _core.FfiConverterUint8Array.allocationSize(value.proof);
|
|
1107
1107
|
}
|
|
1108
1108
|
}
|
|
1109
1109
|
return new FFIConverter();
|
|
@@ -1137,26 +1137,26 @@ const FfiConverterTypeCetAdaptorSignatureDebugInfo = (() => {
|
|
|
1137
1137
|
class FFIConverter extends _core.AbstractFfiConverterByteArray {
|
|
1138
1138
|
read(from) {
|
|
1139
1139
|
return {
|
|
1140
|
-
sighash: _core.
|
|
1141
|
-
adaptorPoint: _core.
|
|
1140
|
+
sighash: _core.FfiConverterUint8Array.read(from),
|
|
1141
|
+
adaptorPoint: _core.FfiConverterUint8Array.read(from),
|
|
1142
1142
|
inputIndex: _core.FfiConverterUInt32.read(from),
|
|
1143
|
-
scriptPubkey: _core.
|
|
1143
|
+
scriptPubkey: _core.FfiConverterUint8Array.read(from),
|
|
1144
1144
|
value: _core.FfiConverterUInt64.read(from),
|
|
1145
1145
|
cetTxid: FfiConverterString.read(from),
|
|
1146
|
-
cetRaw: _core.
|
|
1146
|
+
cetRaw: _core.FfiConverterUint8Array.read(from)
|
|
1147
1147
|
};
|
|
1148
1148
|
}
|
|
1149
1149
|
write(value, into) {
|
|
1150
|
-
_core.
|
|
1151
|
-
_core.
|
|
1150
|
+
_core.FfiConverterUint8Array.write(value.sighash, into);
|
|
1151
|
+
_core.FfiConverterUint8Array.write(value.adaptorPoint, into);
|
|
1152
1152
|
_core.FfiConverterUInt32.write(value.inputIndex, into);
|
|
1153
|
-
_core.
|
|
1153
|
+
_core.FfiConverterUint8Array.write(value.scriptPubkey, into);
|
|
1154
1154
|
_core.FfiConverterUInt64.write(value.value, into);
|
|
1155
1155
|
FfiConverterString.write(value.cetTxid, into);
|
|
1156
|
-
_core.
|
|
1156
|
+
_core.FfiConverterUint8Array.write(value.cetRaw, into);
|
|
1157
1157
|
}
|
|
1158
1158
|
allocationSize(value) {
|
|
1159
|
-
return _core.
|
|
1159
|
+
return _core.FfiConverterUint8Array.allocationSize(value.sighash) + _core.FfiConverterUint8Array.allocationSize(value.adaptorPoint) + _core.FfiConverterUInt32.allocationSize(value.inputIndex) + _core.FfiConverterUint8Array.allocationSize(value.scriptPubkey) + _core.FfiConverterUInt64.allocationSize(value.value) + FfiConverterString.allocationSize(value.cetTxid) + _core.FfiConverterUint8Array.allocationSize(value.cetRaw);
|
|
1160
1160
|
}
|
|
1161
1161
|
}
|
|
1162
1162
|
return new FFIConverter();
|
|
@@ -1303,9 +1303,9 @@ const FfiConverterTypeCreateOfferParams = (() => {
|
|
|
1303
1303
|
class FFIConverter extends _core.AbstractFfiConverterByteArray {
|
|
1304
1304
|
read(from) {
|
|
1305
1305
|
return {
|
|
1306
|
-
chainHash: _core.
|
|
1306
|
+
chainHash: _core.FfiConverterUint8Array.read(from),
|
|
1307
1307
|
temporaryContractId: FfiConverterOptionalBytes.read(from),
|
|
1308
|
-
contractInfo: _core.
|
|
1308
|
+
contractInfo: _core.FfiConverterUint8Array.read(from),
|
|
1309
1309
|
offerCollateralSats: _core.FfiConverterUInt64.read(from),
|
|
1310
1310
|
party: FfiConverterTypeContractPartyParams.read(from),
|
|
1311
1311
|
fundOutputSerialId: FfiConverterOptionalUInt64.read(from),
|
|
@@ -1316,9 +1316,9 @@ const FfiConverterTypeCreateOfferParams = (() => {
|
|
|
1316
1316
|
};
|
|
1317
1317
|
}
|
|
1318
1318
|
write(value, into) {
|
|
1319
|
-
_core.
|
|
1319
|
+
_core.FfiConverterUint8Array.write(value.chainHash, into);
|
|
1320
1320
|
FfiConverterOptionalBytes.write(value.temporaryContractId, into);
|
|
1321
|
-
_core.
|
|
1321
|
+
_core.FfiConverterUint8Array.write(value.contractInfo, into);
|
|
1322
1322
|
_core.FfiConverterUInt64.write(value.offerCollateralSats, into);
|
|
1323
1323
|
FfiConverterTypeContractPartyParams.write(value.party, into);
|
|
1324
1324
|
FfiConverterOptionalUInt64.write(value.fundOutputSerialId, into);
|
|
@@ -1328,7 +1328,7 @@ const FfiConverterTypeCreateOfferParams = (() => {
|
|
|
1328
1328
|
_core.FfiConverterUInt8.write(value.contractFlags, into);
|
|
1329
1329
|
}
|
|
1330
1330
|
allocationSize(value) {
|
|
1331
|
-
return _core.
|
|
1331
|
+
return _core.FfiConverterUint8Array.allocationSize(value.chainHash) + FfiConverterOptionalBytes.allocationSize(value.temporaryContractId) + _core.FfiConverterUint8Array.allocationSize(value.contractInfo) + _core.FfiConverterUInt64.allocationSize(value.offerCollateralSats) + FfiConverterTypeContractPartyParams.allocationSize(value.party) + FfiConverterOptionalUInt64.allocationSize(value.fundOutputSerialId) + _core.FfiConverterUInt64.allocationSize(value.feeRatePerVb) + _core.FfiConverterUInt32.allocationSize(value.cetLocktime) + _core.FfiConverterUInt32.allocationSize(value.refundLocktime) + _core.FfiConverterUInt8.allocationSize(value.contractFlags);
|
|
1332
1332
|
}
|
|
1333
1333
|
}
|
|
1334
1334
|
return new FFIConverter();
|
|
@@ -1391,26 +1391,26 @@ const FfiConverterTypeDlcInputInfo = (() => {
|
|
|
1391
1391
|
return {
|
|
1392
1392
|
fundTx: FfiConverterTypeTransaction.read(from),
|
|
1393
1393
|
fundVout: _core.FfiConverterUInt32.read(from),
|
|
1394
|
-
localFundPubkey: _core.
|
|
1395
|
-
remoteFundPubkey: _core.
|
|
1394
|
+
localFundPubkey: _core.FfiConverterUint8Array.read(from),
|
|
1395
|
+
remoteFundPubkey: _core.FfiConverterUint8Array.read(from),
|
|
1396
1396
|
fundAmount: _core.FfiConverterUInt64.read(from),
|
|
1397
1397
|
maxWitnessLen: _core.FfiConverterUInt32.read(from),
|
|
1398
1398
|
inputSerialId: _core.FfiConverterUInt64.read(from),
|
|
1399
|
-
contractId: _core.
|
|
1399
|
+
contractId: _core.FfiConverterUint8Array.read(from)
|
|
1400
1400
|
};
|
|
1401
1401
|
}
|
|
1402
1402
|
write(value, into) {
|
|
1403
1403
|
FfiConverterTypeTransaction.write(value.fundTx, into);
|
|
1404
1404
|
_core.FfiConverterUInt32.write(value.fundVout, into);
|
|
1405
|
-
_core.
|
|
1406
|
-
_core.
|
|
1405
|
+
_core.FfiConverterUint8Array.write(value.localFundPubkey, into);
|
|
1406
|
+
_core.FfiConverterUint8Array.write(value.remoteFundPubkey, into);
|
|
1407
1407
|
_core.FfiConverterUInt64.write(value.fundAmount, into);
|
|
1408
1408
|
_core.FfiConverterUInt32.write(value.maxWitnessLen, into);
|
|
1409
1409
|
_core.FfiConverterUInt64.write(value.inputSerialId, into);
|
|
1410
|
-
_core.
|
|
1410
|
+
_core.FfiConverterUint8Array.write(value.contractId, into);
|
|
1411
1411
|
}
|
|
1412
1412
|
allocationSize(value) {
|
|
1413
|
-
return FfiConverterTypeTransaction.allocationSize(value.fundTx) + _core.FfiConverterUInt32.allocationSize(value.fundVout) + _core.
|
|
1413
|
+
return FfiConverterTypeTransaction.allocationSize(value.fundTx) + _core.FfiConverterUInt32.allocationSize(value.fundVout) + _core.FfiConverterUint8Array.allocationSize(value.localFundPubkey) + _core.FfiConverterUint8Array.allocationSize(value.remoteFundPubkey) + _core.FfiConverterUInt64.allocationSize(value.fundAmount) + _core.FfiConverterUInt32.allocationSize(value.maxWitnessLen) + _core.FfiConverterUInt64.allocationSize(value.inputSerialId) + _core.FfiConverterUint8Array.allocationSize(value.contractId);
|
|
1414
1414
|
}
|
|
1415
1415
|
}
|
|
1416
1416
|
return new FFIConverter();
|
|
@@ -1440,15 +1440,15 @@ const FfiConverterTypeOracleAttestationRef = (() => {
|
|
|
1440
1440
|
read(from) {
|
|
1441
1441
|
return {
|
|
1442
1442
|
oracleIndex: _core.FfiConverterUInt32.read(from),
|
|
1443
|
-
attestation: _core.
|
|
1443
|
+
attestation: _core.FfiConverterUint8Array.read(from)
|
|
1444
1444
|
};
|
|
1445
1445
|
}
|
|
1446
1446
|
write(value, into) {
|
|
1447
1447
|
_core.FfiConverterUInt32.write(value.oracleIndex, into);
|
|
1448
|
-
_core.
|
|
1448
|
+
_core.FfiConverterUint8Array.write(value.attestation, into);
|
|
1449
1449
|
}
|
|
1450
1450
|
allocationSize(value) {
|
|
1451
|
-
return _core.FfiConverterUInt32.allocationSize(value.oracleIndex) + _core.
|
|
1451
|
+
return _core.FfiConverterUInt32.allocationSize(value.oracleIndex) + _core.FfiConverterUint8Array.allocationSize(value.attestation);
|
|
1452
1452
|
}
|
|
1453
1453
|
}
|
|
1454
1454
|
return new FFIConverter();
|
|
@@ -1471,16 +1471,16 @@ const FfiConverterTypeOracleInfo = (() => {
|
|
|
1471
1471
|
class FFIConverter extends _core.AbstractFfiConverterByteArray {
|
|
1472
1472
|
read(from) {
|
|
1473
1473
|
return {
|
|
1474
|
-
publicKey: _core.
|
|
1474
|
+
publicKey: _core.FfiConverterUint8Array.read(from),
|
|
1475
1475
|
nonces: FfiConverterSequenceBytes.read(from)
|
|
1476
1476
|
};
|
|
1477
1477
|
}
|
|
1478
1478
|
write(value, into) {
|
|
1479
|
-
_core.
|
|
1479
|
+
_core.FfiConverterUint8Array.write(value.publicKey, into);
|
|
1480
1480
|
FfiConverterSequenceBytes.write(value.nonces, into);
|
|
1481
1481
|
}
|
|
1482
1482
|
allocationSize(value) {
|
|
1483
|
-
return _core.
|
|
1483
|
+
return _core.FfiConverterUint8Array.allocationSize(value.publicKey) + FfiConverterSequenceBytes.allocationSize(value.nonces);
|
|
1484
1484
|
}
|
|
1485
1485
|
}
|
|
1486
1486
|
return new FFIConverter();
|
|
@@ -1505,7 +1505,7 @@ const FfiConverterTypeTxInputInfo = (() => {
|
|
|
1505
1505
|
return {
|
|
1506
1506
|
txid: FfiConverterString.read(from),
|
|
1507
1507
|
vout: _core.FfiConverterUInt32.read(from),
|
|
1508
|
-
scriptSig: _core.
|
|
1508
|
+
scriptSig: _core.FfiConverterUint8Array.read(from),
|
|
1509
1509
|
maxWitnessLength: _core.FfiConverterUInt32.read(from),
|
|
1510
1510
|
serialId: _core.FfiConverterUInt64.read(from)
|
|
1511
1511
|
};
|
|
@@ -1513,12 +1513,12 @@ const FfiConverterTypeTxInputInfo = (() => {
|
|
|
1513
1513
|
write(value, into) {
|
|
1514
1514
|
FfiConverterString.write(value.txid, into);
|
|
1515
1515
|
_core.FfiConverterUInt32.write(value.vout, into);
|
|
1516
|
-
_core.
|
|
1516
|
+
_core.FfiConverterUint8Array.write(value.scriptSig, into);
|
|
1517
1517
|
_core.FfiConverterUInt32.write(value.maxWitnessLength, into);
|
|
1518
1518
|
_core.FfiConverterUInt64.write(value.serialId, into);
|
|
1519
1519
|
}
|
|
1520
1520
|
allocationSize(value) {
|
|
1521
|
-
return FfiConverterString.allocationSize(value.txid) + _core.FfiConverterUInt32.allocationSize(value.vout) + _core.
|
|
1521
|
+
return FfiConverterString.allocationSize(value.txid) + _core.FfiConverterUInt32.allocationSize(value.vout) + _core.FfiConverterUint8Array.allocationSize(value.scriptSig) + _core.FfiConverterUInt32.allocationSize(value.maxWitnessLength) + _core.FfiConverterUInt64.allocationSize(value.serialId);
|
|
1522
1522
|
}
|
|
1523
1523
|
}
|
|
1524
1524
|
return new FFIConverter();
|
|
@@ -1552,10 +1552,10 @@ const FfiConverterTypePartyParams = (() => {
|
|
|
1552
1552
|
class FFIConverter extends _core.AbstractFfiConverterByteArray {
|
|
1553
1553
|
read(from) {
|
|
1554
1554
|
return {
|
|
1555
|
-
fundPubkey: _core.
|
|
1556
|
-
changeScriptPubkey: _core.
|
|
1555
|
+
fundPubkey: _core.FfiConverterUint8Array.read(from),
|
|
1556
|
+
changeScriptPubkey: _core.FfiConverterUint8Array.read(from),
|
|
1557
1557
|
changeSerialId: _core.FfiConverterUInt64.read(from),
|
|
1558
|
-
payoutScriptPubkey: _core.
|
|
1558
|
+
payoutScriptPubkey: _core.FfiConverterUint8Array.read(from),
|
|
1559
1559
|
payoutSerialId: _core.FfiConverterUInt64.read(from),
|
|
1560
1560
|
inputs: FfiConverterSequenceTypeTxInputInfo.read(from),
|
|
1561
1561
|
inputAmount: _core.FfiConverterUInt64.read(from),
|
|
@@ -1564,10 +1564,10 @@ const FfiConverterTypePartyParams = (() => {
|
|
|
1564
1564
|
};
|
|
1565
1565
|
}
|
|
1566
1566
|
write(value, into) {
|
|
1567
|
-
_core.
|
|
1568
|
-
_core.
|
|
1567
|
+
_core.FfiConverterUint8Array.write(value.fundPubkey, into);
|
|
1568
|
+
_core.FfiConverterUint8Array.write(value.changeScriptPubkey, into);
|
|
1569
1569
|
_core.FfiConverterUInt64.write(value.changeSerialId, into);
|
|
1570
|
-
_core.
|
|
1570
|
+
_core.FfiConverterUint8Array.write(value.payoutScriptPubkey, into);
|
|
1571
1571
|
_core.FfiConverterUInt64.write(value.payoutSerialId, into);
|
|
1572
1572
|
FfiConverterSequenceTypeTxInputInfo.write(value.inputs, into);
|
|
1573
1573
|
_core.FfiConverterUInt64.write(value.inputAmount, into);
|
|
@@ -1575,7 +1575,7 @@ const FfiConverterTypePartyParams = (() => {
|
|
|
1575
1575
|
FfiConverterSequenceTypeDlcInputInfo.write(value.dlcInputs, into);
|
|
1576
1576
|
}
|
|
1577
1577
|
allocationSize(value) {
|
|
1578
|
-
return _core.
|
|
1578
|
+
return _core.FfiConverterUint8Array.allocationSize(value.fundPubkey) + _core.FfiConverterUint8Array.allocationSize(value.changeScriptPubkey) + _core.FfiConverterUInt64.allocationSize(value.changeSerialId) + _core.FfiConverterUint8Array.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);
|
|
1579
1579
|
}
|
|
1580
1580
|
}
|
|
1581
1581
|
return new FFIConverter();
|
|
@@ -1635,16 +1635,16 @@ const FfiConverterTypeSignResult = (() => {
|
|
|
1635
1635
|
class FFIConverter extends _core.AbstractFfiConverterByteArray {
|
|
1636
1636
|
read(from) {
|
|
1637
1637
|
return {
|
|
1638
|
-
sign: _core.
|
|
1638
|
+
sign: _core.FfiConverterUint8Array.read(from),
|
|
1639
1639
|
transactions: FfiConverterTypeDlcTransactions.read(from)
|
|
1640
1640
|
};
|
|
1641
1641
|
}
|
|
1642
1642
|
write(value, into) {
|
|
1643
|
-
_core.
|
|
1643
|
+
_core.FfiConverterUint8Array.write(value.sign, into);
|
|
1644
1644
|
FfiConverterTypeDlcTransactions.write(value.transactions, into);
|
|
1645
1645
|
}
|
|
1646
1646
|
allocationSize(value) {
|
|
1647
|
-
return _core.
|
|
1647
|
+
return _core.FfiConverterUint8Array.allocationSize(value.sign) + FfiConverterTypeDlcTransactions.allocationSize(value.transactions);
|
|
1648
1648
|
}
|
|
1649
1649
|
}
|
|
1650
1650
|
return new FFIConverter();
|
|
@@ -1674,15 +1674,15 @@ const FfiConverterTypeSpliceKeyRef = (() => {
|
|
|
1674
1674
|
read(from) {
|
|
1675
1675
|
return {
|
|
1676
1676
|
inputSerialId: _core.FfiConverterUInt64.read(from),
|
|
1677
|
-
priorTemporaryContractId: _core.
|
|
1677
|
+
priorTemporaryContractId: _core.FfiConverterUint8Array.read(from)
|
|
1678
1678
|
};
|
|
1679
1679
|
}
|
|
1680
1680
|
write(value, into) {
|
|
1681
1681
|
_core.FfiConverterUInt64.write(value.inputSerialId, into);
|
|
1682
|
-
_core.
|
|
1682
|
+
_core.FfiConverterUint8Array.write(value.priorTemporaryContractId, into);
|
|
1683
1683
|
}
|
|
1684
1684
|
allocationSize(value) {
|
|
1685
|
-
return _core.FfiConverterUInt64.allocationSize(value.inputSerialId) + _core.
|
|
1685
|
+
return _core.FfiConverterUInt64.allocationSize(value.inputSerialId) + _core.FfiConverterUint8Array.allocationSize(value.priorTemporaryContractId);
|
|
1686
1686
|
}
|
|
1687
1687
|
}
|
|
1688
1688
|
return new FFIConverter();
|
|
@@ -3035,7 +3035,7 @@ class ContractKeyProvider extends _core.UniffiAbstractObject {
|
|
|
3035
3035
|
*/
|
|
3036
3036
|
static fromSeed(seed, network) /*throws*/{
|
|
3037
3037
|
return FfiConverterTypeContractKeyProvider.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeContractError.lift.bind(FfiConverterTypeContractError), /*caller:*/callStatus => {
|
|
3038
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_constructor_contractkeyprovider_from_seed(_core.
|
|
3038
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_constructor_contractkeyprovider_from_seed(_core.FfiConverterUint8Array.lower(seed, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), FfiConverterString.lower(network, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
3039
3039
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
3040
3040
|
}
|
|
3041
3041
|
|
|
@@ -3045,7 +3045,7 @@ class ContractKeyProvider extends _core.UniffiAbstractObject {
|
|
|
3045
3045
|
*/
|
|
3046
3046
|
static fromXprv(xprv) /*throws*/{
|
|
3047
3047
|
return FfiConverterTypeContractKeyProvider.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeContractError.lift.bind(FfiConverterTypeContractError), /*caller:*/callStatus => {
|
|
3048
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_constructor_contractkeyprovider_from_xprv(_core.
|
|
3048
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_constructor_contractkeyprovider_from_xprv(_core.FfiConverterUint8Array.lower(xprv, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
3049
3049
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
3050
3050
|
}
|
|
3051
3051
|
|
|
@@ -3056,12 +3056,12 @@ class ContractKeyProvider extends _core.UniffiAbstractObject {
|
|
|
3056
3056
|
fundingPubkey(temporaryContractId) /*throws*/{
|
|
3057
3057
|
return (__rb => {
|
|
3058
3058
|
try {
|
|
3059
|
-
return _core.
|
|
3059
|
+
return _core.FfiConverterUint8Array.lift(__rb);
|
|
3060
3060
|
} finally {
|
|
3061
3061
|
(0, _ddk_ffiFfi.default)().rustbuffer_free(__rb);
|
|
3062
3062
|
}
|
|
3063
3063
|
})(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeContractError.lift.bind(FfiConverterTypeContractError), /*caller:*/callStatus => {
|
|
3064
|
-
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_method_contractkeyprovider_funding_pubkey(uniffiTypeContractKeyProviderObjectFactory.clonePointer(this), _core.
|
|
3064
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_method_contractkeyprovider_funding_pubkey(uniffiTypeContractKeyProviderObjectFactory.clonePointer(this), _core.FfiConverterUint8Array.lower(temporaryContractId, (0, _ddk_ffiFfi.default)().rustbuffer_alloc), callStatus);
|
|
3065
3065
|
}, /*liftString:*/FfiConverterString.lift.bind(FfiConverterString)));
|
|
3066
3066
|
}
|
|
3067
3067
|
uniffiDestroy() {
|
|
@@ -3113,8 +3113,8 @@ const uniffiTypeContractKeyProviderObjectFactory = (() => {
|
|
|
3113
3113
|
})();
|
|
3114
3114
|
const FfiConverterTypeContractKeyProvider = new _core.FfiConverterObject(uniffiTypeContractKeyProviderObjectFactory);
|
|
3115
3115
|
|
|
3116
|
-
// FfiConverter for Array<
|
|
3117
|
-
const FfiConverterSequenceBytes = new _core.FfiConverterArray(_core.
|
|
3116
|
+
// FfiConverter for Array<Uint8Array>
|
|
3117
|
+
const FfiConverterSequenceBytes = new _core.FfiConverterArray(_core.FfiConverterUint8Array);
|
|
3118
3118
|
|
|
3119
3119
|
// FfiConverter for bigint | undefined
|
|
3120
3120
|
const FfiConverterOptionalUInt64 = new _core.FfiConverterOptional(_core.FfiConverterUInt64);
|
|
@@ -3134,8 +3134,8 @@ const FfiConverterOptionalString = new _core.FfiConverterOptional(FfiConverterSt
|
|
|
3134
3134
|
// FfiConverter for Array<PayoutRow>
|
|
3135
3135
|
const FfiConverterSequenceTypePayoutRow = new _core.FfiConverterArray(FfiConverterTypePayoutRow);
|
|
3136
3136
|
|
|
3137
|
-
// FfiConverter for
|
|
3138
|
-
const FfiConverterOptionalBytes = new _core.FfiConverterOptional(_core.
|
|
3137
|
+
// FfiConverter for Uint8Array | undefined
|
|
3138
|
+
const FfiConverterOptionalBytes = new _core.FfiConverterOptional(_core.FfiConverterUint8Array);
|
|
3139
3139
|
|
|
3140
3140
|
// FfiConverter for Array<TxInputInfo>
|
|
3141
3141
|
const FfiConverterSequenceTypeTxInputInfo = new _core.FfiConverterArray(FfiConverterTypeTxInputInfo);
|
|
@@ -3146,10 +3146,10 @@ const FfiConverterSequenceTypeDlcInputInfo = new _core.FfiConverterArray(FfiConv
|
|
|
3146
3146
|
// FfiConverter for Array<OracleInfo>
|
|
3147
3147
|
const FfiConverterSequenceTypeOracleInfo = new _core.FfiConverterArray(FfiConverterTypeOracleInfo);
|
|
3148
3148
|
|
|
3149
|
-
// FfiConverter for Array<Array<
|
|
3149
|
+
// FfiConverter for Array<Array<Uint8Array>>
|
|
3150
3150
|
const FfiConverterSequenceSequenceBytes = new _core.FfiConverterArray(FfiConverterSequenceBytes);
|
|
3151
3151
|
|
|
3152
|
-
// FfiConverter for Array<Array<Array<
|
|
3152
|
+
// FfiConverter for Array<Array<Array<Uint8Array>>>
|
|
3153
3153
|
const FfiConverterSequenceSequenceSequenceBytes = new _core.FfiConverterArray(FfiConverterSequenceSequenceBytes);
|
|
3154
3154
|
|
|
3155
3155
|
// FfiConverter for Array<AdaptorSignature>
|