Skip to content

Conversation

@Sjors
Copy link
Member

@Sjors Sjors commented Mar 8, 2019

Returns all relevant descriptors for a given account, e.g.:

./hwi.py --fingerprint 00000000 getdescriptors --account 0
{
  "receive": [
    "pkh([00000000/44h/0h/0h]xpub6C.../0/*)#fn95jwmg",
    "sh(wpkh([00000000/49h/0h/0h]xpub6B..../0/*))#j4r9hntt",
    "wpkh([00000000/84h/0h/0h]xpub6C.../0/*)#qw72dxa9"
  ],
  "internal": [
    "pkh([00000000/44h/0h/0h]xpub6C.../1/*)#c8q40mts",
    "sh(wpkh([00000000/49h/0h/0h]xpub6B..../1/*))#85dn0v75",
    "wpkh([00000000/84h/0h/0h]xpub6C..../1/*)#36mtsnda"
  ]
}

@Sjors Sjors force-pushed the 2019/03/getdescriptors branch from 7bd94e4 to 0d5eca2 Compare March 8, 2019 10:53
@Sjors Sjors force-pushed the 2019/03/getdescriptors branch from 0d5eca2 to a83f48e Compare March 15, 2019 10:20
@Sjors Sjors force-pushed the 2019/03/getdescriptors branch from a83f48e to fd4be8f Compare April 16, 2019 17:13
@Sjors Sjors force-pushed the 2019/03/getdescriptors branch 2 times, most recently from 841f703 to 2922fb9 Compare May 1, 2019 13:07
@Sjors
Copy link
Member Author

Sjors commented May 1, 2019

Rebased and added an xpub cache so we don't fetch the same xpub twice from a device for internal and change descriptors.

@Sjors
Copy link
Member Author

Sjors commented Aug 3, 2019

Rebased after #135.

Works quite well in combination with experimental descriptor native wallet box, see bitcoin/bitcoin#14912 (comment)

Paging @achow101 & @instagibbs

@Sjors Sjors force-pushed the 2019/03/getdescriptors branch 3 times, most recently from df02355 to 99218bd Compare August 21, 2019 16:47
@Sjors Sjors force-pushed the 2019/03/getdescriptors branch from 99218bd to b0c6cd7 Compare August 30, 2019 12:07
@achow101
Copy link
Member

achow101 commented Sep 6, 2019

Tested ACK b0c6cd7

achow101 added a commit that referenced this pull request Sep 6, 2019
b0c6cd7 Cache xpubs (Sjors Provoost)
70fad02 Add getdescriptors command (Sjors Provoost)
a68b585 Extract getdescriptor from getkeypool (Sjors Provoost)

Pull request description:

  Returns all relevant descriptors for a given account, e.g.:

  ```sh
  ./hwi.py --fingerprint 00000000 getdescriptors --account 0
  ```

  ```json
  {
    "receive": [
      "pkh([00000000/44h/0h/0h]xpub6C.../0/*)#fn95jwmg",
      "sh(wpkh([00000000/49h/0h/0h]xpub6B..../0/*))#j4r9hntt",
      "wpkh([00000000/84h/0h/0h]xpub6C.../0/*)#qw72dxa9"
    ],
    "internal": [
      "pkh([00000000/44h/0h/0h]xpub6C.../1/*)#c8q40mts",
      "sh(wpkh([00000000/49h/0h/0h]xpub6B..../1/*))#85dn0v75",
      "wpkh([00000000/84h/0h/0h]xpub6C..../1/*)#36mtsnda"
    ]
  }
  ```

ACKs for top commit:
  achow101:
    Tested ACK b0c6cd7

Tree-SHA512: 68569fa37aee9dd8aa67d547c564e2b455ef3fa50e1f3622f5644942878b815de2c841b29a9b4f152f859fb4780e59ec00415b9e29ff87e2e27ab00526d26c7a
@achow101 achow101 merged commit b0c6cd7 into bitcoin-core:master Sep 6, 2019
@Sjors Sjors deleted the 2019/03/getdescriptors branch September 8, 2019 08:41
@prusnak
Copy link
Collaborator

prusnak commented Dec 21, 2019

Nice!

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.

3 participants