@rhinestone/sdk 1.0.0-alpha.8 → 1.0.0-beta.38

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 (153) hide show
  1. package/dist/src/accounts/error.d.ts +38 -3
  2. package/dist/src/accounts/error.d.ts.map +1 -1
  3. package/dist/src/accounts/error.js +57 -7
  4. package/dist/src/accounts/index.d.ts +30 -15
  5. package/dist/src/accounts/index.d.ts.map +1 -1
  6. package/dist/src/accounts/index.js +304 -138
  7. package/dist/src/accounts/index.test.js +3 -5
  8. package/dist/src/accounts/json-rpc/index.d.ts +5 -0
  9. package/dist/src/accounts/json-rpc/index.d.ts.map +1 -0
  10. package/dist/src/accounts/json-rpc/index.js +16 -0
  11. package/dist/src/accounts/json-rpc/index.test.d.ts.map +1 -0
  12. package/dist/src/accounts/json-rpc/index.test.js +16 -0
  13. package/dist/src/accounts/json-rpc/providers.d.ts +4 -0
  14. package/dist/src/accounts/json-rpc/providers.d.ts.map +1 -0
  15. package/dist/src/accounts/json-rpc/providers.js +14 -0
  16. package/dist/src/accounts/json-rpc/providers.test.d.ts +2 -0
  17. package/dist/src/accounts/json-rpc/providers.test.d.ts.map +1 -0
  18. package/dist/src/accounts/json-rpc/providers.test.js +15 -0
  19. package/dist/src/accounts/kernel.d.ts +4 -3
  20. package/dist/src/accounts/kernel.d.ts.map +1 -1
  21. package/dist/src/accounts/kernel.js +32 -6
  22. package/dist/src/accounts/kernel.test.js +41 -19
  23. package/dist/src/accounts/nexus.d.ts +14 -7
  24. package/dist/src/accounts/nexus.d.ts.map +1 -1
  25. package/dist/src/accounts/nexus.js +191 -34
  26. package/dist/src/accounts/nexus.test.js +44 -18
  27. package/dist/src/accounts/safe.d.ts +2 -2
  28. package/dist/src/accounts/safe.d.ts.map +1 -1
  29. package/dist/src/accounts/safe.js +88 -58
  30. package/dist/src/accounts/safe.test.js +40 -14
  31. package/dist/src/accounts/signing/common.d.ts +27 -0
  32. package/dist/src/accounts/signing/common.d.ts.map +1 -0
  33. package/dist/src/accounts/signing/common.js +145 -0
  34. package/dist/src/accounts/signing/message.d.ts +5 -0
  35. package/dist/src/accounts/signing/message.d.ts.map +1 -0
  36. package/dist/src/accounts/signing/message.js +47 -0
  37. package/dist/src/accounts/signing/passkeys.d.ts +36 -0
  38. package/dist/src/accounts/signing/passkeys.d.ts.map +1 -0
  39. package/dist/src/accounts/signing/passkeys.js +125 -0
  40. package/dist/src/accounts/signing/passkeys.test.d.ts +2 -0
  41. package/dist/src/accounts/signing/passkeys.test.d.ts.map +1 -0
  42. package/dist/src/accounts/signing/passkeys.test.js +88 -0
  43. package/dist/src/accounts/signing/typedData.d.ts +5 -0
  44. package/dist/src/accounts/signing/typedData.d.ts.map +1 -0
  45. package/dist/src/accounts/signing/typedData.js +35 -0
  46. package/dist/src/accounts/startale.d.ts +20 -0
  47. package/dist/src/accounts/startale.d.ts.map +1 -0
  48. package/dist/src/accounts/startale.js +100 -0
  49. package/dist/src/accounts/startale.test.d.ts +2 -0
  50. package/dist/src/accounts/startale.test.d.ts.map +1 -0
  51. package/dist/src/accounts/startale.test.js +92 -0
  52. package/dist/src/accounts/utils.d.ts +4 -4
  53. package/dist/src/accounts/utils.d.ts.map +1 -1
  54. package/dist/src/accounts/utils.js +3 -40
  55. package/dist/src/accounts/walletClient.d.ts +7 -0
  56. package/dist/src/accounts/walletClient.d.ts.map +1 -0
  57. package/dist/src/accounts/walletClient.js +38 -0
  58. package/dist/src/actions/compact.d.ts +13 -0
  59. package/dist/src/actions/compact.d.ts.map +1 -0
  60. package/dist/src/actions/compact.js +210 -0
  61. package/dist/src/actions/ecdsa.d.ts +35 -0
  62. package/dist/src/actions/ecdsa.d.ts.map +1 -0
  63. package/dist/src/actions/ecdsa.js +114 -0
  64. package/dist/src/actions/ecdsa.test.d.ts +2 -0
  65. package/dist/src/actions/ecdsa.test.d.ts.map +1 -0
  66. package/dist/src/actions/ecdsa.test.js +99 -0
  67. package/dist/src/actions/index.d.ts +23 -38
  68. package/dist/src/actions/index.d.ts.map +1 -1
  69. package/dist/src/actions/index.js +29 -294
  70. package/dist/src/actions/mfa.d.ts +37 -0
  71. package/dist/src/actions/mfa.d.ts.map +1 -0
  72. package/dist/src/actions/mfa.js +133 -0
  73. package/dist/src/actions/passkeys.d.ts +37 -0
  74. package/dist/src/actions/passkeys.d.ts.map +1 -0
  75. package/dist/src/actions/passkeys.js +129 -0
  76. package/dist/src/actions/passkeys.test.d.ts +2 -0
  77. package/dist/src/actions/passkeys.test.d.ts.map +1 -0
  78. package/dist/src/actions/passkeys.test.js +54 -0
  79. package/dist/src/actions/recovery.d.ts +33 -0
  80. package/dist/src/actions/recovery.d.ts.map +1 -0
  81. package/dist/src/actions/recovery.js +193 -0
  82. package/dist/src/actions/recovery.test.d.ts +2 -0
  83. package/dist/src/actions/recovery.test.d.ts.map +1 -0
  84. package/dist/src/actions/recovery.test.js +168 -0
  85. package/dist/src/actions/smart-session.d.ts +6 -0
  86. package/dist/src/actions/smart-session.d.ts.map +1 -1
  87. package/dist/src/actions/smart-session.js +6 -0
  88. package/dist/src/errors/index.d.ts +5 -0
  89. package/dist/src/errors/index.d.ts.map +1 -0
  90. package/dist/src/errors/index.js +35 -0
  91. package/dist/src/execution/compact.d.ts +150 -7
  92. package/dist/src/execution/compact.d.ts.map +1 -1
  93. package/dist/src/execution/compact.js +112 -95
  94. package/dist/src/execution/error.d.ts +2 -9
  95. package/dist/src/execution/error.d.ts.map +1 -1
  96. package/dist/src/execution/error.js +4 -13
  97. package/dist/src/execution/index.d.ts +34 -22
  98. package/dist/src/execution/index.d.ts.map +1 -1
  99. package/dist/src/execution/index.js +62 -43
  100. package/dist/src/execution/permit2.d.ts +148 -0
  101. package/dist/src/execution/permit2.d.ts.map +1 -0
  102. package/dist/src/execution/permit2.js +282 -0
  103. package/dist/src/execution/smart-session.d.ts +3 -3
  104. package/dist/src/execution/smart-session.d.ts.map +1 -1
  105. package/dist/src/execution/types.d.ts +35 -0
  106. package/dist/src/execution/types.d.ts.map +1 -0
  107. package/dist/src/execution/types.js +2 -0
  108. package/dist/src/execution/utils.d.ts +36 -27
  109. package/dist/src/execution/utils.d.ts.map +1 -1
  110. package/dist/src/execution/utils.js +357 -103
  111. package/dist/src/index.d.ts +41 -22
  112. package/dist/src/index.d.ts.map +1 -1
  113. package/dist/src/index.js +199 -65
  114. package/dist/src/modules/common.d.ts +10 -4
  115. package/dist/src/modules/common.d.ts.map +1 -1
  116. package/dist/src/modules/common.js +22 -1
  117. package/dist/src/modules/index.d.ts +4 -18
  118. package/dist/src/modules/index.d.ts.map +1 -1
  119. package/dist/src/modules/index.js +15 -63
  120. package/dist/src/modules/index.test.js +9 -26
  121. package/dist/src/modules/omni-account.d.ts +2 -1
  122. package/dist/src/modules/omni-account.d.ts.map +1 -1
  123. package/dist/src/modules/omni-account.js +3 -1
  124. package/dist/src/modules/read.d.ts.map +1 -1
  125. package/dist/src/modules/read.js +5 -0
  126. package/dist/src/modules/validators/core.d.ts +5 -3
  127. package/dist/src/modules/validators/core.d.ts.map +1 -1
  128. package/dist/src/modules/validators/core.js +64 -41
  129. package/dist/src/modules/validators/core.test.js +7 -7
  130. package/dist/src/modules/validators/smart-sessions.js +3 -3
  131. package/dist/src/modules/validators/smart-sessions.test.js +4 -7
  132. package/dist/src/orchestrator/client.d.ts +4 -4
  133. package/dist/src/orchestrator/client.d.ts.map +1 -1
  134. package/dist/src/orchestrator/client.js +30 -15
  135. package/dist/src/orchestrator/index.d.ts +2 -3
  136. package/dist/src/orchestrator/index.d.ts.map +1 -1
  137. package/dist/src/orchestrator/index.js +1 -3
  138. package/dist/src/orchestrator/registry.d.ts +1 -23
  139. package/dist/src/orchestrator/registry.d.ts.map +1 -1
  140. package/dist/src/orchestrator/registry.js +37 -33
  141. package/dist/src/orchestrator/registry.test.js +7 -7
  142. package/dist/src/orchestrator/types.d.ts +97 -29
  143. package/dist/src/orchestrator/types.d.ts.map +1 -1
  144. package/dist/src/orchestrator/utils.d.ts +1 -3
  145. package/dist/src/orchestrator/utils.d.ts.map +1 -1
  146. package/dist/src/orchestrator/utils.js +0 -102
  147. package/dist/src/types.d.ts +74 -10
  148. package/dist/src/types.d.ts.map +1 -1
  149. package/package.json +72 -1
  150. package/dist/src/actions/index.test.d.ts.map +0 -1
  151. package/dist/src/actions/index.test.js +0 -302
  152. package/dist/src/orchestrator/registry.json +0 -365
  153. /package/dist/src/{actions → accounts/json-rpc}/index.test.d.ts +0 -0
