solana-validator.js
v1.2.1
Published
Javascript Solana RPC provider
Downloads
14
Readme
[!NOTE] This is the maintenance branch for the 1.x line of
@solana/validator.js. You can find the successor to this library here.
Solana Validator JavaScript SDK (v1.x)
Use this to interact with accounts and programs on the Solana network through the Solana JSON RPC API.
Installation
For use in Node.js or a web application
$ npm install --save @solana-validator.js@1For use in a browser, without a build system
<!-- Development (un-minified) -->
<script src="https://unpkg.com/solana-validator.js@latest/lib/index.iife.js"></script>
<!-- Production (minified) -->
<script src="https://unpkg.com/solana-validator.js@latest/lib/index.iife.min.js"></script>Documentation and examples
- The Solana Cookbook has extensive task-based documentation using this library.
- For more detail on individual functions, see the latest API Documentation
Getting help
Have a question or a problem? Check the Solana Stack Exchange to see if anyone else is having the same one. If not, post a new question.
Include:
- A detailed description of what you're trying to achieve
- Source code, if possible
- The text of any errors you encountered, with stacktraces if available
Compatibility
This library requires a JavaScript runtime that supports BigInt and the exponentiation operator. Both are supported in the following runtimes:
- Runtimes, by version:
- Deno: >=1.0
- Node: >=10.4.0
- React Native:
- >=0.7.0 using the Hermes engine (integration guide):
Development environment setup
Testing
Unit tests
To run the full suite of unit tests, execute the following in the root:
$ npm testIntegration tests
Integration tests require a validator client running on your machine.
To install a test validator:
$ npm run test:solana-validator.js:setupTo start the test validator and run all of the integration tests in live mode:
$ cd packages/library-legacy
$ npm run test:solana-validator.jsContributing
If you found a bug or would like to request a feature, please file an issue. If, based on the discussion on an issue you would like to offer a code change, please make a pull request. If neither of these describes what you would like to contribute, read the getting help section above.
