@reef-knot/wallet-adapter-safe 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.
@@ -0,0 +1,3 @@
1
+ import { WalletAdapterType } from '@reef-knot/types';
2
+ export declare const Safe: WalletAdapterType;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -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;AAGrD,eAAO,MAAM,IAAI,EAAE,iBAgBjB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,23 @@
1
+ import { SafeConnector } from 'wagmi/connectors/safe';
2
+
3
+ const Safe = ({
4
+ chains
5
+ }) => ({
6
+ walletName: 'Safe',
7
+ walletId: 'safe',
8
+ autoConnectOnly: true,
9
+ detector: () => {
10
+ // iframe check
11
+ // A more precise check will occur during SafeConnector connection.
12
+ return globalThis.window && globalThis.window.parent !== globalThis.window;
13
+ },
14
+ connector: new SafeConnector({
15
+ chains,
16
+ options: {
17
+ allowedDomains: [/gnosis-safe.io$/, /app.safe.global$/],
18
+ debug: false
19
+ }
20
+ })
21
+ });
22
+
23
+ export { Safe };
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@reef-knot/wallet-adapter-safe",
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
+ "@svgr/rollup": "^6.5.1",
37
+ "eslint-config-custom": "*"
38
+ },
39
+ "peerDependencies": {
40
+ "wagmi": "^0.12.19",
41
+ "@reef-knot/types": "^1.2.1"
42
+ }
43
+ }