BlockchainCommons / Research

Blockchain Commons Research papers
Other
111 stars 38 forks source link

add name property to crypto-output #133

Closed seedhammer closed 10 months ago

seedhammer commented 10 months ago

crypto-hdkey can have names, but crypto-output cannot. This issue proposes adding a name property to crypto-output.

This is useful to identify a particular wallet setup, in particular where the names of individual shares are not important. For SeedHammer, each steel plate represents a share, but without descriptor names a user can't easily know which plates form a wallet.

One workaround is to give every crypto-hdkey in a descriptor the same name. However, at least Sparrow enforces unique names, for good reasons. Adding numbers ("My Cold Storage #1", "My Cold Storage #2"...) is feasible, but ugly and confusing.

seedhammer commented 10 months ago

Note that non-standard formats do include descriptor names:

BlueWallet:

# BlueWallet Multisig setup file
# this file contains only public keys and is safe to
# distribute among cosigners
#
Name: Test Multisig 2-of-3
Policy: 2 of 3
Derivation: m/48'/0'/0'/2'
Format: P2WSH

5A0804E3: xpub6F148LnjUhGrHfEN6Pa8VkwF8L6FJqYALxAkuHfacfVhMLVY4MRuUVMxr9pguAv67DHx1YFxqoKN8s4QfZtD9sR2xRCffTqi9E8FiFLAYk8

DD4FADEE: xpub6DnediUuY8Pcc6Fej8Yt2ZntPCyFdpbHBkNV7EawesRMbc6i9MKKMhKEv4JMMzwDJckaV4czBvNdc6ikwLiZqdUqMd5ZKQGYaQT4cXMeVjf

9BACD5C0: xpub6EefrCrMAduhNwnsHb3dAs8DYZSw4f63WyR6DaEByUHjwvPDdhczj15FyBBG4tbEJtf4vRKTv1ng5SPPnWv1Pve1f15EJfiBY5oYDN6VLEC

Specter:

{
  "label": "Test Multisig 2-of-3",
  "blockheight": 481824,
  "descriptor": "wsh(sortedmulti(2,[dc567276/48h/0h/0h/2h]xpub6DiYrfRwNnjeX4vHsWMajJVFKrbEEnu8gAW9vDuQzgTWEsEHE16sGWeXXUV1LBWQE1yCTmeprSNcqZ3W74hqVdgDbtYHUv3eM4W2TEUhpan/0/*,[f245ae38/48h/0h/0h/2h]xpub6DnT4E1fT8VxuAZW29avMjr5i99aYTHBp9d7fiLnpL5t4JEprQqPMbTw7k7rh5tZZ2F5g8PJpssqrZoebzBChaiJrmEvWwUTEMAbHsY39Ge/0/*,[c5d87297/48h/0h/0h/2h]xpub6DjrnfAyuonMaboEb3ZQZzhQ2ZEgaKV2r64BFmqymZqJqviLTe1JzMr2X2RfQF892RH7MyYUbcy77R7pPu1P71xoj8cDUMNhAMGYzKR4noZ/0/*))#hfwurrvt",
  "devices": [
    {
      "type": "other",
      "label": "Test Multisig 2-of-3 Cosigner 1"
    },
    {
      "type": "other",
      "label": "Test Multisig 2-of-3 Cosigner 2"
    },
    {
      "type": "other",
      "label": "Test Multisig 2-of-3 Cosigner 3"
    }
  ]
}

So another argument for adding descriptor names is that without them, wallet software will be reluctant to switch to crypto-output as the standard interchange format.

satscoffee commented 10 months ago

Would be super helpful for users while standardizing crypto-output property using data which are currently present.

ChristopherA commented 10 months ago

I agree with @WolfMcNally that descriptor names should not be used as an identifier, but they are useful metadata as evidenced by names for descriptors in the blue wallet and specter. I suspect other do so as well. @KenCarpenter ?

satscoffee commented 10 months ago

I believe Craig Raw also just added this support for Sparrow...

https://github.com/sparrowwallet/sparrow/issues/911

seedhammer commented 10 months ago

Closing this. crypto-output was recently deprecated by newer "envelope" formats, so it no longer makes sense to add features to it, however simple.