Turbo SDKAPIs
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.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 Sepolia
const turbo = TurboFactory.authenticated({
privateKey: process.env.SEPOLIA_PRIVATE_KEY,
token: 'ethereum',
gatewayUrl: 'https://sepolia.gateway.tenderly.co',
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 Sepolia (
ethereum) - Manual top-up only - Polygon Amoy (
pol) - Manual top-up only
How is this guide?