@dynamic-labs/solana 1.0.0-alpha.1 → 1.0.0-alpha.4

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,47 @@
1
1
 
2
+ ## [1.0.0-alpha.4](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.3...v1.0.0-alpha.4) (2023-11-28)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * update zerodev provider initialization ([#4015](https://github.com/dynamic-labs/DynamicAuth/issues/4015)) ([8faca00](https://github.com/dynamic-labs/DynamicAuth/commit/8faca00d414677adc5fecde451ca01da53fe9641))
8
+
9
+ ## [1.0.0-alpha.3](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.2...v1.0.0-alpha.3) (2023-11-28)
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * fix solflare mobile wallet deep linking ([#3998](https://github.com/dynamic-labs/DynamicAuth/issues/3998)) ([10069ae](https://github.com/dynamic-labs/DynamicAuth/commit/10069ae9ed5d8e1978131f57c3e90680e85d2efb))
15
+ * passkey error message when reaching limit of accounts ([#4010](https://github.com/dynamic-labs/DynamicAuth/issues/4010)) ([dabce3b](https://github.com/dynamic-labs/DynamicAuth/commit/dabce3b6ada4bac75903b43d5cb125cfd5619d18))
16
+
17
+ ## [1.0.0-alpha.2](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.1...v1.0.0-alpha.2) (2023-11-28)
18
+
19
+
20
+ ### ⚠ BREAKING CHANGES
21
+
22
+ * rename walletsByChain to bridgeChains (#3954)
23
+
24
+ ### Features
25
+
26
+ * passkey management and recovery ([#3911](https://github.com/dynamic-labs/DynamicAuth/issues/3911)) ([b692b3a](https://github.com/dynamic-labs/DynamicAuth/commit/b692b3a8697d0ffb441faae97e609b144965695d))
27
+
28
+
29
+ ### Bug Fixes
30
+
31
+ * ensure all chain rpc providers are always assigned correctly ([#3981](https://github.com/dynamic-labs/DynamicAuth/issues/3981)) ([cd2e25c](https://github.com/dynamic-labs/DynamicAuth/commit/cd2e25c4eb39791866c1ea283d61fff388cce5df))
32
+ * initialize selected chain with first evm network if no value in ls ([#3999](https://github.com/dynamic-labs/DynamicAuth/issues/3999)) ([bc9e43b](https://github.com/dynamic-labs/DynamicAuth/commit/bc9e43be9d33c75bb1236756589f63f17b230ab1))
33
+ * nextjs issues to show transaction modals ([#3964](https://github.com/dynamic-labs/DynamicAuth/issues/3964)) ([9326ac4](https://github.com/dynamic-labs/DynamicAuth/commit/9326ac49394e067ce38b17faff08b4fabf91bb3f))
34
+ * onEmbeddedWalletCreated not being called ([#3975](https://github.com/dynamic-labs/DynamicAuth/issues/3975)) ([035cebe](https://github.com/dynamic-labs/DynamicAuth/commit/035cebe02891048e62c66a7277ed7f43c27e559d))
35
+ * return linked wallets even when there's no primary wallet ([#3965](https://github.com/dynamic-labs/DynamicAuth/issues/3965)) ([27705de](https://github.com/dynamic-labs/DynamicAuth/commit/27705de4ac7e1584efd1245bb9c6a818b1c20742))
36
+ * transaction modal not throwing viem compatible exception ([#3971](https://github.com/dynamic-labs/DynamicAuth/issues/3971)) ([bedab0c](https://github.com/dynamic-labs/DynamicAuth/commit/bedab0c4448bcca5c3e696ceb276867ce55bbd85))
37
+ * **zero-dev:** ensure the sign typed data is parsed for zero dev to handle ([#3974](https://github.com/dynamic-labs/DynamicAuth/issues/3974)) ([f517738](https://github.com/dynamic-labs/DynamicAuth/commit/f517738e1abc138f882525c128cd1ee5e88b9050))
38
+ * zerodev sign message with ethers ([#3972](https://github.com/dynamic-labs/DynamicAuth/issues/3972)) ([5de3873](https://github.com/dynamic-labs/DynamicAuth/commit/5de3873daa9cbfeef6dd9123b7a319d8e6b412d5))
39
+ * **zerodev:** ensure ECDSAProvider supports sendUserOperation ([#4003](https://github.com/dynamic-labs/DynamicAuth/issues/4003)) ([c8f5886](https://github.com/dynamic-labs/DynamicAuth/commit/c8f58868fcf6912fd11a92940369faf37e3fcdde))
40
+ * **zerodev:** ensure transaction is sponsored before submission ([#3932](https://github.com/dynamic-labs/DynamicAuth/issues/3932)) ([74becb7](https://github.com/dynamic-labs/DynamicAuth/commit/74becb7ec2fd55f8b905a9c9f0bbba44a9d22513))
41
+
42
+
43
+ * rename walletsByChain to bridgeChains ([#3954](https://github.com/dynamic-labs/DynamicAuth/issues/3954)) ([a91e8fe](https://github.com/dynamic-labs/DynamicAuth/commit/a91e8fe605694ccd8a00b71aa194c0c5191f156c))
44
+
2
45
  ## [1.0.0-alpha.1](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.0...v1.0.0-alpha.1) (2023-11-22)
3
46
 
4
47
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/solana",
3
- "version": "1.0.0-alpha.1",
3
+ "version": "1.0.0-alpha.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -27,11 +27,11 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@solana/web3.js": "1.70.1",
30
- "@dynamic-labs/rpc-providers": "1.0.0-alpha.1",
31
- "@dynamic-labs/types": "1.0.0-alpha.1",
32
- "@dynamic-labs/utils": "1.0.0-alpha.1",
33
- "@dynamic-labs/wallet-book": "1.0.0-alpha.1",
34
- "@dynamic-labs/wallet-connector-core": "1.0.0-alpha.1",
30
+ "@dynamic-labs/rpc-providers": "1.0.0-alpha.4",
31
+ "@dynamic-labs/types": "1.0.0-alpha.4",
32
+ "@dynamic-labs/utils": "1.0.0-alpha.4",
33
+ "@dynamic-labs/wallet-book": "1.0.0-alpha.4",
34
+ "@dynamic-labs/wallet-connector-core": "1.0.0-alpha.4",
35
35
  "eventemitter3": "5.0.1"
36
36
  },
37
37
  "peerDependencies": {}
package/src/Solflare.cjs CHANGED
@@ -17,6 +17,17 @@ class Solflare extends solWalletConnector.SolWalletConnector {
17
17
  }
18
18
  fetchPublicAddress() {
19
19
  return _tslib.__awaiter(this, void 0, void 0, function* () {
20
+ if (utils.isMobile()) {
21
+ const url = encodeURIComponent(window.location.toString());
22
+ const ref = encodeURIComponent(window.location.origin);
23
+ if (utils.isSamsungBrowser()) {
24
+ window.location.assign(`solflare://ul/v1/browse/${url}?ref=${ref}`);
25
+ }
26
+ else {
27
+ window.location.assign(`https://solflare.com/ul/v1/browse/${url}?ref=${ref}`);
28
+ }
29
+ return;
30
+ }
20
31
  return solProviderHelper.SolProviderHelper.fetchPublicAddressWithName(this.name);
21
32
  });
22
33
  }
package/src/Solflare.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { __awaiter } from '../_virtual/_tslib.js';
2
- import { bufferToBase64 } from '@dynamic-labs/utils';
2
+ import { isMobile, isSamsungBrowser, bufferToBase64 } from '@dynamic-labs/utils';
3
3
  import { SolWalletConnector } from './solWalletConnector.js';
4
4
  import { SolProviderHelper } from './solProviderHelper.js';
5
5
 
@@ -13,6 +13,17 @@ class Solflare extends SolWalletConnector {
13
13
  }
14
14
  fetchPublicAddress() {
15
15
  return __awaiter(this, void 0, void 0, function* () {
16
+ if (isMobile()) {
17
+ const url = encodeURIComponent(window.location.toString());
18
+ const ref = encodeURIComponent(window.location.origin);
19
+ if (isSamsungBrowser()) {
20
+ window.location.assign(`solflare://ul/v1/browse/${url}?ref=${ref}`);
21
+ }
22
+ else {
23
+ window.location.assign(`https://solflare.com/ul/v1/browse/${url}?ref=${ref}`);
24
+ }
25
+ return;
26
+ }
16
27
  return SolProviderHelper.fetchPublicAddressWithName(this.name);
17
28
  });
18
29
  }
package/src/index.cjs CHANGED
@@ -21,6 +21,7 @@ const SolanaWalletConnectors = (props) => [
21
21
  Solflare.Solflare,
22
22
  ];
23
23
 
24
+ exports.Solflare = Solflare.Solflare;
24
25
  exports.SolWalletConnector = solWalletConnector.SolWalletConnector;
25
26
  exports.SolProviderHelper = solProviderHelper.SolProviderHelper;
26
27
  exports.isSignedMessage = isSignedMessage.isSignedMessage;
package/src/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from './solWalletConnector';
2
2
  export * from './solProviderHelper';
3
+ export * from './Solflare';
3
4
  export declare const SolanaWalletConnectors: (props: any) => typeof import("./injected/BraveSol").BraveSol[];
4
5
  export { isSignedMessage } from './utils/isSignedMessage';
5
6
  export { isBackpackSolanaSigner } from './utils/isBackpackSolanaSigner';
package/src/index.js CHANGED
@@ -2,6 +2,7 @@ import { CoinbaseSolana } from './CoinbaseSolana.js';
2
2
  import { Glow } from './Glow.js';
3
3
  import { Slope } from './Slope.js';
4
4
  import { Solflare } from './Solflare.js';
5
+ export { Solflare } from './Solflare.js';
5
6
  import { injectedWallets } from './injected/index.js';
6
7
  export { SolWalletConnector } from './solWalletConnector.js';
7
8
  export { SolProviderHelper } from './solProviderHelper.js';
@@ -3,7 +3,6 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _tslib = require('../../_virtual/_tslib.cjs');
6
- var utils = require('@dynamic-labs/utils');
7
6
  var solWalletConnector = require('../solWalletConnector.cjs');
8
7
  var solProviderHelper = require('../solProviderHelper.cjs');
9
8
 
@@ -36,21 +35,9 @@ class InjectedWalletBase extends solWalletConnector.SolWalletConnector {
36
35
  }
37
36
  fetchPublicAddress() {
38
37
  return _tslib.__awaiter(this, void 0, void 0, function* () {
39
- if (this.isInstalledOnBrowser()) {
40
- return solProviderHelper.SolProviderHelper.fetchPublicAddressWithName(this.name);
41
- }
42
- const url = encodeURIComponent(window.location.toString());
43
- const ref = encodeURIComponent(window.location.origin);
44
- // samsung browser only supports native links, not universal links
45
- if (utils.isMobile()) {
46
- if (utils.isSamsungBrowser()) {
47
- window.location.assign(`phantom://browse/${url}?ref=${ref}`);
48
- }
49
- else {
50
- window.location.assign(`https://phantom.app/ul/browse/${url}?ref=${ref}`);
51
- }
52
- }
53
- return;
38
+ if (!this.isInstalledOnBrowser())
39
+ return;
40
+ return solProviderHelper.SolProviderHelper.fetchPublicAddressWithName(this.name);
54
41
  });
55
42
  }
56
43
  signMessage(messageToSign) {
@@ -1,5 +1,4 @@
1
1
  import { __awaiter } from '../../_virtual/_tslib.js';
2
- import { isMobile, isSamsungBrowser } from '@dynamic-labs/utils';
3
2
  import { SolWalletConnector } from '../solWalletConnector.js';
4
3
  import { SolProviderHelper } from '../solProviderHelper.js';
5
4
 
@@ -32,21 +31,9 @@ class InjectedWalletBase extends SolWalletConnector {
32
31
  }
33
32
  fetchPublicAddress() {
34
33
  return __awaiter(this, void 0, void 0, function* () {
35
- if (this.isInstalledOnBrowser()) {
36
- return SolProviderHelper.fetchPublicAddressWithName(this.name);
37
- }
38
- const url = encodeURIComponent(window.location.toString());
39
- const ref = encodeURIComponent(window.location.origin);
40
- // samsung browser only supports native links, not universal links
41
- if (isMobile()) {
42
- if (isSamsungBrowser()) {
43
- window.location.assign(`phantom://browse/${url}?ref=${ref}`);
44
- }
45
- else {
46
- window.location.assign(`https://phantom.app/ul/browse/${url}?ref=${ref}`);
47
- }
48
- }
49
- return;
34
+ if (!this.isInstalledOnBrowser())
35
+ return;
36
+ return SolProviderHelper.fetchPublicAddressWithName(this.name);
50
37
  });
51
38
  }
52
39
  signMessage(messageToSign) {