octez.js TypeDocs
    Preparing search index...

    Function getEthereumAlias

    • Computes the EVM runtime alias of a Tezos address: the first 20 bytes of the Keccak-256 hash of the address's base58 encoding.

      Parameters

      • address: string

        An implicit (tz1–tz5) or originated (KT1) Tezos address, without entrypoint

      Returns string

      The alias as a lowercase 0x-prefixed hex string, as returned by the EVM node's tez_getTezosEthereumAddress RPC

      InvalidAddressError if address is not a valid implicit or originated address

      getEthereumAlias('tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx') // returns '0xccef676171871a48bbd6e2be75bbcc09d38830c5'