I am trying to access the SOLANA API, specifically from this GitHub: https://github.com/solana-labs/solana-web3.js with all these actions: https://solana-labs.github.io/solana-web3.js/ and read the Solana documentation here: https://docs.solana.com/developing/clients/jsonrpc-api and I have also successfully installed the Solana CLI like so: https://docs.solana.com/cli/install-solana-cli-tools here is my code in the Linux environment:
sudo apt update
git clone https://github.com/solana-labs/solana-web3.js.git
cd solana-web3.js
yarn add @solana/web3.js
I don't get any errors, everything went fine and all dependence and modules are installed. I the create the javascript file like so:
const solanaWeb3 = require('@solana/web3.js');
console.log(solanaWeb3);
My question is how do I finally connect to the API and get to use all these methods: https://solana-labs.github.io/solana-web3.js/.
Do I need to use curl or how do I connect to the API?