@reef-knot/core-react 1.0.0 → 1.1.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 CHANGED
@@ -1,4 +1,3 @@
1
- export * from './connectors';
1
+ export * from './walletData';
2
2
  export * from './utils';
3
- export * from './types';
4
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- export { createConnectorsWalletConnect } from './connectors/WalletConnect.js';
2
- export { createConnectors } from './connectors/createConnectors.js';
1
+ export { getConnectors, walletAdapters, walletDataList } from './walletData/index.js';
3
2
  export { isValidHttpUrl } from './utils/isValidHttpUrl.js';
3
+ export { createConnectorsWalletConnect } from './walletData/connectorsWalletConnect.js';
@@ -5,4 +5,4 @@ export type RKConnectorWalletConnect = WalletConnectConnector & {
5
5
  export declare const createConnectorsWalletConnect: ({ rpc, }: {
6
6
  rpc: Record<number, string>;
7
7
  }) => WalletConnectConnector[];
8
- //# sourceMappingURL=WalletConnect.d.ts.map
8
+ //# sourceMappingURL=connectorsWalletConnect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectorsWalletConnect.d.ts","sourceRoot":"","sources":["../../src/walletData/connectorsWalletConnect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAMxE,MAAM,MAAM,wBAAwB,GAAG,sBAAsB,GAAG;IAC9D,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,6BAA6B;SAGnC,OAAO,MAAM,EAAE,MAAM,CAAC;8BAgE5B,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { Connector } from 'wagmi';
2
+ export * from './connectorsWalletConnect';
3
+ export declare const walletAdapters: import("@reef-knot/types").WalletAdapterType[];
4
+ export declare const walletDataList: import("@reef-knot/types").WalletAdapterData[];
5
+ export declare const getConnectors: ({ rpc }: {
6
+ rpc: Record<number, string>;
7
+ }) => Connector<any, any, any>[];
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/walletData/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIlC,cAAc,2BAA2B,CAAC;AAE1C,eAAO,MAAM,cAAc,gDAAqC,CAAC;AACjE,eAAO,MAAM,cAAc,gDAE1B,CAAC;AAEF,eAAO,MAAM,aAAa;SAAoB,OAAO,MAAM,EAAE,MAAM,CAAC;gCAOnE,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { WalletsListEthereum } from '@reef-knot/wallets-list';
2
+ import { createConnectorsWalletConnect } from './connectorsWalletConnect.js';
3
+
4
+ const walletAdapters = Object.values(WalletsListEthereum);
5
+ const walletDataList = walletAdapters.map(walletAdapter => walletAdapter());
6
+ const getConnectors = ({
7
+ rpc
8
+ }) => {
9
+ const connectors = [...walletDataList].map(walletData => walletData.connector);
10
+ const connectorsWC = createConnectorsWalletConnect({
11
+ rpc
12
+ });
13
+ return [...connectorsWC, ...connectors];
14
+ };
15
+
16
+ export { createConnectorsWalletConnect, getConnectors, walletAdapters, walletDataList };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reef-knot/core-react",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "exports": {
@@ -33,14 +33,17 @@
33
33
  },
34
34
  "scripts": {
35
35
  "build": "rollup -c",
36
- "dev": "dev=on rollup -c -w"
37
- },
38
- "peerDependencies": {
39
- "react": ">=17",
40
- "wagmi": "^0.11.5"
36
+ "dev": "dev=on rollup -c -w",
37
+ "lint": "eslint"
41
38
  },
42
39
  "devDependencies": {
43
40
  "react": "17.0.2",
44
- "wagmi": "^0.11.5"
41
+ "wagmi": "^0.11.7",
42
+ "@reef-knot/wallets-list": "^1.1.0"
43
+ },
44
+ "peerDependencies": {
45
+ "react": ">=17",
46
+ "wagmi": "^0.11.7",
47
+ "@reef-knot/wallets-list": "^1.1.0"
45
48
  }
46
49
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"WalletConnect.d.ts","sourceRoot":"","sources":["../../src/connectors/WalletConnect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAMxE,MAAM,MAAM,wBAAwB,GAAG,sBAAsB,GAAG;IAC9D,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,6BAA6B;SAGnC,OAAO,MAAM,EAAE,MAAM,CAAC;8BAgE5B,CAAC"}
@@ -1,5 +0,0 @@
1
- import { InjectedConnector } from 'wagmi/connectors/injected';
2
- export declare const createConnectors: ({ rpc }: {
3
- rpc: Record<number, string>;
4
- }) => (InjectedConnector | import("@wagmi/connectors/dist/walletConnect").WalletConnectConnector)[];
5
- //# sourceMappingURL=createConnectors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createConnectors.d.ts","sourceRoot":"","sources":["../../src/connectors/createConnectors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAG9D,eAAO,MAAM,gBAAgB;SAAoB,OAAO,MAAM,EAAE,MAAM,CAAC;mGAKtE,CAAC"}
@@ -1,14 +0,0 @@
1
- import { InjectedConnector } from 'wagmi/connectors/injected';
2
- import { createConnectorsWalletConnect } from './WalletConnect.js';
3
-
4
- const createConnectors = ({
5
- rpc
6
- }) => {
7
- const connectorsWC = createConnectorsWalletConnect({
8
- rpc
9
- });
10
- const connectorInjected = new InjectedConnector();
11
- return [connectorInjected, ...connectorsWC];
12
- };
13
-
14
- export { createConnectors };
@@ -1,3 +0,0 @@
1
- export * from './WalletConnect';
2
- export * from './createConnectors';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/connectors/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC"}
@@ -1,18 +0,0 @@
1
- import { ElementType } from 'react';
2
- export type WalletAdapterData = {
3
- walletId: string;
4
- walletName: string;
5
- icons: {
6
- light: ElementType;
7
- dark: ElementType;
8
- };
9
- detector: () => boolean;
10
- downloadURLs: {
11
- default: string;
12
- android?: string;
13
- ios?: string;
14
- };
15
- };
16
- export type WalletAdapterType = () => WalletAdapterData;
17
- export type WalletsListType = Record<string, WalletAdapterType>;
18
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEpC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IAInB,KAAK,EAAE;QACL,KAAK,EAAE,WAAW,CAAC;QACnB,IAAI,EAAE,WAAW,CAAC;KACnB,CAAC;IAIF,QAAQ,EAAE,MAAM,OAAO,CAAC;IAIxB,YAAY,EAAE;QACZ,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,MAAM,iBAAiB,CAAC;AAExD,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC"}