Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Wallet

Index

Constructors

constructor

  • new Wallet(mnemonic: string, path?: string, bech32Prefix?: string, chainId?: string): Wallet
  • Parameters

    • mnemonic: string

      mnemonic phrase

    • path: string = ...

      wallet string path, default is desmos: "m/44'/852'/0'/0/0"

    • bech32Prefix: string = ...

      bech string prefix, default is "desmos"

    • chainId: string = ...

      blockchain id, default is "morpheus-apollo-2"

    Returns Wallet

Properties

Private _address

_address: string = ''

Private _bech32Prefix

_bech32Prefix: string

Private _chainId

_chainId: string

Private _mnemonic

_mnemonic: string

Private _path

_path: string

Private _privateKey

_privateKey: Buffer = ...

Private _publicKey

_publicKey: Any = ...

Private _publicKeyB64

_publicKeyB64: string = ''

Accessors

address

  • get address(): string

bech32Prefix

  • get bech32Prefix(): string

chainId

  • get chainId(): string

mnemonic

  • get mnemonic(): string

path

  • get path(): string

privateKey

  • get privateKey(): Buffer

publicKey

  • get publicKey(): Any

publicKeyB64

  • get publicKeyB64(): string

Methods

Private walletFromMnemonic

  • walletFromMnemonic(mnemonic: string): boolean
  • Generates the address and the keys from a given mnemonic

    Parameters

    • mnemonic: string

    Returns boolean

    true if generated correctly keys and address

Static calculatePubKey

  • calculatePubKey(privateKey: Buffer): null | Buffer
  • Calculate a public Key from a private key

    Parameters

    • privateKey: Buffer

      private key Buffer

    Returns null | Buffer

    returns the public key Buffer

Generated using TypeDoc