Draft
Conversation
- Add APIPort (default 8280) and OpenAPIPort config params to SmartnodeConfig - Add RestrictedPortModes() (Closed/Localhost only) to port-modes.go - Add GetNodeOpenPorts() to RocketPoolConfig for docker-compose port mapping - Update node.tmpl to expose the API port on 127.0.0.1 (Docker mode) - Create rocketpool/node/http.go: startHTTP() binds 0.0.0.0 in Docker mode, respects OpenAPIPort in native mode, shuts down gracefully on SIGTERM - Create rocketpool/node/routes/routes.go: route registration skeleton - Wire startHTTP() into node daemon startup (node.go) - Add callHTTPAPI() and getAPIURL() to the CLI Client struct; apiURL is lazily derived from config and cached for subsequent calls Co-authored-by: Cursor <cursoragent@cursor.com>
Server side: - rocketpool/api/queue/routes.go: RegisterRoutes() for all 6 queue endpoints - rocketpool/api/service/routes.go: RegisterRoutes() for all 3 service endpoints - rocketpool/node/routes/routes.go: wire queue and service route registrations - shared/utils/api/http.go: WriteResponse/WriteErrorResponse helpers Client side: - shared/services/rocketpool/queue.go: replace callAPI with callHTTPAPI - shared/services/rocketpool/service.go: replace callAPI with callHTTPAPI debug module skipped (handlers write to stdout directly, not JSON API pattern) Co-authored-by: Cursor <cursoragent@cursor.com>
Server side (routes.go in each api/ module): - auction: 10 routes with lotIndex/amountWei param parsing - network: 9 routes with uint64 param parsing - wallet: 12 routes; refactor init/recover/test handlers to accept explicit params instead of reading CLI flags (c.String/c.Bool/c.Uint) Client side (shared/services/rocketpool/): - auction.go, network.go, wallet.go: replace callAPI with callHTTPAPI Co-authored-by: Cursor <cursoragent@cursor.com>
Server side: - security/routes.go: RegisterRoutes() for 18 security endpoints (note: ProposeInvite/Kick/KickMulti/Replace have no server-side handlers and remain on callAPI in the client) - megapool/routes.go: RegisterRoutes() for 28 megapool endpoints Client side: - security.go: migrate 22 of 26 methods to callHTTPAPI; 4 legacy methods (ProposeInvite/Kick/KickMulti/Replace) kept on callAPI (no server handler) - megapool.go: all methods migrated to callHTTPAPI Co-authored-by: Cursor <cursoragent@cursor.com>
Server side: - minipool/routes.go: RegisterRoutes() for all 31 minipool endpoints (status, refund, stake, promote, dissolve, exit, close, delegate-upgrade, set-use-latest-delegate, get-use-latest-delegate, get-delegate, get-effective-delegate, get-previous-delegate, get-vanity-artifacts, begin/can-begin/can-reduce/reduce-bond-amount, distribute-balance, import-key, change-withdrawal-creds, rescue-dissolved, get-bond-reduction-enabled) Client side: - minipool.go: all methods migrated to callHTTPAPI Co-authored-by: Cursor <cursoragent@cursor.com>
Server side: - odao/routes.go: RegisterRoutes() for all odao endpoints (status, members, proposals, propose-invite, propose-leave, propose-kick, cancel/vote/execute-proposal, join, leave, member/proposal/minipool-settings, penalise-megapool, all propose-setting variants) Note: can-replace/replace have no server handlers; kept on callAPI - pdao/routes.go: RegisterRoutes() for all pdao endpoints (status, proposals, voting, settings, rewards-percentages, one-time-spend, recurring-spend, security-council operations, claimable-bonds, defeat/finalize-proposal, voting-delegate, signalling-address, allow-listed-controllers) Client side: - odao.go: all methods migrated to callHTTPAPI except CanReplaceTNDAOMember/ReplaceTNDAOMember/CanProposeReplaceTNDAOMember/ ProposeReplaceTNDAOMember (no server handlers) and CanProposeTNDAOSetting (no matching CLI command in odao) - pdao.go: all methods migrated to callHTTPAPI Co-authored-by: Cursor <cursoragent@cursor.com>
Server side: - node/routes.go: RegisterRoutes() for all node endpoints (status, alerts, sync, eth-balance, check-collateral, rewards, deposit-contract-info, register, set-timezone, primary/rpl withdrawal addresses, swap/stake/ unstake rpl, rpl locking, withdraw rpl/eth/credit, deposit, send/burn, claim-rpl, fee-distributor, interval rewards, smoothing-pool, ens, sign, sign-message, vacant-minipool, send-message, express-tickets, unclaimed-rewards, bond-requirement) - node/routes/routes.go: add noderoutes.RegisterRoutes Client side: - node.go: all methods migrated to callHTTPAPI Co-authored-by: Cursor <cursoragent@cursor.com>
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.
No description provided.