# Configuración Contract Kit

### Requisitos de instalación y sistema <a href="#installation-and-system-requirements" id="installation-and-system-requirements"></a>

Para instalar, ejecute lo siguiente:

* npm
* Hilo
* pnpm

```
npm install web3@1.10 @celo/contractkit
```

Necesitará Node.js v18.x.

### Inicializando el [kit](https://docs.celo.org/developer/contractkit/setup#initializing-the-kit) <a href="#initializing-the-kit" id="initializing-the-kit"></a>

Para comenzar a trabajar con ContractKit necesita una `kit`instancia y una red válida para conectarse. En este ejemplo se utilizará `alfajores`(puedes leer más sobre esto [aquí](https://docs.celo.org/network) )

```
import Web3 from "web3";
import { newKitFromWeb3 } from "@celo/contractkit";

const web3 = new Web3("https://alfajores-forno.celo-testnet.org");
const kit = newKitFromWeb3(web3);
```

Vaya a la [página sobre Forno](https://docs.celo.org/network/node/forno) para obtener detalles sobre los diferentes tipos de conexión y puntos finales de red.

### Inicializa el Kit con tu propio [nodo](https://docs.celo.org/developer/contractkit/setup#initialize-the-kit-with-your-own-node) <a href="#initialize-the-kit-with-your-own-node" id="initialize-the-kit-with-your-own-node"></a>

Si está alojando su propio nodo (puede seguir [esta guía](https://docs.celo.org/network/node/run-mainnet) para ejecutar uno), puede conectarle nuestro ContractKit.

```
import Web3 from "web3";
import { newKitFromWeb3 } from "@celo/contractkit";

// define localUrl and port with the ones for your node

const web3 = new Web3(`${localUrl}:${port}`);
const kit = newKitFromWeb3(web3);
```

Lo mismo que `Web3`admitimos `WebSockets`y `RPC`conectándonos a través de `IPC`. Para este último tendrás que inicializar el `kit`con una instancia `Web3`que tenga un **valor válido .** `IPC Provider`

```
import Web3 from "web3";
import { newKitFromWeb3 } from "@celo/contractkit";

const web3Instance: Web3 = new Web3(
  new Web3.providers.IpcProvider("/Users/myuser/Library/CeloNode/geth.ipc", net)
);

const kit = newKitFromWeb3(web3Instance);
```


---

# 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://andino.gitbook.io/andino-recursos/celo/construir-en-celo/herramientas-para-desarrolladores/contract-kit/configuracion-contract-kit.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.
