@crossmint/wallets-sdk 0.16.2 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/client.cjs +1 -1
- package/dist/api/client.js +1 -1
- package/dist/api/index.cjs +1 -1
- package/dist/api/index.js +1 -1
- package/dist/chunk-26IAM7ID.js +3 -0
- package/dist/{chunk-RIZWHXCB.cjs → chunk-2XVV7Z43.cjs} +1 -1
- package/dist/{chunk-OW67X6EC.cjs → chunk-2YH3NVVK.cjs} +1 -1
- package/dist/chunk-5D4EGVG6.cjs +1 -0
- package/dist/{chunk-YDEWMACN.js → chunk-5G6JZ2P4.js} +1 -1
- package/dist/chunk-5QIW67NU.cjs +1 -0
- package/dist/chunk-7QSXW5GQ.js +1 -0
- package/dist/chunk-7QY4M232.cjs +1 -0
- package/dist/chunk-BQZES4ST.js +1 -0
- package/dist/{chunk-OLCZFWKH.cjs → chunk-DUPLYVUD.cjs} +1 -1
- package/dist/chunk-FOSTI2VM.cjs +1 -0
- package/dist/chunk-H3T7K4MG.cjs +3 -0
- package/dist/{chunk-R3JAO27Z.js → chunk-H4T4IXCF.js} +1 -1
- package/dist/{chunk-V22Y23TM.js → chunk-HJ5EDMTA.js} +1 -1
- package/dist/chunk-HPHVJ6BA.cjs +1 -0
- package/dist/chunk-IWSZUMTC.js +1 -0
- package/dist/{chunk-JWMWUVDK.cjs → chunk-JU74KWSY.cjs} +1 -1
- package/dist/chunk-K6PCO4LF.cjs +1 -0
- package/dist/{chunk-6BVOLSQ3.cjs → chunk-KO6QYKDX.cjs} +1 -1
- package/dist/chunk-KRV3IXJU.cjs +1 -0
- package/dist/chunk-O3ESESNR.js +1 -0
- package/dist/chunk-P6JJHAAV.js +1 -0
- package/dist/{chunk-NM7Y5JRD.cjs → chunk-QCWNERNJ.cjs} +1 -1
- package/dist/chunk-T526WFJB.js +1 -0
- package/dist/{chunk-IOGQFRQQ.js → chunk-UNBXKCNN.js} +1 -1
- package/dist/{chunk-EVNUDPPW.js → chunk-UPQJFPD6.js} +1 -1
- package/dist/{chunk-5XRYJ3JS.js → chunk-VY634F3J.js} +1 -1
- package/dist/chunk-WQP2FSVI.js +1 -0
- package/dist/{chunk-HAP32ODU.cjs → chunk-WYYAPI4G.cjs} +1 -1
- package/dist/chunk-ZZ4BKHSP.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/sdk.cjs +1 -1
- package/dist/sdk.js +1 -1
- package/dist/signers/index.cjs +1 -1
- package/dist/signers/index.js +1 -1
- package/dist/signers/non-custodial/index.cjs +1 -1
- package/dist/signers/non-custodial/index.js +1 -1
- package/dist/signers/non-custodial/ncs-evm-signer.cjs +1 -1
- package/dist/signers/non-custodial/ncs-evm-signer.d.cts +4 -0
- package/dist/signers/non-custodial/ncs-evm-signer.d.ts +4 -0
- package/dist/signers/non-custodial/ncs-evm-signer.js +1 -1
- package/dist/signers/non-custodial/ncs-signer.cjs +1 -1
- package/dist/signers/non-custodial/ncs-signer.d.cts +14 -1
- package/dist/signers/non-custodial/ncs-signer.d.ts +14 -1
- package/dist/signers/non-custodial/ncs-signer.js +1 -1
- package/dist/signers/non-custodial/ncs-solana-signer.cjs +1 -1
- package/dist/signers/non-custodial/ncs-solana-signer.d.cts +4 -0
- package/dist/signers/non-custodial/ncs-solana-signer.d.ts +4 -0
- package/dist/signers/non-custodial/ncs-solana-signer.js +1 -1
- package/dist/signers/non-custodial/ncs-stellar-signer.cjs +1 -1
- package/dist/signers/non-custodial/ncs-stellar-signer.d.cts +4 -0
- package/dist/signers/non-custodial/ncs-stellar-signer.d.ts +4 -0
- package/dist/signers/non-custodial/ncs-stellar-signer.js +1 -1
- package/dist/signers/types.cjs +1 -1
- package/dist/signers/types.d.cts +7 -2
- package/dist/signers/types.d.ts +7 -2
- package/dist/signers/types.js +1 -1
- package/dist/utils/constants.cjs +1 -1
- package/dist/utils/constants.js +1 -1
- package/dist/utils/signer-validation.cjs +1 -1
- package/dist/utils/signer-validation.js +1 -1
- package/dist/wallets/evm.cjs +1 -1
- package/dist/wallets/evm.js +1 -1
- package/dist/wallets/solana.cjs +1 -1
- package/dist/wallets/solana.js +1 -1
- package/dist/wallets/stellar.cjs +1 -1
- package/dist/wallets/stellar.js +1 -1
- package/dist/wallets/types.d.cts +1 -0
- package/dist/wallets/types.d.ts +1 -0
- package/dist/wallets/wallet-factory.cjs +1 -1
- package/dist/wallets/wallet-factory.d.cts +1 -0
- package/dist/wallets/wallet-factory.d.ts +1 -0
- package/dist/wallets/wallet-factory.js +1 -1
- package/dist/wallets/wallet.cjs +1 -1
- package/dist/wallets/wallet.d.cts +2 -0
- package/dist/wallets/wallet.d.ts +2 -0
- package/dist/wallets/wallet.js +1 -1
- package/package.json +2 -1
- package/dist/chunk-23BRREJG.cjs +0 -1
- package/dist/chunk-6W3GRV4R.js +0 -1
- package/dist/chunk-BHGNJYYE.js +0 -1
- package/dist/chunk-FFCUFPLT.cjs +0 -1
- package/dist/chunk-GMPSYWQ2.js +0 -1
- package/dist/chunk-GSTYVHP5.cjs +0 -1
- package/dist/chunk-LDV2PXAM.js +0 -1
- package/dist/chunk-M4ELAV7U.js +0 -1
- package/dist/chunk-NYTVCLEC.cjs +0 -1
- package/dist/chunk-OHS5BRYO.js +0 -3
- package/dist/chunk-S2DXLOBL.js +0 -1
- package/dist/chunk-S3JEOTZR.js +0 -1
- package/dist/chunk-UNQMKW7D.cjs +0 -1
- package/dist/chunk-WPSU4D5A.cjs +0 -1
- package/dist/chunk-XKIM42AR.cjs +0 -3
- package/dist/chunk-XKLBVV54.js +0 -1
- package/dist/chunk-ZSWIQU3U.cjs +0 -1
package/dist/api/client.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkJU74KWSYcjs = require('../chunk-JU74KWSY.cjs');require('../chunk-QCWNERNJ.cjs');require('../chunk-O4FVTK7X.cjs');require('../chunk-XALFCQKD.cjs');exports.ApiClient = _chunkJU74KWSYcjs.a;
|
package/dist/api/client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-5G6JZ2P4.js";import"../chunk-ZZ4BKHSP.js";import"../chunk-PSXRNSOE.js";import"../chunk-BW7YYVZE.js";export{a as ApiClient};
|
package/dist/api/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-6HXIZLEQ.cjs');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-6HXIZLEQ.cjs');var _chunkJU74KWSYcjs = require('../chunk-JU74KWSY.cjs');require('../chunk-QCWNERNJ.cjs');require('../chunk-O4FVTK7X.cjs');require('../chunk-ECAM5KTH.cjs');require('../chunk-XALFCQKD.cjs');exports.ApiClient = _chunkJU74KWSYcjs.a;
|
package/dist/api/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunk-5IFDVB4Y.js";import{a}from"../chunk-
|
|
1
|
+
import"../chunk-5IFDVB4Y.js";import{a}from"../chunk-5G6JZ2P4.js";import"../chunk-ZZ4BKHSP.js";import"../chunk-PSXRNSOE.js";import"../chunk-KBJA7JDT.js";import"../chunk-BW7YYVZE.js";export{a as ApiClient};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{a as S}from"./chunk-BQZES4ST.js";import{a as y}from"./chunk-IWSZUMTC.js";import{a as f}from"./chunk-UNBXKCNN.js";import{d as m,f as r}from"./chunk-PSXRNSOE.js";import{a as c,f as d}from"./chunk-BW7YYVZE.js";import{WebAuthnP256 as W}from"ox";var u="When 'delegatedSigners' is provided to a method that may fetch an existing wallet, each specified delegated signer must exist in that wallet's configuration.",w=class{constructor(e){this.apiClient=e}getOrCreateWallet(e){return d(this,null,function*(){if(this.apiClient.isServerSide)throw new r(`getOrCreateWallet can only be called from client-side code.
|
|
2
|
+
- Make sure you're running this in the browser (or another client environment), not on your server.
|
|
3
|
+
- Use your Crossmint Client API Key (not a server key).`);let i=this.getWalletLocator(e),n=yield this.apiClient.getWallet(i);return n!=null&&!("error"in n)?this.createWalletInstance(n,e):this.createWallet(e)})}getWallet(e,i){return d(this,null,function*(){if(!this.apiClient.isServerSide)throw new r("getWallet is not supported on client side, use getOrCreateWallet instead");let n=yield this.apiClient.getWallet(e);if("error"in n)throw new m(JSON.stringify(n));return this.createWalletInstance(n,i)})}createWallet(e){return d(this,null,function*(){var t,a,s,o,l;yield(s=(a=(t=e.options)==null?void 0:t.experimental_callbacks)==null?void 0:a.onWalletCreationStart)==null?void 0:s.call(a),this.mutateSignerFromCustomAuth(e,!0);let i=e.signer.type==="passkey"?yield this.createPasskeyAdminSigner(e.signer):e.signer,n=yield this.apiClient.createWallet({type:"smart",chainType:this.getChainType(e.chain),config:c(c({adminSigner:i},e!=null&&e.plugins?{plugins:e.plugins}:{}),e.delegatedSigners!=null?{delegatedSigners:e.delegatedSigners}:{}),owner:(o=e.owner)!=null?o:void 0,alias:(l=e.alias)!=null?l:void 0});if("error"in n)throw new r(JSON.stringify(n));return this.createWalletInstance(n,e)})}createWalletInstance(e,i){this.validateExistingWalletConfig(e,i);let n=this.toInternalSignerConfig(e,i.signer,i.options);return new y({chain:i.chain,address:e.address,owner:e.owner,signer:f(i.chain,n),options:i.options,alias:i.alias},this.apiClient)}toInternalSignerConfig(e,i,n){var t,a,s,o,l,C;if(!(e.chainType==="evm"||e.chainType==="solana"||e.chainType==="stellar"))throw new r(`Wallet type ${e.chainType} is not supported`);if(i==null&&((t=e.config)==null?void 0:t.adminSigner)==null)throw new r("Signer is required to create a wallet");switch(i.type){case"api-key":{if(((a=e.config)==null?void 0:a.adminSigner.type)!=="api-key")throw new r("API key signer does not match the wallet's signer type");return{type:"api-key",address:e.config.adminSigner.address,locator:e.config.adminSigner.locator}}case"external-wallet":if(((s=e.config)==null?void 0:s.adminSigner.type)!=="external-wallet")throw new r("External wallet signer does not match the wallet's signer type");return c(c({},e.config.adminSigner),i);case"passkey":if(((o=e.config)==null?void 0:o.adminSigner.type)!=="passkey")throw new r("Passkey signer does not match the wallet's signer type");return{type:"passkey",id:e.config.adminSigner.id,name:e.config.adminSigner.name,locator:e.config.adminSigner.locator,onCreatePasskey:i.onCreatePasskey,onSignWithPasskey:i.onSignWithPasskey};case"email":{if(((l=e.config)==null?void 0:l.adminSigner.type)!=="email")throw new r("Email signer does not match the wallet's signer type");let{locator:h,email:g,address:p}=e.config.adminSigner;return{type:"email",email:g,locator:h,address:p,crossmint:this.apiClient.crossmint,onAuthRequired:i.onAuthRequired,clientTEEConnection:n==null?void 0:n.clientTEEConnection}}case"phone":{if(((C=e.config)==null?void 0:C.adminSigner.type)!=="phone")throw new r("Phone signer does not match the wallet's signer type");let{locator:h,phone:g,address:p}=e.config.adminSigner;return{type:"phone",phone:g,locator:h,address:p,crossmint:this.apiClient.crossmint,onAuthRequired:i.onAuthRequired,clientTEEConnection:n==null?void 0:n.clientTEEConnection}}default:throw new Error("Invalid signer type")}}getWalletLocator(e){return`me:${this.getChainType(e.chain)}:smart`+(e.alias!=null?`:alias:${e.alias}`:"")}createPasskeyAdminSigner(e){return d(this,null,function*(){var t;if(e.type!=="passkey")throw new Error("Signer is not a passkey");let i=(t=e.name)!=null?t:`Crossmint Wallet ${Date.now()}`,n=e.onCreatePasskey?yield e.onCreatePasskey(i):yield W.createCredential({name:i});return{type:"passkey",id:n.id,name:i,publicKey:{x:n.publicKey.x.toString(),y:n.publicKey.y.toString()}}})}mutateSignerFromCustomAuth(e,i=!1){var t,a;let{experimental_customAuth:n}=this.apiClient.crossmint;e.signer.type==="email"&&(n==null?void 0:n.email)!=null&&(e.signer.email=(t=e.signer.email)!=null?t:n.email),e.signer.type==="phone"&&(n==null?void 0:n.phone)!=null&&(e.signer.phone=(a=e.signer.phone)!=null?a:n.phone),e.signer.type==="external-wallet"&&(n==null?void 0:n.externalWalletSigner)!=null&&(e.signer=i?{type:"external-wallet",address:n.externalWalletSigner.address}:n.externalWalletSigner)}validateExistingWalletConfig(e,i){var a;if(this.mutateSignerFromCustomAuth(i),i.owner!=null&&e.owner!=null&&i.owner!==e.owner)throw new r("Wallet owner does not match existing wallet's linked user");if(i.chain==="solana"&&e.chainType!=="solana"||i.chain!=="solana"&&e.chainType==="solana"||i.chain==="stellar"&&e.chainType!=="stellar"||i.chain!=="stellar"&&e.chainType==="stellar")throw new r(`Wallet chain does not match existing wallet's chain. You must use chain: ${e.chainType}.`);if(e.type!=="smart")return;let n=i.signer,t=(a=e==null?void 0:e.config)==null?void 0:a.adminSigner;if(n!=null&&t!=null){if(n.type!==t.type)throw new r("The wallet signer type provided in the wallet config does not match the existing wallet's adminSigner type");S(n,t)}i.delegatedSigners!=null&&this.validateDelegatedSigners(e,i.delegatedSigners)}validateDelegatedSigners(e,i){var t;let n=(t=e==null?void 0:e.config)==null?void 0:t.delegatedSigners;if(i.length!==0){if(n==null||n.length===0)throw new r(`${i.length} delegated signer(s) specified, but wallet "${e.address}" has no delegated signers. ${u}`);for(let a of i)if(n.find(o=>o.locator===a.signer)==null){let o=n.map(l=>l.locator).join(", ");throw new r(`Delegated signer '${a.signer}' does not exist in wallet "${e.address}". Available delegated signers: ${o}. ${u}`)}}}getChainType(e){return e==="solana"?"solana":e==="stellar"?"stellar":"evm"}};export{w as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk2YH3NVVKcjs = require('./chunk-2YH3NVVK.cjs');var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var s=class a extends _chunk2YH3NVVKcjs.a{constructor(n){super(n)}signMessage(){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return yield Promise.reject(new Error("signMessage method not implemented for stellar signer"))})}signTransaction(n){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var r;yield this.handleAuthRequired();let g=this.getJwtOrThrow(),e=yield(r=this.config.clientTEEConnection)==null?void 0:r.sendAction({event:"request:sign",responseEvent:"response:sign",data:{authData:{jwt:g,apiKey:this.config.crossmint.apiKey},data:{keyType:"ed25519",bytes:n,encoding:"base64"}},options:_chunk2YH3NVVKcjs.b});if((e==null?void 0:e.status)==="error")throw new Error(e.error);if((e==null?void 0:e.signature)==null)throw new Error("Failed to sign transaction");if(a.verifyPublicKeyFormat(e.publicKey),e.signature.encoding!=="base64")throw new Error("Wrong encoding for signature. Expected base64, got "+e.signature.encoding);return{signature:e.signature.bytes}})}static verifyPublicKeyFormat(n){if(n==null)throw new Error("No public key found");if(n.encoding!=="base64"||n.keyType!=="ed25519"||n.bytes==null)throw new Error("Not supported. Expected public key to be in base64 encoding and ed25519 key type. Got: "+JSON.stringify(n))}getChainKeyParams(){return{scheme:"ed25519",encoding:"strkey"}}};exports.a = s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkMQP5VZCAcjs = require('./chunk-MQP5VZCA.cjs');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkMQP5VZCAcjs = require('./chunk-MQP5VZCA.cjs');var _chunk5QIW67NUcjs = require('./chunk-5QIW67NU.cjs');var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var _commonsdkbase = require('@crossmint/common-sdk-base');var E=class{constructor(e){this.config=e;this._needsAuth=!0;this._authPromise=null;this._initializationPromise=null;this.initialize(),this.type=this.config.type}locator(){return this.config.locator}address(){return this.config.address}initialize(){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){if(this.config.clientTEEConnection==null){let e=_commonsdkbase.validateAPIKey.call(void 0, this.config.crossmint.apiKey);if(!e.isValid)throw new Error("Invalid API key");let t=new (0, _chunkMQP5VZCAcjs.a)({environment:e.environment});this.config.clientTEEConnection=yield t.initialize()}})}getTEEConnection(){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){if(this.config.clientTEEConnection==null){if(this._initializationPromise)return yield this._initializationPromise,this.config.clientTEEConnection;this._initializationPromise=this.initializeTEEConnection();try{yield this._initializationPromise}finally{this._initializationPromise=null}}return this.config.clientTEEConnection})}initializeTEEConnection(){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){console.warn("TEE connection is not initialized, initializing now...");let e=_commonsdkbase.validateAPIKey.call(void 0, this.config.crossmint.apiKey);if(!e.isValid)throw new Error("Invalid API key");let t=new (0, _chunkMQP5VZCAcjs.a)({environment:e.environment});if(this.config.clientTEEConnection=yield t.initialize(),this.config.clientTEEConnection==null)throw new Error("Failed to initialize TEE connection");console.log("TEE connection initialized successfully")})}handleAuthRequired(){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var c,h;let e=yield this.getTEEConnection();if(this.config.onAuthRequired==null)throw new Error(`${this.type} signer requires the onAuthRequired callback to handle OTP verification. This callback manages the authentication flow (sending OTP and verifying user input). If using our React/React Native SDK, this is handled automatically by the provider. For other environments, implement: onAuthRequired: (needsAuth, sendEmailWithOtp, verifyOtp, reject) => { /* your UI logic */ }`);let t=yield e.sendAction({event:"request:get-status",responseEvent:"response:get-status",data:{authData:{jwt:(h=(c=this.config.crossmint.experimental_customAuth)==null?void 0:c.jwt)!=null?h:"",apiKey:this.config.crossmint.apiKey}},options:_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {},g),{maxRetries:5})});if((t==null?void 0:t.status)!=="success")throw new Error(t==null?void 0:t.error);if(t.signerStatus==="ready"){this._needsAuth=!1;return}else this._needsAuth=!0;let{promise:i,resolve:o,reject:n}=this.createAuthPromise();if(this._authPromise={promise:i,resolve:o,reject:n},this.config.onAuthRequired)try{yield this.config.onAuthRequired(this._needsAuth,()=>this.sendMessageWithOtp(),r=>this.verifyOtp(r),()=>_chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){this._needsAuth=!1,this.config.onAuthRequired!=null&&(yield this.config.onAuthRequired(this._needsAuth,()=>this.sendMessageWithOtp(),r=>this.verifyOtp(r),()=>{var r;return(r=this._authPromise)==null?void 0:r.reject(new _chunk5QIW67NUcjs.a)})),n(new _chunk5QIW67NUcjs.a)}))}catch(r){n(r)}try{yield i}catch(r){throw r}})}ensureAuthenticated(){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){yield this.handleAuthRequired()})}getJwtOrThrow(){var t;let e=(t=this.config.crossmint.experimental_customAuth)==null?void 0:t.jwt;if(e==null)throw new Error("JWT is required");return e}createAuthPromise(){let e,t;return{promise:new Promise((o,n)=>{e=o,t=n}),resolve:e,reject:t}}sendMessageWithOtp(){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var o,n,c;let e=yield this.getTEEConnection(),t=this.getAuthId(),i=yield e.sendAction({event:"request:start-onboarding",responseEvent:"response:start-onboarding",data:{authData:{jwt:(n=(o=this.config.crossmint.experimental_customAuth)==null?void 0:o.jwt)!=null?n:"",apiKey:this.config.crossmint.apiKey},data:{authId:t}},options:_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {},g),{maxRetries:3})});if((i==null?void 0:i.status)==="success"&&i.signerStatus==="ready"){this._needsAuth=!1;return}(i==null?void 0:i.status)==="error"&&(console.error("[sendMessageWithOtp] Failed to send OTP:",i),(c=this._authPromise)==null||c.reject(new Error(i.error||"Failed to initiate OTP process.")))})}getAuthId(){return this.config.type==="email"?`email:${this.config.email}`:`phone:${this.config.phone}`}verifyOtp(e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var n,c,h,r,p;let t;try{t=yield(yield this.getTEEConnection()).sendAction({event:"request:complete-onboarding",responseEvent:"response:complete-onboarding",data:{authData:{jwt:(c=(n=this.config.crossmint.experimental_customAuth)==null?void 0:n.jwt)!=null?c:"",apiKey:this.config.crossmint.apiKey},data:{onboardingAuthentication:{encryptedOtp:e}}},options:_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {},g),{maxRetries:3})})}catch(a){throw console.error("[verifyOtp] Error sending OTP validation request:",a),this._needsAuth=!0,(h=this._authPromise)==null||h.reject(a),a}if((t==null?void 0:t.status)==="success"){this._needsAuth=!1,this.config.onAuthRequired!=null&&(yield this.config.onAuthRequired(this._needsAuth,()=>this.sendMessageWithOtp(),a=>this.verifyOtp(a),()=>{var a;return(a=this._authPromise)==null?void 0:a.reject(new _chunk5QIW67NUcjs.a)})),(r=this._authPromise)==null||r.resolve();return}console.error("[verifyOtp] Failed to validate OTP:",t),this._needsAuth=!0;let i=(t==null?void 0:t.status)==="error"?t.error:"Failed to validate encrypted OTP",o=new Error(i);throw(p=this._authPromise)==null||p.reject(o),o})}_exportPrivateKey(e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){yield this.handleAuthRequired();let t=this.getJwtOrThrow(),{scheme:i,encoding:o}=this.getChainKeyParams(),n=yield e.sendAction({event:"request:export-signer",responseEvent:"response:export-signer",data:{authData:{jwt:t,apiKey:this.config.crossmint.apiKey},data:{scheme:i,encoding:o}},options:g});if((n==null?void 0:n.status)==="error")throw new Error(n.error||"Failed to export private key")})}},g= exports.b ={timeoutMs:1e4,intervalMs:5e3};exports.a = E; exports.b = g;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk2YH3NVVKcjs = require('./chunk-2YH3NVVK.cjs');var _chunkQCWNERNJcjs = require('./chunk-QCWNERNJ.cjs');var _chunkO4FVTK7Xcjs = require('./chunk-O4FVTK7X.cjs');var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var _commonsdkbase = require('@crossmint/common-sdk-base');var T,c,H= exports.a =class{constructor(e,t){_chunkXALFCQKDcjs.d.call(void 0, this,T);_chunkXALFCQKDcjs.d.call(void 0, this,c);let{chain:r,address:n,owner:s,signer:h,options:g,alias:i}=e;_chunkXALFCQKDcjs.e.call(void 0, this,c,t),this.chain=r,this.address=n,this.owner=s,this.signer=h,_chunkXALFCQKDcjs.e.call(void 0, this,T,g),this.alias=i}static getApiClient(e){return e.apiClient}static getOptions(e){return e.options}get apiClient(){return _chunkXALFCQKDcjs.c.call(void 0, this,c)}get options(){return _chunkXALFCQKDcjs.c.call(void 0, this,T)}experimental_apiClient(){return _chunkXALFCQKDcjs.c.call(void 0, this,c)}balances(e,t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){let r;switch(this.chain){case"solana":r="sol";break;case"stellar":r="xlm";break;default:r="eth";break}let n=[r,"usdc",...e!=null?e:[]],s=yield _chunkXALFCQKDcjs.c.call(void 0, this,c).getBalance(this.address,{chains:t!=null?t:[this.chain],tokens:n});if("error"in s)throw new Error(`Failed to get balances for wallet: ${JSON.stringify(s.message)}`);return this.transformBalanceResponse(s,r,e)})}transformBalanceResponse(e,t,r){let n=a=>{var m,w,v,y,S;let o=(m=a.chains)==null?void 0:m[this.chain],p={};return this.chain==="solana"&&o!=null&&"mintHash"in o?p={mintHash:o.mintHash}:this.chain==="stellar"&&o!=null&&"contractId"in o?p={contractId:o.contractId}:o!=null&&"contractAddress"in o&&(p={contractAddress:o.contractAddress}),_chunkXALFCQKDcjs.a.call(void 0, {symbol:(w=a.symbol)!=null?w:"",name:(v=a.name)!=null?v:"",amount:(y=a.amount)!=null?y:"0",decimals:a.decimals,rawAmount:(S=a.rawAmount)!=null?S:"0"},p)},s=e.find(a=>a.symbol===t),h=e.find(a=>a.symbol==="usdc"),g=e.filter(a=>a.symbol!==t&&a.symbol!=="usdc"),i=a=>{let o={symbol:a,name:a,amount:"0",decimals:0,rawAmount:"0"},p={};return this.chain==="solana"?p={mintHash:void 0}:this.chain==="stellar"?p={contractId:void 0}:p={contractAddress:void 0},_chunkXALFCQKDcjs.a.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {},o),p)};return{nativeToken:s!=null?n(s):i(t),usdc:h!=null?n(h):i("usdc"),tokens:g.map(n)}}experimental_nfts(e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return yield _chunkXALFCQKDcjs.c.call(void 0, this,c).experimental_getNfts(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {},e),{chain:this.chain,address:this.address}))})}experimental_transactions(){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){let e=yield _chunkXALFCQKDcjs.c.call(void 0, this,c).getTransactions(this.walletLocator);if("error"in e)throw new Error(`Failed to get transactions: ${JSON.stringify(e.message)}`);return e})}experimental_transaction(e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){let t=yield _chunkXALFCQKDcjs.c.call(void 0, this,c).getTransaction(this.walletLocator,e);if("error"in t)throw new Error(`Failed to get transaction: ${JSON.stringify(t.error)}`);return t})}experimental_activity(){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){let e=yield this.apiClient.experimental_activity(this.walletLocator,{chain:this.chain});if("error"in e)throw new Error(`Failed to get activity: ${JSON.stringify(e.message)}`);return e})}send(e,t,r,n){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){yield this.preAuthIfNeeded();let s=D(e),h=M(t,this.chain),g=_chunkXALFCQKDcjs.a.call(void 0, {recipient:s,amount:r},(n==null?void 0:n.experimental_signer)!=null?{signer:n.experimental_signer}:{}),i=yield _chunkXALFCQKDcjs.c.call(void 0, this,c).send(this.walletLocator,h,g);if("message"in i)throw new (0, _chunkO4FVTK7Xcjs.r)(`Failed to send token: ${JSON.stringify(i.message)}`);return n!=null&&n.experimental_prepareOnly?{hash:void 0,explorerLink:void 0,transactionId:i.id}:yield this.approveTransactionAndWait(i.id)})}approveTransaction(e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return console.warn("approveTransaction is deprecated. Use approve instead. This method will be removed in the next major version."),yield this.approve(e)})}approve(e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){if(e.transactionId!=null)return yield this.approveTransactionAndWait(e.transactionId,e.options);if(e.signatureId!=null)return yield this.approveSignatureAndWait(e.signatureId,e.options);throw new Error("Either transactionId or signatureId must be provided")})}addDelegatedSigner(e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var n,s,h;let t=yield _chunkXALFCQKDcjs.c.call(void 0, this,c).registerSigner(this.walletLocator,{signer:e.signer,chain:this.chain==="solana"||this.chain==="stellar"?void 0:this.chain});if("error"in t)throw new Error(`Failed to register signer: ${JSON.stringify(t.message)}`);if(this.chain==="solana"||this.chain==="stellar"){if(!("transaction"in t)||t.transaction==null)throw new Error("Expected transaction in response for Solana/Stellar chain");let g=t.transaction.id;if((n=e.options)!=null&&n.experimental_prepareOnly)return{transactionId:g};yield this.approveTransactionAndWait(g);return}if(!("chains"in t))throw new Error("Expected chains in response for EVM chain");let r=(s=t.chains)==null?void 0:s[this.chain];if((h=e.options)!=null&&h.experimental_prepareOnly)return{signatureId:(r==null?void 0:r.status)!=="success"?r==null?void 0:r.id:void 0};if((r==null?void 0:r.status)==="awaiting-approval"){yield this.approveSignatureAndWait(r.id);return}if((r==null?void 0:r.status)==="pending"){yield this.waitForSignature(r.id);return}})}delegatedSigners(){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var t,r,n;let e=yield _chunkXALFCQKDcjs.c.call(void 0, this,c).getWallet(this.walletLocator);if("error"in e)throw new (0, _chunkO4FVTK7Xcjs.d)(JSON.stringify(e));if(e.type!=="smart"||e.chainType!=="evm"&&e.chainType!=="solana"&&e.chainType!=="stellar")throw new (0, _chunkO4FVTK7Xcjs.c)(`Wallet type ${e.type} not supported`);return(n=(r=(t=e==null?void 0:e.config)==null?void 0:t.delegatedSigners)==null?void 0:r.map(s=>{let h=s.locator.indexOf(":");return{signer:`external-wallet:${h>=0?s.locator.slice(h+1):s.locator}`}}))!=null?n:[]})}get walletLocator(){if(_chunkXALFCQKDcjs.c.call(void 0, this,c).isServerSide)return this.address;{let e;switch(this.chain){case"stellar":e="me:stellar:smart";break;case"solana":e="me:solana:smart";break;default:e="me:evm:smart";break}let t=this.alias!=null?`:alias:${this.alias}`:"";return e+t}}preAuthIfNeeded(){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){this.signer instanceof _chunk2YH3NVVKcjs.a&&(yield this.signer.ensureAuthenticated())})}get isSolanaWallet(){return this.chain==="solana"}approveTransactionAndWait(e,t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return yield this.approveTransactionInternal(e,t),yield this.sleep(1e3),yield this.waitForTransaction(e)})}approveSignatureAndWait(e,t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){let r=yield this.approveSignatureInternal(e,t);return!("error"in r)&&r.status==="success"&&r.outputSignature!=null?{signature:r.outputSignature,signatureId:e}:(yield this.sleep(1e3),yield this.waitForSignature(e))})}approveSignatureInternal(e,t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var i,a;if(this.isSolanaWallet)throw new Error("Approving signatures is only supported for EVM smart wallets");let r=yield _chunkXALFCQKDcjs.c.call(void 0, this,c).getSignature(this.walletLocator,e);if("error"in r)throw new (0, _chunkO4FVTK7Xcjs.p)(JSON.stringify(r));if(this.signer.type==="api-key")return r;if((t==null?void 0:t.experimental_approval)!=null){let o=[t.experimental_approval];return yield this.executeApproveSignatureWithErrorHandling(e,o)}let n=(i=r.approvals)==null?void 0:i.pending;if(n==null)return r;let s=[...(a=t==null?void 0:t.additionalSigners)!=null?a:[],this.signer],g=(yield Promise.all(n.map(o=>{let p=s.find(m=>m.locator()===o.signer.locator);if(p==null)throw new (0, _chunkO4FVTK7Xcjs.i)(`Signer ${o.signer} not found in pending approvals`);return p.signMessage(o.message)}))).map(o=>_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {},o),{signer:this.signer.locator()}));return yield this.executeApproveSignatureWithErrorHandling(e,g)})}approveTransactionInternal(e,t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var i,a,o,p,m;let r=yield _chunkXALFCQKDcjs.c.call(void 0, this,c).getTransaction(this.walletLocator,e);if("error"in r)throw new (0, _chunkO4FVTK7Xcjs.s)(JSON.stringify(r));if(yield(o=(a=(i=_chunkXALFCQKDcjs.c.call(void 0, this,T))==null?void 0:i.experimental_callbacks)==null?void 0:a.onTransactionStart)==null?void 0:o.call(a),this.signer.type==="api-key")return r;if((t==null?void 0:t.experimental_approval)!=null){let w=[t.experimental_approval];return yield this.executeApproveTransactionWithErrorHandling(e,w)}let n=(p=r.approvals)==null?void 0:p.pending;if(n==null)return r;let s=[...(m=t==null?void 0:t.additionalSigners)!=null?m:[],this.signer],g=(yield Promise.all(n.map(w=>{let v=s.find(S=>S.locator()===w.signer.locator);if(v==null)throw new (0, _chunkO4FVTK7Xcjs.i)(`Signer ${w.signer} not found in pending approvals`);let y=r.chainType==="solana"&&"transaction"in r.onChain?r.onChain.transaction:w.message;return v.signTransaction(y)}))).map(w=>_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {},w),{signer:this.signer.locator()}));return yield this.executeApproveTransactionWithErrorHandling(e,g)})}executeApproveTransactionWithErrorHandling(e,t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){let r=yield _chunkXALFCQKDcjs.c.call(void 0, this,c).approveTransaction(this.walletLocator,e,{approvals:t});if(r.error)throw new (0, _chunkO4FVTK7Xcjs.x)(JSON.stringify(r));return r})}executeApproveSignatureWithErrorHandling(e,t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){let r=yield _chunkXALFCQKDcjs.c.call(void 0, this,c).approveSignature(this.walletLocator,e,{approvals:t});if(r.error)throw new (0, _chunkO4FVTK7Xcjs.q)(JSON.stringify(r));return r})}waitForSignature(e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){let t=null;do if(yield new Promise(r=>setTimeout(r,_chunkQCWNERNJcjs.d)),t=yield _chunkXALFCQKDcjs.c.call(void 0, this,c).getSignature(this.walletLocator,e),"error"in t)throw new (0, _chunkO4FVTK7Xcjs.p)(JSON.stringify(t));while(t===null||t.status==="pending");if(t.status==="failed")throw new (0, _chunkO4FVTK7Xcjs.m)("Signature signing failed");if(!t.outputSignature)throw new (0, _chunkO4FVTK7Xcjs.p)("Signature not available");return{signature:t.outputSignature,signatureId:e}})}waitForTransaction(h){return _chunkXALFCQKDcjs.f.call(void 0, this,arguments,function*(e,t=6e4,{backoffMultiplier:r=1.1,maxBackoffMs:n=2e3,initialBackoffMs:s=_chunkQCWNERNJcjs.d}={}){var o;let g=Date.now(),i;do{if(Date.now()-g>t)throw new (0, _chunkO4FVTK7Xcjs.t)("Transaction confirmation timeout");if(i=yield _chunkXALFCQKDcjs.c.call(void 0, this,c).getTransaction(this.walletLocator,e),i.error)throw new (0, _chunkO4FVTK7Xcjs.s)(JSON.stringify(i));yield this.sleep(s),s=Math.min(s*r,n)}while(i.status==="pending");if(i.status==="failed")throw new (0, _chunkO4FVTK7Xcjs.u)(`Transaction sending failed: ${JSON.stringify(i.error)}`);if(i.status==="awaiting-approval")throw new (0, _chunkO4FVTK7Xcjs.v)("Transaction is awaiting approval. Please submit required approvals before waiting for completion.");let a=i.onChain.txId;if(a==null)throw new (0, _chunkO4FVTK7Xcjs.w)("Transaction hash not found on transaction response");return{hash:a,explorerLink:(o=i.onChain.explorerLink)!=null?o:"",transactionId:i.id}})}sleep(e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return new Promise(t=>setTimeout(t,e))})}};T=new WeakMap,c=new WeakMap;function D(d){if(typeof d=="string")return d;if("email"in d)return`email:${d.email}`;if("x"in d)return`x:${d.x}`;if("twitter"in d)return`twitter:${d.twitter}`;if("phone"in d)return`phoneNumber:${d.phone}`;if("userId"in d)return`userId:${d.userId}`;throw new Error("Invalid recipient locator")}function M(d,e){return _commonsdkbase.isValidAddress.call(void 0, d)?`${e}:${d}`:`${e}:${d.toLowerCase()}`}exports.a = H;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as n,c as i}from"./chunk-
|
|
1
|
+
import{b as n,c as i}from"./chunk-ZZ4BKHSP.js";import{a as o}from"./chunk-PSXRNSOE.js";import{f as r}from"./chunk-BW7YYVZE.js";import{APIKeyUsageOrigin as c,CrossmintApiClient as h}from"@crossmint/common-sdk-base";var p=class extends h{constructor(e){super(e,{internalConfig:{sdkMetadata:{name:i,version:n}}});this.apiPrefix="api/2025-06-09/wallets";this.legacyApiPrefix="api/2022-06-09/wallets"}createWallet(e){return r(this,null,function*(){let s=this.isServerSide?`${this.apiPrefix}`:`${this.apiPrefix}/me`;return(yield this.post(s,{body:JSON.stringify(e),headers:this.headers})).json()})}getWallet(e){return r(this,null,function*(){return(yield this.get(`${this.apiPrefix}/${e}`,{headers:this.headers})).json()})}createTransaction(e,s){return r(this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/transactions`,{body:JSON.stringify(s),headers:this.headers})).json()})}approveTransaction(e,s,t){return r(this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/transactions/${s}/approvals`,{body:JSON.stringify(t),headers:this.headers})).json()})}getTransaction(e,s){return r(this,null,function*(){return(yield this.get(`${this.apiPrefix}/${e}/transactions/${s}`,{headers:this.headers})).json()})}createSignature(e,s){return r(this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/signatures`,{body:JSON.stringify(s),headers:this.headers})).json()})}approveSignature(e,s,t){return r(this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/signatures/${s}/approvals`,{body:JSON.stringify(t),headers:this.headers})).json()})}getSignature(e,s){return r(this,null,function*(){return(yield this.get(`${this.apiPrefix}/${e}/signatures/${s}`,{headers:this.headers})).json()})}getTransactions(e){return r(this,null,function*(){return(yield this.get(`${this.apiPrefix}/${e}/transactions`,{headers:this.headers})).json()})}experimental_getNfts(e){return r(this,null,function*(){let s=new URLSearchParams;s.append("page",e.page.toString()),s.append("perPage",e.perPage.toString());let t=`${e.chain}:${e.address}`;return(yield this.get(`${this.apiPrefix}/${t}/nfts?${s.toString()}`,{headers:this.headers})).json()})}experimental_activity(e,s){return r(this,null,function*(){let t=e;this.isServerSide||(t=`me:${s.chain==="solana"?"solana-smart-wallet":"evm-smart-wallet"}`);let a=new URLSearchParams;return a.append("chain",s.chain.toString()),(yield this.get(`${this.legacyApiPrefix}/${t}/activity?${a.toString()}`,{headers:this.headers})).json()})}getBalance(e,s){return r(this,null,function*(){let t=new URLSearchParams;return t.append("tokens",s.tokens.join(",")),t.append("chains",s.chains.join(",")),(yield this.get(`${this.apiPrefix}/${e}/balances?${t.toString()}`,{headers:this.headers})).json()})}registerSigner(e,s){return r(this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/signers`,{body:JSON.stringify(s),headers:this.headers})).json()})}getSigner(e,s){return r(this,null,function*(){return(yield this.get(`${this.apiPrefix}/${e}/signers/${s}`,{headers:this.headers})).json()})}send(e,s,t){return r(this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/tokens/${s}/transfers`,{body:JSON.stringify(t),headers:this.headers})).json()})}get isServerSide(){return this.parsedAPIKey.usageOrigin===c.SERVER}get environment(){if(!this.parsedAPIKey.isValid)throw new o("Invalid API key");return this.parsedAPIKey.environment}get headers(){return{"Content-Type":"application/json"}}};export{p as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var n=class extends Error{constructor(){super("Authentication was rejected by the user"),this.name="AuthRejectedError"}};function t(e){return e._exportPrivateKey!==void 0}exports.a = n; exports.b = t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as c}from"./chunk-IWSZUMTC.js";import{k as p,o as d,r as y}from"./chunk-PSXRNSOE.js";import{a as f}from"./chunk-RJZV72YF.js";import{f as s}from"./chunk-BW7YYVZE.js";import{createPublicClient as S,encodeFunctionData as I,http as x}from"viem";import{isValidEvmAddress as E}from"@crossmint/common-sdk-base";var m=class w extends c{constructor(t){super({chain:t.chain,address:t.address,owner:t.owner,signer:t.signer,options:c.getOptions(t),alias:t.alias},c.getApiClient(t))}static from(t){if(!E(t.address))throw new Error("Wallet is not an EVM wallet");return new w(t)}sendTransaction(t){return s(this,null,function*(){var i;yield this.preAuthIfNeeded();let e=this.buildTransaction(t),n=yield this.createTransaction(e,t.options);return(i=t.options)!=null&&i.experimental_prepareOnly?{hash:void 0,explorerLink:void 0,transactionId:n.id}:yield this.approveTransactionAndWait(n.id)})}signMessage(t){return s(this,null,function*(){var n;yield this.preAuthIfNeeded();let e=yield this.apiClient.createSignature(this.walletLocator,{type:"message",params:{message:t.message,signer:this.signer.locator(),chain:this.chain}});if("error"in e)throw new d(JSON.stringify(e));return(n=t.options)!=null&&n.experimental_prepareOnly?{signature:void 0,signatureId:e.id}:yield this.approveSignatureAndWait(e.id)})}signTypedData(t){return s(this,null,function*(){var T;yield this.preAuthIfNeeded();let{domain:e,message:n,primaryType:i,types:a,chain:r}=t;if(!e||!n||!a||!r)throw new p("Invalid typed data");let{name:u,version:l,chainId:h,verifyingContract:g,salt:C}=e;if(!u||!l||!h||!g)throw new p("Invalid typed data domain");let o=yield this.apiClient.createSignature(this.walletLocator,{type:"typed-data",params:{typedData:{domain:{name:u,version:l,chainId:Number(h),verifyingContract:g,salt:C},message:n,primaryType:i,types:a},signer:this.signer.locator(),chain:r}});if("error"in o)throw new d(JSON.stringify(o));return(T=t.options)!=null&&T.experimental_prepareOnly?{signature:void 0,signatureId:o.id}:yield this.approveSignatureAndWait(o.id)})}getViemClient(t){var e;return S({transport:(e=t==null?void 0:t.transport)!=null?e:x(),chain:f(this.chain)})}createTransaction(t,e){return s(this,null,function*(){var a;let n=(a=e==null?void 0:e.experimental_signer)!=null?a:this.signer.locator(),i=yield this.apiClient.createTransaction(this.walletLocator,{params:{signer:n,chain:this.chain,calls:[t]}});if("error"in i)throw new y(JSON.stringify(i));return i})}buildTransaction(t){var e,n,i,a,r;if("transaction"in t)return{transaction:t.transaction};if(t.abi==null)return{to:t.to,value:(n=(e=t.value)==null?void 0:e.toString())!=null?n:"0",data:(i=t.data)!=null?i:"0x"};if(!t.functionName)throw new Error("Function name is required");return{to:t.to,value:(r=(a=t.value)==null?void 0:a.toString())!=null?r:"0",data:I({abi:t.abi,functionName:t.functionName,args:t.args})}}};export{m as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk5D4EGVG6cjs = require('./chunk-5D4EGVG6.cjs');var _chunkO4FVTK7Xcjs = require('./chunk-O4FVTK7X.cjs');var _chunkWZFHEUWTcjs = require('./chunk-WZFHEUWT.cjs');var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var _viem = require('viem');var _commonsdkbase = require('@crossmint/common-sdk-base');var m=class w extends _chunk5D4EGVG6cjs.a{constructor(t){super({chain:t.chain,address:t.address,owner:t.owner,signer:t.signer,options:_chunk5D4EGVG6cjs.a.getOptions(t),alias:t.alias},_chunk5D4EGVG6cjs.a.getApiClient(t))}static from(t){if(!_commonsdkbase.isValidEvmAddress.call(void 0, t.address))throw new Error("Wallet is not an EVM wallet");return new w(t)}sendTransaction(t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var i;yield this.preAuthIfNeeded();let e=this.buildTransaction(t),n=yield this.createTransaction(e,t.options);return(i=t.options)!=null&&i.experimental_prepareOnly?{hash:void 0,explorerLink:void 0,transactionId:n.id}:yield this.approveTransactionAndWait(n.id)})}signMessage(t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var n;yield this.preAuthIfNeeded();let e=yield this.apiClient.createSignature(this.walletLocator,{type:"message",params:{message:t.message,signer:this.signer.locator(),chain:this.chain}});if("error"in e)throw new (0, _chunkO4FVTK7Xcjs.o)(JSON.stringify(e));return(n=t.options)!=null&&n.experimental_prepareOnly?{signature:void 0,signatureId:e.id}:yield this.approveSignatureAndWait(e.id)})}signTypedData(t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var T;yield this.preAuthIfNeeded();let{domain:e,message:n,primaryType:i,types:a,chain:r}=t;if(!e||!n||!a||!r)throw new (0, _chunkO4FVTK7Xcjs.k)("Invalid typed data");let{name:u,version:l,chainId:h,verifyingContract:g,salt:C}=e;if(!u||!l||!h||!g)throw new (0, _chunkO4FVTK7Xcjs.k)("Invalid typed data domain");let o=yield this.apiClient.createSignature(this.walletLocator,{type:"typed-data",params:{typedData:{domain:{name:u,version:l,chainId:Number(h),verifyingContract:g,salt:C},message:n,primaryType:i,types:a},signer:this.signer.locator(),chain:r}});if("error"in o)throw new (0, _chunkO4FVTK7Xcjs.o)(JSON.stringify(o));return(T=t.options)!=null&&T.experimental_prepareOnly?{signature:void 0,signatureId:o.id}:yield this.approveSignatureAndWait(o.id)})}getViemClient(t){var e;return _viem.createPublicClient.call(void 0, {transport:(e=t==null?void 0:t.transport)!=null?e:_viem.http.call(void 0, ),chain:_chunkWZFHEUWTcjs.a.call(void 0, this.chain)})}createTransaction(t,e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var a;let n=(a=e==null?void 0:e.experimental_signer)!=null?a:this.signer.locator(),i=yield this.apiClient.createTransaction(this.walletLocator,{params:{signer:n,chain:this.chain,calls:[t]}});if("error"in i)throw new (0, _chunkO4FVTK7Xcjs.r)(JSON.stringify(i));return i})}buildTransaction(t){var e,n,i,a,r;if("transaction"in t)return{transaction:t.transaction};if(t.abi==null)return{to:t.to,value:(n=(e=t.value)==null?void 0:e.toString())!=null?n:"0",data:(i=t.data)!=null?i:"0x"};if(!t.functionName)throw new Error("Function name is required");return{to:t.to,value:(r=(a=t.value)==null?void 0:a.toString())!=null?r:"0",data:_viem.encodeFunctionData.call(void 0, {abi:t.abi,functionName:t.functionName,args:t.args})}}};exports.a = m;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as l}from"./chunk-PSXRNSOE.js";import{isEmailValid as c}from"@crossmint/common-sdk-auth";var m=(n,r,o)=>`Wallet signer configuration mismatch at "${n}" - expected "${o}" from existing wallet but found "${r}"`;function u(n){let o=n.toLowerCase().split("@"),t=o[1],s=t==="googlemail.com",i=(s||t==="gmail.com")&&o[0].includes(".");return s&&(o[1]="gmail.com"),i&&(o[0]=o[0].replace(/\./g,"")),`${o[0]}@${o[1]}`}function a(n){return typeof n=="string"&&c(n)?u(n):n}function f(n,r,o=""){if(n!==r){if(n==null||r==null)throw new Error(`Cannot compare null or undefined signer configs at path: ${o}`);for(let t of Object.keys(n)){if(!(t in r))continue;let s=o?`${o}.${t}`:t,e=n[t],i=r[t];if(typeof e=="object"&&e!==null&&typeof i=="object"&&i!==null)f(e,i,s);else if(a(e)!==a(i))throw new l(m(s,e,i))}}}export{f as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkH3T7K4MGcjs = require('./chunk-H3T7K4MG.cjs');var _chunkJU74KWSYcjs = require('./chunk-JU74KWSY.cjs');var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var _commonsdkbase = require('@crossmint/common-sdk-base');var i=class o{constructor(t){let r=new (0, _chunkJU74KWSYcjs.a)(t);this.walletFactory=new (0, _chunkH3T7K4MGcjs.a)(r)}static from(t){return new o(t)}getOrCreateWallet(t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return yield this.walletFactory.getOrCreateWallet(t)})}getWallet(t,r){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return yield this.walletFactory.getWallet(t,r)})}createWallet(t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return yield this.walletFactory.createWallet(t)})}};exports.a = _commonsdkbase.createCrossmint; exports.b = i;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk5D4EGVG6cjs = require('./chunk-5D4EGVG6.cjs');var _chunkO4FVTK7Xcjs = require('./chunk-O4FVTK7X.cjs');var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var _commonsdkbase = require('@crossmint/common-sdk-base');var d=class u extends _chunk5D4EGVG6cjs.a{constructor(n){super({chain:n.chain,address:n.address,owner:n.owner,signer:n.signer,options:_chunk5D4EGVG6cjs.a.getOptions(n),alias:n.alias},_chunk5D4EGVG6cjs.a.getApiClient(n))}static from(n){if(!_commonsdkbase.isValidStellarAddress.call(void 0, n.address))throw new Error("Wallet is not a Stellar wallet");return new u(n)}sendTransaction(n){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var r;yield this.preAuthIfNeeded();let t=yield this.createTransaction(n);if((r=n.options)!=null&&r.experimental_prepareOnly)return{hash:void 0,explorerLink:void 0,transactionId:t.id};let e={};return yield this.approveTransactionAndWait(t.id,e)})}createTransaction(n){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var c;let{contractId:t,options:e}=n,r=(c=e==null?void 0:e.experimental_signer)!=null?c:this.signer.locator(),i;if("transaction"in n)i={type:"serialized-transaction",serializedTransaction:n.transaction,contractId:t};else{let{method:h,memo:p,args:T}=n;i={type:"contract-call",contractId:t,method:h,memo:p!=null?{type:"text",value:p}:void 0,args:T}}let s=yield this.apiClient.createTransaction(this.walletLocator,{params:{transaction:i,signer:r}});if("error"in s)throw new (0, _chunkO4FVTK7Xcjs.r)(JSON.stringify(s));return s})}};exports.a = d;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkKRV3IXJUcjs = require('./chunk-KRV3IXJU.cjs');var _chunk5D4EGVG6cjs = require('./chunk-5D4EGVG6.cjs');var _chunkWYYAPI4Gcjs = require('./chunk-WYYAPI4G.cjs');var _chunkO4FVTK7Xcjs = require('./chunk-O4FVTK7X.cjs');var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var _ox = require('ox');var u="When 'delegatedSigners' is provided to a method that may fetch an existing wallet, each specified delegated signer must exist in that wallet's configuration.",w= exports.a =class{constructor(e){this.apiClient=e}getOrCreateWallet(e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){if(this.apiClient.isServerSide)throw new (0, _chunkO4FVTK7Xcjs.f)(`getOrCreateWallet can only be called from client-side code.
|
|
2
|
+
- Make sure you're running this in the browser (or another client environment), not on your server.
|
|
3
|
+
- Use your Crossmint Client API Key (not a server key).`);let i=this.getWalletLocator(e),n=yield this.apiClient.getWallet(i);return n!=null&&!("error"in n)?this.createWalletInstance(n,e):this.createWallet(e)})}getWallet(e,i){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){if(!this.apiClient.isServerSide)throw new (0, _chunkO4FVTK7Xcjs.f)("getWallet is not supported on client side, use getOrCreateWallet instead");let n=yield this.apiClient.getWallet(e);if("error"in n)throw new (0, _chunkO4FVTK7Xcjs.d)(JSON.stringify(n));return this.createWalletInstance(n,i)})}createWallet(e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var t,a,s,o,l;yield(s=(a=(t=e.options)==null?void 0:t.experimental_callbacks)==null?void 0:a.onWalletCreationStart)==null?void 0:s.call(a),this.mutateSignerFromCustomAuth(e,!0);let i=e.signer.type==="passkey"?yield this.createPasskeyAdminSigner(e.signer):e.signer,n=yield this.apiClient.createWallet({type:"smart",chainType:this.getChainType(e.chain),config:_chunkXALFCQKDcjs.a.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {adminSigner:i},e!=null&&e.plugins?{plugins:e.plugins}:{}),e.delegatedSigners!=null?{delegatedSigners:e.delegatedSigners}:{}),owner:(o=e.owner)!=null?o:void 0,alias:(l=e.alias)!=null?l:void 0});if("error"in n)throw new (0, _chunkO4FVTK7Xcjs.f)(JSON.stringify(n));return this.createWalletInstance(n,e)})}createWalletInstance(e,i){this.validateExistingWalletConfig(e,i);let n=this.toInternalSignerConfig(e,i.signer,i.options);return new (0, _chunk5D4EGVG6cjs.a)({chain:i.chain,address:e.address,owner:e.owner,signer:_chunkWYYAPI4Gcjs.a.call(void 0, i.chain,n),options:i.options,alias:i.alias},this.apiClient)}toInternalSignerConfig(e,i,n){var t,a,s,o,l,C;if(!(e.chainType==="evm"||e.chainType==="solana"||e.chainType==="stellar"))throw new (0, _chunkO4FVTK7Xcjs.f)(`Wallet type ${e.chainType} is not supported`);if(i==null&&((t=e.config)==null?void 0:t.adminSigner)==null)throw new (0, _chunkO4FVTK7Xcjs.f)("Signer is required to create a wallet");switch(i.type){case"api-key":{if(((a=e.config)==null?void 0:a.adminSigner.type)!=="api-key")throw new (0, _chunkO4FVTK7Xcjs.f)("API key signer does not match the wallet's signer type");return{type:"api-key",address:e.config.adminSigner.address,locator:e.config.adminSigner.locator}}case"external-wallet":if(((s=e.config)==null?void 0:s.adminSigner.type)!=="external-wallet")throw new (0, _chunkO4FVTK7Xcjs.f)("External wallet signer does not match the wallet's signer type");return _chunkXALFCQKDcjs.a.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {},e.config.adminSigner),i);case"passkey":if(((o=e.config)==null?void 0:o.adminSigner.type)!=="passkey")throw new (0, _chunkO4FVTK7Xcjs.f)("Passkey signer does not match the wallet's signer type");return{type:"passkey",id:e.config.adminSigner.id,name:e.config.adminSigner.name,locator:e.config.adminSigner.locator,onCreatePasskey:i.onCreatePasskey,onSignWithPasskey:i.onSignWithPasskey};case"email":{if(((l=e.config)==null?void 0:l.adminSigner.type)!=="email")throw new (0, _chunkO4FVTK7Xcjs.f)("Email signer does not match the wallet's signer type");let{locator:h,email:g,address:p}=e.config.adminSigner;return{type:"email",email:g,locator:h,address:p,crossmint:this.apiClient.crossmint,onAuthRequired:i.onAuthRequired,clientTEEConnection:n==null?void 0:n.clientTEEConnection}}case"phone":{if(((C=e.config)==null?void 0:C.adminSigner.type)!=="phone")throw new (0, _chunkO4FVTK7Xcjs.f)("Phone signer does not match the wallet's signer type");let{locator:h,phone:g,address:p}=e.config.adminSigner;return{type:"phone",phone:g,locator:h,address:p,crossmint:this.apiClient.crossmint,onAuthRequired:i.onAuthRequired,clientTEEConnection:n==null?void 0:n.clientTEEConnection}}default:throw new Error("Invalid signer type")}}getWalletLocator(e){return`me:${this.getChainType(e.chain)}:smart`+(e.alias!=null?`:alias:${e.alias}`:"")}createPasskeyAdminSigner(e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var t;if(e.type!=="passkey")throw new Error("Signer is not a passkey");let i=(t=e.name)!=null?t:`Crossmint Wallet ${Date.now()}`,n=e.onCreatePasskey?yield e.onCreatePasskey(i):yield _ox.WebAuthnP256.createCredential({name:i});return{type:"passkey",id:n.id,name:i,publicKey:{x:n.publicKey.x.toString(),y:n.publicKey.y.toString()}}})}mutateSignerFromCustomAuth(e,i=!1){var t,a;let{experimental_customAuth:n}=this.apiClient.crossmint;e.signer.type==="email"&&(n==null?void 0:n.email)!=null&&(e.signer.email=(t=e.signer.email)!=null?t:n.email),e.signer.type==="phone"&&(n==null?void 0:n.phone)!=null&&(e.signer.phone=(a=e.signer.phone)!=null?a:n.phone),e.signer.type==="external-wallet"&&(n==null?void 0:n.externalWalletSigner)!=null&&(e.signer=i?{type:"external-wallet",address:n.externalWalletSigner.address}:n.externalWalletSigner)}validateExistingWalletConfig(e,i){var a;if(this.mutateSignerFromCustomAuth(i),i.owner!=null&&e.owner!=null&&i.owner!==e.owner)throw new (0, _chunkO4FVTK7Xcjs.f)("Wallet owner does not match existing wallet's linked user");if(i.chain==="solana"&&e.chainType!=="solana"||i.chain!=="solana"&&e.chainType==="solana"||i.chain==="stellar"&&e.chainType!=="stellar"||i.chain!=="stellar"&&e.chainType==="stellar")throw new (0, _chunkO4FVTK7Xcjs.f)(`Wallet chain does not match existing wallet's chain. You must use chain: ${e.chainType}.`);if(e.type!=="smart")return;let n=i.signer,t=(a=e==null?void 0:e.config)==null?void 0:a.adminSigner;if(n!=null&&t!=null){if(n.type!==t.type)throw new (0, _chunkO4FVTK7Xcjs.f)("The wallet signer type provided in the wallet config does not match the existing wallet's adminSigner type");_chunkKRV3IXJUcjs.a.call(void 0, n,t)}i.delegatedSigners!=null&&this.validateDelegatedSigners(e,i.delegatedSigners)}validateDelegatedSigners(e,i){var t;let n=(t=e==null?void 0:e.config)==null?void 0:t.delegatedSigners;if(i.length!==0){if(n==null||n.length===0)throw new (0, _chunkO4FVTK7Xcjs.f)(`${i.length} delegated signer(s) specified, but wallet "${e.address}" has no delegated signers. ${u}`);for(let a of i)if(n.find(o=>o.locator===a.signer)==null){let o=n.map(l=>l.locator).join(", ");throw new (0, _chunkO4FVTK7Xcjs.f)(`Delegated signer '${a.signer}' does not exist in wallet "${e.address}". Available delegated signers: ${o}. ${u}`)}}}getChainType(e){return e==="solana"?"solana":e==="stellar"?"stellar":"evm"}};exports.a = w;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as i,b as o}from"./chunk-
|
|
1
|
+
import{a as i,b as o}from"./chunk-HJ5EDMTA.js";import{f as t}from"./chunk-BW7YYVZE.js";var s=class a extends i{constructor(n){super(n)}signMessage(){return t(this,null,function*(){return yield Promise.reject(new Error("signMessage method not implemented for stellar signer"))})}signTransaction(n){return t(this,null,function*(){var r;yield this.handleAuthRequired();let g=this.getJwtOrThrow(),e=yield(r=this.config.clientTEEConnection)==null?void 0:r.sendAction({event:"request:sign",responseEvent:"response:sign",data:{authData:{jwt:g,apiKey:this.config.crossmint.apiKey},data:{keyType:"ed25519",bytes:n,encoding:"base64"}},options:o});if((e==null?void 0:e.status)==="error")throw new Error(e.error);if((e==null?void 0:e.signature)==null)throw new Error("Failed to sign transaction");if(a.verifyPublicKeyFormat(e.publicKey),e.signature.encoding!=="base64")throw new Error("Wrong encoding for signature. Expected base64, got "+e.signature.encoding);return{signature:e.signature.bytes}})}static verifyPublicKeyFormat(n){if(n==null)throw new Error("No public key found");if(n.encoding!=="base64"||n.keyType!=="ed25519"||n.bytes==null)throw new Error("Not supported. Expected public key to be in base64 encoding and ed25519 key type. Got: "+JSON.stringify(n))}getChainKeyParams(){return{scheme:"ed25519",encoding:"strkey"}}};export{s as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as m}from"./chunk-JUSY5XEE.js";import{a as d}from"./chunk-
|
|
1
|
+
import{a as m}from"./chunk-JUSY5XEE.js";import{a as d}from"./chunk-P6JJHAAV.js";import{a as u,b as l,f as s}from"./chunk-BW7YYVZE.js";import{validateAPIKey as f}from"@crossmint/common-sdk-base";var E=class{constructor(e){this.config=e;this._needsAuth=!0;this._authPromise=null;this._initializationPromise=null;this.initialize(),this.type=this.config.type}locator(){return this.config.locator}address(){return this.config.address}initialize(){return s(this,null,function*(){if(this.config.clientTEEConnection==null){let e=f(this.config.crossmint.apiKey);if(!e.isValid)throw new Error("Invalid API key");let t=new m({environment:e.environment});this.config.clientTEEConnection=yield t.initialize()}})}getTEEConnection(){return s(this,null,function*(){if(this.config.clientTEEConnection==null){if(this._initializationPromise)return yield this._initializationPromise,this.config.clientTEEConnection;this._initializationPromise=this.initializeTEEConnection();try{yield this._initializationPromise}finally{this._initializationPromise=null}}return this.config.clientTEEConnection})}initializeTEEConnection(){return s(this,null,function*(){console.warn("TEE connection is not initialized, initializing now...");let e=f(this.config.crossmint.apiKey);if(!e.isValid)throw new Error("Invalid API key");let t=new m({environment:e.environment});if(this.config.clientTEEConnection=yield t.initialize(),this.config.clientTEEConnection==null)throw new Error("Failed to initialize TEE connection");console.log("TEE connection initialized successfully")})}handleAuthRequired(){return s(this,null,function*(){var c,h;let e=yield this.getTEEConnection();if(this.config.onAuthRequired==null)throw new Error(`${this.type} signer requires the onAuthRequired callback to handle OTP verification. This callback manages the authentication flow (sending OTP and verifying user input). If using our React/React Native SDK, this is handled automatically by the provider. For other environments, implement: onAuthRequired: (needsAuth, sendEmailWithOtp, verifyOtp, reject) => { /* your UI logic */ }`);let t=yield e.sendAction({event:"request:get-status",responseEvent:"response:get-status",data:{authData:{jwt:(h=(c=this.config.crossmint.experimental_customAuth)==null?void 0:c.jwt)!=null?h:"",apiKey:this.config.crossmint.apiKey}},options:l(u({},g),{maxRetries:5})});if((t==null?void 0:t.status)!=="success")throw new Error(t==null?void 0:t.error);if(t.signerStatus==="ready"){this._needsAuth=!1;return}else this._needsAuth=!0;let{promise:i,resolve:o,reject:n}=this.createAuthPromise();if(this._authPromise={promise:i,resolve:o,reject:n},this.config.onAuthRequired)try{yield this.config.onAuthRequired(this._needsAuth,()=>this.sendMessageWithOtp(),r=>this.verifyOtp(r),()=>s(this,null,function*(){this._needsAuth=!1,this.config.onAuthRequired!=null&&(yield this.config.onAuthRequired(this._needsAuth,()=>this.sendMessageWithOtp(),r=>this.verifyOtp(r),()=>{var r;return(r=this._authPromise)==null?void 0:r.reject(new d)})),n(new d)}))}catch(r){n(r)}try{yield i}catch(r){throw r}})}ensureAuthenticated(){return s(this,null,function*(){yield this.handleAuthRequired()})}getJwtOrThrow(){var t;let e=(t=this.config.crossmint.experimental_customAuth)==null?void 0:t.jwt;if(e==null)throw new Error("JWT is required");return e}createAuthPromise(){let e,t;return{promise:new Promise((o,n)=>{e=o,t=n}),resolve:e,reject:t}}sendMessageWithOtp(){return s(this,null,function*(){var o,n,c;let e=yield this.getTEEConnection(),t=this.getAuthId(),i=yield e.sendAction({event:"request:start-onboarding",responseEvent:"response:start-onboarding",data:{authData:{jwt:(n=(o=this.config.crossmint.experimental_customAuth)==null?void 0:o.jwt)!=null?n:"",apiKey:this.config.crossmint.apiKey},data:{authId:t}},options:l(u({},g),{maxRetries:3})});if((i==null?void 0:i.status)==="success"&&i.signerStatus==="ready"){this._needsAuth=!1;return}(i==null?void 0:i.status)==="error"&&(console.error("[sendMessageWithOtp] Failed to send OTP:",i),(c=this._authPromise)==null||c.reject(new Error(i.error||"Failed to initiate OTP process.")))})}getAuthId(){return this.config.type==="email"?`email:${this.config.email}`:`phone:${this.config.phone}`}verifyOtp(e){return s(this,null,function*(){var n,c,h,r,p;let t;try{t=yield(yield this.getTEEConnection()).sendAction({event:"request:complete-onboarding",responseEvent:"response:complete-onboarding",data:{authData:{jwt:(c=(n=this.config.crossmint.experimental_customAuth)==null?void 0:n.jwt)!=null?c:"",apiKey:this.config.crossmint.apiKey},data:{onboardingAuthentication:{encryptedOtp:e}}},options:l(u({},g),{maxRetries:3})})}catch(a){throw console.error("[verifyOtp] Error sending OTP validation request:",a),this._needsAuth=!0,(h=this._authPromise)==null||h.reject(a),a}if((t==null?void 0:t.status)==="success"){this._needsAuth=!1,this.config.onAuthRequired!=null&&(yield this.config.onAuthRequired(this._needsAuth,()=>this.sendMessageWithOtp(),a=>this.verifyOtp(a),()=>{var a;return(a=this._authPromise)==null?void 0:a.reject(new d)})),(r=this._authPromise)==null||r.resolve();return}console.error("[verifyOtp] Failed to validate OTP:",t),this._needsAuth=!0;let i=(t==null?void 0:t.status)==="error"?t.error:"Failed to validate encrypted OTP",o=new Error(i);throw(p=this._authPromise)==null||p.reject(o),o})}_exportPrivateKey(e){return s(this,null,function*(){yield this.handleAuthRequired();let t=this.getJwtOrThrow(),{scheme:i,encoding:o}=this.getChainKeyParams(),n=yield e.sendAction({event:"request:export-signer",responseEvent:"response:export-signer",data:{authData:{jwt:t,apiKey:this.config.crossmint.apiKey},data:{scheme:i,encoding:o}},options:g});if((n==null?void 0:n.status)==="error")throw new Error(n.error||"Failed to export private key")})}},g={timeoutMs:1e4,intervalMs:5e3};export{E as a,g as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk2YH3NVVKcjs = require('./chunk-2YH3NVVK.cjs');var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var _ox = require('ox');var _viem = require('viem');var g=class c extends _chunk2YH3NVVKcjs.a{constructor(e){super(e)}signMessage(e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){let i=_viem.isHex.call(void 0, e)?e:_viem.toHex.call(void 0, e),r=_ox.PersonalMessage.getSignPayload(i);return yield this.sign(r)})}signTransaction(e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return yield this.sign(e)})}sign(e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var s;yield this.handleAuthRequired();let i=this.getJwtOrThrow(),r=e.replace("0x",""),n=yield(s=this.config.clientTEEConnection)==null?void 0:s.sendAction({event:"request:sign",responseEvent:"response:sign",data:{authData:{jwt:i,apiKey:this.config.crossmint.apiKey},data:{keyType:"secp256k1",bytes:r,encoding:"hex"}},options:_chunk2YH3NVVKcjs.b});if((n==null?void 0:n.status)==="error")throw new Error(n.error);if((n==null?void 0:n.signature)==null)throw new Error("Failed to sign transaction");return c.verifyPublicKeyFormat(n.publicKey),{signature:n.signature.bytes}})}static verifyPublicKeyFormat(e){if(e==null)throw new Error("No public key found");if(e.encoding!=="hex"||e.keyType!=="secp256k1"||e.bytes==null)throw new Error("Not supported. Expected public key to be in hex encoding and secp256k1 key type. Got: "+JSON.stringify(e))}getChainKeyParams(){return{scheme:"secp256k1",encoding:"hex"}}};exports.a = g;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as J}from"./chunk-HJ5EDMTA.js";import{d as O}from"./chunk-ZZ4BKHSP.js";import{c as L,d as W,i as E,m as N,p as x,q as I,r as _,s as P,t as k,u as $,v as F,w as B,x as R}from"./chunk-PSXRNSOE.js";import{a as f,b as A,c as u,d as b,e as C,f as l}from"./chunk-BW7YYVZE.js";import{isValidAddress as G}from"@crossmint/common-sdk-base";var T,c,H=class{constructor(e,t){b(this,T);b(this,c);let{chain:r,address:n,owner:s,signer:h,options:g,alias:i}=e;C(this,c,t),this.chain=r,this.address=n,this.owner=s,this.signer=h,C(this,T,g),this.alias=i}static getApiClient(e){return e.apiClient}static getOptions(e){return e.options}get apiClient(){return u(this,c)}get options(){return u(this,T)}experimental_apiClient(){return u(this,c)}balances(e,t){return l(this,null,function*(){let r;switch(this.chain){case"solana":r="sol";break;case"stellar":r="xlm";break;default:r="eth";break}let n=[r,"usdc",...e!=null?e:[]],s=yield u(this,c).getBalance(this.address,{chains:t!=null?t:[this.chain],tokens:n});if("error"in s)throw new Error(`Failed to get balances for wallet: ${JSON.stringify(s.message)}`);return this.transformBalanceResponse(s,r,e)})}transformBalanceResponse(e,t,r){let n=a=>{var m,w,v,y,S;let o=(m=a.chains)==null?void 0:m[this.chain],p={};return this.chain==="solana"&&o!=null&&"mintHash"in o?p={mintHash:o.mintHash}:this.chain==="stellar"&&o!=null&&"contractId"in o?p={contractId:o.contractId}:o!=null&&"contractAddress"in o&&(p={contractAddress:o.contractAddress}),f({symbol:(w=a.symbol)!=null?w:"",name:(v=a.name)!=null?v:"",amount:(y=a.amount)!=null?y:"0",decimals:a.decimals,rawAmount:(S=a.rawAmount)!=null?S:"0"},p)},s=e.find(a=>a.symbol===t),h=e.find(a=>a.symbol==="usdc"),g=e.filter(a=>a.symbol!==t&&a.symbol!=="usdc"),i=a=>{let o={symbol:a,name:a,amount:"0",decimals:0,rawAmount:"0"},p={};return this.chain==="solana"?p={mintHash:void 0}:this.chain==="stellar"?p={contractId:void 0}:p={contractAddress:void 0},f(f({},o),p)};return{nativeToken:s!=null?n(s):i(t),usdc:h!=null?n(h):i("usdc"),tokens:g.map(n)}}experimental_nfts(e){return l(this,null,function*(){return yield u(this,c).experimental_getNfts(A(f({},e),{chain:this.chain,address:this.address}))})}experimental_transactions(){return l(this,null,function*(){let e=yield u(this,c).getTransactions(this.walletLocator);if("error"in e)throw new Error(`Failed to get transactions: ${JSON.stringify(e.message)}`);return e})}experimental_transaction(e){return l(this,null,function*(){let t=yield u(this,c).getTransaction(this.walletLocator,e);if("error"in t)throw new Error(`Failed to get transaction: ${JSON.stringify(t.error)}`);return t})}experimental_activity(){return l(this,null,function*(){let e=yield this.apiClient.experimental_activity(this.walletLocator,{chain:this.chain});if("error"in e)throw new Error(`Failed to get activity: ${JSON.stringify(e.message)}`);return e})}send(e,t,r,n){return l(this,null,function*(){yield this.preAuthIfNeeded();let s=D(e),h=M(t,this.chain),g=f({recipient:s,amount:r},(n==null?void 0:n.experimental_signer)!=null?{signer:n.experimental_signer}:{}),i=yield u(this,c).send(this.walletLocator,h,g);if("message"in i)throw new _(`Failed to send token: ${JSON.stringify(i.message)}`);return n!=null&&n.experimental_prepareOnly?{hash:void 0,explorerLink:void 0,transactionId:i.id}:yield this.approveTransactionAndWait(i.id)})}approveTransaction(e){return l(this,null,function*(){return console.warn("approveTransaction is deprecated. Use approve instead. This method will be removed in the next major version."),yield this.approve(e)})}approve(e){return l(this,null,function*(){if(e.transactionId!=null)return yield this.approveTransactionAndWait(e.transactionId,e.options);if(e.signatureId!=null)return yield this.approveSignatureAndWait(e.signatureId,e.options);throw new Error("Either transactionId or signatureId must be provided")})}addDelegatedSigner(e){return l(this,null,function*(){var n,s,h;let t=yield u(this,c).registerSigner(this.walletLocator,{signer:e.signer,chain:this.chain==="solana"||this.chain==="stellar"?void 0:this.chain});if("error"in t)throw new Error(`Failed to register signer: ${JSON.stringify(t.message)}`);if(this.chain==="solana"||this.chain==="stellar"){if(!("transaction"in t)||t.transaction==null)throw new Error("Expected transaction in response for Solana/Stellar chain");let g=t.transaction.id;if((n=e.options)!=null&&n.experimental_prepareOnly)return{transactionId:g};yield this.approveTransactionAndWait(g);return}if(!("chains"in t))throw new Error("Expected chains in response for EVM chain");let r=(s=t.chains)==null?void 0:s[this.chain];if((h=e.options)!=null&&h.experimental_prepareOnly)return{signatureId:(r==null?void 0:r.status)!=="success"?r==null?void 0:r.id:void 0};if((r==null?void 0:r.status)==="awaiting-approval"){yield this.approveSignatureAndWait(r.id);return}if((r==null?void 0:r.status)==="pending"){yield this.waitForSignature(r.id);return}})}delegatedSigners(){return l(this,null,function*(){var t,r,n;let e=yield u(this,c).getWallet(this.walletLocator);if("error"in e)throw new W(JSON.stringify(e));if(e.type!=="smart"||e.chainType!=="evm"&&e.chainType!=="solana"&&e.chainType!=="stellar")throw new L(`Wallet type ${e.type} not supported`);return(n=(r=(t=e==null?void 0:e.config)==null?void 0:t.delegatedSigners)==null?void 0:r.map(s=>{let h=s.locator.indexOf(":");return{signer:`external-wallet:${h>=0?s.locator.slice(h+1):s.locator}`}}))!=null?n:[]})}get walletLocator(){if(u(this,c).isServerSide)return this.address;{let e;switch(this.chain){case"stellar":e="me:stellar:smart";break;case"solana":e="me:solana:smart";break;default:e="me:evm:smart";break}let t=this.alias!=null?`:alias:${this.alias}`:"";return e+t}}preAuthIfNeeded(){return l(this,null,function*(){this.signer instanceof J&&(yield this.signer.ensureAuthenticated())})}get isSolanaWallet(){return this.chain==="solana"}approveTransactionAndWait(e,t){return l(this,null,function*(){return yield this.approveTransactionInternal(e,t),yield this.sleep(1e3),yield this.waitForTransaction(e)})}approveSignatureAndWait(e,t){return l(this,null,function*(){let r=yield this.approveSignatureInternal(e,t);return!("error"in r)&&r.status==="success"&&r.outputSignature!=null?{signature:r.outputSignature,signatureId:e}:(yield this.sleep(1e3),yield this.waitForSignature(e))})}approveSignatureInternal(e,t){return l(this,null,function*(){var i,a;if(this.isSolanaWallet)throw new Error("Approving signatures is only supported for EVM smart wallets");let r=yield u(this,c).getSignature(this.walletLocator,e);if("error"in r)throw new x(JSON.stringify(r));if(this.signer.type==="api-key")return r;if((t==null?void 0:t.experimental_approval)!=null){let o=[t.experimental_approval];return yield this.executeApproveSignatureWithErrorHandling(e,o)}let n=(i=r.approvals)==null?void 0:i.pending;if(n==null)return r;let s=[...(a=t==null?void 0:t.additionalSigners)!=null?a:[],this.signer],g=(yield Promise.all(n.map(o=>{let p=s.find(m=>m.locator()===o.signer.locator);if(p==null)throw new E(`Signer ${o.signer} not found in pending approvals`);return p.signMessage(o.message)}))).map(o=>A(f({},o),{signer:this.signer.locator()}));return yield this.executeApproveSignatureWithErrorHandling(e,g)})}approveTransactionInternal(e,t){return l(this,null,function*(){var i,a,o,p,m;let r=yield u(this,c).getTransaction(this.walletLocator,e);if("error"in r)throw new P(JSON.stringify(r));if(yield(o=(a=(i=u(this,T))==null?void 0:i.experimental_callbacks)==null?void 0:a.onTransactionStart)==null?void 0:o.call(a),this.signer.type==="api-key")return r;if((t==null?void 0:t.experimental_approval)!=null){let w=[t.experimental_approval];return yield this.executeApproveTransactionWithErrorHandling(e,w)}let n=(p=r.approvals)==null?void 0:p.pending;if(n==null)return r;let s=[...(m=t==null?void 0:t.additionalSigners)!=null?m:[],this.signer],g=(yield Promise.all(n.map(w=>{let v=s.find(S=>S.locator()===w.signer.locator);if(v==null)throw new E(`Signer ${w.signer} not found in pending approvals`);let y=r.chainType==="solana"&&"transaction"in r.onChain?r.onChain.transaction:w.message;return v.signTransaction(y)}))).map(w=>A(f({},w),{signer:this.signer.locator()}));return yield this.executeApproveTransactionWithErrorHandling(e,g)})}executeApproveTransactionWithErrorHandling(e,t){return l(this,null,function*(){let r=yield u(this,c).approveTransaction(this.walletLocator,e,{approvals:t});if(r.error)throw new R(JSON.stringify(r));return r})}executeApproveSignatureWithErrorHandling(e,t){return l(this,null,function*(){let r=yield u(this,c).approveSignature(this.walletLocator,e,{approvals:t});if(r.error)throw new I(JSON.stringify(r));return r})}waitForSignature(e){return l(this,null,function*(){let t=null;do if(yield new Promise(r=>setTimeout(r,O)),t=yield u(this,c).getSignature(this.walletLocator,e),"error"in t)throw new x(JSON.stringify(t));while(t===null||t.status==="pending");if(t.status==="failed")throw new N("Signature signing failed");if(!t.outputSignature)throw new x("Signature not available");return{signature:t.outputSignature,signatureId:e}})}waitForTransaction(h){return l(this,arguments,function*(e,t=6e4,{backoffMultiplier:r=1.1,maxBackoffMs:n=2e3,initialBackoffMs:s=O}={}){var o;let g=Date.now(),i;do{if(Date.now()-g>t)throw new k("Transaction confirmation timeout");if(i=yield u(this,c).getTransaction(this.walletLocator,e),i.error)throw new P(JSON.stringify(i));yield this.sleep(s),s=Math.min(s*r,n)}while(i.status==="pending");if(i.status==="failed")throw new $(`Transaction sending failed: ${JSON.stringify(i.error)}`);if(i.status==="awaiting-approval")throw new F("Transaction is awaiting approval. Please submit required approvals before waiting for completion.");let a=i.onChain.txId;if(a==null)throw new B("Transaction hash not found on transaction response");return{hash:a,explorerLink:(o=i.onChain.explorerLink)!=null?o:"",transactionId:i.id}})}sleep(e){return l(this,null,function*(){return new Promise(t=>setTimeout(t,e))})}};T=new WeakMap,c=new WeakMap;function D(d){if(typeof d=="string")return d;if("email"in d)return`email:${d.email}`;if("x"in d)return`x:${d.x}`;if("twitter"in d)return`twitter:${d.twitter}`;if("phone"in d)return`phoneNumber:${d.phone}`;if("userId"in d)return`userId:${d.userId}`;throw new Error("Invalid recipient locator")}function M(d,e){return G(d)?`${e}:${d}`:`${e}:${d.toLowerCase()}`}export{H as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkQCWNERNJcjs = require('./chunk-QCWNERNJ.cjs');var _chunkO4FVTK7Xcjs = require('./chunk-O4FVTK7X.cjs');var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var _commonsdkbase = require('@crossmint/common-sdk-base');var p=class extends _commonsdkbase.CrossmintApiClient{constructor(e){super(e,{internalConfig:{sdkMetadata:{name:_chunkQCWNERNJcjs.c,version:_chunkQCWNERNJcjs.b}}});this.apiPrefix="api/2025-06-09/wallets";this.legacyApiPrefix="api/2022-06-09/wallets"}createWallet(e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){let s=this.isServerSide?`${this.apiPrefix}`:`${this.apiPrefix}/me`;return(yield this.post(s,{body:JSON.stringify(e),headers:this.headers})).json()})}getWallet(e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return(yield this.get(`${this.apiPrefix}/${e}`,{headers:this.headers})).json()})}createTransaction(e,s){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/transactions`,{body:JSON.stringify(s),headers:this.headers})).json()})}approveTransaction(e,s,t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/transactions/${s}/approvals`,{body:JSON.stringify(t),headers:this.headers})).json()})}getTransaction(e,s){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return(yield this.get(`${this.apiPrefix}/${e}/transactions/${s}`,{headers:this.headers})).json()})}createSignature(e,s){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/signatures`,{body:JSON.stringify(s),headers:this.headers})).json()})}approveSignature(e,s,t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/signatures/${s}/approvals`,{body:JSON.stringify(t),headers:this.headers})).json()})}getSignature(e,s){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return(yield this.get(`${this.apiPrefix}/${e}/signatures/${s}`,{headers:this.headers})).json()})}getTransactions(e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return(yield this.get(`${this.apiPrefix}/${e}/transactions`,{headers:this.headers})).json()})}experimental_getNfts(e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){let s=new URLSearchParams;s.append("page",e.page.toString()),s.append("perPage",e.perPage.toString());let t=`${e.chain}:${e.address}`;return(yield this.get(`${this.apiPrefix}/${t}/nfts?${s.toString()}`,{headers:this.headers})).json()})}experimental_activity(e,s){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){let t=e;this.isServerSide||(t=`me:${s.chain==="solana"?"solana-smart-wallet":"evm-smart-wallet"}`);let a=new URLSearchParams;return a.append("chain",s.chain.toString()),(yield this.get(`${this.legacyApiPrefix}/${t}/activity?${a.toString()}`,{headers:this.headers})).json()})}getBalance(e,s){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){let t=new URLSearchParams;return t.append("tokens",s.tokens.join(",")),t.append("chains",s.chains.join(",")),(yield this.get(`${this.apiPrefix}/${e}/balances?${t.toString()}`,{headers:this.headers})).json()})}registerSigner(e,s){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/signers`,{body:JSON.stringify(s),headers:this.headers})).json()})}getSigner(e,s){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return(yield this.get(`${this.apiPrefix}/${e}/signers/${s}`,{headers:this.headers})).json()})}send(e,s,t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/tokens/${s}/transfers`,{body:JSON.stringify(t),headers:this.headers})).json()})}get isServerSide(){return this.parsedAPIKey.usageOrigin===_commonsdkbase.APIKeyUsageOrigin.SERVER}get environment(){if(!this.parsedAPIKey.isValid)throw new (0, _chunkO4FVTK7Xcjs.a)("Invalid API key");return this.parsedAPIKey.environment}get headers(){return{"Content-Type":"application/json"}}};exports.a = p;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunk5D4EGVG6cjs = require('./chunk-5D4EGVG6.cjs');var _chunkHRSVFJNDcjs = require('./chunk-HRSVFJND.cjs');var _chunkO4FVTK7Xcjs = require('./chunk-O4FVTK7X.cjs');var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var _bs58 = require('bs58'); var _bs582 = _interopRequireDefault(_bs58);var _commonsdkbase = require('@crossmint/common-sdk-base');var u=class T extends _chunk5D4EGVG6cjs.a{constructor(n){super({chain:n.chain,address:n.address,owner:n.owner,signer:n.signer,options:_chunk5D4EGVG6cjs.a.getOptions(n),alias:n.alias},_chunk5D4EGVG6cjs.a.getApiClient(n))}static from(n){if(!_commonsdkbase.isValidSolanaAddress.call(void 0, n.address))throw new Error("Wallet is not a Solana wallet");return new T(n)}sendTransaction(n){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var e,i;yield this.preAuthIfNeeded();let t=yield this.createTransaction(n);if((e=n.options)!=null&&e.experimental_prepareOnly)return{hash:void 0,explorerLink:void 0,transactionId:t.id};let a={additionalSigners:(i=n.additionalSigners)==null?void 0:i.map(s=>new (0, _chunkHRSVFJNDcjs.a)({type:"external-wallet",address:s.publicKey.toString(),locator:`external-wallet:${s.publicKey.toString()}`,onSignTransaction:p=>(p.sign([s]),Promise.resolve(p))}))};return yield this.approveTransactionAndWait(t.id,a)})}createTransaction(n){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var e,i;let t=(i=(e=n.options)==null?void 0:e.experimental_signer)!=null?i:this.signer.locator(),r;"serializedTransaction"in n?r=n.serializedTransaction:r=_bs582.default.encode(n.transaction.serialize());let a=yield this.apiClient.createTransaction(this.walletLocator,{params:{transaction:r,signer:t}});if("error"in a)throw new (0, _chunkO4FVTK7Xcjs.r)(JSON.stringify(a));return a})}};exports.a = u;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunk2YH3NVVKcjs = require('./chunk-2YH3NVVK.cjs');var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var _web3js = require('@solana/web3.js');var _bs58 = require('bs58'); var _bs582 = _interopRequireDefault(_bs58);var a=class g extends _chunk2YH3NVVKcjs.a{constructor(e){super(e)}signMessage(){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return yield Promise.reject(new Error("signMessage method not implemented for email signer"))})}signTransaction(e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var r;yield this.handleAuthRequired();let c=this.getJwtOrThrow(),d=_bs582.default.decode(e),l=_web3js.VersionedTransaction.deserialize(d).message.serialize(),n=yield(r=this.config.clientTEEConnection)==null?void 0:r.sendAction({event:"request:sign",responseEvent:"response:sign",data:{authData:{jwt:c,apiKey:this.config.crossmint.apiKey},data:{keyType:"ed25519",bytes:_bs582.default.encode(l),encoding:"base58"}},options:_chunk2YH3NVVKcjs.b});if((n==null?void 0:n.status)==="error")throw new Error(n.error);if((n==null?void 0:n.signature)==null)throw new Error("Failed to sign transaction");return g.verifyPublicKeyFormat(n.publicKey),{signature:n.signature.bytes}})}static verifyPublicKeyFormat(e){if(e==null)throw new Error("No public key found");if(e.encoding!=="base58"||e.keyType!=="ed25519"||e.bytes==null)throw new Error("Not supported. Expected public key to be in base58 encoding and ed25519 key type. Got: "+JSON.stringify(e))}getChainKeyParams(){return{scheme:"ed25519",encoding:"base58"}}};exports.a = a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkO4FVTK7Xcjs = require('./chunk-O4FVTK7X.cjs');var _commonsdkauth = require('@crossmint/common-sdk-auth');var m=(n,r,o)=>`Wallet signer configuration mismatch at "${n}" - expected "${o}" from existing wallet but found "${r}"`;function u(n){let o=n.toLowerCase().split("@"),t=o[1],s=t==="googlemail.com",i=(s||t==="gmail.com")&&o[0].includes(".");return s&&(o[1]="gmail.com"),i&&(o[0]=o[0].replace(/\./g,"")),`${o[0]}@${o[1]}`}function a(n){return typeof n=="string"&&_commonsdkauth.isEmailValid.call(void 0, n)?u(n):n}function f(n,r,o=""){if(n!==r){if(n==null||r==null)throw new Error(`Cannot compare null or undefined signer configs at path: ${o}`);for(let t of Object.keys(n)){if(!(t in r))continue;let s=o?`${o}.${t}`:t,e=n[t],i=r[t];if(typeof e=="object"&&e!==null&&typeof i=="object"&&i!==null)f(e,i,s);else if(a(e)!==a(i))throw new (0, _chunkO4FVTK7Xcjs.f)(m(s,e,i))}}}exports.a = f;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o}from"./chunk-IWSZUMTC.js";import{a as d}from"./chunk-6PVKL5RC.js";import{r as l}from"./chunk-PSXRNSOE.js";import{f as c}from"./chunk-BW7YYVZE.js";import f from"bs58";import{isValidSolanaAddress as h}from"@crossmint/common-sdk-base";var u=class T extends o{constructor(n){super({chain:n.chain,address:n.address,owner:n.owner,signer:n.signer,options:o.getOptions(n),alias:n.alias},o.getApiClient(n))}static from(n){if(!h(n.address))throw new Error("Wallet is not a Solana wallet");return new T(n)}sendTransaction(n){return c(this,null,function*(){var e,i;yield this.preAuthIfNeeded();let t=yield this.createTransaction(n);if((e=n.options)!=null&&e.experimental_prepareOnly)return{hash:void 0,explorerLink:void 0,transactionId:t.id};let a={additionalSigners:(i=n.additionalSigners)==null?void 0:i.map(s=>new d({type:"external-wallet",address:s.publicKey.toString(),locator:`external-wallet:${s.publicKey.toString()}`,onSignTransaction:p=>(p.sign([s]),Promise.resolve(p))}))};return yield this.approveTransactionAndWait(t.id,a)})}createTransaction(n){return c(this,null,function*(){var e,i;let t=(i=(e=n.options)==null?void 0:e.experimental_signer)!=null?i:this.signer.locator(),r;"serializedTransaction"in n?r=n.serializedTransaction:r=f.encode(n.transaction.serialize());let a=yield this.apiClient.createTransaction(this.walletLocator,{params:{transaction:r,signer:t}});if("error"in a)throw new l(JSON.stringify(a));return a})}};export{u as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var n=class extends Error{constructor(){super("Authentication was rejected by the user"),this.name="AuthRejectedError"}};function r(e){return e._exportPrivateKey!==void 0}export{n as a,r as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var s="@crossmint/wallets-sdk",t="0.
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var s="@crossmint/wallets-sdk",t="0.18.0";var p="WALLETS_SDK",r= exports.b =t,c= exports.c =s,a= exports.d =500;exports.a = p; exports.b = r; exports.c = c; exports.d = a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-IWSZUMTC.js";import{r as l}from"./chunk-PSXRNSOE.js";import{f as o}from"./chunk-BW7YYVZE.js";import{isValidStellarAddress as f}from"@crossmint/common-sdk-base";var d=class u extends a{constructor(n){super({chain:n.chain,address:n.address,owner:n.owner,signer:n.signer,options:a.getOptions(n),alias:n.alias},a.getApiClient(n))}static from(n){if(!f(n.address))throw new Error("Wallet is not a Stellar wallet");return new u(n)}sendTransaction(n){return o(this,null,function*(){var r;yield this.preAuthIfNeeded();let t=yield this.createTransaction(n);if((r=n.options)!=null&&r.experimental_prepareOnly)return{hash:void 0,explorerLink:void 0,transactionId:t.id};let e={};return yield this.approveTransactionAndWait(t.id,e)})}createTransaction(n){return o(this,null,function*(){var c;let{contractId:t,options:e}=n,r=(c=e==null?void 0:e.experimental_signer)!=null?c:this.signer.locator(),i;if("transaction"in n)i={type:"serialized-transaction",serializedTransaction:n.transaction,contractId:t};else{let{method:h,memo:p,args:T}=n;i={type:"contract-call",contractId:t,method:h,memo:p!=null?{type:"text",value:p}:void 0,args:T}}let s=yield this.apiClient.createTransaction(this.walletLocator,{params:{transaction:i,signer:r}});if("error"in s)throw new l(JSON.stringify(s));return s})}};export{d as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a as n}from"./chunk-VY634F3J.js";import{a}from"./chunk-H4T4IXCF.js";import{a as t}from"./chunk-WQP2FSVI.js";import{a as o}from"./chunk-UBOWSXW3.js";import{a as m}from"./chunk-IGBQEAD5.js";import{a as l}from"./chunk-6PVKL5RC.js";import{a as p}from"./chunk-2SHDBC47.js";import{a as s}from"./chunk-LW6JSI4J.js";import{a as i}from"./chunk-3APSOOE3.js";function d(r,e){switch(e.type){case"email":case"phone":return r==="solana"?new n(e):r==="stellar"?new a(e):new t(e);case"api-key":return r==="solana"?new m(e):new s(e);case"external-wallet":return r==="solana"?new l(e):r==="stellar"?new p(e):new i(e);case"passkey":return new o(e)}}export{d as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
1
|
+
import{a as l}from"./chunk-26IAM7ID.js";import{a}from"./chunk-5G6JZ2P4.js";import{f as e}from"./chunk-BW7YYVZE.js";import{createCrossmint as p}from"@crossmint/common-sdk-base";var i=class o{constructor(t){let r=new a(t);this.walletFactory=new l(r)}static from(t){return new o(t)}getOrCreateWallet(t){return e(this,null,function*(){return yield this.walletFactory.getOrCreateWallet(t)})}getWallet(t,r){return e(this,null,function*(){return yield this.walletFactory.getWallet(t,r)})}createWallet(t){return e(this,null,function*(){return yield this.walletFactory.createWallet(t)})}};export{p as a,i as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as i,b as s}from"./chunk-
|
|
1
|
+
import{a as i,b as s}from"./chunk-HJ5EDMTA.js";import{f as t}from"./chunk-BW7YYVZE.js";import{VersionedTransaction as m}from"@solana/web3.js";import o from"bs58";var a=class g extends i{constructor(e){super(e)}signMessage(){return t(this,null,function*(){return yield Promise.reject(new Error("signMessage method not implemented for email signer"))})}signTransaction(e){return t(this,null,function*(){var r;yield this.handleAuthRequired();let c=this.getJwtOrThrow(),d=o.decode(e),l=m.deserialize(d).message.serialize(),n=yield(r=this.config.clientTEEConnection)==null?void 0:r.sendAction({event:"request:sign",responseEvent:"response:sign",data:{authData:{jwt:c,apiKey:this.config.crossmint.apiKey},data:{keyType:"ed25519",bytes:o.encode(l),encoding:"base58"}},options:s});if((n==null?void 0:n.status)==="error")throw new Error(n.error);if((n==null?void 0:n.signature)==null)throw new Error("Failed to sign transaction");return g.verifyPublicKeyFormat(n.publicKey),{signature:n.signature.bytes}})}static verifyPublicKeyFormat(e){if(e==null)throw new Error("No public key found");if(e.encoding!=="base58"||e.keyType!=="ed25519"||e.bytes==null)throw new Error("Not supported. Expected public key to be in base58 encoding and ed25519 key type. Got: "+JSON.stringify(e))}getChainKeyParams(){return{scheme:"ed25519",encoding:"base58"}}};export{a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o,b as a}from"./chunk-HJ5EDMTA.js";import{f as t}from"./chunk-BW7YYVZE.js";import{PersonalMessage as p}from"ox";import{isHex as y,toHex as h}from"viem";var g=class c extends o{constructor(e){super(e)}signMessage(e){return t(this,null,function*(){let i=y(e)?e:h(e),r=p.getSignPayload(i);return yield this.sign(r)})}signTransaction(e){return t(this,null,function*(){return yield this.sign(e)})}sign(e){return t(this,null,function*(){var s;yield this.handleAuthRequired();let i=this.getJwtOrThrow(),r=e.replace("0x",""),n=yield(s=this.config.clientTEEConnection)==null?void 0:s.sendAction({event:"request:sign",responseEvent:"response:sign",data:{authData:{jwt:i,apiKey:this.config.crossmint.apiKey},data:{keyType:"secp256k1",bytes:r,encoding:"hex"}},options:a});if((n==null?void 0:n.status)==="error")throw new Error(n.error);if((n==null?void 0:n.signature)==null)throw new Error("Failed to sign transaction");return c.verifyPublicKeyFormat(n.publicKey),{signature:n.signature.bytes}})}static verifyPublicKeyFormat(e){if(e==null)throw new Error("No public key found");if(e.encoding!=="hex"||e.keyType!=="secp256k1"||e.bytes==null)throw new Error("Not supported. Expected public key to be in hex encoding and secp256k1 key type. Got: "+JSON.stringify(e))}getChainKeyParams(){return{scheme:"secp256k1",encoding:"hex"}}};export{g as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkKO6QYKDXcjs = require('./chunk-KO6QYKDX.cjs');var _chunk2XVV7Z43cjs = require('./chunk-2XVV7Z43.cjs');var _chunkHPHVJ6BAcjs = require('./chunk-HPHVJ6BA.cjs');var _chunkYWPTI2QOcjs = require('./chunk-YWPTI2QO.cjs');var _chunk4KXOWU5Ecjs = require('./chunk-4KXOWU5E.cjs');var _chunkHRSVFJNDcjs = require('./chunk-HRSVFJND.cjs');var _chunkC3T63EC7cjs = require('./chunk-C3T63EC7.cjs');var _chunkYZ4HRYSLcjs = require('./chunk-YZ4HRYSL.cjs');var _chunkM4TOGGLVcjs = require('./chunk-M4TOGGLV.cjs');function E(r,e){switch(e.type){case"email":case"phone":return r==="solana"?new (0, _chunkKO6QYKDXcjs.a)(e):r==="stellar"?new (0, _chunk2XVV7Z43cjs.a)(e):new (0, _chunkHPHVJ6BAcjs.a)(e);case"api-key":return r==="solana"?new (0, _chunk4KXOWU5Ecjs.a)(e):new (0, _chunkYZ4HRYSLcjs.a)(e);case"external-wallet":return r==="solana"?new (0, _chunkHRSVFJNDcjs.a)(e):r==="stellar"?new (0, _chunkC3T63EC7cjs.a)(e):new (0, _chunkM4TOGGLVcjs.a)(e);case"passkey":return new (0, _chunkYWPTI2QOcjs.a)(e)}}exports.a = E;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var s="@crossmint/wallets-sdk",t="0.18.0";var r="WALLETS_SDK",c=t,a=s,d=500;export{r as a,c as b,a as c,d};
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk7QY4M232cjs = require('./chunk-7QY4M232.cjs');var _chunkK6PCO4LFcjs = require('./chunk-K6PCO4LF.cjs');var _chunkFOSTI2VMcjs = require('./chunk-FOSTI2VM.cjs');var _chunkDUPLYVUDcjs = require('./chunk-DUPLYVUD.cjs');require('./chunk-H3T7K4MG.cjs');require('./chunk-KRV3IXJU.cjs');var _chunk5D4EGVG6cjs = require('./chunk-5D4EGVG6.cjs');require('./chunk-WYYAPI4G.cjs');require('./chunk-PO6S7UR3.cjs');require('./chunk-KO6QYKDX.cjs');require('./chunk-2XVV7Z43.cjs');require('./chunk-HPHVJ6BA.cjs');require('./chunk-2YH3NVVK.cjs');require('./chunk-MQP5VZCA.cjs');require('./chunk-YWPTI2QO.cjs');require('./chunk-4KXOWU5E.cjs');require('./chunk-HRSVFJND.cjs');require('./chunk-C3T63EC7.cjs');var _chunk5QIW67NUcjs = require('./chunk-5QIW67NU.cjs');require('./chunk-6HXIZLEQ.cjs');var _chunkJU74KWSYcjs = require('./chunk-JU74KWSY.cjs');require('./chunk-QCWNERNJ.cjs');require('./chunk-O4FVTK7X.cjs');require('./chunk-ECAM5KTH.cjs');require('./chunk-WZFHEUWT.cjs');require('./chunk-IR5WN6FQ.cjs');require('./chunk-GEY574TH.cjs');require('./chunk-YZ4HRYSL.cjs');require('./chunk-M4TOGGLV.cjs');require('./chunk-XALFCQKD.cjs');exports.CrossmintWallets = _chunkDUPLYVUDcjs.b; exports.EVMWallet = _chunk7QY4M232cjs.a; exports.SolanaWallet = _chunkK6PCO4LFcjs.a; exports.StellarWallet = _chunkFOSTI2VMcjs.a; exports.Wallet = _chunk5D4EGVG6cjs.a; exports.WalletsApiClient = _chunkJU74KWSYcjs.a; exports.createCrossmint = _chunkDUPLYVUDcjs.a; exports.isExportableSigner = _chunk5QIW67NUcjs.b;
|
package/dist/index.d.cts
CHANGED
|
@@ -7,7 +7,7 @@ export { EVMWallet } from './wallets/evm.cjs';
|
|
|
7
7
|
export { StellarWallet } from './wallets/stellar.cjs';
|
|
8
8
|
export { Balances, DelegatedSigner, EVMTransactionInput, Signature, SolanaTransactionInput, Transaction, WalletArgsFor, WalletPlugin } from './wallets/types.cjs';
|
|
9
9
|
export { Chain, EVMChain, SolanaChain, StellarChain } from './chains/chains.cjs';
|
|
10
|
-
export { EmailSignerConfig, ExternalWalletSignerConfigForChain, PhoneSignerConfig, SignerConfigForChain } from './signers/types.cjs';
|
|
10
|
+
export { EmailSignerConfig, ExportSignerTEEConnection, ExportableSigner, ExternalWalletSignerConfigForChain, PhoneSignerConfig, SignerConfigForChain, isExportableSigner } from './signers/types.cjs';
|
|
11
11
|
export { EvmExternalWalletSignerConfig, SolanaExternalWalletSignerConfig, StellarExternalWalletSignerConfig, createCrossmint } from '@crossmint/common-sdk-base';
|
|
12
12
|
import 'viem';
|
|
13
13
|
import './api/gen/types.gen.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export { EVMWallet } from './wallets/evm.js';
|
|
|
7
7
|
export { StellarWallet } from './wallets/stellar.js';
|
|
8
8
|
export { Balances, DelegatedSigner, EVMTransactionInput, Signature, SolanaTransactionInput, Transaction, WalletArgsFor, WalletPlugin } from './wallets/types.js';
|
|
9
9
|
export { Chain, EVMChain, SolanaChain, StellarChain } from './chains/chains.js';
|
|
10
|
-
export { EmailSignerConfig, ExternalWalletSignerConfigForChain, PhoneSignerConfig, SignerConfigForChain } from './signers/types.js';
|
|
10
|
+
export { EmailSignerConfig, ExportSignerTEEConnection, ExportableSigner, ExternalWalletSignerConfigForChain, PhoneSignerConfig, SignerConfigForChain, isExportableSigner } from './signers/types.js';
|
|
11
11
|
export { EvmExternalWalletSignerConfig, SolanaExternalWalletSignerConfig, StellarExternalWalletSignerConfig, createCrossmint } from '@crossmint/common-sdk-base';
|
|
12
12
|
import 'viem';
|
|
13
13
|
import './api/gen/types.gen.js';
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as o}from"./chunk-7QSXW5GQ.js";import{a as l}from"./chunk-O3ESESNR.js";import{a as i}from"./chunk-T526WFJB.js";import{a as t,b as a}from"./chunk-UPQJFPD6.js";import"./chunk-26IAM7ID.js";import"./chunk-BQZES4ST.js";import{a as r}from"./chunk-IWSZUMTC.js";import"./chunk-UNBXKCNN.js";import"./chunk-YDZRBHS3.js";import"./chunk-VY634F3J.js";import"./chunk-H4T4IXCF.js";import"./chunk-WQP2FSVI.js";import"./chunk-HJ5EDMTA.js";import"./chunk-JUSY5XEE.js";import"./chunk-UBOWSXW3.js";import"./chunk-IGBQEAD5.js";import"./chunk-6PVKL5RC.js";import"./chunk-2SHDBC47.js";import{b as n}from"./chunk-P6JJHAAV.js";import"./chunk-5IFDVB4Y.js";import{a as e}from"./chunk-5G6JZ2P4.js";import"./chunk-ZZ4BKHSP.js";import"./chunk-PSXRNSOE.js";import"./chunk-KBJA7JDT.js";import"./chunk-RJZV72YF.js";import"./chunk-KKQBZXFE.js";import"./chunk-S3DYQVRD.js";import"./chunk-LW6JSI4J.js";import"./chunk-3APSOOE3.js";import"./chunk-BW7YYVZE.js";export{a as CrossmintWallets,o as EVMWallet,l as SolanaWallet,i as StellarWallet,r as Wallet,e as WalletsApiClient,t as createCrossmint,n as isExportableSigner};
|
package/dist/sdk.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkDUPLYVUDcjs = require('./chunk-DUPLYVUD.cjs');require('./chunk-H3T7K4MG.cjs');require('./chunk-KRV3IXJU.cjs');require('./chunk-5D4EGVG6.cjs');require('./chunk-WYYAPI4G.cjs');require('./chunk-PO6S7UR3.cjs');require('./chunk-KO6QYKDX.cjs');require('./chunk-2XVV7Z43.cjs');require('./chunk-HPHVJ6BA.cjs');require('./chunk-2YH3NVVK.cjs');require('./chunk-MQP5VZCA.cjs');require('./chunk-YWPTI2QO.cjs');require('./chunk-4KXOWU5E.cjs');require('./chunk-HRSVFJND.cjs');require('./chunk-C3T63EC7.cjs');require('./chunk-5QIW67NU.cjs');require('./chunk-6HXIZLEQ.cjs');require('./chunk-JU74KWSY.cjs');require('./chunk-QCWNERNJ.cjs');require('./chunk-O4FVTK7X.cjs');require('./chunk-ECAM5KTH.cjs');require('./chunk-YZ4HRYSL.cjs');require('./chunk-M4TOGGLV.cjs');require('./chunk-XALFCQKD.cjs');exports.CrossmintWallets = _chunkDUPLYVUDcjs.b; exports.createCrossmint = _chunkDUPLYVUDcjs.a;
|
package/dist/sdk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"./chunk-
|
|
1
|
+
import{a,b}from"./chunk-UPQJFPD6.js";import"./chunk-26IAM7ID.js";import"./chunk-BQZES4ST.js";import"./chunk-IWSZUMTC.js";import"./chunk-UNBXKCNN.js";import"./chunk-YDZRBHS3.js";import"./chunk-VY634F3J.js";import"./chunk-H4T4IXCF.js";import"./chunk-WQP2FSVI.js";import"./chunk-HJ5EDMTA.js";import"./chunk-JUSY5XEE.js";import"./chunk-UBOWSXW3.js";import"./chunk-IGBQEAD5.js";import"./chunk-6PVKL5RC.js";import"./chunk-2SHDBC47.js";import"./chunk-P6JJHAAV.js";import"./chunk-5IFDVB4Y.js";import"./chunk-5G6JZ2P4.js";import"./chunk-ZZ4BKHSP.js";import"./chunk-PSXRNSOE.js";import"./chunk-KBJA7JDT.js";import"./chunk-LW6JSI4J.js";import"./chunk-3APSOOE3.js";import"./chunk-BW7YYVZE.js";export{b as CrossmintWallets,a as createCrossmint};
|
package/dist/signers/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWYYAPI4Gcjs = require('../chunk-WYYAPI4G.cjs');require('../chunk-PO6S7UR3.cjs');require('../chunk-KO6QYKDX.cjs');require('../chunk-2XVV7Z43.cjs');require('../chunk-HPHVJ6BA.cjs');require('../chunk-2YH3NVVK.cjs');require('../chunk-MQP5VZCA.cjs');require('../chunk-YWPTI2QO.cjs');require('../chunk-4KXOWU5E.cjs');require('../chunk-HRSVFJND.cjs');require('../chunk-C3T63EC7.cjs');require('../chunk-5QIW67NU.cjs');require('../chunk-O4FVTK7X.cjs');require('../chunk-YZ4HRYSL.cjs');require('../chunk-M4TOGGLV.cjs');require('../chunk-XALFCQKD.cjs');exports.assembleSigner = _chunkWYYAPI4Gcjs.a;
|
package/dist/signers/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-UNBXKCNN.js";import"../chunk-YDZRBHS3.js";import"../chunk-VY634F3J.js";import"../chunk-H4T4IXCF.js";import"../chunk-WQP2FSVI.js";import"../chunk-HJ5EDMTA.js";import"../chunk-JUSY5XEE.js";import"../chunk-UBOWSXW3.js";import"../chunk-IGBQEAD5.js";import"../chunk-6PVKL5RC.js";import"../chunk-2SHDBC47.js";import"../chunk-P6JJHAAV.js";import"../chunk-PSXRNSOE.js";import"../chunk-LW6JSI4J.js";import"../chunk-3APSOOE3.js";import"../chunk-BW7YYVZE.js";export{a as assembleSigner};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-PO6S7UR3.cjs');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-PO6S7UR3.cjs');var _chunkKO6QYKDXcjs = require('../../chunk-KO6QYKDX.cjs');var _chunk2XVV7Z43cjs = require('../../chunk-2XVV7Z43.cjs');var _chunkHPHVJ6BAcjs = require('../../chunk-HPHVJ6BA.cjs');var _chunk2YH3NVVKcjs = require('../../chunk-2YH3NVVK.cjs');require('../../chunk-MQP5VZCA.cjs');require('../../chunk-5QIW67NU.cjs');require('../../chunk-XALFCQKD.cjs');exports.DEFAULT_EVENT_OPTIONS = _chunk2YH3NVVKcjs.b; exports.EVMNonCustodialSigner = _chunkHPHVJ6BAcjs.a; exports.NonCustodialSigner = _chunk2YH3NVVKcjs.a; exports.SolanaNonCustodialSigner = _chunkKO6QYKDXcjs.a; exports.StellarNonCustodialSigner = _chunk2XVV7Z43cjs.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../../chunk-YDZRBHS3.js";import{a as
|
|
1
|
+
import"../../chunk-YDZRBHS3.js";import{a as c}from"../../chunk-VY634F3J.js";import{a as e}from"../../chunk-H4T4IXCF.js";import{a as d}from"../../chunk-WQP2FSVI.js";import{a,b}from"../../chunk-HJ5EDMTA.js";import"../../chunk-JUSY5XEE.js";import"../../chunk-P6JJHAAV.js";import"../../chunk-BW7YYVZE.js";export{b as DEFAULT_EVENT_OPTIONS,d as EVMNonCustodialSigner,a as NonCustodialSigner,c as SolanaNonCustodialSigner,e as StellarNonCustodialSigner};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHPHVJ6BAcjs = require('../../chunk-HPHVJ6BA.cjs');require('../../chunk-2YH3NVVK.cjs');require('../../chunk-MQP5VZCA.cjs');require('../../chunk-5QIW67NU.cjs');require('../../chunk-XALFCQKD.cjs');exports.EVMNonCustodialSigner = _chunkHPHVJ6BAcjs.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-WQP2FSVI.js";import"../../chunk-HJ5EDMTA.js";import"../../chunk-JUSY5XEE.js";import"../../chunk-P6JJHAAV.js";import"../../chunk-BW7YYVZE.js";export{a as EVMNonCustodialSigner};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk2YH3NVVKcjs = require('../../chunk-2YH3NVVK.cjs');require('../../chunk-MQP5VZCA.cjs');require('../../chunk-5QIW67NU.cjs');require('../../chunk-XALFCQKD.cjs');exports.DEFAULT_EVENT_OPTIONS = _chunk2YH3NVVKcjs.b; exports.NonCustodialSigner = _chunk2YH3NVVKcjs.a;
|