Skip to content

Commit 79dbc17

Browse files
Latest iteration
1 parent 8d1fa01 commit 79dbc17

File tree

2 files changed

+199
-172
lines changed

2 files changed

+199
-172
lines changed

src/bdk.udl

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ dictionary LocalUtxo {
173173
boolean is_spent;
174174
};
175175

176-
dictionary AddressAmount {
177-
string address;
176+
dictionary ScriptAmount {
177+
Script script;
178178
u64 amount;
179179
};
180180

@@ -210,12 +210,14 @@ interface PartiallySignedBitcoinTransaction {
210210
string serialize();
211211

212212
string txid();
213+
214+
sequence<u8> extract_tx();
213215
};
214216

215217
interface TxBuilder {
216218
constructor();
217219

218-
TxBuilder add_recipient(string address, u64 amount);
220+
TxBuilder add_recipient(Script script, u64 amount);
219221

220222
TxBuilder add_unspendable(OutPoint unspendable);
221223

@@ -245,7 +247,7 @@ interface TxBuilder {
245247

246248
TxBuilder add_data(sequence<u8> data);
247249

248-
TxBuilder set_recipients(sequence<AddressAmount> recipients);
250+
TxBuilder set_recipients(sequence<ScriptAmount> recipients);
249251

250252
[Throws=BdkError]
251253
PartiallySignedBitcoinTransaction finish([ByRef] Wallet wallet);
@@ -291,3 +293,14 @@ interface DescriptorPublicKey {
291293

292294
string as_string();
293295
};
296+
297+
interface Address {
298+
[Throws=BdkError]
299+
constructor(string address);
300+
301+
Script script_pubkey();
302+
};
303+
304+
interface Script {
305+
constructor(sequence<u8> raw_output_script);
306+
};

0 commit comments

Comments
 (0)