@thruputchain/client
    Preparing search index...

    Function derivePubkeyAccountAddress

    • Derives the on-chain address of a pubkey account from its preimage: sha256( cxs(DomainSeparator("PubkeyAccount")) || cxs(preimage) ).

      Mirrors pubkey_account_address in the Rust thruput-domain-separator crate; the two are pinned to each other by the golden vectors in specs/test-vectors/domain-separator.json.

      Parameters

      • preimage: PubkeyAccountPreimage

      Returns ContractAddress

      import {
      derivePubkeyAccountAddress,
      pubkeyAccountPreimage,
      } from "@thruputchain/client";

      const address = derivePubkeyAccountAddress(
      pubkeyAccountPreimage(signer.publicKey, 0n),
      );