@dynamic-labs/ethereum-aa 2.1.0-alpha.0 → 2.1.0-alpha.2

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,32 @@
1
1
 
2
+ ## [2.1.0-alpha.2](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.1...v2.1.0-alpha.2) (2024-04-19)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * buffer polyfill for utils package ([#5404](https://github.com/dynamic-labs/DynamicAuth/issues/5404)) ([bd40441](https://github.com/dynamic-labs/DynamicAuth/commit/bd404414a2e51d79fad86d7603dae89628c225b9))
8
+
9
+ ## [2.1.0-alpha.1](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.0...v2.1.0-alpha.1) (2024-04-18)
10
+
11
+
12
+ ### Features
13
+
14
+ * add frame metadata to demo index page ([#5327](https://github.com/dynamic-labs/DynamicAuth/issues/5327)) ([34a071a](https://github.com/dynamic-labs/DynamicAuth/commit/34a071af8faa8a867ad747ec2a607056a883568d))
15
+ * add MfaChooseDeviceView and MfaSecureDeviceView ([#5343](https://github.com/dynamic-labs/DynamicAuth/issues/5343)) ([4c39b1c](https://github.com/dynamic-labs/DynamicAuth/commit/4c39b1c34b5091190b095770e95a733c8f458ca2)), closes [#5356](https://github.com/dynamic-labs/DynamicAuth/issues/5356)
16
+ * add redirectUri to farcaster connect ([#5373](https://github.com/dynamic-labs/DynamicAuth/issues/5373)) ([ed13fc2](https://github.com/dynamic-labs/DynamicAuth/commit/ed13fc2948e06df0017ac122db54aca44f264a6d))
17
+ * add useMfa hook ([#5337](https://github.com/dynamic-labs/DynamicAuth/issues/5337)) ([a7682ba](https://github.com/dynamic-labs/DynamicAuth/commit/a7682ba10fd0f0809af802e0172154726f1bd857))
18
+ * headless create session and is session active ([#5346](https://github.com/dynamic-labs/DynamicAuth/issues/5346)) ([a787bbc](https://github.com/dynamic-labs/DynamicAuth/commit/a787bbcbb44104d2d0bd263579bd87a78453681d))
19
+ * secure enclave wallet generate one-time code headless ([#5329](https://github.com/dynamic-labs/DynamicAuth/issues/5329)) ([cab80a2](https://github.com/dynamic-labs/DynamicAuth/commit/cab80a2bfa77e48263d47cdcb813c54ef5b831d5))
20
+
21
+
22
+ ### Bug Fixes
23
+
24
+ * always stringify the message before signing a message using walletUiUtils ([#5325](https://github.com/dynamic-labs/DynamicAuth/issues/5325)) ([7abf094](https://github.com/dynamic-labs/DynamicAuth/commit/7abf09456e30ad0657892e9ba58d7391f0f430e6))
25
+ * bitcoin network connector sendBitcoin methods updates ([#5369](https://github.com/dynamic-labs/DynamicAuth/issues/5369)) ([e9bf444](https://github.com/dynamic-labs/DynamicAuth/commit/e9bf444122ee86030d85b84ede96bdfb9772425e))
26
+ * buffer missing when using buffer util function ([#5360](https://github.com/dynamic-labs/DynamicAuth/issues/5360)) ([e998e46](https://github.com/dynamic-labs/DynamicAuth/commit/e998e464bd2671a82aa271b407a7d8fc49a16bd0))
27
+ * embedded solana send transaction shouldn't sign a signed transaction ([#5357](https://github.com/dynamic-labs/DynamicAuth/issues/5357)) ([c2ae2fa](https://github.com/dynamic-labs/DynamicAuth/commit/c2ae2faa509b62fc5ceb345fbc0f0b47217bf4b0))
28
+ * use network.name if vanity name is missing ([#5338](https://github.com/dynamic-labs/DynamicAuth/issues/5338)) ([34ec2ae](https://github.com/dynamic-labs/DynamicAuth/commit/34ec2ae5c4dad5376a3b9c5a07221f68a2f7756c))
29
+
2
30
  ## [2.1.0-alpha.0](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.32...v2.1.0-alpha.0) (2024-04-15)
3
31
 
4
32
  ## [2.0.0-alpha.32](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.31...v2.0.0-alpha.32) (2024-04-15)
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  'use strict';
2
3
 
3
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  /******************************************************************************
2
3
  Copyright (c) Microsoft Corporation.
3
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/ethereum-aa",
3
- "version": "2.1.0-alpha.0",
3
+ "version": "2.1.0-alpha.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -26,14 +26,14 @@
26
26
  "./package.json": "./package.json"
27
27
  },
28
28
  "dependencies": {
29
- "@dynamic-labs/sdk-api-core": "0.0.418",
30
- "@dynamic-labs/ethereum": "2.1.0-alpha.0",
31
- "@dynamic-labs/logger": "2.1.0-alpha.0",
32
- "@dynamic-labs/types": "2.1.0-alpha.0",
33
- "@dynamic-labs/utils": "2.1.0-alpha.0",
34
- "@dynamic-labs/viem-utils": "2.1.0-alpha.0",
35
- "@dynamic-labs/wallet-book": "2.1.0-alpha.0",
36
- "@dynamic-labs/wallet-connector-core": "2.1.0-alpha.0"
29
+ "@dynamic-labs/sdk-api-core": "0.0.423",
30
+ "@dynamic-labs/ethereum": "2.1.0-alpha.2",
31
+ "@dynamic-labs/logger": "2.1.0-alpha.2",
32
+ "@dynamic-labs/types": "2.1.0-alpha.2",
33
+ "@dynamic-labs/utils": "2.1.0-alpha.2",
34
+ "@dynamic-labs/viem-utils": "2.1.0-alpha.2",
35
+ "@dynamic-labs/wallet-book": "2.1.0-alpha.2",
36
+ "@dynamic-labs/wallet-connector-core": "2.1.0-alpha.2"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "@zerodev/presets": "^5.1.4",
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  'use strict';
2
3
 
3
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -83,8 +84,8 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
83
84
  });
84
85
  }
85
86
  checkIsProjectChainEnabled() {
86
- var _a, _b;
87
87
  return _tslib.__awaiter(this, void 0, void 0, function* () {
88
+ var _a, _b;
88
89
  const client = yield this.getPublicClient();
89
90
  const chainName = (_a = client === null || client === void 0 ? void 0 : client.chain) === null || _a === void 0 ? void 0 : _a.name;
90
91
  const chainId = (_b = client === null || client === void 0 ? void 0 : client.chain) === null || _b === void 0 ? void 0 : _b.id;
@@ -118,15 +119,15 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
118
119
  });
119
120
  }
120
121
  getAddress() {
121
- var _a, _b, _c;
122
122
  return _tslib.__awaiter(this, void 0, void 0, function* () {
123
+ var _a, _b, _c;
123
124
  yield ((_a = this.kernelClientDeferredPromise) === null || _a === void 0 ? void 0 : _a.promise);
124
125
  return (_c = (_b = this.kernelClient) === null || _b === void 0 ? void 0 : _b.account) === null || _c === void 0 ? void 0 : _c.address;
125
126
  });
126
127
  }
127
128
  getConnectedAccounts() {
128
- var _a, _b, _c;
129
129
  return _tslib.__awaiter(this, void 0, void 0, function* () {
130
+ var _a, _b, _c;
130
131
  yield ((_a = this.kernelClientDeferredPromise) === null || _a === void 0 ? void 0 : _a.promise);
131
132
  return ((_c = (_b = this.kernelClient) === null || _b === void 0 ? void 0 : _b.account) === null || _c === void 0 ? void 0 : _c.address)
132
133
  ? [yield this.kernelClient.account.address]
@@ -134,22 +135,22 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
134
135
  });
135
136
  }
136
137
  getNetwork() {
137
- var _a, _b, _c;
138
138
  return _tslib.__awaiter(this, void 0, void 0, function* () {
139
+ var _a, _b, _c;
139
140
  yield ((_a = this.kernelClientDeferredPromise) === null || _a === void 0 ? void 0 : _a.promise);
140
141
  return (_c = (_b = this.kernelClient) === null || _b === void 0 ? void 0 : _b.chain) === null || _c === void 0 ? void 0 : _c.id;
141
142
  });
142
143
  }
143
144
  getTransport(provider) {
144
145
  const transport = viemUtils.confirmationTransport({
145
- onPersonalSign: ({ message }) => _tslib.__awaiter(this, void 0, void 0, function* () {
146
+ onPersonalSign: (_a) => _tslib.__awaiter(this, [_a], void 0, function* ({ message }) {
146
147
  this._walletUiUtils.disabledConfirmationOnce();
147
148
  return provider.signMessage({
148
149
  account: provider.account,
149
150
  message,
150
151
  });
151
152
  }),
152
- onSendTransaction: ({ transaction }) => _tslib.__awaiter(this, void 0, void 0, function* () {
153
+ onSendTransaction: (_b) => _tslib.__awaiter(this, [_b], void 0, function* ({ transaction }) {
153
154
  try {
154
155
  this._walletUiUtils.disabledConfirmationOnce();
155
156
  const effectiveProvider = this.isGasSponsorshipDisabled
@@ -169,7 +170,7 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
169
170
  throw err;
170
171
  }
171
172
  }),
172
- onSignTypedData: ({ message }) => _tslib.__awaiter(this, void 0, void 0, function* () {
173
+ onSignTypedData: (_c) => _tslib.__awaiter(this, [_c], void 0, function* ({ message }) {
173
174
  this._walletUiUtils.disabledConfirmationOnce();
174
175
  const signTypedData = JSON.parse(message);
175
176
  return provider.signTypedData({
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  import { __awaiter } from '../_virtual/_tslib.js';
2
3
  import { createEcdsaKernelAccountClient } from '@zerodev/presets';
3
4
  import { publicActions, custom, createWalletClient, isHex, fromHex, formatEther } from 'viem';
@@ -79,8 +80,8 @@ class ZeroDevConnector extends WalletConnectorBase {
79
80
  });
80
81
  }
81
82
  checkIsProjectChainEnabled() {
82
- var _a, _b;
83
83
  return __awaiter(this, void 0, void 0, function* () {
84
+ var _a, _b;
84
85
  const client = yield this.getPublicClient();
85
86
  const chainName = (_a = client === null || client === void 0 ? void 0 : client.chain) === null || _a === void 0 ? void 0 : _a.name;
86
87
  const chainId = (_b = client === null || client === void 0 ? void 0 : client.chain) === null || _b === void 0 ? void 0 : _b.id;
@@ -114,15 +115,15 @@ class ZeroDevConnector extends WalletConnectorBase {
114
115
  });
115
116
  }
116
117
  getAddress() {
117
- var _a, _b, _c;
118
118
  return __awaiter(this, void 0, void 0, function* () {
119
+ var _a, _b, _c;
119
120
  yield ((_a = this.kernelClientDeferredPromise) === null || _a === void 0 ? void 0 : _a.promise);
120
121
  return (_c = (_b = this.kernelClient) === null || _b === void 0 ? void 0 : _b.account) === null || _c === void 0 ? void 0 : _c.address;
121
122
  });
122
123
  }
123
124
  getConnectedAccounts() {
124
- var _a, _b, _c;
125
125
  return __awaiter(this, void 0, void 0, function* () {
126
+ var _a, _b, _c;
126
127
  yield ((_a = this.kernelClientDeferredPromise) === null || _a === void 0 ? void 0 : _a.promise);
127
128
  return ((_c = (_b = this.kernelClient) === null || _b === void 0 ? void 0 : _b.account) === null || _c === void 0 ? void 0 : _c.address)
128
129
  ? [yield this.kernelClient.account.address]
@@ -130,22 +131,22 @@ class ZeroDevConnector extends WalletConnectorBase {
130
131
  });
131
132
  }
132
133
  getNetwork() {
133
- var _a, _b, _c;
134
134
  return __awaiter(this, void 0, void 0, function* () {
135
+ var _a, _b, _c;
135
136
  yield ((_a = this.kernelClientDeferredPromise) === null || _a === void 0 ? void 0 : _a.promise);
136
137
  return (_c = (_b = this.kernelClient) === null || _b === void 0 ? void 0 : _b.chain) === null || _c === void 0 ? void 0 : _c.id;
137
138
  });
138
139
  }
139
140
  getTransport(provider) {
140
141
  const transport = confirmationTransport({
141
- onPersonalSign: ({ message }) => __awaiter(this, void 0, void 0, function* () {
142
+ onPersonalSign: (_a) => __awaiter(this, [_a], void 0, function* ({ message }) {
142
143
  this._walletUiUtils.disabledConfirmationOnce();
143
144
  return provider.signMessage({
144
145
  account: provider.account,
145
146
  message,
146
147
  });
147
148
  }),
148
- onSendTransaction: ({ transaction }) => __awaiter(this, void 0, void 0, function* () {
149
+ onSendTransaction: (_b) => __awaiter(this, [_b], void 0, function* ({ transaction }) {
149
150
  try {
150
151
  this._walletUiUtils.disabledConfirmationOnce();
151
152
  const effectiveProvider = this.isGasSponsorshipDisabled
@@ -165,7 +166,7 @@ class ZeroDevConnector extends WalletConnectorBase {
165
166
  throw err;
166
167
  }
167
168
  }),
168
- onSignTypedData: ({ message }) => __awaiter(this, void 0, void 0, function* () {
169
+ onSignTypedData: (_c) => __awaiter(this, [_c], void 0, function* ({ message }) {
169
170
  this._walletUiUtils.disabledConfirmationOnce();
170
171
  const signTypedData = JSON.parse(message);
171
172
  return provider.signTypedData({
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  'use strict';
2
3
 
3
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  class EthereumAaConnector {
2
3
  }
3
4
 
package/src/index.cjs CHANGED
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  'use strict';
2
3
 
3
4
  Object.defineProperty(exports, '__esModule', { value: true });
package/src/index.d.ts CHANGED
@@ -3,6 +3,6 @@ import { WalletConnectorConstructor } from '@dynamic-labs/wallet-connector-core'
3
3
  export * from './ethereum-aa';
4
4
  export { isZeroDevConnector } from './utils/isZeroDevConnector';
5
5
  export declare const ZeroDevSmartWalletConnectorsWithConfig: ({ bundlerProvider, }?: {
6
- bundlerProvider?: BundlerProvider | undefined;
6
+ bundlerProvider?: BundlerProvider;
7
7
  }) => (props: any) => WalletConnectorConstructor[];
8
8
  export declare const ZeroDevSmartWalletConnectors: (props: any) => WalletConnectorConstructor[];
package/src/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  import { ZeroDevConnector } from './ZeroDevConnector.js';
2
3
  export { EthereumAaConnector } from './ethereum-aa.js';
3
4
  export { isZeroDevConnector } from './utils/isZeroDevConnector.js';
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  'use strict';
2
3
 
3
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  import { __awaiter } from '../../_virtual/_tslib.js';
2
3
  import { chainsMap } from '@dynamic-labs/viem-utils';
3
4
  import { logger } from './logger.js';
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  'use strict';
2
3
 
3
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  const isZeroDevConnector = (connector) => (connector === null || connector === void 0 ? void 0 : connector.key) === 'zerodev';
2
3
 
3
4
  export { isZeroDevConnector };
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  'use strict';
2
3
 
3
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  import { Logger, LogLevel } from '@dynamic-labs/logger';
2
3
 
3
4
  const logger = new Logger('Ethereum AA', LogLevel.INFO);