@bennyblader/ddk-rn 0.3.43 → 1.0.0-rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/DdkRn.podspec +1 -1
  2. package/README.md +198 -49
  3. package/android/CMakeLists.txt +6 -3
  4. package/android/build.gradle +0 -1
  5. package/android/cpp-adapter.cpp +6 -26
  6. package/android/src/main/jniLibs/arm64-v8a/libddk_ffi.so +0 -0
  7. package/android/src/main/jniLibs/armeabi-v7a/libddk_ffi.so +0 -0
  8. package/android/src/main/jniLibs/x86/libddk_ffi.so +0 -0
  9. package/android/src/main/jniLibs/x86_64/libddk_ffi.so +0 -0
  10. package/cpp/bennyblader-ddk-rn.cpp +1 -1
  11. package/cpp/ddk_ffi.cpp +3446 -2669
  12. package/cpp/ddk_ffi.hpp +139 -255
  13. package/ios/DdkRn.xcframework/Info.plist +43 -0
  14. package/ios/DdkRn.xcframework/ios-arm64/libddk_ffi.a +0 -0
  15. package/ios/DdkRn.xcframework/ios-arm64-simulator/libddk_ffi.a +0 -0
  16. package/lib/commonjs/ddk_ffi-ffi.js +6 -29
  17. package/lib/commonjs/ddk_ffi-ffi.js.map +1 -1
  18. package/lib/commonjs/ddk_ffi.js +2828 -942
  19. package/lib/commonjs/ddk_ffi.js.map +1 -1
  20. package/lib/module/ddk_ffi-ffi.js +6 -29
  21. package/lib/module/ddk_ffi-ffi.js.map +1 -1
  22. package/lib/module/ddk_ffi.js +2750 -874
  23. package/lib/module/ddk_ffi.js.map +1 -1
  24. package/lib/typescript/commonjs/src/ddk_ffi-ffi.d.ts +124 -96
  25. package/lib/typescript/commonjs/src/ddk_ffi-ffi.d.ts.map +1 -1
  26. package/lib/typescript/commonjs/src/ddk_ffi.d.ts +2545 -466
  27. package/lib/typescript/commonjs/src/ddk_ffi.d.ts.map +1 -1
  28. package/lib/typescript/module/src/ddk_ffi-ffi.d.ts +124 -96
  29. package/lib/typescript/module/src/ddk_ffi-ffi.d.ts.map +1 -1
  30. package/lib/typescript/module/src/ddk_ffi.d.ts +2545 -466
  31. package/lib/typescript/module/src/ddk_ffi.d.ts.map +1 -1
  32. package/package.json +24 -45
  33. package/src/ddk_ffi-ffi.ts +609 -170
  34. package/src/ddk_ffi.ts +5643 -1910
  35. package/ubrn.config.yaml +18 -1
  36. package/ddk-ffi/Cargo.lock +0 -1013
  37. package/ddk-ffi/Cargo.toml +0 -36
  38. package/ddk-ffi/build.rs +0 -3
  39. package/ddk-ffi/rust-toolchain.toml +0 -10
  40. package/ddk-ffi/src/ddk_ffi.udl +0 -376
  41. package/ddk-ffi/src/lib.rs +0 -2509
  42. package/ddk-ffi/src/uniffi-bindgen.rs +0 -3
  43. package/ddk-ffi/uniffi.toml +0 -18
  44. package/scripts/apply-hotfix.js +0 -96
  45. package/scripts/postinstall.js +0 -298
  46. package/scripts/prepare-rust-src.js +0 -51
@@ -1,296 +1,642 @@
1
- import { type UniffiByteArray, RustBuffer, uniffiTypeNameSymbol, variantOrdinalSymbol } from "uniffi-bindgen-react-native";
2
- export declare function addSignatureToTransaction(tx: Transaction, signature: Array</*u8*/ number>, pubkey: Array</*u8*/ number>, inputIndex: number): Transaction;
3
- export declare function convertMnemonicToSeed(mnemonic: string, passphrase: string | undefined): Array</*u8*/ number>;
1
+ import { type UniffiByteArray, type UniffiGcObject, type UniffiHandle, FfiConverterObject, RustBuffer, UniffiAbstractObject, destructorGuardSymbol, pointerLiteralSymbol, uniffiTypeNameSymbol } from '@ubjs/core';
2
+ /**
3
+ * Accepts an offer. The accepting party's funding secret key is derived inside
4
+ * Rust from `keys` + `new_temporary_contract_id` and never crosses the boundary;
5
+ * it must match `params.party.funding_pubkey` (derive both from the same provider).
6
+ */
7
+ export declare function acceptOffer(offer: ArrayBuffer, params: AcceptOfferParams, keys: ContractKeyProviderLike, newTemporaryContractId: ArrayBuffer): AcceptResult;
8
+ /**
9
+ * The 32-byte chain hash for a network (`bitcoin` / `testnet` / `signet` /
10
+ * `regtest`). Use it for [`CreateOfferParams::chain_hash`].
11
+ */
12
+ export declare function chainHashFromNetwork(network: string): ArrayBuffer;
13
+ /**
14
+ * The 32-byte contract id derived from the offer and accept messages — the
15
+ * stable id of the funded contract. Use it to key stored contracts.
16
+ */
17
+ export declare function computeContractId(offer: ArrayBuffer, accept: ArrayBuffer): ArrayBuffer;
18
+ /**
19
+ * Derives the offer/accept payouts for every outcome of a contract from its
20
+ * wire-encoded `ContractInfo`, for building a payout table to show users.
21
+ *
22
+ * Handles both enum contracts (each row a labeled outcome) and numeric-outcome
23
+ * contracts (each row an inclusive outcome range that shares a single payout,
24
+ * as determined by the payout function and rounding intervals). Disjoint
25
+ * contracts contribute the rows of each of their sub-contracts.
26
+ */
27
+ export declare function contractInfoPayouts(contractInfo: ArrayBuffer): ContractPayouts;
28
+ export declare function convertMnemonicToSeed(mnemonic: string, passphrase: string | undefined): ArrayBuffer;
29
+ /**
30
+ * Create a single CET
31
+ */
4
32
  export declare function createCet(localOutput: TxOutput, localPayoutSerialId: bigint, remoteOutput: TxOutput, remotePayoutSerialId: bigint, fundTxId: string, fundVout: number, lockTime: number): Transaction;
5
- export declare function createCetAdaptorPointsFromOracleInfo(oracleInfo: Array<OracleInfo>, msgs: Array<Array<Array<Array</*u8*/ number>>>>): Array<Array</*u8*/ number>>;
6
- export declare function createCetAdaptorSignatureFromOracleInfo(cet: Transaction, oracleInfo: OracleInfo, fundingSk: Array</*u8*/ number>, fundingScriptPubkey: Array</*u8*/ number>, totalCollateral: bigint, msgs: Array<Array</*u8*/ number>>): AdaptorSignature;
7
- export declare function createCetAdaptorSigsFromOracleInfo(cets: Array<Transaction>, oracleInfo: Array<OracleInfo>, fundingSecretKey: Array</*u8*/ number>, fundingScriptPubkey: Array</*u8*/ number>, fundOutputValue: bigint, msgs: Array<Array<Array<Array</*u8*/ number>>>>): Array<AdaptorSignature>;
8
- export declare function createCetAdaptorSigsFromPoints(cets: Array<Transaction>, adaptorPoints: Array<Array</*u8*/ number>>, fundingSecretKey: Array</*u8*/ number>, fundingScriptPubkey: Array</*u8*/ number>, fundOutputValue: bigint): Array<AdaptorSignature>;
9
- export declare function createCets(fundTxId: string, fundVout: number, localFinalScriptPubkey: Array</*u8*/ number>, remoteFinalScriptPubkey: Array</*u8*/ number>, outcomes: Array<Payout>, lockTime: number, localSerialId: bigint, remoteSerialId: bigint): Array<Transaction>;
33
+ export declare function createCetAdaptorPointsFromOracleInfo(oracleInfo: Array<OracleInfo>, msgs: Array<Array<Array<ArrayBuffer>>>): Array<ArrayBuffer>;
34
+ export declare function createCetAdaptorSigsFromOracleInfo(cets: Array<Transaction>, oracleInfo: Array<OracleInfo>, fundingSecretKey: ArrayBuffer, fundingScriptPubkey: ArrayBuffer, fundOutputValue: bigint, msgs: Array<Array<Array<ArrayBuffer>>>): Array<AdaptorSignature>;
35
+ /**
36
+ * Create adaptor signatures from pre-computed adaptor points.
37
+ */
38
+ export declare function createCetAdaptorSigsFromPoints(cets: Array<Transaction>, adaptorPoints: Array<ArrayBuffer>, fundingSecretKey: ArrayBuffer, fundingScriptPubkey: ArrayBuffer, fundOutputValue: bigint): Array<AdaptorSignature>;
39
+ /**
40
+ * Create multiple CETs
41
+ */
42
+ export declare function createCets(fundTxId: string, fundVout: number, localFinalScriptPubkey: ArrayBuffer, remoteFinalScriptPubkey: ArrayBuffer, outcomes: Array<Payout>, lockTime: number, localSerialId: bigint, remoteSerialId: bigint): Array<Transaction>;
43
+ /**
44
+ * Rebuilds the splice `FundingInput` (wire-encoded) that spends a previous
45
+ * contract's 2-of-2 funding output, from that contract's offer and accept
46
+ * messages. Only the offering party contributes a splice input; place the
47
+ * result in the offering party's `funding_inputs`. `max_witness_len` must be
48
+ * greater than 108 — use [`dlc_input_max_witness_len`].
49
+ */
50
+ export declare function createDlcSpliceInput(prevOffer: ArrayBuffer, prevAccept: ArrayBuffer, localParty: Party, inputSerialId: bigint | undefined, maxWitnessLen: number): ArrayBuffer;
51
+ /**
52
+ * Create complete DLC transactions
53
+ */
10
54
  export declare function createDlcTransactions(outcomes: Array<Payout>, localParams: PartyParams, remoteParams: PartyParams, refundLocktime: number, feeRate: bigint, fundLockTime: number, cetLockTime: number, fundOutputSerialId: bigint, contractFlags: number): DlcTransactions;
11
- export declare function createExtkeyFromParentPath(extkey: Array</*u8*/ number>, path: string): Array</*u8*/ number>;
12
- export declare function createExtkeyFromSeed(seed: Array</*u8*/ number>, network: string): Array</*u8*/ number>;
13
- export declare function createFundTxLockingScript(localFundPubkey: Array</*u8*/ number>, remoteFundPubkey: Array</*u8*/ number>): Array</*u8*/ number>;
14
- export declare function createRefundTransaction(localFinalScriptPubkey: Array</*u8*/ number>, remoteFinalScriptPubkey: Array</*u8*/ number>, localAmount: bigint, remoteAmount: bigint, lockTime: number, fundTxId: string, fundVout: number): Transaction;
55
+ /**
56
+ * Derive child extended private key from parent extended key
57
+ * Input: 78-byte encoded xpriv, Output: 78-byte encoded xpriv
58
+ */
59
+ export declare function createExtkeyFromParentPath(extkey: ArrayBuffer, path: string): ArrayBuffer;
60
+ /**
61
+ * Create master extended private key from 64-byte seed
62
+ * Returns 78-byte encoded xpriv
63
+ */
64
+ export declare function createExtkeyFromSeed(seed: ArrayBuffer, network: string): ArrayBuffer;
65
+ /**
66
+ * Create a funding script pubkey for DLC transactions
67
+ */
68
+ export declare function createFundTxLockingScript(localFundPubkey: ArrayBuffer, remoteFundPubkey: ArrayBuffer): ArrayBuffer;
69
+ /**
70
+ * Rebuilds the BIP-174 funding PSBT from the offer and accept messages.
71
+ */
72
+ export declare function createFundingPsbt(offer: ArrayBuffer, accept: ArrayBuffer): ArrayBuffer;
73
+ /**
74
+ * Creates an offer. Returns the wire-encoded `OfferDlc` to send to the accepting party.
75
+ */
76
+ export declare function createOffer(params: CreateOfferParams): ArrayBuffer;
77
+ /**
78
+ * Create a refund transaction
79
+ */
80
+ export declare function createRefundTransaction(localFinalScriptPubkey: ArrayBuffer, remoteFinalScriptPubkey: ArrayBuffer, localAmount: bigint, remoteAmount: bigint, lockTime: number, fundTxId: string, fundVout: number): Transaction;
81
+ /**
82
+ * Create spliced DLC transactions
83
+ */
15
84
  export declare function createSplicedDlcTransactions(outcomes: Array<Payout>, localParams: PartyParams, remoteParams: PartyParams, refundLocktime: number, feeRate: bigint, fundLockTime: number, cetLockTime: number, fundOutputSerialId: bigint, contractFlags: number): DlcTransactions;
16
- export declare function createXprivFromParentPath(seedOrXpriv: Array</*u8*/ number>, baseDerivationPath: string, network: string, path: string): Array</*u8*/ number>;
17
- export declare function extractEcdsaSignatureFromOracleSignatures(oracleSignatures: Array<Array</*u8*/ number>>, adaptorSignature: Array</*u8*/ number>): Array</*u8*/ number>;
18
- export declare function getCetAdaptorSignatureInputs(cet: Transaction, oracleInfo: Array<OracleInfo>, fundingScriptPubkey: Array</*u8*/ number>, fundOutputValue: bigint, msgs: Array<Array<Array</*u8*/ number>>>): CetAdaptorSignatureDebugInfo;
19
- export declare function getCetSighash(cet: Transaction, fundingScriptPubkey: Array</*u8*/ number>, fundOutputValue: bigint): Array</*u8*/ number>;
20
- export declare function getChangeOutputAndFees(params: PartyParams, feeRate: bigint): ChangeOutputAndFees;
21
- export declare function getPubkeyFromExtkey(extkey: Array</*u8*/ number>, network: string): Array</*u8*/ number>;
22
- export declare function getRawFundingTransactionInputSignature(fundingTransaction: Transaction, privkey: Array</*u8*/ number>, prevTxId: string, prevTxVout: number, value: bigint): Array</*u8*/ number>;
85
+ /**
86
+ * DEPRECATED: Use create_extkey_from_seed + create_extkey_from_parent_path instead
87
+ * This function handles both seeds (64 bytes) and xprivs (78 bytes) which is confusing
88
+ */
89
+ export declare function createXprivFromParentPath(seedOrXpriv: ArrayBuffer, baseDerivationPath: string, network: string, path: string): ArrayBuffer;
90
+ /**
91
+ * The required `max_witness_len` for a DLC (splice) funding input (220).
92
+ */
93
+ export declare function dlcInputMaxWitnessLen(): number;
94
+ /**
95
+ * Rebuilds the unsigned funding, CET, and refund transactions from the messages.
96
+ */
97
+ export declare function dlcTransactionsFromMessages(offer: ArrayBuffer, accept: ArrayBuffer): DlcTransactions;
98
+ export declare function extractEcdsaSignatureFromOracleSignatures(oracleSignatures: Array<ArrayBuffer>, adaptorSignature: ArrayBuffer): ArrayBuffer;
99
+ /**
100
+ * The accepting party verifies the sign message and completes the funding
101
+ * transaction. Returns the Bitcoin consensus-serialized signed transaction.
102
+ */
103
+ export declare function finalizeSign(offer: ArrayBuffer, accept: ArrayBuffer, sign: ArrayBuffer, signedFundingPsbt: ArrayBuffer): ArrayBuffer;
104
+ /**
105
+ * Like [`finalize_sign`], but additionally completes the 2-of-2 witness for any
106
+ * splice (DLC) funding input using this (accepting) party's prior funding keys,
107
+ * re-derived inside Rust from `keys`.
108
+ */
109
+ export declare function finalizeSignSpliced(offer: ArrayBuffer, accept: ArrayBuffer, sign: ArrayBuffer, signedFundingPsbt: ArrayBuffer, keys: ContractKeyProviderLike, spliceKeys: Array<SpliceKeyRef>): ArrayBuffer;
110
+ /**
111
+ * Builds a wire-encoded `FundingInput` from a wallet UTXO, ready to place in a
112
+ * party's `funding_inputs`.
113
+ *
114
+ * - `previous_transaction`: the full consensus-serialized transaction that
115
+ * created the UTXO being spent.
116
+ * - `vout`: the output index of the UTXO within that transaction.
117
+ * - `input_serial_id`: orders the input in the funding transaction; randomly
118
+ * generated when `None`.
119
+ * - `sequence`: the input sequence (usually `0xffffffff`).
120
+ * - `max_witness_len`: the input's maximum witness length (e.g. 108 for
121
+ * P2WPKH).
122
+ * - `redeem_script`: the redeem script for a P2SH input, or empty for others.
123
+ */
124
+ export declare function fundingInput(previousTransaction: ArrayBuffer, vout: number, inputSerialId: bigint | undefined, sequence: number, maxWitnessLen: number, redeemScript: ArrayBuffer): ArrayBuffer;
125
+ /**
126
+ * Extract public key from extended key (private or public)
127
+ * Input: 78-byte encoded xpriv/xpub, Output: 33-byte compressed public key
128
+ */
129
+ export declare function getPubkeyFromExtkey(extkey: ArrayBuffer, network: string): ArrayBuffer;
130
+ /**
131
+ * Get total input virtual size for fee calculation
132
+ */
23
133
  export declare function getTotalInputVsize(inputs: Array<TxInputInfo>): number;
