@moonpay/cli 1.84.1 → 1.84.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
1
  process.noDeprecation = true; import { createRequire as __createRequire } from "module"; const require = __createRequire(import.meta.url);
2
- import{f as Tt,g as Bt,j as xt,m as Vt,n as bt,o as St,p as Ht}from"./chunk-YB4YI6XQ.js";var i=class extends Error{constructor(r,n,u){super(r);this.status=n;this.toolName=u;this.name="MoonPayError"}},c=class extends i{constructor(t="Authentication required"){super(t,401),this.name="AuthError"}},a=class extends i{constructor(t="Rate limit exceeded"){super(t,429),this.name="RateLimitError"}},l=class extends i{constructor(t,r){super(t,400,r),this.name="ValidationError"}},s=class extends i{constructor(t){super(`Tool not found: ${t}`,404,t),this.name="ToolNotFoundError"}},p=class extends i{constructor(t,r){super(`Tool "${t}" has been renamed to "${r}"`,410,t),this.name="ToolRenamedError",this.newName=r}};var Ut="https://agents.moonpay.com",Et=36e4,h=class{constructor(t={}){this.baseUrl=(t.baseUrl??Ut).replace(/\/$/,""),this.auth=t.auth??{type:"none"},this.timeout=t.timeout??Et,this.headers=t.headers??{}}async _call(t,r){let n=`${this.baseUrl}/api/tools/${encodeURIComponent(t)}`,u=await this.buildHeaders(),o=await fetch(n,{method:"POST",headers:u,body:JSON.stringify(r),signal:AbortSignal.timeout(this.timeout)});if(o.status===401&&this.auth.type==="bearer"&&this.auth.refreshToken)try{let qt=await this.auth.refreshToken();u.Authorization=`Bearer ${qt}`,o=await fetch(n,{method:"POST",headers:u,body:JSON.stringify(r),signal:AbortSignal.timeout(this.timeout)})}catch{throw new c("Token refresh failed")}return this.handleResponse(o,t)}async buildHeaders(){let t={"Content-Type":"application/json",...this.headers};if(this.auth.type==="bearer"){let r=await this.auth.getToken();r&&(t.Authorization=`Bearer ${r}`)}return t}async handleResponse(t,r){if(t.ok)return t.json();let n;try{n=await t.json()}catch{n={error:t.statusText}}let u=n?.error??n?.message,o=typeof u=="string"?u:u?JSON.stringify(u):`Request failed with status ${t.status}`;switch(t.status){case 400:throw new l(o,r);case 401:throw new c(o);case 404:throw new s(r);case 410:throw new p(r,n?.newName??"unknown");case 429:throw new a(o);default:throw new i(o,t.status,r)}}};var _=class{constructor(t){this.client=t}create(t){return this.client._call("app_activation_create",t)}},O=class{constructor(t){this.client=t}get activation(){return new _(this.client)}},v=class{constructor(t){this.client=t}build(t){return this.client._call("card_delegation_approve_transaction_build",t)}},P=class{constructor(t){this.client=t}get transaction(){return new v(this.client)}},C=class{constructor(t){this.client=t}build(t){return this.client._call("card_delegation_revoke_transaction_build",t)}},y=class{constructor(t){this.client=t}get transaction(){return new C(this.client)}},I=class{constructor(t){this.client=t}retrieve(t){return this.client._call("card_delegation_token_retrieve",t)}},g=class{constructor(t){this.client=t}get approve(){return new P(this.client)}get revoke(){return new y(this.client)}get token(){return new I(this.client)}},k=class{constructor(t){this.client=t}check(t){return this.client._call("card_onboarding_check",t)}finish(t){return this.client._call("card_onboarding_finish",t)}start(t){return this.client._call("card_onboarding_start",t)}},A=class{constructor(t){this.client=t}list(t){return this.client._call("card_transaction_list",t)}},R=class{constructor(t){this.client=t}retrieve(t){return this.client._call("card_user_retrieve",t)}},f=class{constructor(t){this.client=t}check(t){return this.client._call("card_wallet_check",t)}link(t){return this.client._call("card_wallet_link",t)}list(t){return this.client._call("card_wallet_list",t)}unlink(t){return this.client._call("card_wallet_unlink",t)}},w=class{constructor(t){this.client=t}get delegation(){return new g(this.client)}get onboarding(){return new k(this.client)}get transaction(){return new A(this.client)}get user(){return new R(this.client)}get wallet(){return new f(this.client)}create(t){return this.client._call("card_create",t)}freeze(t){return this.client._call("card_freeze",t)}retrieve(t){return this.client._call("card_retrieve",t)}reveal(t){return this.client._call("card_reveal",t)}unfreeze(t){return this.client._call("card_unfreeze",t)}},L=class{constructor(t){this.client=t}list(t){return this.client._call("chain_list",t)}retrieve(t){return this.client._call("chain_retrieve",t)}},M=class{constructor(t){this.client=t}create(t){return this.client._call("cli_activation_create",t)}update(t){return this.client._call("cli_activation_update",t)}},T=class{constructor(t){this.client=t}get activation(){return new M(this.client)}},x=class{constructor(t){this.client=t}add(t){return this.client._call("commerce_cart_add",t)}remove(t){return this.client._call("commerce_cart_remove",t)}retrieve(t){return this.client._call("commerce_cart_retrieve",t)}update(t){return this.client._call("commerce_cart_update",t)}},V=class{constructor(t){this.client=t}pay(t){return this.client._call("commerce_checkout_pay",t)}start(t){return this.client._call("commerce_checkout_start",t)}},b=class{constructor(t){this.client=t}retrieve(t){return this.client._call("commerce_product_retrieve",t)}search(t){return this.client._call("commerce_product_search",t)}},S=class{constructor(t){this.client=t}list(t){return this.client._call("commerce_store_list",t)}retrieve(t){return this.client._call("commerce_store_retrieve",t)}},q=class{constructor(t){this.client=t}get cart(){return new x(this.client)}get checkout(){return new V(this.client)}get product(){return new b(this.client)}get store(){return new S(this.client)}search(t){return this.client._call("commerce_search",t)}},B=class{constructor(t){this.client=t}list(t){return this.client._call("deposit_transaction_list",t)}},H=class{constructor(t){this.client=t}get transaction(){return new B(this.client)}create(t){return this.client._call("deposit_create",t)}retrieve(t){return this.client._call("deposit_retrieve",t)}},U=class{constructor(t){this.client=t}create(t){return this.client._call("feedback_create",t)}},E=class{constructor(t){this.client=t}buy(t){return this.client._call("gateway_buy",t)}search(t){return this.client._call("gateway_search",t)}},W=class{constructor(t){this.client=t}retrieve(t){return this.client._call("hyperliquid_balance_retrieve",t)}},D=class{constructor(t){this.client=t}list(t){return this.client._call("hyperliquid_candle_list",t)}},F=class{constructor(t){this.client=t}create(t){return this.client._call("hyperliquid_deposit_create",t)}},z=class{constructor(t){this.client=t}submit(t){return this.client._call("hyperliquid_exchange_submit",t)}},$=class{constructor(t){this.client=t}list(t){return this.client._call("hyperliquid_funding_payment_list",t)}},G=class{constructor(t){this.client=t}get payment(){return new $(this.client)}},K=class{constructor(t){this.client=t}list(t){return this.client._call("hyperliquid_market_list",t)}},j=class{constructor(t){this.client=t}create(t){return this.client._call("hyperliquid_order_create",t)}list(t){return this.client._call("hyperliquid_order_list",t)}},J=class{constructor(t){this.client=t}retrieve(t){return this.client._call("hyperliquid_orderbook_retrieve",t)}},Q=class{constructor(t){this.client=t}list(t){return this.client._call("hyperliquid_position_list",t)}},X=class{constructor(t){this.client=t}list(t){return this.client._call("hyperliquid_predicted_funding_list",t)}},Y=class{constructor(t){this.client=t}get funding(){return new X(this.client)}},Z=class{constructor(t){this.client=t}list(t){return this.client._call("hyperliquid_price_list",t)}},N=class{constructor(t){this.client=t}list(t){return this.client._call("hyperliquid_trade_list",t)}},tt=class{constructor(t){this.client=t}get balance(){return new W(this.client)}get candle(){return new D(this.client)}get deposit(){return new F(this.client)}get exchange(){return new z(this.client)}get funding(){return new G(this.client)}get market(){return new K(this.client)}get order(){return new j(this.client)}get orderbook(){return new J(this.client)}get position(){return new Q(this.client)}get predicted(){return new Y(this.client)}get price(){return new Z(this.client)}get trade(){return new N(this.client)}},et=class{constructor(t){this.client=t}redeem(t){return this.client._call("polymarket_position_redeem",t)}sell(t){return this.client._call("polymarket_position_sell",t)}},rt=class{constructor(t){this.client=t}get position(){return new et(this.client)}},it=class{constructor(t){this.client=t}list(t){return this.client._call("prediction-market_event_list",t)}retrieve(t){return this.client._call("prediction-market_event_retrieve",t)}search(t){return this.client._call("prediction-market_event_search",t)}},nt=class{constructor(t){this.client=t}list(t){return this.client._call("prediction-market_market_ohlcv_list",t)}},ut=class{constructor(t){this.client=t}get ohlcv(){return new nt(this.client)}},ot=class{constructor(t){this.client=t}retrieve(t){return this.client._call("prediction-market_order_retrieve",t)}},ct=class{constructor(t){this.client=t}buy(t){return this.client._call("prediction-market_position_buy",t)}list(t){return this.client._call("prediction-market_position_list",t)}redeem(t){return this.client._call("prediction-market_position_redeem",t)}sell(t){return this.client._call("prediction-market_position_sell",t)}},at=class{constructor(t){this.client=t}get event(){return new it(this.client)}get market(){return new ut(this.client)}get order(){return new ot(this.client)}get position(){return new ct(this.client)}},lt=class{constructor(t){this.client=t}build(t){return this.client._call("swaps_transaction_build",t)}},st=class{constructor(t){this.client=t}get transaction(){return new lt(this.client)}},pt=class{constructor(t){this.client=t}list(t){return this.client._call("token_balance_list",t)}},dt=class{constructor(t){this.client=t}list(t){return this.client._call("token_holder_list",t)}},ht=class{constructor(t){this.client=t}list(t){return this.client._call("token_ohlcv_list",t)}},mt=class{constructor(t){this.client=t}list(t){return this.client._call("token_trending_list",t)}},_t=class{constructor(t){this.client=t}get balance(){return new pt(this.client)}get holder(){return new dt(this.client)}get ohlcv(){return new ht(this.client)}get trending(){return new mt(this.client)}check(t){return this.client._call("token_check",t)}list(t){return this.client._call("token_list",t)}retrieve(t){return this.client._call("token_retrieve",t)}search(t){return this.client._call("token_search",t)}},Ot=class{constructor(t){this.client=t}list(t){return this.client._call("transaction_list",t)}prepare(t){return this.client._call("transaction_prepare",t)}register(t){return this.client._call("transaction_register",t)}retrieve(t){return this.client._call("transaction_retrieve",t)}send(t){return this.client._call("transaction_send",t)}},vt=class{constructor(t){this.client=t}retrieve(t){return this.client._call("user_retrieve",t)}},Pt=class{constructor(t){this.client=t}accept(t){return this.client._call("virtual-account_agreement_accept",t)}list(t){return this.client._call("virtual-account_agreement_list",t)}},Ct=class{constructor(t){this.client=t}delete(t){return this.client._call("virtual-account_bank-account_delete",t)}list(t){return this.client._call("virtual-account_bank-account_list",t)}register(t){return this.client._call("virtual-account_bank-account_register",t)}retrieve(t){return this.client._call("virtual-account_bank-account_retrieve",t)}},yt=class{constructor(t){this.client=t}continue(t){return this.client._call("virtual-account_kyc_continue",t)}restart(t){return this.client._call("virtual-account_kyc_restart",t)}},It=class{constructor(t){this.client=t}cancel(t){return this.client._call("virtual-account_offramp_cancel",t)}create(t){return this.client._call("virtual-account_offramp_create",t)}initiate(t){return this.client._call("virtual-account_offramp_initiate",t)}list(t){return this.client._call("virtual-account_offramp_list",t)}retrieve(t){return this.client._call("virtual-account_offramp_retrieve",t)}update(t){return this.client._call("virtual-account_offramp_update",t)}},gt=class{constructor(t){this.client=t}create(t){return this.client._call("virtual-account_onramp_payment_create",t)}retrieve(t){return this.client._call("virtual-account_onramp_payment_retrieve",t)}},kt=class{constructor(t){this.client=t}get payment(){return new gt(this.client)}cancel(t){return this.client._call("virtual-account_onramp_cancel",t)}create(t){return this.client._call("virtual-account_onramp_create",t)}list(t){return this.client._call("virtual-account_onramp_list",t)}retrieve(t){return this.client._call("virtual-account_onramp_retrieve",t)}update(t){return this.client._call("virtual-account_onramp_update",t)}},At=class{constructor(t){this.client=t}list(t){return this.client._call("virtual-account_transaction_list",t)}},Rt=class{constructor(t){this.client=t}list(t){return this.client._call("virtual-account_wallet_list",t)}register(t){return this.client._call("virtual-account_wallet_register",t)}},ft=class{constructor(t){this.client=t}get agreement(){return new Pt(this.client)}get bankAccount(){return new Ct(this.client)}get kyc(){return new yt(this.client)}get offramp(){return new It(this.client)}get onramp(){return new kt(this.client)}get transaction(){return new At(this.client)}get wallet(){return new Rt(this.client)}create(t){return this.client._call("virtual-account_create",t)}retrieve(t){return this.client._call("virtual-account_retrieve",t)}},wt=class{constructor(t){this.client=t}list(t){return this.client._call("wallet_activity_list",t)}},Lt=class{constructor(t){this.client=t}retrieve(t){return this.client._call("wallet_pnl_retrieve",t)}},Mt=class{constructor(t){this.client=t}get activity(){return new wt(this.client)}get pnl(){return new Lt(this.client)}discover(t){return this.client._call("wallet_discover",t)}},d=class extends h{constructor(t={}){super(t)}get app(){return new O(this)}get card(){return new w(this)}get chain(){return new L(this)}get cli(){return new T(this)}get commerce(){return new q(this)}get deposit(){return new H(this)}get feedback(){return new U(this)}get gateway(){return new E(this)}get hyperliquid(){return new tt(this)}get polymarket(){return new rt(this)}get predictionMarket(){return new at(this)}get swaps(){return new st(this)}get token(){return new _t(this)}get transaction(){return new Ot(this)}get user(){return new vt(this)}get virtualAccount(){return new ft(this)}get wallet(){return new Mt(this)}buy(t){return this._call("buy",t)}login(t){return this._call("login",t)}refresh(t){return this._call("refresh",t)}verify(t){return this._call("verify",t)}};Ht();Bt();var m=null;function Wt(){return m||(m=new d({baseUrl:Vt(),auth:{type:"bearer",getToken:St,refreshToken:async()=>{let e=xt();if(!e?.refreshToken)throw new Error("No refresh token available");return(await bt(e)).accessToken}},headers:Tt()})),m}var Nt=new Proxy({},{get(e,t){return Reflect.get(Wt(),t)}});function te(){m=null}export{d as a,Nt as b,te as c};
2
+ import{f as Tt,g as Bt,j as xt,m as Vt,n as bt,o as St,p as Ht}from"./chunk-YX7RLCJW.js";var i=class extends Error{constructor(r,n,u){super(r);this.status=n;this.toolName=u;this.name="MoonPayError"}},c=class extends i{constructor(t="Authentication required"){super(t,401),this.name="AuthError"}},a=class extends i{constructor(t="Rate limit exceeded"){super(t,429),this.name="RateLimitError"}},l=class extends i{constructor(t,r){super(t,400,r),this.name="ValidationError"}},s=class extends i{constructor(t){super(`Tool not found: ${t}`,404,t),this.name="ToolNotFoundError"}},p=class extends i{constructor(t,r){super(`Tool "${t}" has been renamed to "${r}"`,410,t),this.name="ToolRenamedError",this.newName=r}};var Ut="https://agents.moonpay.com",Et=36e4,h=class{constructor(t={}){this.baseUrl=(t.baseUrl??Ut).replace(/\/$/,""),this.auth=t.auth??{type:"none"},this.timeout=t.timeout??Et,this.headers=t.headers??{}}async _call(t,r){let n=`${this.baseUrl}/api/tools/${encodeURIComponent(t)}`,u=await this.buildHeaders(),o=await fetch(n,{method:"POST",headers:u,body:JSON.stringify(r),signal:AbortSignal.timeout(this.timeout)});if(o.status===401&&this.auth.type==="bearer"&&this.auth.refreshToken)try{let qt=await this.auth.refreshToken();u.Authorization=`Bearer ${qt}`,o=await fetch(n,{method:"POST",headers:u,body:JSON.stringify(r),signal:AbortSignal.timeout(this.timeout)})}catch{throw new c("Token refresh failed")}return this.handleResponse(o,t)}async buildHeaders(){let t={"Content-Type":"application/json",...this.headers};if(this.auth.type==="bearer"){let r=await this.auth.getToken();r&&(t.Authorization=`Bearer ${r}`)}return t}async handleResponse(t,r){if(t.ok)return t.json();let n;try{n=await t.json()}catch{n={error:t.statusText}}let u=n?.error??n?.message,o=typeof u=="string"?u:u?JSON.stringify(u):`Request failed with status ${t.status}`;switch(t.status){case 400:throw new l(o,r);case 401:throw new c(o);case 404:throw new s(r);case 410:throw new p(r,n?.newName??"unknown");case 429:throw new a(o);default:throw new i(o,t.status,r)}}};var _=class{constructor(t){this.client=t}create(t){return this.client._call("app_activation_create",t)}},O=class{constructor(t){this.client=t}get activation(){return new _(this.client)}},v=class{constructor(t){this.client=t}build(t){return this.client._call("card_delegation_approve_transaction_build",t)}},P=class{constructor(t){this.client=t}get transaction(){return new v(this.client)}},C=class{constructor(t){this.client=t}build(t){return this.client._call("card_delegation_revoke_transaction_build",t)}},y=class{constructor(t){this.client=t}get transaction(){return new C(this.client)}},I=class{constructor(t){this.client=t}retrieve(t){return this.client._call("card_delegation_token_retrieve",t)}},g=class{constructor(t){this.client=t}get approve(){return new P(this.client)}get revoke(){return new y(this.client)}get token(){return new I(this.client)}},k=class{constructor(t){this.client=t}check(t){return this.client._call("card_onboarding_check",t)}finish(t){return this.client._call("card_onboarding_finish",t)}start(t){return this.client._call("card_onboarding_start",t)}},A=class{constructor(t){this.client=t}list(t){return this.client._call("card_transaction_list",t)}},R=class{constructor(t){this.client=t}retrieve(t){return this.client._call("card_user_retrieve",t)}},f=class{constructor(t){this.client=t}check(t){return this.client._call("card_wallet_check",t)}link(t){return this.client._call("card_wallet_link",t)}list(t){return this.client._call("card_wallet_list",t)}unlink(t){return this.client._call("card_wallet_unlink",t)}},w=class{constructor(t){this.client=t}get delegation(){return new g(this.client)}get onboarding(){return new k(this.client)}get transaction(){return new A(this.client)}get user(){return new R(this.client)}get wallet(){return new f(this.client)}create(t){return this.client._call("card_create",t)}freeze(t){return this.client._call("card_freeze",t)}retrieve(t){return this.client._call("card_retrieve",t)}reveal(t){return this.client._call("card_reveal",t)}unfreeze(t){return this.client._call("card_unfreeze",t)}},L=class{constructor(t){this.client=t}list(t){return this.client._call("chain_list",t)}retrieve(t){return this.client._call("chain_retrieve",t)}},M=class{constructor(t){this.client=t}create(t){return this.client._call("cli_activation_create",t)}update(t){return this.client._call("cli_activation_update",t)}},T=class{constructor(t){this.client=t}get activation(){return new M(this.client)}},x=class{constructor(t){this.client=t}add(t){return this.client._call("commerce_cart_add",t)}remove(t){return this.client._call("commerce_cart_remove",t)}retrieve(t){return this.client._call("commerce_cart_retrieve",t)}update(t){return this.client._call("commerce_cart_update",t)}},V=class{constructor(t){this.client=t}pay(t){return this.client._call("commerce_checkout_pay",t)}start(t){return this.client._call("commerce_checkout_start",t)}},b=class{constructor(t){this.client=t}retrieve(t){return this.client._call("commerce_product_retrieve",t)}search(t){return this.client._call("commerce_product_search",t)}},S=class{constructor(t){this.client=t}list(t){return this.client._call("commerce_store_list",t)}retrieve(t){return this.client._call("commerce_store_retrieve",t)}},q=class{constructor(t){this.client=t}get cart(){return new x(this.client)}get checkout(){return new V(this.client)}get product(){return new b(this.client)}get store(){return new S(this.client)}search(t){return this.client._call("commerce_search",t)}},B=class{constructor(t){this.client=t}list(t){return this.client._call("deposit_transaction_list",t)}},H=class{constructor(t){this.client=t}get transaction(){return new B(this.client)}create(t){return this.client._call("deposit_create",t)}retrieve(t){return this.client._call("deposit_retrieve",t)}},U=class{constructor(t){this.client=t}create(t){return this.client._call("feedback_create",t)}},E=class{constructor(t){this.client=t}buy(t){return this.client._call("gateway_buy",t)}search(t){return this.client._call("gateway_search",t)}},W=class{constructor(t){this.client=t}retrieve(t){return this.client._call("hyperliquid_balance_retrieve",t)}},D=class{constructor(t){this.client=t}list(t){return this.client._call("hyperliquid_candle_list",t)}},F=class{constructor(t){this.client=t}create(t){return this.client._call("hyperliquid_deposit_create",t)}},z=class{constructor(t){this.client=t}submit(t){return this.client._call("hyperliquid_exchange_submit",t)}},$=class{constructor(t){this.client=t}list(t){return this.client._call("hyperliquid_funding_payment_list",t)}},G=class{constructor(t){this.client=t}get payment(){return new $(this.client)}},K=class{constructor(t){this.client=t}list(t){return this.client._call("hyperliquid_market_list",t)}},j=class{constructor(t){this.client=t}create(t){return this.client._call("hyperliquid_order_create",t)}list(t){return this.client._call("hyperliquid_order_list",t)}},J=class{constructor(t){this.client=t}retrieve(t){return this.client._call("hyperliquid_orderbook_retrieve",t)}},Q=class{constructor(t){this.client=t}list(t){return this.client._call("hyperliquid_position_list",t)}},X=class{constructor(t){this.client=t}list(t){return this.client._call("hyperliquid_predicted_funding_list",t)}},Y=class{constructor(t){this.client=t}get funding(){return new X(this.client)}},Z=class{constructor(t){this.client=t}list(t){return this.client._call("hyperliquid_price_list",t)}},N=class{constructor(t){this.client=t}list(t){return this.client._call("hyperliquid_trade_list",t)}},tt=class{constructor(t){this.client=t}get balance(){return new W(this.client)}get candle(){return new D(this.client)}get deposit(){return new F(this.client)}get exchange(){return new z(this.client)}get funding(){return new G(this.client)}get market(){return new K(this.client)}get order(){return new j(this.client)}get orderbook(){return new J(this.client)}get position(){return new Q(this.client)}get predicted(){return new Y(this.client)}get price(){return new Z(this.client)}get trade(){return new N(this.client)}},et=class{constructor(t){this.client=t}redeem(t){return this.client._call("polymarket_position_redeem",t)}sell(t){return this.client._call("polymarket_position_sell",t)}},rt=class{constructor(t){this.client=t}get position(){return new et(this.client)}},it=class{constructor(t){this.client=t}list(t){return this.client._call("prediction-market_event_list",t)}retrieve(t){return this.client._call("prediction-market_event_retrieve",t)}search(t){return this.client._call("prediction-market_event_search",t)}},nt=class{constructor(t){this.client=t}list(t){return this.client._call("prediction-market_market_ohlcv_list",t)}},ut=class{constructor(t){this.client=t}get ohlcv(){return new nt(this.client)}},ot=class{constructor(t){this.client=t}retrieve(t){return this.client._call("prediction-market_order_retrieve",t)}},ct=class{constructor(t){this.client=t}buy(t){return this.client._call("prediction-market_position_buy",t)}list(t){return this.client._call("prediction-market_position_list",t)}redeem(t){return this.client._call("prediction-market_position_redeem",t)}sell(t){return this.client._call("prediction-market_position_sell",t)}},at=class{constructor(t){this.client=t}get event(){return new it(this.client)}get market(){return new ut(this.client)}get order(){return new ot(this.client)}get position(){return new ct(this.client)}},lt=class{constructor(t){this.client=t}build(t){return this.client._call("swaps_transaction_build",t)}},st=class{constructor(t){this.client=t}get transaction(){return new lt(this.client)}},pt=class{constructor(t){this.client=t}list(t){return this.client._call("token_balance_list",t)}},dt=class{constructor(t){this.client=t}list(t){return this.client._call("token_holder_list",t)}},ht=class{constructor(t){this.client=t}list(t){return this.client._call("token_ohlcv_list",t)}},mt=class{constructor(t){this.client=t}list(t){return this.client._call("token_trending_list",t)}},_t=class{constructor(t){this.client=t}get balance(){return new pt(this.client)}get holder(){return new dt(this.client)}get ohlcv(){return new ht(this.client)}get trending(){return new mt(this.client)}check(t){return this.client._call("token_check",t)}list(t){return this.client._call("token_list",t)}retrieve(t){return this.client._call("token_retrieve",t)}search(t){return this.client._call("token_search",t)}},Ot=class{constructor(t){this.client=t}list(t){return this.client._call("transaction_list",t)}prepare(t){return this.client._call("transaction_prepare",t)}register(t){return this.client._call("transaction_register",t)}retrieve(t){return this.client._call("transaction_retrieve",t)}send(t){return this.client._call("transaction_send",t)}},vt=class{constructor(t){this.client=t}retrieve(t){return this.client._call("user_retrieve",t)}},Pt=class{constructor(t){this.client=t}accept(t){return this.client._call("virtual-account_agreement_accept",t)}list(t){return this.client._call("virtual-account_agreement_list",t)}},Ct=class{constructor(t){this.client=t}delete(t){return this.client._call("virtual-account_bank-account_delete",t)}list(t){return this.client._call("virtual-account_bank-account_list",t)}register(t){return this.client._call("virtual-account_bank-account_register",t)}retrieve(t){return this.client._call("virtual-account_bank-account_retrieve",t)}},yt=class{constructor(t){this.client=t}continue(t){return this.client._call("virtual-account_kyc_continue",t)}restart(t){return this.client._call("virtual-account_kyc_restart",t)}},It=class{constructor(t){this.client=t}cancel(t){return this.client._call("virtual-account_offramp_cancel",t)}create(t){return this.client._call("virtual-account_offramp_create",t)}initiate(t){return this.client._call("virtual-account_offramp_initiate",t)}list(t){return this.client._call("virtual-account_offramp_list",t)}retrieve(t){return this.client._call("virtual-account_offramp_retrieve",t)}update(t){return this.client._call("virtual-account_offramp_update",t)}},gt=class{constructor(t){this.client=t}create(t){return this.client._call("virtual-account_onramp_payment_create",t)}retrieve(t){return this.client._call("virtual-account_onramp_payment_retrieve",t)}},kt=class{constructor(t){this.client=t}get payment(){return new gt(this.client)}cancel(t){return this.client._call("virtual-account_onramp_cancel",t)}create(t){return this.client._call("virtual-account_onramp_create",t)}list(t){return this.client._call("virtual-account_onramp_list",t)}retrieve(t){return this.client._call("virtual-account_onramp_retrieve",t)}update(t){return this.client._call("virtual-account_onramp_update",t)}},At=class{constructor(t){this.client=t}list(t){return this.client._call("virtual-account_transaction_list",t)}},Rt=class{constructor(t){this.client=t}list(t){return this.client._call("virtual-account_wallet_list",t)}register(t){return this.client._call("virtual-account_wallet_register",t)}},ft=class{constructor(t){this.client=t}get agreement(){return new Pt(this.client)}get bankAccount(){return new Ct(this.client)}get kyc(){return new yt(this.client)}get offramp(){return new It(this.client)}get onramp(){return new kt(this.client)}get transaction(){return new At(this.client)}get wallet(){return new Rt(this.client)}create(t){return this.client._call("virtual-account_create",t)}retrieve(t){return this.client._call("virtual-account_retrieve",t)}},wt=class{constructor(t){this.client=t}list(t){return this.client._call("wallet_activity_list",t)}},Lt=class{constructor(t){this.client=t}retrieve(t){return this.client._call("wallet_pnl_retrieve",t)}},Mt=class{constructor(t){this.client=t}get activity(){return new wt(this.client)}get pnl(){return new Lt(this.client)}discover(t){return this.client._call("wallet_discover",t)}},d=class extends h{constructor(t={}){super(t)}get app(){return new O(this)}get card(){return new w(this)}get chain(){return new L(this)}get cli(){return new T(this)}get commerce(){return new q(this)}get deposit(){return new H(this)}get feedback(){return new U(this)}get gateway(){return new E(this)}get hyperliquid(){return new tt(this)}get polymarket(){return new rt(this)}get predictionMarket(){return new at(this)}get swaps(){return new st(this)}get token(){return new _t(this)}get transaction(){return new Ot(this)}get user(){return new vt(this)}get virtualAccount(){return new ft(this)}get wallet(){return new Mt(this)}buy(t){return this._call("buy",t)}login(t){return this._call("login",t)}refresh(t){return this._call("refresh",t)}verify(t){return this._call("verify",t)}};Ht();Bt();var m=null;function Wt(){return m||(m=new d({baseUrl:Vt(),auth:{type:"bearer",getToken:St,refreshToken:async()=>{let e=xt();if(!e?.refreshToken)throw new Error("No refresh token available");return(await bt(e)).accessToken}},headers:Tt()})),m}var Nt=new Proxy({},{get(e,t){return Reflect.get(Wt(),t)}});function te(){m=null}export{d as a,Nt as b,te as c};