import{a as c,d as p,e as m,f as g,h as d}from"./chunk-DCWKMLDG.js";import{a as r}from"./chunk-CVKDPNYM.js";import{Networks as i,WalletTypes as f}from"@rango-dev/wallets-shared";import"rango-types";import{retryLazyImport as h}from"@rango-dev/wallets-shared";import{DefaultSignerFactory as y,TransactionType as u}from"rango-types";async function l(){let t=new y,{EthereumSigner:a}=await h(async()=>await import("./ethereum-X7JPA2J3.js")),{SolanaSigner:n}=await h(async()=>await import("./solana-IAFAKOIV.js"));return t.registerSigner(u.EVM,new a),t.registerSigner(u.SOLANA,new n),t}r(l,"getSigners");var b={type:f.LEDGER},k=p,A=r(async({namespaces:t})=>{let a=[],n=t?.find(e=>e.namespace==="Solana"),o=t?.find(e=>e.namespace==="EVM");if(n)if(n.derivationPath){c(n.derivationPath);let e=await g();a.push(e)}else throw new Error("Derivation Path can not be empty.");else if(o)if(o.derivationPath){c(o.derivationPath);let e=await m();a.push(e)}else throw new Error("Derivation Path can not be empty.");else throw new Error(`It appears that you have selected a namespace that is not yet supported by our system. Your namespaces: ${t?.map(e=>e.namespace)}`);return a},"connect"),T=r(async()=>{d()},"disconnect"),I=l,N=r(t=>{let a=[],n=t.find(e=>e.name===i.ETHEREUM);n&&a.push(n);let o=t.find(e=>e.name===i.SOLANA);return o&&a.push(o),{name:"Ledger",img:"https://raw.githubusercontent.com/rango-exchange/assets/main/wallets/ledger/icon.svg",installLink:{DEFAULT:"https://support.ledger.com/hc/en-us/articles/4404389606417-Download-and-install-Ledger-Live?docs=true"},color:"black",supportedChains:a,showOnMobile:!1,needsDerivationPath:{data:[{id:"metamask",label:"Metamask (m/44'/60'/0'/0/index)",namespace:"EVM",generateDerivationPath:e=>`44'/60'/0'/0/${e}`},{id:"ledgerLive",label:"LedgerLive (m/44'/60'/index'/0/0)",namespace:"EVM",generateDerivationPath:e=>`44'/60'/${e}'/0/0`},{id:"legacy",label:"Legacy (m/44'/60'/0'/index)",namespace:"EVM",generateDerivationPath:e=>`44'/60'/0'/${e}`},{id:"(m/44'/501'/index')",label:"(m/44'/501'/index')",namespace:"Solana",generateDerivationPath:e=>`44'/501'/${e}'`},{id:"(m/44'/501'/0'/index)",label:"(m/44'/501'/0'/index)",namespace:"Solana",generateDerivationPath:e=>`44'/501'/0'/${e}`}]},needsNamespace:{selection:"single",data:[{label:"EVM",value:"EVM",id:"ETH",getSupportedChains:e=>e.filter(s=>s.name===i.ETHEREUM)},{label:"Solana",value:"Solana",id:"SOLANA",getSupportedChains:e=>e.filter(s=>s.name===i.SOLANA)}]}}},"getWalletInfo");export{b as config,A as connect,T as disconnect,k as getInstance,I as getSigners,N as getWalletInfo};
//# sourceMappingURL=index.js.map
