@moonpay/cli 1.19.2 → 1.20.0
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.
- package/dist/{chunk-FM624H22.js → chunk-3LPYWKSN.js} +1 -1
- package/dist/chunk-HOJ22YH6.js +48 -0
- package/dist/{chunk-JTOORRPH.js → chunk-HVFK62K4.js} +2 -2
- package/dist/{chunk-SEOEJZOL.js → chunk-LERBZNUD.js} +1 -1
- package/dist/chunk-NEEVAGFO.js +797 -0
- package/dist/{chunk-6GZMLNTX.js → chunk-VYM5A4O4.js} +1 -1
- package/dist/{client-LENSTDQC.js → client-42E5L4GY.js} +1 -1
- package/dist/{client-LXUOUNXB.js → client-EY2ZLUVZ.js} +1 -1
- package/dist/{client-6KGPWL4L.js → client-LTVHDRFS.js} +1 -1
- package/dist/{esm-E5BS3UKK.js → esm-RDAITU6G.js} +1 -1
- package/dist/{esm-L7XME6SN.js → esm-UGHAPFP3.js} +1 -1
- package/dist/index.js +2 -2
- package/dist/{ledger-JTKQBVZB.js → ledger-VU3WR7HI.js} +2 -2
- package/dist/{mcp-3H4GXB3U.js → mcp-XSGEOV7I.js} +1 -1
- package/dist/{store-4EWYEVJI.js → store-RQ6SKDSE.js} +1 -1
- package/package.json +1 -1
- package/dist/chunk-GMOHSRCJ.js +0 -48
- package/dist/chunk-RR34RWPO.js +0 -797
- /package/dist/{chunk-JLT4XDAY.js → chunk-3CY3FTW6.js} +0 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
process.noDeprecation = true; import { createRequire as __createRequire } from "module"; const require = __createRequire(import.meta.url);
|
|
2
|
+
import{a as Ue,b as u,c as Le}from"./chunk-VYM5A4O4.js";import{a as Me,b as x,c as Ce,d as be,e as He,i as We,j as ze,k as Fe,l as Ve,n as _,o as Ge,p as Ke,q as Je,r as Ye,s as Qe,t as _e,u as q,v as Ze,w as pe}from"./chunk-HVFK62K4.js";import{e as Re,f as Ie,g as Ee,h as Oe,i as fe,k as Ne,l as Be,m as ce,o as ge,p as Y}from"./chunk-3LPYWKSN.js";var Yr=[{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","eth","eth_arbitrum","eth_base","eth_optimism","eth_polygon","pol_polygon","pyusd","pyusd_sol","rlusd","sol","trx","usdc","usdc_arbitrum","usdc_base","usdc_cchain","usdc_optimism","usdc_polygon","usdc_sol","usdt","usdt_arbitrum","usdt_bsc","usdt_optimism","usdt_polygon","usdt_sol","usdt_ton","usdt_trx"],description:"MoonPay currency code: sol, eth, btc, trx, usdc, usdc_sol, usdc_base, usdc_arbitrum, usdc_optimism, usdc_polygon, usdc_cchain, usdt, usdt_sol, usdt_trx, usdt_ton, usdt_bsc, usdt_arbitrum, usdt_optimism, usdt_polygon, pyusd, pyusd_sol, rlusd"},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:"chain_list",description:"List all supported blockchain chains with their metadata, optionally filtered by testnet status or VM type",inputSchema:{$ref:"#/definitions/chain_list_input",definitions:{chain_list_input:{type:"object",properties:{testnet:{type:["boolean","null"],description:"Filter by testnet status. Null returns all chains"},vmId:{anyOf:[{type:"string",enum:["solana","evm","alt-vm"]},{type:"null"}],description:"Filter by virtual machine type. Null returns all chains"}},required:["testnet","vmId"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/chain_list_output",definitions:{chain_list_output:{type:"object",properties:{chains:{type:"array",items:{type:"object",properties:{name:{type:"string",description:"Chain identifier (e.g. 'solana', 'ethereum')"},displayName:{type:"string",description:"Human-readable chain name"},id:{type:"number",description:"Numeric chain ID"},vmId:{type:"string",enum:["solana","evm","alt-vm"],description:"Virtual machine type"},keyFamily:{type:"string",enum:["evm","solana","bitcoin","tron","ton","filecoin"],description:"Signing key family"},testnet:{type:"boolean",description:"Whether this is a testnet"},mainnet:{type:["string","null"],description:"Mainnet chain name if testnet, null otherwise"},explorer:{type:"string",description:"Block explorer base URL"},explorerTxPath:{type:"string",description:"Explorer path template for transactions (use {hash})"},explorerAccountPath:{type:"string",description:"Explorer path template for accounts (use {address})"},addressRegex:{type:"string",description:"Regex pattern for validating wallet addresses"},providers:{type:"object",properties:{alchemy:{type:["string","null"],description:"Alchemy RPC subdomain prefix (e.g. 'eth-mainnet'). Null if unsupported"},codex:{type:["number","null"],description:"Codex API network ID. Null if unsupported"},iron:{type:["string","null"],description:"Iron blockchain name (e.g. 'Ethereum'). Null if unsupported"}},required:["alchemy","codex","iron"],additionalProperties:!1,description:"Provider-specific metadata"}},required:["name","displayName","id","vmId","keyFamily","testnet","mainnet","explorer","explorerTxPath","explorerAccountPath","addressRegex","providers"],additionalProperties:!1}}},required:["chains"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"chain_retrieve",description:"Get metadata for a specific blockchain network by name",inputSchema:{$ref:"#/definitions/chain_retrieve_input",definitions:{chain_retrieve_input:{type:"object",properties:{chain:{type:"string",description:"Chain name (e.g. 'solana', 'ethereum', 'tempo')"}},required:["chain"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/chain_retrieve_output",definitions:{chain_retrieve_output:{type:"object",properties:{name:{type:"string",description:"Chain identifier (e.g. 'solana', 'ethereum')"},displayName:{type:"string",description:"Human-readable chain name"},id:{type:"number",description:"Numeric chain ID"},vmId:{type:"string",enum:["solana","evm","alt-vm"],description:"Virtual machine type"},keyFamily:{type:"string",enum:["evm","solana","bitcoin","tron","ton","filecoin"],description:"Signing key family"},testnet:{type:"boolean",description:"Whether this is a testnet"},mainnet:{type:["string","null"],description:"Mainnet chain name if testnet, null otherwise"},explorer:{type:"string",description:"Block explorer base URL"},explorerTxPath:{type:"string",description:"Explorer path template for transactions (use {hash})"},explorerAccountPath:{type:"string",description:"Explorer path template for accounts (use {address})"},addressRegex:{type:"string",description:"Regex pattern for validating wallet addresses"},providers:{type:"object",properties:{alchemy:{type:["string","null"],description:"Alchemy RPC subdomain prefix (e.g. 'eth-mainnet'). Null if unsupported"},codex:{type:["number","null"],description:"Codex API network ID. Null if unsupported"},iron:{type:["string","null"],description:"Iron blockchain name (e.g. 'Ethereum'). Null if unsupported"}},required:["alchemy","codex","iron"],additionalProperties:!1,description:"Provider-specific metadata"}},required:["name","displayName","id","vmId","keyFamily","testnet","mainnet","explorer","explorerTxPath","explorerAccountPath","addressRegex","providers"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"commerce_cart_add",description:"Add an item to a shopping cart. Creates a new cart if no cartId is provided. Run multiple times to add more items.",inputSchema:{$ref:"#/definitions/commerce_cart_add_input",definitions:{commerce_cart_add_input:{type:"object",properties:{store:{type:"string",description:"Shopify store URL (e.g. ryder.id, bodykits.ae)"},cartId:{type:["string","null"],description:"Existing cart ID \u2014 omit to create a new cart"},variantId:{type:"string",description:"Product variant ID to add"},quantity:{type:"number",description:"Quantity to add"}},required:["store","cartId","variantId","quantity"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/commerce_cart_add_output",definitions:{commerce_cart_add_output:{type:"object",properties:{id:{type:"string",description:"Cart ID \u2014 pass to other cart/checkout tools"},items:{type:"array",items:{type:"object",properties:{lineId:{type:"string",description:"Cart line ID \u2014 use for updates/removal"},variantId:{type:"string",description:"Product variant ID"},productId:{type:"string",description:"Product ID"},title:{type:"string",description:"Product title"},variantTitle:{type:"string",description:"Variant title (e.g. 'Small / Blue')"},quantity:{type:"number",description:"Quantity in cart"},totalAmount:{type:"string",description:"Line total (price \xD7 quantity)"},currency:{type:"string",description:"Currency code (e.g. USD)"}},required:["lineId","variantId","productId","title","variantTitle","quantity","totalAmount","currency"],additionalProperties:!1},description:"Items in cart"},totalAmount:{type:"string",description:"Cart total"},currency:{type:"string",description:"Currency code (e.g. USD)"},totalQuantity:{type:"number",description:"Total item count"},checkoutUrl:{type:"string",description:"Shopify checkout URL"}},required:["id","items","totalAmount","currency","totalQuantity","checkoutUrl"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"commerce_cart_remove",description:"Remove an item from a shopping cart by its line ID.",inputSchema:{$ref:"#/definitions/commerce_cart_remove_input",definitions:{commerce_cart_remove_input:{type:"object",properties:{store:{type:"string",description:"Shopify store URL (e.g. ryder.id, bodykits.ae)"},cartId:{type:"string",description:"Cart ID"},lineId:{type:"string",description:"Cart line ID to remove"}},required:["store","cartId","lineId"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/commerce_cart_remove_output",definitions:{commerce_cart_remove_output:{type:"object",properties:{id:{type:"string",description:"Cart ID \u2014 pass to other cart/checkout tools"},items:{type:"array",items:{type:"object",properties:{lineId:{type:"string",description:"Cart line ID \u2014 use for updates/removal"},variantId:{type:"string",description:"Product variant ID"},productId:{type:"string",description:"Product ID"},title:{type:"string",description:"Product title"},variantTitle:{type:"string",description:"Variant title (e.g. 'Small / Blue')"},quantity:{type:"number",description:"Quantity in cart"},totalAmount:{type:"string",description:"Line total (price \xD7 quantity)"},currency:{type:"string",description:"Currency code (e.g. USD)"}},required:["lineId","variantId","productId","title","variantTitle","quantity","totalAmount","currency"],additionalProperties:!1},description:"Items in cart"},totalAmount:{type:"string",description:"Cart total"},currency:{type:"string",description:"Currency code (e.g. USD)"},totalQuantity:{type:"number",description:"Total item count"},checkoutUrl:{type:"string",description:"Shopify checkout URL"}},required:["id","items","totalAmount","currency","totalQuantity","checkoutUrl"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"commerce_cart_retrieve",description:"Get the contents of a shopping cart including items, totals, and checkout URL.",inputSchema:{$ref:"#/definitions/commerce_cart_retrieve_input",definitions:{commerce_cart_retrieve_input:{type:"object",properties:{store:{type:"string",description:"Shopify store URL (e.g. shop.hel.io or mystore.myshopify.com)"},cartId:{type:"string",description:"Cart ID"}},required:["store","cartId"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/commerce_cart_retrieve_output",definitions:{commerce_cart_retrieve_output:{type:"object",properties:{id:{type:"string",description:"Cart ID \u2014 pass to other cart/checkout tools"},items:{type:"array",items:{type:"object",properties:{lineId:{type:"string",description:"Cart line ID \u2014 use for updates/removal"},variantId:{type:"string",description:"Product variant ID"},productId:{type:"string",description:"Product ID"},title:{type:"string",description:"Product title"},variantTitle:{type:"string",description:"Variant title (e.g. 'Small / Blue')"},quantity:{type:"number",description:"Quantity in cart"},totalAmount:{type:"string",description:"Line total (price \xD7 quantity)"},currency:{type:"string",description:"Currency code (e.g. USD)"}},required:["lineId","variantId","productId","title","variantTitle","quantity","totalAmount","currency"],additionalProperties:!1},description:"Items in cart"},totalAmount:{type:"string",description:"Cart total"},currency:{type:"string",description:"Currency code (e.g. USD)"},totalQuantity:{type:"number",description:"Total item count"},checkoutUrl:{type:"string",description:"Shopify checkout URL"}},required:["id","items","totalAmount","currency","totalQuantity","checkoutUrl"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"commerce_cart_update",description:"Create or update a shopping cart on a Shopify store. Omit cartId to create a new cart. Supports adding items, updating quantities, removing items, and applying discount codes.",inputSchema:{$ref:"#/definitions/commerce_cart_update_input",definitions:{commerce_cart_update_input:{type:"object",properties:{store:{type:"string",description:"Shopify store URL (e.g. shop.hel.io or mystore.myshopify.com)"},cartId:{type:["string","null"],description:"Existing cart ID \u2014 omit or null to create a new cart"},addItems:{anyOf:[{type:"array",items:{type:"object",properties:{variantId:{type:"string",description:"Product variant ID"},quantity:{type:"number",description:"Quantity to add"}},required:["variantId","quantity"],additionalProperties:!1}},{type:"null"}],description:"Items to add to the cart"},updateItems:{anyOf:[{type:"array",items:{type:"object",properties:{lineId:{type:"string",description:"Cart line ID"},quantity:{type:"number",description:"New quantity (0 to remove)"}},required:["lineId","quantity"],additionalProperties:!1}},{type:"null"}],description:"Existing cart items to update"},removeLineIds:{anyOf:[{type:"array",items:{type:"string"}},{type:"null"}],description:"Cart line IDs to remove"},discountCodes:{anyOf:[{type:"array",items:{type:"string"}},{type:"null"}],description:"Discount codes to apply"},note:{type:["string","null"],description:"Order note or special instructions"}},required:["store","cartId","addItems","updateItems","removeLineIds","discountCodes","note"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/commerce_cart_update_output",definitions:{commerce_cart_update_output:{type:"object",properties:{id:{type:"string",description:"Cart ID \u2014 pass to other cart/checkout tools"},items:{type:"array",items:{type:"object",properties:{lineId:{type:"string",description:"Cart line ID \u2014 use for updates/removal"},variantId:{type:"string",description:"Product variant ID"},productId:{type:"string",description:"Product ID"},title:{type:"string",description:"Product title"},variantTitle:{type:"string",description:"Variant title (e.g. 'Small / Blue')"},quantity:{type:"number",description:"Quantity in cart"},totalAmount:{type:"string",description:"Line total (price \xD7 quantity)"},currency:{type:"string",description:"Currency code (e.g. USD)"}},required:["lineId","variantId","productId","title","variantTitle","quantity","totalAmount","currency"],additionalProperties:!1},description:"Items in cart"},totalAmount:{type:"string",description:"Cart total"},currency:{type:"string",description:"Currency code (e.g. USD)"},totalQuantity:{type:"number",description:"Total item count"},checkoutUrl:{type:"string",description:"Shopify checkout URL"}},required:["id","items","totalAmount","currency","totalQuantity","checkoutUrl"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"commerce_checkout_pay",description:"Pay for a checkout by submitting the signed transaction. Pass all fields from checkout_start plus the signed transaction.",inputSchema:{$ref:"#/definitions/commerce_checkout_pay_input",definitions:{commerce_checkout_pay_input:{type:"object",properties:{signedTransaction:{type:"string",description:"The signed transaction"},transactionToken:{type:"string",description:"Transaction token from checkout_start"},rateToken:{type:"string",description:"Rate token from checkout_start"},paylinkId:{type:"string",description:"Payment request ID from checkout_start"},requestAmount:{type:"string",description:"Amount from checkout_start"},currency:{type:"string",description:"Currency from checkout_start"},chain:{type:"string",description:"Chain from checkout_start"},sender:{type:"string",description:"Sender wallet from checkout_start"},recipient:{type:"string",description:"Recipient wallet from checkout_start"},addressLookupTableAccounts:{type:"array",items:{type:"string"},description:"Lookup table accounts from checkout_start"}},required:["signedTransaction","transactionToken","rateToken","paylinkId","requestAmount","currency","chain","sender","recipient","addressLookupTableAccounts"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/commerce_checkout_pay_output",definitions:{commerce_checkout_pay_output:{type:"object",properties:{transactionSignature:{type:"string",description:"On-chain transaction signature"},status:{type:"string",description:"Payment status"},redirectUrl:{type:"string",description:"Shopify order confirmation URL"},message:{type:"string",description:"Confirmation message"}},required:["transactionSignature","status","redirectUrl","message"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"commerce_checkout_start",description:"Start checkout for a shopping cart. Takes a cart ID, buyer wallet, chain, and shipping details. Returns an unsigned transaction to sign and metadata to pass to checkout_pay.",inputSchema:{$ref:"#/definitions/commerce_checkout_start_input",definitions:{commerce_checkout_start_input:{type:"object",properties:{store:{type:"string",description:"Shopify store URL (e.g. shop.hel.io or mystore.myshopify.com)"},cartId:{type:"string",description:"Cart ID from cart_update"},wallet:{type:"string",description:"Buyer wallet address (public key)"},chain:{type:"string",description:"Payment chain (solana, ethereum, polygon, base)"},email:{type:"string",description:"Buyer email address"},firstName:{type:"string",description:"Buyer first name"},lastName:{type:"string",description:"Buyer last name"},address:{type:"string",description:"Street address"},city:{type:"string",description:"City"},postalCode:{type:"string",description:"Postal / ZIP code"},country:{type:"string",description:"Country name (e.g. 'United States', 'Netherlands')"}},required:["store","cartId","wallet","chain","email","firstName","lastName","address","city","postalCode","country"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/commerce_checkout_start_output",definitions:{commerce_checkout_start_output:{type:"object",properties:{serializedTransaction:{type:"string",description:"Unsigned transaction to sign"},transactionToken:{type:"string",description:"Pass to checkout_pay after signing"},rateToken:{type:"string",description:"Rate lock token \u2014 pass to checkout_pay"},paylinkId:{type:"string",description:"Payment request ID \u2014 pass to checkout_pay"},requestAmount:{type:"string",description:"Amount in minimal units \u2014 pass to checkout_pay"},currency:{type:"string",description:"Payment currency symbol (e.g. USDC)"},chain:{type:"string",description:"Payment chain"},sender:{type:"string",description:"Sender wallet \u2014 pass to checkout_pay"},recipient:{type:"string",description:"Recipient wallet \u2014 pass to checkout_pay"},addressLookupTableAccounts:{type:"array",items:{type:"string"},description:"Lookup table accounts \u2014 pass to checkout_pay"},message:{type:"string",description:"Human-readable description of the payment"}},required:["serializedTransaction","transactionToken","rateToken","paylinkId","requestAmount","currency","chain","sender","recipient","addressLookupTableAccounts","message"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"commerce_product_retrieve",description:"Get full details of a product including all variants, options, and availability. Use after product search to get variant IDs for ordering.",inputSchema:{$ref:"#/definitions/commerce_product_retrieve_input",definitions:{commerce_product_retrieve_input:{type:"object",properties:{store:{type:"string",description:"Shopify store URL (e.g. shop.hel.io or mystore.myshopify.com)"},productId:{type:"string",description:"Shopify product ID (from product search)"}},required:["store","productId"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/commerce_product_retrieve_output",definitions:{commerce_product_retrieve_output:{type:"object",properties:{productId:{type:"string",description:"Shopify product ID"},title:{type:"string",description:"Product title"},description:{type:"string",description:"Product description"},url:{type:"string",description:"Product page URL"},imageUrl:{type:["string","null"],description:"Product image URL"},priceMin:{type:"string",description:"Minimum price"},priceMax:{type:"string",description:"Maximum price"},currency:{type:"string",description:"Currency code (e.g. USD)"},productType:{type:["string","null"],description:"Product type/category"},tags:{type:"array",items:{type:"string"},description:"Product tags"},variants:{type:"array",items:{type:"object",properties:{variantId:{type:"string",description:"Variant ID \u2014 use this for ordering"},title:{type:"string",description:"Variant title (e.g. 'Small / Blue')"},price:{type:"string",description:"Variant price"},currency:{type:"string",description:"Currency code (e.g. USD)"},imageUrl:{type:["string","null"],description:"Variant image URL"},available:{type:"boolean",description:"Whether variant is in stock"}},required:["variantId","title","price","currency","imageUrl","available"],additionalProperties:!1},description:"Product variants"}},required:["productId","title","description","url","imageUrl","priceMin","priceMax","currency","productType","tags","variants"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"commerce_product_search",description:"Search products on a Shopify store. Returns products with prices, images, and variants. Works on any Shopify store.",inputSchema:{$ref:"#/definitions/commerce_product_search_input",definitions:{commerce_product_search_input:{type:"object",properties:{store:{type:"string",description:"Shopify store URL (e.g. shop.hel.io or mystore.myshopify.com)"},query:{type:"string",description:"Search query"},limit:{type:["number","null"],description:"Max results (default 10)"},cursor:{type:["string","null"],description:"Pagination cursor from previous response (pass to get next page)"}},required:["store","query","limit","cursor"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/commerce_product_search_output",definitions:{commerce_product_search_output:{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{productId:{type:"string",description:"Shopify product ID"},title:{type:"string",description:"Product title"},description:{type:"string",description:"Product description"},url:{type:"string",description:"Product page URL"},imageUrl:{type:["string","null"],description:"Product image URL"},priceMin:{type:"string",description:"Minimum price"},priceMax:{type:"string",description:"Maximum price"},currency:{type:"string",description:"Currency code (e.g. USD)"},productType:{type:["string","null"],description:"Product type/category"},tags:{type:"array",items:{type:"string"},description:"Product tags"},variants:{type:"array",items:{type:"object",properties:{variantId:{type:"string",description:"Variant ID \u2014 use this for ordering"},title:{type:"string",description:"Variant title (e.g. 'Small / Blue')"},price:{type:"string",description:"Variant price"},currency:{type:"string",description:"Currency code (e.g. USD)"},imageUrl:{type:["string","null"],description:"Variant image URL"},available:{type:"boolean",description:"Whether variant is in stock"}},required:["variantId","title","price","currency","imageUrl","available"],additionalProperties:!1},description:"Product variants"}},required:["productId","title","description","url","imageUrl","priceMin","priceMax","currency","productType","tags","variants"],additionalProperties:!1},description:"Matching products"},hasMore:{type:"boolean",description:"Whether more results exist"},cursor:{type:["string","null"],description:"Cursor for next page \u2014 pass as 'cursor' input to get more results"}},required:["items","hasMore","cursor"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"commerce_store_list",description:"List Shopify stores that accept Solana Pay via Helio. Use these store domains with product_search, cart_update, and checkout tools.",inputSchema:{$ref:"#/definitions/commerce_store_list_input",definitions:{commerce_store_list_input:{type:"object",properties:{},additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/commerce_store_list_output",definitions:{commerce_store_list_output:{type:"object",properties:{stores:{type:"array",items:{type:"object",properties:{store:{type:"string",description:"Store domain (use as 'store' param in other commerce tools)"},name:{type:"string",description:"Store display name"},description:{type:"string",description:"What the store sells"},url:{type:"string",description:"Store URL"}},required:["store","name","description","url"],additionalProperties:!1}}},required:["stores"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"commerce_store_retrieve",description:"Get information about a Shopify store including policies, shipping info, and FAQs. Works on any Shopify store.",inputSchema:{$ref:"#/definitions/commerce_store_retrieve_input",definitions:{commerce_store_retrieve_input:{type:"object",properties:{store:{type:"string",description:"Shopify store URL (e.g. shop.hel.io or mystore.myshopify.com)"},query:{type:["string","null"],description:"Question about the store (e.g. 'shipping policy', 'returns', 'payment methods')"}},required:["store","query"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/commerce_store_retrieve_output",definitions:{commerce_store_retrieve_output:{type:"object",properties:{store:{type:"string",description:"Store URL"},items:{type:"array",items:{type:"object",properties:{question:{type:"string",description:"Policy question"},answer:{type:"string",description:"Policy answer"}},required:["question","answer"],additionalProperties:!1},description:"Policy Q&A pairs"}},required:["store","items"],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 token 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 funds 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","ETH","SOL","BTC","wETH","BNB","POL","ARB","USDe","USD1"],description:"Token to receive. Stablecoins: USDC (all chains), USDT (all chains), USDC.e (Polygon only), USDe (Ethereum/Arbitrum), USD1 (Ethereum/BSC/Solana). Native: ETH (Ethereum/Base/Arbitrum/BSC), SOL (Solana), BTC (Bitcoin), BNB (BSC), POL (Polygon), ARB (Arbitrum). wETH available on most EVM chains."}},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 token"},destinationChain:{type:"string",description:"Chain where the token 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, including 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",description:"Unique identifier for the deposit"},name:{type:"string",description:"User-assigned name for the deposit"},status:{type:"string",description:"Current deposit status (e.g. 'active', 'completed', 'expired')"},destinationWallet:{type:["string","null"],description:"Wallet address where deposited funds are forwarded, or null if not set"},depositUrl:{type:"string",description:"URL where the deposit can be viewed or shared"}},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:2e3,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:"prediction-market_activity_list",description:"List all activity for a wallet on prediction markets. Includes trades, splits, merges, redemptions, and rewards.",inputSchema:{$ref:"#/definitions/prediction-market_activity_list_input",definitions:{"prediction-market_activity_list_input":{type:"object",properties:{provider:{type:"string",enum:["polymarket","kalshi"],description:"Prediction market provider"},wallet:{type:"string",description:"Wallet address"},limit:{type:["number","null"],description:"Max results (default 100)"},page:{type:["number","null"],description:"Page number, starts at 1 (default 1)"}},required:["provider","wallet","limit","page"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/prediction-market_activity_list_output",definitions:{"prediction-market_activity_list_output":{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{type:{type:"string",description:"Activity type (TRADE, SPLIT, MERGE, REDEEM, etc.)"},asset:{type:["string","null"],default:null,description:"Token ID (CLOB token or mint address)"},conditionId:{type:["string","null"],default:null,description:"Condition ID"},size:{type:["number","null"],default:null,description:"Amount"},price:{type:["number","null"],default:null,description:"Price"},fee:{type:["number","null"],default:null,description:"Fee amount"},timestamp:{type:"number",description:"Activity timestamp (unix)"},title:{type:["string","null"],default:null,description:"Event title"},slug:{type:["string","null"],default:null,description:"Event slug"},outcome:{type:["string","null"],default:null,description:"Outcome name"},transactionHash:{type:["string","null"],default:null,description:"Transaction hash"}},required:["type","timestamp"],additionalProperties:!1},description:"Activity history"}},required:["items"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"prediction-market_market_event_retrieve",description:"Get detailed information about a prediction market event including all associated markets, outcomes, and prices.",inputSchema:{$ref:"#/definitions/prediction-market_market_event_retrieve_input",definitions:{"prediction-market_market_event_retrieve_input":{type:"object",properties:{provider:{type:"string",enum:["polymarket","kalshi"],description:"Prediction market provider"},slug:{type:"string",description:"Event slug identifier"}},required:["provider","slug"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/prediction-market_market_event_retrieve_output",definitions:{"prediction-market_market_event_retrieve_output":{type:"object",properties:{id:{type:"string",description:"Event ID"},ticker:{type:"string",description:"Event ticker"},slug:{type:"string",description:"URL slug"},title:{type:"string",description:"Event title"},description:{type:["string","null"],default:null,description:"Event description"},subtitle:{type:["string","null"],default:null,description:"Event subtitle"},image:{type:["string","null"],default:null,description:"Event image URL"},icon:{type:["string","null"],default:null,description:"Event icon URL"},category:{type:["string","null"],default:null,description:"Primary category"},subcategory:{type:["string","null"],default:null,description:"Subcategory"},volume:{type:"number",default:0,description:"Total volume in USDC"},volume24hr:{type:["number","null"],default:null,description:"24-hour volume in USDC"},volume1wk:{type:["number","null"],default:null,description:"1-week volume in USDC"},volume1mo:{type:["number","null"],default:null,description:"1-month volume in USDC"},volume1yr:{type:["number","null"],default:null,description:"1-year volume in USDC"},openInterest:{type:["number","null"],default:null,description:"Open interest in USDC"},liquidity:{type:["number","null"],default:null,description:"Available liquidity"},startDate:{type:["string","null"],default:null,description:"Event start date (ISO)"},endDate:{type:["string","null"],default:null,description:"Event end date (ISO)"},closedTime:{type:["string","null"],default:null,description:"Time event was closed (ISO)"},active:{type:"boolean",default:!0,description:"Whether event is active"},closed:{type:"boolean",default:!1,description:"Whether event has closed"},featured:{type:["boolean","null"],default:null,description:"Whether event is featured"},commentCount:{type:["number","null"],default:null,description:"Number of comments"},negRisk:{type:["boolean","null"],default:null,description:"Negative risk framework"},negRiskMarketID:{type:["string","null"],default:null,description:"Negative risk market ID"},markets:{type:"array",items:{type:"object",properties:{id:{type:"string",description:"Market ID"},question:{type:"string",description:"Market question"},description:{type:["string","null"],default:null,description:"Market description"},conditionId:{type:["string","null"],default:null,description:"Condition ID for on-chain settlement"},slug:{type:"string",description:"URL slug"},image:{type:["string","null"],default:null,description:"Market image URL"},outcomes:{type:"array",items:{type:"string"},description:"Possible outcomes (e.g. ['Yes', 'No'])"},outcomePrices:{type:"array",items:{type:"number"},description:"Current price per outcome (0-1)"},outcomeTokens:{type:"array",items:{type:"object",properties:{outcome:{type:"string",description:"Outcome name (e.g. 'Yes', 'No')"},tokenId:{type:"string",description:"Token identifier \u2014 CLOB token ID (Polymarket/EVM) or mint address (Kalshi/Solana)"},price:{type:["number","null"],default:null,description:"Current price for this outcome (0-1)"}},required:["outcome","tokenId"],additionalProperties:!1},default:[],description:"Token IDs for each outcome \u2014 use these to trade"},volume:{type:"number",default:0,description:"Total volume traded in USDC"},volume24hr:{type:["number","null"],default:null,description:"24-hour volume in USDC"},volume1wk:{type:["number","null"],default:null,description:"1-week volume in USDC"},volume1mo:{type:["number","null"],default:null,description:"1-month volume in USDC"},volume1yr:{type:["number","null"],default:null,description:"1-year volume in USDC"},lastTradePrice:{type:["number","null"],default:null,description:"Last trade price"},bestBid:{type:["number","null"],default:null,description:"Best bid price"},bestAsk:{type:["number","null"],default:null,description:"Best ask price"},spread:{type:["number","null"],default:null,description:"Bid-ask spread"},oneDayPriceChange:{type:["number","null"],default:null,description:"24-hour price change"},oneHourPriceChange:{type:["number","null"],default:null,description:"1-hour price change"},oneWeekPriceChange:{type:["number","null"],default:null,description:"1-week price change"},startDate:{type:["string","null"],default:null,description:"Market start date (ISO)"},endDate:{type:["string","null"],default:null,description:"Market end date (ISO)"},negRisk:{type:["boolean","null"],default:null,description:"Whether this uses negative risk framework"},negRiskMarketID:{type:["string","null"],default:null,description:"Negative risk market ID"},status:{type:["string","null"],default:null,description:"Market lifecycle status (e.g. initialized, active, inactive, closed, determined, finalized)"},isInitialized:{type:["boolean","null"],default:null,description:"Whether the market is tokenized onchain (Kalshi/Solana)"},acceptingOrders:{type:"boolean",default:!1,description:"Whether market is accepting orders"},enableOrderBook:{type:["boolean","null"],default:null,description:"Whether order book is enabled"},orderMinSize:{type:["number","null"],default:null,description:"Minimum order size"},liquidity:{type:["number","null"],default:null,description:"Available liquidity in USDC"},tickSize:{type:["string","null"],default:null,description:"Minimum price increment"}},required:["id","question","slug","outcomes","outcomePrices"],additionalProperties:!1},default:[],description:"Markets within this event"},tags:{type:"array",items:{type:"object",properties:{id:{type:"string",description:"Tag ID"},label:{type:"string",description:"Human-readable tag label"},slug:{type:"string",description:"URL-safe tag slug"},category:{type:["string","null"],default:null,description:"Parent category"}},required:["id","label","slug"],additionalProperties:!1},default:[],description:"Category tags"}},required:["id","ticker","slug","title"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"prediction-market_market_price_history_list",description:"Get historical price data for a prediction market outcome. Use to analyze price trends over time.",inputSchema:{$ref:"#/definitions/prediction-market_market_price_history_list_input",definitions:{"prediction-market_market_price_history_list_input":{type:"object",properties:{provider:{type:"string",enum:["polymarket","kalshi"],description:"Prediction market provider"},tokenId:{type:"string",description:"Outcome token ID (from outcomeTokens[].tokenId)"},interval:{type:"string",enum:["1hr","1d","1w","1m","max"],description:"Time interval: 1hr, 1d (day), 1w (week), 1m (month), or max (all time)"}},required:["provider","tokenId","interval"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/prediction-market_market_price_history_list_output",definitions:{"prediction-market_market_price_history_list_output":{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{timestamp:{type:"number",description:"Unix timestamp"},price:{type:"number",description:"Price at this time (0-1)"}},required:["timestamp","price"],additionalProperties:!1},description:"Price history data points"}},required:["items"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"prediction-market_market_price_retrieve",description:"Get the current price for a prediction market outcome token.",inputSchema:{$ref:"#/definitions/prediction-market_market_price_retrieve_input",definitions:{"prediction-market_market_price_retrieve_input":{type:"object",properties:{provider:{type:"string",enum:["polymarket","kalshi"],description:"Prediction market provider"},tokenId:{type:"string",description:"Outcome token ID (from outcomeTokens[].tokenId)"}},required:["provider","tokenId"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/prediction-market_market_price_retrieve_output",definitions:{"prediction-market_market_price_retrieve_output":{type:"object",properties:{price:{type:["number","null"],description:"Current price (0-1), null if no orders"}},required:["price"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"prediction-market_market_search",description:"Search prediction markets by query string or tags. Returns events with their markets, prices, and volumes.",inputSchema:{$ref:"#/definitions/prediction-market_market_search_input",definitions:{"prediction-market_market_search_input":{type:"object",properties:{provider:{type:"string",enum:["polymarket","kalshi"],description:"Prediction market provider"},query:{type:"string",description:"Search query (use '*' for all markets)"},tagIds:{type:["string","null"],description:"Comma-separated tag IDs to filter by"},limit:{type:["number","null"],description:"Max results (default 10)"},page:{type:["number","null"],description:"Page number, starts at 1 (default 1)"},activeOnly:{type:["boolean","null"],description:"Only show active markets (default true)"}},required:["provider","query","tagIds","limit","page","activeOnly"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/prediction-market_market_search_output",definitions:{"prediction-market_market_search_output":{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{id:{type:"string",description:"Event ID"},ticker:{type:"string",description:"Event ticker"},slug:{type:"string",description:"URL slug"},title:{type:"string",description:"Event title"},description:{type:["string","null"],default:null,description:"Event description"},subtitle:{type:["string","null"],default:null,description:"Event subtitle"},image:{type:["string","null"],default:null,description:"Event image URL"},icon:{type:["string","null"],default:null,description:"Event icon URL"},category:{type:["string","null"],default:null,description:"Primary category"},subcategory:{type:["string","null"],default:null,description:"Subcategory"},volume:{type:"number",default:0,description:"Total volume in USDC"},volume24hr:{type:["number","null"],default:null,description:"24-hour volume in USDC"},volume1wk:{type:["number","null"],default:null,description:"1-week volume in USDC"},volume1mo:{type:["number","null"],default:null,description:"1-month volume in USDC"},volume1yr:{type:["number","null"],default:null,description:"1-year volume in USDC"},openInterest:{type:["number","null"],default:null,description:"Open interest in USDC"},liquidity:{type:["number","null"],default:null,description:"Available liquidity"},startDate:{type:["string","null"],default:null,description:"Event start date (ISO)"},endDate:{type:["string","null"],default:null,description:"Event end date (ISO)"},closedTime:{type:["string","null"],default:null,description:"Time event was closed (ISO)"},active:{type:"boolean",default:!0,description:"Whether event is active"},closed:{type:"boolean",default:!1,description:"Whether event has closed"},featured:{type:["boolean","null"],default:null,description:"Whether event is featured"},commentCount:{type:["number","null"],default:null,description:"Number of comments"},negRisk:{type:["boolean","null"],default:null,description:"Negative risk framework"},negRiskMarketID:{type:["string","null"],default:null,description:"Negative risk market ID"},markets:{type:"array",items:{type:"object",properties:{id:{type:"string",description:"Market ID"},question:{type:"string",description:"Market question"},description:{type:["string","null"],default:null,description:"Market description"},conditionId:{type:["string","null"],default:null,description:"Condition ID for on-chain settlement"},slug:{type:"string",description:"URL slug"},image:{type:["string","null"],default:null,description:"Market image URL"},outcomes:{type:"array",items:{type:"string"},description:"Possible outcomes (e.g. ['Yes', 'No'])"},outcomePrices:{type:"array",items:{type:"number"},description:"Current price per outcome (0-1)"},outcomeTokens:{type:"array",items:{type:"object",properties:{outcome:{type:"string",description:"Outcome name (e.g. 'Yes', 'No')"},tokenId:{type:"string",description:"Token identifier \u2014 CLOB token ID (Polymarket/EVM) or mint address (Kalshi/Solana)"},price:{type:["number","null"],default:null,description:"Current price for this outcome (0-1)"}},required:["outcome","tokenId"],additionalProperties:!1},default:[],description:"Token IDs for each outcome \u2014 use these to trade"},volume:{type:"number",default:0,description:"Total volume traded in USDC"},volume24hr:{type:["number","null"],default:null,description:"24-hour volume in USDC"},volume1wk:{type:["number","null"],default:null,description:"1-week volume in USDC"},volume1mo:{type:["number","null"],default:null,description:"1-month volume in USDC"},volume1yr:{type:["number","null"],default:null,description:"1-year volume in USDC"},lastTradePrice:{type:["number","null"],default:null,description:"Last trade price"},bestBid:{type:["number","null"],default:null,description:"Best bid price"},bestAsk:{type:["number","null"],default:null,description:"Best ask price"},spread:{type:["number","null"],default:null,description:"Bid-ask spread"},oneDayPriceChange:{type:["number","null"],default:null,description:"24-hour price change"},oneHourPriceChange:{type:["number","null"],default:null,description:"1-hour price change"},oneWeekPriceChange:{type:["number","null"],default:null,description:"1-week price change"},startDate:{type:["string","null"],default:null,description:"Market start date (ISO)"},endDate:{type:["string","null"],default:null,description:"Market end date (ISO)"},negRisk:{type:["boolean","null"],default:null,description:"Whether this uses negative risk framework"},negRiskMarketID:{type:["string","null"],default:null,description:"Negative risk market ID"},status:{type:["string","null"],default:null,description:"Market lifecycle status (e.g. initialized, active, inactive, closed, determined, finalized)"},isInitialized:{type:["boolean","null"],default:null,description:"Whether the market is tokenized onchain (Kalshi/Solana)"},acceptingOrders:{type:"boolean",default:!1,description:"Whether market is accepting orders"},enableOrderBook:{type:["boolean","null"],default:null,description:"Whether order book is enabled"},orderMinSize:{type:["number","null"],default:null,description:"Minimum order size"},liquidity:{type:["number","null"],default:null,description:"Available liquidity in USDC"},tickSize:{type:["string","null"],default:null,description:"Minimum price increment"}},required:["id","question","slug","outcomes","outcomePrices"],additionalProperties:!1},default:[],description:"Markets within this event"},tags:{type:"array",items:{type:"object",properties:{id:{type:"string",description:"Tag ID"},label:{type:"string",description:"Human-readable tag label"},slug:{type:"string",description:"URL-safe tag slug"},category:{type:["string","null"],default:null,description:"Parent category"}},required:["id","label","slug"],additionalProperties:!1},default:[],description:"Category tags"}},required:["id","ticker","slug","title"],additionalProperties:!1},description:"Matching events with markets"},hasMore:{type:"boolean",description:"Whether more results exist"}},required:["items","hasMore"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"prediction-market_market_tag_list",description:"List available prediction market categories and tags for filtering markets.",inputSchema:{$ref:"#/definitions/prediction-market_market_tag_list_input",definitions:{"prediction-market_market_tag_list_input":{type:"object",properties:{provider:{type:"string",enum:["polymarket","kalshi"],description:"Prediction market provider"},limit:{type:["number","null"],description:"Max results (default 50)"},page:{type:["number","null"],description:"Page number, starts at 1 (default 1)"},slug:{type:["string","null"],description:"Filter by tag slug (e.g. 'nfl')"}},required:["provider","limit","page","slug"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/prediction-market_market_tag_list_output",definitions:{"prediction-market_market_tag_list_output":{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{id:{type:"string",description:"Tag ID"},label:{type:"string",description:"Human-readable tag label"},slug:{type:"string",description:"URL-safe tag slug"},category:{type:["string","null"],default:null,description:"Parent category"}},required:["id","label","slug"],additionalProperties:!1},description:"List of tags"}},required:["items"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"prediction-market_market_trending_list",description:"Get trending prediction markets sorted by 24-hour volume. Minimum $150K 24h volume.",inputSchema:{$ref:"#/definitions/prediction-market_market_trending_list_input",definitions:{"prediction-market_market_trending_list_input":{type:"object",properties:{provider:{type:"string",enum:["polymarket","kalshi"],description:"Prediction market provider"},limit:{type:["number","null"],description:"Max results (default 20)"},page:{type:["number","null"],description:"Page number, starts at 1 (default 1)"}},required:["provider","limit","page"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/prediction-market_market_trending_list_output",definitions:{"prediction-market_market_trending_list_output":{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{id:{type:"string",description:"Event ID"},ticker:{type:"string",description:"Event ticker"},slug:{type:"string",description:"URL slug"},title:{type:"string",description:"Event title"},description:{type:["string","null"],default:null,description:"Event description"},subtitle:{type:["string","null"],default:null,description:"Event subtitle"},image:{type:["string","null"],default:null,description:"Event image URL"},icon:{type:["string","null"],default:null,description:"Event icon URL"},category:{type:["string","null"],default:null,description:"Primary category"},subcategory:{type:["string","null"],default:null,description:"Subcategory"},volume:{type:"number",default:0,description:"Total volume in USDC"},volume24hr:{type:["number","null"],default:null,description:"24-hour volume in USDC"},volume1wk:{type:["number","null"],default:null,description:"1-week volume in USDC"},volume1mo:{type:["number","null"],default:null,description:"1-month volume in USDC"},volume1yr:{type:["number","null"],default:null,description:"1-year volume in USDC"},openInterest:{type:["number","null"],default:null,description:"Open interest in USDC"},liquidity:{type:["number","null"],default:null,description:"Available liquidity"},startDate:{type:["string","null"],default:null,description:"Event start date (ISO)"},endDate:{type:["string","null"],default:null,description:"Event end date (ISO)"},closedTime:{type:["string","null"],default:null,description:"Time event was closed (ISO)"},active:{type:"boolean",default:!0,description:"Whether event is active"},closed:{type:"boolean",default:!1,description:"Whether event has closed"},featured:{type:["boolean","null"],default:null,description:"Whether event is featured"},commentCount:{type:["number","null"],default:null,description:"Number of comments"},negRisk:{type:["boolean","null"],default:null,description:"Negative risk framework"},negRiskMarketID:{type:["string","null"],default:null,description:"Negative risk market ID"},markets:{type:"array",items:{type:"object",properties:{id:{type:"string",description:"Market ID"},question:{type:"string",description:"Market question"},description:{type:["string","null"],default:null,description:"Market description"},conditionId:{type:["string","null"],default:null,description:"Condition ID for on-chain settlement"},slug:{type:"string",description:"URL slug"},image:{type:["string","null"],default:null,description:"Market image URL"},outcomes:{type:"array",items:{type:"string"},description:"Possible outcomes (e.g. ['Yes', 'No'])"},outcomePrices:{type:"array",items:{type:"number"},description:"Current price per outcome (0-1)"},outcomeTokens:{type:"array",items:{type:"object",properties:{outcome:{type:"string",description:"Outcome name (e.g. 'Yes', 'No')"},tokenId:{type:"string",description:"Token identifier \u2014 CLOB token ID (Polymarket/EVM) or mint address (Kalshi/Solana)"},price:{type:["number","null"],default:null,description:"Current price for this outcome (0-1)"}},required:["outcome","tokenId"],additionalProperties:!1},default:[],description:"Token IDs for each outcome \u2014 use these to trade"},volume:{type:"number",default:0,description:"Total volume traded in USDC"},volume24hr:{type:["number","null"],default:null,description:"24-hour volume in USDC"},volume1wk:{type:["number","null"],default:null,description:"1-week volume in USDC"},volume1mo:{type:["number","null"],default:null,description:"1-month volume in USDC"},volume1yr:{type:["number","null"],default:null,description:"1-year volume in USDC"},lastTradePrice:{type:["number","null"],default:null,description:"Last trade price"},bestBid:{type:["number","null"],default:null,description:"Best bid price"},bestAsk:{type:["number","null"],default:null,description:"Best ask price"},spread:{type:["number","null"],default:null,description:"Bid-ask spread"},oneDayPriceChange:{type:["number","null"],default:null,description:"24-hour price change"},oneHourPriceChange:{type:["number","null"],default:null,description:"1-hour price change"},oneWeekPriceChange:{type:["number","null"],default:null,description:"1-week price change"},startDate:{type:["string","null"],default:null,description:"Market start date (ISO)"},endDate:{type:["string","null"],default:null,description:"Market end date (ISO)"},negRisk:{type:["boolean","null"],default:null,description:"Whether this uses negative risk framework"},negRiskMarketID:{type:["string","null"],default:null,description:"Negative risk market ID"},status:{type:["string","null"],default:null,description:"Market lifecycle status (e.g. initialized, active, inactive, closed, determined, finalized)"},isInitialized:{type:["boolean","null"],default:null,description:"Whether the market is tokenized onchain (Kalshi/Solana)"},acceptingOrders:{type:"boolean",default:!1,description:"Whether market is accepting orders"},enableOrderBook:{type:["boolean","null"],default:null,description:"Whether order book is enabled"},orderMinSize:{type:["number","null"],default:null,description:"Minimum order size"},liquidity:{type:["number","null"],default:null,description:"Available liquidity in USDC"},tickSize:{type:["string","null"],default:null,description:"Minimum price increment"}},required:["id","question","slug","outcomes","outcomePrices"],additionalProperties:!1},default:[],description:"Markets within this event"},tags:{type:"array",items:{type:"object",properties:{id:{type:"string",description:"Tag ID"},label:{type:"string",description:"Human-readable tag label"},slug:{type:"string",description:"URL-safe tag slug"},category:{type:["string","null"],default:null,description:"Parent category"}},required:["id","label","slug"],additionalProperties:!1},default:[],description:"Category tags"}},required:["id","ticker","slug","title"],additionalProperties:!1},description:"Trending events"}},required:["items"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"prediction-market_pnl_retrieve",description:"Get profit and loss summary for a wallet on prediction markets.",inputSchema:{$ref:"#/definitions/prediction-market_pnl_retrieve_input",definitions:{"prediction-market_pnl_retrieve_input":{type:"object",properties:{provider:{type:"string",enum:["polymarket","kalshi"],description:"Prediction market provider"},wallet:{type:"string",description:"Wallet address"}},required:["provider","wallet"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/prediction-market_pnl_retrieve_output",definitions:{"prediction-market_pnl_retrieve_output":{type:"object",properties:{totalPnl:{type:"number",description:"Total profit/loss in USDC"},realizedPnl:{type:"number",description:"Realized PnL from closed positions"},unrealizedPnl:{type:"number",description:"Unrealized PnL from open positions"},totalInvested:{type:"number",description:"Total amount invested in USDC"},totalValue:{type:"number",description:"Current total value of all positions"}},required:["totalPnl","realizedPnl","unrealizedPnl","totalInvested","totalValue"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"prediction-market_position_buy",description:"Buy shares of a prediction market outcome. Places a limit order at the specified price.",inputSchema:{$ref:"#/definitions/prediction-market_position_buy_input",definitions:{"prediction-market_position_buy_input":{type:"object",properties:{provider:{type:"string",enum:["polymarket","kalshi"],description:"Prediction market provider"},wallet:{type:"string",description:"Wallet address placing the order"},tokenId:{type:"string",description:"Outcome token ID to buy (from outcomeTokens[].tokenId)"},price:{type:"number",description:"Price per share (0-1)"},size:{type:"number",description:"Number of shares to buy"}},required:["provider","wallet","tokenId","price","size"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/prediction-market_position_buy_output",definitions:{"prediction-market_position_buy_output":{type:"object",properties:{orderId:{type:["string","null"],description:"Order/transaction ID"},status:{type:"string",description:"Order status (pending_signature, executed, etc.)"},transactionHashes:{type:"array",items:{type:"string"},description:"On-chain transaction hashes"},transaction:{anyOf:[{anyOf:[{type:"object",properties:{type:{type:"string",const:"solana"},base64:{type:"string",description:"Base64-encoded Solana transaction"},lastValidBlockHeight:{type:"number"}},required:["type","base64","lastValidBlockHeight"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"evm"},to:{type:"string"},data:{type:"string"},value:{type:"string"},chainId:{type:"number"}},required:["type","to","data","value","chainId"],additionalProperties:!1}]},{type:"null"}],description:"Transaction to sign (Kalshi=Solana, Polymarket=EVM)"}},required:["orderId","status","transactionHashes","transaction"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"prediction-market_position_list",description:"List prediction market positions for a wallet address. Shows current value, PnL, and outcome details.",inputSchema:{$ref:"#/definitions/prediction-market_position_list_input",definitions:{"prediction-market_position_list_input":{type:"object",properties:{provider:{type:"string",enum:["polymarket","kalshi"],description:"Prediction market provider"},wallet:{type:"string",description:"Wallet address"},status:{anyOf:[{type:"string",enum:["open","closed"]},{type:"null"}],description:"Position status (default open)"},limit:{type:["number","null"],description:"Max results (default 100)"},page:{type:["number","null"],description:"Page number, starts at 1 (default 1)"}},required:["provider","wallet","status","limit","page"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/prediction-market_position_list_output",definitions:{"prediction-market_position_list_output":{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{asset:{type:"string",description:"Token ID (CLOB token or mint address)"},conditionId:{type:["string","null"],default:null,description:"Condition ID (Polymarket)"},size:{type:"number",description:"Position size in shares"},avgPrice:{type:"number",description:"Average entry price"},initialValue:{type:"number",description:"Initial position value in USDC"},currentValue:{type:"number",description:"Current position value in USDC"},cashPnl:{type:"number",description:"Cash profit/loss in USDC"},percentPnl:{type:"number",description:"Percentage profit/loss"},curPrice:{type:"number",description:"Current outcome price"},redeemable:{type:"boolean",description:"Whether position can be redeemed"},mergeable:{type:"boolean",description:"Whether position can be merged"},title:{type:"string",description:"Event title"},slug:{type:"string",description:"Event slug"},outcome:{type:"string",description:"Outcome name (e.g. 'Yes')"},outcomeIndex:{type:"number",description:"Outcome index (0 or 1)"},oppositeOutcome:{type:["string","null"],default:null,description:"Opposite outcome name"},oppositeAsset:{type:["string","null"],default:null,description:"Opposite outcome token ID"},endDate:{type:["string","null"],default:null,description:"Market end date"},negativeRisk:{type:["boolean","null"],default:null,description:"Negative risk framework"}},required:["asset","size","avgPrice","initialValue","currentValue","cashPnl","percentPnl","curPrice","redeemable","mergeable","title","slug","outcome","outcomeIndex"],additionalProperties:!1},description:"Positions"}},required:["items"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"prediction-market_position_redeem",description:"Redeem winning prediction market positions after a market has resolved.",inputSchema:{$ref:"#/definitions/prediction-market_position_redeem_input",definitions:{"prediction-market_position_redeem_input":{type:"object",properties:{provider:{type:"string",enum:["polymarket","kalshi"],description:"Prediction market provider"},asset:{type:"string",description:"Outcome token mint address (Kalshi) or condition ID (Polymarket)"},wallet:{type:"string",description:"Wallet address that holds the position"},size:{type:["number","null"],default:null,description:"Number of shares to redeem (null = all)"}},required:["provider","asset","wallet"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/prediction-market_position_redeem_output",definitions:{"prediction-market_position_redeem_output":{type:"object",properties:{success:{type:"boolean",description:"Whether the redemption succeeded or transaction was built"},transactionHash:{type:["string","null"],description:"On-chain transaction hash (Polymarket)"},transaction:{anyOf:[{type:"object",properties:{type:{type:"string",const:"solana"},base64:{type:"string",description:"Base64-encoded Solana transaction"},lastValidBlockHeight:{type:"number"}},required:["type","base64","lastValidBlockHeight"],additionalProperties:!1},{type:"null"}],description:"Solana transaction to sign (Kalshi only, null for Polymarket)"}},required:["success","transactionHash","transaction"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"prediction-market_position_sell",description:"Sell shares of a prediction market outcome. Places a limit order at the specified price.",inputSchema:{$ref:"#/definitions/prediction-market_position_sell_input",definitions:{"prediction-market_position_sell_input":{type:"object",properties:{provider:{type:"string",enum:["polymarket","kalshi"],description:"Prediction market provider"},wallet:{type:"string",description:"Wallet address placing the order"},tokenId:{type:"string",description:"Outcome token ID to sell (from outcomeTokens[].tokenId)"},price:{type:"number",description:"Price per share (0-1)"},size:{type:"number",description:"Number of shares to sell"}},required:["provider","wallet","tokenId","price","size"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/prediction-market_position_sell_output",definitions:{"prediction-market_position_sell_output":{type:"object",properties:{orderId:{type:["string","null"],description:"Order ID (set for Polymarket, null for Kalshi until signed)"},status:{type:"string",description:"Order status (live, matched, delayed, unmatched, pending_signature)"},transactionHashes:{type:"array",items:{type:"string"},description:"On-chain transaction hashes"},transaction:{anyOf:[{type:"object",properties:{type:{type:"string",const:"solana"},base64:{type:"string",description:"Base64-encoded Solana transaction"},lastValidBlockHeight:{type:"number"}},required:["type","base64","lastValidBlockHeight"],additionalProperties:!1},{type:"null"}],description:"Solana transaction to sign (Kalshi only, null for Polymarket)"}},required:["orderId","status","transactionHashes","transaction"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"prediction-market_trade_list",description:"List trade history for a wallet address on prediction markets. Shows buys, sells, prices, and timestamps.",inputSchema:{$ref:"#/definitions/prediction-market_trade_list_input",definitions:{"prediction-market_trade_list_input":{type:"object",properties:{provider:{type:"string",enum:["polymarket","kalshi"],description:"Prediction market provider"},wallet:{type:"string",description:"Wallet address"},limit:{type:["number","null"],description:"Max results (default 100)"},page:{type:["number","null"],description:"Page number, starts at 1 (default 1)"}},required:["provider","wallet","limit","page"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/prediction-market_trade_list_output",definitions:{"prediction-market_trade_list_output":{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{side:{type:"string",description:"Trade side (BUY or SELL)"},asset:{type:"string",description:"Token ID (CLOB token or mint address)"},conditionId:{type:["string","null"],default:null,description:"Condition ID"},size:{type:"number",description:"Number of shares"},price:{type:"number",description:"Price per share"},fee:{type:["number","null"],default:null,description:"Trading fee"},timestamp:{type:"number",description:"Trade timestamp (unix)"},title:{type:["string","null"],default:null,description:"Event title"},slug:{type:["string","null"],default:null,description:"Event slug"},outcome:{type:"string",description:"Outcome name"},outcomeIndex:{type:"number",description:"Outcome index"},transactionHash:{type:["string","null"],default:null,description:"On-chain transaction hash"},orderId:{type:["string","null"],default:null,description:"Order ID"}},required:["side","asset","size","price","timestamp","outcome","outcomeIndex"],additionalProperties:!1},description:"Trade history"}},required:["items"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"prediction-market_user_create",description:"Register a wallet with a prediction market provider. Required before placing orders.",inputSchema:{$ref:"#/definitions/prediction-market_user_create_input",definitions:{"prediction-market_user_create_input":{type:"object",properties:{provider:{type:"string",enum:["polymarket","kalshi"],description:"Prediction market provider"},wallet:{type:"string",description:"Wallet address to register"}},required:["provider","wallet"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/prediction-market_user_create_output",definitions:{"prediction-market_user_create_output":{type:"object",properties:{userId:{type:"string",description:"User ID (EVM address or Solana pubkey)"},proxyWallet:{type:["string","null"],default:null,description:"Provider proxy wallet address"}},required:["userId"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"refresh",description:"Refresh an expired access token using a refresh token. Use when the current access token has expired and you have a valid refresh token",inputSchema:{$ref:"#/definitions/refresh_input",definitions:{refresh_input:{type:"object",properties:{refreshToken:{type:"string",description:"Token from a previous login or refresh response"}},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",description:"New JWT access token for authenticated API requests"},refreshToken:{type:"string",description:"New refresh token (replaces the previous one)"},expiresAt:{type:"number",description:"Unix timestamp in seconds when the new access token expires"}},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",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",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},{type:"object",properties:{type:{type:"string",const:"tron"},rawDataHex:{type:"string",description:"Hex-encoded raw transaction data for signing"},rawData:{description:"Protobuf JSON structure for broadcast"},txID:{type:"string",description:"Transaction ID (SHA-256 of raw_data_hex)"},visible:{type:"boolean"}},required:["type","rawDataHex"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"ton"},boc:{type:"string",description:"Base64-encoded BOC (Bag of Cells) for signing and broadcast"}},required:["type","boc"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"filecoin"},to:{type:"string",description:"Destination f1 address"},value:{type:"string",description:"Amount in attoFIL"}},required:["type","to","value"],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",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",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_check",description:"Check a token for safety risks \u2014 holder concentration, liquidity, and community warnings. Returns a risk summary.",inputSchema:{$ref:"#/definitions/token_check_input",definitions:{token_check_input:{type:"object",properties:{token:{type:"string",description:"Token contract address"},chain:{type:"string",description:"Blockchain (e.g. 'solana', 'ethereum', 'base')"}},required:["token","chain"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/token_check_output",definitions:{token_check_output:{type:"object",properties:{token:{type:"object",properties:{address:{type:"string"},name:{type:["string","null"]},symbol:{type:["string","null"]},chain:{type:"string"}},required:["address","name","symbol","chain"],additionalProperties:!1},holderConcentration:{type:"object",properties:{top10Percent:{type:["number","null"]}},required:["top10Percent"],additionalProperties:!1},liquidity:{type:"object",properties:{total:{type:["number","null"]},locked:{type:["number","null"]}},required:["total","locked"],additionalProperties:!1},communityNotes:{type:"array",items:{type:"string"}},risks:{type:"array",items:{type:"string"}}},required:["token","holderConcentration","liquidity","communityNotes","risks"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"token_holder_list",description:"Find wallets holding a specific token, ranked by profitability. Use to identify smart money on a token",inputSchema:{$ref:"#/definitions/token_holder_list_input",definitions:{token_holder_list_input:{type:"object",properties:{token:{type:"string",description:"Contract address of the token to look up holders for"},chain:{type:"string",description:"Blockchain network (e.g. 'solana', 'ethereum', 'base')"},limit:{type:["number","null"],description:"Maximum number of results to return, or null for the default (10)"}},required:["token","chain","limit"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/token_holder_list_output",definitions:{token_holder_list_output:{type:"object",properties:{wallets:{type:"array",description:"List of wallet objects holding the token, ranked by profitability"}},required:["wallets"],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",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",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",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",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",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},{type:"object",properties:{type:{type:"string",const:"tron"},rawDataHex:{type:"string",description:"Hex-encoded raw transaction data for signing"},rawData:{description:"Protobuf JSON structure for broadcast"},txID:{type:"string",description:"Transaction ID (SHA-256 of raw_data_hex)"},visible:{type:"boolean"}},required:["type","rawDataHex"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"ton"},boc:{type:"string",description:"Base64-encoded BOC (Bag of Cells) for signing and broadcast"}},required:["type","boc"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"filecoin"},to:{type:"string",description:"Destination f1 address"},value:{type:"string",description:"Amount in attoFIL"}},required:["type","to","value"],additionalProperties:!1}]},message:{type:"string",description:"Human-readable description of the transfer"},requiresApproval:{type:"boolean",description:"Whether a token approval transaction is needed first"},transactionId:{type:["string","null"],description:"Transaction ID for tracking with swaps.xyz (null for Solana transfers)"}},required:["transaction","message","requiresApproval","transactionId"],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",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",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",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_prepare",description:"Build a serialized unsigned EVM transaction from raw parameters. Estimates gas, nonce, and fees server-side using Alchemy RPCs.",inputSchema:{$ref:"#/definitions/transaction_prepare_input",definitions:{transaction_prepare_input:{type:"object",properties:{chain:{type:"string",description:"Chain name (e.g. 'base', 'ethereum', 'polygon')"},sender:{type:"string",description:"Sender wallet address (0x-prefixed)"},to:{type:"string",description:"Destination address (contract or recipient)"},data:{type:"string",description:"Calldata hex string (0x for native transfers)"},value:{type:"string",description:"Native token value in wei (as string)"}},required:["chain","sender","to","data","value"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/transaction_prepare_output",definitions:{transaction_prepare_output:{type:"object",properties:{serializedTx:{type:"string",description:"RLP-encoded unsigned EIP-1559 transaction (hex)"},chainId:{type:"number",description:"EVM chain ID"},nonce:{type:"number",description:"Sender nonce used"},gas:{type:"string",description:"Estimated gas limit"},maxFeePerGas:{type:"string",description:"Max fee per gas in wei"},maxPriorityFeePerGas:{type:"string",description:"Max priority fee per gas in wei"}},required:["serializedTx","chainId","nonce","gas","maxFeePerGas","maxPriorityFeePerGas"],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",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, Bitcoin, and Tron.",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, JSON {raw_data_hex, signature} for Tron"},message:{type:"string",description:"Human-readable message describing the transaction"},chain:{type:"string",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 6-digit OTP login code sent via email. Use after calling the login tool to complete authentication",inputSchema:{$ref:"#/definitions/verify_input",definitions:{verify_input:{type:"object",properties:{code:{type:"string",pattern:"^\\d{6}$",description:"Six-digit OTP from the verification email"},email:{type:"string",format:"email",description:"Address 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",description:"JWT access token for authenticated API requests"},refreshToken:{type:"string",description:"Refresh token used to obtain a new access token when it expires"},expiresAt:{type:"number",description:"Unix timestamp in seconds when the access token expires"}},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/KYB verification",inputSchema:{$ref:"#/definitions/virtual-account_create_input",definitions:{"virtual-account_create_input":{type:"object",properties:{customerType:{anyOf:[{type:"string",enum:["Person","Business"]},{type:"null"}],description:"Account type: Person for individuals (KYC), Business for companies (KYB). Defaults to Person."}},required:["customerType"],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",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},{type:"object",properties:{type:{type:"string",const:"tron"},rawDataHex:{type:"string",description:"Hex-encoded raw transaction data for signing"},rawData:{description:"Protobuf JSON structure for broadcast"},txID:{type:"string",description:"Transaction ID (SHA-256 of raw_data_hex)"},visible:{type:"boolean"}},required:["type","rawDataHex"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"ton"},boc:{type:"string",description:"Base64-encoded BOC (Bag of Cells) for signing and broadcast"}},required:["type","boc"],additionalProperties:!1},{type:"object",properties:{type:{type:"string",const:"filecoin"},to:{type:"string",description:"Destination f1 address"},value:{type:"string",description:"Amount in attoFIL"}},required:["type","to","value"],additionalProperties:!1}]},message:{type:"string",description:"Human-readable description of the transfer"},requiresApproval:{type:"boolean",description:"Whether a token approval transaction is needed first"},transactionId:{type:["string","null"],description:"Transaction ID for tracking with swaps.xyz (null for Solana transfers)"}},required:["transaction","message","requiresApproval","transactionId"],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",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:{type:["string","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",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#"}},{name:"wallet_activity_list",description:"List recent activity (swaps, transfers, mints, burns) for a wallet address on a given chain.",inputSchema:{$ref:"#/definitions/wallet_activity_list_input",definitions:{wallet_activity_list_input:{type:"object",properties:{wallet:{type:"string",description:"Wallet address"},chain:{type:"string",description:"Chain to query"},limit:{type:"integer",minimum:1,maximum:100,description:"Number of events to return"},cursor:{type:["string","null"],description:"Pagination cursor from previous response"}},required:["wallet","chain","limit","cursor"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/wallet_activity_list_output",definitions:{wallet_activity_list_output:{type:"object",properties:{trades:{type:"array",items:{type:"object",properties:{type:{type:"string",enum:["buy","sell"],description:"Trade direction from maker perspective"},date:{type:"string",format:"date-time",description:"Date and time of the trade"},trader:{type:"string",description:"Address of the trader"},input:{type:"object",properties:{address:{type:"string",description:"Address of the input token"},symbol:{type:"string",description:"Symbol of the input token"},amount:{type:"number",description:"Raw amount of input token (smallest unit)"},amountUsd:{type:"number",description:"USD value of the swap"}},required:["address","symbol","amount","amountUsd"],additionalProperties:!1},output:{type:"object",properties:{address:{type:"string",description:"Address of the output token"},symbol:{type:"string",description:"Symbol of the output token"},amount:{type:"number",description:"Raw amount of output token (smallest unit)"},amountUsd:{type:"number",description:"USD value of the swap"}},required:["address","symbol","amount","amountUsd"],additionalProperties:!1},signature:{type:"string",description:"Transaction signature/hash"}},required:["type","date","trader","input","output","signature"],additionalProperties:!1}},cursor:{type:["string","null"],description:"Cursor for next page, null if no more"}},required:["trades","cursor"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"wallet_discover",description:"Discover top-performing wallets by PnL, win rate, or volume. Use to find smart money on any chain",inputSchema:{$ref:"#/definitions/wallet_discover_input",definitions:{wallet_discover_input:{type:"object",properties:{chain:{type:"string",description:"Blockchain network (e.g. 'solana', 'ethereum', 'base')"},ranking:{type:["string","null"],description:"What to rank wallets by: 'pnl', 'winRate', or 'volume', or null for the default (pnl)"},limit:{type:["number","null"],description:"Maximum number of results to return, or null for the default (10)"}},required:["chain","ranking","limit"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/wallet_discover_output",definitions:{wallet_discover_output:{type:"object",properties:{wallets:{type:"array",description:"List of top-performing wallet objects ranked by the chosen metric"}},required:["wallets"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}},{name:"wallet_pnl_retrieve",description:"Retrieve a wallet's trading performance including PnL, win rate, volume, and portfolio value over time",inputSchema:{$ref:"#/definitions/wallet_pnl_retrieve_input",definitions:{wallet_pnl_retrieve_input:{type:"object",properties:{wallet:{type:"string",description:"On-chain address to profile"},chain:{type:"string",description:"Blockchain network (e.g. 'solana', 'ethereum', 'base')"}},required:["wallet","chain"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},outputSchema:{$ref:"#/definitions/wallet_pnl_retrieve_output",definitions:{wallet_pnl_retrieve_output:{type:"object",properties:{wallet:{type:"string",description:"On-chain address that was queried"},chain:{type:"string",description:"Blockchain network the address was queried on"},stats:{anyOf:[{},{type:"null"}],description:"Aggregated trading performance stats for the wallet, or null if unavailable"},chart:{anyOf:[{type:"array",items:{type:"object",properties:{timestamp:{type:"number",description:"Unix timestamp in seconds for this data point"},value:{type:"number",description:"Portfolio value at this timestamp"}},required:["timestamp","value"],additionalProperties:!1}},{type:"null"}],description:"Time-series portfolio value data for charting, or null if unavailable"}},required:["wallet","chain","chart"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"}}];var Ri="https://www.moonpay.com/legal/terms_of_use_europe_hypermint",Ei="https://www.moonpay.com/legal/privacy_policy",Oi="https://swaps.xyz/terms",Xe=` Terms of Use: ${Ri}
|
|
3
|
+
Privacy Policy: ${Ei}
|
|
4
|
+
Swaps by: ${Oi}`;import*as ct from"fs";import*as pt from"os";import*as dt from"path";var c=e=>e;function Q(e){switch(e.type){case"solana":return e.base64;case"tron":return JSON.stringify(e);case"ton":return e.boc;case"filecoin":return JSON.stringify(e);case"evm":return JSON.stringify(e);default:return JSON.stringify(e)}}var p=(e,t)=>({schema:e,handler:async i=>{let r=e.input.parse(i),n=await t(r);return e.output.parse(n)}});import{z as de}from"zod";var et=c({name:"consent_check",description:"Check whether the MoonPay Terms of Use have been accepted. Throws if not accepted",input:de.object({}),output:de.object({accepted:de.literal(!0).describe("Always true \u2014 throws an error if not accepted"),tosVersion:de.string().describe("Version of the accepted Terms of Use"),acceptedAt:de.string().describe("Acceptance timestamp in ISO-8601 format")})});import*as Z from"fs";import*as ot from"os";import*as at from"path";import*as st from"crypto";import{z as ke}from"zod";var tt=c({name:"consent_accept",description:"Accept the MoonPay Terms of Use. Required before using any CLI command",input:ke.object({}),output:ke.object({tosVersion:ke.string().describe("Version of the Terms of Use that was accepted"),acceptedAt:ke.string().describe("Acceptance timestamp in ISO-8601 format")})});Y();Ee();import*as ve from"os";var it=3e3;function rt(e){let t=ce(),i=JSON.stringify({agentId:e.agentId,tosVersion:e.tosVersion,cliVersion:e.cliVersion,nodeVersion:process.version,os:ve.platform(),arch:ve.arch()});fetch(`${t}/api/tools/cli_activation_create`,{method:"POST",headers:Ie(),body:i,signal:AbortSignal.timeout(it)}).catch(()=>{})}async function nt(e){let t=ce(),i=await ge();i&&fetch(`${t}/api/tools/cli_activation_update`,{method:"POST",headers:{...Ie(),Authorization:`Bearer ${i}`},body:JSON.stringify({agentId:e}),signal:AbortSignal.timeout(it)}).catch(()=>{})}Y();Ee();var Te=at.join(ot.homedir(),".config","moonpay","consent.json");function Ni(){try{return JSON.parse(Z.readFileSync(Te,"utf-8"))}catch{return null}}var Se=p(tt,async()=>{Oe();let t=Ni()?.agentId??st.randomUUID(),i=new Date().toISOString(),r={tosVersion:"1.2",acceptedAt:i,agentId:t},n=Te+`.tmp.${process.pid}`;return Z.writeFileSync(n,JSON.stringify(r,null,2),{encoding:"utf-8",mode:384}),Z.renameSync(n,Te),process.stderr.write(`
|
|
5
|
+
By using this CLI, you agree to:
|
|
6
|
+
${Xe}
|
|
7
|
+
|
|
8
|
+
`),rt({agentId:t,tosVersion:"1.2",cliVersion:Re}),{tosVersion:r.tosVersion,acceptedAt:r.acceptedAt}});var Bi=dt.join(pt.homedir(),".config","moonpay","consent.json"),lt=p(et,async()=>{let e=null;try{e=JSON.parse(ct.readFileSync(Bi,"utf-8"))}catch{}if(!e||e.tosVersion!=="1.2"){let t=await Se.handler({});return{accepted:!0,tosVersion:t.tosVersion,acceptedAt:t.acceptedAt}}return{accepted:!0,tosVersion:e.tosVersion,acceptedAt:e.acceptedAt}});import{z as M}from"zod";var ut=c({name:"wallet_create",description:"Create a new multi-chain HD wallet. Generates a BIP39 mnemonic and derives addresses for Solana, Ethereum, Bitcoin, and Tron. The mnemonic is copied to clipboard (interactive) or omitted (headless). Keys are encrypted with a random key stored in the OS keychain",input:M.object({name:M.string().describe("Human-readable label for the new wallet")}),output:M.object({name:M.string().describe("Assigned wallet name"),addresses:M.record(M.string(),M.string()).describe("Derived addresses keyed by chain")})});var mt=p(ut,async e=>{let t=We(e.name);return{name:t.name,addresses:x(t.addresses)}});import{createInterface as Li}from"readline";import{validateMnemonic as ht}from"@scure/bip39";import{wordlist as ft}from"@scure/bip39/wordlists/english";import{z as N}from"zod";var yt=c({name:"wallet_import",description:"Import a wallet from a BIP39 mnemonic (HD, all chains) or a single private key (one chain). Provide either --mnemonic or --key, not both",input:N.object({name:N.string().describe("Human-readable label for the imported wallet"),mnemonic:N.string().nullable().describe("BIP-39 mnemonic seed phrase for HD wallet import. Null when using --key instead"),key:N.string().nullable().describe("Private key (base58 for Solana, hex for EVM/Bitcoin). Null when using --mnemonic instead"),chain:N.string().nullable().describe("Target chain for single-key import. Null defaults to solana. Ignored for mnemonic imports")}),output:N.object({name:N.string().describe("Assigned wallet name"),type:N.enum(["hd","imported"]).describe("Wallet type: hd (from mnemonic) or imported (from private key)"),addresses:Me})});function Mi(e){return new Promise((t,i)=>{if(!process.stdin.isTTY){i(new Error("Interactive import requires a terminal. Pass --mnemonic or --key instead."));return}let r=Li({input:process.stdin,output:process.stderr});process.stderr.write(e),process.stdin.setRawMode(!0);let n="",o=a=>{let s=a.toString();s===`
|
|
9
|
+
`||s==="\r"?(process.stdin.setRawMode(!1),process.stdin.removeListener("data",o),process.stderr.write(`
|
|
10
|
+
`),r.close(),t(n.trim())):s===""?(process.stdin.setRawMode(!1),r.close(),process.exit(0)):s==="\x7F"||s==="\b"?n=n.slice(0,-1):n+=s};process.stdin.on("data",o)})}function Hi(e){let t=e.split(/\s+/);return t.length>=12&&t.length<=24&&ht(e,ft)?"mnemonic":"key"}var gt=p(yt,async e=>{if(e.mnemonic&&e.key)throw new Error("Provide either --mnemonic or --key, not both.");let t=e.mnemonic,i=e.key;if(!t&&!i){let a=await Mi("Paste your mnemonic or private key (hidden): ");if(!a)throw new Error("No input provided.");Hi(a)==="mnemonic"?t=a:i=a}if(t){let a=t.trim().toLowerCase();if(!ht(a,ft))throw new Error("Invalid BIP39 mnemonic.");let s=ze(e.name,a);return{name:s.name,type:"hd",addresses:s.addresses}}let r=i??"",n;if(r.startsWith("0x"))n=r.slice(2);else if(/^[0-9a-fA-F]{64,128}$/.test(r))n=r;else try{let{default:a}=await import("bs58"),s=a.decode(r),d=s.length===64?s.slice(0,32):s;n=Buffer.from(d).toString("hex")}catch{throw new Error("Invalid private key. Expected hex or base58-encoded key.")}let o=Fe(e.name,n);return{name:o.name,type:"imported",addresses:o.addresses}});import{z as bt}from"zod";var _t=c({name:"wallet_list",description:"List all local wallets with their addresses and types. Use to see available wallets before signing or transferring",input:bt.object({}),output:bt.array(be)});var kt=p(_t,async()=>Ve().map(e=>({name:e.name,type:e.type,...e.type==="hardware"?{device:e.device}:{},addresses:x(e.addresses),createdAt:e.createdAt})));import{z as vt}from"zod";var wt=c({name:"wallet_retrieve",description:"Get details of a specific local wallet including all chain addresses. Use to look up addresses before sending or receiving",input:vt.object({wallet:vt.string().describe("Wallet name or on-chain address")}),output:be});var g=p(wt,async e=>{let t=_(e.wallet);return{name:t.name,type:t.type,addresses:x(t.addresses),createdAt:t.createdAt}});import{z as X}from"zod";var St=c({name:"wallet_delete",description:"Permanently delete a local wallet and its private key file. Use when a wallet is no longer needed \u2014 this action cannot be undone",input:X.object({wallet:X.string().describe("Wallet name or address to delete"),confirm:X.boolean().describe("Set to true to confirm irreversible deletion")}),output:X.object({name:X.string().describe("Name of the deleted wallet"),deleted:X.literal(!0).describe("Always true on success")})});var Pt=p(St,async e=>{if(!e.confirm)throw new Error("Back up your wallet before deleting! Run `mp wallet export "+e.wallet+"` to save your recovery phrase, then re-run with --confirm to permanently delete.");let t=_(e.wallet);return Ge(t.name),{name:t.name,deleted:!0}});import{z as ee}from"zod";var jt=c({name:"wallet_rename",description:"Rename a local wallet. Use to update the display label without changing keys or addresses",input:ee.object({wallet:ee.string().describe("Current wallet name or address"),name:ee.string().describe("New display name for the wallet")}),output:ee.object({oldName:ee.string().describe("Previous wallet name"),newName:ee.string().describe("Updated wallet name")})});var It=p(jt,async e=>{let i=_(e.wallet).name;return i===e.name?{oldName:i,newName:e.name}:(Ke(i,e.name),{oldName:i,newName:e.name})});import{z as le}from"zod";var Ct=c({name:"wallet_export",description:"Export wallet secret (mnemonic or private key). For HD wallets, optionally pass --chain to export a chain-specific private key instead of the mnemonic. Interactive only \u2014 cannot be run by agents or piped",input:le.object({wallet:le.string().describe("Wallet name or address to export"),chain:le.string().nullable().describe("Derive and export the private key for this chain (HD wallets only). Without this flag, HD wallets export the mnemonic")}),output:le.object({exported:le.literal(!0).describe("Always true on success \u2014 secret is printed to terminal, not returned")})});import Wi from"bs58";import zi from"ecpair";import*as Fi from"@bitcoinerlab/secp256k1";var Vi=zi(Fi);function Gi(e,t){switch(t){case"evm":case"tron":return"0x"+Buffer.from(e).toString("hex");case"solana":return Wi.encode(e);case"bitcoin":return Vi.fromPrivateKey(Buffer.from(e)).toWIF();case"ton":return Buffer.from(e).toString("hex");default:return Buffer.from(e).toString("hex")}}var Tt=p(Ct,async e=>{if(!process.stdout.isTTY)throw new Error(`Wallet export requires an interactive terminal.
|
|
11
|
+
Run this command directly in your terminal: mp wallet export `+e.wallet);let t=_(e.wallet);if(t.type==="hardware")throw new Error(`Wallet "${t.name}" is a hardware wallet (${t.device}). There are no secrets to export \u2014 keys live on the device.`);let i=Je(t.name),r=i.includes(" ");if(e.chain){if(!r)return process.stderr.write(`
|
|
12
|
+
Wallet "${t.name}" is an imported single-key wallet.
|
|
13
|
+
The --chain flag is only meaningful for HD wallets. Exporting the key as-is.
|
|
14
|
+
|
|
15
|
+
`),process.stderr.write(`Private key for "${t.name}":
|
|
16
|
+
|
|
17
|
+
`),process.stderr.write(` ${i}
|
|
18
|
+
|
|
19
|
+
`),{exported:!0};let{moonpay:n}=await import("./client-EY2ZLUVZ.js"),a=(await n.chain.retrieve({chain:e.chain})).keyFamily,{privateKey:s,address:d}=He(i,a),m=Gi(s,a);return process.stderr.write(`
|
|
20
|
+
Derived ${e.chain} private key for "${t.name}":
|
|
21
|
+
|
|
22
|
+
`),process.stderr.write(` Chain: ${e.chain}${e.chain!==a?` (${a})`:""}
|
|
23
|
+
`),process.stderr.write(` Address: ${d}
|
|
24
|
+
`),process.stderr.write(` Private key: ${m}
|
|
25
|
+
|
|
26
|
+
`),{exported:!0}}return r?(process.stderr.write(`
|
|
27
|
+
Mnemonic for "${t.name}":
|
|
28
|
+
|
|
29
|
+
`),process.stderr.write(` ${i}
|
|
30
|
+
|
|
31
|
+
`),process.stderr.write(`Write this down and store it securely.
|
|
32
|
+
|
|
33
|
+
`)):(process.stderr.write(`
|
|
34
|
+
Private key for "${t.name}":
|
|
35
|
+
|
|
36
|
+
`),process.stderr.write(` ${i}
|
|
37
|
+
|
|
38
|
+
`)),{exported:!0}});function Ki(){return{async connect(){let{connectLedger:e}=await import("./ledger-VU3WR7HI.js");await e()},async disconnect(){let{disconnectLedger:e}=await import("./ledger-VU3WR7HI.js");await e()},async getAllAddresses(){let{ledgerGetAllAddresses:e}=await import("./ledger-VU3WR7HI.js");return e()},async signTransaction(e,t){let{ledgerSignTransaction:i}=await import("./ledger-VU3WR7HI.js");return i(e,t)},async signMessage(e,t){let{ledgerSignMessage:i}=await import("./ledger-VU3WR7HI.js");return i(e,t)}}}var Ji={ledger:Ki};function B(e){return Ji[e]()}import{z as H}from"zod";var Dt=c({name:"wallet_hardware_add",description:"Add a hardware wallet (e.g. Ledger). Connects to the device, derives addresses for all chains, and saves the wallet. No secrets are stored \u2014 signing happens on the device",input:H.object({name:H.string().describe("Human-readable label for the hardware wallet"),device:Ce.describe("Hardware device type: ledger")}),output:H.object({name:H.string().describe("Assigned wallet name"),device:Ce.describe("Connected device type"),addresses:H.record(H.string(),H.string()).describe("Derived addresses keyed by chain")})});var At=p(Dt,async e=>{let t=B(e.device);await t.connect();try{let i=await t.getAllAddresses();return Ye({name:e.name,type:"hardware",device:e.device,addresses:i,createdAt:new Date().toISOString()}),{name:e.name,device:e.device,addresses:x(i)}}finally{await t.disconnect()}});import{z as W}from"zod";var xt=c({name:"wallet_hardware_refresh",description:"Re-derive addresses from a connected hardware wallet. Use after changing accounts or connecting a new device",input:W.object({wallet:W.string().describe("Hardware wallet name or address")}),output:W.object({name:W.string().describe("Hardware wallet name"),addresses:W.record(W.string(),W.string()).describe("Re-derived addresses keyed by chain")})});var qt=p(xt,async e=>{let t=_(e.wallet);if(t.type!=="hardware")throw new Error(`Wallet "${t.name}" is not a hardware wallet. Only hardware wallets can be refreshed from a device.`);let i=B(t.device);await i.connect();try{let r=await i.getAllAddresses();return Qe(t.name,r),{name:t.name,addresses:x(r)}}finally{await i.disconnect()}});import{VersionedTransaction as Yi}from"@solana/web3.js";import{serializeTransaction as Ut}from"viem";import*as Qi from"@bitcoinerlab/secp256k1";import{z as te}from"zod";var $t=c({name:"transaction_sign",description:"Sign a transaction with a local wallet. Supports Solana, EVM, Bitcoin (PSBT), Tron, TON, and Filecoin transactions",input:te.object({wallet:te.string().describe("Local wallet name or address to sign with"),chain:te.string().describe("Chain determining the transaction format and signing algorithm"),transaction:te.string().describe("Base64-encoded unsigned transaction bytes")}),output:te.object({transaction:te.string().describe("Base64-encoded signed transaction ready for broadcast")})});var k=p($t,async e=>{let t=_(e.wallet),i=e.chain,n=(await u.chain.retrieve({chain:i})).keyFamily;if(t.type==="hardware"){let o=B(t.device);await o.connect();try{let a=e.transaction.trim();if(n==="evm"&&a.startsWith("{")){let s=t.addresses.ethereum;if(!s)throw new Error("Hardware wallet has no Ethereum address");a=await buildUnsignedEvmTx(a,s)}return await o.signTransaction(i,a)}finally{await o.disconnect()}}switch(n){case"solana":return Zi(t.name,e.transaction.trim());case"evm":return er(t,i,e.transaction.trim());case"tron":return tr(t.name,e.transaction.trim());case"bitcoin":return or(t,i,e.transaction.trim());case"ton":return ar(t,e.transaction.trim());case"filecoin":return nr(t,e.transaction.trim());default:throw new Error(`Unsupported key family for transaction signing: ${n}`)}});function Zi(e,t){let i=Buffer.from(t,"base64"),r=Yi.deserialize(i),n=Buffer.from(r.message.serialize()).toString("hex"),o=q(e,"solana",n,"hex");return r.signatures[0]=Uint8Array.from(Buffer.from(o.signature,"hex")),{transaction:Buffer.from(r.serialize()).toString("base64")}}function Xi(e){return{r:`0x${e.signature.slice(0,64)}`,s:`0x${e.signature.slice(64,128)}`,yParity:e.recoveryId??0}}async function er(e,t,i){let r;if(i.startsWith("{")){let{to:m,data:l,value:y}=JSON.parse(i);r=(await u.transaction.prepare({chain:t,sender:e.addresses.ethereum,to:m,data:l??"0x",value:y??"0"})).serializedTx}else r=i.startsWith("0x")?i:`0x${Buffer.from(i,"base64").toString("hex")}`;let{parseTransaction:n}=await import("viem"),o=n(r),a=Ut(o),s=a.startsWith("0x")?a.slice(2):a,d=_e(e.name,"ethereum",s);return{transaction:Ut(o,Xi(d))}}function tr(e,t){let i=JSON.parse(t),r=(i.rawDataHex??i.raw_data_hex??t).replace(/^0x/,""),n=_e(e,"tron",r),o=n.signature.slice(0,128),a=n.recoveryId!=null?(n.recoveryId+27).toString(16).padStart(2,"0"):"1b";return{transaction:JSON.stringify({raw_data_hex:r,raw_data:i.rawData??i.raw_data,txID:i.txID,visible:i.visible,signature:o+a})}}var ir="https://api.node.glif.io/rpc/v1";async function Rt(e,t){let r=await(await fetch(ir,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:e,params:t})})).json();if(r.error)throw new Error(`Filecoin RPC error: ${r.error.message}`);return r.result}function rr(e){let t="abcdefghijklmnopqrstuvwxyz234567",i=e.startsWith("b")?e.slice(1):e,r=0n,n=0,o=[];for(let m of i){let l=t.indexOf(m);if(l!==-1)for(r=r<<5n|BigInt(l),n+=5;n>=8;)n-=8,o.push(Number(r>>BigInt(n)&0xffn))}let a=Buffer.from(o),s=2,d=0;for(;s<a.length&&a[s]&128;)s++,d+=7;for(s++;s<a.length&&a[s]&128;)s++;return s++,a.slice(s,s+32)}async function nr(e,t){let i;try{i=JSON.parse(t)}catch{let R=t.startsWith("0x")?t.slice(2):t,A=_e(e.name,"filecoin",R),ne=A.signature.slice(0,128),oe=A.recoveryId??0;return{transaction:JSON.stringify({signedMessage:R,signature:ne+oe.toString(16).padStart(2,"0")})}}let r=e.addresses?.filecoin;if(!r)throw new Error("Wallet has no Filecoin address");let n=await Rt("Filecoin.MpoolGetNonce",[r]),o={Version:0,To:i.to,From:r,Nonce:n,Value:i.value,GasLimit:0,GasFeeCap:"0",GasPremium:"0",Method:0,Params:""},a=await Rt("Filecoin.GasEstimateMessageGas",[o,{MaxFee:"0"},[]]),s=a.CID["/"],d=rr(s),m=Buffer.from("0171a0e40220","hex"),y=Buffer.concat([m,d]).toString("hex"),f=q(e.name,"filecoin",y,"hex"),S=f.signature.slice(0,128),I=f.recoveryId??0,C=S+I.toString(16).padStart(2,"0"),{CID:U,...J}=a;return{transaction:JSON.stringify({Message:J,Signature:{Type:1,Data:Buffer.from(C,"hex").toString("base64")}})}}async function or(e,t,i){let{privateKey:r}=await pe(e,t),n=await import("bitcoinjs-lib"),o=(await import("ecpair")).default,s=o(Qi).fromPrivateKey(Buffer.from(r)),d=n.Psbt.fromBase64(i);return d.signAllInputs(s),d.finalizeAllInputs(),{transaction:d.toBase64()}}var Et="https://tonapi.io";async function ar(e,t){let{WalletContractV5R1:i,internal:r}=await import("@ton/ton"),{keyPairFromSeed:n}=await import("@ton/crypto"),{beginCell:o,storeMessage:a,external:s,toNano:d,Address:m,SendMode:l}=await import("@ton/core"),{privateKey:y}=await pe(e,"ton"),f=JSON.parse(t),S=f.boc?JSON.parse(f.boc):f,I=y.slice(0,32),C=n(Buffer.from(I)),U=i.create({publicKey:Buffer.from(C.publicKey)}),J=U.address.toString({bounceable:!1}),R=0;try{let ae=await fetch(`${Et}/v2/blockchain/accounts/${J}/methods/seqno`);if(ae.ok){let he=await ae.json(),se=he.stack?.[0]?.num;R=se?parseInt(se,16):he.decoded?.state??he.decoded?.seqno??0}}catch{}let A=S.token,ne=!A||A==="0x0000000000000000000000000000000000000000"||A==="EQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAM9c",oe;if(ne)oe=r({to:S.to,value:BigInt(S.value),bounce:!1});else{let ae=await fetch(`${Et}/v2/accounts/${J}/jettons/${A}`);if(!ae.ok)throw new Error("Failed to resolve Jetton wallet address");let se=(await ae.json()).wallet_address?.address;if(!se)throw new Error("Jetton wallet not found");let $i=o().storeUint(260734629,32).storeUint(0,64).storeCoins(BigInt(S.value)).storeAddress(m.parse(S.to)).storeAddress(U.address).storeUint(0,1).storeCoins(d("0.01")).storeUint(0,1).endCell();oe=r({to:m.parse(se),value:d("0.1"),body:$i,bounce:!0})}let Ai=U.createTransfer({seqno:R,secretKey:Buffer.from(C.secretKey),sendMode:l.PAY_GAS_SEPARATELY|l.IGNORE_ERRORS,messages:[oe]}),xi=R>0,qi=s({to:U.address,init:xi?void 0:U.init,body:Ai});return{transaction:o().store(a(qi)).endCell().toBoc().toString("base64")}}import sr from"bs58";import{z}from"zod";var Ot=c({name:"message_sign",description:"Sign a message with a local wallet. Supports EIP-191 (plain text) and EIP-712 (typed data) for EVM, Solana (ed25519), Bitcoin, Tron, TON, and Filecoin",input:z.object({wallet:z.string().describe("Local wallet name or address to sign with"),chain:z.string().describe("Chain determining the signing algorithm and key to use"),message:z.string().nullable().describe("Plain text message to sign (EIP-191 for EVM). Null when using --typed-data instead"),typedData:z.string().nullable().describe("EIP-712 typed data as JSON string with { domain, types, primaryType, message }. EVM chains only. Null for plain text signing")}),output:z.object({signature:z.string().describe("Encoded signature: base58 for Solana, hex (0x-prefixed) for EVM/Bitcoin")})});var $=p(Ot,async e=>{let{message:t,typedData:i}=e;if(!t&&!i)throw new Error("Either --message or --typed-data must be provided");let r=_(e.wallet),n=e.chain,a=(await u.chain.retrieve({chain:n})).keyFamily;if(i){if(a!=="evm")throw new Error("EIP-712 typed data signing is only supported on EVM chains");return dr(r.name,i)}if(r.type==="hardware"){let s=B(r.device);await s.connect();try{return await s.signMessage(n,t)}finally{await s.disconnect()}}switch(a){case"solana":return cr(r.name,t);case"evm":return pr(r.name,t);case"ton":return lr(r.name,t);case"bitcoin":return ur(r.name,t);case"tron":return mr(r.name,t);case"filecoin":return yr(r.name,t);default:throw new Error(`Unsupported key family for message signing: ${a}`)}});function cr(e,t){let i=q(e,"solana",Buffer.from(t,"utf8").toString("hex"),"hex");return{signature:sr.encode(Buffer.from(i.signature,"hex"))}}function pr(e,t){let i=q(e,"ethereum",t),r=i.signature.slice(0,64),n=i.signature.slice(64,128),o=i.recoveryId??0,a=o>=27?o:o+27;return{signature:`0x${r}${n}${a.toString(16).padStart(2,"0")}`}}function dr(e,t){return{signature:`0x${Ze(e,"ethereum",t).signature}`}}function lr(e,t){return{signature:q(e,"ton",Buffer.from(t,"utf8").toString("hex"),"hex").signature}}function ur(e,t){let i=q(e,"bitcoin",Buffer.from(t,"utf8").toString("hex"),"hex"),r=i.signature.slice(0,128),n=i.recoveryId??0,o=(n>=27?n:n+27).toString(16).padStart(2,"0");return{signature:`0x${r}${o}`}}function mr(e,t){let i=q(e,"tron",Buffer.from(t,"utf8").toString("hex"),"hex"),r=i.signature.slice(0,128),n=i.recoveryId??0,o=(n>=27?n:n+27).toString(16).padStart(2,"0");return{signature:`0x${r}${o}`}}function yr(e,t){let i=q(e,"filecoin",Buffer.from(t,"utf8").toString("hex"),"hex"),r=i.signature.slice(0,128),n=i.recoveryId??0;return{signature:`0x${r}${n.toString(16).padStart(2,"0")}`}}import hr from"https";import{z as P}from"zod";var Nt=c({name:"bitcoin_balance_retrieve",description:"Get the BTC balance of a Bitcoin address. Returns confirmed and unconfirmed balances in BTC and satoshis",input:P.object({wallet:P.string().describe("Bitcoin address (bc1...) or wallet name")}),output:P.object({address:P.string().describe("Bitcoin address"),confirmed:P.object({btc:P.string().describe("Confirmed balance in BTC"),sats:P.number().describe("Confirmed balance in satoshis")}),unconfirmed:P.object({btc:P.string().describe("Unconfirmed (pending) balance in BTC"),sats:P.number().describe("Unconfirmed (pending) balance in satoshis")}),total:P.object({btc:P.string().describe("Total balance in BTC"),sats:P.number().describe("Total balance in satoshis")})})});var fr=1e8;function De(e){return(e/fr).toFixed(8)}function gr(e){return new Promise((t,i)=>{hr.get(e,{headers:{"User-Agent":"moonpay-cli"}},r=>{if(r.statusCode!==200){i(new Error(`HTTP ${r.statusCode} from ${e}`)),r.resume();return}let n="";r.on("data",o=>n+=o),r.on("end",()=>{try{t(JSON.parse(n))}catch{i(new Error("Invalid JSON response"))}})}).on("error",i)})}var Bt=p(Nt,async e=>{let t=e.wallet;if(!t.startsWith("bc1")&&!t.startsWith("1")&&!t.startsWith("3")){let{findWalletOrThrow:a}=await import("./store-RQ6SKDSE.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 gr(`https://mempool.space/api/address/${encodeURIComponent(t)}`),r=i.chain_stats.funded_txo_sum-i.chain_stats.spent_txo_sum,n=i.mempool_stats.funded_txo_sum-i.mempool_stats.spent_txo_sum,o=r+n;return{address:t,confirmed:{btc:De(r),sats:r},unconfirmed:{btc:De(n),sats:n},total:{btc:De(o),sats:o}}});import{readdirSync as br,readFileSync as Mt,existsSync as xe,mkdirSync as _r,cpSync as kr}from"fs";import{join as F,dirname as vr}from"path";import{homedir as Lt}from"os";import{fileURLToPath as wr}from"url";function qe(){let e=wr(import.meta.url),t=vr(e);return F(t,"..","skills")}var Ae={claude:F(Lt(),".claude","skills"),openclaw:F(Lt(),".openclaw","skills")};function Sr(e){return e?Ae[e.toLowerCase()]?Ae[e.toLowerCase()]:e:Ae.claude}function $e(){let e=qe();return xe(e)?br(e,{withFileTypes:!0}).filter(t=>t.isDirectory()&&t.name.startsWith("moonpay-")).map(t=>{let r=Mt(F(e,t.name,"SKILL.md"),"utf-8").match(/^description:\s*(.+)$/m);return{name:t.name,description:r?.[1]?.replace(/^["']|["']$/g,"")??""}}).sort((t,i)=>t.name.localeCompare(i.name)):[]}function Ht(e){if(/[/\\]|\.\./.test(e))throw new Error(`Invalid skill name: "${e}"`);let t=F(qe(),e,"SKILL.md");if(!xe(t))throw new Error(`Skill "${e}" not found. Run \`mp skill list\` to see available skills.`);return Mt(t,"utf-8")}function Wt(e,t){let i=qe(),r=Sr(t),n=$e();return _r(r,{recursive:!0}),n.map(o=>{let a=F(r,o.name);return xe(a)&&!e?{name:o.name,installed:!1}:(kr(F(i,o.name),a,{recursive:!0,force:!0}),{name:o.name,installed:!0})})}import{z as ue}from"zod";var zt=c({name:"skill_list",description:"List available AI skills for Claude Code and other agents. Use to discover installable skills before running skill_install",input:ue.object({}),output:ue.array(ue.object({name:ue.string().describe("Skill identifier used with skill_retrieve and skill_install"),description:ue.string().describe("Brief summary of what the skill does")}))});var Ft=p(zt,async()=>$e());import{z as me}from"zod";var Vt=c({name:"skill_retrieve",description:"Get the full instruction content for a specific skill. Use to preview a skill before installing",input:me.object({name:me.string().describe("Skill identifier from skill_list (e.g. moonpay-swap-tokens)")}),output:me.object({name:me.string().describe("Skill identifier"),content:me.string().describe("Full markdown instruction content for the skill")})});var Gt=p(Vt,async e=>({name:e.name,content:Ht(e.name)}));import{z as V}from"zod";var Kt=c({name:"skill_install",description:'Install AI skills for your agent framework. Defaults to Claude Code (~/.claude/skills/). Use --dir with a preset ("openclaw") or a custom path',input:V.object({force:V.boolean().describe("Overwrite existing skill files if they already exist"),dir:V.string().nullable().describe('Preset name ("claude", "openclaw") or custom directory path. Null defaults to Claude Code (~/.claude/skills/)')}),output:V.array(V.object({name:V.string().describe("Skill identifier"),installed:V.boolean().describe("Whether the skill was written to disk")}))});var Jt=p(Kt,async e=>Wt(e.force,e.dir??void 0));import{encodeFunctionData as Pr}from"viem";import{z as v}from"zod";var Yt=c({name:"token_bridge",description:"Bridge tokens across chains. Builds, signs locally, broadcasts, and registers the transaction",input:v.object({from:v.object({wallet:v.string().describe("Local wallet name to sign the transaction with"),chain:v.string().describe("Source chain to bridge from"),token:v.string().describe("Source token contract address"),amount:v.coerce.number().nullable().describe("Amount to send in token units (exact-in mode). Null when using exact-out")}),to:v.object({wallet:v.string().nullable().describe("Destination wallet name or address. Null defaults to the source wallet"),chain:v.string().describe("Destination chain to bridge to"),token:v.string().describe("Destination token contract address"),amount:v.coerce.number().nullable().describe("Amount to receive in token units (exact-out mode). Null when using exact-in")})}),output:v.object({signature:v.string().describe("On-chain transaction hash or signature"),message:v.string().describe("Human-readable bridge summary")})});var jr=[{name:"approve",type:"function",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}],ie=p(Yt,async e=>{if(!e.from.amount&&!e.to.amount)throw new Error("Provide either from.amount or to.amount.");let t=await g.handler({wallet:e.from.wallet}),i=t.addresses[e.from.chain];if(!i)throw new Error(`Wallet "${t.name}" has no address on ${e.from.chain}.`);let r=i;if(e.to.wallet)try{r=(await g.handler({wallet:e.to.wallet})).addresses[e.to.chain]??e.to.wallet}catch{r=e.to.wallet}else e.from.chain!==e.to.chain&&(r=t.addresses[e.to.chain]??i);let n={from:{wallet:i,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}},o=await u.swaps.transaction.build(n),a=o.transaction;if(o.requiresApproval&&"to"in a){let{to:l,chainId:y}=a,f={type:"evm",to:e.from.token,data:Pr({abi:jr,functionName:"approve",args:[l,BigInt(o.amountIn.raw)]}),value:"0",chainId:y},{transaction:S}=await k.handler({wallet:t.name,chain:e.from.chain,transaction:JSON.stringify(f)}),I=await u.transaction.send({transaction:S,message:`Approve ${o.amountIn.symbol}`,chain:e.from.chain});if(!I.signature)throw new Error(`Approval failed: ${I.message}`);process.stderr.write(`Approval sent. Waiting for confirmation...
|
|
39
|
+
`),await new Promise(C=>setTimeout(C,5e3)),o=await u.swaps.transaction.build(n)}let s=Q(o.transaction);if(o.transaction.type==="ton"){let l=JSON.parse(s);l.token=e.from.token,s=JSON.stringify(l)}let{transaction:d}=await k.handler({wallet:t.name,chain:e.from.chain,transaction:s}),m=await u.transaction.send({transaction:d,message:o.message,chain:e.from.chain});if(!m.signature)throw new Error(`Transaction send failed: ${m.message}`);try{await u.transaction.register({transactionId:o.transactionId,transactionHash:m.signature,chain:e.from.chain})}catch{}return{signature:m.signature,message:o.message}});import{z as j}from"zod";var Qt=c({name:"token_swap",description:"Swap tokens on the same chain. Builds, signs locally, broadcasts, and registers the transaction",input:j.object({wallet:j.string().describe("Local wallet name to sign the transaction with"),chain:j.string().describe("Chain to execute the swap on"),from:j.object({token:j.string().describe("Input token contract address (token being sold)"),amount:j.coerce.number().nullable().describe("Amount to sell in token units (exact-in mode). Null when using exact-out")}),to:j.object({token:j.string().describe("Output token contract address (token being bought)"),amount:j.coerce.number().nullable().describe("Amount to receive in token units (exact-out mode). Null when using exact-in")})}),output:j.object({signature:j.string().describe("On-chain transaction hash or signature"),message:j.string().describe("Human-readable swap summary")})});var Zt=p(Qt,async e=>ie.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 E}from"zod";var Xt=c({name:"token_transfer",description:"Transfer tokens to another wallet on the same chain. Builds, signs locally, and broadcasts",input:E.object({wallet:E.string().describe("Local wallet name to sign the transaction with"),chain:E.string().describe("Chain to execute the transfer on"),token:E.string().describe("Token contract address (or native token address for the chain)"),amount:E.coerce.number().describe("Amount to transfer in token units (e.g. 1.5 for 1.5 USDC)"),to:E.string().describe("Recipient wallet name or on-chain address")}),output:E.object({signature:E.string().describe("On-chain transaction hash or signature"),message:E.string().describe("Human-readable transfer summary")})});var ei=p(Xt,async e=>ie.handler({from:{wallet:e.wallet,chain:e.chain,token:e.token,amount:e.amount},to:{wallet:e.to,chain:e.chain,token:e.token,amount:null}}));import{z as h}from"zod";var ti=c({name:"token_quote",description:"Get a quote for a swap, bridge, or transfer without executing. Returns pricing, exchange rate, and estimated time",input:h.object({from:h.object({chain:h.string().describe("Source chain"),token:h.string().describe("Source token contract address"),amount:h.coerce.number().nullable().describe("Amount to send in token units (exact-in mode). Null when using exact-out")}),to:h.object({chain:h.string().describe("Destination chain (same as source for swaps, different for bridges)"),token:h.string().describe("Destination token contract address"),amount:h.coerce.number().nullable().describe("Amount to receive in token units (exact-out mode). Null when using exact-in")})}),output:h.object({type:h.enum(["swap","bridge","transfer"]).describe("Operation type: swap (same chain, different token), bridge (cross-chain), or transfer (same token and chain)"),message:h.string().describe("Human-readable quote summary"),amountIn:h.object({amount:h.number().describe("Input amount in token units"),symbol:h.string().describe("Input token symbol"),usd:h.number().nullable().describe("USD value of input amount. Null if price unavailable")}),amountOut:h.object({amount:h.number().describe("Output amount in token units"),symbol:h.string().describe("Output token symbol"),usd:h.number().nullable().describe("USD value of output amount. Null if price unavailable")}),exchangeRate:h.number().describe("Ratio of output to input amount (amountOut / amountIn)"),estimatedTime:h.number().nullable().describe("Estimated completion time in seconds. Null if unknown"),requiresApproval:h.boolean().describe("Whether an ERC-20 token approval transaction is needed before executing")})});var Ir={solana:"11111111111111111111111111111111",evm:"0x0000000000000000000000000000000000000001",bitcoin:"bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4",tron:"T9yD14Nj9j7xAB4dbGeiX9h8unkKHxuWwb",ton:"EQDtFpEwcFAEcRe5mLVh2N6C0x-_hJEM7W61_JLnSF74p4q2",filecoin:"f1772sknusy7ezhsgwey7cn6ron6insgvzhnsdxva"};async function ii(e){let t=await u.chain.retrieve({chain:e});return Ir[t.keyFamily]}var ri=p(ti,async e=>{if(!e.from.amount&&!e.to.amount)throw new Error("Provide either from.amount or to.amount.");let t=await ii(e.from.chain),i=await ii(e.to.chain),r=await u.swaps.transaction.build({from:{wallet:t,chain:e.from.chain,token:e.from.token,amount:e.from.amount},to:{wallet:i,chain:e.to.chain,token:e.to.token,amount:e.to.amount}}),n=e.from.chain!==e.to.chain,o=e.from.token.toLowerCase()===e.to.token.toLowerCase();return{type:n?"bridge":o?"transfer":"swap",message:r.message,amountIn:r.amountIn,amountOut:r.amountOut,exchangeRate:r.exchangeRate,estimatedTime:r.estimatedTime,requiresApproval:r.requiresApproval}});import{z as w}from"zod";var ni=c({name:"x402_request",description:"Make an HTTP request to an x402-protected endpoint. Automatically handles 402 Payment Required responses by signing and sending payment with the local wallet",input:w.object({method:w.enum(["GET","POST","PUT","PATCH","DELETE"]).describe("HTTP method"),url:w.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:w.record(w.any()).nullable().describe("JSON request body for POST, PUT, or PATCH methods. Null for GET/DELETE"),params:w.record(w.any()).nullable().describe("URL query parameters as key-value pairs. Null if none"),wallet:w.string().describe("Local wallet name or address to sign the payment with"),chain:w.enum(["solana","base","ethereum","arbitrum","polygon","optimism"]).nullable().describe("Chain to pay from. Null defaults to solana")}),output:w.object({status:w.number().describe("HTTP response status code"),data:w.any().describe("Parsed JSON response body from the endpoint"),headers:w.record(w.any()).describe("HTTP response headers as key-value pairs")})});var Cr="solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",oi=`x402 payment support requires additional packages.
|
|
40
|
+
Run: npm i -g @moonpay/cli --include=optional`;async function ai(){try{let[e,t,i]=await Promise.all([import("./esm-UGHAPFP3.js"),import("./client-42E5L4GY.js"),import("./esm-63TCHIGX.js")]);return{...e,...t,...i}}catch{throw new Error(oi)}}async function Tr(){try{let[e,t]=await Promise.all([import("./client-LTVHDRFS.js"),import("./esm-RDAITU6G.js")]);return{...e,...t}}catch{throw new Error(oi)}}async function Dr(e,t){let{Keypair:i,VersionedTransaction:r,VersionedMessage:n}=await import("@solana/web3.js"),{default:o}=await import("axios"),{wrapAxiosWithPayment:a,x402Client:s,ExactSvmScheme:d}=await ai(),m=i.fromSecretKey(t),l={address:e,signTransactions:async S=>S.map(I=>{let C=new Uint8Array(I.messageBytes),U=n.deserialize(C),J=Object.keys(I.signatures).length,R=new r(U,new Array(J).fill(new Uint8Array(64)));R.sign([m]);let A=U.staticAccountKeys.findIndex(ne=>ne.toBase58()===e);if(A===-1)throw new Error(`Wallet ${e} is not a signer for this transaction`);return{[e]:R.signatures[A]}})},y=new s,f=new d(l);return y.register(Cr,f),y.registerV1("solana",f),a(o.create(),y)}async function Ar(e,t){let{default:i}=await import("axios"),{wrapAxiosWithPayment:r,x402Client:n}=await ai(),{registerExactEvmScheme:o,toClientEvmSigner:a}=await Tr(),{privateKeyToAccount:s}=await import("viem/accounts"),{createPublicClient:d,http:m}=await import("viem"),l=await import("viem/chains"),y=s(`0x${Buffer.from(e).toString("hex")}`),f={ethereum:l.mainnet,base:l.base,polygon:l.polygon,arbitrum:l.arbitrum,optimism:l.optimism}[t]??l.base,S=d({chain:f,transport:m()}),I=a(y,S),C=new n;return o(C,{signer:I}),r(i.create(),C)}var Pe=p(ni,async({method:e,url:t,body:i,params:r,wallet:n,chain:o})=>{let a=_(n),s=o??"solana",{privateKey:d,address:m}=await pe(a,s),l=await(s==="solana"?Dr(m,d):Ar(d,s)),y;switch(e){case"GET":y=await l.get(t,{params:r});break;case"POST":y=await l.post(t,i||{},{params:r});break;case"PUT":y=await l.put(t,i||{},{params:r});break;case"PATCH":y=await l.patch(t,i||{},{params:r});break;case"DELETE":y=await l.delete(t,{params:r});break;default:throw new Error(`Unsupported HTTP method: ${e}`)}return{status:y.status,data:y.data,headers:y.headers}});import{z as G}from"zod";var si=c({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:G.object({wallet:G.string().describe("Local wallet name to register"),chain:G.string().describe("Chain to register the wallet on (e.g. solana, ethereum)")}),output:G.object({success:G.literal(!0).describe("Always true on success"),address:G.string().describe("On-chain address that was registered"),chain:G.string().describe("Chain the wallet was registered on")})});function xr(e,t){let i=new Date,r=`${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 ${r} to confirm my control over this wallet.`}var ci=p(si,async e=>{let t=e.chain,[i,r,n]=await Promise.all([g.handler({wallet:e.wallet}),u.virtualAccount.retrieve({}),u.chain.retrieve({chain:t})]),o=n.keyFamily,a=i.addresses[o];if(!a)throw new Error(`Wallet "${i.name}" has no ${o} address.`);let s=xr(a,r.id),{signature:d}=await $.handler({wallet:i.name,chain:t,message:s,typedData:null});return await u.virtualAccount.wallet.register({wallet:a,message:s,signature:d,chain:t}),{success:!0,address:a,chain:t}});import{z as K}from"zod";var pi=c({name:"virtual-account_offramp_initiate",description:"Send stablecoin to an approved offramp. Builds the transfer, signs locally, and broadcasts",input:K.object({wallet:K.string().describe("Local wallet name to sign the transaction with"),offrampId:K.string().describe("Unique identifier for the approved offramp destination"),amount:K.coerce.number().describe("Amount of stablecoin to send (in token units, e.g. 100 = 100 USDC)")}),output:K.object({signature:K.string().describe("On-chain transaction hash or signature"),message:K.string().describe("Human-readable transfer summary")})});var qr={Solana:"solana",Ethereum:"ethereum",Polygon:"polygon",Base:"base",Arbitrum:"arbitrum"},di=p(pi,async e=>{let t=await g.handler({wallet:e.wallet}),r=(await u.virtualAccount.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 n=qr[r.blockchain];if(!n)throw new Error(`Unsupported blockchain "${r.blockchain}".`);let o=t.addresses[n];if(!o)throw new Error(`Wallet "${t.name}" has no address on ${n}.`);let a=await u.virtualAccount.offramp.initiate({wallet:o,offrampId:e.offrampId,amount:e.amount}),s=Q(a.transaction),{transaction:d}=await k.handler({wallet:t.name,chain:n,transaction:s}),m=await u.transaction.send({transaction:d,message:a.message,chain:n});if(!m.signature)throw new Error(`Transaction send failed: ${m.message}`);return{signature:m.signature,message:a.message}});Y();import{z as ye}from"zod";var li=c({name:"login",description:"Generate a sign-in link and open it in a browser. Use `mp verify` with the resulting code to complete login",input:ye.object({email:ye.string().describe("Email address to send the verification link to")}),output:ye.object({email:ye.string().describe("Email address the sign-in link was sent to"),message:ye.string().describe("Instructions for completing login")})});var ui=p(li,async e=>{let{baseUrl:t}=fe(),i=`${t}/login?email=${encodeURIComponent(e.email)}`;return{email:e.email,message:`Open this link to verify:
|
|
41
|
+
|
|
42
|
+
${i}
|
|
43
|
+
|
|
44
|
+
Once you receive the code, give it to your agent or run: mp verify --email ${e.email} --code <code>`}});import*as yi from"fs";import*as hi from"os";import*as fi from"path";Y();import{z as re}from"zod";var mi=c({name:"verify",description:"Complete login by verifying the code from the sign-in link. Stores encrypted credentials in the OS keychain",input:re.object({email:re.string().describe("Email address used with `mp login`"),code:re.string().describe("Verification code from the sign-in link")}),output:re.object({email:re.string().describe("Authenticated email address"),message:re.string().describe("Login confirmation message")})});var $r=fi.join(hi.homedir(),".config","moonpay","consent.json");function Ur(){try{return JSON.parse(yi.readFileSync($r,"utf-8")).agentId??null}catch{return null}}var gi=p(mi,async e=>{let{baseUrl:t}=fe(),r=await new Ue({baseUrl:t,auth:{type:"none"}}).verify({email:e.email,code:e.code}),n={accessToken:r.accessToken,refreshToken:r.refreshToken,expiresAt:r.expiresAt*1e3,baseUrl:t};Ne(n),Le();let o=Ur();return o&&nt(o).catch(()=>{}),{email:e.email,message:"Logged in successfully."}});Y();import{z as je}from"zod";var bi=c({name:"logout",description:"Log out and clear stored credentials. Removes saved JWT tokens from the local keychain",input:je.object({}),output:je.object({success:je.literal(!0).describe("Always true on success"),message:je.string().describe("Confirmation message")})});var _i=p(bi,async()=>(Be(),{success:!0,message:"Logged out."}));import{z as L}from"zod";var ki=c({name:"upgrade",description:"Purchase a rate limit upgrade via x402. Increases your API rate limit. Requires login and a funded wallet",input:L.object({duration:L.enum(["day","month"]).describe("Upgrade duration: day ($1 USDC, 24h) or month ($20 USDC, 30 days)"),wallet:L.string().describe("Wallet name or address to pay with"),chain:L.enum(["solana","base"]).describe("Chain to pay from: solana ($1/$20 USDC) or base ($1/$20 USDC)")}),output:L.object({duration:L.string().describe("Purchased upgrade duration (day or month)"),expiresAt:L.string().describe("Upgrade expiration timestamp in ISO-8601 format"),message:L.string().describe("Confirmation message with upgrade details")})});Y();var vi=p(ki,async e=>{if(!await ge())throw new Error("Login required to upgrade. Run `mp login` first.");let i=ce(),r=await u.user.retrieve({}),n=await Pe.handler({method:"POST",url:`${i}/x402/upgrade`,body:{userId:r.id,duration:e.duration},params:null,wallet:e.wallet,chain:e.chain});if(n.status>=400){let o=n.data?.error??"Upgrade failed";throw new Error(o)}return n.data});import{encodeFunctionData as Rr,maxUint256 as Er}from"viem";import{exec as Or}from"child_process";import{z as T}from"zod";var wi=c({name:"prediction-market_position_buy",description:"Buy shares of a prediction market outcome. Builds the order, signs locally, and broadcasts",input:T.object({wallet:T.string().describe("Local wallet name to sign the order with"),provider:T.enum(["polymarket","kalshi"]).describe("Market provider: polymarket (Polygon) or kalshi (Solana via dFlow)"),tokenId:T.string().describe("Outcome token ID from prediction_market_search outcomeTokens[].tokenId"),price:T.number().describe("Limit price per share between 0 and 1 (e.g. 0.65 = $0.65)"),size:T.number().describe("Number of shares to buy (each share pays $1 if the outcome wins)")}),output:T.object({signature:T.string().nullable().describe("On-chain transaction hash. Null if order is pending off-chain matching"),orderId:T.string().nullable().describe("Provider order ID for tracking. Null if not applicable"),status:T.string().describe("Order status (e.g. matched, pending, filled)"),message:T.string().describe("Human-readable order summary")})});var Nr={polymarket:"polygon",kalshi:"solana"},Br="0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",Lr=[{name:"approve",type:"function",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}];function Mr(e,t,i){return`https://dflow.net/proof?${new URLSearchParams({wallet:e,signature:t,timestamp:String(i)})}`}var Si=p(wi,async e=>{let t=Nr[e.provider],i=await g.handler({wallet:e.wallet}),r=i.addresses[t];if(!r)throw new Error(`Wallet "${i.name}" has no address on ${t}.`);let n;try{n=await u.predictionMarket.position.buy({provider:e.provider,wallet:r,tokenId:e.tokenId,price:e.price,size:e.size})}catch(d){let m=d instanceof Error?d.message:String(d);if(e.provider==="kalshi"&&m.includes("unverified_wallet")){let l=Date.now(),{signature:y}=await $.handler({wallet:i.name,chain:"solana",message:`Proof KYC verification: ${l}`,typedData:null}),f=Mr(r,y,l);throw Or(`open "${f}"`),new Error(`Kalshi requires identity verification. Complete verification at: ${f}`)}throw d}if(!n.transaction)return{signature:null,orderId:n.orderId,status:n.status,message:`Buy order ${n.status}`};if("to"in n.transaction){let d=n.transaction.to,m={type:"evm",to:Br,data:Rr({abi:Lr,functionName:"approve",args:[d,Er]}),value:"0",chainId:n.transaction.chainId},{transaction:l}=await k.handler({wallet:i.name,chain:t,transaction:JSON.stringify(m)}),y=await u.transaction.send({transaction:l,message:"Approve USDC",chain:t});if(!y.signature)throw new Error(`Approval failed: ${y.message}`);process.stderr.write(`USDC approval sent. Waiting for confirmation...
|
|
45
|
+
`),await new Promise(f=>setTimeout(f,5e3))}let o=Q(n.transaction),{transaction:a}=await k.handler({wallet:i.name,chain:t,transaction:o}),s=await u.transaction.send({transaction:a,message:`Buy ${e.size} shares at ${e.price}`,chain:t});if(!s.signature)throw new Error(`Transaction send failed: ${s.message}`);if(n.orderId)try{await u.transaction.register({transactionId:n.orderId,transactionHash:s.signature,chain:t})}catch{}return{signature:s.signature,orderId:n.orderId,status:"executed",message:`Bought ${e.size} shares at ${e.price} on ${e.provider}`}});import{exec as Hr}from"child_process";import{z as D}from"zod";var Pi=c({name:"prediction-market_position_sell",description:"Sell shares of a prediction market outcome. Signs locally if needed and broadcasts",input:D.object({wallet:D.string().describe("Local wallet name to sign the order with"),provider:D.enum(["polymarket","kalshi"]).describe("Market provider: polymarket (Polygon) or kalshi (Solana via dFlow)"),tokenId:D.string().describe("Outcome token ID from your positions to sell"),price:D.number().describe("Limit price per share between 0 and 1 (e.g. 0.65 = $0.65)"),size:D.number().describe("Number of shares to sell")}),output:D.object({signature:D.string().nullable().describe("On-chain transaction hash. Null if order is pending off-chain matching"),orderId:D.string().nullable().describe("Provider order ID for tracking. Null if not applicable"),status:D.string().describe("Order status (e.g. matched, pending, filled)"),message:D.string().describe("Human-readable order summary")})});var Wr={polymarket:"polygon",kalshi:"solana"};function zr(e,t,i){return`https://dflow.net/proof?${new URLSearchParams({wallet:e,signature:t,timestamp:String(i)})}`}var ji=p(Pi,async e=>{let t=Wr[e.provider],i=await g.handler({wallet:e.wallet}),r=i.addresses[t];if(!r)throw new Error(`Wallet "${i.name}" has no address on ${t}.`);let n;try{n=await u.predictionMarket.position.sell({provider:e.provider,wallet:r,tokenId:e.tokenId,price:e.price,size:e.size})}catch(s){let d=s instanceof Error?s.message:String(s);if(e.provider==="kalshi"&&d.includes("unverified_wallet")){let m=Date.now(),{signature:l}=await $.handler({wallet:i.name,chain:"solana",message:`Proof KYC verification: ${m}`,typedData:null}),y=zr(r,l,m);throw Hr(`open "${y}"`),new Error(`Kalshi requires identity verification. Complete verification at: ${y}`)}throw s}if(!n.transaction)return{signature:n.transactionHashes?.[0]??null,orderId:n.orderId,status:n.status,message:`Sold ${e.size} shares at ${e.price} on ${e.provider}`};let{transaction:o}=await k.handler({wallet:i.name,chain:t,transaction:n.transaction.base64}),a=await u.transaction.send({transaction:o,message:`Sell ${e.size} shares at ${e.price}`,chain:t});if(!a.signature)throw new Error(`Transaction send failed: ${a.message}`);return{signature:a.signature,orderId:n.orderId,status:"executed",message:`Sold ${e.size} shares at ${e.price} on ${e.provider}`}});import{exec as Fr}from"child_process";import{z as O}from"zod";var Ii=c({name:"prediction-market_position_redeem",description:"Redeem winning prediction market positions after a market has resolved. Signs locally and broadcasts",input:O.object({wallet:O.string().describe("Local wallet name to sign the redemption with"),provider:O.enum(["polymarket","kalshi"]).describe("Market provider: polymarket (Polygon) or kalshi (Solana via dFlow)"),asset:O.string().describe("Outcome token mint address (Kalshi) or condition ID (Polymarket) from your winning position"),size:O.coerce.number().nullable().default(null).describe("Number of shares to redeem. Null redeems all winning shares")}),output:O.object({signature:O.string().nullable().describe("On-chain transaction hash. Null if redemption is pending"),status:O.string().describe("Redemption processing status"),message:O.string().describe("Human-readable redemption summary")})});var Vr={polymarket:"polygon",kalshi:"solana"};function Gr(e,t,i){return`https://dflow.net/proof?${new URLSearchParams({wallet:e,signature:t,timestamp:String(i)})}`}var Ci=p(Ii,async e=>{let t=Vr[e.provider],i=await g.handler({wallet:e.wallet}),r=i.addresses[t];if(!r)throw new Error(`Wallet "${i.name}" has no address on ${t}.`);let n;try{n=await u.predictionMarket.position.redeem({provider:e.provider,asset:e.asset,wallet:r,size:e.size})}catch(s){let d=s instanceof Error?s.message:String(s);if(e.provider==="kalshi"&&d.includes("unverified_wallet")){let m=Date.now(),{signature:l}=await $.handler({wallet:i.name,chain:"solana",message:`Proof KYC verification: ${m}`,typedData:null}),y=Gr(r,l,m);throw Fr(`open "${y}"`),new Error(`Kalshi requires identity verification. Complete verification at: ${y}`)}throw s}if(!n.transaction)return{signature:n.transactionHash,status:n.success?"redeemed":"failed",message:n.success?`Redeemed position on ${e.provider}`:`Redemption failed on ${e.provider}`};let{transaction:o}=await k.handler({wallet:i.name,chain:t,transaction:n.transaction.base64}),a=await u.transaction.send({transaction:o,message:`Redeem ${e.size??"all"} shares`,chain:t});if(!a.signature)throw new Error(`Transaction send failed: ${a.message}`);return{signature:a.signature,status:"redeemed",message:`Redeemed ${e.size??"all"} shares on ${e.provider}`}});import{z as b}from"zod";var Ti=c({name:"commerce_checkout",description:"Checkout a shopping cart with crypto. Builds the payment transaction, signs locally, and submits",input:b.object({wallet:b.string().describe("Local wallet name to sign the payment transaction with"),store:b.string().describe("Shopify store domain (e.g. ryder.id, bodykits.ae)"),cartId:b.string().describe("Cart ID returned from a previous cart update call"),chain:b.string().describe("Payment chain: solana, ethereum, polygon, or base"),email:b.string().describe("Buyer email address for order confirmation"),firstName:b.string().describe("Buyer first name for shipping"),lastName:b.string().describe("Buyer last name for shipping"),address:b.string().describe("Shipping street address"),city:b.string().describe("Shipping city"),postalCode:b.string().describe("Shipping postal or ZIP code"),country:b.string().describe("Shipping country name (e.g. United States, Netherlands)")}),output:b.object({transactionSignature:b.string().describe("On-chain payment transaction hash or signature"),status:b.string().describe("Payment processing status"),redirectUrl:b.string().describe("Shopify order confirmation page URL"),message:b.string().describe("Human-readable checkout confirmation")})});var Di=p(Ti,async e=>{let t=e.chain,i=await g.handler({wallet:e.wallet}),r=i.addresses[t];if(!r)throw new Error(`Wallet "${i.name}" has no address on ${t}.`);process.stderr.write(`Starting checkout (this may take 30-90 seconds)...
|
|
46
|
+
`);let n=await u.commerce.checkout.start({store:e.store,cartId:e.cartId,wallet:r,chain:e.chain,email:e.email,firstName:e.firstName,lastName:e.lastName,address:e.address,city:e.city,postalCode:e.postalCode,country:e.country});process.stderr.write(`Signing transaction...
|
|
47
|
+
`);let{transaction:o}=await k.handler({wallet:i.name,chain:t,transaction:n.serializedTransaction});process.stderr.write(`Submitting payment...
|
|
48
|
+
`);let a=await u.commerce.checkout.pay({signedTransaction:o,transactionToken:n.transactionToken,rateToken:n.rateToken,paylinkId:n.paylinkId,requestAmount:n.requestAmount,currency:n.currency,chain:n.chain,sender:n.sender,recipient:n.recipient,addressLookupTableAccounts:n.addressLookupTableAccounts});return{transactionSignature:a.transactionSignature,status:a.status,redirectUrl:a.redirectUrl,message:a.message}});var Qp=[mt,gt,kt,g,Pt,It,Tt,At,qt,k,$,Bt,Ft,Gt,Jt,Zt,ie,ei,ri,Pe,ci,di,Se,lt,ui,gi,_i,vi,Si,ji,Ci,Di];export{Yr as a,Xe as b,lt as c,Qp as d};
|