New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@rhinestone/module-sdk

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rhinestone/module-sdk

A TypeScript library for using Smart Account Modules in Applications

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
528
decreased by-19.51%
Maintainers
1
Weekly downloads
 
Created
Source

Module SDK

Coverage badge lines Coverage badge functions

A TypeScript library for using Smart Account Modules in Applications

The Module SDK allows you to:

  • Easily install and uninstall modules for any ERC-7579 account
  • Interact with and use modules using a simple and consistent API
  • Can be used alongside existing account SDKs such as permissionless.js, Biconomy, Zerodev and many more
  • Use existing modules, such as:
    • ECDSA Validator - Use ECDSA signatures to control an account
    • Webauthn Validator - Use webauthn/passkeys to control an account
    • MFA Validator - Set up multi-factor authentication for an account
    • Scheduled Transfers - Schedule transfers to occur at a future time with an optional interval
    • Scheduled Orders - Schedule swap orders to occur at a future time with an optional interval

In-depth documentation is available at docs.rhinestone.wtf.

Installation

Install viem as a peer dependency and then install the Module SDK:

npm install viem @rhinestone/module-sdk
pnpm install viem @rhinestone/module-sdk
yarn add viem @rhinestone/module-sdk
bun install viem @rhinestone/module-sdk

Quick Start

// Import the required functions
import {
  installModule,
  getModule,
  getAccount,
  getClient,
  getMFAValidator,
} from '@rhinestone/module-sdk'

// Create a client for the current network
const client = getClient(network)

// Create the module object if you are using a custom module
const module = getModule({
  module: moduleAddress,
  data: initData,
  type: moduleType,
})

// Or use one of the existing modules
const mfaModule = getMFAValidator({
  type: 'mfa-validator',
  data: {
    threshold: 2,
    methods: ['webauthn', 'passkey'],
  },
})

// Create the account object
const account = getAccount({
  address: '0x123...',
  type: 'erc7579-implementation',
})

// Get the executions required to install the module
const executions = await installModule({
  client,
  account,
  module,
})

// Install the module on your account, using your existing account SDK
accountSDK.execute(executions)

Features

  • Easy installation and uninstallation of modules
  • Determine if a module is already installed on an account
  • Different Module types
    • Validators
    • Executors
    • Hooks
    • Fallbacks
  • Different Modular Accounts
    • ERC-7579
    • Safe
    • Biconomy
    • Kernel
  • Supported Modules
    • ECDSA Validator
    • Webauthn Validator
    • MFA Validator
    • Scheduled Transfers
    • Scheduled Orders

Contributing

For feature or change requests, feel free to open a PR, start a discussion or get in touch with us.

For guidance on how to create PRs, see the CONTRIBUTING guide.

Using this repo

To install dependencies, run:

pnpm install

To build the sdk, run:

pnpm build

To run tests, run:

pnpm test

Authors ✨


Konrad

💻

Yassin

💻

FAQs

Package last updated on 12 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc