npm install web3
yarn add web3
Use the prebuilt dist/web3.min.js
, or
build using the [web3.js][repo] repository:
npm run build
Then include dist/web3.min.js
in your html file.
This will expose Web3
on the window object.
Or via jsDelivr CDN:
<script src="https://cdn.jsdelivr.net/npm/web3@latest/dist/web3.min.js"></script>
UNPKG:
<script src="https://unpkg.com/web3@latest/dist/web3.min.js"></script>
Build the web3.js package:
npm run build
npm test