Rocket Pool Node API

The Node API from Rocket Pool — 12 operation(s) for node.

OpenAPI Specification

rocket-pool-node-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Rocket Pool Protocol API (rocketpool-go) Auction Node API
  description: Read-oriented protocol surface exposed by the rocketpool-go Golang library on top of the Rocket Pool smart contracts deployed on Ethereum. The API described here is a logical mapping of rocketpool-go packages — auction, deposit, minipool, network, node, rewards, settings, tokens, dao/protocol, dao/trustednode — onto HTTP-style operations. There is no hosted HTTP endpoint for this API; integrators read the equivalent state via Ethereum JSON-RPC eth_call requests against the deployed contracts using the Go library, the rocketpool-js library, or directly via web3 clients.
  version: 1.0.0
  license:
    name: GPL-3.0
    url: https://github.com/rocket-pool/rocketpool-go/blob/master/LICENSE
  contact:
    name: Rocket Pool
    url: https://github.com/rocket-pool/rocketpool-go
servers:
- url: https://protocol.rocketpool.example/v1
  description: Logical base path — actual access is via Ethereum smart contracts
tags:
- name: Node
paths:
  /nodes:
    get:
      tags:
      - Node
      summary: List Registered Nodes
      operationId: listNodes
      parameters:
      - name: offset
        in: query
        schema:
          type: integer
      - name: limit
        in: query
        schema:
          type: integer
      responses:
        '200':
          description: Page of registered nodes
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    type: integer
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/NodeDetails'
  /nodes/{address}:
    get:
      tags:
      - Node
      summary: Get Node Details
      operationId: getNodeDetails
      parameters:
      - $ref: '#/components/parameters/Address'
      responses:
        '200':
          description: Node details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NodeDetails'
  /nodes/{address}/minipools:
    get:
      tags:
      - Node
      summary: List A Node's Minipools
      operationId: listNodeMinipools
      parameters:
      - $ref: '#/components/parameters/Address'
      responses:
        '200':
          description: Minipools belonging to the node
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MinipoolDetails'
  /node/status:
    get:
      tags:
      - Node
      summary: Get Node Status
      operationId: getNodeStatus
      responses:
        '200':
          description: Node status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NodeStatus'
  /node/sync:
    get:
      tags:
      - Node
      summary: Get Eth1 And Eth2 Sync Progress
      operationId: getNodeSync
      responses:
        '200':
          description: Sync state for the execution and consensus clients
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SyncStatus'
  /node/register:
    post:
      tags:
      - Node
      summary: Register Node With Rocket Pool
      operationId: registerNode
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NodeRegisterRequest'
      responses:
        '200':
          description: Registration submitted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionResponse'
  /node/rewards:
    get:
      tags:
      - Node
      summary: Get Expected Node Rewards
      operationId: getNodeRewards
      responses:
        '200':
          description: Expected RPL rewards at the next checkpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NodeRewards'
  /node/stake-rpl:
    post:
      tags:
      - Node
      summary: Stake RPL Against Node
      operationId: stakeRpl
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StakeRplRequest'
      responses:
        '200':
          description: Stake submitted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionResponse'
  /node/withdraw-rpl:
    post:
      tags:
      - Node
      summary: Withdraw Staked RPL
      operationId: withdrawRpl
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WithdrawRplRequest'
      responses:
        '200':
          description: Withdraw submitted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionResponse'
  /node/claim-rewards:
    post:
      tags:
      - Node
      summary: Claim Available Node Rewards
      operationId: claimNodeRewards
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClaimRewardsRequest'
      responses:
        '200':
          description: Claim submitted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionResponse'
  /node/join-smoothing-pool:
    post:
      tags:
      - Node
      summary: Opt Into Smoothing Pool
      operationId: joinSmoothingPool
      responses:
        '200':
          description: Opt-in submitted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionResponse'
  /node/leave-smoothing-pool:
    post:
      tags:
      - Node
      summary: Opt Out Of Smoothing Pool
      operationId: leaveSmoothingPool
      responses:
        '200':
          description: Opt-out submitted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionResponse'
