@charterlabs/rhinestone-sdk 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/README.md +31 -200
  2. package/dist/src/accounts/index.d.ts +3 -2
  3. package/dist/src/accounts/index.d.ts.map +1 -1
  4. package/dist/src/accounts/index.js +14 -6
  5. package/dist/src/accounts/signing/common.d.ts.map +1 -1
  6. package/dist/src/accounts/signing/common.js +9 -18
  7. package/dist/src/actions/compact.d.ts +2 -1
  8. package/dist/src/actions/compact.d.ts.map +1 -1
  9. package/dist/src/actions/compact.js +3 -1
  10. package/dist/src/actions/smart-sessions.d.ts +11 -1
  11. package/dist/src/actions/smart-sessions.d.ts.map +1 -1
  12. package/dist/src/actions/smart-sessions.js +33 -0
  13. package/dist/src/errors/index.d.ts +2 -2
  14. package/dist/src/errors/index.d.ts.map +1 -1
  15. package/dist/src/errors/index.js +2 -1
  16. package/dist/src/execution/compact.d.ts +3 -1
  17. package/dist/src/execution/compact.d.ts.map +1 -1
  18. package/dist/src/execution/compact.js +5 -1
  19. package/dist/src/execution/error.d.ts +1 -0
  20. package/dist/src/execution/error.d.ts.map +1 -1
  21. package/dist/src/execution/index.d.ts +3 -3
  22. package/dist/src/execution/index.d.ts.map +1 -1
  23. package/dist/src/execution/index.js +16 -11
  24. package/dist/src/execution/utils.d.ts +9 -7
  25. package/dist/src/execution/utils.d.ts.map +1 -1
  26. package/dist/src/execution/utils.js +85 -14
  27. package/dist/src/index.d.ts +6 -4
  28. package/dist/src/index.d.ts.map +1 -1
  29. package/dist/src/index.js +13 -11
  30. package/dist/src/modules/index.d.ts +2 -2
  31. package/dist/src/modules/index.d.ts.map +1 -1
  32. package/dist/src/modules/index.js +2 -1
  33. package/dist/src/modules/validators/core.d.ts +2 -1
  34. package/dist/src/modules/validators/core.d.ts.map +1 -1
  35. package/dist/src/modules/validators/core.js +4 -3
  36. package/dist/src/modules/validators/smart-sessions.d.ts +9 -5
  37. package/dist/src/modules/validators/smart-sessions.d.ts.map +1 -1
  38. package/dist/src/modules/validators/smart-sessions.js +383 -22
  39. package/dist/src/orchestrator/client.d.ts +2 -7
  40. package/dist/src/orchestrator/client.d.ts.map +1 -1
  41. package/dist/src/orchestrator/client.js +49 -43
  42. package/dist/src/orchestrator/error.d.ts +11 -1
  43. package/dist/src/orchestrator/error.d.ts.map +1 -1
  44. package/dist/src/orchestrator/error.js +16 -1
  45. package/dist/src/orchestrator/index.d.ts +4 -4
  46. package/dist/src/orchestrator/index.d.ts.map +1 -1
  47. package/dist/src/orchestrator/index.js +2 -1
  48. package/dist/src/orchestrator/registry.d.ts +1 -1
  49. package/dist/src/orchestrator/registry.d.ts.map +1 -1
  50. package/dist/src/orchestrator/registry.js +3 -14
  51. package/dist/src/orchestrator/registry.test.js +5 -1
  52. package/dist/src/orchestrator/types.d.ts +26 -4
  53. package/dist/src/orchestrator/types.d.ts.map +1 -1
  54. package/dist/src/orchestrator/types.js +15 -1
  55. package/dist/src/types.d.ts +30 -11
  56. package/dist/src/types.d.ts.map +1 -1
  57. package/package.json +3 -3
package/README.md CHANGED
@@ -1,245 +1,76 @@
1
1
  # Rhinestone SDK
2
2
 
3
- End-to-end chain abstraction and modularity toolkit
3
+ > End-to-end chain abstraction and modularity toolkit
4
4
 
5
- ## Usage
5
+ Rhinestone is a vertically integrated smart wallet and crosschain liquidity platform. The SDK provides a unified interface for deploying and managing self-custodial smart accounts, powered by an intent-based transaction infrastructure that enables seamless crosschain execution without bridging or gas tokens.
6
6
 
