Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Wallet

Index

Constructors

constructor

Properties

bitcoinPublicKeychain

bitcoinPublicKeychain: string

chain

chain: ChainID

configPrivateKey

configPrivateKey: string

encryptedBackupPhrase

encryptedBackupPhrase: string

firstBitcoinAddress

firstBitcoinAddress: string

identities

identities: Identity[]

identityAddresses

identityAddresses: string[]

identityKeypairs

identityKeypairs: IdentityKeyPair[]

identityPublicKeychain

identityPublicKeychain: string

stacksPrivateKey

stacksPrivateKey: Buffer

Optional walletConfig

walletConfig: WalletConfig

Methods

createGaiaConfig

createNewIdentity

  • createNewIdentity(password: string): Promise<Identity>

fetchConfig

getOrCreateConfig

getSigner

restoreIdentities

  • restoreIdentities(__namedParameters: { gaiaReadURL: string; rootNode: BIP32Interface }): Promise<Wallet>
  • Restore all previously used identities. This is meant to be used when 'restoring' a wallet. First, it will check for a walletConfig. If present, then we use that to determine how many identities to generate, and auto-populate their username.

    If walletConfig is empty, then this is being restored from an authenticator that doesn't support walletConfig. In that case, we will recursively generate identities, and check for on-chain names.

    Parameters

    • __namedParameters: { gaiaReadURL: string; rootNode: BIP32Interface }
      • gaiaReadURL: string
      • rootNode: BIP32Interface

    Returns Promise<Wallet>

updateConfig

updateConfigForReuseWarning

  • updateConfigForReuseWarning(__namedParameters: { gaiaConfig: GaiaHubConfig }): Promise<void>

updateConfigWithAuth

  • updateConfigWithAuth(__namedParameters: { app: ConfigApp; gaiaConfig: GaiaHubConfig; identityIndex: number }): Promise<void>

Static createAccount

  • createAccount(__namedParameters: { chain: ChainID; encryptedBackupPhrase: string; identitiesToGenerate?: number; rootNode: BIP32Interface }): Promise<Wallet>
  • Parameters

    • __namedParameters: { chain: ChainID; encryptedBackupPhrase: string; identitiesToGenerate?: number; rootNode: BIP32Interface }
      • chain: ChainID
      • encryptedBackupPhrase: string
      • Optional identitiesToGenerate?: number
      • rootNode: BIP32Interface

    Returns Promise<Wallet>

Static generate

Static generateFactory

Static generateStrong

  • generateStrong(password: string, chain: ChainID): Promise<Wallet>

Static restore

  • restore(password: string, seedPhrase: string, chain: ChainID): Promise<Wallet>

Generated using TypeDoc