components:
  schemas:
    NodeStatus:
      type: object
      properties:
        accountAddress:
          $ref: '#/components/schemas/Address_2'
        registered:
          type: boolean
        trusted:
          type: boolean
        withdrawalAddress:
          $ref: '#/components/schemas/Address_2'
        rplWithdrawalAddress:
          $ref: '#/components/schemas/Address_2'
        timezone:
          type: string
          example: America/Denver
        balances:
          type: object
          properties:
            eth:
              $ref: '#/components/schemas/EthAmount_2'
            rpl:
              $ref: '#/components/schemas/EthAmount_2'
            reth:
              $ref: '#/components/schemas/EthAmount_2'
        minipoolCount:
          type: integer
        rplStake:
          $ref: '#/components/schemas/EthAmount_2'
        effectiveRplStake:
          $ref: '#/components/schemas/EthAmount_2'
        minimumRplStake:
          $ref: '#/components/schemas/EthAmount_2'
        maximumRplStake:
          $ref: '#/components/schemas/EthAmount_2'
        feeDistributorInitialized:
          type: boolean
        feeDistributorAddress:
          $ref: '#/components/schemas/Address_2'
        smoothingPoolRegistrationState:
          type: boolean
        smoothingPoolRegistrationChanged:
          type: string
          format: date-time
    NodeRegisterRequest:
      type: object
      required:
      - timezone
      properties:
        timezone:
          type: string
          example: America/Denver
    SyncStatus:
      type: object
      properties:
        eth1:
          $ref: '#/components/schemas/ClientSync'
        eth2:
          $ref: '#/components/schemas/ClientSync'
    TransactionHash:
      type: string
      pattern: ^0x[a-fA-F0-9]{64}$
    NodeDetails:
      type: object
      properties:
        address:
          $ref: '#/components/schemas/Address'
        registrationTime:
          type: string
          format: date-time
        timezone:
          type: string
        withdrawalAddress:
          $ref: '#/components/schemas/Address'
        rplWithdrawalAddress:
          $ref: '#/components/schemas/Address'
        rplStake:
          $ref: '#/components/schemas/EthAmount'
        effectiveRplStake:
          $ref: '#/components/schemas/EthAmount'
        minimumRplStake:
          $ref: '#/components/schemas/EthAmount'
        maximumRplStake:
          $ref: '#/components/schemas/EthAmount'
        ethMatched:
          $ref: '#/components/schemas/EthAmount'
        ethMatchedLimit:
          $ref: '#/components/schemas/EthAmount'
        minipoolCount:
          type: integer
        smoothingPoolRegistered:
          type: boolean
    ClientSync:
      type: object
      properties:
        synced:
          type: boolean
        progress:
          type: number
          format: float
          minimum: 0
          maximum: 1
    WithdrawRplRequest:
      type: object
      required:
      - amount
      properties:
        amount:
          $ref: '#/components/schemas/EthAmount_2'
    Address_2:
      type: string
      pattern: ^0x[a-fA-F0-9]{40}$
      example: '0x0000000000000000000000000000000000000000'
    StakeRplRequest:
      type: object
      required:
      - amount
      properties:
        amount:
          $ref: '#/components/schemas/EthAmount_2'
    Address:
      type: string
      pattern: ^0x[a-fA-F0-9]{40}$
    ClaimRewardsRequest:
      type: object
      required:
      - indices
      properties:
        indices:
          type: array
          items:
            type: integer
        stakeAmount:
          $ref: '#/components/schemas/EthAmount_2'
    TransactionResponse:
      type: object
      properties:
        status:
          type: string
          enum:
          - success
          - error
        txHash:
          $ref: '#/components/schemas/TransactionHash'
        gasInfo:
          type: object
          properties:
            estGasLimit:
              type: integer
            safeGasLimit:
              type: integer
        error:
          type: string
    EthAmount_2:
      type: string
      description: Amount expressed in wei (1 ETH = 10^18 wei)
      example: '32000000000000000000'
    EthAmount:
      type: string
      description: Amount in wei
    MinipoolDetails:
      type: object
      properties:
        address:
          $ref: '#/components/schemas/Address'
        nodeAddress:
          $ref: '#/components/schemas/Address'
        validatorPubkey:
          $ref: '#/components/schemas/PublicKey'
        status:
          type: string
        depositType:
          type: string
        nodeDepositBalance:
          $ref: '#/components/schemas/EthAmount'
        userDepositBalance:
          $ref: '#/components/schemas/EthAmount'
        nodeFee:
          type: number
          format: float
        delegateAddress:
          $ref: '#/components/schemas/Address'
        useLatestDelegate:
          type: boolean
        finalised:
          type: boolean
    NodeRewards:
      type: object
      properties:
        nextCheckpoint:
          type: string
          format: date-time
        estimatedRplRewards:
          $ref: '#/components/schemas/EthAmount_2'
        nodeRegistrationTime:
          type: string
          format: date-time
        rewardsInterval:
          type: integer
    PublicKey:
      type: string
      pattern: ^0x[a-fA-F0-9]{96}$
  parameters:
    Address:
      name: address
      in: path
      required: true
      schema:
        $ref: '#/components/schemas/Address'