@@ -29,26 +29,36 @@ $ cp path_to_iroha_repo/defaults/client.toml path_to_new_directory/
2929 ::: details Expected result
3030
3131 ``` bash
32- Iroha CLI Client lets you interact with Iroha Peers Web API without direct network usage
33-
34- Usage: iroha [OPTIONS] < COMMAND>
35-
36- Commands:
37- domain The subcommand related to domains
38- account The subcommand related to accounts
39- asset The subcommand related to assets
40- peer The subcommand related to p2p networking
41- events The subcommand related to event streaming
42- wasm The subcommand related to Wasm
43- blocks The subcommand related to block streaming
44- json The subcommand related to multi-instructions as Json or Json5
45- help Print this message or the help of the given subcommand(s)
46-
47- Options:
48- -c, --config < PATH> Path to the configuration file [default: client.toml]
49- -v, --verbose More verbose output
50- -h, --help Print help
51- -V, --version Print version
32+ Iroha Client CLI provides a simple way to interact with the Iroha Web API
33+
34+ Usage: iroha [OPTIONS] < COMMAND>
35+
36+ Commands:
37+ domain Read and write domains
38+ account Read and write accounts
39+ asset Read and write assets
40+ nft Read and write NFTs
41+ peer Read and write peers
42+ events Subscribe to events: state changes, transaction/block/trigger progress
43+ blocks Subscribe to blocks
44+ multisig Read and write multi-signature accounts and transactions
45+ query Read various data
46+ transaction Read transactions and write various data
47+ role Read and write roles
48+ parameter Read and write system parameters
49+ trigger Read and write triggers
50+ executor Read and write the executor
51+ markdown-help Output CLI documentation in Markdown format
52+ help Print this message or the help of the given subcommand(s)
53+
54+ Options:
55+ -c, --config < PATH> Path to the configuration file [default: client.toml]
56+ -v, --verbose Print configuration details to stderr
57+ -m, --metadata < PATH> Path to a JSON5 file for attaching transaction metadata (optional)
58+ -i, --input Reads instructions from stdin and appends new ones
59+ -o, --output Outputs instructions to stdout without submitting them
60+ -h, --help Print help (see more with ' --help' )
61+ -V, --version Print version
5262
5363 ```
5464
@@ -81,26 +91,11 @@ The output should contain several preregistered domains.
8191::: details Expected result
8292
8393``` json
84- {
85- "id" : " garden_of_live_flowers" ,
86- "logo" : null ,
87- "metadata" : {},
88- "owned_by" : " ed01204164BF554923ECE1FD412D241036D863A6AE430476C898248B8237D77534CFC4@genesis"
89- },
90- {
91- "id" : " genesis" ,
92- "logo" : null ,
93- "metadata" : {},
94- "owned_by" : " ed01204164BF554923ECE1FD412D241036D863A6AE430476C898248B8237D77534CFC4@genesis"
95- },
96- {
97- "id" : " wonderland" ,
98- "logo" : null ,
99- "metadata" : {
100- "key" : " value"
101- },
102- "owned_by" : " ed0120CE7FA46C9DCE7EA4B125E2E36BDB63EA33073E7590AC92816AE1E861B7048B03@wonderland"
103- }
94+ [
95+ " garden_of_live_flowers" ,
96+ " genesis" ,
97+ " wonderland"
98+ ]
10499
105100```
106101
@@ -130,12 +125,12 @@ $ iroha domain list all
130125::: details Expected result
131126
132127``` json
133- {
134- "id" : " looking_glass " ,
135- "logo" : null ,
136- "metadata" : {} ,
137- "owned_by" : " ed0120CE7FA46C9DCE7EA4B125E2E36BDB63EA33073E7590AC92816AE1E861B7048B03@ wonderland"
138- },
128+ [
129+ " garden_of_live_flowers " ,
130+ " genesis " ,
131+ " looking_glass " ,
132+ " wonderland"
133+ ]
139134```
140135
141136Note that the owner of the new domain is the account specified in our config file. They performed the registration.
@@ -187,30 +182,11 @@ $ iroha account list all
187182
188183``` json
189184[
190- {
191- "id" : " ed0120E9F632D3034BAB6BB26D92AC8FD93EF878D9C5E69E01B61B4C47101884EE2F99@garden_of_live_flowers" ,
192- "metadata" : {}
193- },
194- {
195- "id" : " ed01204164BF554923ECE1FD412D241036D863A6AE430476C898248B8237D77534CFC4@genesis" ,
196- "metadata" : {}
197- },
198- {
199- "id" : " ed0120ABA0446CFBD4E12627FFA870FB37993ED83EB1AE0588184B90D832A64C24C379@looking_glass" ,
200- "metadata" : {}
201- },
202- {
203- "id" : " ed012004FF5B81046DDCCF19E2E451C45DFB6F53759D4EB30FA2EFA807284D1CC33016@wonderland" ,
204- "metadata" : {
205- "key" : " value"
206- }
207- },
208- {
209- "id" : " ed0120CE7FA46C9DCE7EA4B125E2E36BDB63EA33073E7590AC92816AE1E861B7048B03@wonderland" ,
210- "metadata" : {
211- "key" : " value"
212- }
213- }
185+ " ed0120E9F632D3034BAB6BB26D92AC8FD93EF878D9C5E69E01B61B4C47101884EE2F99@garden_of_live_flowers" ,
186+ " ed01204164BF554923ECE1FD412D241036D863A6AE430476C898248B8237D77534CFC4@genesis" ,
187+ " ed0120ABA0446CFBD4E12627FFA870FB37993ED83EB1AE0588184B90D832A64C24C379@looking_glass" ,
188+ " ed012004FF5B81046DDCCF19E2E451C45DFB6F53759D4EB30FA2EFA807284D1CC33016@wonderland" ,
189+ " ed0120CE7FA46C9DCE7EA4B125E2E36BDB63EA33073E7590AC92816AE1E861B7048B03@wonderland"
214190]
215191```
216192:::
@@ -232,8 +208,21 @@ To transfer a domain, perform the following:
2322082 . Check that the ownership changed:
233209
234210 ``` bash
235- $ iroha domain list all
211+ $ iroha domain get --id looking_glass
236212 ```
213+
214+ ::: details Expected result
215+
216+ ```json
217+ {
218+ "id": "looking_glass",
219+ "logo": null,
220+ "metadata": {},
221+ "owned_by": "ed0120ABA0446CFBD4E12627FFA870FB37993ED83EB1AE0588184B90D832A64C24C379@looking_glass"
222+ }
223+
224+ ```
225+ :::
237226
2382273 . Switch to the newly created account. For this, we need to modify the ` public_key ` , ` private_key ` , and ` domain ` in the ` client.toml ` config file with the credentials of the user we want to act as.
239228
@@ -265,10 +254,10 @@ To mint an asset, its [asset definition](/blockchain/assets) must be registered
265254To register a ` tea ` token within the ` looking_glass ` domain, run:
266255
267256``` bash
268- $ iroha asset definition register --id=" tea#looking_glass" --type= " Numeric "
257+ $ iroha asset definition register --id=" tea#looking_glass"
269258```
270259
271- The numeric ` tea ` asset is now registered within the ` looking_glass ` domain.
260+ The ` tea ` asset is now registered within the ` looking_glass ` domain.
272261
273262If you open the terminal where the Iroha network runs, you will see that all our activity caused numerous pipeline events there.
274263
@@ -288,24 +277,9 @@ $ iroha asset list all
288277
289278``` json
290279[
291- {
292- "id" : " tea##ed0120ABA0446CFBD4E12627FFA870FB37993ED83EB1AE0588184B90D832A64C24C379@looking_glass" ,
293- "value" : {
294- "Numeric" : " 100"
295- }
296- },
297- {
298- "id" : " cabbage#garden_of_live_flowers#ed0120CE7FA46C9DCE7EA4B125E2E36BDB63EA33073E7590AC92816AE1E861B7048B03@wonderland" ,
299- "value" : {
300- "Numeric" : " 44"
301- }
302- },
303- {
304- "id" : " rose##ed0120CE7FA46C9DCE7EA4B125E2E36BDB63EA33073E7590AC92816AE1E861B7048B03@wonderland" ,
305- "value" : {
306- "Numeric" : " 13"
307- }
308- }
280+ " tea##ed0120ABA0446CFBD4E12627FFA870FB37993ED83EB1AE0588184B90D832A64C24C379@looking_glass" ,
281+ " cabbage#garden_of_live_flowers#ed0120CE7FA46C9DCE7EA4B125E2E36BDB63EA33073E7590AC92816AE1E861B7048B03@wonderland" ,
282+ " rose##ed0120CE7FA46C9DCE7EA4B125E2E36BDB63EA33073E7590AC92816AE1E861B7048B03@wonderland"
309283]
310284```
311285:::
@@ -337,7 +311,7 @@ We will set up an event listener for the block pipeline.
337311From a new terminal tab/window run:
338312
339313``` bash
340- $ iroha events block-pipeline
314+ $ iroha events block
341315```
342316
343317::: details Expected result
@@ -348,14 +322,26 @@ Listening to events with filter: Pipeline(Block(BlockEventFilter { height: None,
348322 "Pipeline" : {
349323 "Block" : {
350324 "header" : {
351- "height" : 14 ,
352- "prev_block_hash" : " AF1ABC889019971D4C4E8866C347367D63A024319E50AEF989DB255F761E9D1D" ,
353- "transactions_hash" : " 7F2091D887BF9DBF6100DFEA696B06AE269C288AE55F1D281D9FDDAD93D1B8F1" ,
354- "creation_time_ms" : 1721132667162 ,
355- "view_change_index" : 1 ,
356- "consensus_estimation_ms" : 4000
325+ "height" : 17 ,
326+ "prev_block_hash" : " 0F6B562D8B3F635C46CD7BEB20C801B8C7594B56AD5F3E0CFBD596C0894885F3" ,
327+ "transactions_hash" : " 5A85B662672155A7D93DC54A132975FA4252152AB04CA224CE49C7FF97D742AB" ,
328+ "creation_time_ms" : 1742405889662 ,
329+ "view_change_index" : 2
330+ },
331+ "status" : " Created"
332+ }
333+ }
334+ }
335+ {
336+ "Pipeline" : {
337+ "Block" : {
338+ "header" : {
339+ "height" : 17 ,
340+ "prev_block_hash" : " 0F6B562D8B3F635C46CD7BEB20C801B8C7594B56AD5F3E0CFBD596C0894885F3" ,
341+ "transactions_hash" : " 5A85B662672155A7D93DC54A132975FA4252152AB04CA224CE49C7FF97D742AB" ,
342+ "creation_time_ms" : 1742405889662 ,
343+ "view_change_index" : 2
357344 },
358- "hash" : " 1CC6256356418D02F19B17487AD4F7F105AE6CD3FD129760C575066484F3EF97" ,
359345 "status" : " Approved"
360346 }
361347 }
@@ -364,14 +350,12 @@ Listening to events with filter: Pipeline(Block(BlockEventFilter { height: None,
364350 "Pipeline" : {
365351 "Block" : {
366352 "header" : {
367- "height" : 14 ,
368- "prev_block_hash" : " AF1ABC889019971D4C4E8866C347367D63A024319E50AEF989DB255F761E9D1D" ,
369- "transactions_hash" : " 7F2091D887BF9DBF6100DFEA696B06AE269C288AE55F1D281D9FDDAD93D1B8F1" ,
370- "creation_time_ms" : 1721132667162 ,
371- "view_change_index" : 1 ,
372- "consensus_estimation_ms" : 4000
353+ "height" : 17 ,
354+ "prev_block_hash" : " 0F6B562D8B3F635C46CD7BEB20C801B8C7594B56AD5F3E0CFBD596C0894885F3" ,
355+ "transactions_hash" : " 5A85B662672155A7D93DC54A132975FA4252152AB04CA224CE49C7FF97D742AB" ,
356+ "creation_time_ms" : 1742405889662 ,
357+ "view_change_index" : 2
373358 },
374- "hash" : " 99D30F9DD159A397A76E4A37143433BD302264F7509B6E154CA9C18263543857" ,
375359 "status" : " Committed"
376360 }
377361 }
@@ -380,14 +364,12 @@ Listening to events with filter: Pipeline(Block(BlockEventFilter { height: None,
380364 "Pipeline" : {
381365 "Block" : {
382366 "header" : {
383- "height" : 14 ,
384- "prev_block_hash" : " AF1ABC889019971D4C4E8866C347367D63A024319E50AEF989DB255F761E9D1D" ,
385- "transactions_hash" : " 7F2091D887BF9DBF6100DFEA696B06AE269C288AE55F1D281D9FDDAD93D1B8F1" ,
386- "creation_time_ms" : 1721132667162 ,
387- "view_change_index" : 1 ,
388- "consensus_estimation_ms" : 4000
367+ "height" : 17 ,
368+ "prev_block_hash" : " 0F6B562D8B3F635C46CD7BEB20C801B8C7594B56AD5F3E0CFBD596C0894885F3" ,
369+ "transactions_hash" : " 5A85B662672155A7D93DC54A132975FA4252152AB04CA224CE49C7FF97D742AB" ,
370+ "creation_time_ms" : 1742405889662 ,
371+ "view_change_index" : 2
389372 },
390- "hash" : " 99D30F9DD159A397A76E4A37143433BD302264F7509B6E154CA9C18263543857" ,
391373 "status" : " Applied"
392374 }
393375 }
@@ -404,6 +386,7 @@ To find out how to listen to other types of events, run the `iroha events help`
404386## What's Next
405387
406388Now that you understand the basics, you can explore these advanced documentation:
389+ - Try running a node on the [ Iroha 2-based public testnet] ( https://wiki.sora.org/running-a-sora-testnet-node.html ) on the Sora blockchain.
407390- Learn how to build on Iroha 2 with our [ SDK turorials] ( /guide/tutorials/ ) .
408391- Understand the fundamental concepts behind Iroha 2 in the [ Iroha Explained] ( /blockchain/iroha-explained ) section.
409392- Build more complex networks using the [ Configuration and Management] ( /guide/configure/overview ) section.
0 commit comments