supra-ts-sdk - v2.0.0
    Preparing search index...

    Function standardizeAddress

    • Standardize an address

      Parameters

      • address: AccountAddressInput

        The address to standardize: 1 to 64 hex digits in either case, after an optional 0x or 0X prefix

      Returns string

      The standardized address: 0x followed by 64 lower-case hex digits, padded with leading zeros

      When the address, after the optional prefix, is not 1 to 64 hex digits

      import { standardizeAddress } from "supra-ts-sdk";

      const standardizedAddress = standardizeAddress("0x1234");
      console.log(standardizedAddress); // "0x" followed by 64 hex digits, "1234" at the end