|
1 | 1 | ---
|
2 |
| -title: Use Alchemy on Different Web3 Libraries |
3 |
| -description: Learn How to Use Alchemy on Different Web3 Libraries |
4 |
| -subtitle: Learn How to Use Alchemy on Different Web3 Libraries |
| 2 | +title: Set Up Alchemy with any Library via AI |
| 3 | +description: Use AI tools to kickoff your Alchemy journey |
| 4 | +subtitle: Use AI tools to kickoff your Alchemy journey |
5 | 5 | url: https://docs.alchemy.com/docs/alchemy-via-Libraries
|
6 | 6 | slug: docs/alchemy-via-libraries
|
7 | 7 | ---
|
8 | 8 |
|
9 |
| -### Other Web3 Libraries |
10 |
| - |
11 |
| -Check out the documentation for each library: |
12 |
| - |
13 |
| -* [Web3.py](https://web3py.readthedocs.io/en/stable/) |
14 |
| -* [Web3j](https://docs.web3j.io) |
15 |
| -* [Ethers.js](https://docs.ethers.io/v5/) |
16 |
| -* [Web3.js](https://web3js.readthedocs.io/en/v1.2.9/) |
17 |
| - |
18 |
| -Using the below code snippets, you can install and use Alchemy as a provider via any of the following libraries! |
19 |
| - |
20 |
| -<CodeGroup> |
21 |
| - ```python Web3.py |
22 |
| - # Setup: pip install web3 |
23 |
| - from web3 import Web3 |
24 |
| - alchemy = Web3(Web3.HTTPProvider("https://eth-mainnet.g.alchemy.com/v2/your-api-key")); |
25 |
| - ``` |
26 |
| - |
27 |
| - ```java Web3j |
28 |
| - // Setup: curl -L get.web3j.io | sh |
29 |
| - Web3j web3 = Web3j.build(new HttpService("https://eth-mainnet.g.alchemy.com/v2/your-api-key")); |
30 |
| - ``` |
31 |
| - |
32 |
| - ```javascript Ethers.js |
33 |
| - // Setup: npm install ethers |
34 |
| - const ethers = require("ethers"); |
35 |
| - const url = "https://eth-mainnet.g.alchemy.com/v2/your-api-key"; |
36 |
| - const customHttpProvider = new ethers.providers.JsonRpcProvider(url); |
37 |
| - ``` |
38 |
| - |
39 |
| - ```javascript Web3.js |
40 |
| - // Setup: npm install web3 |
41 |
| - const Web3 = require('web3'); |
42 |
| - const web3 = new Web3("https://eth-mainnet.g.alchemy.com/v2/your-api-key"); |
43 |
| - ``` |
44 |
| -</CodeGroup> |
| 9 | +> 👋 **Don't have an API Key?** [Start here](/docs/create-an-api-key) before building with AI! |
| 10 | +
|
| 11 | +## Many Coding Languages, Many Great Web3 Libraries |
| 12 | + |
| 13 | +Across coding languages you'll find many [great web3 libraries](https://www.alchemy.com/dapps/best/web3-libraries). In most cases the best place to start would be to consult the documentation of the web3 library you're using OR, as we'll recommend below, [build with AI tools](docs/tutorials/build-with-ai/ai-powered-id-es). |
| 14 | + |
| 15 | +<Info> |
| 16 | + If you are starting from your favorite tools' documentation, look for json rpc provider or client HTTP transport. That's where you'll configure your Alchemy URL! |
| 17 | + |
| 18 | + Essentially you will be pointing your library to your node, and you'll be using Alchemy to host your nodes for you! |
| 19 | +</Info> |
| 20 | + |
| 21 | +## Quickstart with AI |
| 22 | + |
| 23 | +There's no easier way than to get started with something like [cursor](https://cursor.com/) or [claude code](https://claude.com/product/claude-code) as shown in this video: |
| 24 | + |
| 25 | +<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%;"> |
| 26 | + <iframe style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" src="https://www.youtube.com/embed/rSJHuGmf8Z4?si=qigI6O3mvYXT13YJ&rel=0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen /> |
| 27 | +</div> |
| 28 | + |
| 29 | +Simply tell your AI tool to "write a script using ethers.js connected to Alchemy" and you'll be off to the races! |
| 30 | + |
| 31 | +<Info> |
| 32 | + One key thing to keep in mind is that the AI tool may not have the most recent documentation available, so often times it may be useful to tell it to consult the most recent docs. |
| 33 | + |
| 34 | + For all Alchemy docs you can scroll up to the top of the page and click "Copy Page" to get the info your AI tool needs to be completely up to date with the particular documentation! |
| 35 | +</Info> |
| 36 | + |
| 37 | +<Markdown src="./shared-next-steps.mdx" /> |
0 commit comments