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

how to use walletprocesspsbt through btcctl #2227

Closed
Yihen-Liu opened this issue Aug 8, 2024 · 9 comments
Closed

how to use walletprocesspsbt through btcctl #2227

Yihen-Liu opened this issue Aug 8, 2024 · 9 comments

Comments

@Yihen-Liu
Copy link

Yihen-Liu commented Aug 8, 2024

I Setup a btcwallet service and btcd service, they have connected succeed.

I can read walletprocesspsbt when I use command: ./btcctl -l, however, when I invoke walletprocesspsbt by command:
./btcctl --signet --rpcuser=devuser --rpcpass=devpass --rpcserver=127.0.0.1:33346 --rpccert=./rpc/wallet/rpc.cert --wallet walletprocesspsbt psbt-content
it show that -32601: Method not found

I dont know why? who can tell me how to use it correctly through btcctl?

@Roasbeef
Copy link
Member

Roasbeef commented Aug 8, 2024

btcwallet doesn't implement that RPC command. If you want to do PSBT operations on a CLI, using a btcwallet instance, the easiest way is to use lnd, which embeds btcwallet, and call this API: https://lightning.engineering/api-docs/api/lnd/wallet-kit/fund-psbt

@Roasbeef Roasbeef closed this as completed Aug 8, 2024
@Yihen-Liu
Copy link
Author

Yihen-Liu commented Aug 9, 2024

btcwallet doesn't implement that RPC command. If you want to do PSBT operations on a CLI, using a btcwallet instance, the easiest way is to use lnd, which embeds btcwallet, and call this API: https://lightning.engineering/api-docs/api/lnd/wallet-kit/fund-psbt

Hi @Roasbeef, Thanks very much for your reply.
Will you please tell me why it didn't implement? Is there any special reason?

@guggero
Copy link
Collaborator

guggero commented Aug 9, 2024

btcwallet is mostly used as a library (for example by lnd). The standalone/RPC functionality hasn't been update in years, as that's not the main use case for this project.

@Yihen-Liu
Copy link
Author

If some commands doesn't implement in this project, it is unnecessary to display them when RUN ./btcctl -l, which will make user confused and waste their time to try those commands, just like me.

@guggero
Copy link
Collaborator

guggero commented Aug 9, 2024

Hmm, I wasn't aware of that. That could probably be improved. The reason this probably happens is that btcctl is just a client implementation of the rpcclient package. And that package has support to call function on both btcd AND bitcoind as a client (since this package is also the main client library code that is used to talk to bitcoind). But on the server side btcd (or btcwallet respectively) don't have any implementation for it.

@Yihen-Liu
Copy link
Author

Yihen-Liu commented Aug 9, 2024

Recently I am trying to start a signet network based on btcd. When I implement it, I need to start btcd and start the btcwallet service. In order to process psbt transactions, I also need to start the bitcoind service; this is really troublesome.

In fact, I am looking forward to a btcd that can include btcwallet services inner.

Is it a good idea that we open a new branch on this project, which Contains service of btcd and btcwallet?
If yes,I am willing to do this.

@guggero
Copy link
Collaborator

guggero commented Aug 9, 2024

I think that would be a massive undertaking and I believe you'll have trouble finding reviewers willing to invest time into getting this merged. Review capacity in this project is very limited as is right now.

Maybe you can tell us what your end goal is? Maybe there's another combination of existing tools/libraries that can satisfy that?

@Yihen-Liu
Copy link
Author

I think that would be a massive undertaking and I believe you'll have trouble finding reviewers willing to invest time into getting this merged. Review capacity in this project is very limited as is right now.

Maybe you can tell us what your end goal is? Maybe there's another combination of existing tools/libraries that can satisfy that?

Thank you sir for your patient answer.

Indeed, I am a gopher, My End Goal is that we can use btcd as easy as bitcoind, especially setup a new testnet/signet.

@guggero
Copy link
Collaborator

guggero commented Aug 9, 2024

If you just want to be able to quickly iterate on new testnets/signets, then I suggest using btcd just as a basic block validation and consensus engine, then using lnd connected to that for any wallet functionality (lnd can be used as just an on-chain wallet without any channel functionality if desired).

If you intend to create an actual custom signet, then you wouldn't really need any code changes to either btcd or bitcoind, as custom signets can be created and configured by both already (or should at least, haven't done much testing around that yet).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants