@moonpay/cli 0.8.1 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
process.noDeprecation = true; import { createRequire as __createRequire } from "module"; const require = __createRequire(import.meta.url);
|
|
2
|
-
import{existsSync as qe,readFileSync as Qe,writeFileSync as Ze,renameSync as et}from"fs";import{join as W}from"path";import{homedir as tt}from"os";import{randomBytes as rt}from"crypto";import{z as c}from"zod";import{randomBytes as P,scryptSync as L,createCipheriv as oe,createDecipheriv as ie}from"crypto";import{z as a}from"zod";var B=2**18,D=8,U=1,j=32,$=512*1024*1024,m=a.object({encryption:a.object({cipher:a.literal("aes-256-gcm"),kdf:a.literal("scrypt"),kdfparams:a.object({n:a.number(),r:a.number(),p:a.number()}),salt:a.string(),iv:a.string(),tag:a.string()}),data:a.string()});function v(e,t){let r=P(32),n=L(t,r,j,{N:B,r:D,p:U,maxmem:$}),o=P(12),s=oe("aes-256-gcm",n,o),f=Buffer.concat([s.update(e,"utf8"),s.final()]);return{encryption:{cipher:"aes-256-gcm",kdf:"scrypt",kdfparams:{n:B,r:D,p:U},salt:r.toString("base64"),iv:o.toString("base64"),tag:s.getAuthTag().toString("base64")},data:f.toString("base64")}}function E(e,t){let{salt:r,iv:n,tag:o,kdfparams:s}=e.encryption,f=L(t,Buffer.from(r,"base64"),j,{N:s.n,r:s.r,p:s.p,maxmem:$}),p=ie("aes-256-gcm",f,Buffer.from(n,"base64"),{authTagLength:16});return p.setAuthTag(Buffer.from(o,"base64")),Buffer.concat([p.update(Buffer.from(e.data,"base64")),p.final()]).toString("utf8")}var ut=c.enum(["solana","ethereum","base","arbitrum","polygon","optimism","bnb","avalanche","bitcoin","tron"]),se=c.enum(["solana","ethereum","bitcoin","tron"]),Y={solana:"solana",ethereum:"ethereum",base:"ethereum",arbitrum:"ethereum",polygon:"ethereum",optimism:"ethereum",bnb:"ethereum",avalanche:"ethereum",bitcoin:"bitcoin",tron:"tron"},H=c.object({solana:c.string().optional(),ethereum:c.string().optional(),bitcoin:c.string().optional(),tron:c.string().optional()}),ce=["base","arbitrum","polygon","optimism","bnb","avalanche"];function dt(e){let t={};if(e.solana&&(t.solana=e.solana),e.ethereum){t.ethereum=e.ethereum;for(let r of ce)t[r]=e.ethereum}return e.bitcoin&&(t.bitcoin=e.bitcoin),e.tron&&(t.tron=e.tron),t}var ae=c.object({name:c.string(),type:c.literal("hd"),mnemonic:c.string(),addresses:H,createdAt:c.string()}),fe=c.object({name:c.string(),type:c.literal("imported"),chain:se,privateKey:c.string(),addresses:H,createdAt:c.string()}),J=c.discriminatedUnion("type",[ae,fe]),mt=c.object({name:c.string(),type:c.enum(["hd","imported"]),addresses:c.record(c.string(),c.string()),createdAt:c.string()});import{execFileSync as k,execSync as we}from"child_process";import{randomBytes as Ke}from"crypto";import{existsSync as ke,readFileSync as _e,writeFileSync as Ae}from"fs";import{homedir as Te,platform as G}from"os";import{join as Oe}from"path";import*as i from"fs";import*as V from"os";import*as C from"path";import{readFileSync as pe}from"fs";import{join as le}from"path";import{homedir as ue}from"os";var de="0.8.
|
|
2
|
+
import{existsSync as qe,readFileSync as Qe,writeFileSync as Ze,renameSync as et}from"fs";import{join as W}from"path";import{homedir as tt}from"os";import{randomBytes as rt}from"crypto";import{z as c}from"zod";import{randomBytes as P,scryptSync as L,createCipheriv as oe,createDecipheriv as ie}from"crypto";import{z as a}from"zod";var B=2**18,D=8,U=1,j=32,$=512*1024*1024,m=a.object({encryption:a.object({cipher:a.literal("aes-256-gcm"),kdf:a.literal("scrypt"),kdfparams:a.object({n:a.number(),r:a.number(),p:a.number()}),salt:a.string(),iv:a.string(),tag:a.string()}),data:a.string()});function v(e,t){let r=P(32),n=L(t,r,j,{N:B,r:D,p:U,maxmem:$}),o=P(12),s=oe("aes-256-gcm",n,o),f=Buffer.concat([s.update(e,"utf8"),s.final()]);return{encryption:{cipher:"aes-256-gcm",kdf:"scrypt",kdfparams:{n:B,r:D,p:U},salt:r.toString("base64"),iv:o.toString("base64"),tag:s.getAuthTag().toString("base64")},data:f.toString("base64")}}function E(e,t){let{salt:r,iv:n,tag:o,kdfparams:s}=e.encryption,f=L(t,Buffer.from(r,"base64"),j,{N:s.n,r:s.r,p:s.p,maxmem:$}),p=ie("aes-256-gcm",f,Buffer.from(n,"base64"),{authTagLength:16});return p.setAuthTag(Buffer.from(o,"base64")),Buffer.concat([p.update(Buffer.from(e.data,"base64")),p.final()]).toString("utf8")}var ut=c.enum(["solana","ethereum","base","arbitrum","polygon","optimism","bnb","avalanche","bitcoin","tron"]),se=c.enum(["solana","ethereum","bitcoin","tron"]),Y={solana:"solana",ethereum:"ethereum",base:"ethereum",arbitrum:"ethereum",polygon:"ethereum",optimism:"ethereum",bnb:"ethereum",avalanche:"ethereum",bitcoin:"bitcoin",tron:"tron"},H=c.object({solana:c.string().optional(),ethereum:c.string().optional(),bitcoin:c.string().optional(),tron:c.string().optional()}),ce=["base","arbitrum","polygon","optimism","bnb","avalanche"];function dt(e){let t={};if(e.solana&&(t.solana=e.solana),e.ethereum){t.ethereum=e.ethereum;for(let r of ce)t[r]=e.ethereum}return e.bitcoin&&(t.bitcoin=e.bitcoin),e.tron&&(t.tron=e.tron),t}var ae=c.object({name:c.string(),type:c.literal("hd"),mnemonic:c.string(),addresses:H,createdAt:c.string()}),fe=c.object({name:c.string(),type:c.literal("imported"),chain:se,privateKey:c.string(),addresses:H,createdAt:c.string()}),J=c.discriminatedUnion("type",[ae,fe]),mt=c.object({name:c.string(),type:c.enum(["hd","imported"]),addresses:c.record(c.string(),c.string()),createdAt:c.string()});import{execFileSync as k,execSync as we}from"child_process";import{randomBytes as Ke}from"crypto";import{existsSync as ke,readFileSync as _e,writeFileSync as Ae}from"fs";import{homedir as Te,platform as G}from"os";import{join as Oe}from"path";import*as i from"fs";import*as V from"os";import*as C from"path";import{readFileSync as pe}from"fs";import{join as le}from"path";import{homedir as ue}from"os";var de="0.8.2",me="X-CLI-Version",ye="X-Agent-Id",y;function he(){if(y!==void 0)return y;try{y=JSON.parse(pe(le(ue(),".config","moonpay","consent.json"),"utf-8")).agentId??null}catch{y=null}return y??null}function M(){let e={"Content-Type":"application/json",[me]:de},t=he();return t&&(e[ye]=t),e}var g=C.join(V.homedir(),".config","moonpay"),N=C.join(g,"config.json"),S=C.join(g,"credentials.json"),h=C.join(g,".credentials.lock"),I={baseUrl:"https://agents.moonpay.com"};function l(){i.existsSync(g)||i.mkdirSync(g,{recursive:!0,mode:448})}function z(e,t,r){let n=e+`.tmp.${process.pid}`;i.writeFileSync(n,t,{encoding:"utf-8",mode:r}),i.renameSync(n,e)}var ge=3e4;function Se(){l();try{let e=i.openSync(h,i.constants.O_CREAT|i.constants.O_EXCL|i.constants.O_WRONLY,384);i.writeSync(e,JSON.stringify({pid:process.pid,ts:Date.now()})),i.closeSync(e)}catch(e){if(e.code!=="EEXIST")throw e;try{let t=JSON.parse(i.readFileSync(h,"utf-8"));if(Date.now()-t.ts<ge)return null}catch{}try{i.unlinkSync(h)}catch{}try{let t=i.openSync(h,i.constants.O_CREAT|i.constants.O_EXCL|i.constants.O_WRONLY,384);i.writeSync(t,JSON.stringify({pid:process.pid,ts:Date.now()})),i.closeSync(t)}catch{return null}}return()=>{try{i.unlinkSync(h)}catch{}}}function X(){if(!i.existsSync(N))return null;try{let e=JSON.parse(i.readFileSync(N,"utf-8"));return e.baseUrl?e:null}catch{return null}}function Et(){let e=X();return e||(Ce(I),I)}function w(){if(!i.existsSync(S))return null;let e=x();if(!e)return null;try{let t=JSON.parse(i.readFileSync(S,"utf-8")),r=m.parse(t),n=E(r,e),o=JSON.parse(n);return!o.accessToken||!o.baseUrl?null:o}catch{return null}}function xe(e){let t=K(),r=v(JSON.stringify(e),t);l(),z(S,JSON.stringify(r,null,2),384)}function Ce(e){l(),z(N,JSON.stringify(e,null,2),384)}function wt(){i.existsSync(S)&&i.unlinkSync(S)}function Kt(){let e=X(),t=w();return e?.baseUrl??t?.baseUrl??I.baseUrl}async function be(e,t,r){let n=await fetch(`${e}/api/tools/${encodeURIComponent(t)}`,{method:"POST",signal:AbortSignal.timeout(15e3),headers:M(),body:JSON.stringify(r)}),o=await n.json();if(!n.ok){let s=o;throw new Error(s?.error??`${t} failed (${n.status})`)}return o}async function ve(e){if(!e.refreshToken)throw new Error("No refresh token available");let t=Se();if(!t){await new Promise(n=>setTimeout(n,2e3));let r=w();if(r&&r.expiresAt>Date.now())return r;throw new Error("Token refresh failed (concurrent refresh in progress)")}try{let r=w();if(r&&r.expiresAt>Date.now()+6e4)return r;let n=await be(e.baseUrl,"refresh",{refreshToken:e.refreshToken}),o={accessToken:n.accessToken,refreshToken:n.refreshToken,expiresAt:n.expiresAt*1e3,baseUrl:e.baseUrl};return xe(o),o}finally{t()}}var Ee=300*1e3;async function kt(){let e=w();if(!e)return null;if(Date.now()>=e.expiresAt-Ee){if(e.refreshToken)try{return(await ve(e)).accessToken}catch{return null}return null}return e.accessToken}var u="moonpay-cli",b="encryption-key",_=Oe(Te(),".config","moonpay",".encryption-key");function Ne(e){try{k("security",["delete-generic-password","-s",u,"-a",b],{stdio:"ignore"})}catch{}k("security",["add-generic-password","-s",u,"-a",b,"-w",e],{stdio:"ignore"})}function Ie(){try{return k("security",["find-generic-password","-s",u,"-a",b,"-w"],{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).trim()}catch{return null}}function Fe(e){we(`printf '%s' | secret-tool store --label="${u}" service "${u}" account "${b}"`,{input:e,stdio:["pipe","ignore","ignore"]})}function Re(){try{return k("secret-tool",["lookup","service",u,"account",b],{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).trim()}catch{return null}}function We(e){l(),Ae(_,e,{encoding:"utf-8",mode:384})}function Pe(){try{return ke(_)&&_e(_,"utf-8").trim()||null}catch{return null}}function Be(e){try{let t=G();return t==="darwin"?(Ne(e),!0):t==="linux"?(Fe(e),!0):!1}catch{return!1}}function De(){let e=G();return e==="darwin"?Ie():e==="linux"?Re():null}function x(){let e=process.env.MOONPAY_ENCRYPTION_KEY;return e||(De()??Pe())}function K(){let e=x();if(e)return e;let t=Ke(32).toString("hex");return Be(t)||(We(t),process.stderr.write("Note: Keychain unavailable. Encryption key stored in "+_+`
|
|
3
3
|
`)),t}import{createHash as q}from"crypto";import{HDKey as F}from"@scure/bip32";import{mnemonicToSeedSync as A}from"@scure/bip39";import{keccak_256 as Q}from"@noble/hashes/sha3";import{derivePath as Ue}from"ed25519-hd-key";import*as Z from"bitcoinjs-lib";import Le from"ecpair";import*as T from"tiny-secp256k1";import{Keypair as je}from"@solana/web3.js";import $e from"bs58";var Ye=Le(T);function O(e,t=0){switch(e){case"solana":return`m/44'/501'/${t}'/0'`;case"ethereum":return`m/44'/60'/${t}'/0/0`;case"bitcoin":return`m/84'/0'/${t}'/0/0`;case"tron":return`m/44'/195'/${t}'/0/0`}}function d(e,t,r=0){switch(t){case"solana":return He(e,r);case"ethereum":return Je(e,r);case"bitcoin":return ze(e,r);case"tron":return Xe(e,r)}}function Yt(e,t=0){return{solana:d(e,"solana",t).address,ethereum:d(e,"ethereum",t).address,bitcoin:d(e,"bitcoin",t).address,tron:d(e,"tron",t).address}}function He(e,t){let r=A(e),n=O("solana",t),{key:o}=Ue(n,Buffer.from(r).toString("hex")),s=je.fromSeed(Uint8Array.from(o));return{privateKey:s.secretKey,address:s.publicKey.toBase58()}}function Je(e,t){let r=A(e),n=F.fromMasterSeed(r),o=O("ethereum",t),s=n.derive(o);if(!s.privateKey)throw new Error("Failed to derive EVM private key");let f=Me(s.publicKey);return{privateKey:s.privateKey,address:f}}function Me(e){let t=T.pointCompress(e,!1),n=ee(t.slice(1)).slice(-20),o="0x"+Buffer.from(n).toString("hex");return Ve(o)}function ee(e){return Q(e)}function Ve(e){let t=e.toLowerCase().replace("0x",""),r=Buffer.from(Q(Buffer.from(t,"utf8"))).toString("hex"),n="0x";for(let o=0;o<t.length;o++)n+=parseInt(r[o],16)>=8?t[o].toUpperCase():t[o];return n}function ze(e,t){let r=A(e),n=F.fromMasterSeed(r),o=O("bitcoin",t),s=n.derive(o);if(!s.privateKey)throw new Error("Failed to derive Bitcoin private key");let f=Ye.fromPrivateKey(Buffer.from(s.privateKey)),{address:p}=Z.payments.p2wpkh({pubkey:Buffer.from(f.publicKey)});if(!p)throw new Error("Failed to derive Bitcoin address");return{privateKey:s.privateKey,address:p}}function Xe(e,t){let r=A(e),n=F.fromMasterSeed(r),o=O("tron",t),s=n.derive(o);if(!s.privateKey)throw new Error("Failed to derive Tron private key");let f=Ge(s.publicKey);return{privateKey:s.privateKey,address:f}}function Ge(e){let t=T.pointCompress(e,!1),n=ee(t.slice(1)).slice(-20),o=Buffer.concat([Buffer.from([65]),Buffer.from(n)]),s=q("sha256").update(o).digest(),f=q("sha256").update(s).digest(),p=Buffer.concat([o,f.slice(0,4)]);return $e.encode(p)}import nt from"bs58";var te=W(tt(),".config","moonpay"),R=W(te,"wallets.json");function re(){if(!qe(R))return[];let e=x();if(!e)throw new Error("Encryption key not found. Set MOONPAY_ENCRYPTION_KEY or ensure OS keychain is accessible.");let t=JSON.parse(Qe(R,"utf-8")),r=m.parse(t),n=E(r,e);return(JSON.parse(n).wallets??[]).map(s=>J.parse(s))}function ot(e){let t=K(),r=JSON.stringify({wallets:e}),n=v(r,t);l();let o=W(te,`.wallets.${rt(4).toString("hex")}.tmp`);Ze(o,JSON.stringify(n,null,2),{mode:384}),et(o,R)}function ne(e){let t=re();e(t),ot(t)}function it(e){let t=re();for(let r of t){if(r.name===e)return r;for(let n of Object.values(r.addresses))if(n===e)return r}return null}function tr(e){let t=it(e);if(!t)throw new Error(`Wallet "${e}" not found`);return t}function rr(e){ne(t=>{if(t.some(r=>r.name===e.name))throw new Error(`Wallet "${e.name}" already exists`);t.push(e)})}function nr(e){ne(t=>{let r=t.findIndex(n=>n.name===e);if(r===-1)throw new Error(`Wallet "${e}" not found`);t.splice(r,1)})}function or(e,t){let r=Y[t];if(e.type==="imported"){if(e.chain!==r)throw new Error(`Wallet "${e.name}" was imported for ${e.chain}, cannot sign for ${t}.`);return{privateKey:st(e.privateKey,r),address:e.addresses[r]}}let n=d(e.mnemonic,r);return{privateKey:n.privateKey,address:n.address}}function st(e,t){if(t==="solana")return nt.decode(e);let r=e.startsWith("0x")?e.slice(2):e;return Uint8Array.from(Buffer.from(r,"hex"))}export{de as a,M as b,l as c,Et as d,w as e,xe as f,wt as g,Kt as h,be as i,ve as j,kt as k,Yt as l,ut as m,Y as n,H as o,dt as p,mt as q,re as r,ot as s,ne as t,it as u,tr as v,rr as w,nr as x,or as y};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
process.noDeprecation = true; import { createRequire as __createRequire } from "module"; const require = __createRequire(import.meta.url);
|
|
2
|
-
import{a as Se,b as I,c as ve,d as ee,e as ke,f as we,g as Pe,h as S,i as je,j as Te,k as E,l as te,m,n as y,o as Ce,p as q,q as ie,r as ne,t as Ae,v as b,w as M,x as xe,y as D}from"./chunk-JPZ336LJ.js";async function Mt(e,t,i){let n=await E(),r=I();n&&(r.Authorization=`Bearer ${n}`);let o=await fetch(`${e}/api/tools/${encodeURIComponent(t)}`,{method:"POST",signal:AbortSignal.timeout(6e4),headers:r,body:JSON.stringify(i)});if(o.status===401&&n){let d=ke();if(d?.refreshToken)try{let f=await Te(d);o=await fetch(`${e}/api/tools/${encodeURIComponent(t)}`,{method:"POST",signal:AbortSignal.timeout(6e4),headers:{...I(),Authorization:`Bearer ${f.accessToken}`},body:JSON.stringify(i)})}catch{}}if(o.status===401)throw new Error("This command requires a MoonPay CLI account. Run `moonpay login` first.");let a=await o.text();if(!a){if(o.status===429){let d=n?" Run `mp upgrade` to increase your rate limit.":" Log in with `mp login` for higher limits.";throw new Error(`Rate limit exceeded.${d}`)}throw new Error(`Empty response from server (${o.status})`)}let s;try{s=JSON.parse(a)}catch{throw new Error(`Unexpected response from server (${o.status})`)}if(o.status<200||o.status>=300){let d=s;throw new Error(d?.error??`Tool call failed (${o.status})`)}return s}async function l(e,t,i){return await Mt(e,t,i)}var pn=[{name:"buy",description:"Buy crypto with fiat via MoonPay. Returns a checkout URL to complete the purchase.",inputSchema:{$ref:"#/definitions/buy_input",definitions:{buy_input:{type:"object",properties:{token:{type:"string",enum:["btc","pol_polygon","sol","trx","usdc","usdc_arbitrum","usdc_base","usdc_optimism","usdc_sol","usdc_polygon","usdt_trx","eth","eth_polygon","eth_optimism","eth_base","eth_arbitrum"],description:"MoonPay currency code: sol (Solana), usdc_sol (USDC on Solana), eth (Ethereum), usdc (USDC on Ethereum), usdc_base (USDC on Base), trx (TRX on Tron), usdt_trx (USDT on Tron), etc."},amount:{type:"number",description:"Amount in USD to spend. For example, 50 means $50 worth of the selected token."},wallet:{type:"string",description:"Destination wallet address to receive tokens (must match the chain for the selected token)"},email:{type:["string","null"],description:"Buyer email to pre-fill on the checkout page"}},required:["token","amount","wallet","email"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/buy_output",definitions:{buy_output:{type:"object",properties:{url:{type:"string",description:"MoonPay checkout URL \u2014 open in browser to complete purchase"}},required:["url"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"deposit_create",description:"Create a new deposit link that generates multi-chain deposit addresses. Anyone can send crypto to these addresses from Solana, Ethereum, Bitcoin, or Tron \u2014 it automatically converts to the specified stablecoin and settles to the destination wallet and chain.",inputSchema:{$ref:"#/definitions/deposit_create_input",definitions:{deposit_create_input:{type:"object",properties:{name:{type:"string",description:"Human-readable label for this deposit link (e.g. 'Treasury Base USDC')"},wallet:{type:"string",description:"Destination wallet address where USDC will be delivered"},chain:{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","bnb"],description:"Blockchain of the destination wallet"},token:{type:"string",enum:["USDC","USDC.e","USDT"],description:"Token to receive. USDC.e (bridged USDC) is only available on Polygon."}},required:["name","wallet","chain","token"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/deposit_create_output",definitions:{deposit_create_output:{type:"object",properties:{id:{type:"string",description:"Unique deposit ID \u2014 use with deposit_transaction_list to check incoming payments"},destinationWallet:{type:"string",description:"Wallet address that will receive the stablecoin"},destinationChain:{type:"string",description:"Chain where the stablecoin will be delivered"},customerToken:{type:"string",description:"Token to check deposit transactions \u2014 pass to deposit_transaction_list"},depositUrl:{type:"string",description:"Shareable URL \u2014 open in browser or share with senders to deposit funds"},wallets:{type:"array",items:{type:"object",properties:{address:{type:"string",description:"Address to send funds to"},chain:{type:"string",description:"Chain this address is on (solana, ethereum, bitcoin, tron)"},qrCode:{type:"string",description:"URL to a QR code image for the deposit address"}},required:["address","chain","qrCode"],additionalProperties:!1},description:"Deposit addresses across all supported chains \u2014 send any token to any of these"},instructions:{type:"string",description:"Human-readable instructions explaining how to use the deposit"}},required:["id","destinationWallet","destinationChain","customerToken","depositUrl","wallets","instructions"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"deposit_retrieve",description:"Retrieve details of a deposit by ID. Returns the deposit name, status, destination wallet, and deposit addresses.",inputSchema:{$ref:"#/definitions/deposit_retrieve_input",definitions:{deposit_retrieve_input:{type:"object",properties:{id:{type:"string",description:"Deposit ID returned from deposit_create"}},required:["id"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/deposit_retrieve_output",definitions:{deposit_retrieve_output:{type:"object",properties:{id:{type:"string"},name:{type:"string"},status:{type:"string"},destinationWallet:{type:["string","null"]},depositUrl:{type:"string"}},required:["id","name","status","destinationWallet","depositUrl"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"deposit_transaction_list",description:"List transactions for a deposit. Pass the deposit id from deposit_create to check incoming payment status.",inputSchema:{$ref:"#/definitions/deposit_transaction_list_input",definitions:{deposit_transaction_list_input:{type:"object",properties:{id:{type:"string",description:"Deposit ID returned from deposit_create"}},required:["id"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/deposit_transaction_list_output",definitions:{deposit_transaction_list_output:{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{id:{type:"string"},amount:{type:"number"},token:{type:"string"},from:{type:"string"},status:{type:"string"},settledAmount:{type:["number","null"]},settledCurrency:{type:["string","null"]},timestamp:{type:"string"}},required:["id","amount","token","from","status","settledAmount","settledCurrency","timestamp"],additionalProperties:!1}}},required:["items"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"feedback_create",description:"Submit feedback, a bug report, or a feature request. Requires authentication.",inputSchema:{$ref:"#/definitions/feedback_create_input",definitions:{feedback_create_input:{type:"object",properties:{type:{type:"string",enum:["bug","feature","general"],description:"Type of feedback: bug, feature, or general"},message:{type:"string",minLength:1,maxLength:280,description:"Your feedback message"}},required:["type","message"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/feedback_create_output",definitions:{feedback_create_output:{type:"object",properties:{id:{type:"string",description:"Feedback ID"},message:{type:"string",description:"Confirmation message"}},required:["id","message"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"login",description:"Send a verification code to the provided email to sign in or create an account. Requires an hCaptcha token.",inputSchema:{$ref:"#/definitions/login_input",definitions:{login_input:{type:"object",properties:{email:{type:"string",format:"email",description:"The email of the user to login"},captchaToken:{type:"string",description:"hCaptcha response token"}},required:["email","captchaToken"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/login_output",definitions:{login_output:{type:"object",properties:{email:{type:"string",description:"The email the OTP was sent to"}},required:["email"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"refresh",description:"Refresh an expired access token using a refresh token.",inputSchema:{$ref:"#/definitions/refresh_input",definitions:{refresh_input:{type:"object",properties:{refreshToken:{type:"string",description:"The refresh token from a previous login"}},required:["refreshToken"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/refresh_output",definitions:{refresh_output:{type:"object",properties:{accessToken:{type:"string"},refreshToken:{type:"string"},expiresAt:{type:"number"}},required:["accessToken","refreshToken","expiresAt"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"swaps_transaction_build",description:"Build a swap or bridge transaction. Returns an unsigned transaction with a human-readable message, amounts, exchange rate, and estimated time. Supports same-chain swaps and cross-chain bridges. Accepts UI amounts (e.g. 0.1 SOL) \u2014 decimal conversion is handled automatically.",inputSchema:{$ref:"#/definitions/swaps_transaction_build_input",definitions:{swaps_transaction_build_input:{type:"object",properties:{from:{type:"object",properties:{wallet:{type:"string",description:"Source wallet address (Solana pubkey or EVM 0x address)"},chain:{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","optimism","bnb","avalanche","tron","bitcoin"],description:"Source blockchain"},token:{type:"string",description:"Source token address (mint on Solana, contract on EVM). Use native token address for SOL/ETH."},amount:{type:["number","null"],description:"Amount to swap (exact-in). Null for exact-out."}},required:["wallet","chain","token","amount"],additionalProperties:!1,description:"Source: wallet, chain, token, amount"},to:{type:"object",properties:{wallet:{type:"string",description:"Destination wallet address. Same as source wallet for same-chain swaps."},chain:{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","optimism","bnb","avalanche","tron","bitcoin"],description:"Destination blockchain"},token:{type:"string",description:"Destination token address (mint on Solana, contract on EVM)"},amount:{type:["number","null"],description:"Amount to receive (exact-out). Null for exact-in."}},required:["wallet","chain","token","amount"],additionalProperties:!1,description:"Destination: wallet, chain, token, amount"}},required:["from","to"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/swaps_transaction_build_output",definitions:{swaps_transaction_build_output:{type:"object",properties:{transactionId:{type:"string",description:"Transaction ID for tracking"},transaction:{anyOf:[{type:"object",properties:{type:{type:"string",const:"solana"},base64:{type:"string",description:"Base64-encoded transaction"}},required:["type","base64"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"evm"},to:{type:"string",description:"Contract address"},data:{type:"string",description:"Calldata"},value:{type:"string",description:"Native token value in wei"},chainId:{type:"number",description:"EVM chain ID"}},required:["type","to","data","value","chainId"],additionalProperties:!1}],description:"Unsigned transaction"},message:{type:"string",description:"Human-readable description (e.g. Swap 0.1 SOL \u2192 42.5 USDC on Solana)"},amountIn:{type:"object",properties:{amount:{type:"number",description:"Human-readable amount (e.g. 1.5)"},raw:{type:"string",description:"Raw amount in smallest unit (e.g. wei, lamports)"},symbol:{type:"string"},usd:{type:["number","null"]}},required:["amount","raw","symbol","usd"],additionalProperties:!1},amountOut:{type:"object",properties:{amount:{type:"number",description:"Human-readable amount (e.g. 1.5)"},raw:{type:"string",description:"Raw amount in smallest unit (e.g. wei, lamports)"},symbol:{type:"string"},usd:{type:["number","null"]}},required:["amount","raw","symbol","usd"],additionalProperties:!1},exchangeRate:{type:"number",description:"Exchange rate (amountOut / amountIn)"},estimatedTime:{type:["number","null"],description:"Estimated completion time in seconds"},requiresApproval:{type:"boolean",description:"Whether an ERC20 approval transaction is needed first"}},required:["transactionId","transaction","message","amountIn","amountOut","exchangeRate","estimatedTime","requiresApproval"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"token_balance_list",description:"List all token balances held in a wallet, including amount owned, current value in USD, and token details. Shows the complete token portfolio.",inputSchema:{$ref:"#/definitions/token_balance_list_input",definitions:{token_balance_list_input:{type:"object",properties:{wallet:{type:"string",description:"Wallet address to check token balances for"},chain:{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","optimism","bnb","avalanche","tron","bitcoin"],description:"Blockchain to check balances on (e.g. 'solana', 'ethereum', 'base')"}},required:["wallet","chain"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/token_balance_list_output",definitions:{token_balance_list_output:{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{address:{type:"string",description:"Address of the token"},name:{type:"string",description:"Name of the token"},symbol:{type:"string",description:"Symbol of the token"},image:{type:["string","null"],description:"Image of the token"},description:{type:["string","null"],description:"Description of the token"},chain:{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","optimism","bnb","avalanche","tron","bitcoin"],description:"Chain of the token"},decimals:{type:"number",description:"Number of decimals of the token"},externalLinks:{anyOf:[{type:"object",properties:{website:{type:["string","null"],description:"Official website URL"},twitter:{type:["string","null"],description:"Twitter/X profile URL"},telegram:{type:["string","null"],description:"Telegram group URL"},discord:{type:["string","null"],description:"Discord server URL"},github:{type:["string","null"],description:"GitHub repository URL"},coingeckoId:{type:["string","null"],description:"CoinGecko token ID"}},additionalProperties:!1},{type:"null"}],description:"External links and social media"},balance:{type:"object",properties:{amount:{type:"number",description:"Number of tokens owned"},value:{type:"number",description:"Total value of the token in USD"},price:{type:"number",description:"Current price of the token"}},required:["amount","value","price"],additionalProperties:!1}},required:["address","name","symbol","chain","decimals","balance"],additionalProperties:!1},description:"Array of all tokens in the wallet with their balances and current values"}},required:["items"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"token_retrieve",description:"Get detailed token information including market data, price changes, volume, trades, and holder statistics by token address",inputSchema:{$ref:"#/definitions/token_retrieve_input",definitions:{token_retrieve_input:{type:"object",properties:{token:{type:"string",description:"Address of the token to retrieve"},chain:{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","optimism","bnb","avalanche","tron","bitcoin"],description:"Blockchain network where the token exists"}},required:["token","chain"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/token_retrieve_output",definitions:{token_retrieve_output:{type:"object",properties:{address:{type:"string",description:"Address of the token"},name:{type:"string",description:"Name of the token"},symbol:{type:"string",description:"Symbol of the token"},image:{type:["string","null"],description:"Image of the token"},description:{type:["string","null"],description:"Description of the token"},chain:{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","optimism","bnb","avalanche","tron","bitcoin"],description:"Chain of the token"},decimals:{type:"number",description:"Number of decimals of the token"},externalLinks:{anyOf:[{type:"object",properties:{website:{type:["string","null"],description:"Official website URL"},twitter:{type:["string","null"],description:"Twitter/X profile URL"},telegram:{type:["string","null"],description:"Telegram group URL"},discord:{type:["string","null"],description:"Discord server URL"},github:{type:["string","null"],description:"GitHub repository URL"},coingeckoId:{type:["string","null"],description:"CoinGecko token ID"}},additionalProperties:!1},{type:"null"}],description:"External links and social media"},marketData:{type:"object",properties:{liquidity:{type:["number","null"],description:"Total liquidity"},marketCap:{type:["number","null"],description:"Market capitalization"},fdv:{type:["number","null"],description:"Fully diluted valuation"},price:{type:["number","null"],description:"Current price"},priceChangePercent:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Percentage change in price across time intervals"},volume:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Trading volume in USD across time intervals"},volumeChangePercent:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Percentage change in trading volume across time intervals"},trades:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Number of trades across time intervals"},tradesChangePercent:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Percentage change in number of trades across time intervals"},buys:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Number of buys across time intervals"},buysChangePercent:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Percentage change in number of buys across time intervals"},sells:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Number of sells across time intervals"},sellsChangePercent:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Percentage change in number of sells across time intervals"},uniqueWallets:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Number of unique wallets trading across time intervals"},uniqueWalletsChangePercent:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Percentage change in number of unique wallets trading across time intervals"}},additionalProperties:!1}},required:["address","name","symbol","chain","decimals"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"token_search",description:"Search for tokens by name, symbol, or address. Returns matching tokens with their market data including price, volume, and liquidity.",inputSchema:{$ref:"#/definitions/token_search_input",definitions:{token_search_input:{type:"object",properties:{query:{type:"string",description:"Search term - can be token name (e.g. 'Bitcoin'), symbol (e.g. 'BTC'), or partial match"},chain:{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","optimism","bnb","avalanche","tron","bitcoin"],description:"Blockchain to search on (e.g. 'solana', 'ethereum', 'base')"},limit:{type:["number","null"],description:"Maximum number of results to return (optional, defaults to 5)"}},required:["query","chain","limit"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/token_search_output",definitions:{token_search_output:{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{address:{type:"string",description:"Address of the token"},name:{type:"string",description:"Name of the token"},symbol:{type:"string",description:"Symbol of the token"},image:{type:["string","null"],description:"Image of the token"},description:{type:["string","null"],description:"Description of the token"},chain:{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","optimism","bnb","avalanche","tron","bitcoin"],description:"Chain of the token"},decimals:{type:"number",description:"Number of decimals of the token"},externalLinks:{anyOf:[{type:"object",properties:{website:{type:["string","null"],description:"Official website URL"},twitter:{type:["string","null"],description:"Twitter/X profile URL"},telegram:{type:["string","null"],description:"Telegram group URL"},discord:{type:["string","null"],description:"Discord server URL"},github:{type:["string","null"],description:"GitHub repository URL"},coingeckoId:{type:["string","null"],description:"CoinGecko token ID"}},additionalProperties:!1},{type:"null"}],description:"External links and social media"},marketData:{type:"object",properties:{liquidity:{type:["number","null"],description:"Total liquidity"},marketCap:{type:["number","null"],description:"Market capitalization"},fdv:{type:["number","null"],description:"Fully diluted valuation"},price:{type:["number","null"],description:"Current price"},priceChangePercent:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Percentage change in price across time intervals"},volume:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Trading volume in USD across time intervals"},volumeChangePercent:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Percentage change in trading volume across time intervals"},trades:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Number of trades across time intervals"},tradesChangePercent:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Percentage change in number of trades across time intervals"},buys:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Number of buys across time intervals"},buysChangePercent:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Percentage change in number of buys across time intervals"},sells:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Number of sells across time intervals"},sellsChangePercent:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Percentage change in number of sells across time intervals"},uniqueWallets:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Number of unique wallets trading across time intervals"},uniqueWalletsChangePercent:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Percentage change in number of unique wallets trading across time intervals"}},additionalProperties:!1}},required:["address","name","symbol","chain","decimals"],additionalProperties:!1},description:"Array of tokens matching the search query with their market data"}},required:["items"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"token_transfer",description:"Build an unsigned transfer transaction. Returns a transaction ready for signing. Handles both native and token transfers.",inputSchema:{$ref:"#/definitions/token_transfer_input",definitions:{token_transfer_input:{type:"object",properties:{wallet:{type:"string",description:"Sender wallet address (Solana pubkey or EVM 0x address)"},token:{type:"string",description:"Token address (mint on Solana, contract on EVM). Use native token address for SOL/ETH."},to:{type:"string",description:"Recipient wallet address or name"},amount:{type:"number",description:"Amount to transfer in human-readable units (e.g. 1.5)"},chain:{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","optimism","bnb","avalanche","tron","bitcoin"],description:"Blockchain to execute the transfer on"}},required:["wallet","token","to","amount","chain"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/token_transfer_output",definitions:{token_transfer_output:{type:"object",properties:{transaction:{anyOf:[{type:"object",properties:{type:{type:"string",const:"solana"},base64:{type:"string",description:"Base64-encoded transaction"}},required:["type","base64"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"evm"},to:{type:"string",description:"Recipient or contract address"},data:{type:"string",description:"Calldata (0x for native transfers)"},value:{type:"string",description:"Native token value in wei"},chainId:{type:"number",description:"EVM chain ID"}},required:["type","to","data","value","chainId"],additionalProperties:!1}]},message:{type:"string",description:"Human-readable description of the transfer"}},required:["transaction","message"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"token_trending_list",description:"Get currently trending tokens on a blockchain. Perfect for discovering what's hot right now.",inputSchema:{$ref:"#/definitions/token_trending_list_input",definitions:{token_trending_list_input:{type:"object",properties:{chain:{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","optimism","bnb","avalanche","tron","bitcoin"],description:"Blockchain to get trending tokens from (e.g. 'solana', 'ethereum', 'base')"},limit:{type:"integer",minimum:1,description:"Number of results per page"},page:{type:"integer",minimum:1,description:"Page number (starts at 1)"}},required:["chain","limit","page"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/token_trending_list_output",definitions:{token_trending_list_output:{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{address:{type:"string",description:"Address of the token"},name:{type:"string",description:"Name of the token"},symbol:{type:"string",description:"Symbol of the token"},image:{type:["string","null"],description:"Image of the token"},description:{type:["string","null"],description:"Description of the token"},chain:{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","optimism","bnb","avalanche","tron","bitcoin"],description:"Chain of the token"},decimals:{type:"number",description:"Number of decimals of the token"},externalLinks:{anyOf:[{type:"object",properties:{website:{type:["string","null"],description:"Official website URL"},twitter:{type:["string","null"],description:"Twitter/X profile URL"},telegram:{type:["string","null"],description:"Telegram group URL"},discord:{type:["string","null"],description:"Discord server URL"},github:{type:["string","null"],description:"GitHub repository URL"},coingeckoId:{type:["string","null"],description:"CoinGecko token ID"}},additionalProperties:!1},{type:"null"}],description:"External links and social media"},marketData:{type:"object",properties:{liquidity:{type:["number","null"],description:"Total liquidity"},marketCap:{type:["number","null"],description:"Market capitalization"},fdv:{type:["number","null"],description:"Fully diluted valuation"},price:{type:["number","null"],description:"Current price"},priceChangePercent:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Percentage change in price across time intervals"},volume:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Trading volume in USD across time intervals"},volumeChangePercent:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Percentage change in trading volume across time intervals"},trades:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Number of trades across time intervals"},tradesChangePercent:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Percentage change in number of trades across time intervals"},buys:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Number of buys across time intervals"},buysChangePercent:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Percentage change in number of buys across time intervals"},sells:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Number of sells across time intervals"},sellsChangePercent:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Percentage change in number of sells across time intervals"},uniqueWallets:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Number of unique wallets trading across time intervals"},uniqueWalletsChangePercent:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Percentage change in number of unique wallets trading across time intervals"}},additionalProperties:!1}},required:["address","name","symbol","chain","decimals"],additionalProperties:!1},description:"Array of trending tokens with their market data"}},required:["items"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"transaction_list",description:"List swap and bridge transaction history for a wallet.",inputSchema:{$ref:"#/definitions/transaction_list_input",definitions:{transaction_list_input:{type:"object",properties:{wallet:{type:"string",description:"Wallet address that signed and sent the transactions"},chain:{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","optimism","bnb","avalanche","tron","bitcoin"],description:"Chain the wallet is on"}},required:["wallet","chain"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/transaction_list_output",definitions:{transaction_list_output:{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{transactionId:{type:"string",description:"Transaction tracking ID"},status:{type:"string",description:"Current status: pending, success, or failed"},type:{type:"string",enum:["swap","bridge"],description:"Transaction type"},from:{type:"object",properties:{chain:{type:"string",description:"Source blockchain"},token:{type:"string",description:"Source token symbol"},amount:{type:["number","null"],description:"Amount sent"},txHash:{type:"string",description:"Source chain transaction hash"}},required:["chain","token","amount","txHash"],additionalProperties:!1},to:{type:"object",properties:{chain:{type:"string",description:"Destination blockchain"},token:{type:"string",description:"Destination token symbol"},amount:{type:["number","null"],description:"Amount received"},txHash:{type:["string","null"],description:"Destination chain transaction hash"}},required:["chain","token","amount","txHash"],additionalProperties:!1},usd:{type:["number","null"],description:"USD value of the transaction"},bridgeTime:{type:["number","null"],description:"Bridge completion time in seconds"}},required:["transactionId","status","type","from","to","usd","bridgeTime"],additionalProperties:!1},description:"List of swap/bridge transactions"}},required:["items"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"transaction_register",description:"Register a broadcast transaction for tracking. Call after transaction_send to enable status tracking via transaction_retrieve.",inputSchema:{$ref:"#/definitions/transaction_register_input",definitions:{transaction_register_input:{type:"object",properties:{transactionId:{type:"string",description:"Transaction ID from the swap build step"},transactionHash:{type:"string",description:"Transaction hash/signature after broadcasting"},chain:{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","optimism","bnb","avalanche","tron","bitcoin"],description:"Blockchain where the transaction was broadcast"}},required:["transactionId","transactionHash","chain"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/transaction_register_output",definitions:{transaction_register_output:{type:"object",properties:{success:{type:"boolean",description:"Whether the operation was successful"}},required:["success"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"transaction_retrieve",description:"Get the status and details of a transaction by its ID.",inputSchema:{$ref:"#/definitions/transaction_retrieve_input",definitions:{transaction_retrieve_input:{type:"object",properties:{transactionId:{type:"string",description:"Transaction ID from swap build or transaction register"}},required:["transactionId"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/transaction_retrieve_output",definitions:{transaction_retrieve_output:{type:"object",properties:{transactionId:{type:"string",description:"Transaction tracking ID"},status:{type:"string",description:"Current status: pending, success, or failed"},type:{type:"string",enum:["swap","bridge"],description:"Transaction type"},from:{type:"object",properties:{chain:{type:"string",description:"Source blockchain"},token:{type:"string",description:"Source token symbol"},amount:{type:["number","null"],description:"Amount sent"},txHash:{type:"string",description:"Source chain transaction hash"}},required:["chain","token","amount","txHash"],additionalProperties:!1},to:{type:"object",properties:{chain:{type:"string",description:"Destination blockchain"},token:{type:"string",description:"Destination token symbol"},amount:{type:["number","null"],description:"Amount received"},txHash:{type:["string","null"],description:"Destination chain transaction hash. Null while bridge is in progress."}},required:["chain","token","amount","txHash"],additionalProperties:!1},usd:{type:["number","null"],description:"USD value of the transaction"},bridgeTime:{type:["number","null"],description:"Bridge completion time in seconds. Null for same-chain swaps."}},required:["transactionId","status","type","from","to","usd","bridgeTime"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"transaction_send",description:"Broadcast a signed transaction to the network. Supports Solana, EVM chains, and Bitcoin.",inputSchema:{$ref:"#/definitions/transaction_send_input",definitions:{transaction_send_input:{type:"object",properties:{transaction:{type:"string",description:"Signed transaction: base64-encoded for Solana, hex-encoded (0x...) for EVM, raw hex for Bitcoin"},message:{type:"string",description:"Human-readable message describing the transaction"},chain:{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","optimism","bnb","avalanche","tron","bitcoin"],description:"Blockchain to broadcast on"}},required:["transaction","message","chain"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/transaction_send_output",definitions:{transaction_send_output:{type:"object",properties:{signature:{type:"string",description:"Transaction signature/hash. Absent if broadcast failed."},message:{type:"string",description:"Result message or error description"}},required:["message"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"user_retrieve",description:"Get the currently authenticated user",inputSchema:{$ref:"#/definitions/user_retrieve_input",definitions:{user_retrieve_input:{type:"object",properties:{},additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/user_retrieve_output",definitions:{user_retrieve_output:{type:"object",properties:{id:{type:"string",description:"User ID"},email:{type:["string","null"],description:"User email address"}},required:["id","email"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"verify",description:"Verify a login code for the user.",inputSchema:{$ref:"#/definitions/verify_input",definitions:{verify_input:{type:"object",properties:{code:{type:"string",pattern:"^\\d{6}$",description:"The code to verify"},email:{type:"string",format:"email",description:"The email the OTP was sent to"}},required:["code","email"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/verify_output",definitions:{verify_output:{type:"object",properties:{accessToken:{type:"string"},refreshToken:{type:"string"},expiresAt:{type:"number"}},required:["accessToken","refreshToken","expiresAt"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_agreement_accept",description:"Accept a required legal agreement. Pass the content ID from virtual-account_agreement_list to mark the agreement as accepted.",inputSchema:{$ref:"#/definitions/virtual-account_agreement_accept_input",definitions:{"virtual-account_agreement_accept_input":{type:"object",properties:{contentId:{type:"string",description:"Content ID from virtual-account_agreement_list"}},required:["contentId"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_agreement_accept_output",definitions:{"virtual-account_agreement_accept_output":{type:"object",properties:{id:{type:"string",description:"Signing record ID"},contentId:{type:["string","null"],description:"Content ID of the accepted agreement"},documentId:{type:["string","null"],description:"Document ID"}},required:["id","contentId","documentId"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_agreement_list",description:"List legal agreements. By default shows pending agreements that must be accepted to activate the account. Use status=accepted to see previously accepted agreements.",inputSchema:{$ref:"#/definitions/virtual-account_agreement_list_input",definitions:{"virtual-account_agreement_list_input":{type:"object",properties:{status:{anyOf:[{type:"string",enum:["pending","accepted"]},{type:"null"}],description:"Filter: pending (need to accept, default) or accepted (already signed)"},country:{type:["string","null"],description:"Country code for terms (e.g. USA, GBR). Defaults to USA."}},required:["status","country"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_agreement_list_output",definitions:{"virtual-account_agreement_list_output":{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{id:{type:"string",description:"Content ID \u2014 pass to virtual-account_agreement_accept to accept"},name:{type:"string",description:"Document name (e.g. 'USA Terms and Conditions')"},url:{type:"string",description:"URL to view the document"}},required:["id","name","url"],additionalProperties:!1},description:"List of agreements"}},required:["items"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_bank-account_delete",description:"Delete a bank account",inputSchema:{$ref:"#/definitions/virtual-account_bank-account_delete_input",definitions:{"virtual-account_bank-account_delete_input":{type:"object",properties:{bankAccountId:{type:"string",format:"uuid",description:"The ID of the bank account to delete"}},required:["bankAccountId"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_bank-account_delete_output",definitions:{"virtual-account_bank-account_delete_output":{type:"object",properties:{success:{type:"boolean",description:"Whether the operation was successful"}},required:["success"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_bank-account_list",description:"List registered bank accounts",inputSchema:{$ref:"#/definitions/virtual-account_bank-account_list_input",definitions:{"virtual-account_bank-account_list_input":{type:"object",properties:{},additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_bank-account_list_output",definitions:{"virtual-account_bank-account_list_output":{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{id:{type:"string"},bank_account_identifier:{anyOf:[{type:"object",properties:{type:{type:"string",const:"SEPA"},iban:{type:"string"}},required:["type","iban"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"ACH"},account_number:{type:"string"},routing_number:{type:"string"}},required:["type","account_number","routing_number"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Wire"},account_number:{type:"string"},routing_number:{type:"string"}},required:["type","account_number","routing_number"],additionalProperties:!1}]},bank_name:{type:"string"},country:{type:"string"},created_at:{type:"string",format:"date-time"},currency:{type:"string",enum:["USD","EUR"],description:"Fiat currency code. USD: US Dollar, EUR: Euro"},customer_id:{type:"string"},is_third_party:{type:"boolean"},label:{type:["string","null"]},ownership_verified:{type:"boolean"},status:{type:"string",enum:["AuthorizationRequired","AuthorizationFailed","RegistrationPending","RegistrationFailed","Registered"]},updated_at:{type:"string",format:"date-time"}},required:["id","bank_account_identifier","bank_name","country","created_at","currency","customer_id","is_third_party","label","ownership_verified","status","updated_at"],additionalProperties:!1}}},required:["items"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_bank-account_register",description:"Register a bank account for offramp payouts. USD accounts use ACH/Wire with account+routing numbers. EUR accounts use SEPA with IBAN.",inputSchema:{$ref:"#/definitions/virtual-account_bank-account_register_input",definitions:{"virtual-account_bank-account_register_input":{type:"object",properties:{currency:{type:"string",enum:["USD","EUR"],description:"Currency of the bank account (USD or EUR)"},type:{type:"string",enum:["ACH","Wire","SEPA"],description:"Account type: ACH or Wire for USD, SEPA for EUR"},accountNumber:{type:["string","null"],description:"Account number (required for USD ACH/Wire)"},routingNumber:{type:["string","null"],description:"Routing number (required for USD ACH/Wire)"},iban:{type:["string","null"],description:"IBAN (required for EUR SEPA)"},address:{type:"object",properties:{street:{type:"string",description:"Street address"},city:{type:"string",description:"City"},state:{type:"string",description:"State or province"},country:{type:"string",enum:["US","GB","CA","AU","DE","FR","IT","ES","NL","BE","AT","CH","SE","NO","DK","FI","IE","PT","PL","CZ","GR","JP","KR","CN","IN","BR","MX","AR","ZA","NZ","SG","HK","AE"],description:"ISO 3166-1 Alpha-2 country code"},postalCode:{type:"string",description:"Postal or ZIP code"}},required:["street","city","state","country","postalCode"],additionalProperties:!1,description:"Address of the account holder"},email:{type:"string",description:"Email address of the account holder"},phoneNumber:{type:"string",description:"Phone number of the account holder"},providerCountry:{type:"string",enum:["US","GB","CA","AU","DE","FR","IT","ES","NL","BE","AT","CH","SE","NO","DK","FI","IE","PT","PL","CZ","GR","JP","KR","CN","IN","BR","MX","AR","ZA","NZ","SG","HK","AE"],description:"ISO 3166-1 Alpha-2 country code where the bank is located"},providerName:{type:"string",description:"Name of the bank"},givenName:{type:"string",description:"First/given name of the account holder"},familyName:{type:"string",description:"Last/family name of the account holder"}},required:["currency","type","accountNumber","routingNumber","iban","address","email","phoneNumber","providerCountry","providerName","givenName","familyName"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_bank-account_register_output",definitions:{"virtual-account_bank-account_register_output":{type:"object",properties:{id:{type:"string"},bank_account_identifier:{anyOf:[{type:"object",properties:{type:{type:"string",const:"SEPA"},iban:{type:"string"}},required:["type","iban"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"ACH"},account_number:{type:"string"},routing_number:{type:"string"}},required:["type","account_number","routing_number"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Wire"},account_number:{type:"string"},routing_number:{type:"string"}},required:["type","account_number","routing_number"],additionalProperties:!1}]},bank_name:{type:"string"},country:{type:"string"},created_at:{type:"string",format:"date-time"},currency:{type:"string",enum:["USD","EUR"],description:"Fiat currency code. USD: US Dollar, EUR: Euro"},customer_id:{type:"string"},is_third_party:{type:"boolean"},label:{type:["string","null"]},ownership_verified:{type:"boolean"},status:{type:"string",enum:["AuthorizationRequired","AuthorizationFailed","RegistrationPending","RegistrationFailed","Registered"]},updated_at:{type:"string",format:"date-time"}},required:["id","bank_account_identifier","bank_name","country","created_at","currency","customer_id","is_third_party","label","ownership_verified","status","updated_at"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_bank-account_retrieve",description:"Get a bank account by ID",inputSchema:{$ref:"#/definitions/virtual-account_bank-account_retrieve_input",definitions:{"virtual-account_bank-account_retrieve_input":{type:"object",properties:{bankAccountId:{type:"string",description:"Bank account ID"}},required:["bankAccountId"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_bank-account_retrieve_output",definitions:{"virtual-account_bank-account_retrieve_output":{type:"object",properties:{id:{type:"string"},bank_account_identifier:{anyOf:[{type:"object",properties:{type:{type:"string",const:"SEPA"},iban:{type:"string"}},required:["type","iban"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"ACH"},account_number:{type:"string"},routing_number:{type:"string"}},required:["type","account_number","routing_number"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Wire"},account_number:{type:"string"},routing_number:{type:"string"}},required:["type","account_number","routing_number"],additionalProperties:!1}]},bank_name:{type:"string"},country:{type:"string"},created_at:{type:"string",format:"date-time"},currency:{type:"string",enum:["USD","EUR"],description:"Fiat currency code. USD: US Dollar, EUR: Euro"},customer_id:{type:"string"},is_third_party:{type:"boolean"},label:{type:["string","null"]},ownership_verified:{type:"boolean"},status:{type:"string",enum:["AuthorizationRequired","AuthorizationFailed","RegistrationPending","RegistrationFailed","Registered"]},updated_at:{type:"string",format:"date-time"}},required:["id","bank_account_identifier","bank_name","country","created_at","currency","customer_id","is_third_party","label","ownership_verified","status","updated_at"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_create",description:"Create a virtual account and start KYC verification",inputSchema:{$ref:"#/definitions/virtual-account_create_input",definitions:{"virtual-account_create_input":{type:"object",properties:{},additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_create_output",definitions:{"virtual-account_create_output":{type:"object",properties:{id:{type:"string"},email:{type:"string"},customerType:{type:"string",enum:["Person","Business"]},status:{type:"string",enum:["UserRequired","SigningsRequired","IdentificationRequired","Active","Suspended"]},nextStep:{type:["string","null"]}},required:["id","email","customerType","status","nextStep"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_kyc_continue",description:"Get the current KYC verification status and URL. Use this to check progress or get the verification link again.",inputSchema:{$ref:"#/definitions/virtual-account_kyc_continue_input",definitions:{"virtual-account_kyc_continue_input":{type:"object",properties:{},additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_kyc_continue_output",definitions:{"virtual-account_kyc_continue_output":{type:"object",properties:{id:{type:"string",description:"Identification record ID"},status:{type:"string",enum:["Pending","Processed","PendingReview","Approved","Declined","Expired"],description:"KYC status: Pending, Processed, PendingReview, Approved, Declined, or Expired"},url:{type:["string","null"],description:"URL to complete KYC verification. Null if already submitted."}},required:["id","status","url"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_kyc_restart",description:"Restart KYC verification. Creates a fresh verification link. Only available when account status is IdentificationRequired.",inputSchema:{$ref:"#/definitions/virtual-account_kyc_restart_input",definitions:{"virtual-account_kyc_restart_input":{type:"object",properties:{},additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_kyc_restart_output",definitions:{"virtual-account_kyc_restart_output":{type:"object",properties:{id:{type:"string",description:"Identification record ID"},status:{type:"string",enum:["Pending","Processed","PendingReview","Approved","Declined","Expired"],description:"KYC status: Pending, Processed, PendingReview, Approved, Declined, or Expired"},url:{type:["string","null"],description:"URL to complete KYC verification. Null if already submitted."},message:{type:["string","null"],description:"Instructions for the user"}},required:["id","status","url","message"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_offramp_cancel",description:"Cancel an offramp",inputSchema:{$ref:"#/definitions/virtual-account_offramp_cancel_input",definitions:{"virtual-account_offramp_cancel_input":{type:"object",properties:{offrampId:{type:"string",format:"uuid",description:"The ID of the offramp to cancel"}},required:["offrampId"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_offramp_cancel_output",definitions:{"virtual-account_offramp_cancel_output":{type:"object",properties:{success:{type:"boolean"},message:{type:"string"}},required:["success","message"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_offramp_create",description:"Create an offramp to convert stablecoin to fiat",inputSchema:{$ref:"#/definitions/virtual-account_offramp_create_input",definitions:{"virtual-account_offramp_create_input":{type:"object",properties:{name:{type:"string",description:"The name of the offramp"},bankAccountId:{type:"string",description:"Bank account ID to receive fiat. Get from `bank-account list`."},stablecoin:{type:"string",enum:["USDC","USDT","EURC"],description:"The stablecoin token to convert from"},chain:{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","optimism","bnb","avalanche","tron","bitcoin"],description:"Blockchain the stablecoin is on (solana, ethereum, polygon, arbitrum, base)"}},required:["name","bankAccountId","stablecoin","chain"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_offramp_create_output",definitions:{"virtual-account_offramp_create_output":{type:"object",properties:{created_at:{type:"string",format:"date-time"},deposit_account:{anyOf:[{anyOf:[{type:"object",properties:{type:{type:"string",const:"ACHWire"},account_number:{type:"string"},bank_address:{type:"string"},bank_name:{type:"string"},recipient_address:{type:"string"},recipient_name:{type:"string"},routing_number:{type:"string"}},required:["type","account_number","bank_address","bank_name","recipient_address","recipient_name","routing_number"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"AfricanBankTransfer"},account_name:{type:"string"},account_number:{type:"string"},amount:{type:"string"},bank_name:{type:"string"},currency:{type:"string"},financial_institution:{type:"string"}},required:["type","account_name","account_number","amount","bank_name","currency","financial_institution"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Crypto"},address:{type:"string"},chain:{type:"string",enum:["Solana","Ethereum","Polygon","Arbitrum","Base","Stellar","Citrea"]}},required:["type","address","chain"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"MobileMoney"},instruction:{type:"string"},mobile_number:{type:"string"}},required:["type","mobile_number"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Pix"},instruction:{type:"string"},pix_key:{type:"string"}},required:["type","instruction","pix_key"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"SEPA"},iban:{type:"string"},address:{type:"string"},beneficiary_name:{type:["string","null"]},bic:{type:"string"},name:{type:"string"},phone:{type:"string"}},required:["type","iban","beneficiary_name"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Spei"},clabe:{type:"string"},instruction:{type:"string"}},required:["type","clabe","instruction"],additionalProperties:!1}]},{type:"null"}]},destination_currency:{anyOf:[{type:"object",properties:{type:{type:"string",const:"Crypto"},blockchain:{type:"string",enum:["Solana","Ethereum","Polygon","Arbitrum","Base","Stellar","Citrea"]},token:{type:"string",enum:["USDC","USDT","EURC"],description:"Stablecoin token code. USDC: USD Coin, USDT: Tether, EURC: Euro Coin"}},required:["type","blockchain","token"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Fiat"},code:{type:"string",enum:["USD","EUR"],description:"Fiat currency code. USD: US Dollar, EUR: Euro"}},required:["type","code"],additionalProperties:!1}]},id:{type:"string",description:"The ID of the autoramp"},name:{type:"string"},recipient:{type:"object",properties:{type:{type:"string",const:"BankAccount"},provider_name:{type:"string"},provider_country:{type:"object",properties:{code:{type:"string",minLength:2,maxLength:2}},required:["code"],additionalProperties:!1},is_third_party:{type:"boolean"},account_identifier:{type:"object",properties:{type:{type:"string",enum:["SEPA","ACH","Wire"]},iban:{type:"string"},account_number:{type:"string"},routing_number:{type:"string"}},required:["type"],additionalProperties:!1},address:{type:"object",properties:{street:{type:"string"},city:{type:"string"},state:{type:"string"},country:{type:"object",properties:{code:{type:"string",minLength:2,maxLength:2}},required:["code"],additionalProperties:!1},postal_code:{type:"string"}},required:["street","city","state","country","postal_code"],additionalProperties:!1},recipient:{type:"object",properties:{type:{type:"string",enum:["Individual","Business"]},family_name:{type:"string"},given_name:{type:"string"},name:{type:"string"}},required:["type"],additionalProperties:!1}},required:["type","provider_name","provider_country","is_third_party","account_identifier","address","recipient"],additionalProperties:!1},source:{type:"string",enum:["Standalone","Quote"]},source_currencies:{type:"array",items:{type:"object",properties:{type:{type:"string",const:"Crypto"},blockchain:{type:"string",enum:["Solana","Ethereum","Polygon","Arbitrum","Base","Stellar","Citrea"]},token:{type:"string",enum:["USDC","USDT","EURC"],description:"Stablecoin token code. USDC: USD Coin, USDT: Tether, EURC: Euro Coin"}},required:["type","blockchain","token"],additionalProperties:!1}},status:{type:"string",enum:["Created","EditPending","Authorized","DepositAccountAdded","Approved","Rejected","Cancelled"]}},required:["created_at","deposit_account","destination_currency","id","name","recipient","source","source_currencies","status"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_offramp_initiate",description:"Build an unsigned transaction to send stablecoin to an offramp deposit address",inputSchema:{$ref:"#/definitions/virtual-account_offramp_initiate_input",definitions:{"virtual-account_offramp_initiate_input":{type:"object",properties:{wallet:{type:"string",description:"The wallet address to send from"},offrampId:{type:"string",description:"The ID of the offramp to initiate"},amount:{type:"number",minimum:0,description:"The amount of stablecoin to send (in human-readable units, e.g., 100.5)"}},required:["wallet","offrampId","amount"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_offramp_initiate_output",definitions:{"virtual-account_offramp_initiate_output":{type:"object",properties:{transaction:{anyOf:[{type:"object",properties:{type:{type:"string",const:"solana"},base64:{type:"string",description:"Base64-encoded transaction"}},required:["type","base64"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"evm"},to:{type:"string",description:"Recipient or contract address"},data:{type:"string",description:"Calldata (0x for native transfers)"},value:{type:"string",description:"Native token value in wei"},chainId:{type:"number",description:"EVM chain ID"}},required:["type","to","data","value","chainId"],additionalProperties:!1}]},message:{type:"string",description:"Human-readable description of the transfer"}},required:["transaction","message"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_offramp_list",description:"List all offramps",inputSchema:{$ref:"#/definitions/virtual-account_offramp_list_input",definitions:{"virtual-account_offramp_list_input":{type:"object",properties:{},additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_offramp_list_output",definitions:{"virtual-account_offramp_list_output":{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{created_at:{type:"string",format:"date-time"},deposit_account:{anyOf:[{anyOf:[{type:"object",properties:{type:{type:"string",const:"ACHWire"},account_number:{type:"string"},bank_address:{type:"string"},bank_name:{type:"string"},recipient_address:{type:"string"},recipient_name:{type:"string"},routing_number:{type:"string"}},required:["type","account_number","bank_address","bank_name","recipient_address","recipient_name","routing_number"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"AfricanBankTransfer"},account_name:{type:"string"},account_number:{type:"string"},amount:{type:"string"},bank_name:{type:"string"},currency:{type:"string"},financial_institution:{type:"string"}},required:["type","account_name","account_number","amount","bank_name","currency","financial_institution"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Crypto"},address:{type:"string"},chain:{type:"string",enum:["Solana","Ethereum","Polygon","Arbitrum","Base","Stellar","Citrea"]}},required:["type","address","chain"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"MobileMoney"},instruction:{type:"string"},mobile_number:{type:"string"}},required:["type","mobile_number"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Pix"},instruction:{type:"string"},pix_key:{type:"string"}},required:["type","instruction","pix_key"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"SEPA"},iban:{type:"string"},address:{type:"string"},beneficiary_name:{type:["string","null"]},bic:{type:"string"},name:{type:"string"},phone:{type:"string"}},required:["type","iban","beneficiary_name"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Spei"},clabe:{type:"string"},instruction:{type:"string"}},required:["type","clabe","instruction"],additionalProperties:!1}]},{type:"null"}]},destination_currency:{anyOf:[{type:"object",properties:{type:{type:"string",const:"Crypto"},blockchain:{type:"string",enum:["Solana","Ethereum","Polygon","Arbitrum","Base","Stellar","Citrea"]},token:{type:"string",enum:["USDC","USDT","EURC"],description:"Stablecoin token code. USDC: USD Coin, USDT: Tether, EURC: Euro Coin"}},required:["type","blockchain","token"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Fiat"},code:{type:"string",enum:["USD","EUR"],description:"Fiat currency code. USD: US Dollar, EUR: Euro"}},required:["type","code"],additionalProperties:!1}]},id:{type:"string",description:"The ID of the autoramp"},name:{type:"string"},recipient:{type:"object",properties:{type:{type:"string",const:"BankAccount"},provider_name:{type:"string"},provider_country:{type:"object",properties:{code:{type:"string",minLength:2,maxLength:2}},required:["code"],additionalProperties:!1},is_third_party:{type:"boolean"},account_identifier:{type:"object",properties:{type:{type:"string",enum:["SEPA","ACH","Wire"]},iban:{type:"string"},account_number:{type:"string"},routing_number:{type:"string"}},required:["type"],additionalProperties:!1},address:{type:"object",properties:{street:{type:"string"},city:{type:"string"},state:{type:"string"},country:{type:"object",properties:{code:{type:"string",minLength:2,maxLength:2}},required:["code"],additionalProperties:!1},postal_code:{type:"string"}},required:["street","city","state","country","postal_code"],additionalProperties:!1},recipient:{type:"object",properties:{type:{type:"string",enum:["Individual","Business"]},family_name:{type:"string"},given_name:{type:"string"},name:{type:"string"}},required:["type"],additionalProperties:!1}},required:["type","provider_name","provider_country","is_third_party","account_identifier","address","recipient"],additionalProperties:!1},source:{type:"string",enum:["Standalone","Quote"]},source_currencies:{type:"array",items:{type:"object",properties:{type:{type:"string",const:"Crypto"},blockchain:{type:"string",enum:["Solana","Ethereum","Polygon","Arbitrum","Base","Stellar","Citrea"]},token:{type:"string",enum:["USDC","USDT","EURC"],description:"Stablecoin token code. USDC: USD Coin, USDT: Tether, EURC: Euro Coin"}},required:["type","blockchain","token"],additionalProperties:!1}},status:{type:"string",enum:["Created","EditPending","Authorized","DepositAccountAdded","Approved","Rejected","Cancelled"]}},required:["created_at","deposit_account","destination_currency","id","name","recipient","source","source_currencies","status"],additionalProperties:!1}}},required:["items"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_offramp_retrieve",description:"Get offramp details",inputSchema:{$ref:"#/definitions/virtual-account_offramp_retrieve_input",definitions:{"virtual-account_offramp_retrieve_input":{type:"object",properties:{offrampId:{type:"string",format:"uuid",description:"The ID of the offramp to retrieve"}},required:["offrampId"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_offramp_retrieve_output",definitions:{"virtual-account_offramp_retrieve_output":{type:"object",properties:{created_at:{type:"string",format:"date-time"},deposit_account:{anyOf:[{anyOf:[{type:"object",properties:{type:{type:"string",const:"ACHWire"},account_number:{type:"string"},bank_address:{type:"string"},bank_name:{type:"string"},recipient_address:{type:"string"},recipient_name:{type:"string"},routing_number:{type:"string"}},required:["type","account_number","bank_address","bank_name","recipient_address","recipient_name","routing_number"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"AfricanBankTransfer"},account_name:{type:"string"},account_number:{type:"string"},amount:{type:"string"},bank_name:{type:"string"},currency:{type:"string"},financial_institution:{type:"string"}},required:["type","account_name","account_number","amount","bank_name","currency","financial_institution"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Crypto"},address:{type:"string"},chain:{type:"string",enum:["Solana","Ethereum","Polygon","Arbitrum","Base","Stellar","Citrea"]}},required:["type","address","chain"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"MobileMoney"},instruction:{type:"string"},mobile_number:{type:"string"}},required:["type","mobile_number"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Pix"},instruction:{type:"string"},pix_key:{type:"string"}},required:["type","instruction","pix_key"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"SEPA"},iban:{type:"string"},address:{type:"string"},beneficiary_name:{type:["string","null"]},bic:{type:"string"},name:{type:"string"},phone:{type:"string"}},required:["type","iban","beneficiary_name"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Spei"},clabe:{type:"string"},instruction:{type:"string"}},required:["type","clabe","instruction"],additionalProperties:!1}]},{type:"null"}]},destination_currency:{anyOf:[{type:"object",properties:{type:{type:"string",const:"Crypto"},blockchain:{type:"string",enum:["Solana","Ethereum","Polygon","Arbitrum","Base","Stellar","Citrea"]},token:{type:"string",enum:["USDC","USDT","EURC"],description:"Stablecoin token code. USDC: USD Coin, USDT: Tether, EURC: Euro Coin"}},required:["type","blockchain","token"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Fiat"},code:{type:"string",enum:["USD","EUR"],description:"Fiat currency code. USD: US Dollar, EUR: Euro"}},required:["type","code"],additionalProperties:!1}]},id:{type:"string",description:"The ID of the autoramp"},name:{type:"string"},recipient:{type:"object",properties:{type:{type:"string",const:"BankAccount"},provider_name:{type:"string"},provider_country:{type:"object",properties:{code:{type:"string",minLength:2,maxLength:2}},required:["code"],additionalProperties:!1},is_third_party:{type:"boolean"},account_identifier:{type:"object",properties:{type:{type:"string",enum:["SEPA","ACH","Wire"]},iban:{type:"string"},account_number:{type:"string"},routing_number:{type:"string"}},required:["type"],additionalProperties:!1},address:{type:"object",properties:{street:{type:"string"},city:{type:"string"},state:{type:"string"},country:{type:"object",properties:{code:{type:"string",minLength:2,maxLength:2}},required:["code"],additionalProperties:!1},postal_code:{type:"string"}},required:["street","city","state","country","postal_code"],additionalProperties:!1},recipient:{type:"object",properties:{type:{type:"string",enum:["Individual","Business"]},family_name:{type:"string"},given_name:{type:"string"},name:{type:"string"}},required:["type"],additionalProperties:!1}},required:["type","provider_name","provider_country","is_third_party","account_identifier","address","recipient"],additionalProperties:!1},source:{type:"string",enum:["Standalone","Quote"]},source_currencies:{type:"array",items:{type:"object",properties:{type:{type:"string",const:"Crypto"},blockchain:{type:"string",enum:["Solana","Ethereum","Polygon","Arbitrum","Base","Stellar","Citrea"]},token:{type:"string",enum:["USDC","USDT","EURC"],description:"Stablecoin token code. USDC: USD Coin, USDT: Tether, EURC: Euro Coin"}},required:["type","blockchain","token"],additionalProperties:!1}},status:{type:"string",enum:["Created","EditPending","Authorized","DepositAccountAdded","Approved","Rejected","Cancelled"]}},required:["created_at","deposit_account","destination_currency","id","name","recipient","source","source_currencies","status"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_offramp_update",description:"Update an existing offramp's destination bank account or fiat currency.",inputSchema:{$ref:"#/definitions/virtual-account_offramp_update_input",definitions:{"virtual-account_offramp_update_input":{type:"object",properties:{offrampId:{type:"string",description:"The ID of the offramp to update"},bankAccountId:{type:"string",description:"New bank account ID. Get from `bank-account list`."}},required:["offrampId","bankAccountId"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_offramp_update_output",definitions:{"virtual-account_offramp_update_output":{type:"object",properties:{created_at:{type:"string",format:"date-time"},deposit_account:{anyOf:[{anyOf:[{type:"object",properties:{type:{type:"string",const:"ACHWire"},account_number:{type:"string"},bank_address:{type:"string"},bank_name:{type:"string"},recipient_address:{type:"string"},recipient_name:{type:"string"},routing_number:{type:"string"}},required:["type","account_number","bank_address","bank_name","recipient_address","recipient_name","routing_number"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"AfricanBankTransfer"},account_name:{type:"string"},account_number:{type:"string"},amount:{type:"string"},bank_name:{type:"string"},currency:{type:"string"},financial_institution:{type:"string"}},required:["type","account_name","account_number","amount","bank_name","currency","financial_institution"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Crypto"},address:{type:"string"},chain:{type:"string",enum:["Solana","Ethereum","Polygon","Arbitrum","Base","Stellar","Citrea"]}},required:["type","address","chain"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"MobileMoney"},instruction:{type:"string"},mobile_number:{type:"string"}},required:["type","mobile_number"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Pix"},instruction:{type:"string"},pix_key:{type:"string"}},required:["type","instruction","pix_key"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"SEPA"},iban:{type:"string"},address:{type:"string"},beneficiary_name:{type:["string","null"]},bic:{type:"string"},name:{type:"string"},phone:{type:"string"}},required:["type","iban","beneficiary_name"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Spei"},clabe:{type:"string"},instruction:{type:"string"}},required:["type","clabe","instruction"],additionalProperties:!1}]},{type:"null"}]},destination_currency:{anyOf:[{type:"object",properties:{type:{type:"string",const:"Crypto"},blockchain:{type:"string",enum:["Solana","Ethereum","Polygon","Arbitrum","Base","Stellar","Citrea"]},token:{type:"string",enum:["USDC","USDT","EURC"],description:"Stablecoin token code. USDC: USD Coin, USDT: Tether, EURC: Euro Coin"}},required:["type","blockchain","token"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Fiat"},code:{type:"string",enum:["USD","EUR"],description:"Fiat currency code. USD: US Dollar, EUR: Euro"}},required:["type","code"],additionalProperties:!1}]},id:{type:"string",description:"The ID of the autoramp"},name:{type:"string"},recipient:{type:"object",properties:{type:{type:"string",const:"BankAccount"},provider_name:{type:"string"},provider_country:{type:"object",properties:{code:{type:"string",minLength:2,maxLength:2}},required:["code"],additionalProperties:!1},is_third_party:{type:"boolean"},account_identifier:{type:"object",properties:{type:{type:"string",enum:["SEPA","ACH","Wire"]},iban:{type:"string"},account_number:{type:"string"},routing_number:{type:"string"}},required:["type"],additionalProperties:!1},address:{type:"object",properties:{street:{type:"string"},city:{type:"string"},state:{type:"string"},country:{type:"object",properties:{code:{type:"string",minLength:2,maxLength:2}},required:["code"],additionalProperties:!1},postal_code:{type:"string"}},required:["street","city","state","country","postal_code"],additionalProperties:!1},recipient:{type:"object",properties:{type:{type:"string",enum:["Individual","Business"]},family_name:{type:"string"},given_name:{type:"string"},name:{type:"string"}},required:["type"],additionalProperties:!1}},required:["type","provider_name","provider_country","is_third_party","account_identifier","address","recipient"],additionalProperties:!1},source:{type:"string",enum:["Standalone","Quote"]},source_currencies:{type:"array",items:{type:"object",properties:{type:{type:"string",const:"Crypto"},blockchain:{type:"string",enum:["Solana","Ethereum","Polygon","Arbitrum","Base","Stellar","Citrea"]},token:{type:"string",enum:["USDC","USDT","EURC"],description:"Stablecoin token code. USDC: USD Coin, USDT: Tether, EURC: Euro Coin"}},required:["type","blockchain","token"],additionalProperties:!1}},status:{type:"string",enum:["Created","EditPending","Authorized","DepositAccountAdded","Approved","Rejected","Cancelled"]}},required:["created_at","deposit_account","destination_currency","id","name","recipient","source","source_currencies","status"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_onramp_cancel",description:"Cancel an onramp",inputSchema:{$ref:"#/definitions/virtual-account_onramp_cancel_input",definitions:{"virtual-account_onramp_cancel_input":{type:"object",properties:{onrampId:{type:"string",format:"uuid",description:"The ID of the onramp to cancel"}},required:["onrampId"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_onramp_cancel_output",definitions:{"virtual-account_onramp_cancel_output":{type:"object",properties:{success:{type:"boolean"},message:{type:"string"}},required:["success","message"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_onramp_create",description:"Create a fiat-to-stablecoin onramp. Returns a deposit account (bank IBAN or account number) where the user sends fiat. Incoming fiat is automatically converted to stablecoin and sent to the registered wallet.",inputSchema:{$ref:"#/definitions/virtual-account_onramp_create_input",definitions:{"virtual-account_onramp_create_input":{type:"object",properties:{name:{type:"string",description:"A label for this onramp (e.g. 'My USD onramp')"},fiat:{type:"string",enum:["USD","EUR"],description:"Fiat currency: usd or eur"},stablecoin:{type:"string",enum:["USDC","USDT","EURC"],description:"Target stablecoin: usdc, usdt, or eurc"},wallet:{type:"string",description:"Registered wallet address (must be registered via virtual-account_wallet_register first)"},chain:{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","optimism","bnb","avalanche","tron","bitcoin"],description:"Blockchain to receive stablecoin on (solana, ethereum, polygon, arbitrum, base)"}},required:["name","fiat","stablecoin","wallet","chain"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_onramp_create_output",definitions:{"virtual-account_onramp_create_output":{type:"object",properties:{id:{type:"string"},name:{type:"string"},status:{type:"string",enum:["Created","EditPending","Authorized","DepositAccountAdded","Approved","Rejected","Cancelled"]},fiat:{type:"string"},stablecoin:{type:"string"},depositAccount:{anyOf:[{type:"object",properties:{type:{type:"string"},iban:{type:["string","null"]},bic:{type:["string","null"]},accountNumber:{type:["string","null"]},routingNumber:{type:["string","null"]},bankName:{type:["string","null"]},bankAddress:{type:["string","null"]},recipientName:{type:["string","null"]}},required:["type","iban","bic","accountNumber","routingNumber","bankName","bankAddress","recipientName"],additionalProperties:!1},{type:"null"}]},walletAddress:{type:"string"},fees:{anyOf:[{type:"object",properties:{transactionFee:{type:"string",description:"e.g. '0.50%'"},bankingFee:{type:["string","null"],description:"e.g. '0.50 EUR (SEPA)'"},networkFee:{type:"string",description:"'subsidized' or 'charged'"}},required:["transactionFee","bankingFee","networkFee"],additionalProperties:!1},{type:"null"}]},legalDisclaimer:{type:"string"}},required:["id","name","status","fiat","stablecoin","depositAccount","walletAddress","fees","legalDisclaimer"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_onramp_list",description:"List all fiat-to-stablecoin onramps. Shows each onramp's deposit account details, status, and destination wallet.",inputSchema:{$ref:"#/definitions/virtual-account_onramp_list_input",definitions:{"virtual-account_onramp_list_input":{type:"object",properties:{},additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_onramp_list_output",definitions:{"virtual-account_onramp_list_output":{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{id:{type:"string"},name:{type:"string"},status:{type:"string",enum:["Created","EditPending","Authorized","DepositAccountAdded","Approved","Rejected","Cancelled"]},fiat:{type:"string"},stablecoin:{type:"string"},depositAccount:{anyOf:[{type:"object",properties:{type:{type:"string"},iban:{type:["string","null"]},bic:{type:["string","null"]},accountNumber:{type:["string","null"]},routingNumber:{type:["string","null"]},bankName:{type:["string","null"]},bankAddress:{type:["string","null"]},recipientName:{type:["string","null"]}},required:["type","iban","bic","accountNumber","routingNumber","bankName","bankAddress","recipientName"],additionalProperties:!1},{type:"null"}]},walletAddress:{type:"string"},fees:{anyOf:[{type:"object",properties:{transactionFee:{type:"string",description:"e.g. '0.50%'"},bankingFee:{type:["string","null"],description:"e.g. '0.50 EUR (SEPA)'"},networkFee:{type:"string",description:"'subsidized' or 'charged'"}},required:["transactionFee","bankingFee","networkFee"],additionalProperties:!1},{type:"null"}]},legalDisclaimer:{type:"string"}},required:["id","name","status","fiat","stablecoin","depositAccount","walletAddress","fees","legalDisclaimer"],additionalProperties:!1},description:"List of configured onramps"}},required:["items"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_onramp_payment_create",description:"Create an open banking payment link for an onramp",inputSchema:{$ref:"#/definitions/virtual-account_onramp_payment_create_input",definitions:{"virtual-account_onramp_payment_create_input":{type:"object",properties:{onrampId:{type:"string",format:"uuid",description:"The ID of the onramp"},amount:{type:"string",description:"The amount to pay"},fiat:{type:"string",enum:["USD","EUR"],description:"The fiat currency (USD or EUR)"}},required:["onrampId","amount","fiat"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_onramp_payment_create_output",definitions:{"virtual-account_onramp_payment_create_output":{type:"object",properties:{id:{type:"string"},paymentLink:{type:["string","null"]},status:{type:"string",enum:["Pending","Ready","Processing","Completed","Failed"]}},required:["id","paymentLink","status"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_onramp_payment_retrieve",description:"Get the status of an open banking payment",inputSchema:{$ref:"#/definitions/virtual-account_onramp_payment_retrieve_input",definitions:{"virtual-account_onramp_payment_retrieve_input":{type:"object",properties:{onrampId:{type:"string",format:"uuid",description:"The ID of the onramp this payment belongs to"},paymentId:{type:"string",format:"uuid",description:"The ID of the payment to retrieve"}},required:["onrampId","paymentId"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_onramp_payment_retrieve_output",definitions:{"virtual-account_onramp_payment_retrieve_output":{type:"object",properties:{id:{type:"string"},paymentLink:{type:["string","null"]},status:{type:"string",enum:["Pending","Ready","Processing","Completed","Failed"]}},required:["id","paymentLink","status"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_onramp_retrieve",description:"Get onramp details and banking info",inputSchema:{$ref:"#/definitions/virtual-account_onramp_retrieve_input",definitions:{"virtual-account_onramp_retrieve_input":{type:"object",properties:{onrampId:{type:"string",format:"uuid",description:"The ID of the onramp to retrieve"}},required:["onrampId"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_onramp_retrieve_output",definitions:{"virtual-account_onramp_retrieve_output":{type:"object",properties:{id:{type:"string"},name:{type:"string"},status:{type:"string",enum:["Created","EditPending","Authorized","DepositAccountAdded","Approved","Rejected","Cancelled"]},fiat:{type:"string"},stablecoin:{type:"string"},depositAccount:{anyOf:[{type:"object",properties:{type:{type:"string"},iban:{type:["string","null"]},bic:{type:["string","null"]},accountNumber:{type:["string","null"]},routingNumber:{type:["string","null"]},bankName:{type:["string","null"]},bankAddress:{type:["string","null"]},recipientName:{type:["string","null"]}},required:["type","iban","bic","accountNumber","routingNumber","bankName","bankAddress","recipientName"],additionalProperties:!1},{type:"null"}]},walletAddress:{type:"string"},fees:{anyOf:[{type:"object",properties:{transactionFee:{type:"string",description:"e.g. '0.50%'"},bankingFee:{type:["string","null"],description:"e.g. '0.50 EUR (SEPA)'"},networkFee:{type:"string",description:"'subsidized' or 'charged'"}},required:["transactionFee","bankingFee","networkFee"],additionalProperties:!1},{type:"null"}]},legalDisclaimer:{type:"string"}},required:["id","name","status","fiat","stablecoin","depositAccount","walletAddress","fees","legalDisclaimer"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_onramp_update",description:"Update an existing onramp's destination wallet, chain, or stablecoin.",inputSchema:{$ref:"#/definitions/virtual-account_onramp_update_input",definitions:{"virtual-account_onramp_update_input":{type:"object",properties:{onrampId:{type:"string",description:"The ID of the onramp to update"},wallet:{type:["string","null"],description:"New destination wallet address (must be registered)"},chain:{anyOf:[{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","optimism","bnb","avalanche","tron","bitcoin"]},{type:"null"}],description:"New destination chain (solana, ethereum, polygon, arbitrum, base)"},stablecoin:{anyOf:[{type:"string",enum:["USDC","USDT","EURC"],description:"Stablecoin token code. USDC: USD Coin, USDT: Tether, EURC: Euro Coin"},{type:"null"}],description:"New destination stablecoin (USDC, USDT, EURC)"}},required:["onrampId","wallet","chain","stablecoin"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_onramp_update_output",definitions:{"virtual-account_onramp_update_output":{type:"object",properties:{id:{type:"string"},name:{type:"string"},status:{type:"string",enum:["Created","EditPending","Authorized","DepositAccountAdded","Approved","Rejected","Cancelled"]},fiat:{type:"string"},stablecoin:{type:"string"},depositAccount:{anyOf:[{type:"object",properties:{type:{type:"string"},iban:{type:["string","null"]},bic:{type:["string","null"]},accountNumber:{type:["string","null"]},routingNumber:{type:["string","null"]},bankName:{type:["string","null"]},bankAddress:{type:["string","null"]},recipientName:{type:["string","null"]}},required:["type","iban","bic","accountNumber","routingNumber","bankName","bankAddress","recipientName"],additionalProperties:!1},{type:"null"}]},walletAddress:{type:"string"},fees:{anyOf:[{type:"object",properties:{transactionFee:{type:"string",description:"e.g. '0.50%'"},bankingFee:{type:["string","null"],description:"e.g. '0.50 EUR (SEPA)'"},networkFee:{type:"string",description:"'subsidized' or 'charged'"}},required:["transactionFee","bankingFee","networkFee"],additionalProperties:!1},{type:"null"}]},legalDisclaimer:{type:"string"}},required:["id","name","status","fiat","stablecoin","depositAccount","walletAddress","fees","legalDisclaimer"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_retrieve",description:"Get your virtual account status",inputSchema:{$ref:"#/definitions/virtual-account_retrieve_input",definitions:{"virtual-account_retrieve_input":{type:"object",properties:{},additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_retrieve_output",definitions:{"virtual-account_retrieve_output":{type:"object",properties:{id:{type:"string"},email:{type:"string"},customerType:{type:"string",enum:["Person","Business"]},status:{type:"string",enum:["UserRequired","SigningsRequired","IdentificationRequired","Active","Suspended"]},nextStep:{type:["string","null"]}},required:["id","email","customerType","status","nextStep"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_transaction_list",description:"List fiat-to-stablecoin conversion transactions. Shows status, fiat amount sent, and stablecoin amount received for each conversion.",inputSchema:{$ref:"#/definitions/virtual-account_transaction_list_input",definitions:{"virtual-account_transaction_list_input":{type:"object",properties:{},additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_transaction_list_output",definitions:{"virtual-account_transaction_list_output":{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{id:{type:"string",description:"Transaction ID"},state:{type:"string",enum:["Pending","PayoutPending","Payout","PayoutCompleted","Completed","Failed","InAmlReview","AmlRejected","AmountRejected"],description:"Transaction state (e.g. pending, completed, failed)"},sourceAmount:{type:"string",description:"Fiat amount sent (e.g. '100.00 USD')"},destinationAmount:{type:"string",description:"Stablecoin amount received (e.g. '99.50 USDC')"},createdAt:{type:"string",format:"date-time",description:"Transaction creation timestamp"}},required:["id","state","sourceAmount","destinationAmount","createdAt"],additionalProperties:!1},description:"List of onramp conversion transactions"}},required:["items"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_wallet_list",description:"List wallets registered for the virtual account. Only registered wallets can receive onramp payouts.",inputSchema:{$ref:"#/definitions/virtual-account_wallet_list_input",definitions:{"virtual-account_wallet_list_input":{type:"object",properties:{},additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_wallet_list_output",definitions:{"virtual-account_wallet_list_output":{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{id:{type:"string"},address:{type:"string"},blockchain:{type:"string"}},required:["id","address","blockchain"],additionalProperties:!1},description:"List of registered wallets"}},required:["items"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_wallet_register",description:"Register a wallet by submitting a signed proof-of-ownership message. The wallet can then be used as a destination for onramp payouts.",inputSchema:{$ref:"#/definitions/virtual-account_wallet_register_input",definitions:{"virtual-account_wallet_register_input":{type:"object",properties:{wallet:{type:"string",description:"Wallet address to register"},message:{type:"string",description:"Proof-of-ownership verification message"},signature:{type:"string",description:"Signature of the message, signed by the wallet's private key"},chain:{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","optimism","bnb","avalanche","tron","bitcoin"],description:"Blockchain for wallet registration (solana, ethereum, polygon, base, arbitrum)"}},required:["wallet","message","signature","chain"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_wallet_register_output",definitions:{"virtual-account_wallet_register_output":{type:"object",properties:{success:{type:"boolean",description:"Whether the operation was successful"}},required:["success"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}}];var Kt="https://www.moonpay.com/legal/terms_of_use_europe_hypermint",Gt="https://www.moonpay.com/legal/privacy_policy",Yt="https://swaps.xyz/terms",Ue=` Terms of Use: ${Kt}
|
|
2
|
+
import{a as Se,b as I,c as ve,d as ee,e as ke,f as we,g as Pe,h as S,i as je,j as Te,k as E,l as te,m,n as y,o as Ce,p as q,q as ie,r as ne,t as Ae,v as b,w as M,x as xe,y as D}from"./chunk-SOCI4BW2.js";async function Mt(e,t,i){let n=await E(),r=I();n&&(r.Authorization=`Bearer ${n}`);let o=await fetch(`${e}/api/tools/${encodeURIComponent(t)}`,{method:"POST",signal:AbortSignal.timeout(6e4),headers:r,body:JSON.stringify(i)});if(o.status===401&&n){let d=ke();if(d?.refreshToken)try{let f=await Te(d);o=await fetch(`${e}/api/tools/${encodeURIComponent(t)}`,{method:"POST",signal:AbortSignal.timeout(6e4),headers:{...I(),Authorization:`Bearer ${f.accessToken}`},body:JSON.stringify(i)})}catch{}}if(o.status===401)throw new Error("This command requires a MoonPay CLI account. Run `moonpay login` first.");let a=await o.text();if(!a){if(o.status===429){let d=n?" Run `mp upgrade` to increase your rate limit.":" Log in with `mp login` for higher limits.";throw new Error(`Rate limit exceeded.${d}`)}throw new Error(`Empty response from server (${o.status})`)}let s;try{s=JSON.parse(a)}catch{throw new Error(`Unexpected response from server (${o.status})`)}if(o.status<200||o.status>=300){let d=s;throw new Error(d?.error??`Tool call failed (${o.status})`)}return s}async function l(e,t,i){return await Mt(e,t,i)}var pn=[{name:"buy",description:"Buy crypto with fiat via MoonPay. Returns a checkout URL to complete the purchase.",inputSchema:{$ref:"#/definitions/buy_input",definitions:{buy_input:{type:"object",properties:{token:{type:"string",enum:["btc","pol_polygon","sol","trx","usdc","usdc_arbitrum","usdc_base","usdc_optimism","usdc_sol","usdc_polygon","usdt_trx","eth","eth_polygon","eth_optimism","eth_base","eth_arbitrum"],description:"MoonPay currency code: sol (Solana), usdc_sol (USDC on Solana), eth (Ethereum), usdc (USDC on Ethereum), usdc_base (USDC on Base), trx (TRX on Tron), usdt_trx (USDT on Tron), etc."},amount:{type:"number",description:"Amount in USD to spend. For example, 50 means $50 worth of the selected token."},wallet:{type:"string",description:"Destination wallet address to receive tokens (must match the chain for the selected token)"},email:{type:["string","null"],description:"Buyer email to pre-fill on the checkout page"}},required:["token","amount","wallet","email"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/buy_output",definitions:{buy_output:{type:"object",properties:{url:{type:"string",description:"MoonPay checkout URL \u2014 open in browser to complete purchase"}},required:["url"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"deposit_create",description:"Create a new deposit link that generates multi-chain deposit addresses. Anyone can send crypto to these addresses from Solana, Ethereum, Bitcoin, or Tron \u2014 it automatically converts to the specified stablecoin and settles to the destination wallet and chain.",inputSchema:{$ref:"#/definitions/deposit_create_input",definitions:{deposit_create_input:{type:"object",properties:{name:{type:"string",description:"Human-readable label for this deposit link (e.g. 'Treasury Base USDC')"},wallet:{type:"string",description:"Destination wallet address where USDC will be delivered"},chain:{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","bnb"],description:"Blockchain of the destination wallet"},token:{type:"string",enum:["USDC","USDC.e","USDT"],description:"Token to receive. USDC.e (bridged USDC) is only available on Polygon."}},required:["name","wallet","chain","token"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/deposit_create_output",definitions:{deposit_create_output:{type:"object",properties:{id:{type:"string",description:"Unique deposit ID \u2014 use with deposit_transaction_list to check incoming payments"},destinationWallet:{type:"string",description:"Wallet address that will receive the stablecoin"},destinationChain:{type:"string",description:"Chain where the stablecoin will be delivered"},customerToken:{type:"string",description:"Token to check deposit transactions \u2014 pass to deposit_transaction_list"},depositUrl:{type:"string",description:"Shareable URL \u2014 open in browser or share with senders to deposit funds"},wallets:{type:"array",items:{type:"object",properties:{address:{type:"string",description:"Address to send funds to"},chain:{type:"string",description:"Chain this address is on (solana, ethereum, bitcoin, tron)"},qrCode:{type:"string",description:"URL to a QR code image for the deposit address"}},required:["address","chain","qrCode"],additionalProperties:!1},description:"Deposit addresses across all supported chains \u2014 send any token to any of these"},instructions:{type:"string",description:"Human-readable instructions explaining how to use the deposit"}},required:["id","destinationWallet","destinationChain","customerToken","depositUrl","wallets","instructions"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"deposit_retrieve",description:"Retrieve details of a deposit by ID. Returns the deposit name, status, destination wallet, and deposit addresses.",inputSchema:{$ref:"#/definitions/deposit_retrieve_input",definitions:{deposit_retrieve_input:{type:"object",properties:{id:{type:"string",description:"Deposit ID returned from deposit_create"}},required:["id"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/deposit_retrieve_output",definitions:{deposit_retrieve_output:{type:"object",properties:{id:{type:"string"},name:{type:"string"},status:{type:"string"},destinationWallet:{type:["string","null"]},depositUrl:{type:"string"}},required:["id","name","status","destinationWallet","depositUrl"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"deposit_transaction_list",description:"List transactions for a deposit. Pass the deposit id from deposit_create to check incoming payment status.",inputSchema:{$ref:"#/definitions/deposit_transaction_list_input",definitions:{deposit_transaction_list_input:{type:"object",properties:{id:{type:"string",description:"Deposit ID returned from deposit_create"}},required:["id"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/deposit_transaction_list_output",definitions:{deposit_transaction_list_output:{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{id:{type:"string"},amount:{type:"number"},token:{type:"string"},from:{type:"string"},status:{type:"string"},settledAmount:{type:["number","null"]},settledCurrency:{type:["string","null"]},timestamp:{type:"string"}},required:["id","amount","token","from","status","settledAmount","settledCurrency","timestamp"],additionalProperties:!1}}},required:["items"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"feedback_create",description:"Submit feedback, a bug report, or a feature request. Requires authentication.",inputSchema:{$ref:"#/definitions/feedback_create_input",definitions:{feedback_create_input:{type:"object",properties:{type:{type:"string",enum:["bug","feature","general"],description:"Type of feedback: bug, feature, or general"},message:{type:"string",minLength:1,maxLength:280,description:"Your feedback message"}},required:["type","message"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/feedback_create_output",definitions:{feedback_create_output:{type:"object",properties:{id:{type:"string",description:"Feedback ID"},message:{type:"string",description:"Confirmation message"}},required:["id","message"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"login",description:"Send a verification code to the provided email to sign in or create an account. Requires an hCaptcha token.",inputSchema:{$ref:"#/definitions/login_input",definitions:{login_input:{type:"object",properties:{email:{type:"string",format:"email",description:"The email of the user to login"},captchaToken:{type:"string",description:"hCaptcha response token"}},required:["email","captchaToken"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/login_output",definitions:{login_output:{type:"object",properties:{email:{type:"string",description:"The email the OTP was sent to"}},required:["email"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"refresh",description:"Refresh an expired access token using a refresh token.",inputSchema:{$ref:"#/definitions/refresh_input",definitions:{refresh_input:{type:"object",properties:{refreshToken:{type:"string",description:"The refresh token from a previous login"}},required:["refreshToken"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/refresh_output",definitions:{refresh_output:{type:"object",properties:{accessToken:{type:"string"},refreshToken:{type:"string"},expiresAt:{type:"number"}},required:["accessToken","refreshToken","expiresAt"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"swaps_transaction_build",description:"Build a swap or bridge transaction. Returns an unsigned transaction with a human-readable message, amounts, exchange rate, and estimated time. Supports same-chain swaps and cross-chain bridges. Accepts UI amounts (e.g. 0.1 SOL) \u2014 decimal conversion is handled automatically.",inputSchema:{$ref:"#/definitions/swaps_transaction_build_input",definitions:{swaps_transaction_build_input:{type:"object",properties:{from:{type:"object",properties:{wallet:{type:"string",description:"Source wallet address (Solana pubkey or EVM 0x address)"},chain:{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","optimism","bnb","avalanche","tron","bitcoin"],description:"Source blockchain"},token:{type:"string",description:"Source token address (mint on Solana, contract on EVM). Use native token address for SOL/ETH."},amount:{type:["number","null"],description:"Amount to swap (exact-in). Null for exact-out."}},required:["wallet","chain","token","amount"],additionalProperties:!1,description:"Source: wallet, chain, token, amount"},to:{type:"object",properties:{wallet:{type:"string",description:"Destination wallet address. Same as source wallet for same-chain swaps."},chain:{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","optimism","bnb","avalanche","tron","bitcoin"],description:"Destination blockchain"},token:{type:"string",description:"Destination token address (mint on Solana, contract on EVM)"},amount:{type:["number","null"],description:"Amount to receive (exact-out). Null for exact-in."}},required:["wallet","chain","token","amount"],additionalProperties:!1,description:"Destination: wallet, chain, token, amount"}},required:["from","to"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/swaps_transaction_build_output",definitions:{swaps_transaction_build_output:{type:"object",properties:{transactionId:{type:"string",description:"Transaction ID for tracking"},transaction:{anyOf:[{type:"object",properties:{type:{type:"string",const:"solana"},base64:{type:"string",description:"Base64-encoded transaction"}},required:["type","base64"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"evm"},to:{type:"string",description:"Contract address"},data:{type:"string",description:"Calldata"},value:{type:"string",description:"Native token value in wei"},chainId:{type:"number",description:"EVM chain ID"}},required:["type","to","data","value","chainId"],additionalProperties:!1}],description:"Unsigned transaction"},message:{type:"string",description:"Human-readable description (e.g. Swap 0.1 SOL \u2192 42.5 USDC on Solana)"},amountIn:{type:"object",properties:{amount:{type:"number",description:"Human-readable amount (e.g. 1.5)"},raw:{type:"string",description:"Raw amount in smallest unit (e.g. wei, lamports)"},symbol:{type:"string"},usd:{type:["number","null"]}},required:["amount","raw","symbol","usd"],additionalProperties:!1},amountOut:{type:"object",properties:{amount:{type:"number",description:"Human-readable amount (e.g. 1.5)"},raw:{type:"string",description:"Raw amount in smallest unit (e.g. wei, lamports)"},symbol:{type:"string"},usd:{type:["number","null"]}},required:["amount","raw","symbol","usd"],additionalProperties:!1},exchangeRate:{type:"number",description:"Exchange rate (amountOut / amountIn)"},estimatedTime:{type:["number","null"],description:"Estimated completion time in seconds"},requiresApproval:{type:"boolean",description:"Whether an ERC20 approval transaction is needed first"}},required:["transactionId","transaction","message","amountIn","amountOut","exchangeRate","estimatedTime","requiresApproval"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"token_balance_list",description:"List all token balances held in a wallet, including amount owned, current value in USD, and token details. Shows the complete token portfolio.",inputSchema:{$ref:"#/definitions/token_balance_list_input",definitions:{token_balance_list_input:{type:"object",properties:{wallet:{type:"string",description:"Wallet address to check token balances for"},chain:{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","optimism","bnb","avalanche","tron","bitcoin"],description:"Blockchain to check balances on (e.g. 'solana', 'ethereum', 'base')"}},required:["wallet","chain"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/token_balance_list_output",definitions:{token_balance_list_output:{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{address:{type:"string",description:"Address of the token"},name:{type:"string",description:"Name of the token"},symbol:{type:"string",description:"Symbol of the token"},image:{type:["string","null"],description:"Image of the token"},description:{type:["string","null"],description:"Description of the token"},chain:{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","optimism","bnb","avalanche","tron","bitcoin"],description:"Chain of the token"},decimals:{type:"number",description:"Number of decimals of the token"},externalLinks:{anyOf:[{type:"object",properties:{website:{type:["string","null"],description:"Official website URL"},twitter:{type:["string","null"],description:"Twitter/X profile URL"},telegram:{type:["string","null"],description:"Telegram group URL"},discord:{type:["string","null"],description:"Discord server URL"},github:{type:["string","null"],description:"GitHub repository URL"},coingeckoId:{type:["string","null"],description:"CoinGecko token ID"}},additionalProperties:!1},{type:"null"}],description:"External links and social media"},balance:{type:"object",properties:{amount:{type:"number",description:"Number of tokens owned"},value:{type:"number",description:"Total value of the token in USD"},price:{type:"number",description:"Current price of the token"}},required:["amount","value","price"],additionalProperties:!1}},required:["address","name","symbol","chain","decimals","balance"],additionalProperties:!1},description:"Array of all tokens in the wallet with their balances and current values"}},required:["items"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"token_retrieve",description:"Get detailed token information including market data, price changes, volume, trades, and holder statistics by token address",inputSchema:{$ref:"#/definitions/token_retrieve_input",definitions:{token_retrieve_input:{type:"object",properties:{token:{type:"string",description:"Address of the token to retrieve"},chain:{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","optimism","bnb","avalanche","tron","bitcoin"],description:"Blockchain network where the token exists"}},required:["token","chain"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/token_retrieve_output",definitions:{token_retrieve_output:{type:"object",properties:{address:{type:"string",description:"Address of the token"},name:{type:"string",description:"Name of the token"},symbol:{type:"string",description:"Symbol of the token"},image:{type:["string","null"],description:"Image of the token"},description:{type:["string","null"],description:"Description of the token"},chain:{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","optimism","bnb","avalanche","tron","bitcoin"],description:"Chain of the token"},decimals:{type:"number",description:"Number of decimals of the token"},externalLinks:{anyOf:[{type:"object",properties:{website:{type:["string","null"],description:"Official website URL"},twitter:{type:["string","null"],description:"Twitter/X profile URL"},telegram:{type:["string","null"],description:"Telegram group URL"},discord:{type:["string","null"],description:"Discord server URL"},github:{type:["string","null"],description:"GitHub repository URL"},coingeckoId:{type:["string","null"],description:"CoinGecko token ID"}},additionalProperties:!1},{type:"null"}],description:"External links and social media"},marketData:{type:"object",properties:{liquidity:{type:["number","null"],description:"Total liquidity"},marketCap:{type:["number","null"],description:"Market capitalization"},fdv:{type:["number","null"],description:"Fully diluted valuation"},price:{type:["number","null"],description:"Current price"},priceChangePercent:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Percentage change in price across time intervals"},volume:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Trading volume in USD across time intervals"},volumeChangePercent:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Percentage change in trading volume across time intervals"},trades:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Number of trades across time intervals"},tradesChangePercent:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Percentage change in number of trades across time intervals"},buys:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Number of buys across time intervals"},buysChangePercent:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Percentage change in number of buys across time intervals"},sells:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Number of sells across time intervals"},sellsChangePercent:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Percentage change in number of sells across time intervals"},uniqueWallets:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Number of unique wallets trading across time intervals"},uniqueWalletsChangePercent:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Percentage change in number of unique wallets trading across time intervals"}},additionalProperties:!1}},required:["address","name","symbol","chain","decimals"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"token_search",description:"Search for tokens by name, symbol, or address. Returns matching tokens with their market data including price, volume, and liquidity.",inputSchema:{$ref:"#/definitions/token_search_input",definitions:{token_search_input:{type:"object",properties:{query:{type:"string",description:"Search term - can be token name (e.g. 'Bitcoin'), symbol (e.g. 'BTC'), or partial match"},chain:{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","optimism","bnb","avalanche","tron","bitcoin"],description:"Blockchain to search on (e.g. 'solana', 'ethereum', 'base')"},limit:{type:["number","null"],description:"Maximum number of results to return (optional, defaults to 5)"}},required:["query","chain","limit"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/token_search_output",definitions:{token_search_output:{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{address:{type:"string",description:"Address of the token"},name:{type:"string",description:"Name of the token"},symbol:{type:"string",description:"Symbol of the token"},image:{type:["string","null"],description:"Image of the token"},description:{type:["string","null"],description:"Description of the token"},chain:{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","optimism","bnb","avalanche","tron","bitcoin"],description:"Chain of the token"},decimals:{type:"number",description:"Number of decimals of the token"},externalLinks:{anyOf:[{type:"object",properties:{website:{type:["string","null"],description:"Official website URL"},twitter:{type:["string","null"],description:"Twitter/X profile URL"},telegram:{type:["string","null"],description:"Telegram group URL"},discord:{type:["string","null"],description:"Discord server URL"},github:{type:["string","null"],description:"GitHub repository URL"},coingeckoId:{type:["string","null"],description:"CoinGecko token ID"}},additionalProperties:!1},{type:"null"}],description:"External links and social media"},marketData:{type:"object",properties:{liquidity:{type:["number","null"],description:"Total liquidity"},marketCap:{type:["number","null"],description:"Market capitalization"},fdv:{type:["number","null"],description:"Fully diluted valuation"},price:{type:["number","null"],description:"Current price"},priceChangePercent:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Percentage change in price across time intervals"},volume:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Trading volume in USD across time intervals"},volumeChangePercent:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Percentage change in trading volume across time intervals"},trades:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Number of trades across time intervals"},tradesChangePercent:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Percentage change in number of trades across time intervals"},buys:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Number of buys across time intervals"},buysChangePercent:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Percentage change in number of buys across time intervals"},sells:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Number of sells across time intervals"},sellsChangePercent:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Percentage change in number of sells across time intervals"},uniqueWallets:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Number of unique wallets trading across time intervals"},uniqueWalletsChangePercent:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Percentage change in number of unique wallets trading across time intervals"}},additionalProperties:!1}},required:["address","name","symbol","chain","decimals"],additionalProperties:!1},description:"Array of tokens matching the search query with their market data"}},required:["items"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"token_transfer",description:"Build an unsigned transfer transaction. Returns a transaction ready for signing. Handles both native and token transfers.",inputSchema:{$ref:"#/definitions/token_transfer_input",definitions:{token_transfer_input:{type:"object",properties:{wallet:{type:"string",description:"Sender wallet address (Solana pubkey or EVM 0x address)"},token:{type:"string",description:"Token address (mint on Solana, contract on EVM). Use native token address for SOL/ETH."},to:{type:"string",description:"Recipient wallet address or name"},amount:{type:"number",description:"Amount to transfer in human-readable units (e.g. 1.5)"},chain:{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","optimism","bnb","avalanche","tron","bitcoin"],description:"Blockchain to execute the transfer on"}},required:["wallet","token","to","amount","chain"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/token_transfer_output",definitions:{token_transfer_output:{type:"object",properties:{transaction:{anyOf:[{type:"object",properties:{type:{type:"string",const:"solana"},base64:{type:"string",description:"Base64-encoded transaction"}},required:["type","base64"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"evm"},to:{type:"string",description:"Recipient or contract address"},data:{type:"string",description:"Calldata (0x for native transfers)"},value:{type:"string",description:"Native token value in wei"},chainId:{type:"number",description:"EVM chain ID"}},required:["type","to","data","value","chainId"],additionalProperties:!1}]},message:{type:"string",description:"Human-readable description of the transfer"}},required:["transaction","message"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"token_trending_list",description:"Get currently trending tokens on a blockchain. Perfect for discovering what's hot right now.",inputSchema:{$ref:"#/definitions/token_trending_list_input",definitions:{token_trending_list_input:{type:"object",properties:{chain:{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","optimism","bnb","avalanche","tron","bitcoin"],description:"Blockchain to get trending tokens from (e.g. 'solana', 'ethereum', 'base')"},limit:{type:"integer",minimum:1,description:"Number of results per page"},page:{type:"integer",minimum:1,description:"Page number (starts at 1)"}},required:["chain","limit","page"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/token_trending_list_output",definitions:{token_trending_list_output:{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{address:{type:"string",description:"Address of the token"},name:{type:"string",description:"Name of the token"},symbol:{type:"string",description:"Symbol of the token"},image:{type:["string","null"],description:"Image of the token"},description:{type:["string","null"],description:"Description of the token"},chain:{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","optimism","bnb","avalanche","tron","bitcoin"],description:"Chain of the token"},decimals:{type:"number",description:"Number of decimals of the token"},externalLinks:{anyOf:[{type:"object",properties:{website:{type:["string","null"],description:"Official website URL"},twitter:{type:["string","null"],description:"Twitter/X profile URL"},telegram:{type:["string","null"],description:"Telegram group URL"},discord:{type:["string","null"],description:"Discord server URL"},github:{type:["string","null"],description:"GitHub repository URL"},coingeckoId:{type:["string","null"],description:"CoinGecko token ID"}},additionalProperties:!1},{type:"null"}],description:"External links and social media"},marketData:{type:"object",properties:{liquidity:{type:["number","null"],description:"Total liquidity"},marketCap:{type:["number","null"],description:"Market capitalization"},fdv:{type:["number","null"],description:"Fully diluted valuation"},price:{type:["number","null"],description:"Current price"},priceChangePercent:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Percentage change in price across time intervals"},volume:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Trading volume in USD across time intervals"},volumeChangePercent:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Percentage change in trading volume across time intervals"},trades:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Number of trades across time intervals"},tradesChangePercent:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Percentage change in number of trades across time intervals"},buys:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Number of buys across time intervals"},buysChangePercent:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Percentage change in number of buys across time intervals"},sells:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Number of sells across time intervals"},sellsChangePercent:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Percentage change in number of sells across time intervals"},uniqueWallets:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Number of unique wallets trading across time intervals"},uniqueWalletsChangePercent:{type:"object",properties:{"1m":{type:["number","null"],description:"1-minute data"},"5m":{type:["number","null"],description:"5-minute data"},"30m":{type:["number","null"],description:"30-minute data"},"1h":{type:["number","null"],description:"1-hour data"},"2h":{type:["number","null"],description:"2-hour data"},"4h":{type:["number","null"],description:"4-hour data"},"6h":{type:["number","null"],description:"6-hour data"},"8h":{type:["number","null"],description:"8-hour data"},"12h":{type:["number","null"],description:"12-hour data"},"24h":{type:["number","null"],description:"24-hour data"}},additionalProperties:!1,description:"Percentage change in number of unique wallets trading across time intervals"}},additionalProperties:!1}},required:["address","name","symbol","chain","decimals"],additionalProperties:!1},description:"Array of trending tokens with their market data"}},required:["items"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"transaction_list",description:"List swap and bridge transaction history for a wallet.",inputSchema:{$ref:"#/definitions/transaction_list_input",definitions:{transaction_list_input:{type:"object",properties:{wallet:{type:"string",description:"Wallet address that signed and sent the transactions"},chain:{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","optimism","bnb","avalanche","tron","bitcoin"],description:"Chain the wallet is on"}},required:["wallet","chain"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/transaction_list_output",definitions:{transaction_list_output:{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{transactionId:{type:"string",description:"Transaction tracking ID"},status:{type:"string",description:"Current status: pending, success, or failed"},type:{type:"string",enum:["swap","bridge"],description:"Transaction type"},from:{type:"object",properties:{chain:{type:"string",description:"Source blockchain"},token:{type:"string",description:"Source token symbol"},amount:{type:["number","null"],description:"Amount sent"},txHash:{type:"string",description:"Source chain transaction hash"}},required:["chain","token","amount","txHash"],additionalProperties:!1},to:{type:"object",properties:{chain:{type:"string",description:"Destination blockchain"},token:{type:"string",description:"Destination token symbol"},amount:{type:["number","null"],description:"Amount received"},txHash:{type:["string","null"],description:"Destination chain transaction hash"}},required:["chain","token","amount","txHash"],additionalProperties:!1},usd:{type:["number","null"],description:"USD value of the transaction"},bridgeTime:{type:["number","null"],description:"Bridge completion time in seconds"}},required:["transactionId","status","type","from","to","usd","bridgeTime"],additionalProperties:!1},description:"List of swap/bridge transactions"}},required:["items"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"transaction_register",description:"Register a broadcast transaction for tracking. Call after transaction_send to enable status tracking via transaction_retrieve.",inputSchema:{$ref:"#/definitions/transaction_register_input",definitions:{transaction_register_input:{type:"object",properties:{transactionId:{type:"string",description:"Transaction ID from the swap build step"},transactionHash:{type:"string",description:"Transaction hash/signature after broadcasting"},chain:{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","optimism","bnb","avalanche","tron","bitcoin"],description:"Blockchain where the transaction was broadcast"}},required:["transactionId","transactionHash","chain"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/transaction_register_output",definitions:{transaction_register_output:{type:"object",properties:{success:{type:"boolean",description:"Whether the operation was successful"}},required:["success"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"transaction_retrieve",description:"Get the status and details of a transaction by its ID.",inputSchema:{$ref:"#/definitions/transaction_retrieve_input",definitions:{transaction_retrieve_input:{type:"object",properties:{transactionId:{type:"string",description:"Transaction ID from swap build or transaction register"}},required:["transactionId"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/transaction_retrieve_output",definitions:{transaction_retrieve_output:{type:"object",properties:{transactionId:{type:"string",description:"Transaction tracking ID"},status:{type:"string",description:"Current status: pending, success, or failed"},type:{type:"string",enum:["swap","bridge"],description:"Transaction type"},from:{type:"object",properties:{chain:{type:"string",description:"Source blockchain"},token:{type:"string",description:"Source token symbol"},amount:{type:["number","null"],description:"Amount sent"},txHash:{type:"string",description:"Source chain transaction hash"}},required:["chain","token","amount","txHash"],additionalProperties:!1},to:{type:"object",properties:{chain:{type:"string",description:"Destination blockchain"},token:{type:"string",description:"Destination token symbol"},amount:{type:["number","null"],description:"Amount received"},txHash:{type:["string","null"],description:"Destination chain transaction hash. Null while bridge is in progress."}},required:["chain","token","amount","txHash"],additionalProperties:!1},usd:{type:["number","null"],description:"USD value of the transaction"},bridgeTime:{type:["number","null"],description:"Bridge completion time in seconds. Null for same-chain swaps."}},required:["transactionId","status","type","from","to","usd","bridgeTime"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"transaction_send",description:"Broadcast a signed transaction to the network. Supports Solana, EVM chains, and Bitcoin.",inputSchema:{$ref:"#/definitions/transaction_send_input",definitions:{transaction_send_input:{type:"object",properties:{transaction:{type:"string",description:"Signed transaction: base64-encoded for Solana, hex-encoded (0x...) for EVM, raw hex for Bitcoin"},message:{type:"string",description:"Human-readable message describing the transaction"},chain:{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","optimism","bnb","avalanche","tron","bitcoin"],description:"Blockchain to broadcast on"}},required:["transaction","message","chain"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/transaction_send_output",definitions:{transaction_send_output:{type:"object",properties:{signature:{type:"string",description:"Transaction signature/hash. Absent if broadcast failed."},message:{type:"string",description:"Result message or error description"}},required:["message"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"user_retrieve",description:"Get the currently authenticated user",inputSchema:{$ref:"#/definitions/user_retrieve_input",definitions:{user_retrieve_input:{type:"object",properties:{},additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/user_retrieve_output",definitions:{user_retrieve_output:{type:"object",properties:{id:{type:"string",description:"User ID"},email:{type:["string","null"],description:"User email address"}},required:["id","email"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"verify",description:"Verify a login code for the user.",inputSchema:{$ref:"#/definitions/verify_input",definitions:{verify_input:{type:"object",properties:{code:{type:"string",pattern:"^\\d{6}$",description:"The code to verify"},email:{type:"string",format:"email",description:"The email the OTP was sent to"}},required:["code","email"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/verify_output",definitions:{verify_output:{type:"object",properties:{accessToken:{type:"string"},refreshToken:{type:"string"},expiresAt:{type:"number"}},required:["accessToken","refreshToken","expiresAt"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_agreement_accept",description:"Accept a required legal agreement. Pass the content ID from virtual-account_agreement_list to mark the agreement as accepted.",inputSchema:{$ref:"#/definitions/virtual-account_agreement_accept_input",definitions:{"virtual-account_agreement_accept_input":{type:"object",properties:{contentId:{type:"string",description:"Content ID from virtual-account_agreement_list"}},required:["contentId"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_agreement_accept_output",definitions:{"virtual-account_agreement_accept_output":{type:"object",properties:{id:{type:"string",description:"Signing record ID"},contentId:{type:["string","null"],description:"Content ID of the accepted agreement"},documentId:{type:["string","null"],description:"Document ID"}},required:["id","contentId","documentId"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_agreement_list",description:"List legal agreements. By default shows pending agreements that must be accepted to activate the account. Use status=accepted to see previously accepted agreements.",inputSchema:{$ref:"#/definitions/virtual-account_agreement_list_input",definitions:{"virtual-account_agreement_list_input":{type:"object",properties:{status:{anyOf:[{type:"string",enum:["pending","accepted"]},{type:"null"}],description:"Filter: pending (need to accept, default) or accepted (already signed)"},country:{type:["string","null"],description:"Country code for terms (e.g. USA, GBR). Defaults to USA."}},required:["status","country"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_agreement_list_output",definitions:{"virtual-account_agreement_list_output":{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{id:{type:"string",description:"Content ID \u2014 pass to virtual-account_agreement_accept to accept"},name:{type:"string",description:"Document name (e.g. 'USA Terms and Conditions')"},url:{type:"string",description:"URL to view the document"}},required:["id","name","url"],additionalProperties:!1},description:"List of agreements"}},required:["items"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_bank-account_delete",description:"Delete a bank account",inputSchema:{$ref:"#/definitions/virtual-account_bank-account_delete_input",definitions:{"virtual-account_bank-account_delete_input":{type:"object",properties:{bankAccountId:{type:"string",format:"uuid",description:"The ID of the bank account to delete"}},required:["bankAccountId"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_bank-account_delete_output",definitions:{"virtual-account_bank-account_delete_output":{type:"object",properties:{success:{type:"boolean",description:"Whether the operation was successful"}},required:["success"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_bank-account_list",description:"List registered bank accounts",inputSchema:{$ref:"#/definitions/virtual-account_bank-account_list_input",definitions:{"virtual-account_bank-account_list_input":{type:"object",properties:{},additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_bank-account_list_output",definitions:{"virtual-account_bank-account_list_output":{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{id:{type:"string"},bank_account_identifier:{anyOf:[{type:"object",properties:{type:{type:"string",const:"SEPA"},iban:{type:"string"}},required:["type","iban"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"ACH"},account_number:{type:"string"},routing_number:{type:"string"}},required:["type","account_number","routing_number"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Wire"},account_number:{type:"string"},routing_number:{type:"string"}},required:["type","account_number","routing_number"],additionalProperties:!1}]},bank_name:{type:"string"},country:{type:"string"},created_at:{type:"string",format:"date-time"},currency:{type:"string",enum:["USD","EUR"],description:"Fiat currency code. USD: US Dollar, EUR: Euro"},customer_id:{type:"string"},is_third_party:{type:"boolean"},label:{type:["string","null"]},ownership_verified:{type:"boolean"},status:{type:"string",enum:["AuthorizationRequired","AuthorizationFailed","RegistrationPending","RegistrationFailed","Registered"]},updated_at:{type:"string",format:"date-time"}},required:["id","bank_account_identifier","bank_name","country","created_at","currency","customer_id","is_third_party","label","ownership_verified","status","updated_at"],additionalProperties:!1}}},required:["items"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_bank-account_register",description:"Register a bank account for offramp payouts. USD accounts use ACH/Wire with account+routing numbers. EUR accounts use SEPA with IBAN.",inputSchema:{$ref:"#/definitions/virtual-account_bank-account_register_input",definitions:{"virtual-account_bank-account_register_input":{type:"object",properties:{currency:{type:"string",enum:["USD","EUR"],description:"Currency of the bank account (USD or EUR)"},type:{type:"string",enum:["ACH","Wire","SEPA"],description:"Account type: ACH or Wire for USD, SEPA for EUR"},accountNumber:{type:["string","null"],description:"Account number (required for USD ACH/Wire)"},routingNumber:{type:["string","null"],description:"Routing number (required for USD ACH/Wire)"},iban:{type:["string","null"],description:"IBAN (required for EUR SEPA)"},address:{type:"object",properties:{street:{type:"string",description:"Street address"},city:{type:"string",description:"City"},state:{type:"string",description:"State or province"},country:{type:"string",enum:["US","GB","CA","AU","DE","FR","IT","ES","NL","BE","AT","CH","SE","NO","DK","FI","IE","PT","PL","CZ","GR","JP","KR","CN","IN","BR","MX","AR","ZA","NZ","SG","HK","AE"],description:"ISO 3166-1 Alpha-2 country code"},postalCode:{type:"string",description:"Postal or ZIP code"}},required:["street","city","state","country","postalCode"],additionalProperties:!1,description:"Address of the account holder"},email:{type:"string",description:"Email address of the account holder"},phoneNumber:{type:"string",description:"Phone number of the account holder"},providerCountry:{type:"string",enum:["US","GB","CA","AU","DE","FR","IT","ES","NL","BE","AT","CH","SE","NO","DK","FI","IE","PT","PL","CZ","GR","JP","KR","CN","IN","BR","MX","AR","ZA","NZ","SG","HK","AE"],description:"ISO 3166-1 Alpha-2 country code where the bank is located"},providerName:{type:"string",description:"Name of the bank"},givenName:{type:"string",description:"First/given name of the account holder"},familyName:{type:"string",description:"Last/family name of the account holder"}},required:["currency","type","accountNumber","routingNumber","iban","address","email","phoneNumber","providerCountry","providerName","givenName","familyName"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_bank-account_register_output",definitions:{"virtual-account_bank-account_register_output":{type:"object",properties:{id:{type:"string"},bank_account_identifier:{anyOf:[{type:"object",properties:{type:{type:"string",const:"SEPA"},iban:{type:"string"}},required:["type","iban"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"ACH"},account_number:{type:"string"},routing_number:{type:"string"}},required:["type","account_number","routing_number"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Wire"},account_number:{type:"string"},routing_number:{type:"string"}},required:["type","account_number","routing_number"],additionalProperties:!1}]},bank_name:{type:"string"},country:{type:"string"},created_at:{type:"string",format:"date-time"},currency:{type:"string",enum:["USD","EUR"],description:"Fiat currency code. USD: US Dollar, EUR: Euro"},customer_id:{type:"string"},is_third_party:{type:"boolean"},label:{type:["string","null"]},ownership_verified:{type:"boolean"},status:{type:"string",enum:["AuthorizationRequired","AuthorizationFailed","RegistrationPending","RegistrationFailed","Registered"]},updated_at:{type:"string",format:"date-time"}},required:["id","bank_account_identifier","bank_name","country","created_at","currency","customer_id","is_third_party","label","ownership_verified","status","updated_at"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_bank-account_retrieve",description:"Get a bank account by ID",inputSchema:{$ref:"#/definitions/virtual-account_bank-account_retrieve_input",definitions:{"virtual-account_bank-account_retrieve_input":{type:"object",properties:{bankAccountId:{type:"string",description:"Bank account ID"}},required:["bankAccountId"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_bank-account_retrieve_output",definitions:{"virtual-account_bank-account_retrieve_output":{type:"object",properties:{id:{type:"string"},bank_account_identifier:{anyOf:[{type:"object",properties:{type:{type:"string",const:"SEPA"},iban:{type:"string"}},required:["type","iban"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"ACH"},account_number:{type:"string"},routing_number:{type:"string"}},required:["type","account_number","routing_number"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Wire"},account_number:{type:"string"},routing_number:{type:"string"}},required:["type","account_number","routing_number"],additionalProperties:!1}]},bank_name:{type:"string"},country:{type:"string"},created_at:{type:"string",format:"date-time"},currency:{type:"string",enum:["USD","EUR"],description:"Fiat currency code. USD: US Dollar, EUR: Euro"},customer_id:{type:"string"},is_third_party:{type:"boolean"},label:{type:["string","null"]},ownership_verified:{type:"boolean"},status:{type:"string",enum:["AuthorizationRequired","AuthorizationFailed","RegistrationPending","RegistrationFailed","Registered"]},updated_at:{type:"string",format:"date-time"}},required:["id","bank_account_identifier","bank_name","country","created_at","currency","customer_id","is_third_party","label","ownership_verified","status","updated_at"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_create",description:"Create a virtual account and start KYC verification",inputSchema:{$ref:"#/definitions/virtual-account_create_input",definitions:{"virtual-account_create_input":{type:"object",properties:{},additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_create_output",definitions:{"virtual-account_create_output":{type:"object",properties:{id:{type:"string"},email:{type:"string"},customerType:{type:"string",enum:["Person","Business"]},status:{type:"string",enum:["UserRequired","SigningsRequired","IdentificationRequired","Active","Suspended"]},nextStep:{type:["string","null"]}},required:["id","email","customerType","status","nextStep"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_kyc_continue",description:"Get the current KYC verification status and URL. Use this to check progress or get the verification link again.",inputSchema:{$ref:"#/definitions/virtual-account_kyc_continue_input",definitions:{"virtual-account_kyc_continue_input":{type:"object",properties:{},additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_kyc_continue_output",definitions:{"virtual-account_kyc_continue_output":{type:"object",properties:{id:{type:"string",description:"Identification record ID"},status:{type:"string",enum:["Pending","Processed","PendingReview","Approved","Declined","Expired"],description:"KYC status: Pending, Processed, PendingReview, Approved, Declined, or Expired"},url:{type:["string","null"],description:"URL to complete KYC verification. Null if already submitted."}},required:["id","status","url"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_kyc_restart",description:"Restart KYC verification. Creates a fresh verification link. Only available when account status is IdentificationRequired.",inputSchema:{$ref:"#/definitions/virtual-account_kyc_restart_input",definitions:{"virtual-account_kyc_restart_input":{type:"object",properties:{},additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_kyc_restart_output",definitions:{"virtual-account_kyc_restart_output":{type:"object",properties:{id:{type:"string",description:"Identification record ID"},status:{type:"string",enum:["Pending","Processed","PendingReview","Approved","Declined","Expired"],description:"KYC status: Pending, Processed, PendingReview, Approved, Declined, or Expired"},url:{type:["string","null"],description:"URL to complete KYC verification. Null if already submitted."},message:{type:["string","null"],description:"Instructions for the user"}},required:["id","status","url","message"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_offramp_cancel",description:"Cancel an offramp",inputSchema:{$ref:"#/definitions/virtual-account_offramp_cancel_input",definitions:{"virtual-account_offramp_cancel_input":{type:"object",properties:{offrampId:{type:"string",format:"uuid",description:"The ID of the offramp to cancel"}},required:["offrampId"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_offramp_cancel_output",definitions:{"virtual-account_offramp_cancel_output":{type:"object",properties:{success:{type:"boolean"},message:{type:"string"}},required:["success","message"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_offramp_create",description:"Create an offramp to convert stablecoin to fiat",inputSchema:{$ref:"#/definitions/virtual-account_offramp_create_input",definitions:{"virtual-account_offramp_create_input":{type:"object",properties:{name:{type:"string",description:"The name of the offramp"},bankAccountId:{type:"string",description:"Bank account ID to receive fiat. Get from `bank-account list`."},stablecoin:{type:"string",enum:["USDC","USDT","EURC"],description:"The stablecoin token to convert from"},chain:{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","optimism","bnb","avalanche","tron","bitcoin"],description:"Blockchain the stablecoin is on (solana, ethereum, polygon, arbitrum, base)"}},required:["name","bankAccountId","stablecoin","chain"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_offramp_create_output",definitions:{"virtual-account_offramp_create_output":{type:"object",properties:{created_at:{type:"string",format:"date-time"},deposit_account:{anyOf:[{anyOf:[{type:"object",properties:{type:{type:"string",const:"ACHWire"},account_number:{type:"string"},bank_address:{type:"string"},bank_name:{type:"string"},recipient_address:{type:"string"},recipient_name:{type:"string"},routing_number:{type:"string"}},required:["type","account_number","bank_address","bank_name","recipient_address","recipient_name","routing_number"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"AfricanBankTransfer"},account_name:{type:"string"},account_number:{type:"string"},amount:{type:"string"},bank_name:{type:"string"},currency:{type:"string"},financial_institution:{type:"string"}},required:["type","account_name","account_number","amount","bank_name","currency","financial_institution"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Crypto"},address:{type:"string"},chain:{type:"string",enum:["Solana","Ethereum","Polygon","Arbitrum","Base","Stellar","Citrea"]}},required:["type","address","chain"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"MobileMoney"},instruction:{type:"string"},mobile_number:{type:"string"}},required:["type","mobile_number"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Pix"},instruction:{type:"string"},pix_key:{type:"string"}},required:["type","instruction","pix_key"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"SEPA"},iban:{type:"string"},address:{type:"string"},beneficiary_name:{type:["string","null"]},bic:{type:"string"},name:{type:"string"},phone:{type:"string"}},required:["type","iban","beneficiary_name"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Spei"},clabe:{type:"string"},instruction:{type:"string"}},required:["type","clabe","instruction"],additionalProperties:!1}]},{type:"null"}]},destination_currency:{anyOf:[{type:"object",properties:{type:{type:"string",const:"Crypto"},blockchain:{type:"string",enum:["Solana","Ethereum","Polygon","Arbitrum","Base","Stellar","Citrea"]},token:{type:"string",enum:["USDC","USDT","EURC"],description:"Stablecoin token code. USDC: USD Coin, USDT: Tether, EURC: Euro Coin"}},required:["type","blockchain","token"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Fiat"},code:{type:"string",enum:["USD","EUR"],description:"Fiat currency code. USD: US Dollar, EUR: Euro"}},required:["type","code"],additionalProperties:!1}]},id:{type:"string",description:"The ID of the autoramp"},name:{type:"string"},recipient:{type:"object",properties:{type:{type:"string",const:"BankAccount"},provider_name:{type:"string"},provider_country:{type:"object",properties:{code:{type:"string",minLength:2,maxLength:2}},required:["code"],additionalProperties:!1},is_third_party:{type:"boolean"},account_identifier:{type:"object",properties:{type:{type:"string",enum:["SEPA","ACH","Wire"]},iban:{type:"string"},account_number:{type:"string"},routing_number:{type:"string"}},required:["type"],additionalProperties:!1},address:{type:"object",properties:{street:{type:"string"},city:{type:"string"},state:{type:"string"},country:{type:"object",properties:{code:{type:"string",minLength:2,maxLength:2}},required:["code"],additionalProperties:!1},postal_code:{type:"string"}},required:["street","city","state","country","postal_code"],additionalProperties:!1},recipient:{type:"object",properties:{type:{type:"string",enum:["Individual","Business"]},family_name:{type:"string"},given_name:{type:"string"},name:{type:"string"}},required:["type"],additionalProperties:!1}},required:["type","provider_name","provider_country","is_third_party","account_identifier","address","recipient"],additionalProperties:!1},source:{type:"string",enum:["Standalone","Quote"]},source_currencies:{type:"array",items:{type:"object",properties:{type:{type:"string",const:"Crypto"},blockchain:{type:"string",enum:["Solana","Ethereum","Polygon","Arbitrum","Base","Stellar","Citrea"]},token:{type:"string",enum:["USDC","USDT","EURC"],description:"Stablecoin token code. USDC: USD Coin, USDT: Tether, EURC: Euro Coin"}},required:["type","blockchain","token"],additionalProperties:!1}},status:{type:"string",enum:["Created","EditPending","Authorized","DepositAccountAdded","Approved","Rejected","Cancelled"]}},required:["created_at","deposit_account","destination_currency","id","name","recipient","source","source_currencies","status"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_offramp_initiate",description:"Build an unsigned transaction to send stablecoin to an offramp deposit address",inputSchema:{$ref:"#/definitions/virtual-account_offramp_initiate_input",definitions:{"virtual-account_offramp_initiate_input":{type:"object",properties:{wallet:{type:"string",description:"The wallet address to send from"},offrampId:{type:"string",description:"The ID of the offramp to initiate"},amount:{type:"number",minimum:0,description:"The amount of stablecoin to send (in human-readable units, e.g., 100.5)"}},required:["wallet","offrampId","amount"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_offramp_initiate_output",definitions:{"virtual-account_offramp_initiate_output":{type:"object",properties:{transaction:{anyOf:[{type:"object",properties:{type:{type:"string",const:"solana"},base64:{type:"string",description:"Base64-encoded transaction"}},required:["type","base64"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"evm"},to:{type:"string",description:"Recipient or contract address"},data:{type:"string",description:"Calldata (0x for native transfers)"},value:{type:"string",description:"Native token value in wei"},chainId:{type:"number",description:"EVM chain ID"}},required:["type","to","data","value","chainId"],additionalProperties:!1}]},message:{type:"string",description:"Human-readable description of the transfer"}},required:["transaction","message"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_offramp_list",description:"List all offramps",inputSchema:{$ref:"#/definitions/virtual-account_offramp_list_input",definitions:{"virtual-account_offramp_list_input":{type:"object",properties:{},additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_offramp_list_output",definitions:{"virtual-account_offramp_list_output":{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{created_at:{type:"string",format:"date-time"},deposit_account:{anyOf:[{anyOf:[{type:"object",properties:{type:{type:"string",const:"ACHWire"},account_number:{type:"string"},bank_address:{type:"string"},bank_name:{type:"string"},recipient_address:{type:"string"},recipient_name:{type:"string"},routing_number:{type:"string"}},required:["type","account_number","bank_address","bank_name","recipient_address","recipient_name","routing_number"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"AfricanBankTransfer"},account_name:{type:"string"},account_number:{type:"string"},amount:{type:"string"},bank_name:{type:"string"},currency:{type:"string"},financial_institution:{type:"string"}},required:["type","account_name","account_number","amount","bank_name","currency","financial_institution"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Crypto"},address:{type:"string"},chain:{type:"string",enum:["Solana","Ethereum","Polygon","Arbitrum","Base","Stellar","Citrea"]}},required:["type","address","chain"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"MobileMoney"},instruction:{type:"string"},mobile_number:{type:"string"}},required:["type","mobile_number"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Pix"},instruction:{type:"string"},pix_key:{type:"string"}},required:["type","instruction","pix_key"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"SEPA"},iban:{type:"string"},address:{type:"string"},beneficiary_name:{type:["string","null"]},bic:{type:"string"},name:{type:"string"},phone:{type:"string"}},required:["type","iban","beneficiary_name"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Spei"},clabe:{type:"string"},instruction:{type:"string"}},required:["type","clabe","instruction"],additionalProperties:!1}]},{type:"null"}]},destination_currency:{anyOf:[{type:"object",properties:{type:{type:"string",const:"Crypto"},blockchain:{type:"string",enum:["Solana","Ethereum","Polygon","Arbitrum","Base","Stellar","Citrea"]},token:{type:"string",enum:["USDC","USDT","EURC"],description:"Stablecoin token code. USDC: USD Coin, USDT: Tether, EURC: Euro Coin"}},required:["type","blockchain","token"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Fiat"},code:{type:"string",enum:["USD","EUR"],description:"Fiat currency code. USD: US Dollar, EUR: Euro"}},required:["type","code"],additionalProperties:!1}]},id:{type:"string",description:"The ID of the autoramp"},name:{type:"string"},recipient:{type:"object",properties:{type:{type:"string",const:"BankAccount"},provider_name:{type:"string"},provider_country:{type:"object",properties:{code:{type:"string",minLength:2,maxLength:2}},required:["code"],additionalProperties:!1},is_third_party:{type:"boolean"},account_identifier:{type:"object",properties:{type:{type:"string",enum:["SEPA","ACH","Wire"]},iban:{type:"string"},account_number:{type:"string"},routing_number:{type:"string"}},required:["type"],additionalProperties:!1},address:{type:"object",properties:{street:{type:"string"},city:{type:"string"},state:{type:"string"},country:{type:"object",properties:{code:{type:"string",minLength:2,maxLength:2}},required:["code"],additionalProperties:!1},postal_code:{type:"string"}},required:["street","city","state","country","postal_code"],additionalProperties:!1},recipient:{type:"object",properties:{type:{type:"string",enum:["Individual","Business"]},family_name:{type:"string"},given_name:{type:"string"},name:{type:"string"}},required:["type"],additionalProperties:!1}},required:["type","provider_name","provider_country","is_third_party","account_identifier","address","recipient"],additionalProperties:!1},source:{type:"string",enum:["Standalone","Quote"]},source_currencies:{type:"array",items:{type:"object",properties:{type:{type:"string",const:"Crypto"},blockchain:{type:"string",enum:["Solana","Ethereum","Polygon","Arbitrum","Base","Stellar","Citrea"]},token:{type:"string",enum:["USDC","USDT","EURC"],description:"Stablecoin token code. USDC: USD Coin, USDT: Tether, EURC: Euro Coin"}},required:["type","blockchain","token"],additionalProperties:!1}},status:{type:"string",enum:["Created","EditPending","Authorized","DepositAccountAdded","Approved","Rejected","Cancelled"]}},required:["created_at","deposit_account","destination_currency","id","name","recipient","source","source_currencies","status"],additionalProperties:!1}}},required:["items"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_offramp_retrieve",description:"Get offramp details",inputSchema:{$ref:"#/definitions/virtual-account_offramp_retrieve_input",definitions:{"virtual-account_offramp_retrieve_input":{type:"object",properties:{offrampId:{type:"string",format:"uuid",description:"The ID of the offramp to retrieve"}},required:["offrampId"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_offramp_retrieve_output",definitions:{"virtual-account_offramp_retrieve_output":{type:"object",properties:{created_at:{type:"string",format:"date-time"},deposit_account:{anyOf:[{anyOf:[{type:"object",properties:{type:{type:"string",const:"ACHWire"},account_number:{type:"string"},bank_address:{type:"string"},bank_name:{type:"string"},recipient_address:{type:"string"},recipient_name:{type:"string"},routing_number:{type:"string"}},required:["type","account_number","bank_address","bank_name","recipient_address","recipient_name","routing_number"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"AfricanBankTransfer"},account_name:{type:"string"},account_number:{type:"string"},amount:{type:"string"},bank_name:{type:"string"},currency:{type:"string"},financial_institution:{type:"string"}},required:["type","account_name","account_number","amount","bank_name","currency","financial_institution"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Crypto"},address:{type:"string"},chain:{type:"string",enum:["Solana","Ethereum","Polygon","Arbitrum","Base","Stellar","Citrea"]}},required:["type","address","chain"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"MobileMoney"},instruction:{type:"string"},mobile_number:{type:"string"}},required:["type","mobile_number"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Pix"},instruction:{type:"string"},pix_key:{type:"string"}},required:["type","instruction","pix_key"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"SEPA"},iban:{type:"string"},address:{type:"string"},beneficiary_name:{type:["string","null"]},bic:{type:"string"},name:{type:"string"},phone:{type:"string"}},required:["type","iban","beneficiary_name"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Spei"},clabe:{type:"string"},instruction:{type:"string"}},required:["type","clabe","instruction"],additionalProperties:!1}]},{type:"null"}]},destination_currency:{anyOf:[{type:"object",properties:{type:{type:"string",const:"Crypto"},blockchain:{type:"string",enum:["Solana","Ethereum","Polygon","Arbitrum","Base","Stellar","Citrea"]},token:{type:"string",enum:["USDC","USDT","EURC"],description:"Stablecoin token code. USDC: USD Coin, USDT: Tether, EURC: Euro Coin"}},required:["type","blockchain","token"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Fiat"},code:{type:"string",enum:["USD","EUR"],description:"Fiat currency code. USD: US Dollar, EUR: Euro"}},required:["type","code"],additionalProperties:!1}]},id:{type:"string",description:"The ID of the autoramp"},name:{type:"string"},recipient:{type:"object",properties:{type:{type:"string",const:"BankAccount"},provider_name:{type:"string"},provider_country:{type:"object",properties:{code:{type:"string",minLength:2,maxLength:2}},required:["code"],additionalProperties:!1},is_third_party:{type:"boolean"},account_identifier:{type:"object",properties:{type:{type:"string",enum:["SEPA","ACH","Wire"]},iban:{type:"string"},account_number:{type:"string"},routing_number:{type:"string"}},required:["type"],additionalProperties:!1},address:{type:"object",properties:{street:{type:"string"},city:{type:"string"},state:{type:"string"},country:{type:"object",properties:{code:{type:"string",minLength:2,maxLength:2}},required:["code"],additionalProperties:!1},postal_code:{type:"string"}},required:["street","city","state","country","postal_code"],additionalProperties:!1},recipient:{type:"object",properties:{type:{type:"string",enum:["Individual","Business"]},family_name:{type:"string"},given_name:{type:"string"},name:{type:"string"}},required:["type"],additionalProperties:!1}},required:["type","provider_name","provider_country","is_third_party","account_identifier","address","recipient"],additionalProperties:!1},source:{type:"string",enum:["Standalone","Quote"]},source_currencies:{type:"array",items:{type:"object",properties:{type:{type:"string",const:"Crypto"},blockchain:{type:"string",enum:["Solana","Ethereum","Polygon","Arbitrum","Base","Stellar","Citrea"]},token:{type:"string",enum:["USDC","USDT","EURC"],description:"Stablecoin token code. USDC: USD Coin, USDT: Tether, EURC: Euro Coin"}},required:["type","blockchain","token"],additionalProperties:!1}},status:{type:"string",enum:["Created","EditPending","Authorized","DepositAccountAdded","Approved","Rejected","Cancelled"]}},required:["created_at","deposit_account","destination_currency","id","name","recipient","source","source_currencies","status"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_offramp_update",description:"Update an existing offramp's destination bank account or fiat currency.",inputSchema:{$ref:"#/definitions/virtual-account_offramp_update_input",definitions:{"virtual-account_offramp_update_input":{type:"object",properties:{offrampId:{type:"string",description:"The ID of the offramp to update"},bankAccountId:{type:"string",description:"New bank account ID. Get from `bank-account list`."}},required:["offrampId","bankAccountId"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_offramp_update_output",definitions:{"virtual-account_offramp_update_output":{type:"object",properties:{created_at:{type:"string",format:"date-time"},deposit_account:{anyOf:[{anyOf:[{type:"object",properties:{type:{type:"string",const:"ACHWire"},account_number:{type:"string"},bank_address:{type:"string"},bank_name:{type:"string"},recipient_address:{type:"string"},recipient_name:{type:"string"},routing_number:{type:"string"}},required:["type","account_number","bank_address","bank_name","recipient_address","recipient_name","routing_number"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"AfricanBankTransfer"},account_name:{type:"string"},account_number:{type:"string"},amount:{type:"string"},bank_name:{type:"string"},currency:{type:"string"},financial_institution:{type:"string"}},required:["type","account_name","account_number","amount","bank_name","currency","financial_institution"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Crypto"},address:{type:"string"},chain:{type:"string",enum:["Solana","Ethereum","Polygon","Arbitrum","Base","Stellar","Citrea"]}},required:["type","address","chain"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"MobileMoney"},instruction:{type:"string"},mobile_number:{type:"string"}},required:["type","mobile_number"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Pix"},instruction:{type:"string"},pix_key:{type:"string"}},required:["type","instruction","pix_key"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"SEPA"},iban:{type:"string"},address:{type:"string"},beneficiary_name:{type:["string","null"]},bic:{type:"string"},name:{type:"string"},phone:{type:"string"}},required:["type","iban","beneficiary_name"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Spei"},clabe:{type:"string"},instruction:{type:"string"}},required:["type","clabe","instruction"],additionalProperties:!1}]},{type:"null"}]},destination_currency:{anyOf:[{type:"object",properties:{type:{type:"string",const:"Crypto"},blockchain:{type:"string",enum:["Solana","Ethereum","Polygon","Arbitrum","Base","Stellar","Citrea"]},token:{type:"string",enum:["USDC","USDT","EURC"],description:"Stablecoin token code. USDC: USD Coin, USDT: Tether, EURC: Euro Coin"}},required:["type","blockchain","token"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"Fiat"},code:{type:"string",enum:["USD","EUR"],description:"Fiat currency code. USD: US Dollar, EUR: Euro"}},required:["type","code"],additionalProperties:!1}]},id:{type:"string",description:"The ID of the autoramp"},name:{type:"string"},recipient:{type:"object",properties:{type:{type:"string",const:"BankAccount"},provider_name:{type:"string"},provider_country:{type:"object",properties:{code:{type:"string",minLength:2,maxLength:2}},required:["code"],additionalProperties:!1},is_third_party:{type:"boolean"},account_identifier:{type:"object",properties:{type:{type:"string",enum:["SEPA","ACH","Wire"]},iban:{type:"string"},account_number:{type:"string"},routing_number:{type:"string"}},required:["type"],additionalProperties:!1},address:{type:"object",properties:{street:{type:"string"},city:{type:"string"},state:{type:"string"},country:{type:"object",properties:{code:{type:"string",minLength:2,maxLength:2}},required:["code"],additionalProperties:!1},postal_code:{type:"string"}},required:["street","city","state","country","postal_code"],additionalProperties:!1},recipient:{type:"object",properties:{type:{type:"string",enum:["Individual","Business"]},family_name:{type:"string"},given_name:{type:"string"},name:{type:"string"}},required:["type"],additionalProperties:!1}},required:["type","provider_name","provider_country","is_third_party","account_identifier","address","recipient"],additionalProperties:!1},source:{type:"string",enum:["Standalone","Quote"]},source_currencies:{type:"array",items:{type:"object",properties:{type:{type:"string",const:"Crypto"},blockchain:{type:"string",enum:["Solana","Ethereum","Polygon","Arbitrum","Base","Stellar","Citrea"]},token:{type:"string",enum:["USDC","USDT","EURC"],description:"Stablecoin token code. USDC: USD Coin, USDT: Tether, EURC: Euro Coin"}},required:["type","blockchain","token"],additionalProperties:!1}},status:{type:"string",enum:["Created","EditPending","Authorized","DepositAccountAdded","Approved","Rejected","Cancelled"]}},required:["created_at","deposit_account","destination_currency","id","name","recipient","source","source_currencies","status"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_onramp_cancel",description:"Cancel an onramp",inputSchema:{$ref:"#/definitions/virtual-account_onramp_cancel_input",definitions:{"virtual-account_onramp_cancel_input":{type:"object",properties:{onrampId:{type:"string",format:"uuid",description:"The ID of the onramp to cancel"}},required:["onrampId"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_onramp_cancel_output",definitions:{"virtual-account_onramp_cancel_output":{type:"object",properties:{success:{type:"boolean"},message:{type:"string"}},required:["success","message"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_onramp_create",description:"Create a fiat-to-stablecoin onramp. Returns a deposit account (bank IBAN or account number) where the user sends fiat. Incoming fiat is automatically converted to stablecoin and sent to the registered wallet.",inputSchema:{$ref:"#/definitions/virtual-account_onramp_create_input",definitions:{"virtual-account_onramp_create_input":{type:"object",properties:{name:{type:"string",description:"A label for this onramp (e.g. 'My USD onramp')"},fiat:{type:"string",enum:["USD","EUR"],description:"Fiat currency: usd or eur"},stablecoin:{type:"string",enum:["USDC","USDT","EURC"],description:"Target stablecoin: usdc, usdt, or eurc"},wallet:{type:"string",description:"Registered wallet address (must be registered via virtual-account_wallet_register first)"},chain:{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","optimism","bnb","avalanche","tron","bitcoin"],description:"Blockchain to receive stablecoin on (solana, ethereum, polygon, arbitrum, base)"}},required:["name","fiat","stablecoin","wallet","chain"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_onramp_create_output",definitions:{"virtual-account_onramp_create_output":{type:"object",properties:{id:{type:"string"},name:{type:"string"},status:{type:"string",enum:["Created","EditPending","Authorized","DepositAccountAdded","Approved","Rejected","Cancelled"]},fiat:{type:"string"},stablecoin:{type:"string"},depositAccount:{anyOf:[{type:"object",properties:{type:{type:"string"},iban:{type:["string","null"]},bic:{type:["string","null"]},accountNumber:{type:["string","null"]},routingNumber:{type:["string","null"]},bankName:{type:["string","null"]},bankAddress:{type:["string","null"]},recipientName:{type:["string","null"]}},required:["type","iban","bic","accountNumber","routingNumber","bankName","bankAddress","recipientName"],additionalProperties:!1},{type:"null"}]},walletAddress:{type:"string"},fees:{anyOf:[{type:"object",properties:{transactionFee:{type:"string",description:"e.g. '0.50%'"},bankingFee:{type:["string","null"],description:"e.g. '0.50 EUR (SEPA)'"},networkFee:{type:"string",description:"'subsidized' or 'charged'"}},required:["transactionFee","bankingFee","networkFee"],additionalProperties:!1},{type:"null"}]},legalDisclaimer:{type:"string"}},required:["id","name","status","fiat","stablecoin","depositAccount","walletAddress","fees","legalDisclaimer"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_onramp_list",description:"List all fiat-to-stablecoin onramps. Shows each onramp's deposit account details, status, and destination wallet.",inputSchema:{$ref:"#/definitions/virtual-account_onramp_list_input",definitions:{"virtual-account_onramp_list_input":{type:"object",properties:{},additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_onramp_list_output",definitions:{"virtual-account_onramp_list_output":{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{id:{type:"string"},name:{type:"string"},status:{type:"string",enum:["Created","EditPending","Authorized","DepositAccountAdded","Approved","Rejected","Cancelled"]},fiat:{type:"string"},stablecoin:{type:"string"},depositAccount:{anyOf:[{type:"object",properties:{type:{type:"string"},iban:{type:["string","null"]},bic:{type:["string","null"]},accountNumber:{type:["string","null"]},routingNumber:{type:["string","null"]},bankName:{type:["string","null"]},bankAddress:{type:["string","null"]},recipientName:{type:["string","null"]}},required:["type","iban","bic","accountNumber","routingNumber","bankName","bankAddress","recipientName"],additionalProperties:!1},{type:"null"}]},walletAddress:{type:"string"},fees:{anyOf:[{type:"object",properties:{transactionFee:{type:"string",description:"e.g. '0.50%'"},bankingFee:{type:["string","null"],description:"e.g. '0.50 EUR (SEPA)'"},networkFee:{type:"string",description:"'subsidized' or 'charged'"}},required:["transactionFee","bankingFee","networkFee"],additionalProperties:!1},{type:"null"}]},legalDisclaimer:{type:"string"}},required:["id","name","status","fiat","stablecoin","depositAccount","walletAddress","fees","legalDisclaimer"],additionalProperties:!1},description:"List of configured onramps"}},required:["items"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_onramp_payment_create",description:"Create an open banking payment link for an onramp",inputSchema:{$ref:"#/definitions/virtual-account_onramp_payment_create_input",definitions:{"virtual-account_onramp_payment_create_input":{type:"object",properties:{onrampId:{type:"string",format:"uuid",description:"The ID of the onramp"},amount:{type:"string",description:"The amount to pay"},fiat:{type:"string",enum:["USD","EUR"],description:"The fiat currency (USD or EUR)"}},required:["onrampId","amount","fiat"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_onramp_payment_create_output",definitions:{"virtual-account_onramp_payment_create_output":{type:"object",properties:{id:{type:"string"},paymentLink:{type:["string","null"]},status:{type:"string",enum:["Pending","Ready","Processing","Completed","Failed"]}},required:["id","paymentLink","status"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_onramp_payment_retrieve",description:"Get the status of an open banking payment",inputSchema:{$ref:"#/definitions/virtual-account_onramp_payment_retrieve_input",definitions:{"virtual-account_onramp_payment_retrieve_input":{type:"object",properties:{onrampId:{type:"string",format:"uuid",description:"The ID of the onramp this payment belongs to"},paymentId:{type:"string",format:"uuid",description:"The ID of the payment to retrieve"}},required:["onrampId","paymentId"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_onramp_payment_retrieve_output",definitions:{"virtual-account_onramp_payment_retrieve_output":{type:"object",properties:{id:{type:"string"},paymentLink:{type:["string","null"]},status:{type:"string",enum:["Pending","Ready","Processing","Completed","Failed"]}},required:["id","paymentLink","status"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_onramp_retrieve",description:"Get onramp details and banking info",inputSchema:{$ref:"#/definitions/virtual-account_onramp_retrieve_input",definitions:{"virtual-account_onramp_retrieve_input":{type:"object",properties:{onrampId:{type:"string",format:"uuid",description:"The ID of the onramp to retrieve"}},required:["onrampId"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_onramp_retrieve_output",definitions:{"virtual-account_onramp_retrieve_output":{type:"object",properties:{id:{type:"string"},name:{type:"string"},status:{type:"string",enum:["Created","EditPending","Authorized","DepositAccountAdded","Approved","Rejected","Cancelled"]},fiat:{type:"string"},stablecoin:{type:"string"},depositAccount:{anyOf:[{type:"object",properties:{type:{type:"string"},iban:{type:["string","null"]},bic:{type:["string","null"]},accountNumber:{type:["string","null"]},routingNumber:{type:["string","null"]},bankName:{type:["string","null"]},bankAddress:{type:["string","null"]},recipientName:{type:["string","null"]}},required:["type","iban","bic","accountNumber","routingNumber","bankName","bankAddress","recipientName"],additionalProperties:!1},{type:"null"}]},walletAddress:{type:"string"},fees:{anyOf:[{type:"object",properties:{transactionFee:{type:"string",description:"e.g. '0.50%'"},bankingFee:{type:["string","null"],description:"e.g. '0.50 EUR (SEPA)'"},networkFee:{type:"string",description:"'subsidized' or 'charged'"}},required:["transactionFee","bankingFee","networkFee"],additionalProperties:!1},{type:"null"}]},legalDisclaimer:{type:"string"}},required:["id","name","status","fiat","stablecoin","depositAccount","walletAddress","fees","legalDisclaimer"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_onramp_update",description:"Update an existing onramp's destination wallet, chain, or stablecoin.",inputSchema:{$ref:"#/definitions/virtual-account_onramp_update_input",definitions:{"virtual-account_onramp_update_input":{type:"object",properties:{onrampId:{type:"string",description:"The ID of the onramp to update"},wallet:{type:["string","null"],description:"New destination wallet address (must be registered)"},chain:{anyOf:[{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","optimism","bnb","avalanche","tron","bitcoin"]},{type:"null"}],description:"New destination chain (solana, ethereum, polygon, arbitrum, base)"},stablecoin:{anyOf:[{type:"string",enum:["USDC","USDT","EURC"],description:"Stablecoin token code. USDC: USD Coin, USDT: Tether, EURC: Euro Coin"},{type:"null"}],description:"New destination stablecoin (USDC, USDT, EURC)"}},required:["onrampId","wallet","chain","stablecoin"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_onramp_update_output",definitions:{"virtual-account_onramp_update_output":{type:"object",properties:{id:{type:"string"},name:{type:"string"},status:{type:"string",enum:["Created","EditPending","Authorized","DepositAccountAdded","Approved","Rejected","Cancelled"]},fiat:{type:"string"},stablecoin:{type:"string"},depositAccount:{anyOf:[{type:"object",properties:{type:{type:"string"},iban:{type:["string","null"]},bic:{type:["string","null"]},accountNumber:{type:["string","null"]},routingNumber:{type:["string","null"]},bankName:{type:["string","null"]},bankAddress:{type:["string","null"]},recipientName:{type:["string","null"]}},required:["type","iban","bic","accountNumber","routingNumber","bankName","bankAddress","recipientName"],additionalProperties:!1},{type:"null"}]},walletAddress:{type:"string"},fees:{anyOf:[{type:"object",properties:{transactionFee:{type:"string",description:"e.g. '0.50%'"},bankingFee:{type:["string","null"],description:"e.g. '0.50 EUR (SEPA)'"},networkFee:{type:"string",description:"'subsidized' or 'charged'"}},required:["transactionFee","bankingFee","networkFee"],additionalProperties:!1},{type:"null"}]},legalDisclaimer:{type:"string"}},required:["id","name","status","fiat","stablecoin","depositAccount","walletAddress","fees","legalDisclaimer"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_retrieve",description:"Get your virtual account status",inputSchema:{$ref:"#/definitions/virtual-account_retrieve_input",definitions:{"virtual-account_retrieve_input":{type:"object",properties:{},additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_retrieve_output",definitions:{"virtual-account_retrieve_output":{type:"object",properties:{id:{type:"string"},email:{type:"string"},customerType:{type:"string",enum:["Person","Business"]},status:{type:"string",enum:["UserRequired","SigningsRequired","IdentificationRequired","Active","Suspended"]},nextStep:{type:["string","null"]}},required:["id","email","customerType","status","nextStep"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_transaction_list",description:"List fiat-to-stablecoin conversion transactions. Shows status, fiat amount sent, and stablecoin amount received for each conversion.",inputSchema:{$ref:"#/definitions/virtual-account_transaction_list_input",definitions:{"virtual-account_transaction_list_input":{type:"object",properties:{},additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_transaction_list_output",definitions:{"virtual-account_transaction_list_output":{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{id:{type:"string",description:"Transaction ID"},state:{type:"string",enum:["Pending","PayoutPending","Payout","PayoutCompleted","Completed","Failed","InAmlReview","AmlRejected","AmountRejected"],description:"Transaction state (e.g. pending, completed, failed)"},sourceAmount:{type:"string",description:"Fiat amount sent (e.g. '100.00 USD')"},destinationAmount:{type:"string",description:"Stablecoin amount received (e.g. '99.50 USDC')"},createdAt:{type:"string",format:"date-time",description:"Transaction creation timestamp"}},required:["id","state","sourceAmount","destinationAmount","createdAt"],additionalProperties:!1},description:"List of onramp conversion transactions"}},required:["items"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_wallet_list",description:"List wallets registered for the virtual account. Only registered wallets can receive onramp payouts.",inputSchema:{$ref:"#/definitions/virtual-account_wallet_list_input",definitions:{"virtual-account_wallet_list_input":{type:"object",properties:{},additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_wallet_list_output",definitions:{"virtual-account_wallet_list_output":{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{id:{type:"string"},address:{type:"string"},blockchain:{type:"string"}},required:["id","address","blockchain"],additionalProperties:!1},description:"List of registered wallets"}},required:["items"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"virtual-account_wallet_register",description:"Register a wallet by submitting a signed proof-of-ownership message. The wallet can then be used as a destination for onramp payouts.",inputSchema:{$ref:"#/definitions/virtual-account_wallet_register_input",definitions:{"virtual-account_wallet_register_input":{type:"object",properties:{wallet:{type:"string",description:"Wallet address to register"},message:{type:"string",description:"Proof-of-ownership verification message"},signature:{type:"string",description:"Signature of the message, signed by the wallet's private key"},chain:{type:"string",enum:["solana","ethereum","base","polygon","arbitrum","optimism","bnb","avalanche","tron","bitcoin"],description:"Blockchain for wallet registration (solana, ethereum, polygon, base, arbitrum)"}},required:["wallet","message","signature","chain"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/virtual-account_wallet_register_output",definitions:{"virtual-account_wallet_register_output":{type:"object",properties:{success:{type:"boolean",description:"Whether the operation was successful"}},required:["success"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}}];var Kt="https://www.moonpay.com/legal/terms_of_use_europe_hypermint",Gt="https://www.moonpay.com/legal/privacy_policy",Yt="https://swaps.xyz/terms",Ue=` Terms of Use: ${Kt}
|
|
3
3
|
Privacy Policy: ${Gt}
|
|
4
4
|
Swaps by: ${Yt}`;import*as Oe from"fs";import*as Le from"os";import*as We from"path";var p=e=>e,c=(e,t)=>({schema:e,handler:async i=>{let n=e.input.parse(i),r=await t(n);return e.output.parse(r)}});import{z as V}from"zod";var $e=p({name:"consent_check",description:"Check whether the MoonPay Terms of Use have been accepted. Throws if not accepted.",input:V.object({}),output:V.object({accepted:V.literal(!0),tosVersion:V.string(),acceptedAt:V.string()})});import*as B from"fs";import*as De from"os";import*as Be from"path";import*as Ne from"crypto";import{z as re}from"zod";var Re=p({name:"consent_accept",description:"Accept the MoonPay Terms of Use. Required before using any CLI command.",input:re.object({}),output:re.object({tosVersion:re.string(),acceptedAt:re.string()})});import*as oe from"os";var Ie=3e3;function Ee(e){let t=S(),i=JSON.stringify({agentId:e.agentId,tosVersion:e.tosVersion,cliVersion:e.cliVersion,nodeVersion:process.version,os:oe.platform(),arch:oe.arch()});fetch(`${t}/api/tools/cli_activation_create`,{method:"POST",headers:I(),body:i,signal:AbortSignal.timeout(Ie)}).catch(()=>{})}async function qe(e){let t=S(),i=await E();i&&fetch(`${t}/api/tools/cli_activation_update`,{method:"POST",headers:{...I(),Authorization:`Bearer ${i}`},body:JSON.stringify({agentId:e}),signal:AbortSignal.timeout(Ie)}).catch(()=>{})}var me=Be.join(De.homedir(),".config","moonpay","consent.json");function Jt(){try{return JSON.parse(B.readFileSync(me,"utf-8"))}catch{return null}}var se=c(Re,async()=>{ve();let t=Jt()?.agentId??Ne.randomUUID(),i=new Date().toISOString(),n={tosVersion:"1.2",acceptedAt:i,agentId:t},r=me+`.tmp.${process.pid}`;return B.writeFileSync(r,JSON.stringify(n,null,2),{encoding:"utf-8",mode:384}),B.renameSync(r,me),process.stderr.write(`
|
|
5
5
|
By using this CLI, you agree to:
|
|
@@ -21,7 +21,7 @@ Private key for "${t.name}" (${t.chain}):
|
|
|
21
21
|
`),process.stderr.write(` ${t.privateKey}
|
|
22
22
|
|
|
23
23
|
`)),{exported:!0}});import{createHash as ai}from"crypto";import{Keypair as si,VersionedTransaction as pi}from"@solana/web3.js";import{privateKeyToAccount as ci}from"viem/accounts";import{parseTransaction as di}from"viem";import{createPublicClient as ui,http as li}from"viem";import*as g from"viem/chains";import*as st from"tiny-secp256k1";import{z as K}from"zod";var at=p({name:"transaction_sign",description:"Sign a transaction with a local wallet. Supports Solana (VersionedTransaction), EVM (RLP-encoded), and Bitcoin (PSBT) transactions.",input:K.object({wallet:K.string().describe("Wallet name or address"),chain:m.describe("Chain: solana, ethereum, base, arbitrum, or bitcoin"),transaction:K.string().describe("Base64-encoded unsigned transaction")}),output:K.object({transaction:K.string().describe("Base64-encoded signed transaction")})});var mi={1:g.mainnet,137:g.polygon,42161:g.arbitrum,8453:g.base,10:g.optimism,56:g.bsc,43114:g.avalanche},yi={137:"https://polygon-bor-rpc.publicnode.com",42161:"https://arbitrum-one-rpc.publicnode.com",10:"https://optimism-rpc.publicnode.com",8453:"https://base-rpc.publicnode.com",56:"https://bsc-rpc.publicnode.com",43114:"https://avalanche-c-chain-rpc.publicnode.com"},T=c(at,async e=>{let t=b(e.wallet),i=e.chain,n=y[i],{privateKey:r}=D(t,i);switch(n){case"solana":return hi(r,e.transaction.trim());case"ethereum":return fi(r,e.transaction.trim());case"tron":return gi(r,e.transaction.trim());case"bitcoin":return bi(r,e.transaction.trim())}});function hi(e,t){let i=Buffer.from(t,"base64"),n=pi.deserialize(i),r=si.fromSecretKey(e);return n.sign([r]),{transaction:Buffer.from(n.serialize()).toString("base64")}}async function fi(e,t){let i=ci(`0x${Buffer.from(e).toString("hex")}`);if(t.startsWith("{")){let{to:a,data:s,value:d,chainId:f}=JSON.parse(t),u=mi[f]??g.mainnet,h=yi[f],C=ui({chain:u,transport:li(h)}),z=await C.getTransactionCount({address:i.address}),X=await C.estimateFeesPerGas(),Q=await C.estimateGas({account:i.address,to:a,data:s,value:BigInt(d??"0")});return{transaction:await i.signTransaction({to:a,data:s,value:BigInt(d??"0"),chainId:f,nonce:z,gas:Q,maxFeePerGas:X.maxFeePerGas,maxPriorityFeePerGas:X.maxPriorityFeePerGas,type:"eip1559"})}}let n=t.startsWith("0x")?t:`0x${Buffer.from(t,"base64").toString("hex")}`,r=di(n);return{transaction:await i.signTransaction(r)}}function gi(e,t){let i=Buffer.from(t.startsWith("0x")?t.slice(2):t,"hex"),n=ai("sha256").update(i).digest(),r=st.sign(n,e);if(!r)throw new Error("Tron transaction signing failed");return{transaction:Buffer.from(r).toString("hex")}}async function bi(e,t){let i=await import("bitcoinjs-lib"),n=(await import("ecpair")).default,r=await import("tiny-secp256k1"),a=n(r).fromPrivateKey(Buffer.from(e)),s=i.Psbt.fromBase64(t);return s.signAllInputs(a),s.finalizeAllInputs(),{transaction:s.toBase64()}}import{createHash as ct}from"crypto";import{Keypair as _i}from"@solana/web3.js";import Si from"bs58";import vi from"tweetnacl";import*as ye from"tiny-secp256k1";import{keccak_256 as ki}from"@noble/hashes/sha3";import{privateKeyToAccount as wi}from"viem/accounts";import{z as G}from"zod";var pt=p({name:"message_sign",description:"Sign a message with a local wallet. Supports Solana (ed25519), EVM (EIP-191 personal sign), and Bitcoin (secp256k1 ECDSA).",input:G.object({wallet:G.string().describe("Wallet address or name to sign with"),chain:m.describe("Chain: solana, ethereum, base, arbitrum, or bitcoin"),message:G.string().describe("Message text to sign")}),output:G.object({signature:G.string().describe("Signature: base58 for Solana, hex (0x-prefixed) for EVM/Bitcoin")})});var ce=c(pt,async e=>{let t=b(e.wallet),i=e.chain,n=y[i],{privateKey:r}=D(t,i),o=Buffer.from(e.message,"utf8");switch(n){case"solana":return Pi(r,o);case"ethereum":return ji(r,e.message);case"tron":return Ti(r,e.message);case"bitcoin":return Ci(r,o)}});function Pi(e,t){let i=_i.fromSecretKey(e),n=vi.sign.detached(t,i.secretKey);return{signature:Si.encode(n)}}async function ji(e,t){return{signature:await wi(`0x${Buffer.from(e).toString("hex")}`).signMessage({message:t})}}function Ti(e,t){let i=Buffer.from(t,"utf8"),n=Buffer.from(`TRON Signed Message:
|
|
24
|
-
${i.length}`,"utf8"),r=ki(Buffer.concat([n,i])),o=ye.sign(r,e);if(!o)throw new Error("Tron message signing failed");return{signature:"0x"+Buffer.from(o).toString("hex")}}function Ci(e,t){let i=ct("sha256").update(t).digest(),n=ct("sha256").update(i).digest(),r=ye.sign(n,e);if(!r)throw new Error("Bitcoin message signing failed");return{signature:"0x"+Buffer.from(r).toString("hex")}}import Ai from"https";import{z as v}from"zod";var dt=p({name:"bitcoin_balance_retrieve",description:"Get the BTC balance of a Bitcoin address. Returns confirmed and unconfirmed balances in BTC and satoshis.",input:v.object({wallet:v.string().describe("Bitcoin address (bc1...) or wallet name")}),output:v.object({address:v.string().describe("Bitcoin address"),confirmed:v.object({btc:v.string().describe("Confirmed balance in BTC"),sats:v.number().describe("Confirmed balance in satoshis")}),unconfirmed:v.object({btc:v.string().describe("Unconfirmed (pending) balance in BTC"),sats:v.number().describe("Unconfirmed (pending) balance in satoshis")}),total:v.object({btc:v.string().describe("Total balance in BTC"),sats:v.number().describe("Total balance in satoshis")})})});var xi=1e8;function he(e){return(e/xi).toFixed(8)}function Ui(e){return new Promise((t,i)=>{Ai.get(e,{headers:{"User-Agent":"moonpay-cli"}},n=>{if(n.statusCode!==200){i(new Error(`HTTP ${n.statusCode} from ${e}`)),n.resume();return}let r="";n.on("data",o=>r+=o),n.on("end",()=>{try{t(JSON.parse(r))}catch{i(new Error("Invalid JSON response"))}})}).on("error",i)})}var ut=c(dt,async e=>{let t=e.wallet;if(!t.startsWith("bc1")&&!t.startsWith("1")&&!t.startsWith("3")){let{findWalletOrThrow:a}=await import("./store-
|
|
24
|
+
${i.length}`,"utf8"),r=ki(Buffer.concat([n,i])),o=ye.sign(r,e);if(!o)throw new Error("Tron message signing failed");return{signature:"0x"+Buffer.from(o).toString("hex")}}function Ci(e,t){let i=ct("sha256").update(t).digest(),n=ct("sha256").update(i).digest(),r=ye.sign(n,e);if(!r)throw new Error("Bitcoin message signing failed");return{signature:"0x"+Buffer.from(r).toString("hex")}}import Ai from"https";import{z as v}from"zod";var dt=p({name:"bitcoin_balance_retrieve",description:"Get the BTC balance of a Bitcoin address. Returns confirmed and unconfirmed balances in BTC and satoshis.",input:v.object({wallet:v.string().describe("Bitcoin address (bc1...) or wallet name")}),output:v.object({address:v.string().describe("Bitcoin address"),confirmed:v.object({btc:v.string().describe("Confirmed balance in BTC"),sats:v.number().describe("Confirmed balance in satoshis")}),unconfirmed:v.object({btc:v.string().describe("Unconfirmed (pending) balance in BTC"),sats:v.number().describe("Unconfirmed (pending) balance in satoshis")}),total:v.object({btc:v.string().describe("Total balance in BTC"),sats:v.number().describe("Total balance in satoshis")})})});var xi=1e8;function he(e){return(e/xi).toFixed(8)}function Ui(e){return new Promise((t,i)=>{Ai.get(e,{headers:{"User-Agent":"moonpay-cli"}},n=>{if(n.statusCode!==200){i(new Error(`HTTP ${n.statusCode} from ${e}`)),n.resume();return}let r="";n.on("data",o=>r+=o),n.on("end",()=>{try{t(JSON.parse(r))}catch{i(new Error("Invalid JSON response"))}})}).on("error",i)})}var ut=c(dt,async e=>{let t=e.wallet;if(!t.startsWith("bc1")&&!t.startsWith("1")&&!t.startsWith("3")){let{findWalletOrThrow:a}=await import("./store-2M5LQICI.js"),d=a(t).addresses.bitcoin;if(!d)throw new Error(`Wallet "${t}" has no Bitcoin address. It may be an imported single-chain wallet.`);t=d}let i=await Ui(`https://mempool.space/api/address/${encodeURIComponent(t)}`),n=i.chain_stats.funded_txo_sum-i.chain_stats.spent_txo_sum,r=i.mempool_stats.funded_txo_sum-i.mempool_stats.spent_txo_sum,o=n+r;return{address:t,confirmed:{btc:he(n),sats:n},unconfirmed:{btc:he(r),sats:r},total:{btc:he(o),sats:o}}});import{readdirSync as $i,readFileSync as lt,existsSync as fe,mkdirSync as Ri,cpSync as Ii}from"fs";import{join as W,dirname as Ei}from"path";import{homedir as qi}from"os";import{fileURLToPath as Di}from"url";function ge(){let e=Di(import.meta.url),t=Ei(e);return W(t,"..","skills")}function Bi(){return W(qi(),".claude","skills")}function be(){let e=ge();return fe(e)?$i(e,{withFileTypes:!0}).filter(t=>t.isDirectory()&&t.name.startsWith("moonpay-")).map(t=>{let n=lt(W(e,t.name,"SKILL.md"),"utf-8").match(/^description:\s*(.+)$/m);return{name:t.name,description:n?.[1]?.replace(/^["']|["']$/g,"")??""}}).sort((t,i)=>t.name.localeCompare(i.name)):[]}function mt(e){if(/[/\\]|\.\./.test(e))throw new Error(`Invalid skill name: "${e}"`);let t=W(ge(),e,"SKILL.md");if(!fe(t))throw new Error(`Skill "${e}" not found. Run \`mp skill list\` to see available skills.`);return lt(t,"utf-8")}function yt(e,t){let i=ge(),n=t??Bi(),r=be();return Ri(n,{recursive:!0}),r.map(o=>{let a=W(n,o.name);return fe(a)&&!e?{name:o.name,installed:!1}:(Ii(W(i,o.name),a,{recursive:!0,force:!0}),{name:o.name,installed:!0})})}import{z as Y}from"zod";var ht=p({name:"skill_list",description:"List available AI skills for Claude Code and other agents",input:Y.object({}),output:Y.array(Y.object({name:Y.string(),description:Y.string()}))});var ft=c(ht,async()=>be());import{z as J}from"zod";var gt=p({name:"skill_retrieve",description:"Get the full instructions for a specific skill",input:J.object({name:J.string().describe("Skill name (e.g. moonpay-swap-tokens)")}),output:J.object({name:J.string(),content:J.string()})});var bt=c(gt,async e=>({name:e.name,content:mt(e.name)}));import{z as $}from"zod";var _t=p({name:"skill_install",description:"Install AI skills for Claude Code. Defaults to ~/.claude/skills/, or specify --dir for a custom location (e.g. project-local, ~/.agents/skills).",input:$.object({force:$.boolean().describe("Overwrite existing skills"),dir:$.string().nullable().describe("Target directory to install skills into (default: ~/.claude/skills/)")}),output:$.array($.object({name:$.string(),installed:$.boolean()}))});var St=c(_t,async e=>yt(e.force,e.dir??void 0));import{encodeFunctionData as Ni}from"viem";import{z as w}from"zod";var vt=p({name:"token_bridge",description:"Bridge tokens across chains. Builds, signs locally, broadcasts, and registers.",input:w.object({from:w.object({wallet:w.string().describe("Local wallet name to sign with"),chain:m.describe("Source chain"),token:w.string().describe("Source token address"),amount:w.coerce.number().nullable().describe("Amount to send (exact-in). Null for exact-out.")}),to:w.object({wallet:w.string().nullable().describe("Destination wallet name or address (defaults to from wallet)"),chain:m.describe("Destination chain"),token:w.string().describe("Destination token address"),amount:w.coerce.number().nullable().describe("Amount to receive (exact-out). Null for exact-in.")})}),output:w.object({signature:w.string().describe("Transaction hash/signature"),message:w.string().describe("Human-readable bridge description")})});var Oi=[{name:"approve",type:"function",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}],de=c(vt,async e=>{if(!e.from.amount&&!e.to.amount)throw new Error("Provide either from.amount or to.amount.");let t=S(),i=await k.handler({wallet:e.from.wallet}),n=i.addresses[y[e.from.chain]];if(!n)throw new Error(`Wallet "${i.name}" has no address on ${e.from.chain}.`);let r=n;if(e.to.wallet)try{r=(await k.handler({wallet:e.to.wallet})).addresses[y[e.to.chain]]??e.to.wallet}catch{r=e.to.wallet}else e.from.chain!==e.to.chain&&(r=i.addresses[y[e.to.chain]]??n);let o={from:{wallet:n,chain:e.from.chain,token:e.from.token,amount:e.from.amount},to:{wallet:r,chain:e.to.chain,token:e.to.token,amount:e.to.amount}},a=await l(t,"swaps_transaction_build",o),s=a.transaction;if(a.requiresApproval&&"to"in s){let{to:h,chainId:C}=s,z={type:"evm",to:e.from.token,data:Ni({abi:Oi,functionName:"approve",args:[h,BigInt(a.amountIn.raw)]}),value:"0",chainId:C},{transaction:X}=await T.handler({wallet:i.name,chain:e.from.chain,transaction:JSON.stringify(z)}),Q=await l(t,"transaction_send",{transaction:X,message:`Approve ${a.amountIn.symbol}`,chain:e.from.chain});if(!Q.signature)throw new Error(`Approval failed: ${Q.message}`);process.stderr.write(`Approval sent. Waiting for confirmation...
|
|
25
25
|
`),await new Promise(_e=>setTimeout(_e,5e3)),a=await l(t,"swaps_transaction_build",o)}let d="base64"in a.transaction?a.transaction.base64:JSON.stringify(a.transaction),{transaction:f}=await T.handler({wallet:i.name,chain:e.from.chain,transaction:d}),u=await l(t,"transaction_send",{transaction:f,message:a.message,chain:e.from.chain});if(!u.signature)throw new Error(`Transaction send failed: ${u.message}`);try{await l(t,"transaction_register",{transactionId:a.transactionId,transactionHash:u.signature,chain:e.from.chain})}catch{}return{signature:u.signature,message:a.message}});import{z as P}from"zod";var kt=p({name:"token_swap",description:"Swap tokens on the same chain. Builds, signs locally, broadcasts, and registers.",input:P.object({wallet:P.string().describe("Local wallet name to sign with"),chain:m.describe("Chain to swap on"),from:P.object({token:P.string().describe("Input token address (selling)"),amount:P.coerce.number().nullable().describe("Amount to sell (exact-in). Null for exact-out.")}),to:P.object({token:P.string().describe("Output token address (buying)"),amount:P.coerce.number().nullable().describe("Amount to receive (exact-out). Null for exact-in.")})}),output:P.object({signature:P.string().describe("Transaction hash/signature"),message:P.string().describe("Human-readable swap description")})});var wt=c(kt,async e=>de.handler({from:{wallet:e.wallet,chain:e.chain,token:e.from.token,amount:e.from.amount},to:{wallet:null,chain:e.chain,token:e.to.token,amount:e.to.amount}}));import{z as A}from"zod";var Pt=p({name:"token_transfer",description:"Transfer tokens to another wallet on the same chain. Builds, signs locally, and broadcasts.",input:A.object({wallet:A.string().describe("Local wallet name to sign with"),chain:m.describe("Chain to transfer on"),token:A.string().describe("Token address to transfer"),amount:A.coerce.number().describe("Amount to transfer"),to:A.string().describe("Recipient wallet name or address")}),output:A.object({signature:A.string().describe("Transaction hash/signature"),message:A.string().describe("Human-readable transfer description")})});var jt=c(Pt,async e=>{let t=S(),i=await k.handler({wallet:e.wallet}),n=i.addresses[y[e.chain]];if(!n)throw new Error(`Wallet "${i.name}" has no address on ${e.chain}.`);let r=e.to;try{r=(await k.handler({wallet:e.to})).addresses[y[e.chain]]??e.to}catch{}let o=await l(t,"token_transfer",{wallet:n,token:e.token,to:r,amount:e.amount,chain:e.chain}),a="base64"in o.transaction?o.transaction.base64:JSON.stringify(o.transaction),{transaction:s}=await T.handler({wallet:i.name,chain:e.chain,transaction:a}),d=await l(t,"transaction_send",{transaction:s,message:o.message,chain:e.chain});if(!d.signature)throw new Error(`Transaction send failed: ${d.message}`);return{signature:d.signature,message:o.message}});import{Keypair as Li,VersionedTransaction as Wi,VersionedMessage as Hi}from"@solana/web3.js";import Ct from"axios";import{wrapAxiosWithPayment as At}from"@x402/axios";import{x402Client as xt}from"@x402/core/client";import{ExactSvmScheme as Fi}from"@x402/svm";import{registerExactEvmScheme as zi}from"@x402/evm/exact/client";import{toClientEvmSigner as Mi}from"@x402/evm";import{privateKeyToAccount as Vi}from"viem/accounts";import{createPublicClient as Ki,http as Gi}from"viem";import*as j from"viem/chains";import{z as _}from"zod";var Tt=p({name:"x402_request",description:"Make an HTTP request to an x402-protected endpoint. Automatically handles payment when a 402 Payment Required response is received, signing the payment transaction with the local wallet.",input:_.object({method:_.enum(["GET","POST","PUT","PATCH","DELETE"]).describe("HTTP method"),url:_.string().url().refine(e=>e.startsWith("https://"),{message:"URL must use HTTPS"}).refine(e=>{try{return!new URL(e).hostname.match(/^(localhost|127\.|10\.|172\.(1[6-9]|2\d|3[01])\.|192\.168\.|169\.254\.|0\.0\.0\.0|\[::1\])/)}catch{return!1}},{message:"URL must not target private/internal addresses"}).describe("Full HTTPS URL of the x402-protected endpoint (e.g., 'https://agents.moonpay.com/x402/upgrade')"),body:_.record(_.any()).nullable().describe("Request body (for POST, PUT, PATCH)"),params:_.record(_.any()).nullable().describe("Query parameters"),wallet:_.string().describe("Wallet name or address to pay with"),chain:_.enum(["solana","base","ethereum","arbitrum","polygon","optimism"]).nullable().describe("Chain to pay from (default: solana). Use an EVM chain like 'base' to pay with an EVM wallet.")}),output:_.object({status:_.number().describe("HTTP status code"),data:_.any().describe("Response data"),headers:_.record(_.any()).describe("Response headers")})});var Yi="solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",Ji={ethereum:j.mainnet,base:j.base,polygon:j.polygon,arbitrum:j.arbitrum,optimism:j.optimism};function Zi(e,t){let i=Li.fromSecretKey(t),n={address:e,signTransactions:async a=>a.map(s=>{let d=new Uint8Array(s.messageBytes),f=Hi.deserialize(d),u=Object.keys(s.signatures).length,h=new Wi(f,new Array(u).fill(new Uint8Array(64)));h.sign([i]);let C=f.staticAccountKeys.findIndex(z=>z.toBase58()===e);if(C===-1)throw new Error(`Wallet ${e} is not a signer for this transaction`);return{[e]:h.signatures[C]}})},r=new xt,o=new Fi(n);return r.register(Yi,o),r.registerV1("solana",o),At(Ct.create(),r)}function Xi(e,t){let i=Vi(`0x${Buffer.from(e).toString("hex")}`),n=Ji[t]??j.base,r=Ki({chain:n,transport:Gi()}),o=Mi(i,r),a=new xt;return zi(a,{signer:o}),At(Ct.create(),a)}var ue=c(Tt,async({method:e,url:t,body:i,params:n,wallet:r,chain:o})=>{let a=b(r),s=o??"solana",{privateKey:d,address:f}=D(a,s),u=s==="solana"?Zi(f,d):Xi(d,s),h;switch(e){case"GET":h=await u.get(t,{params:n});break;case"POST":h=await u.post(t,i||{},{params:n});break;case"PUT":h=await u.put(t,i||{},{params:n});break;case"PATCH":h=await u.patch(t,i||{},{params:n});break;case"DELETE":h=await u.delete(t,{params:n});break;default:throw new Error(`Unsupported HTTP method: ${e}`)}return{status:h.status,data:h.data,headers:h.headers}});import{z as H}from"zod";var Ut=p({name:"virtual-account_wallet_register",description:"Register a local wallet with your virtual account. Creates the verification message, signs it locally, and registers in one step.",input:H.object({wallet:H.string().describe("Local wallet name"),chain:m.describe("Chain to register (solana, ethereum, etc.)")}),output:H.object({success:H.literal(!0),address:H.string().describe("Registered wallet address"),chain:H.string().describe("Chain registered on")})});function Qi(e,t){let i=new Date,n=`${String(i.getUTCDate()).padStart(2,"0")}/${String(i.getUTCMonth()+1).padStart(2,"0")}/${i.getUTCFullYear()}`;return`I am verifying ownership of the wallet address ${e} as customer ${t}. This message was signed on ${n} to confirm my control over this wallet.`}var $t=c(Ut,async e=>{let t=S(),i=e.chain,[n,r]=await Promise.all([k.handler({wallet:e.wallet}),l(t,"virtual-account_retrieve",{})]),o=y[i],a=n.addresses[o];if(!a)throw new Error(`Wallet "${n.name}" has no ${o} address.`);let s=Qi(a,r.id),{signature:d}=await ce.handler({wallet:n.name,chain:i,message:s});return await l(t,"virtual-account_wallet_register",{wallet:a,message:s,signature:d,chain:i}),{success:!0,address:a,chain:i}});import{z as R}from"zod";var Rt=p({name:"virtual-account_offramp_initiate",description:"Send stablecoin to an approved offramp. Builds the transfer, signs locally, and broadcasts.",input:R.object({wallet:R.string().describe("Local wallet name to sign with"),offrampId:R.string().describe("The ID of the approved offramp"),amount:R.coerce.number().describe("Amount of stablecoin to send")}),output:R.object({signature:R.string().describe("Transaction hash/signature"),message:R.string().describe("Human-readable transfer description")})});var en={Solana:"solana",Ethereum:"ethereum",Polygon:"polygon",Base:"base",Arbitrum:"arbitrum"},It=c(Rt,async e=>{let t=S(),i=await k.handler({wallet:e.wallet}),r=(await l(t,"virtual-account_offramp_retrieve",{offrampId:e.offrampId})).source_currencies[0];if(!r||r.type!=="Crypto")throw new Error("Offramp does not have a valid crypto source currency.");let o=en[r.blockchain];if(!o)throw new Error(`Unsupported blockchain "${r.blockchain}".`);let a=i.addresses[y[o]];if(!a)throw new Error(`Wallet "${i.name}" has no address on ${o}.`);let s=await l(t,"virtual-account_offramp_initiate",{wallet:a,offrampId:e.offrampId,amount:e.amount}),d="base64"in s.transaction?s.transaction.base64:JSON.stringify(s.transaction),{transaction:f}=await T.handler({wallet:i.name,chain:o,transaction:d}),u=await l(t,"transaction_send",{transaction:f,message:s.message,chain:o});if(!u.signature)throw new Error(`Transaction send failed: ${u.message}`);return{signature:u.signature,message:s.message}});import{z as Z}from"zod";var Et=p({name:"login",description:"Generate a sign-in link. Open it in a browser to get a verification code, then use `mp verify` to complete login.",input:Z.object({email:Z.string().describe("Email address")}),output:Z.object({email:Z.string(),message:Z.string()})});var qt=c(Et,async e=>{let{baseUrl:t}=ee(),i=`${t}/login?email=${encodeURIComponent(e.email)}`;return{email:e.email,message:`Open this link to verify:
|
|
26
26
|
|
|
27
27
|
${i}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
process.noDeprecation = true; import { createRequire as __createRequire } from "module"; const require = __createRequire(import.meta.url);
|
|
3
|
-
import{a as R,b as S,c as T,d as j,e as k}from"./chunk-
|
|
3
|
+
import{a as R,b as S,c as T,d as j,e as k}from"./chunk-W2EYNHPI.js";import{a as _,h as A,n as v,u as J}from"./chunk-SOCI4BW2.js";import{Command as ne}from"commander";var Y=!process.env.NO_COLOR&&process.stdout.isTTY===!0;function $(e){return t=>Y?`${e}${t}\x1B[0m`:t}var p={bold:$("\x1B[1m"),dim:$("\x1B[2m"),green:$("\x1B[32m"),yellow:$("\x1B[33m"),cyan:$("\x1B[36m"),red:$("\x1B[31m")};function N(e){if(e==null)return!0;let t=typeof e;return t==="string"||t==="number"||t==="boolean"}function w(e){return e==null?"-":String(e)}function C(e,t=0){let n=" ".repeat(t);return N(e)?`${n}${w(e)}`:Array.isArray(e)?e.length===0?`${n}${p.dim("(empty)")}`:e.every(N)?e.map(r=>`${n}- ${w(r)}`).join(`
|
|
4
4
|
`):e.map(r=>{if(typeof r!="object"||r===null)return`${n}- ${w(r)}`;let o=Object.entries(r),a=[],[c,f]=o[0];N(f)?a.push(`${n}- ${p.bold(c)}: ${w(f)}`):(a.push(`${n}- ${p.bold(c)}:`),a.push(C(f,t+2)));for(let[m,y]of o.slice(1))N(y)?a.push(`${n} ${p.bold(m)}: ${w(y)}`):(a.push(`${n} ${p.bold(m)}:`),a.push(C(y,t+2)));return a.join(`
|
|
5
5
|
`)}).join(`
|
|
6
6
|
|
|
@@ -14,5 +14,5 @@ ${C(a,t+1)}`).join(`
|
|
|
14
14
|
|
|
15
15
|
Run \`mp skill install\` to install AI skills for Claude Code.
|
|
16
16
|
|
|
17
|
-
`+T).version(_).option("--json","Output as JSON instead of YAML");function re(){return h.opts().json?"json":"yaml"}function D(e){console.log(F(e,re()))}function U(){let e=te();e&&process.stderr.write(e)}h.command("mcp").description("Start MCP server over stdio (for Claude Desktop, Claude Code, etc.)").action(async()=>{let{startMcpServer:e}=await import("./mcp-
|
|
17
|
+
`+T).version(_).option("--json","Output as JSON instead of YAML");function re(){return h.opts().json?"json":"yaml"}function D(e){console.log(F(e,re()))}function U(){let e=te();e&&process.stderr.write(e)}h.command("mcp").description("Start MCP server over stdio (for Claude Desktop, Claude Code, etc.)").action(async()=>{let{startMcpServer:e}=await import("./mcp-53HG424B.js");await e()});function M(e,t){let n=e;for(let r of t){let o=n.commands.find(a=>a.name()===r);o||(o=n.command(r)),n=o}return n}function Z(e,t=""){let n=[];for(let[r,o]of Object.entries(e)){let a=t?`${t}-${r}`:r,c=o;for(;c._def.typeName==="ZodEffects";)c=c._def.schema;let f=c;f._def.typeName==="ZodNullable"&&(f=f._def.innerType),f._def.typeName==="ZodObject"&&f.shape?n.push(...Z(f.shape,a)):n.push({flatKey:a,field:o,path:a.split("-")})}return n}function oe(e,t){let n={};for(let{flatKey:r,path:o}of t){let a=r.replace(/-([a-z])/g,(f,m)=>m.toUpperCase()),c=a in e?e[a]:e[r];if(o.length===1)n[o[0]]=c;else{let f=n;for(let m=0;m<o.length-1;m++)(!f[o[m]]||typeof f[o[m]]!="object")&&(f[o[m]]={}),f=f[o[m]];f[o[o.length-1]]=c}}return n}function se(e,t){for(let n of t){let r=n.schema.name.split("_"),o=r.pop(),c=M(e,r).command(o).description(n.schema.description),f=n.schema.input.shape??{},m=Z(f),y=[],b=[],O=[];for(let{flatKey:u,field:i}of m){let s=i.description??u,l=i;for(;l._def.typeName==="ZodEffects";)l=l._def.schema;let g=l._def.typeName,d=l;d._def.typeName==="ZodNullable"&&(d=d._def.innerType),d._def.typeName==="ZodNumber"&&b.push(u),d._def.typeName==="ZodRecord"&&O.push(u),g==="ZodBoolean"?c.option(`--${u}`,s,!1):g==="ZodNullable"?(c.option(`--${u} <${u}>`,s),y.push(u)):c.requiredOption(`--${u} <${u}>`,s)}c.action(async u=>{n.schema.name.startsWith("consent_")||await j.handler({});for(let s of y){let l=s.replace(/-([a-z])/g,(g,d)=>d.toUpperCase());u[l]===void 0&&(u[l]=null)}for(let s of b){let l=s.replace(/-([a-z])/g,(g,d)=>d.toUpperCase());u[l]!=null&&typeof u[l]=="string"&&(u[l]=Number(u[l]))}for(let s of O){let l=s.replace(/-([a-z])/g,(g,d)=>d.toUpperCase());if(typeof u[l]=="string")try{u[l]=JSON.parse(u[l])}catch{console.error(`Invalid JSON for --${s}`),process.exit(1)}}let i=oe(u,m);try{let s=await n.handler(i);D(s)}catch(s){console.error(s.message),process.exit(1)}})}}function ie(e){if(e.$ref&&e.definitions){let t=e.$ref.replace("#/definitions/","");return e.definitions[t]}return e}function ae(e){return Array.isArray(e.type)?e.type.includes("null"):e.anyOf?e.anyOf.some(t=>t.type==="null"):!1}function ce(e){return Array.isArray(e.type)?e.type.includes("object"):e.anyOf?e.anyOf.some(t=>t.type==="object"):e.type==="object"}function le(e){return Array.isArray(e.type)?e.type.some(t=>t==="number"||t==="integer"):e.anyOf?e.anyOf.some(t=>t.type==="number"||t.type==="integer"):e.type==="number"||e.type==="integer"}function fe(e){let t=e.wallet,n=e.chain;if(typeof t!="string"||typeof n!="string")return;let r=J(t);if(!r)return;let o=v[n];if(!o)return;let a=r.addresses[o];a&&(e.wallet=a)}var q=new Set(["swaps_transaction_build","token_transfer","transaction_register","virtual-account_offramp_initiate"]);function ue(e,t){for(let n of t){if(q.has(n.name))continue;let r=n.name.split("_"),o=r.pop(),a=M(e,r);if(a.commands.find(i=>i.name()===o))continue;let c=a.command(o).description(n.description),f=ie(n.inputSchema),m=f.properties??{},y=new Set(f.required??[]),b=[],O=[],u=[];for(let[i,s]of Object.entries(m)){let l=s.description??i,g=ae(s),d=ce(s);le(s)&&O.push(i),d?(u.push(i),y.has(i)&&!g?c.requiredOption(`--${i} <json>`,`${l} (as JSON)`):(c.option(`--${i} <json>`,`${l} (as JSON)`),b.push(i))):g||!y.has(i)?(c.option(`--${i} <${i}>`,l),b.push(i)):c.requiredOption(`--${i} <${i}>`,l)}c.action(async i=>{await j.handler({});for(let s of b)i[s]===void 0&&(i[s]=null);for(let s of O)i[s]!=null&&typeof i[s]=="string"&&(i[s]=Number(i[s]));for(let s of u)if(typeof i[s]=="string")try{i[s]=JSON.parse(i[s])}catch{console.error(`Invalid JSON for --${s}`),process.exit(1)}try{fe(i);let s=A(),l=await R(s,n.name,i);D(l),U()}catch(s){console.error(s.message),process.exit(1)}})}}se(h,k);ue(h,S);h.command("tools").description("List available tools").action(()=>{let e=[...k.map(n=>({name:n.schema.name,description:n.schema.description})),...S.filter(n=>!k.some(r=>r.schema.name===n.name)&&!q.has(n.name)).map(n=>({name:n.name,description:n.description}))].sort((n,r)=>n.name.localeCompare(r.name)),t=[];for(let n of e){let r=n.name.replace(/_/g," ");t.push(` ${p.green(r.padEnd(28))} ${p.dim(n.description)}`)}t.push(""),t.push(p.dim(`${e.length} tools`)),console.log(t.join(`
|
|
18
18
|
`)),U()});h.parse();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
process.noDeprecation = true; import { createRequire as __createRequire } from "module"; const require = __createRequire(import.meta.url);
|
|
2
|
-
import{a as d,b as y,e as l}from"./chunk-
|
|
2
|
+
import{a as d,b as y,e as l}from"./chunk-W2EYNHPI.js";import{a as u,h as f}from"./chunk-SOCI4BW2.js";import{Server as x}from"@modelcontextprotocol/sdk/server/index.js";import{StdioServerTransport as N}from"@modelcontextprotocol/sdk/server/stdio.js";import{CallToolRequestSchema as T,ListToolsRequestSchema as v}from"@modelcontextprotocol/sdk/types.js";import{zodToJsonSchema as q}from"zod-to-json-schema";var h=new Map(l.map(s=>[s.schema.name,s]));function A(s){let n=s.inputSchema;if(n.$ref&&n.definitions){let c=n.$ref.replace("#/definitions/","");return n.definitions[c]??n}return n}async function J(){let s=new x({name:"moonpay",version:u},{capabilities:{tools:{listChanged:!0}}}),n=l.map(e=>({name:e.schema.name,description:e.schema.description,inputSchema:q(e.schema.input)})),c=new Map;for(let e of y){if(h.has(e.name))continue;let t=A(e);c.set(e.name,t.properties??{}),n.push({name:e.name,description:e.description,inputSchema:{type:"object",properties:t.properties??{},...t.required?{required:t.required}:{},...t.additionalProperties!==void 0?{additionalProperties:t.additionalProperties}:{}}})}let g=new Map(n.map(e=>[e.name,e]));s.setRequestHandler(v,async()=>({tools:n.map(e=>({name:e.name,description:e.description,inputSchema:e.inputSchema}))})),s.setRequestHandler(T,async e=>{let{name:t,arguments:o={}}=e.params;if(!g.has(t))return{content:[{type:"text",text:`Unknown tool: ${t}`}],isError:!0};try{let i=h.get(t);if(i){let p=i.schema.input.shape??{};for(let[m,a]of Object.entries(p))o[m]===void 0&&a._def.typeName==="ZodNullable"&&(o[m]=null);let r=await i.handler(o);return{content:[{type:"text",text:JSON.stringify(r,null,2)}]}}let b=c.get(t)??{};for(let[p,r]of Object.entries(b))o[p]===void 0&&(Array.isArray(r.type)?r.type.includes("null"):r.anyOf?.some(R=>R.type==="null"))&&(o[p]=null),(r.type==="number"||r.type==="integer"||Array.isArray(r.type)&&r.type.some(a=>a==="number"||a==="integer")||r.anyOf?.some(a=>a.type==="number"||a.type==="integer"))&&typeof o[p]=="string"&&(o[p]=Number(o[p]));let w=f(),O=await d(w,t,o);return{content:[{type:"text",text:JSON.stringify(O,null,2)}]}}catch(i){return{content:[{type:"text",text:i instanceof Error?i.message:String(i)}],isError:!0}}});let S=new N;await s.connect(S)}export{J as startMcpServer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
process.noDeprecation = true; import { createRequire as __createRequire } from "module"; const require = __createRequire(import.meta.url);
|
|
2
|
-
import{r as a,s as b,t as c,u as d,v as e,w as f,x as g,y as h}from"./chunk-
|
|
2
|
+
import{r as a,s as b,t as c,u as d,v as e,w as f,x as g,y as h}from"./chunk-SOCI4BW2.js";export{f as addWallet,d as findWallet,e as findWalletOrThrow,a as loadWallets,c as mutateWallets,g as removeWallet,h as resolveSigningKey,b as saveWallets};
|