import{a as c,d as p,e as m,f as g,h as d}from"./chunk-2KLLAGCE.js";import{a as r}from"./chunk-CVKDPNYM.js";import{Networks as i,WalletTypes as y}from"@rango-dev/wallets-shared";import"rango-types";import{DefaultSignerFactory as u,TransactionType as h}from"rango-types";async function l(){let t=new u,{EthereumSigner:n}=await import("./ethereum-V2WNWA6L.js"),{SolanaSigner:a}=await import("./solana-GJWCIU6R.js");return t.registerSigner(h.EVM,new n),t.registerSigner(h.SOLANA,new a),t}r(l,"getSigners");var M={type:y.LEDGER},L=p,b=r(async({namespaces:t})=>{let n=[],a=t?.find(e=>e.namespace==="Solana"),o=t?.find(e=>e.namespace==="EVM");if(a)if(a.derivationPath){c(a.derivationPath);let e=await g();n.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();n.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 n},"connect"),k=r(async()=>{d()},"disconnect"),A=l,T=r(t=>{let n=[],a=t.find(e=>e.name===i.ETHEREUM);a&&n.push(a);let o=t.find(e=>e.name===i.SOLANA);return o&&n.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:n,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{M as config,b as connect,k as disconnect,L as getInstance,A as getSigners,T as getWalletInfo};
//# sourceMappingURL=index.js.map
