@rhinestone/sdk 2.0.0-beta.1 → 2.0.0-beta.10

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.
Files changed (75) hide show
  1. package/README.md +42 -1
  2. package/dist/src/accounts/index.d.ts.map +1 -1
  3. package/dist/src/accounts/index.js +6 -34
  4. package/dist/src/actions/smart-sessions.d.ts.map +1 -1
  5. package/dist/src/actions/smart-sessions.js +3 -3
  6. package/dist/src/execution/error.d.ts +2 -2
  7. package/dist/src/execution/error.d.ts.map +1 -1
  8. package/dist/src/execution/error.js +3 -3
  9. package/dist/src/execution/index.d.ts +9 -9
  10. package/dist/src/execution/index.d.ts.map +1 -1
  11. package/dist/src/execution/index.js +18 -32
  12. package/dist/src/execution/utils.d.ts +11 -9
  13. package/dist/src/execution/utils.d.ts.map +1 -1
  14. package/dist/src/execution/utils.js +94 -29
  15. package/dist/src/index.d.ts +17 -12
  16. package/dist/src/index.d.ts.map +1 -1
  17. package/dist/src/index.js +12 -39
  18. package/dist/src/modules/index.d.ts +2 -2
  19. package/dist/src/modules/index.d.ts.map +1 -1
  20. package/dist/src/modules/index.js +2 -2
  21. package/dist/src/modules/read.d.ts.map +1 -1
  22. package/dist/src/modules/read.js +2 -4
  23. package/dist/src/modules/validators/index.d.ts +2 -2
  24. package/dist/src/modules/validators/index.d.ts.map +1 -1
  25. package/dist/src/modules/validators/index.js +2 -2
  26. package/dist/src/modules/validators/permissions.d.ts +5 -0
  27. package/dist/src/modules/validators/permissions.d.ts.map +1 -0
  28. package/dist/src/modules/validators/permissions.js +111 -0
  29. package/dist/src/modules/validators/policies/claim/permit2.d.ts +29 -3
  30. package/dist/src/modules/validators/policies/claim/permit2.d.ts.map +1 -1
  31. package/dist/src/modules/validators/smart-sessions.d.ts +14 -27
  32. package/dist/src/modules/validators/smart-sessions.d.ts.map +1 -1
  33. package/dist/src/modules/validators/smart-sessions.js +71 -17
  34. package/dist/src/orchestrator/caip2.d.ts +9 -3
  35. package/dist/src/orchestrator/caip2.d.ts.map +1 -1
  36. package/dist/src/orchestrator/caip2.js +40 -5
  37. package/dist/src/orchestrator/client.d.ts +2 -1
  38. package/dist/src/orchestrator/client.d.ts.map +1 -1
  39. package/dist/src/orchestrator/client.js +41 -18
  40. package/dist/src/orchestrator/consts.d.ts +1 -1
  41. package/dist/src/orchestrator/consts.d.ts.map +1 -1
  42. package/dist/src/orchestrator/consts.js +1 -1
  43. package/dist/src/orchestrator/destinations.d.ts +23 -0
  44. package/dist/src/orchestrator/destinations.d.ts.map +1 -0
  45. package/dist/src/orchestrator/destinations.js +36 -0
  46. package/dist/src/orchestrator/index.d.ts +5 -4
  47. package/dist/src/orchestrator/index.d.ts.map +1 -1
  48. package/dist/src/orchestrator/index.js +3 -2
  49. package/dist/src/orchestrator/registry.d.ts +3 -9
  50. package/dist/src/orchestrator/registry.d.ts.map +1 -1
  51. package/dist/src/orchestrator/registry.js +11 -26
  52. package/dist/src/orchestrator/types.d.ts +47 -15
  53. package/dist/src/orchestrator/types.d.ts.map +1 -1
  54. package/dist/src/types.d.ts +124 -33
  55. package/dist/src/types.d.ts.map +1 -1
  56. package/dist/src/utils/index.d.ts +2 -1
  57. package/dist/src/utils/index.d.ts.map +1 -1
  58. package/dist/src/utils/index.js +2 -1
  59. package/dist/src/utils/walletClient.d.ts.map +1 -0
  60. package/dist/src/{accounts → utils}/walletClient.js +1 -1
  61. package/package.json +2 -6
  62. package/dist/src/accounts/passport.d.ts +0 -9
  63. package/dist/src/accounts/passport.d.ts.map +0 -1
  64. package/dist/src/accounts/passport.js +0 -78
  65. package/dist/src/accounts/walletClient.d.ts.map +0 -1
  66. package/dist/src/actions/compact.d.ts +0 -15
  67. package/dist/src/actions/compact.d.ts.map +0 -1
  68. package/dist/src/actions/compact.js +0 -200
  69. package/dist/src/actions/deployment.d.ts +0 -19
  70. package/dist/src/actions/deployment.d.ts.map +0 -1
  71. package/dist/src/actions/deployment.js +0 -76
  72. package/dist/src/execution/permit2.d.ts +0 -7
  73. package/dist/src/execution/permit2.d.ts.map +0 -1
  74. package/dist/src/execution/permit2.js +0 -51
  75. /package/dist/src/{accounts → utils}/walletClient.d.ts +0 -0
@@ -8,8 +8,10 @@ import { createTransport, getBundlerClient, } from '../accounts/utils.js';
8
8
  import { createAuthProvider } from '../auth/provider.js';
9
9
  import { buildMockSignature, DUMMY_PRECLAIMOP_SELECTOR, DUMMY_PRECLAIMOP_TARGET, getOwnerValidator, getPermissionId, getSmartSessionValidator, isSessionEnabled, } from '../modules/validators/index.js';
10
10
  import { getMultiFactorValidator, getSocialRecoveryValidator, getWebAuthnValidator, supportsEip712, } from '../modules/validators/core.js';
11
- import { buildPermit2ClaimPolicyCalldata } from '../modules/validators/policies/claim/permit2.js';
11
+ import { buildPermit2ClaimPolicyCalldata, } from '../modules/validators/policies/claim/permit2.js';
12
+ import { resolvePermit2ClaimPolicy, } from '../modules/validators/smart-sessions.js';
12
13
  import { getOrchestrator, } from '../orchestrator/index.js';
