- Create a new work directory:
mkdir rospten-nodejs
- Use that directory:
cd rospten-nodejs
- Install web3 library:
npm install web3
- Save the following code to
get-balance.js
:
let infuraKey = "INFURA API KEY";
let metamaskWallet = "METAMASK WALLET";
I hereby claim:
To claim this, I am signing this object:
<?php | |
/** | |
* validates an image upload | |
* | |
* @param string $inputName index name in the $_FILES super global | |
* @param array $acceptedTypes accepted file types, defaults to JPEG and PNG | |
* @return resource valid image when image is detected as valid | |
* @throws InvalidArgumentException if the image is not valid | |
**/ | |
function validateImage(string $inputName, array $acceptedTypes = ["image/jpeg", "image/png"]) { |