Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • MergeKeyStore
    • KeyStore

Index

Constructors

constructor

Properties

keyStores

keyStores: KeyStore[]

Methods

clear

  • clear(): Promise<void>
  • Removes all items from each key store

    Returns Promise<void>

getAccounts

  • getAccounts(networkId: string): Promise<string[]>
  • Gets the account(s) from the array of key stores

    returns{promise<string[]>}

    Parameters

    • networkId: string

      The targeted network. (ex. default, betanet, etc…)

    Returns Promise<string[]>

getKey

  • getKey(networkId: string, accountId: string): Promise<KeyPair>
  • Gets a key from the array of key stores

    Parameters

    • networkId: string

      The targeted network. (ex. default, betanet, etc…)

    • accountId: string

      The NEAR account tied to the key pair

    Returns Promise<KeyPair>

getNetworks

  • getNetworks(): Promise<string[]>
  • Get the network(s) from the array of key stores

    Returns Promise<string[]>

removeKey

  • removeKey(networkId: string, accountId: string): Promise<void>
  • Removes a key from the array of key stores

    Parameters

    • networkId: string

      The targeted network. (ex. default, betanet, etc…)

    • accountId: string

      The NEAR account tied to the key pair

    Returns Promise<void>

setKey

  • setKey(networkId: string, accountId: string, keyPair: KeyPair): Promise<void>
  • Sets a storage item to the first index of a key store array

    Parameters

    • networkId: string

      The targeted network. (ex. default, betanet, etc…)

    • accountId: string

      The NEAR account tied to the key pair

    • keyPair: KeyPair

      The key pair to store in local storage

    Returns Promise<void>

toString

  • toString(): string
  • Returns string

Generated using TypeDoc