Release of ADAMANT Console v3.0.0 with a Breaking Change
0
0
The latest update of ADAMANT Console includes a breaking change, a bug fix, and a new feature. These changes aim to provide a better experience for both developers and users.

Breaking change in “get message” response
The response of the get message command now keeps the message encrypted inside the transaction.asset.chat object and introduces the transaction.decoded field for the already decrypted by ADAMANT Console message if the transaction includes the configured user’s public key.
For instance, let’s send a message with “Hello, ADAMANT!” text and use the returned transaction id to get the message:

Notice the decrypted message inside decoded field. This makes getting the decoded message easier and allows access to the original asset even when the message can be decrypted.
This also makes it more convenient for programmers to write readable code. For example, when checking if the transaction is already decoded. Here’s an example of the code, which is written in JavaScript, to show the difference from previous versions:
const { transaction } = response
if (transaction.decoded) { // instead of
console.log( // if(transaction.asset.chat.own_message)
`Decrypted message: ${transaction.decoded}`
)
}
// The encrypted message is always available now
console.log(`Encrypted message: ${transaction.asset.chat.message}`)Improved “vote for” command
The ADAMANT Console’s dependencies have been updated, including the newest version of the adamant-apipackage that enhances the reliability of the vote for command, which is used to vote for delegates.
From the CHANGELOG of the adamant-api library:
- Fixed validation of the parameters for public keys and delegate names.
- Added more detailed error messages, including a check if the given addresses are actual delegates.

More information in “client version” response
The client version command provides more information, helping users determine the loaded configuration. The new version of the ADAMANT Console introduces the following fields for the command:
- config — Path to the loaded config.
- network — Network specified in the config (mainnet or testnet).
- account — Address of the account specified by the passphrase.

Try the updated console
The guide and code source are available on GitHub: https://github.com/adamant-im/adamant-console
Release of ADAMANT Console v3.0.0 with a Breaking Change was originally published in ADAMANT on Medium, where people are continuing the conversation by highlighting and responding to this story.
0
0
Securely connect the portfolio you’re using to start.



