From 594b866fcead09b497cdede92bcc638edacd672e Mon Sep 17 00:00:00 2001 From: Stukalov-A-M Date: Fri, 9 Feb 2024 19:30:35 +0100 Subject: [PATCH] [ADD]: unregister-accounts Signed-off-by: Stukalov-A-M --- src/cookbook/check-status.md | 4 ++++ src/cookbook/unregister-accounts.md | 11 ++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/cookbook/check-status.md b/src/cookbook/check-status.md index fb6ba6b54..eed9c4981 100644 --- a/src/cookbook/check-status.md +++ b/src/cookbook/check-status.md @@ -14,6 +14,10 @@ head: ```rust // To get the status, the Client struct already has a function get_status(), // so you may just execute it. + // The result message will include a deserialized json object with parameters like: + // Quantity of peers + // Quantity of blocks + // Quantity of accepted and rejected transactions and some more let status = iroha_client.get_status().unwrap(); println!("{:?}", status); ``` \ No newline at end of file diff --git a/src/cookbook/unregister-accounts.md b/src/cookbook/unregister-accounts.md index 3411a0796..8c6cbadac 100644 --- a/src/cookbook/unregister-accounts.md +++ b/src/cookbook/unregister-accounts.md @@ -11,4 +11,13 @@ head: # How to Unregister Accounts -TODO \ No newline at end of file +```rust + //Note: + // Only domain owner or account with appropriate permission token can unregister another account + //First we need to define an account id that we want to unregister + let account_id = AccountId::from_str("artem@disneyland").unwrap(); + //Then we need to define an Unregister expression + let expression = UnregisterExpr::new(account_id); + //And finally we need to send the transaction + iroha_client.submit_blocking(expression).unwrap(); +``` \ No newline at end of file