Wayfinder
Wayfinder is a client-side routing and verification protocol that provides decentralized, cryptographically verified access to data stored on Arweave via the AR.IO Network.
What is Wayfinder?
Wayfinder solves the challenge of reliable data access on the permaweb by:
- Intelligent Routing - Automatically selects the best gateway for each request
- Data Verification - Cryptographically verifies data integrity
- Decentralized Access - Eliminates single points of failure
- Seamless Integration - Works behind the scenes for fast, reliable access
Learn More: For detailed information about Wayfinder architecture and how it works, see our Wayfinder Documentation.
Get Started
Installation:
npm install @ar.io/wayfinder-core @ar.io/sdk
Basic Usage:
import { createWayfinderClient } from "@ar.io/wayfinder-core";
import { ARIO } from "@ar.io/sdk";
// Create wayfinder with default settings
const wayfinder = createWayfinderClient({
ario: ARIO.mainnet(),
});
// Fetch data using ar:// protocol
try {
const response = await wayfinder.request("ar://transaction-id");
const data = await response.text();
console.log("Data:", data);
} catch (error) {
console.error("Failed to fetch data:", error);
}
Full API Reference: For complete documentation of all Wayfinder core APIs, see the Wayfinder Core SDK Reference.
React Integration
For React applications, use the wayfinder-react package:
npm install @ar.io/wayfinder-react @ar.io/sdk
import { WayfinderProvider, useWayfinder } from "@ar.io/wayfinder-react";
function App() {
return (
<WayfinderProvider>
<MyComponent />
</WayfinderProvider>
);
}
function YourComponent() {
const request = useWayfinderRequest();
const [data, setData] = useState(null);
useEffect(() => {
(async () => {
const response = await request(`ar://${txId}`, {
verificationSettings: {
enabled: true,
strict: true,
},
});
const data = await response.arrayBuffer();
setData(data);
})();
}, [request, txId]);
return <div>{data && <pre>{data}</pre>}</div>;
}
Full API Reference: For complete documentation of all Wayfinder React APIs, see the Wayfinder React SDK Reference.
Why Use Wayfinder?
Wayfinder eliminates centralized points of failure by distributing data access across the decentralized AR.IO Network, reducing dependency on arweave.net and providing advanced capabilities for production applications:
Maximum Reliability
- Intelligent gateway selection eliminates single points of failure
- Automatic failover ensures data is always accessible
- Built-in retry mechanisms handle network issues gracefully
Data Verification
- Cryptographic verification ensures data integrity
- Multiple verification strategies protect against tampering
- Trust but verify approach validates all responses
Performance Optimization
- Fastest ping routing selects optimal gateways
- Round-robin distribution balances load across the network
- Caching strategies reduce latency for frequently accessed data
Production Ready
- Developer-friendly APIs with React integration
- Comprehensive error handling and logging
- Configurable routing and verification strategies
Next Steps
Get Wayfinder SDK
Start building with the Wayfinder SDK.
Simple Data Access
Use REST API for basic data retrieval.
Data Discovery
Use GraphQL to search for data.
Use ArNS for Human-Readable URLs
Create memorable names for your Arweave data.
How is this guide?