Skip to content
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

Complete transfers with PSBT construction and tapret commitments #39

Merged
merged 28 commits into from
Dec 25, 2023

Conversation

dr-orlovsky
Copy link
Member

No description provided.

@dr-orlovsky dr-orlovsky changed the title WIP on transfers Complete transfers with PSBT construction and tapret commitments Dec 18, 2023
@dr-orlovsky dr-orlovsky added the epic Epic task covering multiple steps of implementation label Dec 18, 2023
@dr-orlovsky dr-orlovsky added this to the v0.11.0 milestone Dec 18, 2023
@dr-orlovsky dr-orlovsky marked this pull request as ready for review December 18, 2023 20:21
@dr-orlovsky
Copy link
Member Author

dr-orlovsky commented Dec 18, 2023

Ok, I have finished implementing all functionality required to do a full transfer, from coin selection (including co-operative bitcoin and RGB coin selection), PSBT creation, DBC commitments (with possible combination of oprets/taprets, which are automatically deduced from the inputs) to the consignment creation - all in just a single method call (and in single cli command transfer):

    let (psbt, meta, transfer) = rgb.pay(invoice, method, params)

I have no idea whether it works (pretty sure there are some bugs) - I will be debugging during the next few days. But at least, with the code written and compiling now I am sure we have everything we need in all our libraries (there are around 20 of them involved here) to have real RGB taproot wallets - a journey which took 3 years of my time and required implementing even taproot itself, twice (once in rust-bitcoin, second time in bp-std)...

Copy link
Member

@cryptoquick cryptoquick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool... Just one comment

#[display("transfer")]
Transfer {
/// Encode PSBT as V2
#[clap(short = '2')]
v2: bool,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be a default value for this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is a flag, thus "default value" is false assigned when the flag is absent

Copy link
Member

@cryptoquick cryptoquick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@dr-orlovsky dr-orlovsky merged commit 1946262 into master Dec 25, 2023
18 of 20 checks passed
dr-orlovsky added a commit that referenced this pull request Dec 25, 2023
Complete transfers with PSBT construction and tapret commitments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic Epic task covering multiple steps of implementation
Projects
Development

Successfully merging this pull request may close these issues.

3 participants