@cosmosapp/pay_sdkServer
Installation
Install @cosmosapp/pay_sdk, the optional Stellar peer dependency, and the ESM / CommonJS import styles.
Add the package to any Node.js project. Browser wallet support is an optional extra you only install when you actually need it.
npm install @cosmosapp/pay_sdk
# or: pnpm add @cosmosapp/pay_sdk
# or: yarn add @cosmosapp/pay_sdkRequires Node.js ≥ 18 (for global fetch). On older runtimes pass a fetch
polyfill via the fetch client option.
Browser web client (optional peer dependency)
The browser web client builds & submits Stellar transactions, so it needs the Stellar SDK (an optional peer dependency, lazy-imported when present):
npm install @cosmosapp/pay_sdk @stellar/stellar-sdkImporting
// ESM
import { Client } from '@cosmosapp/pay_sdk';
import { WebClient } from '@cosmosapp/pay_sdk/web';// CommonJS
const { Client } = require('@cosmosapp/pay_sdk');The package ships both ESM (./dist/index.js) and CJS (./dist/index.cjs) with
full type declarations.