@charterlabs/rhinestone-sdk 0.3.9 → 0.4.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.
Files changed (145) hide show
  1. package/README.md +89 -1
  2. package/dist/src/accounts/index.d.ts +6 -3
  3. package/dist/src/accounts/index.d.ts.map +1 -1
  4. package/dist/src/accounts/index.js +8 -2
  5. package/dist/src/accounts/json-rpc/providers.d.ts.map +1 -1
  6. package/dist/src/accounts/json-rpc/providers.js +3 -3
  7. package/dist/src/accounts/safe.d.ts.map +1 -1
  8. package/dist/src/accounts/safe.js +4 -1
  9. package/dist/src/accounts/signing/common.d.ts +10 -5
  10. package/dist/src/accounts/signing/common.d.ts.map +1 -1
  11. package/dist/src/accounts/signing/message.d.ts +3 -1
  12. package/dist/src/accounts/signing/message.d.ts.map +1 -1
  13. package/dist/src/accounts/startale.js +1 -1
  14. package/dist/src/accounts/utils.d.ts +1 -1
  15. package/dist/src/accounts/utils.d.ts.map +1 -1
  16. package/dist/src/auth/provider.d.ts +7 -0
  17. package/dist/src/auth/provider.d.ts.map +1 -0
  18. package/dist/src/auth/provider.js +41 -0
  19. package/dist/src/errors/index.d.ts +2 -2
  20. package/dist/src/errors/index.d.ts.map +1 -1
  21. package/dist/src/errors/index.js +2 -1
  22. package/dist/src/execution/error.d.ts +9 -1
  23. package/dist/src/execution/error.d.ts.map +1 -1
  24. package/dist/src/execution/error.js +12 -1
  25. package/dist/src/execution/index.d.ts +6 -4
  26. package/dist/src/execution/index.d.ts.map +1 -1
  27. package/dist/src/execution/index.js +17 -13
  28. package/dist/src/execution/utils.d.ts +17 -6
  29. package/dist/src/execution/utils.d.ts.map +1 -1
  30. package/dist/src/execution/utils.js +193 -43
  31. package/dist/src/index.d.ts +5 -5
  32. package/dist/src/index.d.ts.map +1 -1
  33. package/dist/src/index.js +13 -11
  34. package/dist/src/jwt-server/digest.d.ts +11 -0
  35. package/dist/src/jwt-server/digest.d.ts.map +1 -0
  36. package/dist/src/jwt-server/digest.js +22 -0
  37. package/dist/src/jwt-server/express.d.ts +16 -0
  38. package/dist/src/jwt-server/express.d.ts.map +1 -0
  39. package/dist/src/jwt-server/express.js +24 -0
  40. package/dist/src/jwt-server/handlers.d.ts +10 -0
  41. package/dist/src/jwt-server/handlers.d.ts.map +1 -0
  42. package/dist/src/jwt-server/handlers.js +41 -0
  43. package/dist/src/jwt-server/index.d.ts +8 -0
  44. package/dist/src/jwt-server/index.d.ts.map +1 -0
  45. package/dist/src/jwt-server/index.js +18 -0
  46. package/dist/src/jwt-server/jcs.d.ts +12 -0
  47. package/dist/src/jwt-server/jcs.d.ts.map +1 -0
  48. package/dist/src/jwt-server/jcs.js +60 -0
  49. package/dist/src/jwt-server/signer.d.ts +18 -0
  50. package/dist/src/jwt-server/signer.d.ts.map +1 -0
  51. package/dist/src/jwt-server/signer.js +71 -0
  52. package/dist/src/jwt-server/sponsorship.d.ts +19 -0
  53. package/dist/src/jwt-server/sponsorship.d.ts.map +1 -0
  54. package/dist/src/jwt-server/sponsorship.js +56 -0
  55. package/dist/src/jwt-server/web.d.ts +4 -0
  56. package/dist/src/jwt-server/web.d.ts.map +1 -0
  57. package/dist/src/jwt-server/web.js +27 -0
  58. package/dist/src/modules/validators/index.d.ts +2 -2
  59. package/dist/src/modules/validators/index.d.ts.map +1 -1
  60. package/dist/src/modules/validators/index.js +5 -1
  61. package/dist/src/modules/validators/policies/claim/permit2.d.ts +55 -0
  62. package/dist/src/modules/validators/policies/claim/permit2.d.ts.map +1 -0
  63. package/dist/src/modules/validators/policies/claim/permit2.js +239 -0
  64. package/dist/src/modules/validators/policies/claim/types.d.ts +12 -0
  65. package/dist/src/modules/validators/policies/claim/types.d.ts.map +1 -0
  66. package/dist/src/modules/validators/policies/claim/types.js +18 -0
  67. package/dist/src/modules/validators/smart-sessions.d.ts +22 -7
  68. package/dist/src/modules/validators/smart-sessions.d.ts.map +1 -1
  69. package/dist/src/modules/validators/smart-sessions.js +82 -22
  70. package/dist/src/orchestrator/client.d.ts +9 -4
  71. package/dist/src/orchestrator/client.d.ts.map +1 -1
  72. package/dist/src/orchestrator/client.js +29 -17
  73. package/dist/src/orchestrator/consts.d.ts +3 -2
  74. package/dist/src/orchestrator/consts.d.ts.map +1 -1
  75. package/dist/src/orchestrator/consts.js +4 -2
  76. package/dist/src/orchestrator/index.d.ts +4 -3
  77. package/dist/src/orchestrator/index.d.ts.map +1 -1
  78. package/dist/src/orchestrator/index.js +2 -2
  79. package/dist/src/orchestrator/registry.d.ts +2 -1
  80. package/dist/src/orchestrator/registry.d.ts.map +1 -1
  81. package/dist/src/orchestrator/registry.js +17 -1
  82. package/dist/src/orchestrator/types.d.ts +6 -1
  83. package/dist/src/orchestrator/types.d.ts.map +1 -1
  84. package/dist/src/types.d.ts +87 -5
  85. package/dist/src/types.d.ts.map +1 -1
  86. package/dist/src/utils/index.d.ts +3 -9
  87. package/dist/src/utils/index.d.ts.map +1 -1
  88. package/package.json +18 -4
  89. package/dist/src/accounts/index.test.d.ts +0 -2
  90. package/dist/src/accounts/index.test.d.ts.map +0 -1
  91. package/dist/src/accounts/index.test.js +0 -33
  92. package/dist/src/accounts/json-rpc/index.test.d.ts +0 -2
  93. package/dist/src/accounts/json-rpc/index.test.d.ts.map +0 -1
  94. package/dist/src/accounts/json-rpc/index.test.js +0 -35
  95. package/dist/src/accounts/json-rpc/providers.test.d.ts +0 -2
  96. package/dist/src/accounts/json-rpc/providers.test.d.ts.map +0 -1
  97. package/dist/src/accounts/json-rpc/providers.test.js +0 -43
  98. package/dist/src/accounts/kernel.test.d.ts +0 -2
  99. package/dist/src/accounts/kernel.test.d.ts.map +0 -1
  100. package/dist/src/accounts/kernel.test.js +0 -132
  101. package/dist/src/accounts/nexus.test.d.ts +0 -2
  102. package/dist/src/accounts/nexus.test.d.ts.map +0 -1
  103. package/dist/src/accounts/nexus.test.js +0 -118
  104. package/dist/src/accounts/safe.test.d.ts +0 -2
  105. package/dist/src/accounts/safe.test.d.ts.map +0 -1
  106. package/dist/src/accounts/safe.test.js +0 -118
  107. package/dist/src/accounts/signing/passkeys.test.d.ts +0 -2
  108. package/dist/src/accounts/signing/passkeys.test.d.ts.map +0 -1
  109. package/dist/src/accounts/signing/passkeys.test.js +0 -88
  110. package/dist/src/accounts/startale.test.d.ts +0 -2
  111. package/dist/src/accounts/startale.test.d.ts.map +0 -1
  112. package/dist/src/accounts/startale.test.js +0 -189
  113. package/dist/src/accounts/utils.test.d.ts +0 -2
  114. package/dist/src/accounts/utils.test.d.ts.map +0 -1
  115. package/dist/src/accounts/utils.test.js +0 -49
  116. package/dist/src/actions/ecdsa.test.d.ts +0 -2
  117. package/dist/src/actions/ecdsa.test.d.ts.map +0 -1
  118. package/dist/src/actions/ecdsa.test.js +0 -99
  119. package/dist/src/actions/passkeys.test.d.ts +0 -2
  120. package/dist/src/actions/passkeys.test.d.ts.map +0 -1
  121. package/dist/src/actions/passkeys.test.js +0 -54
  122. package/dist/src/actions/recovery.test.d.ts +0 -2
  123. package/dist/src/actions/recovery.test.d.ts.map +0 -1
  124. package/dist/src/actions/recovery.test.js +0 -168
  125. package/dist/src/execution/utils.test.d.ts +0 -2
  126. package/dist/src/execution/utils.test.d.ts.map +0 -1
  127. package/dist/src/execution/utils.test.js +0 -150
  128. package/dist/src/modules/index.test.d.ts +0 -2
  129. package/dist/src/modules/index.test.d.ts.map +0 -1
  130. package/dist/src/modules/index.test.js +0 -81
  131. package/dist/src/modules/validators/core.test.d.ts +0 -2
  132. package/dist/src/modules/validators/core.test.d.ts.map +0 -1
  133. package/dist/src/modules/validators/core.test.js +0 -101
  134. package/dist/src/modules/validators/smart-sessions.test.d.ts +0 -2
  135. package/dist/src/modules/validators/smart-sessions.test.d.ts.map +0 -1
  136. package/dist/src/modules/validators/smart-sessions.test.js +0 -61
  137. package/dist/src/orchestrator/registry.test.d.ts +0 -2
  138. package/dist/src/orchestrator/registry.test.d.ts.map +0 -1
  139. package/dist/src/orchestrator/registry.test.js +0 -154
  140. package/dist/test/consts.d.ts +0 -10
  141. package/dist/test/consts.d.ts.map +0 -1
  142. package/dist/test/consts.js +0 -22
  143. package/dist/test/utils/utils.d.ts +0 -5
  144. package/dist/test/utils/utils.d.ts.map +0 -1
  145. package/dist/test/utils/utils.js +0 -20
