near-api-js - v7.5.3
    Preparing search index...

    Class KeyPairAbstract

    Hierarchy (View Summary)

    Index
    • Generates a local key pair without creating an account or saving credentials.

      Parameters

      • curve: CurveType

        Key algorithm: ed25519, secp256k1, or ml-dsa-65 (case-insensitive).

      Returns KeyPair

      Random KeyPair based on the curve

    • Creates a key pair from an encoded key string.

      Parameters

      • encodedKey: KeyPairString

        Curve-prefixed Base58 secret key, such as ed25519:....

      Returns KeyPair

      The key pair created from the encoded key string.

      If the prefix, encoding, or key material is invalid.