Skip to content

Instantly share code, notes, and snippets.

Step 0 - create a seed and derive xpub (skip this if you have an actual hardware wallet)

We're going to use chantools as a signer, so we don't have to deal with an actual hardware wallet for testing in regtest. The output of this step will just be the xpub of a P2TR account of the seed and the seed's master key fingerprint.

For this example we use the BIP39 seed "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon cactus" which is equivalent to the master root key tprv8ZgxMBicQKsPdKXUBQMuH7B5NAfjBmTdsT2hitzzLWB3BZJURFLTqfdJPr15WkH8huiTrr6k5aCwLoWDxLxhqi8waU7WcrZ9f6kGyJGP2BL.

@guggero
guggero / sharedkey.js
Created July 27, 2020 08:21
Shared Key test script
// Some gRPC and TLS setup code here.
var customKeyLoc = {
key_family: 6,
key_index: 0,
};
var customKeyDesc = {
key_loc: customKeyLoc,
};
@guggero
guggero / gist:c1ffcc309ef0ad8079196e3ba6d02b50
Created July 26, 2020 11:51
Create a maximum sized macaroon in lnd
lncli bakemacaroon --save_to /tmp/max.macaroon --timeout 999999999 --ip_address 255.255.255.255 \
uri:/autopilotrpc.Autopilot/ModifyStatus \
uri:/autopilotrpc.Autopilot/QueryScores \
uri:/autopilotrpc.Autopilot/SetScores \
uri:/autopilotrpc.Autopilot/Status \
uri:/chainrpc.ChainNotifier/RegisterBlockEpochNtfn \
uri:/chainrpc.ChainNotifier/RegisterConfirmationsNtfn \
uri:/chainrpc.ChainNotifier/RegisterSpendNtfn \
uri:/invoicesrpc.Invoices/AddHoldInvoice \
uri:/invoicesrpc.Invoices/CancelInvoice \

Keybase proof

I hereby claim:

  • I am guggero on github.
  • I am guggero (https://keybase.io/guggero) on keybase.
  • I have a public key ASBJKlaPvnmen70HgkLZFAqmg3brlouOeqfDyo1iZW7GUAo

To claim this, I am signing this object: