Options
All
  • Public
  • Public/Protected
  • All
Menu

Abstract key interface that provides transaction signing features and Bech32 address and public key derivation from a public key. This allows you to create custom key solutions, such as for various hardware wallets, by implementing signing and calling super with the raw public key from within your subclass. See MnemonicKey for an implementation of a basic mnemonic-based key.

Hierarchy

Index

Constructors

constructor

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

    Parameters

    • publicKey: Buffer

      raw compressed bytes public key

    Returns Key

Properties

accAddress

accAddress: AccAddress

Terra account address. terra- prefixed.

accPubKey

accPubKey: AccPubKey

Terra account public key. terrapub- prefixed.

publicKey

publicKey: Buffer

raw compressed bytes public key

valAddress

valAddress: ValAddress

Terra validator address. terravaloper- prefixed.

valPubKey

valPubKey: ValPubKey

Terra validator public key. terravaloperpub- prefixed.

Methods

createSignature

Abstract sign

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

    Parameters

    • payload: Buffer

      the data to be signed

    Returns Buffer

signTx

Legend

  • Constructor
  • Property
  • Method
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Static property
  • Static method
  • Property

Generated using TypeDoc