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.

Arweave JWK
const jwk = await arweave.crypto.generateJWK();
const turbo = TurboFactory.authenticated({ privateKey: jwk });
ArweaveSigner
const signer = new ArweaveSigner(jwk);
const turbo = TurboFactory.authenticated({ signer });
ArconnectSigner
const signer = new ArconnectSigner(window.arweaveWallet);
const turbo = TurboFactory.authenticated({ signer });
EthereumSigner
const signer = new EthereumSigner(privateKey);
const turbo = TurboFactory.authenticated({ signer });
Ethereum Private Key
const turbo = TurboFactory.authenticated({
  privateKey: ethHexadecimalPrivateKey,
  token: 'ethereum',
});
POL (MATIC) Private Key
const turbo = TurboFactory.authenticated({
  privateKey: ethHexadecimalPrivateKey,
  token: 'pol',
});
HexSolanaSigner
const signer = new HexSolanaSigner(bs58.encode(secretKey));
const turbo = TurboFactory.authenticated({ signer });
Solana Web Wallet Adapter
const turbo = TurboFactory.authenticated({
  walletAdapter: window.solana,
  token: 'solana',
});
Solana Secret Key
const turbo = TurboFactory.authenticated({
  privateKey: bs58.encode(secretKey),
  token: 'solana',
});
KYVE Private Key
const turbo = TurboFactory.authenticated({
  privateKey: kyveHexadecimalPrivateKey,
  token: 'kyve',
});
KYVE Mnemonic
import { privateKeyFromKyveMnemonic } from '@ardrive/turbo-sdk';

const turbo = TurboFactory.authenticated({
  privateKey: privateKeyFromKyveMnemonic(mnemonic),
  token: 'kyve',
});

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.ardrive.dev', // Dev payment service
  },
  uploadServiceConfig: {
    url: 'https://upload.ardrive.dev', // Dev upload service
  }
});

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

// Ethereum Holesky
const turbo = TurboFactory.authenticated({
  privateKey: process.env.HOLESKY_PRIVATE_KEY,
  token: 'ethereum',
  gatewayUrl: 'https://ethereum-holesky-rpc.publicnode.com',
  paymentServiceConfig: {
    url: 'https://payment.ardrive.dev',
  },
  uploadServiceConfig: {
    url: 'https://upload.ardrive.dev',

});

Supported Testnets:

  • Base Sepolia (base-eth) - Supports on-demand funding
  • Solana Devnet (solana) - Supports on-demand funding
  • Ethereum Holesky (ethereum) - Manual top-up only
  • Polygon Amoy (pol) - Manual top-up only

How is this guide?