@charterlabs/rhinestone-sdk 0.2.7-dev.3 → 0.2.8
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 +46 -8
- package/dist/src/accounts/error.d.ts +38 -3
- package/dist/src/accounts/error.d.ts.map +1 -1
- package/dist/src/accounts/error.js +55 -7
- package/dist/src/accounts/index.d.ts +31 -20
- package/dist/src/accounts/index.d.ts.map +1 -1
- package/dist/src/accounts/index.js +231 -25
- package/dist/src/accounts/index.test.js +2 -4
- 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/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 +52 -0
- package/dist/src/accounts/kernel.d.ts +1 -1
- package/dist/src/accounts/kernel.d.ts.map +1 -1
- package/dist/src/accounts/kernel.js +29 -1
- package/dist/src/accounts/kernel.test.js +35 -8
- package/dist/src/accounts/nexus.d.ts +4 -3
- package/dist/src/accounts/nexus.d.ts.map +1 -1
- package/dist/src/accounts/nexus.js +82 -14
- package/dist/src/accounts/nexus.test.js +33 -6
- package/dist/src/accounts/passport.d.ts +12 -0
- package/dist/src/accounts/passport.d.ts.map +1 -0
- package/dist/src/accounts/passport.js +173 -0
- package/dist/src/accounts/safe.d.ts.map +1 -1
- package/dist/src/accounts/safe.js +85 -53
- package/dist/src/accounts/safe.test.js +33 -6
- package/dist/src/accounts/signing/common.d.ts +4 -4
- package/dist/src/accounts/signing/common.d.ts.map +1 -1
- package/dist/src/accounts/signing/common.js +21 -9
- package/dist/src/accounts/signing/message.d.ts +1 -1
- package/dist/src/accounts/signing/message.d.ts.map +1 -1
- package/dist/src/accounts/signing/message.js +6 -6
- package/dist/src/accounts/signing/passkeys.d.ts +8 -1
- package/dist/src/accounts/signing/passkeys.d.ts.map +1 -1
- package/dist/src/accounts/signing/passkeys.js +35 -0
- package/dist/src/accounts/signing/passkeys.test.js +15 -0
- package/dist/src/accounts/signing/typedData.d.ts.map +1 -1
- package/dist/src/accounts/signing/typedData.js +2 -2
- package/dist/src/accounts/startale.test.js +0 -4
- package/dist/src/accounts/utils.d.ts +4 -4
- package/dist/src/accounts/utils.d.ts.map +1 -1
- package/dist/src/accounts/utils.js +3 -40
- package/dist/src/accounts/walletClient.d.ts +7 -0
- package/dist/src/accounts/walletClient.d.ts.map +1 -0
- package/dist/src/accounts/walletClient.js +38 -0
- package/dist/src/actions/compact.d.ts +13 -0
- package/dist/src/actions/compact.d.ts.map +1 -0
- package/dist/src/actions/compact.js +210 -0
- package/dist/src/actions/ecdsa.d.ts +35 -0
- package/dist/src/actions/ecdsa.d.ts.map +1 -0
- package/dist/src/actions/ecdsa.js +114 -0
- package/dist/src/actions/ecdsa.test.d.ts +2 -0
- package/dist/src/actions/ecdsa.test.d.ts.map +1 -0
- package/dist/src/actions/ecdsa.test.js +99 -0
- package/dist/src/actions/index.d.ts +23 -166
- package/dist/src/actions/index.d.ts.map +1 -1
- package/dist/src/actions/index.js +25 -544
- package/dist/src/actions/mfa.d.ts +37 -0
- package/dist/src/actions/mfa.d.ts.map +1 -0
- package/dist/src/actions/mfa.js +133 -0
- package/dist/src/actions/passkeys.d.ts +37 -0
- package/dist/src/actions/passkeys.d.ts.map +1 -0
- package/dist/src/actions/passkeys.js +129 -0
- package/dist/src/actions/passkeys.test.d.ts +2 -0
- package/dist/src/actions/passkeys.test.d.ts.map +1 -0
- package/dist/src/actions/passkeys.test.js +54 -0
- package/dist/src/actions/recovery.d.ts +33 -0
- package/dist/src/actions/recovery.d.ts.map +1 -0
- package/dist/src/actions/recovery.js +193 -0
- package/dist/src/actions/recovery.test.d.ts +2 -0
- package/dist/src/actions/recovery.test.d.ts.map +1 -0
- package/dist/src/actions/recovery.test.js +168 -0
- package/dist/src/actions/smart-sessions.d.ts +23 -0
- package/dist/src/actions/smart-sessions.d.ts.map +1 -0
- package/dist/src/actions/{smart-session.js → smart-sessions.js} +13 -0
- package/dist/src/errors/index.d.ts +5 -0
- package/dist/src/errors/index.d.ts.map +1 -0
- package/dist/src/errors/index.js +50 -0
- package/dist/src/execution/compact.d.ts +25 -9
- package/dist/src/execution/compact.d.ts.map +1 -1
- package/dist/src/execution/compact.js +29 -103
- package/dist/src/execution/error.d.ts +6 -6
- package/dist/src/execution/error.d.ts.map +1 -1
- package/dist/src/execution/error.js +13 -13
- package/dist/src/execution/index.d.ts +34 -22
- package/dist/src/execution/index.d.ts.map +1 -1
- package/dist/src/execution/index.js +115 -46
- package/dist/src/execution/multiChainOps.d.ts +40 -0
- package/dist/src/execution/multiChainOps.d.ts.map +1 -0
- package/dist/src/execution/multiChainOps.js +39 -0
- package/dist/src/execution/permit2.d.ts +148 -0
- package/dist/src/execution/permit2.d.ts.map +1 -0
- package/dist/src/execution/permit2.js +291 -0
- package/dist/src/execution/smart-session.d.ts +3 -3
- package/dist/src/execution/smart-session.d.ts.map +1 -1
- package/dist/src/execution/smart-session.js +3 -3
- package/dist/src/execution/types.d.ts +36 -0
- package/dist/src/execution/types.d.ts.map +1 -0
- package/dist/src/execution/types.js +2 -0
- package/dist/src/execution/utils.d.ts +43 -28
- package/dist/src/execution/utils.d.ts.map +1 -1
- package/dist/src/execution/utils.js +269 -99
- package/dist/src/index.d.ts +38 -19
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +121 -69
- package/dist/src/modules/common.d.ts +10 -4
- package/dist/src/modules/common.d.ts.map +1 -1
- package/dist/src/modules/common.js +22 -1
- package/dist/src/modules/index.d.ts +3 -2
- package/dist/src/modules/index.d.ts.map +1 -1
- package/dist/src/modules/index.js +16 -13
- package/dist/src/modules/index.test.js +9 -12
- package/dist/src/modules/read.d.ts.map +1 -1
- package/dist/src/modules/read.js +5 -1
- package/dist/src/modules/validators/core.d.ts +5 -3
- package/dist/src/modules/validators/core.d.ts.map +1 -1
- package/dist/src/modules/validators/core.js +29 -10
- package/dist/src/modules/validators/core.test.js +4 -4
- package/dist/src/modules/validators/smart-sessions.d.ts +4 -4
- package/dist/src/modules/validators/smart-sessions.d.ts.map +1 -1
- package/dist/src/modules/validators/smart-sessions.js +10 -72
- package/dist/src/modules/validators/smart-sessions.test.js +4 -8
- package/dist/src/modules/validators/webauthn-contract.d.ts.map +1 -1
- package/dist/src/orchestrator/client.d.ts +4 -2
- package/dist/src/orchestrator/client.d.ts.map +1 -1
- package/dist/src/orchestrator/client.js +230 -162
- package/dist/src/orchestrator/consts.d.ts +1 -2
- package/dist/src/orchestrator/consts.d.ts.map +1 -1
- package/dist/src/orchestrator/consts.js +1 -3
- package/dist/src/orchestrator/error.d.ts +111 -1
- package/dist/src/orchestrator/error.d.ts.map +1 -1
- package/dist/src/orchestrator/error.js +128 -1
- package/dist/src/orchestrator/index.d.ts +4 -4
- package/dist/src/orchestrator/index.d.ts.map +1 -1
- package/dist/src/orchestrator/index.js +16 -1
- package/dist/src/orchestrator/registry.d.ts +3 -25
- package/dist/src/orchestrator/registry.d.ts.map +1 -1
- package/dist/src/orchestrator/registry.js +82 -46
- package/dist/src/orchestrator/registry.test.js +7 -7
- package/dist/src/orchestrator/types.d.ts +53 -43
- package/dist/src/orchestrator/types.d.ts.map +1 -1
- package/dist/src/types.d.ts +74 -9
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/index.d.ts +3 -0
- package/dist/src/utils/index.d.ts.map +1 -0
- package/dist/src/utils/index.js +5 -0
- package/package.json +73 -2
- package/dist/src/actions/index.test.d.ts +0 -2
- package/dist/src/actions/index.test.d.ts.map +0 -1
- package/dist/src/actions/index.test.js +0 -302
- package/dist/src/actions/smart-session.d.ts +0 -11
- package/dist/src/actions/smart-session.d.ts.map +0 -1
- package/dist/src/orchestrator/registry.json +0 -365
|
@@ -7,16 +7,22 @@ exports.signAuthorizationsInternal = signAuthorizationsInternal;
|
|
|
7
7
|
exports.signMessage = signMessage;
|
|
8
8
|
exports.signTypedData = signTypedData;
|
|
9
9
|
exports.submitTransaction = submitTransaction;
|
|
10
|
+
exports.prepareUserOperation = prepareUserOperation;
|
|
11
|
+
exports.signUserOperation = signUserOperation;
|
|
12
|
+
exports.submitUserOperation = submitUserOperation;
|
|
10
13
|
exports.getOrchestratorByChain = getOrchestratorByChain;
|
|
11
14
|
exports.signIntent = signIntent;
|
|
12
15
|
exports.prepareTransactionAsIntent = prepareTransactionAsIntent;
|
|
13
16
|
exports.submitIntentInternal = submitIntentInternal;
|
|
14
17
|
exports.getValidatorAccount = getValidatorAccount;
|
|
15
18
|
exports.parseCalls = parseCalls;
|
|
19
|
+
exports.getTokenRequests = getTokenRequests;
|
|
20
|
+
exports.resolveCallInputs = resolveCallInputs;
|
|
16
21
|
const viem_1 = require("viem");
|
|
17
22
|
const account_abstraction_1 = require("viem/account-abstraction");
|
|
18
23
|
const accounts_1 = require("../accounts");
|
|
19
24
|
const utils_1 = require("../accounts/utils");
|
|
25
|
+
const modules_1 = require("../modules");
|
|
20
26
|
const validators_1 = require("../modules/validators");
|
|
21
27
|
const core_1 = require("../modules/validators/core");
|
|
22
28
|
const orchestrator_1 = require("../orchestrator");
|
|
@@ -24,51 +30,76 @@ const consts_1 = require("../orchestrator/consts");
|
|
|
24
30
|
const registry_1 = require("../orchestrator/registry");
|
|
25
31
|
const compact_1 = require("./compact");
|
|
26
32
|
const error_1 = require("./error");
|
|
33
|
+
const multiChainOps_1 = require("./multiChainOps");
|
|
34
|
+
const permit2_1 = require("./permit2");
|
|
27
35
|
async function prepareTransaction(config, transaction) {
|
|
28
|
-
const { sourceChains, targetChain, tokenRequests, signers, sponsored, eip7702InitSignature, } = getTransactionParams(transaction);
|
|
36
|
+
const { sourceChains, targetChain, tokenRequests, signers, sponsored, eip7702InitSignature, settlementLayers, sourceAssets, feeAsset, lockFunds, account, } = getTransactionParams(transaction);
|
|
29
37
|
const accountAddress = (0, accounts_1.getAddress)(config);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
if (sourceChains && sourceChains.length > 0) {
|
|
34
|
-
throw new error_1.SourceChainsNotAvailableForUserOpFlowError();
|
|
35
|
-
}
|
|
36
|
-
// Smart sessions require a UserOp flow
|
|
37
|
-
data = await prepareTransactionAsUserOp(config, targetChain, transaction.calls, signers);
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
data = await prepareTransactionAsIntent(config, sourceChains, targetChain, transaction.calls, transaction.gasLimit, tokenRequests, accountAddress, sponsored ?? false, eip7702InitSignature);
|
|
38
|
+
const isUserOpSigner = signers?.type === 'guardians' || signers?.type === 'session';
|
|
39
|
+
if (isUserOpSigner) {
|
|
40
|
+
throw new error_1.SignerNotSupportedError();
|
|
41
41
|
}
|
|
42
|
+
const intentRoute = await prepareTransactionAsIntent(config, sourceChains, targetChain, await resolveCallInputs(transaction.calls, config, targetChain, accountAddress), transaction.gasLimit, tokenRequests, accountAddress, sponsored ?? false, eip7702InitSignature, settlementLayers, sourceAssets, feeAsset, lockFunds, account);
|
|
42
43
|
return {
|
|
43
|
-
|
|
44
|
+
intentRoute,
|
|
44
45
|
transaction,
|
|
45
46
|
};
|
|
46
47
|
}
|
|
47
|
-
async function
|
|
48
|
-
const
|
|
49
|
-
const
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
48
|
+
async function prepareUserOperation(config, transaction) {
|
|
49
|
+
const chain = transaction.chain;
|
|
50
|
+
const signers = transaction.signers;
|
|
51
|
+
const accountAddress = (0, accounts_1.getAddress)(config);
|
|
52
|
+
const data = await prepareTransactionAsUserOp(config, chain, await resolveCallInputs(transaction.calls, config, chain, accountAddress), signers, transaction.gasLimit);
|
|
53
|
+
return {
|
|
54
|
+
userOperation: data.userOp,
|
|
55
|
+
hash: data.hash,
|
|
56
|
+
transaction,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
async function resolveCallInputs(inputs, config, chain, accountAddress) {
|
|
60
|
+
const resolved = [];
|
|
61
|
+
for (const intent of inputs) {
|
|
62
|
+
if ('resolve' in intent) {
|
|
63
|
+
const result = await intent.resolve({ config, chain, accountAddress });
|
|
64
|
+
if (Array.isArray(result)) {
|
|
65
|
+
resolved.push(...result);
|
|
66
|
+
}
|
|
67
|
+
else if (result) {
|
|
68
|
+
resolved.push(result);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
resolved.push(intent);
|
|
57
73
|
}
|
|
58
|
-
// Smart sessions require a UserOp flow
|
|
59
|
-
signature = await signUserOp(config, chain, signers, userOp);
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
signature = await signIntent(config, targetChain, data.intentRoute.intentOp, signers);
|
|
63
74
|
}
|
|
75
|
+
return resolved;
|
|
76
|
+
}
|
|
77
|
+
async function signTransaction(config, preparedTransaction) {
|
|
78
|
+
const { targetChain, signers } = getTransactionParams(preparedTransaction.transaction);
|
|
79
|
+
const intentRoute = preparedTransaction.intentRoute;
|
|
80
|
+
const { originSignatures, destinationSignature } = await signIntent(config, targetChain, intentRoute.intentOp, signers);
|
|
64
81
|
return {
|
|
65
|
-
|
|
82
|
+
intentRoute,
|
|
66
83
|
transaction: preparedTransaction.transaction,
|
|
84
|
+
originSignatures,
|
|
85
|
+
destinationSignature,
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
async function signUserOperation(config, preparedUserOperation) {
|
|
89
|
+
const chain = preparedUserOperation.transaction.chain;
|
|
90
|
+
const userOp = preparedUserOperation.userOperation;
|
|
91
|
+
const signers = preparedUserOperation.transaction.signers;
|
|
92
|
+
// Smart sessions require a UserOp flow
|
|
93
|
+
const signature = await signUserOp(config, chain, signers, userOp);
|
|
94
|
+
return {
|
|
95
|
+
userOperation: preparedUserOperation.userOperation,
|
|
96
|
+
hash: preparedUserOperation.hash,
|
|
97
|
+
transaction: preparedUserOperation.transaction,
|
|
67
98
|
signature,
|
|
68
99
|
};
|
|
69
100
|
}
|
|
70
101
|
async function signAuthorizations(config, preparedTransaction) {
|
|
71
|
-
return await signAuthorizationsInternal(config, preparedTransaction.
|
|
102
|
+
return await signAuthorizationsInternal(config, preparedTransaction.intentRoute);
|
|
72
103
|
}
|
|
73
104
|
async function signMessage(config, message, chain, signers) {
|
|
74
105
|
const validator = getValidator(config, signers);
|
|
@@ -103,9 +134,8 @@ async function signAuthorizationsInternal(config, data) {
|
|
|
103
134
|
throw new Error('EIP-7702 initialization is required for EOA accounts');
|
|
104
135
|
}
|
|
105
136
|
const accountAddress = (0, accounts_1.getAddress)(config);
|
|
106
|
-
const requiredDelegations =
|
|
107
|
-
? data.
|
|
108
|
-
{}
|
|
137
|
+
const requiredDelegations = 'intentOp' in data
|
|
138
|
+
? data.intentOp.signedMetadata.account.requiredDelegations || {}
|
|
109
139
|
: {};
|
|
110
140
|
const authorizations = [];
|
|
111
141
|
for (const chainId in requiredDelegations) {
|
|
@@ -134,26 +164,18 @@ async function signAuthorizationsInternal(config, data) {
|
|
|
134
164
|
}
|
|
135
165
|
return authorizations;
|
|
136
166
|
}
|
|
137
|
-
async function submitTransaction(config, signedTransaction, authorizations) {
|
|
138
|
-
const {
|
|
167
|
+
async function submitTransaction(config, signedTransaction, authorizations, dryRun = false) {
|
|
168
|
+
const { intentRoute, transaction, originSignatures, destinationSignature } = signedTransaction;
|
|
139
169
|
const { sourceChains, targetChain } = getTransactionParams(transaction);
|
|
140
|
-
const
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
}
|
|
150
|
-
else {
|
|
151
|
-
const intentOp = data.intentRoute.intentOp;
|
|
152
|
-
if (!intentOp) {
|
|
153
|
-
throw new error_1.OrderPathRequiredForIntentsError();
|
|
154
|
-
}
|
|
155
|
-
return await submitIntent(config, sourceChains, targetChain, intentOp, signature, authorizations);
|
|
156
|
-
}
|
|
170
|
+
const intentOp = intentRoute.intentOp;
|
|
171
|
+
return await submitIntent(config, sourceChains, targetChain, intentOp, originSignatures, destinationSignature, authorizations, dryRun);
|
|
172
|
+
}
|
|
173
|
+
async function submitUserOperation(config, signedUserOperation) {
|
|
174
|
+
const chain = signedUserOperation.transaction.chain;
|
|
175
|
+
const userOp = signedUserOperation.userOperation;
|
|
176
|
+
const signature = signedUserOperation.signature;
|
|
177
|
+
// Smart sessions require a UserOp flow
|
|
178
|
+
return await submitUserOp(config, chain, userOp, signature);
|
|
157
179
|
}
|
|
158
180
|
function getTransactionParams(transaction) {
|
|
159
181
|
const sourceChains = 'chain' in transaction ? [transaction.chain] : transaction.sourceChains;
|
|
@@ -162,15 +184,13 @@ function getTransactionParams(transaction) {
|
|
|
162
184
|
const signers = transaction.signers;
|
|
163
185
|
const eip7702InitSignature = transaction.eip7702InitSignature;
|
|
164
186
|
const sponsored = transaction.sponsored;
|
|
165
|
-
|
|
166
|
-
const
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
]
|
|
173
|
-
: initialTokenRequests;
|
|
187
|
+
const gasLimit = transaction.gasLimit;
|
|
188
|
+
const settlementLayers = transaction.settlementLayers;
|
|
189
|
+
const sourceAssets = transaction.sourceAssets;
|
|
190
|
+
const feeAsset = transaction.feeAsset;
|
|
191
|
+
const lockFunds = transaction.lockFunds;
|
|
192
|
+
const account = transaction.experimental_accountOverride;
|
|
193
|
+
const tokenRequests = getTokenRequests(sourceChains || [], targetChain, initialTokenRequests, settlementLayers);
|
|
174
194
|
return {
|
|
175
195
|
sourceChains,
|
|
176
196
|
targetChain,
|
|
@@ -178,9 +198,33 @@ function getTransactionParams(transaction) {
|
|
|
178
198
|
signers,
|
|
179
199
|
sponsored,
|
|
180
200
|
eip7702InitSignature,
|
|
201
|
+
gasLimit,
|
|
202
|
+
settlementLayers,
|
|
203
|
+
sourceAssets,
|
|
204
|
+
feeAsset,
|
|
205
|
+
lockFunds,
|
|
206
|
+
account,
|
|
181
207
|
};
|
|
182
208
|
}
|
|
183
|
-
|
|
209
|
+
function getTokenRequests(sourceChains, targetChain, initialTokenRequests, settlementLayers) {
|
|
210
|
+
if (initialTokenRequests) {
|
|
211
|
+
validateTokenSymbols(targetChain, initialTokenRequests.map((tokenRequest) => tokenRequest.address));
|
|
212
|
+
}
|
|
213
|
+
// Across requires passing some value to repay the solvers
|
|
214
|
+
const defaultTokenRequest = {
|
|
215
|
+
address: viem_1.zeroAddress,
|
|
216
|
+
amount: 1n,
|
|
217
|
+
};
|
|
218
|
+
const isSameChain = (settlementLayers?.length === 1 && settlementLayers[0] === 'SAME_CHAIN') ||
|
|
219
|
+
(sourceChains.length === 1 && sourceChains[0].id === targetChain.id);
|
|
220
|
+
const tokenRequests = !initialTokenRequests || initialTokenRequests.length === 0
|
|
221
|
+
? isSameChain
|
|
222
|
+
? []
|
|
223
|
+
: [defaultTokenRequest]
|
|
224
|
+
: initialTokenRequests;
|
|
225
|
+
return tokenRequests;
|
|
226
|
+
}
|
|
227
|
+
async function prepareTransactionAsUserOp(config, chain, callInputs, signers, gasLimit) {
|
|
184
228
|
const publicClient = (0, viem_1.createPublicClient)({
|
|
185
229
|
chain,
|
|
186
230
|
transport: (0, utils_1.createTransport)(chain, config.provider),
|
|
@@ -194,9 +238,9 @@ async function prepareTransactionAsUserOp(config, chain, callInputs, signers) {
|
|
|
194
238
|
const userOp = await bundlerClient.prepareUserOperation({
|
|
195
239
|
account: validatorAccount,
|
|
196
240
|
calls,
|
|
241
|
+
callGasLimit: gasLimit,
|
|
197
242
|
});
|
|
198
243
|
return {
|
|
199
|
-
type: 'userop',
|
|
200
244
|
userOp,
|
|
201
245
|
hash: (0, account_abstraction_1.getUserOperationHash)({
|
|
202
246
|
userOperation: userOp,
|
|
@@ -206,14 +250,19 @@ async function prepareTransactionAsUserOp(config, chain, callInputs, signers) {
|
|
|
206
250
|
}),
|
|
207
251
|
};
|
|
208
252
|
}
|
|
209
|
-
async function prepareTransactionAsIntent(config, sourceChains, targetChain, callInputs, gasLimit, tokenRequests, accountAddress, isSponsored, eip7702InitSignature) {
|
|
253
|
+
async function prepareTransactionAsIntent(config, sourceChains, targetChain, callInputs, gasLimit, tokenRequests, accountAddress, isSponsored, eip7702InitSignature, settlementLayers, sourceAssets, feeAsset, lockFunds, account) {
|
|
210
254
|
const calls = parseCalls(callInputs, targetChain.id);
|
|
211
|
-
const accountAccessList = sourceChains
|
|
212
|
-
? {
|
|
213
|
-
chainIds: sourceChains.map((chain) => chain.id),
|
|
214
|
-
}
|
|
215
|
-
: undefined;
|
|
255
|
+
const accountAccessList = createAccountAccessList(sourceChains, sourceAssets);
|
|
216
256
|
const { setupOps, delegations } = await getSetupOperationsAndDelegations(config, accountAddress, eip7702InitSignature);
|
|
257
|
+
const getAccountType = (config) => {
|
|
258
|
+
if (config.account?.type === 'eoa') {
|
|
259
|
+
return 'EOA';
|
|
260
|
+
}
|
|
261
|
+
else {
|
|
262
|
+
return 'ERC7579';
|
|
263
|
+
}
|
|
264
|
+
};
|
|
265
|
+
const accountType = getAccountType(config);
|
|
217
266
|
const metaIntent = {
|
|
218
267
|
destinationChainId: targetChain.id,
|
|
219
268
|
tokenTransfers: tokenRequests.map((tokenRequest) => ({
|
|
@@ -222,42 +271,124 @@ async function prepareTransactionAsIntent(config, sourceChains, targetChain, cal
|
|
|
222
271
|
})),
|
|
223
272
|
account: {
|
|
224
273
|
address: accountAddress,
|
|
225
|
-
accountType:
|
|
226
|
-
setupOps,
|
|
274
|
+
accountType: accountType,
|
|
275
|
+
setupOps: account?.setupOps ?? setupOps,
|
|
227
276
|
delegations,
|
|
228
277
|
},
|
|
229
|
-
destinationExecutions: calls
|
|
278
|
+
destinationExecutions: calls.map((call) => ({
|
|
279
|
+
to: call.to,
|
|
280
|
+
value: call.value.toString(),
|
|
281
|
+
data: call.data,
|
|
282
|
+
})),
|
|
230
283
|
destinationGasUnits: gasLimit,
|
|
231
284
|
accountAccessList,
|
|
232
285
|
options: {
|
|
233
|
-
topupCompact: false,
|
|
286
|
+
topupCompact: lockFunds ?? false,
|
|
287
|
+
feeToken: feeAsset,
|
|
234
288
|
sponsorSettings: {
|
|
235
289
|
gasSponsored: isSponsored,
|
|
236
290
|
bridgeFeesSponsored: isSponsored,
|
|
237
291
|
swapFeesSponsored: isSponsored,
|
|
238
292
|
},
|
|
293
|
+
settlementLayers,
|
|
239
294
|
},
|
|
240
295
|
};
|
|
241
|
-
const orchestrator = getOrchestratorByChain(targetChain.id, config.
|
|
296
|
+
const orchestrator = getOrchestratorByChain(targetChain.id, config.apiKey, config.endpointUrl);
|
|
242
297
|
const intentRoute = await orchestrator.getIntentRoute(metaIntent);
|
|
243
|
-
return
|
|
244
|
-
type: 'intent',
|
|
245
|
-
intentRoute,
|
|
246
|
-
};
|
|
298
|
+
return intentRoute;
|
|
247
299
|
}
|
|
248
300
|
async function signIntent(config, targetChain, intentOp, signers) {
|
|
301
|
+
if (config.account?.type === 'eoa') {
|
|
302
|
+
const originSignatures = [];
|
|
303
|
+
for (const element of intentOp.elements) {
|
|
304
|
+
let digest;
|
|
305
|
+
if (config.eoa?.signTypedData) {
|
|
306
|
+
const typedData = (0, permit2_1.getTypedData)(element, BigInt(intentOp.nonce), BigInt(intentOp.expires));
|
|
307
|
+
originSignatures.push(await config.eoa.signTypedData(typedData));
|
|
308
|
+
}
|
|
309
|
+
else if (config.eoa?.sign) {
|
|
310
|
+
digest = (0, compact_1.getPermit2Digest)(element, BigInt(intentOp.nonce), BigInt(intentOp.expires));
|
|
311
|
+
originSignatures.push(await config.eoa.sign({ hash: digest }));
|
|
312
|
+
}
|
|
313
|
+
else if (config.eoa?.signMessage) {
|
|
314
|
+
digest = (0, compact_1.getPermit2Digest)(element, BigInt(intentOp.nonce), BigInt(intentOp.expires));
|
|
315
|
+
originSignatures.push(await config.eoa.signMessage({
|
|
316
|
+
message: { raw: digest },
|
|
317
|
+
}));
|
|
318
|
+
}
|
|
319
|
+
else {
|
|
320
|
+
throw new accounts_1.EoaSigningMethodNotConfiguredError('signTypedData, sign, or signMessage');
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
return {
|
|
324
|
+
originSignatures,
|
|
325
|
+
destinationSignature: originSignatures[0],
|
|
326
|
+
};
|
|
327
|
+
}
|
|
249
328
|
const validator = getValidator(config, signers);
|
|
250
329
|
if (!validator) {
|
|
251
330
|
throw new Error('Validator not available');
|
|
252
331
|
}
|
|
253
332
|
const ownerValidator = (0, validators_1.getOwnerValidator)(config);
|
|
254
333
|
const isRoot = validator.address === ownerValidator.address;
|
|
255
|
-
const
|
|
256
|
-
|
|
334
|
+
const signatures = await getIntentSignature(config, intentOp, signers, targetChain, validator, isRoot);
|
|
335
|
+
return signatures;
|
|
336
|
+
}
|
|
337
|
+
async function getIntentSignature(config, intentOp, signers, targetChain, validator, isRoot) {
|
|
338
|
+
const withJitFlow = intentOp.elements.some((element) => element.mandate.qualifier.settlementContext?.usingJIT);
|
|
339
|
+
const withMultiChainOps = intentOp.elements.some((element) => element.mandate.qualifier.settlementContext.settlementLayer ===
|
|
340
|
+
'INTENT_EXECUTOR');
|
|
341
|
+
if (withMultiChainOps) {
|
|
342
|
+
const signature = await getMultiChainOpsSignature(config, intentOp, signers, targetChain, validator, isRoot);
|
|
343
|
+
return {
|
|
344
|
+
originSignatures: Array(intentOp.elements.length).fill(signature),
|
|
345
|
+
destinationSignature: signature,
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
if (withJitFlow) {
|
|
349
|
+
return await getPermit2Signatures(config, intentOp, signers, targetChain, validator, isRoot);
|
|
350
|
+
}
|
|
351
|
+
const signature = await getCompactSignature(config, intentOp, signers, targetChain, validator, isRoot);
|
|
352
|
+
return {
|
|
353
|
+
originSignatures: Array(intentOp.elements.length).fill(signature),
|
|
354
|
+
destinationSignature: signature,
|
|
355
|
+
};
|
|
356
|
+
}
|
|
357
|
+
async function getMultiChainOpsSignature(config, intentOp, signers, targetChain, validator, isRoot) {
|
|
358
|
+
const address = (0, accounts_1.getAddress)(config);
|
|
359
|
+
const intentExecutor = (0, modules_1.getIntentExecutor)(config);
|
|
360
|
+
const typedData = (0, multiChainOps_1.getTypedData)(address, intentExecutor.address, intentOp);
|
|
361
|
+
const signature = await signIntentTypedData(config, signers, targetChain, validator, isRoot, typedData);
|
|
362
|
+
return signature;
|
|
363
|
+
}
|
|
364
|
+
async function getPermit2Signatures(config, intentOp, signers, targetChain, validator, isRoot) {
|
|
365
|
+
const originSignatures = [];
|
|
366
|
+
for (const element of intentOp.elements) {
|
|
367
|
+
const typedData = (0, permit2_1.getTypedData)(element, BigInt(intentOp.nonce), BigInt(intentOp.expires));
|
|
368
|
+
const signature = await signIntentTypedData(config, signers, targetChain, validator, isRoot, typedData);
|
|
369
|
+
originSignatures.push(signature);
|
|
370
|
+
}
|
|
371
|
+
return {
|
|
372
|
+
originSignatures,
|
|
373
|
+
destinationSignature: originSignatures[0],
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
async function getCompactSignature(config, intentOp, signers, targetChain, validator, isRoot) {
|
|
377
|
+
const typedData = (0, compact_1.getCompactTypedData)(intentOp);
|
|
378
|
+
return await signIntentTypedData(config, signers, targetChain, validator, isRoot, typedData);
|
|
379
|
+
}
|
|
380
|
+
async function signIntentTypedData(config, signers, targetChain, validator, isRoot, parameters) {
|
|
381
|
+
if ((0, core_1.supportsEip712)(validator)) {
|
|
382
|
+
return await (0, accounts_1.getTypedDataPackedSignature)(config, signers, targetChain, {
|
|
383
|
+
address: validator.address,
|
|
384
|
+
isRoot,
|
|
385
|
+
}, parameters);
|
|
386
|
+
}
|
|
387
|
+
const hash = (0, viem_1.hashTypedData)(parameters);
|
|
388
|
+
return await (0, accounts_1.getPackedSignature)(config, signers, targetChain, {
|
|
257
389
|
address: validator.address,
|
|
258
390
|
isRoot,
|
|
259
|
-
},
|
|
260
|
-
return signature;
|
|
391
|
+
}, hash);
|
|
261
392
|
}
|
|
262
393
|
async function signUserOp(config, chain, signers, userOp) {
|
|
263
394
|
const validator = getValidator(config, signers);
|
|
@@ -313,22 +444,23 @@ async function submitUserOp(config, chain, userOp, signature) {
|
|
|
313
444
|
chain: chain.id,
|
|
314
445
|
};
|
|
315
446
|
}
|
|
316
|
-
async function submitIntent(config, sourceChains, targetChain, intentOp,
|
|
317
|
-
return submitIntentInternal(config, sourceChains, targetChain, intentOp,
|
|
447
|
+
async function submitIntent(config, sourceChains, targetChain, intentOp, originSignatures, destinationSignature, authorizations, dryRun) {
|
|
448
|
+
return submitIntentInternal(config, sourceChains, targetChain, intentOp, originSignatures, destinationSignature, authorizations, dryRun);
|
|
318
449
|
}
|
|
319
|
-
function getOrchestratorByChain(chainId, apiKey,
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
450
|
+
function getOrchestratorByChain(chainId, apiKey, orchestratorUrl) {
|
|
451
|
+
if (orchestratorUrl) {
|
|
452
|
+
return (0, orchestrator_1.getOrchestrator)(apiKey, orchestratorUrl);
|
|
453
|
+
}
|
|
454
|
+
const defaultOrchestratorUrl = (0, registry_1.isTestnet)(chainId)
|
|
455
|
+
? consts_1.STAGING_ORCHESTRATOR_URL
|
|
456
|
+
: consts_1.PROD_ORCHESTRATOR_URL;
|
|
457
|
+
return (0, orchestrator_1.getOrchestrator)(apiKey, defaultOrchestratorUrl);
|
|
326
458
|
}
|
|
327
|
-
|
|
328
|
-
|
|
459
|
+
function createSignedIntentOp(intentOp, originSignatures, destinationSignature, authorizations) {
|
|
460
|
+
return {
|
|
329
461
|
...intentOp,
|
|
330
|
-
originSignatures
|
|
331
|
-
destinationSignature
|
|
462
|
+
originSignatures,
|
|
463
|
+
destinationSignature,
|
|
332
464
|
signedAuthorizations: authorizations.length > 0
|
|
333
465
|
? authorizations.map((authorization) => ({
|
|
334
466
|
chainId: authorization.chainId,
|
|
@@ -340,8 +472,11 @@ async function submitIntentInternal(config, sourceChains, targetChain, intentOp,
|
|
|
340
472
|
}))
|
|
341
473
|
: undefined,
|
|
342
474
|
};
|
|
343
|
-
|
|
344
|
-
|
|
475
|
+
}
|
|
476
|
+
async function submitIntentInternal(config, sourceChains, targetChain, intentOp, originSignatures, destinationSignature, authorizations, dryRun) {
|
|
477
|
+
const signedIntentOp = createSignedIntentOp(intentOp, originSignatures, destinationSignature, authorizations);
|
|
478
|
+
const orchestrator = getOrchestratorByChain(targetChain.id, config.apiKey, config.endpointUrl);
|
|
479
|
+
const intentResults = await orchestrator.submitIntent(signedIntentOp, dryRun);
|
|
345
480
|
return {
|
|
346
481
|
type: 'intent',
|
|
347
482
|
id: BigInt(intentResults.result.id),
|
|
@@ -351,7 +486,7 @@ async function submitIntentInternal(config, sourceChains, targetChain, intentOp,
|
|
|
351
486
|
}
|
|
352
487
|
async function getValidatorAccount(config, signers, publicClient, chain) {
|
|
353
488
|
if (!signers) {
|
|
354
|
-
return
|
|
489
|
+
return (0, accounts_1.getSmartAccount)(config, publicClient, chain);
|
|
355
490
|
}
|
|
356
491
|
// Owners
|
|
357
492
|
const withOwner = signers.type === 'owner' ? signers : null;
|
|
@@ -412,9 +547,28 @@ function parseCalls(calls, chainId) {
|
|
|
412
547
|
to: (0, registry_1.resolveTokenAddress)(call.to, chainId),
|
|
413
548
|
}));
|
|
414
549
|
}
|
|
550
|
+
function createAccountAccessList(sourceChains, sourceAssets) {
|
|
551
|
+
if (!sourceChains && !sourceAssets)
|
|
552
|
+
return undefined;
|
|
553
|
+
const chainIds = sourceChains?.map((chain) => chain.id);
|
|
554
|
+
if (!sourceAssets) {
|
|
555
|
+
return { chainIds };
|
|
556
|
+
}
|
|
557
|
+
if (Array.isArray(sourceAssets)) {
|
|
558
|
+
return chainIds
|
|
559
|
+
? { chainIds, tokens: sourceAssets }
|
|
560
|
+
: { tokens: sourceAssets };
|
|
561
|
+
}
|
|
562
|
+
return { chainTokens: sourceAssets };
|
|
563
|
+
}
|
|
415
564
|
async function getSetupOperationsAndDelegations(config, accountAddress, eip7702InitSignature) {
|
|
416
565
|
const initCode = (0, accounts_1.getInitCode)(config);
|
|
417
|
-
if (config.eoa) {
|
|
566
|
+
if (config.account?.type === 'eoa') {
|
|
567
|
+
return {
|
|
568
|
+
setupOps: [],
|
|
569
|
+
};
|
|
570
|
+
}
|
|
571
|
+
else if ((0, accounts_1.is7702)(config)) {
|
|
418
572
|
// EIP-7702 initialization is only needed for EOA accounts
|
|
419
573
|
if (!eip7702InitSignature || eip7702InitSignature === '0x') {
|
|
420
574
|
throw new Error('EIP-7702 initialization signature is required for EOA accounts');
|
|
@@ -452,3 +606,19 @@ async function getSetupOperationsAndDelegations(config, accountAddress, eip7702I
|
|
|
452
606
|
};
|
|
453
607
|
}
|
|
454
608
|
}
|
|
609
|
+
function validateTokenSymbols(chain, tokenAddressOrSymbols) {
|
|
610
|
+
function validateTokenSymbol(chain, addressOrSymbol) {
|
|
611
|
+
// Address
|
|
612
|
+
if ((0, viem_1.isAddress)(addressOrSymbol, { strict: false })) {
|
|
613
|
+
return true;
|
|
614
|
+
}
|
|
615
|
+
// Token symbol
|
|
616
|
+
const address = (0, registry_1.getTokenAddress)(addressOrSymbol, chain.id);
|
|
617
|
+
return (0, viem_1.isAddress)(address, { strict: false });
|
|
618
|
+
}
|
|
619
|
+
for (const addressOrSymbol of tokenAddressOrSymbols) {
|
|
620
|
+
if (!validateTokenSymbol(chain, addressOrSymbol)) {
|
|
621
|
+
throw new Error(`Invalid token symbol: ${addressOrSymbol}`);
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import type { Address, Chain, HashTypedDataParameters, Hex, SignableMessage, SignedAuthorizationList, TypedData, Account } from 'viem';
|
|
2
2
|
import type { UserOperationReceipt } from 'viem/account-abstraction';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import type
|
|
6
|
-
import {
|
|
3
|
+
import { deployStandaloneWithEoa as deployStandaloneWithEoaInternal } from './accounts';
|
|
4
|
+
import { walletClientToAccount } from './accounts/walletClient';
|
|
5
|
+
import { type TransactionResult, type TransactionStatus, type UserOperationResult } from './execution';
|
|
6
|
+
import { type BatchPermit2Result, checkERC20AllowanceDirect, getPermit2Address, type MultiChainPermit2Config, type MultiChainPermit2Result, signPermit2Batch, signPermit2Sequential } from './execution/permit2';
|
|
7
7
|
import { type SessionDetails } from './execution/smart-session';
|
|
8
|
-
import { type
|
|
9
|
-
import {
|
|
10
|
-
import type { Call, RhinestoneAccountConfig, Session, SignerSet, Transaction } from './types';
|
|
8
|
+
import { type IntentRoute, type PreparedTransactionData, type PreparedUserOperationData, type SignedTransactionData, type SignedUserOperationData } from './execution/utils';
|
|
9
|
+
import { getSupportedTokens, getTokenAddress, type IntentCost, type IntentInput, type IntentOp, type IntentOpStatus, type Portfolio, type SettlementLayer, type SignedIntentOp } from './orchestrator';
|
|
10
|
+
import type { AccountProviderConfig, AccountType, BundlerConfig, Call, CallInput, MultiFactorValidatorConfig, OwnableValidatorConfig, OwnerSet, PaymasterConfig, Policy, ProviderConfig, Recovery, RhinestoneAccountConfig, Session, SignerSet, TokenRequest, TokenSymbol, Transaction, UniversalActionPolicyParamCondition, UserOperationTransaction, WebauthnValidatorConfig } from './types';
|
|
11
11
|
interface RhinestoneAccount {
|
|
12
12
|
config: RhinestoneAccountConfig;
|
|
13
|
-
deploy: (chain: Chain,
|
|
13
|
+
deploy: (chain: Chain, params?: {
|
|
14
|
+
session?: Session;
|
|
15
|
+
sponsored?: boolean;
|
|
16
|
+
}) => Promise<boolean>;
|
|
17
|
+
isDeployed: (chain: Chain) => Promise<boolean>;
|
|
18
|
+
setup: (chain: Chain) => Promise<boolean>;
|
|
14
19
|
deployStandaloneWithEoa: (chain: Chain, config: RhinestoneAccountConfig, deployer: Account) => Promise<void>;
|
|
15
20
|
signEip7702InitData: () => Promise<Hex>;
|
|
16
21
|
prepareTransaction: (transaction: Transaction) => Promise<PreparedTransactionData>;
|
|
@@ -20,26 +25,40 @@ interface RhinestoneAccount {
|
|
|
20
25
|
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>;
|
|
21
26
|
submitTransaction: (signedTransaction: SignedTransactionData, authorizations?: SignedAuthorizationList) => Promise<TransactionResult>;
|
|
22
27
|
sendTransaction: (transaction: Transaction) => Promise<TransactionResult>;
|
|
23
|
-
|
|
28
|
+
prepareUserOperation: (transaction: UserOperationTransaction) => Promise<PreparedUserOperationData>;
|
|
29
|
+
signUserOperation: (preparedUserOperation: PreparedUserOperationData) => Promise<SignedUserOperationData>;
|
|
30
|
+
submitUserOperation: (signedUserOperation: SignedUserOperationData) => Promise<UserOperationResult>;
|
|
31
|
+
sendUserOperation: (transaction: UserOperationTransaction) => Promise<UserOperationResult>;
|
|
32
|
+
waitForExecution(result: TransactionResult, acceptsPreconfirmations?: boolean): Promise<TransactionStatus>;
|
|
33
|
+
waitForExecution(result: UserOperationResult, acceptsPreconfirmations?: boolean): Promise<UserOperationReceipt>;
|
|
24
34
|
getAddress: () => Address;
|
|
25
35
|
getPortfolio: (onTestnets?: boolean) => Promise<Portfolio>;
|
|
26
|
-
getMaxSpendableAmount: (chain: Chain, tokenAddress: Address, gasUnits: bigint) => Promise<bigint>;
|
|
36
|
+
getMaxSpendableAmount: (chain: Chain, tokenAddress: Address, gasUnits: bigint, sponsored?: boolean) => Promise<bigint>;
|
|
27
37
|
getSessionDetails: (sessions: Session[], sessionIndex: number, signature?: Hex) => Promise<SessionDetails>;
|
|
28
38
|
getOwners: (chain: Chain) => Promise<{
|
|
29
39
|
accounts: Address[];
|
|
30
40
|
threshold: number;
|
|
31
41
|
} | null>;
|
|
32
42
|
getValidators: (chain: Chain) => Promise<Address[]>;
|
|
43
|
+
checkERC20Allowance: (tokenAddress: Address, chain: Chain) => Promise<bigint>;
|
|
33
44
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
45
|
+
declare class RhinestoneSDK {
|
|
46
|
+
private apiKey?;
|
|
47
|
+
private endpointUrl?;
|
|
48
|
+
private provider?;
|
|
49
|
+
private bundler?;
|
|
50
|
+
private paymaster?;
|
|
51
|
+
constructor(options?: {
|
|
52
|
+
apiKey?: string;
|
|
53
|
+
endpointUrl?: string;
|
|
54
|
+
provider?: ProviderConfig;
|
|
55
|
+
bundler?: BundlerConfig;
|
|
56
|
+
paymaster?: PaymasterConfig;
|
|
57
|
+
});
|
|
58
|
+
createAccount(config: RhinestoneAccountConfig): Promise<RhinestoneAccount>;
|
|
59
|
+
}
|
|
60
|
+
export { RhinestoneSDK, walletClientToAccount, getSupportedTokens, getTokenAddress, deployStandaloneWithEoaInternal as deployStandaloneWithEoa, checkERC20AllowanceDirect, getPermit2Address, signPermit2Batch, signPermit2Sequential, };
|
|
61
|
+
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, IntentCost, IntentInput, IntentOp, IntentOpStatus, IntentRoute, SettlementLayer, SignedIntentOp, Portfolio, MultiChainPermit2Config, MultiChainPermit2Result, BatchPermit2Result, };
|
|
43
62
|
export { generateCredentialId, getCredentialIds, hasCredentialById, hasCredential, addCredential, removeCredential, setThreshold, getCredentialInfo, getThreshold, getCredentials, WEBAUTHN_VALIDATOR_ABI, } from './modules/validators/webauthn-contract';
|
|
44
63
|
export { getOrchestrator } from './orchestrator';
|
|
45
64
|
//# 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,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AACpE,OAAO,
|
|
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,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AACpE,OAAO,EASL,uBAAuB,IAAI,+BAA+B,EAC3D,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EAKL,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EAEzB,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,KAAK,kBAAkB,EACvB,yBAAyB,EAEzB,iBAAiB,EACjB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,gBAAgB,EAChB,qBAAqB,EACtB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAG9B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAQ7B,MAAM,mBAAmB,CAAA;AAK1B,OAAO,EACL,kBAAkB,EAClB,eAAe,E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