Dogecoin keys, wallets, addresses, signed messages and transactions for JavaScript and TypeScript, in the browser or in Node, with no server.
Live demo · Documentation · All DogeJS projects
- Makes Dogecoin wallets and addresses: recovery phrases, HD keys (BIP32, BIP39, BIP44), P2PKH and P2SH addresses and WIF keys.
- Signs and checks messages the way Dogecoin Core's
signmessagedoes, so someone can prove they own an address. - Builds, signs and checks payments: it picks coins, adds change, and checks dust and fee limits for you.
- Handles multisig (m-of-n), PSBT (BIP174) and a versioned transaction file that carries a payment from the machine that builds it to the one that signs it.
- Runs in browsers and in Node 20 or later as plain ES modules, with no server. Money is always whole koinu (
bigint), never a float.
Open the live demo and make an address, sign a message or build a payment right in your browser: https://dogejs.com/core/
From a terminal, one command:
npm install github:DogeJS-Dev/core#v0.4.1Sign a message with a demo key, then change one letter and watch the check fail.
Check an address: the right network, the right checksum, and a typo caught.
Nothing is on npm yet, so install straight from this repository (it needs a public repository, or a GitHub login that can read it). The prepare script builds dist as part of the install.
npm install github:DogeJS-Dev/core#v0.4.1Once the package is on npm this becomes npm install @dogejs/core. To work on it, clone the repository and run npm install and npm run build.
Make a key, an address and a signature, then check it (this is the code in docs/REFERENCE.md, and it was run against the built package):
import { generatePrivateKey, getPublicKey, encodeWif, p2pkhAddress, signMessage, verifyMessage, parseDoge, formatDoge, testnet } from '@dogejs/core';
const priv = generatePrivateKey();
const address = p2pkhAddress(getPublicKey(priv), testnet);
const signature = signMessage('hello doge', encodeWif(priv, { network: testnet }));
console.log(address.length, verifyMessage('hello doge', address, signature)); // 34 true
console.log(parseDoge('12.5'), formatDoge(1250000000n)); // 1250000000n 12.5A bundler can pull in one function at a time through the subpath entries, for example import { isValidAddress } from '@dogejs/core/address'.
The cryptography comes from the audited noble and scure libraries by Paul Miller and contributors (secp256k1, SHA-256, RIPEMD-160, Base58, BIP32, BIP39). DogeJS adds only the Dogecoin layer: network parameters, encodings, validation, scripts, fee and dust rules, and Core-compatible formats. Protocol constants are copied from the Dogecoin Core source with a file and line in a comment. It is tested against Dogecoin Core's own test vectors (sighash, transaction validity, scripts, Base58), the BIP32, BIP39 and BIP174 reference vectors and values from libdogecoin.
The full reference, with an example for every area, is in docs/REFERENCE.md. File formats are in docs/FILE-FORMATS.md and docs/PSBT.md.
Core is the base of the other DogeJS projects. It needs nothing from them.
- Chain data to go with it: backends.
- Built on it: light-node, ledger, sign-in, cli, wallet, browser-utilities, shop-mode, payment-links, watch and integration-tests.
Version 0.4.1. It is not published to npm yet, so you install it from git. It has had no external security review. It is tested against Dogecoin Core's own vectors and reference data, but nothing it produces has been broadcast to the real Dogecoin network (mainnet, testnet or regtest). Do not use it to hold or move real DOGE yet; use testnet or read-only tasks.
Bug reports, ideas and pull requests are welcome. Read the contributing guide first: small, tested, explained.
npm install
npm run build
npm run typecheck
npm testReport a security problem privately to hello@dogejs.com, never in a public issue. See SECURITY.md.
The maintainers keep one combined development workspace for all DogeJS projects and publish each project from it as a repository of its own. An accepted pull request is applied there and appears here with the next release.
MIT, see LICENSE. Bundled third-party code, where there is any, is listed in THIRD_PARTY_LICENSES.



