@dynamic-labs/solana-extension 4.0.0-alpha.26 → 4.0.0-alpha.28

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,37 @@
1
1
 
2
+ ## [4.0.0-alpha.28](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.27...v4.0.0-alpha.28) (2024-11-07)
3
+
4
+
5
+ ### ⚠ BREAKING CHANGES
6
+
7
+ * upgrade to starknet v6
8
+ See this guide for more details: https://starknetjs.com/docs/guides/migrate/
9
+ There are no code changes required on the Dynamic SDK side, however if you have installed the `starknet` package, you will need to upgrade to >= v6.11.0.
10
+
11
+ ### Features
12
+
13
+ * new transaction modal and ui for sign/signAll ([#7296](https://github.com/dynamic-labs/dynamic-auth/issues/7296)) ([05a8af1](https://github.com/dynamic-labs/dynamic-auth/commit/05a8af1eb772b2b8087ed96a54caf4b6ae8b79d2)), closes [#7297](https://github.com/dynamic-labs/dynamic-auth/issues/7297) [#7298](https://github.com/dynamic-labs/dynamic-auth/issues/7298)
14
+ * upgrade to starknet v6 ([#7189](https://github.com/dynamic-labs/dynamic-auth/issues/7189)) ([2a6e24e](https://github.com/dynamic-labs/dynamic-auth/commit/2a6e24e4178fcee671b381c28f6a681f4ce52c62))
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * transaction confirmation modal popup ([#7368](https://github.com/dynamic-labs/dynamic-auth/issues/7368)) ([3c48658](https://github.com/dynamic-labs/dynamic-auth/commit/3c48658a62874d908bba8f06fb092ff5983ede16))
20
+
21
+ ## [4.0.0-alpha.27](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.26...v4.0.0-alpha.27) (2024-11-06)
22
+
23
+
24
+ ### Features
25
+
26
+ * allows adding connection configuration for solana connectors ([#7354](https://github.com/dynamic-labs/dynamic-auth/issues/7354)) ([01e35ee](https://github.com/dynamic-labs/dynamic-auth/commit/01e35ee5bfe4605df48e4188a753111efe483048))
27
+ * allows passing solana connection config to dynamic client ([#7357](https://github.com/dynamic-labs/dynamic-auth/issues/7357)) ([6da14ce](https://github.com/dynamic-labs/dynamic-auth/commit/6da14ceb481147aea31d192fe268be43a8af80e9))
28
+
29
+
30
+ ### Bug Fixes
31
+
32
+ * check legacy vs eip1599 tx in global connectivity ([#7341](https://github.com/dynamic-labs/dynamic-auth/issues/7341)) ([b223ea7](https://github.com/dynamic-labs/dynamic-auth/commit/b223ea7a5ed5637e11da1040c631c48bc23ba76d))
33
+ * global connectivity multiple transactions in a row ([#7342](https://github.com/dynamic-labs/dynamic-auth/issues/7342)) ([d13c1af](https://github.com/dynamic-labs/dynamic-auth/commit/d13c1afec6b3680961621d8317f55549b3ed428f))
34
+
2
35
  ## [4.0.0-alpha.26](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.25...v4.0.0-alpha.26) (2024-11-04)
3
36
 
4
37
  ## [4.0.0-alpha.25](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.24...v4.0.0-alpha.25) (2024-11-01)
package/README.md CHANGED
@@ -15,7 +15,13 @@ import { Connection } from '@solana/web3.js'
15
15
 
16
16
  const dynamicClient = createClient({...}).extend(SolanaExtension())
17
17
 
18
- const connection: Connection = dynamicClient.solana.getConnection();
18
+ // Optionally passing in connection config for illustration
19
+ const connection: Connection = dynamicClient.solana.getConnection({
20
+ commitment: 'confirmed',
21
+ httpHeaders: {
22
+ 'X-Requested-With': 'XMLHttpRequest',
23
+ },
24
+ });
19
25
 
20
26
  const signer = dynamicClient.solana.getSigner({
21
27
  wallet: dynamicClient.wallets.primary,
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.0.0-alpha.26";
6
+ var version = "4.0.0-alpha.28";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.0.0-alpha.26";
2
+ var version = "4.0.0-alpha.28";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/solana-extension",
3
- "version": "4.0.0-alpha.26",
3
+ "version": "4.0.0-alpha.28",
4
4
  "main": "./src/index.cjs",
5
5
  "module": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -17,10 +17,10 @@
17
17
  "@solana/web3.js": "1.92.1"
18
18
  },
19
19
  "dependencies": {
20
- "@dynamic-labs/assert-package-version": "4.0.0-alpha.26",
21
- "@dynamic-labs/client": "4.0.0-alpha.26",
22
- "@dynamic-labs/message-transport": "4.0.0-alpha.26",
23
- "@dynamic-labs/solana-core": "4.0.0-alpha.26",
24
- "@dynamic-labs/types": "4.0.0-alpha.26"
20
+ "@dynamic-labs/assert-package-version": "4.0.0-alpha.28",
21
+ "@dynamic-labs/client": "4.0.0-alpha.28",
22
+ "@dynamic-labs/message-transport": "4.0.0-alpha.28",
23
+ "@dynamic-labs/solana-core": "4.0.0-alpha.28",
24
+ "@dynamic-labs/types": "4.0.0-alpha.28"
25
25
  }
26
26
  }
@@ -11,7 +11,7 @@ const SolanaExtension = () => (client, core) => {
11
11
  core.declaredExtensionNames.push(solanaExtensionName);
12
12
  return {
13
13
  solana: {
14
- getConnection: () => createConnection.createConnection(client, core),
14
+ getConnection: (connectionConfig) => createConnection.createConnection({ client, connectionConfig, core }),
15
15
  getSigner: ({ wallet }) => createSigner.createSigner({ core, wallet }),
16
16
  },
17
17
  };
@@ -1,10 +1,10 @@
1
- import { Connection } from '@solana/web3.js';
1
+ import { Commitment, Connection, ConnectionConfig } from '@solana/web3.js';
2
2
  import { type Extension, type Wallet } from '@dynamic-labs/client';
3
3
  import { ISolanaSigner } from './types';
4
4
  export declare const solanaExtensionName = "solana";
5
5
  export type ISolanaExtension = {
6
6
  solana: {
7
- getConnection: () => Connection;
7
+ getConnection: (connectionConfig?: ConnectionConfig | Commitment) => Connection;
8
8
  getSigner: (props: {
9
9
  wallet: Wallet;
10
10
  }) => ISolanaSigner;
@@ -7,7 +7,7 @@ const SolanaExtension = () => (client, core) => {
7
7
  core.declaredExtensionNames.push(solanaExtensionName);
8
8
  return {
9
9
  solana: {
10
- getConnection: () => createConnection(client, core),
10
+ getConnection: (connectionConfig) => createConnection({ client, connectionConfig, core }),
11
11
  getSigner: ({ wallet }) => createSigner({ core, wallet }),
12
12
  },
13
13
  };
@@ -6,15 +6,15 @@ Object.defineProperty(exports, '__esModule', { value: true });
6
6
  var web3_js = require('@solana/web3.js');
7
7
  var client = require('@dynamic-labs/client');
8
8
 
9
- const createConnection = (client$1, core) => {
9
+ const createConnection = ({ client: client$1, core, connectionConfig, }) => {
10
10
  if (!client.hasExtension(client$1, core, client.baseClientExtensionName)) {
11
- throw new Error('Client does not have a network configuration');
11
+ throw new Error('Dynamic client is malformed and missing base configuration');
12
12
  }
13
13
  const [rpcEndpoint] = client$1.networks.solana.map((network) => { var _a; return ((_a = network.privateCustomerRpcUrls) === null || _a === void 0 ? void 0 : _a[0]) || network.rpcUrls[0]; });
14
14
  if (!rpcEndpoint) {
15
- throw new Error('Client does not have a network configuration');
15
+ throw new Error('Dynamic client missing solana network configuration');
16
16
  }
17
- return new web3_js.Connection(rpcEndpoint);
17
+ return new web3_js.Connection(rpcEndpoint, connectionConfig);
18
18
  };
19
19
 
20
20
  exports.createConnection = createConnection;
@@ -1,3 +1,9 @@
1
- import { Connection } from '@solana/web3.js';
1
+ import { Commitment, Connection, ConnectionConfig } from '@solana/web3.js';
2
2
  import { Extendable, Core } from '@dynamic-labs/client';
3
- export declare const createConnection: (client: Extendable, core: Core) => Connection;
3
+ type CreateConnectionProps = {
4
+ client: Extendable;
5
+ core: Core;
6
+ connectionConfig?: ConnectionConfig | Commitment;
7
+ };
8
+ export declare const createConnection: ({ client, core, connectionConfig, }: CreateConnectionProps) => Connection;
9
+ export {};
@@ -2,15 +2,15 @@
2
2
  import { Connection } from '@solana/web3.js';
3
3
  import { hasExtension, baseClientExtensionName } from '@dynamic-labs/client';
4
4
 
5
- const createConnection = (client, core) => {
5
+ const createConnection = ({ client, core, connectionConfig, }) => {
6
6
  if (!hasExtension(client, core, baseClientExtensionName)) {
7
- throw new Error('Client does not have a network configuration');
7
+ throw new Error('Dynamic client is malformed and missing base configuration');
8
8
  }
9
9
  const [rpcEndpoint] = client.networks.solana.map((network) => { var _a; return ((_a = network.privateCustomerRpcUrls) === null || _a === void 0 ? void 0 : _a[0]) || network.rpcUrls[0]; });
10
10
  if (!rpcEndpoint) {
11
- throw new Error('Client does not have a network configuration');
11
+ throw new Error('Dynamic client missing solana network configuration');
12
12
  }
13
- return new Connection(rpcEndpoint);
13
+ return new Connection(rpcEndpoint, connectionConfig);
14
14
  };
15
15
 
16
16
  export { createConnection };