API Docs

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


- amount: The amount to fund. Value should be in atomic units.


- 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.

try {
  const response = await;
    `Funding successful txID=${} amount funded=${response.quantity}`
} 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.

import Bundlr from "@bundlr-network/client";
import * as fs from "fs";
const bundlr = new Bundlr(
const pathToFile = "./llama.png";
const { size } = await fs.promises.stat(pathToFile);
const price = await bundlr.getPrice(size);
const { id } = await bundlr.uploadFile(pathToFile);
console.log(`${pathToFile} --> Uploaded to${id}`);

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 shows up. For MATIC, ETH and SOL, balances will usually post in < 10s.