Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Variables

DEFAULT_PREFIX: u8 = 0x00

Functions

  • addressFromPublicKey(pubKey: Uint8Array, prefix?: number): Uint8Array
  • Decodes an address from a public key.

    example
    const recoveredKey = System.recoverPublicKey(signatureData, digest!);
    const addr = Crypto.addressFromPublicKey(recoveredKey!);
    System.log('recoveredKey (b58): ' + Base58.encode(addr));

    Parameters

    • pubKey: Uint8Array

      public key as a Uint8Array.

    • prefix: number = DEFAULT_PREFIX

      address prefix

    Returns Uint8Array

    Uint8Array

Generated using TypeDoc