@@ -50,20 +50,55 @@ declare class SigningNotSupportedForAccountError extends AccountError {
50
50
  traceId?: string;
51
51
  });
52
52
  }
53
- declare class SignMessageNotSupportedByAccountError extends AccountError {
53
+ declare class Eip7702NotSupportedForAccountError extends AccountError {
54
+ constructor(account: AccountType, params?: {
55
+ context?: any;
56
+ errorType?: string;
57
+ traceId?: string;
58
+ });
59
+ }
60
+ declare class AccountConfigurationNotSupportedError extends AccountError {
61
+ constructor(message: string, account: AccountType, params?: {
62
+ context?: any;
63
+ errorType?: string;
64
+ traceId?: string;
65
+ });
66
+ }
67
+ declare class WalletClientNoConnectedAccountError extends AccountError {
54
68
  constructor(params?: {
55
69
  context?: any;
56
70
  errorType?: string;
57
71
  traceId?: string;
58
72
  });
59
73
  }
60
- declare class Eip7702NotSupportedForAccountError extends AccountError {
74
+ declare class ModuleInstallationNotSupportedError extends AccountError {
61
75
  constructor(account: AccountType, params?: {
62
76
  context?: any;
63
77
  errorType?: string;
64
78
  traceId?: string;
65
79
  });
66
80
  }
81
+ declare class EoaSigningNotSupportedError extends AccountError {
82
+ constructor(method: string, params?: {
83
+ context?: any;
84
+ errorType?: string;
85
+ traceId?: string;
86
+ });
87
+ }
88
+ declare class EoaSigningMethodNotConfiguredError extends AccountError {
89
+ constructor(method: string, params?: {
90
+ context?: any;
91
+ errorType?: string;
92
+ traceId?: string;
93
+ });
94
+ }
95
+ declare class OwnersFieldRequiredError extends AccountError {
96
+ constructor(params?: {
97
+ context?: any;
98
+ errorType?: string;
99
+ traceId?: string;
100
+ });
101
+ }
67
102
  declare function isAccountError(error: Error): error is AccountError;
68
- export { isAccountError, AccountError, Eip7702AccountMustHaveEoaError, ExistingEip7702AccountsNotSupportedError, FactoryArgsNotAvailableError, SmartSessionsNotEnabledError, SigningNotSupportedForAccountError, SignMessageNotSupportedByAccountError, Eip7702NotSupportedForAccountError, };
103
+ export { isAccountError, AccountError, Eip7702AccountMustHaveEoaError, ExistingEip7702AccountsNotSupportedError, FactoryArgsNotAvailableError, SmartSessionsNotEnabledError, SigningNotSupportedForAccountError, Eip7702NotSupportedForAccountError, AccountConfigurationNotSupportedError, WalletClientNoConnectedAccountError, ModuleInstallationNotSupportedError, EoaSigningNotSupportedError, EoaSigningMethodNotConfiguredError, OwnersFieldRequiredError, };
69
104
  //# sourceMappingURL=error.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../accounts/error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAE3C,cAAM,YAAa,SAAQ,KAAK;IAC9B,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,8BAA+B,SAAQ,YAAY;gBAC3C,MAAM,CAAC,EAAE;QACnB,OAAO,CAAC,EAAE,GAAG,CAAA;QACb,SAAS,CAAC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ED,cAAM,2BAA4B,SAAQ,YAAY;gBAElD,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,GAAG,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE;CAOnE;AAED,cAAM,kCAAmC,SAAQ,YAAY;gBAEzD,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,GAAG,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE;CAOnE;AAED,cAAM,wBAAyB,SAAQ,YAAY;gBACrC,MAAM,CAAC,EAAE;QACnB,OAAO,CAAC,EAAE,GAAG,CAAA;QACb,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,OAAO,CAAC,EAAE,MAAM,CAAA;KACjB;CAMF;AAED,iBAAS,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,YAAY,CAE3D;AAiBD,OAAO,EACL,cAAc,EACd,YAAY,EACZ,8BAA8B,EAC9B,wCAAwC,EACxC,4BAA4B,EAC5B,4BAA4B,EAC5B,kCAAkC,EAClC,kCAAkC,EAClC,qCAAqC,EACrC,mCAAmC,EACnC,mCAAmC,EACnC,2BAA2B,EAC3B,kCAAkC,EAClC,wBAAwB,GACzB,CAAA"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Eip7702NotSupportedForAccountError = exports.SignMessageNotSupportedByAccountError = exports.SigningNotSupportedForAccountError = exports.SmartSessionsNotEnabledError = exports.FactoryArgsNotAvailableError = exports.ExistingEip7702AccountsNotSupportedError = exports.Eip7702AccountMustHaveEoaError = exports.AccountError = void 0;
3
+ exports.OwnersFieldRequiredError = exports.EoaSigningMethodNotConfiguredError = exports.EoaSigningNotSupportedError = exports.ModuleInstallationNotSupportedError = exports.WalletClientNoConnectedAccountError = exports.AccountConfigurationNotSupportedError = exports.Eip7702NotSupportedForAccountError = exports.SigningNotSupportedForAccountError = exports.SmartSessionsNotEnabledError = exports.FactoryArgsNotAvailableError = exports.ExistingEip7702AccountsNotSupportedError = exports.Eip7702AccountMustHaveEoaError = exports.AccountError = void 0;
4
4
  exports.isAccountError = isAccountError;
5
5
  class AccountError extends Error {
6
6
  _message;
@@ -73,25 +73,71 @@ class SigningNotSupportedForAccountError extends AccountError {
73
73
  }
74
74
  }
75
75
  exports.SigningNotSupportedForAccountError = SigningNotSupportedForAccountError;
76
- class SignMessageNotSupportedByAccountError extends AccountError {
76
+ class Eip7702NotSupportedForAccountError extends AccountError {
77
+ constructor(account, params) {
78
+ const accountName = getAccountName(account);
79
+ super({
80
+ message: `EIP-7702 is not supported for ${accountName} accounts`,
81
+ ...params,
82
+ });
83
+ }
84
+ }
85
+ exports.Eip7702NotSupportedForAccountError = Eip7702NotSupportedForAccountError;
86
+ class AccountConfigurationNotSupportedError extends AccountError {
87
+ constructor(message, account, params) {
88
+ super({
89
+ message: `Account configuration for ${getAccountName(account)} account is not supported: ${message}`,
90
+ ...params,
91
+ });
92
+ }
93
+ }
94
+ exports.AccountConfigurationNotSupportedError = AccountConfigurationNotSupportedError;
95
+ class WalletClientNoConnectedAccountError extends AccountError {
77
96
  constructor(params) {
78
97
  super({
79
- message: 'Sign message not supported by account',
98
+ message: 'WalletClient is missing a default account. Ensure the wallet is connected and the client has an account.',
80
99
  ...params,
81
100
  });
82
101
  }
83
102
  }
84
- exports.SignMessageNotSupportedByAccountError = SignMessageNotSupportedByAccountError;
85
- class Eip7702NotSupportedForAccountError extends AccountError {
103
+ exports.WalletClientNoConnectedAccountError = WalletClientNoConnectedAccountError;
104
+ class ModuleInstallationNotSupportedError extends AccountError {
86
105
  constructor(account, params) {
87
106
  const accountName = getAccountName(account);
88
107
  super({
89
- message: `EIP-7702 is not supported for ${accountName} accounts`,
108
+ message: `Module installation is not supported for ${accountName} accounts`,
90
109
  ...params,
91
110
  });
92
111
  }
93
112
  }
94
- exports.Eip7702NotSupportedForAccountError = Eip7702NotSupportedForAccountError;
113
+ exports.ModuleInstallationNotSupportedError = ModuleInstallationNotSupportedError;
114
+ class EoaSigningNotSupportedError extends AccountError {
115
+ constructor(method, params) {
116
+ super({
117
+ message: `EOA account provider does not support ${method} signing`,
118
+ ...params,
119
+ });
120
+ }
121
+ }
122
+ exports.EoaSigningNotSupportedError = EoaSigningNotSupportedError;
123
+ class EoaSigningMethodNotConfiguredError extends AccountError {
124
+ constructor(method, params) {
125
+ super({
126
+ message: `EOA account provider must have ${method} method configured`,
127
+ ...params,
128
+ });
129
+ }
130
+ }
131
+ exports.EoaSigningMethodNotConfiguredError = EoaSigningMethodNotConfiguredError;
132
+ class OwnersFieldRequiredError extends AccountError {
133
+ constructor(params) {
134
+ super({
135
+ message: 'Owners field is required for smart accounts',
136
+ ...params,
137
+ });
138
+ }
139
+ }
140
+ exports.OwnersFieldRequiredError = OwnersFieldRequiredError;
95
141
  function isAccountError(error) {
96
142
  return error instanceof AccountError;
97
143
  }
@@ -103,5 +149,9 @@ function getAccountName(account) {
103
149
  return 'Kernel';
104
150
  case 'nexus':
105
151
  return 'Nexus';
152
+ case 'startale':
153
+ return 'Startale';
154
+ case 'eoa':
155
+ return 'EOA';
106
156
  }
107
157
  }
@@ -1,22 +1,37 @@
1
- import { type Chain, type Hex, type PublicClient } from 'viem';
1
+ import { type Chain, type HashTypedDataParameters, type Hex, type PublicClient, type TypedData } from 'viem';
2
2
  import type { Module } from '../modules/common';
3
3
  import type { EnableSessionData } from '../modules/validators/smart-sessions';
4
- import type { AccountProviderConfig, Call, OwnerSet, RhinestoneAccountConfig, Session, SignerSet } from '../types';
5
- import { AccountError, Eip7702AccountMustHaveEoaError, Eip7702NotSupportedForAccountError, ExistingEip7702AccountsNotSupportedError, FactoryArgsNotAvailableError, isAccountError, SigningNotSupportedForAccountError, SignMessageNotSupportedByAccountError, SmartSessionsNotEnabledError } from './error';
4
+ import type { AccountProviderConfig, Call, OwnerSet, RhinestoneConfig, Session, SignerSet } from '../types';
5
+ import { AccountConfigurationNotSupportedError, AccountError, Eip7702AccountMustHaveEoaError, Eip7702NotSupportedForAccountError, EoaSigningMethodNotConfiguredError, EoaSigningNotSupportedError, ExistingEip7702AccountsNotSupportedError, FactoryArgsNotAvailableError, isAccountError, ModuleInstallationNotSupportedError, OwnersFieldRequiredError, SigningNotSupportedForAccountError, SmartSessionsNotEnabledError, WalletClientNoConnectedAccountError } from './error';
6
6
  import { type ValidatorConfig } from './utils';
7
- declare function getInitCode(config: RhinestoneAccountConfig): {
7
+ declare function getInitCode(config: RhinestoneConfig): {
8
+ address: import("viem").Address;
9
+ factory: import("viem").Address;
10
+ factoryData: Hex;
11
+ intentExecutorInstalled: boolean;
12
+ } | {
8
13
  factory: `0x${string}`;
9
14
  factoryData: `0x${string}`;
10
15
  } | undefined;
11
- declare function getModuleInstallationCalls(config: RhinestoneAccountConfig, module: Module): Call[];
12
- declare function getModuleUninstallationCalls(config: RhinestoneAccountConfig, module: Module): Call[];
13
- declare function getAddress(config: RhinestoneAccountConfig): `0x${string}`;
14
- declare function getPackedSignature(config: RhinestoneAccountConfig, signers: SignerSet | undefined, chain: Chain, validator: ValidatorConfig, hash: Hex, transformSignature?: (signature: Hex) => Hex): Promise<`0x${string}`>;
15
- declare function isDeployed(chain: Chain, config: RhinestoneAccountConfig): Promise<boolean>;
16
- declare function deploy(config: RhinestoneAccountConfig, chain: Chain, session?: Session): Promise<void>;
17
- declare function getSmartAccount(config: RhinestoneAccountConfig, client: PublicClient, chain: Chain): Promise<import("viem/account-abstraction").SmartAccount<import("viem/account-abstraction").SmartAccountImplementation<import("viem").Abi, "0.7">>>;
18
- declare function getSmartSessionSmartAccount(config: RhinestoneAccountConfig, client: PublicClient, chain: Chain, session: Session, enableData: EnableSessionData | null): Promise<import("viem/account-abstraction").SmartAccount<import("viem/account-abstraction").SmartAccountImplementation<import("viem").Abi, "0.7">>>;
19
- declare function getGuardianSmartAccount(config: RhinestoneAccountConfig, client: PublicClient, chain: Chain, guardians: OwnerSet): Promise<import("viem/account-abstraction").SmartAccount<import("viem/account-abstraction").SmartAccountImplementation<import("viem").Abi, "0.7">>>;
20
- declare function getAccountProvider(config: RhinestoneAccountConfig): AccountProviderConfig;
21
- export { getModuleInstallationCalls, getModuleUninstallationCalls, getAddress, getAccountProvider, getInitCode, isDeployed, deploy, getSmartAccount, getSmartSessionSmartAccount, getGuardianSmartAccount, getPackedSignature, isAccountError, AccountError, Eip7702AccountMustHaveEoaError, ExistingEip7702AccountsNotSupportedError, FactoryArgsNotAvailableError, SmartSessionsNotEnabledError, SigningNotSupportedForAccountError, SignMessageNotSupportedByAccountError, Eip7702NotSupportedForAccountError, };
16
+ declare function signEip7702InitData(config: RhinestoneConfig): Promise<`0x${string}`>;
17
+ declare function getEip7702InitCall(config: RhinestoneConfig, signature: Hex): Promise<{
18
+ initData: `0x${string}`;
19
+ contract: `0x${string}`;
20
+ }>;
21
+ declare function getModuleInstallationCalls(config: RhinestoneConfig, module: Module): Call[];
22
+ declare function getModuleUninstallationCalls(config: RhinestoneConfig, module: Module): Call[];
23
+ declare function getAddress(config: RhinestoneConfig): `0x${string}`;
24
+ declare function checkAddress(config: RhinestoneConfig): boolean;
25
+ declare function getPackedSignature(config: RhinestoneConfig, signers: SignerSet | undefined, chain: Chain, validator: ValidatorConfig, hash: Hex, transformSignature?: (signature: Hex) => Hex): Promise<Hex>;
26
+ 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>;
27
+ declare function isDeployed(config: RhinestoneConfig, chain: Chain): Promise<boolean>;
28
+ declare function deploy(config: RhinestoneConfig, chain: Chain, session?: Session): Promise<boolean>;
29
+ declare function setup(config: RhinestoneConfig, chain: Chain): Promise<boolean>;
30
+ declare function toErc6492Signature(config: RhinestoneConfig, signature: Hex, chain: Chain): Promise<Hex>;
31
+ declare function getSmartAccount(config: RhinestoneConfig, client: PublicClient, chain: Chain): Promise<import("viem/_types/account-abstraction").SmartAccount<import("viem/_types/account-abstraction").SmartAccountImplementation<import("viem").Abi, "0.7">> | undefined>;
32
+ declare function getSmartSessionSmartAccount(config: RhinestoneConfig, client: PublicClient, chain: Chain, session: Session, enableData: EnableSessionData | null): Promise<import("viem/_types/account-abstraction").SmartAccount<import("viem/_types/account-abstraction").SmartAccountImplementation<import("viem").Abi, "0.7">> | undefined>;
33
+ 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>;
34
+ declare function is7702(config: RhinestoneConfig): boolean;
35
+ declare function getAccountProvider(config: RhinestoneConfig): AccountProviderConfig;
36
+ export { getModuleInstallationCalls, getModuleUninstallationCalls, getAddress, checkAddress, getAccountProvider, getInitCode, signEip7702InitData, getEip7702InitCall, is7702, isDeployed, deploy, setup, toErc6492Signature, getSmartAccount, getSmartSessionSmartAccount, getGuardianSmartAccount, getPackedSignature, getTypedDataPackedSignature, isAccountError, AccountError, AccountConfigurationNotSupportedError, Eip7702AccountMustHaveEoaError, Eip7702NotSupportedForAccountError, EoaSigningMethodNotConfiguredError, EoaSigningNotSupportedError, ExistingEip7702AccountsNotSupportedError, FactoryArgsNotAvailableError, ModuleInstallationNotSupportedError, OwnersFieldRequiredError, SigningNotSupportedForAccountError, SmartSessionsNotEnabledError, WalletClientNoConnectedAccountError, };
22
37
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../accounts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KA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