@dynamic-labs/solana 2.0.0-alpha.5 → 2.0.0-alpha.7

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,43 @@
1
1
 
2
+ ## [2.0.0-alpha.7](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.6...v2.0.0-alpha.7) (2024-02-28)
3
+
4
+
5
+ ### ⚠ BREAKING CHANGES
6
+
7
+ * add networkValidationMode and remove enableForcedNetworkValidation (#4778)
8
+
9
+ ### Features
10
+
11
+ * add bitget and okx wallets ([51fab41](https://github.com/dynamic-labs/DynamicAuth/commit/51fab413096fd89ce99c6c617cf4f3f5db9bf44d))
12
+ * add networkValidationMode and remove enableForcedNetworkValidation ([#4778](https://github.com/dynamic-labs/DynamicAuth/issues/4778)) ([ccb9576](https://github.com/dynamic-labs/DynamicAuth/commit/ccb9576c81b2c570185f5126d6d1fcfcbb5ac9e3))
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * **GVTY-1243:** non evm onramp urls ([#4791](https://github.com/dynamic-labs/DynamicAuth/issues/4791)) ([fea602e](https://github.com/dynamic-labs/DynamicAuth/commit/fea602e2835b4bb9bc096b96375fa97297bf35f1))
18
+ * revert use enableForcedNetworkValidation on connect-only ([#4750](https://github.com/dynamic-labs/DynamicAuth/issues/4750)) ([#4772](https://github.com/dynamic-labs/DynamicAuth/issues/4772)) ([b871c22](https://github.com/dynamic-labs/DynamicAuth/commit/b871c2295f39230bc34ae1fca5f8817cd9251a17))
19
+ * use correct chromeId for okx and bitget wallets and remove group from coin98 ([#4795](https://github.com/dynamic-labs/DynamicAuth/issues/4795)) ([e63bad7](https://github.com/dynamic-labs/DynamicAuth/commit/e63bad76ed06636151212c915a102359a03b4218))
20
+
21
+ ## [2.0.0-alpha.6](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.5...v2.0.0-alpha.6) (2024-02-26)
22
+
23
+
24
+ ### ⚠ BREAKING CHANGES
25
+
26
+ * setShowAuthFlow opens dynamic profile in non-multi-wallet states
27
+
28
+ ### Features
29
+
30
+ * allow passing prop to hide embedded wallet action confirmation UIs ([#4775](https://github.com/dynamic-labs/DynamicAuth/issues/4775)) ([d7c6a46](https://github.com/dynamic-labs/DynamicAuth/commit/d7c6a4699e41f6a62d31880c3bd0346ebfa0e3ba))
31
+ * make sms mobile keyboard numeric ([#4755](https://github.com/dynamic-labs/DynamicAuth/issues/4755)) ([f36844a](https://github.com/dynamic-labs/DynamicAuth/commit/f36844aeaae240c520181b3242492db8ffc64a50))
32
+ * setShowAuthFlow opens dynamic profile in non-multi-wallet states ([42dbbc0](https://github.com/dynamic-labs/DynamicAuth/commit/42dbbc00a5cebe937dca5a80397cdd3c577f6a45))
33
+
34
+
35
+ ### Bug Fixes
36
+
37
+ * demo one-time codes for solana wallets fix ([#4760](https://github.com/dynamic-labs/DynamicAuth/issues/4760)) ([a5ab2a8](https://github.com/dynamic-labs/DynamicAuth/commit/a5ab2a8bc348a35a898e03db0900bfab88184c17))
38
+ * only store passcode in backend when auto-generated by dynamic ([#4764](https://github.com/dynamic-labs/DynamicAuth/issues/4764)) ([528bedc](https://github.com/dynamic-labs/DynamicAuth/commit/528bedce5cbd3022ddafe4242954a04f5b70ae74))
39
+ * use enableForcedNetworkValidation on connect-only ([#4750](https://github.com/dynamic-labs/DynamicAuth/issues/4750)) ([6299f7c](https://github.com/dynamic-labs/DynamicAuth/commit/6299f7c3ce705ddb19714f6b7a3a488851ed8dde))
40
+
2
41
  ## [2.0.0-alpha.5](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.4...v2.0.0-alpha.5) (2024-02-22)
3
42
 
4
43
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/solana",
3
- "version": "2.0.0-alpha.5",
3
+ "version": "2.0.0-alpha.7",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -27,16 +27,16 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@solana/web3.js": "1.70.1",
30
- "@dynamic-labs/sdk-api": "0.0.373",
31
- "bs58": "^5.0.0",
32
- "tweetnacl": "^1.0.3",
33
- "@dynamic-labs/rpc-provider-solana": "2.0.0-alpha.5",
34
- "@dynamic-labs/rpc-providers": "2.0.0-alpha.5",
35
- "@dynamic-labs/turnkey": "2.0.0-alpha.5",
36
- "@dynamic-labs/types": "2.0.0-alpha.5",
37
- "@dynamic-labs/utils": "2.0.0-alpha.5",
38
- "@dynamic-labs/wallet-book": "2.0.0-alpha.5",
39
- "@dynamic-labs/wallet-connector-core": "2.0.0-alpha.5",
30
+ "@dynamic-labs/sdk-api": "0.0.376",
31
+ "bs58": "5.0.0",
32
+ "tweetnacl": "1.0.3",
33
+ "@dynamic-labs/rpc-provider-solana": "2.0.0-alpha.7",
34
+ "@dynamic-labs/rpc-providers": "2.0.0-alpha.7",
35
+ "@dynamic-labs/turnkey": "2.0.0-alpha.7",
36
+ "@dynamic-labs/types": "2.0.0-alpha.7",
37
+ "@dynamic-labs/utils": "2.0.0-alpha.7",
38
+ "@dynamic-labs/wallet-book": "2.0.0-alpha.7",
39
+ "@dynamic-labs/wallet-connector-core": "2.0.0-alpha.7",
40
40
  "eventemitter3": "5.0.1"
41
41
  },
42
42
  "peerDependencies": {}
@@ -19,6 +19,7 @@ class CoinbaseSolana extends InjectedWalletBase.InjectedWalletBase {
19
19
  constructor(opts) {
20
20
  super(opts);
21
21
  this.name = 'CoinbaseSolana';
22
+ this.overrideKey = 'coinbasesolana';
22
23
  this.wallet = walletBook.findWalletBookWallet(this.walletBook, this.key);
23
24
  }
24
25
  getSigner() {
@@ -2,6 +2,7 @@ import { SolWalletConnectorOpts } from './solWalletConnector';
2
2
  import { InjectedWalletBase } from './injected/InjectedWalletBase';
3
3
  export declare class CoinbaseSolana extends InjectedWalletBase {
4
4
  name: string;
5
+ overrideKey: string;
5
6
  constructor(opts: SolWalletConnectorOpts);
6
7
  getSigner<ICoinbaseSolanaSigner>(): Promise<ICoinbaseSolanaSigner | undefined>;
7
8
  signMessage(messageToSign: string): Promise<string | undefined>;
@@ -15,6 +15,7 @@ class CoinbaseSolana extends InjectedWalletBase {
15
15
  constructor(opts) {
16
16
  super(opts);
17
17
  this.name = 'CoinbaseSolana';
18
+ this.overrideKey = 'coinbasesolana';
18
19
  this.wallet = findWalletBookWallet(this.walletBook, this.key);
19
20
  }
20
21
  getSigner() {
package/src/Phantom.cjs CHANGED
@@ -13,6 +13,7 @@ class Phantom extends solWalletConnector.SolWalletConnector {
13
13
  constructor(opts) {
14
14
  super(opts);
15
15
  this.name = 'Phantom';
16
+ this.overrideKey = 'phantom';
16
17
  this.wallet = walletBook.findWalletBookWallet(this.walletBook, this.key);
17
18
  }
18
19
  connect() {
package/src/Phantom.d.ts CHANGED
@@ -4,6 +4,7 @@ import { ISolana } from '..';
4
4
  import { SolWalletConnector, SolWalletConnectorOpts } from './solWalletConnector';
5
5
  export declare class Phantom extends SolWalletConnector {
6
6
  name: string;
7
+ overrideKey: string;
7
8
  wallet: WalletSchema | undefined;
8
9
  constructor(opts: SolWalletConnectorOpts);
9
10
  connect(): Promise<void>;
package/src/Phantom.js CHANGED
@@ -9,6 +9,7 @@ class Phantom extends SolWalletConnector {
9
9
  constructor(opts) {
10
10
  super(opts);
11
11
  this.name = 'Phantom';
12
+ this.overrideKey = 'phantom';
12
13
  this.wallet = findWalletBookWallet(this.walletBook, this.key);
13
14
  }
14
15
  connect() {
package/src/Slope.cjs CHANGED
@@ -11,6 +11,7 @@ class Slope extends solWalletConnector.SolWalletConnector {
11
11
  constructor() {
12
12
  super(...arguments);
13
13
  this.name = 'Slope';
14
+ this.overrideKey = 'slope';
14
15
  this.isConnectData = (value) => { var _a; return ((_a = value.data) === null || _a === void 0 ? void 0 : _a.publicKey) !== undefined; };
15
16
  this.isSignatureData = (value) => { var _a; return ((_a = value.data) === null || _a === void 0 ? void 0 : _a.signature) !== undefined; };
16
17
  }
package/src/Slope.d.ts CHANGED
@@ -12,6 +12,7 @@ interface SignatureData {
12
12
  }
13
13
  export declare class Slope extends SolWalletConnector {
14
14
  name: string;
15
+ overrideKey: string;
15
16
  private static _wallet;
16
17
  get wallet(): ISolana | undefined;
17
18
  connect(): Promise<void>;
package/src/Slope.js CHANGED
@@ -7,6 +7,7 @@ class Slope extends SolWalletConnector {
7
7
  constructor() {
8
8
  super(...arguments);
9
9
  this.name = 'Slope';
10
+ this.overrideKey = 'slope';
10
11
  this.isConnectData = (value) => { var _a; return ((_a = value.data) === null || _a === void 0 ? void 0 : _a.publicKey) !== undefined; };
11
12
  this.isSignatureData = (value) => { var _a; return ((_a = value.data) === null || _a === void 0 ? void 0 : _a.signature) !== undefined; };
12
13
  }
package/src/Solflare.d.ts CHANGED
@@ -2,6 +2,7 @@ import { InjectedWalletBase } from './injected/InjectedWalletBase';
2
2
  import { SolWalletConnectorOpts } from './solWalletConnector';
3
3
  export declare class Solflare extends InjectedWalletBase {
4
4
  name: string;
5
+ overrideKey: string;
5
6
  constructor(opts: SolWalletConnectorOpts);
6
7
  fetchPublicAddress(): Promise<string | undefined>;
7
8
  signMessage(messageToSign: string): Promise<string | undefined>;
@@ -11,6 +11,7 @@ class BackpackSol extends InjectedWalletBase.InjectedWalletBase {
11
11
  constructor(opts) {
12
12
  super(opts);
13
13
  this.name = 'BackpackSol';
14
+ this.overrideKey = 'backpacksol';
14
15
  this.wallet = walletBook.findWalletBookWallet(this.walletBook, this.key);
15
16
  }
16
17
  getSigner() {
@@ -2,6 +2,7 @@ import { SolWalletConnectorOpts } from '../solWalletConnector';
2
2
  import { InjectedWalletBase } from './InjectedWalletBase';
3
3
  export declare class BackpackSol extends InjectedWalletBase {
4
4
  name: string;
5
+ overrideKey: string;
5
6
  constructor(opts: SolWalletConnectorOpts);
6
7
  getSigner<IBackpackSolanaSigner>(): Promise<IBackpackSolanaSigner | undefined>;
7
8
  signMessage(messageToSign: string): Promise<string | undefined>;
@@ -7,6 +7,7 @@ class BackpackSol extends InjectedWalletBase {
7
7
  constructor(opts) {
8
8
  super(opts);
9
9
  this.name = 'BackpackSol';
10
+ this.overrideKey = 'backpacksol';
10
11
  this.wallet = findWalletBookWallet(this.walletBook, this.key);
11
12
  }
12
13
  getSigner() {
@@ -11,6 +11,7 @@ class PhantomInjected extends InjectedWalletBase.InjectedWalletBase {
11
11
  constructor(opts) {
12
12
  super(opts);
13
13
  this.name = 'Phantom';
14
+ this.overrideKey = 'phantom';
14
15
  this.wallet = walletBook.findWalletBookWallet(this.walletBook, this.key);
15
16
  }
16
17
  fetchPublicAddress() {
@@ -2,6 +2,7 @@ import { SolWalletConnectorOpts } from '../solWalletConnector';
2
2
  import { InjectedWalletBase } from './InjectedWalletBase';
3
3
  export declare class PhantomInjected extends InjectedWalletBase {
4
4
  name: string;
5
+ overrideKey: string;
5
6
  constructor(opts: SolWalletConnectorOpts);
6
7
  fetchPublicAddress(): Promise<string | undefined>;
7
8
  }
@@ -7,6 +7,7 @@ class PhantomInjected extends InjectedWalletBase {
7
7
  constructor(opts) {
8
8
  super(opts);
9
9
  this.name = 'Phantom';
10
+ this.overrideKey = 'phantom';
10
11
  this.wallet = findWalletBookWallet(this.walletBook, this.key);
11
12
  }
12
13
  fetchPublicAddress() {
@@ -19,6 +19,7 @@ class PhantomRedirect extends solWalletConnector.SolWalletConnector {
19
19
  constructor(props) {
20
20
  super(Object.assign({}, props));
21
21
  this.name = 'Phantom';
22
+ this.overrideKey = 'phantom';
22
23
  }
23
24
  fetchPublicAddress() {
24
25
  return _tslib.__awaiter(this, void 0, void 0, function* () {
@@ -3,6 +3,7 @@ import { SolWalletConnector } from '../solWalletConnector';
3
3
  import { ISolana } from '..';
4
4
  export declare class PhantomRedirect extends SolWalletConnector implements IPhantomRedirectConnector {
5
5
  name: string;
6
+ overrideKey: string;
6
7
  constructor(props: any);
7
8
  fetchPublicAddress(): Promise<string | undefined>;
8
9
  connect(): Promise<void>;
@@ -10,6 +10,7 @@ class PhantomRedirect extends SolWalletConnector {
10
10
  constructor(props) {
11
11
  super(Object.assign({}, props));
12
12
  this.name = 'Phantom';
13
+ this.overrideKey = 'phantom';
13
14
  }
14
15
  fetchPublicAddress() {
15
16
  return __awaiter(this, void 0, void 0, function* () {
@@ -4,7 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _tslib = require('../_virtual/_tslib.cjs');
6
6
  var web3_js = require('@solana/web3.js');
7
- var rpcProviderSolana = require('@dynamic-labs/rpc-provider-solana');
8
7
  var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
9
8
  var utils = require('@dynamic-labs/utils');
10
9
  var walletBook = require('@dynamic-labs/wallet-book');
@@ -21,22 +20,7 @@ class SolWalletConnector extends walletConnectorCore.WalletConnectorBase {
21
20
  this.connectedChain = 'SOL';
22
21
  this.solNetworks = opts.solNetworks;
23
22
  this.chainRpcProviders = opts.chainRpcProviders;
24
- (_a = this.chainRpcProviders) === null || _a === void 0 ? void 0 : _a.registerChainProviders(rpcProviderSolana.ProviderChain.SOLANA, (config) => {
25
- const rpcProviders = {};
26
- if (config === null || config === void 0 ? void 0 : config.solana) {
27
- rpcProviders.solana = config.solana.map((network) => {
28
- var _a;
29
- const rpcUrl = ((_a = network.privateCustomerRpcUrls) === null || _a === void 0 ? void 0 : _a[0]) || network.rpcUrls[0];
30
- const provider = new web3_js.Connection(rpcUrl);
31
- return {
32
- chainId: network.chainId.toString(),
33
- chainName: network.name,
34
- provider,
35
- };
36
- });
37
- }
38
- return rpcProviders.solana;
39
- });
23
+ (_a = this.chainRpcProviders) === null || _a === void 0 ? void 0 : _a.registerSolanaProviders();
40
24
  }
41
25
  getNetwork() {
42
26
  return _tslib.__awaiter(this, void 0, void 0, function* () {
@@ -1,6 +1,5 @@
1
1
  import { __awaiter } from '../_virtual/_tslib.js';
2
2
  import { PublicKey, Connection, Transaction, TransactionInstruction } from '@solana/web3.js';
3
- import { ProviderChain } from '@dynamic-labs/rpc-provider-solana';
4
3
  import { WalletConnectorBase } from '@dynamic-labs/wallet-connector-core';
5
4
  import { DynamicError, NotSupportedError } from '@dynamic-labs/utils';
6
5
  import { findWalletBookWallet } from '@dynamic-labs/wallet-book';
@@ -17,22 +16,7 @@ class SolWalletConnector extends WalletConnectorBase {
17
16
  this.connectedChain = 'SOL';
18
17
  this.solNetworks = opts.solNetworks;
19
18
  this.chainRpcProviders = opts.chainRpcProviders;
20
- (_a = this.chainRpcProviders) === null || _a === void 0 ? void 0 : _a.registerChainProviders(ProviderChain.SOLANA, (config) => {
21
- const rpcProviders = {};
22
- if (config === null || config === void 0 ? void 0 : config.solana) {
23
- rpcProviders.solana = config.solana.map((network) => {
24
- var _a;
25
- const rpcUrl = ((_a = network.privateCustomerRpcUrls) === null || _a === void 0 ? void 0 : _a[0]) || network.rpcUrls[0];
26
- const provider = new Connection(rpcUrl);
27
- return {
28
- chainId: network.chainId.toString(),
29
- chainName: network.name,
30
- provider,
31
- };
32
- });
33
- }
34
- return rpcProviders.solana;
35
- });
19
+ (_a = this.chainRpcProviders) === null || _a === void 0 ? void 0 : _a.registerSolanaProviders();
36
20
  }
37
21
  getNetwork() {
38
22
  return __awaiter(this, void 0, void 0, function* () {