Skip to content

SDK Overview

The Pybara SDK is a JavaScript library for integrating crypto payments into web applications.

  • Wallet Connections — Connect to Oisy, Plug, and NFID wallets
  • Token Transfers — Execute ICRC-1 transfers
  • Payment Calculator — Convert fiat to crypto amounts
  • Balance Checking — Check wallet balances
  • TypeScript Support — Full type definitions included
Terminal window
npm install @yogabuild/pybara-sdk
import { PybaraSDK } from '@yogabuild/pybara-sdk';
const sdk = new PybaraSDK({
merchantPrincipal: 'your-principal-id',
environment: 'production', // or 'testnet'
});
// Connect wallet
await sdk.connectWallet('oisy');
// Calculate payment amount
const amount = await sdk.calculatePayment({
fiatAmount: 99.99,
fiatCurrency: 'USD',
token: 'ICP',
});
// Execute payment
const result = await sdk.executePayment({
amount,
token: 'ICP',
orderId: 'order-123',
});
console.log('Payment successful:', result.blockIndex);

The SDK is platform-agnostic and works with:

  • React
  • Vue
  • Angular
  • Svelte
  • Vanilla JavaScript
  • Any JavaScript framework
  • Chrome/Edge 90+
  • Firefox 88+
  • Safari 14+