@rhinestone/sdk 2.5.0 → 2.7.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/dist/src/accounts/adapters/kernel.d.ts +0 -1
- package/dist/src/accounts/adapters/kernel.d.ts.map +1 -1
- package/dist/src/accounts/adapters/kernel.js +1 -13
- package/dist/src/accounts/kernel-signing.d.ts +3 -0
- package/dist/src/accounts/kernel-signing.d.ts.map +1 -0
- package/dist/src/accounts/kernel-signing.js +13 -0
- package/dist/src/api/account.d.ts.map +1 -1
- package/dist/src/api/account.js +118 -0
- package/dist/src/api/compose-types.d.ts +7 -0
- package/dist/src/api/compose-types.d.ts.map +1 -1
- package/dist/src/api/direct-signing.d.ts.map +1 -1
- package/dist/src/api/direct-signing.js +11 -6
- package/dist/src/api/signer-selection.js +11 -0
- package/dist/src/clients/orchestrator/client.js +1 -1
- package/dist/src/clients/orchestrator/public.d.ts +8 -1
- package/dist/src/clients/orchestrator/public.d.ts.map +1 -1
- package/dist/src/clients/orchestrator/types.d.ts +6 -0
- package/dist/src/clients/orchestrator/types.d.ts.map +1 -1
- package/dist/src/config/account.d.ts +152 -7
- package/dist/src/config/account.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/modules/validators/capabilities.d.ts.map +1 -1
- package/dist/src/modules/validators/capabilities.js +33 -10
- package/dist/src/modules/validators/contribution.d.ts.map +1 -1
- package/dist/src/modules/validators/contribution.js +12 -0
- package/dist/src/modules/validators/definition.d.ts.map +1 -1
- package/dist/src/modules/validators/definition.js +18 -0
- package/dist/src/modules/validators/permissions.d.ts +13 -0
- package/dist/src/modules/validators/permissions.d.ts.map +1 -1
- package/dist/src/modules/validators/permissions.js +140 -2
- package/dist/src/modules/validators/quorum.d.ts +66 -0
- package/dist/src/modules/validators/quorum.d.ts.map +1 -0
- package/dist/src/modules/validators/quorum.js +231 -0
- package/dist/src/modules/validators/resolve.d.ts.map +1 -1
- package/dist/src/modules/validators/resolve.js +5 -0
- package/dist/src/modules/validators/smart-sessions/resolve.d.ts.map +1 -1
- package/dist/src/modules/validators/smart-sessions/resolve.js +112 -13
- package/dist/src/modules/validators/smart-sessions/swap/fynd.d.ts +92 -0
- package/dist/src/modules/validators/smart-sessions/swap/fynd.d.ts.map +1 -0
- package/dist/src/modules/validators/smart-sessions/swap/fynd.js +101 -0
- package/dist/src/modules/validators/smart-sessions/swap/rhinestone.d.ts +147 -0
- package/dist/src/modules/validators/smart-sessions/swap/rhinestone.d.ts.map +1 -0
- package/dist/src/modules/validators/smart-sessions/swap/rhinestone.js +305 -0
- package/dist/src/modules/validators/smart-sessions/swap/rules.d.ts +73 -0
- package/dist/src/modules/validators/smart-sessions/swap/rules.d.ts.map +1 -0
- package/dist/src/modules/validators/smart-sessions/swap/rules.js +105 -0
- package/dist/src/modules/validators/smart-sessions/swap/scope.d.ts +31 -0
- package/dist/src/modules/validators/smart-sessions/swap/scope.d.ts.map +1 -0
- package/dist/src/modules/validators/smart-sessions/swap/scope.js +168 -0
- package/dist/src/modules/validators/smart-sessions/swap/zero-ex.d.ts +143 -0
- package/dist/src/modules/validators/smart-sessions/swap/zero-ex.d.ts.map +1 -0
- package/dist/src/modules/validators/smart-sessions/swap/zero-ex.js +164 -0
- package/dist/src/modules/validators/smart-sessions/types.d.ts +78 -0
- package/dist/src/modules/validators/smart-sessions/types.d.ts.map +1 -1
- package/dist/src/modules/validators/types.d.ts +26 -3
- package/dist/src/modules/validators/types.d.ts.map +1 -1
- package/dist/src/signing/hash.d.ts +9 -0
- package/dist/src/signing/hash.d.ts.map +1 -0
- package/dist/src/signing/hash.js +15 -0
- package/dist/src/signing/intent-plans/assemble.d.ts.map +1 -1
- package/dist/src/signing/intent-plans/assemble.js +10 -0
- package/dist/src/signing/intent-plans/independent.d.ts.map +1 -1
- package/dist/src/signing/intent-plans/independent.js +5 -1
- package/dist/src/signing/plan.d.ts.map +1 -1
- package/dist/src/signing/plan.js +14 -1
- package/dist/src/signing/quorum.d.ts +77 -0
- package/dist/src/signing/quorum.d.ts.map +1 -0
- package/dist/src/signing/quorum.js +52 -0
- package/dist/src/signing/signers/ecdsa.d.ts +1 -1
- package/dist/src/signing/signers/ecdsa.d.ts.map +1 -1
- package/dist/src/signing/signers/ecdsa.js +8 -0
- package/dist/src/signing/typed-data.d.ts +12 -6
- package/dist/src/signing/typed-data.d.ts.map +1 -1
- package/dist/src/signing/typed-data.js +9 -4
- package/dist/src/signing/types.d.ts +8 -0
- package/dist/src/signing/types.d.ts.map +1 -1
- package/dist/src/smart-sessions/index.d.ts +10 -5
- package/dist/src/smart-sessions/index.d.ts.map +1 -1
- package/dist/src/smart-sessions/index.js +6 -1
- package/dist/src/transactions/intents/sign-transaction.d.ts.map +1 -1
- package/dist/src/transactions/intents/sign-transaction.js +161 -47
- package/dist/src/transactions/user-operations/prepare.d.ts.map +1 -1
- package/dist/src/transactions/user-operations/prepare.js +3 -1
- package/dist/src/transactions/user-operations/validator-account.d.ts.map +1 -1
- package/dist/src/transactions/user-operations/validator-account.js +4 -0
- package/package.json +5 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sign-transaction.d.ts","sourceRoot":"","sources":["../../../../transactions/intents/sign-transaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"sign-transaction.d.ts","sourceRoot":"","sources":["../../../../transactions/intents/sign-transaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAoB/B,OAAO,EAGL,KAAK,yBAAyB,EAC/B,MAAM,wCAAwC,CAAA;AA2B/C,OAAO,KAAK,EACV,qBAAqB,EACrB,cAAc,EACd,YAAY,EACb,MAAM,SAAS,CAAA;AAEhB,wBAAsB,UAAU,CAAC,mBAAmB,EAClD,OAAO,EAAE,qBAAqB,CAAC,mBAAmB,CAAC,EACnD,QAAQ,EAAE,cAAc,CAAC,mBAAmB,CAAC,GAC5C,OAAO,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC,CAsC5C;AAED,wBAAsB,iBAAiB,CAAC,mBAAmB,EACzD,OAAO,EAAE,qBAAqB,CAAC,mBAAmB,CAAC,EACnD,QAAQ,EAAE,cAAc,CAAC,mBAAmB,CAAC,EAC7C,SAAS,EAAE;IACT,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;CACpC,GACA,OAAO,CAAC,yBAAyB,CAAC,CA2EpC;AAED,wBAAsB,cAAc,CAAC,mBAAmB,EACtD,OAAO,EAAE,qBAAqB,CAAC,mBAAmB,CAAC,EACnD,QAAQ,EAAE,cAAc,CAAC,mBAAmB,CAAC,EAC7C,UAAU,EAAE,SAAS,yBAAyB,EAAE,GAC/C,OAAO,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC,CAsD5C"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { IndependentSigningNotSupportedError, InvalidOwnerSigningOptionsError, UnknownOwnerError, } from '../../errors/execution.js';
|
|
2
2
|
import { encodeValidatorId } from '../../modules/validators/multi-factor.js';
|
|
3
|
+
import { buildQuorumMerkleTree, getQuorumMerkleRootSignableHash, } from '../../modules/validators/quorum.js';
|
|
3
4
|
import { createAccountSigningContext, getAccountSignatureEnvelope, getSigningValidatorCodec, getSigningValidatorFactors, } from '../../signing/context.js';
|
|
4
5
|
import { executeSigningPlan } from '../../signing/execute.js';
|
|
6
|
+
import { resolveAccountValidatorSignableHash } from '../../signing/hash.js';
|
|
5
7
|
import { assembleIndependentIntentArtifact, } from '../../signing/intent-plans/independent.js';
|
|
6
8
|
import { createIntentSigningPlan, executeIntentSigning, projectIndependentSigning, } from '../../signing/intent-plans/plan.js';
|
|
7
9
|
import { createValidatorSigningTasks } from '../../signing/plan.js';
|
|
8
|
-
import { resolveAccountTypedDataSigning } from '../../signing/typed-data.js';
|
|
10
|
+
import { resolveAccountTypedDataSigning, } from '../../signing/typed-data.js';
|
|
9
11
|
import { buildSessionIntentPlanInput, createIntentSessionSignerInvoker, } from './session-signing.js';
|
|
10
12
|
export async function signIntent(context, prepared) {
|
|
11
13
|
const runtime = await context.account.forChain(prepared.accountChain);
|
|
@@ -51,11 +53,20 @@ export async function signIntentAsOwner(context, prepared, selection) {
|
|
|
51
53
|
signerInvoker: signing.signerInvoker,
|
|
52
54
|
assembleStage: () => ({}),
|
|
53
55
|
});
|
|
56
|
+
const quorumRootStage = signing.validator.kind === 'quorum' && prepared.signing.origins.length > 1
|
|
57
|
+
? transcript.stages.find(({ stage: materialized }) => materialized.stageId === 'quorum-origins')
|
|
58
|
+
: undefined;
|
|
59
|
+
const quorumRootResult = quorumRootStage
|
|
60
|
+
? Object.entries(quorumRootStage.results).find(([taskId]) => taskId.includes(owner.ownerId))?.[1]
|
|
61
|
+
: undefined;
|
|
54
62
|
const origin = prepared.signing.origins.map((_payload, index) => {
|
|
55
|
-
const stage =
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
63
|
+
const stage = quorumRootStage
|
|
64
|
+
? undefined
|
|
65
|
+
: transcript.stages.find(({ stage: materialized }) => materialized.stageId === `origin-${index}`);
|
|
66
|
+
const result = quorumRootResult ??
|
|
67
|
+
(stage
|
|
68
|
+
? Object.entries(stage.results).find(([taskId]) => taskId.includes(owner.ownerId))?.[1]
|
|
69
|
+
: undefined);
|
|
59
70
|
return independentOriginResult(owner, result);
|
|
60
71
|
});
|
|
61
72
|
const signature = owner.kind === 'ecdsa'
|
|
@@ -241,29 +252,66 @@ function independentOriginResult(owner, result) {
|
|
|
241
252
|
function buildIntentPlanInput(prepared, context) {
|
|
242
253
|
const payloads = {};
|
|
243
254
|
const stages = [];
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
255
|
+
const quorumMerkle = context.validator.kind === 'quorum' && prepared.signing.origins.length > 1
|
|
256
|
+
? buildQuorumMerkleTree(prepared.signing.origins.map((origin) => ({
|
|
257
|
+
account: context.account.address,
|
|
258
|
+
digest: resolveAccountValidatorSignableHash({
|
|
259
|
+
hash: origin.id,
|
|
260
|
+
chain: origin.chain,
|
|
261
|
+
context,
|
|
262
|
+
}),
|
|
263
|
+
})))
|
|
264
|
+
: undefined;
|
|
265
|
+
const quorumRootHash = quorumMerkle
|
|
266
|
+
? getQuorumMerkleRootSignableHash({
|
|
267
|
+
validator: context.validatorCapabilities.compatibilityKey.moduleAddress,
|
|
268
|
+
root: quorumMerkle.root,
|
|
269
|
+
})
|
|
270
|
+
: undefined;
|
|
271
|
+
if (quorumMerkle && quorumRootHash) {
|
|
272
|
+
const firstOrigin = prepared.signing.origins[0];
|
|
273
|
+
const route = {
|
|
274
|
+
material: { kind: 'message', message: { raw: quorumRootHash } },
|
|
275
|
+
payloadKind: 'message',
|
|
276
|
+
ecdsaInvocation: 'ecdsa-sign-message',
|
|
277
|
+
webauthnInvocation: 'webauthn-sign-hash',
|
|
278
|
+
erc7739: { kind: 'none' },
|
|
279
|
+
};
|
|
280
|
+
payloads[firstOrigin.id] = route.material;
|
|
281
|
+
stages.push(quorumMerkleSigningStage({
|
|
282
|
+
origins: prepared.signing.origins,
|
|
283
|
+
payloadId: firstOrigin.id,
|
|
256
284
|
context,
|
|
257
285
|
route,
|
|
286
|
+
proofs: quorumMerkle.operations,
|
|
258
287
|
}));
|
|
259
288
|
}
|
|
289
|
+
else {
|
|
290
|
+
for (const [index, origin] of prepared.signing.origins.entries()) {
|
|
291
|
+
const route = resolveAccountTypedDataSigning({
|
|
292
|
+
typedData: origin.typedData,
|
|
293
|
+
chain: origin.chain,
|
|
294
|
+
context,
|
|
295
|
+
validationHash: origin.id,
|
|
296
|
+
});
|
|
297
|
+
payloads[origin.id] = route.material;
|
|
298
|
+
stages.push(signingStage({
|
|
299
|
+
id: `origin-${index}`,
|
|
300
|
+
payloadId: origin.id,
|
|
301
|
+
chain: origin.chain,
|
|
302
|
+
usage: 'intent-origin',
|
|
303
|
+
context,
|
|
304
|
+
route,
|
|
305
|
+
}));
|
|
306
|
+
}
|
|
307
|
+
}
|
|
260
308
|
const lastOriginIndex = prepared.signing.origins.length - 1;
|
|
261
309
|
stages.push({
|
|
262
310
|
id: 'destination',
|
|
263
311
|
checkpoint: { kind: 'none', id: 'destination:none' },
|
|
264
312
|
priorOutputs: [
|
|
265
313
|
{
|
|
266
|
-
stageId: `origin-${lastOriginIndex}`,
|
|
314
|
+
stageId: quorumMerkle ? 'quorum-origins' : `origin-${lastOriginIndex}`,
|
|
267
315
|
outputId: `origin-${lastOriginIndex}`,
|
|
268
316
|
selection: 'whole',
|
|
269
317
|
},
|
|
@@ -276,7 +324,9 @@ function buildIntentPlanInput(prepared, context) {
|
|
|
276
324
|
usage: 'intent-destination',
|
|
277
325
|
input: {
|
|
278
326
|
kind: 'reuse-artifact',
|
|
279
|
-
stageId:
|
|
327
|
+
stageId: quorumMerkle
|
|
328
|
+
? 'quorum-origins'
|
|
329
|
+
: `origin-${lastOriginIndex}`,
|
|
280
330
|
artifactId: `origin-${lastOriginIndex}`,
|
|
281
331
|
selection: 'whole',
|
|
282
332
|
},
|
|
@@ -293,6 +343,7 @@ function buildIntentPlanInput(prepared, context) {
|
|
|
293
343
|
typedData: target.typedData,
|
|
294
344
|
chain: target.chain,
|
|
295
345
|
context,
|
|
346
|
+
validationHash: target.id,
|
|
296
347
|
});
|
|
297
348
|
payloads[target.id] = route.material;
|
|
298
349
|
stages.push(signingStage({
|
|
@@ -306,34 +357,87 @@ function buildIntentPlanInput(prepared, context) {
|
|
|
306
357
|
}
|
|
307
358
|
return { intent: prepared.signing, stages, payloads };
|
|
308
359
|
}
|
|
360
|
+
function quorumMerkleSigningStage(input) {
|
|
361
|
+
const tasks = createValidatorSigningTasks({
|
|
362
|
+
validator: input.context.validator,
|
|
363
|
+
signerReferences: input.context.signerReferences,
|
|
364
|
+
taskPrefix: 'quorum-root',
|
|
365
|
+
ecdsaInvocation: input.route.ecdsaInvocation,
|
|
366
|
+
webauthnInvocation: input.route.webauthnInvocation,
|
|
367
|
+
selectedSignerIds: input.context.effectiveSigners.signerIds,
|
|
368
|
+
}).map((task) => ({
|
|
369
|
+
...task,
|
|
370
|
+
payload: { source: 'plan-payload', payloadId: input.payloadId },
|
|
371
|
+
}));
|
|
372
|
+
const validatorCodec = getSigningValidatorCodec(input.context, input.route.payloadKind);
|
|
373
|
+
return {
|
|
374
|
+
id: 'quorum-origins',
|
|
375
|
+
checkpoint: { kind: 'none', id: 'quorum-origins:none' },
|
|
376
|
+
priorOutputs: [],
|
|
377
|
+
tasks,
|
|
378
|
+
schedule: [
|
|
379
|
+
{
|
|
380
|
+
id: 'quorum-root:signers',
|
|
381
|
+
execution: 'parallel',
|
|
382
|
+
taskIds: tasks.map(({ id }) => id),
|
|
383
|
+
},
|
|
384
|
+
],
|
|
385
|
+
artifacts: input.origins.map((_, index) => ({
|
|
386
|
+
id: `origin-${index}`,
|
|
387
|
+
usage: 'intent-origin',
|
|
388
|
+
input: { kind: 'task-results', taskIds: tasks.map(({ id }) => id) },
|
|
389
|
+
validatorCodec,
|
|
390
|
+
quorumMerkleProof: input.proofs[index],
|
|
391
|
+
erc7739: { kind: 'none' },
|
|
392
|
+
accountEnvelope: getAccountSignatureEnvelope(input.context),
|
|
393
|
+
erc6492: { kind: 'none' },
|
|
394
|
+
})),
|
|
395
|
+
};
|
|
396
|
+
}
|
|
309
397
|
function signingStage(input) {
|
|
310
398
|
const direct = input.context.account.definition.kind === 'eoa';
|
|
311
|
-
const tasks =
|
|
312
|
-
?
|
|
313
|
-
:
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
399
|
+
const tasks = input.reuseStageId
|
|
400
|
+
? []
|
|
401
|
+
: direct
|
|
402
|
+
? eoaTask(input)
|
|
403
|
+
: createValidatorSigningTasks({
|
|
404
|
+
validator: input.context.validator,
|
|
405
|
+
signerReferences: input.context.signerReferences,
|
|
406
|
+
taskPrefix: input.id,
|
|
407
|
+
ecdsaInvocation: input.route.ecdsaInvocation,
|
|
408
|
+
webauthnInvocation: input.route.webauthnInvocation,
|
|
409
|
+
selectedSignerIds: input.context.effectiveSigners.signerIds,
|
|
410
|
+
}).map((task) => ({
|
|
411
|
+
...task,
|
|
412
|
+
chain: input.chain,
|
|
413
|
+
payload: { source: 'plan-payload', payloadId: input.payloadId },
|
|
414
|
+
}));
|
|
325
415
|
const artifact = {
|
|
326
416
|
id: input.id,
|
|
327
417
|
usage: input.usage,
|
|
328
|
-
input:
|
|
329
|
-
|
|
418
|
+
input: input.reuseStageId
|
|
419
|
+
? {
|
|
420
|
+
kind: 'reuse-artifact',
|
|
421
|
+
stageId: input.reuseStageId,
|
|
422
|
+
artifactId: input.reuseStageId,
|
|
423
|
+
selection: 'whole',
|
|
424
|
+
}
|
|
425
|
+
: { kind: 'task-results', taskIds: tasks.map(({ id }) => id) },
|
|
426
|
+
validatorCodec: input.reuseStageId
|
|
330
427
|
? { kind: 'none' }
|
|
331
|
-
:
|
|
332
|
-
|
|
428
|
+
: direct
|
|
429
|
+
? { kind: 'none' }
|
|
430
|
+
: getSigningValidatorCodec(input.context, input.route.payloadKind),
|
|
431
|
+
...(!direct &&
|
|
432
|
+
!input.reuseStageId &&
|
|
433
|
+
input.context.validator.kind === 'multi-factor'
|
|
333
434
|
? {
|
|
334
435
|
validatorFactors: getSigningValidatorFactors(input.context, input.route.payloadKind),
|
|
335
436
|
}
|
|
336
437
|
: {}),
|
|
438
|
+
...(input.quorumMerkleProof
|
|
439
|
+
? { quorumMerkleProof: input.quorumMerkleProof }
|
|
440
|
+
: {}),
|
|
337
441
|
erc7739: input.route.erc7739,
|
|
338
442
|
accountEnvelope: direct
|
|
339
443
|
? { kind: 'none' }
|
|
@@ -343,17 +447,27 @@ function signingStage(input) {
|
|
|
343
447
|
return {
|
|
344
448
|
id: input.id,
|
|
345
449
|
checkpoint: { kind: 'none', id: `${input.id}:none` },
|
|
346
|
-
priorOutputs:
|
|
450
|
+
priorOutputs: input.reuseStageId
|
|
451
|
+
? [
|
|
452
|
+
{
|
|
453
|
+
stageId: input.reuseStageId,
|
|
454
|
+
outputId: input.reuseStageId,
|
|
455
|
+
selection: 'whole',
|
|
456
|
+
},
|
|
457
|
+
]
|
|
458
|
+
: [],
|
|
347
459
|
tasks,
|
|
348
|
-
schedule:
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
: '
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
460
|
+
schedule: tasks.length === 0
|
|
461
|
+
? []
|
|
462
|
+
: [
|
|
463
|
+
{
|
|
464
|
+
id: `${input.id}:signers`,
|
|
465
|
+
execution: input.context.validator.kind === 'multi-factor'
|
|
466
|
+
? 'serial'
|
|
467
|
+
: 'parallel',
|
|
468
|
+
taskIds: tasks.map(({ id }) => id),
|
|
469
|
+
},
|
|
470
|
+
],
|
|
357
471
|
artifacts: [artifact],
|
|
358
472
|
};
|
|
359
473
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepare.d.ts","sourceRoot":"","sources":["../../../../transactions/user-operations/prepare.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAI/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAI3D,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAA;AAK9B,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAA;AAGjF,OAAO,KAAK,EACV,qBAAqB,EACrB,kBAAkB,EAClB,4BAA4B,EAC7B,MAAM,SAAS,CAAA;AAGhB,wBAAsB,oBAAoB,CAAC,mBAAmB,EAC5D,OAAO,EAAE,4BAA4B,CAAC,mBAAmB,CAAC,EAC1D,KAAK,EAAE,kBAAkB,CAAC,mBAAmB,CAAC,GAC7C,OAAO,CAAC,qBAAqB,CAAC,mBAAmB,CAAC,CAAC,CAgGrD;AAiBD;;;GAGG;AACH,wBAAgB,kCAAkC,CAChD,cAAc,EAAE,cAAc,EAC9B,KAAK,EAAE,iBAAiB,EACxB,IAAI,EAAE,GAAG,GACR,6BAA6B,
|
|
1
|
+
{"version":3,"file":"prepare.d.ts","sourceRoot":"","sources":["../../../../transactions/user-operations/prepare.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAI/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAI3D,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAA;AAK9B,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAA;AAGjF,OAAO,KAAK,EACV,qBAAqB,EACrB,kBAAkB,EAClB,4BAA4B,EAC7B,MAAM,SAAS,CAAA;AAGhB,wBAAsB,oBAAoB,CAAC,mBAAmB,EAC5D,OAAO,EAAE,4BAA4B,CAAC,mBAAmB,CAAC,EAC1D,KAAK,EAAE,kBAAkB,CAAC,mBAAmB,CAAC,GAC7C,OAAO,CAAC,qBAAqB,CAAC,mBAAmB,CAAC,CAAC,CAgGrD;AAiBD;;;GAGG;AACH,wBAAgB,kCAAkC,CAChD,cAAc,EAAE,cAAc,EAC9B,KAAK,EAAE,iBAAiB,EACxB,IAAI,EAAE,GAAG,GACR,6BAA6B,CAsB/B"}
|
|
@@ -114,14 +114,16 @@ function defaultUserOperationValidator(construction) {
|
|
|
114
114
|
* preparation and reconstruction so both derive an identical signing plan.
|
|
115
115
|
*/
|
|
116
116
|
export function buildUserOperationSigningPlanInput(signingContext, chain, hash) {
|
|
117
|
+
const selectedSignerIds = signingContext.effectiveSigners.signerIds;
|
|
117
118
|
const tasks = createValidatorSigningTasks({
|
|
118
119
|
validator: signingContext.validator,
|
|
119
120
|
signerReferences: signingContext.signerReferences,
|
|
120
121
|
taskPrefix: 'user-operation',
|
|
121
122
|
ecdsaInvocation: 'ecdsa-sign-message',
|
|
122
123
|
webauthnInvocation: 'webauthn-sign-hash',
|
|
124
|
+
selectedSignerIds,
|
|
123
125
|
});
|
|
124
|
-
const topology = signingTopology(signingContext.validator);
|
|
126
|
+
const topology = signingTopology(signingContext.validator, selectedSignerIds);
|
|
125
127
|
return {
|
|
126
128
|
hash,
|
|
127
129
|
chain,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validator-account.d.ts","sourceRoot":"","sources":["../../../../transactions/user-operations/validator-account.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAC/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"validator-account.d.ts","sourceRoot":"","sources":["../../../../transactions/user-operations/validator-account.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAC/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAS5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAE3D,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,cAAc,EACvB,OAAO,EAAE,cAAc,GACtB,GAAG,CA0BL"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { encodeMultiFactorContribution } from '../../modules/validators/multi-factor.js';
|
|
2
2
|
import { encodeOwnableMockSignature } from '../../modules/validators/ownable.js';
|
|
3
|
+
import { encodeQuorumMockSignature } from '../../modules/validators/quorum.js';
|
|
3
4
|
import { resolveValidator } from '../../modules/validators/resolve.js';
|
|
4
5
|
import { WEBAUTHN_MOCK_SIGNATURE, webauthnStatelessMockSignature, } from '../../modules/validators/webauthn.js';
|
|
5
6
|
export function getUserOperationStubSignature(runtime, context) {
|
|
@@ -8,6 +9,9 @@ export function getUserOperationStubSignature(runtime, context) {
|
|
|
8
9
|
}
|
|
9
10
|
if (context.validator.kind === 'passkey')
|
|
10
11
|
return WEBAUTHN_MOCK_SIGNATURE;
|
|
12
|
+
if (context.validator.kind === 'quorum') {
|
|
13
|
+
return encodeQuorumMockSignature(context.validator);
|
|
14
|
+
}
|
|
11
15
|
if (context.validator.kind === 'multi-factor') {
|
|
12
16
|
return encodeMultiFactorContribution({
|
|
13
17
|
factorOrder: context.validator.validators.map(({ id }) => id),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rhinestone/sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"description": "End-to-end chain abstraction and modularity toolkit",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Rhinestone",
|
|
@@ -43,6 +43,10 @@
|
|
|
43
43
|
"types": "./dist/src/signing/passkeys.d.ts",
|
|
44
44
|
"import": "./dist/src/signing/passkeys.js"
|
|
45
45
|
},
|
|
46
|
+
"./signing/quorum": {
|
|
47
|
+
"types": "./dist/src/signing/quorum.d.ts",
|
|
48
|
+
"import": "./dist/src/signing/quorum.js"
|
|
49
|
+
},
|
|
46
50
|
"./actions/smart-sessions": {
|
|
47
51
|
"types": "./dist/src/actions/smart-sessions.d.ts",
|
|
48
52
|
"import": "./dist/src/actions/smart-sessions.js"
|