🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

cartridge-node-example

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cartridge-node-example

Example of using Cartridge session controller with Node.js

latest
npmnpm
Version
1.1.0
Version published
Maintainers
0
Created
Source

Cartridge Node.js Session Example

This example demonstrates how to use the Cartridge session controller with Node.js

Setup

  • Install dependencies:
npm install
  • Run the example:
npm start

What's happening?

The example demonstrates:

  • Setting up a filesystem backend for session storage
  • Creating a session controller instance
  • Creating a new session with specific policies
  • Executing a transaction using the session

Customization

To use this example with your own contract:

  • Replace the contract address (0x123...) with your actual contract address
  • Modify the policies to match your contract's methods
  • Update the transaction parameters in the execute call to match your use case

FAQs

Package last updated on 30 Jan 2025

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