Announcing the Harmony Marketplace SDK Suite by Blockcoders

Blockchain development has just gotten a whole lot easier for Harmony ecosystem developers. BlockCoders is excited to announce the release of its highly anticipated Harmony Marketplace SDK suite. The creation of this SDK would aid in pushing the boundaries of open source infrastructure development in a variety of ecosystems.

The BlockCoders team decided to commit to helping Harmony to become more widely known and used, especially among developer teams. The SDK solution was born to improve the usability of NFTs on Harmony, assisting developers in building and shipping products and projects faster.

Harmony has identified a massive opportunity within NFTs with the creation of NFT standards like the HRC721 and HRC1155. The HRC721 standard allows developers to wrap ERC-721 as HRC-721 tokens. This project serves as a jumping-off point for developers coming from other ecosystems, such as Ethereum or Polygon, with the goal of improving NFT development on Harmony.

Vision

The vision of this project is to make NFTs usable in the Harmony platform and to achieve widespread adoption. The plan is to develop an SDK that will make it simple to mint, claim, burn, and even transfer any NFT to other chains such as Ethereum or Polygon.

A little fact is that Harmony (ONE) is a blockchain-based decentralized platform that provides tools and functionalities for developing, hosting, managing, and deploying Dapps with maximum scalability and interoperability. Harmony believes that the network’s massive scalability, combined with decentralization and security, will enable the blockchain to accomplish feats that were previously impractical on other blockchain networks.

The BlockCoders team aims to improve the NFT smart contract experience by ensuring the following:

  • Harmony-marketplace-SDK will be an open source library that will enable the development of Marketplaces on Harmony via the matic.js ERC721 interface on the Polygon network.
  • It will be the starting point for any platform or developer looking for a simple and secure way to interact with NFTs on Harmony.
  • Harmony-marketplace-SDK will provide a general implementation of the SDK client and abstraction in case the user wants to extend the library in addition to a standard implementation.
  • Support and community building is also a top notion of the BlockCoders team. This would help valuable community members to provide feedback, contribute to decision-making processes and also technical support answers to help you get started with the SDK.

To summarize, we believe in the future of NFTs on the Harmony blockchain, and the Harmony Marketplace SDK is our effort to build it the right way — on Harmony.

The Current Release 🎉

For Harmony marketplaces or platforms looking for a set of tools to easily integrate NFT functionality, the SDK should be the starting point. It will follow the same folder structure as ethers.js, with each package handling a different aspect of NFT contracts as the SDK is based on Harmony.js.

It also includes proper documentation on how to use the library and how to extend it if a different implementation is required.

Developers will be able to customize the library’s default implementation of standard NFT smart contracts. Furthermore, the library will include features not found in NFT smart contracts but that may be useful for development.

A Closer Look at the SDK

Want to give it a try? Easy peasy: install it from npm and import it into your project!

Installation

npm i harmony-marketplace-sdk

Usage

Include HRC721’s Node.js classes in your code:

// JavaScript
const { HRC721 } = require(‘harmony-marketplace-sdk’)
// TypeScript
import { HRC721 } from ‘harmony-marketplace-sdk’

Harmony Marketplace SDK includes three wallet implementations that make it simple to create a Signer from a private key or mnemonic. You can check the documentation here to see how to implement them.

Base Token

Harmony Marketplace SDK provides a collection of interfaces to interact with HRC20, HRC721, HRC1155, and BridgeToken API for any Smart Contracts that extend those standards.

HRC20 API

HRC20 is nothing but an ERC20 token deployed on Harmony. The HRC20 API accepts methods like totalSupply, decimals, transfer, balanceOf, symbol, name, approve. You can check the documentation here on how they are implemented and the expected events.

Here is how you can initialize the HRC20 API:

import { PrivateKey, HarmonyShards, HRC20 } from ‘harmony-marketplace-sdk’ 
import * as ABI from ‘./abi.json’
const wallet = new PrivateKey( HarmonyShards.SHARD_0, ‘45e497bd45a9049bcb649016594489ac67b9f052a6cdf5cb74ee2427a60bf25e’ )
// A contract instance
const contract = new HRC20(‘0x…00’, ABI, wallet)

HRC721 API

