Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RawKey

An implementation of the Key interfaces that uses a raw private key.

Hierarchy

Index

Constructors

constructor

  • new RawKey(privateKey: Buffer): RawKey
  • Called to derive the relevant account and validator addresses and public keys from the raw compressed public key in bytes.

    Parameters

    • privateKey: Buffer

    Returns RawKey

Properties

privateKey

privateKey: Buffer

Raw private key, in bytes.

Optional publicKey

publicKey?: PublicKey

Accessors

accAddress

  • get accAddress(): string
  • Terra account address. terra- prefixed.

    Returns string

valAddress

  • get valAddress(): string
  • Terra validator address. terravaloper- prefixed.

    Returns string

Methods

createSignature

createSignatureAmino

ecdsaSign

  • ecdsaSign(payload: Buffer): { recid: number; signature: Uint8Array }
  • Parameters

    • payload: Buffer

    Returns { recid: number; signature: Uint8Array }

    • recid: number
    • signature: Uint8Array

sign

  • sign(payload: Buffer): Promise<Buffer>
  • You will need to supply sign, which produces a signature for an arbitrary bytes payload with the ECDSA curve secp256pk1.

    Parameters

    • payload: Buffer

    Returns Promise<Buffer>

signTx