Comments (18)
I'm working on in-depth step-by-step documentation for both sender and receiver integrations. I figure it is appropriate to share here.
from bdk-cli.
Thanks @DanGould for the pointer to the new payjoin repo.
@notmandatory I think we should update the description to refer to https://github.com/payjoin/rust-payjoin, as that seemed more current.
I went through the payjoin-client
briefly, and it seems the send
and recv
logic is already there. The payjoin sending and receiving should be more involved than regular send/recv as it requires interaction with the sender. So makes sense to add a new send function.
This can be done as a separate send_payjoin
and recv_payjoin
function which takes in a bip21
URL and follows the logic of payjoin-client
of the reference crate.
We can then feature gate it under a new payjoin
feature and optional dependency on rust-payjoin
.
This could be an extensive but achievable project for SOB. Pretty excited for this one. 😃
from bdk-cli.
Moving this to bdk-cli
since this doesn't need to be part of the core bdk library, but still useful to have an example using bdk
in the bdk-cli
tool.
from bdk-cli.
My next action item is to start bitcoin core in regtest mode and use the regtest wallet+bitcoin-cli to interact with the network and test bdk-cli and payjoin. I will need to generate two separate wallets in order to test payjoin
from bdk-cli.
Successfully tested payjoin-cli today - the main barrier was me figuring out the configuration. I need to get more comfortable using bitcoin-cli tool
from bdk-cli.
A little trick I do when I'm working with the bitcoin-cli is do a --help command and copy/paste the output to a local note since the docs on the web are often out of date with what ever version I'm running
from bdk-cli.
A look at Bitcoin Design Guide's case study might lend some inspiration. BlueWallet requires a bip21 to initiate a send no matter what and then prompts to confirm / change the amount. That user story could apply here as well.
I think Signal is an application design success story, so I find their contributing guidelines/development idology compelling. The first truth they find self evident is
The answer is not more options. If you feel compelled to add a preference that's exposed to the user, it's very possible you've made a wrong turn somewhere.
Reading in the required bip21 amount otherwise prompting seems to align with this philosophy.
from bdk-cli.
Could this be reviewed in separate send / receive portions? There is a CLI tool based on the bip78, actively maintained payjoin
crate that would be straightforward to add to bdk-cli
at this point.
from bdk-cli.
Hi yes since this will be done by a summer of bitcoin student new to rust and bitcoin I'd like the idea of focusing on an easy win of adding send first. Then we can separately work on the receive side, and/or work on any open issues in the bip78
crate or the payjoin
bin.
from bdk-cli.
To get started on a sender CLI integration, check out this bitcoind payjoin-client cli based using the payjoin crate and this bdk + payjoin sender that's working in wasm at https://bitmask.app
from bdk-cli.
@DanGould Thank you for sharing this here. It will be very beneficial in implementation of Payjoin support
from bdk-cli.
I'm working on in-depth step-by-step documentation for both sender and receiver integrations. I figure it is appropriate to share here.
Extremely helpful. Thank you
from bdk-cli.
So far have set up local dev environment (using visual studio code) and have cloned both bdk-cli and rust-payjoin. I then installed bitcoind+bitcoin-cli locally. Also set up local regtest bitcoind wallet. I moved the Bitcoin directory onto my desktop and created a bitcoin.conf file to specify my rpc credentials in order to interact w bitcoin core. I set rpcuser+password and then set restnet=1 in the configuration to file to configure regtest mode. I can now use the bitcoind command to run my own node, but I'm going to use bitcoind -regtest to start bitcoin core in regtest mode (I think creates a local private network).
from bdk-cli.
Have finished testing bdk-cli in regtest. I used electrs in Rust and made a regtest wallet then tested the functionality after specifying the bitcoind regtest instance. If anyone has ideas on how to test the functionality/behavior of bdk-cli in the most thorough way possible, I would love to know (I'm sure I didn't test everything I could have). I still need to test payjoin in regtest
from bdk-cli.
You should also try testing with the new Mutiny signet network and faucent. See: https://blog.mutinywallet.com/mutinynet/
bdk-cli -n signet wallet -s https://mutinynet.com/api -d "tr(tprv8ZgxMBicQKsPe67zv5U9x6u1ZY2rLayXm365byTL4fYj3HGxe2SpQ6jjF8TRuFekexLP7HdTzxbTBZ2iNszfE7Gwyd8j1ebASTFybu2iQdX/*)" get_balance
{
"satoshi": {
"confirmed": 100000,
"immature": 0,
"trusted_pending": 0,
"untrusted_pending": 0
}
}
from bdk-cli.
Opened a pull request to add my README to payjoin-cli:
https://github.com/payjoin/rust-payjoin/pull/79/commits
from bdk-cli.
Proposed BDK send-payjoin command that accepts a BIP21 URI
- One thing to note is that I was wondering whether or not to have the user parse the bip21 (command takes the address and payjoin endpoint, then generates a BIP21 + can send after). Perhaps make a different command to create the bip21?
Syntax:
bdk-cli wallet send-payjoin <bip21_uri> --amount= [number of sats]
This command proposal accepts a BIP21 including payjoin details (address of the contributor and secure endpoint). It also supports the --amount option to specify the desired amount in satoshis for the payjoin transaction.
Options:
- <bip21_uri>: The complete BIP21 URI containing the payjoin details.
- -- [number of sats] : Specifies the desired amount in satoshis for the payjoin transaction. If not provided, the generated payjoin transaction will use the amount specified in the BIP21 URI. This option can override the number of sats specified in the BIP21.
Example usage:
bdk-cli wallet send-payjoin "BITCOIN:1PvMqxFQv3q8v1e9JtMKk2j5wvGveWGNp5?amount=0.0005&pj=https://localhost:3010/" --amount=50000
This command takes a payjoin-capable BIP21 URI and sends the payjoin transaction with the desired amount of satoshis using the bip21 or --amount option.
from bdk-cli.
@willowenss API looks good, but I agree with @DanGould we shouldn't need a required --amount
option. Another way to handle confirmation in the case you don't want to be prompted is to have an optional -y
option that skips the user confirmation prompt about the amount, without that option it would require the user to confirm.
This is how an option like that is documented for the apt-get
command:
-y, --yes, --assume-yes
Automatic yes to prompts; assume "yes" as answer to all prompts and run non-interactively.
EDIT: But for now no need for a -y
option, can add it later if needed, best to keep it simple if we can.
from bdk-cli.
Related Issues (20)
- A Running list of bdk-cli demo ideas
- RUSTSEC-2022-0046: Out-of-bounds read when opening multiple column families with TTL HOT 1
- RUSTSEC-2021-0139: ansi_term is Unmaintained HOT 3
- AUDIT failure due to bdk + cbf dependency `rocksdb` HOT 1
- Create integration test with OPRETURN
- Add integration testing in CI HOT 1
- Vec<String> aren't parsing in clap 3.0 HOT 1
- PSBT is finalized but throws error on broadcasting HOT 3
- Converge base64 dependncies.
- RUSTSEC-2020-0071: Potential segfault in the time crate
- Add `validate_domain` Electrum option
- bdk-cli not showing a balance on mainnet HOT 1
- Can not compile for windows 11 HOT 1
- Design a user friendly policy structure visualization HOT 3
- Latest release is missing wallet sync method HOT 1
- RUSTSEC-2023-0052: webpki: CPU denial of service in certificate path building
- Update to bdk 0.29 to fix coinbase bug
- Generating wpkh script type descriptors with compile
- RUSTSEC-2024-0336: `rustls::ConnectionCommon::complete_io` could fall into an infinite loop based on network input
- Consider a build matrix with Windows
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bdk-cli.