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

@transmute/rfc9162

Package Overview
Dependencies
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@transmute/rfc9162

An implementation of https://datatracker.ietf.org/doc/rfc9162/

  • 0.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12
increased by300%
Maintainers
3
Weekly downloads
 
Created
Source

RFC9162

CI Branches Functions Lines Statements Jest coverage

Questions? Contact Transmute

Usage

npm install '@transmute/rfc9162'
import RFC9162 from '@transmute/rfc9162';
const RFC9162 = require('@transmute/rfc9162');

Usage

import RFC9162 from '@transmute/rfc9162'

const entries: Uint8Array[] = []
  for (let i = 0; i < 10; i++) {
    entries.push(RFC9162.strToBin(`${String.fromCharCode(65 + i)}`))
  }
  const root = RFC9162.treeHead(entries)
  const inclusionProof = RFC9162.inclusionProof(entries[2], entries)
  const leaf = RFC9162.leaf(entries[2])
  const verifiedInclusionProof = RFC9162.verifyInclusionProof(
    root,
    leaf,
    inclusionProof,
  )
  // expect(verifiedInclusionProof).toBe(true)
  entries.push(RFC9162.strToBin('Spicy update 🔥'))
  const root2 = RFC9162.treeHead(entries)
  const consistencyProof = RFC9162.consistencyProof(inclusionProof, entries)
  const verifiedConsistencyProof = RFC9162.verifyConsistencyProof(
    root,
    root2,
    consistencyProof,
  )
  // expect(verifiedConsistencyProof).toBe(true)

Develop

npm i
npm t
npm run lint
npm run build

FAQs

Package last updated on 29 May 2023

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