octez.js TypeDocs
    Preparing search index...

    Function getTezosAlias

    • Computes the Michelson runtime alias of an EVM address: the originated (KT1) address whose hash is the 20-byte Blake2b hash of the lowercase 0x-prefixed hex address.

      Parameters

      • address: string

        A 0x-prefixed 20-byte hex Ethereum address, in any letter case

      Returns string

      The alias as a KT1 address, as returned by the EVM node's tez_getEthereumTezosAddress RPC

      InvalidAddressError if address is not a 0x-prefixed 20-byte hex string

      getTezosAlias('0xccef676171871a48bbd6e2be75bbcc09d38830c5') // returns 'KT1TLraR9PboPAvxLKYQs9eU4n75rGFJTbWk'