RPC Endpoints and Providers

This section includes some of the possible ways in which one could connect to the WINR Chain, using the following Remote Procedure Call (RPC) endpoints. The provided endpoints are a gateway for developers and users to interact with the WINR Chain network-enabling various use cases such as sending transactions and querying data on the blockchain using smart contracts.

Available RPC Endpoints

  1. HTTP Endpoint

  • URL: https://rpc.winr.games

  • Description: The endpoint is ideal to perform standard API requests over HTTP. It provides a persistent connection suitable for one-time interaction like balance queries, fetching transactions details, or even sending transactions. This is helpful in scenarios where your application doesn't need any updates in real-time, or doesn't require persistence of any kind.

  1. WebSocket (WS) Endpoint

  • URL: wss://rpc-ws.winr.games

  • Description: This WebSocket endpoint is designed for applications that require continuous feeds of data in real time and event-driven. It will have a persistent connection that is necessary for use cases like tracking live events, getting instant confirmation of transactions, or building real-time dApps, such as gaming stations or trading stations.

How to Connect to WINR Chain Using RPC Endpoints

  • For Developers: Implement the RPC endpoint of your choice in the codebase of your application. To connect using Web3.js over WebSocket, for example:

javascript Copy code const Web3 = require("web3"); 
const web3 = new Web3("wss://rpc-ws.winr.games"); 
  • For Wallet Users: To add WINR Chain in a wallet like MetaMask, the user has to fill in the URL of the HTTP endpoint (https://rpc.winr.games) in addition to other data concerning the chain in question in the network settings.

These endpoints will empower both developers and users to interact seamlessly with the WINR Chain, hence guaranteeing that the network will be utilized effectively and reliably.

Last updated