Skip to main content

On-Chain SDK

The fiatsend-sdk monorepo provides TypeScript packages for interacting with Fiatsend smart contracts on EVM chains (e.g. BSC, Polygon). Use this when you need direct contract calls — not for REST payouts to mobile money.

info

This is a different package namespace from the Partner API REST client. See Choose your integration.

Install

npm install @fiatsend/sdk viem

Packages: @fiatsend/types, @fiatsend/core, @fiatsend/resolver, @fiatsend/utils, umbrella @fiatsend/sdk.

Capabilities

  • Payout escrow — business-funded payouts claimed by phone-linked identity
  • Gateway — stablecoin operations tied to the Fiatsend gateway contracts
  • MobileNumber NFT — phone-number identity resolution
  • P2P exchange — orders with payment references
  • Liquidity / vaults — pool and vault interactions

Example

import { FiatsendClient, parseTokenAmount, encodePhoneNumber } from "@fiatsend/sdk";
import { createPublicClient, createWalletClient, http } from "viem";
import { bsc } from "viem/chains";

const publicClient = createPublicClient({ chain: bsc, transport: http() });
const walletClient = createWalletClient({ chain: bsc, transport: http(), account });

const fiatsend = new FiatsendClient({
chain: "bsc",
publicClient,
walletClient,
});

For mobile-money settlement at scale, most partners use the Partner API instead of calling contracts directly.

Source and examples