@boltzpay/protocols
v0.1.1
Published
Protocol adapters for x402 and L402 payment protocols
Maintainers
Readme
@boltzpay/protocols
Protocol adapters for the BoltzPay SDK -- x402 (HTTP 402) and L402 (Lightning) implementations.
Install
npm install @boltzpay/protocolsMost users should install
@boltzpay/sdkinstead. This package is useful if you need direct access to protocol adapters or wallet managers.
Protocol Adapters
x402 Adapter
Handles the x402 protocol -- HTTP 402 payments on Base (EVM) and Solana (SVM).
import { X402Adapter } from "@boltzpay/protocols";L402 Adapter
Handles the L402 protocol -- Lightning Network payments with macaroon-based credentials.
import { L402Adapter } from "@boltzpay/protocols";Protocol Router
Auto-detects which protocol a server uses and routes to the correct adapter.
import { ProtocolRouter } from "@boltzpay/protocols";Wallet Managers
CdpWalletManager-- Coinbase Developer Platform wallet (EVM + Solana)NwcWalletManager-- Nostr Wallet Connect for Lightning paymentsCdpSvmSigner-- Solana transaction signer via CDP
Utilities
centsToUsdcAtomic(cents)-- Convert USD cents to USDC atomic unitsusdcAtomicToCents(atomic)-- Convert USDC atomic units to USD cents
License
MIT
