Fonta1n3 / FullyNoded

Self sovereign, secure, powerful, easy to use wallet that utilizes your own node as a backend. Powered by PSBT's and descriptors. Acts as an offline signer using your node as a watch-only wallet. C-Lightning compatible for instant, unfairly cheap payments.
https://fullynoded.app
Other
192 stars 37 forks source link

Importing wallets from core #250

Open 1thales opened 2 months ago

1thales commented 2 months ago

Is your feature request related to a problem? Please describe. Using FN bitcoin core on iOS. I cant find a way to import watch-only bitcoin core wallets to FN

Describe the solution you'd like UI solution or instructions on how to import

Describe alternatives you've considered The other iOS wallet has such function under "advanced" but it seems to restrict the functionality on such wallets

Fonta1n3 commented 2 months ago

If you go to the active wallet view, then tap the top left add wallet (+) button and you'll see three buttons in the top right of view where you usually create a new wallet.

You can paste, scan qr or upload from files. It accepts many inputs. You can import descriptors in text format or QR as well as wallet files from other software wallets.

You can also create a wallet by adding a signer (bip39 words) and tapping the + button on the wallet section of the signer. It will prompt you to choose a wallet derivation and create that wallet.

1thales commented 2 months ago

It did not accept copy-pasting zpub from bluewallet. I get he message that I need to import an output descriptor. Should I copy the whole output of core's listdescriptor to FN?

Fonta1n3 commented 2 months ago

the problem with only a zpub is this doesn't include a master key fingerprint, so some offline signers will refuse to sign the psbt...

if you get this output from listdescriptors:

"descriptors": [
    {
      "desc": "wpkh([35eb7af3/84'/0'/0'] xpubxxxxxxxxxxx/0/*)#dcgukpf2",
      "timestamp": 1231006505,
      "active": true,
      "internal": false,
      "range": [
        0,
        1053
      ],
      "next": 55,
      "next_index": 55
    },
    {
      "desc": "wpkh([35eb7af3/84'/0'/0']xpubxxxxxxxxxxx/1/*)#uvdat5ej",
      "timestamp": 1231006505,
      "active": true,
      "internal": true,
      "range": [
        0,
        1037
      ],
      "next": 38,
      "next_index": 38
    }
  ]
}

To import into FN you want the text of the external descriptor, which is the first one from above (as an example): wpkh([35eb7af3/84'/0'/0']xpubxxxxxxxxxxx/0/*)#uvdat5ej

1thales commented 2 months ago

Thanks, that worked! Except it is showing zero utxo's :( looking at debug.log I see it scanned only the last 15 blocks but the wallet is much older. Is there anyway to let FN use the existing already scanned wallets in the bitcoin folder?

Fonta1n3 commented 2 months ago

That could cause issues bc the app relies on being the one who created the wallet.

I could add a simple option to the existing rescan button which forces a full rescan.

Can also make the filename editable with strong warnings. Or make the block height from which it scans editable.

Fonta1n3 commented 2 months ago

For now as a quick fix (if you're familiar with bitcoin-cli) you can force a full rescan on the FN wallet. You can find and export the filename in the wallet info view (info button on active wallet).

1thales commented 2 months ago

Thank you!!

Fonta1n3 commented 2 months ago

@1thales digging into your rescan issue, is your node pruned? if not you can hit the rescan button on the top right in wallet info view to force a rescan.

1thales commented 2 months ago

No it is not pruned. I just didn't want to rescan from block one since that would take forever

Fonta1n3 commented 2 months ago

I'll make the blockheight editable so it only rescans from whichever block you specify for the next update. Will take more time to add ability to specify custom rpc wallet but I can definitely see how thats useful.

1thales commented 2 months ago

Thank you! Another question: would renaming the wallet directory in disrupt its visibility to FN? Using the command line with large wallet names is not very convenient

1thales commented 2 months ago

Also another issue is installing FN on a different phone. Now the FN wallet I already created does not work fully on the FN app on the new phone (Old FN using advanced>>import from core folder) . I get the message "That button works on "Fully Noded Wallets" ..." although the wallet was created by FN, just on a different phone. Also probably related issue is that labels set using core's setlabel are not recognized by FN.

1thales commented 1 month ago

Also another issue is installing FN on a different phone. Now the FN wallet I already created does not work fully on the FN app on the new phone (Old FN using advanced>>import from core folder) . I get the message "That button works on "Fully Noded Wallets" ..." although the wallet was created by FN, just on a different phone. Also probably related issue is that labels set using core's setlabel are not recognized by FN.

Please ignore. Using the FN-Core wallet and importing using the FN QR actually imported the labels that were set using command line. It just that FN won't see those if was done after creating the wallet.

Fonta1n3 commented 1 month ago

Ok, that's great feedback. Maybe I can add a sync labels button or something. Will get to it.