-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multi: implement create_deposit_transaction #60
multi: implement create_deposit_transaction #60
Conversation
19efcbb
to
3b7e0c9
Compare
3b7e0c9
to
dc7fa85
Compare
In the builder
.add_foreign_utxo(
ctip_outpoint,
bitcoin::psbt::Input {
non_witness_utxo: Some(transaction),
..bitcoin::psbt::Input::default()
},
0,
)
.into_diagnostic()?; |
I am not sure how to get the value for Here is the documentation for the function: https://docs.rs/bdk/latest/bdk/wallet/tx_builder/struct.TxBuilder.html#method.add_foreign_utxo
If I understand this correctly it is the weight of the script that will satisfy the The treasury UTXO is an anyone can spend, so I think setting |
Thanks @nchashch! Appreciate it |
Here is the actual implementation in https://github.com/LayerTwo-Labs/bip300301_wallet/blob/master/src/wallet.rs#L749 |
7e8050e
to
41acae3
Compare
41acae3
to
14b6ba3
Compare
14b6ba3
to
deea8a8
Compare
This is currently not working.~I'm not sure how to add the previous Ctip to the OP_DRIVECHAIN TX. I'm using
add_foreign_utxo
, but don't know how to obtain thepsbt_input
andsatisfaction_weight
values to pass in as parameters to that method. ~I'm able to create a transaction, but having some issues with both broadcasting as well as adding the previous Ctip for the sidechain.Update: was able to broadcast the TX, with help from @CryptAxe . Was missing the
acceptnonstdtxn
parameter for my local Core node. Updated the README.Example of a created transaction:
This decodes to: