caravan-bitcoin / caravan

Caravan monorepo
https://caravanmultisig.com
MIT License
37 stars 32 forks source link

Importing wallet config generated by Sparrow fails #96

Open Harshil-Jani opened 6 months ago

Harshil-Jani commented 6 months ago

When we try to export the configuration from Sparrow wallet then it fails in caravan image

The reason for this failure is the way sparrow exports the configuration. For example, here is the sample configuration that sparrow wallet exports.

{
  "name": "sprwt1",
  "addressType": "P2WSH",
  "network": "regtest",
  "client": {
    "type": "public"
  },
  "quorum": {
    "requiredSigners": 1,
    "totalSigners": 2
  },
  "extendedPublicKeys": [
    {
      "name": "Ledger Nano S Plus",
      "bip32Path": "m/48'/1'/0'/2'",
      "xpub": "tpubDDwMB2bTZPY5Usnyqn7PN1cYmNWNghRxtY968LCA2DRr4HM93JqkLd5uEHXQb2rRLjHrkccguYRxyDkQi71mBuZ7XAfLH29918Gu9vKVmhy",
      "xfp": "740b5ab5",
      "method": "ledger"
    },
    {
      "name": "BIP39",
      "bip32Path": "m/48'/1'/0'/2'",
      "xpub": "tpubDFfn27TcSkAQya268sFrq2d89gGihhj7PET8yvQxg2DaCTk4YmNQHLj66gCua24terXgnsacmym4tbVXhXnmsrrB4jhecrZ7uxsB2rxsShb",
      "xfp": "c763d5e2",
      "method": "sparrow"
    }
  ],
  "startingAddressIndex": 0
}

If somebody creates a software wallet using sparrow, then the method assigned is sparrow. However, the supported methods in caravan wallet are

"trezor", "coldcard", "ledger", "hermit", "xpub", "text",

Thus sparrow is not identified method.

Adding sparrow amongst the existing method would possibly help the configuration work well with caravan when imported.