@verbeth/sdk 0.1.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/README.md +202 -0
- package/dist/esm/src/client/VerbethClient.d.ts +134 -0
- package/dist/esm/src/client/VerbethClient.d.ts.map +1 -0
- package/dist/esm/src/client/VerbethClient.js +191 -0
- package/dist/esm/src/client/index.d.ts +3 -0
- package/dist/esm/src/client/index.d.ts.map +1 -0
- package/dist/esm/src/client/index.js +2 -0
- package/dist/esm/src/client/types.d.ts +30 -0
- package/dist/esm/src/client/types.d.ts.map +1 -0
- package/dist/esm/src/client/types.js +2 -0
- package/dist/esm/src/crypto.d.ts +46 -0
- package/dist/esm/src/crypto.d.ts.map +1 -0
- package/dist/esm/src/crypto.js +137 -0
- package/dist/esm/src/executor.d.ts +73 -0
- package/dist/esm/src/executor.d.ts.map +1 -0
- package/dist/esm/src/executor.js +353 -0
- package/dist/esm/src/identity.d.ts +28 -0
- package/dist/esm/src/identity.d.ts.map +1 -0
- package/dist/esm/src/identity.js +70 -0
- package/dist/esm/src/index.d.ts +18 -0
- package/dist/esm/src/index.d.ts.map +1 -0
- package/dist/esm/src/index.js +17 -0
- package/dist/esm/src/payload.d.ts +94 -0
- package/dist/esm/src/payload.d.ts.map +1 -0
- package/dist/esm/src/payload.js +216 -0
- package/dist/esm/src/send.d.ts +50 -0
- package/dist/esm/src/send.d.ts.map +1 -0
- package/dist/esm/src/send.js +75 -0
- package/dist/esm/src/types.d.ts +73 -0
- package/dist/esm/src/types.d.ts.map +1 -0
- package/dist/esm/src/types.js +2 -0
- package/dist/esm/src/utils/nonce.d.ts +2 -0
- package/dist/esm/src/utils/nonce.d.ts.map +1 -0
- package/dist/esm/src/utils/nonce.js +6 -0
- package/dist/esm/src/utils/x25519.d.ts +6 -0
- package/dist/esm/src/utils/x25519.d.ts.map +1 -0
- package/dist/esm/src/utils/x25519.js +12 -0
- package/dist/esm/src/utils.d.ts +29 -0
- package/dist/esm/src/utils.d.ts.map +1 -0
- package/dist/esm/src/utils.js +123 -0
- package/dist/esm/src/verify.d.ts +54 -0
- package/dist/esm/src/verify.d.ts.map +1 -0
- package/dist/esm/src/verify.js +186 -0
- package/dist/src/client/VerbethClient.d.ts +134 -0
- package/dist/src/client/VerbethClient.d.ts.map +1 -0
- package/dist/src/client/VerbethClient.js +191 -0
- package/dist/src/client/index.d.ts +3 -0
- package/dist/src/client/index.d.ts.map +1 -0
- package/dist/src/client/index.js +2 -0
- package/dist/src/client/types.d.ts +30 -0
- package/dist/src/client/types.d.ts.map +1 -0
- package/dist/src/client/types.js +2 -0
- package/dist/src/crypto.d.ts +46 -0
- package/dist/src/crypto.d.ts.map +1 -0
- package/dist/src/crypto.js +137 -0
- package/dist/src/executor.d.ts +73 -0
- package/dist/src/executor.d.ts.map +1 -0
- package/dist/src/executor.js +353 -0
- package/dist/src/identity.d.ts +28 -0
- package/dist/src/identity.d.ts.map +1 -0
- package/dist/src/identity.js +70 -0
- package/dist/src/index.d.ts +18 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +17 -0
- package/dist/src/payload.d.ts +94 -0
- package/dist/src/payload.d.ts.map +1 -0
- package/dist/src/payload.js +216 -0
- package/dist/src/send.d.ts +50 -0
- package/dist/src/send.d.ts.map +1 -0
- package/dist/src/send.js +75 -0
- package/dist/src/types.d.ts +73 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +2 -0
- package/dist/src/utils/nonce.d.ts +2 -0
- package/dist/src/utils/nonce.d.ts.map +1 -0
- package/dist/src/utils/nonce.js +6 -0
- package/dist/src/utils/x25519.d.ts +6 -0
- package/dist/src/utils/x25519.d.ts.map +1 -0
- package/dist/src/utils/x25519.js +12 -0
- package/dist/src/utils.d.ts +29 -0
- package/dist/src/utils.d.ts.map +1 -0
- package/dist/src/utils.js +123 -0
- package/dist/src/verify.d.ts +54 -0
- package/dist/src/verify.d.ts.map +1 -0
- package/dist/src/verify.js +186 -0
- package/package.json +38 -0
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
// packages/sdk/src/executor.ts
|
|
2
|
+
import { Interface, toBeHex, zeroPadValue, } from "ethers";
|
|
3
|
+
function pack128x128(high, low) {
|
|
4
|
+
return (high << 128n) | (low & ((1n << 128n) - 1n));
|
|
5
|
+
}
|
|
6
|
+
// Unpack a packed 256-bit value into two 128-bit values
|
|
7
|
+
export function split128x128(word) {
|
|
8
|
+
const lowMask = (1n << 128n) - 1n;
|
|
9
|
+
return [word >> 128n, word & lowMask];
|
|
10
|
+
}
|
|
11
|
+
/* -------------------------------------------------------------------------- */
|
|
12
|
+
/* Helpers for compatibility between AA spec v0.6 and v0.7 */
|
|
13
|
+
/* -------------------------------------------------------------------------- */
|
|
14
|
+
const detectSpecVersion = (iface) => {
|
|
15
|
+
try {
|
|
16
|
+
iface.getFunction("getAccountGasLimits");
|
|
17
|
+
return "v0.7";
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
return "v0.6";
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
// transforms all bigints into padded bytes32 (uint256)
|
|
24
|
+
const padBigints = (op) => {
|
|
25
|
+
const out = { ...op };
|
|
26
|
+
for (const [k, v] of Object.entries(out)) {
|
|
27
|
+
if (typeof v === "bigint") {
|
|
28
|
+
out[k] = zeroPadValue(toBeHex(v), 32);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return out;
|
|
32
|
+
};
|
|
33
|
+
// EOA Executor - Direct contract calls via wallet signer
|
|
34
|
+
export class EOAExecutor {
|
|
35
|
+
constructor(contract) {
|
|
36
|
+
this.contract = contract;
|
|
37
|
+
}
|
|
38
|
+
async sendMessage(ciphertext, topic, timestamp, nonce) {
|
|
39
|
+
return this.contract.sendMessage(ciphertext, topic, timestamp, nonce);
|
|
40
|
+
}
|
|
41
|
+
async initiateHandshake(recipientHash, pubKeys, ephemeralPubKey, plaintextPayload) {
|
|
42
|
+
return this.contract.initiateHandshake(recipientHash, pubKeys, ephemeralPubKey, plaintextPayload);
|
|
43
|
+
}
|
|
44
|
+
async respondToHandshake(inResponseTo, responderEphemeralR, ciphertext) {
|
|
45
|
+
return this.contract.respondToHandshake(inResponseTo, responderEphemeralR, ciphertext);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
// Base Smart Account Executor - Uses wallet_sendCalls for sponsored transactions
|
|
49
|
+
export class BaseSmartAccountExecutor {
|
|
50
|
+
constructor(baseAccountProvider, logChainAddress, chainId = 8453, // Base mainnet by default
|
|
51
|
+
paymasterServiceUrl, subAccountAddress) {
|
|
52
|
+
this.baseAccountProvider = baseAccountProvider;
|
|
53
|
+
this.logChainAddress = logChainAddress;
|
|
54
|
+
this.paymasterServiceUrl = paymasterServiceUrl;
|
|
55
|
+
this.subAccountAddress = subAccountAddress;
|
|
56
|
+
this.logChainInterface = new Interface([
|
|
57
|
+
"function sendMessage(bytes calldata ciphertext, bytes32 topic, uint256 timestamp, uint256 nonce)",
|
|
58
|
+
"function initiateHandshake(bytes32 recipientHash, bytes pubKeys, bytes ephemeralPubKey, bytes plaintextPayload)",
|
|
59
|
+
"function respondToHandshake(bytes32 inResponseTo, bytes32 responderEphemeralR, bytes ciphertext)",
|
|
60
|
+
]);
|
|
61
|
+
// Convert chainId to hex
|
|
62
|
+
this.chainId =
|
|
63
|
+
chainId === 8453
|
|
64
|
+
? "0x2105" // Base mainnet
|
|
65
|
+
: chainId === 84532
|
|
66
|
+
? "0x14a34" // Base Sepolia
|
|
67
|
+
: `0x${chainId.toString(16)}`;
|
|
68
|
+
}
|
|
69
|
+
async sendMessage(ciphertext, topic, timestamp, nonce) {
|
|
70
|
+
const callData = this.logChainInterface.encodeFunctionData("sendMessage", [
|
|
71
|
+
ciphertext,
|
|
72
|
+
topic,
|
|
73
|
+
timestamp,
|
|
74
|
+
nonce,
|
|
75
|
+
]);
|
|
76
|
+
return this.executeCalls([
|
|
77
|
+
{
|
|
78
|
+
to: this.logChainAddress,
|
|
79
|
+
value: "0x0",
|
|
80
|
+
data: callData,
|
|
81
|
+
},
|
|
82
|
+
]);
|
|
83
|
+
}
|
|
84
|
+
async initiateHandshake(recipientHash, pubKeys, ephemeralPubKey, plaintextPayload) {
|
|
85
|
+
const callData = this.logChainInterface.encodeFunctionData("initiateHandshake", [recipientHash, pubKeys, ephemeralPubKey, plaintextPayload]);
|
|
86
|
+
return this.executeCalls([
|
|
87
|
+
{
|
|
88
|
+
to: this.logChainAddress,
|
|
89
|
+
value: "0x0",
|
|
90
|
+
data: callData,
|
|
91
|
+
},
|
|
92
|
+
]);
|
|
93
|
+
}
|
|
94
|
+
async respondToHandshake(inResponseTo, responderEphemeralR, ciphertext) {
|
|
95
|
+
const callData = this.logChainInterface.encodeFunctionData("respondToHandshake", [inResponseTo, responderEphemeralR, ciphertext]);
|
|
96
|
+
return this.executeCalls([
|
|
97
|
+
{
|
|
98
|
+
to: this.logChainAddress,
|
|
99
|
+
value: "0x0",
|
|
100
|
+
data: callData,
|
|
101
|
+
},
|
|
102
|
+
]);
|
|
103
|
+
}
|
|
104
|
+
async executeCalls(calls) {
|
|
105
|
+
try {
|
|
106
|
+
//console.log("DEBUG: Sub account address:", this.subAccountAddress);
|
|
107
|
+
const requestParams = {
|
|
108
|
+
version: "1.0",
|
|
109
|
+
chainId: this.chainId,
|
|
110
|
+
calls,
|
|
111
|
+
};
|
|
112
|
+
//** WORK IN PROGRESS */
|
|
113
|
+
if (this.subAccountAddress) {
|
|
114
|
+
requestParams.from = this.subAccountAddress;
|
|
115
|
+
//console.log("DEBUG: Using sub account for transaction");
|
|
116
|
+
}
|
|
117
|
+
if (this.paymasterServiceUrl) {
|
|
118
|
+
requestParams.capabilities = {
|
|
119
|
+
paymasterService: {
|
|
120
|
+
url: this.paymasterServiceUrl,
|
|
121
|
+
},
|
|
122
|
+
};
|
|
123
|
+
//console.log("DEBUG: Using paymaster for gas sponsorship");
|
|
124
|
+
}
|
|
125
|
+
//console.log("DEBUG: Request params:", requestParams);
|
|
126
|
+
const result = await this.baseAccountProvider.request({
|
|
127
|
+
method: "wallet_sendCalls",
|
|
128
|
+
params: [requestParams],
|
|
129
|
+
});
|
|
130
|
+
// first 32 bytes are the actual userop hash
|
|
131
|
+
if (typeof result === "string" &&
|
|
132
|
+
result.startsWith("0x") &&
|
|
133
|
+
result.length > 66) {
|
|
134
|
+
const actualTxHash = "0x" + result.slice(2, 66); // Extract first 32 bytes
|
|
135
|
+
//console.log("DEBUG: extracted tx hash:", actualTxHash);
|
|
136
|
+
return { hash: actualTxHash };
|
|
137
|
+
}
|
|
138
|
+
return result;
|
|
139
|
+
}
|
|
140
|
+
catch (error) {
|
|
141
|
+
console.error("Base Smart Account transaction failed:", error);
|
|
142
|
+
throw error;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
// UserOp Executor - Account Abstraction via bundler
|
|
147
|
+
export class UserOpExecutor {
|
|
148
|
+
constructor(smartAccountAddress, logChainAddress, bundlerClient, smartAccountClient) {
|
|
149
|
+
this.smartAccountAddress = smartAccountAddress;
|
|
150
|
+
this.logChainAddress = logChainAddress;
|
|
151
|
+
this.bundlerClient = bundlerClient;
|
|
152
|
+
this.smartAccountClient = smartAccountClient;
|
|
153
|
+
this.logChainInterface = new Interface([
|
|
154
|
+
"function sendMessage(bytes calldata ciphertext, bytes32 topic, uint256 timestamp, uint256 nonce)",
|
|
155
|
+
"function initiateHandshake(bytes32 recipientHash, bytes pubKeys, bytes ephemeralPubKey, bytes plaintextPayload)",
|
|
156
|
+
"function respondToHandshake(bytes32 inResponseTo, bytes32 responderEphemeralR, bytes ciphertext)",
|
|
157
|
+
]);
|
|
158
|
+
// Smart account interface for executing calls to other contracts
|
|
159
|
+
this.smartAccountInterface = new Interface([
|
|
160
|
+
"function execute(address target, uint256 value, bytes calldata data) returns (bytes)",
|
|
161
|
+
]);
|
|
162
|
+
}
|
|
163
|
+
async sendMessage(ciphertext, topic, timestamp, nonce) {
|
|
164
|
+
const logChainCallData = this.logChainInterface.encodeFunctionData("sendMessage", [ciphertext, topic, timestamp, nonce]);
|
|
165
|
+
const smartAccountCallData = this.smartAccountInterface.encodeFunctionData("execute", [
|
|
166
|
+
this.logChainAddress,
|
|
167
|
+
0, // value
|
|
168
|
+
logChainCallData,
|
|
169
|
+
]);
|
|
170
|
+
return this.executeUserOp(smartAccountCallData);
|
|
171
|
+
}
|
|
172
|
+
async initiateHandshake(recipientHash, pubKeys, ephemeralPubKey, plaintextPayload) {
|
|
173
|
+
const logChainCallData = this.logChainInterface.encodeFunctionData("initiateHandshake", [recipientHash, pubKeys, ephemeralPubKey, plaintextPayload]);
|
|
174
|
+
const smartAccountCallData = this.smartAccountInterface.encodeFunctionData("execute", [
|
|
175
|
+
this.logChainAddress,
|
|
176
|
+
0, // value
|
|
177
|
+
logChainCallData,
|
|
178
|
+
]);
|
|
179
|
+
return this.executeUserOp(smartAccountCallData);
|
|
180
|
+
}
|
|
181
|
+
async respondToHandshake(inResponseTo, responderEphemeralR, ciphertext) {
|
|
182
|
+
const logChainCallData = this.logChainInterface.encodeFunctionData("respondToHandshake", [inResponseTo, responderEphemeralR, ciphertext]);
|
|
183
|
+
const smartAccountCallData = this.smartAccountInterface.encodeFunctionData("execute", [
|
|
184
|
+
this.logChainAddress,
|
|
185
|
+
0, // value
|
|
186
|
+
logChainCallData,
|
|
187
|
+
]);
|
|
188
|
+
return this.executeUserOp(smartAccountCallData);
|
|
189
|
+
}
|
|
190
|
+
async executeUserOp(callData) {
|
|
191
|
+
const callGasLimit = 1000000n;
|
|
192
|
+
const verificationGasLimit = 1000000n;
|
|
193
|
+
const maxFeePerGas = 1000000000n;
|
|
194
|
+
const maxPriorityFeePerGas = 1000000000n;
|
|
195
|
+
const userOp = {
|
|
196
|
+
sender: this.smartAccountAddress,
|
|
197
|
+
nonce: await this.smartAccountClient.getNonce(),
|
|
198
|
+
initCode: "0x", // No init code for existing accounts
|
|
199
|
+
callData,
|
|
200
|
+
accountGasLimits: pack128x128(verificationGasLimit, callGasLimit),
|
|
201
|
+
preVerificationGas: 100000n,
|
|
202
|
+
gasFees: pack128x128(maxFeePerGas, maxPriorityFeePerGas),
|
|
203
|
+
paymasterAndData: "0x",
|
|
204
|
+
signature: "0x",
|
|
205
|
+
};
|
|
206
|
+
const signedUserOp = await this.smartAccountClient.signUserOperation(userOp);
|
|
207
|
+
const userOpHash = await this.bundlerClient.sendUserOperation(signedUserOp);
|
|
208
|
+
const receipt = await this.bundlerClient.waitForUserOperationReceipt(userOpHash);
|
|
209
|
+
return receipt;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
// Direct EntryPoint Executor - for local testing (bypasses bundler)
|
|
213
|
+
export class DirectEntryPointExecutor {
|
|
214
|
+
constructor(smartAccountAddress, entryPointContract, logChainAddress, smartAccountClient, signer) {
|
|
215
|
+
this.smartAccountAddress = smartAccountAddress;
|
|
216
|
+
this.logChainAddress = logChainAddress;
|
|
217
|
+
this.smartAccountClient = smartAccountClient;
|
|
218
|
+
this.signer = signer;
|
|
219
|
+
this.logChainInterface = new Interface([
|
|
220
|
+
"function sendMessage(bytes calldata ciphertext, bytes32 topic, uint256 timestamp, uint256 nonce)",
|
|
221
|
+
"function initiateHandshake(bytes32 recipientHash, bytes pubKeys, bytes ephemeralPubKey, bytes plaintextPayload)",
|
|
222
|
+
"function respondToHandshake(bytes32 inResponseTo, bytes32 responderEphemeralR, bytes ciphertext)",
|
|
223
|
+
]);
|
|
224
|
+
// Smart account interface for executing calls to other contracts
|
|
225
|
+
this.smartAccountInterface = new Interface([
|
|
226
|
+
"function execute(address target, uint256 value, bytes calldata data) returns (bytes)",
|
|
227
|
+
]);
|
|
228
|
+
this.entryPointContract = entryPointContract.connect(signer);
|
|
229
|
+
this.spec = detectSpecVersion(this.entryPointContract.interface);
|
|
230
|
+
}
|
|
231
|
+
async sendMessage(ciphertext, topic, timestamp, nonce) {
|
|
232
|
+
const logChainCallData = this.logChainInterface.encodeFunctionData("sendMessage", [ciphertext, topic, timestamp, nonce]);
|
|
233
|
+
const smartAccountCallData = this.smartAccountInterface.encodeFunctionData("execute", [
|
|
234
|
+
this.logChainAddress,
|
|
235
|
+
0, // value
|
|
236
|
+
logChainCallData,
|
|
237
|
+
]);
|
|
238
|
+
return this.executeDirectUserOp(smartAccountCallData);
|
|
239
|
+
}
|
|
240
|
+
async initiateHandshake(recipientHash, pubKeys, ephemeralPubKey, plaintextPayload) {
|
|
241
|
+
const logChainCallData = this.logChainInterface.encodeFunctionData("initiateHandshake", [recipientHash, pubKeys, ephemeralPubKey, plaintextPayload]);
|
|
242
|
+
const smartAccountCallData = this.smartAccountInterface.encodeFunctionData("execute", [
|
|
243
|
+
this.logChainAddress,
|
|
244
|
+
0, // value
|
|
245
|
+
logChainCallData,
|
|
246
|
+
]);
|
|
247
|
+
return this.executeDirectUserOp(smartAccountCallData);
|
|
248
|
+
}
|
|
249
|
+
async respondToHandshake(inResponseTo, responderEphemeralR, ciphertext) {
|
|
250
|
+
const logChainCallData = this.logChainInterface.encodeFunctionData("respondToHandshake", [inResponseTo, responderEphemeralR, ciphertext]);
|
|
251
|
+
const smartAccountCallData = this.smartAccountInterface.encodeFunctionData("execute", [
|
|
252
|
+
this.logChainAddress,
|
|
253
|
+
0, // value
|
|
254
|
+
logChainCallData,
|
|
255
|
+
]);
|
|
256
|
+
return this.executeDirectUserOp(smartAccountCallData);
|
|
257
|
+
}
|
|
258
|
+
async executeDirectUserOp(callData) {
|
|
259
|
+
const callGasLimit = 1000000n;
|
|
260
|
+
const verificationGasLimit = 1000000n;
|
|
261
|
+
const maxFeePerGas = 1000000000n;
|
|
262
|
+
const maxPriorityFeePerGas = 1000000000n;
|
|
263
|
+
// Build UserOperation
|
|
264
|
+
let userOp;
|
|
265
|
+
if (this.spec === "v0.6") {
|
|
266
|
+
userOp = {
|
|
267
|
+
sender: this.smartAccountAddress,
|
|
268
|
+
nonce: await this.smartAccountClient.getNonce(),
|
|
269
|
+
initCode: "0x",
|
|
270
|
+
callData,
|
|
271
|
+
callGasLimit,
|
|
272
|
+
verificationGasLimit,
|
|
273
|
+
preVerificationGas: 100000n,
|
|
274
|
+
maxFeePerGas,
|
|
275
|
+
maxPriorityFeePerGas,
|
|
276
|
+
paymasterAndData: "0x",
|
|
277
|
+
signature: "0x",
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
else {
|
|
281
|
+
userOp = {
|
|
282
|
+
sender: this.smartAccountAddress,
|
|
283
|
+
nonce: await this.smartAccountClient.getNonce(),
|
|
284
|
+
initCode: "0x",
|
|
285
|
+
callData,
|
|
286
|
+
accountGasLimits: pack128x128(verificationGasLimit, callGasLimit),
|
|
287
|
+
preVerificationGas: 100000n,
|
|
288
|
+
gasFees: pack128x128(maxFeePerGas, maxPriorityFeePerGas),
|
|
289
|
+
paymasterAndData: "0x",
|
|
290
|
+
signature: "0x",
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
// Pad bigints, bytes32 before signing
|
|
294
|
+
const paddedUserOp = padBigints(userOp);
|
|
295
|
+
//console.log("Padded UserOp:", paddedUserOp);
|
|
296
|
+
const signed = await this.smartAccountClient.signUserOperation(paddedUserOp);
|
|
297
|
+
// Direct submit to EntryPoint
|
|
298
|
+
const tx = await this.entryPointContract.handleOps([signed], await this.signer.getAddress());
|
|
299
|
+
return tx;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
export class ExecutorFactory {
|
|
303
|
+
static createEOA(contract) {
|
|
304
|
+
return new EOAExecutor(contract);
|
|
305
|
+
}
|
|
306
|
+
static createBaseSmartAccount(baseAccountProvider, logChainAddress, chainId = 8453, paymasterServiceUrl, subAccountAddress) {
|
|
307
|
+
return new BaseSmartAccountExecutor(baseAccountProvider, logChainAddress, chainId, paymasterServiceUrl, subAccountAddress);
|
|
308
|
+
}
|
|
309
|
+
static createUserOp(smartAccountAddress, _entryPointAddress, logChainAddress, bundlerClient, smartAccountClient) {
|
|
310
|
+
return new UserOpExecutor(smartAccountAddress, logChainAddress, bundlerClient, smartAccountClient);
|
|
311
|
+
}
|
|
312
|
+
static createDirectEntryPoint(smartAccountAddress, entryPointContract, logChainAddress, smartAccountClient, signer) {
|
|
313
|
+
return new DirectEntryPointExecutor(smartAccountAddress, entryPointContract, logChainAddress, smartAccountClient, signer);
|
|
314
|
+
}
|
|
315
|
+
// Auto-detect executor based on environment and signer type
|
|
316
|
+
static async createAuto(signerOrAccount, contract, options) {
|
|
317
|
+
if (options?.baseAccountProvider && options?.logChainAddress) {
|
|
318
|
+
return new BaseSmartAccountExecutor(options.baseAccountProvider, options.logChainAddress, options.chainId || 8453);
|
|
319
|
+
}
|
|
320
|
+
try {
|
|
321
|
+
const provider = signerOrAccount?.provider || signerOrAccount;
|
|
322
|
+
if (provider && typeof provider.request === "function") {
|
|
323
|
+
// test if provider supports wallet_sendCalls
|
|
324
|
+
const capabilities = await provider
|
|
325
|
+
.request({
|
|
326
|
+
method: "wallet_getCapabilities",
|
|
327
|
+
params: [],
|
|
328
|
+
})
|
|
329
|
+
.catch(() => null);
|
|
330
|
+
if (capabilities && options?.logChainAddress) {
|
|
331
|
+
// if wallet supports capabilities, it's likely a Base Smart Account
|
|
332
|
+
return new BaseSmartAccountExecutor(provider, options.logChainAddress, options.chainId || 8453);
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
catch (error) { }
|
|
337
|
+
if (signerOrAccount.address &&
|
|
338
|
+
(options?.bundlerClient || options?.entryPointContract)) {
|
|
339
|
+
if (options.isTestEnvironment &&
|
|
340
|
+
options.entryPointContract &&
|
|
341
|
+
options.logChainAddress) {
|
|
342
|
+
return new DirectEntryPointExecutor(signerOrAccount.address, options.entryPointContract, options.logChainAddress, signerOrAccount, signerOrAccount.signer || signerOrAccount);
|
|
343
|
+
}
|
|
344
|
+
if (options.bundlerClient &&
|
|
345
|
+
options.entryPointAddress &&
|
|
346
|
+
options.logChainAddress) {
|
|
347
|
+
return new UserOpExecutor(signerOrAccount.address, options.logChainAddress, options.bundlerClient, signerOrAccount);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
// default to EOA executor
|
|
351
|
+
return new EOAExecutor(contract);
|
|
352
|
+
}
|
|
353
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Signer } from "ethers";
|
|
2
|
+
import { IdentityProof } from "./types.js";
|
|
3
|
+
interface IdentityKeyPair {
|
|
4
|
+
publicKey: Uint8Array;
|
|
5
|
+
secretKey: Uint8Array;
|
|
6
|
+
signingPublicKey: Uint8Array;
|
|
7
|
+
signingSecretKey: Uint8Array;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* HKDF (RFC 5869) identity key derivation.
|
|
11
|
+
* Returns a proof binding the derived keypair to the wallet address.
|
|
12
|
+
*/
|
|
13
|
+
export declare function deriveIdentityKeyPairWithProof(signer: any, address: string): Promise<{
|
|
14
|
+
keyPair: IdentityKeyPair;
|
|
15
|
+
identityProof: {
|
|
16
|
+
message: string;
|
|
17
|
+
signature: string;
|
|
18
|
+
messageRawHex?: `0x${string}`;
|
|
19
|
+
};
|
|
20
|
+
}>;
|
|
21
|
+
export declare function deriveIdentityWithUnifiedKeys(signer: Signer, address: string): Promise<{
|
|
22
|
+
identityProof: IdentityProof;
|
|
23
|
+
identityPubKey: Uint8Array;
|
|
24
|
+
signingPubKey: Uint8Array;
|
|
25
|
+
unifiedPubKeys: Uint8Array;
|
|
26
|
+
}>;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=identity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../src/identity.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAmB,MAAM,QAAQ,CAAC;AAGjD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,UAAU,eAAe;IAEvB,SAAS,EAAE,UAAU,CAAC;IACtB,SAAS,EAAE,UAAU,CAAC;IAEtB,gBAAgB,EAAE,UAAU,CAAC;IAC7B,gBAAgB,EAAE,UAAU,CAAC;CAC9B;AAED;;;GAGG;AACH,wBAAsB,8BAA8B,CAClD,MAAM,EAAE,GAAG,EACX,OAAO,EAAE,MAAM,GACd,OAAO,CAAC;IACT,OAAO,EAAE,eAAe,CAAC;IACzB,aAAa,EAAE;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,MAAM,CAAC;QAClB,aAAa,CAAC,EAAE,KAAK,MAAM,EAAE,CAAC;KAC/B,CAAC;CACH,CAAC,CAyDD;AAED,wBAAsB,6BAA6B,CACjD,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,GACd,OAAO,CAAC;IACT,aAAa,EAAE,aAAa,CAAC;IAC7B,cAAc,EAAE,UAAU,CAAC;IAC3B,aAAa,EAAE,UAAU,CAAC;IAC1B,cAAc,EAAE,UAAU,CAAC;CAC5B,CAAC,CAcD"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { sha256 } from "@noble/hashes/sha2";
|
|
2
|
+
import { hkdf } from "@noble/hashes/hkdf";
|
|
3
|
+
import { concat, hexlify } from "ethers";
|
|
4
|
+
import nacl from "tweetnacl";
|
|
5
|
+
import { encodeUnifiedPubKeys } from "./payload.js";
|
|
6
|
+
/**
|
|
7
|
+
* HKDF (RFC 5869) identity key derivation.
|
|
8
|
+
* Returns a proof binding the derived keypair to the wallet address.
|
|
9
|
+
*/
|
|
10
|
+
export async function deriveIdentityKeyPairWithProof(signer, address) {
|
|
11
|
+
// 1) Local secret seed (32B CSPRNG), domain-separated by address
|
|
12
|
+
const r = nacl.randomBytes(32);
|
|
13
|
+
const enc = new TextEncoder();
|
|
14
|
+
const addrLower = address.toLowerCase();
|
|
15
|
+
// IKM = HKDF(r || "verbeth/addr:" || address_lower)
|
|
16
|
+
// salt/info are public domain labels
|
|
17
|
+
const seedSalt = enc.encode("verbeth/seed-v1");
|
|
18
|
+
const seedInfo = enc.encode("verbeth/ikm");
|
|
19
|
+
const ikmInput = concat([r, enc.encode("verbeth/addr:" + addrLower)]);
|
|
20
|
+
const ikm = hkdf(sha256, ikmInput, seedSalt, seedInfo, 32);
|
|
21
|
+
// Derive X25519 (encryption)
|
|
22
|
+
const info_x25519 = enc.encode("verbeth-x25519-v1");
|
|
23
|
+
const x25519_sk = hkdf(sha256, ikm, new Uint8Array(0), info_x25519, 32);
|
|
24
|
+
const boxKeyPair = nacl.box.keyPair.fromSecretKey(x25519_sk);
|
|
25
|
+
// Derive Ed25519 (signing)
|
|
26
|
+
const info_ed25519 = enc.encode("verbeth-ed25519-v1");
|
|
27
|
+
const ed25519_seed = hkdf(sha256, ikm, new Uint8Array(0), info_ed25519, 32);
|
|
28
|
+
const signKeyPair = nacl.sign.keyPair.fromSeed(ed25519_seed);
|
|
29
|
+
const pkX25519Hex = hexlify(boxKeyPair.publicKey);
|
|
30
|
+
const pkEd25519Hex = hexlify(signKeyPair.publicKey);
|
|
31
|
+
const keyPair = {
|
|
32
|
+
publicKey: boxKeyPair.publicKey,
|
|
33
|
+
secretKey: boxKeyPair.secretKey,
|
|
34
|
+
signingPublicKey: signKeyPair.publicKey,
|
|
35
|
+
signingSecretKey: signKeyPair.secretKey,
|
|
36
|
+
};
|
|
37
|
+
// 2) Single signature binding both public keys
|
|
38
|
+
const bindingMsgLines = [
|
|
39
|
+
"VerbEth Key Binding v1",
|
|
40
|
+
`Address: ${addrLower}`,
|
|
41
|
+
`PkEd25519: ${pkEd25519Hex}`,
|
|
42
|
+
`PkX25519: ${pkX25519Hex}`,
|
|
43
|
+
`Context: verbeth`,
|
|
44
|
+
`Version: 1`,
|
|
45
|
+
];
|
|
46
|
+
const message = bindingMsgLines.join("\n");
|
|
47
|
+
const signature = await signer.signMessage(message);
|
|
48
|
+
const messageRawHex = ("0x" +
|
|
49
|
+
Buffer.from(message, "utf-8").toString("hex"));
|
|
50
|
+
return {
|
|
51
|
+
keyPair,
|
|
52
|
+
identityProof: {
|
|
53
|
+
message,
|
|
54
|
+
signature,
|
|
55
|
+
messageRawHex,
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
export async function deriveIdentityWithUnifiedKeys(signer, address) {
|
|
60
|
+
const result = await deriveIdentityKeyPairWithProof(signer, address);
|
|
61
|
+
const unifiedPubKeys = encodeUnifiedPubKeys(result.keyPair.publicKey, // X25519
|
|
62
|
+
result.keyPair.signingPublicKey // Ed25519
|
|
63
|
+
);
|
|
64
|
+
return {
|
|
65
|
+
identityProof: result.identityProof,
|
|
66
|
+
identityPubKey: result.keyPair.publicKey,
|
|
67
|
+
signingPubKey: result.keyPair.signingPublicKey,
|
|
68
|
+
unifiedPubKeys,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export * from './crypto.js';
|
|
2
|
+
export * from './payload.js';
|
|
3
|
+
export * from './send.js';
|
|
4
|
+
export * from './verify.js';
|
|
5
|
+
export * from './types.js';
|
|
6
|
+
export * from './utils.js';
|
|
7
|
+
export * from './identity.js';
|
|
8
|
+
export * from './executor.js';
|
|
9
|
+
export { decryptMessage as decryptLog } from './crypto.js';
|
|
10
|
+
export { getNextNonce } from './utils/nonce.js';
|
|
11
|
+
export { encodeUnifiedPubKeys, decodeUnifiedPubKeys, createHandshakePayload, createHandshakeResponseContent, extractKeysFromHandshakePayload, extractKeysFromHandshakeResponse, parseHandshakeKeys } from './payload.js';
|
|
12
|
+
export { decryptAndExtractHandshakeKeys, decryptMessage, decryptHandshakeResponse } from './crypto.js';
|
|
13
|
+
export { verifyIdentityProof, verifyAndExtractHandshakeKeys, verifyAndExtractHandshakeResponseKeys } from './verify.js';
|
|
14
|
+
export { deriveIdentityKeyPairWithProof, deriveIdentityWithUnifiedKeys } from './identity.js';
|
|
15
|
+
export { IExecutor, EOAExecutor, UserOpExecutor, DirectEntryPointExecutor, ExecutorFactory } from './executor.js';
|
|
16
|
+
export { VerbethClient } from './client/index.js';
|
|
17
|
+
export type { VerbethClientConfig, HandshakeResult, HandshakeResponseResult } from './client/index.js';
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAE9B,OAAO,EAAE,cAAc,IAAI,UAAU,EAAE,MAAM,aAAa,CAAC;AAE3D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,8BAA8B,EAC9B,+BAA+B,EAC/B,gCAAgC,EAChC,kBAAkB,EACnB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,8BAA8B,EAC9B,cAAc,EACd,wBAAwB,EACzB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,mBAAmB,EACnB,6BAA6B,EAC7B,qCAAqC,EACtC,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,8BAA8B,EAC9B,6BAA6B,EAC9B,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,SAAS,EACT,WAAW,EACX,cAAc,EACd,wBAAwB,EACxB,eAAe,EAChB,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,YAAY,EACV,mBAAmB,EACnB,eAAe,EACf,uBAAuB,EACxB,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export * from './crypto.js';
|
|
2
|
+
export * from './payload.js';
|
|
3
|
+
export * from './send.js';
|
|
4
|
+
export * from './verify.js';
|
|
5
|
+
export * from './types.js';
|
|
6
|
+
export * from './utils.js';
|
|
7
|
+
export * from './identity.js';
|
|
8
|
+
export * from './executor.js';
|
|
9
|
+
export { decryptMessage as decryptLog } from './crypto.js';
|
|
10
|
+
export { getNextNonce } from './utils/nonce.js';
|
|
11
|
+
export { encodeUnifiedPubKeys, decodeUnifiedPubKeys, createHandshakePayload, createHandshakeResponseContent, extractKeysFromHandshakePayload, extractKeysFromHandshakeResponse, parseHandshakeKeys } from './payload.js';
|
|
12
|
+
export { decryptAndExtractHandshakeKeys, decryptMessage, decryptHandshakeResponse } from './crypto.js';
|
|
13
|
+
export { verifyIdentityProof, verifyAndExtractHandshakeKeys, verifyAndExtractHandshakeResponseKeys } from './verify.js';
|
|
14
|
+
export { deriveIdentityKeyPairWithProof, deriveIdentityWithUnifiedKeys } from './identity.js';
|
|
15
|
+
export { EOAExecutor, UserOpExecutor, DirectEntryPointExecutor, ExecutorFactory } from './executor.js';
|
|
16
|
+
// high-level client API
|
|
17
|
+
export { VerbethClient } from './client/index.js';
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { IdentityProof, TopicInfoWire } from './types.js';
|
|
2
|
+
export interface EncryptedPayload {
|
|
3
|
+
v: number;
|
|
4
|
+
epk: string;
|
|
5
|
+
n: string;
|
|
6
|
+
ct: string;
|
|
7
|
+
sig?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface MessagePayload {
|
|
10
|
+
content: string;
|
|
11
|
+
timestamp?: number;
|
|
12
|
+
messageType?: 'text' | 'file' | 'media';
|
|
13
|
+
metadata?: Record<string, any>;
|
|
14
|
+
}
|
|
15
|
+
export interface HandshakeResponsePayload extends EncryptedPayload {
|
|
16
|
+
}
|
|
17
|
+
export interface HandshakeContent {
|
|
18
|
+
plaintextPayload: string;
|
|
19
|
+
identityProof: IdentityProof;
|
|
20
|
+
}
|
|
21
|
+
export declare function parseHandshakePayload(plaintextPayload: string): HandshakeContent;
|
|
22
|
+
export declare function serializeHandshakeContent(content: HandshakeContent): string;
|
|
23
|
+
export declare function encodePayload(ephemeralPubKey: Uint8Array, nonce: Uint8Array, ciphertext: Uint8Array, sig?: Uint8Array): string;
|
|
24
|
+
export declare function decodePayload(json: string): {
|
|
25
|
+
epk: Uint8Array;
|
|
26
|
+
nonce: Uint8Array;
|
|
27
|
+
ciphertext: Uint8Array;
|
|
28
|
+
sig?: Uint8Array;
|
|
29
|
+
};
|
|
30
|
+
export declare function encodeStructuredContent<T>(content: T): Uint8Array;
|
|
31
|
+
export declare function decodeStructuredContent<T>(encoded: Uint8Array, converter: (obj: any) => T): T;
|
|
32
|
+
/**
|
|
33
|
+
* Encodes X25519 + Ed25519 keys into a single 65-byte array with versioning
|
|
34
|
+
*/
|
|
35
|
+
export declare function encodeUnifiedPubKeys(identityPubKey: Uint8Array, // X25519 - 32 bytes
|
|
36
|
+
signingPubKey: Uint8Array): Uint8Array;
|
|
37
|
+
/**
|
|
38
|
+
* Decodes unified pubKeys back to individual X25519 and Ed25519 keys
|
|
39
|
+
*/
|
|
40
|
+
export declare function decodeUnifiedPubKeys(pubKeys: Uint8Array): {
|
|
41
|
+
version: number;
|
|
42
|
+
identityPubKey: Uint8Array;
|
|
43
|
+
signingPubKey: Uint8Array;
|
|
44
|
+
} | null;
|
|
45
|
+
export interface HandshakePayload {
|
|
46
|
+
unifiedPubKeys: Uint8Array;
|
|
47
|
+
ephemeralPubKey: Uint8Array;
|
|
48
|
+
plaintextPayload: string;
|
|
49
|
+
}
|
|
50
|
+
export interface HandshakeResponseContent {
|
|
51
|
+
unifiedPubKeys: Uint8Array;
|
|
52
|
+
ephemeralPubKey: Uint8Array;
|
|
53
|
+
note?: string;
|
|
54
|
+
identityProof: IdentityProof;
|
|
55
|
+
topicInfo?: TopicInfoWire;
|
|
56
|
+
}
|
|
57
|
+
export declare function encodeHandshakePayload(payload: HandshakePayload): Uint8Array;
|
|
58
|
+
export declare function decodeHandshakePayload(encoded: Uint8Array): HandshakePayload;
|
|
59
|
+
export declare function encodeHandshakeResponseContent(content: HandshakeResponseContent): Uint8Array;
|
|
60
|
+
export declare function decodeHandshakeResponseContent(encoded: Uint8Array): HandshakeResponseContent;
|
|
61
|
+
/**
|
|
62
|
+
* Creates HandshakePayload from separate identity keys
|
|
63
|
+
*/
|
|
64
|
+
export declare function createHandshakePayload(identityPubKey: Uint8Array, signingPubKey: Uint8Array, ephemeralPubKey: Uint8Array, plaintextPayload: string): HandshakePayload;
|
|
65
|
+
/**
|
|
66
|
+
* Creates HandshakeResponseContent from separate identity keys
|
|
67
|
+
*/
|
|
68
|
+
export declare function createHandshakeResponseContent(identityPubKey: Uint8Array, signingPubKey: Uint8Array, ephemeralPubKey: Uint8Array, note?: string, identityProof?: IdentityProof, topicInfo?: TopicInfoWire): HandshakeResponseContent;
|
|
69
|
+
/**
|
|
70
|
+
* Extracts individual keys from HandshakePayload
|
|
71
|
+
*/
|
|
72
|
+
export declare function extractKeysFromHandshakePayload(payload: HandshakePayload): {
|
|
73
|
+
identityPubKey: Uint8Array;
|
|
74
|
+
signingPubKey: Uint8Array;
|
|
75
|
+
ephemeralPubKey: Uint8Array;
|
|
76
|
+
} | null;
|
|
77
|
+
/**
|
|
78
|
+
* Extracts individual keys from HandshakeResponseContent
|
|
79
|
+
*/
|
|
80
|
+
export declare function extractKeysFromHandshakeResponse(content: HandshakeResponseContent): {
|
|
81
|
+
identityPubKey: Uint8Array;
|
|
82
|
+
signingPubKey: Uint8Array;
|
|
83
|
+
ephemeralPubKey: Uint8Array;
|
|
84
|
+
} | null;
|
|
85
|
+
/**
|
|
86
|
+
* Parses unified pubKeys from HandshakeLog event
|
|
87
|
+
*/
|
|
88
|
+
export declare function parseHandshakeKeys(event: {
|
|
89
|
+
pubKeys: string;
|
|
90
|
+
}): {
|
|
91
|
+
identityPubKey: Uint8Array;
|
|
92
|
+
signingPubKey: Uint8Array;
|
|
93
|
+
} | null;
|
|
94
|
+
//# sourceMappingURL=payload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources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