Last active
February 10, 2021 18:29
-
-
Save timmyers/0100e93e6e3151a3cae1db2393322391 to your computer and use it in GitHub Desktop.
Infura Pyrmont Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import axios from 'axios'; | |
const instance = axios.create({ | |
baseURL: 'https://eth2-beacon-pyrmont.infura.io/', | |
auth: { | |
username: process.env.INFURA_PROJECT_ID, | |
password: '', | |
}, | |
}); | |
(async () => { | |
const response = await instance.get('/eth/v1/beacon/blocks/head') | |
console.log(response.data); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment