@crossmint/wallets-sdk 0.11.1 → 0.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/client.cjs +1 -1
- package/dist/api/client.js +1 -1
- package/dist/api/gen/index.cjs +1 -1
- package/dist/api/gen/index.d.cts +2 -2
- package/dist/api/gen/index.d.ts +2 -2
- package/dist/api/gen/index.js +1 -1
- package/dist/api/gen/sdk.gen.cjs +1 -1
- package/dist/api/gen/sdk.gen.d.cts +20 -13
- package/dist/api/gen/sdk.gen.d.ts +20 -13
- package/dist/api/gen/sdk.gen.js +1 -1
- package/dist/api/gen/types.gen.d.cts +3969 -2202
- package/dist/api/gen/types.gen.d.ts +3969 -2202
- package/dist/api/index.cjs +1 -1
- package/dist/api/index.js +1 -1
- package/dist/api/types.d.cts +6 -4
- package/dist/api/types.d.ts +6 -4
- package/dist/chains/chains.cjs +1 -1
- package/dist/chains/chains.d.cts +3 -2
- package/dist/chains/chains.d.ts +3 -2
- package/dist/chains/chains.js +1 -1
- package/dist/{chunk-GCVKUO5M.cjs → chunk-24UHZXCX.cjs} +1 -1
- package/dist/chunk-3ZRWPMQS.cjs +1 -0
- package/dist/chunk-47QIT6DE.js +1 -0
- package/dist/chunk-5F4DWSLR.js +1 -0
- package/dist/chunk-5ZJ3MZLH.cjs +1 -0
- package/dist/{chunk-OZJLXJMC.cjs → chunk-6DHOSUSU.cjs} +1 -1
- package/dist/{chunk-YYRBSNIU.js → chunk-AE4RBXWS.js} +1 -1
- package/dist/chunk-BL2TFVJV.cjs +1 -0
- package/dist/chunk-FAESMNDM.cjs +1 -0
- package/dist/chunk-FCSP623C.cjs +1 -0
- package/dist/chunk-FDW67YTB.cjs +1 -0
- package/dist/chunk-IIL6LSMD.js +1 -0
- package/dist/chunk-KQCDKYUT.js +1 -0
- package/dist/chunk-LD2AQBY5.cjs +1 -0
- package/dist/chunk-MA224IOO.js +1 -0
- package/dist/chunk-NO2L34HN.cjs +1 -0
- package/dist/chunk-NZPTI5PT.js +1 -0
- package/dist/chunk-OGJAY53Z.js +3 -0
- package/dist/chunk-PITTEEA5.cjs +1 -0
- package/dist/{chunk-IR5RMQV3.js → chunk-R65GWR7X.js} +1 -1
- package/dist/{chunk-4QU7PZVR.js → chunk-RE7DBYTJ.js} +1 -1
- package/dist/chunk-RMVUSXL4.js +1 -0
- package/dist/{chunk-HRA6WHXJ.js → chunk-SGCANHFL.js} +1 -1
- package/dist/chunk-TDRJQ5C7.js +1 -0
- package/dist/{chunk-E3FUDKW7.cjs → chunk-TY6HIIP6.cjs} +1 -1
- package/dist/chunk-VGNJQ4UD.js +1 -0
- package/dist/chunk-WGFPSEE2.js +1 -0
- package/dist/{chunk-7JSD4M4T.js → chunk-WHPZYL6H.js} +1 -1
- package/dist/chunk-Y3Q3JZSA.cjs +3 -0
- package/dist/chunk-ZAQPH62H.cjs +1 -0
- package/dist/{chunk-YI7QU4PI.cjs → chunk-ZDXLPCJA.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- 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.d.cts +1 -0
- package/dist/signers/non-custodial/index.d.ts +1 -0
- 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 +0 -1
- package/dist/signers/non-custodial/ncs-evm-signer.d.ts +0 -1
- 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 +1 -1
- package/dist/signers/non-custodial/ncs-signer.d.ts +1 -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 +0 -1
- package/dist/signers/non-custodial/ncs-solana-signer.d.ts +0 -1
- package/dist/signers/non-custodial/ncs-solana-signer.js +1 -1
- package/dist/signers/non-custodial/ncs-stellar-signer.cjs +1 -0
- package/dist/signers/non-custodial/ncs-stellar-signer.d.cts +23 -0
- package/dist/signers/non-custodial/ncs-stellar-signer.d.ts +23 -0
- package/dist/signers/non-custodial/ncs-stellar-signer.js +1 -0
- package/dist/signers/stellar-external-wallet.cjs +1 -0
- package/dist/signers/stellar-external-wallet.d.cts +22 -0
- package/dist/signers/stellar-external-wallet.d.ts +22 -0
- package/dist/signers/stellar-external-wallet.js +1 -0
- package/dist/signers/types.d.cts +6 -6
- package/dist/signers/types.d.ts +6 -6
- package/dist/utils/constants.cjs +1 -1
- package/dist/utils/constants.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 -0
- package/dist/wallets/stellar.d.cts +27 -0
- package/dist/wallets/stellar.d.ts +27 -0
- package/dist/wallets/stellar.js +1 -0
- package/dist/wallets/types.d.cts +8 -1
- package/dist/wallets/types.d.ts +8 -1
- 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.js +1 -1
- package/package.json +4 -3
- package/dist/chunk-243LSD4S.cjs +0 -1
- package/dist/chunk-3BCOIESI.cjs +0 -1
- package/dist/chunk-3KZMFHF3.cjs +0 -1
- package/dist/chunk-4UVL6FIE.js +0 -1
- package/dist/chunk-5N5TRFG7.cjs +0 -1
- package/dist/chunk-CFYM2FJC.js +0 -1
- package/dist/chunk-H6LMJDIZ.js +0 -1
- package/dist/chunk-IB4WKCI2.cjs +0 -3
- package/dist/chunk-KXFOQTZ2.js +0 -1
- package/dist/chunk-NP4EN5GQ.js +0 -1
- package/dist/chunk-OWDKPU47.cjs +0 -1
- package/dist/chunk-PMENFEJ3.js +0 -3
- package/dist/chunk-RMIMNREY.js +0 -1
- package/dist/chunk-RS24L5AD.js +0 -1
- package/dist/chunk-TCTVRXRX.cjs +0 -1
- package/dist/chunk-YKB55ZNQ.cjs +0 -1
- /package/dist/{chunk-LTISHXFE.cjs → chunk-LO5VLDH7.cjs} +0 -0
- /package/dist/{chunk-3ABHUDKX.cjs → chunk-PO6S7UR3.cjs} +0 -0
- /package/dist/{chunk-7AFCY47Q.js → chunk-YDZRBHS3.js} +0 -0
package/dist/chunk-3KZMFHF3.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk5N5TRFG7cjs = require('./chunk-5N5TRFG7.cjs');var _chunkO4FVTK7Xcjs = require('./chunk-O4FVTK7X.cjs');var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var _commonsdkbase = require('@crossmint/common-sdk-base');var f,l,G= exports.a =class{constructor(r,t){_chunkXALFCQKDcjs.d.call(void 0, this,f);_chunkXALFCQKDcjs.d.call(void 0, this,l);let{chain:e,address:n,owner:s,signer:g,options:d}=r;_chunkXALFCQKDcjs.e.call(void 0, this,l,t),this.chain=e,this.address=n,this.owner=s,this.signer=g,_chunkXALFCQKDcjs.e.call(void 0, this,f,d)}static getApiClient(r){return r.apiClient}static getOptions(r){return r.options}get apiClient(){return _chunkXALFCQKDcjs.c.call(void 0, this,l)}get options(){return _chunkXALFCQKDcjs.c.call(void 0, this,f)}experimental_apiClient(){return _chunkXALFCQKDcjs.c.call(void 0, this,l)}balances(r,t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){let e=this.chain==="solana"?"sol":"eth",n=[e,"usdc",...r!=null?r:[]],s=yield _chunkXALFCQKDcjs.c.call(void 0, this,l).getBalance(this.address,{chains:t!=null?t:[this.chain],tokens:n.map(g=>g.toLowerCase())});if("error"in s)throw new Error(`Failed to get balances for wallet: ${JSON.stringify(s.message)}`);return this.transformBalanceResponse(s,e,r)})}transformBalanceResponse(r,t,e){let n=a=>{var m,w,v,y,S;let c=(m=a.chains)==null?void 0:m[this.chain],h="contractAddress"in c?c.contractAddress:void 0;return{symbol:(w=a.symbol)!=null?w:"",name:(v=a.symbol)!=null?v:"",amount:(y=a.amount)!=null?y:"0",contractAddress:h,decimals:a.decimals,rawAmount:(S=a.rawAmount)!=null?S:"0"}},s=r.find(a=>a.symbol===t),g=r.find(a=>a.symbol==="usdc"),d=r.filter(a=>{var c;return a.symbol!==t&&a.symbol!=="usdc"&&(e==null?void 0:e.includes((c=a.symbol)!=null?c:""))}),i=a=>({symbol:a,name:a,amount:"0",contractAddress:void 0,decimals:0,rawAmount:"0"});return{nativeToken:s!=null?n(s):i(t),usdc:g!=null?n(g):i("usdc"),tokens:d.map(n)}}experimental_nfts(r){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return yield _chunkXALFCQKDcjs.c.call(void 0, this,l).experimental_getNfts(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {},r),{chain:this.chain,address:this.address}))})}experimental_transactions(){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){let r=yield _chunkXALFCQKDcjs.c.call(void 0, this,l).getTransactions(this.walletLocator);if("error"in r)throw new Error(`Failed to get transactions: ${JSON.stringify(r.message)}`);return r})}experimental_transaction(r){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){let t=yield _chunkXALFCQKDcjs.c.call(void 0, this,l).getTransaction(this.walletLocator,r);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 r=yield this.apiClient.experimental_activity(this.walletLocator,{chain:this.chain});if("error"in r)throw new Error(`Failed to get activity: ${JSON.stringify(r.message)}`);return r})}send(r,t,e,n){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){let s=k(r),g=M(t,this.chain),d={recipient:s,amount:e},i=yield _chunkXALFCQKDcjs.c.call(void 0, this,l).send(this.walletLocator,g,d);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(r){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(r)})}approve(r){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){if(r.transactionId!=null)return yield this.approveTransactionAndWait(r.transactionId,r.options);if(r.signatureId!=null)return yield this.approveSignatureAndWait(r.signatureId,r.options);throw new Error("Either transactionId or signatureId must be provided")})}addDelegatedSigner(r){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var e;let t=yield _chunkXALFCQKDcjs.c.call(void 0, this,l).registerSigner(this.walletLocator,{signer:r.signer,chain:this.chain==="solana"?void 0:this.chain});if("error"in t)throw new Error(`Failed to register signer: ${JSON.stringify(t.message)}`);if("transaction"in t){let n=t.transaction.id;yield this.approveTransactionAndWait(n)}else{let n=(e=t.chains)==null?void 0:e[this.chain];if((n==null?void 0:n.status)==="awaiting-approval"){yield this.approveSignatureAndWait(n.id);return}if((n==null?void 0:n.status)==="pending"){yield this.waitForSignature(n.id);return}}})}delegatedSigners(){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var t,e,n;let r=yield _chunkXALFCQKDcjs.c.call(void 0, this,l).getWallet(this.walletLocator);if("error"in r)throw new (0, _chunkO4FVTK7Xcjs.d)(JSON.stringify(r));if(r.type!=="smart"||r.chainType!=="evm"&&r.chainType!=="solana")throw new (0, _chunkO4FVTK7Xcjs.c)(`Wallet type ${r.type} not supported`);return(n=(e=(t=r==null?void 0:r.config)==null?void 0:t.delegatedSigners)==null?void 0:e.map(s=>{let g=s.locator.indexOf(":");return{signer:`external-wallet:${g>=0?s.locator.slice(g+1):s.locator}`}}))!=null?n:[]})}get walletLocator(){return _chunkXALFCQKDcjs.c.call(void 0, this,l).isServerSide?this.address:`me:${this.chain==="solana"?"solana":"evm"}:smart`}get isSolanaWallet(){return this.chain==="solana"}approveTransactionAndWait(r,t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return yield this.approveTransactionInternal(r,t),yield this.sleep(1e3),yield this.waitForTransaction(r)})}approveSignatureAndWait(r,t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return yield this.approveSignatureInternal(r,t),yield this.sleep(1e3),yield this.waitForSignature(r)})}approveSignatureInternal(r,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 e=yield _chunkXALFCQKDcjs.c.call(void 0, this,l).getSignature(this.walletLocator,r);if("error"in e)throw new (0, _chunkO4FVTK7Xcjs.p)(JSON.stringify(e));if(this.signer.type==="api-key")return e;if((t==null?void 0:t.experimental_approval)!=null){let c=[t.experimental_approval];return yield this.executeApproveSignatureWithErrorHandling(r,c)}let n=(i=e.approvals)==null?void 0:i.pending;if(n==null)return e;let s=[...(a=t==null?void 0:t.additionalSigners)!=null?a:[],this.signer],d=(yield Promise.all(n.map(c=>{let h=s.find(m=>m.locator()===c.signer.locator);if(h==null)throw new (0, _chunkO4FVTK7Xcjs.i)(`Signer ${c.signer} not found in pending approvals`);return h.signMessage(c.message)}))).map(c=>_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {},c),{signer:this.signer.locator()}));return yield this.executeApproveSignatureWithErrorHandling(r,d)})}approveTransactionInternal(r,t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var i,a,c,h,m;let e=yield _chunkXALFCQKDcjs.c.call(void 0, this,l).getTransaction(this.walletLocator,r);if("error"in e)throw new (0, _chunkO4FVTK7Xcjs.s)(JSON.stringify(e));if(yield(c=(a=(i=_chunkXALFCQKDcjs.c.call(void 0, this,f))==null?void 0:i.experimental_callbacks)==null?void 0:a.onTransactionStart)==null?void 0:c.call(a),this.signer.type==="api-key")return e;if((t==null?void 0:t.experimental_approval)!=null){let w=[t.experimental_approval];return yield this.executeApproveTransactionWithErrorHandling(r,w)}let n=(h=e.approvals)==null?void 0:h.pending;if(n==null)return e;let s=[...(m=t==null?void 0:t.additionalSigners)!=null?m:[],this.signer],d=(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=e.chainType==="solana"&&"transaction"in e.onChain?e.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(r,d)})}executeApproveTransactionWithErrorHandling(r,t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){let e=yield _chunkXALFCQKDcjs.c.call(void 0, this,l).approveTransaction(this.walletLocator,r,{approvals:t});if(e.error)throw new (0, _chunkO4FVTK7Xcjs.x)(JSON.stringify(e));return e})}executeApproveSignatureWithErrorHandling(r,t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){let e=yield _chunkXALFCQKDcjs.c.call(void 0, this,l).approveSignature(this.walletLocator,r,{approvals:t});if(e.error)throw new (0, _chunkO4FVTK7Xcjs.q)(JSON.stringify(e));return e})}waitForSignature(r){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){let t=null;do if(yield new Promise(e=>setTimeout(e,_chunk5N5TRFG7cjs.d)),t=yield _chunkXALFCQKDcjs.c.call(void 0, this,l).getSignature(this.walletLocator,r),"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 t.outputSignature})}waitForTransaction(g){return _chunkXALFCQKDcjs.f.call(void 0, this,arguments,function*(r,t=6e4,{backoffMultiplier:e=1.1,maxBackoffMs:n=2e3,initialBackoffMs:s=_chunk5N5TRFG7cjs.d}={}){var c;let d=Date.now(),i;do{if(Date.now()-d>t)throw new (0, _chunkO4FVTK7Xcjs.t)("Transaction confirmation timeout");if(i=yield _chunkXALFCQKDcjs.c.call(void 0, this,l).getTransaction(this.walletLocator,r),i.error)throw new (0, _chunkO4FVTK7Xcjs.s)(JSON.stringify(i));yield this.sleep(s),s=Math.min(s*e,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:(c=i.onChain.explorerLink)!=null?c:"",transactionId:i.id}})}sleep(r){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return new Promise(t=>setTimeout(t,r))})}};f=new WeakMap,l=new WeakMap;function k(u){if(typeof u=="string")return u;if("email"in u)return`email:${u.email}`;if("x"in u)return`x:${u.x}`;if("twitter"in u)return`twitter:${u.twitter}`;if("phone"in u)return`phoneNumber:${u.phone}`;if("userId"in u)return`userId:${u.userId}`;throw new Error("Invalid recipient locator")}function M(u,r){return _commonsdkbase.isValidAddress.call(void 0, u)?`${r}:${u}`:`${r}:${u.toLowerCase()}`}exports.a = G;
|
package/dist/chunk-4UVL6FIE.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as o,b as a}from"./chunk-NP4EN5GQ.js";import{f as e}from"./chunk-BW7YYVZE.js";import{PersonalMessage as p}from"ox";import{isHex as y,toHex as l}from"viem";var g=class c extends o{constructor(n){super(n)}locator(){return this.config.locator}signMessage(n){return e(this,null,function*(){let r=y(n)?n:l(n),i=p.getSignPayload(r);return yield this.sign(i)})}signTransaction(n){return e(this,null,function*(){return yield this.sign(n)})}sign(n){return e(this,null,function*(){var s;yield this.handleAuthRequired();let r=this.getJwtOrThrow(),i=n.replace("0x",""),t=yield(s=this.config.clientTEEConnection)==null?void 0:s.sendAction({event:"request:sign",responseEvent:"response:sign",data:{authData:{jwt:r,apiKey:this.config.crossmint.apiKey},data:{keyType:"secp256k1",bytes:i,encoding:"hex"}},options:a});if((t==null?void 0:t.status)==="error")throw new Error(t.error);if((t==null?void 0:t.signature)==null)throw new Error("Failed to sign transaction");return c.verifyPublicKeyFormat(t.publicKey),{signature:t.signature.bytes}})}static verifyPublicKeyFormat(n){if(n==null)throw new Error("No public key found");if(n.encoding!=="hex"||n.keyType!=="secp256k1"||n.bytes==null)throw new Error("Not supported. Expected public key to be in hex encoding and secp256k1 key type. Got: "+JSON.stringify(n))}};export{g as a};
|
package/dist/chunk-5N5TRFG7.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var s="@crossmint/wallets-sdk",t="0.11.1";var p="WALLETS_SDK",c= exports.b =t,r= exports.c =s,d= exports.d =500;exports.a = p; exports.b = c; exports.c = r; exports.d = d;
|
package/dist/chunk-CFYM2FJC.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-4UVL6FIE.js";import{a as n}from"./chunk-KXFOQTZ2.js";import{a as o}from"./chunk-UBOWSXW3.js";import{a as s}from"./chunk-IGBQEAD5.js";import{a as t}from"./chunk-JMK64ITR.js";import{a as l}from"./chunk-LW6JSI4J.js";import{a as i}from"./chunk-5S6YZJHE.js";function x(r,e){switch(e.type){case"email":case"phone":return r==="solana"?new n(e):new a(e);case"api-key":return r==="solana"?new s(e):new l(e);case"external-wallet":return r==="solana"?new t(e):new i(e);case"passkey":return new o(e)}}export{x as a};
|
package/dist/chunk-H6LMJDIZ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as O}from"./chunk-RS24L5AD.js";import{c as W,d as N,i as E,m as P,p as x,q as _,r as $,s as L,t as I,u as F,v as B,w as J,x as R}from"./chunk-PSXRNSOE.js";import{a as T,b as A,c as p,d as b,e as C,f as o}from"./chunk-BW7YYVZE.js";import{isValidAddress as H}from"@crossmint/common-sdk-base";var f,l,G=class{constructor(r,t){b(this,f);b(this,l);let{chain:e,address:n,owner:s,signer:g,options:d}=r;C(this,l,t),this.chain=e,this.address=n,this.owner=s,this.signer=g,C(this,f,d)}static getApiClient(r){return r.apiClient}static getOptions(r){return r.options}get apiClient(){return p(this,l)}get options(){return p(this,f)}experimental_apiClient(){return p(this,l)}balances(r,t){return o(this,null,function*(){let e=this.chain==="solana"?"sol":"eth",n=[e,"usdc",...r!=null?r:[]],s=yield p(this,l).getBalance(this.address,{chains:t!=null?t:[this.chain],tokens:n.map(g=>g.toLowerCase())});if("error"in s)throw new Error(`Failed to get balances for wallet: ${JSON.stringify(s.message)}`);return this.transformBalanceResponse(s,e,r)})}transformBalanceResponse(r,t,e){let n=a=>{var m,w,v,y,S;let c=(m=a.chains)==null?void 0:m[this.chain],h="contractAddress"in c?c.contractAddress:void 0;return{symbol:(w=a.symbol)!=null?w:"",name:(v=a.symbol)!=null?v:"",amount:(y=a.amount)!=null?y:"0",contractAddress:h,decimals:a.decimals,rawAmount:(S=a.rawAmount)!=null?S:"0"}},s=r.find(a=>a.symbol===t),g=r.find(a=>a.symbol==="usdc"),d=r.filter(a=>{var c;return a.symbol!==t&&a.symbol!=="usdc"&&(e==null?void 0:e.includes((c=a.symbol)!=null?c:""))}),i=a=>({symbol:a,name:a,amount:"0",contractAddress:void 0,decimals:0,rawAmount:"0"});return{nativeToken:s!=null?n(s):i(t),usdc:g!=null?n(g):i("usdc"),tokens:d.map(n)}}experimental_nfts(r){return o(this,null,function*(){return yield p(this,l).experimental_getNfts(A(T({},r),{chain:this.chain,address:this.address}))})}experimental_transactions(){return o(this,null,function*(){let r=yield p(this,l).getTransactions(this.walletLocator);if("error"in r)throw new Error(`Failed to get transactions: ${JSON.stringify(r.message)}`);return r})}experimental_transaction(r){return o(this,null,function*(){let t=yield p(this,l).getTransaction(this.walletLocator,r);if("error"in t)throw new Error(`Failed to get transaction: ${JSON.stringify(t.error)}`);return t})}experimental_activity(){return o(this,null,function*(){let r=yield this.apiClient.experimental_activity(this.walletLocator,{chain:this.chain});if("error"in r)throw new Error(`Failed to get activity: ${JSON.stringify(r.message)}`);return r})}send(r,t,e,n){return o(this,null,function*(){let s=k(r),g=M(t,this.chain),d={recipient:s,amount:e},i=yield p(this,l).send(this.walletLocator,g,d);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(r){return o(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(r)})}approve(r){return o(this,null,function*(){if(r.transactionId!=null)return yield this.approveTransactionAndWait(r.transactionId,r.options);if(r.signatureId!=null)return yield this.approveSignatureAndWait(r.signatureId,r.options);throw new Error("Either transactionId or signatureId must be provided")})}addDelegatedSigner(r){return o(this,null,function*(){var e;let t=yield p(this,l).registerSigner(this.walletLocator,{signer:r.signer,chain:this.chain==="solana"?void 0:this.chain});if("error"in t)throw new Error(`Failed to register signer: ${JSON.stringify(t.message)}`);if("transaction"in t){let n=t.transaction.id;yield this.approveTransactionAndWait(n)}else{let n=(e=t.chains)==null?void 0:e[this.chain];if((n==null?void 0:n.status)==="awaiting-approval"){yield this.approveSignatureAndWait(n.id);return}if((n==null?void 0:n.status)==="pending"){yield this.waitForSignature(n.id);return}}})}delegatedSigners(){return o(this,null,function*(){var t,e,n;let r=yield p(this,l).getWallet(this.walletLocator);if("error"in r)throw new N(JSON.stringify(r));if(r.type!=="smart"||r.chainType!=="evm"&&r.chainType!=="solana")throw new W(`Wallet type ${r.type} not supported`);return(n=(e=(t=r==null?void 0:r.config)==null?void 0:t.delegatedSigners)==null?void 0:e.map(s=>{let g=s.locator.indexOf(":");return{signer:`external-wallet:${g>=0?s.locator.slice(g+1):s.locator}`}}))!=null?n:[]})}get walletLocator(){return p(this,l).isServerSide?this.address:`me:${this.chain==="solana"?"solana":"evm"}:smart`}get isSolanaWallet(){return this.chain==="solana"}approveTransactionAndWait(r,t){return o(this,null,function*(){return yield this.approveTransactionInternal(r,t),yield this.sleep(1e3),yield this.waitForTransaction(r)})}approveSignatureAndWait(r,t){return o(this,null,function*(){return yield this.approveSignatureInternal(r,t),yield this.sleep(1e3),yield this.waitForSignature(r)})}approveSignatureInternal(r,t){return o(this,null,function*(){var i,a;if(this.isSolanaWallet)throw new Error("Approving signatures is only supported for EVM smart wallets");let e=yield p(this,l).getSignature(this.walletLocator,r);if("error"in e)throw new x(JSON.stringify(e));if(this.signer.type==="api-key")return e;if((t==null?void 0:t.experimental_approval)!=null){let c=[t.experimental_approval];return yield this.executeApproveSignatureWithErrorHandling(r,c)}let n=(i=e.approvals)==null?void 0:i.pending;if(n==null)return e;let s=[...(a=t==null?void 0:t.additionalSigners)!=null?a:[],this.signer],d=(yield Promise.all(n.map(c=>{let h=s.find(m=>m.locator()===c.signer.locator);if(h==null)throw new E(`Signer ${c.signer} not found in pending approvals`);return h.signMessage(c.message)}))).map(c=>A(T({},c),{signer:this.signer.locator()}));return yield this.executeApproveSignatureWithErrorHandling(r,d)})}approveTransactionInternal(r,t){return o(this,null,function*(){var i,a,c,h,m;let e=yield p(this,l).getTransaction(this.walletLocator,r);if("error"in e)throw new L(JSON.stringify(e));if(yield(c=(a=(i=p(this,f))==null?void 0:i.experimental_callbacks)==null?void 0:a.onTransactionStart)==null?void 0:c.call(a),this.signer.type==="api-key")return e;if((t==null?void 0:t.experimental_approval)!=null){let w=[t.experimental_approval];return yield this.executeApproveTransactionWithErrorHandling(r,w)}let n=(h=e.approvals)==null?void 0:h.pending;if(n==null)return e;let s=[...(m=t==null?void 0:t.additionalSigners)!=null?m:[],this.signer],d=(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=e.chainType==="solana"&&"transaction"in e.onChain?e.onChain.transaction:w.message;return v.signTransaction(y)}))).map(w=>A(T({},w),{signer:this.signer.locator()}));return yield this.executeApproveTransactionWithErrorHandling(r,d)})}executeApproveTransactionWithErrorHandling(r,t){return o(this,null,function*(){let e=yield p(this,l).approveTransaction(this.walletLocator,r,{approvals:t});if(e.error)throw new R(JSON.stringify(e));return e})}executeApproveSignatureWithErrorHandling(r,t){return o(this,null,function*(){let e=yield p(this,l).approveSignature(this.walletLocator,r,{approvals:t});if(e.error)throw new _(JSON.stringify(e));return e})}waitForSignature(r){return o(this,null,function*(){let t=null;do if(yield new Promise(e=>setTimeout(e,O)),t=yield p(this,l).getSignature(this.walletLocator,r),"error"in t)throw new x(JSON.stringify(t));while(t===null||t.status==="pending");if(t.status==="failed")throw new P("Signature signing failed");if(!t.outputSignature)throw new x("Signature not available");return t.outputSignature})}waitForTransaction(g){return o(this,arguments,function*(r,t=6e4,{backoffMultiplier:e=1.1,maxBackoffMs:n=2e3,initialBackoffMs:s=O}={}){var c;let d=Date.now(),i;do{if(Date.now()-d>t)throw new I("Transaction confirmation timeout");if(i=yield p(this,l).getTransaction(this.walletLocator,r),i.error)throw new L(JSON.stringify(i));yield this.sleep(s),s=Math.min(s*e,n)}while(i.status==="pending");if(i.status==="failed")throw new F(`Transaction sending failed: ${JSON.stringify(i.error)}`);if(i.status==="awaiting-approval")throw new B("Transaction is awaiting approval. Please submit required approvals before waiting for completion.");let a=i.onChain.txId;if(a==null)throw new J("Transaction hash not found on transaction response");return{hash:a,explorerLink:(c=i.onChain.explorerLink)!=null?c:"",transactionId:i.id}})}sleep(r){return o(this,null,function*(){return new Promise(t=>setTimeout(t,r))})}};f=new WeakMap,l=new WeakMap;function k(u){if(typeof u=="string")return u;if("email"in u)return`email:${u.email}`;if("x"in u)return`x:${u.x}`;if("twitter"in u)return`twitter:${u.twitter}`;if("phone"in u)return`phoneNumber:${u.phone}`;if("userId"in u)return`userId:${u.userId}`;throw new Error("Invalid recipient locator")}function M(u,r){return H(u)?`${r}:${u}`:`${r}:${u.toLowerCase()}`}export{G as a};
|
package/dist/chunk-IB4WKCI2.cjs
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk3KZMFHF3cjs = require('./chunk-3KZMFHF3.cjs');var _chunkYKB55ZNQcjs = require('./chunk-YKB55ZNQ.cjs');var _chunk23BRREJGcjs = require('./chunk-23BRREJG.cjs');var _chunkO4FVTK7Xcjs = require('./chunk-O4FVTK7X.cjs');var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var _ox = require('ox');var S=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=yield this.apiClient.getWallet(`me:${e.chain==="solana"?"solana":"evm"}:smart`);return i!=null&&!("error"in i)?this.createWalletInstance(i,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,r,o,l;yield(o=(r=(t=e.options)==null?void 0:t.experimental_callbacks)==null?void 0:r.onWalletCreationStart)==null?void 0:o.call(r),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:e.chain==="solana"?"solana":"evm",config:{adminSigner:i},owner:(l=e.owner)!=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, _chunk3KZMFHF3cjs.a)({chain:i.chain,address:e.address,owner:e.owner,signer:_chunkYKB55ZNQcjs.a.call(void 0, i.chain,n),options:i.options},this.apiClient)}toInternalSignerConfig(e,i,n){var t,r,o,l,C,g;if(!(e.chainType==="evm"||e.chainType==="solana"))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(((r=e.config)==null?void 0:r.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(((o=e.config)==null?void 0:o.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(((l=e.config)==null?void 0:l.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(((C=e.config)==null?void 0:C.adminSigner.type)!=="email")throw new (0, _chunkO4FVTK7Xcjs.f)("Email signer does not match the wallet's signer type");let{locator:c,email:h}=e.config.adminSigner;return{type:"email",email:h,locator:c,crossmint:this.apiClient.crossmint,onAuthRequired:i.onAuthRequired,clientTEEConnection:n==null?void 0:n.clientTEEConnection}}case"phone":{if(((g=e.config)==null?void 0:g.adminSigner.type)!=="phone")throw new (0, _chunkO4FVTK7Xcjs.f)("Phone signer does not match the wallet's signer type");let{locator:c,phone:h}=e.config.adminSigner;return{type:"phone",phone:h,locator:c,crossmint:this.apiClient.crossmint,onAuthRequired:i.onAuthRequired,clientTEEConnection:n==null?void 0:n.clientTEEConnection}}default:throw new Error("Invalid signer type")}}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,r;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=(r=e.signer.phone)!=null?r: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 r;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")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=(r=e==null?void 0:e.config)==null?void 0:r.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");_chunk23BRREJGcjs.a.call(void 0, n,t)}}};exports.a = S;
|
package/dist/chunk-KXFOQTZ2.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as i,b as o}from"./chunk-NP4EN5GQ.js";import{f as t}from"./chunk-BW7YYVZE.js";import{VersionedTransaction as y}from"@solana/web3.js";import s from"bs58";var a=class g extends i{constructor(e){super(e)}locator(){return this.config.locator}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=s.decode(e),l=y.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:s.encode(l),encoding:"base58"}},options:o});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))}};export{a};
|
package/dist/chunk-NP4EN5GQ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as l}from"./chunk-JUSY5XEE.js";import{a as u}from"./chunk-M4ELAV7U.js";import{f as c}from"./chunk-BW7YYVZE.js";import{validateAPIKey as m}from"@crossmint/common-sdk-base";var d=class{constructor(t){this.config=t;this._needsAuth=!0;this._authPromise=null;this.initialize(),this.type=this.config.type}initialize(){return c(this,null,function*(){if(this.config.clientTEEConnection==null){let t=m(this.config.crossmint.apiKey);if(!t.isValid)throw new Error("Invalid API key");let r=new l({environment:t.environment});this.config.clientTEEConnection=yield r.initialize()}})}handleAuthRequired(){return c(this,null,function*(){var o,s,a;if(this.config.clientTEEConnection==null)throw this.config.onAuthRequired==null?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, sendOtp, verifyOtp, reject) => { /* your UI logic */ }`):new Error("Handshake parent not initialized");let t=yield(a=this.config.clientTEEConnection)==null?void 0:a.sendAction({event:"request:get-status",responseEvent:"response:get-status",data:{authData:{jwt:(s=(o=this.config.crossmint.experimental_customAuth)==null?void 0:o.jwt)!=null?s:"",apiKey:this.config.crossmint.apiKey}},options:h});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}let{promise:r,resolve:i,reject:n}=this.createAuthPromise();if(this._authPromise={promise:r,resolve:i,reject:n},this.config.onAuthRequired)try{yield this.config.onAuthRequired(this._needsAuth,()=>this.sendMessageWithOtp(),e=>this.verifyOtp(e),()=>n(new u))}catch(e){n(e)}try{yield r}catch(e){throw e}})}getJwtOrThrow(){var r;let t=(r=this.config.crossmint.experimental_customAuth)==null?void 0:r.jwt;if(t==null)throw new Error("JWT is required");return t}createAuthPromise(){let t,r;return{promise:new Promise((n,o)=>{t=n,r=o}),resolve:t,reject:r}}sendMessageWithOtp(){return c(this,null,function*(){var n,o,s;if(this.config.clientTEEConnection==null)throw new Error("Handshake parent not initialized");let t=this.config.clientTEEConnection,r=this.getAuthId(),i=yield t.sendAction({event:"request:start-onboarding",responseEvent:"response:start-onboarding",data:{authData:{jwt:(o=(n=this.config.crossmint.experimental_customAuth)==null?void 0:n.jwt)!=null?o:"",apiKey:this.config.crossmint.apiKey},data:{authId:r}},options:h});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),(s=this._authPromise)==null||s.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(t){return c(this,null,function*(){var i,n,o,s,a;if(this.config.clientTEEConnection==null)throw new Error("Handshake parent not initialized");let r=this.config.clientTEEConnection;try{let e=yield r.sendAction({event:"request:complete-onboarding",responseEvent:"response:complete-onboarding",data:{authData:{jwt:(n=(i=this.config.crossmint.experimental_customAuth)==null?void 0:i.jwt)!=null?n:"",apiKey:this.config.crossmint.apiKey},data:{onboardingAuthentication:{encryptedOtp:t}}},options:h});if((e==null?void 0:e.status)==="success"){this._needsAuth=!1,(o=this._authPromise)==null||o.resolve();return}console.error("[verifyOtp] Failed to validate OTP:",e),this._needsAuth=!0;let g=(e==null?void 0:e.status)==="error"?e.error:"Failed to validate encrypted OTP";(s=this._authPromise)==null||s.reject(new Error(g))}catch(e){throw console.error("[verifyOtp] Error sending OTP validation request:",e),this._needsAuth=!0,(a=this._authPromise)==null||a.reject(e),e}})}},h={timeoutMs:1e4,intervalMs:5e3};export{d as a,h as b};
|
package/dist/chunk-OWDKPU47.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkMQP5VZCAcjs = require('./chunk-MQP5VZCA.cjs');var _chunkZSWIQU3Ucjs = require('./chunk-ZSWIQU3U.cjs');var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var _commonsdkbase = require('@crossmint/common-sdk-base');var d=class{constructor(t){this.config=t;this._needsAuth=!0;this._authPromise=null;this.initialize(),this.type=this.config.type}initialize(){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){if(this.config.clientTEEConnection==null){let t=_commonsdkbase.validateAPIKey.call(void 0, this.config.crossmint.apiKey);if(!t.isValid)throw new Error("Invalid API key");let r=new (0, _chunkMQP5VZCAcjs.a)({environment:t.environment});this.config.clientTEEConnection=yield r.initialize()}})}handleAuthRequired(){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var o,s,a;if(this.config.clientTEEConnection==null)throw this.config.onAuthRequired==null?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, sendOtp, verifyOtp, reject) => { /* your UI logic */ }`):new Error("Handshake parent not initialized");let t=yield(a=this.config.clientTEEConnection)==null?void 0:a.sendAction({event:"request:get-status",responseEvent:"response:get-status",data:{authData:{jwt:(s=(o=this.config.crossmint.experimental_customAuth)==null?void 0:o.jwt)!=null?s:"",apiKey:this.config.crossmint.apiKey}},options:h});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}let{promise:r,resolve:i,reject:n}=this.createAuthPromise();if(this._authPromise={promise:r,resolve:i,reject:n},this.config.onAuthRequired)try{yield this.config.onAuthRequired(this._needsAuth,()=>this.sendMessageWithOtp(),e=>this.verifyOtp(e),()=>n(new _chunkZSWIQU3Ucjs.a))}catch(e){n(e)}try{yield r}catch(e){throw e}})}getJwtOrThrow(){var r;let t=(r=this.config.crossmint.experimental_customAuth)==null?void 0:r.jwt;if(t==null)throw new Error("JWT is required");return t}createAuthPromise(){let t,r;return{promise:new Promise((n,o)=>{t=n,r=o}),resolve:t,reject:r}}sendMessageWithOtp(){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var n,o,s;if(this.config.clientTEEConnection==null)throw new Error("Handshake parent not initialized");let t=this.config.clientTEEConnection,r=this.getAuthId(),i=yield t.sendAction({event:"request:start-onboarding",responseEvent:"response:start-onboarding",data:{authData:{jwt:(o=(n=this.config.crossmint.experimental_customAuth)==null?void 0:n.jwt)!=null?o:"",apiKey:this.config.crossmint.apiKey},data:{authId:r}},options:h});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),(s=this._authPromise)==null||s.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(t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var i,n,o,s,a;if(this.config.clientTEEConnection==null)throw new Error("Handshake parent not initialized");let r=this.config.clientTEEConnection;try{let e=yield r.sendAction({event:"request:complete-onboarding",responseEvent:"response:complete-onboarding",data:{authData:{jwt:(n=(i=this.config.crossmint.experimental_customAuth)==null?void 0:i.jwt)!=null?n:"",apiKey:this.config.crossmint.apiKey},data:{onboardingAuthentication:{encryptedOtp:t}}},options:h});if((e==null?void 0:e.status)==="success"){this._needsAuth=!1,(o=this._authPromise)==null||o.resolve();return}console.error("[verifyOtp] Failed to validate OTP:",e),this._needsAuth=!0;let g=(e==null?void 0:e.status)==="error"?e.error:"Failed to validate encrypted OTP";(s=this._authPromise)==null||s.reject(new Error(g))}catch(e){throw console.error("[verifyOtp] Error sending OTP validation request:",e),this._needsAuth=!0,(a=this._authPromise)==null||a.reject(e),e}})}},h= exports.b ={timeoutMs:1e4,intervalMs:5e3};exports.a = d; exports.b = h;
|
package/dist/chunk-PMENFEJ3.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a as p}from"./chunk-H6LMJDIZ.js";import{a as d}from"./chunk-CFYM2FJC.js";import{a as f}from"./chunk-BHGNJYYE.js";import{d as y,f as a}from"./chunk-PSXRNSOE.js";import{a as m,f as s}from"./chunk-BW7YYVZE.js";import{WebAuthnP256 as u}from"ox";var S=class{constructor(e){this.apiClient=e}getOrCreateWallet(e){return s(this,null,function*(){if(this.apiClient.isServerSide)throw new a(`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=yield this.apiClient.getWallet(`me:${e.chain==="solana"?"solana":"evm"}:smart`);return i!=null&&!("error"in i)?this.createWalletInstance(i,e):this.createWallet(e)})}getWallet(e,i){return s(this,null,function*(){if(!this.apiClient.isServerSide)throw new a("getWallet is not supported on client side, use getOrCreateWallet instead");let n=yield this.apiClient.getWallet(e);if("error"in n)throw new y(JSON.stringify(n));return this.createWalletInstance(n,i)})}createWallet(e){return s(this,null,function*(){var t,r,o,l;yield(o=(r=(t=e.options)==null?void 0:t.experimental_callbacks)==null?void 0:r.onWalletCreationStart)==null?void 0:o.call(r),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:e.chain==="solana"?"solana":"evm",config:{adminSigner:i},owner:(l=e.owner)!=null?l:void 0});if("error"in n)throw new a(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 p({chain:i.chain,address:e.address,owner:e.owner,signer:d(i.chain,n),options:i.options},this.apiClient)}toInternalSignerConfig(e,i,n){var t,r,o,l,C,g;if(!(e.chainType==="evm"||e.chainType==="solana"))throw new a(`Wallet type ${e.chainType} is not supported`);if(i==null&&((t=e.config)==null?void 0:t.adminSigner)==null)throw new a("Signer is required to create a wallet");switch(i.type){case"api-key":{if(((r=e.config)==null?void 0:r.adminSigner.type)!=="api-key")throw new a("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(((o=e.config)==null?void 0:o.adminSigner.type)!=="external-wallet")throw new a("External wallet signer does not match the wallet's signer type");return m(m({},e.config.adminSigner),i);case"passkey":if(((l=e.config)==null?void 0:l.adminSigner.type)!=="passkey")throw new a("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(((C=e.config)==null?void 0:C.adminSigner.type)!=="email")throw new a("Email signer does not match the wallet's signer type");let{locator:c,email:h}=e.config.adminSigner;return{type:"email",email:h,locator:c,crossmint:this.apiClient.crossmint,onAuthRequired:i.onAuthRequired,clientTEEConnection:n==null?void 0:n.clientTEEConnection}}case"phone":{if(((g=e.config)==null?void 0:g.adminSigner.type)!=="phone")throw new a("Phone signer does not match the wallet's signer type");let{locator:c,phone:h}=e.config.adminSigner;return{type:"phone",phone:h,locator:c,crossmint:this.apiClient.crossmint,onAuthRequired:i.onAuthRequired,clientTEEConnection:n==null?void 0:n.clientTEEConnection}}default:throw new Error("Invalid signer type")}}createPasskeyAdminSigner(e){return s(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 u.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,r;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=(r=e.signer.phone)!=null?r: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 r;if(this.mutateSignerFromCustomAuth(i),i.owner!=null&&e.owner!=null&&i.owner!==e.owner)throw new a("Wallet owner does not match existing wallet's linked user");if(i.chain==="solana"&&e.chainType!=="solana"||i.chain!=="solana"&&e.chainType==="solana")throw new a(`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=(r=e==null?void 0:e.config)==null?void 0:r.adminSigner;if(n!=null&&t!=null){if(n.type!==t.type)throw new a("The wallet signer type provided in the wallet config does not match the existing wallet's adminSigner type");f(n,t)}}};export{S as a};
|
package/dist/chunk-RMIMNREY.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as l}from"./chunk-5M7IRODB.js";import{a as t,b as o}from"./chunk-BW7YYVZE.js";var i=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/v1-alpha2/wallets/me{walletType}/transactions/{transactionId}/approvals"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},C=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/v1-alpha2/wallets/me{walletType}/transactions/{transactionId}"},e))},p=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/v1-alpha2/wallets/me{walletType}/transactions"},e))},W=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/v1-alpha2/wallets/me{walletType}/transactions"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},c=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/v1-alpha2/wallets/me{walletType}/signers/{signer}"},e))},u=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/v1-alpha2/wallets/me{walletType}/signers"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},V=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/v1-alpha2/wallets/me{walletType}/signatures/{signatureId}/approvals"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},w=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/v1-alpha2/wallets/me{walletType}/signatures/{signatureId}"},e))},T=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/v1-alpha2/wallets/me{walletType}/signatures"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},h=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/v1-alpha2/wallets/me{walletType}/activity"},e))},g=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/v1-alpha2/wallets/me{walletType}"},e))},E=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/v1-alpha2/wallets/me"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},S=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/v1-alpha2/wallets/{walletLocator}/transactions/{transactionId}/approvals"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},O=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/v1-alpha2/wallets/{walletLocator}/transactions/{transactionId}"},e))},d=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/v1-alpha2/wallets/{walletLocator}/transactions"},e))},G=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/v1-alpha2/wallets/{walletLocator}/transactions"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},D=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/v1-alpha2/wallets/{walletLocator}/signers/{signer}"},e))},M=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/v1-alpha2/wallets/{walletLocator}/signers"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},R=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/v1-alpha2/wallets/{walletLocator}/signatures/{signatureId}/approvals"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},b=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/v1-alpha2/wallets/{walletLocator}/signatures/{signatureId}"},e))},x=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/v1-alpha2/wallets/{walletLocator}/signatures"},e))},v=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/v1-alpha2/wallets/{walletLocator}/signatures"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},A=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/v1-alpha2/wallets/{walletLocator}/balances"},e))},m=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/v1-alpha2/wallets/{walletLocator}/balances"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},y=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/v1-alpha2/wallets/{walletLocator}/activity"},e))},f=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/v1-alpha2/wallets/{walletLocator}"},e))},L=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/v1-alpha2/wallets"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},B=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/unstable/wallets/me{walletType}/tokens/{tokenLocator}/transfers"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},k=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/unstable/wallets/{walletLocator}/tokens/{tokenLocator}/transfers"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},q=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/unstable/wallets/{walletLocator}/balances"},e))},j=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2025-06-09/wallets/me{walletLocator}/transactions/{transactionId}/approvals"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},F=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2025-06-09/wallets/me{walletLocator}/transactions/{transactionId}"},e))},I=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2025-06-09/wallets/me{walletLocator}/transactions"},e))},N=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2025-06-09/wallets/me{walletLocator}/transactions"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},U=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2025-06-09/wallets/me{walletLocator}/tokens/{tokenLocator}/transfers"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},_=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2025-06-09/wallets/me{walletLocator}/signers/{signer}"},e))},z=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2025-06-09/wallets/me{walletLocator}/signers"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},H=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2025-06-09/wallets/me{walletLocator}/signatures/{signatureId}/approvals"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},J=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2025-06-09/wallets/me{walletLocator}/signatures/{signatureId}"},e))},K=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2025-06-09/wallets/me{walletLocator}/signatures"},e))},P=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2025-06-09/wallets/me{walletLocator}/signatures"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},Q=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2025-06-09/wallets/{walletLocator}/balances"},e))},X=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2025-06-09/wallets/me{walletLocator}"},e))},Y=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2025-06-09/wallets/me"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},Z=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2025-06-09/wallets/{walletLocator}/transactions/{transactionId}/approvals"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},$=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2025-06-09/wallets/{walletLocator}/transactions/{transactionId}"},e))},ee=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2025-06-09/wallets/{walletLocator}/transactions"},e))},re=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2025-06-09/wallets/{walletLocator}/transactions"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},te=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2025-06-09/wallets/{walletLocator}/tokens/{tokenLocator}/transfers"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},le=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2025-06-09/wallets/{walletLocator}/signers/{signer}"},e))},oe=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2025-06-09/wallets/{walletLocator}/signers"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},ae=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2025-06-09/wallets/{walletLocator}/signatures/{signatureId}/approvals"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},ne=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2025-06-09/wallets/{walletLocator}/signatures/{signatureId}"},e))},se=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2025-06-09/wallets/{walletLocator}/signatures"},e))},ie=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2025-06-09/wallets/{walletLocator}/signatures"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},Ce=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2025-06-09/wallets/{walletLocator}/activity"},e))},pe=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2025-06-09/wallets/{walletLocator}"},e))},We=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2025-06-09/wallets"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},ce=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2022-06-09/wallets/me{walletType}/transactions/{transactionId}/approvals"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},ue=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2022-06-09/wallets/me{walletType}/transactions/{transactionId}"},e))},Ve=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2022-06-09/wallets/me{walletType}/transactions"},e))},we=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2022-06-09/wallets/me{walletType}/transactions"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},Te=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2022-06-09/wallets/me{walletType}/signers/{signer}"},e))},he=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2022-06-09/wallets/me{walletType}/signers"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},ge=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2022-06-09/wallets/me{walletType}/signatures/{signatureId}/approvals"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},Ee=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2022-06-09/wallets/me{walletType}/signatures/{signatureId}"},e))},Se=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2022-06-09/wallets/me{walletType}/signatures"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},Oe=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2022-06-09/wallets/me{walletType}/activity"},e))},de=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2022-06-09/wallets/me{walletType}"},e))},Ge=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2022-06-09/wallets/me"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},De=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2022-06-09/wallets/{walletLocator}/transactions/{transactionId}/approvals"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},Me=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2022-06-09/wallets/{walletLocator}/transactions/{transactionId}"},e))},Re=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2022-06-09/wallets/{walletLocator}/transactions"},e))},be=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2022-06-09/wallets/{walletLocator}/transactions"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},xe=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2022-06-09/wallets/{walletLocator}/signers/{signer}"},e))},ve=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2022-06-09/wallets/{walletLocator}/signers"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},Ae=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2022-06-09/wallets/{walletLocator}/signatures/{signatureId}/approvals"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},me=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2022-06-09/wallets/{walletLocator}/signatures/{signatureId}"},e))},ye=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2022-06-09/wallets/{walletLocator}/signatures"},e))},fe=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2022-06-09/wallets/{walletLocator}/signatures"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},Le=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2022-06-09/wallets/{walletLocator}/activity"},e))},Be=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2022-06-09/wallets/{walletLocator}"},e))},ke=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2022-06-09/wallets/{locator}/nfts"},e))},qe=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2022-06-09/wallets"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))};export{i as a,C as b,p as c,W as d,c as e,u as f,V as g,w as h,T as i,h as j,g as k,E as l,S as m,O as n,d as o,G as p,D as q,M as r,R as s,b as t,x as u,v,A as w,m as x,y,f as z,L as A,B,k as C,q as D,j as E,F,I as G,N as H,U as I,_ as J,z as K,H as L,J as M,K as N,P as O,Q as P,X as Q,Y as R,Z as S,$ as T,ee as U,re as V,te as W,le as X,oe as Y,ae as Z,ne as _,se as $,ie as aa,Ce as ba,pe as ca,We as da,ce as ea,ue as fa,Ve as ga,we as ha,Te as ia,he as ja,ge as ka,Ee as la,Se as ma,Oe as na,de as oa,Ge as pa,De as qa,Me as ra,Re as sa,be as ta,xe as ua,ve as va,Ae as wa,me as xa,ye as ya,fe as za,Le as Aa,Be as Ba,ke as Ca,qe as Da};
|
package/dist/chunk-RS24L5AD.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var s="@crossmint/wallets-sdk",t="0.11.1";var c="WALLETS_SDK",r=t,d=s,a=500;export{c as a,r as b,d as c,a as d};
|
package/dist/chunk-TCTVRXRX.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkSTYSP6KLcjs = require('./chunk-STYSP6KL.cjs');var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var s=e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/me{walletType}/transactions/{transactionId}/approvals"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},i= exports.b =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/me{walletType}/transactions/{transactionId}"},e))},C= exports.c =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/me{walletType}/transactions"},e))},p= exports.d =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/me{walletType}/transactions"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},W= exports.e =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/me{walletType}/signers/{signer}"},e))},c= exports.f =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/me{walletType}/signers"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},u= exports.g =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/me{walletType}/signatures/{signatureId}/approvals"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},V= exports.h =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/me{walletType}/signatures/{signatureId}"},e))},w= exports.i =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/me{walletType}/signatures"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},T= exports.j =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/me{walletType}/activity"},e))},h= exports.k =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/me{walletType}"},e))},g= exports.l =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/me"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},E= exports.m =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/transactions/{transactionId}/approvals"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},S= exports.n =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/transactions/{transactionId}"},e))},O= exports.o =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/transactions"},e))},d= exports.p =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/transactions"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},G= exports.q =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/signers/{signer}"},e))},D= exports.r =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/signers"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},M= exports.s =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/signatures/{signatureId}/approvals"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},R= exports.t =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/signatures/{signatureId}"},e))},b= exports.u =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/signatures"},e))},x= exports.v =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/signatures"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},v= exports.w =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/balances"},e))},A= exports.x =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/balances"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},m= exports.y =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/activity"},e))},y= exports.z =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}"},e))},f= exports.A =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},L= exports.B =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/unstable/wallets/me{walletType}/tokens/{tokenLocator}/transfers"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},B= exports.C =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/unstable/wallets/{walletLocator}/tokens/{tokenLocator}/transfers"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},k= exports.D =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/unstable/wallets/{walletLocator}/balances"},e))},q= exports.E =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me{walletLocator}/transactions/{transactionId}/approvals"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},j= exports.F =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me{walletLocator}/transactions/{transactionId}"},e))},F= exports.G =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me{walletLocator}/transactions"},e))},I= exports.H =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me{walletLocator}/transactions"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},N= exports.I =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me{walletLocator}/tokens/{tokenLocator}/transfers"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},U= exports.J =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me{walletLocator}/signers/{signer}"},e))},_= exports.K =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me{walletLocator}/signers"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},z= exports.L =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me{walletLocator}/signatures/{signatureId}/approvals"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},H= exports.M =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me{walletLocator}/signatures/{signatureId}"},e))},J= exports.N =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me{walletLocator}/signatures"},e))},K= exports.O =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me{walletLocator}/signatures"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},P= exports.P =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/balances"},e))},Q= exports.Q =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me{walletLocator}"},e))},X= exports.R =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},Y= exports.S =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/transactions/{transactionId}/approvals"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},Z= exports.T =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/transactions/{transactionId}"},e))},$= exports.U =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/transactions"},e))},ee= exports.V =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/transactions"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},re= exports.W =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/tokens/{tokenLocator}/transfers"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},te= exports.X =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/signers/{signer}"},e))},le= exports.Y =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/signers"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},oe= exports.Z =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/signatures/{signatureId}/approvals"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},ae= exports._ =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/signatures/{signatureId}"},e))},ne= exports.$ =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/signatures"},e))},se= exports.aa =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/signatures"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},ie= exports.ba =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/activity"},e))},Ce= exports.ca =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}"},e))},pe= exports.da =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},We= exports.ea =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/me{walletType}/transactions/{transactionId}/approvals"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},ce= exports.fa =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/me{walletType}/transactions/{transactionId}"},e))},ue= exports.ga =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/me{walletType}/transactions"},e))},Ve= exports.ha =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/me{walletType}/transactions"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},we= exports.ia =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/me{walletType}/signers/{signer}"},e))},Te= exports.ja =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/me{walletType}/signers"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},he= exports.ka =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/me{walletType}/signatures/{signatureId}/approvals"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},ge= exports.la =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/me{walletType}/signatures/{signatureId}"},e))},Ee= exports.ma =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/me{walletType}/signatures"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},Se= exports.na =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/me{walletType}/activity"},e))},Oe= exports.oa =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/me{walletType}"},e))},de= exports.pa =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/me"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},Ge= exports.qa =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{walletLocator}/transactions/{transactionId}/approvals"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},De= exports.ra =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{walletLocator}/transactions/{transactionId}"},e))},Me= exports.sa =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{walletLocator}/transactions"},e))},Re= exports.ta =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{walletLocator}/transactions"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},be= exports.ua =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{walletLocator}/signers/{signer}"},e))},xe= exports.va =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{walletLocator}/signers"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},ve= exports.wa =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{walletLocator}/signatures/{signatureId}/approvals"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},Ae= exports.xa =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{walletLocator}/signatures/{signatureId}"},e))},me= exports.ya =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{walletLocator}/signatures"},e))},ye= exports.za =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{walletLocator}/signatures"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},fe= exports.Aa =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{walletLocator}/activity"},e))},Le= exports.Ba =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{walletLocator}"},e))},Be= exports.Ca =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{locator}/nfts"},e))},ke= exports.Da =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))};exports.a = s; exports.b = i; exports.c = C; exports.d = p; exports.e = W; exports.f = c; exports.g = u; exports.h = V; exports.i = w; exports.j = T; exports.k = h; exports.l = g; exports.m = E; exports.n = S; exports.o = O; exports.p = d; exports.q = G; exports.r = D; exports.s = M; exports.t = R; exports.u = b; exports.v = x; exports.w = v; exports.x = A; exports.y = m; exports.z = y; exports.A = f; exports.B = L; exports.C = B; exports.D = k; exports.E = q; exports.F = j; exports.G = F; exports.H = I; exports.I = N; exports.J = U; exports.K = _; exports.L = z; exports.M = H; exports.N = J; exports.O = K; exports.P = P; exports.Q = Q; exports.R = X; exports.S = Y; exports.T = Z; exports.U = $; exports.V = ee; exports.W = re; exports.X = te; exports.Y = le; exports.Z = oe; exports._ = ae; exports.$ = ne; exports.aa = se; exports.ba = ie; exports.ca = Ce; exports.da = pe; exports.ea = We; exports.fa = ce; exports.ga = ue; exports.ha = Ve; exports.ia = we; exports.ja = Te; exports.ka = he; exports.la = ge; exports.ma = Ee; exports.na = Se; exports.oa = Oe; exports.pa = de; exports.qa = Ge; exports.ra = De; exports.sa = Me; exports.ta = Re; exports.ua = be; exports.va = xe; exports.wa = ve; exports.xa = Ae; exports.ya = me; exports.za = ye; exports.Aa = fe; exports.Ba = Le; exports.Ca = Be; exports.Da = ke;
|
package/dist/chunk-YKB55ZNQ.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk3BCOIESIcjs = require('./chunk-3BCOIESI.cjs');var _chunk243LSD4Scjs = require('./chunk-243LSD4S.cjs');var _chunkYWPTI2QOcjs = require('./chunk-YWPTI2QO.cjs');var _chunk4KXOWU5Ecjs = require('./chunk-4KXOWU5E.cjs');var _chunkMY4MQMBKcjs = require('./chunk-MY4MQMBK.cjs');var _chunkYZ4HRYSLcjs = require('./chunk-YZ4HRYSL.cjs');var _chunkBULGM35Wcjs = require('./chunk-BULGM35W.cjs');function u(r,e){switch(e.type){case"email":case"phone":return r==="solana"?new (0, _chunk243LSD4Scjs.a)(e):new (0, _chunk3BCOIESIcjs.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, _chunkMY4MQMBKcjs.a)(e):new (0, _chunkBULGM35Wcjs.a)(e);case"passkey":return new (0, _chunkYWPTI2QOcjs.a)(e)}}exports.a = u;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|