@rhinestone/sdk 1.0.0-alpha.2 → 1.0.0-alpha.21
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/custom.d.ts +18 -0
- package/dist/src/accounts/custom.d.ts.map +1 -0
- package/dist/src/accounts/custom.js +121 -0
- package/dist/src/accounts/custom.test.d.ts +2 -0
- package/dist/src/accounts/custom.test.d.ts.map +1 -0
- package/dist/src/accounts/custom.test.js +64 -0
- package/dist/src/accounts/error.d.ts.map +1 -1
- package/dist/src/accounts/error.js +2 -0
- package/dist/src/accounts/index.d.ts +22 -13
- package/dist/src/accounts/index.d.ts.map +1 -1
- package/dist/src/accounts/index.js +192 -186
- package/dist/src/accounts/index.test.js +3 -3
- package/dist/src/accounts/json-rpc/index.d.ts +5 -0
- package/dist/src/accounts/json-rpc/index.d.ts.map +1 -0
- package/dist/src/accounts/json-rpc/index.js +16 -0
- package/dist/src/accounts/json-rpc/index.test.d.ts +2 -0
- package/dist/src/accounts/json-rpc/index.test.d.ts.map +1 -0
- package/dist/src/accounts/json-rpc/index.test.js +16 -0
- package/dist/src/accounts/json-rpc/providers.d.ts +4 -0
- package/dist/src/accounts/json-rpc/providers.d.ts.map +1 -0
- package/dist/src/accounts/json-rpc/providers.js +14 -0
- package/dist/src/accounts/json-rpc/providers.test.d.ts +2 -0
- package/dist/src/accounts/json-rpc/providers.test.d.ts.map +1 -0
- package/dist/src/accounts/json-rpc/providers.test.js +15 -0
- package/dist/src/accounts/kernel.d.ts +9 -10
- package/dist/src/accounts/kernel.d.ts.map +1 -1
- package/dist/src/accounts/kernel.js +3 -14
- package/dist/src/accounts/kernel.test.js +10 -15
- package/dist/src/accounts/nexus.d.ts +14 -13
- package/dist/src/accounts/nexus.d.ts.map +1 -1
- package/dist/src/accounts/nexus.js +121 -93
- package/dist/src/accounts/nexus.test.js +13 -14
- package/dist/src/accounts/safe.d.ts +5 -7
- package/dist/src/accounts/safe.d.ts.map +1 -1
- package/dist/src/accounts/safe.js +25 -35
- package/dist/src/accounts/safe.test.js +9 -10
- package/dist/src/accounts/signing/common.d.ts +27 -0
- package/dist/src/accounts/signing/common.d.ts.map +1 -0
- package/dist/src/accounts/signing/common.js +142 -0
- package/dist/src/accounts/signing/message.d.ts +5 -0
- package/dist/src/accounts/signing/message.d.ts.map +1 -0
- package/dist/src/accounts/signing/message.js +47 -0
- package/dist/src/accounts/signing/passkeys.d.ts +29 -0
- package/dist/src/accounts/signing/passkeys.d.ts.map +1 -0
- package/dist/src/accounts/signing/passkeys.js +90 -0
- package/dist/src/accounts/signing/passkeys.test.d.ts +2 -0
- package/dist/src/accounts/signing/passkeys.test.d.ts.map +1 -0
- package/dist/src/accounts/signing/passkeys.test.js +73 -0
- package/dist/src/accounts/signing/typedData.d.ts +5 -0
- package/dist/src/accounts/signing/typedData.d.ts.map +1 -0
- package/dist/src/accounts/signing/typedData.js +35 -0
- package/dist/src/accounts/startale.d.ts +20 -0
- package/dist/src/accounts/startale.d.ts.map +1 -0
- package/dist/src/accounts/startale.js +100 -0
- package/dist/src/accounts/startale.test.d.ts +2 -0
- package/dist/src/accounts/startale.test.d.ts.map +1 -0
- package/dist/src/accounts/startale.test.js +96 -0
- package/dist/src/accounts/utils.d.ts +2 -1
- package/dist/src/accounts/utils.d.ts.map +1 -1
- package/dist/src/accounts/utils.js +7 -0
- package/dist/src/actions/index.d.ts +145 -7
- package/dist/src/actions/index.d.ts.map +1 -1
- package/dist/src/actions/index.js +373 -23
- package/dist/src/actions/index.test.js +35 -17
- package/dist/src/actions/smart-session.d.ts +8 -2
- package/dist/src/actions/smart-session.d.ts.map +1 -1
- package/dist/src/actions/smart-session.js +6 -0
- package/dist/src/execution/compact.d.ts +130 -3
- package/dist/src/execution/compact.d.ts.map +1 -1
- package/dist/src/execution/compact.js +94 -1
- package/dist/src/execution/error.d.ts +2 -9
- package/dist/src/execution/error.d.ts.map +1 -1
- package/dist/src/execution/error.js +4 -13
- package/dist/src/execution/index.d.ts +3 -4
- package/dist/src/execution/index.d.ts.map +1 -1
- package/dist/src/execution/index.js +35 -80
- package/dist/src/execution/smart-session.d.ts +1 -1
- package/dist/src/execution/smart-session.d.ts.map +1 -1
- package/dist/src/execution/smart-session.js +12 -17
- package/dist/src/execution/utils.d.ts +19 -14
- package/dist/src/execution/utils.d.ts.map +1 -1
- package/dist/src/execution/utils.js +222 -97
- package/dist/src/index.d.ts +17 -15
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +108 -21
- package/dist/src/modules/index.d.ts +3 -22
- package/dist/src/modules/index.d.ts.map +1 -1
- package/dist/src/modules/index.js +5 -65
- package/dist/src/modules/index.test.js +3 -17
- package/dist/src/modules/omni-account.d.ts +2 -4
- package/dist/src/modules/omni-account.d.ts.map +1 -1
- package/dist/src/modules/omni-account.js +4 -8
- package/dist/src/modules/read.d.ts +5 -6
- package/dist/src/modules/read.d.ts.map +1 -1
- package/dist/src/modules/read.js +7 -37
- package/dist/src/modules/validators/core.d.ts +8 -8
- package/dist/src/modules/validators/core.d.ts.map +1 -1
- package/dist/src/modules/validators/core.js +126 -42
- package/dist/src/modules/validators/core.test.js +7 -7
- package/dist/src/modules/validators/smart-sessions.d.ts +3 -3
- package/dist/src/modules/validators/smart-sessions.d.ts.map +1 -1
- package/dist/src/modules/validators/smart-sessions.js +10 -9
- package/dist/src/modules/validators/smart-sessions.test.js +4 -4
- package/dist/src/orchestrator/client.d.ts +5 -3
- package/dist/src/orchestrator/client.d.ts.map +1 -1
- package/dist/src/orchestrator/client.js +159 -95
- package/dist/src/orchestrator/consts.d.ts +3 -2
- package/dist/src/orchestrator/consts.d.ts.map +1 -1
- package/dist/src/orchestrator/consts.js +4 -2
- package/dist/src/orchestrator/index.d.ts +3 -4
- package/dist/src/orchestrator/index.d.ts.map +1 -1
- package/dist/src/orchestrator/index.js +1 -9
- package/dist/src/orchestrator/registry.d.ts +10 -13
- package/dist/src/orchestrator/registry.d.ts.map +1 -1
- package/dist/src/orchestrator/registry.js +75 -395
- package/dist/src/orchestrator/registry.test.d.ts.map +1 -0
- package/dist/src/orchestrator/registry.test.js +137 -0
- package/dist/src/orchestrator/types.d.ts +78 -16
- package/dist/src/orchestrator/types.d.ts.map +1 -1
- package/dist/src/orchestrator/utils.d.ts +1 -3
- package/dist/src/orchestrator/utils.d.ts.map +1 -1
- package/dist/src/orchestrator/utils.js +0 -102
- package/dist/src/types.d.ts +69 -26
- package/dist/src/types.d.ts.map +1 -1
- package/dist/test/consts.d.ts +2 -2
- package/dist/test/consts.d.ts.map +1 -1
- package/package.json +2 -1
- package/dist/src/actions/registry.d.ts +0 -7
- package/dist/src/actions/registry.d.ts.map +0 -1
- package/dist/src/actions/registry.js +0 -7
- package/dist/src/actions/registry.test.d.ts.map +0 -1
- package/dist/src/actions/registry.test.js +0 -25
- package/dist/src/modules/registry.d.ts +0 -13
- package/dist/src/modules/registry.d.ts.map +0 -1
- package/dist/src/modules/registry.js +0 -67
- /package/dist/src/{actions → orchestrator}/registry.test.d.ts +0 -0
|
@@ -2,12 +2,19 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.prepareTransaction = prepareTransaction;
|
|
4
4
|
exports.signTransaction = signTransaction;
|
|
5
|
+
exports.signAuthorizations = signAuthorizations;
|
|
6
|
+
exports.signAuthorizationsInternal = signAuthorizationsInternal;
|
|
7
|
+
exports.signMessage = signMessage;
|
|
8
|
+
exports.signTypedData = signTypedData;
|
|
5
9
|
exports.submitTransaction = submitTransaction;
|
|
10
|
+
exports.simulateTransaction = simulateTransaction;
|
|
6
11
|
exports.getOrchestratorByChain = getOrchestratorByChain;
|
|
7
12
|
exports.signIntent = signIntent;
|
|
8
13
|
exports.prepareTransactionAsIntent = prepareTransactionAsIntent;
|
|
9
14
|
exports.submitIntentInternal = submitIntentInternal;
|
|
15
|
+
exports.simulateIntentInternal = simulateIntentInternal;
|
|
10
16
|
exports.getValidatorAccount = getValidatorAccount;
|
|
17
|
+
exports.parseCalls = parseCalls;
|
|
11
18
|
const viem_1 = require("viem");
|
|
12
19
|
const account_abstraction_1 = require("viem/account-abstraction");
|
|
13
20
|
const accounts_1 = require("../accounts");
|
|
@@ -17,24 +24,22 @@ const core_1 = require("../modules/validators/core");
|
|
|
17
24
|
const orchestrator_1 = require("../orchestrator");
|
|
18
25
|
const consts_1 = require("../orchestrator/consts");
|
|
19
26
|
const registry_1 = require("../orchestrator/registry");
|
|
27
|
+
const compact_1 = require("./compact");
|
|
20
28
|
const error_1 = require("./error");
|
|
21
29
|
async function prepareTransaction(config, transaction) {
|
|
22
|
-
const {
|
|
30
|
+
const { sourceChains, targetChain, tokenRequests, signers, sponsored, eip7702InitSignature, } = getTransactionParams(transaction);
|
|
23
31
|
const accountAddress = (0, accounts_1.getAddress)(config);
|
|
24
32
|
let data;
|
|
25
33
|
const asUserOp = signers?.type === 'guardians' || signers?.type === 'session';
|
|
26
34
|
if (asUserOp) {
|
|
27
|
-
if (
|
|
28
|
-
throw new error_1.
|
|
29
|
-
}
|
|
30
|
-
if (sourceChain.id !== targetChain.id) {
|
|
31
|
-
throw new error_1.SourceTargetChainMismatchError();
|
|
35
|
+
if (sourceChains && sourceChains.length > 0) {
|
|
36
|
+
throw new error_1.SourceChainsNotAvailableForUserOpFlowError();
|
|
32
37
|
}
|
|
33
38
|
// Smart sessions require a UserOp flow
|
|
34
|
-
data = await prepareTransactionAsUserOp(config,
|
|
39
|
+
data = await prepareTransactionAsUserOp(config, targetChain, transaction.calls, signers, transaction.gasLimit);
|
|
35
40
|
}
|
|
36
41
|
else {
|
|
37
|
-
data = await prepareTransactionAsIntent(config,
|
|
42
|
+
data = await prepareTransactionAsIntent(config, sourceChains, targetChain, transaction.calls, transaction.gasLimit, tokenRequests, accountAddress, sponsored ?? false, eip7702InitSignature);
|
|
38
43
|
}
|
|
39
44
|
return {
|
|
40
45
|
data,
|
|
@@ -42,12 +47,12 @@ async function prepareTransaction(config, transaction) {
|
|
|
42
47
|
};
|
|
43
48
|
}
|
|
44
49
|
async function signTransaction(config, preparedTransaction) {
|
|
45
|
-
const {
|
|
50
|
+
const { targetChain, signers } = getTransactionParams(preparedTransaction.transaction);
|
|
46
51
|
const data = preparedTransaction.data;
|
|
47
52
|
const asUserOp = data.type === 'userop';
|
|
48
53
|
let signature;
|
|
49
54
|
if (asUserOp) {
|
|
50
|
-
const chain =
|
|
55
|
+
const chain = targetChain;
|
|
51
56
|
const userOp = data.userOp;
|
|
52
57
|
if (!userOp) {
|
|
53
58
|
throw new error_1.UserOperationRequiredForSmartSessionsError();
|
|
@@ -56,7 +61,7 @@ async function signTransaction(config, preparedTransaction) {
|
|
|
56
61
|
signature = await signUserOp(config, chain, signers, userOp);
|
|
57
62
|
}
|
|
58
63
|
else {
|
|
59
|
-
signature = await signIntent(config,
|
|
64
|
+
signature = await signIntent(config, targetChain, data.intentRoute.intentOp, signers);
|
|
60
65
|
}
|
|
61
66
|
return {
|
|
62
67
|
data,
|
|
@@ -64,12 +69,76 @@ async function signTransaction(config, preparedTransaction) {
|
|
|
64
69
|
signature,
|
|
65
70
|
};
|
|
66
71
|
}
|
|
67
|
-
async function
|
|
72
|
+
async function signAuthorizations(config, preparedTransaction) {
|
|
73
|
+
return await signAuthorizationsInternal(config, preparedTransaction.data);
|
|
74
|
+
}
|
|
75
|
+
async function signMessage(config, message, chain, signers) {
|
|
76
|
+
const validator = getValidator(config, signers);
|
|
77
|
+
if (!validator) {
|
|
78
|
+
throw new Error('Validator not available');
|
|
79
|
+
}
|
|
80
|
+
const ownerValidator = (0, validators_1.getOwnerValidator)(config);
|
|
81
|
+
const isRoot = validator.address === ownerValidator.address;
|
|
82
|
+
const hash = (0, viem_1.hashMessage)(message);
|
|
83
|
+
const signature = await (0, accounts_1.getPackedSignature)(config, signers, chain, {
|
|
84
|
+
address: validator.address,
|
|
85
|
+
isRoot,
|
|
86
|
+
}, hash);
|
|
87
|
+
return await (0, accounts_1.toErc6492Signature)(config, signature, chain);
|
|
88
|
+
}
|
|
89
|
+
async function signTypedData(config, parameters, chain, signers) {
|
|
90
|
+
const validator = getValidator(config, signers);
|
|
91
|
+
if (!validator) {
|
|
92
|
+
throw new Error('Validator not available');
|
|
93
|
+
}
|
|
94
|
+
const ownerValidator = (0, validators_1.getOwnerValidator)(config);
|
|
95
|
+
const isRoot = validator.address === ownerValidator.address;
|
|
96
|
+
const signature = await (0, accounts_1.getTypedDataPackedSignature)(config, signers, chain, {
|
|
97
|
+
address: validator.address,
|
|
98
|
+
isRoot,
|
|
99
|
+
}, parameters);
|
|
100
|
+
return await (0, accounts_1.toErc6492Signature)(config, signature, chain);
|
|
101
|
+
}
|
|
102
|
+
async function signAuthorizationsInternal(config, data) {
|
|
103
|
+
const eoa = config.eoa;
|
|
104
|
+
if (!eoa) {
|
|
105
|
+
throw new Error('EIP-7702 initialization is required for EOA accounts');
|
|
106
|
+
}
|
|
107
|
+
const accountAddress = (0, accounts_1.getAddress)(config);
|
|
108
|
+
const requiredDelegations = data.type === 'intent'
|
|
109
|
+
? data.intentRoute.intentOp.signedMetadata.account.requiredDelegations ||
|
|
110
|
+
{}
|
|
111
|
+
: {};
|
|
112
|
+
const authorizations = [];
|
|
113
|
+
for (const chainId in requiredDelegations) {
|
|
114
|
+
const delegation = requiredDelegations[chainId];
|
|
115
|
+
const chain = (0, registry_1.getChainById)(Number(chainId));
|
|
116
|
+
const walletClient = (0, viem_1.createWalletClient)({
|
|
117
|
+
chain,
|
|
118
|
+
account: eoa,
|
|
119
|
+
transport: (0, utils_1.createTransport)(chain, config.provider),
|
|
120
|
+
}).extend(viem_1.publicActions);
|
|
121
|
+
const code = await walletClient.getCode({
|
|
122
|
+
address: accountAddress,
|
|
123
|
+
});
|
|
124
|
+
const isDelegated = code === (0, viem_1.concat)(['0xef0100', delegation.contract.toLowerCase()]);
|
|
125
|
+
if (isDelegated) {
|
|
126
|
+
continue;
|
|
127
|
+
}
|
|
128
|
+
const authorization = await walletClient.signAuthorization({
|
|
129
|
+
contractAddress: delegation.contract,
|
|
130
|
+
chainId: Number(chainId),
|
|
131
|
+
});
|
|
132
|
+
authorizations.push(authorization);
|
|
133
|
+
}
|
|
134
|
+
return authorizations;
|
|
135
|
+
}
|
|
136
|
+
async function submitTransaction(config, signedTransaction, authorizations) {
|
|
68
137
|
const { data, transaction, signature } = signedTransaction;
|
|
69
|
-
const {
|
|
138
|
+
const { sourceChains, targetChain } = getTransactionParams(transaction);
|
|
70
139
|
const asUserOp = data.type === 'userop';
|
|
71
140
|
if (asUserOp) {
|
|
72
|
-
const chain =
|
|
141
|
+
const chain = targetChain;
|
|
73
142
|
const userOp = data.userOp;
|
|
74
143
|
if (!userOp) {
|
|
75
144
|
throw new error_1.UserOperationRequiredForSmartSessionsError();
|
|
@@ -82,16 +151,34 @@ async function submitTransaction(config, signedTransaction) {
|
|
|
82
151
|
if (!intentOp) {
|
|
83
152
|
throw new error_1.OrderPathRequiredForIntentsError();
|
|
84
153
|
}
|
|
85
|
-
return await submitIntent(config,
|
|
154
|
+
return await submitIntent(config, sourceChains, targetChain, intentOp, signature, authorizations);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
async function simulateTransaction(config, signedTransaction, authorizations) {
|
|
158
|
+
const { data, transaction, signature } = signedTransaction;
|
|
159
|
+
const { sourceChains, targetChain } = getTransactionParams(transaction);
|
|
160
|
+
const asUserOp = data.type === 'userop';
|
|
161
|
+
if (asUserOp) {
|
|
162
|
+
throw new Error('Simulation not supported for UserOp transactions');
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
const intentOp = data.intentRoute.intentOp;
|
|
166
|
+
if (!intentOp) {
|
|
167
|
+
throw new error_1.OrderPathRequiredForIntentsError();
|
|
168
|
+
}
|
|
169
|
+
return await simulateIntent(config, sourceChains, targetChain, intentOp, signature, authorizations);
|
|
86
170
|
}
|
|
87
171
|
}
|
|
88
172
|
function getTransactionParams(transaction) {
|
|
89
|
-
const
|
|
173
|
+
const sourceChains = 'chain' in transaction ? [transaction.chain] : transaction.sourceChains;
|
|
90
174
|
const targetChain = 'chain' in transaction ? transaction.chain : transaction.targetChain;
|
|
91
175
|
const initialTokenRequests = transaction.tokenRequests;
|
|
92
176
|
const signers = transaction.signers;
|
|
177
|
+
const eip7702InitSignature = transaction.eip7702InitSignature;
|
|
178
|
+
const sponsored = transaction.sponsored;
|
|
179
|
+
const gasLimit = transaction.gasLimit;
|
|
93
180
|
// Across requires passing some value to repay the solvers
|
|
94
|
-
const tokenRequests = initialTokenRequests.length === 0
|
|
181
|
+
const tokenRequests = !initialTokenRequests || initialTokenRequests.length === 0
|
|
95
182
|
? [
|
|
96
183
|
{
|
|
97
184
|
address: viem_1.zeroAddress,
|
|
@@ -100,25 +187,30 @@ function getTransactionParams(transaction) {
|
|
|
100
187
|
]
|
|
101
188
|
: initialTokenRequests;
|
|
102
189
|
return {
|
|
103
|
-
|
|
190
|
+
sourceChains,
|
|
104
191
|
targetChain,
|
|
105
192
|
tokenRequests,
|
|
106
193
|
signers,
|
|
194
|
+
sponsored,
|
|
195
|
+
eip7702InitSignature,
|
|
196
|
+
gasLimit,
|
|
107
197
|
};
|
|
108
198
|
}
|
|
109
|
-
async function prepareTransactionAsUserOp(config, chain,
|
|
199
|
+
async function prepareTransactionAsUserOp(config, chain, callInputs, signers, gasLimit) {
|
|
110
200
|
const publicClient = (0, viem_1.createPublicClient)({
|
|
111
201
|
chain,
|
|
112
|
-
transport: (0,
|
|
202
|
+
transport: (0, utils_1.createTransport)(chain, config.provider),
|
|
113
203
|
});
|
|
114
204
|
const validatorAccount = await getValidatorAccount(config, signers, publicClient, chain);
|
|
115
205
|
if (!validatorAccount) {
|
|
116
206
|
throw new Error('No validator account found');
|
|
117
207
|
}
|
|
118
208
|
const bundlerClient = (0, utils_1.getBundlerClient)(config, publicClient);
|
|
209
|
+
const calls = parseCalls(callInputs, chain.id);
|
|
119
210
|
const userOp = await bundlerClient.prepareUserOperation({
|
|
120
211
|
account: validatorAccount,
|
|
121
212
|
calls,
|
|
213
|
+
callGasLimit: gasLimit,
|
|
122
214
|
});
|
|
123
215
|
return {
|
|
124
216
|
type: 'userop',
|
|
@@ -131,54 +223,57 @@ async function prepareTransactionAsUserOp(config, chain, calls, signers) {
|
|
|
131
223
|
}),
|
|
132
224
|
};
|
|
133
225
|
}
|
|
134
|
-
async function prepareTransactionAsIntent(config,
|
|
135
|
-
const
|
|
226
|
+
async function prepareTransactionAsIntent(config, sourceChains, targetChain, callInputs, gasLimit, tokenRequests, accountAddress, isSponsored, eip7702InitSignature) {
|
|
227
|
+
const calls = parseCalls(callInputs, targetChain.id);
|
|
228
|
+
const accountAccessList = sourceChains && sourceChains.length > 0
|
|
136
229
|
? {
|
|
137
|
-
chainIds:
|
|
230
|
+
chainIds: sourceChains.map((chain) => chain.id),
|
|
138
231
|
}
|
|
139
232
|
: undefined;
|
|
233
|
+
const { setupOps, delegations } = await getSetupOperationsAndDelegations(config, accountAddress, eip7702InitSignature);
|
|
140
234
|
const metaIntent = {
|
|
141
235
|
destinationChainId: targetChain.id,
|
|
142
236
|
tokenTransfers: tokenRequests.map((tokenRequest) => ({
|
|
143
|
-
tokenAddress: tokenRequest.address,
|
|
237
|
+
tokenAddress: (0, registry_1.resolveTokenAddress)(tokenRequest.address, targetChain.id),
|
|
144
238
|
amount: tokenRequest.amount,
|
|
145
239
|
})),
|
|
146
|
-
account:
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}
|
|
240
|
+
account: {
|
|
241
|
+
address: accountAddress,
|
|
242
|
+
accountType: 'ERC7579',
|
|
243
|
+
setupOps,
|
|
244
|
+
delegations,
|
|
245
|
+
},
|
|
246
|
+
destinationExecutions: calls,
|
|
152
247
|
destinationGasUnits: gasLimit,
|
|
153
248
|
accountAccessList,
|
|
154
|
-
|
|
155
|
-
|
|
249
|
+
options: {
|
|
250
|
+
topupCompact: false,
|
|
251
|
+
sponsorSettings: {
|
|
252
|
+
gasSponsored: isSponsored,
|
|
253
|
+
bridgeFeesSponsored: isSponsored,
|
|
254
|
+
swapFeesSponsored: isSponsored,
|
|
255
|
+
},
|
|
156
256
|
},
|
|
157
257
|
};
|
|
158
|
-
const orchestrator = getOrchestratorByChain(targetChain.id, config.rhinestoneApiKey);
|
|
258
|
+
const orchestrator = getOrchestratorByChain(targetChain.id, config.rhinestoneApiKey, config.useDev);
|
|
159
259
|
const intentRoute = await orchestrator.getIntentRoute(metaIntent);
|
|
160
|
-
const intentHash = (0, orchestrator_1.getIntentOpHash)(intentRoute.intentOp);
|
|
161
260
|
return {
|
|
162
261
|
type: 'intent',
|
|
163
262
|
intentRoute,
|
|
164
|
-
hash: intentHash,
|
|
165
263
|
};
|
|
166
264
|
}
|
|
167
|
-
async function signIntent(config,
|
|
265
|
+
async function signIntent(config, targetChain, intentOp, signers) {
|
|
168
266
|
const validator = getValidator(config, signers);
|
|
169
267
|
if (!validator) {
|
|
170
268
|
throw new Error('Validator not available');
|
|
171
269
|
}
|
|
172
270
|
const ownerValidator = (0, validators_1.getOwnerValidator)(config);
|
|
173
271
|
const isRoot = validator.address === ownerValidator.address;
|
|
174
|
-
const
|
|
175
|
-
|
|
176
|
-
throw new Error('No owners found');
|
|
177
|
-
}
|
|
178
|
-
const signature = await (0, accounts_1.getPackedSignature)(config, owners, sourceChain || targetChain, {
|
|
272
|
+
const typedData = (0, compact_1.getIntentData)(intentOp);
|
|
273
|
+
const signature = await (0, accounts_1.getTypedDataPackedSignature)(config, signers, targetChain, {
|
|
179
274
|
address: validator.address,
|
|
180
275
|
isRoot,
|
|
181
|
-
},
|
|
276
|
+
}, typedData);
|
|
182
277
|
return signature;
|
|
183
278
|
}
|
|
184
279
|
async function signUserOp(config, chain, signers, userOp) {
|
|
@@ -188,7 +283,7 @@ async function signUserOp(config, chain, signers, userOp) {
|
|
|
188
283
|
}
|
|
189
284
|
const publicClient = (0, viem_1.createPublicClient)({
|
|
190
285
|
chain,
|
|
191
|
-
transport: (0,
|
|
286
|
+
transport: (0, utils_1.createTransport)(chain, config.provider),
|
|
192
287
|
});
|
|
193
288
|
const account = await getValidatorAccount(config, signers, publicClient, chain);
|
|
194
289
|
if (!account) {
|
|
@@ -199,7 +294,7 @@ async function signUserOp(config, chain, signers, userOp) {
|
|
|
199
294
|
async function submitUserOp(config, chain, userOp, signature) {
|
|
200
295
|
const publicClient = (0, viem_1.createPublicClient)({
|
|
201
296
|
chain,
|
|
202
|
-
transport: (0,
|
|
297
|
+
transport: (0, utils_1.createTransport)(chain, config.provider),
|
|
203
298
|
});
|
|
204
299
|
const bundlerClient = (0, utils_1.getBundlerClient)(config, publicClient);
|
|
205
300
|
const hash = await bundlerClient.request({
|
|
@@ -232,37 +327,57 @@ async function submitUserOp(config, chain, userOp, signature) {
|
|
|
232
327
|
return {
|
|
233
328
|
type: 'userop',
|
|
234
329
|
hash,
|
|
235
|
-
|
|
236
|
-
targetChain: chain.id,
|
|
330
|
+
chain: chain.id,
|
|
237
331
|
};
|
|
238
332
|
}
|
|
239
|
-
async function submitIntent(config,
|
|
240
|
-
return submitIntentInternal(config,
|
|
333
|
+
async function submitIntent(config, sourceChains, targetChain, intentOp, signature, authorizations) {
|
|
334
|
+
return submitIntentInternal(config, sourceChains, targetChain, intentOp, signature, authorizations);
|
|
241
335
|
}
|
|
242
|
-
function getOrchestratorByChain(chainId, apiKey) {
|
|
243
|
-
const orchestratorUrl = (
|
|
336
|
+
function getOrchestratorByChain(chainId, apiKey, useDev) {
|
|
337
|
+
const orchestratorUrl = (useDev ?? false)
|
|
244
338
|
? consts_1.DEV_ORCHESTRATOR_URL
|
|
245
|
-
:
|
|
339
|
+
: (0, registry_1.isTestnet)(chainId)
|
|
340
|
+
? consts_1.STAGING_ORCHESTRATOR_URL
|
|
341
|
+
: consts_1.PROD_ORCHESTRATOR_URL;
|
|
246
342
|
return (0, orchestrator_1.getOrchestrator)(apiKey, orchestratorUrl);
|
|
247
343
|
}
|
|
248
|
-
async function
|
|
249
|
-
|
|
344
|
+
async function simulateIntent(config, sourceChains, targetChain, intentOp, signature, authorizations) {
|
|
345
|
+
return simulateIntentInternal(config, sourceChains, targetChain, intentOp, signature, authorizations);
|
|
346
|
+
}
|
|
347
|
+
function createSignedIntentOp(intentOp, signature, authorizations) {
|
|
348
|
+
return {
|
|
250
349
|
...intentOp,
|
|
251
350
|
originSignatures: Array(intentOp.elements.length).fill(signature),
|
|
252
351
|
destinationSignature: signature,
|
|
352
|
+
signedAuthorizations: authorizations.length > 0
|
|
353
|
+
? authorizations.map((authorization) => ({
|
|
354
|
+
chainId: authorization.chainId,
|
|
355
|
+
address: authorization.address,
|
|
356
|
+
nonce: authorization.nonce,
|
|
357
|
+
yParity: authorization.yParity ?? 0,
|
|
358
|
+
r: authorization.r,
|
|
359
|
+
s: authorization.s,
|
|
360
|
+
}))
|
|
361
|
+
: undefined,
|
|
253
362
|
};
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
const orchestrator = getOrchestratorByChain(targetChain.id, config.rhinestoneApiKey);
|
|
363
|
+
}
|
|
364
|
+
async function submitIntentInternal(config, sourceChains, targetChain, intentOp, signature, authorizations) {
|
|
365
|
+
const signedIntentOp = createSignedIntentOp(intentOp, signature, authorizations);
|
|
366
|
+
const orchestrator = getOrchestratorByChain(targetChain.id, config.rhinestoneApiKey, config.useDev);
|
|
258
367
|
const intentResults = await orchestrator.submitIntent(signedIntentOp);
|
|
259
368
|
return {
|
|
260
369
|
type: 'intent',
|
|
261
370
|
id: BigInt(intentResults.result.id),
|
|
262
|
-
|
|
371
|
+
sourceChains: sourceChains?.map((chain) => chain.id),
|
|
263
372
|
targetChain: targetChain.id,
|
|
264
373
|
};
|
|
265
374
|
}
|
|
375
|
+
async function simulateIntentInternal(config, _sourceChains, targetChain, intentOp, signature, authorizations) {
|
|
376
|
+
const signedIntentOp = createSignedIntentOp(intentOp, signature, authorizations);
|
|
377
|
+
const orchestrator = getOrchestratorByChain(targetChain.id, config.rhinestoneApiKey, config.useDev);
|
|
378
|
+
const simulationResults = await orchestrator.simulateIntent(signedIntentOp);
|
|
379
|
+
return simulationResults;
|
|
380
|
+
}
|
|
266
381
|
async function getValidatorAccount(config, signers, publicClient, chain) {
|
|
267
382
|
if (!signers) {
|
|
268
383
|
return undefined;
|
|
@@ -292,18 +407,18 @@ function getValidator(config, signers) {
|
|
|
292
407
|
if (withOwner) {
|
|
293
408
|
// ECDSA
|
|
294
409
|
if (withOwner.kind === 'ecdsa') {
|
|
295
|
-
return (0, core_1.getOwnableValidator)(
|
|
296
|
-
threshold: 1,
|
|
297
|
-
owners: withOwner.accounts.map((account) => account.address),
|
|
298
|
-
});
|
|
410
|
+
return (0, core_1.getOwnableValidator)(1, withOwner.accounts.map((account) => account.address));
|
|
299
411
|
}
|
|
300
412
|
// Passkeys (WebAuthn)
|
|
301
413
|
if (withOwner.kind === 'passkey') {
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
414
|
+
return (0, core_1.getWebAuthnValidator)(1, withOwner.accounts.map((account) => ({
|
|
415
|
+
pubKey: account.publicKey,
|
|
416
|
+
authenticatorId: account.id,
|
|
417
|
+
})));
|
|
418
|
+
}
|
|
419
|
+
// Multi-factor
|
|
420
|
+
if (withOwner.kind === 'multi-factor') {
|
|
421
|
+
return (0, core_1.getMultiFactorValidator)(1, withOwner.validators);
|
|
307
422
|
}
|
|
308
423
|
}
|
|
309
424
|
// Smart sessions
|
|
@@ -319,40 +434,50 @@ function getValidator(config, signers) {
|
|
|
319
434
|
// Fallback
|
|
320
435
|
return undefined;
|
|
321
436
|
}
|
|
322
|
-
function
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
}
|
|
336
|
-
// Passkeys (WebAuthn)
|
|
337
|
-
if (withOwner.kind === 'passkey') {
|
|
338
|
-
return {
|
|
339
|
-
type: 'passkey',
|
|
340
|
-
account: withOwner.account,
|
|
341
|
-
};
|
|
437
|
+
function parseCalls(calls, chainId) {
|
|
438
|
+
return calls.map((call) => ({
|
|
439
|
+
data: call.data ?? '0x',
|
|
440
|
+
value: call.value ?? 0n,
|
|
441
|
+
to: (0, registry_1.resolveTokenAddress)(call.to, chainId),
|
|
442
|
+
}));
|
|
443
|
+
}
|
|
444
|
+
async function getSetupOperationsAndDelegations(config, accountAddress, eip7702InitSignature) {
|
|
445
|
+
const initCode = (0, accounts_1.getInitCode)(config);
|
|
446
|
+
if (config.eoa) {
|
|
447
|
+
// EIP-7702 initialization is only needed for EOA accounts
|
|
448
|
+
if (!eip7702InitSignature || eip7702InitSignature === '0x') {
|
|
449
|
+
throw new Error('EIP-7702 initialization signature is required for EOA accounts');
|
|
342
450
|
}
|
|
451
|
+
const { initData: eip7702InitData, contract: eip7702Contract } = await (0, accounts_1.getEip7702InitCall)(config, eip7702InitSignature);
|
|
452
|
+
return {
|
|
453
|
+
setupOps: [
|
|
454
|
+
{
|
|
455
|
+
to: accountAddress,
|
|
456
|
+
data: eip7702InitData,
|
|
457
|
+
},
|
|
458
|
+
],
|
|
459
|
+
delegations: {
|
|
460
|
+
0: {
|
|
461
|
+
contract: eip7702Contract,
|
|
462
|
+
},
|
|
463
|
+
},
|
|
464
|
+
};
|
|
343
465
|
}
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
466
|
+
else if (initCode) {
|
|
467
|
+
// Contract account with init code
|
|
468
|
+
return {
|
|
469
|
+
setupOps: [
|
|
470
|
+
{
|
|
471
|
+
to: initCode.factory,
|
|
472
|
+
data: initCode.factoryData,
|
|
473
|
+
},
|
|
474
|
+
],
|
|
475
|
+
};
|
|
348
476
|
}
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
if (withGuardians) {
|
|
477
|
+
else {
|
|
478
|
+
// Already deployed contract account
|
|
352
479
|
return {
|
|
353
|
-
|
|
354
|
-
accounts: withGuardians.guardians,
|
|
480
|
+
setupOps: [],
|
|
355
481
|
};
|
|
356
482
|
}
|
|
357
|
-
return undefined;
|
|
358
483
|
}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,33 +1,35 @@
|
|
|
1
|
-
import type { Address, Chain, Hex } from 'viem';
|
|
2
|
-
import { UserOperationReceipt } from 'viem/account-abstraction';
|
|
1
|
+
import type { Address, Chain, HashTypedDataParameters, Hex, SignableMessage, SignedAuthorizationList, TypedData } from 'viem';
|
|
2
|
+
import type { UserOperationReceipt } from 'viem/account-abstraction';
|
|
3
3
|
import { AccountError, Eip7702AccountMustHaveEoaError, Eip7702NotSupportedForAccountError, ExistingEip7702AccountsNotSupportedError, FactoryArgsNotAvailableError, isAccountError, SigningNotSupportedForAccountError, SignMessageNotSupportedByAccountError, SmartSessionsNotEnabledError } from './accounts';
|
|
4
|
-
import { addOwner, changeThreshold, disableEcdsa, disablePasskeys, enableEcdsa, enablePasskeys, encodeSmartSessionSignature, recover, removeOwner,
|
|
4
|
+
import { addOwner, addPasskeyOwner, changeMultiFactorThreshold, changePasskeyThreshold, changeThreshold, disableEcdsa, disableMultiFactor, disablePasskeys, enableEcdsa, enableMultiFactor, enablePasskeys, encodeSmartSessionSignature, recover, recoverEcdsaOwnership, recoverPasskeyOwnership, removeOwner, removePasskeyOwner, removeSubValidator, setSubValidator, setUpRecovery } from './actions';
|
|
5
5
|
import type { TransactionResult } from './execution';
|
|
6
|
-
import { ExecutionError, IntentFailedError, isExecutionError, OrderPathRequiredForIntentsError, SessionChainRequiredError,
|
|
7
|
-
import { SessionDetails } from './execution/smart-session';
|
|
8
|
-
import { IntentData, PreparedTransactionData, SignedTransactionData } from './execution/utils';
|
|
9
|
-
import { IntentCost, IntentInput, IntentOp, IntentOpStatus, IntentResult, IntentRoute, Portfolio, SettlementSystem, SignedIntentOp } from './orchestrator';
|
|
10
|
-
import {
|
|
11
|
-
import type { Call, Execution, RhinestoneAccountConfig, Session, Transaction } from './types';
|
|
6
|
+
import { ExecutionError, IntentFailedError, isExecutionError, OrderPathRequiredForIntentsError, SessionChainRequiredError, SourceChainsNotAvailableForUserOpFlowError, UserOperationRequiredForSmartSessionsError } from './execution';
|
|
7
|
+
import { type SessionDetails } from './execution/smart-session';
|
|
8
|
+
import { type IntentData, type PreparedTransactionData, type SignedTransactionData } from './execution/utils';
|
|
9
|
+
import { AuthenticationRequiredError, getSupportedTokens, getTokenAddress, InsufficientBalanceError, type IntentCost, type IntentInput, IntentNotFoundError, type IntentOp, type IntentOpStatus, type IntentResult, type IntentRoute, InvalidApiKeyError, InvalidIntentSignatureError, isOrchestratorError, NoPathFoundError, OnlyOneTargetTokenAmountCanBeUnsetError, OrchestratorError, type Portfolio, type SettlementSystem, type SignedIntentOp, TokenNotSupportedError, UnsupportedChainError, UnsupportedChainIdError, UnsupportedTokenError } from './orchestrator';
|
|
10
|
+
import type { Call, RhinestoneAccountConfig, Session, SignerSet, Transaction } from './types';
|
|
12
11
|
interface RhinestoneAccount {
|
|
13
12
|
config: RhinestoneAccountConfig;
|
|
14
13
|
deploy: (chain: Chain, session?: Session) => Promise<void>;
|
|
14
|
+
signEip7702InitData: () => Promise<Hex>;
|
|
15
15
|
prepareTransaction: (transaction: Transaction) => Promise<PreparedTransactionData>;
|
|
16
16
|
signTransaction: (preparedTransaction: PreparedTransactionData) => Promise<SignedTransactionData>;
|
|
17
|
-
|
|
17
|
+
signAuthorizations: (preparedTransaction: PreparedTransactionData) => Promise<SignedAuthorizationList>;
|
|
18
|
+
signMessage: (message: SignableMessage, chain: Chain, signers: SignerSet | undefined) => Promise<Hex>;
|
|
19
|
+
signTypedData: <typedData extends TypedData | Record<string, unknown> = TypedData, primaryType extends keyof typedData | 'EIP712Domain' = keyof typedData>(parameters: HashTypedDataParameters<typedData, primaryType>, chain: Chain, signers: SignerSet | undefined) => Promise<Hex>;
|
|
20
|
+
submitTransaction: (signedTransaction: SignedTransactionData, authorizations?: SignedAuthorizationList) => Promise<TransactionResult>;
|
|
21
|
+
simulateTransaction: (signedTransaction: SignedTransactionData, authorizations?: SignedAuthorizationList) => Promise<IntentResult>;
|
|
18
22
|
sendTransaction: (transaction: Transaction) => Promise<TransactionResult>;
|
|
19
23
|
waitForExecution: (result: TransactionResult, acceptsPreconfirmations?: boolean) => Promise<IntentOpStatus | UserOperationReceipt>;
|
|
20
24
|
getAddress: () => Address;
|
|
21
25
|
getPortfolio: (onTestnets?: boolean) => Promise<Portfolio>;
|
|
22
|
-
getMaxSpendableAmount: (chain: Chain, tokenAddress: Address, gasUnits: bigint) => Promise<bigint>;
|
|
26
|
+
getMaxSpendableAmount: (chain: Chain, tokenAddress: Address, gasUnits: bigint, sponsored?: boolean) => Promise<bigint>;
|
|
23
27
|
getSessionDetails: (sessions: Session[], sessionIndex: number, signature?: Hex) => Promise<SessionDetails>;
|
|
24
|
-
areAttestersTrusted: (chain: Chain) => Promise<boolean>;
|
|
25
28
|
getOwners: (chain: Chain) => Promise<{
|
|
26
29
|
accounts: Address[];
|
|
27
30
|
threshold: number;
|
|
28
31
|
} | null>;
|
|
29
32
|
getValidators: (chain: Chain) => Promise<Address[]>;
|
|
30
|
-
deposit: (chain: Chain, amount: bigint, tokenAddress?: Address) => Promise<TransactionResult>;
|
|
31
33
|
}
|
|
32
34
|
/**
|
|
33
35
|
* Initialize a Rhinestone account
|
|
@@ -36,6 +38,6 @@ interface RhinestoneAccount {
|
|
|
36
38
|
* @returns account
|
|
37
39
|
*/
|
|
38
40
|
declare function createRhinestoneAccount(config: RhinestoneAccountConfig): Promise<RhinestoneAccount>;
|
|
39
|
-
export { createRhinestoneAccount, addOwner, changeThreshold, disableEcdsa, disablePasskeys, enableEcdsa, enablePasskeys, recover, removeOwner,
|
|
40
|
-
export type { RhinestoneAccount, Session, Call,
|
|
41
|
+
export { createRhinestoneAccount, addOwner, addPasskeyOwner, changeMultiFactorThreshold, changeThreshold, changePasskeyThreshold, disableEcdsa, disableMultiFactor, disablePasskeys, enableEcdsa, enableMultiFactor, enablePasskeys, encodeSmartSessionSignature, recover, recoverEcdsaOwnership, recoverPasskeyOwnership, removeOwner, removePasskeyOwner, removeSubValidator, setSubValidator, setUpRecovery, isAccountError, AccountError, Eip7702AccountMustHaveEoaError, ExistingEip7702AccountsNotSupportedError, FactoryArgsNotAvailableError, SmartSessionsNotEnabledError, SigningNotSupportedForAccountError, SignMessageNotSupportedByAccountError, Eip7702NotSupportedForAccountError, isExecutionError, IntentFailedError, ExecutionError, SourceChainsNotAvailableForUserOpFlowError, UserOperationRequiredForSmartSessionsError, OrderPathRequiredForIntentsError, SessionChainRequiredError, isOrchestratorError, AuthenticationRequiredError, InsufficientBalanceError, InvalidApiKeyError, InvalidIntentSignatureError, NoPathFoundError, OnlyOneTargetTokenAmountCanBeUnsetError, OrchestratorError, IntentNotFoundError, TokenNotSupportedError, UnsupportedChainError, UnsupportedChainIdError, UnsupportedTokenError, getSupportedTokens, getTokenAddress, };
|
|
42
|
+
export type { RhinestoneAccount, Session, Call, IntentData, PreparedTransactionData, SignedTransactionData, TransactionResult, IntentCost, IntentInput, IntentOp, IntentOpStatus, IntentResult, IntentRoute, SettlementSystem, SignedIntentOp, Portfolio, };
|
|
41
43
|
//# 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,
|
|
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,EACV,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AACpE,OAAO,EACL,YAAY,EAEZ,8BAA8B,EAC9B,kCAAkC,EAClC,wCAAwC,EACxC,4BAA4B,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