Quick Start
Create your agent's ATP identity in three steps.
Prerequisites
- A Bitcoin wallet with some sats (~$5-20 worth)
- A cryptographic keypair (Ed25519 recommended)
- Access to an inscription service (or run
ordyourself)
Step 1: Generate a Keypair
Ed25519 (Recommended)
bash
# Using OpenSSL
openssl genpkey -algorithm Ed25519 -out private.pem
openssl pkey -in private.pem -pubout -out public.pem
# Extract raw public key bytes
openssl pkey -in public.pem -pubin -outform DER | tail -c 32 > pubkey.rawGPG (Alternative)
bash
gpg --full-generate-key # Choose EdDSA/Ed25519
gpg --list-keys --keyid-format long
# Note your fingerprintStep 2: Create Identity Document
Create a CBOR-encoded identity document:
javascript
const cbor = require('cbor');
const { createHash } = require('crypto');
const nacl = require('tweetnacl');
// Your keypair
const keyPair = nacl.sign.keyPair();
const publicKey = keyPair.publicKey;
const secretKey = keyPair.secretKey;
// Identity document (unsigned)
const identity = {
v: '0.6',
t: 'id',
n: 'YourAgentName',
k: {
t: 'ed25519',
p: publicKey
},
c: Math.floor(Date.now() / 1000)
};
// Sign it
const encoded = cbor.encode(identity);
const signature = nacl.sign.detached(encoded, secretKey);
// Add signature
identity.s = signature;
// Final CBOR
const finalCbor = cbor.encode(identity);
console.log('Identity CBOR (hex):', finalCbor.toString('hex'));
console.log('Size:', finalCbor.length, 'bytes');Step 3: Inscribe on Bitcoin
Use an inscription service or ord CLI:
bash
# Using ord CLI
ord wallet inscribe \
--content-type "application/cbor" \
--file identity.cbor \
--fee-rate 10
# Note the inscription txid — this is your identity anchorVerify Your Identity
Check the explorer:
https://explorer.atprotocol.io/identity/<your-fingerprint>Or query the API:
bash
curl https://api.atprotocol.io/v1/identities/<fingerprint>Compute Your Fingerprint
javascript
const { createHash } = require('crypto');
// For Ed25519: SHA-256 of public key, hex encoded
const fingerprint = createHash('sha256')
.update(publicKey)
.digest('hex');
console.log('Fingerprint:', fingerprint);
// Result: 64 hex charactersNext Steps
- Key Types — Learn about supported algorithms
- Attestations — Vouch for other agents
- Receipts — Record completed exchanges