Options
All
  • Public
  • Public/Protected
  • All
Menu

Class KeyChain

Hierarchy

  • KeyChain

Index

Constructors

Methods

  • AddEntry<T>(walletId: string, entry: { address: string; key: T; pubkey: string }): Promise<void>
  • Type Parameters

    • T extends string

    Parameters

    • walletId: string
    • entry: { address: string; key: T; pubkey: string }
      • address: string
      • key: T
      • pubkey: string

    Returns Promise<void>

  • EditWallet<T>(__namedParameters: { colorIndex: number; name: string; walletId: string }): Promise<void>
  • Type Parameters

    • T extends string

    Parameters

    • __namedParameters: { colorIndex: number; name: string; walletId: string }
      • colorIndex: number
      • name: string
      • walletId: string

    Returns Promise<void>

  • createNewWalletAccount<T>(name: string, password: Input, colorIndex: number, chainInfos: ChainInfo[]): Promise<Key<T>>
  • decrypt(password: Input): Promise<void>
  • encrypt<T>(password: Input): Promise<void>
  • getAllWallets<T>(): Promise<Keystore<T>>
  • getSigner<T>(walletId: string, password: Input, __namedParameters: { addressPrefix: string; btcNetwork?: {}; coinType: string; ethWallet?: boolean; pubKeyBech32Address?: boolean }): Promise<EthWallet | Wallet | PvtKeyWallet | BtcWalletHD | BtcWalletPk>
  • Type Parameters

    • T extends string

    Parameters

    • walletId: string
    • password: Input
    • __namedParameters: { addressPrefix: string; btcNetwork?: {}; coinType: string; ethWallet?: boolean; pubKeyBech32Address?: boolean }
      • addressPrefix: string
      • Optional btcNetwork?: {}
        • coinType: string
        • Optional ethWallet?: boolean
        • Optional pubKeyBech32Address?: boolean

      Returns Promise<EthWallet | Wallet | PvtKeyWallet | BtcWalletHD | BtcWalletPk>

    • getWalletsFromMnemonic(mnemonic: string, count: number, coinType: string, addressPrefix: string): Promise<{ address: string; index: number; pubkey: null | Uint8Array }[]>
    • Parameters

      • mnemonic: string
      • count: number
      • coinType: string
      • addressPrefix: string

      Returns Promise<{ address: string; index: number; pubkey: null | Uint8Array }[]>

    • importNewWallet<T>(privateKey: string, password: Input, chainInfos: ChainInfo[], addressIndex?: number, name?: string): Promise<Key<T>>
    • Type Parameters

      • T extends string

      Parameters

      • privateKey: string
      • password: Input
      • chainInfos: ChainInfo[]
      • Optional addressIndex: number
      • Optional name: string

      Returns Promise<Key<T>>

    • removeWallets<T>(keyIds: string[]): Promise<void>