How dApps Can Utilize Arweave Data Storage for NFTs on Hedera Hashgraph

DaVinciGraph
3 min readJan 29, 2023

--

Introduction:

In the world of decentralized applications (dApps), data storage is a crucial aspect to consider. One popular option for data storage is Arweave, a decentralized data storage network that offers permanent and tamper-proof storage of data. In this article, we will explore how dApps built on Hedera Hashgraph can support Arweave data storage for NFTs or any other use cases.

Step 1: Determine the type of metadata storage for NFTs

The first step is to determine the type of metadata storage that your users have chosen for their NFTs. This can be either IPFS or Arweave. We use this information to correctly read the data from the hash, as the hash format is different between IPFS and Arweave.

Step 2: Check the CID hash

NFTs or any file stored on a DLT has a CID (Content Identifier) hash.

This CID type can be IPFS or Arweave. The IPFS CID hash is 46–47 characters long while the Arweave CID hash is always 43 characters long. With a function like this, you can check the CID hash to determine if it is an Arweave hash:

export function isArweaveHash(hash:string) {
const re: RegExp = /^[a-zA-Z0–9_-]{43}$/;
const isValid: boolean = re.test(hash);
return isValid;
}

Step 3: Read the root metadata on Arweave

To read the root metadata on Arweave, use the following format: https://arweave.net/<HASH> It will return the root metadata which is a JSON file. For example: https://arweave.net/nuX_908O6GBtsji7qhM6l3ijMXljqlYgr6x8hwMzdig

Step 4: Read the hash of the image

We will read the hash of the image from the “image” field as follows: “image”:”ar://sdaJI4lhltmMQIEgvP6zZVfHcGA7OjTIyLoXHOkM5mE”

Step 5: Access the image

We obtain the hash that comes after “ar://”, which is: “sdaJI4lhltmMQIEgvP6zZVfHcGA7OjTIyLoXHOkM5mE”

Finally, we can access the image by using the format: https://arweave.net/<HASH> For example: https://arweave.net/sdaJI4lhltmMQIEgvP6zZVfHcGA7OjTIyLoXHOkM5mE

Why use Arweave for dApps?

Arweave offers a decentralized and tamper-proof solution for data storage, making it a great option for dApps built on Hedera Hashgraph. It also provides permanent storage, ensuring that data is not lost even if the dApp is no longer active. Additionally, Arweave uses a unique token-based economy, where users can earn and spend tokens to store and retrieve data, making it a cost-effective solution for dApps.

in conclusion, Arweave data storage is a great option for dApps built on Hedera Hashgraph as it offers a decentralized, tamper-proof, and cost-effective solution for data storage. Following the steps outlined in this article, dApps can easily support Arweave data storage for NFTs or any other dapps.

Arweave: https://www.arweave.org/
Hedera Hashgraph: https://hedera.com/
HashPack: https://www.hashpack.app/
DaVinciGraph: https://davincigraph.io/

--

--

DaVinciGraph
DaVinciGraph

Written by DaVinciGraph

Revolutionize the NFT Industry with AI-Powered Tools on Hedera Hashgraph.