Skip to content
This repository was archived by the owner on Apr 11, 2024. It is now read-only.
This repository was archived by the owner on Apr 11, 2024. It is now read-only.

unspentoutput constructor does not work with cashaddr #110

@dfoderick

Description

@dfoderick

The class unspentoutput does not work with cashaddr because the following line assumes it is a legacy address and fails with Error: Checksum mismatch in Base58Check.

const address = data.address ? new Address(data.address) : undefined;

This constructor is called during Transaction.from so it is a major use case.

See the following branch with a test that fails.
https://github.com/the-bitcoin-token/bitcoin-source/compare/unspentoutput_cashaddr?expand=1

There are several ways to fix:

  • Fix the Address constructor to work with cashaddr
  • Change UnspentOutput to use Address,fromString

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions