Practical overview
When it fits
Use it when integrating Starknet cryptographic operations into a JavaScript or TypeScript application.
Who it is for
JavaScript and TypeScript developers building software that needs Starknet cryptographic functions.
Documented uses
- Derive public and Stark keys and sign or verify message hashes.
- Calculate Pedersen and Poseidon hashes and use key and hash utilities.
Requirements & limits
- The repository documents installation via npm or JSR and import as @scure/starknet.
- It uses noble-curves for underlying arithmetic and describes the library as having zero or minimal dependencies.
- The repository lists the MIT license.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install and import scure-starknet
Add the library to a JavaScript or TypeScript project and import its API.
Before you start
- A JavaScript or TypeScript project using npm or JSR.
- For TypeScript examples that use Node.js assertions, install @types/node.
Steps
Install with npm install @scure/starknet, or add it with jsr add jsr:@scure/starknet.
Import the library with import * as starknet from '@scure/starknet'.
In TypeScript, install @types/node and import deepStrictEqual from 'assert' if using the README's assertion examples.
Expected outcome
The project has the library available for use, with the documented import pattern.
Guide limitations
- This covers installation and importing, not configuring or deploying an application.
- The documented TypeScript assertion examples require @types/node.
Calculate a Pedersen hash with scure-starknet
Use the library's Pedersen function with two hexadecimal inputs and compare the result with the documented example.
Before you start
- scure-starknet installed in a JavaScript or TypeScript project.
- The library imported as starknet, following the documented usage pattern.
- Node.js assertion support for the documented result comparison.
Steps
Import deepStrictEqual from node:assert and import * as starknet from '@scure/starknet'.
Call starknet.pedersen with '0x3d937c035c878245caf64531a5756109c53068da139362728feb561405371cb' and '0x208a0a10250e382e1e4bbe2880906c2791bf6275695e02fbbc6aeff9cd8b31a'.
Compare the result with '0x30e480bed5fe53fa909cc0f8c4d99b8f9f2c016be4c41e13a4848797979c662' using deepStrictEqual.
Expected outcome
The example checks that the Pedersen function returns the documented hash for those inputs.
Guide limitations
- This example demonstrates one input pair only; it does not establish behavior for other inputs or application-specific integration.
- The documented comparison uses Node.js assertions.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 15 October 2026
- Original website title
- paulmillr/scure-starknet · Official homepage title · retained in its source language

