@reef-knot/wallet-adapter-dapp-browser-injected 1.0.0
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 +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +26 -0
- package/package.json +45 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAIrD,eAAO,MAAM,mBAAmB,EAAE,iBAYhC,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { InjectedConnector } from 'wagmi/connectors/injected';
|
|
2
|
+
import { isMobileOrTablet } from '@reef-knot/wallets-helpers';
|
|
3
|
+
|
|
4
|
+
const DAppBrowserInjected = ({
|
|
5
|
+
chains
|
|
6
|
+
}) => ({
|
|
7
|
+
walletName: 'DAppBrowser',
|
|
8
|
+
walletId: 'dappBrowserInjected',
|
|
9
|
+
autoConnectOnly: true,
|
|
10
|
+
detector: () => {
|
|
11
|
+
var _a;
|
|
12
|
+
return !!((_a = globalThis.window) === null || _a === void 0 ? void 0 : _a.ethereum) && isMobileOrTablet;
|
|
13
|
+
},
|
|
14
|
+
connector: new InjectedConnector({
|
|
15
|
+
chains,
|
|
16
|
+
options: {
|
|
17
|
+
name: 'DAppBrowser',
|
|
18
|
+
getProvider: () => {
|
|
19
|
+
var _a;
|
|
20
|
+
return (_a = globalThis.window) === null || _a === void 0 ? void 0 : _a.ethereum;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
})
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
export { DAppBrowserInjected };
|
package/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@reef-knot/wallet-adapter-dapp-browser-injected",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"types": "dist/index.d.ts",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"typesVersions": {
|
|
10
|
+
"*": {
|
|
11
|
+
".": [
|
|
12
|
+
"dist/index.d.ts"
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"type": "module",
|
|
17
|
+
"files": [
|
|
18
|
+
"dist"
|
|
19
|
+
],
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"homepage": "https://github.com/lidofinance/reef-knot",
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/lidofinance/reef-knot/issues"
|
|
24
|
+
},
|
|
25
|
+
"publishConfig": {
|
|
26
|
+
"registry": "https://registry.npmjs.org/",
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "rollup -c",
|
|
31
|
+
"dev": "dev=on rollup -c -w",
|
|
32
|
+
"lint": "eslint --ext ts,tsx,js,mjs ."
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@reef-knot/types": "^1.3.0",
|
|
36
|
+
"@reef-knot/wallets-helpers": "^1.1.5",
|
|
37
|
+
"@svgr/rollup": "^6.5.1",
|
|
38
|
+
"eslint-config-custom": "*"
|
|
39
|
+
},
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"wagmi": "^0.12.19",
|
|
42
|
+
"@reef-knot/types": "^1.2.1",
|
|
43
|
+
"@reef-knot/wallets-helpers": "^1.1.5"
|
|
44
|
+
}
|
|
45
|
+
}
|