Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hirosystems/clarinet-sdk-browser

Package Overview
Dependencies
Maintainers
0
Versions
38
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

  • 2.12.0
  • beta
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
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

FAQs

Package last updated on 18 Dec 2024

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc