require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../constants/chains.constants.cjs`),t=require(`../../crypto/preProcessing.cjs`),n=require(`./create-provider.cjs`),r=require(`../../providers/EthersProviderAdapter.cjs`),i=require(`../../providers/SolanaProviderAdapter.cjs`);let a=require(`ethers`),o=require(`@solana/web3.js`);var s=t=>{let r=n.createJsonRpcProvider(e.chainIds.ethMainnet);return new a.ethers.Wallet(t,r)},c=t=>{let r=n.createJsonRpcProvider(e.chainIds.ethMainnet);return new a.ethers.VoidSigner(t,r)},l=async(e,n)=>{await t.preProcessing();let i=r.default();i.initSigner?.(n),await e.initProviderAdapter(void 0,i),await e.initUserKeys()},u=async(e,t)=>{let n=r.default(),i=c(t);n.initSigner?.(i),await e.initProviderAdapter(void 0,n)},d=e=>({publicKey:new o.PublicKey(e.userKeys.getDerivedSolanaPublicKey()),signTransaction:()=>{throw Error(`Void wallet cannot sign transactions`)},signAllTransactions:()=>{throw Error(`Void wallet cannot sign transactions`)},signMessage:()=>{throw Error(`Void wallet cannot sign messages`)}}),f=async(t,n)=>{let r=new i.SolanaProviderAdapter(e.currentSolanaChainId,n),a=d(t);await t.initProviderAdapter(a,r)},p=async(e,n,r)=>{await t.preProcessing(),e.initUserKeysWithSignature(r),await f(e,e.userKeys.getDerivedSolanaPublicKey()),await u(e,n)},m=async(e,n)=>{await t.preProcessing(),await e.initUserKeysFromSeedPhrases(n),await f(e,e.userKeys.getDerivedSolanaPublicKey()),await u(e,e.userKeys.getDerivedEthereumAddress())};exports.createSigner=s,exports.createVoidSigner=c,exports.createVoidSolanaWallet=d,exports.prepareEthersProviderAdapter=u,exports.prepareHinkal=l,exports.prepareHinkalFromSeedPhrases=m,exports.prepareHinkalWithSignature=p,exports.prepareSolanaProviderAdapter=f;