Function addressFromPQKey

  • Derive a post-quantum (PQ) account address together with the canonical salt used to derive it.

    Parameters

    • schemeBytes: Uint8Array

      The 2-byte ASCII PQ scheme identifier (e.g. "f1" for Falcon-1024).

    • key: Uint8Array

      The scheme's canonical public key.

    Returns {
        address: Address;
        salt: number;
    }

    The derived Address and the canonical 1-byte salt.

    Remarks

    The salt is found by rejection sampling: it is the lowest value whose preimage hashes to something that could not also be an Ed25519 public key, so that a PQ account can never collide with an Ed25519 one.

    Throws

    If schemeBytes is not exactly PQ_SCHEME_SIZE bytes, or in the ~2^-256 case where no salt in range yields a valid address.

Generated using TypeDoc