near-api-js
near-api-js copied to clipboard
JavaScript library to interact with NEAR Protocol via RPC API
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
yarn
-
Run continuous build with:
yarn build -- -w
Publish
Prepare dist
version by running:
yarn dist
When publishing to npm use np.
Integration Test
Start the node by following instructions from nearcore, then
yarn test
Tests use sample contract from near-hello
npm package, see https://github.com/nearprotocol/near-hello
Update error schema
Follow next steps:
- Change hash for the commit with errors in the nearcore
- Fetch new schema:
node fetch_error_schema.js
-
yarn build
to updatelib/**.js
files
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.