DEVELOPER DOCS
Using Devnet

Using Devnet

Uploads to Irys' Devnet are paid for using free faucet tokens and are kept for approximately 60 days. Devnet is for developers who are building projects or learning how to use our SDK.

To connect to Devnet, supply the address of our Devnet node when instantiating either an Irys or WebIrys object.

RPC / Provider URL

When using Devnet with the Irys class and with our CLI, you must specify an RPC address. When using the WebIrys class, the RPC address is only required when using non-EVM chains.

ℹ️

If you encounter this message when using our SDK or CLI, make sure you are supplying the correct RPC URL for the chain you're using.

Using devnet.irys.xyz requires a dev/testnet RPC to be configured!

Irys Class (Server-side)

EVM Chains

const getIrys = async () => {
	const url = "https://devnet.irys.xyz";
	const token = "matic";
	// Devnet RPC URLs change often, use a recent one from https://chainlist.org/chain/80001
	const providerUrl = "";
 
	const irys = new Irys({
		url, // URL of the node you want to connect to
		token, // Token used for payment
		key: process.env.EVM_PRIVATE_KEY, // EVM private key
		config: { providerUrl }, // Optional provider URL, only required when using Devnet
	});
	return irys;
};

Solana

const getIrys = async () => {
	const url = "https://devnet.irys.xyz";
	const token = "solana";
	const providerUrl = "https://api.devnet.solana.com";
 
	const irys = new Irys({
		url, // URL of the node you want to connect to
		token, // Token used for payment
		key: process.env.SOL_PRIVATE_KEY, // SOL private key
		config: { providerUrl }, // Optional provider URL, only required when using Devnet
	});
	return irys;
};

WebIrys class (Browser)

EVM Chains

const getWebIrys = async () => {
	// Ethers5 provider
	await window.ethereum.enable();
	const provider = new providers.Web3Provider(window.ethereum);
 
	const url = "https://devnet.irys.xyz";
	const token = "matic";
 
	// Create a wallet object
	const wallet = { name: "ethersv5", provider: provider };
	// Use the wallet object
	const webIrys = new WebIrys({ url, token, wallet });
	await webIrys.ready();
 
	return webIrys;
};

Solana

const getWebIrys = async () => {
	await window.solana.connect();
	const provider = new PhantomWalletAdapter();
	await provider.connect();
 
	const url = "https://devnet.irys.xyz";
	const token = "solana";
	const rpcURL = "https://api.devnet.solana.com"; // Required
 
	// Create a wallet object
	const wallet = { rpcUrl: rpcURL, name: "ethersv5", provider: provider };
	// Use the wallet object
	const webIrys = new WebIrys({ url, token, wallet });
	await webIrys.ready();
 
	return webIrys;
};

CLI

See CLI documentation for examples of how to use each command with our Devnet.

irys upload myImage.png \
  -h https://devnet.irys.xyz \
  -t matic \
  -w bf20......c9885307 \
  --tags tagName1 tagValue1 tagName2 tagValue2 \
  --provider-url https://rpc-mumbai.maticvigil.com
ℹ️

Devnet RPC URLs change often, use a recent one from https://chainlist.org/chain/80001 (opens in a new tab)