@dynamic-labs/wallet-connector-core 0.16.1 → 0.17.0-RC.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/CHANGELOG.md CHANGED
@@ -1,4 +1,16 @@
1
1
 
2
+ ## [0.17.0-RC.0](https://github.com/dynamic-labs/DynamicAuth/compare/v0.16.1...v0.17.0-RC.0) (2023-04-18)
3
+
4
+
5
+ ### Features
6
+
7
+ * add magic social wallet connector ([#1848](https://github.com/dynamic-labs/DynamicAuth/issues/1848)) ([3f49d22](https://github.com/dynamic-labs/DynamicAuth/commit/3f49d2222ddf90835e3e3d58ac860835f33c9910))
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * type=module requires dot cjs files for running with node ([#1890](https://github.com/dynamic-labs/DynamicAuth/issues/1890)) ([5751d6e](https://github.com/dynamic-labs/DynamicAuth/commit/5751d6ebd6df376b241e812c5ae860b3a0cf6c80))
13
+
2
14
  ### [0.16.1](https://github.com/dynamic-labs/DynamicAuth/compare/v0.16.0...v0.16.1) (2023-04-15)
3
15
 
4
16
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/wallet-connector-core",
3
- "version": "0.16.1",
3
+ "version": "0.17.0-RC.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -13,15 +13,15 @@
13
13
  "homepage": "https://github.com/dynamic-labs/DynamicAuth/main/packages/wallet-connector-core#readme",
14
14
  "author": "Dynamic Labs, Inc.",
15
15
  "license": "MIT",
16
- "main": "./src/index.cjs.js",
17
- "module": "./src/index.es.js",
16
+ "main": "./src/index.cjs",
17
+ "module": "./src/index.js",
18
18
  "types": "./src/index.d.ts",
19
19
  "type": "module",
20
20
  "exports": {
21
21
  ".": {
22
22
  "types": "./src/index.d.ts",
23
- "import": "./src/index.es.js",
24
- "require": "./src/index.cjs.js"
23
+ "import": "./src/index.js",
24
+ "require": "./src/index.cjs"
25
25
  },
26
26
  "./package.json": "./package.json"
27
27
  }
@@ -2,8 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var WalletConnector = require('./lib/WalletConnector.cjs.js');
5
+ var WalletConnector = require('./lib/WalletConnector.cjs');
6
6
 
7
7
 
8
8
 
9
9
  exports.Chains = WalletConnector.Chains;
10
+ exports.socialProviders = WalletConnector.socialProviders;
package/src/index.js ADDED
@@ -0,0 +1 @@
1
+ export { Chains, socialProviders } from './lib/WalletConnector.js';
@@ -0,0 +1,30 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const Chains = [
6
+ 'ETH',
7
+ 'FLOW',
8
+ 'SOL',
9
+ 'EVM',
10
+ 'ALGO',
11
+ 'STARK',
12
+ 'ATOM',
13
+ 'COSMOS',
14
+ ];
15
+ const socialProviders = [
16
+ 'google',
17
+ 'facebook',
18
+ 'apple',
19
+ 'github',
20
+ 'bitbucket',
21
+ 'gitlab',
22
+ 'linkedin',
23
+ 'twitter',
24
+ 'discord',
25
+ 'twitch',
26
+ 'microsoft',
27
+ ];
28
+
29
+ exports.Chains = Chains;
30
+ exports.socialProviders = socialProviders;
@@ -1,5 +1,7 @@
1
1
  export declare const Chains: readonly ["ETH", "FLOW", "SOL", "EVM", "ALGO", "STARK", "ATOM", "COSMOS"];
2
2
  export type Chain = typeof Chains[number];
3
+ export declare const socialProviders: readonly ["google", "facebook", "apple", "github", "bitbucket", "gitlab", "linkedin", "twitter", "discord", "twitch", "microsoft"];
4
+ export type SocialProvider = typeof socialProviders[number];
3
5
  export type PayloadParams = {
4
6
  params: {
5
7
  accounts: string[];
@@ -21,7 +23,9 @@ export type WalletEventListeners = {
21
23
  export interface WalletConnector {
22
24
  canConnectViaCustodialService: boolean;
23
25
  canConnectViaQrCode: boolean;
24
- connect: () => Promise<void>;
26
+ canConnectViaSocial: boolean;
27
+ connect(args?: unknown): Promise<void>;
28
+ connect<T = undefined>(args: T): Promise<void>;
25
29
  connectedChain?: Chain;
26
30
  endSession?(): Promise<void>;
27
31
  fetchPublicAddress(opts?: FetchPublicAddressOpts): Promise<string | undefined>;
@@ -31,6 +35,8 @@ export interface WalletConnector {
31
35
  getNetwork(): Promise<number | undefined>;
32
36
  getRpcProvider(): Promise<unknown>;
33
37
  getRpcProvider<T>(): Promise<T>;
38
+ getSession?(): unknown;
39
+ getSession?<T>(): Promise<T>;
34
40
  getSigner(): Promise<unknown>;
35
41
  getSigner<T>(): Promise<T>;
36
42
  getWeb3Provider(): unknown;
@@ -0,0 +1,25 @@
1
+ const Chains = [
2
+ 'ETH',
3
+ 'FLOW',
4
+ 'SOL',
5
+ 'EVM',
6
+ 'ALGO',
7
+ 'STARK',
8
+ 'ATOM',
9
+ 'COSMOS',
10
+ ];
11
+ const socialProviders = [
12
+ 'google',
13
+ 'facebook',
14
+ 'apple',
15
+ 'github',
16
+ 'bitbucket',
17
+ 'gitlab',
18
+ 'linkedin',
19
+ 'twitter',
20
+ 'discord',
21
+ 'twitch',
22
+ 'microsoft',
23
+ ];
24
+
25
+ export { Chains, socialProviders };
package/src/index.es.js DELETED
@@ -1 +0,0 @@
1
- export { Chains } from './lib/WalletConnector.es.js';
@@ -1,17 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- /* istanbul ignore file */
6
- const Chains = [
7
- 'ETH',
8
- 'FLOW',
9
- 'SOL',
10
- 'EVM',
11
- 'ALGO',
12
- 'STARK',
13
- 'ATOM',
14
- 'COSMOS',
15
- ];
16
-
17
- exports.Chains = Chains;
@@ -1,13 +0,0 @@
1
- /* istanbul ignore file */
2
- const Chains = [
3
- 'ETH',
4
- 'FLOW',
5
- 'SOL',
6
- 'EVM',
7
- 'ALGO',
8
- 'STARK',
9
- 'ATOM',
10
- 'COSMOS',
11
- ];
12
-
13
- export { Chains };