🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@hirosystems/clarinet-sdk-browser

Package Overview
Dependencies
Maintainers
4
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hirosystems/clarinet-sdk-browser

A SDK to interact with Clarity Smart Contracts in the browser

3.0.2
latest
Source
npm
Version published
Weekly downloads
37
48%
Maintainers
4
Weekly downloads
 
Created
Source

Clarinet SDK for the Web

The Clarinet SDK can be used to interact with the simnet from web browsers.

If you want to use the Clarinet SDK in Node.js, try @hirosystems/clarinet-sdk.

Find the API references of the SDK in our documentation.
Learn more about unit testing Clarity smart contracts in this guide.

You can use this SDK to:

  • Interact with a clarinet project as you would with the Clarinet CLI
  • Call public, read-only, and private functions from smart contracts
  • Get clarity maps or data-var values
  • Get contract interfaces (available functions and data)
  • Write unit tests for Clarity smart contracts

Installation

npm install @hirosystems/clarinet-sdk-browser

Usage

There are two ways to use the sdk in the browser:

  • With an empty clarinet session:
const simnet = await initSimnet();
await simnet.initEmptySession();
simnet.runSnippet("(+ 1 2)")
  • With a clarinet project (ie: with a Clarinet.toml) 💡 It requires to use a virtual file system. More documentation and examples soon.
const simnet = await initSimnet();
await simnet.initSession("/project", "Clarinet.toml")

Keywords

stacks

FAQs

Package last updated on 14 May 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