Installation

Installation

Install the @ethsign/sp-sdk package to use the Sign Protocol SDK in your frontend or Node backend projects.

Creating a Client Instance

new SignProtocolClient(spMode, options);

Parameters

Name
Type
Description

spMode

SpMode

Whether the client is initialized in on-chain or Arweave (off-chain) mode.

options

OnChainClientOptions, OffChainClientOptions

Client options based on spMode.

Example

const { privateKeyToAccount } = require("viem/accounts");
const client = new SignProtocolClient(SpMode.OnChain, {
  chain: EvmChains.baseSepolia,
  account: privateKeyToAccount(privateKey),
  apiKey: 'xxx', // Get a key from https://developer.sign.global/
});

Last updated

Was this helpful?