Skip to content
Start

Getting started

Install the SDK, connect a transaction submitter, and embed a wallet without building a key-custody backend.

Install

bash
npm install @monstera_protocol/sdk@2.3.0 ethers

Examples name the connected SDK instance leaf; it is a normal local variable, not a different API. The current demo integration uses @monstera_protocol/sdk 2.x. Pin and test the exact package version you deploy because older alpha examples use different connection options and predate action-bound proofs.

Connect a transaction submitter

typescript
import { Monstera } from "@monstera_protocol/sdk";

const leaf = Monstera.connect({
  mainnet: false,
  signer: process.env.SIGNER_PRIVATE_KEY,
  checkVersion: false,
});

The contract layers

  • The top-level Monstera instance is the routine SDK API; domain clients remain available for lower-level access.
  • WalletLogic is the application-facing contract layer.
  • KeyVaultV3 constructs AuthContext and verifies protected actions.
  • WalletStorageV2 holds confidential HD, imported, and chain-specific keys.
  • KeyVaultImplementationV2 performs stateless derivation and signing.
  • Your app may sponsor transport and gas without becoming the key custodian.