Skip to content

[GF-08] [BACKEND] TypeScript SDK: Full Implementation + Tests#62

Merged
wumibals merged 1 commit into
LadderMine:mainfrom
bellabuks:feature/gf-08-typescript-sdk
Jun 24, 2026
Merged

[GF-08] [BACKEND] TypeScript SDK: Full Implementation + Tests#62
wumibals merged 1 commit into
LadderMine:mainfrom
bellabuks:feature/gf-08-typescript-sdk

Conversation

@bellabuks

Copy link
Copy Markdown
Contributor

Summary

Implements all stub methods in the TypeScript SDK and adds a full test suite.

  • deposit - converts USDC string to stroops (7-decimal precision), enforces per-tier minimum deposits, throws BelowMinDepositError for amounts below minimums; delegates to simulateThenSubmit
  • withdraw - submits invocation and translates contract lock errors into LockNotExpiredError
  • earlyExit - runs simulation first to provide a fee preview, then submits
  • position - queries all four tiers in parallel, returns the first active position
  • Tests - added src/__tests__/index.test.ts with Vitest covering success paths, error cases, call-order verification, and fallback behaviour
  • CI fix - updated .github/workflows/ci.yml SDK job to run pnpm build and pnpm test after typecheck, generating the required dist/ artifacts; switched install to pnpm install to allow lock-file refresh when dependencies change
  • package.json - added vitest to devDependencies and a test script

closes #41

@vercel

vercel Bot commented Jun 22, 2026

Copy link
Copy Markdown

@bellabuks is attempting to deploy a commit to the wumibals' projects Team on Vercel.

A member of the Team first needs to authorize it.

@Leothosine Leothosine left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is perfect

@wumibals wumibals merged commit 4e872f5 into LadderMine:main Jun 24, 2026
1 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[GF-08] [BACKEND] TypeScript SDK: Full Implementation + Tests

3 participants