@rhinestone/sdk 2.0.0-beta.0 → 2.0.0-beta.1
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 +1 -1
- package/dist/src/accounts/json-rpc/providers.d.ts.map +1 -1
- package/dist/src/accounts/json-rpc/providers.js +3 -2
- 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 +6 -4
- package/dist/src/execution/compact.d.ts +1 -144
- package/dist/src/execution/compact.d.ts.map +1 -1
- package/dist/src/execution/compact.js +1 -109
- package/dist/src/execution/error.d.ts +10 -1
- package/dist/src/execution/error.d.ts.map +1 -1
- package/dist/src/execution/error.js +9 -1
- 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 +21 -17
- package/dist/src/execution/permit2.d.ts +1 -137
- package/dist/src/execution/permit2.d.ts.map +1 -1
- package/dist/src/execution/permit2.js +2 -231
- package/dist/src/execution/utils.d.ts +28 -12
- package/dist/src/execution/utils.d.ts.map +1 -1
- package/dist/src/execution/utils.js +167 -117
- package/dist/src/index.d.ts +9 -8
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +8 -8
- package/dist/src/modules/validators/smart-sessions.d.ts.map +1 -1
- package/dist/src/modules/validators/smart-sessions.js +3 -5
- package/dist/src/orchestrator/caip2.d.ts +7 -0
- package/dist/src/orchestrator/caip2.d.ts.map +1 -0
- package/dist/src/orchestrator/caip2.js +17 -0
- package/dist/src/orchestrator/client.d.ts +11 -11
- package/dist/src/orchestrator/client.d.ts.map +1 -1
- package/dist/src/orchestrator/client.js +193 -295
- package/dist/src/orchestrator/consts.d.ts +2 -2
- package/dist/src/orchestrator/consts.d.ts.map +1 -1
- package/dist/src/orchestrator/consts.js +2 -2
- package/dist/src/orchestrator/error.d.ts +72 -217
- package/dist/src/orchestrator/error.d.ts.map +1 -1
- package/dist/src/orchestrator/error.js +117 -195
- 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 +2 -2
- package/dist/src/orchestrator/types.d.ts +97 -232
- package/dist/src/orchestrator/types.d.ts.map +1 -1
- package/dist/src/types.d.ts +2 -4
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/src/execution/singleChainOps.d.ts +0 -41
- package/dist/src/execution/singleChainOps.d.ts.map +0 -1
- package/dist/src/execution/singleChainOps.js +0 -42
- package/dist/src/execution/types.d.ts +0 -36
- package/dist/src/execution/types.d.ts.map +0 -1
- package/dist/src/execution/types.js +0 -1
|
@@ -6,7 +6,6 @@ import { convertOwnerSetToSignerSet } from '../accounts/signing/common.js';
|
|
|
6
6
|
import { K1_DEFAULT_VALIDATOR_ADDRESS } from '../accounts/startale.js';
|
|
7
7
|
import { createTransport, getBundlerClient, } from '../accounts/utils.js';
|
|
8
8
|
import { createAuthProvider } from '../auth/provider.js';
|
|
9
|
-
import { getIntentExecutor } from '../modules/index.js';
|
|
10
9
|
import { buildMockSignature, DUMMY_PRECLAIMOP_SELECTOR, DUMMY_PRECLAIMOP_TARGET, getOwnerValidator, getPermissionId, getSmartSessionValidator, isSessionEnabled, } from '../modules/validators/index.js';
|
|
11
10
|
import { getMultiFactorValidator, getSocialRecoveryValidator, getWebAuthnValidator, supportsEip712, } from '../modules/validators/core.js';
|
|
12
11
|
import { buildPermit2ClaimPolicyCalldata } from '../modules/validators/policies/claim/permit2.js';
|
|
@@ -14,10 +13,7 @@ import { getOrchestrator, } from '../orchestrator/index.js';
|
|
|
14
13
|
import { getChainById, getTokenAddress, resolveTokenAddress, } from '../orchestrator/registry.js';
|
|
15
14
|
import { SIG_MODE_EMISSARY_EXECUTION_ERC1271, SIG_MODE_ERC1271_EMISSARY, } from '../orchestrator/types.js';
|
|
16
15
|
import { convertBigIntFields } from '../orchestrator/utils.js';
|
|
17
|
-
import {
|
|
18
|
-
import { Eip7702InitSignatureRequiredError, SignerNotSupportedError, } from './error.js';
|
|
19
|
-
import { getTypedData as getPermit2TypedData } from './permit2.js';
|
|
20
|
-
import { getTypedData as getSingleChainOpsTypedData } from './singleChainOps.js';
|
|
16
|
+
import { Eip7702InitSignatureRequiredError, QuoteNotInPreparedTransactionError, SignerNotSupportedError, } from './error.js';
|
|
21
17
|
function isResolvedSessionSignerSet(signers) {
|
|
22
18
|
return (signers?.type === 'experimental_session' && 'verifyExecutions' in signers);
|
|
23
19
|
}
|
|
@@ -48,15 +44,15 @@ function resolveSessionForChain(signers, chainId) {
|
|
|
48
44
|
return { session: signers.session, enableData: signers.enableData };
|
|
49
45
|
}
|
|
50
46
|
async function prepareTransaction(config, transaction) {
|
|
51
|
-
const { sourceChains, targetChain, tokenRequests, signers, sponsored, eip7702InitSignature, settlementLayers, sourceAssets, feeAsset,
|
|
47
|
+
const { sourceChains, targetChain, tokenRequests, signers, sponsored, eip7702InitSignature, settlementLayers, sourceAssets, feeAsset, auxiliaryFunds, account, recipient, } = getTransactionParams(transaction);
|
|
52
48
|
const accountAddress = getAddress(config);
|
|
53
49
|
const isUserOpSigner = signers?.type === 'guardians';
|
|
54
50
|
if (isUserOpSigner) {
|
|
55
51
|
throw new SignerNotSupportedError();
|
|
56
52
|
}
|
|
57
|
-
const prepared = await prepareTransactionAsIntent(config, sourceChains, targetChain, await resolveCallInputs(transaction.calls, config, targetChain, accountAddress), transaction.gasLimit, tokenRequests, recipient, sponsored, eip7702InitSignature, settlementLayers, sourceAssets, feeAsset,
|
|
53
|
+
const prepared = await prepareTransactionAsIntent(config, sourceChains, targetChain, await resolveCallInputs(transaction.calls, config, targetChain, accountAddress), transaction.gasLimit, tokenRequests, recipient, sponsored, eip7702InitSignature, settlementLayers, sourceAssets, feeAsset, auxiliaryFunds, account, signers);
|
|
58
54
|
return {
|
|
59
|
-
|
|
55
|
+
quotes: prepared.quotes,
|
|
60
56
|
intentInput: prepared.intentInput,
|
|
61
57
|
transaction,
|
|
62
58
|
};
|
|
@@ -93,19 +89,21 @@ async function resolveCallInputs(inputs, config, chain, accountAddress) {
|
|
|
93
89
|
}
|
|
94
90
|
return resolved;
|
|
95
91
|
}
|
|
96
|
-
function getTransactionMessages(
|
|
97
|
-
|
|
92
|
+
function getTransactionMessages(_config, preparedTransaction, options) {
|
|
93
|
+
const quote = resolveQuote(preparedTransaction.quotes, options);
|
|
94
|
+
return getIntentMessages(quote.signData);
|
|
98
95
|
}
|
|
99
|
-
async function signTransaction(config, preparedTransaction) {
|
|
96
|
+
async function signTransaction(config, preparedTransaction, options) {
|
|
100
97
|
const { signers } = getTransactionParams(preparedTransaction.transaction);
|
|
101
|
-
const
|
|
98
|
+
const quote = resolveQuote(preparedTransaction.quotes, options);
|
|
102
99
|
const targetChain = 'targetChain' in preparedTransaction.transaction
|
|
103
100
|
? preparedTransaction.transaction.targetChain
|
|
104
101
|
: preparedTransaction.transaction.chain;
|
|
105
|
-
const { originSignatures, destinationSignature } = await signIntent(config,
|
|
106
|
-
const targetExecutionSignature = await getTargetExecutionSignature(config,
|
|
102
|
+
const { originSignatures, destinationSignature } = await signIntent(config, quote.signData, targetChain, signers, false);
|
|
103
|
+
const targetExecutionSignature = await getTargetExecutionSignature(config, quote.signData, targetChain, signers);
|
|
107
104
|
return {
|
|
108
|
-
|
|
105
|
+
quote,
|
|
106
|
+
quotes: preparedTransaction.quotes,
|
|
109
107
|
intentInput: preparedTransaction.intentInput,
|
|
110
108
|
transaction: preparedTransaction.transaction,
|
|
111
109
|
originSignatures,
|
|
@@ -113,13 +111,22 @@ async function signTransaction(config, preparedTransaction) {
|
|
|
113
111
|
targetExecutionSignature,
|
|
114
112
|
};
|
|
115
113
|
}
|
|
116
|
-
|
|
114
|
+
function resolveQuote(quotes, options) {
|
|
115
|
+
if (!options)
|
|
116
|
+
return quotes.best;
|
|
117
|
+
const match = quotes.all.find((q) => q.intentId === options.intentId);
|
|
118
|
+
if (!match) {
|
|
119
|
+
throw new QuoteNotInPreparedTransactionError({
|
|
120
|
+
context: { intentId: options.intentId },
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
return match;
|
|
124
|
+
}
|
|
125
|
+
async function getTargetExecutionSignature(config, signData, targetChain, signers) {
|
|
117
126
|
if (signers?.type !== 'experimental_session') {
|
|
118
127
|
return undefined;
|
|
119
128
|
}
|
|
120
|
-
|
|
121
|
-
const hasIntentExecutorOps = settlementLayers.some((l) => l === 'INTENT_EXECUTOR' || l === 'SAME_CHAIN');
|
|
122
|
-
if (!hasIntentExecutorOps) {
|
|
129
|
+
if (!signData.targetExecution) {
|
|
123
130
|
return undefined;
|
|
124
131
|
}
|
|
125
132
|
const resolvedSigners = await resolveSignersForChain(config, signers, targetChain.id);
|
|
@@ -127,13 +134,13 @@ async function getTargetExecutionSignature(config, intentOp, targetChain, signer
|
|
|
127
134
|
!resolvedSigners.verifyExecutions) {
|
|
128
135
|
return undefined;
|
|
129
136
|
}
|
|
130
|
-
const destination = getTargetExecutionMessage(config, intentOp);
|
|
131
137
|
const validator = getValidator(config, signers);
|
|
132
138
|
if (!validator) {
|
|
133
139
|
throw new Error('Validator not available');
|
|
134
140
|
}
|
|
135
141
|
const ownerValidator = getOwnerValidator(config);
|
|
136
142
|
const isRoot = validator.address === ownerValidator.address;
|
|
143
|
+
const destination = prepareTypedData(signData.targetExecution);
|
|
137
144
|
const signature = await getDestinationSignature(config, resolvedSigners, validator, isRoot, targetChain, destination, [], true);
|
|
138
145
|
return signature;
|
|
139
146
|
}
|
|
@@ -151,7 +158,14 @@ async function signUserOperation(config, preparedUserOperation) {
|
|
|
151
158
|
};
|
|
152
159
|
}
|
|
153
160
|
async function signAuthorizations(config, preparedTransaction) {
|
|
154
|
-
|
|
161
|
+
const transaction = preparedTransaction.transaction;
|
|
162
|
+
const sourceChains = 'chain' in transaction ? [transaction.chain] : transaction.sourceChains;
|
|
163
|
+
const targetChain = 'chain' in transaction ? transaction.chain : transaction.targetChain;
|
|
164
|
+
return await signAuthorizationsInternal(config, {
|
|
165
|
+
sourceChains,
|
|
166
|
+
targetChain,
|
|
167
|
+
eip7702InitSignature: transaction.eip7702InitSignature,
|
|
168
|
+
});
|
|
155
169
|
}
|
|
156
170
|
async function signMessage(config, message, chain, signers) {
|
|
157
171
|
const validator = getValidator(config, signers);
|
|
@@ -239,19 +253,23 @@ async function signTypedDataWithSession(config, chain, validator, session, param
|
|
|
239
253
|
});
|
|
240
254
|
return await toErc6492Signature(config, signature, chain);
|
|
241
255
|
}
|
|
242
|
-
async function signAuthorizationsInternal(config,
|
|
256
|
+
async function signAuthorizationsInternal(config, context) {
|
|
243
257
|
const eoa = config.eoa;
|
|
244
258
|
if (!eoa) {
|
|
245
259
|
throw new Error('EIP-7702 initialization is required for EOA accounts');
|
|
246
260
|
}
|
|
261
|
+
const eip7702InitSignature = context.eip7702InitSignature;
|
|
262
|
+
if (!eip7702InitSignature) {
|
|
263
|
+
return [];
|
|
264
|
+
}
|
|
247
265
|
const accountAddress = getAddress(config);
|
|
248
|
-
const
|
|
249
|
-
|
|
250
|
-
|
|
266
|
+
const { contract: eip7702Contract } = getEip7702InitCall(config, eip7702InitSignature);
|
|
267
|
+
const chains = new Map();
|
|
268
|
+
for (const chain of [...(context.sourceChains ?? []), context.targetChain]) {
|
|
269
|
+
chains.set(chain.id, chain);
|
|
270
|
+
}
|
|
251
271
|
const authorizations = [];
|
|
252
|
-
for (const
|
|
253
|
-
const delegation = requiredDelegations[chainId];
|
|
254
|
-
const chain = getChainById(Number(chainId));
|
|
272
|
+
for (const chain of chains.values()) {
|
|
255
273
|
const walletClient = createWalletClient({
|
|
256
274
|
chain,
|
|
257
275
|
account: eoa,
|
|
@@ -260,23 +278,22 @@ async function signAuthorizationsInternal(config, data) {
|
|
|
260
278
|
const code = await walletClient.getCode({
|
|
261
279
|
address: accountAddress,
|
|
262
280
|
});
|
|
263
|
-
const isDelegated = code === concat(['0xef0100',
|
|
281
|
+
const isDelegated = code === concat(['0xef0100', eip7702Contract.toLowerCase()]);
|
|
264
282
|
if (isDelegated) {
|
|
265
283
|
continue;
|
|
266
284
|
}
|
|
267
285
|
const authorization = await walletClient.signAuthorization({
|
|
268
|
-
contractAddress:
|
|
269
|
-
chainId:
|
|
286
|
+
contractAddress: eip7702Contract,
|
|
287
|
+
chainId: chain.id,
|
|
270
288
|
});
|
|
271
289
|
authorizations.push(authorization);
|
|
272
290
|
}
|
|
273
291
|
return authorizations;
|
|
274
292
|
}
|
|
275
293
|
async function submitTransaction(config, signedTransaction, authorizations, dryRun = false) {
|
|
276
|
-
const {
|
|
294
|
+
const { quote, intentInput, transaction, originSignatures, destinationSignature, targetExecutionSignature, } = signedTransaction;
|
|
277
295
|
const { sourceChains, targetChain } = getTransactionParams(transaction);
|
|
278
|
-
|
|
279
|
-
return await submitIntent(config, sourceChains, targetChain, intentOp, originSignatures, destinationSignature, targetExecutionSignature, authorizations, dryRun, intentInput);
|
|
296
|
+
return await submitIntentInternal(config, sourceChains, targetChain, quote, originSignatures, destinationSignature, targetExecutionSignature, authorizations, dryRun, intentInput);
|
|
280
297
|
}
|
|
281
298
|
async function submitUserOperation(config, signedUserOperation) {
|
|
282
299
|
const chain = signedUserOperation.transaction.chain;
|
|
@@ -296,7 +313,6 @@ function getTransactionParams(transaction) {
|
|
|
296
313
|
const settlementLayers = transaction.settlementLayers;
|
|
297
314
|
const sourceAssets = transaction.sourceAssets;
|
|
298
315
|
const feeAsset = transaction.feeAsset;
|
|
299
|
-
const lockFunds = transaction.lockFunds;
|
|
300
316
|
const auxiliaryFunds = transaction.auxiliaryFunds;
|
|
301
317
|
const account = transaction.experimental_accountOverride;
|
|
302
318
|
const recipient = transaction.recipient;
|
|
@@ -312,7 +328,6 @@ function getTransactionParams(transaction) {
|
|
|
312
328
|
settlementLayers,
|
|
313
329
|
sourceAssets,
|
|
314
330
|
feeAsset,
|
|
315
|
-
lockFunds,
|
|
316
331
|
auxiliaryFunds,
|
|
317
332
|
account,
|
|
318
333
|
recipient,
|
|
@@ -369,7 +384,7 @@ function getIntentAccount(config, eip7702InitSignature, account) {
|
|
|
369
384
|
delegations,
|
|
370
385
|
};
|
|
371
386
|
}
|
|
372
|
-
async function prepareTransactionAsIntent(config, sourceChains, targetChain, callInputs, gasLimit, tokenRequests, recipientInput, sponsored, eip7702InitSignature, settlementLayers, sourceAssets, feeAsset,
|
|
387
|
+
async function prepareTransactionAsIntent(config, sourceChains, targetChain, callInputs, gasLimit, tokenRequests, recipientInput, sponsored, eip7702InitSignature, settlementLayers, sourceAssets, feeAsset, auxiliaryFunds, account, signers) {
|
|
373
388
|
const calls = parseCalls(callInputs, targetChain.id);
|
|
374
389
|
const accountAccessList = createAccountAccessList(sourceChains, sourceAssets);
|
|
375
390
|
function getRecipient(recipient) {
|
|
@@ -390,8 +405,6 @@ async function prepareTransactionAsIntent(config, sourceChains, targetChain, cal
|
|
|
390
405
|
const intentAccount = {
|
|
391
406
|
...getIntentAccount(config, eip7702InitSignature, account),
|
|
392
407
|
...(signers?.type === 'experimental_session' && {
|
|
393
|
-
// Global fallback: target-chain sig for backward-compat with older orchestrators
|
|
394
|
-
mockSignature: buildMockSignature(resolveSessionForChain(signers, targetChain.id).session, config.useDevContracts, sourceChains?.length ?? 1),
|
|
395
408
|
// Per-chain map: enables accurate per-chain session validation gas simulation
|
|
396
409
|
mockSignatures: Object.fromEntries([
|
|
397
410
|
...new Set([
|
|
@@ -446,19 +459,18 @@ async function prepareTransactionAsIntent(config, sourceChains, targetChain, cal
|
|
|
446
459
|
destinationGasUnits: gasLimit,
|
|
447
460
|
accountAccessList,
|
|
448
461
|
options: {
|
|
449
|
-
topupCompact: lockFunds ?? false,
|
|
450
462
|
feeToken: feeAsset,
|
|
451
463
|
sponsorSettings: sponsored
|
|
452
464
|
? typeof sponsored === 'object'
|
|
453
465
|
? {
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
466
|
+
gas: sponsored.gas,
|
|
467
|
+
bridgeFees: sponsored.bridging,
|
|
468
|
+
swapFees: sponsored.swaps,
|
|
457
469
|
}
|
|
458
470
|
: {
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
471
|
+
gas: sponsored,
|
|
472
|
+
bridgeFees: sponsored,
|
|
473
|
+
swapFees: sponsored,
|
|
462
474
|
}
|
|
463
475
|
: undefined,
|
|
464
476
|
settlementLayers,
|
|
@@ -469,11 +481,18 @@ async function prepareTransactionAsIntent(config, sourceChains, targetChain, cal
|
|
|
469
481
|
};
|
|
470
482
|
const serializedIntent = convertBigIntFields(metaIntent);
|
|
471
483
|
const orchestrator = getOrchestrator(config._authProvider ?? createAuthProvider(config), config.endpointUrl, config.headers);
|
|
472
|
-
const
|
|
473
|
-
|
|
484
|
+
const { routes } = await orchestrator.createQuote(metaIntent);
|
|
485
|
+
const best = routes[0];
|
|
486
|
+
if (!best) {
|
|
487
|
+
throw new Error('Orchestrator returned no quote');
|
|
488
|
+
}
|
|
489
|
+
return {
|
|
490
|
+
quotes: { best, all: routes },
|
|
491
|
+
intentInput: serializedIntent,
|
|
492
|
+
};
|
|
474
493
|
}
|
|
475
|
-
async function signIntent(config,
|
|
476
|
-
const { origin, destination } = getIntentMessages(
|
|
494
|
+
async function signIntent(config, signData, targetChain, signers, targetExecution) {
|
|
495
|
+
const { origin, destination } = getIntentMessages(signData);
|
|
477
496
|
if (config.account?.type === 'eoa') {
|
|
478
497
|
const eoa = config.eoa;
|
|
479
498
|
if (!eoa) {
|
|
@@ -541,44 +560,57 @@ async function signDestinationSeparately(config, signers, validator, isRoot, tar
|
|
|
541
560
|
? destinationSignatures.preClaimSig
|
|
542
561
|
: (destinationSignatures ?? '0x');
|
|
543
562
|
}
|
|
544
|
-
function getIntentMessages(
|
|
545
|
-
const address = getAddress(config);
|
|
546
|
-
const intentExecutor = getIntentExecutor(config);
|
|
547
|
-
const withPermit2 = intentOp.elements.some((element) => element.mandate.qualifier.settlementContext.fundingMethod === 'PERMIT2');
|
|
548
|
-
const withIntentExecutorOps = intentOp.elements.some((element) => element.mandate.qualifier.settlementContext.settlementLayer ===
|
|
549
|
-
'INTENT_EXECUTOR');
|
|
550
|
-
const origin = [];
|
|
551
|
-
for (const element of intentOp.elements) {
|
|
552
|
-
if (withIntentExecutorOps) {
|
|
553
|
-
const typedData = getSingleChainOpsTypedData(address, intentExecutor.address, element, BigInt(intentOp.nonce));
|
|
554
|
-
origin.push(typedData);
|
|
555
|
-
}
|
|
556
|
-
else if (withPermit2) {
|
|
557
|
-
const typedData = getPermit2TypedData(element, BigInt(intentOp.nonce), BigInt(intentOp.expires));
|
|
558
|
-
origin.push(typedData);
|
|
559
|
-
}
|
|
560
|
-
else {
|
|
561
|
-
const typedData = getCompactTypedData(intentOp);
|
|
562
|
-
origin.push(typedData);
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
const destination = origin.at(-1);
|
|
563
|
+
function getIntentMessages(signData) {
|
|
566
564
|
return {
|
|
567
|
-
origin,
|
|
568
|
-
destination,
|
|
565
|
+
origin: signData.origin.map(prepareTypedData),
|
|
566
|
+
destination: prepareTypedData(signData.destination),
|
|
567
|
+
targetExecution: signData.targetExecution
|
|
568
|
+
? prepareTypedData(signData.targetExecution)
|
|
569
|
+
: undefined,
|
|
569
570
|
};
|
|
570
571
|
}
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
const
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
overhead: 0n,
|
|
572
|
+
// Server emits uint*/int* values as decimal strings; viem's hashTypedData
|
|
573
|
+
// expects bigint. Walk the message tree against the type schema and coerce
|
|
574
|
+
// numeric fields back to bigint before signing.
|
|
575
|
+
function prepareTypedData(td) {
|
|
576
|
+
const types = td.types;
|
|
577
|
+
return {
|
|
578
|
+
...td,
|
|
579
|
+
message: coerceTypedDataMessage(types, td.primaryType, td.message),
|
|
580
580
|
};
|
|
581
|
-
|
|
581
|
+
}
|
|
582
|
+
function coerceTypedDataMessage(types, primaryType, message) {
|
|
583
|
+
const fields = types[primaryType];
|
|
584
|
+
if (!fields)
|
|
585
|
+
return message;
|
|
586
|
+
const result = { ...message };
|
|
587
|
+
for (const { name, type } of fields) {
|
|
588
|
+
if (name in message) {
|
|
589
|
+
result[name] = coerceTypedDataValue(types, type, message[name]);
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
return result;
|
|
593
|
+
}
|
|
594
|
+
function coerceTypedDataValue(types, type, value) {
|
|
595
|
+
if (value === null || value === undefined)
|
|
596
|
+
return value;
|
|
597
|
+
const arrayMatch = type.match(/^(.+)\[\d*\]$/);
|
|
598
|
+
if (arrayMatch) {
|
|
599
|
+
const elementType = arrayMatch[1];
|
|
600
|
+
if (!Array.isArray(value))
|
|
601
|
+
return value;
|
|
602
|
+
return value.map((v) => coerceTypedDataValue(types, elementType, v));
|
|
603
|
+
}
|
|
604
|
+
if (/^u?int\d*$/.test(type)) {
|
|
605
|
+
if (typeof value === 'string' || typeof value === 'number') {
|
|
606
|
+
return BigInt(value);
|
|
607
|
+
}
|
|
608
|
+
return value;
|
|
609
|
+
}
|
|
610
|
+
if (types[type]) {
|
|
611
|
+
return coerceTypedDataMessage(types, type, value);
|
|
612
|
+
}
|
|
613
|
+
return value;
|
|
582
614
|
}
|
|
583
615
|
/** Computes claim policy calldata when parameters are Permit2 typed data with claim policies. */
|
|
584
616
|
function resolveClaimPolicyData(signers, parameters) {
|
|
@@ -710,38 +742,36 @@ async function submitUserOp(config, chain, userOp, signature) {
|
|
|
710
742
|
chain: chain.id,
|
|
711
743
|
};
|
|
712
744
|
}
|
|
713
|
-
async function
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
745
|
+
async function submitIntentInternal(config, sourceChains, targetChain, quote, originSignatures, destinationSignature, targetExecutionSignature, authorizations, dryRun, intentInput) {
|
|
746
|
+
const request = {
|
|
747
|
+
intentId: quote.intentId,
|
|
748
|
+
signatures: {
|
|
749
|
+
origin: originSignatures,
|
|
750
|
+
destination: destinationSignature,
|
|
751
|
+
...(targetExecutionSignature !== undefined && {
|
|
752
|
+
targetExecution: targetExecutionSignature,
|
|
753
|
+
}),
|
|
754
|
+
},
|
|
755
|
+
...(authorizations.length > 0 && {
|
|
756
|
+
authorizations: {
|
|
757
|
+
sponsor: authorizations.map((authorization) => ({
|
|
758
|
+
chainId: authorization.chainId,
|
|
759
|
+
address: authorization.address,
|
|
760
|
+
nonce: authorization.nonce,
|
|
761
|
+
yParity: authorization.yParity ?? 0,
|
|
762
|
+
r: authorization.r,
|
|
763
|
+
s: authorization.s,
|
|
764
|
+
})),
|
|
765
|
+
},
|
|
766
|
+
}),
|
|
767
|
+
...(dryRun && { options: { dryRun: true } }),
|
|
732
768
|
};
|
|
733
|
-
}
|
|
734
|
-
async function submitIntentInternal(config, sourceChains, targetChain, intentOp, originSignatures, destinationSignature, targetExecutionSignature, authorizations, dryRun, intentInput) {
|
|
735
|
-
const signedIntentOp = createSignedIntentOp(intentOp, originSignatures, destinationSignature, targetExecutionSignature, authorizations);
|
|
736
769
|
const isSponsored = !!intentInput?.options?.sponsorSettings;
|
|
737
770
|
const orchestrator = getOrchestrator(config._authProvider ?? createAuthProvider(config), config.endpointUrl, config.headers);
|
|
738
|
-
const
|
|
739
|
-
// Some settlement paths (e.g. SAME_CHAIN) may not return a result.id — fall
|
|
740
|
-
// back to the nonce which the orchestrator also accepts as an intent identifier.
|
|
741
|
-
const intentId = intentResults.result.id ?? intentOp.nonce;
|
|
771
|
+
const response = await orchestrator.createIntent(request, intentInput ? { intentInput, isSponsored } : undefined);
|
|
742
772
|
return {
|
|
743
773
|
type: 'intent',
|
|
744
|
-
id:
|
|
774
|
+
id: response.intentId,
|
|
745
775
|
sourceChains: sourceChains?.map((chain) => chain.id),
|
|
746
776
|
targetChain: targetChain.id,
|
|
747
777
|
};
|
|
@@ -816,12 +846,32 @@ function createAccountAccessList(sourceChains, sourceAssets) {
|
|
|
816
846
|
if (Array.isArray(sourceAssets)) {
|
|
817
847
|
const isExactConfig = sourceAssets.length > 0 && typeof sourceAssets[0] !== 'string';
|
|
818
848
|
if (isExactConfig) {
|
|
819
|
-
const
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
849
|
+
const chainTokens = {};
|
|
850
|
+
const chainTokenAmounts = {};
|
|
851
|
+
for (const config of sourceAssets) {
|
|
852
|
+
const chainId = config.chain.id;
|
|
853
|
+
const tokenAddress = resolveTokenAddress(config.address, config.chain.id);
|
|
854
|
+
if (config.amount !== undefined) {
|
|
855
|
+
if (!chainTokenAmounts[chainId])
|
|
856
|
+
chainTokenAmounts[chainId] = {};
|
|
857
|
+
chainTokenAmounts[chainId][tokenAddress] = config.amount;
|
|
858
|
+
}
|
|
859
|
+
else {
|
|
860
|
+
if (!chainTokens[chainId])
|
|
861
|
+
chainTokens[chainId] = [];
|
|
862
|
+
chainTokens[chainId].push(tokenAddress);
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
const out = {};
|
|
866
|
+
if (Object.keys(chainTokens).length > 0) {
|
|
867
|
+
out.chainTokens =
|
|
868
|
+
chainTokens;
|
|
869
|
+
}
|
|
870
|
+
if (Object.keys(chainTokenAmounts).length > 0) {
|
|
871
|
+
out.chainTokenAmounts =
|
|
872
|
+
chainTokenAmounts;
|
|
873
|
+
}
|
|
874
|
+
return out;
|
|
825
875
|
}
|
|
826
876
|
return chainIds
|
|
827
877
|
? { chainIds, tokens: sourceAssets }
|
package/dist/src/index.d.ts
CHANGED
|
@@ -3,11 +3,11 @@ import type { UserOperationReceipt } from 'viem/account-abstraction';
|
|
|
3
3
|
import { walletClientToAccount, wrapParaAccount } from './accounts/walletClient.js';
|
|
4
4
|
import { deployAccountsForOwners } from './actions/deployment.js';
|
|
5
5
|
import { type TransactionResult, type TransactionStatus, type UserOperationResult } from './execution/index.js';
|
|
6
|
-
import {
|
|
7
|
-
import { type
|
|
6
|
+
import { checkERC20AllowanceDirect, getPermit2Address } from './execution/permit2.js';
|
|
7
|
+
import { type PreparedQuotes, type PreparedTransactionData, type PreparedUserOperationData, type QuoteSelection, type SignedTransactionData, type SignedUserOperationData } from './execution/utils.js';
|
|
8
8
|
import { MULTI_FACTOR_VALIDATOR_ADDRESS, OWNABLE_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS } from './modules/index.js';
|
|
9
9
|
import { type SessionDetails } from './modules/validators/smart-sessions.js';
|
|
10
|
-
import { type ApprovalRequired, type AuxiliaryFunds, getAllSupportedChainsAndTokens, getSupportedTokens, getTokenAddress, getTokenDecimals, type IntentInput, type
|
|
10
|
+
import { type ApprovalRequired, type AuxiliaryFunds, getAllSupportedChainsAndTokens, getSupportedTokens, getTokenAddress, getTokenDecimals, type IntentInput, type IntentOpStatus, type Portfolio, type SettlementLayer, type SplitIntentsInput, type SplitIntentsResult, type TokenRequirements, type WrapRequired } from './orchestrator/index.js';
|
|
11
11
|
import type { AccountProviderConfig, AccountType, BundlerConfig, Call, CallInput, ChainSessionConfig, MultiFactorValidatorConfig, OwnableValidatorConfig, OwnerSet, PaymasterConfig, Permit2ClaimPolicy, Policy, ProviderConfig, Recovery, RhinestoneAccountConfig, RhinestoneConfig, RhinestoneSDKConfig, Session, SignerSet, TokenRequest, TokenSymbol, Transaction, UniversalActionPolicyParamCondition, UserOperationTransaction, WebauthnValidatorConfig } from './types.js';
|
|
12
12
|
interface RhinestoneAccount {
|
|
13
13
|
config: RhinestoneAccountConfig;
|
|
@@ -23,11 +23,12 @@ interface RhinestoneAccount {
|
|
|
23
23
|
};
|
|
24
24
|
signEip7702InitData: () => Promise<Hex>;
|
|
25
25
|
prepareTransaction: (transaction: Transaction) => Promise<PreparedTransactionData>;
|
|
26
|
-
getTransactionMessages: (preparedTransaction: PreparedTransactionData) => {
|
|
26
|
+
getTransactionMessages: (preparedTransaction: PreparedTransactionData, options?: QuoteSelection) => {
|
|
27
27
|
origin: TypedDataDefinition[];
|
|
28
28
|
destination: TypedDataDefinition;
|
|
29
|
+
targetExecution?: TypedDataDefinition;
|
|
29
30
|
};
|
|
30
|
-
signTransaction: (preparedTransaction: PreparedTransactionData) => Promise<SignedTransactionData>;
|
|
31
|
+
signTransaction: (preparedTransaction: PreparedTransactionData, options?: QuoteSelection) => Promise<SignedTransactionData>;
|
|
31
32
|
signAuthorizations: (preparedTransaction: PreparedTransactionData) => Promise<SignedAuthorizationList>;
|
|
32
33
|
signMessage: (message: SignableMessage, chain: Chain, signers: SignerSet | undefined) => Promise<Hex>;
|
|
33
34
|
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>;
|
|
@@ -69,11 +70,11 @@ declare class RhinestoneSDK {
|
|
|
69
70
|
private headers?;
|
|
70
71
|
constructor(options: RhinestoneSDKConfig);
|
|
71
72
|
createAccount(config: RhinestoneAccountConfig): Promise<RhinestoneAccount>;
|
|
72
|
-
getIntentStatus(intentId:
|
|
73
|
+
getIntentStatus(intentId: string): Promise<TransactionStatus & {
|
|
73
74
|
status: IntentOpStatus["status"];
|
|
74
75
|
}>;
|
|
75
76
|
splitIntents(input: SplitIntentsInput): Promise<SplitIntentsResult>;
|
|
76
77
|
}
|
|
77
|
-
export { RhinestoneSDK, createRhinestoneAccount, deployAccountsForOwners, walletClientToAccount, wrapParaAccount, OWNABLE_VALIDATOR_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS, MULTI_FACTOR_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, getSupportedTokens, getTokenAddress, getTokenDecimals, getAllSupportedChainsAndTokens, checkERC20AllowanceDirect, getPermit2Address,
|
|
78
|
-
export type { RhinestoneAccount, AccountType, RhinestoneAccountConfig, AccountProviderConfig, ProviderConfig, BundlerConfig, PaymasterConfig, Transaction, TokenSymbol, CallInput, Call, TokenRequest, OwnerSet, OwnableValidatorConfig, WebauthnValidatorConfig, MultiFactorValidatorConfig, SignerSet, ChainSessionConfig, Session, Recovery, Policy, Permit2ClaimPolicy, UniversalActionPolicyParamCondition, PreparedTransactionData, SignedTransactionData, TransactionResult, PreparedUserOperationData, SignedUserOperationData, UserOperationResult, AuxiliaryFunds, IntentInput,
|
|
78
|
+
export { RhinestoneSDK, createRhinestoneAccount, deployAccountsForOwners, walletClientToAccount, wrapParaAccount, OWNABLE_VALIDATOR_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS, MULTI_FACTOR_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, getSupportedTokens, getTokenAddress, getTokenDecimals, getAllSupportedChainsAndTokens, checkERC20AllowanceDirect, getPermit2Address, };
|
|
79
|
+
export type { RhinestoneAccount, AccountType, RhinestoneAccountConfig, AccountProviderConfig, ProviderConfig, BundlerConfig, PaymasterConfig, Transaction, TokenSymbol, CallInput, Call, TokenRequest, OwnerSet, OwnableValidatorConfig, WebauthnValidatorConfig, MultiFactorValidatorConfig, SignerSet, ChainSessionConfig, Session, Recovery, Policy, Permit2ClaimPolicy, UniversalActionPolicyParamCondition, PreparedQuotes, PreparedTransactionData, QuoteSelection, SignedTransactionData, TransactionResult, PreparedUserOperationData, SignedUserOperationData, UserOperationResult, AuxiliaryFunds, IntentInput, IntentOpStatus, SettlementLayer, SplitIntentsInput, SplitIntentsResult, Portfolio, TokenRequirements, WrapRequired, ApprovalRequired, };
|
|
79
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,E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uBAAuB,EACvB,mBAAmB,EACnB,cAAc,EACd,WAAW,EACX,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,GACjB,CAAA"}
|
package/dist/src/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { walletClientToAccount, wrapParaAccount } from './accounts/walletClient.
|
|
|
3
3
|
import { deployAccountsForOwners } from './actions/deployment.js';
|
|
4
4
|
import { createAuthProvider } from './auth/provider.js';
|
|
5
5
|
import { getIntentStatus as getIntentStatusInternal, getPortfolio as getPortfolioInternal, sendTransaction as sendTransactionInternal, sendUserOperation as sendUserOperationInternal, splitIntents as splitIntentsInternal, waitForExecution as waitForExecutionInternal, } from './execution/index.js';
|
|
6
|
-
import { checkERC20AllowanceDirect, checkERC20Allowance as checkERC20AllowanceInternal, getPermit2Address,
|
|
6
|
+
import { checkERC20AllowanceDirect, checkERC20Allowance as checkERC20AllowanceInternal, getPermit2Address, } from './execution/permit2.js';
|
|
7
7
|
import { getTransactionMessages as getTransactionMessagesInternal, prepareTransaction as prepareTransactionInternal, prepareUserOperation as prepareUserOperationInternal, signAuthorizations as signAuthorizationsInternal, signMessage as signMessageInternal, signTransaction as signTransactionInternal, signTypedData as signTypedDataInternal, signUserOperation as signUserOperationInternal, submitTransaction as submitTransactionInternal, submitUserOperation as submitUserOperationInternal, } from './execution/utils.js';
|
|
8
8
|
import { getExecutors as getExecutorsInternal, getOwners as getOwnersInternal, getSessionDetails as getSessionDetailsInternal, getValidators as getValidatorsInternal, MULTI_FACTOR_VALIDATOR_ADDRESS, OWNABLE_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, signEnableSession as signEnableSessionInternal, WEBAUTHN_VALIDATOR_ADDRESS, } from './modules/index.js';
|
|
9
9
|
import { isSessionEnabled as isSessionEnabledInternal, } from './modules/validators/smart-sessions.js';
|
|
@@ -81,19 +81,21 @@ async function createRhinestoneAccount(config) {
|
|
|
81
81
|
/**
|
|
82
82
|
* Get the transaction typed data message to sign
|
|
83
83
|
* @param preparedTransaction Prepared transaction data
|
|
84
|
+
* @param options Optional override; pass `{ intentId }` to inspect a specific quote from `preparedTransaction.quotes.all`
|
|
84
85
|
* @see {@link prepareTransaction} to prepare the transaction data for signing
|
|
85
86
|
*/
|
|
86
|
-
function getTransactionMessages(preparedTransaction) {
|
|
87
|
-
return getTransactionMessagesInternal(config, preparedTransaction);
|
|
87
|
+
function getTransactionMessages(preparedTransaction, options) {
|
|
88
|
+
return getTransactionMessagesInternal(config, preparedTransaction, options);
|
|
88
89
|
}
|
|
89
90
|
/**
|
|
90
91
|
* Sign a transaction
|
|
91
92
|
* @param preparedTransaction Prepared transaction data
|
|
93
|
+
* @param options Optional override; pass `{ intentId }` to sign a specific quote from `preparedTransaction.quotes.all`
|
|
92
94
|
* @returns signed transaction data
|
|
93
95
|
* @see {@link prepareTransaction} to prepare the transaction data for signing
|
|
94
96
|
*/
|
|
95
|
-
function signTransaction(preparedTransaction) {
|
|
96
|
-
return signTransactionInternal(config, preparedTransaction);
|
|
97
|
+
function signTransaction(preparedTransaction, options) {
|
|
98
|
+
return signTransactionInternal(config, preparedTransaction, options);
|
|
97
99
|
}
|
|
98
100
|
/**
|
|
99
101
|
* Sign the required EIP-7702 authorizations for a transaction
|
|
@@ -317,6 +319,4 @@ OWNABLE_VALIDATOR_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS, MULTI_FACTOR_VALIDATOR_AD
|
|
|
317
319
|
// Registry functions
|
|
318
320
|
getSupportedTokens, getTokenAddress, getTokenDecimals, getAllSupportedChainsAndTokens,
|
|
319
321
|
// Permit2 helpers
|
|
320
|
-
checkERC20AllowanceDirect, getPermit2Address,
|
|
321
|
-
// Multi-chain permit2 signing
|
|
322
|
-
signPermit2Batch, signPermit2Sequential, };
|
|
322
|
+
checkERC20AllowanceDirect, getPermit2Address, };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sm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AExC,QAAA,MAAM,mCAAmC,EAAE,OACG,CAAA;AAC9C,QAAA,MAAM,4CAA4C,EAAE,GAAkB,CAAA;AACtE,QAAA,MAAM,2EAA2E,EAAE,GACrE,CAAA;
|
|
1
|
+
{"version":3,"file":"smart-sessions.d.ts","sourceRoot":"","sources":["../../../../modules/validators/smart-sessions.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,OAAO,EAMZ,KAAK,GAAG,EAOR,KAAK,mBAAmB,EAKzB,MAAM,MAAM,CAAA;AAcb,OAAO,KAAK,EAEV,MAAM,EACN,cAAc,EACd,uBAAuB,EACvB,gBAAgB,EAChB,OAAO,EACP,iBAAiB,EAElB,MAAM,aAAa,CAAA;AAEpB,OAAO,EAA4B,KAAK,MAAM,EAAE,MAAM,WAAW,CAAA;AACjE,OAAO,EAGL,8BAA8B,EAC9B,kCAAkC,EACnC,MAAM,QAAQ,CAAA;AAYf,UAAU,WAAW;IACnB,gBAAgB,EAAE,OAAO,CAAA;IACzB,wBAAwB,EAAE,GAAG,CAAA;IAC7B,IAAI,EAAE,GAAG,CAAA;IACT,eAAe,EAAE;QACf,qBAAqB,EAAE,SAAS,qBAAqB,EAAE,CAAA;QACvD,eAAe,EAAE,SAAS,aAAa,EAAE,CAAA;KAC1C,CAAA;IACD,OAAO,EAAE,SAAS,UAAU,EAAE,CAAA;IAC9B,aAAa,EAAE,SAAS,UAAU,EAAE,CAAA;CACrC;AAED,UAAU,aAAa;IACrB,MAAM,EAAE,OAAO,CAAA;IACf,QAAQ,EAAE,GAAG,CAAA;CACd;AAED,UAAU,qBAAqB;IAC7B,kBAAkB,EAAE,GAAG,CAAA;IACvB,YAAY,EAAE,SAAS,MAAM,EAAE,CAAA;CAChC;AAED,UAAU,UAAU;IAClB,oBAAoB,EAAE,GAAG,CAAA;IACzB,YAAY,EAAE,OAAO,CAAA;IACrB,cAAc,EAAE,SAAS,UAAU,EAAE,CAAA;CACtC;AAED,UAAU,UAAU;IAClB,MAAM,EAAE,OA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ACpB,eAAe,EACf,wBAAwB,EACxB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,GACnB,CAAA;AACD,YAAY,EACV,YAAY,EACZ,WAAW,EACX,wBAAwB,EACxB,WAAW,EACX,oBAAoB,EACpB,cAAc,GACf,CAAA"}
|
|
@@ -62,12 +62,10 @@ const SMART_SESSIONS_FALLBACK_TARGET_SELECTOR_FLAG = '0x00000001';
|
|
|
62
62
|
const SMART_SESSIONS_FALLBACK_TARGET_SELECTOR_FLAG_PERMITTED_TO_CALL_SMARTSESSION = '0x00000002';
|
|
63
63
|
// Dummy preclaimop action injected into every session so that the filler can trigger
|
|
64
64
|
// verifyExecution (ENABLE mode) using an injected dummy preclaimop when there are no
|
|
65
|
-
// real preclaimops. Target 0x...
|
|
65
|
+
// real preclaimops. Target 0x...0420 is the ecRecover precompile; calls to it fail
|
|
66
66
|
// silently because preclaimops are failure-tolerant. Selector 0x69123456 is
|
|
67
|
-
// intentionally uncommon.
|
|
68
|
-
|
|
69
|
-
// different contexts (action matching vs. literal execution target).
|
|
70
|
-
const DUMMY_PRECLAIMOP_TARGET = '0x0000000000000000000000000000000000000001';
|
|
67
|
+
// intentionally uncommon.
|
|
68
|
+
const DUMMY_PRECLAIMOP_TARGET = '0x0000000000000000000000000000000000000420';
|
|
71
69
|
const DUMMY_PRECLAIMOP_SELECTOR = '0x69123456';
|
|
72
70
|
const SPENDING_LIMITS_POLICY_ADDRESS = '0x00000088d48cf102a8cdb0137a9b173f957c6343';
|
|
73
71
|
const TIME_FRAME_POLICY_ADDRESS = '0x8177451511de0577b911c254e9551d981c26dc72';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type Caip2ChainId = `eip155:${number}`;
|
|
2
|
+
declare function toCaip2(chainId: number): Caip2ChainId;
|
|
3
|
+
declare function fromCaip2(chainId: string): number;
|
|
4
|
+
declare function isCaip2(chainId: string): chainId is Caip2ChainId;
|
|
5
|
+
export type { Caip2ChainId };
|
|
6
|
+
export { fromCaip2, isCaip2, toCaip2 };
|
|
7
|
+
//# sourceMappingURL=caip2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"caip2.d.ts","sourceRoot":"","sources":["../../../orchestrator/caip2.ts"],"names":[],"mappings":"AAAA,KAAK,YAAY,GAAG,UAAU,MAAM,EAAE,CAAA;AAItC,iBAAS,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY,CAK9C;AAED,iBAAS,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAK1C;AAED,iBAAS,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,IAAI,YAAY,CAEzD;AAED,YAAY,EAAE,YAAY,EAAE,CAAA;AAC5B,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,CAAA"}
|