⚒️Quickstart

Spacelisk-js is a simple javascript library for interfacing with ERC-4337 Smart Account and Paymaster on the lisk chain. it uses spacelisk rpc enpoint by default.

Note: An api key is needed to interact with spacelisk-js sdk

Installation

npm i spacelisk-js

Usage

import { AA } from "spacelisk-js"

const pk = "0xprivate_key";
const api_key = "abcd1234";

const account = new AA(api_key, pk).account();

const address = await account.getAddress();
console.log("address:", address);

The address gotten is calculated by a default salt "0". if you want to generate more addresses you will simply need to set a salt. The account() function accepts an optional.

const account = new AA(api_key, pk).account("1"); // passed 1 as salt

Checkout the tutorial folder for more info and methods on Space Lisk js

Last updated