@rhinestone/sdk 0.2.1 → 0.4.0

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 (71) hide show
  1. package/README.md +4 -4
  2. package/dist/accounts/index.d.ts +15515 -4
  3. package/dist/accounts/index.d.ts.map +1 -1
  4. package/dist/accounts/index.js +69 -10
  5. package/dist/accounts/nexus.d.ts +15542 -32
  6. package/dist/accounts/nexus.d.ts.map +1 -1
  7. package/dist/accounts/nexus.js +86 -65
  8. package/dist/accounts/safe.d.ts +3 -1
  9. package/dist/accounts/safe.d.ts.map +1 -1
  10. package/dist/accounts/safe.js +8 -2
  11. package/dist/examples/abi/weth.d.ts +214 -0
  12. package/dist/examples/abi/weth.d.ts.map +1 -0
  13. package/dist/examples/abi/weth.js +279 -0
  14. package/dist/examples/cross-chain-ss.d.ts +1 -0
  15. package/dist/examples/cross-chain-ss.d.ts.map +1 -0
  16. package/dist/{example.js → examples/cross-chain-ss.js} +59 -22
  17. package/dist/examples/giza.d.ts +1 -0
  18. package/dist/examples/giza.d.ts.map +1 -0
  19. package/dist/examples/giza.js +124 -0
  20. package/dist/examples/omni-account.d.ts +1 -0
  21. package/dist/examples/omni-account.d.ts.map +1 -0
  22. package/dist/examples/omni-account.js +169 -0
  23. package/dist/examples/smart-sessions.d.ts +1 -0
  24. package/dist/examples/smart-sessions.d.ts.map +1 -0
  25. package/dist/examples/smart-sessions.js +216 -0
  26. package/dist/execution/index.d.ts +28 -3
  27. package/dist/execution/index.d.ts.map +1 -1
  28. package/dist/execution/index.js +177 -47
  29. package/dist/execution/smart-session.d.ts +14 -0
  30. package/dist/execution/smart-session.d.ts.map +1 -0
  31. package/dist/execution/smart-session.js +83 -0
  32. package/dist/index.d.ts +17 -5
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +10 -10
  35. package/dist/modules/abi/smart-sessions.d.ts +42 -0
  36. package/dist/modules/abi/smart-sessions.d.ts.map +1 -0
  37. package/dist/modules/abi/smart-sessions.js +128 -0
  38. package/dist/modules/common.d.ts +16 -0
  39. package/dist/modules/common.d.ts.map +1 -0
  40. package/dist/modules/common.js +5 -0
  41. package/dist/modules/index.d.ts +7 -18
  42. package/dist/modules/index.d.ts.map +1 -1
  43. package/dist/modules/index.js +14 -119
  44. package/dist/modules/omni-account.d.ts +9 -0
  45. package/dist/modules/omni-account.d.ts.map +1 -0
  46. package/dist/modules/omni-account.js +7 -0
  47. package/dist/modules/validators.d.ts +31 -0
  48. package/dist/modules/validators.d.ts.map +1 -0
  49. package/dist/modules/validators.js +521 -0
  50. package/dist/orchestrator/client.d.ts +2 -5
  51. package/dist/orchestrator/client.d.ts.map +1 -1
  52. package/dist/orchestrator/consts.d.ts +3 -1
  53. package/dist/orchestrator/consts.d.ts.map +1 -1
  54. package/dist/orchestrator/consts.js +3 -1
  55. package/dist/orchestrator/index.d.ts +5 -3
  56. package/dist/orchestrator/index.d.ts.map +1 -1
  57. package/dist/orchestrator/index.js +5 -4
  58. package/dist/orchestrator/registry.d.ts +5 -0
  59. package/dist/orchestrator/registry.d.ts.map +1 -0
  60. package/dist/orchestrator/registry.js +187 -0
  61. package/dist/orchestrator/types.d.ts +39 -23
  62. package/dist/orchestrator/types.d.ts.map +1 -1
  63. package/dist/orchestrator/types.js +7 -6
  64. package/dist/orchestrator/utils.d.ts +8 -4
  65. package/dist/orchestrator/utils.d.ts.map +1 -1
  66. package/dist/orchestrator/utils.js +19 -5
  67. package/dist/types.d.ts +64 -4
  68. package/dist/types.d.ts.map +1 -1
  69. package/package.json +1 -1
  70. package/dist/example.d.ts +0 -1
  71. package/dist/example.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../accounts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,KAAK,EASN,MAAM,MAAM,CAAA;AAEb,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAA;AAclD,iBAAe,aAAa,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA9Epq/B;AAED,iBAAe,IAAI,CAAC,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,0BAYhE;AAqDD,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,2BAA2B,EAC3B,IAAI,GACL,CAAA"}
@@ -1,6 +1,8 @@
1
- import { createPublicClient, http, createWalletClient, size, keccak256, encodePacked, slice, } from 'viem';
2
- import { getDeployArgs as getSafeDeployArgs, get7702InitCalls as get7702SafeInitCalls, get7702SmartAccount as get7702SafeAccount, } from './safe';
3
- import { getDeployArgs as getNexusDeployArgs, get7702InitCalls as get7702NexusInitCalls, get7702SmartAccount as get7702NexusAccount, } from './nexus';
1
+ import { createPublicClient, http, createWalletClient, size, keccak256, encodePacked, slice, concat, } from 'viem';
2
+ import { getWebauthnValidatorSignature, isRip7212SupportedNetwork, } from '../modules';
3
+ import { getOwnerValidator, getSmartSessionValidator, } from '../modules/validators';
4
+ import { getDeployArgs as getSafeDeployArgs, getSmartAccount as getSafeSmartAccount, get7702InitCalls as get7702SafeInitCalls, get7702SmartAccount as get7702SafeAccount, getSessionSmartAccount as getSafeSessionSmartAccount, } from './safe';
5
+ import { getDeployArgs as getNexusDeployArgs, getSmartAccount as getNexusSmartAccount, get7702InitCalls as get7702NexusInitCalls, get7702SmartAccount as get7702NexusAccount, getSessionSmartAccount as getNexusSessionSmartAccount, } from './nexus';
4
6
  import { getBundlerClient } from './utils';
