@mesaprotocol/sdk
v0.3.8
Published
Lightweight Mesa financial workflow SDK for Stellar
Maintainers
Readme
@mesaprotocol/sdk
Lightweight Fluent TypeScript SDK for Mesa Protocol.
📦 Installation
npm install @mesaprotocol/sdk📖 Quickstart
import { Mesa } from '@mesaprotocol/sdk';
Mesa.configure({ runtimeUrl: 'http://localhost:3001' });
export const flow = Mesa.flow('Cross-Border Remittance', 'remittance-corridor')
.receive({ asset: 'USDC', minAmount: 100, toAddress: 'GD3ZJ3A4VSYJL3CEUDICCBFCMSTSFXDFBRKPZCKV5G25VSKP23XTKAOV' })
.delay({ seconds: 5 })
.payment({ amount: 95, to: 'GA4UFVDQRWUZIDKB32U2TVZSXSFAPCZV522UY7OYGM27BJ66MHYIIW3P', senderSecretRef: 'SENDER_SECRET' })
.compensate({ provider: 'stellar', refundAddress: 'GD3ZJ3A4VSYJL3CEUDICCBFCMSTSFXDFBRKPZCKV5G25VSKP23XTKAOV', refundAsset: 'USDC' })
.build();
await Mesa.register(flow);
const { executionId } = await Mesa.execute(flow);