24
- export declare function getXpubFromXpriv(xpriv: Array</*u8*/ number>, network: string): Array</*u8*/ number>;
25
- export declare function isDustOutput(output: TxOutput): boolean;
26
- export declare function signCet(cet: Transaction, adaptorSignature: Array</*u8*/ number>, oracleSignatures: Array<Array</*u8*/ number>>, fundingSecretKey: Array</*u8*/ number>, otherPubkey: Array</*u8*/ number>, fundingScriptPubkey: Array</*u8*/ number>, fundOutputValue: bigint): Transaction;
27
- export declare function signFundTransactionInput(fundTransaction: Transaction, privkey: Array</*u8*/ number>, prevTxId: string, prevTxVout: number, value: bigint): Transaction;
28
- export declare function signMultiSigInput(tx: Transaction, dlcInput: DlcInputInfo, localPrivkey: Array</*u8*/ number>, remoteSignature: Array</*u8*/ number>): Transaction;
29
- export declare function verifyCetAdaptorSigFromOracleInfo(adaptorSig: AdaptorSignature, cet: Transaction, oracleInfo: Array<OracleInfo>, pubkey: Array</*u8*/ number>, fundingScriptPubkey: Array</*u8*/ number>, totalCollateral: bigint, msgs: Array<Array<Array</*u8*/ number>>>): boolean;
30
- export declare function verifyCetAdaptorSigsFromOracleInfo(adaptorSigs: Array<AdaptorSignature>, cets: Array<Transaction>, oracleInfo: Array<OracleInfo>, pubkey: Array</*u8*/ number>, fundingScriptPubkey: Array</*u8*/ number>, totalCollateral: bigint, msgs: Array<Array<Array<Array</*u8*/ number>>>>): boolean;
31
- export declare function verifyFundTxSignature(fundTx: Transaction, signature: Array</*u8*/ number>, pubkey: Array</*u8*/ number>, txid: string, vout: number, inputAmount: bigint): boolean;
134
+ /**
135
+ * Convert extended private key to extended public key
136
+ * Input: 78-byte encoded xpriv, Output: 78-byte encoded xpub
137
+ */
138
+ export declare function getXpubFromXpriv(xpriv: ArrayBuffer, network: string): ArrayBuffer;
139
+ /**
140
+ * The offering party verifies the accept message and produces its `SignDlc`.
141
+ * The offer party's funding secret key is derived from `keys` +
142
+ * `temporary_contract_id` (the new contract's id).
143
+ */
144
+ export declare function signAccept(offer: ArrayBuffer, accept: ArrayBuffer, keys: ContractKeyProviderLike, temporaryContractId: ArrayBuffer, signedFundingPsbt: ArrayBuffer): SignResult;
145
+ /**
146
+ * Like [`sign_accept`], but additionally co-signs any splice (DLC) funding
147
+ * inputs. For each splice input, `splice_keys` names the previous contract; the
148
+ * prior funding secret key is re-derived inside Rust from `keys`.
149
+ */
150
+ export declare function signAcceptSpliced(offer: ArrayBuffer, accept: ArrayBuffer, keys: ContractKeyProviderLike, temporaryContractId: ArrayBuffer, signedFundingPsbt: ArrayBuffer, spliceKeys: Array<SpliceKeyRef>): SignResult;
151
+ /**
152
+ * Signs the CET matching a set of oracle attestations, returning the Bitcoin
153
+ * consensus-serialized transaction. It pays each party the attested outcome's
154
+ * payout and is ready to broadcast — no network access happens here.
155
+ *
156
+ * The settling party's funding secret key is derived inside Rust from `keys` +
157
+ * `temporary_contract_id` — the settling party's OWN temporary id (the offer's
158
+ * for the offering party, the `new_temporary_contract_id` passed to
159
+ * `accept_offer` for the accepting party). The key also identifies which side
160
+ * is settling, so there is no party argument to get wrong. Either party can
161
+ * settle alone: the counterparty's half of the 2-of-2 comes from decrypting its
162
+ * CET adaptor signature with the oracle signatures.
163
+ *
164
+ * Each entry in `attestations` pairs a wire-encoded `OracleAttestation` with
165
+ * the index of its oracle in the announcements of the contract info it settles.
166
+ * Attestations are verified against the announcements they claim to come from,
167
+ * so a forged or misindexed one cannot produce a CET
168
+ * ([`ContractError::InvalidAttestation`]). When no contract outcome matches the
169
+ * attested outcomes, [`ContractError::NoMatchingOutcome`] is returned — which
170
+ * is also what an attestation for an unrelated event looks like.
171
+ */
172
+ export declare function signContractCet(offer: ArrayBuffer, accept: ArrayBuffer, sign: ArrayBuffer, keys: ContractKeyProviderLike, temporaryContractId: ArrayBuffer, attestations: Array<OracleAttestationRef>): ArrayBuffer;
173
+ /**
174
+ * Signs the refund transaction, returning the Bitcoin consensus-serialized
175
+ * transaction. It returns each party its own collateral and can only be
176
+ * broadcast once the offer's `refund_locktime` has passed — enforcing that is
177
+ * the chain's job, not this function's.
178
+ *
179
+ * As with [`sign_contract_cet`], `temporary_contract_id` is the settling
180
+ * party's own temporary id and identifies which side is settling. Both parties
181
+ * signed the refund during the offer/accept exchange, so this only adds this
182
+ * party's half; the counterparty's stored signature is verified first.
183
+ */
184
+ export declare function signContractRefund(offer: ArrayBuffer, accept: ArrayBuffer, sign: ArrayBuffer, keys: ContractKeyProviderLike, temporaryContractId: ArrayBuffer): ArrayBuffer;
185
+ /**
186
+ * Signs a party's own funding inputs on the funding PSBT using a private output
187
+ * descriptor (e.g. bdk's `wpkh(...)` with an xprv), returning the updated PSBT.
188
+ * Each entry in `inputs` names one of this party's funding inputs (by serial
189
+ * id) and the descriptor wildcard index that derives its key. Supports `wpkh()`
190
+ * and `sh(wpkh())`, with or without a wildcard.
191
+ */
192
+ export declare function signFundingPsbtWithDescriptor(offer: ArrayBuffer, accept: ArrayBuffer, fundingPsbt: ArrayBuffer, descriptor: string, inputs: Array<DescriptorInput>): ArrayBuffer;
193
+ /**
194
+ * Validates an accept message against its offer: the acceptor's CET adaptor
195
+ * signatures and refund signature must be valid for the contract the two
196
+ * messages describe. This is the same check `sign_accept` runs internally,
197
+ * exposed so a stored/received `AcceptDlc` can be verified on its own.
198
+ */
199
+ export declare function validateAccept(offer: ArrayBuffer, accept: ArrayBuffer): void;
200
+ /**
201
+ * Validates an offer's protocol version, funding inputs, fee rate, collateral,
202
+ * and oracle timeouts.
203
+ *
204
+ * The lifecycle functions already validate internally (`accept_offer` validates
205
+ * the offer, `sign_accept` validates the accept, `finalize_sign` validates the
206
+ * sign); these `validate_*` functions expose the same checks standalone, so a
207
+ * consumer can independently verify a stored or received message at any time —
208
+ * e.g. before persisting it, or when loading it back later.
209
+ */
210
+ export declare function validateOffer(offer: ArrayBuffer, minTimeoutInterval: number, maxTimeoutInterval: number): void;
211
+ /**
212
+ * Validates a sign message against its offer and accept: the offerer's CET
213
+ * adaptor signatures and refund signature must be valid. This is the same
214
+ * check `finalize_sign` runs internally, exposed so a stored/received `SignDlc`
215
+ * can be verified on its own.
216
+ */
217
+ export declare function validateSign(offer: ArrayBuffer, accept: ArrayBuffer, sign: ArrayBuffer): void;
218
+ export declare function verifyCetAdaptorSigsFromOracleInfo(adaptorSigs: Array<AdaptorSignature>, cets: Array<Transaction>, oracleInfos: Array<OracleInfo>, pubkey: ArrayBuffer, fundingScriptPubkey: ArrayBuffer, totalCollateral: bigint, msgs: Array<Array<Array<ArrayBuffer>>>): boolean;
32
219
  export declare function version(): string;
33
- export type AdaptorSignature = {
34
- signature: Array</*u8*/ number>;
35
- proof: Array</*u8*/ number>;
36
- };
37
220
  /**
38
- * Generated factory for {@link AdaptorSignature} record objects.
221
+ * One party's Bitcoin-level contract data (mirrors [`ddk::contract::PartyParams`]).
39
222
  */