5
7
  async function getDeployArgs(config) {
6
8
  switch (config.account.type) {
@@ -42,12 +44,12 @@ async function isDeployed(chain, config) {
42
44
  }
43
45
  return size(code) > 0;
44
46
  }
45
- async function deploySource(deployer, chain, config) {
47
+ async function deploySource(chain, config) {
46
48
  if (is7702(config)) {
47
49
  return deploy7702Self(chain, config);
48
50
  }
49
51
  else {
50
- return deployStandaloneSelf(deployer, chain, config);
52
+ return deployStandaloneSelf(chain, config);
51
53
  }
52
54
  }
53
55
  async function deployTarget(chain, config) {
@@ -97,7 +99,8 @@ async function deploy7702Self(chain, config) {
97
99
  });
98
100
  await publicClient.waitForTransactionReceipt({ hash });
99
101
  }
100
- async function deployStandaloneSelf(deployer, chain, config) {
102
+ async function deployStandaloneSelf(chain, config) {
103
+ const deployer = config.deployerAccount;
101
104
  const { factory, factoryData } = await getDeployArgs(config);
102
105
  const publicClient = createPublicClient({
103
106
  chain: chain,
@@ -154,16 +157,62 @@ async function deploy7702WithBundler(chain, config) {
154
157
  hash: opHash,
155
158
  });
156
159
  }
157
- async function get7702InitCalls(config) {
160
+ async function getSmartAccount(config, client, chain) {
158
161
  switch (config.account.type) {
159
162
  case 'safe': {
160
- return get7702SafeInitCalls();
163
+ return getSafeSmartAccount();
161
164
  }
162
165
  case 'nexus': {
163
- return get7702NexusInitCalls(config);
166
+ const address = await getAddress(config);
167
+ const ownerValidator = getOwnerValidator(config);
168
+ const signFn = (hash) => sign(config.owners, chain, hash);
169
+ return getNexusSmartAccount(client, address, config.owners, ownerValidator.address, signFn);
170
+ }
171
+ }
172
+ }
173
+ async function getSmartSessionSmartAccount(config, client, chain, session) {
174
+ switch (config.account.type) {
175
+ case 'safe': {
176
+ return getSafeSessionSmartAccount();
177
+ }
178
+ case 'nexus': {
179
+ const address = await getAddress(config);
180
+ const smartSessionValidator = getSmartSessionValidator(config);
181
+ if (!smartSessionValidator) {
182
+ throw new Error('Smart sessions are not enabled for this account');
183
+ }
184
+ const signFn = (hash) => sign(session.owners, chain, hash);
185
+ return getNexusSessionSmartAccount(client, address, session, smartSessionValidator.address, signFn);
186
+ }
187
+ }
188
+ }
189
+ async function sign(validators, chain, hash) {
190
+ switch (validators.type) {
191
+ case 'ecdsa': {
192
+ const signatures = await Promise.all(validators.accounts.map((account) => signEcdsa(account, hash)));
193
+ return concat(signatures);
194
+ }
195
+ case 'passkey': {
196
+ return await signPasskey(validators.account, chain, hash);
164
197
  }
165
198
  }
166
199
  }
200
+ async function signEcdsa(account, hash) {
201
+ if (!account.signMessage) {
202
+ throw new Error('Signing not supported for the account');
203
+ }
204
+ return await account.signMessage({ message: { raw: hash } });
205
+ }
206
+ async function signPasskey(account, chain, hash) {
207
+ const { webauthn, signature } = await account.sign({ hash });
208
+ const usePrecompiled = isRip7212SupportedNetwork(chain);
209
+ const encodedSignature = getWebauthnValidatorSignature({
210
+ webauthn,
211
+ signature,
212
+ usePrecompiled,
213
+ });
214
+ return encodedSignature;
215
+ }
167
216
  async function get7702SmartAccount(config, client) {
168
217
  if (!config.eoa) {
169
218
  throw new Error('EIP-7702 accounts must have an EOA account');
@@ -177,7 +226,17 @@ async function get7702SmartAccount(config, client) {
177
226
  }
178
227
  }
179
228
  }
229
+ async function get7702InitCalls(config) {
230
+ switch (config.account.type) {
231
+ case 'safe': {
232
+ return get7702SafeInitCalls();
233
+ }
234
+ case 'nexus': {
235
+ return get7702NexusInitCalls(config);
236
+ }
237
+ }
238
+ }
180
239
  function is7702(config) {
181
240
  return config.eoa !== undefined;
182
241
  }
183
- export { getDeployArgs, getBundleInitCode, getAddress, isDeployed, deploySource, deployTarget, };
242
+ export { getDeployArgs, getBundleInitCode, getAddress, isDeployed, deploySource, deployTarget, getSmartAccount, getSmartSessionSmartAccount, sign, };