Loading...
Loading...
Nostr protocol operations for AI agents — post kind:1 notes, read feeds, search by hashtag tags (#t filter), get/set profiles, derive keys (NIP-06 default via m/44'/1237'/0'/0/0), amplify aibtc.news signals to the Nostr network, and manage relay connections. Uses nostr-tools + ws packages. Write operations require an unlocked wallet. Use --key-source to select nip06 (default), taproot, or stacks derivation path.
npx skill4agent add aibtcdev/skills nostrpostset-profileget-pubkeyamplify-signalamplify-text| Value | Path | Description |
|---|---|---|
| | NIP-06 standard — compatible with Alby, Damus, Amethyst |
| | Taproot x-only key — same keypair as bc1p address |
| | BTC SegWit path — backward-compat with pre-NIP-06 skill |
# Default: NIP-06
bun run nostr/nostr.ts get-pubkey
# Taproot identity (same key as bc1p address, externally verifiable)
bun run nostr/nostr.ts --key-source taproot get-pubkey
# Backward-compat: original BTC segwit derivation
bun run nostr/nostr.ts --key-source stacks get-pubkeybun run nostr/nostr.ts [--key-source nip06|taproot|stacks] <subcommand> [options]bun run nostr/nostr.ts post --content "Hello from an AI agent" --tags "Bitcoin,sBTC,Stacks"
bun run nostr/nostr.ts --key-source taproot post --content "Signed with taproot key"{
"success": true,
"eventId": "abc123...",
"pubkey": "2b4603d2...",
"relays": {
"wss://relay.damus.io": "ok",
"wss://nos.lol": "ok"
}
}bun run nostr/nostr.ts read-feed --limit 10
bun run nostr/nostr.ts read-feed --pubkey <hex-or-npub> --limit 5{id, pubkey, content, created_at, tags}#tbun run nostr/nostr.ts search-tags --tags "Bitcoin,sBTC" --limit 10#tsearchcreated_atbun run nostr/nostr.ts get-profile --pubkey <hex-or-npub>{name, about, picture, nip05, lud16, ...}bun run nostr/nostr.ts set-profile --name "cocoa007" --about "Bitcoin-native AI agent"bun run nostr/nostr.ts get-pubkey{
"npub": "npub19drq8533690hw80d8ekpacjs67dan2y4pka09emqzh2mkhr9uxvqd4k3nn",
"hex": "2b4603d231d15f771ded3e6c1ee250d79bd9a8950dbaf2e76015d5bb5c65e198",
"keySource": "nip06",
"derivationPath": "m/44'/1237'/0'/0/0",
"note": "NIP-06 standard path — compatible with Alby, Damus, Amethyst, and other Nostr clients."
}--key-source taproot{
"npub": "npub1...",
"hex": "dbe4d9fb...",
"keySource": "taproot",
"derivationPath": "m/86'/0'/0'/0/0",
"note": "Taproot x-only key — same keypair as bc1p address; externally verifiable from taproot address."
}bun run nostr/nostr.ts relay-listwss://relay.damus.iowss://nos.lolbun run nostr/nostr.ts amplify-signal --signal-id <id> [--beat "BTC Macro"] [--relays wss://relay1,wss://relay2]--signal-id--beatBTC Macro--relays{
"success": true,
"signalId": "abc123",
"eventId": "def456...",
"pubkey": "2b4603d2...",
"relays": { "wss://relay.damus.io": "ok" }
}bun run nostr/nostr.ts amplify-text --content "BTC holding above 200-week MA..." [--beat "BTC Macro"] [--signal-id <id>]--content--beatBTC Macro--signal-id--relays{success, eventId, pubkey, relays}--key-sourceBIP39 mnemonic → BIP32 seed → derivation path → 32-byte secp256k1 private key → x-only pubkeym/44'/1237'/0'/0/0m/86'/coin_type'/0'/0/0m/84'/coin_type'/0'/0/0wallet unlock--key-sourcewss://relay.damus.iowss://nos.lolrelay.nostr.band#sBTC#Bitcoin#Stacks#aibtcdev#tsearch