You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add an endpoint that fetches a member's on-chain resource credit balance from the Soroban resource_credits contract. All implementation goes in backend/sandbox/.
Acceptance Criteria
GET /sandbox/credits/balance returns the current user's credit balance
Reads from the deployed Soroban resource_credits contract using the Stellar SDK
Contract address is read from an env variable RESOURCE_CREDITS_CONTRACT_ID
Returns { balance: string, address: string } (balance as string to avoid precision loss)
Returns 503 with a clear message if the Stellar network is unreachable
Overview
Add an endpoint that fetches a member's on-chain resource credit balance from the Soroban
resource_creditscontract. All implementation goes inbackend/sandbox/.Acceptance Criteria
GET /sandbox/credits/balancereturns the current user's credit balanceresource_creditscontract using the Stellar SDKRESOURCE_CREDITS_CONTRACT_ID{ balance: string, address: string }(balance as string to avoid precision loss)