@dynamic-labs/wallet-connector-core 3.0.0-alpha.1 → 3.0.0-alpha.3
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 +21 -0
- package/package.json +6 -6
- package/src/index.cjs +2 -0
- package/src/index.js +1 -0
- package/src/lib/ISessionKeyCompatibleWalletConnector.d.ts +15 -0
- package/src/lib/index.d.ts +1 -0
- package/src/utils/index.d.ts +1 -0
- package/src/utils/isSessionKeyCompatibleWalletConnector/index.d.ts +1 -0
- package/src/utils/isSessionKeyCompatibleWalletConnector/isSessionKeyCompatibleWalletConnector.cjs +12 -0
- package/src/utils/isSessionKeyCompatibleWalletConnector/isSessionKeyCompatibleWalletConnector.d.ts +2 -0
- package/src/utils/isSessionKeyCompatibleWalletConnector/isSessionKeyCompatibleWalletConnector.js +8 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,25 @@
|
|
|
1
1
|
|
|
2
|
+
## [3.0.0-alpha.3](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.2...v3.0.0-alpha.3) (2024-06-11)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* only navigate to mfa backup codes when needed ([#5965](https://github.com/dynamic-labs/DynamicAuth/issues/5965)) ([edc462f](https://github.com/dynamic-labs/DynamicAuth/commit/edc462f20768885db1883a2c8d005e07044092d5))
|
|
8
|
+
|
|
9
|
+
## [3.0.0-alpha.2](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.1...v3.0.0-alpha.2) (2024-06-11)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* add silent signing ([#5712](https://github.com/dynamic-labs/DynamicAuth/issues/5712)) ([17f06f2](https://github.com/dynamic-labs/DynamicAuth/commit/17f06f24d9f576b4d3d879e14de73dc6e9ab2118)), closes [#5807](https://github.com/dynamic-labs/DynamicAuth/issues/5807) [#5908](https://github.com/dynamic-labs/DynamicAuth/issues/5908) [#5932](https://github.com/dynamic-labs/DynamicAuth/issues/5932) [#5937](https://github.com/dynamic-labs/DynamicAuth/issues/5937) [#5949](https://github.com/dynamic-labs/DynamicAuth/issues/5949)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* ensure backup code acknowledgement can be shown async ([#5955](https://github.com/dynamic-labs/DynamicAuth/issues/5955)) ([6e4d053](https://github.com/dynamic-labs/DynamicAuth/commit/6e4d0536f4d5eafc93fc6986d3ad8dc66bccd143))
|
|
20
|
+
* ensure sign message will not show 2 times ([#5938](https://github.com/dynamic-labs/DynamicAuth/issues/5938)) ([8b5a16b](https://github.com/dynamic-labs/DynamicAuth/commit/8b5a16bab201ff0a74d6f5065d454ba62131a761))
|
|
21
|
+
* process undefined in browser context ([#5920](https://github.com/dynamic-labs/DynamicAuth/issues/5920)) ([02fed81](https://github.com/dynamic-labs/DynamicAuth/commit/02fed811c53f7d14c91aab47d0b69ea2697619a7))
|
|
22
|
+
|
|
2
23
|
## [3.0.0-alpha.1](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.0...v3.0.0-alpha.1) (2024-06-10)
|
|
3
24
|
|
|
4
25
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/wallet-connector-core",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.3",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
"@dynamic-labs/sdk-api-core": "0.0.461"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@dynamic-labs/logger": "3.0.0-alpha.
|
|
33
|
-
"@dynamic-labs/rpc-providers": "3.0.0-alpha.
|
|
34
|
-
"@dynamic-labs/types": "3.0.0-alpha.
|
|
35
|
-
"@dynamic-labs/utils": "3.0.0-alpha.
|
|
36
|
-
"@dynamic-labs/wallet-book": "3.0.0-alpha.
|
|
32
|
+
"@dynamic-labs/logger": "3.0.0-alpha.3",
|
|
33
|
+
"@dynamic-labs/rpc-providers": "3.0.0-alpha.3",
|
|
34
|
+
"@dynamic-labs/types": "3.0.0-alpha.3",
|
|
35
|
+
"@dynamic-labs/utils": "3.0.0-alpha.3",
|
|
36
|
+
"@dynamic-labs/wallet-book": "3.0.0-alpha.3",
|
|
37
37
|
"eventemitter3": "5.0.1"
|
|
38
38
|
}
|
|
39
39
|
}
|
package/src/index.cjs
CHANGED
|
@@ -31,6 +31,7 @@ var getRpcUrlForChain = require('./utils/getRpcUrlForChain/getRpcUrlForChain.cjs
|
|
|
31
31
|
var isCoinbaseMpcWalletConnector = require('./utils/isCoinbaseMpcWalletConnector/isCoinbaseMpcWalletConnector.cjs');
|
|
32
32
|
var isWalletConnectConnector = require('./utils/isWalletConnectConnector/isWalletConnectConnector.cjs');
|
|
33
33
|
var isSendBalanceWalletConnector = require('./utils/isSendBalanceWalletConnector/isSendBalanceWalletConnector.cjs');
|
|
34
|
+
var isSessionKeyCompatibleWalletConnector = require('./utils/isSessionKeyCompatibleWalletConnector/isSessionKeyCompatibleWalletConnector.cjs');
|
|
34
35
|
|
|
35
36
|
|
|
36
37
|
|
|
@@ -66,3 +67,4 @@ exports.getRpcUrlForChain = getRpcUrlForChain.getRpcUrlForChain;
|
|
|
66
67
|
exports.isCoinbaseMpcWalletConnector = isCoinbaseMpcWalletConnector.isCoinbaseMpcWalletConnector;
|
|
67
68
|
exports.isWalletConnectConnector = isWalletConnectConnector.isWalletConnectConnector;
|
|
68
69
|
exports.isSendBalanceWalletConnector = isSendBalanceWalletConnector.isSendBalanceWalletConnector;
|
|
70
|
+
exports.isSessionKeyCompatibleWalletConnector = isSessionKeyCompatibleWalletConnector.isSessionKeyCompatibleWalletConnector;
|
package/src/index.js
CHANGED
|
@@ -27,3 +27,4 @@ export { getRpcUrlForChain } from './utils/getRpcUrlForChain/getRpcUrlForChain.j
|
|
|
27
27
|
export { isCoinbaseMpcWalletConnector } from './utils/isCoinbaseMpcWalletConnector/isCoinbaseMpcWalletConnector.js';
|
|
28
28
|
export { isWalletConnectConnector } from './utils/isWalletConnectConnector/isWalletConnectConnector.js';
|
|
29
29
|
export { isSendBalanceWalletConnector } from './utils/isSendBalanceWalletConnector/isSendBalanceWalletConnector.js';
|
|
30
|
+
export { isSessionKeyCompatibleWalletConnector } from './utils/isSessionKeyCompatibleWalletConnector/isSessionKeyCompatibleWalletConnector.js';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { WalletConnectorBase } from '.';
|
|
2
|
+
interface SessionKeys {
|
|
3
|
+
publicKey: string;
|
|
4
|
+
privateKey: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ISessionKeyCompatibleWalletConnector extends WalletConnectorBase {
|
|
7
|
+
isSessionKeyCompatible(): boolean;
|
|
8
|
+
isSessionActive(): Promise<boolean>;
|
|
9
|
+
sessionKeys?: SessionKeys;
|
|
10
|
+
setSessionKeyFetcher(fetcher: () => Promise<SessionKeys>): void;
|
|
11
|
+
setSessionKeyRemoveFunction(fetcher: () => void): void;
|
|
12
|
+
createOrRestoreSession(): Promise<string | undefined>;
|
|
13
|
+
removeSessionKeys: (() => Promise<void>) | undefined;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
package/src/lib/index.d.ts
CHANGED
|
@@ -11,4 +11,5 @@ export * from './IPhantomRedirectConnector';
|
|
|
11
11
|
export * from './ICoinbaseMPCWalletConnector';
|
|
12
12
|
export * from './IWalletConnectConnector';
|
|
13
13
|
export * from './ISendBalanceWalletConnector';
|
|
14
|
+
export * from './ISessionKeyCompatibleWalletConnector';
|
|
14
15
|
export * from './ISMSWalletConnector';
|
package/src/utils/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { isSessionKeyCompatibleWalletConnector } from './isSessionKeyCompatibleWalletConnector';
|
package/src/utils/isSessionKeyCompatibleWalletConnector/isSessionKeyCompatibleWalletConnector.cjs
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
const isSessionKeyCompatibleWalletConnector = (walletConnector) => {
|
|
7
|
+
const connector = walletConnector;
|
|
8
|
+
return Boolean(typeof (connector === null || connector === void 0 ? void 0 : connector.isSessionKeyCompatible) === 'function' &&
|
|
9
|
+
connector.isSessionKeyCompatible());
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
exports.isSessionKeyCompatibleWalletConnector = isSessionKeyCompatibleWalletConnector;
|
package/src/utils/isSessionKeyCompatibleWalletConnector/isSessionKeyCompatibleWalletConnector.d.ts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { ISessionKeyCompatibleWalletConnector, WalletConnector } from '../../lib';
|
|
2
|
+
export declare const isSessionKeyCompatibleWalletConnector: (walletConnector: WalletConnector | ISessionKeyCompatibleWalletConnector | undefined | null) => walletConnector is ISessionKeyCompatibleWalletConnector;
|
package/src/utils/isSessionKeyCompatibleWalletConnector/isSessionKeyCompatibleWalletConnector.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
const isSessionKeyCompatibleWalletConnector = (walletConnector) => {
|
|
3
|
+
const connector = walletConnector;
|
|
4
|
+
return Boolean(typeof (connector === null || connector === void 0 ? void 0 : connector.isSessionKeyCompatible) === 'function' &&
|
|
5
|
+
connector.isSessionKeyCompatible());
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export { isSessionKeyCompatibleWalletConnector };
|