Comment on page
⚙
Installing SSX
Installing SSX
The SSX library enables you to add user-controlled identity and data to your application.
SSX can be added as a dependency to your project using your preferred Node.js package manager by running any of the following commands.
npm
Yarn
pnpm
npm install @spruceid/ssx
yarn add @spruceid/ssx
pnpm add @spruceid/ssx
Once installed SSX can be instantiated at any point in your frontend app. Below is an example of a function that could be called on a sign-in button. This creates a SSX instance, prompts the user to connect and Sign-In with Ethereum, and stores and returns information about the user's session in the
ssx
object. import { SSX } from '@spruceid/ssx';
const signInButtonHandler = async () => {
const ssx = new SSX();
const session = await ssx.signIn();
};
SSX works without configuration. However, you can access a robust feature set by enabling and configuring some available options.
Last modified 4mo ago