We have generated TypeScript client bindings for the attester-registry and attestation-registry contracts.
We will publish the bindings as a dedicated npm package under the @lafiya organization (e.g., @lafiya/contract-bindings). This package will be versioned independently and can be consumed by lafiya-web via a standard npm dependency.
- Discoverability: An npm package is the most common way for JavaScript/TypeScript projects to consume reusable libraries.
- Versioning: Allows us to release updates without touching the
lafiya-webrepo. - CI/CD: We can automate publishing using GitHub Actions once a release tag is created.
- Add a
package.jsonat the root of thebindingsdirectory (already present). - Configure the
publishConfigto scope the package to the@lafiyaorg. - Run
npm publish --access publicfrom thebindingsdirectory when ready. - Update
lafiya-webto depend on@lafiya/contract-bindingswith the appropriate version range.
- The maintainer of
lafiya-webshould add@lafiya/contract-bindingsas a dependency in itspackage.json. - Future changes to the contracts will trigger a new version publish, and
lafiya-webcan update its lockfile accordingly.
Generated by Antigravity.