Guides
Dash CoreDash PlatformDash.orgDash User DocsLog In
Hey! These docs are for version 0.20.0, which is no longer officially supported. Click here for the latest version, 0.25-redirect!


# Overview

In this tutorial we will retrieve the list of identities associated with a specified mnemonic-based account. Since multiple identities may be created using the same mnemonic, it is helpful to have a way to quickly retrieve all these identities (e.g. if importing the mnemonic into a new device).

## Prerequisites

  • [node.js](🔗) (v12+)

  • Basic familiarity with JavaScript asychronous functions using [async/await](🔗)

  • The Dash JavaScript SDK is initialized (covered in [Connecting to a Network](🔗))

  • A wallet mnemonic

  • A Dash Platform Identity: [Tutorial: Register an Identity](🔗)

# Code

Wallet Operations

Currently, the JavaScript SDK does not cache wallet information, and therefore, it re-syncs the entire Core chain for some wallet operations (e.g. `client.getWalletAccount()`). This can result in wait times of 5+ minutes.

An upcoming release will add a persistence feature to cache wallet information during initial sync so that subsequent access is much faster. For now, the `skipSynchronizationBeforeHeight` option can be used to only sync the wallet starting at a certain block height.

Dash Platform 0.18 Breaking Change

The derivation path used for [identities](🔗) was updated to align with [DIP13](🔗) and provide compatibility with the mobile DashPay wallets. Consequently, identities registered with previous versions of the SDK [will be not be retrievable](🔗).

Also note the change from `account.getIdentityIds()` to `account.identities.getIdentityIds()` for retrieving identities ([PR](🔗)).



Example Response



# What's Happening

After we initialize the Client and getting the account, we call `account.identities.getIdentityIds()` to retrieve a list of all identities created with the wallet mnemonic. The list of identities is output to the console.