@rhinestone/sdk 1.0.0-alpha.25 → 1.0.0-alpha.27

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 (68) hide show
  1. package/dist/src/accounts/error.d.ts +12 -5
  2. package/dist/src/accounts/error.d.ts.map +1 -1
  3. package/dist/src/accounts/error.js +19 -10
  4. package/dist/src/accounts/index.d.ts +11 -4
  5. package/dist/src/accounts/index.d.ts.map +1 -1
  6. package/dist/src/accounts/index.js +119 -40
  7. package/dist/src/accounts/index.test.js +2 -2
  8. package/dist/src/accounts/kernel.d.ts +1 -1
  9. package/dist/src/accounts/kernel.d.ts.map +1 -1
  10. package/dist/src/accounts/kernel.js +29 -1
  11. package/dist/src/accounts/kernel.test.js +37 -4
  12. package/dist/src/accounts/nexus.d.ts +4 -3
  13. package/dist/src/accounts/nexus.d.ts.map +1 -1
  14. package/dist/src/accounts/nexus.js +82 -14
  15. package/dist/src/accounts/nexus.test.js +35 -2
  16. package/dist/src/accounts/safe.d.ts.map +1 -1
  17. package/dist/src/accounts/safe.js +79 -55
  18. package/dist/src/accounts/safe.test.js +35 -2
  19. package/dist/src/accounts/signing/common.d.ts +1 -1
  20. package/dist/src/accounts/signing/common.d.ts.map +1 -1
  21. package/dist/src/accounts/signing/common.js +14 -13
  22. package/dist/src/accounts/signing/message.js +3 -3
  23. package/dist/src/accounts/signing/passkeys.d.ts +8 -1
  24. package/dist/src/accounts/signing/passkeys.d.ts.map +1 -1
  25. package/dist/src/accounts/signing/passkeys.js +35 -0
  26. package/dist/src/accounts/signing/passkeys.test.js +15 -0
  27. package/dist/src/accounts/walletClient.d.ts.map +1 -1
  28. package/dist/src/accounts/walletClient.js +2 -1
  29. package/dist/src/actions/index.d.ts +30 -2
  30. package/dist/src/actions/index.d.ts.map +1 -1
  31. package/dist/src/actions/index.js +37 -6
  32. package/dist/src/actions/index.test.js +11 -11
  33. package/dist/src/execution/error.d.ts +8 -1
  34. package/dist/src/execution/error.d.ts.map +1 -1
  35. package/dist/src/execution/error.js +10 -1
  36. package/dist/src/execution/index.d.ts +12 -3
  37. package/dist/src/execution/index.d.ts.map +1 -1
  38. package/dist/src/execution/index.js +25 -17
  39. package/dist/src/execution/utils.d.ts +1 -1
  40. package/dist/src/execution/utils.d.ts.map +1 -1
  41. package/dist/src/execution/utils.js +24 -6
  42. package/dist/src/index.d.ts +6 -5
  43. package/dist/src/index.d.ts.map +1 -1
  44. package/dist/src/index.js +19 -3
  45. package/dist/src/modules/common.d.ts +10 -4
  46. package/dist/src/modules/common.d.ts.map +1 -1
  47. package/dist/src/modules/common.js +22 -1
  48. package/dist/src/modules/index.d.ts +2 -1
  49. package/dist/src/modules/index.d.ts.map +1 -1
  50. package/dist/src/modules/index.js +16 -13
  51. package/dist/src/modules/index.test.js +8 -7
  52. package/dist/src/modules/validators/core.d.ts +4 -3
  53. package/dist/src/modules/validators/core.d.ts.map +1 -1
  54. package/dist/src/modules/validators/core.js +24 -14
  55. package/dist/src/modules/validators/core.test.js +4 -4
  56. package/dist/src/orchestrator/client.js +6 -6
  57. package/dist/src/orchestrator/registry.d.ts.map +1 -1
  58. package/dist/src/orchestrator/registry.js +11 -10
  59. package/dist/src/orchestrator/registry.test.js +4 -4
  60. package/dist/src/types.d.ts +30 -20
  61. package/dist/src/types.d.ts.map +1 -1
  62. package/package.json +1 -1
  63. package/dist/src/accounts/custom.d.ts +0 -18
  64. package/dist/src/accounts/custom.d.ts.map +0 -1
  65. package/dist/src/accounts/custom.js +0 -121
  66. package/dist/src/accounts/custom.test.d.ts +0 -2
  67. package/dist/src/accounts/custom.test.d.ts.map +0 -1
  68. package/dist/src/accounts/custom.test.js +0 -64
@@ -1,64 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const viem_1 = require("viem");
4
- const account_abstraction_1 = require("viem/account-abstraction");
5
- const accounts_1 = require("viem/accounts");
6
- const chains_1 = require("viem/chains");
7
- const vitest_1 = require("vitest");
8
- const __1 = require("..");
9
- (0, vitest_1.describe)('Custom Accounts', () => {
10
- (0, vitest_1.describe)('Coinbase, account', async () => {
11
- const client = (0, viem_1.createPublicClient)({
12
- chain: chains_1.mainnet,
13
- transport: (0, viem_1.http)(),
14
- });
15
- const owner = (0, accounts_1.privateKeyToAccount)((0, accounts_1.generatePrivateKey)());
16
- const coinbaseAccount = await (0, account_abstraction_1.toCoinbaseSmartAccount)({
17
- client,
18
- owners: [owner],
19
- });
20
- (0, vitest_1.test)('Coinbase, getAddress', async () => {
21
- const account = await (0, __1.createRhinestoneAccount)({
22
- account: {
23
- type: 'custom',
24
- custom: {
25
- getDeployArgs: () => {
26
- return {
27
- factory: '0x',
28
- factoryData: '0x',
29
- };
30
- },
31
- getInstallData: () => {
32
- return [];
33
- },
34
- getAddress: () => {
35
- return coinbaseAccount.address;
36
- },
37
- getPackedSignature: async () => {
38
- throw new Error('Not implemented');
39
- },
40
- getSessionStubSignature: async () => {
41
- throw new Error('Not implemented');
42
- },
43
- signSessionUserOperation: async () => {
44
- throw new Error('Not implemented');
45
- },
46
- getStubSignature: async () => {
47
- return coinbaseAccount.getStubSignature();
48
- },
49
- sign: async () => {
50
- throw new Error('Not implemented');
51
- },
52
- },
53
- },
54
- owners: {
55
- type: 'ecdsa-v0',
56
- accounts: [owner],
57
- threshold: 1,
58
- },
59
- rhinestoneApiKey: '',
60
- });
61
- (0, vitest_1.expect)(account.getAddress()).toEqual(coinbaseAccount.address);
62
- });
63
- });
64
- });