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

Hierarchy

  • EddsaInterface

Properties

createKeypairFromSecretKey: ((secretKey: Uint8Array) => Keypair)

Type declaration

    • (secretKey: Uint8Array): Keypair
    • Restores a keypair from a secret key.

      Parameters

      • secretKey: Uint8Array

      Returns Keypair

createKeypairFromSeed: ((seed: Uint8Array) => Keypair)

Type declaration

    • (seed: Uint8Array): Keypair
    • Restores a keypair from a seed.

      Parameters

      • seed: Uint8Array

      Returns Keypair

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

Type declaration

    • (programId: PublicKey<string>, seeds: Uint8Array[]): Pda<string, number>
    • Finds a Program-Derived Address from the given programId and seeds.

      Parameters

      • programId: PublicKey<string>
      • seeds: Uint8Array[]

      Returns Pda<string, number>

generateKeypair: (() => Keypair)

Type declaration

isOnCurve: ((publicKey: PublicKey<string>) => boolean)

Type declaration

    • (publicKey: PublicKey<string>): boolean
    • Whether the given public key is on the EdDSA elliptic curve.

      Parameters

      Returns boolean

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

Type declaration

    • (message: Uint8Array, keypair: Keypair): Uint8Array
    • Signs a message with the given keypair.

      Parameters

      • message: Uint8Array
      • keypair: Keypair

      Returns Uint8Array

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

Type declaration

    • (message: Uint8Array, signature: Uint8Array, publicKey: PublicKey<string>): boolean
    • Verifies a signature for a message with the given public key.

      Parameters

      • message: Uint8Array
      • signature: Uint8Array
      • publicKey: PublicKey<string>

      Returns boolean

Generated using TypeDoc