# Connecting to Taraxa

## Connecting to Taraxa's ETH-Compatible Network&#x20;

There are two ways to connect to Taraxa's network,

* Via dev-deployed RPC endpoints&#x20;
* Via your own mainnet / testnet nodes

Since Taraxa's network is almost 100% ETH-compatible, you can simply follow [Ethereum's JSON-RPC documentation](https://ethereum.org/en/developers/docs/apis/json-rpc/#usage-example).&#x20;

The ETH-compatibility with Ethereum also means that almost all tools from the Ethereum ecosystem work with Taraxa. You can use, for example, [Web3.js](https://web3js.org/), [ethers.js](https://docs.ethers.io/v5/) and [Web3.py](https://web3py.readthedocs.io/en/latest/) to connect to and interact with the Taraxa Network.

There are a few minor exceptions and quirks to Taraxa's ETH-compatibility, you can find them in our [full RPC specification](https://taraxa.gitbook.io/taraxa-network/develop/taraxa-rpc-specs).&#x20;

## Connect via RPC endpoints provided by the dev team&#x20;

You may use the RPC endpoints provided by Taraxa's core development team. Right now these are being provided as is and free of charge, this may change later of course with plenty of notice given to the community.&#x20;

* Mainnet: <https://rpc.mainnet.taraxa.io>
* Testnet: <https://rpc.testnet.taraxa.io/>&#x20;

More details on [Taraxa's network connections](https://taraxa.gitbook.io/taraxa-network/wallet/taraxas-network-connection-details), including chain-ids etc.&#x20;

## Connect via your own Nodes

You could also set up your own nodes on the Mainnet or Testnet. This give you a lot of flexibility in working with your DApp.

If these nodes are being used primarily for RPC connections, they do NOT need to participate in consensus. Therefore there is no need to register them on the community site, or seek delegation for the mainnet nodes.&#x20;

Here are node setup instructions,&#x20;

* Setting up a [mainnet node](https://taraxa.gitbook.io/taraxa-network/become-a-validator)&#x20;
* Setting up a [testnet node](https://taraxa.gitbook.io/taraxa-network/node-setup/testnet_node_setup)&#x20;

The default RPC port on the Taraxa node is "7777". So if you're running this on your own node on the node's local machine, you'd send the RPC request to `localhost:7777`.&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://taraxa.gitbook.io/taraxa-network/develop/connect-to-taraxas-network.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
