@rango-dev/provider-trezor 0.10.1-next.0 → 0.10.1-next.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/index.d.ts CHANGED
@@ -7,8 +7,9 @@ export declare const config: {
7
7
  type: WalletTypes;
8
8
  };
9
9
  export type { Environments };
10
+ type Provider = any;
10
11
  export declare const init: (environments: Environments) => void;
11
12
  export declare const getInstance: typeof getTrezorInstance;
12
13
  export declare const connect: Connect;
13
- export declare const getSigners: (provider: any) => Promise<SignerFactory>;
14
+ export declare const getSigners: (provider: Provider) => Promise<SignerFactory>;
14
15
  export declare const getWalletInfo: (allBlockChains: BlockchainMeta[]) => WalletInfo;
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import{a,b as s,e as c,f as l,g as m,i as p}from"./chunk-VKZ2HTGF.js";import{Networks as u,WalletTypes as y}from"@rango-dev/wallets-shared";import"rango-types";import{DefaultSignerFactory as h,TransactionType as f}from"rango-types";async function i(){let t=new h,{EthereumSigner:n}=await import("./ethereum-2ZKMGNFA.js");return t.registerSigner(f.EVM,new n),t}a(i,"getSigners");var d={appUrl:"",email:""},b={type:y.TREZOR},D=a(t=>{d=t.manifest},"init"),S=l,g=!1,k=a(async({namespaces:t})=>{let n=[],o=await c(),e=t?.find(r=>r.namespace==="EVM");if(e)if(e.derivationPath){s(p(e.derivationPath)),g||(await o.init({lazyLoad:!0,manifest:d}),g=!0);let r=await m();n.push(r)}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(r=>r.namespace)}`);return n},"connect"),C=i,I=a(t=>{let n=[],o=t.find(e=>e.name===u.ETHEREUM);return o&&n.push(o),{name:"Trezor",img:"https://raw.githubusercontent.com/rango-exchange/assets/main/wallets/trezor/icon.svg",installLink:{DEFAULT:"https://trezor.io/learn/a/download-verify-trezor-suite"},color:"black",supportedChains:n,showOnMobile:!1,needsNamespace:{selection:"single",data:[{id:"ETH",value:"EVM",label:"Ethereum"}]},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}`}]}}},"getWalletInfo");export{b as config,k as connect,S as getInstance,C as getSigners,I as getWalletInfo,D as init};
1
+ import{a,b as s,e as c,f as m,g as l,i as p}from"./chunk-VKZ2HTGF.js";import{chains as u}from"@rango-dev/wallets-core/namespaces/evm";import{Networks as y,WalletTypes as v}from"@rango-dev/wallets-shared";import"rango-types";import{DefaultSignerFactory as h,TransactionType as f}from"rango-types";async function i(){let t=new h,{EthereumSigner:n}=await import("./ethereum-2ZKMGNFA.js");return t.registerSigner(f.EVM,new n),t}a(i,"getSigners");var d={appUrl:"",email:""},S={type:v.TREZOR},k=a(t=>{d=t.manifest},"init"),C=m,g=!1,I=a(async({namespaces:t})=>{let n=[],o=await c(),e=t?.find(r=>r.namespace==="EVM");if(e)if(e.derivationPath){s(p(e.derivationPath)),g||(await o.init({lazyLoad:!0,manifest:d}),g=!0);let r=await l();n.push(r)}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(r=>r.namespace)}`);return n},"connect"),L=i,F=a(t=>{let n=[],o=t.find(e=>e.name===y.ETHEREUM);return o&&n.push(o),{name:"Trezor",img:"https://raw.githubusercontent.com/rango-exchange/assets/main/wallets/trezor/icon.svg",installLink:{DEFAULT:"https://trezor.io/learn/a/download-verify-trezor-suite"},color:"black",supportedChains:n,showOnMobile:!1,needsNamespace:{selection:"single",data:[{id:"ETH",value:"EVM",label:"Ethereum",chains:[u.ethereum]}]},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}`}]}}},"getWalletInfo");export{S as config,I as connect,C as getInstance,L as getSigners,F as getWalletInfo,k as init};
2
2
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/index.ts", "../src/signer.ts"],
4
- "sourcesContent": ["import type { Environments } from './types.js';\nimport type {\n Connect,\n ProviderConnectResult,\n WalletInfo,\n} from '@rango-dev/wallets-shared';\n\nimport { Networks, WalletTypes } from '@rango-dev/wallets-shared';\nimport { type BlockchainMeta, type SignerFactory } from 'rango-types';\n\nimport {\n getEthereumAccounts,\n getTrezorInstance,\n getTrezorModule,\n getTrezorNormalizedDerivationPath,\n} from './helpers.js';\nimport signer from './signer.js';\nimport { setDerivationPath } from './state.js';\n\nlet trezorManifest: Environments['manifest'] = {\n appUrl: '',\n email: '',\n};\nexport const config = {\n type: WalletTypes.TREZOR,\n};\n\nexport type { Environments };\n\nexport const init = (environments: Environments) => {\n trezorManifest = environments.manifest;\n};\n\nexport const getInstance = getTrezorInstance;\n\nlet isTrezorInitialized = false;\nexport const connect: Connect = async ({ namespaces }) => {\n const results: ProviderConnectResult[] = [];\n\n const TrezorConnect = await getTrezorModule();\n\n const evmNamespace = namespaces?.find(\n (namespaceItem) => namespaceItem.namespace === 'EVM'\n );\n\n if (evmNamespace) {\n if (evmNamespace.derivationPath) {\n setDerivationPath(\n getTrezorNormalizedDerivationPath(evmNamespace.derivationPath)\n );\n\n if (!isTrezorInitialized) {\n await TrezorConnect.init({\n lazyLoad: true, // this param will prevent iframe injection until TrezorConnect.method will be called\n manifest: trezorManifest,\n });\n\n isTrezorInitialized = true;\n }\n\n const accounts = await getEthereumAccounts();\n results.push(accounts);\n } else {\n throw new Error('Derivation Path can not be empty.');\n }\n } else {\n throw new Error(\n `It appears that you have selected a namespace that is not yet supported by our system. Your namespaces: ${namespaces?.map(\n (namespaceItem) => namespaceItem.namespace\n )}`\n );\n }\n\n return results;\n};\n\nexport const getSigners: (provider: any) => Promise<SignerFactory> = signer;\n\nexport const getWalletInfo: (allBlockChains: BlockchainMeta[]) => WalletInfo = (\n allBlockChains\n) => {\n const supportedChains: BlockchainMeta[] = [];\n\n const ethereumBlockchain = allBlockChains.find(\n (chain) => chain.name === Networks.ETHEREUM\n );\n if (ethereumBlockchain) {\n supportedChains.push(ethereumBlockchain);\n }\n\n return {\n name: 'Trezor',\n img: 'https://raw.githubusercontent.com/rango-exchange/assets/main/wallets/trezor/icon.svg',\n installLink: {\n DEFAULT: 'https://trezor.io/learn/a/download-verify-trezor-suite',\n },\n color: 'black',\n supportedChains,\n showOnMobile: false,\n\n needsNamespace: {\n selection: 'single',\n data: [\n {\n id: 'ETH',\n value: 'EVM',\n label: 'Ethereum',\n },\n ],\n },\n needsDerivationPath: {\n data: [\n {\n id: 'metamask',\n label: `Metamask (m/44'/60'/0'/0/index)`,\n namespace: 'EVM',\n generateDerivationPath: (index: string) => `44'/60'/0'/0/${index}`,\n },\n {\n id: 'ledgerLive',\n label: `LedgerLive (m/44'/60'/index'/0/0)`,\n namespace: 'EVM',\n generateDerivationPath: (index: string) => `44'/60'/${index}'/0/0`,\n },\n {\n id: 'legacy',\n label: `Legacy (m/44'/60'/0'/index)`,\n namespace: 'EVM',\n generateDerivationPath: (index: string) => `44'/60'/0'/${index}`,\n },\n {\n id: `(m/44'/501'/index')`,\n label: `(m/44'/501'/index')`,\n namespace: 'Solana',\n generateDerivationPath: (index: string) => `44'/501'/${index}'`,\n },\n {\n id: `(m/44'/501'/0'/index)`,\n label: `(m/44'/501'/0'/index)`,\n namespace: 'Solana',\n generateDerivationPath: (index: string) => `44'/501'/0'/${index}`,\n },\n ],\n },\n };\n};\n", "import type { SignerFactory } from 'rango-types';\n\nimport { DefaultSignerFactory, TransactionType as TxType } from 'rango-types';\n\nexport default async function getSigners(): Promise<SignerFactory> {\n const signers = new DefaultSignerFactory();\n const { EthereumSigner } = await import('./signers/ethereum.js');\n signers.registerSigner(TxType.EVM, new EthereumSigner());\n return signers;\n}\n"],
5
- "mappings": "sEAOA,OAAS,YAAAA,EAAU,eAAAC,MAAmB,4BACtC,MAAwD,cCNxD,OAAS,wBAAAC,EAAsB,mBAAmBC,MAAc,cAEhE,eAAOC,GAA4D,CACjE,IAAMC,EAAU,IAAIC,EACd,CAAE,eAAAC,CAAe,EAAI,KAAM,QAAO,wBAAuB,EAC/D,OAAAF,EAAQ,eAAeG,EAAO,IAAK,IAAID,CAAgB,EAChDF,CACT,CAL8BI,EAAAL,EAAA,cDe9B,IAAIM,EAA2C,CAC7C,OAAQ,GACR,MAAO,EACT,EACaC,EAAS,CACpB,KAAMC,EAAY,MACpB,EAIaC,EAAOC,EAACC,GAA+B,CAClDL,EAAiBK,EAAa,QAChC,EAFoB,QAIPC,EAAcC,EAEvBC,EAAsB,GACbC,EAAmBL,EAAA,MAAO,CAAE,WAAAM,CAAW,IAAM,CACxD,IAAMC,EAAmC,CAAC,EAEpCC,EAAgB,MAAMC,EAAgB,EAEtCC,EAAeJ,GAAY,KAC9BK,GAAkBA,EAAc,YAAc,KACjD,EAEA,GAAID,EACF,GAAIA,EAAa,eAAgB,CAC/BE,EACEC,EAAkCH,EAAa,cAAc,CAC/D,EAEKN,IACH,MAAMI,EAAc,KAAK,CACvB,SAAU,GACV,SAAUZ,CACZ,CAAC,EAEDQ,EAAsB,IAGxB,IAAMU,EAAW,MAAMC,EAAoB,EAC3CR,EAAQ,KAAKO,CAAQ,CACvB,KACE,OAAM,IAAI,MAAM,mCAAmC,MAGrD,OAAM,IAAI,MACR,2GAA2GR,GAAY,IACpHK,GAAkBA,EAAc,SACnC,CAAC,EACH,EAGF,OAAOJ,CACT,EAtCgC,WAwCnBS,EAAwDA,EAExDC,EAAkEjB,EAC7EkB,GACG,CACH,IAAMC,EAAoC,CAAC,EAErCC,EAAqBF,EAAe,KACvCG,GAAUA,EAAM,OAASC,EAAS,QACrC,EACA,OAAIF,GACFD,EAAgB,KAAKC,CAAkB,EAGlC,CACL,KAAM,SACN,IAAK,uFACL,YAAa,CACX,QAAS,wDACX,EACA,MAAO,QACP,gBAAAD,EACA,aAAc,GAEd,eAAgB,CACd,UAAW,SACX,KAAM,CACJ,CACE,GAAI,MACJ,MAAO,MACP,MAAO,UACT,CACF,CACF,EACA,oBAAqB,CACnB,KAAM,CACJ,CACE,GAAI,WACJ,MAAO,kCACP,UAAW,MACX,uBAAyBI,GAAkB,gBAAgBA,CAAK,EAClE,EACA,CACE,GAAI,aACJ,MAAO,oCACP,UAAW,MACX,uBAAyBA,GAAkB,WAAWA,CAAK,OAC7D,EACA,CACE,GAAI,SACJ,MAAO,8BACP,UAAW,MACX,uBAAyBA,GAAkB,cAAcA,CAAK,EAChE,EACA,CACE,GAAI,sBACJ,MAAO,sBACP,UAAW,SACX,uBAAyBA,GAAkB,YAAYA,CAAK,GAC9D,EACA,CACE,GAAI,wBACJ,MAAO,wBACP,UAAW,SACX,uBAAyBA,GAAkB,eAAeA,CAAK,EACjE,CACF,CACF,CACF,CACF,EAnE+E",
6
- "names": ["Networks", "WalletTypes", "DefaultSignerFactory", "TxType", "getSigners", "signers", "DefaultSignerFactory", "EthereumSigner", "TxType", "__name", "trezorManifest", "config", "WalletTypes", "init", "__name", "environments", "getInstance", "getTrezorInstance", "isTrezorInitialized", "connect", "namespaces", "results", "TrezorConnect", "getTrezorModule", "evmNamespace", "namespaceItem", "setDerivationPath", "getTrezorNormalizedDerivationPath", "accounts", "getEthereumAccounts", "getSigners", "getWalletInfo", "allBlockChains", "supportedChains", "ethereumBlockchain", "chain", "Networks", "index"]
4
+ "sourcesContent": ["import type { Environments } from './types.js';\nimport type {\n Connect,\n ProviderConnectResult,\n WalletInfo,\n} from '@rango-dev/wallets-shared';\n\nimport { chains as evmChains } from '@rango-dev/wallets-core/namespaces/evm';\nimport { Networks, WalletTypes } from '@rango-dev/wallets-shared';\nimport { type BlockchainMeta, type SignerFactory } from 'rango-types';\n\nimport {\n getEthereumAccounts,\n getTrezorInstance,\n getTrezorModule,\n getTrezorNormalizedDerivationPath,\n} from './helpers.js';\nimport signer from './signer.js';\nimport { setDerivationPath } from './state.js';\n\nlet trezorManifest: Environments['manifest'] = {\n appUrl: '',\n email: '',\n};\nexport const config = {\n type: WalletTypes.TREZOR,\n};\n\nexport type { Environments };\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype Provider = any;\n\nexport const init = (environments: Environments) => {\n trezorManifest = environments.manifest;\n};\n\nexport const getInstance = getTrezorInstance;\n\nlet isTrezorInitialized = false;\nexport const connect: Connect = async ({ namespaces }) => {\n const results: ProviderConnectResult[] = [];\n\n const TrezorConnect = await getTrezorModule();\n\n const evmNamespace = namespaces?.find(\n (namespaceItem) => namespaceItem.namespace === 'EVM'\n );\n\n if (evmNamespace) {\n if (evmNamespace.derivationPath) {\n setDerivationPath(\n getTrezorNormalizedDerivationPath(evmNamespace.derivationPath)\n );\n\n if (!isTrezorInitialized) {\n await TrezorConnect.init({\n lazyLoad: true, // this param will prevent iframe injection until TrezorConnect.method will be called\n manifest: trezorManifest,\n });\n\n isTrezorInitialized = true;\n }\n\n const accounts = await getEthereumAccounts();\n results.push(accounts);\n } else {\n throw new Error('Derivation Path can not be empty.');\n }\n } else {\n throw new Error(\n `It appears that you have selected a namespace that is not yet supported by our system. Your namespaces: ${namespaces?.map(\n (namespaceItem) => namespaceItem.namespace\n )}`\n );\n }\n\n return results;\n};\n\nexport const getSigners: (provider: Provider) => Promise<SignerFactory> =\n signer;\n\nexport const getWalletInfo: (allBlockChains: BlockchainMeta[]) => WalletInfo = (\n allBlockChains\n) => {\n const supportedChains: BlockchainMeta[] = [];\n\n const ethereumBlockchain = allBlockChains.find(\n (chain) => chain.name === Networks.ETHEREUM\n );\n if (ethereumBlockchain) {\n supportedChains.push(ethereumBlockchain);\n }\n\n return {\n name: 'Trezor',\n img: 'https://raw.githubusercontent.com/rango-exchange/assets/main/wallets/trezor/icon.svg',\n installLink: {\n DEFAULT: 'https://trezor.io/learn/a/download-verify-trezor-suite',\n },\n color: 'black',\n supportedChains,\n showOnMobile: false,\n\n needsNamespace: {\n selection: 'single',\n data: [\n {\n id: 'ETH',\n value: 'EVM',\n label: 'Ethereum',\n chains: [evmChains.ethereum],\n },\n ],\n },\n needsDerivationPath: {\n data: [\n {\n id: 'metamask',\n label: `Metamask (m/44'/60'/0'/0/index)`,\n namespace: 'EVM',\n generateDerivationPath: (index: string) => `44'/60'/0'/0/${index}`,\n },\n {\n id: 'ledgerLive',\n label: `LedgerLive (m/44'/60'/index'/0/0)`,\n namespace: 'EVM',\n generateDerivationPath: (index: string) => `44'/60'/${index}'/0/0`,\n },\n {\n id: 'legacy',\n label: `Legacy (m/44'/60'/0'/index)`,\n namespace: 'EVM',\n generateDerivationPath: (index: string) => `44'/60'/0'/${index}`,\n },\n {\n id: `(m/44'/501'/index')`,\n label: `(m/44'/501'/index')`,\n namespace: 'Solana',\n generateDerivationPath: (index: string) => `44'/501'/${index}'`,\n },\n {\n id: `(m/44'/501'/0'/index)`,\n label: `(m/44'/501'/0'/index)`,\n namespace: 'Solana',\n generateDerivationPath: (index: string) => `44'/501'/0'/${index}`,\n },\n ],\n },\n };\n};\n", "import type { SignerFactory } from 'rango-types';\n\nimport { DefaultSignerFactory, TransactionType as TxType } from 'rango-types';\n\nexport default async function getSigners(): Promise<SignerFactory> {\n const signers = new DefaultSignerFactory();\n const { EthereumSigner } = await import('./signers/ethereum.js');\n signers.registerSigner(TxType.EVM, new EthereumSigner());\n return signers;\n}\n"],
5
+ "mappings": "sEAOA,OAAS,UAAUA,MAAiB,yCACpC,OAAS,YAAAC,EAAU,eAAAC,MAAmB,4BACtC,MAAwD,cCPxD,OAAS,wBAAAC,EAAsB,mBAAmBC,MAAc,cAEhE,eAAOC,GAA4D,CACjE,IAAMC,EAAU,IAAIC,EACd,CAAE,eAAAC,CAAe,EAAI,KAAM,QAAO,wBAAuB,EAC/D,OAAAF,EAAQ,eAAeG,EAAO,IAAK,IAAID,CAAgB,EAChDF,CACT,CAL8BI,EAAAL,EAAA,cDgB9B,IAAIM,EAA2C,CAC7C,OAAQ,GACR,MAAO,EACT,EACaC,EAAS,CACpB,KAAMC,EAAY,MACpB,EAMaC,EAAOC,EAACC,GAA+B,CAClDL,EAAiBK,EAAa,QAChC,EAFoB,QAIPC,EAAcC,EAEvBC,EAAsB,GACbC,EAAmBL,EAAA,MAAO,CAAE,WAAAM,CAAW,IAAM,CACxD,IAAMC,EAAmC,CAAC,EAEpCC,EAAgB,MAAMC,EAAgB,EAEtCC,EAAeJ,GAAY,KAC9BK,GAAkBA,EAAc,YAAc,KACjD,EAEA,GAAID,EACF,GAAIA,EAAa,eAAgB,CAC/BE,EACEC,EAAkCH,EAAa,cAAc,CAC/D,EAEKN,IACH,MAAMI,EAAc,KAAK,CACvB,SAAU,GACV,SAAUZ,CACZ,CAAC,EAEDQ,EAAsB,IAGxB,IAAMU,EAAW,MAAMC,EAAoB,EAC3CR,EAAQ,KAAKO,CAAQ,CACvB,KACE,OAAM,IAAI,MAAM,mCAAmC,MAGrD,OAAM,IAAI,MACR,2GAA2GR,GAAY,IACpHK,GAAkBA,EAAc,SACnC,CAAC,EACH,EAGF,OAAOJ,CACT,EAtCgC,WAwCnBS,EACXA,EAEWC,EAAkEjB,EAC7EkB,GACG,CACH,IAAMC,EAAoC,CAAC,EAErCC,EAAqBF,EAAe,KACvCG,GAAUA,EAAM,OAASC,EAAS,QACrC,EACA,OAAIF,GACFD,EAAgB,KAAKC,CAAkB,EAGlC,CACL,KAAM,SACN,IAAK,uFACL,YAAa,CACX,QAAS,wDACX,EACA,MAAO,QACP,gBAAAD,EACA,aAAc,GAEd,eAAgB,CACd,UAAW,SACX,KAAM,CACJ,CACE,GAAI,MACJ,MAAO,MACP,MAAO,WACP,OAAQ,CAACI,EAAU,QAAQ,CAC7B,CACF,CACF,EACA,oBAAqB,CACnB,KAAM,CACJ,CACE,GAAI,WACJ,MAAO,kCACP,UAAW,MACX,uBAAyBC,GAAkB,gBAAgBA,CAAK,EAClE,EACA,CACE,GAAI,aACJ,MAAO,oCACP,UAAW,MACX,uBAAyBA,GAAkB,WAAWA,CAAK,OAC7D,EACA,CACE,GAAI,SACJ,MAAO,8BACP,UAAW,MACX,uBAAyBA,GAAkB,cAAcA,CAAK,EAChE,EACA,CACE,GAAI,sBACJ,MAAO,sBACP,UAAW,SACX,uBAAyBA,GAAkB,YAAYA,CAAK,GAC9D,EACA,CACE,GAAI,wBACJ,MAAO,wBACP,UAAW,SACX,uBAAyBA,GAAkB,eAAeA,CAAK,EACjE,CACF,CACF,CACF,CACF,EApE+E",
6
+ "names": ["evmChains", "Networks", "WalletTypes", "DefaultSignerFactory", "TxType", "getSigners", "signers", "DefaultSignerFactory", "EthereumSigner", "TxType", "__name", "trezorManifest", "config", "WalletTypes", "init", "__name", "environments", "getInstance", "getTrezorInstance", "isTrezorInitialized", "connect", "namespaces", "results", "TrezorConnect", "getTrezorModule", "evmNamespace", "namespaceItem", "setDerivationPath", "getTrezorNormalizedDerivationPath", "accounts", "getEthereumAccounts", "getSigners", "getWalletInfo", "allBlockChains", "supportedChains", "ethereumBlockchain", "chain", "Networks", "evmChains", "index"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"src/state.ts":{"bytes":290,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/helpers.ts":{"bytes":2270,"imports":[{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"src/state.ts","kind":"import-statement","original":"./state.js"},{"path":"@trezor/connect-web","kind":"dynamic-import","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/signers/ethereum.ts":{"bytes":3696,"imports":[{"path":"@rango-dev/signer-evm","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"ethers","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"src/helpers.ts","kind":"import-statement","original":"../helpers.js"},{"path":"src/state.ts","kind":"import-statement","original":"../state.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/signer.ts":{"bytes":394,"imports":[{"path":"rango-types","kind":"import-statement","external":true},{"path":"src/signers/ethereum.ts","kind":"dynamic-import","original":"./signers/ethereum.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":3943,"imports":[{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"src/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"src/signer.ts","kind":"import-statement","original":"./signer.js"},{"path":"src/state.ts","kind":"import-statement","original":"./state.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":6820},"dist/index.js":{"imports":[{"path":"dist/chunk-VKZ2HTGF.js","kind":"import-statement"},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"dist/ethereum-2ZKMGNFA.js","kind":"dynamic-import"}],"exports":["config","connect","getInstance","getSigners","getWalletInfo","init"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":1642},"src/signer.ts":{"bytesInOutput":218}},"bytes":2060},"dist/ethereum-2ZKMGNFA.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":6222},"dist/ethereum-2ZKMGNFA.js":{"imports":[{"path":"dist/chunk-VKZ2HTGF.js","kind":"import-statement"},{"path":"@rango-dev/signer-evm","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"ethers","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true}],"exports":["EthereumSigner","getTrezorErrorMessage"],"entryPoint":"src/signers/ethereum.ts","inputs":{"src/signers/ethereum.ts":{"bytesInOutput":1391}},"bytes":1561},"dist/chunk-VKZ2HTGF.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":4059},"dist/chunk-VKZ2HTGF.js":{"imports":[{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"@trezor/connect-web","kind":"dynamic-import","external":true}],"exports":["a","b","c","d","e","f","g","h","i"],"inputs":{"src/state.ts":{"bytesInOutput":99},"src/helpers.ts":{"bytesInOutput":737}},"bytes":1030}}}
1
+ {"inputs":{"src/state.ts":{"bytes":290,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/helpers.ts":{"bytes":2270,"imports":[{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"src/state.ts","kind":"import-statement","original":"./state.js"},{"path":"@trezor/connect-web","kind":"dynamic-import","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/signers/ethereum.ts":{"bytes":3696,"imports":[{"path":"@rango-dev/signer-evm","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"ethers","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"src/helpers.ts","kind":"import-statement","original":"../helpers.js"},{"path":"src/state.ts","kind":"import-statement","original":"../state.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/signer.ts":{"bytes":394,"imports":[{"path":"rango-types","kind":"import-statement","external":true},{"path":"src/signers/ethereum.ts","kind":"dynamic-import","original":"./signers/ethereum.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":4152,"imports":[{"path":"@rango-dev/wallets-core/namespaces/evm","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"src/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"src/signer.ts","kind":"import-statement","original":"./signer.js"},{"path":"src/state.ts","kind":"import-statement","original":"./state.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":7110},"dist/index.js":{"imports":[{"path":"dist/chunk-VKZ2HTGF.js","kind":"import-statement"},{"path":"@rango-dev/wallets-core/namespaces/evm","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"dist/ethereum-2ZKMGNFA.js","kind":"dynamic-import"}],"exports":["config","connect","getInstance","getSigners","getWalletInfo","init"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":1726},"src/signer.ts":{"bytesInOutput":218}},"bytes":2144},"dist/ethereum-2ZKMGNFA.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":6222},"dist/ethereum-2ZKMGNFA.js":{"imports":[{"path":"dist/chunk-VKZ2HTGF.js","kind":"import-statement"},{"path":"@rango-dev/signer-evm","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"ethers","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true}],"exports":["EthereumSigner","getTrezorErrorMessage"],"entryPoint":"src/signers/ethereum.ts","inputs":{"src/signers/ethereum.ts":{"bytesInOutput":1391}},"bytes":1561},"dist/chunk-VKZ2HTGF.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":4059},"dist/chunk-VKZ2HTGF.js":{"imports":[{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"@trezor/connect-web","kind":"dynamic-import","external":true}],"exports":["a","b","c","d","e","f","g","h","i"],"inputs":{"src/state.ts":{"bytesInOutput":99},"src/helpers.ts":{"bytesInOutput":737}},"bytes":1030}}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rango-dev/provider-trezor",
3
- "version": "0.10.1-next.0",
3
+ "version": "0.10.1-next.2",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "source": "./src/index.ts",
@@ -24,11 +24,11 @@
24
24
  "lint": "eslint \"**/*.{ts,tsx}\""
25
25
  },
26
26
  "dependencies": {
27
- "@rango-dev/signer-evm": "^0.34.0",
28
- "@rango-dev/wallets-shared": "^0.43.1-next.0",
27
+ "@rango-dev/signer-evm": "^0.34.1-next.0",
28
+ "@rango-dev/wallets-shared": "^0.43.1-next.2",
29
29
  "@trezor/connect-web": "^9.5.0",
30
30
  "ethers": "^6.13.2",
31
- "rango-types": "^0.1.81"
31
+ "rango-types": "^0.1.82"
32
32
  },
33
33
  "publishConfig": {
34
34
  "access": "public"
package/src/index.ts CHANGED
@@ -5,6 +5,7 @@ import type {
5
5
  WalletInfo,
6
6
  } from '@rango-dev/wallets-shared';
7
7
 
8
+ import { chains as evmChains } from '@rango-dev/wallets-core/namespaces/evm';
8
9
  import { Networks, WalletTypes } from '@rango-dev/wallets-shared';
9
10
  import { type BlockchainMeta, type SignerFactory } from 'rango-types';
10
11
 
@@ -26,6 +27,8 @@ export const config = {
26
27
  };
27
28
 
28
29
  export type { Environments };
30
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
31
+ type Provider = any;
29
32
 
30
33
  export const init = (environments: Environments) => {
31
34
  trezorManifest = environments.manifest;
@@ -74,7 +77,8 @@ export const connect: Connect = async ({ namespaces }) => {
74
77
  return results;
75
78
  };
76
79
 
77
- export const getSigners: (provider: any) => Promise<SignerFactory> = signer;
80
+ export const getSigners: (provider: Provider) => Promise<SignerFactory> =
81
+ signer;
78
82
 
79
83
  export const getWalletInfo: (allBlockChains: BlockchainMeta[]) => WalletInfo = (
80
84
  allBlockChains
@@ -105,6 +109,7 @@ export const getWalletInfo: (allBlockChains: BlockchainMeta[]) => WalletInfo = (
105
109
  id: 'ETH',
106
110
  value: 'EVM',
107
111
  label: 'Ethereum',
112
+ chains: [evmChains.ethereum],
108
113
  },
109
114
  ],
110
115
  },