tulebank
v3.4.0
Published
CLI for off-ramping ARS — wallet, swaps, and fiat via Ripio Ramps
Maintainers
Readme
TuleBank CLI
Wallet, swaps, ARS off-ramp, and ARS on-ramp toolkit. Move between crypto and Argentine pesos (ARS) via Ripio Ramps. Node.js CLI that talks to a Railway proxy handling Ripio Ramps + CDP API credentials.
CLI → Railway proxy (tulebank-proxy-production.up.railway.app/proxy/ripio-*) → Ripio Ramps API + CDP API
→ viem (local) → sign userOp hashes + permit2 (private key never leaves device)Single dependency (viem), ES modules, Node 20.19+.
Getting Started
Prerequisites
- Node.js 20.19+
- Proxy credentials: Railway proxy URL and API key
Step 1: Initial Setup (one-time)
Configure the CLI with the proxy URL and API key:
node bin/tulebank.js setup \
--proxy-url https://tulebank-proxy-production.up.railway.app/proxy \
--api-key <your-api-key>This creates ~/.tulebank/config.json. Verify connectivity:
node bin/tulebank.js status-checkThis returns the current status for backend, Ripio, CDP, and Uniswap.
Step 2: Customer Onboarding (one-time)
Create a Ripio Ramps customer account:
node bin/tulebank.js create-customer --email [email protected] --phone +5491100000000This saves customer_id to config. If you're an existing Ripio user, complete KYC via OTP:
node bin/tulebank.js check-kyc # sends OTP to your phone
node bin/tulebank.js otp --code 123456 # validate the 6-digit code
node bin/tulebank.js kyc-status # should show COMPLETEDIf you're a new user, submit full KYC (see node bin/tulebank.js kyc-submit --help for required fields).
Step 3: Create a Wallet (one-time)
Create a CDP smart wallet on Base (gasless, ERC-4337):
node bin/tulebank.js wallet setupThis creates a wallet and saves the address + private key to ~/.tulebank/config.json. Check it:
node bin/tulebank.js wallet info # shows your address
node bin/tulebank.js wallet balance # shows USDC, wARS, ETH balancesFund your wallet by sending USDC on Base to the address shown by wallet info.
Step 4: Register a Beneficiary (one per destination)
Add someone you want to send ARS to:
node bin/tulebank.js beneficiaries add \
--name "Pilar Castillo" \
--to pilarcastilloz \
--description "mi hermana"--to is their CVU or ALIAS (Argentine bank identifier). This creates a fiat account on Ripio Ramps and saves it locally.
node bin/tulebank.js beneficiaries list # view all
node bin/tulebank.js beneficiaries search "Pili" # word-prefix matchingStep 5: Send Money
Smart send (recommended) -- omit --token and the CLI auto-picks wARS (1:1 to ARS) or swaps USDC->wARS if needed:
node bin/tulebank.js send --to Pili --amount 10000This will:
- Resolve "Pili" to "Pilar Castillo" (word-prefix match)
- Check wARS balance -- if sufficient, send directly
- If not, estimate only the missing wARS deficit and swap just enough USDC (+ buffer), then send
- Show confirmation prompt before executing
- Record in
~/.tulebank/history.json
Swap guardrails:
node bin/tulebank.js send --to Pili --amount 10000 --slippage 100 --swap-margin-bps 50--slippagecontrols DEX execution slippage in bps (default100= 1%).--swap-margin-bpsadds extra quote buffer for the planned swap size (default50= 0.5%).
Specific token:
node bin/tulebank.js send --to pilarcastilloz --amount 10 --token USDCManual (just get deposit address, send from any wallet):
node bin/tulebank.js send --to pilarcastilloz --manualStep 6: Swap Tokens (optional)
Swap USDC<->wARS on Base via DEX:
node bin/tulebank.js swap --from USDC --to wARS --amount 10wARS converts 1:1 to ARS via off-ramp. Swapping USDC to wARS before sending locks in the rate.
Step 7: Check History
node bin/tulebank.js history # last 30 days
node bin/tulebank.js history --beneficiary Pili # filter by name
node bin/tulebank.js history --type send # only sends
node bin/tulebank.js history --type onramp # only on-ramp flows
node bin/tulebank.js history --from 2026-01-01 # date rangeStep 8: Other Useful Commands
node bin/tulebank.js quote --from USDC --to ARS --amount 10 # get rate
node bin/tulebank.js rates --amount 10 # compare buy/sell (uniswap vs ripio offramp)
node bin/tulebank.js onramp quote --amount 50000 # ARS -> wARS quote (bank transfer, default asset)
node bin/tulebank.js onramp quote --amount 50000 --asset USDC # ARS -> USDC quote
node bin/tulebank.js onramp create --amount 50000 # create on-ramp session (wARS default)
node bin/tulebank.js onramp create --amount 50000 --asset USDC # create on-ramp order (wallet required)
node bin/tulebank.js onramp status --transaction <id> # check on-ramp status (order first, then session)
node bin/tulebank.js limits # min/max amounts
node bin/tulebank.js send-status --session <id> # check off-ramp progress
node bin/tulebank.js help # full command referenceKey Facts
- Transaction limits: min 2,100 ARS, max 20,000,000 ARS
- wARS: 1:1 to ARS, accepted alongside USDC for off-ramp
- On-ramp default:
onramp quote/createdefaults towARS; use--asset USDCfor order flow - Deposit address: reusable (same fiat account = same session = same address)
- Zero API credentials on client: Railway proxy handles Ripio OAuth + CDP JWT auth
- Wallet private key: stays local, viem signs userOp hashes + permit2 locally
Testing
npm test # 76 tests (beneficiaries, cdp-jwt, cli, proxy-client, skill, wallet)Files
| File | Purpose |
|------|---------|
| bin/tulebank.js | CLI entry point (all commands) |
| lib/proxy-client.js | HTTP client calling Railway proxy |
| lib/wallet.js | Wallet ops via proxy + local viem signing |
| lib/beneficiaries.js | Local address book (accent-insensitive search) |
| lib/config.js | Config + history persistence |
| lib/cdp-jwt.js | Pure JS Ed25519/EdDSA JWT signer |
| ~/.tulebank/config.json | Proxy URL, API key, customer ID, wallet |
| ~/.tulebank/beneficiaries.json | Saved recipients |
| ~/.tulebank/history.json | Transaction log (send, swap, onramp) |
| AGENTS.md | Full architecture + agent implementation reference |
| ../tulebank-skill/skills/tulebank/SKILL.md | Public agent skill instructions for TuleBank |
