ID@agntn/keysv0.7.0
One key. Every chain.
Key generation, address derivation and message signing for twenty-three blockchains, typed and built on noble, scure and our own hashes. One interface in TypeScript, the same tools over MCP, Pi and OMP, and nothing ever leaves the process.
- Chains
- 23
- two curves
- Tools
- 36
- MCP · Pi · OMP
- Network
- 0 calls
- in process
$ pnpm add @agntn/keys1
0000000000000000000000000000000000000000000000000000000000000001
- Public key
- 0279be667e…16f81798
- Range
- 1 … n − 1
- Addresses
- 23 from one key
Addresses
- Bitcoinsegwitbc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4
- Bitcoin CashCashAddrbitcoincash:qp63uahgrxged4z5jswyt5dn5v3lzsem6cy4spdc2h
- Bitcoin Goldsegwitbtg1qw508d6qejxtdg4y5r3zarvary0c5xw7k6w057a
- Bitcoin SVlegacy1BgGZ9tcN4rm9KBzDn7KprQz87SZ26SAMH
- Litecoinsegwitltc1qw508d6qejxtdg4y5r3zarvary0c5xw7kgmn4n9
- DashlegacyXmN7PQYWKn5MJFna5fRYgP6mxT2F7xpekE
- DecredlegacyDsmcYVbP1Nmag2H4AS17UTvmWXmGeA7nLDx
- DogecoinlegacyDFpN6QqFfUm3gKNaxN6tNcab1FArL9cZLE
- Zcashlegacyt1UYsZVJkLPeMjxEtACvSxfWuNmddpWfxzs
- eCashCashAddrecash:qp63uahgrxged4z5jswyt5dn5v3lzsem6cacy2kzvq
- EthereumEIP-550x7E5F4552091A69125d5DfCb7b8C2659029395Bdf
- BaseEIP-550x7E5F4552091A69125d5DfCb7b8C2659029395Bdf
- TRONbase58checkTMVQGm1qAQYVdetCeGRRkTWYYrLXuHK2HC
- Solanabase586ASf5EcmmEHTgDJ4X4ZT5vT6iHVJBXPg5AN5YoTCpGWt
- StellarStrKeyGBGLLK7WVV47X5NLXTFPZQTJ3BONEZI62S4ILNMGT4SBV3PQUW5CTECA
- Aptoshex0xf90391c81027f03cdea491ed8b36ffaced26b6df208a9b569e5baf2590eb9b16
- Suied255190xd0c2c91eda34bbfbaec6cfb9c7bb913e57dab3cbec4018a4b3f5e55531cd63af
- Cardanoenterpriseaddr1v8qvqahau6y67jdq0kfm9dy0hjmgv4u962nmk9pslsl7ryq5mvnl7
- XRP LedgerclassicrBgGZ9tc4him9KBzD8fKFiQz3fSZpaSwMH
- NEARimplicit4cb5abf6ad79fbf5abbccafcc269d85cd2651ed4b885b5869f241aedf0a5ba29
- Cosmosbech32cosmos1w508d6qejxtdg4y5r3zarvary0c5xw7k6ah60c
- Polkadotss5812jacCzszzdckmb7pYNSGxy61nUwP9nrNefP92AFpKP62N46
- Monerostandard42nsXK8WbVGTNayQ6Kjw5UdgqbQY5KCCufdxdCgF7NgTfjC69Mna7DJSYyie77hZTQ8H92G2HwgFhgEUYnDzrnLnQdF28r3
Keys in, addresses out
A private key is an integer. Multiply it by the generator, hash the result, encode the hash, and you have an address. Every chain is the same three steps with different rules. The panel walks the keyspace live.
- Both curves from @noble, nothing else underneath
- Legacy, SegWit, Taproot, EIP-55, base58check, bech32
- Same 32 bytes, twenty-three chains, derived in this tab
0000000000000000000000000000000000000000000000000000000000000001
- Public key
- 0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798
- Legacy
- 1BgGZ9tcN4rm9KBzDn7KprQz87SZ26SAMH
- Segwit
- bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4
- Taproot
- bc1pmfr3p9j00pfxjh0zmgp99y8zftmd3s5pmedqhyptwy6lm87hf5sspknck9
Same calls, every chain
Every blockchain is a class with the same shape. Swap the import and the rest of the code stays. A chain that can't do what you asked throws, Decred on a segwit address, Cardano on an HD walk, instead of handing you something that only looks right.
- generateWallet, getAddress, signMessage on every driver
- Drivers load lazily, only the chains you use ship
- Custom chains extend the same abstract class
Driver
import { useBlockchain, blockchains } from "@agntn/keys";const chain = useBlockchain(await blockchains.bitcoin()());const wallet = chain.generateWallet();const signature = chain.signMessage("hello", wallet.private);// key 1 on Bitcoin: bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4Mnemonic to wallet in one call
Walk a BIP39 mnemonic down a BIP44 path and get the wallet at the end of it. Paths are parsed and validated, so a hardened segment in the wrong place fails before derivation. Puzzle phrases with a bad checksum go through on request, words untouched.
- BIP32 for secp256k1, SLIP-10 for ed25519
- Bitcoin, Bitcoin Gold and Litecoin infer the address type from the purpose
- Broken checksum? Derive anyway and get a warning with the wallet
Path
- mmaster
- 44'purpose
- 60'coin
- 0'account
- 0change
- 0index
- Mnemonic
- abandon abandon … about
- Address
- 0x9858EfFD232B4033E47d90003D41EC34EcaEda94
23 drivers, one class shape
Each chain is an adapter over the shared primitives: its hashing, its encoding and the arguments that matter there. Adding one means writing those rules, not the cryptography. Every driver has a page with its formats and the traps.
Import@agntn/keys/blockchains/<key>
| About | |||
|---|---|---|---|
| Bitcoin | bitcoin | Five address formats, testnet, and a taproot that does the real BIP341 tweak. | secp256k1 |
| Bitcoin Cash | bitcoincash | Bitcoin's key and hash written as CashAddr, bitcoincash:q..., and nothing else. | secp256k1 |
| Bitcoin Gold | bitcoingold | Bitcoin's formats behind G, A and btg1q, and no taproot, because the chain never turned it on. | secp256k1 |
| Bitcoin SV | bitcoinsv | Bitcoin's 1 address, byte for byte, and no P2SH since Genesis. | secp256k1 |
| Litecoin | litecoin | Bitcoin's five formats behind L, M and ltc1, plus its own message preamble. | secp256k1 |
| Dash | dash | Bitcoin's P2PKH behind an X, a preamble still called DarkCoin, and no SegWit. | secp256k1 |
| Decred | decred | BLAKE-256 in every hash, addresses that start with Ds, and no HD walk, on purpose. | secp256k1 |
| Dogecoin | dogecoin | Bitcoin's P2PKH behind a D, its own preamble, and no SegWit to wrap anything in. | secp256k1 |
| Zcash | zcash | The transparent half only: t1 behind two version bytes, and nothing shielded. | secp256k1 |
| eCash | ecash | Bitcoin Cash's CashAddr under ecash:, its own preamble, and none of the CashTokens types. | secp256k1 |
| Ethereum | ethereum | EIP-55 checksummed hex and the personal_sign preamble. | secp256k1 |
| Base | base | Same driver as Ethereum under a different name. Same key, same address. | secp256k1 |
| TRON | tron | Ethereum's 20 bytes wrapped in base58check, so it starts with T. | secp256k1 |
| Solana | solana | The address is the public key in base58, no hashing at all. | ed25519 |
| Stellar | stellar | The public key as a G StrKey with a CRC16 checksum, and SEP-53 message signing. | ed25519 |
| Aptos | aptos | SHA3-256 over the key and a scheme byte, 0x hex out. | ed25519 |
| Sui | sui | Both curves on one chain. Blake2b over a flag byte and the key. | ed25519 · secp256k1 |
| Cardano | cardano | Base, enterprise and stake addresses in bech32. No mnemonic derivation, on purpose. | ed25519 |
| XRP Ledger | xrpl | Family seeds, both curves, and Bitcoin's base58 shuffled until every account starts with r. | secp256k1 · ed25519 |
| NEAR | near | The account is the public key in hex. No hash, no checksum, not even base58. | ed25519 |
| Cosmos | cosmos | One driver for the Hub, Osmosis, Celestia and the rest. Same key, same path, only the letters before the 1 disagree. | secp256k1 |
| Polkadot | polkadot | SS58 under any network prefix, Kusama included. ed25519 for now, sr25519 is still waiting its turn. | ed25519 |
| Monero | monero | Two public keys in one 95-character address, and a 25th seed word that only checks the other 24. | ed25519 |
Thirty-six tools over MCP
Everything the library does is exposed as an MCP tool with the same parameters. Point an agent at it and it derives, validates and signs without touching the network. The Pi and OMP extensions run the same executors.
- Keys, WIF, mnemonics, BIP44 paths, addresses, signing
- stdio server started with one command
- A generated mnemonic comes back marked as already in the transcript
Bitcoin
secp256k1
- Public key
- 0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798
- Type
- segwit
- Address
- bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4
Start with one command
One install gives you the library, the keys CLI and the MCP server. Load a driver, hand it a key and read the address.
- PinPre-1.0, so pin exact versions.
- FundsKeep real funds on a hardware wallet, not in a script.
- LocalDerivation and signing run in the process. Nothing goes out.
First address
$ pnpm add @agntn/keysimport { useBlockchain, blockchains } from "@agntn/keys";const chain = useBlockchain(await blockchains.bitcoin()());const publicKey = chain.getKeyPublic("0000…0001");chain.getAddress(publicKey, "segwit"); // "bc1qw508d6…v8f3t4"