milypay-sdk
v0.2.0
Published
TypeScript client for Milypay — Australian data over x402
Maintainers
Readme
milypay-sdk
Also planned as
@milypay/sdkonce the npm org exists.
TypeScript client for Milypay — Australian data over x402.
npm i milypay-sdkimport { Milypay } from "milypay-sdk";
// Free demo host (rate-limited)
const demo = new Milypay({ host: "demo" });
const biz = await demo.business.abn("51824753556");
// Paid API with Solana wallet (base58 secret)
const paid = new Milypay({
host: "api",
privateKey: process.env.MILYPAY_PRIVATE_KEY!,
});
const company = await paid.company.acn("000014675");
// company.$receipt? — settlement metadata when paid
// MoneyGram pre-fund (does NOT settle x402)
const status = await paid.ramp.moneygram();
const session = await paid.ramp.session("on-ramp");
// open session.widgetUrl → USDC in wallet → retry paid callsHosts
| host | base | payment |
|------|------|---------|
| demo | https://milypay.xyz/api | free, throttled |
| api | https://api.milypay.xyz | x402 required |
| auto | api if key else demo | |
API surface
business.abn / acn / searchcompany.acn / search / reportaddress.validate / search / geocodesuper.abnweather({ q } | { lat, lng })bsb.lookup / searchpostage({ from, to, weight, ... })phone.lookupenergy.catalogue / nem / nemRegion / noticestransit.regions / vehicles / tripUpdates / alerts / summaryabs.dataflows / dataflow / data / cpidomains.check / quoterides.quote / eta / products(Uber estimates only)ramp.moneygram()·ramp.session('on-ramp'|'off-ramp')get(path)·post(path, body)·call(path)
Funding + x402
MoneyGram tops up USDC. x402 still pays the API:
- Paid call → 402 (
body.funding.moneygram) ramp.session('on-ramp')→ openwidgetUrl- Retry with wallet key / x402 client
Demo UI: https://milypay.xyz/fund
A Milysec company.
