# Using Web3.js

### Introduction <a href="#introduction" id="introduction"></a>

This guide walks through the process of using [web3.js](https://github.com/ethereum/web3.js/) to manually sign and send a transaction to a Clover standalone node. For this example, we will use Node.js and straightforward JavaScript code.

The guide assumes that you have a local Clover node running in `--dev` mode. You can find instructions to set up a local Clover node [here](https://clover-network.gitbook.io/portal/quick-start/local-node/setting-up-a-node).

### Checking Prerequisites <a href="#checking-prerequisites" id="checking-prerequisites"></a>

#### 1. Start Clover node

Start your standalone Clover node, which can successfully produce blocks in your local environment.

#### 2. Install Node.js and NPM

To install Node.js (we'll go for v12.x, you can choose other versions, such as the latest version v15.x)  and NPM package manager. You can do this by running the following commands in your terminal:

For Mac users:

```
brew update
brew install node
```

For Debian users:

```
curl -sL https://deb.nodesource.com/setup_12.x | sudo bash -
sudo apt-get install -y nodejs
```

For Centos/Redhat users:

```
curl -sL https://deb.nodesource.com/setup_12.x | sudo bash -
sudo yum install nodejs
```

We can verify that everything installed correctly by querying the version for each package:

```
node -v
npm -v
```

#### 3. Create your Node.js project

You can create a repository on your local environment by running:

```
mkdir clover-web3 && cd clover-web3/
npm init --yes
npm install web3 --save
```


---

# 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://docs.clv.org/portal/development-guide/using-web3js.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.
