Skip to content

feat: add holding capacity precheck endpoint - #924

Open
PEPPERITO23 wants to merge 2 commits into
accesslayerorg:mainfrom
PEPPERITO23:fix/issue-913
Open

PEPPERITO23 wants to merge 2 commits into
accesslayerorg:mainfrom
PEPPERITO23:fix/issue-913

Conversation

@PEPPERITO23

@PEPPERITO23 PEPPERITO23 commented Sep 25, 2026 •

Copy link
Copy Markdown

Summary

  • Add unauthenticated GET /api/v1/keys/:keyId/holding-capacity.
  • Validate wallet and optional positive quantity query parameters.
  • Read the latest ownership balance and key holder cap.
  • Return allowed, current_holding, maximum_holding, and remaining_capacity for buy pre-checks.
  • Return 404 for unknown keys and cover cap boundaries with tests.
  • Reconcile the contributor branch with the latest upstream main.

Verification

  • Focused holding-capacity suites: 16/16 tests passed.
  • TypeScript check: tsc --noEmit passed after Prisma client generation.
  • git diff --check passed.

Fixes #913

@drips-wave

drips-wave Bot commented Sep 25, 2026

Copy link
Copy Markdown

@PEPPERITO23 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@PEPPERITO23

Copy link
Copy Markdown
Author

@accesslayerorg Implemented issue #913 with an unauthenticated holding-capacity precheck endpoint, validated wallet/quantity inputs, key-not-found handling, cap calculations, and boundary tests.

@PEPPERITO23

Copy link
Copy Markdown
Author

@accesslayerorg @PEPPERITO23 The latest upstream main already contains the holding-capacity implementation and tests in key-holding-capacity.service.ts and the current keys route. I rebased/synchronized this branch against upstream; no contributor changes remain to merge, so this PR is being closed as already implemented upstream.

@PEPPERITO23 PEPPERITO23 reopened this Sep 26, 2026
@PEPPERITO23

Copy link
Copy Markdown
Author

@accesslayerorg @PEPPERITO23 AccessLayer #913 is implemented in commit ff1dfd8. PR #924 was reopened, its body now contains Fixes #913, and the endpoint provides the unauthenticated holding-capacity pre-check with validation, latest ownership lookup, cap calculation, and tests. Please review and merge.

@PEPPERITO23

Copy link
Copy Markdown
Author

@accesslayerorg @PEPPERITO23 Fixed and pushed in commit 11c80126dedb7b7a0895d7aa527f6e8edb8e1759. The branch was reconciled with the latest upstream main, the holding-capacity endpoint now accepts an optional positive quantity and returns the requested buy pre-check fields, and the existing pure helper was restored for compatibility. The PR body now contains Fixes #913. Verification: focused holding-capacity suites passed 16/16; tsc --noEmit passed after Prisma generation; git diff --check passed. Please review and merge when CI is complete.

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.

Add holding cap validation endpoint for buy quantity pre-checks

2 participants