Skip to main content

Synopsis

cowboy cbqs submits CIP-39 v2 instructions to the Stream Registry system actor (0x17): provider registration and updates, account top-ups, and stream lifecycle. All subcommands sign with the key found by key auto-discovery; none are read-only. Parent flags:

Subcommands

cowboy cbqs provider-register

CIP-39 §4.1 RegisterProvider. Costs 5 CBY, paid to the zero address. Behavior:
  1. Require at least one --endpoint (CIP-39 §4.1 endpoint rule 1 requires a nonempty list; the CLI refuses an empty one before submission).
  2. Build RegisterProviderV2 with accepts_new = true and a zero metadata_hash.
  3. Sign and submit; print the node response and the transaction hash.
Flags: Example:

cowboy cbqs provider-update

CIP-39 §4.1 UpdateProvider. Every field is optional; only what is passed changes. Behavior:
  1. An empty --endpoint list means “leave endpoints alone”, never “clear them” — clearing would strand every stream the provider serves.
  2. --signing-key rotates the Ed25519 key; the outgoing key is retained on chain as previous_signing_key so older receipts still verify. Two rotations at one height are refused.
  3. Sign and submit.
Flags:

cowboy cbqs top-up

CIP-39 §4.3 TopUpAccount. Owner-only, and the only instruction that creates a (owner, provider) account; a stream on an accountless pair is unserviceable. Behavior:
  1. Derive the owner address from the signing key.
  2. Build TopUpAccountV2 { owner, provider, amount }, sign, and submit.
Flags:

cowboy cbqs create-stream

CIP-39 §4.2 CreateStream. Costs 5 CBY and requires the account to fund rate_per_block × (active_streams + 1). Flags:

cowboy cbqs close-stream

CIP-39 §4.2 CloseStream. Releases the stream’s provider capacity and billing. Flags:

Edge Cases

  • provider-register fails locally with --endpoint is required at least once if no endpoint is given.
  • Consensus checks only the endpoint count, length, wss:// prefix, and printable-ASCII bytes (CIP-39 §4.1); it never parses or compares endpoints. Clients dial the registered URI verbatim, so an endpoint without the path the provider serves is admitted but unreachable.
  • --signing-key and --admin-key must decode to exactly 32 bytes; --provider to exactly 20; --stream-id to exactly 32.
  • top-up is the only way to create an account for an (owner, provider) pair; create a stream only after topping up.
  • Every write signs with resource limits from the node’s estimate.