HRC721 is a standard for representing ownership of non-fungible tokens, such as those used in real estate or collectibles. The HRC721 API accepts methods like transferFrom, setTrasferFrom, balanceOf, approve, totalSupply, ownerOf, tokenURI, symbol, name. You can check the documentation here on how they are implemented and the expected events.

Here is how you can initialize the HRC721 API:

import { HttpProvider } from ‘@harmony-js/network’
import { PrivateKey, HarmonyShards, HRC721 } from ‘harmony-marketplace-sdk’
import * as ABI from ‘./abi.json’
const wallet = new PrivateKey(
new HttpProvider(HarmonyShards.SHARD_0),
‘45e497bd45a9049bcb649016594489ac67b9f052a6cdf5cb74ee2427a60bf25e’)
// A contract instance
const contract = new HRC721(‘0x…00’, ABI, wallet)

HRC1155 API

The HRC1155 is a tradable smart contract standard, an improvement of HRC721. It enhances convenience and scalability by adding more token operation methods and supporting batch operations.

The HRC721 API accepts methods like owner, tokenURIPrefix, balanceOfBatch, contractURI. You can check the documentation here on how they are implemented and the expected events.

Here is how you can initialize the HRC721 API:

import { HttpProvider } from ‘@harmony-js/network’
import { PrivateKey, HarmonyShards, HRC1155 } from ‘harmony-marketplace-sdk’
import * as ABI from ‘./abi.json’
const wallet = new PrivateKey(
new HttpProvider(HarmonyShards.SHARD_0),
‘45e497bd45a9049bcb649016594489ac67b9f052a6cdf5cb74ee2427a60bf25e’)
// A contract instance
const contract = new HRC1155(‘0x…00’, ABI, wallet)

BridgeToken API

This API allows you send tokens to Ethereum from Harmony and vice versa, you can check the documentation on how this works:

// Send tokens from Harmony to Ethereum
const { addr, receiptId } = await bridge.sendToken(
BridgeType.HMY_TO_ETH,
sender,
recipient,
token,
tokenInfo,
)
// Send tokens from Ethereum to Harmony
const { addr, receiptId } = await bridge.sendToken(
BridgeType.ETH_TO_HMY,
sender,
recipient,
token,
tokenInfo,
)

Future Work

We intend to make a significant contribution to the community by making NFTs on Harmony simple and convenient for developers. We are also building a community of developers and designers who are keen to learn, build and use the SDK. The intent is to share our knowledge by hosting online workshops, providing support, and managing relations with the community.

On a more abstract level, our plans for the future of this library include expanding it beyond NFT and providing something similar to ethers.js for the harmony community. We are deeply invested in the DeFi ecosystem, and we believe that Harmony is the ecosystem’s future. As a result, we are very excited to help improve Harmony’s potential by developing tools that can be widely used.

Get Involved

Visit our GitHub Repository and give us a star if you share our excitement about the release of the Harmony Marketplace SDK. Check out our public GitHub repository if you’re interested in contributing to the open-source SDK.

Finally, check out the SDK’s documentation brief to learn more.

Interested in working with BlockCoders? JOIN US, PLEASE! Our team is excited to work with amazing talent all over the world. Indicate your interest by contacting us at hello@blockcoders.io!

Learn more about BlockCoders by visiting our website, through our post, via Twitter, or by visiting the BlockCoders GitHub.

Harmony has also partnered with Encode to host an Hackathon dedicated to educating developers about blockchain through the lens of Harmony. The Hackathon is seto to launch on the 27th of September and will run till Novemebr 2022 where the best projects from the hackathon pitch for the top prizes during the Finale and Prizegiving event.

The hackathon will help the community of developers in using, implementing solutions, building tutorials and products using the Harmony Marketplace SDK. You can register here as the BlockCoders team would be providing developer support and technical workshops during the period of the Hackathon.

You can find more information on the Encode hackathon and the educative series here.

Closing Note/Acknowledgement

We would especially like to thank Harmony for sponsoring this project. Also, Jose Ramirez and Fernando Sirni of the BlockCoders team for developing the SDK and the related examples. Their tireless efforts made it feasible for this SDK to provide developers who wish to create applications for the Harmony network with considerable advantages. Use the SDK GitHub issues to provide comments and recommendations for improvements.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
BlockCoders

BlockCoders

2 Followers

We’re a web3 team building developer tooling, SDKs, APIs & DApps.