Distributed, Fast, Secure; The LEGO of blockchains is back with more building blocks; From Public assets, to distributed name zones via network-wide account and assets restrictions, metadata and cross-chain atomic swaps features – Symbol from NEM is all you need from a blockchain network.
Table of contents
- What is Symbol from NEM?
- How to use Symbol from NEM?
- How to create an account with Symbol CLI?
- Available types of transaction with Symbol
- Example transaction between Alice and Bob
- Innovate with Symbol from NEM: Powering possibility
What is Symbol from NEM?
Symbol is a next-generation, open-source, decentralized blockchain platform. Thanks to a REST API, developers can integrate blockchain features in new or existing applications seamlessly and using a programming language of their choice.
Unlike other blockchain solutions, Symbol provides a predefined set of tested built-in features that solve the most common use cases for using blockchain technology through API calls. For instance, Symbol comes with plugins to handle assets management, access control, multi-signature and escrow services, and cross-chain swaps, among others.
The code that defines a Symbol application remains off-chain. This greatly reduces inherent immutability risk since devs can change parts of the application when necessary instead of defining a rigid contract that cannot change once deployed.
On top of this, Symbol technology adopts a multi-tier architecture to enhance the integration of business processes and the general performance of blockchain networks. You can find the protocol source code for Symbol in Github.
How to use Symbol from NEM?
With a multi-layer integration flow, Symbol permits working directly with a REST API layer that is easy to integrate with WebSockets and HTTP requests. Also, there are several Software Development Kits (SDK) that have been developed for Symbol: check out here.
Symbol blockchain networks provide many different transaction types that can be used to implement different business processes. In fact, these transaction types offer basic account transactions, transaction filters, and assets filters, a distributed names registry, and cross-chain interoperability. Client implementations can make use of all transaction types or only integrate with a subset of the available list.
We recommend using symbol-cli to get started. Beware that you will need minimal terminal/bash experience for what follows.
$ npm install -g symbol-cli
How to create an account with Symbol CLI?
Let’s see a concrete example of how you can create a new account that is compatible with Symbol from NEM blockchain networks. The command below produces sensitive information that you should back up safely.
Please, make sure to manage your accounts safely as with cryptocurrency you are the only one responsible for your account’s keys.
$ symbol-cli account generate \
–network MAIN_NET \
–url http://dual-001.symbol.ninja:3000 \
–password <PASSWORD> \
In the above, make sure to enter correct values for: <PASSWORD> and <PROFILE_NAME>. Also, please backup sensitive information like your account’s mnemonic pass phrase or your account’s private key.
Next, we will inspect how the generated account can be used to send transactions. In following snippets, we refer to Alice as being the default profile created above.
Available types of transaction with Symbol
Each transaction type that is validated by Symbol blockchain network nodes, is an open source plugin in the catapult-server protocol source code.
Let us now inspect some of the transaction types that are available out-of-the-box with Symbol network nodes:
- Transfer: Simple (multi-) asset transfer with the recipient and an optional message.
- NamespaceRegistration: Create names in the distributed names registry with 3-level nomenclature.
- MosaicDefinition: Create custom assets in the distributed assets registry.
- AggregateTransaction: Atomic transaction wrapper for up to 1000 inner transactions.
- HashLock: Lock funds for a certain time, depending on the duration.
- SecretLock/SecretProof: Execute asset swaps between different blockchain networks.
- AddressAlias/MosaicAlias: Attach aliases to accounts or assets using the distributed names registry.
- AccountMetadata/MosaicMetadata: Attach metadata to accounts, assets, or names.
Example transaction between Alice and Bob
As an example, let’s inspect how Alice would create a transaction if she wanted to say “Hello, Bob” and send it to Bob using a Symbol blockchain network:
$ symbol-cli transaction transfer –recipient-address <BOB_ADDRESS> –message “Hello, Bob” –profile Alice
The above command creates a transfer transaction with just a message in it. A further example below illustrates how to create custom assets on Symbol blockchain networks:
$ symbol-cli transaction mosaic –amount 100 –non-expiring –profile Alice
That’s it already, about how to create transactions and announce them using Symbol blockchain networks. Next we’ll be looking at some of the innovative features added to Symbol.
Innovate with Symbol from NEM: Powering possibility
In this section, we will use four axes to define the properties – or capabilities – of innovation as found in Symbol from NEM; namely: admission control, distributed consensus, verification and enforcement.
Symbol provides a flexible multi-level multi-signature accounts management strategy that is governed on-chain and features Push notifications over WebSockets.
Also, similarly to protobuf, Symbol transactions use a serialization schema that is developed in-house and provides simple interfaces for the definition and implementation of new transaction plugins. This serialization tool is named catbuffer and can be found in Github.
Symbol from NEM is a distributed peer-to-peer network that leverages a next-generation Proof-of-Stake mechanism where the importance of an account is calculated based on network activity.
Elliptic curve cryptography is used with the ED25519 curve to derive account keys, i.e. public keys and private keys. But on top of this, Symbol permits the use of several hashing algorithm like SHA3-256, SHA3-513 and HASH160, when using the SecretLock/SecretProof asset swap features.
Network-wide restrictions can be set up to further govern assets and/or accounts in Symbol blockchain networks. Such restrictions permit to allow or block specific assets, transaction types, and even accounts.
Extending Symbol from NEM
The Symbol technology comes with improved extensibility through a newly introduced plugin architecture. Plugins can be installed on network nodes in blockchain networks. These plugins are used in the protocol to extend the functionalities of network nodes. They can provide features that are not available with – for instance, public blockchain network nodes.
The catapult-rest Software Package is the main gateway for data retrieval in Symbol blockchain networks. A full reference of available endpoints can be found here.
Most of the integrations of Symbol, as explained earlier, happen off-chain, mapping your business logic to entities on Symbol blockchain networks. Examples of such integration flows can be found in our numerous showcase articles, as well as on Github at the following links:
- Source code for BlockSnippets Snippets Library
- Source code for MiniBusiness
- Source code for MiniCommerce
- Source code for MiniSupplyChain
- Source code for Swapable: Automated Liquidity Pools
Let the fun begin, dear readers; That would be it for today, hoping to see you #soon – using Symbol from NEM.
With this article, the Team at Using Blockchain Ltd and the Editorial Team of UBC Digital Magazine would like to share a sincere word of Congratulations to the NEM community for a successful launch of Symbol from NEM.
The blockchain network started with a nemesis block harvested on March 16th, 2021 at 00:06:25 UTC. The genesis block hash of the network is thereby BEED005B82B22FC32DA6FDF4DFEB7C11BA6A8C5C504EB7B9CCF91B9B2A09E020.
We hope that this article was insightful for you and are looking forward to any feedback and messages. Please share your thoughts in the comments section below!
This website may contain information about financial firms, employees of such firms, and/or their products and services such as real estate, stocks, bonds, and other types of investments. While this website may intend - as the author deem necessary - to provide information on financial matters and investments, such information or references should not be construed or interpreted as investment advice or viewed as an endorsement.