For a quick start, you can interact with Ethereum nodes using JSON RPC shell commands. This can be quite manual, and you can write POST requests, GET requests, or others. See examples here.
First, install Homebrew. Open Terminal and run:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install node
Use Web3 libraries plus Alchemy API! Learn more here.
We recommend that you install Alchemy.js. In Terminal on the command line:
npm install @alch/alchemy-web3
Learn more about WebSockets through the Using WebSockets page. To use WebSockets, first install WebSocket cat.
npm install -g wscat
Now connect to Alchemy's blockchain infrastructure using WebSockets:
Using Alchemy's demo:
wscat -c wss://eth-mainnet.ws.alchemyapi.io/ws/demo
Using your own key:
wscat -c wss://eth-mainnet.alchemyapi.io/ws/<api-key>
Create a Web3 instance and set your provider as Alchemy:
const web3 = new Web3("wss://eth-mainnet.ws.alchemyapi.io/ws/demo");
Now that you have everything you need installed, start building your first app!