External Coin Wallets
ADAMANT lets you store and send other cryptocurrencies in-chat. Their addresses and private keys are derived deterministically from the account's ADM key pair. The library provides per-coin modules through dedicated subpath imports.
SCOPE
The external coin scope is intentionally limited to metadata, deterministic key/address derivation, and address validation. Balance lookup, history, fees, external-chain signing, and broadcasting are not part of this SDK surface.
Supported coins: Bitcoin (BTC), Ethereum (ETH), Dash (DASH), and Dogecoin (DOGE). Each is imported from its own entry point so ADM-only consumers never bundle coin code:
import {btc} from 'adamant-api/coins/btc';
import {eth} from 'adamant-api/coins/eth';
import {dash} from 'adamant-api/coins/dash';
import {doge} from 'adamant-api/coins/doge';See also Working with ADM Key Pairs.
SECURITY
The derived private keys are secrets. Never log them or expose them.
Ethereum
import {eth} from 'adamant-api/coins/eth';keys()
Generates an ETH address and private key from an ADAMANT passphrase.
function keys(passphrase: string): {
address: string;
privateKey: string;
};import {eth} from 'adamant-api/coins/eth';
const {address} = eth.keys(process.env.PASSPHRASE);
console.log(`Your eth address: ${address}`);Bitcoin
import {btc} from 'adamant-api/coins/btc';keys()
Generates a BTC address and private key from an ADAMANT passphrase.
function keys(passphrase: string): {
network: Network;
keyPair: ECPairInterface;
address: string | undefined;
privateKey: string | undefined;
privateKeyWIF: string;
};address— P2PKH Bitcoin address bound to the ADAMANT account.keyPair—ECPairkey pair.privateKey— regular 256-bit (32 bytes, 64 chars) private key.privateKeyWIF— Wallet Import Format (52 base58 chars).network—coininfonetwork info.
import {btc} from 'adamant-api/coins/btc';
const {address} = btc.keys(process.env.PASSPHRASE);
console.log(`Your bitcoin address: ${address}`);isValidAddress()
Checks whether a string is a valid Bitcoin address in any format.
function isValidAddress(address: string): boolean;import {btc} from 'adamant-api/coins/btc';
if (btc.isValidAddress('13rK42XbSJV9BdvKQvDJeH3n45zNBbXsUV')) {
console.log('This address is valid.');
}Dash
import {dash} from 'adamant-api/coins/dash';keys()
Generates a DASH address and private key from an ADAMANT passphrase. Returns the same shape as btc.keys().
import {dash} from 'adamant-api/coins/dash';
const {address} = dash.keys(process.env.PASSPHRASE);
console.log(`Your dash address: ${address}`);isValidAddress()
import {dash} from 'adamant-api/coins/dash';
if (dash.isValidAddress('XdY9tHBVQ1hjLaWuGoXXVojZtRa4GfEdNP')) {
console.log('This address is valid.');
}Doge
import {doge} from 'adamant-api/coins/doge';keys()
Generates a DOGE address and private key from an ADAMANT passphrase. Returns the same shape as btc.keys().
import {doge} from 'adamant-api/coins/doge';
const {address} = doge.keys(process.env.PASSPHRASE);
console.log(`Your doge address: ${address}`);isValidAddress()
import {doge} from 'adamant-api/coins/doge';
if (doge.isValidAddress('D7zQbHUEjiPRie6v9WCsC3DNwDifUdbFdd')) {
console.log('This address is valid.');
}For the complete, generated type signatures, see the API Reference.