TypeScript SDK
@dolphinpay/sdk exposes one client:
import {
createClient,
listAllCoins,
selectCoinsForAmount,
formatCoinAmount,
} from '@dolphinpay/sdk';
DolphinPayClient groups the API by domain:
assets: platform allowlist mutation and registry querymerchants: registration, Coin policy and merchant querycatalog: Product/Plan create, update, activation and queryorders: merchant order construction and querypayments: exact-Coin checkout, settlement, refund review and querysubscriptions: subscribe, renew, renewal-refund approval and query
The public API has no v1 client, AdminConfig, USDC conversion helper, or V2*
alias. Monetary and time values crossing the SDK boundary are bigint.
const coins = await listAllCoins(client.suiClient, payer, order.coinType);
const selected = selectCoinsForAmount(coins, order.amount);
const tx = client.payments.buildPayOrder({
merchantId: order.merchantId,
orderId: order.id,
coinType: order.coinType,
coinObjectId: selected.coins[0].objectId,
additionalCoinObjectIds: selected.coins.slice(1).map((coin) => coin.objectId),
amount: order.amount,
});