Clive Updates - The `Custom JSON` operation is now available in CLI Clive

We took the next step in our journey to make all of the HIVE operations available in Clive - in this release operation Custom JSON is available in CLI (command line interface).

We made improvements regarding TUI - alarm management and Savings look better. We added additional descriptions to the onboarding process to help a new user go through the process more smoothly.

In CLI we focused on correcting issues, for example, we improved the presentation of recurrent transfers.

Custom JSON operation

Thanks to the custom JSON operation you may store any JSON document in the blockchain. This is a way for second layer apps to add operations specific to their needs.

While blogging you use this operation when, for instance, you reblog or pin a post or mute or follow a user.

We plan to implement commands for standard operations sent as custom-json (follow, communities, reblog, rc_delegation).

Creating custom JSON operation using CLI

To create a custom JSON operation you need an id and a JSON document - it can be a path to a file or a string. You have to define whether it requires posting (option --authorize) or active authority (option --authorize-by-active). If you want your operation to require more than one active or posting authority, you can specify option --authorize or --authorize-by-active multiple times. Posting and active authorities are mutually exclusive like in all transactions.
image4.png
Example 1:

User guest4test4 has a profile in Clive. The user wants to follow user guest4test3.

clive process custom-json --id follow --json '["follow",{"follower":"guest4test4","following":"guest4test3","what":["blog"]}]' --sign alias2 --password alicealice

image6.png
You can find this transaction here:

https://explore.openhive.network/transaction/4750b7004e62230e92f4c5466dfe05afea9a97a8

Example 2:

User guest4test4 has a profile in Clive. The user wants to follow user guest4test6. The user uses the file test3.json with prepared operation inside.

File test3.json
image2.png

clive process custom-json --id follow --json test3.json --sign alias2 --password alicealice

image5.png
You can find this transaction here:

https://explore.openhive.network/transaction/b6bc813131dfc3fedd6d5b0f2e1d585fb81805a6

Creating custom json that required two authorities

In order to do it, the first user creates an operation, signs it and saves it to file, then the second user takes the signed operation, signs it as well and broadcasts it.

It is possible to do it using CLI.

Example:

Users guest4test4 and guest4test1 have profiles in Clive. User guest4test4 wants to create a custom json operation that requires signatures of users guest4test4 and guest4test1.

  1. User guest4test4 creates an operation and defines that posting authorities of users guest4test4 and guest4test1 are needed. User guest4test4 saves the operation to file custom.json.
clive process custom-json --id 1 --json '"custom json operation"' --authorize guest4test4 --authorize guest4test1 --sign alias2 --password alicealice --save-file custom.json --no-broadcast

image1.png

  1. User guest4test1 signs the transaction stored in the file and broadcasts the transaction.
clive process transaction --from-file custom.json --already-signed-mode multisign --profile-name alice1 --password alicealice --sign alias2

image3.png

Command schema

Complete list of corrected issues

More info about running Clive can be found here: Clive - alpha release. Please make sure you are using the most recent version: v1.27.5.13

TL;DR

docker run -ti hiveio/clive:v1.27.5.13

Your feedback is invaluable and always welcome.



0
0
0.000
2 comments
avatar

Congratulations @thebeedevs! You have completed the following achievement on the Hive blockchain And have been rewarded with New badge(s)

You received more than 3250 upvotes.
Your next target is to reach 3500 upvotes.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Check out our last posts:

LEO Power Up Day - July 15, 2024
0
0
0.000
avatar

Hello thebeedevs!

It's nice to let you know that your article won 🥈 place.
Your post is among the best articles voted 7 days ago by the @hive-lu | King Lucoin Curator by szejq

You and your curator receive 0.1539 Lu (Lucoin) investment token and a 9.43% share of the reward from Daily Report 361. Additionally, you can also receive a unique LUSILVER token for taking 2nd place. All you need to do is reblog this report of the day with your winnings.

2.png


Invest in the Lu token (Lucoin) and get paid. With 50 Lu in your wallet, you also become the curator of the @hive-lu which follows your upvote.
Buy Lu on the Hive-Engine exchange | World of Lu created by @szejq

If you no longer want to receive notifications, reply to this comment with the word STOP or to resume write a word START

0
0
0.000