Synopsis
cowboy trading-post drives the CIP-33 Trading Post: creators declare actors hireable with pricing terms, stores distribute them under grants, hirers pay in CBY or CIP-20 tokens, and attesters vouch for manifest roots.
Write subcommands sign with the key found by key auto-discovery, with limits from the node’s estimate, and print the transaction hash and the node response. declaration-id and the get-* subcommands need no key.
declare, version, register-store, grant, register-artifact, pause, resume, revoke and attest accept --prepare: sign the transaction and print it as one JSON object (transaction_hex, digest, sender, nonce, chain_id) without submitting it.
Global flags:
Shared argument formats
- 32-byte hex (
--salt,--manifest-root,--volume-id,--claimed-root,--declaration-id,--token-id,--job): 64 hex chars,0xoptional. - Pricing term (
--term):free,one-shot:cby:<amount>,subscription:cby:<amount>:<period_blocks>,per-call:cby:<amount>, or the CIP-20 formsone-shot:cip20:<token_id>:<base_units>,subscription:cip20:<token_id>:<base_units>:<period_blocks>,per-call:cip20:<token_id>:<base_units>. - CBY amounts accept up to 9 decimal places (
1.5= 1,500,000,000 base units); CIP-20 amounts are raw base units and must not contain a decimal point. - Split / referral entries:
<address>:<bps>. - Bytes inputs (
--capability-schema-*,--ibe-ciphertext-*,--metadata*,--policy-uri*,--session-receipt-*): give at most one of the-hex,-file, or plain-text forms.
Subcommands
cowboy trading-post declaration-id
Compute the deterministic declaration id for a creator, actor, and salt. Local only; no network call.
Flags:
Example:
cowboy trading-post declare
Declare a hireable actor and its first version and artifact.
Behavior:
- Derive the creator from the signing key and compute the declaration id; print it (unless
--prepare). - Build the version fields (manifest root, visibility, capability schema, terms, default split) and the artifact escrow (volume, claimed root, IBE ciphertext).
- Enforce the visibility pairing locally:
privaterequires an IBE ciphertext;publicrequires it to be omitted. A ciphertext that is only whitespace is rejected. - Sign and submit
TradingPostDeclare.
Example:
cowboy trading-post version
Declare a new version and artifact for an existing declaration. Takes the same version and artifact flags as declare (--manifest-root, --code-visibility, --capability-schema-*, --term, --split, --volume-id, --claimed-root, --ibe-ciphertext-*) plus:
cowboy trading-post retire
Retire a declaration.
cowboy trading-post register-store
Register a distribution store.
The three forms conflict; omitting all of them registers empty metadata.
cowboy trading-post grant
Grant a store distribution rights for a declaration.
cowboy trading-post revoke-grant
cowboy trading-post register-artifact
Register a store artifact for an existing declaration version. The visibility pairing cannot be checked locally here (the version’s visibility lives on chain); consensus enforces it.
cowboy trading-post retire-artifact
cowboy trading-post hire
Hire a declaration version.
Behavior:
- Parse the chosen
--termspec and the payment (--asset,--amount,--token-id); print the parsed payment. - Sign and submit
TradingPostHire.
Example:
cowboy trading-post deposit
Deposit more funds into a hire.
cowboy trading-post withdraw, renew, pause, resume, revoke
Each takes a single flag:
withdraw returns unused prepaid funds; renew renews the hire; pause/resume toggle it; revoke ends it.
cowboy trading-post set-renewal
Enable or disable hire auto-renewal. Exactly one of --on or --off is required.
cowboy trading-post settle
Settle a per-call hire with a session receipt. The receipt is required and must be non-empty.
cowboy trading-post attest
Attest a manifest root.
Read subcommands
Eachget-* subcommand issues a GET against the RPC URL and pretty-prints the JSON response. No private key is used.
get-lease-authorize additionally prints allowed and reason fields before the JSON body.
Example:
Edge Cases
declareandversionfail locally if--code-visibility privatehas no IBE ciphertext, or ifpublichas one;register-artifactdefers that check to consensus.- An IBE ciphertext consisting only of whitespace (for example a file holding a stray newline) is rejected.
--token-idwith--asset cbyis an error;--asset cip20without--token-idis an error.- A CBY amount with more than 9 decimal places, or a CIP-20 amount containing a decimal point, is rejected.
set-renewalwith neither or both of--on/--offis rejected before submission.settlerequires a non-empty session receipt.- A
--termthat does not match one of the documented formats fails with the expected format in the error.