@solidusnetwork/solidus-js
v1.0.0-alpha.55
Published
A complete and compact Solidus library, for dapps, wallets and any other tools.
Maintainers
Readme
Solidus JS SDK
This library is still under development and not ready for production use.
A complete, compact and simple library for Au and Ag, written in TypeScript.
Features
- Keep your private keys in your client, safe and sound
- Import and export BIP 39 mnemonic phrases (12 word backup phrases) and HD Wallets (English as well as Czech, French, Italian, Japanese, Korean, Simplified Chinese, Spanish, Traditional Chinese)
- Meta-classes create JavaScript objects from any contract ABI, including ABIv2 and Human-Readable ABI
- Connect to Solidus nodes over JSON-RPC
- Small (~136kb compressed; 460kb uncompressed)
- Tree-shaking focused; include only what you need during bundling
- Complete functionality for all your Solidus needs
- Extensive documentation coming soon
- Large collection of test cases which are maintained and added to
- Fully written in TypeScript, with strict types for security and safety
- MIT License (including ALL dependencies); completely open source to do with as you please
Installing
NodeJS
npm install @solidusnetwork/solidus-jsBrowser (ESM)
The bundled library is available in the ./dist/ folder in this repo.
<script type="module">
import { solidus } from "./dist/solidus.min.js";
</script>Using Local Version as Dependency in Other Projects
For developers looking to contribute to solidus-js or integrate it into their projects with local modifications, setting up a local development environment is essential.
Prepare solidus-js for Symbolic Linking
Clone the solidus-js repository and navigate into it.
git clone https://github.com/solidus-network/solidus-js.git cd solidus-jsInstall dependencies.
npm installCreate a global symbolic link for solidus-js. This makes the package available to link in any other project. Whenever a local change is made that you want to test in another project, you must run this command again to update the symbolic link.
npm run update-symlink
Linking solidus-js to Another Project
After setting up solidus-js for local development, you can link it to another project to test changes.
- Navigate to your project.
cd path/to/your/project - Link the globally linked solidus-js package to your project.
npm link @solidusnetwork/solidus-js - Build your project as needed.
Testing Changes
With solidus-js linked to your project, any changes made to the library can be immediately tested. Remember to rebuild (npm run update-symlink) after making changes.
Reverting to the Published Package
If you need to revert back to the official package published on npm:
Unlink solidus-js by removing the symlink.
npm unlink @solidusnetwork/solidus-jsReinstall from npm:
npm install @solidusnetwork/solidus-js
Documentation
Documentation for the Solidus JS SDK is under development.
Extension Packages
The @solidusnetwork/solidus-js package only includes the most common and most core
functionality to interact with Solidus Network. There are many other
packages designed to further enhance the functionality and experience.
- @solidusnetwork/solidus-polling - A package to poll Solidus Network for events and logs
Deterministic Build
Use ./build-deterministic.sh to deterministically build the solidus-js library using Docker.
License
MIT License (including all dependencies).
