npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@pulse-protocol/types

v0.1.0

Published

Shared TypeScript types for the Pulse Protocol — enums, encryption result interfaces, and consent/revoke record shapes. All types mirror the corresponding Go structs in [`pulse-protocol-go`](https://github.com/smarter-contracts/pulse-protocol-go).

Readme

@pulse-protocol/types

Shared TypeScript types for the Pulse Protocol — enums, encryption result interfaces, and consent/revoke record shapes. All types mirror the corresponding Go structs in pulse-protocol-go.

Installation

pnpm add @pulse-protocol/types

API

PulsePurpose

Identifies the intended use of a derived key or encryption operation. Used as domain-separation input in HKDF and AES-GCM AAD.

import { PulsePurpose, purposeString } from '@pulse-protocol/types'

PulsePurpose.EncryptConsentStructure  // 3
PulsePurpose.PQDeriveConsent          // 9
PulsePurpose.PQDeriveRevoke           // 10

purposeString(PulsePurpose.EncryptConsentStructure)
// → 'encrypt-consent-structure'

| Value | Constant | Description | |---|---|---| | 1 | SignTx | Transaction signing | | 2 | EncryptConsentNotaryBlock | EC notary block encryption | | 3 | EncryptConsentStructure | EC/PQ consent structure encryption | | 4 | EncryptRevokeNotaryBlock | EC notary revoke block encryption | | 5 | EncryptRevokeStructure | EC/PQ revoke structure encryption | | 6 | SymmetricConsent | Symmetric consent encryption | | 7 | SymmetricRevoke | Symmetric revoke encryption | | 8 | SymmetricUpdate | Symmetric update encryption | | 9 | PQDeriveConsent | ML-KEM-768 consent key derivation | | 10 | PQDeriveRevoke | ML-KEM-768 revoke key derivation | | 255 | SymmetricKeyWrap | Symmetric key wrapping |

EC types

interface PulseECEncryptionResult {
  sealedData: Uint8Array  // AES-256-GCM ciphertext + tag
  key1: Uint8Array        // compressed secp256k1 public key of encrypting party (33 bytes)
  key2: Uint8Array        // compressed secp256k1 public key of recipient (33 bytes)
}

interface RevokeStructureEC extends PulseECEncryptionResult {
  grant: string           // CID of the consent record being revoked
}

PQ types

interface PulsePQEncryptionKey {
  keyFingerPrint: Uint8Array       // Keccak-256 of recipient's ML-KEM-768 public key (32 bytes)
  encapsulatedKeyKey: Uint8Array   // ML-KEM-768 ciphertext (1088 bytes)
  encapsulatedDataKey: Uint8Array  // AES-wrapped data key for this recipient
}

interface PulsePQEncryptionResult {
  sealedData: Uint8Array           // AES-256-GCM ciphertext + tag
  keys: PulsePQEncryptionKey[]     // one entry per recipient
}

interface RevokeStructurePQ extends PulsePQEncryptionResult {
  grant: string                    // CID of the consent record being revoked
}

V1 record types (legacy format)

interface ConsentStructureV1    { consent: string; key1: string; key2: string }
interface RevokeStructureV1     { revoke: string; key1: string; key2: string; grantRef: string }
interface ConsentStructureMultiV1 { consent: string; keys: string[] }
interface RevokeStructureMultiV1  { revoke: string; keys: string[]; grantRef: string }