Skip to Content
dApps

NEAR API Reference

Create a OneKeyNearProvider instance as shown in Install the SDK. The provider exposes convenience methods and request({ method, params }).

OperationMethodResult
Detect the extensiondetectWalletInstalled()Promise<boolean>
Request account accessrequestSignIn() / near_requestAccounts{ accounts: NearAccountInfo[] }
Read exposed accountsnear_accounts{ accounts: NearAccountInfo[] }
Read selected networknear_networkInfo{ networkId: string, nodeUrls?: string[] }
DisconnectsignOut() / near_signOutAwait completion before updating connected state
Build a transactioncreateTransaction({ receiverId, actions, nonceOffset })An unsigned transaction
Sign and sendrequestSignTransactions({ transactions }) / near_sendTransactions{ transactionHashes: string[] }
Sign messagesnear_signMessages{ signatures: string[] }

NearAccountInfo contains accountId and publicKey, with optional allKeys. Array results can be empty when no account is exposed.

See Signing transactions for the signing-only request, Events for state changes, and Troubleshooting for errors. The RPC endpoint and wallet version determine which additional methods are available.

Last updated on