# Wallet | Stacks.js 1.0.0 Library Reference
Documentation for Stacks.js 1.0.0 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: { bitcoinPublicKeychain: string; chain: ChainID ; configPrivateKey: string; encryptedBackupPhrase: string; firstBitcoinAddress: string; identities: Identity []; identityAddresses: string[]; identityKeypairs: IdentityKeyPair []; identityPublicKeychain: string; stacksPrivateKey: string; walletConfig: undefined | WalletConfig }): Wallet

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

  #### Parameters

  - ##### __namedParameters: { bitcoinPublicKeychain: string; chain: ChainID ; configPrivateKey: string; encryptedBackupPhrase: string; firstBitcoinAddress: string; identities: Identity []; identityAddresses: string[]; identityKeypairs: IdentityKeyPair []; identityPublicKeychain: string; stacksPrivateKey: string; walletConfig: undefined | WalletConfig }

    - ##### bitcoinPublicKeychain: string

    - ##### chain: ChainID

    - ##### configPrivateKey: string

    - ##### encryptedBackupPhrase: string

    - ##### firstBitcoinAddress: string

    - ##### identities: Identity []

    - ##### identityAddresses: string[]

    - ##### identityKeypairs: IdentityKeyPair []

    - ##### identityPublicKeychain: string

    - ##### stacksPrivateKey: string

    - ##### walletConfig: undefined | WalletConfig

  #### Returns Wallet

## Properties

### bitcoinPublicKeychain

bitcoinPublicKeychain: string

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

### chain

chain: ChainID

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

### configPrivateKey

configPrivateKey: string

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

### encryptedBackupPhrase

encryptedBackupPhrase: string

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

### firstBitcoinAddress

firstBitcoinAddress: string

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

### identities

identities: Identity []

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

### identityAddresses

identityAddresses: string[]

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

### identityKeypairs

identityKeypairs: IdentityKeyPair []

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

### identityPublicKeychain

identityPublicKeychain: string

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

### stacksPrivateKey

stacksPrivateKey: string

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

### Optional walletConfig

walletConfig: WalletConfig

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

## Methods

### createGaiaConfig

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

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

  #### Parameters

  - ##### gaiaHubUrl: string

  #### Returns Promise<GaiaHubConfig>

### createNewIdentity

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

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

  #### Parameters

  - ##### password: string

  #### Returns Promise< Identity >

### fetchConfig

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

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

  #### Parameters

  - ##### gaiaConfig: GaiaHubConfig

  #### Returns Promise< WalletConfig | null>

### getOrCreateConfig

- getOrCreateConfig(__namedParameters: { gaiaConfig: GaiaHubConfig; skipUpload: undefined | false | true }): Promise< WalletConfig >

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

  #### Parameters

  - ##### __namedParameters: { gaiaConfig: GaiaHubConfig; skipUpload: undefined | false | true }

    - ##### gaiaConfig: GaiaHubConfig

    - ##### skipUpload: undefined | false | true

  #### Returns Promise< WalletConfig >

### getSigner

- getSigner(): WalletSigner

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

  #### Returns WalletSigner

### restoreIdentities

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

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

  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<this>

### updateConfig

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

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

  #### Parameters

  - ##### gaiaConfig: GaiaHubConfig

  #### Returns Promise<void>

### updateConfigForReuseWarning

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

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

  #### 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:284

  #### 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:145

  #### Parameters

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

    - ##### chain: ChainID

    - ##### encryptedBackupPhrase: string

    - ##### identitiesToGenerate: number

    - ##### rootNode: BIP32Interface

  #### Returns Promise< Wallet >

### Static generate

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

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

  #### Parameters

  - ##### password: string

  - ##### chain: ChainID

  #### Returns Promise< Wallet >

### Static generateFactory

- generateFactory(bitsEntropy: AllowedKeyEntropyBits ): (Anonymous function)

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

  #### Parameters

  - ##### bitsEntropy: AllowedKeyEntropyBits

  #### Returns (Anonymous function)

### Static generateStrong

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

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

  #### 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:132

  #### Parameters

  - ##### password: string

  - ##### seedPhrase: string

  - ##### chain: ChainID

  #### Returns Promise< Wallet >

Generated using TypeDoc