Skip to content

wildcat-finance/wildcat.ts

Repository files navigation

wildcat sdk

TypeScript SDK for interacting with Wildcat markets, controllers, and managing our onchain state

Table of Contents

  1. Overview
  2. Development Workflow
  3. App Integration Testing
  4. Releases
  5. Branch Strategy

Overview

wildcat.ts exposes typed helpers for working with Wildcat markets: querying controllers, inspecting market state, and managing lender or borrower activity. the sdk bundles contract typings, gql fragments, utils and constants like deployment addresses, rpc urls, sugraph urls etc. The main app is the consumer.

The most likely scenario for working in this repo is while also working on app side. Theres a section below specifically on how to manage this as a local dependency.

For local development inside this repo run yarn build (or npm run build) to compile TypeScript output before linking or publishing

Development Workflow

  • Code generation: run yarn codegen (or npm run codegen) whenever contracts in contracts/ or GraphQL fragments in gql/ change. This invokes:
    • yarn codegen:gql → rebuilds typed gql
    • yarn codegen:typechain → regenerates typeChain bindings and exports
  • Build: yarn build (or npm run build) outputs the package defined by tsconfig.prod.json.

App Integration Testing

To validate SDK changes against wildcat-app-v2:

  1. Run npm pack (or yarn npm pack) in this repository to produce a local tarball in the project root.
  2. in the app repo, update package.json to point to the new .tgz file (e.g. "@wildcatfi/wildcat-sdk": "file:../wildcat.ts/wildcatfi-wildcat-sdk-3.0.54-beta.tgz").
  3. Reinstall dependencies in the app (npm install or use the provided reinstall script with the appropriate environment variables configured).

Releases

Once happy with changes publish to npm (if you have permissions):

  • npm publish --tag beta

Branch Strategy

  • main: latest supported release branch. Publish production npm releases (npm publish or yarn npm publish).
  • develop: integration branch. Publish beta releases with npm publish --tag beta (or the yarn equivalent).
  • Feature branches should merge into develop via pull request, then graduate to main for release once validated.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •