Skip to Content

NEAR

Integrate NEAR Protocol into your dApp using OneKey’s NEAR provider. OneKey provides a fully compatible NEAR wallet interface that works seamlessly with existing NEAR dApps.

Features

  • Account connection and management
  • Transaction signing and sending
  • Message signing
  • Network switching (mainnet/testnet)
  • Full RPC API support

Installation

npm install @onekeyfe/onekey-near-provider # or yarn add @onekeyfe/onekey-near-provider

Quick Start

import { OneKeyNearProvider } from '@onekeyfe/onekey-near-provider' // Create provider instance const provider = new OneKeyNearProvider() // Request account access const accounts = await provider.request({ method: 'near_accounts' }) console.log('Connected accounts:', accounts) // Get current network const network = await provider.request({ method: 'near_network' }) console.log('Current network:', network)

Documentation

Getting Started

Integration Guides

Transactions & Signing

Advanced

Reference

Error Handling

CodeMessageDescription
4001User RejectedUser denied the request
-32602Invalid ParamsMethod parameters are invalid
-32603Internal ErrorInternal JSON-RPC error
Last updated on