API Docs

Funds the Irys node you connected to with the specified amount of tokens. Fund the node you intend to upload to, funded balances are not shared between nodes.

For more information on how funding and withdrawing are handled, see our docs.


  • amount: The amount to fund (in atomic units)
  • multiplier: Fee multiplier (optional)


  • response: A JSON object with the following values
response = {
	id, // The transaction id of the fund transfer
	quantity, // How much is being transferred
	reward, // The amount taken by the network as a fee
	target, // The address the funds were sent to

Upfront funding

You can up-front fund a node, where you send over enough funds to cover all of a project’s uploads. When upfront funding, you may want to write a script to monitor your stored balance, topping up when needed.

try {
	const irys = await getIrys();
	const fundTx = await;
	console.log(`Successfully funded ${irys.utils.fromAtomic(fundTx.quantity)} ${irys.token}`);
} catch (e) {
	console.log("Error funding node ", e);


You can also lazy-fund a node where you check the cost to upload each file first and then transfer exact funds. This works best with currencies like MATIC, ETH and SOL whose balances post (almost) instantly.

try {
	const irys = await getIrys();
	const pathToFile = "./llama.png";
	const { size } = await fs.promises.stat(pathToFile);
	const price = await irys.getPrice(size);
	const { id } = await irys.uploadFile(pathToFile);
	console.log(`${pathToFile} --> Uploaded to${id}`);
} catch (e) {
	console.log("Error funding node ", e);

Not all calls to will post immediately to your account, some blockchains are faster than others. When funding with AR, it can take upwards of 40 minutes before the balance post. For MATIC, ETH and SOL, balances will usually post in < 10s.

Fee multiplier

The multiplier parameter multiplies the fees we allow the network to take, in effect prioritising the transaction. Normally you can safely ignore this parameter, however if you're experiencing errors when funding, you can try passing a value of 1.2 or more.

try {
	const irys = await getIrys();
	const fundTx = await, 1.2);
	console.log(`Successfully funded ${irys.utils.fromAtomic(fundTx.quantity)} ${irys.token}`);
} catch (e) {
	console.log("Error funding node ", e);

Paid RPCs

When transferring tokens we use public RPCs. Sometimes these can be slow to confirm transactions. If you're experiencing an error when funding, consider using a paid RPC.

const url = "";
const providerUrl = ""; // Paid RPC URL
const currency = "matic";
const privateKey = process.env.PRIVATE_KEY;
const irys = new Irys({
	url: url, // URL of the node you want to connect to
	currency: currency, // Currency used for payment
	key: privateKey, // ETH or SOL private key
	config: { providerUrl },