Shared TypeScript library for Formfunction Solana program repos. This repo contains shared TS code which is used in our various program SDKs.
βββ src # Source folder
β βββ constants # Constants
β βββ instructions # Instruction helper functions
β βββ pdas # PDA helper functions
β βββ tests # Unit tests for helper functions
β βββ types # Shared types
β βββ utils # General helper functions
β βββ index.ts # Library exports
βββ ... # Other misc. project config
βββ README.md
Complete the following to setup your environment:
Once you have your environment setup you can run the following:
# Install dependencies
$ yarn
# Run prettier checks
$ yarn prettier
# Run eslint checks
$ yarn eslint
# Run prettier and eslint with auto-fix flag
$ yarn lint
# Compile TypeScript code
$ yarn tsc
# Build the library
$ yarn build
# Run unit tests
$ yarn test
Releases are based on git tags. There is a GitHub Action which is responsible for running releases.
Follow these steps to publish a new version of the library:
- Run
yarn version
and enter a new appropriate semver version for the npm package. That will create a new tag and commit. - Run
git push origin NEW_TAG
. git push
the new commit as well.- Wait for the GitHub action to build and publish the library.
- Update client SDKs by running
yarn add @formfunction-hq/formfunction-program-shared@latest
.