Type-safe bun-powered TypeScript SDK that bundles Floor Markets ABIs, GraphQL clients, and Effect HttpApi schemas for every Floors Finance app to reuse.
This package contains a shared TypeScript SDK used by the Floor Markets project. It bundles contract ABIs, a generated GraphQL client, Effect HttpApi schemas, and a client-only entry point with React hooks/providers so frontend consumers can access UI-friendly helpers without pulling server-only code.
src/index.tsexports the cross-platform entry point for the SDK and wires together the GraphQL client, schema registry, and ABI helpers that other packages consume.src/client/index.tsre-exports the client-safe React hooks and providers (built on top of the shared schemas and GraphQL client) so UI packages can import them without server-only dependencies.src/abis/hosts the TypeScript bindings for every Solidity contract (factory, module, token, etc.) so downstream code can import them without regenerating ABIs.src/graphql/contains the generated Envio client (client.ts), helper constants, subscription manager, and the auto-generatedgen/directory with runtime helpers plus the embedded GraphQL schema.src/schemas/defines the Effect HttpApi schemas (auth.schema.ts,session.schema.ts, user collections, etc.) and re-exports them throughsrc/schemas/index.tsfor easy registration insidesrc/api.ts.
Check out the Changelog to see what changed in the last releases.
bun add @floorsfi/sdkInstall Bun ( bun is the default package manager for this project ( its optional ) ):
# Supported on macOS, Linux, and WSL
curl -fsSL https://bun.sh/install | bash
# Upgrade Bun every once in a while
bun upgrageInstall Dependencies:
bun iWatching TS Problems:
bun watchFormat / Lint / Type Check:
bun format
bun lint
bun type-checkFor the Maintainer: Add NPM_TOKEN to the GitHub Secrets.
- PR with changes
- Merge PR into main
- Checkout main
git pullbun release: '' | alpha | betaoptionally add-- --release-as minor | major | 0.0.1- Make sure everything looks good (e.g. in CHANGELOG.md)
- Lastly run
bun release:pub - Done
This package is licensed - see the LICENSE file for details.