@dynamic-labs/algorand 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 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/algorand",
3
- "version": "3.0.0-alpha.52",
3
+ "version": "3.0.0-alpha.54",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -27,9 +27,9 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@perawallet/connect": "1.3.4",
30
- "@dynamic-labs/utils": "3.0.0-alpha.52",
31
- "@dynamic-labs/wallet-book": "3.0.0-alpha.52",
32
- "@dynamic-labs/wallet-connector-core": "3.0.0-alpha.52"
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
  }
@@ -6,6 +6,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
6
6
  var _tslib = require('../_virtual/_tslib.cjs');
7
7
  var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
8
8
  var utils = require('@dynamic-labs/utils');
9
+ var AlgorandWallet = require('./wallet/AlgorandWallet.cjs');
9
10
 
10
11
  const HTTP_STATUS_TOO_MANY_REQUESTS = 429;
11
12
  const HTTP_STATUS_NOT_FOUND = 404;
@@ -36,6 +37,7 @@ class AlgorandLocalStorageCache {
36
37
  class AlgorandWalletConnector extends walletConnectorCore.WalletConnectorBase {
37
38
  constructor(opts) {
38
39
  super(opts);
40
+ this.ChainWallet = AlgorandWallet.AlgorandWallet;
39
41
  this.connectedChain = 'ALGO';
40
42
  this.supportedChains = ['ALGO'];
41
43
  this.cache = new AlgorandLocalStorageCache(opts.cacheKey);
@@ -1,5 +1,6 @@
1
1
  import { Chain, WalletConnectorBase } from '@dynamic-labs/wallet-connector-core';
2
2
  import { WalletBookSchema } from '@dynamic-labs/wallet-book';
3
+ import { AlgorandWallet } from './wallet';
3
4
  interface IAlgorandSessionCache {
4
5
  clearCurrentAddress(): Promise<void>;
5
6
  getCurrentAddress(): Promise<string | undefined>;
@@ -9,8 +10,9 @@ export type AlgorandWalletConnectorOpts = {
9
10
  walletBook: WalletBookSchema;
10
11
  cacheKey: string;
11
12
  };
12
- export declare abstract class AlgorandWalletConnector extends WalletConnectorBase {
13
+ export declare abstract class AlgorandWalletConnector extends WalletConnectorBase<typeof AlgorandWallet> {
13
14
  cache: IAlgorandSessionCache;
15
+ ChainWallet: typeof AlgorandWallet;
14
16
  connectedChain: Chain;
15
17
  supportedChains: Chain[];
16
18
  constructor(opts: AlgorandWalletConnectorOpts);
@@ -2,6 +2,7 @@
2
2
  import { __awaiter } from '../_virtual/_tslib.js';
3
3
  import { WalletConnectorBase } from '@dynamic-labs/wallet-connector-core';
4
4
  import { getItemAsync, setItemAsync, removeItemAsync } from '@dynamic-labs/utils';
5
+ import { AlgorandWallet } from './wallet/AlgorandWallet.js';
5
6
 
6
7
  const HTTP_STATUS_TOO_MANY_REQUESTS = 429;
7
8
  const HTTP_STATUS_NOT_FOUND = 404;
@@ -32,6 +33,7 @@ class AlgorandLocalStorageCache {
32
33
  class AlgorandWalletConnector extends WalletConnectorBase {
33
34
  constructor(opts) {
34
35
  super(opts);
36
+ this.ChainWallet = AlgorandWallet;
35
37
  this.connectedChain = 'ALGO';
36
38
  this.supportedChains = ['ALGO'];
37
39
  this.cache = new AlgorandLocalStorageCache(opts.cacheKey);
package/src/index.cjs CHANGED
@@ -4,9 +4,13 @@
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var index = require('./pera/index.cjs');
7
+ var AlgorandWallet = require('./wallet/AlgorandWallet.cjs');
8
+ var isAlgorandWallet = require('./wallet/isAlgorandWallet/isAlgorandWallet.cjs');
7
9
 
8
10
  const AlgorandWalletConnectors = (props) => [
9
11
  ...index.PeraWalletConnectors(),
10
12
  ];
11
13
 
14
+ exports.AlgorandWallet = AlgorandWallet.AlgorandWallet;
15
+ exports.isAlgorandWallet = isAlgorandWallet.isAlgorandWallet;
12
16
  exports.AlgorandWalletConnectors = AlgorandWalletConnectors;
package/src/index.d.ts CHANGED
@@ -1 +1,3 @@
1
+ export { isAlgorandWallet, AlgorandWallet } from './wallet';
2
+ export type { IAlgorandSigner } from './types';
1
3
  export declare const AlgorandWalletConnectors: (props: any) => typeof import("./pera").PeraWalletConnector[];
package/src/index.js CHANGED
@@ -1,5 +1,7 @@
1
1
  'use client'
2
2
  import { PeraWalletConnectors } from './pera/index.js';
3
+ export { AlgorandWallet } from './wallet/AlgorandWallet.js';
4
+ export { isAlgorandWallet } from './wallet/isAlgorandWallet/isAlgorandWallet.js';
3
5
 
4
6
  const AlgorandWalletConnectors = (props) => [
5
7
  ...PeraWalletConnectors(),
package/src/types.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import { IPeraSigner } from './pera/PeraSigner';
2
+ export type IAlgorandSigner = IPeraSigner;
@@ -0,0 +1,21 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var _tslib = require('../../_virtual/_tslib.cjs');
7
+ var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
8
+
9
+ class AlgorandWallet extends walletConnectorCore.Wallet {
10
+ getSigner() {
11
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
12
+ const signer = yield this._connector.getSigner();
13
+ if (!signer) {
14
+ throw new Error('unable to retrieve Algorand signer');
15
+ }
16
+ return signer;
17
+ });
18
+ }
19
+ }
20
+
21
+ exports.AlgorandWallet = AlgorandWallet;
@@ -0,0 +1,6 @@
1
+ import { Wallet } from '@dynamic-labs/wallet-connector-core';
2
+ import { AlgorandWalletConnector } from '../AlgorandWalletConnector';
3
+ import { IAlgorandSigner } from '../types';
4
+ export declare class AlgorandWallet extends Wallet<AlgorandWalletConnector> {
5
+ getSigner(): Promise<IAlgorandSigner>;
6
+ }
@@ -0,0 +1,17 @@
1
+ 'use client'
2
+ import { __awaiter } from '../../_virtual/_tslib.js';
3
+ import { Wallet } from '@dynamic-labs/wallet-connector-core';
4
+
5
+ class AlgorandWallet extends Wallet {
6
+ getSigner() {
7
+ return __awaiter(this, void 0, void 0, function* () {
8
+ const signer = yield this._connector.getSigner();
9
+ if (!signer) {
10
+ throw new Error('unable to retrieve Algorand signer');
11
+ }
12
+ return signer;
13
+ });
14
+ }
15
+ }
16
+
17
+ export { AlgorandWallet };
@@ -0,0 +1,2 @@
1
+ export * from './AlgorandWallet';
2
+ export * from './isAlgorandWallet';
@@ -0,0 +1 @@
1
+ export * from './isAlgorandWallet';
@@ -0,0 +1,8 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ const isAlgorandWallet = (wallet) => wallet.chain === 'ALGO';
7
+
8
+ exports.isAlgorandWallet = isAlgorandWallet;
@@ -0,0 +1,3 @@
1
+ import { Wallet } from '@dynamic-labs/wallet-connector-core';
2
+ import { AlgorandWallet } from '../AlgorandWallet';
3
+ export declare const isAlgorandWallet: (wallet: Wallet) => wallet is AlgorandWallet;
@@ -0,0 +1,4 @@
1
+ 'use client'
2
+ const isAlgorandWallet = (wallet) => wallet.chain === 'ALGO';
3
+
4
+ export { isAlgorandWallet };