@dynamic-labs/flow 3.0.0-alpha.52 → 3.0.0-alpha.54
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 +46 -0
- package/package.json +4 -4
- package/src/FlowWalletConnector.cjs +4 -1
- package/src/FlowWalletConnector.d.ts +4 -2
- package/src/FlowWalletConnector.js +4 -1
- package/src/index.cjs +4 -0
- package/src/index.d.ts +1 -0
- package/src/index.js +2 -0
- package/src/wallet/FlowWallet.cjs +11 -0
- package/src/wallet/FlowWallet.d.ts +4 -0
- package/src/wallet/FlowWallet.js +7 -0
- package/src/wallet/index.d.ts +2 -0
- package/src/wallet/isFlowWallet/index.d.ts +1 -0
- package/src/wallet/isFlowWallet/isFlowWallet.cjs +8 -0
- package/src/wallet/isFlowWallet/isFlowWallet.d.ts +3 -0
- package/src/wallet/isFlowWallet/isFlowWallet.js +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,50 @@
|
|
|
1
1
|
|
|
2
|
+
## [3.0.0-alpha.54](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.53...v3.0.0-alpha.54) (2024-08-29)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* transaction hanging in confirmation modal ([#6740](https://github.com/dynamic-labs/DynamicAuth/issues/6740)) ([f03d286](https://github.com/dynamic-labs/DynamicAuth/commit/f03d286aaf471dbc7a6149acee10512be7b56b18))
|
|
8
|
+
|
|
9
|
+
## [3.0.0-alpha.53](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.52...v3.0.0-alpha.53) (2024-08-29)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### ⚠ BREAKING CHANGES
|
|
13
|
+
|
|
14
|
+
* simplify solana wallet signer types (#6748)
|
|
15
|
+
* deprecate getEoaConnector (#6571)
|
|
16
|
+
* limit methods and props returned by wallet.connector (#6540)
|
|
17
|
+
* move generic solana code to solana-core package (#6701)
|
|
18
|
+
* revamp ether v6 interface (#6548)
|
|
19
|
+
* add ethereum wallet specific methods and intercept to sync when needed (#6662)
|
|
20
|
+
* add solana wallet specific methods and intercept to sync when needed (#6608)
|
|
21
|
+
* don't force primary wallet to be connected (#6128)
|
|
22
|
+
|
|
23
|
+
### Features
|
|
24
|
+
|
|
25
|
+
* add bitcoin wallet specific methods and intercept to sync when needed ([#6663](https://github.com/dynamic-labs/DynamicAuth/issues/6663)) ([ed699b1](https://github.com/dynamic-labs/DynamicAuth/commit/ed699b1f8c264755779ec4840d105f89ade5500e))
|
|
26
|
+
* add ethereum wallet specific methods and intercept to sync when needed ([#6662](https://github.com/dynamic-labs/DynamicAuth/issues/6662)) ([372360e](https://github.com/dynamic-labs/DynamicAuth/commit/372360ed7ca395f88811fc62c94b2b494eb59971))
|
|
27
|
+
* add solana wallet specific methods and intercept to sync when needed ([#6608](https://github.com/dynamic-labs/DynamicAuth/issues/6608)) ([565f610](https://github.com/dynamic-labs/DynamicAuth/commit/565f6100340296c267e9706fd263e9bd3f7d3732))
|
|
28
|
+
* add useSmartWallets hook to manage aa wallets ([#6564](https://github.com/dynamic-labs/DynamicAuth/issues/6564)) ([a243d36](https://github.com/dynamic-labs/DynamicAuth/commit/a243d361ce7c368d0f1afda55f9c1fabefd75ba8))
|
|
29
|
+
* don't force primary wallet to be connected ([#6128](https://github.com/dynamic-labs/DynamicAuth/issues/6128)) ([018a6f6](https://github.com/dynamic-labs/DynamicAuth/commit/018a6f66f8725914ab97ea3e2e1c80626266e503))
|
|
30
|
+
* new prop to enable prompt for linking when account change is detected ([#6713](https://github.com/dynamic-labs/DynamicAuth/issues/6713)) ([b5a6321](https://github.com/dynamic-labs/DynamicAuth/commit/b5a63212ae33fae24401f141d5ca2356b446dcff))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Bug Fixes
|
|
34
|
+
|
|
35
|
+
* always sync wagmi client with primary wallet ([#6577](https://github.com/dynamic-labs/DynamicAuth/issues/6577)) ([be22fde](https://github.com/dynamic-labs/DynamicAuth/commit/be22fdea3bb61db79b06ba56cb32da6cd8141b66))
|
|
36
|
+
* cosmos wallet intercepts ([#6720](https://github.com/dynamic-labs/DynamicAuth/issues/6720)) ([cfc9df4](https://github.com/dynamic-labs/DynamicAuth/commit/cfc9df48a8032f7348fec14f77b9e378d2e26a22))
|
|
37
|
+
* magiceden wallet events not working correctly on page refresh ([#6735](https://github.com/dynamic-labs/DynamicAuth/issues/6735)) ([6ed5964](https://github.com/dynamic-labs/DynamicAuth/commit/6ed5964134a2cafd392c19f18eb71e6ca2ce238d))
|
|
38
|
+
* use proxy to intercept solana signer methods ([#6743](https://github.com/dynamic-labs/DynamicAuth/issues/6743)) ([ecbe5ea](https://github.com/dynamic-labs/DynamicAuth/commit/ecbe5ea772592d2c693d8222d85b7642acd151a8))
|
|
39
|
+
* wallet.chain references ([525c1ca](https://github.com/dynamic-labs/DynamicAuth/commit/525c1ca9a8fe6402c06eabe6aebc30e310411d9b))
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
* deprecate getEoaConnector ([#6571](https://github.com/dynamic-labs/DynamicAuth/issues/6571)) ([0226ee5](https://github.com/dynamic-labs/DynamicAuth/commit/0226ee5a13f2418607076ee6f2ec0a579b06dd5d))
|
|
43
|
+
* limit methods and props returned by wallet.connector ([#6540](https://github.com/dynamic-labs/DynamicAuth/issues/6540)) ([9c86e35](https://github.com/dynamic-labs/DynamicAuth/commit/9c86e35c72cd40313bfd19254dd6171ee8f62213))
|
|
44
|
+
* move generic solana code to solana-core package ([#6701](https://github.com/dynamic-labs/DynamicAuth/issues/6701)) ([30815f5](https://github.com/dynamic-labs/DynamicAuth/commit/30815f5d46feeefb2413c1b7d30b43d5370ee032))
|
|
45
|
+
* revamp ether v6 interface ([#6548](https://github.com/dynamic-labs/DynamicAuth/issues/6548)) ([f3b2fb8](https://github.com/dynamic-labs/DynamicAuth/commit/f3b2fb8da7de21f9c58e67fa7f5580166195092a))
|
|
46
|
+
* simplify solana wallet signer types ([#6748](https://github.com/dynamic-labs/DynamicAuth/issues/6748)) ([01d1a42](https://github.com/dynamic-labs/DynamicAuth/commit/01d1a42bc916ab329580b741ba60d706bf6c5491))
|
|
47
|
+
|
|
2
48
|
## [3.0.0-alpha.52](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.51...v3.0.0-alpha.52) (2024-08-28)
|
|
3
49
|
|
|
4
50
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/flow",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.54",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@onflow/fcl": "1.10.0",
|
|
30
|
-
"@dynamic-labs/utils": "3.0.0-alpha.
|
|
31
|
-
"@dynamic-labs/wallet-book": "3.0.0-alpha.
|
|
32
|
-
"@dynamic-labs/wallet-connector-core": "3.0.0-alpha.
|
|
30
|
+
"@dynamic-labs/utils": "3.0.0-alpha.54",
|
|
31
|
+
"@dynamic-labs/wallet-book": "3.0.0-alpha.54",
|
|
32
|
+
"@dynamic-labs/wallet-connector-core": "3.0.0-alpha.54"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {}
|
|
35
35
|
}
|
|
@@ -7,11 +7,13 @@ var _tslib = require('../_virtual/_tslib.cjs');
|
|
|
7
7
|
var fcl = require('@onflow/fcl');
|
|
8
8
|
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
9
9
|
var utils = require('@dynamic-labs/utils');
|
|
10
|
+
var FlowWallet = require('./wallet/FlowWallet.cjs');
|
|
10
11
|
|
|
11
12
|
class FlowWalletConnector extends walletConnectorCore.WalletConnectorBase {
|
|
12
13
|
constructor(opts) {
|
|
13
14
|
var _a;
|
|
14
15
|
super(opts);
|
|
16
|
+
this.ChainWallet = FlowWallet.FlowWallet;
|
|
15
17
|
this.connectedChain = 'FLOW';
|
|
16
18
|
this.supportedChains = ['FLOW'];
|
|
17
19
|
this.appName = opts.appName;
|
|
@@ -57,8 +59,9 @@ class FlowWalletConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
57
59
|
}
|
|
58
60
|
});
|
|
59
61
|
}
|
|
60
|
-
proveOwnership(messageToSign) {
|
|
62
|
+
proveOwnership(address, messageToSign) {
|
|
61
63
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
yield this.validateActiveWallet(address);
|
|
62
65
|
try {
|
|
63
66
|
yield this.connect();
|
|
64
67
|
yield this.signDelay();
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Chain, WalletConnectorBase } from '@dynamic-labs/wallet-connector-core';
|
|
2
2
|
import { WalletBookSchema } from '@dynamic-labs/wallet-book';
|
|
3
|
-
|
|
3
|
+
import { FlowWallet } from './wallet';
|
|
4
|
+
export declare abstract class FlowWalletConnector extends WalletConnectorBase<typeof FlowWallet> {
|
|
4
5
|
protected appName?: string;
|
|
5
6
|
protected appLogoUrl?: string;
|
|
7
|
+
ChainWallet: typeof FlowWallet;
|
|
6
8
|
connectedChain: Chain;
|
|
7
9
|
supportedChains: Chain[];
|
|
8
10
|
protected network: 'mainnet' | 'testnet';
|
|
@@ -18,7 +20,7 @@ export declare abstract class FlowWalletConnector extends WalletConnectorBase {
|
|
|
18
20
|
getNetwork(): Promise<string>;
|
|
19
21
|
setupConfig(): Promise<void>;
|
|
20
22
|
getAddress(): Promise<string | undefined>;
|
|
21
|
-
proveOwnership(messageToSign: string): Promise<string | undefined>;
|
|
23
|
+
proveOwnership(address: string, messageToSign: string): Promise<string | undefined>;
|
|
22
24
|
signMessage(messageToSign: string): Promise<string | undefined>;
|
|
23
25
|
getBalance(address: string): Promise<string | undefined>;
|
|
24
26
|
endSession(): Promise<void>;
|
|
@@ -3,11 +3,13 @@ import { __awaiter } from '../_virtual/_tslib.js';
|
|
|
3
3
|
import { currentUser, config, send, script, decode } from '@onflow/fcl';
|
|
4
4
|
import { WalletConnectorBase, logger } from '@dynamic-labs/wallet-connector-core';
|
|
5
5
|
import { DynamicError } from '@dynamic-labs/utils';
|
|
6
|
+
import { FlowWallet } from './wallet/FlowWallet.js';
|
|
6
7
|
|
|
7
8
|
class FlowWalletConnector extends WalletConnectorBase {
|
|
8
9
|
constructor(opts) {
|
|
9
10
|
var _a;
|
|
10
11
|
super(opts);
|
|
12
|
+
this.ChainWallet = FlowWallet;
|
|
11
13
|
this.connectedChain = 'FLOW';
|
|
12
14
|
this.supportedChains = ['FLOW'];
|
|
13
15
|
this.appName = opts.appName;
|
|
@@ -53,8 +55,9 @@ class FlowWalletConnector extends WalletConnectorBase {
|
|
|
53
55
|
}
|
|
54
56
|
});
|
|
55
57
|
}
|
|
56
|
-
proveOwnership(messageToSign) {
|
|
58
|
+
proveOwnership(address, messageToSign) {
|
|
57
59
|
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
+
yield this.validateActiveWallet(address);
|
|
58
61
|
try {
|
|
59
62
|
yield this.connect();
|
|
60
63
|
yield this.signDelay();
|
package/src/index.cjs
CHANGED
|
@@ -7,9 +7,13 @@ var blocto = require('./blocto.cjs');
|
|
|
7
7
|
var dapper = require('./dapper.cjs');
|
|
8
8
|
var lilico = require('./lilico.cjs');
|
|
9
9
|
var FlowWalletConnector = require('./FlowWalletConnector.cjs');
|
|
10
|
+
var FlowWallet = require('./wallet/FlowWallet.cjs');
|
|
11
|
+
var isFlowWallet = require('./wallet/isFlowWallet/isFlowWallet.cjs');
|
|
10
12
|
|
|
11
13
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
12
14
|
const FlowWalletConnectors = (props) => [blocto, dapper, lilico];
|
|
13
15
|
|
|
14
16
|
exports.FlowWalletConnector = FlowWalletConnector.FlowWalletConnector;
|
|
17
|
+
exports.FlowWallet = FlowWallet.FlowWallet;
|
|
18
|
+
exports.isFlowWallet = isFlowWallet.isFlowWallet;
|
|
15
19
|
exports.FlowWalletConnectors = FlowWalletConnectors;
|
package/src/index.d.ts
CHANGED
package/src/index.js
CHANGED
|
@@ -3,6 +3,8 @@ import Blocto from './blocto.js';
|
|
|
3
3
|
import Dapper from './dapper.js';
|
|
4
4
|
import Lilico from './lilico.js';
|
|
5
5
|
export { FlowWalletConnector } from './FlowWalletConnector.js';
|
|
6
|
+
export { FlowWallet } from './wallet/FlowWallet.js';
|
|
7
|
+
export { isFlowWallet } from './wallet/isFlowWallet/isFlowWallet.js';
|
|
6
8
|
|
|
7
9
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
8
10
|
const FlowWalletConnectors = (props) => [Blocto, Dapper, Lilico];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
7
|
+
|
|
8
|
+
class FlowWallet extends walletConnectorCore.Wallet {
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
exports.FlowWallet = FlowWallet;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './isFlowWallet';
|