Quickstart
Prerequisites
What you'll build
Option 1: TypeScript SDK
Install
npm install @moltmpp/sdk @solana/web3.jsConfigure wallet
import { MoltMPPClient } from '@moltmpp/sdk'
import { Keypair } from '@solana/web3.js'
import fs from 'fs'
// Load Solana wallet
const secretKey = JSON.parse(fs.readFileSync('~/.config/solana/id.json', 'utf8'))
const wallet = Keypair.fromSecretKey(new Uint8Array(secretKey))
// Initialize MoltMPP client
const mpp = new MoltMPPClient({
solanaRpc: 'https://api.mainnet-beta.solana.com',
wallet: wallet,
policies: {
maxPerTransaction: 100_000, // 100 USDC (6 decimals)
dailyLimit: 1_000_000 // 1000 USDC
}
})Make your first MPP payment
Verify settlement
Option 2: OpenClaw Integration (Python)
Install
Configure agent
Execute autonomous payment
Monitor transaction
Understanding the MPP flow
1. Resource request
2. Payment required (402)
3. Payment execution
4. Retry with credential
5. Resource delivery
Approval policies
Testing on devnet
Complete example
Run the example
What's next?
Troubleshooting
Get help
Last updated
Was this helpful?
