Umi — API References - v1.3.0
    Preparing search index...

    Interface EddsaInterface

    Defines the interface for the EdDSA cryptography algorithm. It allows us to create, find and use public keys and keypairs.

    interface EddsaInterface {
        createKeypairFromSecretKey: (secretKey: Uint8Array) => Keypair;
        createKeypairFromSeed: (seed: Uint8Array) => Keypair;
        findPda: (
            programId: PublicKey,
            seeds: Uint8Array<ArrayBufferLike>[],
        ) => Pda;
        generateKeypair: () => Keypair;
        isOnCurve: (publicKey: PublicKey) => boolean;
        sign: (message: Uint8Array, keypair: Keypair) => Uint8Array;
        verify: (
            message: Uint8Array,
            signature: Uint8Array,
            publicKey: PublicKey,
        ) => boolean;
    }
    Index

    Properties

    createKeypairFromSecretKey: (secretKey: Uint8Array) => Keypair

    Restores a keypair from a secret key.

    createKeypairFromSeed: (seed: Uint8Array) => Keypair

    Restores a keypair from a seed.

    findPda: (programId: PublicKey, seeds: Uint8Array<ArrayBufferLike>[]) => Pda

    Finds a Program-Derived Address from the given programId and seeds.

    generateKeypair: () => Keypair

    Generates a new keypair.

    isOnCurve: (publicKey: PublicKey) => boolean

    Whether the given public key is on the EdDSA elliptic curve.

    sign: (message: Uint8Array, keypair: Keypair) => Uint8Array

    Signs a message with the given keypair.

    verify: (
        message: Uint8Array,
        signature: Uint8Array,
        publicKey: PublicKey,
    ) => boolean

    Verifies a signature for a message with the given public key.