Overview
Snapshot.js is an open source JavaScript client which comes with the core functions of the Snapshot’s offchain voting system. It was designed to work both in the browser and with Node.js.
Snapshot.js Repository
Get started
Installation
Node.js To install Snapshot.js on Node.js, open your terminal and run:Development
Install dependenciesUsage
Base features
Init client
Cast a vote
Create proposal
Create or edit a space
Join a space
Utils
The below methods are sending a request to Score API. Same as Hub API it requires an API Key for higher usage limits. You can see we require it for the
apiKey variable.If you already have an API Key for Hub API, you can reuse it for Score. In case you don’t have an API Key, follow the instructions here: API keys