setup-entities: seed entity interactions via the real API#116
Merged
Conversation
Adds setup-entities.sh + setup-entities.ts to the harness: a reusable seeder that drives three real submitter flows against one PP so the provider-console "Entities" section shows the full range of states, produced entirely through the public endpoints (no DB writes): - K1 unauthorized bundle submit (403) -> then KYC register -> APPROVED - K2 unauthorized bundle submit (403) -> stays UNVERIFIED - K3 KYC register (APPROVED) -> then a real deposit bundle (accepted) Reuses the existing lib/client helpers (authenticate / registerEntity / deposit), so the only difference between a rejected and an accepted bundle is KYC status — exactly the per-PP approval gate the view surfaces. Fixed keypairs make re-runs idempotent. Requires up.sh + setup-c.sh + setup-pp.sh; reads .local-dev-state. Supports provider-console#39. Relates to ClickUp 86ca439ah
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
setup-entitiesto the local-dev harness — a reusable seeder that drives three real submitter flows against one PP so the provider-console Entities section can be brought up with the full range of interaction states, produced entirely through the public API (no DB writes).Flows (all via the real endpoints)
Reuses the existing
lib/clienthelpers (authenticate/registerEntity/deposit), so the only difference between a rejected and an accepted bundle is KYC status — exactly the per-PP approval gate the view surfaces. Fixed keypairs make re-runs idempotent (connect upserts; KYC returns 409-as-success).Usage
Env overrides:
PP_INDEX(default 1),DEPOSIT_AMOUNT(default 50).Checks
deno fmt --check/lint/checkgreen on the new file. No version field in local-devdeno.json, so no bump.Supports the entities-view tweaks in Moonlight-Protocol/provider-console#39.
Relates to ClickUp 86ca439ah