Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RawKey

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

Hierarchy

Index

Constructors

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

    Parameters

    • privateKey: Buffer
    • Optional isInjective: boolean

    Returns RawKey

Properties

privateKey: Buffer

Raw private key, in bytes.

publicKey?: PublicKey

Methods

  • accAddress(prefix: string): string
  • Signs a [[StdSignMsg]] with the method supplied by the child class. only used Amino sign

    Parameters

    • tx: SignDoc

      sign-message of the transaction to sign

    • Optional isClassic: boolean

    Returns Promise<SignatureV2>

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

    • payload: Buffer

    Returns { recid: number; signature: Uint8Array }

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

    • payload: Buffer

    Returns { signature: Uint8Array }

    • signature: Uint8Array
  • 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>

  • Signs a Tx and adds the signature to a generated StdTx that is ready to be broadcasted.

    Parameters

    Returns Promise<Tx>

  • valAddress(prefix: string): string