Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

[bug]: rest endpoint v2/wallet/address/next not returning an address #8939

Closed
Fonta1n3 opened this issue Jul 25, 2024 · 3 comments
Closed

[bug]: rest endpoint v2/wallet/address/next not returning an address #8939

Fonta1n3 opened this issue Jul 25, 2024 · 3 comments
Labels
bug Unintended code behaviour needs triage

Comments

@Fonta1n3
Copy link

Background

https://localhost:8080/v2/wallet/address/next
With (and without) param body: ["type": 1]
Is returning:

["code": 5, "details": <__NSArrayM 0x600003050a20>(

)
, "message": Not Found]

Your environment

  • version of lnd: 0.18.2-beta
  • which operating system (uname -a on *Nix): macOS
  • version of btcd, bitcoind, or other backend: Bitcoin Core v26.2

Steps to reproduce

When I run the above endpoint I expect an address to be returned, however I am getting an empty array.

Expected behaviour

Return an address.

Actual behaviour

See above..

@Fonta1n3 Fonta1n3 added bug Unintended code behaviour needs triage labels Jul 25, 2024
@lightningnetwork lightningnetwork deleted a comment Jul 25, 2024
@guggero
Copy link
Collaborator

guggero commented Jul 26, 2024

Are you sending a POST request? And are you running a release build or a self-compiled binary?

@Fonta1n3
Copy link
Author

Yes POST, and I compiled from source git checkout v0.18.2-beta. Previously I didn't need to pass any params. Ive also tried ["type": "WITNESS_PUBKEY_HASH"] and "p2wkh". I am on regtest.

lncli -network regtest newaddress p2wkh returns an address fine. Not sure what I am doing wrong...

@guggero
Copy link
Collaborator

guggero commented Jul 26, 2024

Then you need to compile with the correct build tags. See https://lightning.engineering/api-docs/api/lnd/index.html#experimental-services.
So in your case make build tags="walletrpc" to enable that specific subserver.

Also, ["type": "WITNESS_PUBKEY_HASH"] is not valid JSON. It would need to be {"type": "WITNESS_PUBKEY_HASH"}.

Converting to a discussion as this is troubleshooting and not a bug.

@lightningnetwork lightningnetwork locked and limited conversation to collaborators Jul 26, 2024
@guggero guggero converted this issue into discussion #8942 Jul 26, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
bug Unintended code behaviour needs triage
Projects
None yet
Development

No branches or pull requests

2 participants