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

  • Parameters

    • gaiaHubUrl: string

    Returns Promise<GaiaHubConfig>

createNewIdentity

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

    • password: string

    Returns Promise<Identity>

fetchConfig

  • Parameters

    Returns Promise<null | WalletConfig>

getOrCreateConfig

  • Parameters

    Returns Promise<WalletConfig>

getSigner

  • Returns WalletSigner

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

  • Parameters

    Returns Promise<void>

updateConfigForReuseWarning

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

    Returns Promise<void>

updateConfigWithAuth

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

    Returns 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

  • Parameters

    Returns Promise<Wallet>

Static generateFactory

Static generateStrong

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

    Returns Promise<Wallet>

Static restore

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

    • password: string
    • seedPhrase: string
    • chain: ChainID

    Returns Promise<Wallet>

Generated using TypeDoc