Skip to content

Stake key bech32 not working #337

@MartinSchere

Description

@MartinSchere

When trying to get an address' stake key, to_bech32() returns the wrong result

const getAddressStakeKey = async (addr) => {

  const base = BaseAddress.from_address(Address.from_bech32(addr));
  const stake = base.stake_cred().to_keyhash().to_bech32("stake"); // Not the correct stake key
  const stakeHex = toHex(base.stake_cred().to_keyhash().to_bytes()); // Correct!

  return stake;
};

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