chainabit bits chain
Attach a configured Bit to a Chain; membership does not imply execution
Synopsis
chainabit bits chain <bit-id> --input <json> [options]Arguments
| Argument | Description | Default |
|---|---|---|
<bit-id> | Required. | — |
Options
| Option | Description | Default |
|---|---|---|
--input <json> | Chain ID, expected Bit/Chain revisions and execution profile ID. Required. | — |
Options shared by every command are described in Global options and shared behavior.
Alias of: chainabit bit chain.
Behavior
Attaches a configured Bit to a Chain using the expected Bit/Chain revisions and execution profile. This changes membership without executing the Bit and rejects stale or unauthorised composition state.
Refused by the API. Once a Bit belongs to a Chain, its Agent runs it there on its own, and those runs are billed, so an attachment starts only after a person has seen the billed notice and confirmed it in the Chainabit web app. The CLI cannot show that notice: the API refuses the request before it reads or changes anything, the command exits with code 4 and the message Show the billed unattended notice and confirm it before continuing., and the Bit's Chains are unchanged. Attach the Bit in the web app, or ask Chao to do it.
Validation
The JSON object contains chainId, expectedBitRevision, expectedChainRevision and executionProfileId. Use current decimal-string revisions for both resources; the example revision 1 is illustrative and not a default.
Examples
chainabit bits chain 00000000-0000-4000-8000-000000000001 --input '{"chainId":"00000000-0000-4000-8000-000000000002","expectedBitRevision":"1","expectedChainRevision":"1","executionProfileId":"00000000-0000-4000-8000-000000000003"}'