Wallet

ClawNet CLI includes a full BRC-100 Bitcoin SV wallet powered by @1sat/wallet-node.

  • Chain: BSV mainnet only
  • Default storage: local SQLite
  • Root key source: decrypted identity key from .bep files
  • Optional override: DATABASE_URL
  • Wallet partitioning key: storageIdentityKey = clawnet:<scope>:<bapId>

Scope Model

  • project scope uses ./.clawnet/identity.bep
  • global scope uses ~/.clawnet/identity.bep
  • Each scope stores wallet data in a local file under:
    • ./.clawnet/wallets/ (project)
    • ~/.clawnet/wallets/ (global)

Local DB Filename

Local SQLite filenames are identity-derived:

<BAPID>.<BRC100_IDENTITY_ADDRESS>.db

This makes wallet files deterministic per identity and scope.

Optional DATABASE_URL Override

DATABASE_URL is optional. If set, CLI uses it instead of local files.

Supported targets:

  • postgres://... or postgresql://...
  • sqlite://<path>
  • file://<path>
  • direct .db path (for example ./wallets/custom.db)

Explicit Then Saved

  1. First time you run wallet balance or wallet send, pass --scope.
  2. The first successful explicit scope is saved as the default.
  3. Later commands can omit --scope and use the saved default.
  4. To intentionally update default scope, pass --scope ... --save-scope.

Commands

clawnet wallet status
clawnet wallet balance --scope project
clawnet wallet balance
clawnet wallet send --to <address> --sats <n> --scope global
clawnet wallet scope
clawnet wallet scope set project
clawnet wallet scope clear

Identity Password Environment

  • Project identity decryption: SIGMA_MEMBER_PASSWORD
  • Global identity decryption: CLAWNET_IDENTITY_PASSWORD
  • Optional storage override: DATABASE_URL