Skip to content

need feature P2TR standard address #95

@jjhesk

Description

@jjhesk

As for the title from this package, are there anyways to calculate the base58 secret key and the P2TR standard from the given mnemonic or path of the private key?

A pay-to-taproot (P2TR), also known as a Taproot or Bech32m address, is the most recent and advanced bitcoin address format. Taproot introduces more advanced security, privacy, flexibility and scaling to bitcoin. Like SegWit, Taproot addresses are opt-in and not currently widely supported. Taproot adoption can be tracked here.

Benefits of Taproot include the ability to use Schnorr Signatures, offering better security, lower fees, and more flexible multi-key transactions. Multi-key addresses using P2TR look the same as single-key addresses giving users of multi-key increased privacy. Taproot also enables more advanced scripting, enabling more complex smart contracts to be built on bitcoin.

Taproot addresses start with bc1p with total length of 62 and are case insensitive. specification

Example: bc1p5d7rjq7g6rdk2yhzks9smlaqtedr4dekq08ge8ztwac72sfr9rusxg3297

{
  value: AddressType.P2PKH,
  label: 'P2PKH',
  name: 'Legacy (P2PKH)',
  hdPath: "m/44'/0'/0'/0",
  displayIndex: 3,
  isUnisatLegacy: false
},
{
  value: AddressType.P2WPKH,
  label: 'P2WPKH',
  name: 'Native Segwit (P2WPKH)',
  hdPath: "m/84'/0'/0'/0",
  displayIndex: 0,
  isUnisatLegacy: false
},
{
  value: AddressType.P2TR,
  label: 'P2TR',
  name: 'Taproot (P2TR)',
  hdPath: "m/86'/0'/0'/0",
  displayIndex: 2,
  isUnisatLegacy: false
},
{
  value: AddressType.P2SH_P2WPKH,
  label: 'P2SH-P2WPKH',
  name: 'Nested Segwit (P2SH-P2WPKH)',
  hdPath: "m/49'/0'/0'/0",
  displayIndex: 1,
  isUnisatLegacy: false
},
{
  value: AddressType.M44_P2WPKH,
  label: 'P2WPKH',
  name: 'Native SegWit (P2WPKH)',
  hdPath: "m/44'/0'/0'/0",
  displayIndex: 4,
  isUnisatLegacy: true
},
{
  value: AddressType.M44_P2TR,
  label: 'P2TR',
  name: 'Taproot (P2TR)',
  hdPath: "m/44'/0'/0'/0",
  displayIndex: 5,
  isUnisatLegacy: true
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions