NEAR Protocol API Integration
Overview
Near Protocol is supported by Pocket Network's enterprise-grade infrastructure with guaranteed uptime, global edge network, and developer-first tooling.
Network Information
| Property | Value |
|---|---|
| Network Name | NEAR Protocol |
| Native Token | NEAR |
| Pocket Service ID | near |
| Block Explorer | NEAR Explorer (PIKESPEAK) |
Supported APIs
| API | Documentation |
|---|---|
| JSON-RPC - NEAR RPC API | view spec |
Integration Examples
Quick Setup with near-api-js
// Using near-api-js
import { connect, keyStores } from 'near-api-js';
const config = {
networkId: 'mainnet',
keyStore: new keyStores.BrowserLocalStorageKeyStore(),
nodeUrl: 'YOUR_ENDPOINT',
walletUrl: 'https://wallet.mainnet.near.org',
helperUrl: 'https://helper.mainnet.near.org'
};
const near = await connect(config);
// Get account balance
const account = await near.account('example.near');
const balance = await account.getAccountBalance();
console.log('Account balance:', balance);
Developer Resources
📚 Essential Links
🛠️ Tools & SDKs
💬 Community & Support
Public Endpoint
Free public RPC endpoint available with fair use limits. No API key required.