Socket
Book a DemoInstallSign in
Socket

@hirosystems/clarinet-sdk-browser

Package Overview
Dependencies
Maintainers
4
Versions
77
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.5.0
latest
Source
npmnpm
Version published
Maintainers
4
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 08 Aug 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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.