Hedera Hashgraph: getting started
By: Sreejith Kaimal
Tags: Hashgraph, Getting Started, Blockchain, Hederahashgraph, Development

A non technical blog for one to get one started on the Hedera Hashgraph platform.

Hashgraph is a super-fast distributed ledger that allows you to build decentralized applications (DAPP) on the public (currently permissioned) nodes that are run by the Hedera Governance council. Read the previous blog about the rich feature set.

The below picture depicts a broad level grouping of the services available for anyone who wants to build on top of Hedera Hashgraph.

Grouping of Hashgraph Crypto & File Services

Hashgraph Smart Contact Service

To pick the right service for your use case to build a great decentralized application, one needs to know the benefits & caveats.It helps to do a volume, cost and throughput analysis on the same for the scenarios.

Accounts & Keys

1. Create a Key-Pair : The key structure on the hedera network can support a variety of complex combinations based on the use case. The signature required for the transactions has to be in parity with the keys on your account. The network currently supports ED25519 keys, including BIP39 implementation with HD wallet capabilities.The below picture can be a best demonstration of how your keys can be setup.

Keys & Signatures

To create a key, you can install the iOS or Android app by looking up ‘Hedera Wallet’ on Appstore or play store. The mobile wallet can create a BIP39 compliant wallet that you can port it on the Hardware devices also.

The support the ECDSA and RSA key will be added in the future.

2. Create a Hedera Account : to access, build and deploy services on the Hashgraph network, you need an account along with the native crypto-currency ℏ(HBar). You can request an account by signing up on the hedera portal [3] or ask for an existing Hedera account holder to create an account for you. Your account can be uniquely identified using the qualifier

[shard].[realm].[accountID]

Both portal & wallet will create an account with a simple key. To change your account keys, you can use the SDK to update your account with a more complex key structure as shown in the above picture.

Developing on the Hashgraph network

You need to get familiarized with the following basic concepts

1. Google Protocol Buffer [1] — You will need to use the protobuf objects to interact with the network. The proto definitions can be found on the open source repo for the Hashgraph project [2], the HAPI.html has a detailed description on the specifics of transaction details, validation and business rules.

2. GRPC [5]– A high performance RPC framework that supports protobuf objects. You would use a GRPC client to send & receive transactions (wrapped inside a protobuf object).

3. Hedera SDK & Quickstarts: There are a bunch of re-usable code, examples and quickstart projects that you can use for building on the platform. Best part is that there is a public testnet that you can use for a POC, which does not need any real money.

Preparing a Transaction for the service

Each service on the network allows you to send a payload of data, validate & perform an action on the network. There is an associated fee based on the type of transaction being sent. A transaction , as shown in the below picture looks like this. The greyed out objects are deprecated.

Transaction Proto Object

The lifecycle of a transaction on the network can be visualized as shown below, any node on the network takes a tx , validates and then sends it over to all other nodes for consensus.

Client needs to ask any node on the network to know the status of the transaction the client sent. Client can ask for Receipt or Records. Receipt is simply the status of the transaction. To obtain more details about a transaction, one can ask for a record. There are various setting on your account that can generate a record. More developer resources are available on the Hedera blog.

References

1. Protocol Buffers Documentation https://developers.google.com/protocol-buffers

2. Hedera Hashgraph probuf repository https://github.com/hashgraph/hedera-protobuf

3. Hedera Portal https://portal.hedera.com/register

4. Download the wallet https://apps.apple.com/us/app/hedera-wallet/id1442631626

5. GRPC documentation https://grpc.io/docs/

6. Hedera Java SDK https://github.com/hashgraph/hedera-sdk-java

7. Hedera CLI https://github.com/hashgraph/hedera-cli

8. Hedera Documents https://docs.hedera.com/docs/introduction