40
- export declare const AdaptorSignature: Readonly<{
223
+ export type ContractPartyParams = {
41
224
  /**
42
- * Create a frozen instance of {@link AdaptorSignature}, with defaults specified
43
- * in Rust, in the {@link ddk_ffi} crate.
225
+ * The 33-byte compressed DLC funding public key.
44
226
  */
45
- create: (partial: Partial<AdaptorSignature> & Required<Omit<AdaptorSignature, never>>) => AdaptorSignature;
227
+ fundingPubkey: ArrayBuffer;
46
228
  /**
47
- * Create a frozen instance of {@link AdaptorSignature}, with defaults specified
48
- * in Rust, in the {@link ddk_ffi} crate.
229
+ * The wallet UTXOs this party contributes, each a wire-encoded `FundingInput`.
49
230
  */
50
- new: (partial: Partial<AdaptorSignature> & Required<Omit<AdaptorSignature, never>>) => AdaptorSignature;
231
+ fundingInputs: Array<ArrayBuffer>;
51
232
  /**
52
- * Defaults specified in the {@link ddk_ffi} crate.
233
+ * The script pubkey (raw bytes) CET and refund payouts are sent to.
53
234
  */
54
- defaults: () => Partial<AdaptorSignature>;
55
- }>;
56
- export type CetAdaptorSignatureDebugInfo = {
57
- sighash: Array</*u8*/ number>;
58
- adaptorPoint: Array</*u8*/ number>;
59
- inputIndex: number;
60
- scriptPubkey: Array</*u8*/ number>;
61
- value: bigint;
62
- cetTxid: string;
63
- cetRaw: Array</*u8*/ number>;
64
- };
65
- /**
66
- * Generated factory for {@link CetAdaptorSignatureDebugInfo} record objects.
67
- */
68
- export declare const CetAdaptorSignatureDebugInfo: Readonly<{
235
+ payoutSpk: ArrayBuffer;
69
236
  /**
70
- * Create a frozen instance of {@link CetAdaptorSignatureDebugInfo}, with defaults specified
71
- * in Rust, in the {@link ddk_ffi} crate.
237
+ * Serial id ordering the payout output; randomly generated when `None`.
72
238
  */
73
- create: (partial: Partial<CetAdaptorSignatureDebugInfo> & Required<Omit<CetAdaptorSignatureDebugInfo, never>>) => CetAdaptorSignatureDebugInfo;
239
+ payoutSerialId?: bigint;
74
240
  /**
75
- * Create a frozen instance of {@link CetAdaptorSignatureDebugInfo}, with defaults specified
76
- * in Rust, in the {@link ddk_ffi} crate.
241
+ * The script pubkey (raw bytes) funding change is sent to.
77
242
  */
78
- new: (partial: Partial<CetAdaptorSignatureDebugInfo> & Required<Omit<CetAdaptorSignatureDebugInfo, never>>) => CetAdaptorSignatureDebugInfo;
243
+ changeSpk: ArrayBuffer;
79
244
  /**
80
- * Defaults specified in the {@link ddk_ffi} crate.
245
+ * Serial id ordering the change output; randomly generated when `None`.
81
246
  */
82
- defaults: () => Partial<CetAdaptorSignatureDebugInfo>;
83
- }>;
84
- export type ChangeOutputAndFees = {
85
- changeOutput: TxOutput;
86
- fundFee: bigint;
87
- cetFee: bigint;
247
+ changeSerialId?: bigint;
88
248
  };
89
249
  /**
90
- * Generated factory for {@link ChangeOutputAndFees} record objects.
250
+ * Generated factory for {@link ContractPartyParams} record objects.
91
251
  */
92
- export declare const ChangeOutputAndFees: Readonly<{
252
+ export declare const ContractPartyParams: Readonly<{
253
+ create: (partial: Partial<ContractPartyParams> & Required<Omit<ContractPartyParams, "payoutSerialId" | "changeSerialId">>) => ContractPartyParams;
254
+ new: (partial: Partial<ContractPartyParams> & Required<Omit<ContractPartyParams, "payoutSerialId" | "changeSerialId">>) => ContractPartyParams;
255
+ defaults: () => Partial<ContractPartyParams>;
256
+ }>;
257
+ /**
258
+ * Parameters for [`accept_offer`] (mirrors [`ddk::contract::AcceptOfferParams`]).
259
+ */
260
+ export type AcceptOfferParams = {
93
261
  /**
94
- * Create a frozen instance of {@link ChangeOutputAndFees}, with defaults specified
95
- * in Rust, in the {@link ddk_ffi} crate.
262
+ * The accepting party's Bitcoin-level contract data.
96
263
  */
97
- create: (partial: Partial<ChangeOutputAndFees> & Required<Omit<ChangeOutputAndFees, never>>) => ChangeOutputAndFees;
264
+ party: ContractPartyParams;
98
265
  /**
99
- * Create a frozen instance of {@link ChangeOutputAndFees}, with defaults specified
100
- * in Rust, in the {@link ddk_ffi} crate.
266
+ * The minimum accepted interval between oracle maturity and the refund locktime.
101
267
  */
102
- new: (partial: Partial<ChangeOutputAndFees> & Required<Omit<ChangeOutputAndFees, never>>) => ChangeOutputAndFees;
268
+ minTimeoutInterval: number;
103
269
  /**
104
- * Defaults specified in the {@link ddk_ffi} crate.
270
+ * The maximum accepted interval between oracle maturity and the refund locktime.
105
271
  */
106
- defaults: () => Partial<ChangeOutputAndFees>;
272
+ maxTimeoutInterval: number;
273
+ };
274
+ /**
275
+ * Generated factory for {@link AcceptOfferParams} record objects.
276
+ */
277
+ export declare const AcceptOfferParams: Readonly<{
278
+ create: (partial: Partial<AcceptOfferParams> & Required<Omit<AcceptOfferParams, never>>) => AcceptOfferParams;
279
+ new: (partial: Partial<AcceptOfferParams> & Required<Omit<AcceptOfferParams, never>>) => AcceptOfferParams;
280
+ defaults: () => Partial<AcceptOfferParams>;
107
281
  }>;
108
- export type DlcInputInfo = {
109
- fundTx: Transaction;
110
- fundVout: number;
111
- localFundPubkey: Array</*u8*/ number>;
112
- remoteFundPubkey: Array</*u8*/ number>;
113
- fundAmount: bigint;
114
- maxWitnessLen: number;
115
- inputSerialId: bigint;
116
- contractId: Array</*u8*/ number>;
282
+ export type TxInput = {
283
+ txid: string;
284
+ vout: number;
285
+ scriptSig: ArrayBuffer;
286
+ sequence: number;
287
+ witness: Array<ArrayBuffer>;
117
288
  };
118
289
  /**
119
- * Generated factory for {@link DlcInputInfo} record objects.
290
+ * Generated factory for {@link TxInput} record objects.
120
291
  */
121
- export declare const DlcInputInfo: Readonly<{
122
- /**
123
- * Create a frozen instance of {@link DlcInputInfo}, with defaults specified
124
- * in Rust, in the {@link ddk_ffi} crate.
125
- */
126
- create: (partial: Partial<DlcInputInfo> & Required<Omit<DlcInputInfo, never>>) => DlcInputInfo;
127
- /**
128
- * Create a frozen instance of {@link DlcInputInfo}, with defaults specified
129
- * in Rust, in the {@link ddk_ffi} crate.
130
- */
131
- new: (partial: Partial<DlcInputInfo> & Required<Omit<DlcInputInfo, never>>) => DlcInputInfo;
132
- /**
133
- * Defaults specified in the {@link ddk_ffi} crate.
134
- */
135
- defaults: () => Partial<DlcInputInfo>;
292
+ export declare const TxInput: Readonly<{
293
+ create: (partial: Partial<TxInput> & Required<Omit<TxInput, never>>) => TxInput;
294
+ new: (partial: Partial<TxInput> & Required<Omit<TxInput, never>>) => TxInput;
295
+ defaults: () => Partial<TxInput>;
296
+ }>;
297
+ export type TxOutput = {
298
+ value: bigint;
299
+ scriptPubkey: ArrayBuffer;
300
+ };
301
+ /**
302
+ * Generated factory for {@link TxOutput} record objects.
303
+ */
304
+ export declare const TxOutput: Readonly<{
305
+ create: (partial: Partial<TxOutput> & Required<Omit<TxOutput, never>>) => TxOutput;
306
+ new: (partial: Partial<TxOutput> & Required<Omit<TxOutput, never>>) => TxOutput;
307
+ defaults: () => Partial<TxOutput>;
308
+ isDust(self_: TxOutput): boolean;
309
+ }>;
310
+ export type Transaction = {
311
+ version: number;
312
+ lockTime: number;
313
+ inputs: Array<TxInput>;
314
+ outputs: Array<TxOutput>;
315
+ rawBytes: ArrayBuffer;
316
+ };
317
+ /**
318
+ * Generated factory for {@link Transaction} record objects.
319
+ */
320
+ export declare const Transaction: Readonly<{
321
+ create: (partial: Partial<Transaction> & Required<Omit<Transaction, never>>) => Transaction;
322
+ new: (partial: Partial<Transaction> & Required<Omit<Transaction, never>>) => Transaction;
323
+ defaults: () => Partial<Transaction>;
324
+ addSignature(self_: Transaction, signature: ArrayBuffer, pubkey: ArrayBuffer, inputIndex: number): Transaction;
325
+ cetAdaptorSignatureFromOracleInfo(self_: Transaction, oracleInfo: OracleInfo, fundingSk: ArrayBuffer, fundingScriptPubkey: ArrayBuffer, totalCollateral: bigint, msgs: Array<ArrayBuffer>): AdaptorSignature;
326
+ cetAdaptorSignatureInputs(self_: Transaction, oracleInfo: Array<OracleInfo>, fundingScriptPubkey: ArrayBuffer, fundOutputValue: bigint, msgs: Array<Array<ArrayBuffer>>): CetAdaptorSignatureDebugInfo;
327
+ cetSighash(self_: Transaction, fundingScriptPubkey: ArrayBuffer, fundOutputValue: bigint): ArrayBuffer;
328
+ rawFundingInputSignature(self_: Transaction, privkey: ArrayBuffer, prevTxId: string, prevTxVout: number, value: bigint): ArrayBuffer;
329
+ signCet(self_: Transaction, adaptorSignature: ArrayBuffer, oracleSignatures: Array<ArrayBuffer>, fundingSecretKey: ArrayBuffer, otherPubkey: ArrayBuffer, fundingScriptPubkey: ArrayBuffer, fundOutputValue: bigint): Transaction;
330
+ signFundInput(self_: Transaction, privkey: ArrayBuffer, prevTxId: string, prevTxVout: number, value: bigint): Transaction;
331
+ signMultiSigInput(self_: Transaction, dlcInput: DlcInputInfo, localPrivkey: ArrayBuffer, remoteSignature: ArrayBuffer): Transaction;
332
+ verifyFundSignature(self_: Transaction, signature: ArrayBuffer, pubkey: ArrayBuffer, txid: string, vout: number, inputAmount: bigint): boolean;
136
333
  }>;
137
334
  export type DlcTransactions = {
138
335
  fund: Transaction;
139
336
  cets: Array<Transaction>;
140
337
  refund: Transaction;
141
- fundingScriptPubkey: Array</*u8*/ number>;
338
+ fundingScriptPubkey: ArrayBuffer;
142
339
  };
143
340
  /**
144
341
  * Generated factory for {@link DlcTransactions} record objects.
145
342
  */
146
343
  export declare const DlcTransactions: Readonly<{
147
- /**
148
- * Create a frozen instance of {@link DlcTransactions}, with defaults specified
149
- * in Rust, in the {@link ddk_ffi} crate.
150
- */
151
344
  create: (partial: Partial<DlcTransactions> & Required<Omit<DlcTransactions, never>>) => DlcTransactions;
152
- /**
153
- * Create a frozen instance of {@link DlcTransactions}, with defaults specified
154
- * in Rust, in the {@link ddk_ffi} crate.
155
- */
156
345
  new: (partial: Partial<DlcTransactions> & Required<Omit<DlcTransactions, never>>) => DlcTransactions;
157
- /**
158
- * Defaults specified in the {@link ddk_ffi} crate.
159
- */
160
346
  defaults: () => Partial<DlcTransactions>;
161
347
  }>;
162
- export type OracleInfo = {
163
- publicKey: Array</*u8*/ number>;
164
- nonces: Array<Array</*u8*/ number>>;
165
- };
166
348
  /**
167
- * Generated factory for {@link OracleInfo} record objects.
349
+ * The result of [`accept_offer`].
168
350
  */
169
- export declare const OracleInfo: Readonly<{
351
+ export type AcceptResult = {
170
352
  /**
171
- * Create a frozen instance of {@link OracleInfo}, with defaults specified
172
- * in Rust, in the {@link ddk_ffi} crate.
353
+ * The wire-encoded `AcceptDlc` message to send to the offering party.
173
354
  */
174
- create: (partial: Partial<OracleInfo> & Required<Omit<OracleInfo, never>>) => OracleInfo;
355
+ accept: ArrayBuffer;
175
356
  /**
176
- * Create a frozen instance of {@link OracleInfo}, with defaults specified
177
- * in Rust, in the {@link ddk_ffi} crate.
357
+ * The unsigned funding, CET, and refund transactions.
178
358
  */
179
- new: (partial: Partial<OracleInfo> & Required<Omit<OracleInfo, never>>) => OracleInfo;
359
+ transactions: DlcTransactions;
180
360
  /**
181
- * Defaults specified in the {@link ddk_ffi} crate.
361
+ * The BIP-174 funding PSBT ready to be signed by either party's funding source.
182
362
  */
183
- defaults: () => Partial<OracleInfo>;
363
+ fundingPsbt: ArrayBuffer;
364
+ };
365
+ /**
366
+ * Generated factory for {@link AcceptResult} record objects.
367
+ */
368
+ export declare const AcceptResult: Readonly<{
369
+ create: (partial: Partial<AcceptResult> & Required<Omit<AcceptResult, never>>) => AcceptResult;
370
+ new: (partial: Partial<AcceptResult> & Required<Omit<AcceptResult, never>>) => AcceptResult;
371
+ defaults: () => Partial<AcceptResult>;
184
372
  }>;
185
- export type PartyParams = {
186
- fundPubkey: Array</*u8*/ number>;
187
- changeScriptPubkey: Array</*u8*/ number>;
188
- changeSerialId: bigint;
189
- payoutScriptPubkey: Array</*u8*/ number>;
190
- payoutSerialId: bigint;
191
- inputs: Array<TxInputInfo>;
192
- inputAmount: bigint;
193
- collateral: bigint;
194
- dlcInputs: Array<DlcInputInfo>;
373
+ export type AdaptorSignature = {
374
+ signature: ArrayBuffer;
375
+ proof: ArrayBuffer;
195
376
  };
196
377
  /**
197
- * Generated factory for {@link PartyParams} record objects.
378
+ * Generated factory for {@link AdaptorSignature} record objects.
198
379
  */
199
- export declare const PartyParams: Readonly<{
380
+ export declare const AdaptorSignature: Readonly<{
381
+ create: (partial: Partial<AdaptorSignature> & Required<Omit<AdaptorSignature, never>>) => AdaptorSignature;
382
+ new: (partial: Partial<AdaptorSignature> & Required<Omit<AdaptorSignature, never>>) => AdaptorSignature;
383
+ defaults: () => Partial<AdaptorSignature>;
384
+ verifyFromOracleInfo(self_: AdaptorSignature, cet: Transaction, oracleInfos: Array<OracleInfo>, pubkey: ArrayBuffer, fundingScriptPubkey: ArrayBuffer, totalCollateral: bigint, msgs: Array<Array<ArrayBuffer>>): boolean;
385
+ }>;
386
+ /**
387
+ * Debug info for CET adaptor signature inputs.
388
+ *
389
+ * Contains all the values that go into creating an adaptor signature,
390
+ * useful for comparing with external signers during debugging.
391
+ *
392
+ * This struct is intentionally always available (not feature-gated)
393
+ * to support production debugging scenarios.
394
+ */
395
+ export type CetAdaptorSignatureDebugInfo = {
200
396
  /**
201
- * Create a frozen instance of {@link PartyParams}, with defaults specified
202
- * in Rust, in the {@link ddk_ffi} crate.
397
+ * The sighash (32 bytes) - this is the message that gets signed
203
398
  */
204
- create: (partial: Partial<PartyParams> & Required<Omit<PartyParams, never>>) => PartyParams;
399
+ sighash: ArrayBuffer;
205
400
  /**
206
- * Create a frozen instance of {@link PartyParams}, with defaults specified
207
- * in Rust, in the {@link ddk_ffi} crate.
401
+ * The adaptor point (33 bytes compressed public key)
208
402
  */
209
- new: (partial: Partial<PartyParams> & Required<Omit<PartyParams, never>>) => PartyParams;
403
+ adaptorPoint: ArrayBuffer;
210
404
  /**
211
- * Defaults specified in the {@link ddk_ffi} crate.
405
+ * Input index (always 0 for CETs)
212
406
  */
213
- defaults: () => Partial<PartyParams>;
407
+ inputIndex: number;
408
+ /**
409
+ * The funding script pubkey used for sighash
410
+ */
411
+ scriptPubkey: ArrayBuffer;
412
+ /**
413
+ * The fund output value used for sighash
414
+ */
415
+ value: bigint;
416
+ /**
417
+ * The CET txid
418
+ */
419
+ cetTxid: string;
420
+ /**
421
+ * Raw CET bytes for verification
422
+ */
423
+ cetRaw: ArrayBuffer;
424
+ };
425
+ /**
426
+ * Generated factory for {@link CetAdaptorSignatureDebugInfo} record objects.
427
+ */
428
+ export declare const CetAdaptorSignatureDebugInfo: Readonly<{
429
+ create: (partial: Partial<CetAdaptorSignatureDebugInfo> & Required<Omit<CetAdaptorSignatureDebugInfo, never>>) => CetAdaptorSignatureDebugInfo;
430
+ new: (partial: Partial<CetAdaptorSignatureDebugInfo> & Required<Omit<CetAdaptorSignatureDebugInfo, never>>) => CetAdaptorSignatureDebugInfo;
431
+ defaults: () => Partial<CetAdaptorSignatureDebugInfo>;
214
432
  }>;
215
- export type Payout = {
216
- offer: bigint;
217
- accept: bigint;
433
+ export type ChangeOutputAndFees = {
434
+ changeOutput: TxOutput;
435
+ fundFee: bigint;
436
+ cetFee: bigint;
218
437
  };
219
438
  /**
220
- * Generated factory for {@link Payout} record objects.
439
+ * Generated factory for {@link ChangeOutputAndFees} record objects.
221
440
  */
222
- export declare const Payout: Readonly<{
441
+ export declare const ChangeOutputAndFees: Readonly<{
442
+ create: (partial: Partial<ChangeOutputAndFees> & Required<Omit<ChangeOutputAndFees, never>>) => ChangeOutputAndFees;
443
+ new: (partial: Partial<ChangeOutputAndFees> & Required<Omit<ChangeOutputAndFees, never>>) => ChangeOutputAndFees;
444
+ defaults: () => Partial<ChangeOutputAndFees>;
445
+ }>;
446
+ /**
447
+ * One row of a contract's payout table.
448
+ *
449
+ * Enum-contract rows carry an `outcome` label; numeric-contract rows carry an
450
+ * inclusive `[range_start, range_end]` of outcome values that share the payout.
451
+ */
452
+ export type PayoutRow = {
223
453
  /**
224
- * Create a frozen instance of {@link Payout}, with defaults specified
225
- * in Rust, in the {@link ddk_ffi} crate.
454
+ * The outcome label (enum contracts only; `None` for numeric).
226
455
  */
227
- create: (partial: Partial<Payout> & Required<Omit<Payout, never>>) => Payout;
456
+ outcome?: string;
228
457
  /**
229
- * Create a frozen instance of {@link Payout}, with defaults specified
230
- * in Rust, in the {@link ddk_ffi} crate.
458
+ * Inclusive start of the outcome range (numeric contracts only; `None` for enum).
231
459
  */
232
- new: (partial: Partial<Payout> & Required<Omit<Payout, never>>) => Payout;
460
+ rangeStart?: bigint;
233
461
  /**
234
- * Defaults specified in the {@link ddk_ffi} crate.
462
+ * Inclusive end of the outcome range (numeric contracts only; `None` for enum).
235
463
  */
236
- defaults: () => Partial<Payout>;
237
- }>;
238
- export type Transaction = {
239
- version: number;
240
- lockTime: number;
241
- inputs: Array<TxInput>;
242
- outputs: Array<TxOutput>;
243
- rawBytes: Array</*u8*/ number>;
464
+ rangeEnd?: bigint;
465
+ /**
466
+ * The payout to the offering party, in satoshis.
467
+ */
468
+ offerPayoutSats: bigint;
469
+ /**
470
+ * The payout to the accepting party, in satoshis.
471
+ */
472
+ acceptPayoutSats: bigint;
244
473
  };
245
474
  /**
246
- * Generated factory for {@link Transaction} record objects.
475
+ * Generated factory for {@link PayoutRow} record objects.
247
476
  */
248
- export declare const Transaction: Readonly<{
477
+ export declare const PayoutRow: Readonly<{
478
+ create: (partial: Partial<PayoutRow> & Required<Omit<PayoutRow, "outcome" | "rangeStart" | "rangeEnd">>) => PayoutRow;
479
+ new: (partial: Partial<PayoutRow> & Required<Omit<PayoutRow, "outcome" | "rangeStart" | "rangeEnd">>) => PayoutRow;
480
+ defaults: () => Partial<PayoutRow>;
481
+ }>;
482
+ /**
483
+ * A contract's payouts, derived from its `ContractInfo`, for display as a table.
484
+ */
485
+ export type ContractPayouts = {
249
486
  /**
250
- * Create a frozen instance of {@link Transaction}, with defaults specified
251
- * in Rust, in the {@link ddk_ffi} crate.
487
+ * Total collateral (offer + accept), in satoshis.
252
488
  */
253
- create: (partial: Partial<Transaction> & Required<Omit<Transaction, never>>) => Transaction;
489
+ totalCollateralSats: bigint;
254
490
  /**
255
- * Create a frozen instance of {@link Transaction}, with defaults specified
256
- * in Rust, in the {@link ddk_ffi} crate.
491
+ * `true` for enum contracts (rows are labeled outcomes); `false` for numeric
492
+ * contracts (rows are outcome ranges).
257
493
  */
258
- new: (partial: Partial<Transaction> & Required<Omit<Transaction, never>>) => Transaction;
494
+ isEnum: boolean;
259
495
  /**
260
- * Defaults specified in the {@link ddk_ffi} crate.
496
+ * The payout rows, in outcome order.
261
497
  */
262
- defaults: () => Partial<Transaction>;
498
+ rows: Array<PayoutRow>;
499
+ };
500
+ /**
501
+ * Generated factory for {@link ContractPayouts} record objects.
502
+ */
503
+ export declare const ContractPayouts: Readonly<{
504
+ create: (partial: Partial<ContractPayouts> & Required<Omit<ContractPayouts, never>>) => ContractPayouts;
505
+ new: (partial: Partial<ContractPayouts> & Required<Omit<ContractPayouts, never>>) => ContractPayouts;
506
+ defaults: () => Partial<ContractPayouts>;
263
507
  }>;
264
- export type TxInput = {
265
- txid: string;
266
- vout: number;
267
- scriptSig: Array</*u8*/ number>;
268
- sequence: number;
269
- witness: Array<Array</*u8*/ number>>;
508
+ /**
509
+ * Parameters for [`create_offer`] (mirrors [`ddk::contract::CreateOfferParams`]).
510
+ */
511
+ export type CreateOfferParams = {
512
+ /**
513
+ * The 32-byte chain hash the contract settles on.
514
+ */
515
+ chainHash: ArrayBuffer;
516
+ /**
517
+ * The 32-byte temporary contract id; randomly generated when `None`.
518
+ */
519
+ temporaryContractId?: ArrayBuffer;
520
+ /**
521
+ * The contract payout and oracle information, wire-encoded `ContractInfo`.
522
+ */
523
+ contractInfo: ArrayBuffer;
524
+ /**
525
+ * The collateral, in satoshis, contributed by the offering party.
526
+ */
527
+ offerCollateralSats: bigint;
528
+ /**
529
+ * The offering party's Bitcoin-level contract data.
530
+ */
531
+ party: ContractPartyParams;
532
+ /**
533
+ * Serial id ordering the funding output; randomly generated when `None`.
534
+ */
535
+ fundOutputSerialId?: bigint;
536
+ /**
537
+ * The fee rate, in satoshis per virtual byte.
538
+ */
539
+ feeRatePerVb: bigint;
540
+ /**
541
+ * The earliest time CETs can be broadcast.
542
+ */
543
+ cetLocktime: number;
544
+ /**
545
+ * The time after which the refund transaction can be broadcast.
546
+ */
547
+ refundLocktime: number;
548
+ /**
549
+ * Contract feature flags. Use `0` unless a protocol extension requires otherwise.
550
+ */
551
+ contractFlags: number;
270
552
  };
271
553
  /**
272
- * Generated factory for {@link TxInput} record objects.
554
+ * Generated factory for {@link CreateOfferParams} record objects.
273
555
  */
274
- export declare const TxInput: Readonly<{
556
+ export declare const CreateOfferParams: Readonly<{
557
+ create: (partial: Partial<CreateOfferParams> & Required<Omit<CreateOfferParams, "temporaryContractId" | "fundOutputSerialId">>) => CreateOfferParams;
558
+ new: (partial: Partial<CreateOfferParams> & Required<Omit<CreateOfferParams, "temporaryContractId" | "fundOutputSerialId">>) => CreateOfferParams;
559
+ defaults: () => Partial<CreateOfferParams>;
560
+ }>;
561
+ /**
562
+ * Identifies a funding input and the descriptor wildcard index that derives its
563
+ * key, for [`sign_funding_psbt_with_descriptor`].
564
+ */
565
+ export type DescriptorInput = {
275
566
  /**
276
- * Create a frozen instance of {@link TxInput}, with defaults specified
277
- * in Rust, in the {@link ddk_ffi} crate.
567
+ * The serial id of the funding input to sign.
278
568
  */
279
- create: (partial: Partial<TxInput> & Required<Omit<TxInput, never>>) => TxInput;
569
+ inputSerialId: bigint;
280
570
  /**
281
- * Create a frozen instance of {@link TxInput}, with defaults specified
282
- * in Rust, in the {@link ddk_ffi} crate.
571
+ * The descriptor wildcard derivation index of the input's script (ignored
572
+ * for descriptors without a wildcard).
283
573
  */
284
- new: (partial: Partial<TxInput> & Required<Omit<TxInput, never>>) => TxInput;
574
+ derivationIndex: number;
575
+ };
576
+ /**
577
+ * Generated factory for {@link DescriptorInput} record objects.
578
+ */
579
+ export declare const DescriptorInput: Readonly<{
580
+ create: (partial: Partial<DescriptorInput> & Required<Omit<DescriptorInput, never>>) => DescriptorInput;
581
+ new: (partial: Partial<DescriptorInput> & Required<Omit<DescriptorInput, never>>) => DescriptorInput;
582
+ defaults: () => Partial<DescriptorInput>;
583
+ }>;
584
+ export type DlcInputInfo = {
585
+ fundTx: Transaction;
586
+ fundVout: number;
587
+ localFundPubkey: ArrayBuffer;
588
+ remoteFundPubkey: ArrayBuffer;
589
+ fundAmount: bigint;
590
+ maxWitnessLen: number;
591
+ inputSerialId: bigint;
592
+ contractId: ArrayBuffer;
593
+ };
594
+ /**
595
+ * Generated factory for {@link DlcInputInfo} record objects.
596
+ */
597
+ export declare const DlcInputInfo: Readonly<{
598
+ create: (partial: Partial<DlcInputInfo> & Required<Omit<DlcInputInfo, never>>) => DlcInputInfo;
599
+ new: (partial: Partial<DlcInputInfo> & Required<Omit<DlcInputInfo, never>>) => DlcInputInfo;
600
+ defaults: () => Partial<DlcInputInfo>;
601
+ }>;
602
+ /**
603
+ * An oracle attestation paired with the position of the oracle that produced it
604
+ * in the contract's announcements, for [`sign_contract_cet`].
605
+ */
606
+ export type OracleAttestationRef = {
285
607
  /**
286
- * Defaults specified in the {@link ddk_ffi} crate.
608
+ * The index of the attesting oracle in the contract info's announcements.
287
609
  */
288
- defaults: () => Partial<TxInput>;
610
+ oracleIndex: number;
611
+ /**
612
+ * The wire-encoded `OracleAttestation`.
613
+ */
614
+ attestation: ArrayBuffer;
615
+ };
616
+ /**
617
+ * Generated factory for {@link OracleAttestationRef} record objects.
618
+ */
619
+ export declare const OracleAttestationRef: Readonly<{
620
+ create: (partial: Partial<OracleAttestationRef> & Required<Omit<OracleAttestationRef, never>>) => OracleAttestationRef;
621
+ new: (partial: Partial<OracleAttestationRef> & Required<Omit<OracleAttestationRef, never>>) => OracleAttestationRef;
622
+ defaults: () => Partial<OracleAttestationRef>;
623
+ }>;
624
+ export type OracleInfo = {
625
+ publicKey: ArrayBuffer;
626
+ nonces: Array<ArrayBuffer>;
627
+ };
628
+ /**
629
+ * Generated factory for {@link OracleInfo} record objects.
630
+ */
631
+ export declare const OracleInfo: Readonly<{
632
+ create: (partial: Partial<OracleInfo> & Required<Omit<OracleInfo, never>>) => OracleInfo;
633
+ new: (partial: Partial<OracleInfo> & Required<Omit<OracleInfo, never>>) => OracleInfo;
634
+ defaults: () => Partial<OracleInfo>;
289
635
  }>;
290
636
  export type TxInputInfo = {
291
637
  txid: string;
292
638
  vout: number;
293
- scriptSig: Array</*u8*/ number>;
639
+ scriptSig: ArrayBuffer;
294
640
  maxWitnessLength: number;
295
641
  serialId: bigint;
296
642
  };
@@ -298,44 +644,1537 @@ export type TxInputInfo = {
298
644
  * Generated factory for {@link TxInputInfo} record objects.
299
645
  */
300
646
  export declare const TxInputInfo: Readonly<{
647
+ create: (partial: Partial<TxInputInfo> & Required<Omit<TxInputInfo, never>>) => TxInputInfo;
648
+ new: (partial: Partial<TxInputInfo> & Required<Omit<TxInputInfo, never>>) => TxInputInfo;
649
+ defaults: () => Partial<TxInputInfo>;
650
+ }>;
651
+ export type PartyParams = {
652
+ fundPubkey: ArrayBuffer;
653
+ changeScriptPubkey: ArrayBuffer;
654
+ changeSerialId: bigint;
655
+ payoutScriptPubkey: ArrayBuffer;
656
+ payoutSerialId: bigint;
657
+ inputs: Array<TxInputInfo>;
658
+ inputAmount: bigint;
659
+ collateral: bigint;
660
+ dlcInputs: Array<DlcInputInfo>;
661
+ };
662
+ /**
663
+ * Generated factory for {@link PartyParams} record objects.
664
+ */
665
+ export declare const PartyParams: Readonly<{
666
+ create: (partial: Partial<PartyParams> & Required<Omit<PartyParams, never>>) => PartyParams;
667
+ new: (partial: Partial<PartyParams> & Required<Omit<PartyParams, never>>) => PartyParams;
668
+ defaults: () => Partial<PartyParams>;
669
+ changeOutputAndFees(self_: PartyParams, feeRate: bigint): ChangeOutputAndFees;
670
+ }>;
671
+ export type Payout = {
672
+ offer: bigint;
673
+ accept: bigint;
674
+ };
675
+ /**
676
+ * Generated factory for {@link Payout} record objects.
677
+ */
678
+ export declare const Payout: Readonly<{
679
+ create: (partial: Partial<Payout> & Required<Omit<Payout, never>>) => Payout;
680
+ new: (partial: Partial<Payout> & Required<Omit<Payout, never>>) => Payout;
681
+ defaults: () => Partial<Payout>;
682
+ }>;
683
+ /**
684
+ * The result of [`sign_accept`] / [`sign_accept_spliced`].
685
+ */
686
+ export type SignResult = {
301
687
  /**
302
- * Create a frozen instance of {@link TxInputInfo}, with defaults specified
303
- * in Rust, in the {@link ddk_ffi} crate.
688
+ * The wire-encoded `SignDlc` message to send to the accepting party.
304
689
  */
305
- create: (partial: Partial<TxInputInfo> & Required<Omit<TxInputInfo, never>>) => TxInputInfo;
690
+ sign: ArrayBuffer;
306
691
  /**
307
- * Create a frozen instance of {@link TxInputInfo}, with defaults specified
308
- * in Rust, in the {@link ddk_ffi} crate.
692
+ * The unsigned funding, CET, and refund transactions.
309
693
  */
310
- new: (partial: Partial<TxInputInfo> & Required<Omit<TxInputInfo, never>>) => TxInputInfo;
694
+ transactions: DlcTransactions;
695
+ };
696
+ /**
697
+ * Generated factory for {@link SignResult} record objects.
698
+ */
699
+ export declare const SignResult: Readonly<{
700
+ create: (partial: Partial<SignResult> & Required<Omit<SignResult, never>>) => SignResult;
701
+ new: (partial: Partial<SignResult> & Required<Omit<SignResult, never>>) => SignResult;
702
+ defaults: () => Partial<SignResult>;
703
+ }>;
704
+ /**
705
+ * References a splice (DLC) funding input and the previous contract whose
706
+ * 2-of-2 output it spends, so the provider can re-derive the signing key.
707
+ */
708
+ export type SpliceKeyRef = {
311
709
  /**
312
- * Defaults specified in the {@link ddk_ffi} crate.
710
+ * The serial id of the DLC (splice) funding input this key signs.
313
711
  */
314
- defaults: () => Partial<TxInputInfo>;
712
+ inputSerialId: bigint;
713
+ /**
714
+ * The 32-byte temporary id of the previous contract being spliced from.
715
+ */
716
+ priorTemporaryContractId: ArrayBuffer;
717
+ };
718
+ /**
719
+ * Generated factory for {@link SpliceKeyRef} record objects.
720
+ */
721
+ export declare const SpliceKeyRef: Readonly<{
722
+ create: (partial: Partial<SpliceKeyRef> & Required<Omit<SpliceKeyRef, never>>) => SpliceKeyRef;
723
+ new: (partial: Partial<SpliceKeyRef> & Required<Omit<SpliceKeyRef, never>>) => SpliceKeyRef;
724
+ defaults: () => Partial<SpliceKeyRef>;
725
+ }>;
726
+ export declare enum ContractError_Tags {
727
+ InvalidOffer = "InvalidOffer",
728
+ InvalidAccept = "InvalidAccept",
729
+ InvalidSign = "InvalidSign",
730
+ InvalidFundingInput = "InvalidFundingInput",
731
+ PsbtMismatch = "PsbtMismatch",
732
+ MissingFinalizedInput = "MissingFinalizedInput",
733
+ UnsupportedScriptType = "UnsupportedScriptType",
734
+ InvalidAttestation = "InvalidAttestation",
735
+ NoMatchingOutcome = "NoMatchingOutcome",
736
+ Descriptor = "Descriptor",
737
+ Wallet = "Wallet",
738
+ Bip32 = "Bip32",
739
+ Dlc = "Dlc",
740
+ Key = "Key",
741
+ Serialization = "Serialization",
742
+ InvalidNetwork = "InvalidNetwork",
743
+ InvalidLength = "InvalidLength"
744
+ }
745
+ /**
746
+ * Errors returned by the stateless contract API.
747
+ *
748
+ * Mirrors [`ddk::contract::ContractError`] as a uniffi error so the typed
749
+ * variants survive across the binding boundary. Variants carry plain strings.
750
+ */
751
+ export declare const ContractError: Readonly<{
752
+ instanceOf: (obj: any) => obj is ContractError;
753
+ InvalidOffer: {
754
+ new (inner: {
755
+ message: string;
756
+ }): {
757
+ readonly tag: ContractError_Tags.InvalidOffer;
758
+ readonly inner: Readonly<{
759
+ message: string;
760
+ }>;
761
+ /**
762
+ * @private
763
+ * This field is private and should not be used, use `tag` instead.
764
+ */
765
+ readonly [uniffiTypeNameSymbol]: "ContractError";
766
+ name: string;
767
+ message: string;
768
+ stack?: string;
769
+ cause?: unknown;
770
+ };
771
+ "new"(inner: {
772
+ message: string;
773
+ }): {
774
+ readonly tag: ContractError_Tags.InvalidOffer;
775
+ readonly inner: Readonly<{
776
+ message: string;
777
+ }>;
778
+ /**
779
+ * @private
780
+ * This field is private and should not be used, use `tag` instead.
781
+ */
782
+ readonly [uniffiTypeNameSymbol]: "ContractError";
783
+ name: string;
784
+ message: string;
785
+ stack?: string;
786
+ cause?: unknown;
787
+ };
788
+ instanceOf(obj: any): obj is {
789
+ readonly tag: ContractError_Tags.InvalidOffer;
790
+ readonly inner: Readonly<{
791
+ message: string;
792
+ }>;
793
+ /**
794
+ * @private
795
+ * This field is private and should not be used, use `tag` instead.
796
+ */
797
+ readonly [uniffiTypeNameSymbol]: "ContractError";
798
+ name: string;
799
+ message: string;
800
+ stack?: string;
801
+ cause?: unknown;
802
+ };
803
+ hasInner(obj: any): obj is {
804
+ readonly tag: ContractError_Tags.InvalidOffer;
805
+ readonly inner: Readonly<{
806
+ message: string;
807
+ }>;
808
+ /**
809
+ * @private
810
+ * This field is private and should not be used, use `tag` instead.
811
+ */
812
+ readonly [uniffiTypeNameSymbol]: "ContractError";
813
+ name: string;
814
+ message: string;
815
+ stack?: string;
816
+ cause?: unknown;
817
+ };
818
+ getInner(obj: {
819
+ readonly tag: ContractError_Tags.InvalidOffer;
820
+ readonly inner: Readonly<{
821
+ message: string;
822
+ }>;
823
+ /**
824
+ * @private
825
+ * This field is private and should not be used, use `tag` instead.
826
+ */
827
+ readonly [uniffiTypeNameSymbol]: "ContractError";
828
+ name: string;
829
+ message: string;
830
+ stack?: string;
831
+ cause?: unknown;
832
+ }): Readonly<{
833
+ message: string;
834
+ }>;
835
+ isError(error: unknown): error is Error;
836
+ };
837
+ InvalidAccept: {
838
+ new (inner: {
839
+ message: string;
840
+ }): {
841
+ readonly tag: ContractError_Tags.InvalidAccept;
842
+ readonly inner: Readonly<{
843
+ message: string;
844
+ }>;
845
+ /**
846
+ * @private
847
+ * This field is private and should not be used, use `tag` instead.
848
+ */
849
+ readonly [uniffiTypeNameSymbol]: "ContractError";
850
+ name: string;
851
+ message: string;
852
+ stack?: string;
853
+ cause?: unknown;
854
+ };
855
+ "new"(inner: {
856
+ message: string;
857
+ }): {
858
+ readonly tag: ContractError_Tags.InvalidAccept;
859
+ readonly inner: Readonly<{
860
+ message: string;
861
+ }>;
862
+ /**
863
+ * @private
864
+ * This field is private and should not be used, use `tag` instead.
865
+ */
866
+ readonly [uniffiTypeNameSymbol]: "ContractError";
867
+ name: string;
868
+ message: string;
869
+ stack?: string;
870
+ cause?: unknown;
871
+ };
872
+ instanceOf(obj: any): obj is {
873
+ readonly tag: ContractError_Tags.InvalidAccept;
874
+ readonly inner: Readonly<{
875
+ message: string;
876
+ }>;
877
+ /**
878
+ * @private
879
+ * This field is private and should not be used, use `tag` instead.
880
+ */
881
+ readonly [uniffiTypeNameSymbol]: "ContractError";
882
+ name: string;
883
+ message: string;
884
+ stack?: string;
885
+ cause?: unknown;
886
+ };
887
+ hasInner(obj: any): obj is {
888
+ readonly tag: ContractError_Tags.InvalidAccept;
889
+ readonly inner: Readonly<{
890
+ message: string;
891
+ }>;
892
+ /**
893
+ * @private
894
+ * This field is private and should not be used, use `tag` instead.
895
+ */
896
+ readonly [uniffiTypeNameSymbol]: "ContractError";
897
+ name: string;
898
+ message: string;
899
+ stack?: string;
900
+ cause?: unknown;
901
+ };
902
+ getInner(obj: {
903
+ readonly tag: ContractError_Tags.InvalidAccept;
904
+ readonly inner: Readonly<{
905
+ message: string;
906
+ }>;
907
+ /**
908
+ * @private
909
+ * This field is private and should not be used, use `tag` instead.
910
+ */
911
+ readonly [uniffiTypeNameSymbol]: "ContractError";
912
+ name: string;
913
+ message: string;
914
+ stack?: string;
915
+ cause?: unknown;
916
+ }): Readonly<{
917
+ message: string;
918
+ }>;
919
+ isError(error: unknown): error is Error;
920
+ };
921
+ InvalidSign: {
922
+ new (inner: {
923
+ message: string;
924
+ }): {
925
+ readonly tag: ContractError_Tags.InvalidSign;
926
+ readonly inner: Readonly<{
927
+ message: string;
928
+ }>;
929
+ /**
930
+ * @private
931
+ * This field is private and should not be used, use `tag` instead.
932
+ */
933
+ readonly [uniffiTypeNameSymbol]: "ContractError";
934
+ name: string;
935
+ message: string;
936
+ stack?: string;
937
+ cause?: unknown;
938
+ };
939
+ "new"(inner: {
940
+ message: string;
941
+ }): {
942
+ readonly tag: ContractError_Tags.InvalidSign;
943
+ readonly inner: Readonly<{
944
+ message: string;
945
+ }>;
946
+ /**
947
+ * @private
948
+ * This field is private and should not be used, use `tag` instead.
949
+ */
950
+ readonly [uniffiTypeNameSymbol]: "ContractError";
951
+ name: string;
952
+ message: string;
953
+ stack?: string;
954
+ cause?: unknown;
955
+ };
956
+ instanceOf(obj: any): obj is {
957
+ readonly tag: ContractError_Tags.InvalidSign;
958
+ readonly inner: Readonly<{
959
+ message: string;
960
+ }>;
961
+ /**
962
+ * @private
963
+ * This field is private and should not be used, use `tag` instead.
964
+ */
965
+ readonly [uniffiTypeNameSymbol]: "ContractError";
966
+ name: string;
967
+ message: string;
968
+ stack?: string;
969
+ cause?: unknown;
970
+ };
971
+ hasInner(obj: any): obj is {
972
+ readonly tag: ContractError_Tags.InvalidSign;
973
+ readonly inner: Readonly<{
974
+ message: string;
975
+ }>;
976
+ /**
977
+ * @private
978
+ * This field is private and should not be used, use `tag` instead.
979
+ */
980
+ readonly [uniffiTypeNameSymbol]: "ContractError";
981
+ name: string;
982
+ message: string;
983
+ stack?: string;
984
+ cause?: unknown;
985
+ };
986
+ getInner(obj: {
987
+ readonly tag: ContractError_Tags.InvalidSign;
988
+ readonly inner: Readonly<{
989
+ message: string;
990
+ }>;
991
+ /**
992
+ * @private
993
+ * This field is private and should not be used, use `tag` instead.
994
+ */
995
+ readonly [uniffiTypeNameSymbol]: "ContractError";
996
+ name: string;
997
+ message: string;
998
+ stack?: string;
999
+ cause?: unknown;
1000
+ }): Readonly<{
1001
+ message: string;
1002
+ }>;
1003
+ isError(error: unknown): error is Error;
1004
+ };
1005
+ InvalidFundingInput: {
1006
+ new (inner: {
1007
+ message: string;
1008
+ }): {
1009
+ readonly tag: ContractError_Tags.InvalidFundingInput;
1010
+ readonly inner: Readonly<{
1011
+ message: string;
1012
+ }>;
1013
+ /**
1014
+ * @private
1015
+ * This field is private and should not be used, use `tag` instead.
1016
+ */
1017
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1018
+ name: string;
1019
+ message: string;
1020
+ stack?: string;
1021
+ cause?: unknown;
1022
+ };
1023
+ "new"(inner: {
1024
+ message: string;
1025
+ }): {
1026
+ readonly tag: ContractError_Tags.InvalidFundingInput;
1027
+ readonly inner: Readonly<{
1028
+ message: string;
1029
+ }>;
1030
+ /**
1031
+ * @private
1032
+ * This field is private and should not be used, use `tag` instead.
1033
+ */
1034
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1035
+ name: string;
1036
+ message: string;
1037
+ stack?: string;
1038
+ cause?: unknown;
1039
+ };
1040
+ instanceOf(obj: any): obj is {
1041
+ readonly tag: ContractError_Tags.InvalidFundingInput;
1042
+ readonly inner: Readonly<{
1043
+ message: string;
1044
+ }>;
1045
+ /**
1046
+ * @private
1047
+ * This field is private and should not be used, use `tag` instead.
1048
+ */
1049
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1050
+ name: string;
1051
+ message: string;
1052
+ stack?: string;
1053
+ cause?: unknown;
1054
+ };
1055
+ hasInner(obj: any): obj is {
1056
+ readonly tag: ContractError_Tags.InvalidFundingInput;
1057
+ readonly inner: Readonly<{
1058
+ message: string;
1059
+ }>;
1060
+ /**
1061
+ * @private
1062
+ * This field is private and should not be used, use `tag` instead.
1063
+ */
1064
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1065
+ name: string;
1066
+ message: string;
1067
+ stack?: string;
1068
+ cause?: unknown;
1069
+ };
1070
+ getInner(obj: {
1071
+ readonly tag: ContractError_Tags.InvalidFundingInput;
1072
+ readonly inner: Readonly<{
1073
+ message: string;
1074
+ }>;
1075
+ /**
1076
+ * @private
1077
+ * This field is private and should not be used, use `tag` instead.
1078
+ */
1079
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1080
+ name: string;
1081
+ message: string;
1082
+ stack?: string;
1083
+ cause?: unknown;
1084
+ }): Readonly<{
1085
+ message: string;
1086
+ }>;
1087
+ isError(error: unknown): error is Error;
1088
+ };
1089
+ PsbtMismatch: {
1090
+ new (inner: {
1091
+ message: string;
1092
+ }): {
1093
+ readonly tag: ContractError_Tags.PsbtMismatch;
1094
+ readonly inner: Readonly<{
1095
+ message: string;
1096
+ }>;
1097
+ /**
1098
+ * @private
1099
+ * This field is private and should not be used, use `tag` instead.
1100
+ */
1101
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1102
+ name: string;
1103
+ message: string;
1104
+ stack?: string;
1105
+ cause?: unknown;
1106
+ };
1107
+ "new"(inner: {
1108
+ message: string;
1109
+ }): {
1110
+ readonly tag: ContractError_Tags.PsbtMismatch;
1111
+ readonly inner: Readonly<{
1112
+ message: string;
1113
+ }>;
1114
+ /**
1115
+ * @private
1116
+ * This field is private and should not be used, use `tag` instead.
1117
+ */
1118
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1119
+ name: string;
1120
+ message: string;
1121
+ stack?: string;
1122
+ cause?: unknown;
1123
+ };
1124
+ instanceOf(obj: any): obj is {
1125
+ readonly tag: ContractError_Tags.PsbtMismatch;
1126
+ readonly inner: Readonly<{
1127
+ message: string;
1128
+ }>;
1129
+ /**
1130
+ * @private
1131
+ * This field is private and should not be used, use `tag` instead.
1132
+ */
1133
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1134
+ name: string;
1135
+ message: string;
1136
+ stack?: string;
1137
+ cause?: unknown;
1138
+ };
1139
+ hasInner(obj: any): obj is {
1140
+ readonly tag: ContractError_Tags.PsbtMismatch;
1141
+ readonly inner: Readonly<{
1142
+ message: string;
1143
+ }>;
1144
+ /**
1145
+ * @private
1146
+ * This field is private and should not be used, use `tag` instead.
1147
+ */
1148
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1149
+ name: string;
1150
+ message: string;
1151
+ stack?: string;
1152
+ cause?: unknown;
1153
+ };
1154
+ getInner(obj: {
1155
+ readonly tag: ContractError_Tags.PsbtMismatch;
1156
+ readonly inner: Readonly<{
1157
+ message: string;
1158
+ }>;
1159
+ /**
1160
+ * @private
1161
+ * This field is private and should not be used, use `tag` instead.
1162
+ */
1163
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1164
+ name: string;
1165
+ message: string;
1166
+ stack?: string;
1167
+ cause?: unknown;
1168
+ }): Readonly<{
1169
+ message: string;
1170
+ }>;
1171
+ isError(error: unknown): error is Error;
1172
+ };
1173
+ MissingFinalizedInput: {
1174
+ new (inner: {
1175
+ inputIndex: number;
1176
+ }): {
1177
+ readonly tag: ContractError_Tags.MissingFinalizedInput;
1178
+ readonly inner: Readonly<{
1179
+ inputIndex: number;
1180
+ }>;
1181
+ /**
1182
+ * @private
1183
+ * This field is private and should not be used, use `tag` instead.
1184
+ */
1185
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1186
+ name: string;
1187
+ message: string;
1188
+ stack?: string;
1189
+ cause?: unknown;
1190
+ };
1191
+ "new"(inner: {
1192
+ inputIndex: number;
1193
+ }): {
1194
+ readonly tag: ContractError_Tags.MissingFinalizedInput;
1195
+ readonly inner: Readonly<{
1196
+ inputIndex: number;
1197
+ }>;
1198
+ /**
1199
+ * @private
1200
+ * This field is private and should not be used, use `tag` instead.
1201
+ */
1202
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1203
+ name: string;
1204
+ message: string;
1205
+ stack?: string;
1206
+ cause?: unknown;
1207
+ };
1208
+ instanceOf(obj: any): obj is {
1209
+ readonly tag: ContractError_Tags.MissingFinalizedInput;
1210
+ readonly inner: Readonly<{
1211
+ inputIndex: number;
1212
+ }>;
1213
+ /**
1214
+ * @private
1215
+ * This field is private and should not be used, use `tag` instead.
1216
+ */
1217
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1218
+ name: string;
1219
+ message: string;
1220
+ stack?: string;
1221
+ cause?: unknown;
1222
+ };
1223
+ hasInner(obj: any): obj is {
1224
+ readonly tag: ContractError_Tags.MissingFinalizedInput;
1225
+ readonly inner: Readonly<{
1226
+ inputIndex: number;
1227
+ }>;
1228
+ /**
1229
+ * @private
1230
+ * This field is private and should not be used, use `tag` instead.
1231
+ */
1232
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1233
+ name: string;
1234
+ message: string;
1235
+ stack?: string;
1236
+ cause?: unknown;
1237
+ };
1238
+ getInner(obj: {
1239
+ readonly tag: ContractError_Tags.MissingFinalizedInput;
1240
+ readonly inner: Readonly<{
1241
+ inputIndex: number;
1242
+ }>;
1243
+ /**
1244
+ * @private
1245
+ * This field is private and should not be used, use `tag` instead.
1246
+ */
1247
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1248
+ name: string;
1249
+ message: string;
1250
+ stack?: string;
1251
+ cause?: unknown;
1252
+ }): Readonly<{
1253
+ inputIndex: number;
1254
+ }>;
1255
+ isError(error: unknown): error is Error;
1256
+ };
1257
+ UnsupportedScriptType: {
1258
+ new (inner: {
1259
+ inputIndex: number;
1260
+ }): {
1261
+ readonly tag: ContractError_Tags.UnsupportedScriptType;
1262
+ readonly inner: Readonly<{
1263
+ inputIndex: number;
1264
+ }>;
1265
+ /**
1266
+ * @private
1267
+ * This field is private and should not be used, use `tag` instead.
1268
+ */
1269
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1270
+ name: string;
1271
+ message: string;
1272
+ stack?: string;
1273
+ cause?: unknown;
1274
+ };
1275
+ "new"(inner: {
1276
+ inputIndex: number;
1277
+ }): {
1278
+ readonly tag: ContractError_Tags.UnsupportedScriptType;
1279
+ readonly inner: Readonly<{
1280
+ inputIndex: number;
1281
+ }>;
1282
+ /**
1283
+ * @private
1284
+ * This field is private and should not be used, use `tag` instead.
1285
+ */
1286
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1287
+ name: string;
1288
+ message: string;
1289
+ stack?: string;
1290
+ cause?: unknown;
1291
+ };
1292
+ instanceOf(obj: any): obj is {
1293
+ readonly tag: ContractError_Tags.UnsupportedScriptType;
1294
+ readonly inner: Readonly<{
1295
+ inputIndex: number;
1296
+ }>;
1297
+ /**
1298
+ * @private
1299
+ * This field is private and should not be used, use `tag` instead.
1300
+ */
1301
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1302
+ name: string;
1303
+ message: string;
1304
+ stack?: string;
1305
+ cause?: unknown;
1306
+ };
1307
+ hasInner(obj: any): obj is {
1308
+ readonly tag: ContractError_Tags.UnsupportedScriptType;
1309
+ readonly inner: Readonly<{
1310
+ inputIndex: number;
1311
+ }>;
1312
+ /**
1313
+ * @private
1314
+ * This field is private and should not be used, use `tag` instead.
1315
+ */
1316
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1317
+ name: string;
1318
+ message: string;
1319
+ stack?: string;
1320
+ cause?: unknown;
1321
+ };
1322
+ getInner(obj: {
1323
+ readonly tag: ContractError_Tags.UnsupportedScriptType;
1324
+ readonly inner: Readonly<{
1325
+ inputIndex: number;
1326
+ }>;
1327
+ /**
1328
+ * @private
1329
+ * This field is private and should not be used, use `tag` instead.
1330
+ */
1331
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1332
+ name: string;
1333
+ message: string;
1334
+ stack?: string;
1335
+ cause?: unknown;
1336
+ }): Readonly<{
1337
+ inputIndex: number;
1338
+ }>;
1339
+ isError(error: unknown): error is Error;
1340
+ };
1341
+ InvalidAttestation: {
1342
+ new (inner: {
1343
+ message: string;
1344
+ }): {
1345
+ readonly tag: ContractError_Tags.InvalidAttestation;
1346
+ readonly inner: Readonly<{
1347
+ message: string;
1348
+ }>;
1349
+ /**
1350
+ * @private
1351
+ * This field is private and should not be used, use `tag` instead.
1352
+ */
1353
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1354
+ name: string;
1355
+ message: string;
1356
+ stack?: string;
1357
+ cause?: unknown;
1358
+ };
1359
+ "new"(inner: {
1360
+ message: string;
1361
+ }): {
1362
+ readonly tag: ContractError_Tags.InvalidAttestation;
1363
+ readonly inner: Readonly<{
1364
+ message: string;
1365
+ }>;
1366
+ /**
1367
+ * @private
1368
+ * This field is private and should not be used, use `tag` instead.
1369
+ */
1370
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1371
+ name: string;
1372
+ message: string;
1373
+ stack?: string;
1374
+ cause?: unknown;
1375
+ };
1376
+ instanceOf(obj: any): obj is {
1377
+ readonly tag: ContractError_Tags.InvalidAttestation;
1378
+ readonly inner: Readonly<{
1379
+ message: string;
1380
+ }>;
1381
+ /**
1382
+ * @private
1383
+ * This field is private and should not be used, use `tag` instead.
1384
+ */
1385
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1386
+ name: string;
1387
+ message: string;
1388
+ stack?: string;
1389
+ cause?: unknown;
1390
+ };
1391
+ hasInner(obj: any): obj is {
1392
+ readonly tag: ContractError_Tags.InvalidAttestation;
1393
+ readonly inner: Readonly<{
1394
+ message: string;
1395
+ }>;
1396
+ /**
1397
+ * @private
1398
+ * This field is private and should not be used, use `tag` instead.
1399
+ */
1400
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1401
+ name: string;
1402
+ message: string;
1403
+ stack?: string;
1404
+ cause?: unknown;
1405
+ };
1406
+ getInner(obj: {
1407
+ readonly tag: ContractError_Tags.InvalidAttestation;
1408
+ readonly inner: Readonly<{
1409
+ message: string;
1410
+ }>;
1411
+ /**
1412
+ * @private
1413
+ * This field is private and should not be used, use `tag` instead.
1414
+ */
1415
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1416
+ name: string;
1417
+ message: string;
1418
+ stack?: string;
1419
+ cause?: unknown;
1420
+ }): Readonly<{
1421
+ message: string;
1422
+ }>;
1423
+ isError(error: unknown): error is Error;
1424
+ };
1425
+ NoMatchingOutcome: {
1426
+ new (): {
1427
+ readonly tag: ContractError_Tags.NoMatchingOutcome;
1428
+ /**
1429
+ * @private
1430
+ * This field is private and should not be used, use `tag` instead.
1431
+ */
1432
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1433
+ name: string;
1434
+ message: string;
1435
+ stack?: string;
1436
+ cause?: unknown;
1437
+ };
1438
+ "new"(): {
1439
+ readonly tag: ContractError_Tags.NoMatchingOutcome;
1440
+ /**
1441
+ * @private
1442
+ * This field is private and should not be used, use `tag` instead.
1443
+ */
1444
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1445
+ name: string;
1446
+ message: string;
1447
+ stack?: string;
1448
+ cause?: unknown;
1449
+ };
1450
+ instanceOf(obj: any): obj is {
1451
+ readonly tag: ContractError_Tags.NoMatchingOutcome;
1452
+ /**
1453
+ * @private
1454
+ * This field is private and should not be used, use `tag` instead.
1455
+ */
1456
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1457
+ name: string;
1458
+ message: string;
1459
+ stack?: string;
1460
+ cause?: unknown;
1461
+ };
1462
+ hasInner(obj: any): obj is {
1463
+ readonly tag: ContractError_Tags.NoMatchingOutcome;
1464
+ /**
1465
+ * @private
1466
+ * This field is private and should not be used, use `tag` instead.
1467
+ */
1468
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1469
+ name: string;
1470
+ message: string;
1471
+ stack?: string;
1472
+ cause?: unknown;
1473
+ };
1474
+ isError(error: unknown): error is Error;
1475
+ };
1476
+ Descriptor: {
1477
+ new (inner: {
1478
+ message: string;
1479
+ }): {
1480
+ readonly tag: ContractError_Tags.Descriptor;
1481
+ readonly inner: Readonly<{
1482
+ message: string;
1483
+ }>;
1484
+ /**
1485
+ * @private
1486
+ * This field is private and should not be used, use `tag` instead.
1487
+ */
1488
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1489
+ name: string;
1490
+ message: string;
1491
+ stack?: string;
1492
+ cause?: unknown;
1493
+ };
1494
+ "new"(inner: {
1495
+ message: string;
1496
+ }): {
1497
+ readonly tag: ContractError_Tags.Descriptor;
1498
+ readonly inner: Readonly<{
1499
+ message: string;
1500
+ }>;
1501
+ /**
1502
+ * @private
1503
+ * This field is private and should not be used, use `tag` instead.
1504
+ */
1505
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1506
+ name: string;
1507
+ message: string;
1508
+ stack?: string;
1509
+ cause?: unknown;
1510
+ };
1511
+ instanceOf(obj: any): obj is {
1512
+ readonly tag: ContractError_Tags.Descriptor;
1513
+ readonly inner: Readonly<{
1514
+ message: string;
1515
+ }>;
1516
+ /**
1517
+ * @private
1518
+ * This field is private and should not be used, use `tag` instead.
1519
+ */
1520
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1521
+ name: string;
1522
+ message: string;
1523
+ stack?: string;
1524
+ cause?: unknown;
1525
+ };
1526
+ hasInner(obj: any): obj is {
1527
+ readonly tag: ContractError_Tags.Descriptor;
1528
+ readonly inner: Readonly<{
1529
+ message: string;
1530
+ }>;
1531
+ /**
1532
+ * @private
1533
+ * This field is private and should not be used, use `tag` instead.
1534
+ */
1535
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1536
+ name: string;
1537
+ message: string;
1538
+ stack?: string;
1539
+ cause?: unknown;
1540
+ };
1541
+ getInner(obj: {
1542
+ readonly tag: ContractError_Tags.Descriptor;
1543
+ readonly inner: Readonly<{
1544
+ message: string;
1545
+ }>;
1546
+ /**
1547
+ * @private
1548
+ * This field is private and should not be used, use `tag` instead.
1549
+ */
1550
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1551
+ name: string;
1552
+ message: string;
1553
+ stack?: string;
1554
+ cause?: unknown;
1555
+ }): Readonly<{
1556
+ message: string;
1557
+ }>;
1558
+ isError(error: unknown): error is Error;
1559
+ };
1560
+ Wallet: {
1561
+ new (inner: {
1562
+ message: string;
1563
+ }): {
1564
+ readonly tag: ContractError_Tags.Wallet;
1565
+ readonly inner: Readonly<{
1566
+ message: string;
1567
+ }>;
1568
+ /**
1569
+ * @private
1570
+ * This field is private and should not be used, use `tag` instead.
1571
+ */
1572
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1573
+ name: string;
1574
+ message: string;
1575
+ stack?: string;
1576
+ cause?: unknown;
1577
+ };
1578
+ "new"(inner: {
1579
+ message: string;
1580
+ }): {
1581
+ readonly tag: ContractError_Tags.Wallet;
1582
+ readonly inner: Readonly<{
1583
+ message: string;
1584
+ }>;
1585
+ /**
1586
+ * @private
1587
+ * This field is private and should not be used, use `tag` instead.
1588
+ */
1589
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1590
+ name: string;
1591
+ message: string;
1592
+ stack?: string;
1593
+ cause?: unknown;
1594
+ };
1595
+ instanceOf(obj: any): obj is {
1596
+ readonly tag: ContractError_Tags.Wallet;
1597
+ readonly inner: Readonly<{
1598
+ message: string;
1599
+ }>;
1600
+ /**
1601
+ * @private
1602
+ * This field is private and should not be used, use `tag` instead.
1603
+ */
1604
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1605
+ name: string;
1606
+ message: string;
1607
+ stack?: string;
1608
+ cause?: unknown;
1609
+ };
1610
+ hasInner(obj: any): obj is {
1611
+ readonly tag: ContractError_Tags.Wallet;
1612
+ readonly inner: Readonly<{
1613
+ message: string;
1614
+ }>;
1615
+ /**
1616
+ * @private
1617
+ * This field is private and should not be used, use `tag` instead.
1618
+ */
1619
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1620
+ name: string;
1621
+ message: string;
1622
+ stack?: string;
1623
+ cause?: unknown;
1624
+ };
1625
+ getInner(obj: {
1626
+ readonly tag: ContractError_Tags.Wallet;
1627
+ readonly inner: Readonly<{
1628
+ message: string;
1629
+ }>;
1630
+ /**
1631
+ * @private
1632
+ * This field is private and should not be used, use `tag` instead.
1633
+ */
1634
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1635
+ name: string;
1636
+ message: string;
1637
+ stack?: string;
1638
+ cause?: unknown;
1639
+ }): Readonly<{
1640
+ message: string;
1641
+ }>;
1642
+ isError(error: unknown): error is Error;
1643
+ };
1644
+ Bip32: {
1645
+ new (inner: {
1646
+ message: string;
1647
+ }): {
1648
+ readonly tag: ContractError_Tags.Bip32;
1649
+ readonly inner: Readonly<{
1650
+ message: string;
1651
+ }>;
1652
+ /**
1653
+ * @private
1654
+ * This field is private and should not be used, use `tag` instead.
1655
+ */
1656
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1657
+ name: string;
1658
+ message: string;
1659
+ stack?: string;
1660
+ cause?: unknown;
1661
+ };
1662
+ "new"(inner: {
1663
+ message: string;
1664
+ }): {
1665
+ readonly tag: ContractError_Tags.Bip32;
1666
+ readonly inner: Readonly<{
1667
+ message: string;
1668
+ }>;
1669
+ /**
1670
+ * @private
1671
+ * This field is private and should not be used, use `tag` instead.
1672
+ */
1673
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1674
+ name: string;
1675
+ message: string;
1676
+ stack?: string;
1677
+ cause?: unknown;
1678
+ };
1679
+ instanceOf(obj: any): obj is {
1680
+ readonly tag: ContractError_Tags.Bip32;
1681
+ readonly inner: Readonly<{
1682
+ message: string;
1683
+ }>;
1684
+ /**
1685
+ * @private
1686
+ * This field is private and should not be used, use `tag` instead.
1687
+ */
1688
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1689
+ name: string;
1690
+ message: string;
1691
+ stack?: string;
1692
+ cause?: unknown;
1693
+ };
1694
+ hasInner(obj: any): obj is {
1695
+ readonly tag: ContractError_Tags.Bip32;
1696
+ readonly inner: Readonly<{
1697
+ message: string;
1698
+ }>;
1699
+ /**
1700
+ * @private
1701
+ * This field is private and should not be used, use `tag` instead.
1702
+ */
1703
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1704
+ name: string;
1705
+ message: string;
1706
+ stack?: string;
1707
+ cause?: unknown;
1708
+ };
1709
+ getInner(obj: {
1710
+ readonly tag: ContractError_Tags.Bip32;
1711
+ readonly inner: Readonly<{
1712
+ message: string;
1713
+ }>;
1714
+ /**
1715
+ * @private
1716
+ * This field is private and should not be used, use `tag` instead.
1717
+ */
1718
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1719
+ name: string;
1720
+ message: string;
1721
+ stack?: string;
1722
+ cause?: unknown;
1723
+ }): Readonly<{
1724
+ message: string;
1725
+ }>;
1726
+ isError(error: unknown): error is Error;
1727
+ };
1728
+ Dlc: {
1729
+ new (inner: {
1730
+ message: string;
1731
+ }): {
1732
+ readonly tag: ContractError_Tags.Dlc;
1733
+ readonly inner: Readonly<{
1734
+ message: string;
1735
+ }>;
1736
+ /**
1737
+ * @private
1738
+ * This field is private and should not be used, use `tag` instead.
1739
+ */
1740
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1741
+ name: string;
1742
+ message: string;
1743
+ stack?: string;
1744
+ cause?: unknown;
1745
+ };
1746
+ "new"(inner: {
1747
+ message: string;
1748
+ }): {
1749
+ readonly tag: ContractError_Tags.Dlc;
1750
+ readonly inner: Readonly<{
1751
+ message: string;
1752
+ }>;
1753
+ /**
1754
+ * @private
1755
+ * This field is private and should not be used, use `tag` instead.
1756
+ */
1757
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1758
+ name: string;
1759
+ message: string;
1760
+ stack?: string;
1761
+ cause?: unknown;
1762
+ };
1763
+ instanceOf(obj: any): obj is {
1764
+ readonly tag: ContractError_Tags.Dlc;
1765
+ readonly inner: Readonly<{
1766
+ message: string;
1767
+ }>;
1768
+ /**
1769
+ * @private
1770
+ * This field is private and should not be used, use `tag` instead.
1771
+ */
1772
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1773
+ name: string;
1774
+ message: string;
1775
+ stack?: string;
1776
+ cause?: unknown;
1777
+ };
1778
+ hasInner(obj: any): obj is {
1779
+ readonly tag: ContractError_Tags.Dlc;
1780
+ readonly inner: Readonly<{
1781
+ message: string;
1782
+ }>;
1783
+ /**
1784
+ * @private
1785
+ * This field is private and should not be used, use `tag` instead.
1786
+ */
1787
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1788
+ name: string;
1789
+ message: string;
1790
+ stack?: string;
1791
+ cause?: unknown;
1792
+ };
1793
+ getInner(obj: {
1794
+ readonly tag: ContractError_Tags.Dlc;
1795
+ readonly inner: Readonly<{
1796
+ message: string;
1797
+ }>;
1798
+ /**
1799
+ * @private
1800
+ * This field is private and should not be used, use `tag` instead.
1801
+ */
1802
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1803
+ name: string;
1804
+ message: string;
1805
+ stack?: string;
1806
+ cause?: unknown;
1807
+ }): Readonly<{
1808
+ message: string;
1809
+ }>;
1810
+ isError(error: unknown): error is Error;
1811
+ };
1812
+ Key: {
1813
+ new (inner: {
1814
+ message: string;
1815
+ }): {
1816
+ readonly tag: ContractError_Tags.Key;
1817
+ readonly inner: Readonly<{
1818
+ message: string;
1819
+ }>;
1820
+ /**
1821
+ * @private
1822
+ * This field is private and should not be used, use `tag` instead.
1823
+ */
1824
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1825
+ name: string;
1826
+ message: string;
1827
+ stack?: string;
1828
+ cause?: unknown;
1829
+ };
1830
+ "new"(inner: {
1831
+ message: string;
1832
+ }): {
1833
+ readonly tag: ContractError_Tags.Key;
1834
+ readonly inner: Readonly<{
1835
+ message: string;
1836
+ }>;
1837
+ /**
1838
+ * @private
1839
+ * This field is private and should not be used, use `tag` instead.
1840
+ */
1841
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1842
+ name: string;
1843
+ message: string;
1844
+ stack?: string;
1845
+ cause?: unknown;
1846
+ };
1847
+ instanceOf(obj: any): obj is {
1848
+ readonly tag: ContractError_Tags.Key;
1849
+ readonly inner: Readonly<{
1850
+ message: string;
1851
+ }>;
1852
+ /**
1853
+ * @private
1854
+ * This field is private and should not be used, use `tag` instead.
1855
+ */
1856
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1857
+ name: string;
1858
+ message: string;
1859
+ stack?: string;
1860
+ cause?: unknown;
1861
+ };
1862
+ hasInner(obj: any): obj is {
1863
+ readonly tag: ContractError_Tags.Key;
1864
+ readonly inner: Readonly<{
1865
+ message: string;
1866
+ }>;
1867
+ /**
1868
+ * @private
1869
+ * This field is private and should not be used, use `tag` instead.
1870
+ */
1871
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1872
+ name: string;
1873
+ message: string;
1874
+ stack?: string;
1875
+ cause?: unknown;
1876
+ };
1877
+ getInner(obj: {
1878
+ readonly tag: ContractError_Tags.Key;
1879
+ readonly inner: Readonly<{
1880
+ message: string;
1881
+ }>;
1882
+ /**
1883
+ * @private
1884
+ * This field is private and should not be used, use `tag` instead.
1885
+ */
1886
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1887
+ name: string;
1888
+ message: string;
1889
+ stack?: string;
1890
+ cause?: unknown;
1891
+ }): Readonly<{
1892
+ message: string;
1893
+ }>;
1894
+ isError(error: unknown): error is Error;
1895
+ };
1896
+ Serialization: {
1897
+ new (inner: {
1898
+ message: string;
1899
+ }): {
1900
+ readonly tag: ContractError_Tags.Serialization;
1901
+ readonly inner: Readonly<{
1902
+ message: string;
1903
+ }>;
1904
+ /**
1905
+ * @private
1906
+ * This field is private and should not be used, use `tag` instead.
1907
+ */
1908
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1909
+ name: string;
1910
+ message: string;
1911
+ stack?: string;
1912
+ cause?: unknown;
1913
+ };
1914
+ "new"(inner: {
1915
+ message: string;
1916
+ }): {
1917
+ readonly tag: ContractError_Tags.Serialization;
1918
+ readonly inner: Readonly<{
1919
+ message: string;
1920
+ }>;
1921
+ /**
1922
+ * @private
1923
+ * This field is private and should not be used, use `tag` instead.
1924
+ */
1925
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1926
+ name: string;
1927
+ message: string;
1928
+ stack?: string;
1929
+ cause?: unknown;
1930
+ };
1931
+ instanceOf(obj: any): obj is {
1932
+ readonly tag: ContractError_Tags.Serialization;
1933
+ readonly inner: Readonly<{
1934
+ message: string;
1935
+ }>;
1936
+ /**
1937
+ * @private
1938
+ * This field is private and should not be used, use `tag` instead.
1939
+ */
1940
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1941
+ name: string;
1942
+ message: string;
1943
+ stack?: string;
1944
+ cause?: unknown;
1945
+ };
1946
+ hasInner(obj: any): obj is {
1947
+ readonly tag: ContractError_Tags.Serialization;
1948
+ readonly inner: Readonly<{
1949
+ message: string;
1950
+ }>;
1951
+ /**
1952
+ * @private
1953
+ * This field is private and should not be used, use `tag` instead.
1954
+ */
1955
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1956
+ name: string;
1957
+ message: string;
1958
+ stack?: string;
1959
+ cause?: unknown;
1960
+ };
1961
+ getInner(obj: {
1962
+ readonly tag: ContractError_Tags.Serialization;
1963
+ readonly inner: Readonly<{
1964
+ message: string;
1965
+ }>;
1966
+ /**
1967
+ * @private
1968
+ * This field is private and should not be used, use `tag` instead.
1969
+ */
1970
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1971
+ name: string;
1972
+ message: string;
1973
+ stack?: string;
1974
+ cause?: unknown;
1975
+ }): Readonly<{
1976
+ message: string;
1977
+ }>;
1978
+ isError(error: unknown): error is Error;
1979
+ };
1980
+ InvalidNetwork: {
1981
+ new (inner: {
1982
+ message: string;
1983
+ }): {
1984
+ readonly tag: ContractError_Tags.InvalidNetwork;
1985
+ readonly inner: Readonly<{
1986
+ message: string;
1987
+ }>;
1988
+ /**
1989
+ * @private
1990
+ * This field is private and should not be used, use `tag` instead.
1991
+ */
1992
+ readonly [uniffiTypeNameSymbol]: "ContractError";
1993
+ name: string;
1994
+ message: string;
1995
+ stack?: string;
1996
+ cause?: unknown;
1997
+ };
1998
+ "new"(inner: {
1999
+ message: string;
2000
+ }): {
2001
+ readonly tag: ContractError_Tags.InvalidNetwork;
2002
+ readonly inner: Readonly<{
2003
+ message: string;
2004
+ }>;
2005
+ /**
2006
+ * @private
2007
+ * This field is private and should not be used, use `tag` instead.
2008
+ */
2009
+ readonly [uniffiTypeNameSymbol]: "ContractError";
2010
+ name: string;
2011
+ message: string;
2012
+ stack?: string;
2013
+ cause?: unknown;
2014
+ };
2015
+ instanceOf(obj: any): obj is {
2016
+ readonly tag: ContractError_Tags.InvalidNetwork;
2017
+ readonly inner: Readonly<{
2018
+ message: string;
2019
+ }>;
2020
+ /**
2021
+ * @private
2022
+ * This field is private and should not be used, use `tag` instead.
2023
+ */
2024
+ readonly [uniffiTypeNameSymbol]: "ContractError";
2025
+ name: string;
2026
+ message: string;
2027
+ stack?: string;
2028
+ cause?: unknown;
2029
+ };
2030
+ hasInner(obj: any): obj is {
2031
+ readonly tag: ContractError_Tags.InvalidNetwork;
2032
+ readonly inner: Readonly<{
2033
+ message: string;
2034
+ }>;
2035
+ /**
2036
+ * @private
2037
+ * This field is private and should not be used, use `tag` instead.
2038
+ */
2039
+ readonly [uniffiTypeNameSymbol]: "ContractError";
2040
+ name: string;
2041
+ message: string;
2042
+ stack?: string;
2043
+ cause?: unknown;
2044
+ };
2045
+ getInner(obj: {
2046
+ readonly tag: ContractError_Tags.InvalidNetwork;
2047
+ readonly inner: Readonly<{
2048
+ message: string;
2049
+ }>;
2050
+ /**
2051
+ * @private
2052
+ * This field is private and should not be used, use `tag` instead.
2053
+ */
2054
+ readonly [uniffiTypeNameSymbol]: "ContractError";
2055
+ name: string;
2056
+ message: string;
2057
+ stack?: string;
2058
+ cause?: unknown;
2059
+ }): Readonly<{
2060
+ message: string;
2061
+ }>;
2062
+ isError(error: unknown): error is Error;
2063
+ };
2064
+ InvalidLength: {
2065
+ new (inner: {
2066
+ field: string;
2067
+ expected: number;
2068
+ actual: number;
2069
+ }): {
2070
+ readonly tag: ContractError_Tags.InvalidLength;
2071
+ readonly inner: Readonly<{
2072
+ field: string;
2073
+ expected: number;
2074
+ actual: number;
2075
+ }>;
2076
+ /**
2077
+ * @private
2078
+ * This field is private and should not be used, use `tag` instead.
2079
+ */
2080
+ readonly [uniffiTypeNameSymbol]: "ContractError";
2081
+ name: string;
2082
+ message: string;
2083
+ stack?: string;
2084
+ cause?: unknown;
2085
+ };
2086
+ "new"(inner: {
2087
+ field: string;
2088
+ expected: number;
2089
+ actual: number;
2090
+ }): {
2091
+ readonly tag: ContractError_Tags.InvalidLength;
2092
+ readonly inner: Readonly<{
2093
+ field: string;
2094
+ expected: number;
2095
+ actual: number;
2096
+ }>;
2097
+ /**
2098
+ * @private
2099
+ * This field is private and should not be used, use `tag` instead.
2100
+ */
2101
+ readonly [uniffiTypeNameSymbol]: "ContractError";
2102
+ name: string;
2103
+ message: string;
2104
+ stack?: string;
2105
+ cause?: unknown;
2106
+ };
2107
+ instanceOf(obj: any): obj is {
2108
+ readonly tag: ContractError_Tags.InvalidLength;
2109
+ readonly inner: Readonly<{
2110
+ field: string;
2111
+ expected: number;
2112
+ actual: number;
2113
+ }>;
2114
+ /**
2115
+ * @private
2116
+ * This field is private and should not be used, use `tag` instead.
2117
+ */
2118
+ readonly [uniffiTypeNameSymbol]: "ContractError";
2119
+ name: string;
2120
+ message: string;
2121
+ stack?: string;
2122
+ cause?: unknown;
2123
+ };
2124
+ hasInner(obj: any): obj is {
2125
+ readonly tag: ContractError_Tags.InvalidLength;
2126
+ readonly inner: Readonly<{
2127
+ field: string;
2128
+ expected: number;
2129
+ actual: number;
2130
+ }>;
2131
+ /**
2132
+ * @private
2133
+ * This field is private and should not be used, use `tag` instead.
2134
+ */
2135
+ readonly [uniffiTypeNameSymbol]: "ContractError";
2136
+ name: string;
2137
+ message: string;
2138
+ stack?: string;
2139
+ cause?: unknown;
2140
+ };
2141
+ getInner(obj: {
2142
+ readonly tag: ContractError_Tags.InvalidLength;
2143
+ readonly inner: Readonly<{
2144
+ field: string;
2145
+ expected: number;
2146
+ actual: number;
2147
+ }>;
2148
+ /**
2149
+ * @private
2150
+ * This field is private and should not be used, use `tag` instead.
2151
+ */
2152
+ readonly [uniffiTypeNameSymbol]: "ContractError";
2153
+ name: string;
2154
+ message: string;
2155
+ stack?: string;
2156
+ cause?: unknown;
2157
+ }): Readonly<{
2158
+ field: string;
2159
+ expected: number;
2160
+ actual: number;
2161
+ }>;
2162
+ isError(error: unknown): error is Error;
2163
+ };
315
2164
  }>;
316
- export type TxOutput = {
317
- value: bigint;
318
- scriptPubkey: Array</*u8*/ number>;
319
- };
320
2165
  /**
321
- * Generated factory for {@link TxOutput} record objects.
2166
+ * Errors returned by the stateless contract API.
2167
+ *
2168
+ * Mirrors [`ddk::contract::ContractError`] as a uniffi error so the typed
2169
+ * variants survive across the binding boundary. Variants carry plain strings.
322
2170
  */
323
- export declare const TxOutput: Readonly<{
324
- /**
325
- * Create a frozen instance of {@link TxOutput}, with defaults specified
326
- * in Rust, in the {@link ddk_ffi} crate.
327
- */
328
- create: (partial: Partial<TxOutput> & Required<Omit<TxOutput, never>>) => TxOutput;
329
- /**
330
- * Create a frozen instance of {@link TxOutput}, with defaults specified
331
- * in Rust, in the {@link ddk_ffi} crate.
332
- */
333
- new: (partial: Partial<TxOutput> & Required<Omit<TxOutput, never>>) => TxOutput;
334
- /**
335
- * Defaults specified in the {@link ddk_ffi} crate.
336
- */
337
- defaults: () => Partial<TxOutput>;
338
- }>;
2171
+ export type ContractError = InstanceType<(typeof ContractError)['InvalidOffer' | 'InvalidAccept' | 'InvalidSign' | 'InvalidFundingInput' | 'PsbtMismatch' | 'MissingFinalizedInput' | 'UnsupportedScriptType' | 'InvalidAttestation' | 'NoMatchingOutcome' | 'Descriptor' | 'Wallet' | 'Bip32' | 'Dlc' | 'Key' | 'Serialization' | 'InvalidNetwork' | 'InvalidLength']>;
2172
+ export declare enum ExtendedKey {
2173
+ InvalidMnemonic = 0,
2174
+ InvalidXpriv = 1,
2175
+ InvalidXpub = 2,
2176
+ InvalidDerivationPath = 3
2177
+ }
339
2178
  export declare enum DlcError_Tags {
340
2179
  InvalidSignature = "InvalidSignature",
341
2180
  InvalidPublicKey = "InvalidPublicKey",
@@ -348,37 +2187,52 @@ export declare enum DlcError_Tags {
348
2187
  InvalidNetwork = "InvalidNetwork",
349
2188
  KeyError = "KeyError"
350
2189
  }
351
- export declare const DlcError: {
2190
+ export declare const DlcError: Readonly<{
2191
+ instanceOf: (obj: any) => obj is DlcError;
352
2192
  InvalidSignature: {
353
- new (message: string): {
2193
+ new (): {
354
2194
  readonly tag: DlcError_Tags.InvalidSignature;
355
2195
  /**
356
2196
  * @private
357
- * This field is private and should not be used.
2197
+ * This field is private and should not be used, use `tag` instead.
358
2198
  */
359
- readonly [uniffiTypeNameSymbol]: string;
2199
+ readonly [uniffiTypeNameSymbol]: "DlcError";
2200
+ name: string;
2201
+ message: string;
2202
+ stack?: string;
2203
+ cause?: unknown;
2204
+ };
2205
+ "new"(): {
2206
+ readonly tag: DlcError_Tags.InvalidSignature;
360
2207
  /**
361
2208
  * @private
362
- * This field is private and should not be used.
2209
+ * This field is private and should not be used, use `tag` instead.
363
2210
  */
364
- readonly [variantOrdinalSymbol]: 1;
2211
+ readonly [uniffiTypeNameSymbol]: "DlcError";
365
2212
  name: string;
366
2213
  message: string;
367
2214
  stack?: string;
368
2215
  cause?: unknown;
369
2216
  };
370
- instanceOf(e: any): e is {
2217
+ instanceOf(obj: any): obj is {
371
2218
  readonly tag: DlcError_Tags.InvalidSignature;
372
2219
  /**
373
2220
  * @private
374
- * This field is private and should not be used.
2221
+ * This field is private and should not be used, use `tag` instead.
375
2222
  */
376
- readonly [uniffiTypeNameSymbol]: string;
2223
+ readonly [uniffiTypeNameSymbol]: "DlcError";
2224
+ name: string;
2225
+ message: string;
2226
+ stack?: string;
2227
+ cause?: unknown;
2228
+ };
2229
+ hasInner(obj: any): obj is {
2230
+ readonly tag: DlcError_Tags.InvalidSignature;
377
2231
  /**
378
2232
  * @private
379
- * This field is private and should not be used.
2233
+ * This field is private and should not be used, use `tag` instead.
380
2234
  */
381
- readonly [variantOrdinalSymbol]: 1;
2235
+ readonly [uniffiTypeNameSymbol]: "DlcError";
382
2236
  name: string;
383
2237
  message: string;
384
2238
  stack?: string;
@@ -387,35 +2241,49 @@ export declare const DlcError: {
387
2241
  isError(error: unknown): error is Error;
388
2242
  };
389
2243
  InvalidPublicKey: {
390
- new (message: string): {
2244
+ new (): {
391
2245
  readonly tag: DlcError_Tags.InvalidPublicKey;
392
2246
  /**
393
2247
  * @private
394
- * This field is private and should not be used.
2248
+ * This field is private and should not be used, use `tag` instead.
395
2249
  */
396
- readonly [uniffiTypeNameSymbol]: string;
2250
+ readonly [uniffiTypeNameSymbol]: "DlcError";
2251
+ name: string;
2252
+ message: string;
2253
+ stack?: string;
2254
+ cause?: unknown;
2255
+ };
2256
+ "new"(): {
2257
+ readonly tag: DlcError_Tags.InvalidPublicKey;
397
2258
  /**
398
2259
  * @private
399
- * This field is private and should not be used.
2260
+ * This field is private and should not be used, use `tag` instead.
400
2261
  */
401
- readonly [variantOrdinalSymbol]: 2;
2262
+ readonly [uniffiTypeNameSymbol]: "DlcError";
402
2263
  name: string;
403
2264
  message: string;
404
2265
  stack?: string;
405
2266
  cause?: unknown;
406
2267
  };
407
- instanceOf(e: any): e is {
2268
+ instanceOf(obj: any): obj is {
408
2269
  readonly tag: DlcError_Tags.InvalidPublicKey;
409
2270
  /**
410
2271
  * @private
411
- * This field is private and should not be used.
2272
+ * This field is private and should not be used, use `tag` instead.
412
2273
  */
413
- readonly [uniffiTypeNameSymbol]: string;
2274
+ readonly [uniffiTypeNameSymbol]: "DlcError";
2275
+ name: string;
2276
+ message: string;
2277
+ stack?: string;
2278
+ cause?: unknown;
2279
+ };
2280
+ hasInner(obj: any): obj is {
2281
+ readonly tag: DlcError_Tags.InvalidPublicKey;
414
2282
  /**
415
2283
  * @private
416
- * This field is private and should not be used.
2284
+ * This field is private and should not be used, use `tag` instead.
417
2285
  */
418
- readonly [variantOrdinalSymbol]: 2;
2286
+ readonly [uniffiTypeNameSymbol]: "DlcError";
419
2287
  name: string;
420
2288
  message: string;
421
2289
  stack?: string;
@@ -424,35 +2292,49 @@ export declare const DlcError: {
424
2292
  isError(error: unknown): error is Error;
425
2293
  };
426
2294
  InvalidTransaction: {
427
- new (message: string): {
2295
+ new (): {
428
2296
  readonly tag: DlcError_Tags.InvalidTransaction;
429
2297
  /**
430
2298
  * @private
431
- * This field is private and should not be used.
2299
+ * This field is private and should not be used, use `tag` instead.
432
2300
  */
433
- readonly [uniffiTypeNameSymbol]: string;
2301
+ readonly [uniffiTypeNameSymbol]: "DlcError";
2302
+ name: string;
2303
+ message: string;
2304
+ stack?: string;
2305
+ cause?: unknown;
2306
+ };
2307
+ "new"(): {
2308
+ readonly tag: DlcError_Tags.InvalidTransaction;
434
2309
  /**
435
2310
  * @private
436
- * This field is private and should not be used.
2311
+ * This field is private and should not be used, use `tag` instead.
437
2312
  */
438
- readonly [variantOrdinalSymbol]: 3;
2313
+ readonly [uniffiTypeNameSymbol]: "DlcError";
439
2314
  name: string;
440
2315
  message: string;
441
2316
  stack?: string;
442
2317
  cause?: unknown;
443
2318
  };
444
- instanceOf(e: any): e is {
2319
+ instanceOf(obj: any): obj is {
445
2320
  readonly tag: DlcError_Tags.InvalidTransaction;
446
2321
  /**
447
2322
  * @private
448
- * This field is private and should not be used.
2323
+ * This field is private and should not be used, use `tag` instead.
449
2324
  */
450
- readonly [uniffiTypeNameSymbol]: string;
2325
+ readonly [uniffiTypeNameSymbol]: "DlcError";
2326
+ name: string;
2327
+ message: string;
2328
+ stack?: string;
2329
+ cause?: unknown;
2330
+ };
2331
+ hasInner(obj: any): obj is {
2332
+ readonly tag: DlcError_Tags.InvalidTransaction;
451
2333
  /**
452
2334
  * @private
453
- * This field is private and should not be used.
2335
+ * This field is private and should not be used, use `tag` instead.
454
2336
  */
455
- readonly [variantOrdinalSymbol]: 3;
2337
+ readonly [uniffiTypeNameSymbol]: "DlcError";
456
2338
  name: string;
457
2339
  message: string;
458
2340
  stack?: string;
@@ -461,35 +2343,49 @@ export declare const DlcError: {
461
2343
  isError(error: unknown): error is Error;
462
2344
  };
463
2345
  InsufficientFunds: {
464
- new (message: string): {
2346
+ new (): {
465
2347
  readonly tag: DlcError_Tags.InsufficientFunds;
466
2348
  /**
467
2349
  * @private
468
- * This field is private and should not be used.
2350
+ * This field is private and should not be used, use `tag` instead.
469
2351
  */
470
- readonly [uniffiTypeNameSymbol]: string;
2352
+ readonly [uniffiTypeNameSymbol]: "DlcError";
2353
+ name: string;
2354
+ message: string;
2355
+ stack?: string;
2356
+ cause?: unknown;
2357
+ };
2358
+ "new"(): {
2359
+ readonly tag: DlcError_Tags.InsufficientFunds;
471
2360
  /**
472
2361
  * @private
473
- * This field is private and should not be used.
2362
+ * This field is private and should not be used, use `tag` instead.
474
2363
  */
475
- readonly [variantOrdinalSymbol]: 4;
2364
+ readonly [uniffiTypeNameSymbol]: "DlcError";
476
2365
  name: string;
477
2366
  message: string;
478
2367
  stack?: string;
479
2368
  cause?: unknown;
480
2369
  };
481
- instanceOf(e: any): e is {
2370
+ instanceOf(obj: any): obj is {
482
2371
  readonly tag: DlcError_Tags.InsufficientFunds;
483
2372
  /**
484
2373
  * @private
485
- * This field is private and should not be used.
2374
+ * This field is private and should not be used, use `tag` instead.
486
2375
  */
487
- readonly [uniffiTypeNameSymbol]: string;
2376
+ readonly [uniffiTypeNameSymbol]: "DlcError";
2377
+ name: string;
2378
+ message: string;
2379
+ stack?: string;
2380
+ cause?: unknown;
2381
+ };
2382
+ hasInner(obj: any): obj is {
2383
+ readonly tag: DlcError_Tags.InsufficientFunds;
488
2384
  /**
489
2385
  * @private
490
- * This field is private and should not be used.
2386
+ * This field is private and should not be used, use `tag` instead.
491
2387
  */
492
- readonly [variantOrdinalSymbol]: 4;
2388
+ readonly [uniffiTypeNameSymbol]: "DlcError";
493
2389
  name: string;
494
2390
  message: string;
495
2391
  stack?: string;
@@ -498,72 +2394,133 @@ export declare const DlcError: {
498
2394
  isError(error: unknown): error is Error;
499
2395
  };
500
2396
  InvalidArgument: {
501
- new (message: string): {
2397
+ new (inner: {
2398
+ message: string;
2399
+ }): {
502
2400
  readonly tag: DlcError_Tags.InvalidArgument;
2401
+ readonly inner: Readonly<{
2402
+ message: string;
2403
+ }>;
503
2404
  /**
504
2405
  * @private
505
- * This field is private and should not be used.
2406
+ * This field is private and should not be used, use `tag` instead.
506
2407
  */
507
- readonly [uniffiTypeNameSymbol]: string;
2408
+ readonly [uniffiTypeNameSymbol]: "DlcError";
2409
+ name: string;
2410
+ message: string;
2411
+ stack?: string;
2412
+ cause?: unknown;
2413
+ };
2414
+ "new"(inner: {
2415
+ message: string;
2416
+ }): {
2417
+ readonly tag: DlcError_Tags.InvalidArgument;
2418
+ readonly inner: Readonly<{
2419
+ message: string;
2420
+ }>;
508
2421
  /**
509
2422
  * @private
510
- * This field is private and should not be used.
2423
+ * This field is private and should not be used, use `tag` instead.
511
2424
  */
512
- readonly [variantOrdinalSymbol]: 5;
2425
+ readonly [uniffiTypeNameSymbol]: "DlcError";
513
2426
  name: string;
514
2427
  message: string;
515
2428
  stack?: string;
516
2429
  cause?: unknown;
517
2430
  };
518
- instanceOf(e: any): e is {
2431
+ instanceOf(obj: any): obj is {
519
2432
  readonly tag: DlcError_Tags.InvalidArgument;
2433
+ readonly inner: Readonly<{
2434
+ message: string;
2435
+ }>;
520
2436
  /**
521
2437
  * @private
522
- * This field is private and should not be used.
2438
+ * This field is private and should not be used, use `tag` instead.
523
2439
  */
524
- readonly [uniffiTypeNameSymbol]: string;
2440
+ readonly [uniffiTypeNameSymbol]: "DlcError";
2441
+ name: string;
2442
+ message: string;
2443
+ stack?: string;
2444
+ cause?: unknown;
2445
+ };
2446
+ hasInner(obj: any): obj is {
2447
+ readonly tag: DlcError_Tags.InvalidArgument;
2448
+ readonly inner: Readonly<{
2449
+ message: string;
2450
+ }>;
525
2451
  /**
526
2452
  * @private
527
- * This field is private and should not be used.
2453
+ * This field is private and should not be used, use `tag` instead.
528
2454
  */
529
- readonly [variantOrdinalSymbol]: 5;
2455
+ readonly [uniffiTypeNameSymbol]: "DlcError";
530
2456
  name: string;
531
2457
  message: string;
532
2458
  stack?: string;
533
2459
  cause?: unknown;
534
2460
  };
2461
+ getInner(obj: {
2462
+ readonly tag: DlcError_Tags.InvalidArgument;
2463
+ readonly inner: Readonly<{
2464
+ message: string;
2465
+ }>;
2466
+ /**
2467
+ * @private
2468
+ * This field is private and should not be used, use `tag` instead.
2469
+ */
2470
+ readonly [uniffiTypeNameSymbol]: "DlcError";
2471
+ name: string;
2472
+ message: string;
2473
+ stack?: string;
2474
+ cause?: unknown;
2475
+ }): Readonly<{
2476
+ message: string;
2477
+ }>;
535
2478
  isError(error: unknown): error is Error;
536
2479
  };
537
2480
  SerializationError: {
538
- new (message: string): {
2481
+ new (): {
539
2482
  readonly tag: DlcError_Tags.SerializationError;
540
2483
  /**
541
2484
  * @private
542
- * This field is private and should not be used.
2485
+ * This field is private and should not be used, use `tag` instead.
543
2486
  */
544
- readonly [uniffiTypeNameSymbol]: string;
2487
+ readonly [uniffiTypeNameSymbol]: "DlcError";
2488
+ name: string;
2489
+ message: string;
2490
+ stack?: string;
2491
+ cause?: unknown;
2492
+ };
2493
+ "new"(): {
2494
+ readonly tag: DlcError_Tags.SerializationError;
545
2495
  /**
546
2496
  * @private
547
- * This field is private and should not be used.
2497
+ * This field is private and should not be used, use `tag` instead.
548
2498
  */
549
- readonly [variantOrdinalSymbol]: 6;
2499
+ readonly [uniffiTypeNameSymbol]: "DlcError";
550
2500
  name: string;
551
2501
  message: string;
552
2502
  stack?: string;
553
2503
  cause?: unknown;
554
2504
  };
555
- instanceOf(e: any): e is {
2505
+ instanceOf(obj: any): obj is {
556
2506
  readonly tag: DlcError_Tags.SerializationError;
557
2507
  /**
558
2508
  * @private
559
- * This field is private and should not be used.
2509
+ * This field is private and should not be used, use `tag` instead.
560
2510
  */
561
- readonly [uniffiTypeNameSymbol]: string;
2511
+ readonly [uniffiTypeNameSymbol]: "DlcError";
2512
+ name: string;
2513
+ message: string;
2514
+ stack?: string;
2515
+ cause?: unknown;
2516
+ };
2517
+ hasInner(obj: any): obj is {
2518
+ readonly tag: DlcError_Tags.SerializationError;
562
2519
  /**
563
2520
  * @private
564
- * This field is private and should not be used.
2521
+ * This field is private and should not be used, use `tag` instead.
565
2522
  */
566
- readonly [variantOrdinalSymbol]: 6;
2523
+ readonly [uniffiTypeNameSymbol]: "DlcError";
567
2524
  name: string;
568
2525
  message: string;
569
2526
  stack?: string;
@@ -572,146 +2529,133 @@ export declare const DlcError: {
572
2529
  isError(error: unknown): error is Error;
573
2530
  };
574
2531
  Secp256k1Error: {
575
- new (message: string): {
2532
+ new (inner: {
2533
+ message: string;
2534
+ }): {
576
2535
  readonly tag: DlcError_Tags.Secp256k1Error;
2536
+ readonly inner: Readonly<{
2537
+ message: string;
2538
+ }>;
577
2539
  /**
578
2540
  * @private
579
- * This field is private and should not be used.
580
- */
581
- readonly [uniffiTypeNameSymbol]: string;
582
- /**
583
- * @private
584
- * This field is private and should not be used.
2541
+ * This field is private and should not be used, use `tag` instead.
585
2542
  */
586
- readonly [variantOrdinalSymbol]: 7;
2543
+ readonly [uniffiTypeNameSymbol]: "DlcError";
587
2544
  name: string;
588
2545
  message: string;
589
2546
  stack?: string;
590
2547
  cause?: unknown;
591
2548
  };
592
- instanceOf(e: any): e is {
2549
+ "new"(inner: {
2550
+ message: string;
2551
+ }): {
593
2552
  readonly tag: DlcError_Tags.Secp256k1Error;
2553
+ readonly inner: Readonly<{
2554
+ message: string;
2555
+ }>;
594
2556
  /**
595
2557
  * @private
596
- * This field is private and should not be used.
597
- */
598
- readonly [uniffiTypeNameSymbol]: string;
599
- /**
600
- * @private
601
- * This field is private and should not be used.
2558
+ * This field is private and should not be used, use `tag` instead.
602
2559
  */
603
- readonly [variantOrdinalSymbol]: 7;
2560
+ readonly [uniffiTypeNameSymbol]: "DlcError";
604
2561
  name: string;
605
2562
  message: string;
606
2563
  stack?: string;
607
2564
  cause?: unknown;
608
2565
  };
609
- isError(error: unknown): error is Error;
610
- };
611
- MiniscriptError: {
612
- new (message: string): {
613
- readonly tag: DlcError_Tags.MiniscriptError;
614
- /**
615
- * @private
616
- * This field is private and should not be used.
617
- */
618
- readonly [uniffiTypeNameSymbol]: string;
2566
+ instanceOf(obj: any): obj is {
2567
+ readonly tag: DlcError_Tags.Secp256k1Error;
2568
+ readonly inner: Readonly<{
2569
+ message: string;
2570
+ }>;
619
2571
  /**
620
2572
  * @private
621
- * This field is private and should not be used.
2573
+ * This field is private and should not be used, use `tag` instead.
622
2574
  */
623
- readonly [variantOrdinalSymbol]: 8;
2575
+ readonly [uniffiTypeNameSymbol]: "DlcError";
624
2576
  name: string;
625
2577
  message: string;
626
2578
  stack?: string;
627
2579
  cause?: unknown;
628
2580
  };
629
- instanceOf(e: any): e is {
630
- readonly tag: DlcError_Tags.MiniscriptError;
2581
+ hasInner(obj: any): obj is {
2582
+ readonly tag: DlcError_Tags.Secp256k1Error;
2583
+ readonly inner: Readonly<{
2584
+ message: string;
2585
+ }>;
631
2586
  /**
632
2587
  * @private
633
- * This field is private and should not be used.
2588
+ * This field is private and should not be used, use `tag` instead.
634
2589
  */
635
- readonly [uniffiTypeNameSymbol]: string;
2590
+ readonly [uniffiTypeNameSymbol]: "DlcError";
2591
+ name: string;
2592
+ message: string;
2593
+ stack?: string;
2594
+ cause?: unknown;
2595
+ };
2596
+ getInner(obj: {
2597
+ readonly tag: DlcError_Tags.Secp256k1Error;
2598
+ readonly inner: Readonly<{
2599
+ message: string;
2600
+ }>;
636
2601
  /**
637
2602
  * @private
638
- * This field is private and should not be used.
2603
+ * This field is private and should not be used, use `tag` instead.
639
2604
  */
640
- readonly [variantOrdinalSymbol]: 8;
2605
+ readonly [uniffiTypeNameSymbol]: "DlcError";
641
2606
  name: string;
642
2607
  message: string;
643
2608
  stack?: string;
644
2609
  cause?: unknown;
645
- };
2610
+ }): Readonly<{
2611
+ message: string;
2612
+ }>;
646
2613
  isError(error: unknown): error is Error;
647
2614
  };
648
- InvalidNetwork: {
649
- new (message: string): {
650
- readonly tag: DlcError_Tags.InvalidNetwork;
651
- /**
652
- * @private
653
- * This field is private and should not be used.
654
- */
655
- readonly [uniffiTypeNameSymbol]: string;
2615
+ MiniscriptError: {
2616
+ new (): {
2617
+ readonly tag: DlcError_Tags.MiniscriptError;
656
2618
  /**
657
2619
  * @private
658
- * This field is private and should not be used.
2620
+ * This field is private and should not be used, use `tag` instead.
659
2621
  */
660
- readonly [variantOrdinalSymbol]: 9;
2622
+ readonly [uniffiTypeNameSymbol]: "DlcError";
661
2623
  name: string;
662
2624
  message: string;
663
2625
  stack?: string;
664
2626
  cause?: unknown;
665
2627
  };
666
- instanceOf(e: any): e is {
667
- readonly tag: DlcError_Tags.InvalidNetwork;
668
- /**
669
- * @private
670
- * This field is private and should not be used.
671
- */
672
- readonly [uniffiTypeNameSymbol]: string;
2628
+ "new"(): {
2629
+ readonly tag: DlcError_Tags.MiniscriptError;
673
2630
  /**
674
2631
  * @private
675
- * This field is private and should not be used.
2632
+ * This field is private and should not be used, use `tag` instead.
676
2633
  */
677
- readonly [variantOrdinalSymbol]: 9;
2634
+ readonly [uniffiTypeNameSymbol]: "DlcError";
678
2635
  name: string;
679
2636
  message: string;
680
2637
  stack?: string;
681
2638
  cause?: unknown;
682
2639
  };
683
- isError(error: unknown): error is Error;
684
- };
685
- KeyError: {
686
- new (message: string): {
687
- readonly tag: DlcError_Tags.KeyError;
688
- /**
689
- * @private
690
- * This field is private and should not be used.
691
- */
692
- readonly [uniffiTypeNameSymbol]: string;
2640
+ instanceOf(obj: any): obj is {
2641
+ readonly tag: DlcError_Tags.MiniscriptError;
693
2642
  /**
694
2643
  * @private
695
- * This field is private and should not be used.
2644
+ * This field is private and should not be used, use `tag` instead.
696
2645
  */
697
- readonly [variantOrdinalSymbol]: 10;
2646
+ readonly [uniffiTypeNameSymbol]: "DlcError";
698
2647
  name: string;
699
2648
  message: string;
700
2649
  stack?: string;
701
2650
  cause?: unknown;
702
2651
  };
703
- instanceOf(e: any): e is {
704
- readonly tag: DlcError_Tags.KeyError;
705
- /**
706
- * @private
707
- * This field is private and should not be used.
708
- */
709
- readonly [uniffiTypeNameSymbol]: string;
2652
+ hasInner(obj: any): obj is {
2653
+ readonly tag: DlcError_Tags.MiniscriptError;
710
2654
  /**
711
2655
  * @private
712
- * This field is private and should not be used.
2656
+ * This field is private and should not be used, use `tag` instead.
713
2657
  */
714
- readonly [variantOrdinalSymbol]: 10;
2658
+ readonly [uniffiTypeNameSymbol]: "DlcError";
715
2659
  name: string;
716
2660
  message: string;
717
2661
  stack?: string;
@@ -719,83 +2663,50 @@ export declare const DlcError: {
719
2663
  };
720
2664
  isError(error: unknown): error is Error;
721
2665
  };
722
- instanceOf: (e: any) => e is DlcError;
723
- };
724
- export type DlcError = InstanceType<typeof DlcError[keyof Omit<typeof DlcError, 'instanceOf'>]>;
725
- export declare enum ExtendedKey_Tags {
726
- InvalidMnemonic = "InvalidMnemonic",
727
- InvalidXpriv = "InvalidXpriv",
728
- InvalidXpub = "InvalidXpub",
729
- InvalidDerivationPath = "InvalidDerivationPath"
730
- }
731
- export declare const ExtendedKey: {
732
- InvalidMnemonic: {
733
- new (message: string): {
734
- readonly tag: ExtendedKey_Tags.InvalidMnemonic;
735
- /**
736
- * @private
737
- * This field is private and should not be used.
738
- */
739
- readonly [uniffiTypeNameSymbol]: string;
2666
+ InvalidNetwork: {
2667
+ new (): {
2668
+ readonly tag: DlcError_Tags.InvalidNetwork;
740
2669
  /**
741
2670
  * @private
742
- * This field is private and should not be used.
2671
+ * This field is private and should not be used, use `tag` instead.
743
2672
  */
744
- readonly [variantOrdinalSymbol]: 1;
2673
+ readonly [uniffiTypeNameSymbol]: "DlcError";
745
2674
  name: string;
746
2675
  message: string;
747
2676
  stack?: string;
748
2677
  cause?: unknown;
749
2678
  };
750
- instanceOf(e: any): e is {
751
- readonly tag: ExtendedKey_Tags.InvalidMnemonic;
752
- /**
753
- * @private
754
- * This field is private and should not be used.
755
- */
756
- readonly [uniffiTypeNameSymbol]: string;
2679
+ "new"(): {
2680
+ readonly tag: DlcError_Tags.InvalidNetwork;
757
2681
  /**
758
2682
  * @private
759
- * This field is private and should not be used.
2683
+ * This field is private and should not be used, use `tag` instead.
760
2684
  */
761
- readonly [variantOrdinalSymbol]: 1;
2685
+ readonly [uniffiTypeNameSymbol]: "DlcError";
762
2686
  name: string;
763
2687
  message: string;
764
2688
  stack?: string;
765
2689
  cause?: unknown;
766
2690
  };
767
- isError(error: unknown): error is Error;
768
- };
769
- InvalidXpriv: {
770
- new (message: string): {
771
- readonly tag: ExtendedKey_Tags.InvalidXpriv;
772
- /**
773
- * @private
774
- * This field is private and should not be used.
775
- */
776
- readonly [uniffiTypeNameSymbol]: string;
2691
+ instanceOf(obj: any): obj is {
2692
+ readonly tag: DlcError_Tags.InvalidNetwork;
777
2693
  /**
778
2694
  * @private
779
- * This field is private and should not be used.
2695
+ * This field is private and should not be used, use `tag` instead.
780
2696
  */
781
- readonly [variantOrdinalSymbol]: 2;
2697
+ readonly [uniffiTypeNameSymbol]: "DlcError";
782
2698
  name: string;
783
2699
  message: string;
784
2700
  stack?: string;
785
2701
  cause?: unknown;
786
2702
  };
787
- instanceOf(e: any): e is {
788
- readonly tag: ExtendedKey_Tags.InvalidXpriv;
789
- /**
790
- * @private
791
- * This field is private and should not be used.
792
- */
793
- readonly [uniffiTypeNameSymbol]: string;
2703
+ hasInner(obj: any): obj is {
2704
+ readonly tag: DlcError_Tags.InvalidNetwork;
794
2705
  /**
795
2706
  * @private
796
- * This field is private and should not be used.
2707
+ * This field is private and should not be used, use `tag` instead.
797
2708
  */
798
- readonly [variantOrdinalSymbol]: 2;
2709
+ readonly [uniffiTypeNameSymbol]: "DlcError";
799
2710
  name: string;
800
2711
  message: string;
801
2712
  stack?: string;
@@ -803,83 +2714,166 @@ export declare const ExtendedKey: {
803
2714
  };
804
2715
  isError(error: unknown): error is Error;
805
2716
  };
806
- InvalidXpub: {
807
- new (message: string): {
808
- readonly tag: ExtendedKey_Tags.InvalidXpub;
809
- /**
810
- * @private
811
- * This field is private and should not be used.
812
- */
813
- readonly [uniffiTypeNameSymbol]: string;
2717
+ KeyError: {
2718
+ new (inner: {
2719
+ key: ExtendedKey;
2720
+ }): {
2721
+ readonly tag: DlcError_Tags.KeyError;
2722
+ readonly inner: Readonly<{
2723
+ key: ExtendedKey;
2724
+ }>;
814
2725
  /**
815
2726
  * @private
816
- * This field is private and should not be used.
2727
+ * This field is private and should not be used, use `tag` instead.
817
2728
  */
818
- readonly [variantOrdinalSymbol]: 3;
2729
+ readonly [uniffiTypeNameSymbol]: "DlcError";
819
2730
  name: string;
820
2731
  message: string;
821
2732
  stack?: string;
822
2733
  cause?: unknown;
823
2734
  };
824
- instanceOf(e: any): e is {
825
- readonly tag: ExtendedKey_Tags.InvalidXpub;
826
- /**
827
- * @private
828
- * This field is private and should not be used.
829
- */
830
- readonly [uniffiTypeNameSymbol]: string;
2735
+ "new"(inner: {
2736
+ key: ExtendedKey;
2737
+ }): {
2738
+ readonly tag: DlcError_Tags.KeyError;
2739
+ readonly inner: Readonly<{
2740
+ key: ExtendedKey;
2741
+ }>;
831
2742
  /**
832
2743
  * @private
833
- * This field is private and should not be used.
2744
+ * This field is private and should not be used, use `tag` instead.
834
2745
  */
835
- readonly [variantOrdinalSymbol]: 3;
2746
+ readonly [uniffiTypeNameSymbol]: "DlcError";
836
2747
  name: string;
837
2748
  message: string;
838
2749
  stack?: string;
839
2750
  cause?: unknown;
840
2751
  };
841
- isError(error: unknown): error is Error;
842
- };
843
- InvalidDerivationPath: {
844
- new (message: string): {
845
- readonly tag: ExtendedKey_Tags.InvalidDerivationPath;
846
- /**
847
- * @private
848
- * This field is private and should not be used.
849
- */
850
- readonly [uniffiTypeNameSymbol]: string;
2752
+ instanceOf(obj: any): obj is {
2753
+ readonly tag: DlcError_Tags.KeyError;
2754
+ readonly inner: Readonly<{
2755
+ key: ExtendedKey;
2756
+ }>;
851
2757
  /**
852
2758
  * @private
853
- * This field is private and should not be used.
2759
+ * This field is private and should not be used, use `tag` instead.
854
2760
  */
855
- readonly [variantOrdinalSymbol]: 4;
2761
+ readonly [uniffiTypeNameSymbol]: "DlcError";
856
2762
  name: string;
857
2763
  message: string;
858
2764
  stack?: string;
859
2765
  cause?: unknown;
860
2766
  };
861
- instanceOf(e: any): e is {
862
- readonly tag: ExtendedKey_Tags.InvalidDerivationPath;
2767
+ hasInner(obj: any): obj is {
2768
+ readonly tag: DlcError_Tags.KeyError;
2769
+ readonly inner: Readonly<{
2770
+ key: ExtendedKey;
2771
+ }>;
863
2772
  /**
864
2773
  * @private
865
- * This field is private and should not be used.
2774
+ * This field is private and should not be used, use `tag` instead.
866
2775
  */
867
- readonly [uniffiTypeNameSymbol]: string;
2776
+ readonly [uniffiTypeNameSymbol]: "DlcError";
2777
+ name: string;
2778
+ message: string;
2779
+ stack?: string;
2780
+ cause?: unknown;
2781
+ };
2782
+ getInner(obj: {
2783
+ readonly tag: DlcError_Tags.KeyError;
2784
+ readonly inner: Readonly<{
2785
+ key: ExtendedKey;
2786
+ }>;
868
2787
  /**
869
2788
  * @private
870
- * This field is private and should not be used.
2789
+ * This field is private and should not be used, use `tag` instead.
871
2790
  */
872
- readonly [variantOrdinalSymbol]: 4;
2791
+ readonly [uniffiTypeNameSymbol]: "DlcError";
873
2792
  name: string;
874
2793
  message: string;
875
2794
  stack?: string;
876
2795
  cause?: unknown;
877
- };
2796
+ }): Readonly<{
2797
+ key: ExtendedKey;
2798
+ }>;
878
2799
  isError(error: unknown): error is Error;
879
2800
  };
880
- instanceOf: (e: any) => e is ExtendedKey;
881
- };
882
- export type ExtendedKey = InstanceType<typeof ExtendedKey[keyof Omit<typeof ExtendedKey, 'instanceOf'>]>;
2801
+ }>;
2802
+ export type DlcError = InstanceType<(typeof DlcError)['InvalidSignature' | 'InvalidPublicKey' | 'InvalidTransaction' | 'InsufficientFunds' | 'InvalidArgument' | 'SerializationError' | 'Secp256k1Error' | 'MiniscriptError' | 'InvalidNetwork' | 'KeyError']>;
2803
+ /**
2804
+ * Identifies which party's funding inputs an operation applies to.
2805
+ */
2806
+ export declare enum Party {
2807
+ /**
2808
+ * The party that created the offer.
2809
+ */
2810
+ Offer = 0,
2811
+ /**
2812
+ * The party that accepted the offer.
2813
+ */
2814
+ Accept = 1
2815
+ }
2816
+ /**
2817
+ * Deterministically derives DLC contract funding keys from a master extended
2818
+ * private key. Secret keys never leave this object.
2819
+ *
2820
+ * Construct one from whatever key material the consumer holds, then call
2821
+ * [`ContractKeyProvider::funding_pubkey`] to obtain the public key to publish
2822
+ * in an offer/accept message.
2823
+ */
2824
+ export interface ContractKeyProviderLike {
2825
+ /**
2826
+ * The 33-byte compressed funding public key for a contract, from its
2827
+ * 32-byte temporary id. Publish this in the offer or accept message.
2828
+ */
2829
+ fundingPubkey(temporaryContractId: ArrayBuffer): ArrayBuffer;
2830
+ }
2831
+ /**
2832
+ * @deprecated Use `ContractKeyProviderLike` instead.
2833
+ */
2834
+ export type ContractKeyProviderInterface = ContractKeyProviderLike;
2835
+ /**
2836
+ * Deterministically derives DLC contract funding keys from a master extended
2837
+ * private key. Secret keys never leave this object.
2838
+ *
2839
+ * Construct one from whatever key material the consumer holds, then call
2840
+ * [`ContractKeyProvider::funding_pubkey`] to obtain the public key to publish
2841
+ * in an offer/accept message.
2842
+ */
2843
+ export declare class ContractKeyProvider extends UniffiAbstractObject implements ContractKeyProviderLike {
2844
+ readonly [uniffiTypeNameSymbol] = "ContractKeyProvider";
2845
+ readonly [destructorGuardSymbol]: UniffiGcObject;
2846
+ readonly [pointerLiteralSymbol]: UniffiHandle;
2847
+ private constructor();
2848
+ /**
2849
+ * Builds a provider from an output descriptor that carries an extended
2850
+ * private key (e.g. `wpkh(xprv.../84h/1h/0h/0/*)`). Watch-only descriptors
2851
+ * are rejected; the descriptor's own path/wildcard is not applied to
2852
+ * contract-key derivation.
2853
+ */
2854
+ static fromDescriptor(descriptor: string): ContractKeyProviderLike;
2855
+ /**
2856
+ * Builds a provider from a BIP39 mnemonic (with optional passphrase).
2857
+ */
2858
+ static fromMnemonic(mnemonic: string, passphrase: string | undefined, network: string): ContractKeyProviderLike;
2859
+ /**
2860
+ * Builds a provider from a raw seed (for example the 64 bytes produced by
2861
+ * `convert_mnemonic_to_seed`).
2862
+ */
2863
+ static fromSeed(seed: ArrayBuffer, network: string): ContractKeyProviderLike;
2864
+ /**
2865
+ * Builds a provider from a 78-byte encoded master extended private key
2866
+ * (the encoding produced by `create_extkey_from_seed`).
2867
+ */
2868
+ static fromXprv(xprv: ArrayBuffer): ContractKeyProviderLike;
2869
+ /**
2870
+ * The 33-byte compressed funding public key for a contract, from its
2871
+ * 32-byte temporary id. Publish this in the offer or accept message.
2872
+ */
2873
+ fundingPubkey(temporaryContractId: ArrayBuffer): ArrayBuffer;
2874
+ uniffiDestroy(): void;
2875
+ static instanceOf(obj_: any): obj_ is ContractKeyProvider;
2876
+ }
883
2877
  /**
884
2878
  * This should be called before anything else.
885
2879
  *
@@ -894,103 +2888,188 @@ declare function uniffiEnsureInitialized(): void;
894
2888
  declare const _default: Readonly<{
895
2889
  initialize: typeof uniffiEnsureInitialized;
896
2890
  converters: {
2891
+ FfiConverterTypeAcceptOfferParams: {
2892
+ read(from: RustBuffer): AcceptOfferParams;
2893
+ write(value: AcceptOfferParams, into: RustBuffer): void;
2894
+ allocationSize(value: AcceptOfferParams): number;
2895
+ lift(value: UniffiByteArray): AcceptOfferParams;
2896
+ lower(value: AcceptOfferParams, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
2897
+ };
2898
+ FfiConverterTypeAcceptResult: {
2899
+ read(from: RustBuffer): AcceptResult;
2900
+ write(value: AcceptResult, into: RustBuffer): void;
2901
+ allocationSize(value: AcceptResult): number;
2902
+ lift(value: UniffiByteArray): AcceptResult;
2903
+ lower(value: AcceptResult, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
2904
+ };
897
2905
  FfiConverterTypeAdaptorSignature: {
898
2906
  read(from: RustBuffer): AdaptorSignature;
899
2907
  write(value: AdaptorSignature, into: RustBuffer): void;
900
2908
  allocationSize(value: AdaptorSignature): number;
901
2909
  lift(value: UniffiByteArray): AdaptorSignature;
902
- lower(value: AdaptorSignature): UniffiByteArray;
2910
+ lower(value: AdaptorSignature, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
903
2911
  };
904
2912
  FfiConverterTypeCetAdaptorSignatureDebugInfo: {
905
2913
  read(from: RustBuffer): CetAdaptorSignatureDebugInfo;
906
2914
  write(value: CetAdaptorSignatureDebugInfo, into: RustBuffer): void;
907
2915
  allocationSize(value: CetAdaptorSignatureDebugInfo): number;
908
2916
  lift(value: UniffiByteArray): CetAdaptorSignatureDebugInfo;
909
- lower(value: CetAdaptorSignatureDebugInfo): UniffiByteArray;
2917
+ lower(value: CetAdaptorSignatureDebugInfo, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
910
2918
  };
911
2919
  FfiConverterTypeChangeOutputAndFees: {
912
2920
  read(from: RustBuffer): ChangeOutputAndFees;
913
2921
  write(value: ChangeOutputAndFees, into: RustBuffer): void;
914
2922
  allocationSize(value: ChangeOutputAndFees): number;
915
2923
  lift(value: UniffiByteArray): ChangeOutputAndFees;
916
- lower(value: ChangeOutputAndFees): UniffiByteArray;
2924
+ lower(value: ChangeOutputAndFees, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
2925
+ };
2926
+ FfiConverterTypeContractError: {
2927
+ read(from: RustBuffer): ContractError;
2928
+ write(value: ContractError, into: RustBuffer): void;
2929
+ allocationSize(value: ContractError): number;
2930
+ lift(value: UniffiByteArray): ContractError;
2931
+ lower(value: ContractError, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
2932
+ };
2933
+ FfiConverterTypeContractKeyProvider: FfiConverterObject<ContractKeyProviderLike>;
2934
+ FfiConverterTypeContractPartyParams: {
2935
+ read(from: RustBuffer): ContractPartyParams;
2936
+ write(value: ContractPartyParams, into: RustBuffer): void;
2937
+ allocationSize(value: ContractPartyParams): number;
2938
+ lift(value: UniffiByteArray): ContractPartyParams;
2939
+ lower(value: ContractPartyParams, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
2940
+ };
2941
+ FfiConverterTypeContractPayouts: {
2942
+ read(from: RustBuffer): ContractPayouts;
2943
+ write(value: ContractPayouts, into: RustBuffer): void;
2944
+ allocationSize(value: ContractPayouts): number;
2945
+ lift(value: UniffiByteArray): ContractPayouts;
2946
+ lower(value: ContractPayouts, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
2947
+ };
2948
+ FfiConverterTypeCreateOfferParams: {
2949
+ read(from: RustBuffer): CreateOfferParams;
2950
+ write(value: CreateOfferParams, into: RustBuffer): void;
2951
+ allocationSize(value: CreateOfferParams): number;
2952
+ lift(value: UniffiByteArray): CreateOfferParams;
2953
+ lower(value: CreateOfferParams, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
917
2954
  };
918
2955
  FfiConverterTypeDLCError: {
919
2956
  read(from: RustBuffer): DlcError;
920
2957
  write(value: DlcError, into: RustBuffer): void;
921
2958
  allocationSize(value: DlcError): number;
922
2959
  lift(value: UniffiByteArray): DlcError;
923
- lower(value: DlcError): UniffiByteArray;
2960
+ lower(value: DlcError, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
2961
+ };
2962
+ FfiConverterTypeDescriptorInput: {
2963
+ read(from: RustBuffer): DescriptorInput;
2964
+ write(value: DescriptorInput, into: RustBuffer): void;
2965
+ allocationSize(value: DescriptorInput): number;
2966
+ lift(value: UniffiByteArray): DescriptorInput;
2967
+ lower(value: DescriptorInput, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
924
2968
  };
925
2969
  FfiConverterTypeDlcInputInfo: {
926
2970
  read(from: RustBuffer): DlcInputInfo;
927
2971
  write(value: DlcInputInfo, into: RustBuffer): void;
928
2972
  allocationSize(value: DlcInputInfo): number;
929
2973
  lift(value: UniffiByteArray): DlcInputInfo;
930
- lower(value: DlcInputInfo): UniffiByteArray;
2974
+ lower(value: DlcInputInfo, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
931
2975
  };
932
2976
  FfiConverterTypeDlcTransactions: {
933
2977
  read(from: RustBuffer): DlcTransactions;
934
2978
  write(value: DlcTransactions, into: RustBuffer): void;
935
2979
  allocationSize(value: DlcTransactions): number;
936
2980
  lift(value: UniffiByteArray): DlcTransactions;
937
- lower(value: DlcTransactions): UniffiByteArray;
2981
+ lower(value: DlcTransactions, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
938
2982
  };
939
2983
  FfiConverterTypeExtendedKey: {
940
2984
  read(from: RustBuffer): ExtendedKey;
941
2985
  write(value: ExtendedKey, into: RustBuffer): void;
942
2986
  allocationSize(value: ExtendedKey): number;
943
2987
  lift(value: UniffiByteArray): ExtendedKey;
944
- lower(value: ExtendedKey): UniffiByteArray;
2988
+ lower(value: ExtendedKey, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
2989
+ };
2990
+ FfiConverterTypeOracleAttestationRef: {
2991
+ read(from: RustBuffer): OracleAttestationRef;
2992
+ write(value: OracleAttestationRef, into: RustBuffer): void;
2993
+ allocationSize(value: OracleAttestationRef): number;
2994
+ lift(value: UniffiByteArray): OracleAttestationRef;
2995
+ lower(value: OracleAttestationRef, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
945
2996
  };
946
2997
  FfiConverterTypeOracleInfo: {
947
2998
  read(from: RustBuffer): OracleInfo;
948
2999
  write(value: OracleInfo, into: RustBuffer): void;
949
3000
  allocationSize(value: OracleInfo): number;
950
3001
  lift(value: UniffiByteArray): OracleInfo;
951
- lower(value: OracleInfo): UniffiByteArray;
3002
+ lower(value: OracleInfo, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
3003
+ };
3004
+ FfiConverterTypeParty: {
3005
+ read(from: RustBuffer): Party;
3006
+ write(value: Party, into: RustBuffer): void;
3007
+ allocationSize(value: Party): number;
3008
+ lift(value: UniffiByteArray): Party;
3009
+ lower(value: Party, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
952
3010
  };
953
3011
  FfiConverterTypePartyParams: {
954
3012
  read(from: RustBuffer): PartyParams;
955
3013
  write(value: PartyParams, into: RustBuffer): void;
956
3014
  allocationSize(value: PartyParams): number;
957
3015
  lift(value: UniffiByteArray): PartyParams;
958
- lower(value: PartyParams): UniffiByteArray;
3016
+ lower(value: PartyParams, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
959
3017
  };
960
3018
  FfiConverterTypePayout: {
961
3019
  read(from: RustBuffer): Payout;
962
3020
  write(value: Payout, into: RustBuffer): void;
963
3021
  allocationSize(value: Payout): number;
964
3022
  lift(value: UniffiByteArray): Payout;
965
- lower(value: Payout): UniffiByteArray;
3023
+ lower(value: Payout, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
3024
+ };
3025
+ FfiConverterTypePayoutRow: {
3026
+ read(from: RustBuffer): PayoutRow;
3027
+ write(value: PayoutRow, into: RustBuffer): void;
3028
+ allocationSize(value: PayoutRow): number;
3029
+ lift(value: UniffiByteArray): PayoutRow;
3030
+ lower(value: PayoutRow, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
3031
+ };
3032
+ FfiConverterTypeSignResult: {
3033
+ read(from: RustBuffer): SignResult;
3034
+ write(value: SignResult, into: RustBuffer): void;
3035
+ allocationSize(value: SignResult): number;
3036
+ lift(value: UniffiByteArray): SignResult;
3037
+ lower(value: SignResult, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
3038
+ };
3039
+ FfiConverterTypeSpliceKeyRef: {
3040
+ read(from: RustBuffer): SpliceKeyRef;
3041
+ write(value: SpliceKeyRef, into: RustBuffer): void;
3042
+ allocationSize(value: SpliceKeyRef): number;
3043
+ lift(value: UniffiByteArray): SpliceKeyRef;
3044
+ lower(value: SpliceKeyRef, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
966
3045
  };
967
3046
  FfiConverterTypeTransaction: {
968
3047
  read(from: RustBuffer): Transaction;
969
3048
  write(value: Transaction, into: RustBuffer): void;
970
3049
  allocationSize(value: Transaction): number;
971
3050
  lift(value: UniffiByteArray): Transaction;
972
- lower(value: Transaction): UniffiByteArray;
3051
+ lower(value: Transaction, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
973
3052
  };
974
3053
  FfiConverterTypeTxInput: {
975
3054
  read(from: RustBuffer): TxInput;
976
3055
  write(value: TxInput, into: RustBuffer): void;
977
3056
  allocationSize(value: TxInput): number;
978
3057
  lift(value: UniffiByteArray): TxInput;
979
- lower(value: TxInput): UniffiByteArray;
3058
+ lower(value: TxInput, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
980
3059
  };
981
3060
  FfiConverterTypeTxInputInfo: {
982
3061
  read(from: RustBuffer): TxInputInfo;
983
3062
  write(value: TxInputInfo, into: RustBuffer): void;
984
3063
  allocationSize(value: TxInputInfo): number;
985
3064
  lift(value: UniffiByteArray): TxInputInfo;
986
- lower(value: TxInputInfo): UniffiByteArray;
3065
+ lower(value: TxInputInfo, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
987
3066
  };
988
3067
  FfiConverterTypeTxOutput: {
989
3068
  read(from: RustBuffer): TxOutput;
990
3069
  write(value: TxOutput, into: RustBuffer): void;
991
3070
  allocationSize(value: TxOutput): number;
992
3071
  lift(value: UniffiByteArray): TxOutput;
993
- lower(value: TxOutput): UniffiByteArray;
3072
+ lower(value: TxOutput, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
994
3073
  };
995
3074
  };
996
3075
  }>;