# Wallet | Stacks.js 1.4.1 Library Reference
Documentation for Stacks.js 1.4.1 Library Reference

### Hierarchy

- Wallet

## Index

### Constructors

- constructor

### Properties

- bitcoinPublicKeychain
- chain
- configPrivateKey
- encryptedBackupPhrase
- firstBitcoinAddress
- identities
- identityAddresses
- identityKeypairs
- identityPublicKeychain
- stacksPrivateKey
- walletConfig

### Methods

- createGaiaConfig
- createNewIdentity
- fetchConfig
- getOrCreateConfig
- getSigner
- restoreIdentities
- updateConfig
- updateConfigForReuseWarning
- updateConfigWithAuth
- createAccount
- generate
- generateFactory
- generateStrong
- restore

## Constructors

### constructor

- new Wallet(__namedParameters: ConstructorOptions ): Wallet

- - Defined in packages/keychain/src/wallet/index.ts:76

  #### Parameters

  - ##### __namedParameters: ConstructorOptions

  #### Returns Wallet

## Properties

### bitcoinPublicKeychain

bitcoinPublicKeychain: string

- Defined in packages/keychain/src/wallet/index.ts:68

### chain

chain: ChainID

- Defined in packages/keychain/src/wallet/index.ts:66

### configPrivateKey

configPrivateKey: string

- Defined in packages/keychain/src/wallet/index.ts:74

### encryptedBackupPhrase

encryptedBackupPhrase: string

- Defined in packages/keychain/src/wallet/index.ts:67

### firstBitcoinAddress

firstBitcoinAddress: string

- Defined in packages/keychain/src/wallet/index.ts:69

### identities

identities: Identity []

- Defined in packages/keychain/src/wallet/index.ts:73

### identityAddresses

identityAddresses: string[]

- Defined in packages/keychain/src/wallet/index.ts:71

### identityKeypairs

identityKeypairs: IdentityKeyPair []

- Defined in packages/keychain/src/wallet/index.ts:70

### identityPublicKeychain

identityPublicKeychain: string

- Defined in packages/keychain/src/wallet/index.ts:72

### stacksPrivateKey

stacksPrivateKey: Buffer

- Defined in packages/keychain/src/wallet/index.ts:75

### Optional walletConfig

walletConfig: WalletConfig

- Defined in packages/keychain/src/wallet/index.ts:76

## Methods

### createGaiaConfig

- createGaiaConfig(gaiaHubUrl: string): Promise< GaiaHubConfig >

- - Defined in packages/keychain/src/wallet/index.ts:224

  #### Parameters

  - ##### gaiaHubUrl: string

  #### Returns Promise< GaiaHubConfig >

### createNewIdentity

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

- - Defined in packages/keychain/src/wallet/index.ts:212

  #### Parameters

  - ##### password: string

  #### Returns Promise< Identity >

### fetchConfig

- fetchConfig(gaiaConfig: GaiaHubConfig ): Promise<null | WalletConfig >

- - Defined in packages/keychain/src/wallet/index.ts:228

  #### Parameters

  - ##### gaiaConfig: GaiaHubConfig

  #### Returns Promise<null | WalletConfig >

### getOrCreateConfig

- getOrCreateConfig(__namedParameters: { gaiaConfig: GaiaHubConfig ; skipUpload?: boolean }): Promise< WalletConfig >

- - Defined in packages/keychain/src/wallet/index.ts:245

  #### Parameters

  - ##### __namedParameters: { gaiaConfig: GaiaHubConfig ; skipUpload?: boolean }

    - ##### gaiaConfig: GaiaHubConfig

    - ##### Optional skipUpload?: boolean

  #### Returns Promise< WalletConfig >

### getSigner

- getSigner(): WalletSigner

- - Defined in packages/keychain/src/wallet/index.ts:323

  #### Returns WalletSigner

### restoreIdentities

- restoreIdentities(__namedParameters: { gaiaReadURL: string; rootNode: BIP32Interface }): Promise< Wallet >

- - Defined in packages/keychain/src/wallet/index.ts:178

  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

- updateConfig(gaiaConfig: GaiaHubConfig ): Promise<void>

- - Defined in packages/keychain/src/wallet/index.ts:273

  #### Parameters

  - ##### gaiaConfig: GaiaHubConfig

  #### Returns Promise<void>

### updateConfigForReuseWarning

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

- - Defined in packages/keychain/src/wallet/index.ts:315

  #### Parameters

  - ##### __namedParameters: { gaiaConfig: GaiaHubConfig }

    - ##### gaiaConfig: GaiaHubConfig

  #### Returns Promise<void>

### updateConfigWithAuth

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

- - Defined in packages/keychain/src/wallet/index.ts:279

  #### Parameters

  - ##### __namedParameters: { app: ConfigApp ; gaiaConfig: GaiaHubConfig ; identityIndex: number }

    - ##### app: ConfigApp

    - ##### gaiaConfig: GaiaHubConfig

    - ##### identityIndex: number

  #### Returns Promise<void>

### Static createAccount

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

- - Defined in packages/keychain/src/wallet/index.ts:139

  #### Parameters

  - ##### __namedParameters: { chain: ChainID ; encryptedBackupPhrase: string; identitiesToGenerate?: number; rootNode: BIP32Interface }

    - ##### chain: ChainID

    - ##### encryptedBackupPhrase: string

    - ##### Optional identitiesToGenerate?: number

    - ##### rootNode: BIP32Interface

  #### Returns Promise< Wallet >

### Static generate

- generate(password: string, chain: ChainID ): Promise< Wallet >

- - Defined in packages/keychain/src/wallet/index.ts:118

  #### Parameters

  - ##### password: string

  - ##### chain: ChainID

  #### Returns Promise< Wallet >

### Static generateFactory

- generateFactory(bitsEntropy: AllowedKeyEntropyBits ): (password: string, chain: ChainID ) => Promise< Wallet >

- - Defined in packages/keychain/src/wallet/index.ts:104

  #### Parameters

  - ##### bitsEntropy: AllowedKeyEntropyBits

  #### Returns (password: string, chain: ChainID ) => Promise< Wallet >

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

    - #### Parameters

      - ##### password: string

      - ##### chain: ChainID

      #### Returns Promise< Wallet >

### Static generateStrong

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

- - Defined in packages/keychain/src/wallet/index.ts:122

  #### Parameters

  - ##### password: string

  - ##### chain: ChainID

  #### Returns Promise< Wallet >

### Static restore

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

- - Defined in packages/keychain/src/wallet/index.ts:126

  #### Parameters

  - ##### password: string

  - ##### seedPhrase: string

  - ##### chain: ChainID

  #### Returns Promise< Wallet >

Generated using TypeDoc