Solana Utils is a utility library for Solana-based projects, written in TypeScript. It provides simple and reusable functions to make working with Solana easier.
- Written in TypeScript for strong type safety
- Supports both CommonJS and ESModule formats
- Preconfigured with modern tooling:
Rollup,ESLint,Prettier, andJest
Before setting up the project, make sure you have the following installed:
Clone the repository and install dependencies:
git clone https://github.com/your-username/solana-utils.git
cd solana-utils
pnpm install
To compile the project and generate CommonJS and ESModule outputs:
pnpm build
The output files will be located in the dist/ directory.
To run all unit tests:
pnpm test
To watch for file changes and re-run tests:
pnpm test:watch
To check the codebase for linting errors:
pnpm lint
To format the codebase using Prettier:
pnpm format
To generate a test coverage report:
pnpm coverage
The coverage report will be generated in the coverage/ directory.
Follow these steps to publish the package to npm:
Make sure the project is built before publishing:
pnpm build
Log in to your npm account:
npm login
Update the version number in package.json following Semantic Versioning:
npm version <major|minor|patch>
Publish the package to npm:
pnpm publish --access public
Note: Make sure the
package.jsonfile has the correct"main","module", and"types"fields pointing to thedist/directory.
Contributions are welcome! Feel free to open issues or submit pull requests to improve the library.
This project is licensed under the MIT License.