Awesome
NEAR JavaScript API
NEAR JavaScript API is a complete library to interact with the NEAR blockchain. You can use it in the browser, or in Node.js runtime.
Documentation
-
Learn how to use the library in your project
-
Read the TypeDoc API documentation
-
Cookbook with common use cases
-
To quickly get started with integrating NEAR in a web browser, read our Web Frontend integration article.
Contribute to this library
-
Install dependencies
pnpm install
-
Run continuous build with:
pnpm -r compile -w
Publish
Prepare dist
version by running:
pnpm dist
Integration Test
Start the node by following instructions from nearcore, then
pnpm test
Tests use sample contract from near-hello
npm package, see https://github.com/nearprotocol/near-hello
Update error schema
Follow next steps:
- Optionally, set a specific hash for the commit with errors in the nearcore
- Fetch new schema:
node fetch_error_schema.js
pnpm build
andpnpm test
to check tests still workpnpm changeset
to generate a changeset with a minor bump for the @near-js/utils package- commit all changes and submit a PR on GitHub
Packages
<!-- https://www.figma.com/file/TzAPceViAbYW6A6KAuEMCe/NAJ-packages?t=N9nlkGBoAx9FYxoN-1 -->- accounts account creation & management
- crypto cryptographic key pairs & signing
- keystores general-purpose key persistence & management
- keystores-browser browser keystores
- keystores-node NodeJS keystores
- providers RPC interaction
- transactions transaction composition & signing
- types common types
- utils common methods
- wallet-account accounts in browser-based wallets
Example Templates
To help you get started quickly, we have prepared example templates for popular frameworks:
License
This repository is distributed under the terms of both the MIT license and the Apache License (Version 2.0). See LICENSE and LICENSE-APACHE for details.