package/README.md CHANGED
@@ -31,6 +31,94 @@ npm install viem @rhinestone/sdk
31
31
  bun install viem @rhinestone/sdk
32
32
  ```
33
33
 
34
+ ## Authentication
35
+
36
+ The SDK supports two authentication modes: **API key** and **JWT**.
37
+
38
+ ### API Key
39
+
40
+ Pass the API key from the [Rhinestone dashboard](https://dashboard.rhinestone.dev):
41
+
42
+ ```ts
43
+ const rhinestone = new RhinestoneSDK({
44
+ auth: {
45
+ mode: 'apiKey',
46
+ apiKey: 'your-api-key',
47
+ },
48
+ })
49
+ ```
50
+
51
+ ### JWT (Experimental)
52
+
53
+ JWT authentication uses RS256-signed tokens for fine-grained access control. There are two integration patterns depending on your architecture:
54
+
55
+ #### Client-server (SDK runs in browser/client)
56
+
57
+ When the SDK runs on the client and a separate backend holds the signing key, fetch tokens via HTTP:
58
+
59
+ ```ts
60
+ const rhinestone = new RhinestoneSDK({
61
+ auth: {
62
+ mode: 'experimental_jwt',
63
+ accessToken: async () => {
64
+ const res = await fetch('/api/auth/token')
65
+ const { token } = await res.json()
66
+ return token
67
+ },
68
+ // Only needed for sponsored intents:
69
+ getIntentExtensionToken: async (intentInput) => {
70
+ const res = await fetch('/api/auth/extension-token', {
71
+ method: 'POST',
72
+ headers: { 'Content-Type': 'application/json' },
73
+ body: JSON.stringify({ intentInput }),
74
+ })
75
+ const { token } = await res.json()
76
+ return token
77
+ },
78
+ },
79
+ })
80
+ ```
81
+
82
+ Your backend is responsible for signing JWTs with the correct claims. See the [JWT documentation](https://docs.rhinestone.dev) for the required token format.
83
+
84
+ #### Same-host (SDK and signing key on the same server)
85
+
86
+ When the SDK runs server-side with access to the private key, use `createJwtSigner` to sign tokens in-process without an HTTP round-trip:
87
+
88
+ ```ts
89
+ import { createJwtSigner } from '@rhinestone/sdk/jwt-server'
90
+
91
+ const signer = createJwtSigner({
92
+ jwt: {
93
+ privateKey: myJwk, // RS256 private key in JWK format
94
+ integratorId: 'int_abc',
95
+ projectId: 'proj_xyz',
96
+ appId: 'app_prod',
97
+ keyId: 'key_1',
98
+ },
99
+ })
100
+
101
+ const rhinestone = new RhinestoneSDK({
102
+ auth: { mode: 'experimental_jwt', ...signer },
103
+ })
104
+ ```
105
+
106
+ `createJwtSigner` returns `{ accessToken, getIntentExtensionToken }` — the same shape as the `auth` config, so you can spread it directly. It handles all claim structure, key caching, and intent digest computation internally.
107
+
108
+ To control which intents your backend sponsors, pass `shouldSponsor` filters. The signer checks them before signing — denied requests throw a `SponsorshipDeniedError`:
109
+
110
+ ```ts
111
+ import { createJwtSigner } from '@rhinestone/sdk/jwt-server'
112
+
113
+ const signer = createJwtSigner({
114
+ // ...
115
+ shouldSponsor: {
116
+ chain: ({ id }) => [1, 8453, 10].includes(id),
117
+ account: async (address) => isUser(address),
118
+ },
119
+ })
120
+ ```
121
+
34
122
  ## Quickstart
35
123
 
36
124
  Create a smart account:
@@ -38,7 +126,7 @@ Create a smart account:
38
126
  ```ts
