Repository navigation
feat: add typed compliance readiness checker - #215
Open
woahwhattheheck wants to merge 8 commits into
Open
woahwhattheheck wants to merge 8 commits into
woahwhattheheck wants to merge 8 commits into
Conversation
6 tasks
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.
Closes #143.
Adds checkReadiness(address), public readiness types and reason codes, state mapping, and dashboard/API documentation. Approved, blocked, revoked, pending, unknown and unavailable remain distinct; only approved is eligible. Readiness reports protocol state and does not assert legal KYC completion.
Unsuccessful, result-less and restoration-required RPC simulations return unavailable with verified:false. Successful parsed ScVal booleans map to approved or blocked; unexpected values map to unknown. The existing checkWhitelist false fallback is preserved.
Both compliance reads fetch the configured keypair public key as the simulation source, or the checked address for a read-only client, and build a real unsigned transaction with the configured network passphrase. The simulation source must exist on that network; an unavailable source yields unavailable readiness or a legacy read rejection. Neither read signs or submits a transaction.
Validation:
npm test -- --runInBand tests/compliance-readiness.test.tspassed one suite with 18 tests using the locked official @stellar/stellar-sdk 12.3.0. The added regression cases execute TransactionBuilder and real transaction XDR serialization for both simulation-source choices, assert no signatures or transaction submission, and verify the legacy parsed-ScVal positive/negative boolean results. Existing readiness failure/restoration/unknown cases also pass. Broad lint/build/full-suite/compatibility checks were not run; no green CI status is asserted.I am claiming this contribution under woahwhattheheck and requesting the applicable GrantFox/FWC26 reward. Please confirm assignment/evaluation, the reward amount and the settlement process.
/claim #143
I, @woahwhattheheck, affirmatively request evaluation and any applicable GrantFox OSS / Official Campaign (FWC26) reward and payment for this original contribution. Please preserve @woahwhattheheck as claimant and payee.