
Product
Introducing Pull Request Stories to Help Security Teams Track Supply Chain Risks
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
@rhinestone/automations-sdk
Advanced tools
A TypeScript library for using Rhinestone Automations
A TypeScript library for using Rhinestone Automations
The Rhinestone Automations Service allows you to create automations that will be executed on a smart account based on a trigger. Exisiting triggers include:
This SDK makes it easy to interact with the Rhinestone Automations Service and create, sign and manage automations.
Install the Automations SDK:
npm install @rhinestone/automations-sdk
pnpm install @rhinestone/automations-sdk
yarn add @rhinestone/automations-sdk
bun install @rhinestone/automations-sdk
// Import the required functions
import {
createAutomationClient,
} from '@rhinestone/automations-sdk'
// Create a client for the automations service
const automationsClient = createAutomationClient({
account: "0xc2b17e73603dccc195118a36f3203134fd7985f5",
apiKey: process.env.AUTOMATIONS_API_KEY!,
accountInitCode: '0x',
network: 11155111,
validator: '0x503b54Ed1E62365F0c9e4caF1479623b08acbe77',
})
// Create a new automation
const automation = await automationsClient.createAutomation({
type: 'time-based',
data: {
trigger: {
triggerData: {
cronExpression: '*/30 * * * * *',
startDate: new Date().getTime(),
},
},
actions: [
{
type: 'static',
target: '0x503b54Ed1E62365F0c9e4caF1479623b08acbe77',
value: 100,
callData: '0x',
},
],
maxNumberOfExecutions: 10,
},
})
// Sign the automation to active it
const signature = sign(automation.hash) // Sign the hash of the automation with the account
await automationsClient.signAutomation({
automationId: automation.id,
signature: signature,
})
// Get the automation and verify that it is active
automation = await automationsClient.getAutomation(
automationId: automation.id,
)
console.log(automation.status) // active
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 Rhinestone Automations
We found that @rhinestone/automations-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.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.