@openfort/openfort-js 1.3.0 → 1.3.1

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 +1 @@
1
- "use strict";var e=require("axios"),t=require("axios-retry");const s="https://api.openfort.io".replace(/\/+$/,"");class n{basePath;axios;configuration;constructor(t,n=s,a=e){this.basePath=n,this.axios=a,t&&(this.configuration=t,this.basePath=t.basePath||this.basePath)}}class a extends Error{field;constructor(e,t){super(t),this.field=e,this.name="RequiredError"}}const o="https://example.com",i=function(e,t,s){if(null==s)throw new a(t,`Required parameter ${t} was null or undefined when calling ${e}.`)},r=async function(e,t){if(t&&t.accessToken){const s="function"==typeof t.accessToken?await t.accessToken():await t.accessToken;e.Authorization="Bearer "+s}};function c(e,t,s=""){null!=t&&("object"==typeof t?Array.isArray(t)?t.forEach(t=>c(e,t,s)):Object.keys(t).forEach(n=>c(e,t[n],`${s}${""!==s?".":""}${n}`)):e.has(s)?e.append(s,t):e.set(s,t))}const h=function(e,...t){const s=new URLSearchParams(e.search);c(s,t),e.search=s.toString()},u=function(e,t,s){const n="string"!=typeof e;return(n&&s&&s.isJsonMime?s.isJsonMime(t.headers["Content-Type"]):n)?JSON.stringify(void 0!==e?e:{}):e||""},d=function(e){return e.pathname+e.search+e.hash},l=function(e,t,s,n){return(a=t,o=s)=>{const i={...e.options,url:(n?.basePath||a.defaults.baseURL||o)+e.url};return a.request(i)}},p=function(t){const n=function(e){return{cancelTransferOwnership:async(t,s,n={})=>{i("cancelTransferOwnership","id",t),i("cancelTransferOwnership","cancelTransferOwnershipRequest",s);const a="/v1/accounts/{id}/cancel_transfer_ownership".replace("{id}",encodeURIComponent(String(t))),c=new URL(a,o);let l;e&&(l=e.baseOptions);const p={method:"POST",...l,...n},P={};await r(P,e),P["Content-Type"]="application/json",h(c,{});let w=l&&l.headers?l.headers:{};return p.headers={...P,...w,...n.headers},p.data=u(s,p,e),{url:d(c),options:p}},completeRecovery:async(t,s,n={})=>{i("completeRecovery","id",t),i("completeRecovery","completeRecoveryRequest",s);const a="/v1/accounts/{id}/complete_recovery".replace("{id}",encodeURIComponent(String(t))),c=new URL(a,o);let l;e&&(l=e.baseOptions);const p={method:"POST",...l,...n},P={};await r(P,e),P["Content-Type"]="application/json",h(c,{});let w=l&&l.headers?l.headers:{};return p.headers={...P,...w,...n.headers},p.data=u(s,p,e),{url:d(c),options:p}},createAccount:async(t,s={})=>{i("createAccount","createAccountRequest",t);const n=new URL("/v1/accounts",o);let a;e&&(a=e.baseOptions);const c={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",h(n,{});let p=a&&a.headers?a.headers:{};return c.headers={...l,...p,...s.headers},c.data=u(t,c,e),{url:d(n),options:c}},deployAccount:async(t,s,n={})=>{i("deployAccount","id",t),i("deployAccount","deployRequest",s);const a="/v1/accounts/{id}/deploy".replace("{id}",encodeURIComponent(String(t))),c=new URL(a,o);let l;e&&(l=e.baseOptions);const p={method:"POST",...l,...n},P={};await r(P,e),P["Content-Type"]="application/json",h(c,{});let w=l&&l.headers?l.headers:{};return p.headers={...P,...w,...n.headers},p.data=u(s,p,e),{url:d(c),options:p}},disableAccount:async(t,s={})=>{i("disableAccount","id",t);const n="/v1/accounts/{id}/disable".replace("{id}",encodeURIComponent(String(t))),a=new URL(n,o);let c;e&&(c=e.baseOptions);const u={method:"POST",...c,...s},l={};await r(l,e),h(a,{});let p=c&&c.headers?c.headers:{};return u.headers={...l,...p,...s.headers},{url:d(a),options:u}},getAccount:async(t,s,n={})=>{i("getAccount","id",t);const a="/v1/accounts/{id}".replace("{id}",encodeURIComponent(String(t))),c=new URL(a,o);let u;e&&(u=e.baseOptions);const l={method:"GET",...u,...n},p={},P={};await r(p,e),s&&(P.expand=s),h(c,P);let w=u&&u.headers?u.headers:{};return l.headers={...p,...w,...n.headers},{url:d(c),options:l}},getAccounts:async(t,s,n,a,i,c,u,l={})=>{const p=new URL("/v1/accounts",o);let P;e&&(P=e.baseOptions);const w={method:"GET",...P,...l},y={},g={};await r(y,e),void 0!==t&&(g.limit=t),void 0!==s&&(g.skip=s),void 0!==n&&(g.order=n),void 0!==a&&(g.chainId=a),void 0!==i&&(g.player=i),void 0!==c&&(g.address=c),u&&(g.expand=u),h(p,g);let m=P&&P.headers?P.headers:{};return w.headers={...y,...m,...l.headers},{url:d(p),options:w}},requestTransferOwnership:async(t,s,n={})=>{i("requestTransferOwnership","id",t),i("requestTransferOwnership","transferOwnershipRequest",s);const a="/v1/accounts/{id}/request_transfer_ownership".replace("{id}",encodeURIComponent(String(t))),c=new URL(a,o);let l;e&&(l=e.baseOptions);const p={method:"POST",...l,...n},P={};await r(P,e),P["Content-Type"]="application/json",h(c,{});let w=l&&l.headers?l.headers:{};return p.headers={...P,...w,...n.headers},p.data=u(s,p,e),{url:d(c),options:p}},signPayload:async(t,s,n={})=>{i("signPayload","id",t),i("signPayload","signPayloadRequest",s);const a="/v1/accounts/{id}/sign_payload".replace("{id}",encodeURIComponent(String(t))),c=new URL(a,o);let l;e&&(l=e.baseOptions);const p={method:"POST",...l,...n},P={};await r(P,e),P["Content-Type"]="application/json",h(c,{});let w=l&&l.headers?l.headers:{};return p.headers={...P,...w,...n.headers},p.data=u(s,p,e),{url:d(c),options:p}},startRecovery:async(t,s,n={})=>{i("startRecovery","id",t),i("startRecovery","startRecoveryRequest",s);const a="/v1/accounts/{id}/start_recovery".replace("{id}",encodeURIComponent(String(t))),c=new URL(a,o);let l;e&&(l=e.baseOptions);const p={method:"POST",...l,...n},P={};await r(P,e),P["Content-Type"]="application/json",h(c,{});let w=l&&l.headers?l.headers:{};return p.headers={...P,...w,...n.headers},p.data=u(s,p,e),{url:d(c),options:p}},syncAccount:async(t,s={})=>{i("syncAccount","id",t);const n="/v1/accounts/{id}/sync".replace("{id}",encodeURIComponent(String(t))),a=new URL(n,o);let c;e&&(c=e.baseOptions);const u={method:"POST",...c,...s},l={};await r(l,e),h(a,{});let p=c&&c.headers?c.headers:{};return u.headers={...l,...p,...s.headers},{url:d(a),options:u}}}}(t);return{async cancelTransferOwnership(a,o,i){const r=await n.cancelTransferOwnership(a,o,i);return l(r,e,s,t)},async completeRecovery(a,o,i){const r=await n.completeRecovery(a,o,i);return l(r,e,s,t)},async createAccount(a,o){const i=await n.createAccount(a,o);return l(i,e,s,t)},async deployAccount(a,o,i){const r=await n.deployAccount(a,o,i);return l(r,e,s,t)},async disableAccount(a,o){const i=await n.disableAccount(a,o);return l(i,e,s,t)},async getAccount(a,o,i){const r=await n.getAccount(a,o,i);return l(r,e,s,t)},async getAccounts(a,o,i,r,c,h,u,d){const p=await n.getAccounts(a,o,i,r,c,h,u,d);return l(p,e,s,t)},async requestTransferOwnership(a,o,i){const r=await n.requestTransferOwnership(a,o,i);return l(r,e,s,t)},async signPayload(a,o,i){const r=await n.signPayload(a,o,i);return l(r,e,s,t)},async startRecovery(a,o,i){const r=await n.startRecovery(a,o,i);return l(r,e,s,t)},async syncAccount(a,o){const i=await n.syncAccount(a,o);return l(i,e,s,t)}}};class P extends n{cancelTransferOwnership(e,t){return p(this.configuration).cancelTransferOwnership(e.id,e.cancelTransferOwnershipRequest,t).then(e=>e(this.axios,this.basePath))}completeRecovery(e,t){return p(this.configuration).completeRecovery(e.id,e.completeRecoveryRequest,t).then(e=>e(this.axios,this.basePath))}createAccount(e,t){return p(this.configuration).createAccount(e.createAccountRequest,t).then(e=>e(this.axios,this.basePath))}deployAccount(e,t){return p(this.configuration).deployAccount(e.id,e.deployRequest,t).then(e=>e(this.axios,this.basePath))}disableAccount(e,t){return p(this.configuration).disableAccount(e.id,t).then(e=>e(this.axios,this.basePath))}getAccount(e,t){return p(this.configuration).getAccount(e.id,e.expand,t).then(e=>e(this.axios,this.basePath))}getAccounts(e={},t){return p(this.configuration).getAccounts(e.limit,e.skip,e.order,e.chainId,e.player,e.address,e.expand,t).then(e=>e(this.axios,this.basePath))}requestTransferOwnership(e,t){return p(this.configuration).requestTransferOwnership(e.id,e.transferOwnershipRequest,t).then(e=>e(this.axios,this.basePath))}signPayload(e,t){return p(this.configuration).signPayload(e.id,e.signPayloadRequest,t).then(e=>e(this.axios,this.basePath))}startRecovery(e,t){return p(this.configuration).startRecovery(e.id,e.startRecoveryRequest,t).then(e=>e(this.axios,this.basePath))}syncAccount(e,t){return p(this.configuration).syncAccount(e.id,t).then(e=>e(this.axios,this.basePath))}}const w=function(t){const n=function(e){return{createAccountV2:async(t,s={})=>{i("createAccountV2","createAccountRequestV2",t);const n=new URL("/v2/accounts",o);let a;e&&(a=e.baseOptions);const c={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",h(n,{});let p=a&&a.headers?a.headers:{};return c.headers={...l,...p,...s.headers},c.data=u(t,c,e),{url:d(n),options:c}},getAccountV2:async(t,s={})=>{i("getAccountV2","id",t);const n="/v2/accounts/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(n,o);let c;e&&(c=e.baseOptions);const u={method:"GET",...c,...s},l={};await r(l,e),h(a,{});let p=c&&c.headers?c.headers:{};return u.headers={...l,...p,...s.headers},{url:d(a),options:u}},getAccountsV2:async(t,s,n,a,i,c,u,l,p,P={})=>{const w=new URL("/v2/accounts",o);let y;e&&(y=e.baseOptions);const g={method:"GET",...y,...P},m={},R={};await r(m,e),void 0!==t&&(R.limit=t),void 0!==s&&(R.skip=s),void 0!==n&&(R.order=n),void 0!==a&&(R.chainId=a),void 0!==i&&(R.user=i),void 0!==c&&(R.chainType=c),void 0!==u&&(R.accountType=u),void 0!==l&&(R.custody=l),void 0!==p&&(R.address=p),h(w,R);let f=y&&y.headers?y.headers:{};return g.headers={...m,...f,...P.headers},{url:d(w),options:g}},getSignerIdByAddress:async(t,s={})=>{i("getSignerIdByAddress","address",t);const n=new URL("/v2/accounts/signer",o);let a;e&&(a=e.baseOptions);const c={method:"GET",...a,...s},u={},l={};await r(u,e),void 0!==t&&(l.address=t),h(n,l);let p=a&&a.headers?a.headers:{};return c.headers={...u,...p,...s.headers},{url:d(n),options:c}},removeAccount:async(t,s={})=>{i("removeAccount","id",t);const n="/v2/accounts/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(n,o);let c;e&&(c=e.baseOptions);const u={method:"DELETE",...c,...s},l={};await r(l,e),h(a,{});let p=c&&c.headers?c.headers:{};return u.headers={...l,...p,...s.headers},{url:d(a),options:u}},switchChainV2:async(t,s={})=>{i("switchChainV2","switchChainQueriesV2",t);const n=new URL("/v2/accounts/switch-chain",o);let a;e&&(a=e.baseOptions);const c={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",h(n,{});let p=a&&a.headers?a.headers:{};return c.headers={...l,...p,...s.headers},c.data=u(t,c,e),{url:d(n),options:c}}}}(t);return{async createAccountV2(a,o){const i=await n.createAccountV2(a,o);return l(i,e,s,t)},async getAccountV2(a,o){const i=await n.getAccountV2(a,o);return l(i,e,s,t)},async getAccountsV2(a,o,i,r,c,h,u,d,p,P){const w=await n.getAccountsV2(a,o,i,r,c,h,u,d,p,P);return l(w,e,s,t)},async getSignerIdByAddress(a,o){const i=await n.getSignerIdByAddress(a,o);return l(i,e,s,t)},async removeAccount(a,o){const i=await n.removeAccount(a,o);return l(i,e,s,t)},async switchChainV2(a,o){const i=await n.switchChainV2(a,o);return l(i,e,s,t)}}};class y extends n{createAccountV2(e,t){return w(this.configuration).createAccountV2(e.createAccountRequestV2,t).then(e=>e(this.axios,this.basePath))}getAccountV2(e,t){return w(this.configuration).getAccountV2(e.id,t).then(e=>e(this.axios,this.basePath))}getAccountsV2(e={},t){return w(this.configuration).getAccountsV2(e.limit,e.skip,e.order,e.chainId,e.user,e.chainType,e.accountType,e.custody,e.address,t).then(e=>e(this.axios,this.basePath))}getSignerIdByAddress(e,t){return w(this.configuration).getSignerIdByAddress(e.address,t).then(e=>e(this.axios,this.basePath))}removeAccount(e,t){return w(this.configuration).removeAccount(e.id,t).then(e=>e(this.axios,this.basePath))}switchChainV2(e,t){return w(this.configuration).switchChainV2(e.switchChainQueriesV2,t).then(e=>e(this.axios,this.basePath))}}const g=function(t){const n=function(e){return{authenticateSIWE:async(t,s={})=>{i("authenticateSIWE","sIWEAuthenticateRequest",t);const n=new URL("/iam/v1/siwe/authenticate",o);let a;e&&(a=e.baseOptions);const c={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",h(n,{});let p=a&&a.headers?a.headers:{};return c.headers={...l,...p,...s.headers},c.data=u(t,c,e),{url:d(n),options:c}},getJwks:async(t,s={})=>{i("getJwks","publishableKey",t);const n="/iam/v1/{publishable_key}/jwks.json".replace("{publishable_key}",encodeURIComponent(String(t))),a=new URL(n,o);let r;e&&(r=e.baseOptions);const c={method:"GET",...r,...s};h(a,{});let u=r&&r.headers?r.headers:{};return c.headers={...u,...s.headers},{url:d(a),options:c}},initOAuth:async(t,s,n={})=>{i("initOAuth","oAuthInitRequest",t);const a=new URL("/iam/v1/oauth/init",o);let c;e&&(c=e.baseOptions);const l={method:"POST",...c,...n},p={};await r(p,e),null!=s&&(p["x-game"]=String(s)),p["Content-Type"]="application/json",h(a,{});let P=c&&c.headers?c.headers:{};return l.headers={...p,...P,...n.headers},l.data=u(t,l,e),{url:d(a),options:l}},initSIWE:async(t,s,n={})=>{i("initSIWE","sIWERequest",t);const a=new URL("/iam/v1/siwe/init",o);let c;e&&(c=e.baseOptions);const l={method:"POST",...c,...n},p={};await r(p,e),null!=s&&(p["x-game"]=String(s)),p["Content-Type"]="application/json",h(a,{});let P=c&&c.headers?c.headers:{};return l.headers={...p,...P,...n.headers},l.data=u(t,l,e),{url:d(a),options:l}},linkEmail:async(t,s,n={})=>{i("linkEmail","loginRequest",t);const a=new URL("/iam/v1/password/link",o);let r;e&&(r=e.baseOptions);const c={method:"POST",...r,...n},l={};null!=s&&(l["x-game"]=String(s)),l["Content-Type"]="application/json",h(a,{});let p=r&&r.headers?r.headers:{};return c.headers={...l,...p,...n.headers},c.data=u(t,c,e),{url:d(a),options:c}},linkOAuth:async(t,s,n={})=>{i("linkOAuth","oAuthInitRequest",t);const a=new URL("/iam/v1/oauth/init_link",o);let r;e&&(r=e.baseOptions);const c={method:"POST",...r,...n},l={};null!=s&&(l["x-game"]=String(s)),l["Content-Type"]="application/json",h(a,{});let p=r&&r.headers?r.headers:{};return c.headers={...l,...p,...n.headers},c.data=u(t,c,e),{url:d(a),options:c}},linkSIWE:async(t,s={})=>{i("linkSIWE","sIWEAuthenticateRequest",t);const n=new URL("/iam/v1/siwe/link",o);let a;e&&(a=e.baseOptions);const r={method:"POST",...a,...s},c={"Content-Type":"application/json"};h(n,{});let l=a&&a.headers?a.headers:{};return r.headers={...c,...l,...s.headers},r.data=u(t,r,e),{url:d(n),options:r}},linkThirdParty:async(t,s,n={})=>{i("linkThirdParty","thirdPartyLinkRequest",t);const a=new URL("/iam/v1/oauth/link",o);let r;e&&(r=e.baseOptions);const c={method:"POST",...r,...n},l={};null!=s&&(l["x-game"]=String(s)),l["Content-Type"]="application/json",h(a,{});let p=r&&r.headers?r.headers:{};return c.headers={...l,...p,...n.headers},c.data=u(t,c,e),{url:d(a),options:c}},loginEmailPassword:async(t,s,n={})=>{i("loginEmailPassword","loginRequest",t);const a=new URL("/iam/v1/password/login",o);let c;e&&(c=e.baseOptions);const l={method:"POST",...c,...n},p={};await r(p,e),null!=s&&(p["x-game"]=String(s)),p["Content-Type"]="application/json",h(a,{});let P=c&&c.headers?c.headers:{};return l.headers={...p,...P,...n.headers},l.data=u(t,l,e),{url:d(a),options:l}},loginOIDC:async(t,s,n={})=>{i("loginOIDC","loginOIDCRequest",t);const a=new URL("/iam/v1/oidc/login",o);let c;e&&(c=e.baseOptions);const l={method:"POST",...c,...n},p={};await r(p,e),null!=s&&(p["x-game"]=String(s)),p["Content-Type"]="application/json",h(a,{});let P=c&&c.headers?c.headers:{};return l.headers={...p,...P,...n.headers},l.data=u(t,l,e),{url:d(a),options:l}},loginWithIdToken:async(t,s={})=>{i("loginWithIdToken","loginWithIdTokenRequest",t);const n=new URL("/iam/v1/oauth/login_id_token",o);let a;e&&(a=e.baseOptions);const c={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",h(n,{});let p=a&&a.headers?a.headers:{};return c.headers={...l,...p,...s.headers},c.data=u(t,c,e),{url:d(n),options:c}},logout:async(t,s={})=>{i("logout","logoutRequest",t);const n=new URL("/iam/v1/sessions/logout",o);let a;e&&(a=e.baseOptions);const r={method:"POST",...a,...s},c={"Content-Type":"application/json"};h(n,{});let l=a&&a.headers?a.headers:{};return r.headers={...c,...l,...s.headers},r.data=u(t,r,e),{url:d(n),options:r}},me:async(t={})=>{const s=new URL("/iam/v1/me",o);let n;e&&(n=e.baseOptions);const a={method:"GET",...n,...t};h(s,{});let i=n&&n.headers?n.headers:{};return a.headers={...i,...t.headers},{url:d(s),options:a}},poolOAuth:async(t,s={})=>{i("poolOAuth","key",t);const n=new URL("/iam/v1/oauth/pool",o);let a;e&&(a=e.baseOptions);const c={method:"POST",...a,...s},u={},l={};await r(u,e),void 0!==t&&(l.key=t),h(n,l);let p=a&&a.headers?a.headers:{};return c.headers={...u,...p,...s.headers},{url:d(n),options:c}},refresh:async(t,s={})=>{i("refresh","refreshTokenRequest",t);const n=new URL("/iam/v1/sessions",o);let a;e&&(a=e.baseOptions);const c={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",h(n,{});let p=a&&a.headers?a.headers:{};return c.headers={...l,...p,...s.headers},c.data=u(t,c,e),{url:d(n),options:c}},registerGuest:async(t,s={})=>{const n=new URL("/iam/v1/guest",o);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...s},c={};await r(c,e),null!=t&&(c["x-game"]=String(t)),h(n,{});let u=a&&a.headers?a.headers:{};return i.headers={...c,...u,...s.headers},{url:d(n),options:i}},requestEmailVerification:async(t,s={})=>{i("requestEmailVerification","requestVerifyEmailRequest",t);const n=new URL("/iam/v1/password/request_email_verification",o);let a;e&&(a=e.baseOptions);const c={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",h(n,{});let p=a&&a.headers?a.headers:{};return c.headers={...l,...p,...s.headers},c.data=u(t,c,e),{url:d(n),options:c}},requestResetPassword:async(t,s={})=>{i("requestResetPassword","requestResetPasswordRequest",t);const n=new URL("/iam/v1/password/request_reset",o);let a;e&&(a=e.baseOptions);const c={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",h(n,{});let p=a&&a.headers?a.headers:{};return c.headers={...l,...p,...s.headers},c.data=u(t,c,e),{url:d(n),options:c}},resetPassword:async(t,s={})=>{i("resetPassword","resetPasswordRequest",t);const n=new URL("/iam/v1/password/reset",o);let a;e&&(a=e.baseOptions);const c={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",h(n,{});let p=a&&a.headers?a.headers:{};return c.headers={...l,...p,...s.headers},c.data=u(t,c,e),{url:d(n),options:c}},signupEmailPassword:async(t,s,n={})=>{i("signupEmailPassword","signupRequest",t);const a=new URL("/iam/v1/password/signup",o);let c;e&&(c=e.baseOptions);const l={method:"POST",...c,...n},p={};await r(p,e),null!=s&&(p["x-game"]=String(s)),p["Content-Type"]="application/json",h(a,{});let P=c&&c.headers?c.headers:{};return l.headers={...p,...P,...n.headers},l.data=u(t,l,e),{url:d(a),options:l}},thirdParty:async(t,s,n={})=>{i("thirdParty","thirdPartyOAuthRequest",t);const a=new URL("/iam/v1/oauth/third_party",o);let c;e&&(c=e.baseOptions);const l={method:"POST",...c,...n},p={};await r(p,e),null!=s&&(p["x-game"]=String(s)),p["Content-Type"]="application/json",h(a,{});let P=c&&c.headers?c.headers:{};return l.headers={...p,...P,...n.headers},l.data=u(t,l,e),{url:d(a),options:l}},unlinkEmail:async(t,s={})=>{i("unlinkEmail","unlinkEmailRequest",t);const n=new URL("/iam/v1/password/unlink",o);let a;e&&(a=e.baseOptions);const r={method:"POST",...a,...s},c={"Content-Type":"application/json"};h(n,{});let l=a&&a.headers?a.headers:{};return r.headers={...c,...l,...s.headers},r.data=u(t,r,e),{url:d(n),options:r}},unlinkOAuth:async(t,s={})=>{i("unlinkOAuth","unlinkOAuthRequest",t);const n=new URL("/iam/v1/oauth/unlink",o);let a;e&&(a=e.baseOptions);const r={method:"POST",...a,...s},c={"Content-Type":"application/json"};h(n,{});let l=a&&a.headers?a.headers:{};return r.headers={...c,...l,...s.headers},r.data=u(t,r,e),{url:d(n),options:r}},unlinkSIWE:async(t,s={})=>{i("unlinkSIWE","sIWERequest",t);const n=new URL("/iam/v1/siwe/unlink",o);let a;e&&(a=e.baseOptions);const r={method:"POST",...a,...s},c={"Content-Type":"application/json"};h(n,{});let l=a&&a.headers?a.headers:{};return r.headers={...c,...l,...s.headers},r.data=u(t,r,e),{url:d(n),options:r}},verifyEmail:async(t,s={})=>{i("verifyEmail","verifyEmailRequest",t);const n=new URL("/iam/v1/password/verify_email",o);let a;e&&(a=e.baseOptions);const c={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",h(n,{});let p=a&&a.headers?a.headers:{};return c.headers={...l,...p,...s.headers},c.data=u(t,c,e),{url:d(n),options:c}},verifyOAuthToken:async(t,s={})=>{i("verifyOAuthToken","authenticateOAuthRequest",t);const n=new URL("/iam/v1/oauth/verify",o);let a;e&&(a=e.baseOptions);const c={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",h(n,{});let p=a&&a.headers?a.headers:{};return c.headers={...l,...p,...s.headers},c.data=u(t,c,e),{url:d(n),options:c}}}}(t);return{async authenticateSIWE(a,o){const i=await n.authenticateSIWE(a,o);return l(i,e,s,t)},async getJwks(a,o){const i=await n.getJwks(a,o);return l(i,e,s,t)},async initOAuth(a,o,i){const r=await n.initOAuth(a,o,i);return l(r,e,s,t)},async initSIWE(a,o,i){const r=await n.initSIWE(a,o,i);return l(r,e,s,t)},async linkEmail(a,o,i){const r=await n.linkEmail(a,o,i);return l(r,e,s,t)},async linkOAuth(a,o,i){const r=await n.linkOAuth(a,o,i);return l(r,e,s,t)},async linkSIWE(a,o){const i=await n.linkSIWE(a,o);return l(i,e,s,t)},async linkThirdParty(a,o,i){const r=await n.linkThirdParty(a,o,i);return l(r,e,s,t)},async loginEmailPassword(a,o,i){const r=await n.loginEmailPassword(a,o,i);return l(r,e,s,t)},async loginOIDC(a,o,i){const r=await n.loginOIDC(a,o,i);return l(r,e,s,t)},async loginWithIdToken(a,o){const i=await n.loginWithIdToken(a,o);return l(i,e,s,t)},async logout(a,o){const i=await n.logout(a,o);return l(i,e,s,t)},async me(a){const o=await n.me(a);return l(o,e,s,t)},async poolOAuth(a,o){const i=await n.poolOAuth(a,o);return l(i,e,s,t)},async refresh(a,o){const i=await n.refresh(a,o);return l(i,e,s,t)},async registerGuest(a,o){const i=await n.registerGuest(a,o);return l(i,e,s,t)},async requestEmailVerification(a,o){const i=await n.requestEmailVerification(a,o);return l(i,e,s,t)},async requestResetPassword(a,o){const i=await n.requestResetPassword(a,o);return l(i,e,s,t)},async resetPassword(a,o){const i=await n.resetPassword(a,o);return l(i,e,s,t)},async signupEmailPassword(a,o,i){const r=await n.signupEmailPassword(a,o,i);return l(r,e,s,t)},async thirdParty(a,o,i){const r=await n.thirdParty(a,o,i);return l(r,e,s,t)},async unlinkEmail(a,o){const i=await n.unlinkEmail(a,o);return l(i,e,s,t)},async unlinkOAuth(a,o){const i=await n.unlinkOAuth(a,o);return l(i,e,s,t)},async unlinkSIWE(a,o){const i=await n.unlinkSIWE(a,o);return l(i,e,s,t)},async verifyEmail(a,o){const i=await n.verifyEmail(a,o);return l(i,e,s,t)},async verifyOAuthToken(a,o){const i=await n.verifyOAuthToken(a,o);return l(i,e,s,t)}}};class m extends n{authenticateSIWE(e,t){return g(this.configuration).authenticateSIWE(e.sIWEAuthenticateRequest,t).then(e=>e(this.axios,this.basePath))}getJwks(e,t){return g(this.configuration).getJwks(e.publishableKey,t).then(e=>e(this.axios,this.basePath))}initOAuth(e,t){return g(this.configuration).initOAuth(e.oAuthInitRequest,e.xGame,t).then(e=>e(this.axios,this.basePath))}initSIWE(e,t){return g(this.configuration).initSIWE(e.sIWERequest,e.xGame,t).then(e=>e(this.axios,this.basePath))}linkEmail(e,t){return g(this.configuration).linkEmail(e.loginRequest,e.xGame,t).then(e=>e(this.axios,this.basePath))}linkOAuth(e,t){return g(this.configuration).linkOAuth(e.oAuthInitRequest,e.xGame,t).then(e=>e(this.axios,this.basePath))}linkSIWE(e,t){return g(this.configuration).linkSIWE(e.sIWEAuthenticateRequest,t).then(e=>e(this.axios,this.basePath))}linkThirdParty(e,t){return g(this.configuration).linkThirdParty(e.thirdPartyLinkRequest,e.xGame,t).then(e=>e(this.axios,this.basePath))}loginEmailPassword(e,t){return g(this.configuration).loginEmailPassword(e.loginRequest,e.xGame,t).then(e=>e(this.axios,this.basePath))}loginOIDC(e,t){return g(this.configuration).loginOIDC(e.loginOIDCRequest,e.xGame,t).then(e=>e(this.axios,this.basePath))}loginWithIdToken(e,t){return g(this.configuration).loginWithIdToken(e.loginWithIdTokenRequest,t).then(e=>e(this.axios,this.basePath))}logout(e,t){return g(this.configuration).logout(e.logoutRequest,t).then(e=>e(this.axios,this.basePath))}me(e){return g(this.configuration).me(e).then(e=>e(this.axios,this.basePath))}poolOAuth(e,t){return g(this.configuration).poolOAuth(e.key,t).then(e=>e(this.axios,this.basePath))}refresh(e,t){return g(this.configuration).refresh(e.refreshTokenRequest,t).then(e=>e(this.axios,this.basePath))}registerGuest(e={},t){return g(this.configuration).registerGuest(e.xGame,t).then(e=>e(this.axios,this.basePath))}requestEmailVerification(e,t){return g(this.configuration).requestEmailVerification(e.requestVerifyEmailRequest,t).then(e=>e(this.axios,this.basePath))}requestResetPassword(e,t){return g(this.configuration).requestResetPassword(e.requestResetPasswordRequest,t).then(e=>e(this.axios,this.basePath))}resetPassword(e,t){return g(this.configuration).resetPassword(e.resetPasswordRequest,t).then(e=>e(this.axios,this.basePath))}signupEmailPassword(e,t){return g(this.configuration).signupEmailPassword(e.signupRequest,e.xGame,t).then(e=>e(this.axios,this.basePath))}thirdParty(e,t){return g(this.configuration).thirdParty(e.thirdPartyOAuthRequest,e.xGame,t).then(e=>e(this.axios,this.basePath))}unlinkEmail(e,t){return g(this.configuration).unlinkEmail(e.unlinkEmailRequest,t).then(e=>e(this.axios,this.basePath))}unlinkOAuth(e,t){return g(this.configuration).unlinkOAuth(e.unlinkOAuthRequest,t).then(e=>e(this.axios,this.basePath))}unlinkSIWE(e,t){return g(this.configuration).unlinkSIWE(e.sIWERequest,t).then(e=>e(this.axios,this.basePath))}verifyEmail(e,t){return g(this.configuration).verifyEmail(e.verifyEmailRequest,t).then(e=>e(this.axios,this.basePath))}verifyOAuthToken(e,t){return g(this.configuration).verifyOAuthToken(e.authenticateOAuthRequest,t).then(e=>e(this.axios,this.basePath))}}const R=function(t){const n=function(e){return{accountInfoPost:async(t,s={})=>{i("accountInfoPost","accountInfoPostRequest",t);const n=new URL("/account-info",o);let a;e&&(a=e.baseOptions);const r={method:"POST",...a,...s},c={"Content-Type":"application/json"};h(n,{});let l=a&&a.headers?a.headers:{};return r.headers={...c,...l,...s.headers},r.data=u(t,r,e),{url:d(n),options:r}},changeEmailPost:async(t,s={})=>{i("changeEmailPost","changeEmailPostRequest",t);const n=new URL("/change-email",o);let a;e&&(a=e.baseOptions);const r={method:"POST",...a,...s},c={"Content-Type":"application/json"};h(n,{});let l=a&&a.headers?a.headers:{};return r.headers={...c,...l,...s.headers},r.data=u(t,r,e),{url:d(n),options:r}},changePasswordPost:async(t,s={})=>{i("changePasswordPost","changePasswordPostRequest",t);const n=new URL("/change-password",o);let a;e&&(a=e.baseOptions);const r={method:"POST",...a,...s},c={"Content-Type":"application/json"};h(n,{});let l=a&&a.headers?a.headers:{};return r.headers={...c,...l,...s.headers},r.data=u(t,r,e),{url:d(n),options:r}},checkVerificationOtp:async(t,s={})=>{i("checkVerificationOtp","checkVerificationOtpRequest",t);const n=new URL("/email-otp/check-verification-otp",o);let a;e&&(a=e.baseOptions);const r={method:"POST",...a,...s},c={"Content-Type":"application/json"};h(n,{});let l=a&&a.headers?a.headers:{};return r.headers={...c,...l,...s.headers},r.data=u(t,r,e),{url:d(n),options:r}},emailOtpResetPasswordPost:async(t,s={})=>{i("emailOtpResetPasswordPost","emailOtpResetPasswordPostRequest",t);const n=new URL("/email-otp/reset-password",o);let a;e&&(a=e.baseOptions);const r={method:"POST",...a,...s},c={"Content-Type":"application/json"};h(n,{});let l=a&&a.headers?a.headers:{};return r.headers={...c,...l,...s.headers},r.data=u(t,r,e),{url:d(n),options:r}},emailOtpSendVerificationOtpPost:async(t,s={})=>{i("emailOtpSendVerificationOtpPost","emailOtpSendVerificationOtpPostRequest",t);const n=new URL("/email-otp/send-verification-otp",o);let a;e&&(a=e.baseOptions);const r={method:"POST",...a,...s},c={"Content-Type":"application/json"};h(n,{});let l=a&&a.headers?a.headers:{};return r.headers={...c,...l,...s.headers},r.data=u(t,r,e),{url:d(n),options:r}},emailOtpVerifyEmailPost:async(t,s={})=>{i("emailOtpVerifyEmailPost","emailOtpVerifyEmailPostRequest",t);const n=new URL("/email-otp/verify-email",o);let a;e&&(a=e.baseOptions);const r={method:"POST",...a,...s},c={"Content-Type":"application/json"};h(n,{});let l=a&&a.headers?a.headers:{};return r.headers={...c,...l,...s.headers},r.data=u(t,r,e),{url:d(n),options:r}},forgetPasswordEmailOtpPost:async(t,s={})=>{i("forgetPasswordEmailOtpPost","forgetPasswordEmailOtpPostRequest",t);const n=new URL("/forget-password/email-otp",o);let a;e&&(a=e.baseOptions);const r={method:"POST",...a,...s},c={"Content-Type":"application/json"};h(n,{});let l=a&&a.headers?a.headers:{};return r.headers={...c,...l,...s.headers},r.data=u(t,r,e),{url:d(n),options:r}},forgetPasswordPost:async(t,s={})=>{i("forgetPasswordPost","forgetPasswordPostRequest",t);const n=new URL("/forget-password",o);let a;e&&(a=e.baseOptions);const r={method:"POST",...a,...s},c={"Content-Type":"application/json"};h(n,{});let l=a&&a.headers?a.headers:{};return r.headers={...c,...l,...s.headers},r.data=u(t,r,e),{url:d(n),options:r}},getAccessTokenPost:async(t,s={})=>{i("getAccessTokenPost","refreshTokenPostRequest",t);const n=new URL("/get-access-token",o);let a;e&&(a=e.baseOptions);const r={method:"POST",...a,...s},c={"Content-Type":"application/json"};h(n,{});let l=a&&a.headers?a.headers:{};return r.headers={...c,...l,...s.headers},r.data=u(t,r,e),{url:d(n),options:r}},getSessionGet:async(t,s,n={})=>{const a=new URL("/get-session",o);let i;e&&(i=e.baseOptions);const r={method:"GET",...i,...n},c={},u={};void 0!==s&&(u.disableCookieCache=s),null!=t&&(c["x-project-key"]=String(t)),h(a,u);let l=i&&i.headers?i.headers:{};return r.headers={...c,...l,...n.headers},{url:d(a),options:r}},linkSiweListWalletsGet:async(t={})=>{const s=new URL("/link-siwe/list-wallets",o);let n;e&&(n=e.baseOptions);const a={method:"GET",...n,...t};h(s,{});let i=n&&n.headers?n.headers:{};return a.headers={...i,...t.headers},{url:d(s),options:a}},linkSiweNoncePost:async(t,s={})=>{i("linkSiweNoncePost","siweNoncePostRequest",t);const n=new URL("/link-siwe/nonce",o);let a;e&&(a=e.baseOptions);const r={method:"POST",...a,...s},c={"Content-Type":"application/json"};h(n,{});let l=a&&a.headers?a.headers:{};return r.headers={...c,...l,...s.headers},r.data=u(t,r,e),{url:d(n),options:r}},linkSiweUnlinkPost:async(t,s={})=>{i("linkSiweUnlinkPost","linkSiweUnlinkPostRequest",t);const n=new URL("/link-siwe/unlink",o);let a;e&&(a=e.baseOptions);const r={method:"POST",...a,...s},c={"Content-Type":"application/json"};h(n,{});let l=a&&a.headers?a.headers:{};return r.headers={...c,...l,...s.headers},r.data=u(t,r,e),{url:d(n),options:r}},linkSiweVerifyPost:async(t,s={})=>{i("linkSiweVerifyPost","siweVerifyPostRequest",t);const n=new URL("/link-siwe/verify",o);let a;e&&(a=e.baseOptions);const r={method:"POST",...a,...s},c={"Content-Type":"application/json"};h(n,{});let l=a&&a.headers?a.headers:{};return r.headers={...c,...l,...s.headers},r.data=u(t,r,e),{url:d(n),options:r}},linkSocialPost:async(t,s={})=>{i("linkSocialPost","linkSocialPostRequest",t);const n=new URL("/link-social",o);let a;e&&(a=e.baseOptions);const r={method:"POST",...a,...s},c={"Content-Type":"application/json"};h(n,{});let l=a&&a.headers?a.headers:{};return r.headers={...c,...l,...s.headers},r.data=u(t,r,e),{url:d(n),options:r}},listAccountsGet:async(t={})=>{const s=new URL("/list-accounts",o);let n;e&&(n=e.baseOptions);const a={method:"GET",...n,...t};h(s,{});let i=n&&n.headers?n.headers:{};return a.headers={...i,...t.headers},{url:d(s),options:a}},listSessionsGet:async(t={})=>{const s=new URL("/list-sessions",o);let n;e&&(n=e.baseOptions);const a={method:"GET",...n,...t};h(s,{});let i=n&&n.headers?n.headers:{};return a.headers={...i,...t.headers},{url:d(s),options:a}},phoneNumberForgetPasswordPost:async(t,s={})=>{i("phoneNumberForgetPasswordPost","phoneNumberForgetPasswordPostRequest",t);const n=new URL("/phone-number/forget-password",o);let a;e&&(a=e.baseOptions);const r={method:"POST",...a,...s},c={"Content-Type":"application/json"};h(n,{});let l=a&&a.headers?a.headers:{};return r.headers={...c,...l,...s.headers},r.data=u(t,r,e),{url:d(n),options:r}},phoneNumberRequestPasswordResetPost:async(t,s={})=>{i("phoneNumberRequestPasswordResetPost","phoneNumberRequestPasswordResetPostRequest",t);const n=new URL("/phone-number/request-password-reset",o);let a;e&&(a=e.baseOptions);const r={method:"POST",...a,...s},c={"Content-Type":"application/json"};h(n,{});let l=a&&a.headers?a.headers:{};return r.headers={...c,...l,...s.headers},r.data=u(t,r,e),{url:d(n),options:r}},phoneNumberResetPasswordPost:async(t,s={})=>{i("phoneNumberResetPasswordPost","phoneNumberResetPasswordPostRequest",t);const n=new URL("/phone-number/reset-password",o);let a;e&&(a=e.baseOptions);const r={method:"POST",...a,...s},c={"Content-Type":"application/json"};h(n,{});let l=a&&a.headers?a.headers:{};return r.headers={...c,...l,...s.headers},r.data=u(t,r,e),{url:d(n),options:r}},phoneNumberSendOtpPost:async(t,s={})=>{i("phoneNumberSendOtpPost","phoneNumberSendOtpPostRequest",t);const n=new URL("/phone-number/send-otp",o);let a;e&&(a=e.baseOptions);const r={method:"POST",...a,...s},c={"Content-Type":"application/json"};h(n,{});let l=a&&a.headers?a.headers:{};return r.headers={...c,...l,...s.headers},r.data=u(t,r,e),{url:d(n),options:r}},phoneNumberVerifyPost:async(t,s={})=>{i("phoneNumberVerifyPost","phoneNumberVerifyPostRequest",t);const n=new URL("/phone-number/verify",o);let a;e&&(a=e.baseOptions);const r={method:"POST",...a,...s},c={"Content-Type":"application/json"};h(n,{});let l=a&&a.headers?a.headers:{};return r.headers={...c,...l,...s.headers},r.data=u(t,r,e),{url:d(n),options:r}},refreshTokenPost:async(t,s={})=>{i("refreshTokenPost","refreshTokenPostRequest",t);const n=new URL("/refresh-token",o);let a;e&&(a=e.baseOptions);const r={method:"POST",...a,...s},c={"Content-Type":"application/json"};h(n,{});let l=a&&a.headers?a.headers:{};return r.headers={...c,...l,...s.headers},r.data=u(t,r,e),{url:d(n),options:r}},requestPasswordResetPost:async(t,s={})=>{i("requestPasswordResetPost","forgetPasswordPostRequest",t);const n=new URL("/request-password-reset",o);let a;e&&(a=e.baseOptions);const r={method:"POST",...a,...s},c={"Content-Type":"application/json"};h(n,{});let l=a&&a.headers?a.headers:{};return r.headers={...c,...l,...s.headers},r.data=u(t,r,e),{url:d(n),options:r}},resetPasswordPost:async(t,s={})=>{i("resetPasswordPost","resetPasswordPostRequest",t);const n=new URL("/reset-password",o);let a;e&&(a=e.baseOptions);const r={method:"POST",...a,...s},c={"Content-Type":"application/json"};h(n,{});let l=a&&a.headers?a.headers:{};return r.headers={...c,...l,...s.headers},r.data=u(t,r,e),{url:d(n),options:r}},resetPasswordTokenGet:async(t,s,n={})=>{i("resetPasswordTokenGet","token",t);const a="/reset-password/{token}".replace("{token}",encodeURIComponent(String(t))),r=new URL(a,o);let c;e&&(c=e.baseOptions);const u={method:"GET",...c,...n},l={};void 0!==s&&(l.callbackURL=s),h(r,l);let p=c&&c.headers?c.headers:{};return u.headers={...p,...n.headers},{url:d(r),options:u}},revokeOtherSessionsPost:async(t,s={})=>{const n=new URL("/revoke-other-sessions",o);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...s},r={"Content-Type":"application/json"};h(n,{});let c=a&&a.headers?a.headers:{};return i.headers={...r,...c,...s.headers},i.data=u(t,i,e),{url:d(n),options:i}},revokeSessionPost:async(t,s={})=>{const n=new URL("/revoke-session",o);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...s},r={"Content-Type":"application/json"};h(n,{});let c=a&&a.headers?a.headers:{};return i.headers={...r,...c,...s.headers},i.data=u(t,i,e),{url:d(n),options:i}},revokeSessionsPost:async(t,s={})=>{const n=new URL("/revoke-sessions",o);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...s},r={"Content-Type":"application/json"};h(n,{});let c=a&&a.headers?a.headers:{};return i.headers={...r,...c,...s.headers},i.data=u(t,i,e),{url:d(n),options:i}},sendVerificationEmailPost:async(t,s={})=>{const n=new URL("/send-verification-email",o);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...s},r={"Content-Type":"application/json"};h(n,{});let c=a&&a.headers?a.headers:{};return i.headers={...r,...c,...s.headers},i.data=u(t,i,e),{url:d(n),options:i}},signInAnonymousPost:async(t={})=>{const s=new URL("/sign-in/anonymous",o);let n;e&&(n=e.baseOptions);const a={method:"POST",...n,...t};h(s,{});let i=n&&n.headers?n.headers:{};return a.headers={...i,...t.headers},{url:d(s),options:a}},signInEmailOtpPost:async(t,s={})=>{i("signInEmailOtpPost","signInEmailOtpPostRequest",t);const n=new URL("/sign-in/email-otp",o);let a;e&&(a=e.baseOptions);const r={method:"POST",...a,...s},c={"Content-Type":"application/json"};h(n,{});let l=a&&a.headers?a.headers:{};return r.headers={...c,...l,...s.headers},r.data=u(t,r,e),{url:d(n),options:r}},signInEmailPost:async(t,s={})=>{i("signInEmailPost","signInEmailPostRequest",t);const n=new URL("/sign-in/email",o);let a;e&&(a=e.baseOptions);const r={method:"POST",...a,...s},c={"Content-Type":"application/json"};h(n,{});let l=a&&a.headers?a.headers:{};return r.headers={...c,...l,...s.headers},r.data=u(t,r,e),{url:d(n),options:r}},signInPhoneNumberPost:async(t,s={})=>{i("signInPhoneNumberPost","signInPhoneNumberPostRequest",t);const n=new URL("/sign-in/phone-number",o);let a;e&&(a=e.baseOptions);const r={method:"POST",...a,...s},c={"Content-Type":"application/json"};h(n,{});let l=a&&a.headers?a.headers:{};return r.headers={...c,...l,...s.headers},r.data=u(t,r,e),{url:d(n),options:r}},signOutPost:async(t,s={})=>{const n=new URL("/sign-out",o);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...s},r={"Content-Type":"application/json"};h(n,{});let c=a&&a.headers?a.headers:{};return i.headers={...r,...c,...s.headers},i.data=u(t,i,e),{url:d(n),options:i}},signUpEmailPost:async(t,s={})=>{const n=new URL("/sign-up/email",o);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...s},r={"Content-Type":"application/json"};h(n,{});let c=a&&a.headers?a.headers:{};return i.headers={...r,...c,...s.headers},i.data=u(t,i,e),{url:d(n),options:i}},siweNoncePost:async(t,s={})=>{i("siweNoncePost","siweNoncePostRequest",t);const n=new URL("/siwe/nonce",o);let a;e&&(a=e.baseOptions);const r={method:"POST",...a,...s},c={"Content-Type":"application/json"};h(n,{});let l=a&&a.headers?a.headers:{};return r.headers={...c,...l,...s.headers},r.data=u(t,r,e),{url:d(n),options:r}},siweVerifyPost:async(t,s={})=>{i("siweVerifyPost","siweVerifyPostRequest",t);const n=new URL("/siwe/verify",o);let a;e&&(a=e.baseOptions);const r={method:"POST",...a,...s},c={"Content-Type":"application/json"};h(n,{});let l=a&&a.headers?a.headers:{};return r.headers={...c,...l,...s.headers},r.data=u(t,r,e),{url:d(n),options:r}},socialSignIn:async(t,s={})=>{i("socialSignIn","socialSignInRequest",t);const n=new URL("/sign-in/social",o);let a;e&&(a=e.baseOptions);const r={method:"POST",...a,...s},c={"Content-Type":"application/json"};h(n,{});let l=a&&a.headers?a.headers:{};return r.headers={...c,...l,...s.headers},r.data=u(t,r,e),{url:d(n),options:r}},unlinkAccountPost:async(t,s={})=>{i("unlinkAccountPost","unlinkAccountPostRequest",t);const n=new URL("/unlink-account",o);let a;e&&(a=e.baseOptions);const r={method:"POST",...a,...s},c={"Content-Type":"application/json"};h(n,{});let l=a&&a.headers?a.headers:{};return r.headers={...c,...l,...s.headers},r.data=u(t,r,e),{url:d(n),options:r}},verifyEmailGet:async(t,s,n={})=>{i("verifyEmailGet","token",t);const a=new URL("/verify-email",o);let r;e&&(r=e.baseOptions);const c={method:"GET",...r,...n},u={};void 0!==t&&(u.token=t),void 0!==s&&(u.callbackURL=s),h(a,u);let l=r&&r.headers?r.headers:{};return c.headers={...l,...n.headers},{url:d(a),options:c}}}}(t);return{async accountInfoPost(a,o){const i=await n.accountInfoPost(a,o);return l(i,e,s,t)},async changeEmailPost(a,o){const i=await n.changeEmailPost(a,o);return l(i,e,s,t)},async changePasswordPost(a,o){const i=await n.changePasswordPost(a,o);return l(i,e,s,t)},async checkVerificationOtp(a,o){const i=await n.checkVerificationOtp(a,o);return l(i,e,s,t)},async emailOtpResetPasswordPost(a,o){const i=await n.emailOtpResetPasswordPost(a,o);return l(i,e,s,t)},async emailOtpSendVerificationOtpPost(a,o){const i=await n.emailOtpSendVerificationOtpPost(a,o);return l(i,e,s,t)},async emailOtpVerifyEmailPost(a,o){const i=await n.emailOtpVerifyEmailPost(a,o);return l(i,e,s,t)},async forgetPasswordEmailOtpPost(a,o){const i=await n.forgetPasswordEmailOtpPost(a,o);return l(i,e,s,t)},async forgetPasswordPost(a,o){const i=await n.forgetPasswordPost(a,o);return l(i,e,s,t)},async getAccessTokenPost(a,o){const i=await n.getAccessTokenPost(a,o);return l(i,e,s,t)},async getSessionGet(a,o,i){const r=await n.getSessionGet(a,o,i);return l(r,e,s,t)},async linkSiweListWalletsGet(a){const o=await n.linkSiweListWalletsGet(a);return l(o,e,s,t)},async linkSiweNoncePost(a,o){const i=await n.linkSiweNoncePost(a,o);return l(i,e,s,t)},async linkSiweUnlinkPost(a,o){const i=await n.linkSiweUnlinkPost(a,o);return l(i,e,s,t)},async linkSiweVerifyPost(a,o){const i=await n.linkSiweVerifyPost(a,o);return l(i,e,s,t)},async linkSocialPost(a,o){const i=await n.linkSocialPost(a,o);return l(i,e,s,t)},async listAccountsGet(a){const o=await n.listAccountsGet(a);return l(o,e,s,t)},async listSessionsGet(a){const o=await n.listSessionsGet(a);return l(o,e,s,t)},async phoneNumberForgetPasswordPost(a,o){const i=await n.phoneNumberForgetPasswordPost(a,o);return l(i,e,s,t)},async phoneNumberRequestPasswordResetPost(a,o){const i=await n.phoneNumberRequestPasswordResetPost(a,o);return l(i,e,s,t)},async phoneNumberResetPasswordPost(a,o){const i=await n.phoneNumberResetPasswordPost(a,o);return l(i,e,s,t)},async phoneNumberSendOtpPost(a,o){const i=await n.phoneNumberSendOtpPost(a,o);return l(i,e,s,t)},async phoneNumberVerifyPost(a,o){const i=await n.phoneNumberVerifyPost(a,o);return l(i,e,s,t)},async refreshTokenPost(a,o){const i=await n.refreshTokenPost(a,o);return l(i,e,s,t)},async requestPasswordResetPost(a,o){const i=await n.requestPasswordResetPost(a,o);return l(i,e,s,t)},async resetPasswordPost(a,o){const i=await n.resetPasswordPost(a,o);return l(i,e,s,t)},async resetPasswordTokenGet(a,o,i){const r=await n.resetPasswordTokenGet(a,o,i);return l(r,e,s,t)},async revokeOtherSessionsPost(a,o){const i=await n.revokeOtherSessionsPost(a,o);return l(i,e,s,t)},async revokeSessionPost(a,o){const i=await n.revokeSessionPost(a,o);return l(i,e,s,t)},async revokeSessionsPost(a,o){const i=await n.revokeSessionsPost(a,o);return l(i,e,s,t)},async sendVerificationEmailPost(a,o){const i=await n.sendVerificationEmailPost(a,o);return l(i,e,s,t)},async signInAnonymousPost(a){const o=await n.signInAnonymousPost(a);return l(o,e,s,t)},async signInEmailOtpPost(a,o){const i=await n.signInEmailOtpPost(a,o);return l(i,e,s,t)},async signInEmailPost(a,o){const i=await n.signInEmailPost(a,o);return l(i,e,s,t)},async signInPhoneNumberPost(a,o){const i=await n.signInPhoneNumberPost(a,o);return l(i,e,s,t)},async signOutPost(a,o){const i=await n.signOutPost(a,o);return l(i,e,s,t)},async signUpEmailPost(a,o){const i=await n.signUpEmailPost(a,o);return l(i,e,s,t)},async siweNoncePost(a,o){const i=await n.siweNoncePost(a,o);return l(i,e,s,t)},async siweVerifyPost(a,o){const i=await n.siweVerifyPost(a,o);return l(i,e,s,t)},async socialSignIn(a,o){const i=await n.socialSignIn(a,o);return l(i,e,s,t)},async unlinkAccountPost(a,o){const i=await n.unlinkAccountPost(a,o);return l(i,e,s,t)},async verifyEmailGet(a,o,i){const r=await n.verifyEmailGet(a,o,i);return l(r,e,s,t)}}};class f extends n{accountInfoPost(e,t){return R(this.configuration).accountInfoPost(e.accountInfoPostRequest,t).then(e=>e(this.axios,this.basePath))}changeEmailPost(e,t){return R(this.configuration).changeEmailPost(e.changeEmailPostRequest,t).then(e=>e(this.axios,this.basePath))}changePasswordPost(e,t){return R(this.configuration).changePasswordPost(e.changePasswordPostRequest,t).then(e=>e(this.axios,this.basePath))}checkVerificationOtp(e,t){return R(this.configuration).checkVerificationOtp(e.checkVerificationOtpRequest,t).then(e=>e(this.axios,this.basePath))}emailOtpResetPasswordPost(e,t){return R(this.configuration).emailOtpResetPasswordPost(e.emailOtpResetPasswordPostRequest,t).then(e=>e(this.axios,this.basePath))}emailOtpSendVerificationOtpPost(e,t){return R(this.configuration).emailOtpSendVerificationOtpPost(e.emailOtpSendVerificationOtpPostRequest,t).then(e=>e(this.axios,this.basePath))}emailOtpVerifyEmailPost(e,t){return R(this.configuration).emailOtpVerifyEmailPost(e.emailOtpVerifyEmailPostRequest,t).then(e=>e(this.axios,this.basePath))}forgetPasswordEmailOtpPost(e,t){return R(this.configuration).forgetPasswordEmailOtpPost(e.forgetPasswordEmailOtpPostRequest,t).then(e=>e(this.axios,this.basePath))}forgetPasswordPost(e,t){return R(this.configuration).forgetPasswordPost(e.forgetPasswordPostRequest,t).then(e=>e(this.axios,this.basePath))}getAccessTokenPost(e,t){return R(this.configuration).getAccessTokenPost(e.refreshTokenPostRequest,t).then(e=>e(this.axios,this.basePath))}getSessionGet(e={},t){return R(this.configuration).getSessionGet(e.xProjectKey,e.disableCookieCache,t).then(e=>e(this.axios,this.basePath))}linkSiweListWalletsGet(e){return R(this.configuration).linkSiweListWalletsGet(e).then(e=>e(this.axios,this.basePath))}linkSiweNoncePost(e,t){return R(this.configuration).linkSiweNoncePost(e.siweNoncePostRequest,t).then(e=>e(this.axios,this.basePath))}linkSiweUnlinkPost(e,t){return R(this.configuration).linkSiweUnlinkPost(e.linkSiweUnlinkPostRequest,t).then(e=>e(this.axios,this.basePath))}linkSiweVerifyPost(e,t){return R(this.configuration).linkSiweVerifyPost(e.siweVerifyPostRequest,t).then(e=>e(this.axios,this.basePath))}linkSocialPost(e,t){return R(this.configuration).linkSocialPost(e.linkSocialPostRequest,t).then(e=>e(this.axios,this.basePath))}listAccountsGet(e){return R(this.configuration).listAccountsGet(e).then(e=>e(this.axios,this.basePath))}listSessionsGet(e){return R(this.configuration).listSessionsGet(e).then(e=>e(this.axios,this.basePath))}phoneNumberForgetPasswordPost(e,t){return R(this.configuration).phoneNumberForgetPasswordPost(e.phoneNumberForgetPasswordPostRequest,t).then(e=>e(this.axios,this.basePath))}phoneNumberRequestPasswordResetPost(e,t){return R(this.configuration).phoneNumberRequestPasswordResetPost(e.phoneNumberRequestPasswordResetPostRequest,t).then(e=>e(this.axios,this.basePath))}phoneNumberResetPasswordPost(e,t){return R(this.configuration).phoneNumberResetPasswordPost(e.phoneNumberResetPasswordPostRequest,t).then(e=>e(this.axios,this.basePath))}phoneNumberSendOtpPost(e,t){return R(this.configuration).phoneNumberSendOtpPost(e.phoneNumberSendOtpPostRequest,t).then(e=>e(this.axios,this.basePath))}phoneNumberVerifyPost(e,t){return R(this.configuration).phoneNumberVerifyPost(e.phoneNumberVerifyPostRequest,t).then(e=>e(this.axios,this.basePath))}refreshTokenPost(e,t){return R(this.configuration).refreshTokenPost(e.refreshTokenPostRequest,t).then(e=>e(this.axios,this.basePath))}requestPasswordResetPost(e,t){return R(this.configuration).requestPasswordResetPost(e.forgetPasswordPostRequest,t).then(e=>e(this.axios,this.basePath))}resetPasswordPost(e,t){return R(this.configuration).resetPasswordPost(e.resetPasswordPostRequest,t).then(e=>e(this.axios,this.basePath))}resetPasswordTokenGet(e,t){return R(this.configuration).resetPasswordTokenGet(e.token,e.callbackURL,t).then(e=>e(this.axios,this.basePath))}revokeOtherSessionsPost(e={},t){return R(this.configuration).revokeOtherSessionsPost(e.body,t).then(e=>e(this.axios,this.basePath))}revokeSessionPost(e={},t){return R(this.configuration).revokeSessionPost(e.revokeSessionPostRequest,t).then(e=>e(this.axios,this.basePath))}revokeSessionsPost(e={},t){return R(this.configuration).revokeSessionsPost(e.body,t).then(e=>e(this.axios,this.basePath))}sendVerificationEmailPost(e={},t){return R(this.configuration).sendVerificationEmailPost(e.sendVerificationEmailPostRequest,t).then(e=>e(this.axios,this.basePath))}signInAnonymousPost(e){return R(this.configuration).signInAnonymousPost(e).then(e=>e(this.axios,this.basePath))}signInEmailOtpPost(e,t){return R(this.configuration).signInEmailOtpPost(e.signInEmailOtpPostRequest,t).then(e=>e(this.axios,this.basePath))}signInEmailPost(e,t){return R(this.configuration).signInEmailPost(e.signInEmailPostRequest,t).then(e=>e(this.axios,this.basePath))}signInPhoneNumberPost(e,t){return R(this.configuration).signInPhoneNumberPost(e.signInPhoneNumberPostRequest,t).then(e=>e(this.axios,this.basePath))}signOutPost(e={},t){return R(this.configuration).signOutPost(e.body,t).then(e=>e(this.axios,this.basePath))}signUpEmailPost(e={},t){return R(this.configuration).signUpEmailPost(e.signUpEmailPostRequest,t).then(e=>e(this.axios,this.basePath))}siweNoncePost(e,t){return R(this.configuration).siweNoncePost(e.siweNoncePostRequest,t).then(e=>e(this.axios,this.basePath))}siweVerifyPost(e,t){return R(this.configuration).siweVerifyPost(e.siweVerifyPostRequest,t).then(e=>e(this.axios,this.basePath))}socialSignIn(e,t){return R(this.configuration).socialSignIn(e.socialSignInRequest,t).then(e=>e(this.axios,this.basePath))}unlinkAccountPost(e,t){return R(this.configuration).unlinkAccountPost(e.unlinkAccountPostRequest,t).then(e=>e(this.axios,this.basePath))}verifyEmailGet(e,t){return R(this.configuration).verifyEmailGet(e.token,e.callbackURL,t).then(e=>e(this.axios,this.basePath))}}const O=function(t){const n=function(e){return{handleChainRpcRequest:async(t,s,n={})=>{i("handleChainRpcRequest","chainId",t),i("handleChainRpcRequest","jsonRpcRequest",s);const a="/rpc/{chainId}".replace("{chainId}",encodeURIComponent(String(t))),c=new URL(a,o);let l;e&&(l=e.baseOptions);const p={method:"POST",...l,...n},P={};await r(P,e),P["Content-Type"]="application/json",h(c,{});let w=l&&l.headers?l.headers:{};return p.headers={...P,...w,...n.headers},p.data=u(s,p,e),{url:d(c),options:p}},handleRpcRequest:async(t,s={})=>{i("handleRpcRequest","jsonRpcRequest",t);const n=new URL("/rpc",o);let a;e&&(a=e.baseOptions);const r={method:"POST",...a,...s},c={"Content-Type":"application/json"};h(n,{});let l=a&&a.headers?a.headers:{};return r.headers={...c,...l,...s.headers},r.data=u(t,r,e),{url:d(n),options:r}}}}(t);return{async handleChainRpcRequest(a,o,i){const r=await n.handleChainRpcRequest(a,o,i);return l(r,e,s,t)},async handleRpcRequest(a,o){const i=await n.handleRpcRequest(a,o);return l(i,e,s,t)}}};class b extends n{handleChainRpcRequest(e,t){return O(this.configuration).handleChainRpcRequest(e.chainId,e.jsonRpcRequest,t).then(e=>e(this.axios,this.basePath))}handleRpcRequest(e,t){return O(this.configuration).handleRpcRequest(e.jsonRpcRequest,t).then(e=>e(this.axios,this.basePath))}}const T=function(t){const n=function(e){return{createSession:async(t,s,n={})=>{i("createSession","createSessionRequest",t);const a=new URL("/v1/sessions",o);let c;e&&(c=e.baseOptions);const l={method:"POST",...c,...n},p={};await r(p,e),null!=s&&(p["X-Behalf-Of-Project"]=String(s)),p["Content-Type"]="application/json",h(a,{});let P=c&&c.headers?c.headers:{};return l.headers={...p,...P,...n.headers},l.data=u(t,l,e),{url:d(a),options:l}},getPlayerSessions:async(t,s,n,a,c,u={})=>{i("getPlayerSessions","player",t);const l=new URL("/v1/sessions",o);let p;e&&(p=e.baseOptions);const P={method:"GET",...p,...u},w={},y={};await r(w,e),void 0!==s&&(y.limit=s),void 0!==n&&(y.skip=n),void 0!==a&&(y.order=a),void 0!==t&&(y.player=t),c&&(y.expand=c),h(l,y);let g=p&&p.headers?p.headers:{};return P.headers={...w,...g,...u.headers},{url:d(l),options:P}},getSession:async(t,s,n={})=>{i("getSession","id",t);const a="/v1/sessions/{id}".replace("{id}",encodeURIComponent(String(t))),c=new URL(a,o);let u;e&&(u=e.baseOptions);const l={method:"GET",...u,...n},p={},P={};await r(p,e),s&&(P.expand=s),h(c,P);let w=u&&u.headers?u.headers:{};return l.headers={...p,...w,...n.headers},{url:d(c),options:l}},revokeSession:async(t,s,n={})=>{i("revokeSession","revokeSessionRequest",t);const a=new URL("/v1/sessions/revoke",o);let c;e&&(c=e.baseOptions);const l={method:"POST",...c,...n},p={};await r(p,e),null!=s&&(p["X-Behalf-Of-Project"]=String(s)),p["Content-Type"]="application/json",h(a,{});let P=c&&c.headers?c.headers:{};return l.headers={...p,...P,...n.headers},l.data=u(t,l,e),{url:d(a),options:l}},signatureSession:async(t,s,n={})=>{i("signatureSession","id",t),i("signatureSession","signatureRequest",s);const a="/v1/sessions/{id}/signature".replace("{id}",encodeURIComponent(String(t))),c=new URL(a,o);let l;e&&(l=e.baseOptions);const p={method:"POST",...l,...n},P={};await r(P,e),await r(P,e),P["Content-Type"]="application/json",h(c,{});let w=l&&l.headers?l.headers:{};return p.headers={...P,...w,...n.headers},p.data=u(s,p,e),{url:d(c),options:p}}}}(t);return{async createSession(a,o,i){const r=await n.createSession(a,o,i);return l(r,e,s,t)},async getPlayerSessions(a,o,i,r,c,h){const u=await n.getPlayerSessions(a,o,i,r,c,h);return l(u,e,s,t)},async getSession(a,o,i){const r=await n.getSession(a,o,i);return l(r,e,s,t)},async revokeSession(a,o,i){const r=await n.revokeSession(a,o,i);return l(r,e,s,t)},async signatureSession(a,o,i){const r=await n.signatureSession(a,o,i);return l(r,e,s,t)}}};class S extends n{createSession(e,t){return T(this.configuration).createSession(e.createSessionRequest,e.xBehalfOfProject,t).then(e=>e(this.axios,this.basePath))}getPlayerSessions(e,t){return T(this.configuration).getPlayerSessions(e.player,e.limit,e.skip,e.order,e.expand,t).then(e=>e(this.axios,this.basePath))}getSession(e,t){return T(this.configuration).getSession(e.id,e.expand,t).then(e=>e(this.axios,this.basePath))}revokeSession(e,t){return T(this.configuration).revokeSession(e.revokeSessionRequest,e.xBehalfOfProject,t).then(e=>e(this.axios,this.basePath))}signatureSession(e,t){return T(this.configuration).signatureSession(e.id,e.signatureRequest,t).then(e=>e(this.axios,this.basePath))}}const k=function(t){const n=function(e){return{createTransactionIntent:async(t,s,n={})=>{i("createTransactionIntent","createTransactionIntentRequest",t);const a=new URL("/v1/transaction_intents",o);let c;e&&(c=e.baseOptions);const l={method:"POST",...c,...n},p={};await r(p,e),null!=s&&(p["X-Behalf-Of-Project"]=String(s)),p["Content-Type"]="application/json",h(a,{});let P=c&&c.headers?c.headers:{};return l.headers={...p,...P,...n.headers},l.data=u(t,l,e),{url:d(a),options:l}},estimateTransactionIntentCost:async(t,s={})=>{i("estimateTransactionIntentCost","createTransactionIntentRequest",t);const n=new URL("/v1/transaction_intents/estimate_gas_cost",o);let a;e&&(a=e.baseOptions);const c={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",h(n,{});let p=a&&a.headers?a.headers:{};return c.headers={...l,...p,...s.headers},c.data=u(t,c,e),{url:d(n),options:c}},getTransactionIntent:async(t,s,n={})=>{i("getTransactionIntent","id",t);const a="/v1/transaction_intents/{id}".replace("{id}",encodeURIComponent(String(t))),c=new URL(a,o);let u;e&&(u=e.baseOptions);const l={method:"GET",...u,...n},p={},P={};await r(p,e),s&&(P.expand=s),h(c,P);let w=u&&u.headers?u.headers:{};return l.headers={...p,...w,...n.headers},{url:d(c),options:l}},getTransactionIntents:async(t,s,n,a,i,c,u,l,p,P={})=>{const w=new URL("/v1/transaction_intents",o);let y;e&&(y=e.baseOptions);const g={method:"GET",...y,...P},m={},R={};await r(m,e),void 0!==t&&(R.limit=t),void 0!==s&&(R.skip=s),void 0!==n&&(R.order=n),a&&(R.expand=a),void 0!==i&&(R.chainId=i),c&&(R.account=c),u&&(R.player=u),void 0!==l&&(R.status=l),p&&(R.policy=p),h(w,R);let f=y&&y.headers?y.headers:{};return g.headers={...m,...f,...P.headers},{url:d(w),options:g}},signature:async(t,s,n={})=>{i("signature","id",t),i("signature","signatureRequest",s);const a="/v1/transaction_intents/{id}/signature".replace("{id}",encodeURIComponent(String(t))),c=new URL(a,o);let l;e&&(l=e.baseOptions);const p={method:"POST",...l,...n},P={};await r(P,e),await r(P,e),P["Content-Type"]="application/json",h(c,{});let w=l&&l.headers?l.headers:{};return p.headers={...P,...w,...n.headers},p.data=u(s,p,e),{url:d(c),options:p}}}}(t);return{async createTransactionIntent(a,o,i){const r=await n.createTransactionIntent(a,o,i);return l(r,e,s,t)},async estimateTransactionIntentCost(a,o){const i=await n.estimateTransactionIntentCost(a,o);return l(i,e,s,t)},async getTransactionIntent(a,o,i){const r=await n.getTransactionIntent(a,o,i);return l(r,e,s,t)},async getTransactionIntents(a,o,i,r,c,h,u,d,p,P){const w=await n.getTransactionIntents(a,o,i,r,c,h,u,d,p,P);return l(w,e,s,t)},async signature(a,o,i){const r=await n.signature(a,o,i);return l(r,e,s,t)}}};class v extends n{createTransactionIntent(e,t){return k(this.configuration).createTransactionIntent(e.createTransactionIntentRequest,e.xBehalfOfProject,t).then(e=>e(this.axios,this.basePath))}estimateTransactionIntentCost(e,t){return k(this.configuration).estimateTransactionIntentCost(e.createTransactionIntentRequest,t).then(e=>e(this.axios,this.basePath))}getTransactionIntent(e,t){return k(this.configuration).getTransactionIntent(e.id,e.expand,t).then(e=>e(this.axios,this.basePath))}getTransactionIntents(e={},t){return k(this.configuration).getTransactionIntents(e.limit,e.skip,e.order,e.expand,e.chainId,e.account,e.player,e.status,e.policy,t).then(e=>e(this.axios,this.basePath))}signature(e,t){return k(this.configuration).signature(e.id,e.signatureRequest,t).then(e=>e(this.axios,this.basePath))}}const q=function(t){const n=function(e){return{deleteUser:async(t,s={})=>{i("deleteUser","id",t);const n="/v2/users/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(n,o);let c;e&&(c=e.baseOptions);const u={method:"DELETE",...c,...s},l={};await r(l,e),h(a,{});let p=c&&c.headers?c.headers:{};return u.headers={...l,...p,...s.headers},{url:d(a),options:u}},getAuthUser:async(t,s={})=>{i("getAuthUser","id",t);const n="/v2/users/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(n,o);let c;e&&(c=e.baseOptions);const u={method:"GET",...c,...s},l={};await r(l,e),h(a,{});let p=c&&c.headers?c.headers:{};return u.headers={...l,...p,...s.headers},{url:d(a),options:u}},getAuthUsers:async(t,s,n,a,i,c,u,l,p,P={})=>{const w=new URL("/v2/users",o);let y;e&&(y=e.baseOptions);const g={method:"GET",...y,...P},m={},R={};await r(m,e),void 0!==t&&(R.limit=t),void 0!==s&&(R.skip=s),void 0!==n&&(R.order=n),void 0!==a&&(R.name=a),void 0!==i&&(R.externalUserId=i),void 0!==c&&(R.email=c),void 0!==u&&(R.phoneNumber=u),void 0!==l&&(R.authProviderId=l),void 0!==p&&(R.walletClientType=p),h(w,R);let f=y&&y.headers?y.headers:{};return g.headers={...m,...f,...P.headers},{url:d(w),options:g}},getUserWallet:async(t,s={})=>{i("getUserWallet","id",t);const n="/v2/users/{id}/wallet".replace("{id}",encodeURIComponent(String(t))),a=new URL(n,o);let c;e&&(c=e.baseOptions);const u={method:"GET",...c,...s},l={};await r(l,e),h(a,{});let p=c&&c.headers?c.headers:{};return u.headers={...l,...p,...s.headers},{url:d(a),options:u}},meV2:async(t={})=>{const s=new URL("/iam/v2/me",o);let n;e&&(n=e.baseOptions);const a={method:"GET",...n,...t};h(s,{});let i=n&&n.headers?n.headers:{};return a.headers={...i,...t.headers},{url:d(s),options:a}},pregenerateUserV2:async(t,s={})=>{i("pregenerateUserV2","pregenerateUserRequestV2",t);const n=new URL("/v2/users/pregenerate",o);let a;e&&(a=e.baseOptions);const c={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",h(n,{});let p=a&&a.headers?a.headers:{};return c.headers={...l,...p,...s.headers},c.data=u(t,c,e),{url:d(n),options:c}},thirdPartyV2:async(t,s={})=>{i("thirdPartyV2","thirdPartyOAuthRequest",t);const n=new URL("/iam/v2/user/third_party",o);let a;e&&(a=e.baseOptions);const c={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",h(n,{});let p=a&&a.headers?a.headers:{};return c.headers={...l,...p,...s.headers},c.data=u(t,c,e),{url:d(n),options:c}}}}(t);return{async deleteUser(a,o){const i=await n.deleteUser(a,o);return l(i,e,s,t)},async getAuthUser(a,o){const i=await n.getAuthUser(a,o);return l(i,e,s,t)},async getAuthUsers(a,o,i,r,c,h,u,d,p,P){const w=await n.getAuthUsers(a,o,i,r,c,h,u,d,p,P);return l(w,e,s,t)},async getUserWallet(a,o){const i=await n.getUserWallet(a,o);return l(i,e,s,t)},async meV2(a){const o=await n.meV2(a);return l(o,e,s,t)},async pregenerateUserV2(a,o){const i=await n.pregenerateUserV2(a,o);return l(i,e,s,t)},async thirdPartyV2(a,o){const i=await n.thirdPartyV2(a,o);return l(i,e,s,t)}}};class I extends n{deleteUser(e,t){return q(this.configuration).deleteUser(e.id,t).then(e=>e(this.axios,this.basePath))}getAuthUser(e,t){return q(this.configuration).getAuthUser(e.id,t).then(e=>e(this.axios,this.basePath))}getAuthUsers(e={},t){return q(this.configuration).getAuthUsers(e.limit,e.skip,e.order,e.name,e.externalUserId,e.email,e.phoneNumber,e.authProviderId,e.walletClientType,t).then(e=>e(this.axios,this.basePath))}getUserWallet(e,t){return q(this.configuration).getUserWallet(e.id,t).then(e=>e(this.axios,this.basePath))}meV2(e){return q(this.configuration).meV2(e).then(e=>e(this.axios,this.basePath))}pregenerateUserV2(e,t){return q(this.configuration).pregenerateUserV2(e.pregenerateUserRequestV2,t).then(e=>e(this.axios,this.basePath))}thirdPartyV2(e,t){return q(this.configuration).thirdPartyV2(e.thirdPartyOAuthRequest,t).then(e=>e(this.axios,this.basePath))}}class U{apiKey;username;password;accessToken;basePath;baseOptions;formDataCtor;constructor(e={}){this.apiKey=e.apiKey,this.username=e.username,this.password=e.password,this.accessToken=e.accessToken,this.basePath=e.basePath,this.baseOptions=e.baseOptions,this.formDataCtor=e.formDataCtor}isJsonMime(e){const t=new RegExp("^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$","i");return null!==e&&(t.test(e)||"application/json-patch+json"===e.toLowerCase())}}const A=({basePath:e,accessToken:t,nativeAppIdentifier:s})=>{if(!e.trim())throw Error("basePath can not be empty");const n={basePath:e,accessToken:t,baseOptions:{headers:{...s&&{"x-native-app-identifier":s},Cookie:null},withCredentials:!1}};return new U(n)};exports.BackendApiClients=class{config;transactionIntentsApi;accountsApi;accountsV2Api;rpcApi;sessionsApi;authApi;userApi;authenticationApi;storage;onLogout;axiosInstance;constructor(s){this.storage=s.storage,this.onLogout=s.onLogout,this.axiosInstance=e.create(),t(this.axiosInstance,{retries:3,retryDelay:t.exponentialDelay,retryCondition:t.isRetryableError}),this.setupInterceptors();const n={basePath:s.basePath,accessToken:s.accessToken,nativeAppIdentifier:s.nativeAppIdentifier};this.config={backend:A(n)};const a={basePath:`${s.basePath}/iam/v2/auth`,accessToken:s.accessToken,nativeAppIdentifier:s.nativeAppIdentifier},o=A(a);this.authenticationApi=new m(this.config.backend,void 0,this.axiosInstance),this.authApi=new f(o,void 0,this.axiosInstance),this.userApi=new I(this.config.backend,void 0,this.axiosInstance),this.transactionIntentsApi=new v(this.config.backend,void 0,this.axiosInstance),this.accountsApi=new P(this.config.backend,void 0,this.axiosInstance),this.accountsV2Api=new y(this.config.backend,void 0,this.axiosInstance),this.sessionsApi=new S(this.config.backend,void 0,this.axiosInstance),this.rpcApi=new b(this.config.backend,void 0,this.axiosInstance)}setupInterceptors(){this.axiosInstance.interceptors.response.use(e=>e,async e=>(401===e.response?.status&&(await this.clearAuthenticationState(),this.emitLogoutEvent()),Promise.reject(e)))}async clearAuthenticationState(){if(this.storage)try{this.storage.remove("openfort.authentication"),this.storage.remove("openfort.account"),this.storage.remove("openfort.session"),this.storage.remove("openfort.pkce_state"),this.storage.remove("openfort.pkce_verifier")}catch(e){}}emitLogoutEvent(){if(this.onLogout)try{this.onLogout()}catch(e){}}},exports.createConfig=A;
1
+ "use strict";var e=require("axios"),t=require("axios-retry");const s="https://api.openfort.io".replace(/\/+$/,"");class n{basePath;axios;configuration;constructor(t,n=s,a=e){this.basePath=n,this.axios=a,t&&(this.configuration=t,this.basePath=t.basePath||this.basePath)}}class a extends Error{field;constructor(e,t){super(t),this.field=e,this.name="RequiredError"}}const i="https://example.com",o=function(e,t,s){if(null==s)throw new a(t,`Required parameter ${t} was null or undefined when calling ${e}.`)},r=async function(e,t){if(t&&t.accessToken){const s="function"==typeof t.accessToken?await t.accessToken():await t.accessToken;e.Authorization="Bearer "+s}};function h(e,t,s=""){null!=t&&("object"==typeof t?Array.isArray(t)?t.forEach(t=>h(e,t,s)):Object.keys(t).forEach(n=>h(e,t[n],`${s}${""!==s?".":""}${n}`)):e.has(s)?e.append(s,t):e.set(s,t))}const c=function(e,...t){const s=new URLSearchParams(e.search);h(s,t),e.search=s.toString()},u=function(e,t,s){const n="string"!=typeof e;return(n&&s&&s.isJsonMime?s.isJsonMime(t.headers["Content-Type"]):n)?JSON.stringify(void 0!==e?e:{}):e||""},d=function(e){return e.pathname+e.search+e.hash},l=function(e,t,s,n){return(a=t,i=s)=>{const o={...e.options,url:(n?.basePath||a.defaults.baseURL||i)+e.url};return a.request(o)}},p=function(t){const n=function(e){return{createAccount:async(t,s={})=>{o("createAccount","createAccountRequest",t);const n=new URL("/v1/accounts",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),await r(l,e),await r(l,e),await r(l,e),await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},disableAccount:async(t,s={})=>{o("disableAccount","id",t);const n="/v1/accounts/{id}/disable".replace("{id}",encodeURIComponent(String(t))),a=new URL(n,i);let h;e&&(h=e.baseOptions);const u={method:"POST",...h,...s},l={};await r(l,e),await r(l,e),await r(l,e),await r(l,e),await r(l,e),c(a,{});let p=h&&h.headers?h.headers:{};return u.headers={...l,...p,...s.headers},{url:d(a),options:u}},getAccount:async(t,s,n={})=>{o("getAccount","id",t);const a="/v1/accounts/{id}".replace("{id}",encodeURIComponent(String(t))),h=new URL(a,i);let u;e&&(u=e.baseOptions);const l={method:"GET",...u,...n},p={},P={};await r(p,e),await r(p,e),s&&(P.expand=s),c(h,P);let w=u&&u.headers?u.headers:{};return l.headers={...p,...w,...n.headers},{url:d(h),options:l}},getAccounts:async(t,s,n,a,o,h,u,l={})=>{const p=new URL("/v1/accounts",i);let P;e&&(P=e.baseOptions);const w={method:"GET",...P,...l},g={},m={};await r(g,e),await r(g,e),await r(g,e),await r(g,e),await r(g,e),void 0!==t&&(m.limit=t),void 0!==s&&(m.skip=s),void 0!==n&&(m.order=n),void 0!==a&&(m.chainId=a),void 0!==o&&(m.player=o),void 0!==h&&(m.address=h),u&&(m.expand=u),c(p,m);let y=P&&P.headers?P.headers:{};return w.headers={...g,...y,...l.headers},{url:d(p),options:w}}}}(t);return{async createAccount(a,i){const o=await n.createAccount(a,i);return l(o,e,s,t)},async disableAccount(a,i){const o=await n.disableAccount(a,i);return l(o,e,s,t)},async getAccount(a,i,o){const r=await n.getAccount(a,i,o);return l(r,e,s,t)},async getAccounts(a,i,o,r,h,c,u,d){const p=await n.getAccounts(a,i,o,r,h,c,u,d);return l(p,e,s,t)}}};class P extends n{createAccount(e,t){return p(this.configuration).createAccount(e.createAccountRequest,t).then(e=>e(this.axios,this.basePath))}disableAccount(e,t){return p(this.configuration).disableAccount(e.id,t).then(e=>e(this.axios,this.basePath))}getAccount(e,t){return p(this.configuration).getAccount(e.id,e.expand,t).then(e=>e(this.axios,this.basePath))}getAccounts(e={},t){return p(this.configuration).getAccounts(e.limit,e.skip,e.order,e.chainId,e.player,e.address,e.expand,t).then(e=>e(this.axios,this.basePath))}}const w=function(t){const n=function(e){return{createAccountV2:async(t,s={})=>{o("createAccountV2","createAccountRequestV2",t);const n=new URL("/v2/accounts",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},exportAccountShare:async(t,s={})=>{o("exportAccountShare","accountUuid",t);const n="/v2/accounts/{accountUuid}/export-share".replace("{accountUuid}",encodeURIComponent(String(t))),a=new URL(n,i);let h;e&&(h=e.baseOptions);const u={method:"POST",...h,...s},l={};await r(l,e),c(a,{});let p=h&&h.headers?h.headers:{};return u.headers={...l,...p,...s.headers},{url:d(a),options:u}},getAccountV2:async(t,s={})=>{o("getAccountV2","id",t);const n="/v2/accounts/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(n,i);let h;e&&(h=e.baseOptions);const u={method:"GET",...h,...s},l={};await r(l,e),await r(l,e),await r(l,e),await r(l,e),await r(l,e),c(a,{});let p=h&&h.headers?h.headers:{};return u.headers={...l,...p,...s.headers},{url:d(a),options:u}},getAccountsV2:async(t,s,n,a,o,h,u,l,p,P={})=>{const w=new URL("/v2/accounts",i);let g;e&&(g=e.baseOptions);const m={method:"GET",...g,...P},y={},R={};await r(y,e),await r(y,e),await r(y,e),await r(y,e),await r(y,e),void 0!==t&&(R.limit=t),void 0!==s&&(R.skip=s),void 0!==n&&(R.order=n),void 0!==a&&(R.chainId=a),void 0!==o&&(R.user=o),void 0!==h&&(R.chainType=h),void 0!==u&&(R.accountType=u),void 0!==l&&(R.custody=l),void 0!==p&&(R.address=p),c(w,R);let f=g&&g.headers?g.headers:{};return m.headers={...y,...f,...P.headers},{url:d(w),options:m}},getSignerIdByAddress:async(t,s={})=>{o("getSignerIdByAddress","address",t);const n=new URL("/v2/accounts/signer",i);let a;e&&(a=e.baseOptions);const h={method:"GET",...a,...s},u={},l={};await r(u,e),await r(u,e),await r(u,e),await r(u,e),await r(u,e),void 0!==t&&(l.address=t),c(n,l);let p=a&&a.headers?a.headers:{};return h.headers={...u,...p,...s.headers},{url:d(n),options:h}},removeAccount:async(t,s={})=>{o("removeAccount","id",t);const n="/v2/accounts/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(n,i);let h;e&&(h=e.baseOptions);const u={method:"DELETE",...h,...s},l={};await r(l,e),await r(l,e),c(a,{});let p=h&&h.headers?h.headers:{};return u.headers={...l,...p,...s.headers},{url:d(a),options:u}},switchChainV2:async(t,s={})=>{o("switchChainV2","switchChainQueriesV2",t);const n=new URL("/v2/accounts/switch-chain",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),await r(l,e),await r(l,e),await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}}}}(t);return{async createAccountV2(a,i){const o=await n.createAccountV2(a,i);return l(o,e,s,t)},async exportAccountShare(a,i){const o=await n.exportAccountShare(a,i);return l(o,e,s,t)},async getAccountV2(a,i){const o=await n.getAccountV2(a,i);return l(o,e,s,t)},async getAccountsV2(a,i,o,r,h,c,u,d,p,P){const w=await n.getAccountsV2(a,i,o,r,h,c,u,d,p,P);return l(w,e,s,t)},async getSignerIdByAddress(a,i){const o=await n.getSignerIdByAddress(a,i);return l(o,e,s,t)},async removeAccount(a,i){const o=await n.removeAccount(a,i);return l(o,e,s,t)},async switchChainV2(a,i){const o=await n.switchChainV2(a,i);return l(o,e,s,t)}}};class g extends n{createAccountV2(e,t){return w(this.configuration).createAccountV2(e.createAccountRequestV2,t).then(e=>e(this.axios,this.basePath))}exportAccountShare(e,t){return w(this.configuration).exportAccountShare(e.accountUuid,t).then(e=>e(this.axios,this.basePath))}getAccountV2(e,t){return w(this.configuration).getAccountV2(e.id,t).then(e=>e(this.axios,this.basePath))}getAccountsV2(e={},t){return w(this.configuration).getAccountsV2(e.limit,e.skip,e.order,e.chainId,e.user,e.chainType,e.accountType,e.custody,e.address,t).then(e=>e(this.axios,this.basePath))}getSignerIdByAddress(e,t){return w(this.configuration).getSignerIdByAddress(e.address,t).then(e=>e(this.axios,this.basePath))}removeAccount(e,t){return w(this.configuration).removeAccount(e.id,t).then(e=>e(this.axios,this.basePath))}switchChainV2(e,t){return w(this.configuration).switchChainV2(e.switchChainQueriesV2,t).then(e=>e(this.axios,this.basePath))}}const m=function(t){const n=function(e){return{authenticateSIWE:async(t,s={})=>{o("authenticateSIWE","sIWEAuthenticateRequest",t);const n=new URL("/iam/v1/siwe/authenticate",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},getJwks:async(t,s={})=>{o("getJwks","publishableKey",t);const n="/iam/v1/{publishable_key}/jwks.json".replace("{publishable_key}",encodeURIComponent(String(t))),a=new URL(n,i);let r;e&&(r=e.baseOptions);const h={method:"GET",...r,...s};c(a,{});let u=r&&r.headers?r.headers:{};return h.headers={...u,...s.headers},{url:d(a),options:h}},initOAuth:async(t,s,n={})=>{o("initOAuth","oAuthInitRequest",t);const a=new URL("/iam/v1/oauth/init",i);let h;e&&(h=e.baseOptions);const l={method:"POST",...h,...n},p={};await r(p,e),null!=s&&(p["x-game"]=String(s)),p["Content-Type"]="application/json",c(a,{});let P=h&&h.headers?h.headers:{};return l.headers={...p,...P,...n.headers},l.data=u(t,l,e),{url:d(a),options:l}},initSIWE:async(t,s,n={})=>{o("initSIWE","sIWERequest",t);const a=new URL("/iam/v1/siwe/init",i);let h;e&&(h=e.baseOptions);const l={method:"POST",...h,...n},p={};await r(p,e),null!=s&&(p["x-game"]=String(s)),p["Content-Type"]="application/json",c(a,{});let P=h&&h.headers?h.headers:{};return l.headers={...p,...P,...n.headers},l.data=u(t,l,e),{url:d(a),options:l}},linkEmail:async(t,s,n={})=>{o("linkEmail","loginRequest",t);const a=new URL("/iam/v1/password/link",i);let h;e&&(h=e.baseOptions);const l={method:"POST",...h,...n},p={};await r(p,e),await r(p,e),null!=s&&(p["x-game"]=String(s)),p["Content-Type"]="application/json",c(a,{});let P=h&&h.headers?h.headers:{};return l.headers={...p,...P,...n.headers},l.data=u(t,l,e),{url:d(a),options:l}},linkOAuth:async(t,s,n={})=>{o("linkOAuth","oAuthInitRequest",t);const a=new URL("/iam/v1/oauth/init_link",i);let h;e&&(h=e.baseOptions);const l={method:"POST",...h,...n},p={};await r(p,e),await r(p,e),null!=s&&(p["x-game"]=String(s)),p["Content-Type"]="application/json",c(a,{});let P=h&&h.headers?h.headers:{};return l.headers={...p,...P,...n.headers},l.data=u(t,l,e),{url:d(a),options:l}},linkSIWE:async(t,s={})=>{o("linkSIWE","sIWEAuthenticateRequest",t);const n=new URL("/iam/v1/siwe/link",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},linkThirdParty:async(t,s,n={})=>{o("linkThirdParty","thirdPartyLinkRequest",t);const a=new URL("/iam/v1/oauth/link",i);let h;e&&(h=e.baseOptions);const l={method:"POST",...h,...n},p={};await r(p,e),await r(p,e),null!=s&&(p["x-game"]=String(s)),p["Content-Type"]="application/json",c(a,{});let P=h&&h.headers?h.headers:{};return l.headers={...p,...P,...n.headers},l.data=u(t,l,e),{url:d(a),options:l}},loginEmailPassword:async(t,s,n={})=>{o("loginEmailPassword","loginRequest",t);const a=new URL("/iam/v1/password/login",i);let h;e&&(h=e.baseOptions);const l={method:"POST",...h,...n},p={};await r(p,e),null!=s&&(p["x-game"]=String(s)),p["Content-Type"]="application/json",c(a,{});let P=h&&h.headers?h.headers:{};return l.headers={...p,...P,...n.headers},l.data=u(t,l,e),{url:d(a),options:l}},loginWithIdToken:async(t,s={})=>{o("loginWithIdToken","loginWithIdTokenRequest",t);const n=new URL("/iam/v1/oauth/login_id_token",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},logout:async(t,s={})=>{o("logout","logoutRequest",t);const n=new URL("/iam/v1/sessions/logout",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},me:async(t={})=>{const s=new URL("/iam/v1/me",i);let n;e&&(n=e.baseOptions);const a={method:"GET",...n,...t},o={};await r(o,e),await r(o,e),c(s,{});let h=n&&n.headers?n.headers:{};return a.headers={...o,...h,...t.headers},{url:d(s),options:a}},poolOAuth:async(t,s={})=>{o("poolOAuth","key",t);const n=new URL("/iam/v1/oauth/pool",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},u={},l={};await r(u,e),void 0!==t&&(l.key=t),c(n,l);let p=a&&a.headers?a.headers:{};return h.headers={...u,...p,...s.headers},{url:d(n),options:h}},refresh:async(t,s={})=>{o("refresh","refreshTokenRequest",t);const n=new URL("/iam/v1/sessions",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},registerGuest:async(t,s={})=>{const n=new URL("/iam/v1/guest",i);let a;e&&(a=e.baseOptions);const o={method:"POST",...a,...s},h={};await r(h,e),null!=t&&(h["x-game"]=String(t)),c(n,{});let u=a&&a.headers?a.headers:{};return o.headers={...h,...u,...s.headers},{url:d(n),options:o}},requestEmailVerification:async(t,s={})=>{o("requestEmailVerification","requestVerifyEmailRequest",t);const n=new URL("/iam/v1/password/request_email_verification",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},requestResetPassword:async(t,s={})=>{o("requestResetPassword","requestResetPasswordRequest",t);const n=new URL("/iam/v1/password/request_reset",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},resetPassword:async(t,s={})=>{o("resetPassword","resetPasswordRequest",t);const n=new URL("/iam/v1/password/reset",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},signupEmailPassword:async(t,s,n={})=>{o("signupEmailPassword","signupRequest",t);const a=new URL("/iam/v1/password/signup",i);let h;e&&(h=e.baseOptions);const l={method:"POST",...h,...n},p={};await r(p,e),null!=s&&(p["x-game"]=String(s)),p["Content-Type"]="application/json",c(a,{});let P=h&&h.headers?h.headers:{};return l.headers={...p,...P,...n.headers},l.data=u(t,l,e),{url:d(a),options:l}},thirdParty:async(t,s,n={})=>{o("thirdParty","thirdPartyOAuthRequest",t);const a=new URL("/iam/v1/oauth/third_party",i);let h;e&&(h=e.baseOptions);const l={method:"POST",...h,...n},p={};await r(p,e),await r(p,e),null!=s&&(p["x-game"]=String(s)),p["Content-Type"]="application/json",c(a,{});let P=h&&h.headers?h.headers:{};return l.headers={...p,...P,...n.headers},l.data=u(t,l,e),{url:d(a),options:l}},unlinkEmail:async(t,s={})=>{o("unlinkEmail","unlinkEmailRequest",t);const n=new URL("/iam/v1/password/unlink",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},unlinkOAuth:async(t,s={})=>{o("unlinkOAuth","unlinkOAuthRequest",t);const n=new URL("/iam/v1/oauth/unlink",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},unlinkSIWE:async(t,s={})=>{o("unlinkSIWE","sIWERequest",t);const n=new URL("/iam/v1/siwe/unlink",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},verifyEmail:async(t,s={})=>{o("verifyEmail","verifyEmailRequest",t);const n=new URL("/iam/v1/password/verify_email",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},verifyOAuthToken:async(t,s={})=>{o("verifyOAuthToken","authenticateOAuthRequest",t);const n=new URL("/iam/v1/oauth/verify",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}}}}(t);return{async authenticateSIWE(a,i){const o=await n.authenticateSIWE(a,i);return l(o,e,s,t)},async getJwks(a,i){const o=await n.getJwks(a,i);return l(o,e,s,t)},async initOAuth(a,i,o){const r=await n.initOAuth(a,i,o);return l(r,e,s,t)},async initSIWE(a,i,o){const r=await n.initSIWE(a,i,o);return l(r,e,s,t)},async linkEmail(a,i,o){const r=await n.linkEmail(a,i,o);return l(r,e,s,t)},async linkOAuth(a,i,o){const r=await n.linkOAuth(a,i,o);return l(r,e,s,t)},async linkSIWE(a,i){const o=await n.linkSIWE(a,i);return l(o,e,s,t)},async linkThirdParty(a,i,o){const r=await n.linkThirdParty(a,i,o);return l(r,e,s,t)},async loginEmailPassword(a,i,o){const r=await n.loginEmailPassword(a,i,o);return l(r,e,s,t)},async loginWithIdToken(a,i){const o=await n.loginWithIdToken(a,i);return l(o,e,s,t)},async logout(a,i){const o=await n.logout(a,i);return l(o,e,s,t)},async me(a){const i=await n.me(a);return l(i,e,s,t)},async poolOAuth(a,i){const o=await n.poolOAuth(a,i);return l(o,e,s,t)},async refresh(a,i){const o=await n.refresh(a,i);return l(o,e,s,t)},async registerGuest(a,i){const o=await n.registerGuest(a,i);return l(o,e,s,t)},async requestEmailVerification(a,i){const o=await n.requestEmailVerification(a,i);return l(o,e,s,t)},async requestResetPassword(a,i){const o=await n.requestResetPassword(a,i);return l(o,e,s,t)},async resetPassword(a,i){const o=await n.resetPassword(a,i);return l(o,e,s,t)},async signupEmailPassword(a,i,o){const r=await n.signupEmailPassword(a,i,o);return l(r,e,s,t)},async thirdParty(a,i,o){const r=await n.thirdParty(a,i,o);return l(r,e,s,t)},async unlinkEmail(a,i){const o=await n.unlinkEmail(a,i);return l(o,e,s,t)},async unlinkOAuth(a,i){const o=await n.unlinkOAuth(a,i);return l(o,e,s,t)},async unlinkSIWE(a,i){const o=await n.unlinkSIWE(a,i);return l(o,e,s,t)},async verifyEmail(a,i){const o=await n.verifyEmail(a,i);return l(o,e,s,t)},async verifyOAuthToken(a,i){const o=await n.verifyOAuthToken(a,i);return l(o,e,s,t)}}};class y extends n{authenticateSIWE(e,t){return m(this.configuration).authenticateSIWE(e.sIWEAuthenticateRequest,t).then(e=>e(this.axios,this.basePath))}getJwks(e,t){return m(this.configuration).getJwks(e.publishableKey,t).then(e=>e(this.axios,this.basePath))}initOAuth(e,t){return m(this.configuration).initOAuth(e.oAuthInitRequest,e.xGame,t).then(e=>e(this.axios,this.basePath))}initSIWE(e,t){return m(this.configuration).initSIWE(e.sIWERequest,e.xGame,t).then(e=>e(this.axios,this.basePath))}linkEmail(e,t){return m(this.configuration).linkEmail(e.loginRequest,e.xGame,t).then(e=>e(this.axios,this.basePath))}linkOAuth(e,t){return m(this.configuration).linkOAuth(e.oAuthInitRequest,e.xGame,t).then(e=>e(this.axios,this.basePath))}linkSIWE(e,t){return m(this.configuration).linkSIWE(e.sIWEAuthenticateRequest,t).then(e=>e(this.axios,this.basePath))}linkThirdParty(e,t){return m(this.configuration).linkThirdParty(e.thirdPartyLinkRequest,e.xGame,t).then(e=>e(this.axios,this.basePath))}loginEmailPassword(e,t){return m(this.configuration).loginEmailPassword(e.loginRequest,e.xGame,t).then(e=>e(this.axios,this.basePath))}loginWithIdToken(e,t){return m(this.configuration).loginWithIdToken(e.loginWithIdTokenRequest,t).then(e=>e(this.axios,this.basePath))}logout(e,t){return m(this.configuration).logout(e.logoutRequest,t).then(e=>e(this.axios,this.basePath))}me(e){return m(this.configuration).me(e).then(e=>e(this.axios,this.basePath))}poolOAuth(e,t){return m(this.configuration).poolOAuth(e.key,t).then(e=>e(this.axios,this.basePath))}refresh(e,t){return m(this.configuration).refresh(e.refreshTokenRequest,t).then(e=>e(this.axios,this.basePath))}registerGuest(e={},t){return m(this.configuration).registerGuest(e.xGame,t).then(e=>e(this.axios,this.basePath))}requestEmailVerification(e,t){return m(this.configuration).requestEmailVerification(e.requestVerifyEmailRequest,t).then(e=>e(this.axios,this.basePath))}requestResetPassword(e,t){return m(this.configuration).requestResetPassword(e.requestResetPasswordRequest,t).then(e=>e(this.axios,this.basePath))}resetPassword(e,t){return m(this.configuration).resetPassword(e.resetPasswordRequest,t).then(e=>e(this.axios,this.basePath))}signupEmailPassword(e,t){return m(this.configuration).signupEmailPassword(e.signupRequest,e.xGame,t).then(e=>e(this.axios,this.basePath))}thirdParty(e,t){return m(this.configuration).thirdParty(e.thirdPartyOAuthRequest,e.xGame,t).then(e=>e(this.axios,this.basePath))}unlinkEmail(e,t){return m(this.configuration).unlinkEmail(e.unlinkEmailRequest,t).then(e=>e(this.axios,this.basePath))}unlinkOAuth(e,t){return m(this.configuration).unlinkOAuth(e.unlinkOAuthRequest,t).then(e=>e(this.axios,this.basePath))}unlinkSIWE(e,t){return m(this.configuration).unlinkSIWE(e.sIWERequest,t).then(e=>e(this.axios,this.basePath))}verifyEmail(e,t){return m(this.configuration).verifyEmail(e.verifyEmailRequest,t).then(e=>e(this.axios,this.basePath))}verifyOAuthToken(e,t){return m(this.configuration).verifyOAuthToken(e.authenticateOAuthRequest,t).then(e=>e(this.axios,this.basePath))}}const R=function(t){const n=function(e){return{accountInfoPost:async(t,s={})=>{o("accountInfoPost","accountInfoPostRequest",t);const n=new URL("/account-info",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},changeEmailPost:async(t,s={})=>{o("changeEmailPost","changeEmailPostRequest",t);const n=new URL("/change-email",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},changePasswordPost:async(t,s={})=>{o("changePasswordPost","changePasswordPostRequest",t);const n=new URL("/change-password",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},checkVerificationOtp:async(t,s={})=>{o("checkVerificationOtp","checkVerificationOtpRequest",t);const n=new URL("/email-otp/check-verification-otp",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},emailOtpResetPasswordPost:async(t,s={})=>{o("emailOtpResetPasswordPost","emailOtpResetPasswordPostRequest",t);const n=new URL("/email-otp/reset-password",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},emailOtpSendVerificationOtpPost:async(t,s={})=>{o("emailOtpSendVerificationOtpPost","emailOtpSendVerificationOtpPostRequest",t);const n=new URL("/email-otp/send-verification-otp",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},emailOtpVerifyEmailPost:async(t,s={})=>{o("emailOtpVerifyEmailPost","emailOtpVerifyEmailPostRequest",t);const n=new URL("/email-otp/verify-email",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},forgetPasswordEmailOtpPost:async(t,s={})=>{o("forgetPasswordEmailOtpPost","forgetPasswordEmailOtpPostRequest",t);const n=new URL("/forget-password/email-otp",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},forgetPasswordPost:async(t,s={})=>{o("forgetPasswordPost","forgetPasswordPostRequest",t);const n=new URL("/forget-password",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},getAccessTokenPost:async(t,s={})=>{o("getAccessTokenPost","refreshTokenPostRequest",t);const n=new URL("/get-access-token",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},getSessionGet:async(t,s={})=>{const n=new URL("/get-session",i);let a;e&&(a=e.baseOptions);const o={method:"GET",...a,...s},h={},u={};await r(h,e),void 0!==t&&(u.disableCookieCache=t),c(n,u);let l=a&&a.headers?a.headers:{};return o.headers={...h,...l,...s.headers},{url:d(n),options:o}},linkSiweListWalletsGet:async(t={})=>{const s=new URL("/link-siwe/list-wallets",i);let n;e&&(n=e.baseOptions);const a={method:"GET",...n,...t},o={};await r(o,e),c(s,{});let h=n&&n.headers?n.headers:{};return a.headers={...o,...h,...t.headers},{url:d(s),options:a}},linkSiweNoncePost:async(t,s={})=>{o("linkSiweNoncePost","siweNoncePostRequest",t);const n=new URL("/link-siwe/nonce",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},linkSiweUnlinkPost:async(t,s={})=>{o("linkSiweUnlinkPost","linkSiweUnlinkPostRequest",t);const n=new URL("/link-siwe/unlink",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},linkSiweVerifyPost:async(t,s={})=>{o("linkSiweVerifyPost","siweVerifyPostRequest",t);const n=new URL("/link-siwe/verify",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},linkSocialPost:async(t,s={})=>{o("linkSocialPost","linkSocialPostRequest",t);const n=new URL("/link-social",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},listAccountsGet:async(t={})=>{const s=new URL("/list-accounts",i);let n;e&&(n=e.baseOptions);const a={method:"GET",...n,...t},o={};await r(o,e),c(s,{});let h=n&&n.headers?n.headers:{};return a.headers={...o,...h,...t.headers},{url:d(s),options:a}},listSessionsGet:async(t={})=>{const s=new URL("/list-sessions",i);let n;e&&(n=e.baseOptions);const a={method:"GET",...n,...t},o={};await r(o,e),c(s,{});let h=n&&n.headers?n.headers:{};return a.headers={...o,...h,...t.headers},{url:d(s),options:a}},phoneNumberForgetPasswordPost:async(t,s={})=>{o("phoneNumberForgetPasswordPost","phoneNumberForgetPasswordPostRequest",t);const n=new URL("/phone-number/forget-password",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},phoneNumberRequestPasswordResetPost:async(t,s={})=>{o("phoneNumberRequestPasswordResetPost","phoneNumberRequestPasswordResetPostRequest",t);const n=new URL("/phone-number/request-password-reset",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},phoneNumberResetPasswordPost:async(t,s={})=>{o("phoneNumberResetPasswordPost","phoneNumberResetPasswordPostRequest",t);const n=new URL("/phone-number/reset-password",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},phoneNumberSendOtpPost:async(t,s={})=>{o("phoneNumberSendOtpPost","phoneNumberSendOtpPostRequest",t);const n=new URL("/phone-number/send-otp",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},phoneNumberVerifyPost:async(t,s={})=>{o("phoneNumberVerifyPost","phoneNumberVerifyPostRequest",t);const n=new URL("/phone-number/verify",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},refreshTokenPost:async(t,s={})=>{o("refreshTokenPost","refreshTokenPostRequest",t);const n=new URL("/refresh-token",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},requestPasswordResetPost:async(t,s={})=>{o("requestPasswordResetPost","forgetPasswordPostRequest",t);const n=new URL("/request-password-reset",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},resetPasswordPost:async(t,s={})=>{o("resetPasswordPost","resetPasswordPostRequest",t);const n=new URL("/reset-password",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},resetPasswordTokenGet:async(t,s,n={})=>{o("resetPasswordTokenGet","token",t);const a="/reset-password/{token}".replace("{token}",encodeURIComponent(String(t))),h=new URL(a,i);let u;e&&(u=e.baseOptions);const l={method:"GET",...u,...n},p={},P={};await r(p,e),void 0!==s&&(P.callbackURL=s),c(h,P);let w=u&&u.headers?u.headers:{};return l.headers={...p,...w,...n.headers},{url:d(h),options:l}},revokeOtherSessionsPost:async(t,s={})=>{const n=new URL("/revoke-other-sessions",i);let a;e&&(a=e.baseOptions);const o={method:"POST",...a,...s},h={};await r(h,e),h["Content-Type"]="application/json",c(n,{});let l=a&&a.headers?a.headers:{};return o.headers={...h,...l,...s.headers},o.data=u(t,o,e),{url:d(n),options:o}},revokeSessionPost:async(t,s={})=>{const n=new URL("/revoke-session",i);let a;e&&(a=e.baseOptions);const o={method:"POST",...a,...s},h={};await r(h,e),h["Content-Type"]="application/json",c(n,{});let l=a&&a.headers?a.headers:{};return o.headers={...h,...l,...s.headers},o.data=u(t,o,e),{url:d(n),options:o}},revokeSessionsPost:async(t,s={})=>{const n=new URL("/revoke-sessions",i);let a;e&&(a=e.baseOptions);const o={method:"POST",...a,...s},h={};await r(h,e),h["Content-Type"]="application/json",c(n,{});let l=a&&a.headers?a.headers:{};return o.headers={...h,...l,...s.headers},o.data=u(t,o,e),{url:d(n),options:o}},sendVerificationEmailPost:async(t,s={})=>{const n=new URL("/send-verification-email",i);let a;e&&(a=e.baseOptions);const o={method:"POST",...a,...s},h={};await r(h,e),h["Content-Type"]="application/json",c(n,{});let l=a&&a.headers?a.headers:{};return o.headers={...h,...l,...s.headers},o.data=u(t,o,e),{url:d(n),options:o}},signInAnonymousPost:async(t={})=>{const s=new URL("/sign-in/anonymous",i);let n;e&&(n=e.baseOptions);const a={method:"POST",...n,...t},o={};await r(o,e),c(s,{});let h=n&&n.headers?n.headers:{};return a.headers={...o,...h,...t.headers},{url:d(s),options:a}},signInEmailOtpPost:async(t,s={})=>{o("signInEmailOtpPost","signInEmailOtpPostRequest",t);const n=new URL("/sign-in/email-otp",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},signInEmailPost:async(t,s={})=>{o("signInEmailPost","signInEmailPostRequest",t);const n=new URL("/sign-in/email",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},signInPhoneNumberPost:async(t,s={})=>{o("signInPhoneNumberPost","signInPhoneNumberPostRequest",t);const n=new URL("/sign-in/phone-number",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},signOutPost:async(t,s={})=>{const n=new URL("/sign-out",i);let a;e&&(a=e.baseOptions);const o={method:"POST",...a,...s},h={};await r(h,e),h["Content-Type"]="application/json",c(n,{});let l=a&&a.headers?a.headers:{};return o.headers={...h,...l,...s.headers},o.data=u(t,o,e),{url:d(n),options:o}},signUpEmailPost:async(t,s={})=>{const n=new URL("/sign-up/email",i);let a;e&&(a=e.baseOptions);const o={method:"POST",...a,...s},h={};await r(h,e),h["Content-Type"]="application/json",c(n,{});let l=a&&a.headers?a.headers:{};return o.headers={...h,...l,...s.headers},o.data=u(t,o,e),{url:d(n),options:o}},siweNoncePost:async(t,s={})=>{o("siweNoncePost","siweNoncePostRequest",t);const n=new URL("/siwe/nonce",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},siweVerifyPost:async(t,s={})=>{o("siweVerifyPost","siweVerifyPostRequest",t);const n=new URL("/siwe/verify",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},socialSignIn:async(t,s={})=>{o("socialSignIn","socialSignInRequest",t);const n=new URL("/sign-in/social",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},unlinkAccountPost:async(t,s={})=>{o("unlinkAccountPost","unlinkAccountPostRequest",t);const n=new URL("/unlink-account",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},verifyEmailGet:async(t,s,n={})=>{o("verifyEmailGet","token",t);const a=new URL("/verify-email",i);let h;e&&(h=e.baseOptions);const u={method:"GET",...h,...n},l={},p={};await r(l,e),void 0!==t&&(p.token=t),void 0!==s&&(p.callbackURL=s),c(a,p);let P=h&&h.headers?h.headers:{};return u.headers={...l,...P,...n.headers},{url:d(a),options:u}}}}(t);return{async accountInfoPost(a,i){const o=await n.accountInfoPost(a,i);return l(o,e,s,t)},async changeEmailPost(a,i){const o=await n.changeEmailPost(a,i);return l(o,e,s,t)},async changePasswordPost(a,i){const o=await n.changePasswordPost(a,i);return l(o,e,s,t)},async checkVerificationOtp(a,i){const o=await n.checkVerificationOtp(a,i);return l(o,e,s,t)},async emailOtpResetPasswordPost(a,i){const o=await n.emailOtpResetPasswordPost(a,i);return l(o,e,s,t)},async emailOtpSendVerificationOtpPost(a,i){const o=await n.emailOtpSendVerificationOtpPost(a,i);return l(o,e,s,t)},async emailOtpVerifyEmailPost(a,i){const o=await n.emailOtpVerifyEmailPost(a,i);return l(o,e,s,t)},async forgetPasswordEmailOtpPost(a,i){const o=await n.forgetPasswordEmailOtpPost(a,i);return l(o,e,s,t)},async forgetPasswordPost(a,i){const o=await n.forgetPasswordPost(a,i);return l(o,e,s,t)},async getAccessTokenPost(a,i){const o=await n.getAccessTokenPost(a,i);return l(o,e,s,t)},async getSessionGet(a,i){const o=await n.getSessionGet(a,i);return l(o,e,s,t)},async linkSiweListWalletsGet(a){const i=await n.linkSiweListWalletsGet(a);return l(i,e,s,t)},async linkSiweNoncePost(a,i){const o=await n.linkSiweNoncePost(a,i);return l(o,e,s,t)},async linkSiweUnlinkPost(a,i){const o=await n.linkSiweUnlinkPost(a,i);return l(o,e,s,t)},async linkSiweVerifyPost(a,i){const o=await n.linkSiweVerifyPost(a,i);return l(o,e,s,t)},async linkSocialPost(a,i){const o=await n.linkSocialPost(a,i);return l(o,e,s,t)},async listAccountsGet(a){const i=await n.listAccountsGet(a);return l(i,e,s,t)},async listSessionsGet(a){const i=await n.listSessionsGet(a);return l(i,e,s,t)},async phoneNumberForgetPasswordPost(a,i){const o=await n.phoneNumberForgetPasswordPost(a,i);return l(o,e,s,t)},async phoneNumberRequestPasswordResetPost(a,i){const o=await n.phoneNumberRequestPasswordResetPost(a,i);return l(o,e,s,t)},async phoneNumberResetPasswordPost(a,i){const o=await n.phoneNumberResetPasswordPost(a,i);return l(o,e,s,t)},async phoneNumberSendOtpPost(a,i){const o=await n.phoneNumberSendOtpPost(a,i);return l(o,e,s,t)},async phoneNumberVerifyPost(a,i){const o=await n.phoneNumberVerifyPost(a,i);return l(o,e,s,t)},async refreshTokenPost(a,i){const o=await n.refreshTokenPost(a,i);return l(o,e,s,t)},async requestPasswordResetPost(a,i){const o=await n.requestPasswordResetPost(a,i);return l(o,e,s,t)},async resetPasswordPost(a,i){const o=await n.resetPasswordPost(a,i);return l(o,e,s,t)},async resetPasswordTokenGet(a,i,o){const r=await n.resetPasswordTokenGet(a,i,o);return l(r,e,s,t)},async revokeOtherSessionsPost(a,i){const o=await n.revokeOtherSessionsPost(a,i);return l(o,e,s,t)},async revokeSessionPost(a,i){const o=await n.revokeSessionPost(a,i);return l(o,e,s,t)},async revokeSessionsPost(a,i){const o=await n.revokeSessionsPost(a,i);return l(o,e,s,t)},async sendVerificationEmailPost(a,i){const o=await n.sendVerificationEmailPost(a,i);return l(o,e,s,t)},async signInAnonymousPost(a){const i=await n.signInAnonymousPost(a);return l(i,e,s,t)},async signInEmailOtpPost(a,i){const o=await n.signInEmailOtpPost(a,i);return l(o,e,s,t)},async signInEmailPost(a,i){const o=await n.signInEmailPost(a,i);return l(o,e,s,t)},async signInPhoneNumberPost(a,i){const o=await n.signInPhoneNumberPost(a,i);return l(o,e,s,t)},async signOutPost(a,i){const o=await n.signOutPost(a,i);return l(o,e,s,t)},async signUpEmailPost(a,i){const o=await n.signUpEmailPost(a,i);return l(o,e,s,t)},async siweNoncePost(a,i){const o=await n.siweNoncePost(a,i);return l(o,e,s,t)},async siweVerifyPost(a,i){const o=await n.siweVerifyPost(a,i);return l(o,e,s,t)},async socialSignIn(a,i){const o=await n.socialSignIn(a,i);return l(o,e,s,t)},async unlinkAccountPost(a,i){const o=await n.unlinkAccountPost(a,i);return l(o,e,s,t)},async verifyEmailGet(a,i,o){const r=await n.verifyEmailGet(a,i,o);return l(r,e,s,t)}}};class f extends n{accountInfoPost(e,t){return R(this.configuration).accountInfoPost(e.accountInfoPostRequest,t).then(e=>e(this.axios,this.basePath))}changeEmailPost(e,t){return R(this.configuration).changeEmailPost(e.changeEmailPostRequest,t).then(e=>e(this.axios,this.basePath))}changePasswordPost(e,t){return R(this.configuration).changePasswordPost(e.changePasswordPostRequest,t).then(e=>e(this.axios,this.basePath))}checkVerificationOtp(e,t){return R(this.configuration).checkVerificationOtp(e.checkVerificationOtpRequest,t).then(e=>e(this.axios,this.basePath))}emailOtpResetPasswordPost(e,t){return R(this.configuration).emailOtpResetPasswordPost(e.emailOtpResetPasswordPostRequest,t).then(e=>e(this.axios,this.basePath))}emailOtpSendVerificationOtpPost(e,t){return R(this.configuration).emailOtpSendVerificationOtpPost(e.emailOtpSendVerificationOtpPostRequest,t).then(e=>e(this.axios,this.basePath))}emailOtpVerifyEmailPost(e,t){return R(this.configuration).emailOtpVerifyEmailPost(e.emailOtpVerifyEmailPostRequest,t).then(e=>e(this.axios,this.basePath))}forgetPasswordEmailOtpPost(e,t){return R(this.configuration).forgetPasswordEmailOtpPost(e.forgetPasswordEmailOtpPostRequest,t).then(e=>e(this.axios,this.basePath))}forgetPasswordPost(e,t){return R(this.configuration).forgetPasswordPost(e.forgetPasswordPostRequest,t).then(e=>e(this.axios,this.basePath))}getAccessTokenPost(e,t){return R(this.configuration).getAccessTokenPost(e.refreshTokenPostRequest,t).then(e=>e(this.axios,this.basePath))}getSessionGet(e={},t){return R(this.configuration).getSessionGet(e.disableCookieCache,t).then(e=>e(this.axios,this.basePath))}linkSiweListWalletsGet(e){return R(this.configuration).linkSiweListWalletsGet(e).then(e=>e(this.axios,this.basePath))}linkSiweNoncePost(e,t){return R(this.configuration).linkSiweNoncePost(e.siweNoncePostRequest,t).then(e=>e(this.axios,this.basePath))}linkSiweUnlinkPost(e,t){return R(this.configuration).linkSiweUnlinkPost(e.linkSiweUnlinkPostRequest,t).then(e=>e(this.axios,this.basePath))}linkSiweVerifyPost(e,t){return R(this.configuration).linkSiweVerifyPost(e.siweVerifyPostRequest,t).then(e=>e(this.axios,this.basePath))}linkSocialPost(e,t){return R(this.configuration).linkSocialPost(e.linkSocialPostRequest,t).then(e=>e(this.axios,this.basePath))}listAccountsGet(e){return R(this.configuration).listAccountsGet(e).then(e=>e(this.axios,this.basePath))}listSessionsGet(e){return R(this.configuration).listSessionsGet(e).then(e=>e(this.axios,this.basePath))}phoneNumberForgetPasswordPost(e,t){return R(this.configuration).phoneNumberForgetPasswordPost(e.phoneNumberForgetPasswordPostRequest,t).then(e=>e(this.axios,this.basePath))}phoneNumberRequestPasswordResetPost(e,t){return R(this.configuration).phoneNumberRequestPasswordResetPost(e.phoneNumberRequestPasswordResetPostRequest,t).then(e=>e(this.axios,this.basePath))}phoneNumberResetPasswordPost(e,t){return R(this.configuration).phoneNumberResetPasswordPost(e.phoneNumberResetPasswordPostRequest,t).then(e=>e(this.axios,this.basePath))}phoneNumberSendOtpPost(e,t){return R(this.configuration).phoneNumberSendOtpPost(e.phoneNumberSendOtpPostRequest,t).then(e=>e(this.axios,this.basePath))}phoneNumberVerifyPost(e,t){return R(this.configuration).phoneNumberVerifyPost(e.phoneNumberVerifyPostRequest,t).then(e=>e(this.axios,this.basePath))}refreshTokenPost(e,t){return R(this.configuration).refreshTokenPost(e.refreshTokenPostRequest,t).then(e=>e(this.axios,this.basePath))}requestPasswordResetPost(e,t){return R(this.configuration).requestPasswordResetPost(e.forgetPasswordPostRequest,t).then(e=>e(this.axios,this.basePath))}resetPasswordPost(e,t){return R(this.configuration).resetPasswordPost(e.resetPasswordPostRequest,t).then(e=>e(this.axios,this.basePath))}resetPasswordTokenGet(e,t){return R(this.configuration).resetPasswordTokenGet(e.token,e.callbackURL,t).then(e=>e(this.axios,this.basePath))}revokeOtherSessionsPost(e={},t){return R(this.configuration).revokeOtherSessionsPost(e.body,t).then(e=>e(this.axios,this.basePath))}revokeSessionPost(e={},t){return R(this.configuration).revokeSessionPost(e.revokeSessionPostRequest,t).then(e=>e(this.axios,this.basePath))}revokeSessionsPost(e={},t){return R(this.configuration).revokeSessionsPost(e.body,t).then(e=>e(this.axios,this.basePath))}sendVerificationEmailPost(e={},t){return R(this.configuration).sendVerificationEmailPost(e.sendVerificationEmailPostRequest,t).then(e=>e(this.axios,this.basePath))}signInAnonymousPost(e){return R(this.configuration).signInAnonymousPost(e).then(e=>e(this.axios,this.basePath))}signInEmailOtpPost(e,t){return R(this.configuration).signInEmailOtpPost(e.signInEmailOtpPostRequest,t).then(e=>e(this.axios,this.basePath))}signInEmailPost(e,t){return R(this.configuration).signInEmailPost(e.signInEmailPostRequest,t).then(e=>e(this.axios,this.basePath))}signInPhoneNumberPost(e,t){return R(this.configuration).signInPhoneNumberPost(e.signInPhoneNumberPostRequest,t).then(e=>e(this.axios,this.basePath))}signOutPost(e={},t){return R(this.configuration).signOutPost(e.body,t).then(e=>e(this.axios,this.basePath))}signUpEmailPost(e={},t){return R(this.configuration).signUpEmailPost(e.signUpEmailPostRequest,t).then(e=>e(this.axios,this.basePath))}siweNoncePost(e,t){return R(this.configuration).siweNoncePost(e.siweNoncePostRequest,t).then(e=>e(this.axios,this.basePath))}siweVerifyPost(e,t){return R(this.configuration).siweVerifyPost(e.siweVerifyPostRequest,t).then(e=>e(this.axios,this.basePath))}socialSignIn(e,t){return R(this.configuration).socialSignIn(e.socialSignInRequest,t).then(e=>e(this.axios,this.basePath))}unlinkAccountPost(e,t){return R(this.configuration).unlinkAccountPost(e.unlinkAccountPostRequest,t).then(e=>e(this.axios,this.basePath))}verifyEmailGet(e,t){return R(this.configuration).verifyEmailGet(e.token,e.callbackURL,t).then(e=>e(this.axios,this.basePath))}}const b=function(t){const n=function(e){return{handleChainRpcRequest:async(t,s,n={})=>{o("handleChainRpcRequest","chainId",t),o("handleChainRpcRequest","jsonRpcRequest",s);const a="/rpc/{chainId}".replace("{chainId}",encodeURIComponent(String(t))),h=new URL(a,i);let l;e&&(l=e.baseOptions);const p={method:"POST",...l,...n},P={};await r(P,e),P["Content-Type"]="application/json",c(h,{});let w=l&&l.headers?l.headers:{};return p.headers={...P,...w,...n.headers},p.data=u(s,p,e),{url:d(h),options:p}},handleRpcRequest:async(t,s={})=>{o("handleRpcRequest","jsonRpcRequest",t);const n=new URL("/rpc",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),await r(l,e),await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}}}}(t);return{async handleChainRpcRequest(a,i,o){const r=await n.handleChainRpcRequest(a,i,o);return l(r,e,s,t)},async handleRpcRequest(a,i){const o=await n.handleRpcRequest(a,i);return l(o,e,s,t)}}};class O extends n{handleChainRpcRequest(e,t){return b(this.configuration).handleChainRpcRequest(e.chainId,e.jsonRpcRequest,t).then(e=>e(this.axios,this.basePath))}handleRpcRequest(e,t){return b(this.configuration).handleRpcRequest(e.jsonRpcRequest,t).then(e=>e(this.axios,this.basePath))}}const S=function(t){const n=function(e){return{createSession:async(t,s,n={})=>{o("createSession","createSessionRequest",t);const a=new URL("/v1/sessions",i);let h;e&&(h=e.baseOptions);const l={method:"POST",...h,...n},p={};await r(p,e),await r(p,e),await r(p,e),await r(p,e),null!=s&&(p["X-Behalf-Of-Project"]=String(s)),p["Content-Type"]="application/json",c(a,{});let P=h&&h.headers?h.headers:{};return l.headers={...p,...P,...n.headers},l.data=u(t,l,e),{url:d(a),options:l}},getPlayerSessions:async(t,s,n,a,h,u={})=>{o("getPlayerSessions","player",t);const l=new URL("/v1/sessions",i);let p;e&&(p=e.baseOptions);const P={method:"GET",...p,...u},w={},g={};await r(w,e),await r(w,e),void 0!==s&&(g.limit=s),void 0!==n&&(g.skip=n),void 0!==a&&(g.order=a),void 0!==t&&(g.player=t),h&&(g.expand=h),c(l,g);let m=p&&p.headers?p.headers:{};return P.headers={...w,...m,...u.headers},{url:d(l),options:P}},getSession:async(t,s,n={})=>{o("getSession","id",t);const a="/v1/sessions/{id}".replace("{id}",encodeURIComponent(String(t))),h=new URL(a,i);let u;e&&(u=e.baseOptions);const l={method:"GET",...u,...n},p={},P={};await r(p,e),await r(p,e),s&&(P.expand=s),c(h,P);let w=u&&u.headers?u.headers:{};return l.headers={...p,...w,...n.headers},{url:d(h),options:l}},revokeSession:async(t,s,n={})=>{o("revokeSession","revokeSessionRequest",t);const a=new URL("/v1/sessions/revoke",i);let h;e&&(h=e.baseOptions);const l={method:"POST",...h,...n},p={};await r(p,e),await r(p,e),await r(p,e),await r(p,e),null!=s&&(p["X-Behalf-Of-Project"]=String(s)),p["Content-Type"]="application/json",c(a,{});let P=h&&h.headers?h.headers:{};return l.headers={...p,...P,...n.headers},l.data=u(t,l,e),{url:d(a),options:l}},signatureSession:async(t,s,n={})=>{o("signatureSession","id",t),o("signatureSession","signatureRequest",s);const a="/v1/sessions/{id}/signature".replace("{id}",encodeURIComponent(String(t))),h=new URL(a,i);let l;e&&(l=e.baseOptions);const p={method:"POST",...l,...n},P={};await r(P,e),await r(P,e),await r(P,e),P["Content-Type"]="application/json",c(h,{});let w=l&&l.headers?l.headers:{};return p.headers={...P,...w,...n.headers},p.data=u(s,p,e),{url:d(h),options:p}}}}(t);return{async createSession(a,i,o){const r=await n.createSession(a,i,o);return l(r,e,s,t)},async getPlayerSessions(a,i,o,r,h,c){const u=await n.getPlayerSessions(a,i,o,r,h,c);return l(u,e,s,t)},async getSession(a,i,o){const r=await n.getSession(a,i,o);return l(r,e,s,t)},async revokeSession(a,i,o){const r=await n.revokeSession(a,i,o);return l(r,e,s,t)},async signatureSession(a,i,o){const r=await n.signatureSession(a,i,o);return l(r,e,s,t)}}};class T extends n{createSession(e,t){return S(this.configuration).createSession(e.createSessionRequest,e.xBehalfOfProject,t).then(e=>e(this.axios,this.basePath))}getPlayerSessions(e,t){return S(this.configuration).getPlayerSessions(e.player,e.limit,e.skip,e.order,e.expand,t).then(e=>e(this.axios,this.basePath))}getSession(e,t){return S(this.configuration).getSession(e.id,e.expand,t).then(e=>e(this.axios,this.basePath))}revokeSession(e,t){return S(this.configuration).revokeSession(e.revokeSessionRequest,e.xBehalfOfProject,t).then(e=>e(this.axios,this.basePath))}signatureSession(e,t){return S(this.configuration).signatureSession(e.id,e.signatureRequest,t).then(e=>e(this.axios,this.basePath))}}const k=function(t){const n=function(e){return{createTransactionIntent:async(t,s,n={})=>{o("createTransactionIntent","createTransactionIntentRequest",t);const a=new URL("/v1/transaction_intents",i);let h;e&&(h=e.baseOptions);const l={method:"POST",...h,...n},p={};await r(p,e),await r(p,e),await r(p,e),await r(p,e),null!=s&&(p["X-Behalf-Of-Project"]=String(s)),p["Content-Type"]="application/json",c(a,{});let P=h&&h.headers?h.headers:{};return l.headers={...p,...P,...n.headers},l.data=u(t,l,e),{url:d(a),options:l}},estimateTransactionIntentCost:async(t,s={})=>{o("estimateTransactionIntentCost","createTransactionIntentRequest",t);const n=new URL("/v1/transaction_intents/estimate_gas_cost",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),await r(l,e),await r(l,e),await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},getTransactionIntent:async(t,s,n={})=>{o("getTransactionIntent","id",t);const a="/v1/transaction_intents/{id}".replace("{id}",encodeURIComponent(String(t))),h=new URL(a,i);let u;e&&(u=e.baseOptions);const l={method:"GET",...u,...n},p={},P={};await r(p,e),await r(p,e),await r(p,e),await r(p,e),await r(p,e),s&&(P.expand=s),c(h,P);let w=u&&u.headers?u.headers:{};return l.headers={...p,...w,...n.headers},{url:d(h),options:l}},getTransactionIntents:async(t,s,n,a,o,h,u,l,p,P={})=>{const w=new URL("/v1/transaction_intents",i);let g;e&&(g=e.baseOptions);const m={method:"GET",...g,...P},y={},R={};await r(y,e),await r(y,e),void 0!==t&&(R.limit=t),void 0!==s&&(R.skip=s),void 0!==n&&(R.order=n),a&&(R.expand=a),void 0!==o&&(R.chainId=o),h&&(R.account=h),u&&(R.player=u),void 0!==l&&(R.status=l),p&&(R.policy=p),c(w,R);let f=g&&g.headers?g.headers:{};return m.headers={...y,...f,...P.headers},{url:d(w),options:m}},signature:async(t,s,n={})=>{o("signature","id",t),o("signature","signatureRequest",s);const a="/v1/transaction_intents/{id}/signature".replace("{id}",encodeURIComponent(String(t))),h=new URL(a,i);let l;e&&(l=e.baseOptions);const p={method:"POST",...l,...n},P={};await r(P,e),await r(P,e),P["Content-Type"]="application/json",c(h,{});let w=l&&l.headers?l.headers:{};return p.headers={...P,...w,...n.headers},p.data=u(s,p,e),{url:d(h),options:p}}}}(t);return{async createTransactionIntent(a,i,o){const r=await n.createTransactionIntent(a,i,o);return l(r,e,s,t)},async estimateTransactionIntentCost(a,i){const o=await n.estimateTransactionIntentCost(a,i);return l(o,e,s,t)},async getTransactionIntent(a,i,o){const r=await n.getTransactionIntent(a,i,o);return l(r,e,s,t)},async getTransactionIntents(a,i,o,r,h,c,u,d,p,P){const w=await n.getTransactionIntents(a,i,o,r,h,c,u,d,p,P);return l(w,e,s,t)},async signature(a,i,o){const r=await n.signature(a,i,o);return l(r,e,s,t)}}};class v extends n{createTransactionIntent(e,t){return k(this.configuration).createTransactionIntent(e.createTransactionIntentRequest,e.xBehalfOfProject,t).then(e=>e(this.axios,this.basePath))}estimateTransactionIntentCost(e,t){return k(this.configuration).estimateTransactionIntentCost(e.createTransactionIntentRequest,t).then(e=>e(this.axios,this.basePath))}getTransactionIntent(e,t){return k(this.configuration).getTransactionIntent(e.id,e.expand,t).then(e=>e(this.axios,this.basePath))}getTransactionIntents(e={},t){return k(this.configuration).getTransactionIntents(e.limit,e.skip,e.order,e.expand,e.chainId,e.account,e.player,e.status,e.policy,t).then(e=>e(this.axios,this.basePath))}signature(e,t){return k(this.configuration).signature(e.id,e.signatureRequest,t).then(e=>e(this.axios,this.basePath))}}const q=function(t){const n=function(e){return{deleteUser:async(t,s={})=>{o("deleteUser","id",t);const n="/v2/users/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(n,i);let h;e&&(h=e.baseOptions);const u={method:"DELETE",...h,...s},l={};await r(l,e),await r(l,e),c(a,{});let p=h&&h.headers?h.headers:{};return u.headers={...l,...p,...s.headers},{url:d(a),options:u}},getAuthUser:async(t,s={})=>{o("getAuthUser","id",t);const n="/v2/users/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(n,i);let h;e&&(h=e.baseOptions);const u={method:"GET",...h,...s},l={};await r(l,e),await r(l,e),c(a,{});let p=h&&h.headers?h.headers:{};return u.headers={...l,...p,...s.headers},{url:d(a),options:u}},getAuthUsers:async(t,s,n,a,o,h,u,l,p,P={})=>{const w=new URL("/v2/users",i);let g;e&&(g=e.baseOptions);const m={method:"GET",...g,...P},y={},R={};await r(y,e),await r(y,e),void 0!==t&&(R.limit=t),void 0!==s&&(R.skip=s),void 0!==n&&(R.order=n),void 0!==a&&(R.name=a),void 0!==o&&(R.externalUserId=o),void 0!==h&&(R.email=h),void 0!==u&&(R.phoneNumber=u),void 0!==l&&(R.authProviderId=l),void 0!==p&&(R.walletClientType=p),c(w,R);let f=g&&g.headers?g.headers:{};return m.headers={...y,...f,...P.headers},{url:d(w),options:m}},getUserWallet:async(t,s={})=>{o("getUserWallet","id",t);const n="/v2/users/{id}/wallet".replace("{id}",encodeURIComponent(String(t))),a=new URL(n,i);let h;e&&(h=e.baseOptions);const u={method:"GET",...h,...s},l={};await r(l,e),await r(l,e),c(a,{});let p=h&&h.headers?h.headers:{};return u.headers={...l,...p,...s.headers},{url:d(a),options:u}},meV2:async(t={})=>{const s=new URL("/iam/v2/me",i);let n;e&&(n=e.baseOptions);const a={method:"GET",...n,...t},o={};await r(o,e),await r(o,e),c(s,{});let h=n&&n.headers?n.headers:{};return a.headers={...o,...h,...t.headers},{url:d(s),options:a}},pregenerateUserV2:async(t,s={})=>{o("pregenerateUserV2","pregenerateUserRequestV2",t);const n=new URL("/v2/users/pregenerate",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}},thirdPartyV2:async(t,s={})=>{o("thirdPartyV2","thirdPartyOAuthRequest",t);const n=new URL("/iam/v2/user/third_party",i);let a;e&&(a=e.baseOptions);const h={method:"POST",...a,...s},l={};await r(l,e),await r(l,e),l["Content-Type"]="application/json",c(n,{});let p=a&&a.headers?a.headers:{};return h.headers={...l,...p,...s.headers},h.data=u(t,h,e),{url:d(n),options:h}}}}(t);return{async deleteUser(a,i){const o=await n.deleteUser(a,i);return l(o,e,s,t)},async getAuthUser(a,i){const o=await n.getAuthUser(a,i);return l(o,e,s,t)},async getAuthUsers(a,i,o,r,h,c,u,d,p,P){const w=await n.getAuthUsers(a,i,o,r,h,c,u,d,p,P);return l(w,e,s,t)},async getUserWallet(a,i){const o=await n.getUserWallet(a,i);return l(o,e,s,t)},async meV2(a){const i=await n.meV2(a);return l(i,e,s,t)},async pregenerateUserV2(a,i){const o=await n.pregenerateUserV2(a,i);return l(o,e,s,t)},async thirdPartyV2(a,i){const o=await n.thirdPartyV2(a,i);return l(o,e,s,t)}}};class I extends n{deleteUser(e,t){return q(this.configuration).deleteUser(e.id,t).then(e=>e(this.axios,this.basePath))}getAuthUser(e,t){return q(this.configuration).getAuthUser(e.id,t).then(e=>e(this.axios,this.basePath))}getAuthUsers(e={},t){return q(this.configuration).getAuthUsers(e.limit,e.skip,e.order,e.name,e.externalUserId,e.email,e.phoneNumber,e.authProviderId,e.walletClientType,t).then(e=>e(this.axios,this.basePath))}getUserWallet(e,t){return q(this.configuration).getUserWallet(e.id,t).then(e=>e(this.axios,this.basePath))}meV2(e){return q(this.configuration).meV2(e).then(e=>e(this.axios,this.basePath))}pregenerateUserV2(e,t){return q(this.configuration).pregenerateUserV2(e.pregenerateUserRequestV2,t).then(e=>e(this.axios,this.basePath))}thirdPartyV2(e,t){return q(this.configuration).thirdPartyV2(e.thirdPartyOAuthRequest,t).then(e=>e(this.axios,this.basePath))}}class x{apiKey;username;password;accessToken;basePath;baseOptions;formDataCtor;constructor(e={}){this.apiKey=e.apiKey,this.username=e.username,this.password=e.password,this.accessToken=e.accessToken,this.basePath=e.basePath,this.baseOptions=e.baseOptions,this.formDataCtor=e.formDataCtor}isJsonMime(e){const t=new RegExp("^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$","i");return null!==e&&(t.test(e)||"application/json-patch+json"===e.toLowerCase())}}const A=({basePath:e,accessToken:t,nativeAppIdentifier:s})=>{if(!e.trim())throw Error("basePath can not be empty");const n={basePath:e,accessToken:t,baseOptions:{headers:{...s&&{"x-native-app-identifier":s},Cookie:null},withCredentials:!1}};return new x(n)};exports.BackendApiClients=class{config;transactionIntentsApi;accountsApi;accountsV2Api;rpcApi;sessionsApi;authApi;userApi;authenticationApi;storage;onLogout;axiosInstance;constructor(s){this.storage=s.storage,this.onLogout=s.onLogout,this.axiosInstance=e.create(),t(this.axiosInstance,{retries:3,retryDelay:t.exponentialDelay,retryCondition:t.isRetryableError}),this.setupInterceptors();const n={basePath:s.basePath,accessToken:s.accessToken,nativeAppIdentifier:s.nativeAppIdentifier};this.config={backend:A(n)};const a={basePath:`${s.basePath}/iam/v2/auth`,accessToken:"",nativeAppIdentifier:s.nativeAppIdentifier},i=A(a);this.authenticationApi=new y(this.config.backend,void 0,this.axiosInstance),this.authApi=new f(i,void 0,this.axiosInstance),this.userApi=new I(this.config.backend,void 0,this.axiosInstance),this.transactionIntentsApi=new v(this.config.backend,void 0,this.axiosInstance),this.accountsApi=new P(this.config.backend,void 0,this.axiosInstance),this.accountsV2Api=new g(this.config.backend,void 0,this.axiosInstance),this.sessionsApi=new T(this.config.backend,void 0,this.axiosInstance),this.rpcApi=new O(this.config.backend,void 0,this.axiosInstance)}setupInterceptors(){this.axiosInstance.interceptors.response.use(e=>e,async e=>(401===e.response?.status&&(await this.clearAuthenticationState(),this.emitLogoutEvent()),Promise.reject(e)))}async clearAuthenticationState(){if(this.storage)try{this.storage.remove("openfort.authentication"),this.storage.remove("openfort.account"),this.storage.remove("openfort.session"),this.storage.remove("openfort.pkce_state"),this.storage.remove("openfort.pkce_verifier")}catch(e){}}emitLogoutEvent(){if(this.onLogout)try{this.onLogout()}catch(e){}}},exports.createConfig=A;
@@ -1 +1 @@
1
- "use strict";exports.PACKAGE="@openfort/openfort-js",exports.VERSION="1.3.0";
1
+ "use strict";exports.PACKAGE="@openfort/openfort-js",exports.VERSION="1.3.1";
@@ -1 +1 @@
1
- "use strict";var e=require("../../core/errors/withApiError.cjs"),r=require("../../types/types.cjs"),t=require("../../utils/authorization.cjs"),o=require("./JsonRpcError.cjs");const a=e=>{const r=e?.logs?.[0];return{blockHash:r?.blockHash,blockNumber:e?.blockNumber?.toString(),contractAddress:void 0,cumulativeGasUsed:e?.gasUsed,effectiveGasPrice:e?.gasFee,from:void 0,gasUsed:e?.gasUsed,logs:e?.logs||[],logsBloom:void 0,status:1===e?.status?"success":0===e?.status?"reverted":void 0,to:e?.to,transactionHash:e?.transactionHash,transactionIndex:r?.transactionIndex,type:"eip1559",blobGasPrice:void 0,blobGasUsed:void 0,root:void 0}};async function n(e,r){try{const t=await e.getCode(r);return"0x"!==t&&t.length>2}catch{return!1}}exports.sendCallsSync=async({params:s,signer:i,account:c,authentication:d,backendClient:p,rpcProvider:u,feeSponsorshipId:l})=>{const E=s[0]?.capabilities?.paymasterService?.policy??l;let h;if(c.accountType===r.AccountTypeEnum.DELEGATED_ACCOUNT){const[e,r]=await Promise.all([n(u,c.address),u.getTransactionCount(c.address)]);if(!e){const e=await t.prepareAndSignAuthorization({signer:i,accountAddress:c.address,contractAddress:c.implementationAddress,chainId:c.chainId,nonce:r});h=t.serializeSignedAuthorization(e)}}const A=await(async(r,t,a,n,s,i)=>{const c=r.map(e=>{if(!e.to)throw new o.JsonRpcError(o.RpcErrorCode.INVALID_PARAMS,'wallet_sendCalls requires a "to" field');return{to:String(e.to),data:e.data?String(e.data):void 0,value:e.value?String(e.value):void 0}});return e.withApiError(async()=>(await t.transactionIntentsApi.createTransactionIntent({createTransactionIntentRequest:{account:a.id,policy:s,signedAuthorization:i,chainId:a.chainId,interactions:c}},{headers:n.thirdPartyProvider?{authorization:`Bearer ${t.config.backend.accessToken}`,"x-player-token":n.token,"x-auth-provider":n.thirdPartyProvider,"x-token-type":n.thirdPartyTokenType}:{authorization:`Bearer ${n.token}`,"x-project-key":String(t.config.backend.accessToken)}})).data,{context:"operation"})})(s,p,c,d,E,h).catch(e=>{throw new o.JsonRpcError(o.RpcErrorCode.TRANSACTION_REJECTED,e.message)});if(A.response?.error.reason)throw new o.JsonRpcError(o.RpcErrorCode.TRANSACTION_REJECTED,A.response?.error.reason);if(A?.nextAction?.payload?.signableHash){let t;t=[300,324].includes(c.chainId)||c.implementationType&&[r.AccountType.CALIBUR].includes(c.implementationType)?await i.sign(A.nextAction.payload.signableHash,!1,!1):await i.sign(A.nextAction.payload.signableHash);const n=await e.withApiError(async()=>await p.transactionIntentsApi.signature({id:A.id,signatureRequest:{signature:t}}),{context:"operation"}).catch(e=>{throw new o.JsonRpcError(o.RpcErrorCode.TRANSACTION_REJECTED,e.message)});if(0===n.data.response?.status)throw new o.JsonRpcError(o.RpcErrorCode.TRANSACTION_REJECTED,n.data.response?.error.reason);if(!n.data.response)throw new o.JsonRpcError(o.RpcErrorCode.TRANSACTION_REJECTED,"No transaction response received");return{id:A.id,receipt:a(n.data.response)}}if(!A.response)throw new o.JsonRpcError(o.RpcErrorCode.TRANSACTION_REJECTED,"No transaction response received");return{id:A.id,receipt:a(A.response)}};
1
+ "use strict";var e=require("../../core/errors/withApiError.cjs"),r=require("../../types/types.cjs"),t=require("../../utils/authorization.cjs"),o=require("./JsonRpcError.cjs");const a=e=>{const r=e?.logs?.[0];return{blockHash:r?.blockHash,blockNumber:e?.blockNumber?.toString(),contractAddress:void 0,cumulativeGasUsed:e?.gasUsed,effectiveGasPrice:e?.gasFee,from:void 0,gasUsed:e?.gasUsed,logs:e?.logs||[],logsBloom:void 0,status:1===e?.status?"success":0===e?.status?"reverted":void 0,to:e?.to,transactionHash:e?.transactionHash,transactionIndex:r?.transactionIndex,type:"eip1559",blobGasPrice:void 0,blobGasUsed:void 0,root:void 0}};async function n(e,r){try{const t=await e.getCode(r);return"0x"!==t&&t.length>2}catch{return!1}}exports.sendCallsSync=async({params:s,signer:i,account:c,authentication:d,backendClient:p,rpcProvider:u,feeSponsorshipId:l})=>{const E=s[0]?.capabilities?.paymasterService?.policy??l;let h;if(c.accountType===r.AccountTypeEnum.DELEGATED_ACCOUNT){const[e,r]=await Promise.all([n(u,c.address),u.getTransactionCount(c.address)]);if(!e){const e=await t.prepareAndSignAuthorization({signer:i,accountAddress:c.address,contractAddress:c.implementationAddress,chainId:c.chainId,nonce:r});h=t.serializeSignedAuthorization(e)}}const A=await(async(r,t,a,n,s,i)=>{const c=r.map(e=>{if(!e.to)throw new o.JsonRpcError(o.RpcErrorCode.INVALID_PARAMS,'wallet_sendCalls requires a "to" field');return{to:String(e.to),data:e.data?String(e.data):void 0,value:e.value?String(e.value):void 0}});return e.withApiError(async()=>(await t.transactionIntentsApi.createTransactionIntent({createTransactionIntentRequest:{account:a.id,policy:s,signedAuthorization:i,chainId:a.chainId,interactions:c}},{headers:n.thirdPartyProvider?{authorization:`Bearer ${t.config.backend.accessToken}`,"x-player-token":n.token,"x-auth-provider":n.thirdPartyProvider,"x-token-type":n.thirdPartyTokenType}:{authorization:`Bearer ${n.token}`,"x-project-key":String(t.config.backend.accessToken)}})).data,{context:"operation"})})(s,p,c,d,E,h).catch(e=>{throw new o.JsonRpcError(o.RpcErrorCode.TRANSACTION_REJECTED,e.message)});if(A.response?.error?.reason)throw new o.JsonRpcError(o.RpcErrorCode.TRANSACTION_REJECTED,A.response.error.reason);if(A?.nextAction?.payload?.signableHash){let t;t=[300,324].includes(c.chainId)||c.implementationType&&[r.AccountType.CALIBUR].includes(c.implementationType)?await i.sign(A.nextAction.payload.signableHash,!1,!1):await i.sign(A.nextAction.payload.signableHash);const n=await e.withApiError(async()=>await p.transactionIntentsApi.signature({id:A.id,signatureRequest:{signature:t}}),{context:"operation"}).catch(e=>{throw new o.JsonRpcError(o.RpcErrorCode.TRANSACTION_REJECTED,e.message)});if(0===n.data.response?.status)throw new o.JsonRpcError(o.RpcErrorCode.TRANSACTION_REJECTED,n.data.response?.error?.reason??"");if(!n.data.response)throw new o.JsonRpcError(o.RpcErrorCode.TRANSACTION_REJECTED,"No transaction response received");return{id:A.id,receipt:a(n.data.response)}}if(!A.response)throw new o.JsonRpcError(o.RpcErrorCode.TRANSACTION_REJECTED,"No transaction response received");return{id:A.id,receipt:a(A.response)}};