Feat/jurisdiction presets sdk events revocation export - #445
Conversation
…s, proof-history export Closes ToluLabs#391, Closes ToluLabs#392, Closes ToluLabs#393, Closes ToluLabs#394 - sdk(ToluLabs#391): add named country-allowlist jurisdiction presets (eu, eea, us, non-sanctioned) expanding to ISO 3166-1 numeric codes; wire into buildVerifyUrl via claimParams.preset and expose resolveJurisdictionPreset for witness inputs - sdk/indexer(ToluLabs#392): add indexer-backed subscribeClaims(wallet[, claimType]) returning { unsubscribe }; seeds snapshot, fires added/updated/revoked only on change, creates claims on the fly so consumers are never stale - contract/indexer/sdk(ToluLabs#393): ProofRegistry.revoke takes an optional reason code (RevocationReason 10/20/30/40/50), stored on the record and emitted in the revoke event; indexer persists revoked_reason and surfaces revocation_reason_label; SDK/client expose getRevocationReason + REVOCATION_REASONS - frontend(ToluLabs#394): holder page CSV/JSON export of non-sensitive proof history (claim type, timestamps, tx hash, issuer) built offline from local state
…jurisdiction-presets-sdk-events-revocation-export # Conflicts: # frontend/packages/sdk/src/index.ts
|
@reuben148 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! 🚀 |
|
Nice - this genuinely implements all four (jurisdiction presets #391, subscribeClaims #392, revocation reason codes #393, proof-history export #394), and the Closes refs are correct. Three CI failures to fix before merge:
Fix those three and it should go green. Good, well-scoped work otherwise. |
Closes #391, Closes #392, Closes #393, Closes #394
Summary
Implements and closes four issues:
#391 — Country allowlist as SDK-configurable jurisdiction preset
presets.ts) —eu,eea,us,non-sanctioned— that expand to ISO 3166-1 numeric code sets.buildVerifyUrlviaclaimParams.preset, and exposedresolveJurisdictionPreset()for witness inputs.JurisdictionPresetErroron unknown names; explicitrestrictedoverrides the preset.#392 — SDK event subscription for claim changes
subscribeClaims({ wallet, claimType?, pollMs?, indexerUrl?, onEvent })(subscribe.ts), backed by the indexer's/claimsAPI, returning{ unsubscribe }.snapshot, firesadded/updated/revokedonly on change, creates claims on the fly so consumers are never stale.#393 — Revocation reason codes
ProofRegistry.revokenow takes an optionalreasoncode (RevocationReason: 10 expired / 20 superseded / 30 fraud / 40 user_request / 50 other), stored on the record and emitted in the revoke event.revoked_reasonand exposesrevocation_reason_labelon/claims; revoke-event parsing aligned to the current layout.getRevocationReason()+REVOCATION_REASONS.#394 — Holder proof-history export
exportProofHistory.ts).Merge base
Includes merge of latest
main(badge #440 + concurrency fix #442) with one resolved conflict infrontend/packages/sdk/src/index.ts.