Irys has two Bundler networks:

  • Mainnet: Uploads are paid for with real tokens. At mainnet L1 launch, all data uploaded to these bundlers will be uploaded to mainnet, with no changes to transaction IDs.
  • Devnet: Uploads are paid for with free faucet tokens. Data is deleted after ~60 days.

As well as an L1 testnet.

ℹ️

The following code is for using ethereum only, we also have examples covering all of the tokens we support for payment.

import { Uploader } from "@irys/upload";
import { Ethereum } from "@irys/upload-ethereum";
 
const getIrysUploader = async () => {
  const irysUploader = await Uploader(Ethereum).withWallet(process.env.PRIVATE_KEY);
  return irysUploader;
};

ℹ️

The following code is for using ethereum only, we also have examples covering all of the tokens we support for payment.

To connect to devnet, append the functions withRpc() and devnet(). RPC URLs are required when using devnet.

import { Uploader } from "@irys/upload";
import { Ethereum } from "@irys/upload-ethereum";
 
const getIrysUploader = async () => {
  // RPC URLs change often. Use a current one from https://chainlist.org/
  const rpcURL = ""; 
  const irysUploader = await Uploader(Ethereum)
    .withWallet(process.env.PRIVATE_KEY)
    .withRpc(rpcURL)
    .devnet();

  return irysUploader;
};