Options
All
  • Public
  • Public/Protected
  • All
Menu

Class InMemoryViewingKey

description

Holds the viewing key

Hierarchy

  • InMemoryViewingKey

Index

Constructors

constructor

Methods

getAddress

  • getAddress(addressIndex?: number): Promise<{ address: string; addressIndex: number }>
  • description

    Retrieve a payment address

    Parameters

    • Optional addressIndex: number

      used to determine which diversifier should be used to derive the address, default is 0

    Returns Promise<{ address: string; addressIndex: number }>

    Base58Check-encoded address and its index

getFullViewingKey

  • getFullViewingKey(): Buffer

getIncomingViewingKey

  • getIncomingViewingKey(): Promise<Buffer>

getOutgoingViewingKey

  • getOutgoingViewingKey(): Promise<Buffer>

Static fromSpendingKey

  • description

    Allows to instantiate the InMemoryViewingKey from an encrypted/unencrypted spending key

    example
    await InMemoryViewingKey.fromSpendingKey('sask27SLmU9herddHz4qFJBLMjWYMbJF8RtS579w9ej9mfCYK7VUdyCJPHK8AzW9zMsopGZEkYeNjAY7Zz1bkM7CGu8eKLzrjBLTMC5wWJDhxiK91ahA29rhDRsHdJDV2u2jFwb2MNUix8JW7sAkAqYVaJpCehTBPgRQ1KqKwqqUaNmuD8kazd4Q8MCWmgbWs21Yuomdqyi9FLigjRp7oY4m5adaVU19Nj1AHvsMY2tePeU2L')
    

    Parameters

    • spendingKey: string

      Base58Check-encoded spending key

    • Optional password: string

      Optional password to decrypt the spending key

    Returns Promise<InMemoryViewingKey>

Generated using TypeDoc