This repository contains a Node.js script to sign typed data according to the ERC-7512 standard. The script is written in TypeScript and uses the Ethers.js library to interact with the Ethereum blockchain.
-
Clone this repository:
git clone git@github.com:OnchainAudit/tooling.git
-
Navigate to the project directory:
cd tooling/simple_signer
-
Install the required dependencies:
npm install
or if you're using Yarn:
yarn install
-
Rename the
.env.template
file to.env
. -
Open the
.env
file and paste your Ethereum private key next toYOUR_PRIVATE_KEY=
. Ensure there are no spaces between the=
sign and your private key.Example:
YOUR_PRIVATE_KEY=0xYOUR_PRIVATE_KEY_HERE
-
Save the
.env
file.
With the environment set up, you can run the script using the following command:
npm start
or if you're using Yarn:
yarn start
Note: Always ensure that your .env
file is added to your .gitignore
to prevent accidentally pushing sensitive information to public repositories. The .env.template
serves as a placeholder to guide users on how to set up their environment variables without exposing any sensitive data.