14
+ import { getChainId, isNonEvmChain, } from '../orchestrator/destinations.js';
13
15
  import { getChainById, getTokenAddress, resolveTokenAddress, } from '../orchestrator/registry.js';
14
16
  import { SIG_MODE_EMISSARY_EXECUTION_ERC1271, SIG_MODE_ERC1271_EMISSARY, } from '../orchestrator/types.js';
15
17
  import { convertBigIntFields } from '../orchestrator/utils.js';
@@ -24,8 +26,9 @@ async function resolveSignersForChain(config, signers, chainId) {
24
26
  const resolved = resolveSessionForChain(signers, chainId);
25
27
  const enabled = await isSessionEnabled(getAddress(config), config.provider, resolved.session, config.useDevContracts);
26
28
  const enableData = enabled ? undefined : resolved.enableData;
27
- const hasExplicitActions = !!resolved.session.actions?.length;
28
- const verifyExecutions = resolved.verifyExecutions ?? signers.verifyExecutions ?? hasExplicitActions;
29
+ const verifyExecutions = resolved.verifyExecutions ??
30
+ signers.verifyExecutions ??
31
+ resolved.session.hasExplicitPermissions;
29
32
  return {
30
33
  type: 'experimental_session',
31
34
  session: resolved.session,
@@ -50,7 +53,21 @@ async function prepareTransaction(config, transaction) {
50
53
  if (isUserOpSigner) {
51
54
  throw new SignerNotSupportedError();
52
55
  }
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);
56
+ // Destination calls (transaction.calls on a cross-chain transaction) are
57
+ // executed on the destination chain by the solver/account. For non-EVM
58
+ // destinations we can't resolve arbitrary EVM calls; assert there are
59
+ // none and route an empty list through.
60
+ let resolvedCalls;
61
+ if (isNonEvmChain(targetChain)) {
62
+ if (transaction.calls && transaction.calls.length > 0) {
63
+ throw new Error(`Destination calls are not supported for non-EVM target chain ${targetChain.name} (${targetChain.caip2})`);
64
+ }
65
+ resolvedCalls = [];
66
+ }
67
+ else {
68
+ resolvedCalls = await resolveCallInputs(transaction.calls, config, targetChain, accountAddress);
69
+ }
70
+ const prepared = await prepareTransactionAsIntent(config, sourceChains, targetChain, resolvedCalls, transaction.gasLimit, tokenRequests, recipient, sponsored, eip7702InitSignature, settlementLayers, sourceAssets, feeAsset, auxiliaryFunds, account, signers);
54
71
  return {
55
72
  quotes: prepared.quotes,
56
73
  intentInput: prepared.intentInput,
@@ -129,6 +146,11 @@ async function getTargetExecutionSignature(config, signData, targetChain, signer
129
146
  if (!signData.targetExecution) {
130
147
  return undefined;
131
148
  }
149
+ // Target executions are EVM-only (smart-session validator on destination).
150
+ // Non-EVM destinations don't have a validator there to verify the sig.
151
+ if (isNonEvmChain(targetChain)) {
152
+ return undefined;
153
+ }
132
154
  const resolvedSigners = await resolveSignersForChain(config, signers, targetChain.id);
133
155
  if (!isResolvedSessionSignerSet(resolvedSigners) ||
134
156
  !resolvedSigners.verifyExecutions) {
@@ -264,10 +286,16 @@ async function signAuthorizationsInternal(config, context) {
264
286
  }
265
287
  const accountAddress = getAddress(config);
266
288
  const { contract: eip7702Contract } = getEip7702InitCall(config, eip7702InitSignature);
289
+ // EIP-7702 authorization is EVM-only — there's no contract to delegate
290
+ // to on Solana / Tron. Skip the destination chain entirely when it's
291
+ // non-EVM; source chains are always EVM by construction.
267
292
  const chains = new Map();
268
- for (const chain of [...(context.sourceChains ?? []), context.targetChain]) {
293
+ for (const chain of context.sourceChains ?? []) {
269
294
  chains.set(chain.id, chain);
270
295
  }
296
+ if (!isNonEvmChain(context.targetChain)) {
297
+ chains.set(context.targetChain.id, context.targetChain);
298
+ }
271
299
  const authorizations = [];
272
300
  for (const chain of chains.values()) {
273
301
  const walletClient = createWalletClient({
@@ -334,8 +362,15 @@ function getTransactionParams(transaction) {
334
362
  };
335
363
  }
336
364
  function getTokenRequests(targetChain, initialTokenRequests) {
337
- if (initialTokenRequests) {
338
- validateTokenSymbols(targetChain, initialTokenRequests.map((tokenRequest) => tokenRequest.address));
365
+ // Non-EVM destinations carry SPL mint / Tron T-prefixed addresses that
366
+ // aren't valid 0x-hex; skip symbol/EVM-address validation here and let
367
+ // the orchestrator validate per its own schema. EVM destinations keep
368
+ // the existing strict check so a typo on Optimism still fails fast.
369
+ if (initialTokenRequests && !isNonEvmChain(targetChain)) {
370
+ // Inside this branch targetChain is a viem `Chain`, which excludes the
371
+ // non-EVM transaction variant — token requests are EVM-typed here.
372
+ const evmRequests = initialTokenRequests;
373
+ validateTokenSymbols(targetChain, evmRequests.map((tokenRequest) => tokenRequest.address));
339
374
  }
340
375
  return initialTokenRequests ?? [];
341
376
  }
@@ -385,11 +420,18 @@ function getIntentAccount(config, eip7702InitSignature, account) {
385
420
  };
386
421
  }
387
422
  async function prepareTransactionAsIntent(config, sourceChains, targetChain, callInputs, gasLimit, tokenRequests, recipientInput, sponsored, eip7702InitSignature, settlementLayers, sourceAssets, feeAsset, auxiliaryFunds, account, signers) {
388
- const calls = parseCalls(callInputs, targetChain.id);
423
+ const targetChainId = getChainId(targetChain);
424
+ const calls = parseCalls(callInputs, targetChainId);
389
425
  const accountAccessList = createAccountAccessList(sourceChains, sourceAssets);
390
426
  function getRecipient(recipient) {
391
427
  if (typeof recipient === 'string') {
392
- // Passed as an address, assume it's an EOA
428
+ // Non-EVM recipients (Solana base58 / Tron T-prefix) carry no
429
+ // EVM smart-account semantics; orchestrator schema requires
430
+ // accountType / setupOps to be unset. Emit just the address.
431
+ if (isNonEvmChain(targetChain)) {
432
+ return { address: recipient };
433
+ }
434
+ // EVM passthrough — assume EOA.
393
435
  return {
394
436
  address: recipient,
395
437
  accountType: 'EOA',
@@ -405,11 +447,15 @@ async function prepareTransactionAsIntent(config, sourceChains, targetChain, cal
405
447
  const intentAccount = {
406
448
  ...getIntentAccount(config, eip7702InitSignature, account),
407
449
  ...(signers?.type === 'experimental_session' && {
408
- // Per-chain map: enables accurate per-chain session validation gas simulation
450
+ // Per-chain map: enables accurate per-chain session validation gas
451
+ // simulation. Non-EVM destinations are excluded — they have no
452
+ // destination-side session validator, so adding the synthetic chain
453
+ // id would force users to configure a session that's never used and
454
+ // make `resolveSessionForChain` throw for per-chain session signers.
409
455
  mockSignatures: Object.fromEntries([
410
456
  ...new Set([
411
457
  ...(sourceChains ?? []).map((c) => c.id),
412
- targetChain.id,
458
+ ...(isNonEvmChain(targetChain) ? [] : [targetChainId]),
413
459
  ]),
414
460
  ].map((chainId) => [
415
461
  String(chainId),
@@ -448,9 +494,9 @@ async function prepareTransactionAsIntent(config, sourceChains, targetChain, cal
448
494
  }
449
495
  }
450
496
  const metaIntent = {
451
- destinationChainId: targetChain.id,
497
+ destinationChainId: targetChainId,
452
498
  tokenRequests: tokenRequests.map((tokenRequest) => ({
453
- tokenAddress: resolveTokenAddress(tokenRequest.address, targetChain.id),
499
+ tokenAddress: resolveTokenAddress(tokenRequest.address, targetChainId),
454
500
  amount: tokenRequest.amount,
455
501
  })),
456
502
  recipient,
@@ -527,7 +573,14 @@ async function signIntent(config, signData, targetChain, signers, targetExecutio
527
573
  const signature = await signIntentTypedData(config, originSigners, validator, isRoot, typedData, chain, targetExecution ?? false);
528
574
  originSignatures.push(signature);
529
575
  }
530
- const destinationSigners = await resolveSignersForChain(config, signers, targetChain.id);
576
+ // Non-EVM destinations have no destination-side validator, so there's no
577
+ // session to resolve and no signer to derive. Skipping here matters for
578
+ // per-chain experimental sessions: `resolveSessionForChain` would throw
579
+ // `No session configured for chain {synthetic-id}` since users never
580
+ // configure a session keyed by the synthetic Solana/Tron chain id.
581
+ const destinationSigners = isNonEvmChain(targetChain)
582
+ ? undefined
583
+ : await resolveSignersForChain(config, signers, targetChain.id);
531
584
  const destinationSignature = await getDestinationSignature(config, destinationSigners, validator, isRoot, targetChain, destination, originSignatures, targetExecution ?? false);
532
585
  return {
533
586
  originSignatures,
@@ -535,18 +588,25 @@ async function signIntent(config, signData, targetChain, signers, targetExecutio
535
588
  };
536
589
  }
537
590
  async function getDestinationSignature(config, signers, validator, isRoot, targetChain, destination, originSignatures, targetExecution) {
538
- // Smart sessions require a separate destination signature because the
539
- // session enable data differs per chain
540
- if (signers?.type === 'experimental_session') {
541
- return await signDestinationSeparately(config, signers, validator, isRoot, targetChain, destination, targetExecution);
542
- }
543
- // ERC-7739 with K1 validator requires a separate destination signature because
544
- // the account's eip712Domain() returns the target chain's chainId, which differs
545
- // from the origin chain used for the last origin signature
546
- const isK1Validator = validator.address.toLowerCase() ===
547
- K1_DEFAULT_VALIDATOR_ADDRESS.toLowerCase();
548
- if (isK1Validator && supportsEip712(validator)) {
549
- return await signDestinationSeparately(config, signers, validator, isRoot, targetChain, destination, targetExecution);
591
+ // Non-EVM destinations have no destination-side validator, no
592
+ // eip712Domain(), no smart session enable data. Settlement is solver-
593
+ // mediated on the orchestrator side and the origin signatures alone
594
+ // authorize the bundle. Fall through to the "reuse last origin sig"
595
+ // branch instead of trying to sign on Solana / Tron.
596
+ if (!isNonEvmChain(targetChain)) {
597
+ // Smart sessions require a separate destination signature because the
598
+ // session enable data differs per chain
599
+ if (signers?.type === 'experimental_session') {
600
+ return await signDestinationSeparately(config, signers, validator, isRoot, targetChain, destination, targetExecution);
601
+ }
602
+ // ERC-7739 with K1 validator requires a separate destination signature because
603
+ // the account's eip712Domain() returns the target chain's chainId, which differs
604
+ // from the origin chain used for the last origin signature
605
+ const isK1Validator = validator.address.toLowerCase() ===
606
+ K1_DEFAULT_VALIDATOR_ADDRESS.toLowerCase();
607
+ if (isK1Validator && supportsEip712(validator)) {
608
+ return await signDestinationSeparately(config, signers, validator, isRoot, targetChain, destination, targetExecution);
609
+ }
550
610
  }
551
611
  const lastOriginSignature = originSignatures.at(-1);
552
612
  return typeof lastOriginSignature === 'object'
@@ -615,7 +675,7 @@ function coerceTypedDataValue(types, type, value) {
615
675
  /** Computes claim policy calldata when parameters are Permit2 typed data with claim policies. */
616
676
  function resolveClaimPolicyData(signers, parameters) {
617
677
  if (parameters.primaryType !== 'PermitBatchWitnessTransferFrom' ||
618
- !signers.session.claimPolicies?.length) {
678
+ !signers.session.claimPolicies.length) {
619
679
  return undefined;
620
680
  }
621
681
  const msg = parameters.message;
@@ -626,7 +686,7 @@ function resolveClaimPolicyData(signers, parameters) {
626
686
  typeof msg.deadline !== 'bigint') {
627
687
  return undefined;
628
688
  }
629
- return buildPermit2ClaimPolicyCalldata(signers.session.claimPolicies[0], parameters.message);
689
+ return buildPermit2ClaimPolicyCalldata(resolvePermit2ClaimPolicy(signers.session.claimPolicies[0]), parameters.message);
630
690
  }
631
691
  async function signIntentTypedData(config, signers, validator, isRoot, parameters, chain, targetExecution) {
632
692
  if (supportsEip712(validator)) {
@@ -773,7 +833,8 @@ async function submitIntentInternal(config, sourceChains, targetChain, quote, or
773
833
  type: 'intent',
774
834
  id: response.intentId,
775
835
  sourceChains: sourceChains?.map((chain) => chain.id),
776
- targetChain: targetChain.id,
836
+ targetChain: getChainId(targetChain),
837
+ expiresAt: quote.expiresAt,
777
838
  };
778
839
  }
779
840
  async function getValidatorAccount(config, signers, publicClient, chain) {
@@ -831,6 +892,8 @@ function getValidator(config, signers) {
831
892
  return undefined;
832
893
  }
833
894
  function parseCalls(calls, chainId) {
895
+ // Destination calls only run on EVM chains (non-EVM destinations reject
896
+ // calls upstream), so the resolved `to` is always a viem `Address` here.
834
897
  return calls.map((call) => ({
835
898
  data: call.data ?? '0x',
836
899
  value: call.value ?? 0n,
@@ -850,6 +913,8 @@ function createAccountAccessList(sourceChains, sourceAssets) {
850
913
  const chainTokenAmounts = {};
851
914
  for (const config of sourceAssets) {
852
915
  const chainId = config.chain.id;
916
+ // Source assets live on viem `Chain`s, which are always EVM, so the
917
+ // resolved value is a viem `Address`.
853
918
  const tokenAddress = resolveTokenAddress(config.address, config.chain.id);
854
919
  if (config.amount !== undefined) {
855
920
  if (!chainTokenAmounts[chainId])
@@ -1,14 +1,21 @@
1
1
  import type { Address, Chain, HashTypedDataParameters, Hex, SignableMessage, SignedAuthorizationList, TypedData, TypedDataDefinition } from 'viem';
2
2
  import type { UserOperationReceipt } from 'viem/account-abstraction';
3
- import { walletClientToAccount, wrapParaAccount } from './accounts/walletClient.js';
4
- import { deployAccountsForOwners } from './actions/deployment.js';
5
3
  import { type TransactionResult, type TransactionStatus, type UserOperationResult } from './execution/index.js';
6
- import { checkERC20AllowanceDirect, getPermit2Address } from './execution/permit2.js';
7
4
  import { type PreparedQuotes, type PreparedTransactionData, type PreparedUserOperationData, type QuoteSelection, type SignedTransactionData, type SignedUserOperationData } from './execution/utils.js';
8
5
  import { MULTI_FACTOR_VALIDATOR_ADDRESS, OWNABLE_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS } from './modules/index.js';
9
6
  import { type SessionDetails } from './modules/validators/smart-sessions.js';
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
- 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';
7
+ import type { ApprovalRequired, AuxiliaryFunds, BridgeFill, DestinationChain, IntentInput, IntentOpStatus, NonEvmAddress, NonEvmChain, Portfolio, Quote, SettlementLayer, SettlementLayerFilter, SplitIntentsInput, SplitIntentsResult, TokenRequirements, WrapRequired } from './orchestrator/index.js';
8
+ import { solanaMainnet, tronMainnet } from './orchestrator/index.js';
9
+ import type { AccountProviderConfig, AccountType, BundlerConfig, Call, CallInput, ChainSessionConfig, MultiFactorValidatorConfig, NonEvmTokenRequest, NonEvmTokenRequests, OwnableValidatorConfig, OwnerSet, ParamConstraint, PaymasterConfig, Permission, PermissionFunctionConfig, Permit2ClaimPolicy, Policy, ProviderConfig, Recovery, RhinestoneAccountConfig, RhinestoneConfig, RhinestoneSDKConfig, Session, SessionDefinition, SignerSet, TokenRequest, TokenSymbol, Transaction, UniversalActionPolicyParamCondition, UserOperationTransaction, WebauthnValidatorConfig } from './types.js';
10
+ interface SubmitTransactionOptions {
11
+ authorizations?: SignedAuthorizationList;
12
+ /**
13
+ * When `true`, the orchestrator validates the intent without executing it
14
+ * onchain. Internal use only; the `internal_` prefix marks it as not part
15
+ * of the supported public API.
16
+ */
17
+ internal_dryRun?: boolean;
18
+ }
12
19
  interface RhinestoneAccount {
13
20
  config: RhinestoneAccountConfig;
14
21
  deploy: (chain: Chain, params?: {
@@ -32,14 +39,13 @@ interface RhinestoneAccount {
32
39
  signAuthorizations: (preparedTransaction: PreparedTransactionData) => Promise<SignedAuthorizationList>;
33
40
  signMessage: (message: SignableMessage, chain: Chain, signers: SignerSet | undefined) => Promise<Hex>;
34
41
  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>;
35
- submitTransaction: (signedTransaction: SignedTransactionData, authorizations?: SignedAuthorizationList, dryRun?: boolean) => Promise<TransactionResult>;
36
- sendTransaction: (transaction: Transaction) => Promise<TransactionResult>;
42
+ submitTransaction: (signedTransaction: SignedTransactionData, options?: SubmitTransactionOptions) => Promise<TransactionResult>;
37
43
  prepareUserOperation: (transaction: UserOperationTransaction) => Promise<PreparedUserOperationData>;
38
44
  signUserOperation: (preparedUserOperation: PreparedUserOperationData) => Promise<SignedUserOperationData>;
39
45
  submitUserOperation: (signedUserOperation: SignedUserOperationData) => Promise<UserOperationResult>;
40
46
  sendUserOperation: (transaction: UserOperationTransaction) => Promise<UserOperationResult>;
41
- waitForExecution(result: TransactionResult, acceptsPreconfirmations?: boolean): Promise<TransactionStatus>;
42
- waitForExecution(result: UserOperationResult, acceptsPreconfirmations?: boolean): Promise<UserOperationReceipt>;
47
+ waitForExecution(result: TransactionResult): Promise<TransactionStatus>;
48
+ waitForExecution(result: UserOperationResult): Promise<UserOperationReceipt>;
43
49
  getAddress: () => Address;
44
50
  getPortfolio: (onTestnets?: boolean) => Promise<Portfolio>;
45
51
  experimental_getSessionDetails: (sessions: Session[]) => Promise<SessionDetails>;
@@ -51,7 +57,6 @@ interface RhinestoneAccount {
51
57
  } | null>;
52
58
  getValidators: (chain: Chain) => Promise<Address[]>;
53
59
  getExecutors: (chain: Chain) => Promise<Address[]>;
54
- checkERC20Allowance: (tokenAddress: Address, chain: Chain) => Promise<bigint>;
55
60
  }
56
61
  /**
57
62
  * Initialize a Rhinestone account
@@ -75,6 +80,6 @@ declare class RhinestoneSDK {
75
80
  }>;
76
81
  splitIntents(input: SplitIntentsInput): Promise<SplitIntentsResult>;
77
82
  }
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, };
83
+ export { RhinestoneSDK, createRhinestoneAccount, solanaMainnet, tronMainnet, OWNABLE_VALIDATOR_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS, MULTI_FACTOR_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, };
84
+ export type { RhinestoneAccount, AccountType, RhinestoneAccountConfig, AccountProviderConfig, ProviderConfig, BundlerConfig, PaymasterConfig, Transaction, TokenSymbol, CallInput, Call, TokenRequest, NonEvmTokenRequest, NonEvmTokenRequests, NonEvmAddress, OwnerSet, OwnableValidatorConfig, WebauthnValidatorConfig, MultiFactorValidatorConfig, SignerSet, ChainSessionConfig, Session, SessionDefinition, Recovery, Permission, PermissionFunctionConfig, ParamConstraint, Policy, Permit2ClaimPolicy, UniversalActionPolicyParamCondition, PreparedQuotes, PreparedTransactionData, Quote, QuoteSelection, SignedTransactionData, TransactionResult, PreparedUserOperationData, SignedUserOperationData, UserOperationResult, AuxiliaryFunds, BridgeFill, DestinationChain, NonEvmChain, IntentInput, IntentOpStatus, SettlementLayer, SettlementLayerFilter, SplitIntentsInput, SplitIntentsResult, Portfolio, TokenRequirements, WrapRequired, ApprovalRequired, };
80
85
  //# sourceMappingURL=index.d.ts.map
@@ -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,mBAAmB,EACpB,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAapE,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAChF,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AAE9D,OAAO,EAML,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EAEzB,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,yBAAyB,EAEzB,iBAAiB,EAClB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAG9B,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAQ7B,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAKL,8BAA8B,EAC9B,yBAAyB,EACzB,8BAA8B,EAE9B,0BAA0B,EAC3B,MAAM,WAAW,CAAA;AAClB,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,8BAA8B,EAC9B,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,eAAe,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AY,CAAc;IAClC,OAAO,CAAC,WAAW,CAAC,CAAQ;IAC5B,OAAO,CAAC,QAAQ,CAAC,CAAgB;IACjC,OAAO,CAAC,OAAO,CAAC,CAAe;IAC/B,OAAO,CAAC,SAAS,CAAC,CAAiB;IACnC,OAAO,CAAC,eAAe,CAAC,CAAS;IACjC,OAAO,CAAC,OAAO,CAAC,CAAwB;gBAE5B,OAAO,EAAE,mBAAmB;IAUxC,aAAa,CAAC,MAAM,EAAE,uBAAuB;IAc7C,eAAe,CAAC,QAAQ,EAAE,MAAM;;;IAShC,YAAY,CAAC,KAAK,EAAE,iBAAiB;CAQtC;AAED,OAAO,EACL,aAAa,EACb,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACrB,eAAe,EAEf,yBAAyB,EACzB,0BAA0B,EAC1B,8BAA8B,EAC9B,8BAA8B,EAE9B,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,8BAA8B,EAE9B,yBAAyB,EACzB,iBAAiB,GAClB,CAAA;AACD,YAAY,EACV,iBAAiB,EACjB,WAAW,EACX,uBAAuB,EACvB,qBAAqB,EACrB,cAAc,EACd,aAAa,EACb,eAAe,EACf,WAAW,EACX,WAAW,EACX,SAAS,EACT,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,sBAAsB,EACtB,uBAAuB,EACvB,0BAA0B,EAC1B,SAAS,EACT,kBAAkB,EAClB,OAAO,EACP,QAAQ,EACR,MAAM,EACN,kBAAkB,EAClB,mCAAmC,EACnC,cAAc,EACd,uBAAuB,EACvB,cAAc,EACd,qBAAqB,EACrB,iBAAiB,EACjB,yBAAyB,EACzB,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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"A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8B,GAC/B,CAAA;AACD,YAAY,EACV,iBAAiB,EACjB,WAAW,EACX,uBAAuB,EACvB,qBAAqB,EACrB,cAAc,EACd,aAAa,EACb,eAAe,EACf,WAAW,EACX,WAAW,EACX,SAAS,EACT,IAAI,EACJ,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EACb,QAAQ,EACR,sBAAsB,EACtB,uBAAuB,EACvB,0BAA0B,EAC1B,SAAS,EACT,kBAAkB,EAClB,OAAO,EACP,iBAAiB,EACjB,QAAQ,EACR,UAAU,EACV,wBAAwB,EACxB,eAAe,EACf,MAAM,EACN,kBAAkB,EAClB,mCAAmC,EACnC,cAAc,EACd,uBAAuB,EACvB,KAAK,EACL,cAAc,EACd,qBAAqB,EACrB,iBAAiB,EACjB,yBAAyB,EACzB,uBAAuB,EACvB,mBAAmB,EACnB,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,GACjB,CAAA"}
package/dist/src/index.js CHANGED
@@ -1,13 +1,10 @@
1
1
  import { checkAddress, deploy as deployInternal, FactoryArgsNotAvailableError, getAccountProvider, getAddress as getAddressInternal, getInitCode, isDeployed as isDeployedInternal, OwnersFieldRequiredError, setup as setupInternal, signEip7702InitData as signEip7702InitDataInternal, } from './accounts/index.js';
2
- import { walletClientToAccount, wrapParaAccount } from './accounts/walletClient.js';
3
- import { deployAccountsForOwners } from './actions/deployment.js';
4
2
  import { createAuthProvider } from './auth/provider.js';
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, } from './execution/permit2.js';
3
+ import { getIntentStatus as getIntentStatusInternal, getPortfolio as getPortfolioInternal, sendUserOperation as sendUserOperationInternal, splitIntents as splitIntentsInternal, waitForExecution as waitForExecutionInternal, } from './execution/index.js';
7
4
  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
5
  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
6
  import { isSessionEnabled as isSessionEnabledInternal, } from './modules/validators/smart-sessions.js';
10
- import { getAllSupportedChainsAndTokens, getSupportedTokens, getTokenAddress, getTokenDecimals, } from './orchestrator/index.js';
7
+ import { solanaMainnet, tronMainnet } from './orchestrator/index.js';
11
8
  /**
12
9
  * Initialize a Rhinestone account
13
10
  * Note: accounts are deployed onchain only when the first transaction is sent.
@@ -129,14 +126,14 @@ async function createRhinestoneAccount(config) {
129
126
  /**
130
127
  * Submit a transaction
131
128
  * @param signedTransaction Signed transaction data
132
- * @param authorizations EIP-7702 authorizations to submit (optional)
129
+ * @param options Optional submission options
130
+ * @param options.authorizations EIP-7702 authorizations to submit
133
131
  * @returns transaction result object (a UserOp hash)
134
132
  * @see {@link signTransaction} to sign the transaction data
135
133
  * @see {@link signAuthorizations} to sign the required EIP-7702 authorizations
136
- * @see {@link dryRun} true when intent is not executed onchain (internal use only)
137
134
  */
138
- function submitTransaction(signedTransaction, authorizations, dryRun) {
139
- return submitTransactionInternal(config, signedTransaction, authorizations ?? [], dryRun);
135
+ function submitTransaction(signedTransaction, options) {
136
+ return submitTransactionInternal(config, signedTransaction, options?.authorizations ?? [], options?.internal_dryRun ?? false);
140
137
  }
141
138
  /**
142
139
  * Prepare a user operation data
@@ -164,14 +161,6 @@ async function createRhinestoneAccount(config) {
164
161
  function submitUserOperation(signedUserOperation) {
165
162
  return submitUserOperationInternal(config, signedUserOperation);
166
163
  }
167
- /**
168
- * Sign and send a transaction
169
- * @param transaction Transaction to send
170
- * @returns transaction result object (an intent ID)
171
- */
172
- function sendTransaction(transaction) {
173
- return sendTransactionInternal(config, transaction);
174
- }
175
164
  /**
176
165
  * Sign and send a user operation
177
166
  * @param transaction User operation to send
@@ -180,8 +169,8 @@ async function createRhinestoneAccount(config) {
180
169
  function sendUserOperation(transaction) {
181
170
  return sendUserOperationInternal(config, transaction);
182
171
  }
183
- function waitForExecution(result, acceptsPreconfirmations = true) {
184
- return waitForExecutionInternal(config, result, acceptsPreconfirmations);
172
+ function waitForExecution(result) {
173
+ return waitForExecutionInternal(config, result);
185
174
  }
186
175
  /**
187
176
  * Get account address
@@ -233,18 +222,6 @@ async function createRhinestoneAccount(config) {
233
222
  function experimental_signEnableSession(details) {
234
223
  return signEnableSessionInternal(config, details);
235
224
  }
236
- /**
237
- * Check ERC20 allowance for the account owner and token (using Permit2 as spender)
238
- * @param tokenAddress The token contract address
239
- * @param chain The chain to check the allowance on
240
- * @returns The allowance amount
241
- */
242
- function checkERC20Allowance(tokenAddress, chain) {
243
- if (!config.provider) {
244
- throw new Error('Provider configuration is required');
245
- }
246
- return checkERC20AllowanceInternal(tokenAddress, chain, config);
247
- }
248
225
  return {
249
226
  config,
250
227
  deploy,
@@ -261,7 +238,6 @@ async function createRhinestoneAccount(config) {
261
238
  prepareUserOperation,
262
239
  signUserOperation,
263
240
  submitUserOperation,
264
- sendTransaction,
265
241
  sendUserOperation,
266
242
  waitForExecution,
267
243
  getAddress,
@@ -272,7 +248,6 @@ async function createRhinestoneAccount(config) {
272
248
  experimental_getSessionDetails,
273
249
  experimental_isSessionEnabled,
274
250
  experimental_signEnableSession,
275
- checkERC20Allowance,
276
251
  getInitData,
277
252
  };
278
253
  }
@@ -313,10 +288,8 @@ class RhinestoneSDK {
313
288
  return splitIntentsInternal(this.authProvider, this.endpointUrl, input, this.headers);
314
289
  }
315
290
  }
316
- export { RhinestoneSDK, createRhinestoneAccount, deployAccountsForOwners, walletClientToAccount, wrapParaAccount,
291
+ export { RhinestoneSDK, createRhinestoneAccount,
292
+ // Non-EVM destination chain descriptors
293
+ solanaMainnet, tronMainnet,
317
294
  // Validator addresses
318
- OWNABLE_VALIDATOR_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS, MULTI_FACTOR_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS,
319
- // Registry functions
320
- getSupportedTokens, getTokenAddress, getTokenDecimals, getAllSupportedChainsAndTokens,
321
- // Permit2 helpers
322
- checkERC20AllowanceDirect, getPermit2Address, };
295
+ OWNABLE_VALIDATOR_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS, MULTI_FACTOR_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, };
@@ -3,9 +3,9 @@ import type { RhinestoneConfig } from '../types.js';
3
3
  import { type ModeleSetup, type Module } from './common.js';
4
4
  import { getExecutors, getOwners, getValidators } from './read.js';
5
5
  import { getOwnerValidator, MULTI_FACTOR_VALIDATOR_ADDRESS, OWNABLE_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS } from './validators/index.js';
6
- import { getSessionDetails, signEnableSession } from './validators/smart-sessions.js';
6
+ import { getSessionDetails, signEnableSession, toSession } from './validators/smart-sessions.js';
7
7
  declare function getSetup(config: RhinestoneConfig): ModeleSetup;
8
8
  declare function getIntentExecutor(config: RhinestoneConfig): Module;
9
9
  declare function isRip7212SupportedNetwork(chain: Chain): boolean;
10
- export { OWNABLE_VALIDATOR_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS, MULTI_FACTOR_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, getSetup, getOwnerValidator, getOwners, getExecutors, getIntentExecutor, getValidators, isRip7212SupportedNetwork, getSessionDetails, signEnableSession, };
10
+ export { OWNABLE_VALIDATOR_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS, MULTI_FACTOR_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, getSetup, getOwnerValidator, getOwners, getExecutors, getIntentExecutor, getValidators, isRip7212SupportedNetwork, getSessionDetails, signEnableSession, toSession, };
11
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../modules/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,KAAK,EAAuB,MAAM,MAAM,CAAA;AAcpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAKhD,OAAO,EAQL,KAAK,WAAW,EAChB,KAAK,MAAM,EACZ,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AAC/D,OAAO,EACL,iBAAiB,EAEjB,8BAA8B,EAC9B,yBAAyB,EACzB,8BAA8B,EAC9B,0BAA0B,EAC3B,MAAM,cAAc,CAAA;AAErB,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,6BAA6B,CAAA;AAKpC,iBAAS,QAAQ,CAAC,MAAM,EAAE,gBAAgB,GAAG,WAAW,CA0EvD;AAED,iBAAS,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAY3D;AAED,iBAAS,yBAAyB,CAAC,KAAK,EAAE,KAAK,WAc9C;AAED,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,8BAA8B,EAC9B,8BAA8B,EAC9B,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,yBAAyB,EACzB,iBAAiB,EACjB,iBAAiB,GAClB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../modules/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,KAAK,EAAuB,MAAM,MAAM,CAAA;AAcpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAKhD,OAAO,EAQL,KAAK,WAAW,EAChB,KAAK,MAAM,EACZ,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AAC/D,OAAO,EACL,iBAAiB,EAEjB,8BAA8B,EAC9B,yBAAyB,EACzB,8BAA8B,EAC9B,0BAA0B,EAC3B,MAAM,cAAc,CAAA;AAErB,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,SAAS,EACV,MAAM,6BAA6B,CAAA;AAKpC,iBAAS,QAAQ,CAAC,MAAM,EAAE,gBAAgB,GAAG,WAAW,CA0EvD;AAED,iBAAS,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAY3D;AAED,iBAAS,yBAAyB,CAAC,KAAK,EAAE,KAAK,WAc9C;AAED,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,8BAA8B,EAC9B,8BAA8B,EAC9B,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,yBAAyB,EACzB,iBAAiB,EACjB,iBAAiB,EACjB,SAAS,GACV,CAAA"}
@@ -5,7 +5,7 @@ import { getModule, MODULE_TYPE_EXECUTOR, MODULE_TYPE_FALLBACK, MODULE_TYPE_HOOK
5
5
  import { getExecutors, getOwners, getValidators } from './read.js';
6
6
  import { getOwnerValidator, getSmartSessionValidator, MULTI_FACTOR_VALIDATOR_ADDRESS, OWNABLE_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS, } from './validators/index.js';
7
7
  import { getSocialRecoveryValidator } from './validators/core.js';
8
- import { getSessionDetails, signEnableSession, } from './validators/smart-sessions.js';
8
+ import { getSessionDetails, signEnableSession, toSession, } from './validators/smart-sessions.js';
9
9
  const SMART_SESSION_COMPATIBILITY_FALLBACK_ADDRESS = '0x000000000052e9685932845660777DF43C2dC496';
10
10
  function getSetup(config) {
11
11
  const ownerValidator = getOwnerValidator(config);
@@ -87,4 +87,4 @@ function isRip7212SupportedNetwork(chain) {
87
87
  ];
88
88
  return supportedChains.includes(chain);
89
89
  }
90
- export { OWNABLE_VALIDATOR_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS, MULTI_FACTOR_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, getSetup, getOwnerValidator, getOwners, getExecutors, getIntentExecutor, getValidators, isRip7212SupportedNetwork, getSessionDetails, signEnableSession, };
90
+ export { OWNABLE_VALIDATOR_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS, MULTI_FACTOR_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, getSetup, getOwnerValidator, getOwners, getExecutors, getIntentExecutor, getValidators, isRip7212SupportedNetwork, getSessionDetails, signEnableSession, toSession, };
@@ -1 +1 @@
1
- {"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../../modules/read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,KAAK,EAAsB,MAAM,MAAM,CAAA;AAEnE,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAG3D,iBAAe,aAAa,CAC1B,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,QAAQ,CAAC,EAAE,cAAc,GACxB,OAAO,CAAC,OAAO,EAAE,CAAC,CAkDpB;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AAE,SAAS,EAAE,CAAA"}
@@ -9,8 +9,7 @@ async function getValidators(accountType, account, chain, provider) {
9
9
  switch (accountType) {
10
10
  case 'safe':
11
11
  case 'startale':
12
- case 'nexus':
13
- case 'passport': {
12
+ case 'nexus': {
14
13
  const validators = await publicClient.readContract({
15
14
  abi: [
16
15
  {
@@ -127,8 +126,7 @@ async function getExecutors(accountType, account, chain, provider) {
127
126
  switch (accountType) {
128
127
  case 'safe':
129
128
  case 'startale':
130
- case 'nexus':
131
- case 'passport': {
129
+ case 'nexus': {
132
130
  const executors = await publicClient.readContract({
133
131
  abi: [
134
132
  {
@@ -1,4 +1,4 @@
1
1
  import { getMockSignature, getOwnerValidator, MULTI_FACTOR_VALIDATOR_ADDRESS, OWNABLE_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS } from './core.js';
2
- import { buildMockSignature, DUMMY_PRECLAIMOP_SELECTOR, DUMMY_PRECLAIMOP_TARGET, getEnableSessionCall, getPermissionId, getSmartSessionValidator, isSessionEnabled, packSignature } from './smart-sessions.js';
3
- export { OWNABLE_VALIDATOR_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS, MULTI_FACTOR_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, DUMMY_PRECLAIMOP_TARGET, DUMMY_PRECLAIMOP_SELECTOR, getOwnerValidator, getSmartSessionValidator, getEnableSessionCall, getPermissionId, getMockSignature, buildMockSignature, isSessionEnabled, packSignature, };
2
+ import { buildMockSignature, DUMMY_PRECLAIMOP_SELECTOR, DUMMY_PRECLAIMOP_TARGET, getEnableSessionCall, getPermissionId, getSmartSessionValidator, isSessionEnabled, packSignature, toSession } from './smart-sessions.js';
3
+ export { OWNABLE_VALIDATOR_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS, MULTI_FACTOR_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, DUMMY_PRECLAIMOP_TARGET, DUMMY_PRECLAIMOP_SELECTOR, getOwnerValidator, getSmartSessionValidator, getEnableSessionCall, getPermissionId, getMockSignature, buildMockSignature, isSessionEnabled, packSignature, toSession, };
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../modules/validators/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,8BAA8B,EAC9B,yBAAyB,EACzB,8BAA8B,EAC9B,0BAA0B,EAC3B,MAAM,QAAQ,CAAA;AACf,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EACzB,uBAAuB,EACvB,oBAAoB,EACpB,eAAe,EACf,wBAAwB,EACxB,gBAAgB,EAChB,aAAa,EACd,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,8BAA8B,EAC9B,8BAA8B,EAC9B,uBAAuB,EACvB,yBAAyB,EACzB,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,GACd,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../modules/validators/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,8BAA8B,EAC9B,yBAAyB,EACzB,8BAA8B,EAC9B,0BAA0B,EAC3B,MAAM,QAAQ,CAAA;AACf,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EACzB,uBAAuB,EACvB,oBAAoB,EACpB,eAAe,EACf,wBAAwB,EACxB,gBAAgB,EAChB,aAAa,EACb,SAAS,EACV,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,8BAA8B,EAC9B,8BAA8B,EAC9B,uBAAuB,EACvB,yBAAyB,EACzB,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,SAAS,GACV,CAAA"}
@@ -1,3 +1,3 @@
1
1
  import { getMockSignature, getOwnerValidator, MULTI_FACTOR_VALIDATOR_ADDRESS, OWNABLE_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS, } from './core.js';
2
- import { buildMockSignature, DUMMY_PRECLAIMOP_SELECTOR, DUMMY_PRECLAIMOP_TARGET, getEnableSessionCall, getPermissionId, getSmartSessionValidator, isSessionEnabled, packSignature, } from './smart-sessions.js';
3
- export { OWNABLE_VALIDATOR_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS, MULTI_FACTOR_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, DUMMY_PRECLAIMOP_TARGET, DUMMY_PRECLAIMOP_SELECTOR, getOwnerValidator, getSmartSessionValidator, getEnableSessionCall, getPermissionId, getMockSignature, buildMockSignature, isSessionEnabled, packSignature, };
2
+ import { buildMockSignature, DUMMY_PRECLAIMOP_SELECTOR, DUMMY_PRECLAIMOP_TARGET, getEnableSessionCall, getPermissionId, getSmartSessionValidator, isSessionEnabled, packSignature, toSession, } from './smart-sessions.js';
3
+ export { OWNABLE_VALIDATOR_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS, MULTI_FACTOR_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, DUMMY_PRECLAIMOP_TARGET, DUMMY_PRECLAIMOP_SELECTOR, getOwnerValidator, getSmartSessionValidator, getEnableSessionCall, getPermissionId, getMockSignature, buildMockSignature, isSessionEnabled, packSignature, toSession, };
@@ -0,0 +1,5 @@
1
+ import type { Permission, ScopedAction } from '../../types.js';
2
+ declare function resolvePermission(permission: Permission): ScopedAction[];
3
+ declare function resolvePermissions(permissions: readonly Permission[]): ScopedAction[];
4
+ export { resolvePermissions, resolvePermission };
5
+ //# sourceMappingURL=permissions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../../../modules/validators/permissions.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,UAAU,EAEV,YAAY,EAEb,MAAM,aAAa,CAAA;AA0CpB,iBAAS,iBAAiB,CAAC,UAAU,EAAE,UAAU,GAAG,YAAY,EAAE,CA+FjE;AAED,iBAAS,kBAAkB,CACzB,WAAW,EAAE,SAAS,UAAU,EAAE,GACjC,YAAY,EAAE,CAEhB;AAED,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,CAAA"}