registry api#986
Open
feyishola wants to merge 1 commit into
Open
Conversation
|
@feyishola 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! 🚀 |
Contributor
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 #716
Contributor Registry API — 6 routes, 4 new files, 2 modified
New module: apps/backend/src/contributor-registry/
Route | Method | Description -- | -- | -- /contributor-registry/register | POST | Direct registration — mock stores immediately; real returns unsigned XDR for wallet signing /contributor-registry/register-with-sig | POST | Testnet signing + submission — client signs a SorobanAuthorizationEntry off-chain, server (relayer) builds and submits the tx paying fees /contributor-registry/wallet/:address | GET | Lookup by Stellar address (60s cache) /contributor-registry/github/:handle | GET | Lookup by GitHub handle (60s cache) /contributor-registry/reputation/:address | GET | Reputation score + tier, cached 60s /contributor-registry/nonce/:address | GET | Registration nonce for off-chain signing, cached 5sKey design decisions
Mock vs real: Gated by
USE_MOCK_TRANSACTIONS(defaulttruein dev). Mock uses in-memory Maps so the entire flow works without a deployed contract or RPC connection.Gasless flow (
register-with-sig): client providessignedAuthEntryXdr(base64SorobanAuthorizationEntrysigned off-chain). Server builds the Soroban tx with the server keypair as relayer source, attaches the client's signed auth entry viainvokeHostFunctionOp().auth(...), signs for fee payment, and submits.Caching:
CacheService.getOrSetwraps all reads. Reputation uses the same 60s TTL as lookups — short enough to reflecton_notifyscore increments within a minute.Tier mapping matches the contract exactly:
0–9 → Novice,10–49 → Builder,50–99 → Architect,100+ → Core.Rate limits: reads reuse
Contributor Registry API — 6 routes, 4 new files, 2 modified New module: [apps/backend/src/contributor-registry/](vscode-webview://0miplvschhsnepvem2f9rgug9tppmsbn7vk7fv7ko4d55tj5pnvc/apps/backend/src/contributor-registry/) Route Method Description /contributor-registry/register POST Direct registration — mock stores immediately; real returns unsigned XDR for wallet signing /contributor-registry/register-with-sig POST Testnet signing + submission — client signs a SorobanAuthorizationEntry off-chain, server (relayer) builds and submits the tx paying fees /contributor-registry/wallet/:address GET Lookup by Stellar address (60s cache) /contributor-registry/github/:handle GET Lookup by GitHub handle (60s cache) /contributor-registry/reputation/:address GET Reputation score + tier, cached 60s /contributor-registry/nonce/:address GET Registration nonce for off-chain signing, cached 5s Key design decisions Mock vs real: Gated by USE_MOCK_TRANSACTIONS (default true in dev). Mock uses in-memory Maps so the entire flow works without a deployed contract or RPC connection.crowdfundReadprofile; writes reuseportfolioWrite— no schema changes needed.Gasless flow (register-with-sig): client provides signedAuthEntryXdr (base64 SorobanAuthorizationEntry signed off-chain). Server builds the Soroban tx with the server keypair as relayer source, attaches the client's signed auth entry via invokeHostFunctionOp().auth(...), signs for fee payment, and submits.
Caching: CacheService.getOrSet wraps all reads. Reputation uses the same 60s TTL as lookups — short enough to reflect on_notify score increments within a minute.
Tier mapping matches the contract exactly: 0–9 → Novice, 10–49 → Builder, 50–99 → Architect, 100+ → Core.
Rate limits: reads reuse crowdfundRead profile; writes reuse portfolioWrite — no schema changes needed.