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

ensc-ts-sdk

v1.3.6

Published

A lightweight Typescript library to give you the best experience with managing your ensc business profile

Downloads

45

Readme

ensc-ts-sdk

npm types minzip license

A tiny, typed SDK for the ENSC Payments API. It automatically encrypts (AES-256-GCM) and signs (Ed25519) requests, and works in browsers and Node without shims.

  • ⚙️ Typed Axios client
  • 🔐 AES-256-GCM encryption + Ed25519 signing
  • 🌐 Browser & Node compatible (dynamic crypto import)
  • 📦 ESM & CJS builds + TypeScript types
  • 🧹 Tree-shakable ("sideEffects": false)

Install

npm i ensc-ts-sdk
# or: yarn add ensc-ts-sdk
# or: pnpm add ensc-ts-sdk

Quick start

import { ENSCClient, Asset } from 'ensc-ts-sdk';

const client = new ENSCClient({
  apiKey:        process.env.API_KEY!,                  // issued by ProsperaVest
  encryptionKey: process.env.ENCRYPTION_KEY!,           // base64-encoded 32B AES key
  privateKey:    process.env.SIGNING_PRIVATE_KEY!,      // PEM (Ed25519)
  // baseUrl: 'https://ensc.prosperavest.com'          // optional override
});

// Approve then transfer
await client.approve({
  recipient: '0xReceiver...',
  assetType: Asset.ENSC,
  amount: 100
});

await client.transfer({
  from: '0xSender...',
  recipient: '0xReceiver...',
  assetType: Asset.ENSC,
  amount: 100
});

API

Client

new ENSCClient({
  apiKey: string,
  encryptionKey: string, // base64 AES-256 (32 bytes)
  privateKey: string,    // PEM Ed25519 (RFC 8410)
  baseUrl?: string
});

Methods

client.mint({ recipient, amount, assetSymbol })

client.mintAllocation({ recipient })

client.approve({ recipient, assetType, amount, sender? })
client.transfer({ from, recipient, assetType, amount })

client.redeemAsset({
  recipient, amount, assetType,
  payoutEmail?, bank?, accountNumber?
})

client.withdraw({ pvRef, txHash })

client.getBalance(recipient, assetContractAddress)

client.getTransactionHistory(page?, limit?)

client.verifyPayout({ tx_ref })

client.getBanks()

All requests except /banks and /generate-virtual-account are encrypted + signed automatically.

Crypto helpers (optional)

If you need direct access:

import { encryptPayload, type EncryptedPayload } from 'ensc-ts-sdk';
import { verifySignature } from 'ensc-ts-sdk';
// Also: signMessage, decryptPayload

Browser & Node

  • Browser: WebCrypto (AES-GCM) + tweetnacl for Ed25519.
  • Node: dynamic import('crypto') for AES-GCM & verification.
  • We guard all process.env usage so bundlers don’t inject shims.

Types & Modules

  • ESM: dist/index.mjs
  • CJS: dist/index.js
  • Types: dist/index.d.ts

Troubleshooting

  • “Invalid AES-256 key”encryptionKey must be base64 for exactly 32 bytes.
  • Signature/401/403 → Verify PEM formatting of the Ed25519 key, and API key validity.
  • Bundler tries to polyfill crypto in browser → We only import Node crypto dynamically on server paths.

Development

npm i
npm run build
npm test

Integration tests require env vars: API_BASE_URL, API_KEY, ENCRYPTION_KEY, SIGNING_PRIVATE_KEY


Versioning

SemVer. Use patch for internal fixes, minor for backward-compatible features, major for breaking changes.


License

MIT © ProsperaVest


---

# `ensc-ts-sdk/CHANGELOG.md` (template)

```md
# Changelog

All notable changes to **ensc-ts-sdk** will be documented here.

## [1.3.1] - 2025-xx-xx
### Added
- ...

### Changed
- ...

### Fixed
- ...

### Removed
- ...

---

## [1.3.0] - 2025-xx-xx
### Added
- Initial public release with:
  - AES-256-GCM encryption + Ed25519 signing
  - ESM/CJS + types
  - Approve, transfer, redeem, withdraw, balances, transactions, banks