@dynamic-labs/viem-extension 4.37.2 → 4.38.0
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 +15 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +6 -6
- package/src/ViemExtension/ViemExtension.cjs +2 -0
- package/src/ViemExtension/ViemExtension.js +2 -0
- package/src/ViemExtension/createAccountFromWallet/createAccountFromWallet.d.ts +2 -223
- package/src/types.d.ts +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
|
|
2
|
+
## [4.38.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.37.2...v4.38.0) (2025-10-14)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add client.ui.updateUser.show method to update user with dynamic ui ([#9702](https://github.com/dynamic-labs/dynamic-auth/issues/9702)) ([9554e98](https://github.com/dynamic-labs/dynamic-auth/commit/9554e98eadf3f801a5ebe8b22493a87cc87b8178))
|
|
8
|
+
* add locale to react-native client ([#9698](https://github.com/dynamic-labs/dynamic-auth/issues/9698)) ([fe577fc](https://github.com/dynamic-labs/dynamic-auth/commit/fe577fccd3cc92e5153f66f401357035bb5baec3))
|
|
9
|
+
* add updateUser to react-native client ([#9701](https://github.com/dynamic-labs/dynamic-auth/issues/9701)) ([124fbf7](https://github.com/dynamic-labs/dynamic-auth/commit/124fbf7a350bfa6404e65def7b436686d38847ed))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* notes and trigger ([#9697](https://github.com/dynamic-labs/dynamic-auth/issues/9697)) ([5d24a77](https://github.com/dynamic-labs/dynamic-auth/commit/5d24a77faa8030434bc7dd0f35986984bc2576d5))
|
|
15
|
+
* **zerodev-extension:** allow zerodev kernel client to send user operation ([#9706](https://github.com/dynamic-labs/dynamic-auth/issues/9706)) ([b57afc9](https://github.com/dynamic-labs/dynamic-auth/commit/b57afc9f378d6b2423ca46faec5f6b2861d3cbf6))
|
|
16
|
+
|
|
2
17
|
### [4.37.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.37.1...v4.37.2) (2025-10-13)
|
|
3
18
|
|
|
4
19
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/viem-extension",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.38.0",
|
|
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
|
"viem": "^2.28.4"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@dynamic-labs/assert-package-version": "4.
|
|
21
|
-
"@dynamic-labs/client": "4.
|
|
22
|
-
"@dynamic-labs/message-transport": "4.
|
|
23
|
-
"@dynamic-labs/types": "4.
|
|
24
|
-
"@dynamic-labs/webview-messages": "4.
|
|
20
|
+
"@dynamic-labs/assert-package-version": "4.38.0",
|
|
21
|
+
"@dynamic-labs/client": "4.38.0",
|
|
22
|
+
"@dynamic-labs/message-transport": "4.38.0",
|
|
23
|
+
"@dynamic-labs/types": "4.38.0",
|
|
24
|
+
"@dynamic-labs/webview-messages": "4.38.0"
|
|
25
25
|
}
|
|
26
26
|
}
|
|
@@ -5,12 +5,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
|
|
6
6
|
var createPublicClientForDynamic = require('./createPublicClientForDynamic/createPublicClientForDynamic.cjs');
|
|
7
7
|
var createWalletClientForDynamic = require('./createWalletClientForDynamic/createWalletClientForDynamic.cjs');
|
|
8
|
+
var createAccountFromWallet = require('./createAccountFromWallet/createAccountFromWallet.cjs');
|
|
8
9
|
|
|
9
10
|
const viemExtensionName = 'viem';
|
|
10
11
|
const ViemExtension = () => (_, core) => {
|
|
11
12
|
core.declaredExtensionNames.push(viemExtensionName);
|
|
12
13
|
return {
|
|
13
14
|
viem: {
|
|
15
|
+
createAccountFromWallet: (wallet) => createAccountFromWallet.createAccountFromWallet(core.messageTransport, wallet),
|
|
14
16
|
createPublicClient: (params) => createPublicClientForDynamic.createPublicClientForDynamic(core.messageTransport, params),
|
|
15
17
|
createWalletClient: (params) => createWalletClientForDynamic.createWalletClientForDynamic(core.messageTransport, params),
|
|
16
18
|
},
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { createPublicClientForDynamic } from './createPublicClientForDynamic/createPublicClientForDynamic.js';
|
|
3
3
|
import { createWalletClientForDynamic } from './createWalletClientForDynamic/createWalletClientForDynamic.js';
|
|
4
|
+
import { createAccountFromWallet } from './createAccountFromWallet/createAccountFromWallet.js';
|
|
4
5
|
|
|
5
6
|
const viemExtensionName = 'viem';
|
|
6
7
|
const ViemExtension = () => (_, core) => {
|
|
7
8
|
core.declaredExtensionNames.push(viemExtensionName);
|
|
8
9
|
return {
|
|
9
10
|
viem: {
|
|
11
|
+
createAccountFromWallet: (wallet) => createAccountFromWallet(core.messageTransport, wallet),
|
|
10
12
|
createPublicClient: (params) => createPublicClientForDynamic(core.messageTransport, params),
|
|
11
13
|
createWalletClient: (params) => createWalletClientForDynamic(core.messageTransport, params),
|
|
12
14
|
},
|
|
@@ -1,225 +1,4 @@
|
|
|
1
|
+
import { Account } from 'viem/accounts';
|
|
1
2
|
import { Wallet } from '@dynamic-labs/client';
|
|
2
3
|
import { MessageTransportWithDefaultOrigin } from '@dynamic-labs/message-transport';
|
|
3
|
-
export declare const createAccountFromWallet: (messageTransport: MessageTransportWithDefaultOrigin, wallet: Wallet) =>
|
|
4
|
-
address: `0x${string}`;
|
|
5
|
-
nonceManager?: import("viem/accounts").NonceManager | undefined;
|
|
6
|
-
sign?: ((parameters: {
|
|
7
|
-
hash: `0x${string}`;
|
|
8
|
-
}) => Promise<`0x${string}`>) | undefined;
|
|
9
|
-
signAuthorization?: ((parameters: import("node_modules/viem/_types/types/authorization").AuthorizationRequest) => Promise<import("viem/accounts").SignAuthorizationReturnType>) | undefined;
|
|
10
|
-
signMessage: ({ message }: {
|
|
11
|
-
message: import("viem").SignableMessage;
|
|
12
|
-
}) => Promise<`0x${string}`>;
|
|
13
|
-
signTransaction: <serializer extends import("viem").SerializeTransactionFn<import("viem").TransactionSerializable> = import("viem").SerializeTransactionFn<import("viem").TransactionSerializable>, transaction extends Parameters<serializer>[0] = Parameters<serializer>[0]>(transaction: transaction, options?: {
|
|
14
|
-
serializer?: serializer | undefined;
|
|
15
|
-
} | undefined) => Promise<import("viem").IsNarrowable<import("viem").TransactionSerialized<import("viem").GetTransactionType<transaction>>, `0x${string}`> extends true ? import("viem").TransactionSerialized<import("viem").GetTransactionType<transaction>> : `0x${string}`>;
|
|
16
|
-
signTypedData: <const typedData extends {
|
|
17
|
-
[x: string]: readonly import("viem").TypedDataParameter[];
|
|
18
|
-
[x: `string[${string}]`]: undefined;
|
|
19
|
-
[x: `function[${string}]`]: undefined;
|
|
20
|
-
[x: `address[${string}]`]: undefined;
|
|
21
|
-
[x: `bool[${string}]`]: undefined;
|
|
22
|
-
[x: `bytes[${string}]`]: undefined;
|
|
23
|
-
[x: `bytes1[${string}]`]: undefined;
|
|
24
|
-
[x: `bytes2[${string}]`]: undefined;
|
|
25
|
-
[x: `bytes3[${string}]`]: undefined;
|
|
26
|
-
[x: `bytes4[${string}]`]: undefined;
|
|
27
|
-
[x: `bytes5[${string}]`]: undefined;
|
|
28
|
-
[x: `bytes6[${string}]`]: undefined;
|
|
29
|
-
[x: `bytes7[${string}]`]: undefined;
|
|
30
|
-
[x: `bytes8[${string}]`]: undefined;
|
|
31
|
-
[x: `bytes9[${string}]`]: undefined;
|
|
32
|
-
[x: `bytes10[${string}]`]: undefined;
|
|
33
|
-
[x: `bytes11[${string}]`]: undefined;
|
|
34
|
-
[x: `bytes12[${string}]`]: undefined;
|
|
35
|
-
[x: `bytes13[${string}]`]: undefined;
|
|
36
|
-
[x: `bytes14[${string}]`]: undefined;
|
|
37
|
-
[x: `bytes15[${string}]`]: undefined;
|
|
38
|
-
[x: `bytes16[${string}]`]: undefined;
|
|
39
|
-
[x: `bytes17[${string}]`]: undefined;
|
|
40
|
-
[x: `bytes18[${string}]`]: undefined;
|
|
41
|
-
[x: `bytes19[${string}]`]: undefined;
|
|
42
|
-
[x: `bytes20[${string}]`]: undefined;
|
|
43
|
-
[x: `bytes21[${string}]`]: undefined;
|
|
44
|
-
[x: `bytes22[${string}]`]: undefined;
|
|
45
|
-
[x: `bytes23[${string}]`]: undefined;
|
|
46
|
-
[x: `bytes24[${string}]`]: undefined;
|
|
47
|
-
[x: `bytes25[${string}]`]: undefined;
|
|
48
|
-
[x: `bytes26[${string}]`]: undefined;
|
|
49
|
-
[x: `bytes27[${string}]`]: undefined;
|
|
50
|
-
[x: `bytes28[${string}]`]: undefined;
|
|
51
|
-
[x: `bytes29[${string}]`]: undefined;
|
|
52
|
-
[x: `bytes30[${string}]`]: undefined;
|
|
53
|
-
[x: `bytes31[${string}]`]: undefined;
|
|
54
|
-
[x: `bytes32[${string}]`]: undefined;
|
|
55
|
-
[x: `int[${string}]`]: undefined;
|
|
56
|
-
[x: `int8[${string}]`]: undefined;
|
|
57
|
-
[x: `int16[${string}]`]: undefined;
|
|
58
|
-
[x: `int24[${string}]`]: undefined;
|
|
59
|
-
[x: `int32[${string}]`]: undefined;
|
|
60
|
-
[x: `int40[${string}]`]: undefined;
|
|
61
|
-
[x: `int48[${string}]`]: undefined;
|
|
62
|
-
[x: `int56[${string}]`]: undefined;
|
|
63
|
-
[x: `int64[${string}]`]: undefined;
|
|
64
|
-
[x: `int72[${string}]`]: undefined;
|
|
65
|
-
[x: `int80[${string}]`]: undefined;
|
|
66
|
-
[x: `int88[${string}]`]: undefined;
|
|
67
|
-
[x: `int96[${string}]`]: undefined;
|
|
68
|
-
[x: `int104[${string}]`]: undefined;
|
|
69
|
-
[x: `int112[${string}]`]: undefined;
|
|
70
|
-
[x: `int120[${string}]`]: undefined;
|
|
71
|
-
[x: `int128[${string}]`]: undefined;
|
|
72
|
-
[x: `int136[${string}]`]: undefined;
|
|
73
|
-
[x: `int144[${string}]`]: undefined;
|
|
74
|
-
[x: `int152[${string}]`]: undefined;
|
|
75
|
-
[x: `int160[${string}]`]: undefined;
|
|
76
|
-
[x: `int168[${string}]`]: undefined;
|
|
77
|
-
[x: `int176[${string}]`]: undefined;
|
|
78
|
-
[x: `int184[${string}]`]: undefined;
|
|
79
|
-
[x: `int192[${string}]`]: undefined;
|
|
80
|
-
[x: `int200[${string}]`]: undefined;
|
|
81
|
-
[x: `int208[${string}]`]: undefined;
|
|
82
|
-
[x: `int216[${string}]`]: undefined;
|
|
83
|
-
[x: `int224[${string}]`]: undefined;
|
|
84
|
-
[x: `int232[${string}]`]: undefined;
|
|
85
|
-
[x: `int240[${string}]`]: undefined;
|
|
86
|
-
[x: `int248[${string}]`]: undefined;
|
|
87
|
-
[x: `int256[${string}]`]: undefined;
|
|
88
|
-
[x: `uint[${string}]`]: undefined;
|
|
89
|
-
[x: `uint8[${string}]`]: undefined;
|
|
90
|
-
[x: `uint16[${string}]`]: undefined;
|
|
91
|
-
[x: `uint24[${string}]`]: undefined;
|
|
92
|
-
[x: `uint32[${string}]`]: undefined;
|
|
93
|
-
[x: `uint40[${string}]`]: undefined;
|
|
94
|
-
[x: `uint48[${string}]`]: undefined;
|
|
95
|
-
[x: `uint56[${string}]`]: undefined;
|
|
96
|
-
[x: `uint64[${string}]`]: undefined;
|
|
97
|
-
[x: `uint72[${string}]`]: undefined;
|
|
98
|
-
[x: `uint80[${string}]`]: undefined;
|
|
99
|
-
[x: `uint88[${string}]`]: undefined;
|
|
100
|
-
[x: `uint96[${string}]`]: undefined;
|
|
101
|
-
[x: `uint104[${string}]`]: undefined;
|
|
102
|
-
[x: `uint112[${string}]`]: undefined;
|
|
103
|
-
[x: `uint120[${string}]`]: undefined;
|
|
104
|
-
[x: `uint128[${string}]`]: undefined;
|
|
105
|
-
[x: `uint136[${string}]`]: undefined;
|
|
106
|
-
[x: `uint144[${string}]`]: undefined;
|
|
107
|
-
[x: `uint152[${string}]`]: undefined;
|
|
108
|
-
[x: `uint160[${string}]`]: undefined;
|
|
109
|
-
[x: `uint168[${string}]`]: undefined;
|
|
110
|
-
[x: `uint176[${string}]`]: undefined;
|
|
111
|
-
[x: `uint184[${string}]`]: undefined;
|
|
112
|
-
[x: `uint192[${string}]`]: undefined;
|
|
113
|
-
[x: `uint200[${string}]`]: undefined;
|
|
114
|
-
[x: `uint208[${string}]`]: undefined;
|
|
115
|
-
[x: `uint216[${string}]`]: undefined;
|
|
116
|
-
[x: `uint224[${string}]`]: undefined;
|
|
117
|
-
[x: `uint232[${string}]`]: undefined;
|
|
118
|
-
[x: `uint240[${string}]`]: undefined;
|
|
119
|
-
[x: `uint248[${string}]`]: undefined;
|
|
120
|
-
[x: `uint256[${string}]`]: undefined;
|
|
121
|
-
string?: undefined;
|
|
122
|
-
address?: undefined;
|
|
123
|
-
bool?: undefined;
|
|
124
|
-
bytes?: undefined;
|
|
125
|
-
bytes1?: undefined;
|
|
126
|
-
bytes2?: undefined;
|
|
127
|
-
bytes3?: undefined;
|
|
128
|
-
bytes4?: undefined;
|
|
129
|
-
bytes5?: undefined;
|
|
130
|
-
bytes6?: undefined;
|
|
131
|
-
bytes7?: undefined;
|
|
132
|
-
bytes8?: undefined;
|
|
133
|
-
bytes9?: undefined;
|
|
134
|
-
bytes10?: undefined;
|
|
135
|
-
bytes11?: undefined;
|
|
136
|
-
bytes12?: undefined;
|
|
137
|
-
bytes13?: undefined;
|
|
138
|
-
bytes14?: undefined;
|
|
139
|
-
bytes15?: undefined;
|
|
140
|
-
bytes16?: undefined;
|
|
141
|
-
bytes17?: undefined;
|
|
142
|
-
bytes18?: undefined;
|
|
143
|
-
bytes19?: undefined;
|
|
144
|
-
bytes20?: undefined;
|
|
145
|
-
bytes21?: undefined;
|
|
146
|
-
bytes22?: undefined;
|
|
147
|
-
bytes23?: undefined;
|
|
148
|
-
bytes24?: undefined;
|
|
149
|
-
bytes25?: undefined;
|
|
150
|
-
bytes26?: undefined;
|
|
151
|
-
bytes27?: undefined;
|
|
152
|
-
bytes28?: undefined;
|
|
153
|
-
bytes29?: undefined;
|
|
154
|
-
bytes30?: undefined;
|
|
155
|
-
bytes31?: undefined;
|
|
156
|
-
bytes32?: undefined;
|
|
157
|
-
int8?: undefined;
|
|
158
|
-
int16?: undefined;
|
|
159
|
-
int24?: undefined;
|
|
160
|
-
int32?: undefined;
|
|
161
|
-
int40?: undefined;
|
|
162
|
-
int48?: undefined;
|
|
163
|
-
int56?: undefined;
|
|
164
|
-
int64?: undefined;
|
|
165
|
-
int72?: undefined;
|
|
166
|
-
int80?: undefined;
|
|
167
|
-
int88?: undefined;
|
|
168
|
-
int96?: undefined;
|
|
169
|
-
int104?: undefined;
|
|
170
|
-
int112?: undefined;
|
|
171
|
-
int120?: undefined;
|
|
172
|
-
int128?: undefined;
|
|
173
|
-
int136?: undefined;
|
|
174
|
-
int144?: undefined;
|
|
175
|
-
int152?: undefined;
|
|
176
|
-
int160?: undefined;
|
|
177
|
-
int168?: undefined;
|
|
178
|
-
int176?: undefined;
|
|
179
|
-
int184?: undefined;
|
|
180
|
-
int192?: undefined;
|
|
181
|
-
int200?: undefined;
|
|
182
|
-
int208?: undefined;
|
|
183
|
-
int216?: undefined;
|
|
184
|
-
int224?: undefined;
|
|
185
|
-
int232?: undefined;
|
|
186
|
-
int240?: undefined;
|
|
187
|
-
int248?: undefined;
|
|
188
|
-
int256?: undefined;
|
|
189
|
-
uint8?: undefined;
|
|
190
|
-
uint16?: undefined;
|
|
191
|
-
uint24?: undefined;
|
|
192
|
-
uint32?: undefined;
|
|
193
|
-
uint40?: undefined;
|
|
194
|
-
uint48?: undefined;
|
|
195
|
-
uint56?: undefined;
|
|
196
|
-
uint64?: undefined;
|
|
197
|
-
uint72?: undefined;
|
|
198
|
-
uint80?: undefined;
|
|
199
|
-
uint88?: undefined;
|
|
200
|
-
uint96?: undefined;
|
|
201
|
-
uint104?: undefined;
|
|
202
|
-
uint112?: undefined;
|
|
203
|
-
uint120?: undefined;
|
|
204
|
-
uint128?: undefined;
|
|
205
|
-
uint136?: undefined;
|
|
206
|
-
uint144?: undefined;
|
|
207
|
-
uint152?: undefined;
|
|
208
|
-
uint160?: undefined;
|
|
209
|
-
uint168?: undefined;
|
|
210
|
-
uint176?: undefined;
|
|
211
|
-
uint184?: undefined;
|
|
212
|
-
uint192?: undefined;
|
|
213
|
-
uint200?: undefined;
|
|
214
|
-
uint208?: undefined;
|
|
215
|
-
uint216?: undefined;
|
|
216
|
-
uint224?: undefined;
|
|
217
|
-
uint232?: undefined;
|
|
218
|
-
uint240?: undefined;
|
|
219
|
-
uint248?: undefined;
|
|
220
|
-
uint256?: undefined;
|
|
221
|
-
} | Record<string, unknown>, primaryType extends "EIP712Domain" | keyof typedData = keyof typedData>(parameters: import("viem").TypedDataDefinition<typedData, primaryType>) => Promise<`0x${string}`>;
|
|
222
|
-
publicKey: `0x${string}`;
|
|
223
|
-
source: string;
|
|
224
|
-
type: "local";
|
|
225
|
-
};
|
|
4
|
+
export declare const createAccountFromWallet: (messageTransport: MessageTransportWithDefaultOrigin, wallet: Wallet) => Account;
|
package/src/types.d.ts
CHANGED
|
@@ -22,5 +22,9 @@ export type IViemExtension = {
|
|
|
22
22
|
* Creates a wallet viem client, using a custom Dynamic transport
|
|
23
23
|
*/
|
|
24
24
|
createWalletClient: <C extends Chain = Chain>(params: WalletClientConfigDynamic<C>) => Promise<WalletClient<CustomTransport, C, Account>>;
|
|
25
|
+
/**
|
|
26
|
+
* Creates a viem account from a wallet
|
|
27
|
+
*/
|
|
28
|
+
createAccountFromWallet: (wallet: BaseWallet) => Account;
|
|
25
29
|
};
|
|
26
30
|
};
|