ar.io Logoar.io Documentation

TurboFactory

unauthenticated()

Creates an instance of a client that accesses Turbo's unauthenticated services.

const turbo = TurboFactory.unauthenticated();

authenticated()

Creates an instance of a client that accesses Turbo's authenticated and unauthenticated services. Requires either a signer, or private key to be provided. See the [Signers] section for all supported signers and authentication methods.

const signer = new ArweaveSigner(jwk);
const turbo = TurboFactory.authenticated({ signer });

Testnet Configuration

For development and testing, you can configure the SDK to use blockchain testnets. This allows you to test your integration with free testnet tokens without spending real cryptocurrency.

Important: The SDK defaults to mainnet. You must explicitly set the gatewayUrl parameter to use a testnet.

// Base Sepolia (recommended for testing)
const turbo = TurboFactory.authenticated({
  privateKey: process.env.BASE_SEPOLIA_PRIVATE_KEY,
  token: 'base-eth',
  gatewayUrl: 'https://sepolia.base.org', // Required for testnet
  paymentServiceConfig: {
    url: 'https://payment.services.ar-io.dev', // ar.io testnet sandbox
  },
  uploadServiceConfig: {
    url: 'https://upload.services.ar-io.dev', // ar.io testnet sandbox
  }
});

// Solana Devnet
const turbo = TurboFactory.authenticated({
  privateKey: bs58.encode(secretKey),
  token: 'solana',
  gatewayUrl: 'https://api.devnet.solana.com',
  paymentServiceConfig: {
    url: 'https://payment.services.ar-io.dev',
  },
  uploadServiceConfig: {
    url: 'https://upload.services.ar-io.dev',
  }
});

// Ethereum Sepolia
const turbo = TurboFactory.authenticated({
  privateKey: process.env.SEPOLIA_PRIVATE_KEY,
  token: 'ethereum',
  gatewayUrl: 'https://sepolia.gateway.tenderly.co',
  paymentServiceConfig: {
    url: 'https://payment.services.ar-io.dev',
  },
  uploadServiceConfig: {
    url: 'https://upload.services.ar-io.dev',
  },
});

These endpoints are the ar.io Testnet Sandbox — the full ar.io stack (upload, payment, ArNS, and gateway) running on testnet, with a faucet so nothing costs real money. Uploaded data is served from the sandbox gateway at https://ar-io.dev and is ephemeral (purged after ~3 days); it is never posted to mainnet Arweave. See the ar.io Testnet Sandbox docs.

Supported Testnets:

  • ARIO staging (ario) - Staging ARIO on Solana devnet; fee-free funding, claim from the ar.io faucet
  • Base Sepolia (base-eth) - Supports on-demand funding
  • Solana Devnet (solana) - Supports on-demand funding
  • Ethereum Sepolia (ethereum) - Manual top-up only
  • Polygon Amoy (pol) - Manual top-up only

How is this guide?