bns
Bitcoin Name System (BNS) operations — lookup names, reverse-lookup addresses, check availability, get pricing, list domains, and register new .btc names using single-transaction claim or two-step preorder/register flow.
What this skill does
# BNS Skill
Provides Bitcoin Name System (BNS) operations for .btc domain names using BNS V2 (recommended for .btc) with fallback to BNS V1. Read operations work without a wallet. Write operations (claim-fast, preorder, register) require an unlocked wallet.
## Usage
```
bun run bns/bns.ts <subcommand> [options]
```
## Subcommands
### lookup
Resolve a .btc domain name to its Stacks address.
```
bun run bns/bns.ts lookup --name <name>
```
Options:
- `--name` (required) — BNS name to lookup (e.g., `alice.btc` or `alice`)
Output:
```json
{
"name": "alice.btc",
"found": true,
"address": "SP1...",
"namespace": "btc",
"expireBlock": 900000,
"network": "mainnet"
}
```
### reverse-lookup
Get all BNS domain names owned by an address.
```
bun run bns/bns.ts reverse-lookup [--address <addr>]
```
Options:
- `--address` (optional) — Stacks address to lookup (uses active wallet if omitted)
Output:
```json
{
"address": "SP1...",
"network": "mainnet",
"namesCount": 2,
"names": ["alice.btc", "myname.btc"]
}
```
### get-info
Get detailed information about a BNS domain name.
```
bun run bns/bns.ts get-info --name <name>
```
Options:
- `--name` (required) — BNS name to look up (e.g., `alice.btc`)
Output:
```json
{
"network": "mainnet",
"found": true,
"name": "alice.btc",
"namespace": "btc",
"address": "SP1...",
"expireBlock": 900000,
"gracePeriod": 0,
"status": "active"
}
```
### check-availability
Check if a BNS domain name is available for registration.
```
bun run bns/bns.ts check-availability --name <name>
```
Options:
- `--name` (required) — BNS name to check (e.g., `alice` or `alice.btc`)
Output:
```json
{
"name": "alice.btc",
"available": true,
"network": "mainnet"
}
```
### get-price
Get the registration price for a BNS domain name in STX.
```
bun run bns/bns.ts get-price --name <name>
```
Options:
- `--name` (required) — BNS name to check (e.g., `alice` or `alice.btc`)
Output:
```json
{
"name": "alice.btc",
"network": "mainnet",
"price": {
"units": "ustx",
"microStx": "2000000",
"stx": "2 STX"
}
}
```
### list-user-domains
List all BNS domains owned by an address.
```
bun run bns/bns.ts list-user-domains [--address <addr>]
```
Options:
- `--address` (optional) — Stacks address to check (uses active wallet if omitted)
Output:
```json
{
"address": "SP1...",
"network": "mainnet",
"domainsCount": 1,
"domains": ["alice.btc"]
}
```
### claim-fast
Register a BNS domain name in a single transaction (recommended method for .btc names). Burns the name price in STX and mints the BNS NFT atomically. Requires an unlocked wallet.
```
bun run bns/bns.ts claim-fast --name <name> [--send-to <addr>]
```
Options:
- `--name` (required) — BNS name to claim (e.g., `myname` or `myname.btc`)
- `--send-to` (optional) — Recipient address (defaults to wallet's own address)
Output:
```json
{
"success": true,
"method": "name-claim-fast (single transaction)",
"name": "myname.btc",
"sendTo": "SP1...",
"txid": "0xabc...",
"network": "mainnet",
"price": { "microStx": "2000000", "stx": "2 STX" },
"message": "Name \"myname.btc\" claimed! Once confirmed (~10 min), it will be registered.",
"explorerUrl": "https://explorer.hiro.so/txid/0xabc..."
}
```
### preorder
Preorder a BNS domain name (step 1 of 2-step registration). Use this only when claim-fast is unavailable. Save the returned salt — you need it for the register step. Requires an unlocked wallet.
```
bun run bns/bns.ts preorder --name <name> [--salt <hex>]
```
Options:
- `--name` (required) — BNS name to preorder
- `--salt` (optional) — Hex salt for the preorder hash (auto-generated if omitted)
Output:
```json
{
"success": true,
"step": "1 of 2 (preorder)",
"name": "myname.btc",
"salt": "a1b2c3...",
"txid": "0xdef...",
"network": "mainnet",
"nextStep": "Wait ~10 minutes, then call register with the same name and salt."
}
```
### register
Register a BNS domain name after preorder is confirmed (step 2 of 2-step registration). Must use the same salt from the preorder step. Requires an unlocked wallet.
```
bun run bns/bns.ts register --name <name> --salt <hex>
```
Options:
- `--name` (required) — BNS name to register (must match the preordered name)
- `--salt` (required) — The hex salt used in the preorder step
Output:
```json
{
"success": true,
"step": "2 of 2 (register)",
"name": "myname.btc",
"txid": "0xghi...",
"network": "mainnet",
"message": "Registration submitted! Once confirmed, \"myname.btc\" will be registered.",
"explorerUrl": "https://explorer.hiro.so/txid/0xghi..."
}
```
## Notes
- Read operations (lookup, reverse-lookup, get-info, check-availability, get-price, list-user-domains) work without a wallet
- Write operations (claim-fast, preorder, register) require an unlocked wallet (`bun run wallet/wallet.ts unlock`)
- For .btc registration, prefer `claim-fast` — it registers in a single transaction without a waiting period
- Use the 2-step preorder/register flow only for non-.btc namespaces or if claim-fast is unavailable
- BNS V2 is used for .btc names; BNS V1 is used as fallback for other namespaces
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.