Cookbook Community Meetup - 12pm ET / 5pm GMT every week on Wednesdays



Contributors: Justin Shaw, Luke Cassady-Dorion, mogulx_operates
Last Updated:

Hello World (NodeJS)

This guide walks you through the most simple way to get data on to the permaweb using arweave-js and irys.

With Arweave 2.6 only allowing 1000 items per block, directly posting to the gateway (eg. using arweave-js) will likely be uncommon.



Using a terminal/console window create a new folder called hw-nodejs.


cd hw-nodejs
npm init -y
npm install arweave @irys/sdk

Generate a wallet

node -e "require('arweave').init({}).wallets.generate().then(JSON.stringify).then(console.log.bind(console))" > wallet.json

Upload using Irys (Previously Bundlr)

Uploads of less than 100 KiB are currently free on Irys' Node 2.

import Irys from "@irys/sdk";
import fs from "fs";

const jwk = JSON.parse(fs.readFileSync("wallet.json").toString());
const url = "";
const token = "arweave";

const irys = new Irys({
	url, // URL of the node you want to connect to
	token, // Token used for payment and signing
	jwk, // Arweave wallet

const dataToUpload = "GM world.";

try {
	const receipt = await irys.upload(dataToUpload);
	console.log(`Data uploaded ==>${}`);
} catch (e) {
	console.log("Error uploading data ", e);

Upload using ArweaveJS

If you are running the latest version of nodejs this arweavejs script will work as is. For other versions you may need to use the --experimental-fetch flag.

import Arweave from "arweave";
import fs from "fs";

// load the JWK wallet key file from disk
const jwk = JSON.parse(fs.readFileSync('./wallet.json').toString());

// initialize arweave
const arweave = Arweave.init({
  host: "",
  port: 443,
  protocol: "https",

const tx = await arweave.createTransaction(
    data: "Hello world!",

await arweave.transactions.sign(tx, jwk);;