Options
All
  • Public
  • Public/Protected
  • All
Menu

Module utils/elliptic

Index

Variables

Const secp256k1

secp256k1: ec = ...

Functions

Const compressPublicKey

  • compressPublicKey(publicKey: Uint8Array): Uint8Array
  • Compress a public key. This function takes both compressed and uncompressed public keys, and always returns the compressed variant.

    Parameters

    • publicKey: Uint8Array

    Returns Uint8Array

Const decompressPublicKey

  • decompressPublicKey(publicKey: Uint8Array): Uint8Array
  • Decompress a public key. This function takes both compressed and uncompressed public keys, and always returns the decompressed variant.

    Parameters

    • publicKey: Uint8Array

    Returns Uint8Array

Const getFingerprint

  • getFingerprint(publicKey: Uint8Array): number
  • Get the fingerprint from a public key.

    Parameters

    • publicKey: Uint8Array

    Returns number

Const getPublicKey

  • getPublicKey(privateKey: Uint8Array): Uint8Array
  • Get the public key for a private key.

    Parameters

    • privateKey: Uint8Array

    Returns Uint8Array

Const pointToBuffer

  • pointToBuffer(point: BasePoint, compact: boolean): Uint8Array
  • Get a Uint8Array for a point.

    Parameters

    • point: BasePoint
    • compact: boolean

    Returns Uint8Array

Const privateAdd

  • privateAdd(privateKey: Uint8Array, tweak: Uint8Array): Uint8Array
  • Add a tweak to a private key. This function throws if the result is invalid.

    Parameters

    • privateKey: Uint8Array
    • tweak: Uint8Array

    Returns Uint8Array

Const privateToBuffer

  • privateToBuffer(keyPair: KeyPair): Uint8Array
  • Get a Uint8Array for a private key.

    Parameters

    • keyPair: KeyPair

    Returns Uint8Array

Const publicAdd

  • publicAdd(publicKey: Uint8Array, tweak: Uint8Array): Uint8Array
  • Add a point to a public key. This function throws if the result is invalid.

    Parameters

    • publicKey: Uint8Array
    • tweak: Uint8Array

    Returns Uint8Array

Const publicToBuffer

  • publicToBuffer(keyPair: KeyPair, compact: boolean): Uint8Array
  • Get a Uint8Array for a public key.

    Parameters

    • keyPair: KeyPair
    • compact: boolean

    Returns Uint8Array

Generated using TypeDoc