Client
The main entry point of the SDK — a single, atomic client that exposes every resource through its own manager — an atomic, single-client design.
The main entry point of the SDK — a single, atomic client that exposes every resource through its own manager — an atomic, single-client design.
Constructor
Client
constructor(options: ClientOptions)Parameters
options:ClientOptions
Properties
version
Library version.
static readonly version = "2.3.2"shared
Process-wide shared defaults maintained by Cosmos Pay (gateway URL, version, internal secrets). Mutate once at startup to change them for every client (e.g. self-hosting): Client.shared.baseURL = 'https://gateway.your-domain.com'.
static readonly shared: SharedConfigshared
Resolved shared configuration for this client instance.
readonly shared: SharedConfigwebhookSecret
Default webhook signing secret for the webhook listener (if configured).
webhookSecret: string | undefinedrest
The underlying HTTP layer. Shared by every manager.
readonly rest: RESTType REST
paymentIntents
Stellar payment intents — create/list/fetch/update/delete/validate.
readonly paymentIntents: PaymentIntentManagerType PaymentIntentManager
webhooks
Webhook endpoints, delivery audit trail, and the event listener.
readonly webhooks: WebhookManagerType WebhookManager
products
Products / prices.
readonly products: ProductManagerType ProductManager
swaps
Same-chain swaps: the Stellar DEX, Jupiter on Solana, Kuru Flow on Monad.
readonly swaps: SwapManagerType SwapManager
crossChainSwaps
Swaps between Stellar, Solana and Monad, settled by NEAR Intents.
readonly crossChainSwaps: CrossChainSwapManagerusdt0
USDT0 from Stellar to EVM networks through LayerZero (mainnet only).
readonly usdt0: Usdt0ManagerType Usdt0Manager
privatePayments
Private payments: amounts hidden on-chain (Stellar testnet only for now).
readonly privatePayments: PrivatePaymentManagerliquidity
Liquidity pools: browse, positions, deposit / withdraw.
readonly liquidity: LiquidityManagerType LiquidityManager
onramp
Fiat -> stablecoin: quotes, payins, trustlines, virtual accounts.
readonly onramp: OnrampManagerType OnrampManager
offramp
Stablecoin -> fiat: quotes, authorize, payouts, compliance documents.
readonly offramp: OfframpManagerType OfframpManager
activity
The client event stream: report events, read them back, summarize.
readonly activity: ActivityManagerType ActivityManager
kyc
KYC / KYB: receivers, their wallets and their bank accounts.
readonly kyc: KycManagerType KycManager
customers
Customers and their wallets.
readonly customers: CustomerManagerType CustomerManager
analytics
Read-only analytics (summary, series, balances, logs).
readonly analytics: AnalyticsManagerType AnalyticsManager
health
Service health probes (public).
readonly health: HealthManagerType HealthManager
aliases
Payment handles: resolve, claim and manage @name aliases.
readonly aliases: AliasManagerType AliasManager
assets
The asset registry: which (code, issuer) pairs exist per network, and who issues them.
readonly assets: AssetManagerType AssetManager
plugins
Plugins this deployment serves: install, query, command.
readonly plugins: PluginManagerType PluginManager
defindex
DeFindex vaults (when the deployment enables the native plugin).
readonly defindex: DefindexManagerType DefindexManager
publicKey
The shared public API key an open-source wallet embeds.
readonly publicKey: PublicKeyManagerType PublicKeyManager
Methods
setApiKey()
Update the API key used for subsequent requests.
setApiKey(apiKey: string): thisParameters
apiKey:string
Returns this
setWebhookSecret()
Set the default webhook signing secret for the webhook listener.
setWebhookSecret(secret: string): thisParameters
secret:string
Returns this
Related
- REST
- PaymentIntentManager
- WebhookManager
- ProductManager
- SwapManager
- CrossChainSwapManager
- Usdt0Manager
- PrivatePaymentManager
- LiquidityManager
- OnrampManager
- OfframpManager
- ActivityManager
- KycManager
- CustomerManager
- AnalyticsManager
- HealthManager
- AliasManager
- AssetManager
- PluginManager
- DefindexManager
- PublicKeyManager