@charterlabs/rhinestone-sdk 0.3.0 → 0.3.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/README.md +31 -200
- package/dist/src/accounts/error.d.ts +8 -1
- package/dist/src/accounts/error.d.ts.map +1 -1
- package/dist/src/accounts/error.js +10 -1
- package/dist/src/accounts/index.d.ts +11 -10
- package/dist/src/accounts/index.d.ts.map +1 -1
- package/dist/src/accounts/index.js +79 -50
- package/dist/src/accounts/kernel.d.ts +3 -5
- package/dist/src/accounts/kernel.d.ts.map +1 -1
- package/dist/src/accounts/kernel.js +8 -17
- package/dist/src/accounts/kernel.test.js +10 -3
- package/dist/src/accounts/nexus.d.ts +3 -5
- package/dist/src/accounts/nexus.d.ts.map +1 -1
- package/dist/src/accounts/nexus.js +108 -57
- package/dist/src/accounts/nexus.test.js +10 -3
- package/dist/src/accounts/passport.d.ts +4 -7
- package/dist/src/accounts/passport.d.ts.map +1 -1
- package/dist/src/accounts/passport.js +0 -91
- package/dist/src/accounts/safe.d.ts +9 -4
- package/dist/src/accounts/safe.d.ts.map +1 -1
- package/dist/src/accounts/safe.js +108 -38
- package/dist/src/accounts/safe.test.js +10 -3
- package/dist/src/accounts/signing/common.d.ts +3 -3
- package/dist/src/accounts/signing/common.d.ts.map +1 -1
- package/dist/src/accounts/signing/common.js +29 -5
- package/dist/src/accounts/signing/message.js +2 -2
- package/dist/src/accounts/signing/typedData.d.ts.map +1 -1
- package/dist/src/accounts/signing/typedData.js +3 -3
- package/dist/src/accounts/startale.d.ts +2 -4
- package/dist/src/accounts/startale.d.ts.map +1 -1
- package/dist/src/accounts/startale.js +0 -4
- package/dist/src/accounts/utils.d.ts.map +1 -1
- package/dist/src/accounts/utils.js +10 -3
- package/dist/src/accounts/walletClient.d.ts.map +1 -1
- package/dist/src/accounts/walletClient.js +6 -0
- package/dist/src/actions/compact.d.ts +4 -2
- package/dist/src/actions/compact.d.ts.map +1 -1
- package/dist/src/actions/compact.js +4 -1
- package/dist/src/actions/deployment.d.ts +19 -0
- package/dist/src/actions/deployment.d.ts.map +1 -0
- package/dist/src/actions/deployment.js +78 -0
- package/dist/src/actions/index.d.ts +3 -1
- package/dist/src/actions/index.d.ts.map +1 -1
- package/dist/src/actions/index.js +12 -0
- package/dist/src/actions/smart-sessions.d.ts +17 -8
- package/dist/src/actions/smart-sessions.d.ts.map +1 -1
- package/dist/src/actions/smart-sessions.js +40 -4
- package/dist/src/errors/index.d.ts +3 -3
- package/dist/src/errors/index.d.ts.map +1 -1
- package/dist/src/errors/index.js +3 -1
- package/dist/src/execution/compact.d.ts +15 -18
- package/dist/src/execution/compact.d.ts.map +1 -1
- package/dist/src/execution/compact.js +15 -17
- package/dist/src/execution/error.d.ts +2 -8
- package/dist/src/execution/error.d.ts.map +1 -1
- package/dist/src/execution/error.js +1 -10
- package/dist/src/execution/index.d.ts +6 -6
- package/dist/src/execution/index.d.ts.map +1 -1
- package/dist/src/execution/index.js +22 -28
- package/dist/src/execution/permit2.d.ts +12 -17
- package/dist/src/execution/permit2.d.ts.map +1 -1
- package/dist/src/execution/permit2.js +10 -16
- package/dist/src/execution/singleChainOps.d.ts +15 -3
- package/dist/src/execution/singleChainOps.d.ts.map +1 -1
- package/dist/src/execution/singleChainOps.js +17 -3
- package/dist/src/execution/utils.d.ts +36 -12
- package/dist/src/execution/utils.d.ts.map +1 -1
- package/dist/src/execution/utils.js +180 -133
- package/dist/src/index.d.ts +26 -8
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +49 -16
- package/dist/src/modules/abi/smart-session-emissary.d.ts +696 -0
- package/dist/src/modules/abi/smart-session-emissary.d.ts.map +1 -0
- package/dist/src/modules/abi/smart-session-emissary.js +565 -0
- package/dist/src/modules/chain-abstraction.d.ts +5 -0
- package/dist/src/modules/chain-abstraction.d.ts.map +1 -0
- package/dist/src/modules/chain-abstraction.js +7 -0
- package/dist/src/modules/common.d.ts +7 -1
- package/dist/src/modules/common.d.ts.map +1 -1
- package/dist/src/modules/index.d.ts +3 -9
- package/dist/src/modules/index.d.ts.map +1 -1
- package/dist/src/modules/index.js +11 -8
- package/dist/src/modules/index.test.js +3 -9
- package/dist/src/modules/legacy.d.ts +10 -0
- package/dist/src/modules/legacy.d.ts.map +1 -0
- package/dist/src/modules/legacy.js +65 -0
- package/dist/src/modules/validators/core.d.ts +2 -1
- package/dist/src/modules/validators/core.d.ts.map +1 -1
- package/dist/src/modules/validators/core.js +4 -1
- package/dist/src/modules/validators/index.d.ts +2 -2
- package/dist/src/modules/validators/index.d.ts.map +1 -1
- package/dist/src/modules/validators/index.js +1 -6
- package/dist/src/modules/validators/smart-sessions.d.ts +112 -23
- package/dist/src/modules/validators/smart-sessions.d.ts.map +1 -1
- package/dist/src/modules/validators/smart-sessions.js +426 -301
- package/dist/src/orchestrator/client.d.ts +3 -4
- package/dist/src/orchestrator/client.d.ts.map +1 -1
- package/dist/src/orchestrator/client.js +49 -53
- package/dist/src/orchestrator/error.d.ts +11 -1
- package/dist/src/orchestrator/error.d.ts.map +1 -1
- package/dist/src/orchestrator/error.js +16 -1
- package/dist/src/orchestrator/index.d.ts +5 -5
- package/dist/src/orchestrator/index.d.ts.map +1 -1
- package/dist/src/orchestrator/index.js +3 -1
- package/dist/src/orchestrator/registry.d.ts +3 -2
- package/dist/src/orchestrator/registry.d.ts.map +1 -1
- package/dist/src/orchestrator/registry.js +15 -14
- package/dist/src/orchestrator/registry.test.js +18 -1
- package/dist/src/orchestrator/types.d.ts +33 -8
- package/dist/src/orchestrator/types.d.ts.map +1 -1
- package/dist/src/orchestrator/types.js +15 -1
- package/dist/src/types.d.ts +57 -28
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/index.d.ts +14 -2
- package/dist/src/utils/index.d.ts.map +1 -1
- package/dist/src/utils/index.js +46 -4
- package/dist/test/utils/utils.d.ts +5 -0
- package/dist/test/utils/utils.d.ts.map +1 -0
- package/dist/test/utils/utils.js +20 -0
- package/package.json +33 -3
- package/dist/src/execution/smart-session.d.ts +0 -13
- package/dist/src/execution/smart-session.d.ts.map +0 -1
- package/dist/src/execution/smart-session.js +0 -178
- package/dist/src/modules/omni-account.d.ts +0 -8
- package/dist/src/modules/omni-account.d.ts.map +0 -1
- package/dist/src/modules/omni-account.js +0 -13
- package/dist/src/modules/validators/smart-sessions.test.d.ts +0 -2
- package/dist/src/modules/validators/smart-sessions.test.d.ts.map +0 -1
- package/dist/src/modules/validators/smart-sessions.test.js +0 -222
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.prepareTransaction = prepareTransaction;
|
|
4
|
+
exports.getTransactionMessages = getTransactionMessages;
|
|
4
5
|
exports.signTransaction = signTransaction;
|
|
5
6
|
exports.signAuthorizations = signAuthorizations;
|
|
6
7
|
exports.signAuthorizationsInternal = signAuthorizationsInternal;
|
|
@@ -18,6 +19,7 @@ exports.getValidatorAccount = getValidatorAccount;
|
|
|
18
19
|
exports.parseCalls = parseCalls;
|
|
19
20
|
exports.getTokenRequests = getTokenRequests;
|
|
20
21
|
exports.resolveCallInputs = resolveCallInputs;
|
|
22
|
+
exports.getIntentAccount = getIntentAccount;
|
|
21
23
|
const viem_1 = require("viem");
|
|
22
24
|
const account_abstraction_1 = require("viem/account-abstraction");
|
|
23
25
|
const erc7739_1 = require("viem/experimental/erc7739");
|
|
@@ -29,6 +31,7 @@ const core_1 = require("../modules/validators/core");
|
|
|
29
31
|
const orchestrator_1 = require("../orchestrator");
|
|
30
32
|
const consts_1 = require("../orchestrator/consts");
|
|
31
33
|
const registry_1 = require("../orchestrator/registry");
|
|
34
|
+
const types_1 = require("../orchestrator/types");
|
|
32
35
|
const compact_1 = require("./compact");
|
|
33
36
|
const error_1 = require("./error");
|
|
34
37
|
const permit2_1 = require("./permit2");
|
|
@@ -36,11 +39,11 @@ const singleChainOps_1 = require("./singleChainOps");
|
|
|
36
39
|
async function prepareTransaction(config, transaction) {
|
|
37
40
|
const { sourceChains, targetChain, tokenRequests, signers, sponsored, eip7702InitSignature, settlementLayers, sourceAssets, feeAsset, lockFunds, account, recipient, } = getTransactionParams(transaction);
|
|
38
41
|
const accountAddress = (0, accounts_1.getAddress)(config);
|
|
39
|
-
const isUserOpSigner = signers?.type === 'guardians'
|
|
42
|
+
const isUserOpSigner = signers?.type === 'guardians';
|
|
40
43
|
if (isUserOpSigner) {
|
|
41
44
|
throw new error_1.SignerNotSupportedError();
|
|
42
45
|
}
|
|
43
|
-
const intentRoute = await prepareTransactionAsIntent(config, sourceChains, targetChain, await resolveCallInputs(transaction.calls, config, targetChain, accountAddress), transaction.gasLimit, tokenRequests, recipient,
|
|
46
|
+
const intentRoute = await prepareTransactionAsIntent(config, sourceChains, targetChain, await resolveCallInputs(transaction.calls, config, targetChain, accountAddress), transaction.gasLimit, tokenRequests, recipient, sponsored, eip7702InitSignature, settlementLayers, sourceAssets, feeAsset, lockFunds, account, signers);
|
|
44
47
|
return {
|
|
45
48
|
intentRoute,
|
|
46
49
|
transaction,
|
|
@@ -78,10 +81,16 @@ async function resolveCallInputs(inputs, config, chain, accountAddress) {
|
|
|
78
81
|
}
|
|
79
82
|
return resolved;
|
|
80
83
|
}
|
|
84
|
+
function getTransactionMessages(config, preparedTransaction) {
|
|
85
|
+
return getIntentMessages(config, preparedTransaction.intentRoute.intentOp);
|
|
86
|
+
}
|
|
81
87
|
async function signTransaction(config, preparedTransaction) {
|
|
82
|
-
const {
|
|
88
|
+
const { signers } = getTransactionParams(preparedTransaction.transaction);
|
|
83
89
|
const intentRoute = preparedTransaction.intentRoute;
|
|
84
|
-
const
|
|
90
|
+
const targetChain = 'targetChain' in preparedTransaction.transaction
|
|
91
|
+
? preparedTransaction.transaction.targetChain
|
|
92
|
+
: preparedTransaction.transaction.chain;
|
|
93
|
+
const { originSignatures, destinationSignature } = await signIntent(config, intentRoute.intentOp, targetChain, signers);
|
|
85
94
|
return {
|
|
86
95
|
intentRoute,
|
|
87
96
|
transaction: preparedTransaction.transaction,
|
|
@@ -113,20 +122,20 @@ async function signMessage(config, message, chain, signers) {
|
|
|
113
122
|
const ownerValidator = (0, validators_1.getOwnerValidator)(config);
|
|
114
123
|
const isRoot = validator.address === ownerValidator.address;
|
|
115
124
|
const hash = (0, viem_1.hashMessage)(message);
|
|
116
|
-
const signature = await (0, accounts_1.
|
|
125
|
+
const signature = await (0, accounts_1.getEip1271Signature)(config, signers, chain, {
|
|
117
126
|
address: validator.address,
|
|
118
127
|
isRoot,
|
|
119
128
|
}, hash);
|
|
120
129
|
return await (0, accounts_1.toErc6492Signature)(config, signature, chain);
|
|
121
130
|
}
|
|
122
|
-
async function signTypedData(config, parameters, chain, signers) {
|
|
131
|
+
async function signTypedData(config, parameters, chain, signers, options) {
|
|
123
132
|
const validator = getValidator(config, signers);
|
|
124
133
|
if (!validator) {
|
|
125
134
|
throw new Error('Validator not available');
|
|
126
135
|
}
|
|
127
136
|
const ownerValidator = (0, validators_1.getOwnerValidator)(config);
|
|
128
137
|
const isRoot = validator.address === ownerValidator.address;
|
|
129
|
-
if (signers?.type === '
|
|
138
|
+
if (signers?.type === 'experimental_session') {
|
|
130
139
|
return await signTypedDataWithSession(config, chain, {
|
|
131
140
|
address: validator.address,
|
|
132
141
|
isRoot,
|
|
@@ -136,7 +145,10 @@ async function signTypedData(config, parameters, chain, signers) {
|
|
|
136
145
|
address: validator.address,
|
|
137
146
|
isRoot,
|
|
138
147
|
}, parameters);
|
|
139
|
-
|
|
148
|
+
if (!options?.skipErc6492) {
|
|
149
|
+
return await (0, accounts_1.toErc6492Signature)(config, signature, chain);
|
|
150
|
+
}
|
|
151
|
+
return signature;
|
|
140
152
|
}
|
|
141
153
|
async function signTypedDataWithSession(config, chain, validator, signers, parameters) {
|
|
142
154
|
const { name, version, chainId, verifyingContract, salt } = (0, accounts_1.getEip712Domain)(config, chain);
|
|
@@ -264,7 +276,9 @@ function getTokenRequests(sourceChains, targetChain, initialTokenRequests, settl
|
|
|
264
276
|
amount: 1n,
|
|
265
277
|
};
|
|
266
278
|
const isSameChain = (settlementLayers?.length === 1 && settlementLayers[0] === 'SAME_CHAIN') ||
|
|
267
|
-
(sourceChains
|
|
279
|
+
(sourceChains &&
|
|
280
|
+
sourceChains.length === 1 &&
|
|
281
|
+
sourceChains[0].id === targetChain.id);
|
|
268
282
|
const tokenRequests = !initialTokenRequests || initialTokenRequests.length === 0
|
|
269
283
|
? isSameChain
|
|
270
284
|
? []
|
|
@@ -298,23 +312,28 @@ async function prepareTransactionAsUserOp(config, chain, callInputs, signers, ga
|
|
|
298
312
|
}),
|
|
299
313
|
};
|
|
300
314
|
}
|
|
301
|
-
|
|
302
|
-
if (
|
|
303
|
-
|
|
304
|
-
throw new error_1.CallsNotSupportedError();
|
|
305
|
-
}
|
|
315
|
+
function getAccountType(accountConfig) {
|
|
316
|
+
if (accountConfig?.type === 'eoa') {
|
|
317
|
+
return 'EOA';
|
|
306
318
|
}
|
|
319
|
+
else {
|
|
320
|
+
return 'ERC7579';
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
function getIntentAccount(config, eip7702InitSignature, account) {
|
|
324
|
+
const accountAddress = (0, accounts_1.getAddress)(config);
|
|
325
|
+
const accountType = getAccountType(config.account);
|
|
326
|
+
const { setupOps, delegations } = getSetupOperationsAndDelegations(config, accountAddress, eip7702InitSignature);
|
|
327
|
+
return {
|
|
328
|
+
address: accountAddress,
|
|
329
|
+
accountType: accountType,
|
|
330
|
+
setupOps: account?.setupOps ?? setupOps,
|
|
331
|
+
delegations,
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
async function prepareTransactionAsIntent(config, sourceChains, targetChain, callInputs, gasLimit, tokenRequests, recipientInput, sponsored, eip7702InitSignature, settlementLayers, sourceAssets, feeAsset, lockFunds, account, signers) {
|
|
307
335
|
const calls = parseCalls(callInputs, targetChain.id);
|
|
308
336
|
const accountAccessList = createAccountAccessList(sourceChains, sourceAssets);
|
|
309
|
-
const { setupOps, delegations } = getSetupOperationsAndDelegations(config, accountAddress, eip7702InitSignature);
|
|
310
|
-
function getAccountType(accountConfig) {
|
|
311
|
-
if (accountConfig?.type === 'eoa') {
|
|
312
|
-
return 'EOA';
|
|
313
|
-
}
|
|
314
|
-
else {
|
|
315
|
-
return 'ERC7579';
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
337
|
function getRecipient(recipient) {
|
|
319
338
|
if (typeof recipient === 'string') {
|
|
320
339
|
// Passed as an address, assume it's an EOA
|
|
@@ -325,28 +344,16 @@ async function prepareTransactionAsIntent(config, sourceChains, targetChain, cal
|
|
|
325
344
|
delegations: undefined,
|
|
326
345
|
};
|
|
327
346
|
}
|
|
328
|
-
|
|
329
|
-
const recipientAccountType = recipient
|
|
330
|
-
? getAccountType(recipient.account)
|
|
331
|
-
: undefined;
|
|
332
|
-
const { setupOps: recipientSetupOps, delegations: recipientDelegations } = recipient && recipientAddress
|
|
333
|
-
? getSetupOperationsAndDelegations(recipient, recipientAddress, eip7702InitSignature)
|
|
334
|
-
: {
|
|
335
|
-
setupOps: [],
|
|
336
|
-
delegations: {},
|
|
337
|
-
};
|
|
338
|
-
if (!recipientAddress || !recipientAccountType) {
|
|
347
|
+
if (!recipient) {
|
|
339
348
|
return undefined;
|
|
340
349
|
}
|
|
341
|
-
return
|
|
342
|
-
address: recipientAddress,
|
|
343
|
-
accountType: recipientAccountType,
|
|
344
|
-
setupOps: recipientSetupOps,
|
|
345
|
-
delegations: recipientDelegations,
|
|
346
|
-
};
|
|
350
|
+
return getIntentAccount(recipient, eip7702InitSignature, account);
|
|
347
351
|
}
|
|
348
|
-
const
|
|
352
|
+
const intentAccount = getIntentAccount(config, eip7702InitSignature, account);
|
|
349
353
|
const recipient = getRecipient(recipientInput);
|
|
354
|
+
const signatureMode = signers?.type === 'experimental_session'
|
|
355
|
+
? types_1.SIG_MODE_EMISSARY_EXECUTION_ERC1271
|
|
356
|
+
: types_1.SIG_MODE_ERC1271_EMISSARY;
|
|
350
357
|
const metaIntent = {
|
|
351
358
|
destinationChainId: targetChain.id,
|
|
352
359
|
tokenRequests: tokenRequests.map((tokenRequest) => ({
|
|
@@ -354,55 +361,49 @@ async function prepareTransactionAsIntent(config, sourceChains, targetChain, cal
|
|
|
354
361
|
amount: tokenRequest.amount,
|
|
355
362
|
})),
|
|
356
363
|
recipient,
|
|
357
|
-
account:
|
|
358
|
-
|
|
359
|
-
accountType: accountType,
|
|
360
|
-
setupOps: account?.setupOps ?? setupOps,
|
|
361
|
-
delegations,
|
|
362
|
-
},
|
|
363
|
-
destinationExecutions: calls.map((call) => ({
|
|
364
|
-
to: call.to,
|
|
365
|
-
value: call.value.toString(),
|
|
366
|
-
data: call.data,
|
|
367
|
-
})),
|
|
364
|
+
account: intentAccount,
|
|
365
|
+
destinationExecutions: calls,
|
|
368
366
|
destinationGasUnits: gasLimit,
|
|
369
367
|
accountAccessList,
|
|
370
368
|
options: {
|
|
371
369
|
topupCompact: lockFunds ?? false,
|
|
372
370
|
feeToken: feeAsset,
|
|
373
|
-
sponsorSettings:
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
371
|
+
sponsorSettings: sponsored
|
|
372
|
+
? typeof sponsored === 'object'
|
|
373
|
+
? {
|
|
374
|
+
gasSponsored: sponsored.gas,
|
|
375
|
+
bridgeFeesSponsored: sponsored.bridging,
|
|
376
|
+
swapFeesSponsored: sponsored.swaps,
|
|
377
|
+
}
|
|
378
|
+
: {
|
|
379
|
+
gasSponsored: sponsored,
|
|
380
|
+
bridgeFeesSponsored: sponsored,
|
|
381
|
+
swapFeesSponsored: sponsored,
|
|
382
|
+
}
|
|
383
|
+
: undefined,
|
|
378
384
|
settlementLayers,
|
|
385
|
+
signatureMode,
|
|
379
386
|
},
|
|
380
387
|
};
|
|
381
388
|
const orchestrator = getOrchestratorByChain(targetChain.id, config.apiKey, config.endpointUrl);
|
|
382
389
|
const intentRoute = await orchestrator.getIntentRoute(metaIntent);
|
|
383
390
|
return intentRoute;
|
|
384
391
|
}
|
|
385
|
-
async function signIntent(config,
|
|
392
|
+
async function signIntent(config, intentOp, targetChain, signers) {
|
|
393
|
+
const { origin, destination } = getIntentMessages(config, intentOp);
|
|
386
394
|
if (config.account?.type === 'eoa') {
|
|
395
|
+
const eoa = config.eoa;
|
|
396
|
+
if (!eoa) {
|
|
397
|
+
throw new accounts_1.EoaAccountMustHaveAccountError();
|
|
398
|
+
}
|
|
387
399
|
const originSignatures = [];
|
|
388
|
-
for (const
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
originSignatures.push(await config.eoa.signTypedData(typedData));
|
|
393
|
-
}
|
|
394
|
-
else if (config.eoa?.sign) {
|
|
395
|
-
digest = (0, compact_1.getPermit2Digest)(element, BigInt(intentOp.nonce), BigInt(intentOp.expires));
|
|
396
|
-
originSignatures.push(await config.eoa.sign({ hash: digest }));
|
|
397
|
-
}
|
|
398
|
-
else if (config.eoa?.signMessage) {
|
|
399
|
-
digest = (0, compact_1.getPermit2Digest)(element, BigInt(intentOp.nonce), BigInt(intentOp.expires));
|
|
400
|
-
originSignatures.push(await config.eoa.signMessage({
|
|
401
|
-
message: { raw: digest },
|
|
402
|
-
}));
|
|
400
|
+
for (const typedData of origin) {
|
|
401
|
+
if (eoa.signTypedData) {
|
|
402
|
+
const signature = await eoa.signTypedData(typedData);
|
|
403
|
+
originSignatures.push(signature);
|
|
403
404
|
}
|
|
404
405
|
else {
|
|
405
|
-
throw new accounts_1.EoaSigningMethodNotConfiguredError('signTypedData
|
|
406
|
+
throw new accounts_1.EoaSigningMethodNotConfiguredError('signTypedData');
|
|
406
407
|
}
|
|
407
408
|
}
|
|
408
409
|
const destinationSignature = originSignatures.at(-1);
|
|
@@ -417,70 +418,106 @@ async function signIntent(config, targetChain, intentOp, signers) {
|
|
|
417
418
|
}
|
|
418
419
|
const ownerValidator = (0, validators_1.getOwnerValidator)(config);
|
|
419
420
|
const isRoot = validator.address === ownerValidator.address;
|
|
420
|
-
const signatures = await getIntentSignature(config, intentOp, signers, targetChain, validator, isRoot);
|
|
421
|
-
return {
|
|
422
|
-
originSignatures: signatures.originSignatures,
|
|
423
|
-
destinationSignature: signatures.destinationSignature,
|
|
424
|
-
};
|
|
425
|
-
}
|
|
426
|
-
async function getIntentSignature(config, intentOp, signers, targetChain, validator, isRoot) {
|
|
427
|
-
const withPermit2 = intentOp.elements.some((element) => element.mandate.qualifier.settlementContext?.fundingMethod === 'PERMIT2');
|
|
428
|
-
const withIntentExecutorOps = intentOp.elements.some((element) => element.mandate.qualifier.settlementContext.settlementLayer ===
|
|
429
|
-
'INTENT_EXECUTOR');
|
|
430
|
-
if (withIntentExecutorOps) {
|
|
431
|
-
const signature = await getSingleChainOpsSignature(config, intentOp, signers, targetChain, validator, isRoot);
|
|
432
|
-
return signature;
|
|
433
|
-
}
|
|
434
|
-
if (withPermit2) {
|
|
435
|
-
return await getPermit2Signatures(config, intentOp, signers, targetChain, validator, isRoot);
|
|
436
|
-
}
|
|
437
|
-
const signature = await getCompactSignature(config, intentOp, signers, targetChain, validator, isRoot);
|
|
438
|
-
return {
|
|
439
|
-
originSignatures: Array(intentOp.elements.length).fill(signature),
|
|
440
|
-
destinationSignature: signature,
|
|
441
|
-
};
|
|
442
|
-
}
|
|
443
|
-
async function getSingleChainOpsSignature(config, intentOp, signers, targetChain, validator, isRoot) {
|
|
444
|
-
const address = (0, accounts_1.getAddress)(config);
|
|
445
|
-
const intentExecutor = (0, modules_1.getIntentExecutor)(config);
|
|
446
421
|
const originSignatures = [];
|
|
447
|
-
for (const
|
|
448
|
-
const
|
|
449
|
-
|
|
422
|
+
for (const typedData of origin) {
|
|
423
|
+
const chain = (0, registry_1.getChainById)(typedData.domain?.chainId);
|
|
424
|
+
// For same chain transactions, we need to modify the origin signers
|
|
425
|
+
// Specifically, we need to remove the enable data in this case
|
|
426
|
+
const matchesTargetChain = chain.id === targetChain.id;
|
|
427
|
+
const originSigners = signers?.type === 'experimental_session'
|
|
428
|
+
? {
|
|
429
|
+
type: 'experimental_session',
|
|
430
|
+
session: signers.session,
|
|
431
|
+
verifyExecutions: matchesTargetChain
|
|
432
|
+
? signers.verifyExecutions
|
|
433
|
+
: undefined,
|
|
434
|
+
enableData: matchesTargetChain ? signers.enableData : undefined,
|
|
435
|
+
}
|
|
436
|
+
: signers;
|
|
437
|
+
const signature = await signIntentTypedData(config, originSigners, validator, isRoot, typedData, chain);
|
|
450
438
|
originSignatures.push(signature);
|
|
451
439
|
}
|
|
452
|
-
const destinationSignature = originSignatures
|
|
440
|
+
const destinationSignature = await getDestinationSignature(config, signers, validator, isRoot, targetChain, destination, originSignatures);
|
|
453
441
|
return {
|
|
454
442
|
originSignatures,
|
|
455
443
|
destinationSignature,
|
|
456
444
|
};
|
|
457
445
|
}
|
|
458
|
-
async function
|
|
459
|
-
|
|
446
|
+
async function getDestinationSignature(config, signers, validator, isRoot, targetChain, destination, originSignatures) {
|
|
447
|
+
// For smart sessions, we need to provide a separate destination signature for the target chain
|
|
448
|
+
if (signers?.type === 'experimental_session') {
|
|
449
|
+
const destinationChain = (0, registry_1.getChainById)(targetChain.id);
|
|
450
|
+
const destinationSignatures = await signIntentTypedData(config, signers, validator, isRoot, destination, destinationChain);
|
|
451
|
+
return typeof destinationSignatures === 'object'
|
|
452
|
+
? destinationSignatures.preClaimSig
|
|
453
|
+
: (destinationSignatures ?? '0x');
|
|
454
|
+
}
|
|
455
|
+
const lastOriginSignature = originSignatures.at(-1);
|
|
456
|
+
return typeof lastOriginSignature === 'object'
|
|
457
|
+
? lastOriginSignature.preClaimSig
|
|
458
|
+
: (lastOriginSignature ?? '0x');
|
|
459
|
+
}
|
|
460
|
+
function getIntentMessages(config, intentOp) {
|
|
461
|
+
const address = (0, accounts_1.getAddress)(config);
|
|
462
|
+
const intentExecutor = (0, modules_1.getIntentExecutor)(config);
|
|
463
|
+
const withPermit2 = intentOp.elements.some((element) => element.mandate.qualifier.settlementContext.fundingMethod === 'PERMIT2');
|
|
464
|
+
const withIntentExecutorOps = intentOp.elements.some((element) => element.mandate.qualifier.settlementContext.settlementLayer ===
|
|
465
|
+
'INTENT_EXECUTOR');
|
|
466
|
+
const origin = [];
|
|
460
467
|
for (const element of intentOp.elements) {
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
468
|
+
if (withIntentExecutorOps) {
|
|
469
|
+
const typedData = (0, singleChainOps_1.getTypedData)(address, intentExecutor.address, element, BigInt(intentOp.nonce));
|
|
470
|
+
origin.push(typedData);
|
|
471
|
+
}
|
|
472
|
+
else if (withPermit2) {
|
|
473
|
+
const typedData = (0, permit2_1.getTypedData)(element, BigInt(intentOp.nonce), BigInt(intentOp.expires));
|
|
474
|
+
origin.push(typedData);
|
|
475
|
+
}
|
|
476
|
+
else {
|
|
477
|
+
const typedData = (0, compact_1.getCompactTypedData)(intentOp);
|
|
478
|
+
origin.push(typedData);
|
|
479
|
+
}
|
|
464
480
|
}
|
|
465
|
-
const
|
|
481
|
+
const destination = origin.at(-1);
|
|
466
482
|
return {
|
|
467
|
-
|
|
468
|
-
|
|
483
|
+
origin,
|
|
484
|
+
destination,
|
|
469
485
|
};
|
|
470
486
|
}
|
|
471
|
-
async function
|
|
472
|
-
const typedData = (0, compact_1.getCompactTypedData)(intentOp);
|
|
473
|
-
return await signIntentTypedData(config, signers, targetChain, validator, isRoot, typedData);
|
|
474
|
-
}
|
|
475
|
-
async function signIntentTypedData(config, signers, targetChain, validator, isRoot, parameters) {
|
|
487
|
+
async function signIntentTypedData(config, signers, validator, isRoot, parameters, chain) {
|
|
476
488
|
if ((0, core_1.supportsEip712)(validator)) {
|
|
477
|
-
return await (0, accounts_1.getTypedDataPackedSignature)(config, signers,
|
|
489
|
+
return await (0, accounts_1.getTypedDataPackedSignature)(config, signers, chain, {
|
|
478
490
|
address: validator.address,
|
|
479
491
|
isRoot,
|
|
480
492
|
}, parameters);
|
|
481
493
|
}
|
|
482
494
|
const hash = (0, viem_1.hashTypedData)(parameters);
|
|
483
|
-
|
|
495
|
+
if (signers?.type === 'experimental_session' && signers.verifyExecutions) {
|
|
496
|
+
const eip1271Signature = await (0, accounts_1.getEip1271Signature)(config, signers.type === 'experimental_session'
|
|
497
|
+
? {
|
|
498
|
+
type: 'experimental_session',
|
|
499
|
+
session: signers.session,
|
|
500
|
+
verifyExecutions: false,
|
|
501
|
+
enableData: signers.enableData,
|
|
502
|
+
}
|
|
503
|
+
: signers, chain, {
|
|
504
|
+
address: validator.address,
|
|
505
|
+
isRoot,
|
|
506
|
+
}, hash);
|
|
507
|
+
const emissarySignature = await (0, accounts_1.getEmissarySignature)(config, signers.type === 'experimental_session'
|
|
508
|
+
? {
|
|
509
|
+
type: 'experimental_session',
|
|
510
|
+
session: signers.session,
|
|
511
|
+
verifyExecutions: true,
|
|
512
|
+
enableData: signers.enableData,
|
|
513
|
+
}
|
|
514
|
+
: signers, chain, hash);
|
|
515
|
+
return {
|
|
516
|
+
preClaimSig: emissarySignature,
|
|
517
|
+
notarizedClaimSig: eip1271Signature,
|
|
518
|
+
};
|
|
519
|
+
}
|
|
520
|
+
return await (0, accounts_1.getEip1271Signature)(config, signers, chain, {
|
|
484
521
|
address: validator.address,
|
|
485
522
|
isRoot,
|
|
486
523
|
}, hash);
|
|
@@ -588,16 +625,13 @@ async function getValidatorAccount(config, signers, publicClient, chain) {
|
|
|
588
625
|
if (withOwner) {
|
|
589
626
|
return (0, accounts_1.getSmartAccount)(config, publicClient, chain);
|
|
590
627
|
}
|
|
591
|
-
const withSession = signers.type === 'session' ? signers : null;
|
|
592
628
|
const withGuardians = signers.type === 'guardians' ? signers : null;
|
|
593
|
-
return
|
|
594
|
-
? await (0, accounts_1.
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
})
|
|
600
|
-
: null;
|
|
629
|
+
return withGuardians
|
|
630
|
+
? await (0, accounts_1.getGuardianSmartAccount)(config, publicClient, chain, {
|
|
631
|
+
type: 'ecdsa',
|
|
632
|
+
accounts: withGuardians.guardians,
|
|
633
|
+
})
|
|
634
|
+
: null;
|
|
601
635
|
}
|
|
602
636
|
function getValidator(config, signers) {
|
|
603
637
|
if (!signers) {
|
|
@@ -624,7 +658,7 @@ function getValidator(config, signers) {
|
|
|
624
658
|
}
|
|
625
659
|
}
|
|
626
660
|
// Smart sessions
|
|
627
|
-
const withSession = signers.type === '
|
|
661
|
+
const withSession = signers.type === 'experimental_session';
|
|
628
662
|
if (withSession) {
|
|
629
663
|
return (0, validators_1.getSmartSessionValidator)(config);
|
|
630
664
|
}
|
|
@@ -647,10 +681,18 @@ function createAccountAccessList(sourceChains, sourceAssets) {
|
|
|
647
681
|
if (!sourceChains && !sourceAssets)
|
|
648
682
|
return undefined;
|
|
649
683
|
const chainIds = sourceChains?.map((chain) => chain.id);
|
|
650
|
-
if (!sourceAssets)
|
|
684
|
+
if (!sourceAssets)
|
|
651
685
|
return { chainIds };
|
|
652
|
-
}
|
|
653
686
|
if (Array.isArray(sourceAssets)) {
|
|
687
|
+
const isExactConfig = sourceAssets.length > 0 && typeof sourceAssets[0] !== 'string';
|
|
688
|
+
if (isExactConfig) {
|
|
689
|
+
const resolvedConfigs = sourceAssets.map((config) => ({
|
|
690
|
+
chainId: config.chain.id,
|
|
691
|
+
tokenAddress: (0, registry_1.resolveTokenAddress)(config.address, config.chain.id),
|
|
692
|
+
amount: config.amount,
|
|
693
|
+
}));
|
|
694
|
+
return resolvedConfigs;
|
|
695
|
+
}
|
|
654
696
|
return chainIds
|
|
655
697
|
? { chainIds, tokens: sourceAssets }
|
|
656
698
|
: { tokens: sourceAssets };
|
|
@@ -685,12 +727,17 @@ function getSetupOperationsAndDelegations(config, accountAddress, eip7702InitSig
|
|
|
685
727
|
};
|
|
686
728
|
}
|
|
687
729
|
else if (initCode) {
|
|
730
|
+
const to = 'factory' in initCode ? initCode.factory : undefined;
|
|
731
|
+
const data = 'factory' in initCode ? initCode.factoryData : undefined;
|
|
732
|
+
if (!to || !data) {
|
|
733
|
+
throw new accounts_1.FactoryArgsNotAvailableError();
|
|
734
|
+
}
|
|
688
735
|
// Contract account with init code
|
|
689
736
|
return {
|
|
690
737
|
setupOps: [
|
|
691
738
|
{
|
|
692
|
-
to
|
|
693
|
-
data
|
|
739
|
+
to,
|
|
740
|
+
data,
|
|
694
741
|
},
|
|
695
742
|
],
|
|
696
743
|
};
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import type { Address, Chain, HashTypedDataParameters, Hex, SignableMessage, SignedAuthorizationList, TypedData, Account } from 'viem';
|
|
1
|
+
import type { Address, Chain, HashTypedDataParameters, Hex, SignableMessage, SignedAuthorizationList, TypedData, TypedDataDefinition, Account } from 'viem';
|
|
2
2
|
import type { UserOperationReceipt } from 'viem/account-abstraction';
|
|
3
3
|
import { deployStandaloneWithEoa as deployStandaloneWithEoaInternal } from './accounts';
|
|
4
4
|
import { walletClientToAccount, wrapParaAccount } from './accounts/walletClient';
|
|
5
|
+
import { deployAccountsForOwners } from './actions/deployment';
|
|
5
6
|
import { type TransactionResult, type TransactionStatus, type UserOperationResult } from './execution';
|
|
6
7
|
import { type BatchPermit2Result, checkERC20AllowanceDirect, getPermit2Address, type MultiChainPermit2Config, type MultiChainPermit2Result, signPermit2Batch, signPermit2Sequential } from './execution/permit2';
|
|
7
|
-
import { type SessionDetails } from './execution/smart-session';
|
|
8
8
|
import { type IntentRoute, type PreparedTransactionData, type PreparedUserOperationData, type SignedTransactionData, type SignedUserOperationData } from './execution/utils';
|
|
9
|
-
import { type
|
|
10
|
-
import
|
|
9
|
+
import { type SessionDetails } from './modules/validators/smart-sessions';
|
|
10
|
+
import { type ApprovalRequired, getAllSupportedChainsAndTokens, getSupportedTokens, getTokenAddress, getTokenDecimals, type IntentInput, type IntentOp, type IntentOpStatus, type Portfolio, type SettlementLayer, type SignedIntentOp, type SplitIntentsInput, type SplitIntentsResult, type TokenRequirements, type WrapRequired } from './orchestrator';
|
|
11
|
+
import type { AccountProviderConfig, AccountType, BundlerConfig, Call, CallInput, MultiFactorValidatorConfig, OwnableValidatorConfig, OwnerSet, PaymasterConfig, Policy, ProviderConfig, Recovery, RhinestoneAccountConfig, RhinestoneConfig, RhinestoneSDKConfig, Session, SignerSet, TokenRequest, TokenSymbol, Transaction, UniversalActionPolicyParamCondition, UserOperationTransaction, WebauthnValidatorConfig } from './types';
|
|
11
12
|
interface RhinestoneAccount {
|
|
12
13
|
config: RhinestoneAccountConfig;
|
|
13
14
|
deploy: (chain: Chain, params?: {
|
|
@@ -17,8 +18,16 @@ interface RhinestoneAccount {
|
|
|
17
18
|
isDeployed: (chain: Chain) => Promise<boolean>;
|
|
18
19
|
setup: (chain: Chain) => Promise<boolean>;
|
|
19
20
|
deployStandaloneWithEoa: (chain: Chain, config: RhinestoneAccountConfig, deployer: Account) => Promise<void>;
|
|
21
|
+
getInitData(): {
|
|
22
|
+
factory: Address;
|
|
23
|
+
factoryData: Hex;
|
|
24
|
+
};
|
|
20
25
|
signEip7702InitData: () => Promise<Hex>;
|
|
21
26
|
prepareTransaction: (transaction: Transaction) => Promise<PreparedTransactionData>;
|
|
27
|
+
getTransactionMessages: (preparedTransaction: PreparedTransactionData) => {
|
|
28
|
+
origin: TypedDataDefinition[];
|
|
29
|
+
destination: TypedDataDefinition;
|
|
30
|
+
};
|
|
22
31
|
signTransaction: (preparedTransaction: PreparedTransactionData) => Promise<SignedTransactionData>;
|
|
23
32
|
signAuthorizations: (preparedTransaction: PreparedTransactionData) => Promise<SignedAuthorizationList>;
|
|
24
33
|
signMessage: (message: SignableMessage, chain: Chain, signers: SignerSet | undefined) => Promise<Hex>;
|
|
@@ -33,8 +42,9 @@ interface RhinestoneAccount {
|
|
|
33
42
|
waitForExecution(result: UserOperationResult, acceptsPreconfirmations?: boolean): Promise<UserOperationReceipt>;
|
|
34
43
|
getAddress: () => Address;
|
|
35
44
|
getPortfolio: (onTestnets?: boolean) => Promise<Portfolio>;
|
|
36
|
-
|
|
37
|
-
|
|
45
|
+
experimental_getSessionDetails: (sessions: Session[]) => Promise<SessionDetails>;
|
|
46
|
+
experimental_isSessionEnabled: (session: Session) => Promise<boolean>;
|
|
47
|
+
experimental_signEnableSession: (details: SessionDetails) => Promise<Hex>;
|
|
38
48
|
getOwners: (chain: Chain) => Promise<{
|
|
39
49
|
accounts: Address[];
|
|
40
50
|
threshold: number;
|
|
@@ -42,6 +52,13 @@ interface RhinestoneAccount {
|
|
|
42
52
|
getValidators: (chain: Chain) => Promise<Address[]>;
|
|
43
53
|
checkERC20Allowance: (tokenAddress: Address, chain: Chain) => Promise<bigint>;
|
|
44
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* Initialize a Rhinestone account
|
|
57
|
+
* Note: accounts are deployed onchain only when the first transaction is sent.
|
|
58
|
+
* @param config Account config (e.g. implementation vendor, owner signers, smart sessions)
|
|
59
|
+
* @returns account
|
|
60
|
+
*/
|
|
61
|
+
declare function createRhinestoneAccount(config: RhinestoneConfig): Promise<RhinestoneAccount>;
|
|
45
62
|
declare class RhinestoneSDK {
|
|
46
63
|
private apiKey?;
|
|
47
64
|
private endpointUrl?;
|
|
@@ -54,9 +71,10 @@ declare class RhinestoneSDK {
|
|
|
54
71
|
getIntentStatus(intentId: bigint): Promise<TransactionStatus & {
|
|
55
72
|
status: IntentOpStatus["status"];
|
|
56
73
|
}>;
|
|
74
|
+
splitIntents(input: SplitIntentsInput): Promise<SplitIntentsResult>;
|
|
57
75
|
}
|
|
58
|
-
export { RhinestoneSDK, walletClientToAccount, wrapParaAccount, getSupportedTokens, getTokenAddress, getAllSupportedChainsAndTokens, deployStandaloneWithEoaInternal as deployStandaloneWithEoa, checkERC20AllowanceDirect, getPermit2Address, signPermit2Batch, signPermit2Sequential, };
|
|
59
|
-
export type { RhinestoneAccount, AccountType, RhinestoneAccountConfig, AccountProviderConfig, ProviderConfig, BundlerConfig, PaymasterConfig, Transaction, TokenSymbol, CallInput, Call, TokenRequest, OwnerSet, OwnableValidatorConfig, WebauthnValidatorConfig, MultiFactorValidatorConfig, SignerSet, Session, Recovery, Policy, UniversalActionPolicyParamCondition, PreparedTransactionData, SignedTransactionData, TransactionResult, PreparedUserOperationData, SignedUserOperationData, UserOperationResult,
|
|
76
|
+
export { RhinestoneSDK, createRhinestoneAccount, deployAccountsForOwners, walletClientToAccount, wrapParaAccount, getSupportedTokens, getTokenAddress, getTokenDecimals, getAllSupportedChainsAndTokens, deployStandaloneWithEoaInternal as deployStandaloneWithEoa, checkERC20AllowanceDirect, getPermit2Address, signPermit2Batch, signPermit2Sequential, };
|
|
77
|
+
export type { RhinestoneAccount, AccountType, RhinestoneAccountConfig, AccountProviderConfig, ProviderConfig, BundlerConfig, PaymasterConfig, Transaction, TokenSymbol, CallInput, Call, TokenRequest, OwnerSet, OwnableValidatorConfig, WebauthnValidatorConfig, MultiFactorValidatorConfig, SignerSet, Session, Recovery, Policy, UniversalActionPolicyParamCondition, PreparedTransactionData, SignedTransactionData, TransactionResult, PreparedUserOperationData, SignedUserOperationData, UserOperationResult, IntentInput, IntentOp, IntentOpStatus, IntentRoute, SettlementLayer, SignedIntentOp, SplitIntentsInput, SplitIntentsResult, Portfolio, TokenRequirements, WrapRequired, ApprovalRequired, MultiChainPermit2Config, MultiChainPermit2Result, BatchPermit2Result, };
|
|
60
78
|
export { generateCredentialId, getCredentialIds, hasCredentialById, hasCredential, addCredential, removeCredential, setThreshold, getCredentialInfo, getThreshold, getCredentials, WEBAUTHN_VALIDATOR_ABI, } from './modules/validators/webauthn-contract';
|
|
61
79
|
export { getOrchestrator } from './orchestrator';
|
|
62
80
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,KAAK,EACL,uBAAuB,EACvB,GAAG,EACH,eAAe,EACf,uBAAuB,EACvB,SAAS,EACT,OAAO,EACR,MAAM,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