Options
All
  • Public
  • Public/Protected
  • All
Menu

Class InMemoryKeyStore

Simple in-memory keystore for mainly for testing purposes.

Hierarchy

Constructors

constructor

Methods

clear

  • clear(): Promise<void>
  • Returns Promise<void>

entries

  • entries(): Promise<IterableIterator<[string, string]>>
  • Returns Promise<IterableIterator<[string, string]>>

getAccounts

  • getAccounts(chainId: ChainId): Promise<string[]>
  • Gets the account(s) identifiers from in-memory storage

    returns{promise<string[]>}

    Parameters

    • chainId: ChainId

      The targeted network. (ex. mainnet, testnet, etc…)

    Returns Promise<string[]>

getChains

  • getChains(): Promise<string[]>
  • Get the network(s) from in-memory storage

    Returns Promise<string[]>

getKey

  • Gets a KeyPair from in-memory storage

    Parameters

    • chainId: ChainId

      The targeted network. (ex. mainnet, testnet, etc…)

    • accountId: string

      The Minter account tied to the key pair

    Returns Promise<KeyPair>

removeKey

  • removeKey(chainId: ChainId, accountId: string): Promise<void>
  • Removes a KeyPair from in-memory storage

    Parameters

    • chainId: ChainId

      The targeted network. (ex. mainnet, testnet, etc…)

    • accountId: string

      The Minter account tied to the key pair

    Returns Promise<void>

setKey

  • setKey(chainId: ChainId, accountId: string, keyPair: KeyPair): Promise<void>
  • Stores a {@KeyPair} in in-memory storage item

    Parameters

    • chainId: ChainId

      The targeted network. (ex. mainnet, testnet, etc…)

    • accountId: string

      The Minter account tied to the key pair

    • keyPair: KeyPair

      The key pair to store in local storage

    Returns Promise<void>

Generated using TypeDoc