12 Min. Read+ 120 Exp

Create a Dash Identity

Create a real identity on Dash Platform testnet with the JavaScript SDK and verify it on-chain.

Before you start

This lesson continues from the environment setup. You need:

  • Node.js and @dashevo/evo-sdk installed locally;
  • the mnemonic-backed setupDashClient.js from the previous lesson;
  • at least 5,000,000 testnet credits in addressKeyManager.primaryAddress.

If you need to rebuild that setup, follow the SDK client setup and wallet funding guides.

Keep private keys private

Never paste your mnemonic or private keys into Dash Academy, a chat, or a browser form. The verifier below only accepts a public identity ID.

What you are creating

A Dash identity is the on-chain actor your application uses to sign changes on Dash Platform. It contains a unique public identifier, public keys, and a balance of Platform credits.

An identity is not a wallet address or a username. The Platform address supplies its credits, while a DPNS username can point to it later.

Register the identity

Create identity-register.js beside setupDashClient.js and add the following script:

identity-register.js
import { randomBytes } from 'node:crypto';
import { Identity, Identifier } from '@dashevo/evo-sdk';
import { setupDashClient } from './setupDashClient.js';

const { sdk, keyManager, addressKeyManager } = await setupDashClient({
  requireIdentity: false,
});

try {
  const identity = new Identity(new Identifier(randomBytes(32)));

  keyManager.getKeysInCreation().forEach((key) => {
    identity.addPublicKey(key.toIdentityPublicKey());
  });

  const result = await sdk.addresses.createIdentity({
    identity,
    inputs: [
      {
        address: addressKeyManager.primaryAddress.bech32m,
        amount: 5000000n,
      },
    ],
    identitySigner: keyManager.getFullSigner(),
    addressSigner: addressKeyManager.getSigner(),
  });

  console.log(
    'Identity registered!\nIdentity ID:',
    result.identity.id.toString(),
  );
} catch (error) {
  // Known SDK issue: proof verification can fail after creation succeeds.
  const match = error.message?.match(/proof returned identity (\w+) but/);

  if (match) {
    console.log('Identity registered!\nIdentity ID:', match[1]);
  } else {
    console.error('Something went wrong:\n', error.message);
  }
}

The identity signer proves control of the new identity's keys. The address signer separately authorizes moving 5,000,000 credits from the funded Platform address.

Run the script

node identity-register.js

Successful output includes the public identity ID:

Identity registered!
Identity ID: 5P9p...yourBase58IdentityId

The catch block handles a known case where proof verification fails after Platform has already created the identity. Other errors still fail normally.

Copy the complete identity ID, then verify it below.

Verify on testnet

Paste the public identity ID printed by your script. Dash Academy will look it up independently on Dash Platform testnet.

This is public testnet data. Never paste a mnemonic or private key.

What you accomplished

You created a real actor on Dash Platform testnet. The same identity ID can later own data contracts, submit documents, and receive a human-readable DPNS name.