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

Wallet updates (+ breaking changes) #28

Merged
merged 4 commits into from
Nov 9, 2024

Conversation

buffrr
Copy link
Member

@buffrr buffrr commented Nov 8, 2024

This PR does the following:

  • We no longer use a special descriptor for spaces as that complicates things and could introduce compatibility issues with hardware wallets down the line.
  • We use a single pair of descriptors which is now a standard BIP-86
  • The wallet export format was updated to use the same format by FullyNoded provided in BDK.
  • Simplify the balance structure it now looks like this:
{
  "balance": 923587,
  "details": {
    "immature": 0,
    "trusted_pending": 0,
    "untrusted_pending": 0,
    "confirmed": 931531,
    "dust": 7944
  }
}

Shows a simple available balance that's already calculated along with the details. The "dust" is the combined value of all space outputs we no longer wish to use for their coin value balance = confirmed + trusted_pending - dust

Since now the wallet export format is updated I updated the RPC to expect the full json structure instead of a string I believe this should close #26 as it now takes the json structure as input @Ximik could you verify that this fixes the issue? does that replace PR #27 ?

- Prevents spending any dust ouputs using a conservative threshold. This is necessary because we don't have a way to track unconfirmed space outputs yet.

- Simplify coin selection further removing the needing for adding foreign utxos as we have switched to just two set of descriptors.
@Ximik
Copy link
Contributor

Ximik commented Nov 8, 2024

I've tested it.

Yes, it fixes the issue and replaces the PR in question.

@buffrr buffrr added this to the v0.0.4 milestone Nov 8, 2024
@buffrr buffrr merged commit 3107be9 into spacesprotocol:main Nov 9, 2024
1 check passed
@Ximik Ximik mentioned this pull request Nov 9, 2024
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

Successfully merging this pull request may close these issues.

importwallet doesn't work
2 participants