7
- ### Installation
7
+ The platform combines modular [smart account tooling](https://docs.rhinestone.dev/smart-wallet/core/create-account) with an intent engine ([Warp](https://docs.rhinestone.dev/home/introduction/rhinestone-intents)) that aggregates settlement layers through a unified relayer market. This handles routing, token liquidity, and crosschain orchestration across all [supported chains](https://docs.rhinestone.dev/home/resources/supported-chains).
8
8
 
9
- ```bash
10
- npm install viem @rhinestone/sdk
11
- ```
9
+ [Documentation](https://docs.rhinestone.dev)
12
10
 
13
- ```bash
14
- pnpm install viem @rhinestone/sdk
15
- ```
11
+ ## Features
16
12
 
17
- ```bash
18
- yarn add viem @rhinestone/sdk
19
- ```
20
13
 
21
- ```bash
22
- bun install viem @rhinestone/sdk
23
- ```
14
+ - **Crosschain Transactions** - Execute transactions on any target chain using assets from any source chain. The orchestrator handles routing and settlement. [Learn more](https://docs.rhinestone.dev/smart-wallet/chain-abstraction/multi-chain-intent)
24
15
 
25
- ## Quickstart
16
+ - **Swaps** - Token exchanges via solver-based swaps or injected DEX aggregator swaps, integrated into crosschain transaction execution. [Learn more](https://docs.rhinestone.dev/smart-wallet/chain-abstraction/swaps)
26
17
 
27
- You'll need a Rhinestone API key, as well as an existing account with some testnet ETH on the source chain.
18
+ - **Passkeys** - WebAuthn-based authentication for smart accounts, replacing seed phrases with device biometrics. [Learn more](https://docs.rhinestone.dev/smart-wallet/core/passkeys)
28
19
 
29
- ### SDK Initialization
20
+ - **Smart Sessions** - Onchain permissions system for scoped transaction automation, enabling one-click UX and server-side execution with granular policies. [Learn more](https://docs.rhinestone.dev/smart-wallet/smart-sessions/overview)
30
21
 
31
- To initialize the SDK with your configuration:
22
+ - **Gas Sponsorship** - Subsidize gas, bridge, and swap fees for users by depositing USDC on Base. Applies across all supported chains. [Learn more](https://docs.rhinestone.dev/smart-wallet/gas-sponsorship/overview)
32
23
 
33
- ```ts
34
- import { RhinestoneSDK } from '@rhinestone/sdk'
24
+ ## Installation
35
25
 
36
- const sdk = new RhinestoneSDK({
37
- apiKey: 'your-rhinestone-api-key',
38
- // Optional: Provider configuration
39
- provider: {
40
- type: 'alchemy',
41
- apiKey: 'your-alchemy-api-key',
42
- },
43
- // Optional: Bundler configuration
44
- bundler: {
45
- // the bundler settings
46
- },
47
- // Optional: Paymaster configuration
48
- paymaster: {
49
- // the paymaster settings
50
- },
51
- })
26
+ ```bash
27
+ npm install viem @rhinestone/sdk
28
+ ```
29
+
30
+ ```bash
31
+ bun install viem @rhinestone/sdk
52
32
  ```
53
33
 
54
- ### Creating a Wallet
34
+ ## Quickstart
55
35
 
56
- Let's create a smart account with a single owner:
36
+ Create a smart account:
57
37
 
58
38
  ```ts
59
39
  import { RhinestoneSDK } from '@rhinestone/sdk'
60
- import { generatePrivateKey, privateKeyToAccount } from 'viem/accounts'
61
- import { baseSepolia, arbitrumSepolia, optimismSepolia } from 'viem/chains'
62
- import {
63
- Chain,
64
- createPublicClient,
65
- createWalletClient,
66
- encodeFunctionData,
67
- erc20Abi,
68
- Hex,
69
- http,
70
- parseEther,
71
- } from 'viem'
72
-
73
- const fundingPrivateKey = process.env.FUNDING_PRIVATE_KEY
74
- if (!fundingPrivateKey) {
75
- throw new Error('FUNDING_PRIVATE_KEY is not set')
76
- }
77
-
78
- const rhinestoneApiKey = process.env.RHINESTONE_API_KEY
79
- if (!rhinestoneApiKey) {
80
- throw new Error('RHINESTONE_API_KEY is not set')
81
- }
82
-
83
- const sourceChain = baseSepolia
84
- const targetChain = arbitrumSepolia
85
-
86
- // You can use an existing PK here
87
- const privateKey = generatePrivateKey()
88
- console.info(`Owner private key: ${privateKey}`)
89
- const account = privateKeyToAccount(privateKey)
90
-
91
- // Initialize the SDK
92
- const sdk = new RhinestoneSDK({
93
- apiKey: rhinestoneApiKey,
94
- })
95
40
 
96
- // Create the Rhinestone account
97
- const rhinestoneAccount = await sdk.createAccount({
41
+ const rhinestone = new RhinestoneSDK()
42
+ const account = await rhinestone.createAccount({
98
43
  owners: {
99
44
  type: 'ecdsa',
100
- accounts: [account],
45
+ accounts: [signer],
101
46
  },
102
47
  })
103
- const address = await rhinestoneAccount.getAddress()
104
- console.info(`Smart account address: ${address}`)
105
- ```
106
-
107
- ### Funding the Account
108
-
109
- We will send some ETH from the funding account to the created smart account. The Orchestrator will use some of that ETH to deploy the account on the target chain, as well as to convert it to USDC for a transfer transaction.
110
-
111
- ```ts
112
- const publicClient = createPublicClient({
113
- chain: sourceChain,
114
- transport: http(),
115
- });
116
- const fundingAccount = privateKeyToAccount(fundingPrivateKey as Hex);
117
- const fundingClient = createWalletClient({
118
- account: fundingAccount,
119
- chain: sourceChain,
120
- transport: http(),
121
- });
122
-
123
- const txHash = await fundingClient.sendTransaction({
124
- to: address,
125
- value: parseEther('0.001'),
126
- });
127
- await publicClient.waitForTransactionReceipt({ hash: txHash });
128
48
  ```
129
49
 
130
- ### Sending a Cross-chain Transaction
131
-
132
- Finally, let's make a cross-chain token transfer:
50
+ Send a crosschain transaction:
133
51
 
134
52
  ```ts
135
- const usdcTarget = '0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d';
136
- const usdcAmount = 1n;
137
-
138
- const transaction = await rhinestoneAccount.sendTransaction({
139
- sourceChain,
140
- targetChain,
53
+ const transaction = await account.sendTransaction({
54
+ sourceChains: [baseSepolia],
55
+ targetChain: arbitrumSepolia,
141
56
  calls: [
142
57
  {
143
- to: usdcTarget,
58
+ to: 'USDC',
144
59
  value: 0n,
145
60
  data: encodeFunctionData({
146
61
  abi: erc20Abi,
147
62
  functionName: 'transfer',
148
- args: ['0xd8da6bf26964af9d7eed9e03e53415d37aa96045', usdcAmount],
63
+ args: [recipient, amount],
149
64
  }),
150
65
  },
151
66
  ],
152
- tokenRequests: [
153
- {
154
- address: usdcTarget,
155
- amount: usdcAmount,
156
- },
157
- ],
158
- });
159
- console.info('Transaction', transaction);
160
-
161
- const transactionResult = await rhinestoneAccount.waitForExecution(transaction);
162
- console.info('Result', transactionResult);
163
- ```
164
-
165
- After running that, you will get a smart account deployed on both Base Sepolia and Arbitrum Sepolia, and make a cross-chain USDC transfer.
166
-
167
- ### Using Smart Sessions
168
-
169
- First, define a session you want to use:
170
-
171
- ```ts
172
- const session: Session = {
173
- owners: {
174
- type: 'ecdsa',
175
- accounts: [sessionOwner],
176
- },
177
- actions: [
178
- {
179
- target: wethAddress,
180
- selector: toFunctionSelector(
181
- getAbiItem({
182
- abi: wethAbi,
183
- name: 'deposit',
184
- }),
185
- ),
186
- },
187
- {
188
- target: wethAddress,
189
- selector: toFunctionSelector(
190
- getAbiItem({
191
- abi: wethAbi,
192
- name: 'transfer',
193
- }),
194
- ),
195
- policies: [
196
- {
197
- type: 'universal-action',
198
- rules: [
199
- {
200
- condition: 'equal',
201
- calldataOffset: 0n,
202
- referenceValue: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045',
203
- },
204
- ],
205
- },
206
- ],
207
- },
208
- ],
209
- }
210
- ```
211
-
212
- During account initialization, provide the session you've just created. Make sure to also provide a bundler configuration.
213
-
214
- ```ts
215
- // Initialize the SDK with bundler configuration
216
- const sdk = new RhinestoneSDK({
217
- apiKey: rhinestoneApiKey,
218
- bundler: {
219
- // bundler configuration
220
- },
67
+ tokenRequests: [{ address: 'USDC', amount }],
221
68
  })
222
69
 
223
- const rhinestoneAccount = await sdk.createAccount({
224
- owners: {
225
- type: 'ecdsa',
226
- accounts: [account],
227
- },
228
- sessions: [session],
229
- })
70
+ const result = await account.waitForExecution(transaction)
230
71
  ```
231
72
 
232
- When making a transaction, specify the `signers` object to sign it with the session key:
233
-
234
- ```ts
235
- const transactionResult = await rhinestoneAccount.sendTransaction({
236
- // …
237
- signers: {
238
- type: 'session',
239
- session: session,
240
- },
241
- })
242
- ```
73
+ For a complete walkthrough, see the [Quickstart guide](https://docs.rhinestone.dev/smart-wallet/quickstart).
243
74
 
244
75
  ## Migrating from Orchestrator SDK
245
76
 
@@ -31,7 +31,8 @@ declare function getModuleInstallationCalls(config: RhinestoneConfig, module: Mo
31
31
  declare function getModuleUninstallationCalls(config: RhinestoneConfig, module: Module): Call[];
32
32
  declare function getAddress(config: RhinestoneConfig): `0x${string}`;
33
33
  declare function checkAddress(config: RhinestoneConfig): boolean;
34
- declare function getPackedSignature(config: RhinestoneConfig, signers: SignerSet | undefined, chain: Chain, validator: ValidatorConfig, hash: Hex, transformSignature?: (signature: Hex) => Hex): Promise<Hex>;
34
+ declare function getEip1271Signature(config: RhinestoneConfig, signers: SignerSet | undefined, chain: Chain, validator: ValidatorConfig, hash: Hex, transformSignature?: (signature: Hex) => Hex): Promise<Hex>;
35
+ declare function getEmissarySignature(config: RhinestoneConfig, signers: SignerSet | undefined, chain: Chain, hash: Hex, transformSignature?: (signature: Hex) => Hex): Promise<Hex>;
35
36
  declare function getTypedDataPackedSignature<typedData extends TypedData | Record<string, unknown> = TypedData, primaryType extends keyof typedData | 'EIP712Domain' = keyof typedData>(config: RhinestoneConfig, signers: SignerSet | undefined, chain: Chain, validator: ValidatorConfig, parameters: HashTypedDataParameters<typedData, primaryType>, transformSignature?: (signature: Hex) => Hex): Promise<Hex>;
36
37
  declare function isDeployed(config: RhinestoneConfig, chain: Chain): Promise<boolean>;
37
38
  declare function deploy(config: RhinestoneConfig, chain: Chain, params?: {
@@ -44,5 +45,5 @@ declare function getSmartAccount(config: RhinestoneConfig, client: PublicClient,
44
45
  declare function getGuardianSmartAccount(config: RhinestoneConfig, client: PublicClient, chain: Chain, guardians: OwnerSet): Promise<import("viem/_types/account-abstraction").SmartAccount<import("viem/_types/account-abstraction").SmartAccountImplementation<import("viem").Abi, "0.7">> | undefined>;
45
46
  declare function is7702(config: RhinestoneConfig): boolean;
46
47
  declare function getAccountProvider(config: RhinestoneConfig): AccountProviderConfig;
47
- export { getEip712Domain, getModuleInstallationCalls, getModuleUninstallationCalls, getAddress, checkAddress, getAccountProvider, getInitCode, getV0InitCode, signEip7702InitData, getEip7702InitCall, is7702, isDeployed, deploy, setup, toErc6492Signature, getSmartAccount, getGuardianSmartAccount, getPackedSignature, getTypedDataPackedSignature, deployStandaloneWithEoa, isAccountError, AccountError, AccountConfigurationNotSupportedError, Eip712DomainNotAvailableError, Eip7702AccountMustHaveEoaError, Eip7702NotSupportedForAccountError, EoaAccountMustHaveAccountError, EoaSigningMethodNotConfiguredError, EoaSigningNotSupportedError, ExistingEip7702AccountsNotSupportedError, FactoryArgsNotAvailableError, ModuleInstallationNotSupportedError, OwnersFieldRequiredError, SigningNotSupportedForAccountError, SmartSessionsNotEnabledError, WalletClientNoConnectedAccountError, };
48
+ export { getEip712Domain, getModuleInstallationCalls, getModuleUninstallationCalls, getAddress, checkAddress, getAccountProvider, getInitCode, getV0InitCode, signEip7702InitData, getEip7702InitCall, is7702, isDeployed, deploy, setup, toErc6492Signature, getSmartAccount, getGuardianSmartAccount, getEip1271Signature, getEmissarySignature, getTypedDataPackedSignature, deployStandaloneWithEoa, isAccountError, AccountError, AccountConfigurationNotSupportedError, Eip712DomainNotAvailableError, Eip7702AccountMustHaveEoaError, Eip7702NotSupportedForAccountError, EoaAccountMustHaveAccountError, EoaSigningMethodNotConfiguredError, EoaSigningNotSupportedError, ExistingEip7702AccountsNotSupportedError, FactoryArgsNotAvailableError, ModuleInstallationNotSupportedError, OwnersFieldRequiredError, SigningNotSupportedForAccountError, SmartSessionsNotEnabledError, WalletClientNoConnectedAccountError, };
48
49
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../accounts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,KAAK,EAMV,KAAK,uBAAuB,EAC5B,KAAK,GAAG,EAER,KAAK,YAAY,EAEjB,KAAK,SAAS,EAGf,MAAM,MAAM,CAAA;AAUb,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAG/C,OAAO,KAAK,EACV,qBAAqB,EACrB,IAAI,EACJ,QAAQ,EACR,gBAAgB,EAChB,SAAS,EACV,MAAM,UAAU,CAAA;AACjB,OAAO,EACL,qCAAqC,EACrC,YAAY,EACZ,6BAA6B,EAC7B,8BAA8B,EAC9B,kCAAkC,EAClC,8BAA8B,EAC9B,kCAAkC,EAClC,2BAA2B,EAC3B,wCAAwC,EACxC,4BAA4B,EAC5B,cAAc,EACd,mCAAmC,EACnC,wBAAwB,EACxB,kCAAkC,EAClC,4BAA4B,EAC5B,mCAAmC,EACpC,MAAM,SAAS,CAAA;AAkDhB,OAAO,EAGL,KAAK,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EACZ,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,MAAM,EACN,UAAU,EACV,MAAM,EACN,KAAK,EACL,kBAAkB,EAClB,eAAe,EACf,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,EACpB,2BAA2B,EAC3B,uBAAuB,EAEvB,cAAc,EACd,YAAY,EACZ,qCAAqC,EACrC,6BAA6B,EAC7B,8BAA8B,EAC9B,kCAAkC,EAClC,8BAA8B,EAC9B,kCAAkC,EAClC,2BAA2B,EAC3B,wCAAwC,EACxC,4BAA4B,EAC5B,mCAAmC,EACnC,wBAAwB,EACxB,kCAAkC,EAClC,4BAA4B,EAC5B,mCAAmC,GACpC,CAAA"}
@@ -18,7 +18,8 @@ exports.setup = setup;
18
18
  exports.toErc6492Signature = toErc6492Signature;
19
19
  exports.getSmartAccount = getSmartAccount;
20
20
  exports.getGuardianSmartAccount = getGuardianSmartAccount;
21
- exports.getPackedSignature = getPackedSignature;
21
+ exports.getEip1271Signature = getEip1271Signature;
22
+ exports.getEmissarySignature = getEmissarySignature;
22
23
  exports.getTypedDataPackedSignature = getTypedDataPackedSignature;
23
24
  exports.deployStandaloneWithEoa = deployStandaloneWithEoa;
24
25
  const viem_1 = require("viem");
@@ -303,7 +304,7 @@ function checkAddress(config) {
303
304
  return (config.initData.address.toLowerCase() === getAddress(config).toLowerCase());
304
305
  }
305
306
  // Signs and packs a signature to be EIP-1271 compatible
306
- async function getPackedSignature(config, signers, chain, validator, hash, transformSignature = (signature) => signature) {
307
+ async function getEip1271Signature(config, signers, chain, validator, hash, transformSignature = (signature) => signature) {
307
308
  if (config.account?.type === 'eoa') {
308
309
  throw new error_1.EoaSigningNotSupportedError('packed signatures');
309
310
  }
@@ -338,6 +339,17 @@ async function getPackedSignature(config, signers, chain, validator, hash, trans
338
339
  }
339
340
  }
340
341
  }
342
+ // Signs and packs a signature to be used by the emissary validator
343
+ async function getEmissarySignature(config, signers, chain, hash, transformSignature = (signature) => signature) {
344
+ if (config.account?.type === 'eoa') {
345
+ throw new error_1.EoaSigningNotSupportedError('packed signatures');
346
+ }
347
+ signers = signers ?? (0, common_1.convertOwnerSetToSignerSet)(config.owners);
348
+ const address = getAddress(config);
349
+ const signFn = (hash) => (0, message_1.sign)(signers, chain, address, hash, false);
350
+ const signature = await signFn(hash);
351
+ return transformSignature(signature);
352
+ }
341
353
  // Signs and packs a signature to be EIP-1271 compatible
342
354
  async function getTypedDataPackedSignature(config, signers, chain, validator, parameters, transformSignature = (signature) => signature) {
343
355
  if (config.account?.type === 'eoa') {
@@ -392,10 +404,6 @@ async function isDeployed(config, chain) {
392
404
  if (!code) {
393
405
  return false;
394
406
  }
395
- if (code.startsWith('0xef0100') && code.length === 48) {
396
- // Defensive check to ensure there's no storage conflict; can be lifted in the future
397
- throw new error_1.ExistingEip7702AccountsNotSupportedError();
398
- }
399
407
  return (0, viem_1.size)(code) > 0;
400
408
  }
401
409
  async function deploy(config, chain, params) {
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../accounts/signing/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,IAAI,CAAA;AACtC,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,KAAK,EAMV,KAAK,GAAG,EAIT,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAS/D,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAStD,iBAAS,0BAA0B,CAAC,MAAM,EAAE,QAAQ,GAAG,SAAS,CAkE/D;AAED,KAAK,gBAAgB,CAAC,CAAC,IAAI;IACzB,SAAS,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IAC1E,WAAW,EAAE,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AAC,CAAC,EACrC,YAAY,EAAE,OAAO,EACrB,QAAQ,EAAE,CACR,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,CAAC,EACT,YAAY,EAAE,OAAO,KAClB,OAAO,CAAC,GAAG,CAAC,GAChB,OAAO,CAAC,GAAG,CAAC,CAqFd;AAED,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,EACvB,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,KAAK,gBAAgB,GACtB,CAAA"}
@@ -114,22 +114,13 @@ async function signWithMultiFactorAuth(signers, chain, address, params, isUserOp
114
114
  }
115
115
  async function signWithSession(signers, chain, address, hash, signMain) {
116
116
  const sessionSigners = convertOwnerSetToSignerSet(signers.session.owners);
117
- const session = signers.session;
118
- const digest = (0, viem_1.encodeAbiParameters)([{ type: 'address' }, { type: 'bytes32' }], [address, hash]);
119
- const SIGNATURE_IS_VALID_SIG_1271 = '0x00';
120
- const validatorSignature = await signMain(sessionSigners, chain, address, digest, true);
121
- const policyDataOffset = BigInt(64 + (0, viem_1.size)(validatorSignature));
122
- const mode = SIGNATURE_IS_VALID_SIG_1271;
123
- const permissionId = (0, smart_sessions_1.getPermissionId)(session);
124
- const policySpecificData = '0x';
125
- const signature = (0, viem_1.encodePacked)(['bytes1', 'bytes32', 'uint256', 'bytes', 'bytes'], [
126
- mode,
127
- permissionId,
128
- policyDataOffset,
129
- validatorSignature,
130
- policySpecificData,
131
- ]);
132
- return signature;
117
+ const signedHash = signers.verifyExecutions
118
+ ? hash
119
+ : (0, viem_1.hashMessage)({
120
+ raw: (0, viem_1.encodePacked)(['bytes32', 'bytes32'], [(0, viem_1.padHex)(address), hash]),
121
+ });
122
+ const validatorSignature = await signMain(sessionSigners, chain, address, signedHash, false);
123
+ return (0, smart_sessions_1.packSignature)(signers, validatorSignature);
133
124
  }
134
125
  async function signWithGuardians(signers, params, signingFunctions) {
135
126
  const signatures = await Promise.all(signers.guardians.map((account) => signingFunctions.signEcdsa(account, params, false)));
@@ -178,8 +169,8 @@ async function signWithOwners(signers, chain, address, params, signingFunctions,
178
169
  return {
179
170
  authenticatorData: signature.webauthn.authenticatorData,
180
171
  clientDataJSON: signature.webauthn.clientDataJSON,
181
- challengeIndex: BigInt(signature.webauthn.challengeIndex),
182
- typeIndex: BigInt(signature.webauthn.typeIndex),
172
+ challengeIndex: BigInt(signature.webauthn.challengeIndex ?? 0),
173
+ typeIndex: BigInt(signature.webauthn.typeIndex ?? 0),
183
174
  r,
184
175
  s,
185
176
  };
@@ -1,5 +1,6 @@
1
1
  import { type Address, type Hex } from 'viem';
2
2
  import type { CalldataInput, LazyCallInput } from '../types';
3
+ declare const ALLOCATOR_ADDRESS = "0xc7732071e3a1be6cfce6d13bb05699a31a457679";
3
4
  declare function depositEther(value: bigint): LazyCallInput;
4
5
  declare function enableEtherWithdrawal(): CalldataInput;
5
6
  declare function disableEtherWithdrawal(): CalldataInput;
@@ -10,5 +11,5 @@ declare function disableErc20Withdrawal(tokenAddress: Address): CalldataInput;
10
11
  declare function withdrawErc20(tokenAddress: Address, amount: bigint): LazyCallInput;
11
12
  declare function approveErc20(tokenAddress: Address, amount: bigint): CalldataInput;
12
13
  declare function lockTag(): Hex;
13
- export { depositEther, enableEtherWithdrawal, disableEtherWithdrawal, withdrawEther, depositErc20, enableErc20Withdrawal, disableErc20Withdrawal, withdrawErc20, approveErc20, lockTag, };
14
+ export { ALLOCATOR_ADDRESS, depositEther, enableEtherWithdrawal, disableEtherWithdrawal, withdrawEther, depositErc20, enableErc20Withdrawal, disableErc20Withdrawal, withdrawErc20, approveErc20, lockTag, };
14
15
  //# sourceMappingURL=compact.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"compact.d.ts","sourceRoot":"","sources":["../../../actions/compact.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EAIZ,KAAK,GAAG,EAET,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,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AAS,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,CAOnD;AAED,iBAAS,YAAY,CAAC,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,CA6B1E;AAED,iBAAS,qBAAqB,CAAC,YAAY,EAAE,OAAO,GAAG,aAAa,CAGnE;AAED,iBAAS,sBAAsB,CAAC,YAAY,EAAE,OAAO,GAAG,aAAa,CAGpE;AAED,iBAAS,aAAa,CAAC,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,CAO3E;AAsED,iBAAS,YAAY,CAAC,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,CAU1E;AA0BD,iBAAS,OAAO,IAAI,GAAG,CAQtB;AAED,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,qBAAqB,EACrB,sBAAsB,EACtB,aAAa,EACb,YAAY,EACZ,qBAAqB,EACrB,sBAAsB,EACtB,aAAa,EACb,YAAY,EACZ,OAAO,GACR,CAAA"}
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ALLOCATOR_ADDRESS = void 0;
3
4
  exports.depositEther = depositEther;
4
5
  exports.enableEtherWithdrawal = enableEtherWithdrawal;
5
6
  exports.disableEtherWithdrawal = disableEtherWithdrawal;
@@ -12,7 +13,8 @@ exports.approveErc20 = approveErc20;
12
13
  exports.lockTag = lockTag;
13
14
  const viem_1 = require("viem");
14
15
  const compact_1 = require("../execution/compact");
15
- const ALLOCATOR_ADDRESS = '0xd93ed1dd9f1f0b523e4d77233809dc2ee22928c6';
16
+ const ALLOCATOR_ADDRESS = '0xc7732071e3a1be6cfce6d13bb05699a31a457679';
17
+ exports.ALLOCATOR_ADDRESS = ALLOCATOR_ADDRESS;
16
18
  const DEFAULT_RESET_PERIOD = 6;
17
19
  const DEFAULT_SCOPE = 0;
18
20
  function depositEther(value) {
@@ -1,5 +1,15 @@
1
1
  import type { Hex } from 'viem';
2
2
  import type { LazyCallInput, SessionInput } from '../types';
3
+ /**
4
+ * Enable smart sessions
5
+ * @returns Calls to enable smart sessions
6
+ */
7
+ declare function experimental_enable(): LazyCallInput;
8
+ /**
9
+ * Disable smart sessions
10
+ * @returns Calls to disable smart sessions
11
+ */
12
+ declare function experimental_disable(): LazyCallInput;
3
13
  /**
4
14
  * Enable a smart session
5
15
  * @param session session to enable
@@ -9,5 +19,5 @@ declare function experimental_enableSession(session: SessionInput, enableSession
9
19
  chainId: bigint;
10
20
  sessionDigest: Hex;
11
21
  }[], sessionToEnableIndex: number): LazyCallInput;
12
- export { experimental_enableSession };
22
+ export { experimental_disable, experimental_enable, experimental_enableSession };
13
23
  //# sourceMappingURL=smart-sessions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"smart-sessions.d.ts","sourceRoot":"","sources":["../../../actions/smart-sessions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAE3D;;;;GAIG;AACH,iBAAS,0BAA0B,CACjC,OAAO,EAAE,YAAY,EACrB,sBAAsB,EAAE,GAAG,EAC3B,iBAAiB,EAAE;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,aAAa,EAAE,GAAG,CAAA;CACnB,EAAE,EACH,oBAAoB,EAAE,MAAM,GAC3B,aAAa,CAef;AAED,OAAO,EAAE,0BAA0B,EAAE,CAAA"}
1
+ {"version":3,"file":"smart-sessions.d.ts","sourceRoot":"","sources":["../../../actions/smart-sessions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAS/B,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAE3D;;;GAGG;AACH,iBAAS,mBAAmB,IAAI,aAAa,CAU5C;AAED;;;GAGG;AACH,iBAAS,oBAAoB,IAAI,aAAa,CAU7C;AAED;;;;GAIG;AACH,iBAAS,0BAA0B,CACjC,OAAO,EAAE,YAAY,EACrB,sBAAsB,EAAE,GAAG,EAC3B,iBAAiB,EAAE;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,aAAa,EAAE,GAAG,CAAA;CACnB,EAAE,EACH,oBAAoB,EAAE,MAAM,GAC3B,aAAa,CAef;AAED,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,CAAA"}
@@ -1,7 +1,40 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.experimental_disable = experimental_disable;
4
+ exports.experimental_enable = experimental_enable;
3
5
  exports.experimental_enableSession = experimental_enableSession;
6
+ const accounts_1 = require("../accounts");
4
7
  const smart_sessions_1 = require("../modules/validators/smart-sessions");
8
+ /**
9
+ * Enable smart sessions
10
+ * @returns Calls to enable smart sessions
11
+ */
12
+ function experimental_enable() {
13
+ return {
14
+ async resolve({ config }) {
15
+ const module = (0, smart_sessions_1.getSmartSessionValidator)(config);
16
+ if (!module) {
17
+ return [];
18
+ }
19
+ return (0, accounts_1.getModuleInstallationCalls)(config, module);
20
+ },
21
+ };
22
+ }
23
+ /**
24
+ * Disable smart sessions
25
+ * @returns Calls to disable smart sessions
26
+ */
27
+ function experimental_disable() {
28
+ return {
29
+ async resolve({ config }) {
30
+ const module = (0, smart_sessions_1.getSmartSessionValidator)(config);
31
+ if (!module) {
32
+ return [];
33
+ }
34
+ return (0, accounts_1.getModuleUninstallationCalls)(config, module);
35
+ },
36
+ };
37
+ }
5
38
  /**
6
39
  * Enable a smart session
7
40
  * @param session session to enable
@@ -1,5 +1,5 @@
1
1
  import { AccountConfigurationNotSupportedError, AccountError, Eip712DomainNotAvailableError, Eip7702AccountMustHaveEoaError, Eip7702NotSupportedForAccountError, EoaAccountMustHaveAccountError, ExistingEip7702AccountsNotSupportedError, FactoryArgsNotAvailableError, isAccountError, SigningNotSupportedForAccountError, SmartSessionsNotEnabledError, WalletClientNoConnectedAccountError } from '../accounts';
2
2
  import { ExecutionError, IntentFailedError, isExecutionError, OrderPathRequiredForIntentsError, SessionChainRequiredError, SignerNotSupportedError } from '../execution';
3
- import { AuthenticationRequiredError, BadRequestError, BodyParserError, ConflictError, ForbiddenError, InsufficientBalanceError, IntentNotFoundError, InternalServerError, InvalidApiKeyError, InvalidIntentSignatureError, isAuthError, isOrchestratorError, isRateLimited, isRetryable, isValidationError, NoPathFoundError, OnlyOneTargetTokenAmountCanBeUnsetError, OrchestratorError, RateLimitedError, ResourceNotFoundError, SchemaValidationError, ServiceUnavailableError, SimulationFailedError, TokenNotSupportedError, UnauthorizedError, UnprocessableEntityError, UnsupportedChainError, UnsupportedChainIdError, UnsupportedTokenError } from '../orchestrator';
4
- export { isAccountError, AccountError, AccountConfigurationNotSupportedError, Eip712DomainNotAvailableError, Eip7702AccountMustHaveEoaError, EoaAccountMustHaveAccountError, ExistingEip7702AccountsNotSupportedError, FactoryArgsNotAvailableError, SmartSessionsNotEnabledError, SigningNotSupportedForAccountError, Eip7702NotSupportedForAccountError, WalletClientNoConnectedAccountError, isExecutionError, ExecutionError, IntentFailedError, OrderPathRequiredForIntentsError, SessionChainRequiredError, SignerNotSupportedError, isOrchestratorError, isRetryable, isAuthError, isValidationError, isRateLimited, AuthenticationRequiredError, BadRequestError, BodyParserError, ConflictError, ForbiddenError, InsufficientBalanceError, InvalidApiKeyError, InvalidIntentSignatureError, NoPathFoundError, OnlyOneTargetTokenAmountCanBeUnsetError, OrchestratorError, IntentNotFoundError, InternalServerError, ResourceNotFoundError, RateLimitedError, SchemaValidationError, ServiceUnavailableError, SimulationFailedError, UnprocessableEntityError, UnauthorizedError, TokenNotSupportedError, UnsupportedChainError, UnsupportedChainIdError, UnsupportedTokenError, };
3
+ import { AuthenticationRequiredError, BadRequestError, BodyParserError, ConflictError, ForbiddenError, InsufficientBalanceError, InsufficientLiquidityError, IntentNotFoundError, InternalServerError, InvalidApiKeyError, InvalidIntentSignatureError, isAuthError, isOrchestratorError, isRateLimited, isRetryable, isValidationError, NoPathFoundError, OnlyOneTargetTokenAmountCanBeUnsetError, OrchestratorError, RateLimitedError, ResourceNotFoundError, SchemaValidationError, ServiceUnavailableError, SimulationFailedError, TokenNotSupportedError, UnauthorizedError, UnprocessableEntityError, UnsupportedChainError, UnsupportedChainIdError, UnsupportedTokenError } from '../orchestrator';
4
+ export { isAccountError, AccountError, AccountConfigurationNotSupportedError, Eip712DomainNotAvailableError, Eip7702AccountMustHaveEoaError, EoaAccountMustHaveAccountError, ExistingEip7702AccountsNotSupportedError, FactoryArgsNotAvailableError, SmartSessionsNotEnabledError, SigningNotSupportedForAccountError, Eip7702NotSupportedForAccountError, WalletClientNoConnectedAccountError, isExecutionError, ExecutionError, IntentFailedError, OrderPathRequiredForIntentsError, SessionChainRequiredError, SignerNotSupportedError, isOrchestratorError, isRetryable, isAuthError, isValidationError, isRateLimited, AuthenticationRequiredError, BadRequestError, BodyParserError, ConflictError, ForbiddenError, InsufficientBalanceError, InsufficientLiquidityError, InvalidApiKeyError, InvalidIntentSignatureError, NoPathFoundError, OnlyOneTargetTokenAmountCanBeUnsetError, OrchestratorError, IntentNotFoundError, InternalServerError, ResourceNotFoundError, RateLimitedError, SchemaValidationError, ServiceUnavailableError, SimulationFailedError, UnprocessableEntityError, UnauthorizedError, TokenNotSupportedError, UnsupportedChainError, UnsupportedChainIdError, UnsupportedTokenError, };
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../errors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qCAAqC,EACrC,YAAY,EACZ,6BAA6B,EAC7B,8BAA8B,EAC9B,kCAAkC,EAClC,8BAA8B,EAC9B,wCAAwC,EACxC,4BAA4B,EAC5B,cAAc,EACd,kCAAkC,EAClC,4BAA4B,EAC5B,mCAAmC,EACpC,MAAM,aAAa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AAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../errors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qCAAqC,EACrC,YAAY,EACZ,6BAA6B,EAC7B,8BAA8B,EAC9B,kCAAkC,EAClC,8BAA8B,EAC9B,wCAAwC,EACxC,4BAA4B,EAC5B,cAAc,EACd,kCAAkC,EAClC,4BAA4B,EAC5B,mCAAmC,EACpC,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,gCAAgC,EAChC,yBAAyB,EACzB,uBAAuB,EACxB,MAAM,cAAc,CAAA;AACrB,OAAO,EACL,2BAA2B,EAC3B,eAAe,EACf,eAAe,EACf,aAAa,EACb,cAAc,EACd,wBAAwB,EACxB,0BAA0B,EAC1B,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,2BAA2B,EAC3B,WAAW,EACX,mBAAmB,EACnB,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,uCAAuC,EACvC,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,iBAAiB,EACjB,wBAAwB,EACxB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,iBAAiB,CAAA;AAExB,OAAO,EAEL,cAAc,EACd,YAAY,EACZ,qCAAqC,EACrC,6BAA6B,EAC7B,8BAA8B,EAC9B,8BAA8B,EAC9B,wCAAwC,EACxC,4BAA4B,EAC5B,4BAA4B,EAC5B,kCAAkC,EAClC,kCAAkC,EAClC,mCAAmC,EAEnC,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,gCAAgC,EAChC,yBAAyB,EACzB,uBAAuB,EAEvB,mBAAmB,EACnB,WAAW,EACX,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,2BAA2B,EAC3B,eAAe,EACf,eAAe,EACf,aAAa,EACb,cAAc,EACd,wBAAwB,EACxB,0BAA0B,EAC1B,kBAAkB,EAClB,2BAA2B,EAC3B,gBAAgB,EAChB,uCAAuC,EACvC,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACrB,wBAAwB,EACxB,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,GACtB,CAAA"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UnsupportedTokenError = exports.UnsupportedChainIdError = exports.UnsupportedChainError = exports.TokenNotSupportedError = exports.UnauthorizedError = exports.UnprocessableEntityError = exports.SimulationFailedError = exports.ServiceUnavailableError = exports.SchemaValidationError = exports.RateLimitedError = exports.ResourceNotFoundError = exports.InternalServerError = exports.IntentNotFoundError = exports.OrchestratorError = exports.OnlyOneTargetTokenAmountCanBeUnsetError = exports.NoPathFoundError = exports.InvalidIntentSignatureError = exports.InvalidApiKeyError = exports.InsufficientBalanceError = exports.ForbiddenError = exports.ConflictError = exports.BodyParserError = exports.BadRequestError = exports.AuthenticationRequiredError = exports.isRateLimited = exports.isValidationError = exports.isAuthError = exports.isRetryable = exports.isOrchestratorError = exports.SignerNotSupportedError = exports.SessionChainRequiredError = exports.OrderPathRequiredForIntentsError = exports.IntentFailedError = exports.ExecutionError = exports.isExecutionError = exports.WalletClientNoConnectedAccountError = exports.Eip7702NotSupportedForAccountError = exports.SigningNotSupportedForAccountError = exports.SmartSessionsNotEnabledError = exports.FactoryArgsNotAvailableError = exports.ExistingEip7702AccountsNotSupportedError = exports.EoaAccountMustHaveAccountError = exports.Eip7702AccountMustHaveEoaError = exports.Eip712DomainNotAvailableError = exports.AccountConfigurationNotSupportedError = exports.AccountError = exports.isAccountError = void 0;
3
+ exports.UnsupportedTokenError = exports.UnsupportedChainIdError = exports.UnsupportedChainError = exports.TokenNotSupportedError = exports.UnauthorizedError = exports.UnprocessableEntityError = exports.SimulationFailedError = exports.ServiceUnavailableError = exports.SchemaValidationError = exports.RateLimitedError = exports.ResourceNotFoundError = exports.InternalServerError = exports.IntentNotFoundError = exports.OrchestratorError = exports.OnlyOneTargetTokenAmountCanBeUnsetError = exports.NoPathFoundError = exports.InvalidIntentSignatureError = exports.InvalidApiKeyError = exports.InsufficientLiquidityError = exports.InsufficientBalanceError = exports.ForbiddenError = exports.ConflictError = exports.BodyParserError = exports.BadRequestError = exports.AuthenticationRequiredError = exports.isRateLimited = exports.isValidationError = exports.isAuthError = exports.isRetryable = exports.isOrchestratorError = exports.SignerNotSupportedError = exports.SessionChainRequiredError = exports.OrderPathRequiredForIntentsError = exports.IntentFailedError = exports.ExecutionError = exports.isExecutionError = exports.WalletClientNoConnectedAccountError = exports.Eip7702NotSupportedForAccountError = exports.SigningNotSupportedForAccountError = exports.SmartSessionsNotEnabledError = exports.FactoryArgsNotAvailableError = exports.ExistingEip7702AccountsNotSupportedError = exports.EoaAccountMustHaveAccountError = exports.Eip7702AccountMustHaveEoaError = exports.Eip712DomainNotAvailableError = exports.AccountConfigurationNotSupportedError = exports.AccountError = exports.isAccountError = void 0;
4
4
  const accounts_1 = require("../accounts");
5
5
  Object.defineProperty(exports, "AccountConfigurationNotSupportedError", { enumerable: true, get: function () { return accounts_1.AccountConfigurationNotSupportedError; } });
6
6
  Object.defineProperty(exports, "AccountError", { enumerable: true, get: function () { return accounts_1.AccountError; } });
@@ -28,6 +28,7 @@ Object.defineProperty(exports, "BodyParserError", { enumerable: true, get: funct
28
28
  Object.defineProperty(exports, "ConflictError", { enumerable: true, get: function () { return orchestrator_1.ConflictError; } });
29
29
  Object.defineProperty(exports, "ForbiddenError", { enumerable: true, get: function () { return orchestrator_1.ForbiddenError; } });
30
30
  Object.defineProperty(exports, "InsufficientBalanceError", { enumerable: true, get: function () { return orchestrator_1.InsufficientBalanceError; } });
31
+ Object.defineProperty(exports, "InsufficientLiquidityError", { enumerable: true, get: function () { return orchestrator_1.InsufficientLiquidityError; } });
31
32
  Object.defineProperty(exports, "IntentNotFoundError", { enumerable: true, get: function () { return orchestrator_1.IntentNotFoundError; } });
32
33
  Object.defineProperty(exports, "InternalServerError", { enumerable: true, get: function () { return orchestrator_1.InternalServerError; } });
33
34
  Object.defineProperty(exports, "InvalidApiKeyError", { enumerable: true, get: function () { return orchestrator_1.InvalidApiKeyError; } });
@@ -1,5 +1,7 @@
1
1
  import { type Hex } from 'viem';
2
2
  import type { IntentOp, IntentOpElement } from '../orchestrator/types';
3
+ declare const SCOPE_MULTICHAIN = 0;
4
+ declare const RESET_PERIOD_ONE_WEEK = 6;
3
5
  declare const COMPACT_ADDRESS = "0x00000000000000171ede64904551eeDF3C6C9788";
4
6
  declare function getCompactTypedData(intentOp: IntentOp): {
5
7
  readonly domain: {
@@ -142,5 +144,5 @@ declare function getCompactDigest(intentOp: IntentOp): Hex;
142
144
  * @returns The digest hash
143
145
  */
144
146
  declare function getPermit2Digest(element: IntentOpElement, nonce: bigint, expires: bigint): Hex;
145
- export { COMPACT_ADDRESS, getCompactTypedData, getCompactDigest, getPermit2Digest, };
147
+ export { SCOPE_MULTICHAIN, RESET_PERIOD_ONE_WEEK, COMPACT_ADDRESS, getCompactTypedData, getCompactDigest, getPermit2Digest, };
146
148
  //# sourceMappingURL=compact.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"compact.d.ts","sourceRoot":"","sources":["../../../execution/compact.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAA0C,MAAM,MAAM,CAAA;AACvE,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAGtE,QAAA,MAAM,eAAe,+CAA+C,CAAA;AAiDpE,iBAAS,mBAAmB,CAAC,QAAQ,EAAE,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.COMPACT_ADDRESS = void 0;
3
+ exports.COMPACT_ADDRESS = exports.RESET_PERIOD_ONE_WEEK = exports.SCOPE_MULTICHAIN = void 0;
4
4
  exports.getCompactTypedData = getCompactTypedData;
5
5
  exports.getCompactDigest = getCompactDigest;
6
6
  exports.getPermit2Digest = getPermit2Digest;
7
7
  const viem_1 = require("viem");
8
8
  const permit2_1 = require("./permit2");
9
+ const SCOPE_MULTICHAIN = 0;
10
+ exports.SCOPE_MULTICHAIN = SCOPE_MULTICHAIN;
11
+ const RESET_PERIOD_ONE_WEEK = 6;
12
+ exports.RESET_PERIOD_ONE_WEEK = RESET_PERIOD_ONE_WEEK;
9
13
  const COMPACT_ADDRESS = '0x00000000000000171ede64904551eeDF3C6C9788';
10
14
  exports.COMPACT_ADDRESS = COMPACT_ADDRESS;
11
15
  // Define the typed data structure as const to preserve type safety
@@ -37,6 +37,7 @@ declare class SessionChainRequiredError extends ExecutionError {
37
37
  }
38
38
  declare class IntentFailedError extends ExecutionError {
39
39
  constructor(params?: {
40
+ intentId?: string;
40
41
  context?: any;
41
42
  errorType?: string;
42
43
  traceId?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../execution/error.ts"],"names":[],"mappings":"AAAA,cAAM,cAAe,SAAQ,KAAK;IAChC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAQ;IACjC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAK;IAC9B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAQ;IACnC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAQ;gBAErB,MAAM,CAAC,EAAE;QACnB,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,OAAO,CAAC,EAAE,GAAG,CAAA;QACb,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,OAAO,CAAC,EAAE,MAAM,CAAA;KACjB;IAQD,IAAI,OAAO,W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