FROST secp256k1-TR (Taproot) TypeScript Library - v0.2.2-alpha.3
    Preparing search index...

    Interface EvenY<T>

    Trait for ensuring the group public key has an even Y coordinate.

    In BIP-340, public keys are encoded with only the X coordinate, which means that two Y coordinates are possible. The specification says that the coordinate which is even must be used.

    This is accomplished by simply negating both private and public keys if Y is odd.

    interface EvenY<T> {
        hasEvenY(): boolean;
        intoEvenY(isEven?: boolean): T;
    }

    Type Parameters

    • T
    Index

    Methods

    • Return if the given type has a group public key with an even Y coordinate.

      Returns boolean

    • Convert to ensure the group public key has an even Y coordinate.

      Parameters

      • OptionalisEven: boolean

      Returns T