Skip to content

Generating addresses & keys for In Wallet cryptocurrencies

martiliones edited this page Dec 17, 2023 · 14 revisions

ADAMANT offers an opportunity to store and send in-Chat other cryptocurrencies, Ethereum for example. Their addresses and private keys are derived from account's ADM key pair. The library provides modules to get coin's key pairs.

Generating ETH key pair

Refer to eth module of the library.

keys(passPhrase)

Generates Ether address and private keys with provided passPhrase of ADM account.

Parameters:

  • passPhrase — 12 words Mnemonic ADM passPhrase to generate Ether's key pair, string

Returns:

  • address — Ether address, bound to ADM account of provided passPhrase
  • privateKey — Ether account's privateKey

Example:

const ethPrivateKey = api.eth.keys(config.passPhrase).privateKey;

Generating DASH key pair

Refer to dash module of the library.

keys(passPhrase)

Generates Dash address and private keys with provided passPhrase of ADM account.

Parameters:

  • passPhrase — 12 words Mnemonic ADM passPhrase to generate keys, string

Returns:

  • address — Dash address, bound to ADM account of provided passPhrase
  • privateKey — regular 256-bit (32 bytes, 64 characters) private key
  • privateKeyWIF — Wallet Import Format (52 base58 characters)
  • keyPair — bitcoinjs-lib's ECPair object
  • network — coininfo's network info

Example:

const dashKeys = api.dash.keys(config.passPhrase);
Clone this wiki locally