39
127
  import { RhinestoneSDK } from '@rhinestone/sdk'
40
128
 
41
- const rhinestone = new RhinestoneSDK()
129
+ const rhinestone = new RhinestoneSDK({ apiKey: 'your-api-key' })
42
130
  const account = await rhinestone.createAccount({
43
131
  owners: {
44
132
  type: 'ecdsa',
@@ -1,8 +1,10 @@
1
1
  import { type Account, type Chain, type HashTypedDataParameters, type Hex, type PublicClient, type TypedData } from 'viem';
2
2
  import type { Module } from '../modules/common';
3
+ import type { ResolvedSessionSignerSet } from '../modules/validators/smart-sessions';
3
4
  import type { AccountProviderConfig, Call, OwnerSet, RhinestoneConfig, SignerSet } from '../types';
4
5
  import { AccountConfigurationNotSupportedError, AccountError, Eip712DomainNotAvailableError, Eip7702AccountMustHaveEoaError, Eip7702NotSupportedForAccountError, EoaAccountMustHaveAccountError, EoaSigningMethodNotConfiguredError, EoaSigningNotSupportedError, ExistingEip7702AccountsNotSupportedError, FactoryArgsNotAvailableError, isAccountError, ModuleInstallationNotSupportedError, OwnersFieldRequiredError, SigningNotSupportedForAccountError, SmartSessionsNotEnabledError, WalletClientNoConnectedAccountError } from './error';
5
6
  import { type ValidatorConfig } from './utils';
7
+ type InternalSignerSet = SignerSet | ResolvedSessionSignerSet;
6
8
  declare function getInitCode(config: RhinestoneConfig): {
7
9
  address: import("viem").Address;
8
10
  } | {
@@ -31,12 +33,13 @@ declare function getModuleInstallationCalls(config: RhinestoneConfig, module: Mo
31
33
  declare function getModuleUninstallationCalls(config: RhinestoneConfig, module: Module): Call[];
32
34
  declare function getAddress(config: RhinestoneConfig): `0x${string}`;
33
35
  declare function checkAddress(config: RhinestoneConfig): boolean;
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>;
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
+ declare function getEip1271Signature(config: RhinestoneConfig, signers: InternalSignerSet | undefined, chain: Chain, validator: ValidatorConfig, hash: Hex, transformSignature?: (signature: Hex) => Hex): Promise<Hex>;
37
+ declare function getEmissarySignature(config: RhinestoneConfig, signers: InternalSignerSet | undefined, chain: Chain, hash: Hex, transformSignature?: (signature: Hex) => Hex): Promise<Hex>;
38
+ declare function getTypedDataPackedSignature<typedData extends TypedData | Record<string, unknown> = TypedData, primaryType extends keyof typedData | 'EIP712Domain' = keyof typedData>(config: RhinestoneConfig, signers: InternalSignerSet | undefined, chain: Chain, validator: ValidatorConfig, parameters: HashTypedDataParameters<typedData, primaryType>, transformSignature?: (signature: Hex) => Hex): Promise<Hex>;
37
39
  declare function isDeployed(config: RhinestoneConfig, chain: Chain): Promise<boolean>;
38
40
  declare function deploy(config: RhinestoneConfig, chain: Chain, params?: {
39
41
  sponsored?: boolean;
42
+ eip7702InitSignature?: Hex;
40
43
  }): Promise<boolean>;
41
44
  declare function setup(config: RhinestoneConfig, chain: Chain): Promise<boolean>;
42
45
  declare function deployStandaloneWithEoa(chain: Chain, config: RhinestoneConfig, deployer: Account): Promise<void>;
@@ -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,eAAe,EACrB,MAAM,SAAS,CAAA;AA8ChB,iBAAS,WAAW,CAAC,MAAM,EAAE,gBAAgB;;;;;cAkB5C;AAED,iBAAS,aAAa,CAAC,MAAM,E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AAY,EACpB,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,QAAQ,gLAyDpB;AAED,iBAAS,MAAM,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAGjD;AAED,iBAAS,kBAAkB,CAAC,MAAM,EAAE,gBAAgB,GAAG,qBAAqB,CAO3E;AAED,OAAO,EACL,eAAe,EACf,0BAA0B,EAC1B,4BAA4B,EAC5B,UAAU,EACV,YAAY,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"}
@@ -434,7 +434,7 @@ async function deploy(config, chain, params) {
434
434
  await deployWithBundler(chain, config);
435
435
  }
436
436
  else {
437
- await deployWithIntent(chain, config, params?.sponsored ?? false);
437
+ await deployWithIntent(chain, config, params?.sponsored ?? false, params?.eip7702InitSignature);
438
438
  }
439
439
  return true;
440
440
  }
@@ -504,7 +504,7 @@ async function setup(config, chain) {
504
504
  await (0, execution_1.waitForExecution)(config, result, true);
505
505
  return true;
506
506
  }
507
- async function deployWithIntent(chain, config, sponsored) {
507
+ async function deployWithIntent(chain, config, sponsored, eip7702InitSignature) {
508
508
  const publicClient = (0, viem_1.createPublicClient)({
509
509
  chain,
510
510
  transport: (0, utils_1.createTransport)(chain, config.provider),
@@ -515,11 +515,17 @@ async function deployWithIntent(chain, config, sponsored) {
515
515
  // Already deployed
516
516
  return;
517
517
  }
518
+ // For EIP-7702 accounts, auto-sign if no signature was provided
519
+ let initSignature = eip7702InitSignature;
520
+ if (!initSignature && is7702(config)) {
521
+ initSignature = await signEip7702InitData(config);
522
+ }
518
523
  const result = await (0, execution_1.sendTransaction)(config, {
519
524
  sourceChains: [chain],
520
525
  targetChain: chain,
521
526
  calls: [],
522
527
  sponsored,
528
+ eip7702InitSignature: initSignature,
523
529
  });
524
530
  await (0, execution_1.waitForExecution)(config, result, true);
525
531
  }
@@ -1 +1 @@
1
- {"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../../../accounts/json-rpc/providers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAExD,iBAAS,aAAa,CAAC,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAetE;AAED,iBAAS,YAAY,CACnB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC3B,MAAM,GAAG,SAAS,CAEpB;AAED,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,CAAA"}
1
+ {"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../../../accounts/json-rpc/providers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAIxD,iBAAS,aAAa,CAAC,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAiBtE;AAED,iBAAS,YAAY,CACnB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC3B,MAAM,GAAG,SAAS,CAEpB;AAED,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,CAAA"}
@@ -36,19 +36,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.getAlchemyUrl = getAlchemyUrl;
37
37
  exports.getCustomUrl = getCustomUrl;
38
38
  const sharedConfigs = __importStar(require("@rhinestone/shared-configs"));
39
+ const ALCHEMY_API_KEY_PLACEHOLDER = '$' + '{ALCHEMY_API_KEY}';
39
40
  function getAlchemyUrl(chainId, apiKey) {
40
41
  const providers = sharedConfigs.providerRegistry ||
41
42
  sharedConfigs.ProviderRegistry;
42
43
  const urlTemplate = providers.Alchemy.url_template;
43
- const mapping = providers.Alchemy
44
- .chain_mapping;
44
+ const mapping = providers.Alchemy.chain_mapping;
45
45
  const chainParam = mapping[chainId];
46
46
  if (!chainParam) {
47
47
  throw new Error(`Unsupported chain: ${chainId}`);
48
48
  }
49
49
  return urlTemplate
50
50
  .replace('{{chain_param}}', chainParam)
51
- .split('${ALCHEMY_API_KEY}')
51
+ .split(ALCHEMY_API_KEY_PLACEHOLDER)
52
52
  .join(apiKey);
53
53
  }
54
54
  function getCustomUrl(chainId, urls) {
@@ -1 +1 @@
1
- {"version":3,"file":"safe.d.ts","sourceRoot":"","sources":["../../../accounts/safe.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,GAAG,EACR,KAAK,OAAO,EACZ,KAAK,KAAK,EAOV,KAAK,GAAG,EAER,KAAK,YAAY,EAKlB,MAAM,MAAM,CAAA;AACb,OAAO,EAIL,KAAK,YAAY,EACjB,KAAK,0BAA0B,EAEhC,MAAM,0BAA0B,CAAA;AAGjC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAM/C,OAAO,KAAK,EAAE,QAAQ,EAAE,uBAAuB,EAAe,MAAM,UAAU,CAAA;AAM9E,OAAO,EAAoC,KAAK,eAAe,EAAE,MAAM,SAAS,CAAA;AAoBhF,iBAAS,aAAa,CAAC,MAAM,EAAE,uBAAuB;;;;;;SAmGrD;AAED,iBAAS,eAAe,CAAC,MAAM,EAAE,uBAAuB;;;;;;EAgFvD;AAED,iBAAS,UAAU,CAAC,MAAM,EAAE,uBAAuB,iBAiBlD;AAED,iBAAS,eAAe,CAAC,MAAM,EAAE,uBA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M,EAAE,uBAAuB;;;;;;SAmGrD;AAED,iBAAS,eAAe,CAAC,MAAM,EAAE,uBAAuB;;;;;;EAgFvD;AAED,iBAAS,UAAU,CAAC,MAAM,EAAE,uBAAuB,iBAoBlD;AAED,iBAAS,eAAe,CAAC,MAAM,EAAE,uBAAuB,EAAE,KAAK,EAAE,KAAK;;;;;;EAarE;AAED,iBAAS,cAAc,CAAC,MAAM,EAAE,MAAM,iBA2BrC;AAED,iBAAe,aAAa,CAC1B,SAAS,EAAE,GAAG,EACd,SAAS,EAAE,eAAe,EAC1B,kBAAkB,GAAE,CAAC,SAAS,EAAE,GAAG,KAAK,GAA8B,0BAMvE;AAED,iBAAe,eAAe,CAC5B,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,QAAQ,EAChB,gBAAgB,EAAE,OAAO,EACzB,IAAI,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,iEAWlC;AAED,iBAAe,uBAAuB,CACpC,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,QAAQ,EACnB,gBAAgB,EAAE,OAAO,EACzB,IAAI,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,iEAalC;AA0GD,OAAO,EACL,eAAe,EACf,cAAc,EACd,UAAU,EACV,aAAa,EACb,aAAa,EACb,eAAe,EACf,eAAe,EACf,uBAAuB,GACxB,CAAA"}
@@ -186,6 +186,9 @@ function getV0DeployArgs(config) {
186
186
  function getAddress(config) {
187
187
  const deployArgs = getDeployArgs(config);
188
188
  if (!deployArgs) {
189
+ if (config.initData?.address) {
190
+ return config.initData.address;
191
+ }
189
192
  throw new Error('Cannot derive address: deploy args not available');
190
193
  }
191
194
  const { factory, implementation, salt } = deployArgs;
@@ -199,7 +202,7 @@ function getAddress(config) {
199
202
  return address;
200
203
  }
201
204
  function getEip712Domain(config, chain) {
202
- if (config.initData) {
205
+ if (config.initData && !('factory' in config.initData)) {
203
206
  throw new error_1.Eip712DomainNotAvailableError('Existing Safe-7579 accounts are not yet supported');
204
207
  }
205
208
  return {
@@ -1,12 +1,19 @@
1
- import type { WebAuthnP256 } from 'ox';
2
1
  import { type Account, type Address, type Chain, type Hex } from 'viem';
3
2
  import type { WebAuthnAccount } from 'viem/account-abstraction';
3
+ import { type ResolvedSessionSignerSet } from '../../modules/validators/smart-sessions';
4
4
  import type { OwnerSet, SignerSet } from '../../types';
5
5
  declare function convertOwnerSetToSignerSet(owners: OwnerSet): SignerSet;
6
+ type WebAuthnSignMetadata = {
7
+ authenticatorData: Hex;
8
+ challengeIndex?: number | undefined;
9
+ clientDataJSON: string;
10
+ typeIndex?: number | undefined;
11
+ userVerificationRequired?: boolean | undefined;
12
+ };
6
13
  type SigningFunctions<T> = {
7
14
  signEcdsa: (account: Account, params: T, updateV: boolean) => Promise<Hex>;
8
15
  signPasskey: (account: WebAuthnAccount, params: T) => Promise<{
9
- webauthn: WebAuthnP256.SignMetadata;
16
+ webauthn: WebAuthnSignMetadata;
10
17
  signature: Hex;
11
18
  }>;
12
19
  };
@@ -14,9 +21,7 @@ declare function signWithMultiFactorAuth<T>(signers: SignerSet & {
14
21
  type: 'owner';
15
22
  kind: 'multi-factor';
16
23
  }, chain: Chain, address: Address, params: T, isUserOpHash: boolean, signMain: (signers: SignerSet, chain: Chain, address: Address, params: T, isUserOpHash: boolean) => Promise<Hex>): Promise<Hex>;
17
- declare function signWithSession(signers: SignerSet & {
18
- type: 'experimental_session';
19
- }, chain: Chain, address: Address, hash: Hex, signMain: (signers: SignerSet, chain: Chain, address: Address, hash: Hex, isUserOpHash: boolean) => Promise<Hex>): Promise<Hex>;
24
+ declare function signWithSession(signers: ResolvedSessionSignerSet, chain: Chain, address: Address, hash: Hex, signMain: (signers: SignerSet, chain: Chain, address: Address, hash: Hex, isUserOpHash: boolean) => Promise<Hex>): Promise<Hex>;
20
25
  declare function signWithGuardians<T>(signers: SignerSet & {
21
26
  type: 'guardians';
22
27
  }, params: T, signingFunctions: SigningFunctions<T>): Promise<Hex>;
@@ -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,EAKT,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,CACX,OAAO,EAAE,eAAe,EACxB,MAAM,EAAE,CAAC,KACN,OAAO,CAAC;QACX,QAAQ,EAAE,YAAY,CAAC,YAAY,CAAA;QACnC,SAAS,EAAE,GAAG,CAAA;KACf,CAAC,CAAA;CACH,CAAA;AAED,iBAAe,uBAAuB,CAAC,CAAC,EACtC,OAAO,EAAE,SAAS,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,cAAc,CAAA;CAAE,EAC5D,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,CAAC,EACT,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,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AgB,GACtB,CAAA"}
@@ -1,5 +1,7 @@
1
1
  import { type Address, type Chain, type Hex } from 'viem';
2
+ import type { ResolvedSessionSignerSet } from '../../modules/validators/smart-sessions';
2
3
  import type { SignerSet } from '../../types';
3
- declare function sign(signers: SignerSet, chain: Chain, address: Address, hash: Hex, isUserOpHash: boolean): Promise<Hex>;
4
+ type InternalSignerSet = SignerSet | ResolvedSessionSignerSet;
5
+ declare function sign(signers: InternalSignerSet, chain: Chain, address: Address, hash: Hex, isUserOpHash: boolean): Promise<Hex>;
4
6
  export { sign };
5
7
  //# sourceMappingURL=message.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../accounts/signing/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,OAAO,EACZ,KAAK,KAAK,EAEV,KAAK,GAAG,EAGT,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAS5C,iBAAe,IAAI,CACjB,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,GAAG,EACT,YAAY,EAAE,OAAO,GACpB,OAAO,CAAC,GAAG,CAAC,CAyBd;AA4BD,OAAO,EAAE,IAAI,EAAE,CAAA"}
1
+ {"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../accounts/signing/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,OAAO,EACZ,KAAK,KAAK,EAEV,KAAK,GAAG,EAGT,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAA;AACvF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAS5C,KAAK,iBAAiB,GAAG,SAAS,GAAG,wBAAwB,CAAA;AAE7D,iBAAe,IAAI,CACjB,OAAO,EAAE,iBAAiB,EAC1B,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,GAAG,EACT,YAAY,EAAE,OAAO,GACpB,OAAO,CAAC,GAAG,CAAC,CA+Bd;AA4BD,OAAO,EAAE,IAAI,EAAE,CAAA"}
@@ -108,7 +108,7 @@ function getK1InitData(config, moduleSetup) {
108
108
  })),
109
109
  {
110
110
  module: viem_1.zeroAddress,
111
- initData: '0x',
111
+ initData: viem_1.zeroHash,
112
112
  },
113
113
  moduleSetup.fallbacks.map((f) => ({
114
114
  module: f.address,
@@ -27,7 +27,7 @@ interface GetAccountNonceParams {
27
27
  }
28
28
  declare function encode7579Calls<callType extends CallType>({ mode, callData, }: EncodeCallDataParams<callType>): Hex;
29
29
  declare function getAccountNonce(client: Client, args: GetAccountNonceParams): Promise<bigint>;
30
- declare function getBundlerClient(config: RhinestoneConfig, client: Client): import("viem/account-abstraction").BundlerClient<import("viem").HttpTransport<undefined, false>, undefined, undefined, Client, undefined>;
30
+ declare function getBundlerClient(config: RhinestoneConfig, client: Client): import("viem/_types/account-abstraction").BundlerClient<import("viem").HttpTransport<undefined, false>, undefined, undefined, Client, undefined>;
31
31
  export { encode7579Calls, getAccountNonce, getBundlerClient, createTransport };
32
32
  export type { ValidatorConfig };
33
33
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../accounts/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAgBhD,OAAO,KAAK,EAAkC,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAE5C,KAAK,QAAQ,GAAG,MAAM,GAAG,cAAc,GAAG,WAAW,CAAA;AAErD,UAAU,eAAe;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,OAAO,CAAA;CAChB;AAED,UAAU,aAAa,CAA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{ RhinestoneConfig, RhinestoneSDKConfig } from '../types';
2
+ export interface AuthProvider {
3
+ getHeaders(): Promise<Record<string, string>>;
4
+ getSubmitHeaders(intentInput: unknown, isSponsored: boolean): Promise<Record<string, string>>;
5
+ }
6
+ export declare function createAuthProvider(config: RhinestoneSDKConfig | RhinestoneConfig): AuthProvider;
7
+ //# sourceMappingURL=provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../auth/provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,UAAU,CAAA;AAEjB,MAAM,WAAW,YAAY;IAC3B,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IAC7C,gBAAgB,CACd,WAAW,EAAE,OAAO,EACpB,WAAW,EAAE,OAAO,GACnB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;CACnC;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,mBAAmB,GAAG,gBAAgB,GAC7C,YAAY,CAqCd"}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createAuthProvider = createAuthProvider;
4
+ function createAuthProvider(config) {
5
+ const resolved = resolveAuth(config);
6
+ if (resolved.mode === 'apiKey') {
7
+ const headers = { 'x-api-key': resolved.apiKey };
8
+ return {
9
+ getHeaders: async () => headers,
10
+ getSubmitHeaders: async () => headers,
11
+ };
12
+ }
13
+ const { accessToken, getIntentExtensionToken } = resolved;
14
+ const resolveAccessToken = async () => typeof accessToken === 'function' ? await accessToken() : accessToken;
15
+ return {
16
+ async getHeaders() {
17
+ const token = await resolveAccessToken();
18
+ return { Authorization: `Bearer ${token}`, 'x-api-key': 'jwt' };
19
+ },
20
+ async getSubmitHeaders(intentInput, isSponsored) {
21
+ const token = await resolveAccessToken();
22
+ const headers = {
23
+ Authorization: `Bearer ${token}`,
24
+ 'x-api-key': 'jwt',
25
+ };
26
+ if (isSponsored && getIntentExtensionToken) {
27
+ const extensionToken = await getIntentExtensionToken(intentInput);
28
+ headers['X-Intent-Extension'] = `Bearer ${extensionToken}`;
29
+ }
30
+ return headers;
31
+ },
32
+ };
33
+ }
34
+ function resolveAuth(config) {
35
+ if ('auth' in config && config.auth)
36
+ return config.auth;
37
+ if ('apiKey' in config && config.apiKey) {
38
+ return { mode: 'apiKey', apiKey: config.apiKey };
39
+ }
40
+ throw new Error('RhinestoneSDK requires either `apiKey` or `auth` in config');
41
+ }
@@ -1,5 +1,5 @@
1
1
  import { AccountConfigurationNotSupportedError, AccountError, Eip712DomainNotAvailableError, Eip7702AccountMustHaveEoaError, Eip7702NotSupportedForAccountError, EoaAccountMustHaveAccountError, ExistingEip7702AccountsNotSupportedError, FactoryArgsNotAvailableError, isAccountError, SigningNotSupportedForAccountError, SmartSessionsNotEnabledError, WalletClientNoConnectedAccountError } from '../accounts';
2
- import { ExecutionError, IntentFailedError, isExecutionError, OrderPathRequiredForIntentsError, SessionChainRequiredError, SignerNotSupportedError } from '../execution';
2
+ import { ExecutionError, IntentFailedError, InvalidSourceCallsError, isExecutionError, OrderPathRequiredForIntentsError, SessionChainRequiredError, SignerNotSupportedError } from '../execution';
3
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, };
4
+ export { isAccountError, AccountError, AccountConfigurationNotSupportedError, Eip712DomainNotAvailableError, Eip7702AccountMustHaveEoaError, EoaAccountMustHaveAccountError, ExistingEip7702AccountsNotSupportedError, FactoryArgsNotAvailableError, SmartSessionsNotEnabledError, SigningNotSupportedForAccountError, Eip7702NotSupportedForAccountError, WalletClientNoConnectedAccountError, isExecutionError, ExecutionError, IntentFailedError, InvalidSourceCallsError, 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,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
+ {"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,uBAAuB,EACvB,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,uBAAuB,EACvB,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.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;
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.InvalidSourceCallsError = 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; } });
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "WalletClientNoConnectedAccountError", { enumerab
17
17
  const execution_1 = require("../execution");
18
18
  Object.defineProperty(exports, "ExecutionError", { enumerable: true, get: function () { return execution_1.ExecutionError; } });
19
19
  Object.defineProperty(exports, "IntentFailedError", { enumerable: true, get: function () { return execution_1.IntentFailedError; } });
20
+ Object.defineProperty(exports, "InvalidSourceCallsError", { enumerable: true, get: function () { return execution_1.InvalidSourceCallsError; } });
20
21
  Object.defineProperty(exports, "isExecutionError", { enumerable: true, get: function () { return execution_1.isExecutionError; } });
21
22
  Object.defineProperty(exports, "OrderPathRequiredForIntentsError", { enumerable: true, get: function () { return execution_1.OrderPathRequiredForIntentsError; } });
22
23
  Object.defineProperty(exports, "SessionChainRequiredError", { enumerable: true, get: function () { return execution_1.SessionChainRequiredError; } });
@@ -50,6 +50,14 @@ declare class IntentStatusTimeoutError extends ExecutionError {
50
50
  traceId?: string;
51
51
  });
52
52
  }
53
+ declare class InvalidSourceCallsError extends ExecutionError {
54
+ constructor(params?: {
55
+ chainId?: number;
56
+ context?: any;
57
+ errorType?: string;
58
+ traceId?: string;
59
+ });
60
+ }
53
61
  declare class Eip7702InitSignatureRequiredError extends ExecutionError {
54
62
  constructor(params?: {
55
63
  context?: any;
@@ -58,5 +66,5 @@ declare class Eip7702InitSignatureRequiredError extends ExecutionError {
58
66
  });
59
67
  }
60
68
  declare function isExecutionError(error: Error): error is ExecutionError;
61
- export { isExecutionError, ExecutionError, Eip7702InitSignatureRequiredError, OrderPathRequiredForIntentsError, SessionChainRequiredError, IntentFailedError, IntentStatusTimeoutError, SignerNotSupportedError, };
69
+ export { isExecutionError, ExecutionError, Eip7702InitSignatureRequiredError, InvalidSourceCallsError, OrderPathRequiredForIntentsError, SessionChainRequiredError, IntentFailedError, IntentStatusTimeoutError, SignerNotSupportedError, };
62
70
  //# sourceMappingURL=error.d.ts.map
@@ -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,WAEV;IAED,IAAI,OAAO,QAEV;IAED,IAAI,SAAS,WAEZ;IAED,IAAI,OAAO,WAEV;CACF;AAED,cAAM,uBAAwB,SAAQ,cAAc;gBACtC,MAAM,CAAC,EAAE;QACnB,OAAO,CAAC,EAAE,GAAG,CAAA;QACb,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,OAAO,CAAC,EAAE,MAAM,CAAA;KACjB;CAOF;AAED,cAAM,gCAAiC,SAAQ,cAAc;gBAC/C,MAAM,CAAC,EAAE;QACnB,OAAO,CAAC,EAAE,GAAG,CAAA;QACb,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,OAAO,CAAC,EAAE,MAAM,CAAA;KACjB;CAMF;AAED,cAAM,yBAA0B,SAAQ,cAAc;gBACxC,MAAM,CAAC,EAAE;QACnB,OAAO,CAAC,EAAE,GAAG,CAAA;QACb,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,OAAO,CAAC,EAAE,MAAM,CAAA;KACjB;CAOF;AAED,cAAM,iBAAkB,SAAQ,cAAc;gBAChC,MAA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,MAAM,CAAC,EAAE;QACnB,OAAO,CAAC,EAAE,GAAG,CAAA;QACb,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,OAAO,CAAC,EAAE,MAAM,CAAA;KACjB;CAOF;AAED,iBAAS,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,cAAc,CAE/D;AAED,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,iCAAiC,EACjC,uBAAuB,EACvB,gCAAgC,EAChC,yBAAyB,EACzB,iBAAiB,EACjB,wBAAwB,EACxB,uBAAuB,GACxB,CAAA"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SignerNotSupportedError = exports.IntentStatusTimeoutError = exports.IntentFailedError = exports.SessionChainRequiredError = exports.OrderPathRequiredForIntentsError = exports.Eip7702InitSignatureRequiredError = exports.ExecutionError = void 0;
3
+ exports.SignerNotSupportedError = exports.IntentStatusTimeoutError = exports.IntentFailedError = exports.SessionChainRequiredError = exports.OrderPathRequiredForIntentsError = exports.InvalidSourceCallsError = exports.Eip7702InitSignatureRequiredError = exports.ExecutionError = void 0;
4
4
  exports.isExecutionError = isExecutionError;
5
5
  class ExecutionError extends Error {
6
6
  _message;
@@ -73,6 +73,17 @@ class IntentStatusTimeoutError extends ExecutionError {
73
73
  }
74
74
  }
75
75
  exports.IntentStatusTimeoutError = IntentStatusTimeoutError;
76
+ class InvalidSourceCallsError extends ExecutionError {
77
+ constructor(params) {
78
+ super({
79
+ message: params?.chainId !== undefined
80
+ ? `sourceCalls includes chainId ${params.chainId} which is not in sourceChains (or the target chain for same-chain transactions)`
81
+ : 'sourceCalls includes a chainId not in sourceChains (or the target chain for same-chain transactions)',
82
+ ...params,
83
+ });
84
+ }
85
+ }
86
+ exports.InvalidSourceCallsError = InvalidSourceCallsError;
76
87
  class Eip7702InitSignatureRequiredError extends ExecutionError {
77
88
  constructor(params) {
78
89
  super({
@@ -1,9 +1,10 @@
1
1
  import { type Address, type Chain, type Hex } from 'viem';
2
2
  import type { UserOperationReceipt } from 'viem/_types/account-abstraction';
3
+ import { type AuthProvider } from '../auth/provider';
3
4
  import { type IntentOpStatus, type SplitIntentsInput } from '../orchestrator';
4
5
  import type { SettlementLayer } from '../orchestrator/types';
5
6
  import type { CalldataInput, CallInput, RhinestoneAccountConfig, RhinestoneConfig, SignerSet, SourceAssetInput, Sponsorship, TokenRequest, TokenSymbol, Transaction, UserOperationTransaction } from '../types';
6
- import { ExecutionError, IntentFailedError, IntentStatusTimeoutError, isExecutionError, OrderPathRequiredForIntentsError, SessionChainRequiredError, SignerNotSupportedError } from './error';
7
+ import { ExecutionError, IntentFailedError, IntentStatusTimeoutError, InvalidSourceCallsError, isExecutionError, OrderPathRequiredForIntentsError, SessionChainRequiredError, SignerNotSupportedError } from './error';
7
8
  import type { TransactionResult, UserOperationResult } from './utils';
8
9
  interface TransactionStatus {
9
10
  fill: {
@@ -19,6 +20,7 @@ declare function sendTransaction(config: RhinestoneAccountConfig, transaction: T
19
20
  declare function sendUserOperation(config: RhinestoneAccountConfig, transaction: UserOperationTransaction): Promise<UserOperationResult>;
20
21
  declare function sendTransactionInternal(config: RhinestoneConfig, sourceChains: Chain[] | undefined, targetChain: Chain, options: {
21
22
  callInputs?: CallInput[];
23
+ sourceCalls?: Record<number, CallInput[]>;
22
24
  gasLimit?: bigint;
23
25
  initialTokenRequests?: TokenRequest[];
24
26
  recipient?: RhinestoneAccountConfig | Address;
@@ -33,10 +35,10 @@ declare function sendTransactionInternal(config: RhinestoneConfig, sourceChains:
33
35
  declare function sendUserOperationInternal(config: RhinestoneConfig, chain: Chain, callInputs: CalldataInput[], signers?: SignerSet): Promise<UserOperationResult>;
34
36
  declare function waitForExecution(config: RhinestoneConfig, result: TransactionResult | UserOperationResult, acceptsPreconfirmations: boolean): Promise<TransactionStatus | UserOperationReceipt>;
35
37
  declare function getPortfolio(config: RhinestoneConfig, onTestnets: boolean): Promise<import("../orchestrator").Portfolio>;
36
- declare function getIntentStatus(apiKey: string | undefined, endpointUrl: string | undefined, intentId: bigint, headers?: Record<string, string>): Promise<TransactionStatus & {
38
+ declare function getIntentStatus(authProvider: AuthProvider, endpointUrl: string | undefined, intentId: bigint, headers?: Record<string, string>): Promise<TransactionStatus & {
37
39
  status: IntentOpStatus['status'];
38
40
  }>;
39
- declare function splitIntents(apiKey: string | undefined, endpointUrl: string | undefined, input: SplitIntentsInput, headers?: Record<string, string>): Promise<import("../orchestrator").SplitIntentsResult>;
40
- export { sendTransaction, sendTransactionInternal, sendUserOperation, sendUserOperationInternal, waitForExecution, getPortfolio, getIntentStatus, splitIntents, isExecutionError, ExecutionError, IntentFailedError, IntentStatusTimeoutError, OrderPathRequiredForIntentsError, SessionChainRequiredError, SignerNotSupportedError, };
41
+ declare function splitIntents(authProvider: AuthProvider, endpointUrl: string | undefined, input: SplitIntentsInput, headers?: Record<string, string>): Promise<import("../orchestrator").SplitIntentsResult>;
42
+ export { sendTransaction, sendTransactionInternal, sendUserOperation, sendUserOperationInternal, waitForExecution, getPortfolio, getIntentStatus, splitIntents, isExecutionError, ExecutionError, IntentFailedError, IntentStatusTimeoutError, InvalidSourceCallsError, OrderPathRequiredForIntentsError, SessionChainRequiredError, SignerNotSupportedError, };
41
43
  export type { TransactionStatus, TransactionResult, UserOperationResult };
42
44
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../execution/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,KAAK,EAAsB,KAAK,GAAG,EAAE,MAAM,MAAM,CAAA;AAC7E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAA;AAG3E,OAAO,EAML,KAAK,cAAc,EAGnB,KAAK,iBAAiB,EACvB,MAAM,iBAAiB,CAAA;AAMxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,O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