Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@rhinestone/module-sdk
Advanced tools
A TypeScript library for using Smart Account Modules in Applications
A TypeScript library for using Smart Account Modules in Applications
The Module SDK allows you to:
In-depth documentation is available at docs.rhinestone.wtf.
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
// Import the required functions
import {
installModule,
getModule,
getAccount,
getClient,
getMultiFactorValidator,
} from '@rhinestone/module-sdk'
// Create a client for the current network
const client = getClient({
rpcUrl: 'https://rpc.ankr.com/eth ',
})
// Create the module object if you are using a custom module
const moduleToInstall = getModule({
module: moduleAddress,
data: initData,
type: moduleType,
})
// Or use one of the existing modules
moduleToInstall = getMultiFactorValidator({
threshold: 2,
validators: [
{
packedValidatorAndId: '0x123...',
data: '0x123...',
},
{
packedValidatorAndId: '0x456...',
data: '0x123...',
},
],
})
// 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,
moduleToInstall,
})
// Install the module on your account, using your existing account SDK
// note: this is an example, you should use your own account SDK
accountSDK.execute(executions)
To install dependencies, run:
pnpm install
To build the sdk, run:
pnpm build
To run tests, run:
pnpm test
For feature or change requests, feel free to open a PR, start a discussion or get in touch with us.
FAQs
A TypeScript library for using Smart Account Modules in Applications
The npm package @rhinestone/module-sdk receives a total of 254 weekly downloads. As such, @rhinestone/module-sdk popularity was classified as not popular.
We found that @rhinestone/module-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.