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

@neptune.fintech/astro-sdk

v1.0.0

Published

Official JavaScript/TypeScript SDK for the OpenWave / Astro payment gateway

Readme

@neptune-astro/sdk

Official JavaScript / TypeScript SDK for the OpenWave / Astro payment gateway.

Works in Node.js, Deno, and the browser (uses native fetch + crypto.subtle).

Install

npm install @neptune-astro/sdk

Quick Start

import { createClient } from '@neptune-astro/sdk'

const astro = createClient({
  baseUrl: 'https://astro.neptune.ly',
  merchantKey: process.env.OPENWAVE_MERCHANT_KEY,
})

// Create a payment session
const session = await astro.payments.createSession({
  amount: 50000,           // 50.000 LYD (minor units)
  currency: 'LYD',
  destination: { type: 'alias', value: 'mtellesy' },
  description: 'Order #1042',
  reference: 'order_1042',
  redirect_url: 'https://mystore.com/orders/1042/result',
})

console.log(session.checkout_url) // redirect customer here

Modules

astro.payments

// Create session
const session = await astro.payments.createSession({ ... })

// Get status
const status = await astro.payments.getSession(session.session_id)

// List sessions
const { sessions } = await astro.payments.listSessions({ status: 'COMPLETED' })

// Recurring mandate
const mandate = await astro.payments.createMandate({ ... })
await astro.payments.chargeMandate(mandate.mandate_id, { amount: 5000 })

astro.alias

const profile = await astro.alias.get('mtellesy')
const { accounts } = await astro.alias.getAccounts('mtellesy')

astro.openBanking

// Check capabilities
const caps = await astro.openBanking.getBankCapabilities('andalus')

// Create consent (redirect customer to consent_url)
const consent = await astro.openBanking.createConsent({
  bank_handle: 'andalus',
  scopes: ['accounts:read', 'balances:read'],
  redirect_uri: 'https://myapp.com/callback',
  state: 'random_state',
  code_challenge: '...', // PKCE S256
  code_challenge_method: 'S256',
})

// Exchange code for tokens
const tokens = await astro.openBanking.exchangeCode({
  code: 'AUTH_CODE',
  redirect_uri: 'https://myapp.com/callback',
  consent_id: consent.consent_id,
  code_verifier: '...',
})

// Access data
const { accounts } = await astro.openBanking.getAccounts(consent.consent_id)
const balance = await astro.openBanking.getBalances(accounts[0].account_id, consent.consent_id)
const { transactions } = await astro.openBanking.getTransactions(
  accounts[0].account_id,
  consent.consent_id,
  { fromDate: '2026-01-01', count: 50 }
)

astro.identity

// Public alias resolution (no auth needed)
const resolved = await astro.identity.resolve('mtellesy')
// { iban: 'LY83...', bank_handle: 'andalus', currency: 'LYD' }

// Claim a handle (bank key required)
await astro.identity.claimHandle({
  npt_handle: 'mtellesy',
  iban: 'LY83002700100099900001',
  customer_display_name: 'Mohamed T.',
  bank_customer_ref: 'CUST-001',
})

Webhook Verification

import { WebhookReceiver } from '@neptune-astro/sdk'

const receiver = new WebhookReceiver(process.env.WEBHOOK_SECRET!)

receiver.on('payment.completed', async (payload) => {
  const { session_id, reference } = payload.data as any
  await fulfillOrder(reference)
})

receiver.on('payment.failed', async (payload) => {
  console.error('Payment failed:', payload.data)
})

// In your HTTP handler:
await receiver.handle(rawBodyString, req.headers['x-openwave-signature'])

Error Handling

import { AstroRequestError } from '@neptune-astro/sdk'

try {
  const session = await astro.payments.createSession({ ... })
} catch (err) {
  if (err instanceof AstroRequestError) {
    console.error(err.code)       // 'ALIAS_NOT_FOUND'
    console.error(err.status)     // 404
    console.error(err.requestId)  // for support
  }
}

Amount Convention

All amounts are integers in minor units:

// 500.000 LYD
const amount = 500_000  // NOT 500.0

// Convert for display
const display = (amount / 1000).toFixed(3) + ' LYD'  // "500.000 LYD"

License

UNLICENSED — Copyright © Neptune Fintech