@rango-dev/provider-trustwallet 0.37.1-next.2 → 0.37.1-next.4
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.js +1 -1
- package/dist/index.js.map +2 -2
- package/dist/provider-trustwallet.build.json +1 -1
- package/package.json +4 -4
- package/src/index.ts +2 -2
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var a=Object.defineProperty;var o=(t,e)=>a(t,"name",{value:e,configurable:!0});import{canEagerlyConnectToEvm as m,canSwitchNetworkToEvm as w,getEvmAccounts as u,subscribeToEvm as h,switchNetworkForEvm as f,WalletTypes as b}from"@rango-dev/wallets-shared";import{evmBlockchains as d}from"rango-types";function c(){let{trustwallet:t}=window;return t&&(t?.isTrust||t?.isTrustWallet)?t:null}o(c,"trustWallet");import{getNetworkInstance as i,Networks as l}from"@rango-dev/wallets-shared";import{DefaultSignerFactory as p,TransactionType as g}from"rango-types";async function n(t){let e=i(t,l.ETHEREUM),r=new p,{DefaultEvmSigner:s}=await import("@rango-dev/signer-evm");return r.registerSigner(g.EVM,new s(e)),r}o(n,"getSigners");var y=b.TRUST_WALLET,L={type:y},A=c,B=o(async({instance:t})=>{let{accounts:e,chainId:r}=await u(t);return{accounts:e,chainId:r}},"connect"),M=h,j=f,R=w,D=n,P=m,U=o(t=>{let e=d(t);return{name:"Trust Wallet",img:"https://raw.githubusercontent.com/rango-exchange/assets/main/wallets/trustwallet/icon.svg",installLink:{CHROME:"https://chrome.google.com/webstore/detail/trust-wallet/egjidjbpglichdcondbcbdnbeeppgdph
|
|
1
|
+
var a=Object.defineProperty;var o=(t,e)=>a(t,"name",{value:e,configurable:!0});import{canEagerlyConnectToEvm as m,canSwitchNetworkToEvm as w,getEvmAccounts as u,subscribeToEvm as h,switchNetworkForEvm as f,WalletTypes as b}from"@rango-dev/wallets-shared";import{evmBlockchains as d}from"rango-types";function c(){let{trustwallet:t}=window;return t&&(t?.isTrust||t?.isTrustWallet)?t:null}o(c,"trustWallet");import{getNetworkInstance as i,Networks as l}from"@rango-dev/wallets-shared";import{DefaultSignerFactory as p,TransactionType as g}from"rango-types";async function n(t){let e=i(t,l.ETHEREUM),r=new p,{DefaultEvmSigner:s}=await import("@rango-dev/signer-evm");return r.registerSigner(g.EVM,new s(e)),r}o(n,"getSigners");var y=b.TRUST_WALLET,L={type:y},A=c,B=o(async({instance:t})=>{let{accounts:e,chainId:r}=await u(t);return{accounts:e,chainId:r}},"connect"),M=h,j=f,R=w,D=n,P=m,U=o(t=>{let e=d(t);return{name:"Trust Wallet",img:"https://raw.githubusercontent.com/rango-exchange/assets/main/wallets/trustwallet/icon.svg",installLink:{CHROME:"https://chrome.google.com/webstore/detail/trust-wallet/egjidjbpglichdcondbcbdnbeeppgdph",BRAVE:"https://chrome.google.com/webstore/detail/trust-wallet/egjidjbpglichdcondbcbdnbeeppgdph",DEFAULT:"https://trustwallet.com/browser-extension"},color:"#ffffff",supportedChains:e}},"getWalletInfo");export{P as canEagerConnect,R as canSwitchNetworkTo,L as config,B as connect,A as getInstance,D as getSigners,U as getWalletInfo,M as subscribe,j as switchNetwork};
|
|
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/helpers.ts", "../src/signer.ts"],
|
|
4
|
-
"sourcesContent": ["import type {\n CanEagerConnect,\n CanSwitchNetwork,\n Connect,\n Subscribe,\n SwitchNetwork,\n WalletInfo,\n} from '@rango-dev/wallets-shared';\nimport type { BlockchainMeta, SignerFactory } from 'rango-types';\n\nimport {\n canEagerlyConnectToEvm,\n canSwitchNetworkToEvm,\n getEvmAccounts,\n subscribeToEvm,\n switchNetworkForEvm,\n WalletTypes,\n} from '@rango-dev/wallets-shared';\nimport { evmBlockchains } from 'rango-types';\n\nimport { trustWallet as trustwallet_instance } from './helpers.js';\nimport signer from './signer.js';\n\nconst WALLET = WalletTypes.TRUST_WALLET;\n\nexport const config = {\n type: WALLET,\n};\n\nexport const getInstance = trustwallet_instance;\n\n// doc: https://developer.trustwallet.com/trust-wallet-browser-extension/extension-guide\nexport const connect: Connect = async ({ instance }) => {\n const { accounts, chainId } = await getEvmAccounts(instance);\n return {\n accounts,\n chainId,\n };\n};\n\nexport const subscribe: Subscribe = subscribeToEvm;\n\nexport const switchNetwork: SwitchNetwork = switchNetworkForEvm;\n\nexport const canSwitchNetworkTo: CanSwitchNetwork = canSwitchNetworkToEvm;\n\nexport const getSigners: (provider: any) => Promise<SignerFactory> = signer;\n\nexport const canEagerConnect: CanEagerConnect = canEagerlyConnectToEvm;\n\nexport const getWalletInfo: (allBlockChains: BlockchainMeta[]) => WalletInfo = (\n allBlockChains\n) => {\n const evms = evmBlockchains(allBlockChains);\n return {\n name: 'Trust Wallet',\n img: 'https://raw.githubusercontent.com/rango-exchange/assets/main/wallets/trustwallet/icon.svg',\n installLink: {\n CHROME:\n 'https://chrome.google.com/webstore/detail/trust-wallet/egjidjbpglichdcondbcbdnbeeppgdph
|
|
5
|
-
"mappings": "+EAUA,OACE,0BAAAA,EACA,yBAAAC,EACA,kBAAAC,EACA,kBAAAC,EACA,uBAAAC,EACA,eAAAC,MACK,4BACP,OAAS,kBAAAC,MAAsB,cClBxB,SAASC,GAAc,CAC5B,GAAM,CAAE,YAAAC,CAAY,EAAI,OAExB,OAAMA,IAAgBA,GAAa,SAAWA,GAAa,eAClDA,EAEF,IACT,CAPgBC,EAAAF,EAAA,eCEhB,OAAS,sBAAAG,EAAoB,YAAAC,MAAgB,4BAC7C,OAAS,wBAAAC,EAAsB,mBAAmBC,MAAc,cAEhE,eAAOC,EACLC,EACwB,CACxB,IAAMC,EAAcC,EAAmBF,EAAUG,EAAS,QAAQ,EAC5DC,EAAU,IAAIC,EACd,CAAE,iBAAAC,CAAiB,EAAI,KAAM,QAAO,uBAAuB,EACjE,OAAAF,EAAQ,eAAeG,EAAO,IAAK,IAAID,EAAiBL,CAAW,CAAC,EAC7DG,CACT,CAR8BI,EAAAT,EAAA,cFkB9B,IAAMU,EAASC,EAAY,aAEdC,EAAS,CACpB,KAAMF,CACR,EAEaG,EAAcC,EAGdC,EAAmBC,EAAA,MAAO,CAAE,SAAAC,CAAS,IAAM,CACtD,GAAM,CAAE,SAAAC,EAAU,QAAAC,CAAQ,EAAI,MAAMC,EAAeH,CAAQ,EAC3D,MAAO,CACL,SAAAC,EACA,QAAAC,CACF,CACF,EANgC,WAQnBE,EAAuBC,EAEvBC,EAA+BC,EAE/BC,EAAuCC,EAEvCC,EAAwDA,EAExDC,EAAmCC,EAEnCC,EAAkEd,EAC7Ee,GACG,CACH,IAAMC,EAAOC,EAAeF,CAAc,EAC1C,MAAO,CACL,KAAM,eACN,IAAK,4FACL,YAAa,CACX,OACE,
|
|
4
|
+
"sourcesContent": ["import type {\n CanEagerConnect,\n CanSwitchNetwork,\n Connect,\n Subscribe,\n SwitchNetwork,\n WalletInfo,\n} from '@rango-dev/wallets-shared';\nimport type { BlockchainMeta, SignerFactory } from 'rango-types';\n\nimport {\n canEagerlyConnectToEvm,\n canSwitchNetworkToEvm,\n getEvmAccounts,\n subscribeToEvm,\n switchNetworkForEvm,\n WalletTypes,\n} from '@rango-dev/wallets-shared';\nimport { evmBlockchains } from 'rango-types';\n\nimport { trustWallet as trustwallet_instance } from './helpers.js';\nimport signer from './signer.js';\n\nconst WALLET = WalletTypes.TRUST_WALLET;\n\nexport const config = {\n type: WALLET,\n};\n\nexport const getInstance = trustwallet_instance;\n\n// doc: https://developer.trustwallet.com/trust-wallet-browser-extension/extension-guide\nexport const connect: Connect = async ({ instance }) => {\n const { accounts, chainId } = await getEvmAccounts(instance);\n return {\n accounts,\n chainId,\n };\n};\n\nexport const subscribe: Subscribe = subscribeToEvm;\n\nexport const switchNetwork: SwitchNetwork = switchNetworkForEvm;\n\nexport const canSwitchNetworkTo: CanSwitchNetwork = canSwitchNetworkToEvm;\n\nexport const getSigners: (provider: any) => Promise<SignerFactory> = signer;\n\nexport const canEagerConnect: CanEagerConnect = canEagerlyConnectToEvm;\n\nexport const getWalletInfo: (allBlockChains: BlockchainMeta[]) => WalletInfo = (\n allBlockChains\n) => {\n const evms = evmBlockchains(allBlockChains);\n return {\n name: 'Trust Wallet',\n img: 'https://raw.githubusercontent.com/rango-exchange/assets/main/wallets/trustwallet/icon.svg',\n installLink: {\n CHROME:\n 'https://chrome.google.com/webstore/detail/trust-wallet/egjidjbpglichdcondbcbdnbeeppgdph',\n BRAVE:\n 'https://chrome.google.com/webstore/detail/trust-wallet/egjidjbpglichdcondbcbdnbeeppgdph',\n DEFAULT: 'https://trustwallet.com/browser-extension',\n },\n color: '#ffffff',\n supportedChains: evms,\n };\n};\n", "export function trustWallet() {\n const { trustwallet } = window;\n \n if (!!trustwallet && (trustwallet?.isTrust || trustwallet?.isTrustWallet)) {\n return trustwallet;\n }\n return null;\n}\n", "import type { SignerFactory } from 'rango-types';\n\nimport { getNetworkInstance, Networks } from '@rango-dev/wallets-shared';\nimport { DefaultSignerFactory, TransactionType as TxType } from 'rango-types';\n\nexport default async function getSigners(\n provider: any\n): Promise<SignerFactory> {\n const ethProvider = getNetworkInstance(provider, Networks.ETHEREUM);\n const signers = new DefaultSignerFactory();\n const { DefaultEvmSigner } = await import('@rango-dev/signer-evm');\n signers.registerSigner(TxType.EVM, new DefaultEvmSigner(ethProvider));\n return signers;\n}\n"],
|
|
5
|
+
"mappings": "+EAUA,OACE,0BAAAA,EACA,yBAAAC,EACA,kBAAAC,EACA,kBAAAC,EACA,uBAAAC,EACA,eAAAC,MACK,4BACP,OAAS,kBAAAC,MAAsB,cClBxB,SAASC,GAAc,CAC5B,GAAM,CAAE,YAAAC,CAAY,EAAI,OAExB,OAAMA,IAAgBA,GAAa,SAAWA,GAAa,eAClDA,EAEF,IACT,CAPgBC,EAAAF,EAAA,eCEhB,OAAS,sBAAAG,EAAoB,YAAAC,MAAgB,4BAC7C,OAAS,wBAAAC,EAAsB,mBAAmBC,MAAc,cAEhE,eAAOC,EACLC,EACwB,CACxB,IAAMC,EAAcC,EAAmBF,EAAUG,EAAS,QAAQ,EAC5DC,EAAU,IAAIC,EACd,CAAE,iBAAAC,CAAiB,EAAI,KAAM,QAAO,uBAAuB,EACjE,OAAAF,EAAQ,eAAeG,EAAO,IAAK,IAAID,EAAiBL,CAAW,CAAC,EAC7DG,CACT,CAR8BI,EAAAT,EAAA,cFkB9B,IAAMU,EAASC,EAAY,aAEdC,EAAS,CACpB,KAAMF,CACR,EAEaG,EAAcC,EAGdC,EAAmBC,EAAA,MAAO,CAAE,SAAAC,CAAS,IAAM,CACtD,GAAM,CAAE,SAAAC,EAAU,QAAAC,CAAQ,EAAI,MAAMC,EAAeH,CAAQ,EAC3D,MAAO,CACL,SAAAC,EACA,QAAAC,CACF,CACF,EANgC,WAQnBE,EAAuBC,EAEvBC,EAA+BC,EAE/BC,EAAuCC,EAEvCC,EAAwDA,EAExDC,EAAmCC,EAEnCC,EAAkEd,EAC7Ee,GACG,CACH,IAAMC,EAAOC,EAAeF,CAAc,EAC1C,MAAO,CACL,KAAM,eACN,IAAK,4FACL,YAAa,CACX,OACE,0FACF,MACE,0FACF,QAAS,2CACX,EACA,MAAO,UACP,gBAAiBC,CACnB,CACF,EAjB+E",
|
|
6
6
|
"names": ["canEagerlyConnectToEvm", "canSwitchNetworkToEvm", "getEvmAccounts", "subscribeToEvm", "switchNetworkForEvm", "WalletTypes", "evmBlockchains", "trustWallet", "trustwallet", "__name", "getNetworkInstance", "Networks", "DefaultSignerFactory", "TxType", "getSigners", "provider", "ethProvider", "getNetworkInstance", "Networks", "signers", "DefaultSignerFactory", "DefaultEvmSigner", "TxType", "__name", "WALLET", "WalletTypes", "config", "getInstance", "trustWallet", "connect", "__name", "instance", "accounts", "chainId", "getEvmAccounts", "subscribe", "subscribeToEvm", "switchNetwork", "switchNetworkForEvm", "canSwitchNetworkTo", "canSwitchNetworkToEvm", "getSigners", "canEagerConnect", "canEagerlyConnectToEvm", "getWalletInfo", "allBlockChains", "evms", "evmBlockchains"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/helpers.ts":{"bytes":193,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/signer.ts":{"bytes":571,"imports":[{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"@rango-dev/signer-evm","kind":"dynamic-import","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":
|
|
1
|
+
{"inputs":{"src/helpers.ts":{"bytes":193,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/signer.ts":{"bytes":571,"imports":[{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"@rango-dev/signer-evm","kind":"dynamic-import","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":1930,"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":"<runtime>","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":4696},"dist/index.js":{"imports":[{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","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-dev/signer-evm","kind":"dynamic-import","external":true}],"exports":["canEagerConnect","canSwitchNetworkTo","config","connect","getInstance","getSigners","getWalletInfo","subscribe","switchNetwork"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":835},"src/helpers.ts":{"bytesInOutput":106},"src/signer.ts":{"bytesInOutput":318}},"bytes":1537}}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rango-dev/provider-trustwallet",
|
|
3
|
-
"version": "0.37.1-next.
|
|
3
|
+
"version": "0.37.1-next.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"lint": "eslint \"**/*.{ts,tsx}\" --ignore-path ../../.eslintignore"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@rango-dev/signer-evm": "^0.30.0",
|
|
25
|
-
"@rango-dev/wallets-shared": "^0.37.1-next.
|
|
26
|
-
"rango-types": "^0.1.
|
|
24
|
+
"@rango-dev/signer-evm": "^0.30.1-next.0",
|
|
25
|
+
"@rango-dev/wallets-shared": "^0.37.1-next.4",
|
|
26
|
+
"rango-types": "^0.1.74"
|
|
27
27
|
},
|
|
28
28
|
"publishConfig": {
|
|
29
29
|
"access": "public"
|
package/src/index.ts
CHANGED
|
@@ -57,9 +57,9 @@ export const getWalletInfo: (allBlockChains: BlockchainMeta[]) => WalletInfo = (
|
|
|
57
57
|
img: 'https://raw.githubusercontent.com/rango-exchange/assets/main/wallets/trustwallet/icon.svg',
|
|
58
58
|
installLink: {
|
|
59
59
|
CHROME:
|
|
60
|
-
'https://chrome.google.com/webstore/detail/trust-wallet/egjidjbpglichdcondbcbdnbeeppgdph
|
|
60
|
+
'https://chrome.google.com/webstore/detail/trust-wallet/egjidjbpglichdcondbcbdnbeeppgdph',
|
|
61
61
|
BRAVE:
|
|
62
|
-
'https://chrome.google.com/webstore/detail/trust-wallet/egjidjbpglichdcondbcbdnbeeppgdph
|
|
62
|
+
'https://chrome.google.com/webstore/detail/trust-wallet/egjidjbpglichdcondbcbdnbeeppgdph',
|
|
63
63
|
DEFAULT: 'https://trustwallet.com/browser-extension',
|
|
64
64
|
},
|
|
65
65
|
color: '#ffffff',
|