Skip to content

InverterNetwork/floors-sdk

Repository files navigation

npm latest package Build Status License npm downloads Follow on Twitter

Floor Markets Shared SDK

Type-safe bun-powered TypeScript SDK that bundles Floor Markets ABIs, GraphQL clients, and Effect HttpApi schemas for every Floors Finance app to reuse.

Summary

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.

Package Layout

  • src/index.ts exports 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.ts re-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-generated gen/ 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 through src/schemas/index.ts for easy registration inside src/api.ts.

Check out the Changelog to see what changed in the last releases.

Install

bun add @floorsfi/sdk

Install 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 upgrage

Developing

Install Dependencies:

bun i

Watching TS Problems:

bun watch

Format / Lint / Type Check:

bun format
bun lint
bun type-check

How to make a release

For the Maintainer: Add NPM_TOKEN to the GitHub Secrets.

  1. PR with changes
  2. Merge PR into main
  3. Checkout main
  4. git pull
  5. bun release: '' | alpha | beta optionally add -- --release-as minor | major | 0.0.1
  6. Make sure everything looks good (e.g. in CHANGELOG.md)
  7. Lastly run bun release:pub
  8. Done

License

This package is licensed - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages