@rhinestone/sdk 1.4.2 → 2.0.0-beta.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.
- package/README.md +89 -1
- package/dist/src/accounts/error.d.ts +1 -1
- package/dist/src/accounts/error.js +1 -19
- package/dist/src/accounts/index.d.ts +5 -5
- package/dist/src/accounts/index.js +121 -157
- package/dist/src/accounts/json-rpc/index.d.ts +1 -1
- package/dist/src/accounts/json-rpc/index.js +8 -10
- package/dist/src/accounts/json-rpc/providers.d.ts +1 -1
- package/dist/src/accounts/json-rpc/providers.js +4 -7
- package/dist/src/accounts/kernel.d.ts +3 -3
- package/dist/src/accounts/kernel.js +66 -75
- package/dist/src/accounts/nexus.d.ts +3 -3
- package/dist/src/accounts/nexus.js +62 -73
- package/dist/src/accounts/passport.d.ts +3 -3
- package/dist/src/accounts/passport.js +9 -13
- package/dist/src/accounts/safe.d.ts +3 -3
- package/dist/src/accounts/safe.js +54 -63
- package/dist/src/accounts/signing/common.d.ts +10 -4
- package/dist/src/accounts/signing/common.d.ts.map +1 -1
- package/dist/src/accounts/signing/common.js +30 -36
- package/dist/src/accounts/signing/message.d.ts +2 -2
- package/dist/src/accounts/signing/message.js +10 -12
- package/dist/src/accounts/signing/passkeys.js +11 -17
- package/dist/src/accounts/signing/typedData.d.ts +1 -1
- package/dist/src/accounts/signing/typedData.js +6 -8
- package/dist/src/accounts/startale.d.ts +3 -3
- package/dist/src/accounts/startale.js +37 -47
- package/dist/src/accounts/utils.d.ts +2 -2
- package/dist/src/accounts/utils.js +22 -28
- package/dist/src/accounts/walletClient.js +4 -8
- package/dist/src/actions/compact.d.ts +1 -1
- package/dist/src/actions/compact.js +22 -35
- package/dist/src/actions/deployment.d.ts +1 -1
- package/dist/src/actions/deployment.js +11 -13
- package/dist/src/actions/ecdsa.d.ts +1 -1
- package/dist/src/actions/ecdsa.js +14 -20
- package/dist/src/actions/index.d.ts +2 -2
- package/dist/src/actions/index.js +6 -10
- package/dist/src/actions/mfa.d.ts +1 -1
- package/dist/src/actions/mfa.js +18 -24
- package/dist/src/actions/passkeys.d.ts +2 -2
- package/dist/src/actions/passkeys.js +14 -20
- package/dist/src/actions/recovery.d.ts +1 -1
- package/dist/src/actions/recovery.js +25 -29
- package/dist/src/actions/smart-sessions.d.ts +1 -1
- package/dist/src/actions/smart-sessions.js +8 -12
- package/dist/src/auth/provider.d.ts +7 -0
- package/dist/src/auth/provider.d.ts.map +1 -0
- package/dist/src/auth/provider.js +38 -0
- package/dist/src/errors/index.d.ts +3 -3
- package/dist/src/errors/index.js +10 -54
- package/dist/src/execution/compact.d.ts +3 -3
- package/dist/src/execution/compact.js +10 -18
- package/dist/src/execution/error.js +1 -11
- package/dist/src/execution/index.d.ts +9 -8
- package/dist/src/execution/index.d.ts.map +1 -1
- package/dist/src/execution/index.js +54 -67
- package/dist/src/execution/permit2.d.ts +5 -5
- package/dist/src/execution/permit2.js +8 -13
- package/dist/src/execution/singleChainOps.d.ts +2 -2
- package/dist/src/execution/singleChainOps.js +1 -3
- package/dist/src/execution/types.d.ts +1 -1
- package/dist/src/execution/types.js +1 -2
- package/dist/src/execution/utils.d.ts +10 -6
- package/dist/src/execution/utils.d.ts.map +1 -1
- package/dist/src/execution/utils.js +159 -162
- package/dist/src/index.d.ts +10 -10
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +57 -67
- package/dist/src/jwt-server/digest.d.ts +11 -0
- package/dist/src/jwt-server/digest.d.ts.map +1 -0
- package/dist/src/jwt-server/digest.js +19 -0
- package/dist/src/jwt-server/express.d.ts +16 -0
- package/dist/src/jwt-server/express.d.ts.map +1 -0
- package/dist/src/jwt-server/express.js +23 -0
- package/dist/src/jwt-server/handlers.d.ts +10 -0
- package/dist/src/jwt-server/handlers.d.ts.map +1 -0
- package/dist/src/jwt-server/handlers.js +37 -0
- package/dist/src/jwt-server/index.d.ts +8 -0
- package/dist/src/jwt-server/index.d.ts.map +1 -0
- package/dist/src/jwt-server/index.js +7 -0
- package/dist/src/jwt-server/jcs.d.ts +12 -0
- package/dist/src/jwt-server/jcs.d.ts.map +1 -0
- package/dist/src/jwt-server/jcs.js +57 -0
- package/dist/src/jwt-server/signer.d.ts +18 -0
- package/dist/src/jwt-server/signer.d.ts.map +1 -0
- package/dist/src/jwt-server/signer.js +68 -0
- package/dist/src/jwt-server/sponsorship.d.ts +19 -0
- package/dist/src/jwt-server/sponsorship.d.ts.map +1 -0
- package/dist/src/jwt-server/sponsorship.js +51 -0
- package/dist/src/jwt-server/web.d.ts +4 -0
- package/dist/src/jwt-server/web.d.ts.map +1 -0
- package/dist/src/jwt-server/web.js +23 -0
- package/dist/src/modules/abi/smart-session-emissary.js +1 -3
- package/dist/src/modules/abi/smart-sessions.js +1 -4
- package/dist/src/modules/chain-abstraction.js +1 -5
- package/dist/src/modules/common.d.ts +1 -1
- package/dist/src/modules/common.js +1 -13
- package/dist/src/modules/index.d.ts +5 -5
- package/dist/src/modules/index.js +35 -50
- package/dist/src/modules/legacy.d.ts +2 -2
- package/dist/src/modules/legacy.js +11 -14
- package/dist/src/modules/read.d.ts +1 -1
- package/dist/src/modules/read.js +11 -15
- package/dist/src/modules/validators/core.d.ts +2 -2
- package/dist/src/modules/validators/core.js +26 -44
- package/dist/src/modules/validators/index.d.ts +2 -2
- package/dist/src/modules/validators/index.js +3 -19
- package/dist/src/modules/validators/policies/claim/permit2.d.ts +1 -1
- package/dist/src/modules/validators/policies/claim/permit2.js +39 -44
- package/dist/src/modules/validators/policies/claim/types.js +11 -14
- package/dist/src/modules/validators/smart-sessions.d.ts +4 -4
- package/dist/src/modules/validators/smart-sessions.d.ts.map +1 -1
- package/dist/src/modules/validators/smart-sessions.js +77 -97
- package/dist/src/orchestrator/client.d.ts +10 -5
- package/dist/src/orchestrator/client.d.ts.map +1 -1
- package/dist/src/orchestrator/client.js +73 -66
- package/dist/src/orchestrator/consts.d.ts +1 -1
- package/dist/src/orchestrator/consts.d.ts.map +1 -1
- package/dist/src/orchestrator/consts.js +2 -8
- package/dist/src/orchestrator/error.js +1 -33
- package/dist/src/orchestrator/index.d.ts +8 -7
- package/dist/src/orchestrator/index.d.ts.map +1 -1
- package/dist/src/orchestrator/index.js +8 -57
- package/dist/src/orchestrator/registry.d.ts +2 -2
- package/dist/src/orchestrator/registry.js +19 -33
- package/dist/src/orchestrator/types.d.ts +5 -1
- package/dist/src/orchestrator/types.d.ts.map +1 -1
- package/dist/src/orchestrator/types.js +1 -17
- package/dist/src/orchestrator/utils.js +1 -3
- package/dist/src/types.d.ts +29 -5
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +1 -2
- package/dist/src/utils/index.d.ts +2 -2
- package/dist/src/utils/index.js +9 -15
- package/package.json +29 -98
- package/dist/src/accounts/index.test.d.ts +0 -2
- package/dist/src/accounts/index.test.d.ts.map +0 -1
- package/dist/src/accounts/index.test.js +0 -33
- package/dist/src/accounts/json-rpc/index.test.d.ts +0 -2
- package/dist/src/accounts/json-rpc/index.test.d.ts.map +0 -1
- package/dist/src/accounts/json-rpc/index.test.js +0 -35
- package/dist/src/accounts/json-rpc/providers.test.d.ts +0 -2
- package/dist/src/accounts/json-rpc/providers.test.d.ts.map +0 -1
- package/dist/src/accounts/json-rpc/providers.test.js +0 -43
- package/dist/src/accounts/kernel.test.d.ts +0 -2
- package/dist/src/accounts/kernel.test.d.ts.map +0 -1
- package/dist/src/accounts/kernel.test.js +0 -132
- package/dist/src/accounts/nexus.test.d.ts +0 -2
- package/dist/src/accounts/nexus.test.d.ts.map +0 -1
- package/dist/src/accounts/nexus.test.js +0 -118
- package/dist/src/accounts/safe.test.d.ts +0 -2
- package/dist/src/accounts/safe.test.d.ts.map +0 -1
- package/dist/src/accounts/safe.test.js +0 -168
- package/dist/src/accounts/signing/passkeys.test.d.ts +0 -2
- package/dist/src/accounts/signing/passkeys.test.d.ts.map +0 -1
- package/dist/src/accounts/signing/passkeys.test.js +0 -88
- package/dist/src/accounts/startale.test.d.ts +0 -2
- package/dist/src/accounts/startale.test.d.ts.map +0 -1
- package/dist/src/accounts/startale.test.js +0 -189
- package/dist/src/accounts/utils.test.d.ts +0 -2
- package/dist/src/accounts/utils.test.d.ts.map +0 -1
- package/dist/src/accounts/utils.test.js +0 -49
- package/dist/src/actions/ecdsa.test.d.ts +0 -2
- package/dist/src/actions/ecdsa.test.d.ts.map +0 -1
- package/dist/src/actions/ecdsa.test.js +0 -99
- package/dist/src/actions/passkeys.test.d.ts +0 -2
- package/dist/src/actions/passkeys.test.d.ts.map +0 -1
- package/dist/src/actions/passkeys.test.js +0 -54
- package/dist/src/actions/recovery.test.d.ts +0 -2
- package/dist/src/actions/recovery.test.d.ts.map +0 -1
- package/dist/src/actions/recovery.test.js +0 -168
- package/dist/src/execution/signing.test.d.ts +0 -2
- package/dist/src/execution/signing.test.d.ts.map +0 -1
- package/dist/src/execution/signing.test.js +0 -465
- package/dist/src/execution/utils.test.d.ts +0 -2
- package/dist/src/execution/utils.test.d.ts.map +0 -1
- package/dist/src/execution/utils.test.js +0 -388
- package/dist/src/modules/index.test.d.ts +0 -2
- package/dist/src/modules/index.test.d.ts.map +0 -1
- package/dist/src/modules/index.test.js +0 -81
- package/dist/src/modules/validators/core.test.d.ts +0 -2
- package/dist/src/modules/validators/core.test.d.ts.map +0 -1
- package/dist/src/modules/validators/core.test.js +0 -101
- package/dist/src/modules/validators/policies/claim/permit2.test.d.ts +0 -2
- package/dist/src/modules/validators/policies/claim/permit2.test.d.ts.map +0 -1
- package/dist/src/modules/validators/policies/claim/permit2.test.js +0 -519
- package/dist/src/modules/validators/smart-sessions.test.d.ts +0 -2
- package/dist/src/modules/validators/smart-sessions.test.d.ts.map +0 -1
- package/dist/src/modules/validators/smart-sessions.test.js +0 -311
- package/dist/src/orchestrator/registry.test.d.ts +0 -2
- package/dist/src/orchestrator/registry.test.d.ts.map +0 -1
- package/dist/src/orchestrator/registry.test.js +0 -154
- package/dist/src/utils/index.test.d.ts +0 -2
- package/dist/src/utils/index.test.d.ts.map +0 -1
- package/dist/src/utils/index.test.js +0 -42
- package/dist/test/consts.d.ts +0 -10
- package/dist/test/consts.d.ts.map +0 -1
- package/dist/test/consts.js +0 -22
- package/dist/test/utils/utils.d.ts +0 -5
- package/dist/test/utils/utils.d.ts.map +0 -1
- 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,7 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OwnersFieldRequiredError = exports.EoaSigningMethodNotConfiguredError = exports.EoaSigningNotSupportedError = exports.ModuleInstallationNotSupportedError = exports.WalletClientNoConnectedAccountError = exports.AccountConfigurationNotSupportedError = exports.Eip7702NotSupportedForAccountError = exports.SigningNotSupportedForAccountError = exports.SmartSessionsNotEnabledError = exports.FactoryArgsNotAvailableError = exports.EoaAccountMustHaveAccountError = exports.ExistingEip7702AccountsNotSupportedError = exports.Eip7702AccountMustHaveEoaError = exports.Eip712DomainNotAvailableError = exports.AccountError = void 0;
|
|
4
|
-
exports.isAccountError = isAccountError;
|
|
5
1
|
class AccountError extends Error {
|
|
6
2
|
_message;
|
|
7
3
|
_context;
|
|
@@ -27,7 +23,6 @@ class AccountError extends Error {
|
|
|
27
23
|
return this._traceId;
|
|
28
24
|
}
|
|
29
25
|
}
|
|
30
|
-
exports.AccountError = AccountError;
|
|
31
26
|
class Eip7702AccountMustHaveEoaError extends AccountError {
|
|
32
27
|
constructor(params) {
|
|
33
28
|
super({
|
|
@@ -36,7 +31,6 @@ class Eip7702AccountMustHaveEoaError extends AccountError {
|
|
|
36
31
|
});
|
|
37
32
|
}
|
|
38
33
|
}
|
|
39
|
-
exports.Eip7702AccountMustHaveEoaError = Eip7702AccountMustHaveEoaError;
|
|
40
34
|
class ExistingEip7702AccountsNotSupportedError extends AccountError {
|
|
41
35
|
constructor(params) {
|
|
42
36
|
super({
|
|
@@ -45,7 +39,6 @@ class ExistingEip7702AccountsNotSupportedError extends AccountError {
|
|
|
45
39
|
});
|
|
46
40
|
}
|
|
47
41
|
}
|
|
48
|
-
exports.ExistingEip7702AccountsNotSupportedError = ExistingEip7702AccountsNotSupportedError;
|
|
49
42
|
class EoaAccountMustHaveAccountError extends AccountError {
|
|
50
43
|
constructor(params) {
|
|
51
44
|
super({
|
|
@@ -54,7 +47,6 @@ class EoaAccountMustHaveAccountError extends AccountError {
|
|
|
54
47
|
});
|
|
55
48
|
}
|
|
56
49
|
}
|
|
57
|
-
exports.EoaAccountMustHaveAccountError = EoaAccountMustHaveAccountError;
|
|
58
50
|
class FactoryArgsNotAvailableError extends AccountError {
|
|
59
51
|
constructor(params) {
|
|
60
52
|
super({
|
|
@@ -63,7 +55,6 @@ class FactoryArgsNotAvailableError extends AccountError {
|
|
|
63
55
|
});
|
|
64
56
|
}
|
|
65
57
|
}
|
|
66
|
-
exports.FactoryArgsNotAvailableError = FactoryArgsNotAvailableError;
|
|
67
58
|
class SmartSessionsNotEnabledError extends AccountError {
|
|
68
59
|
constructor(params) {
|
|
69
60
|
super({
|
|
@@ -72,7 +63,6 @@ class SmartSessionsNotEnabledError extends AccountError {
|
|
|
72
63
|
});
|
|
73
64
|
}
|
|
74
65
|
}
|
|
75
|
-
exports.SmartSessionsNotEnabledError = SmartSessionsNotEnabledError;
|
|
76
66
|
class SigningNotSupportedForAccountError extends AccountError {
|
|
77
67
|
constructor(params) {
|
|
78
68
|
super({
|
|
@@ -81,7 +71,6 @@ class SigningNotSupportedForAccountError extends AccountError {
|
|
|
81
71
|
});
|
|
82
72
|
}
|
|
83
73
|
}
|
|
84
|
-
exports.SigningNotSupportedForAccountError = SigningNotSupportedForAccountError;
|
|
85
74
|
class Eip7702NotSupportedForAccountError extends AccountError {
|
|
86
75
|
constructor(account, params) {
|
|
87
76
|
const accountName = getAccountName(account);
|
|
@@ -91,7 +80,6 @@ class Eip7702NotSupportedForAccountError extends AccountError {
|
|
|
91
80
|
});
|
|
92
81
|
}
|
|
93
82
|
}
|
|
94
|
-
exports.Eip7702NotSupportedForAccountError = Eip7702NotSupportedForAccountError;
|
|
95
83
|
class AccountConfigurationNotSupportedError extends AccountError {
|
|
96
84
|
constructor(message, account, params) {
|
|
97
85
|
super({
|
|
@@ -100,7 +88,6 @@ class AccountConfigurationNotSupportedError extends AccountError {
|
|
|
100
88
|
});
|
|
101
89
|
}
|
|
102
90
|
}
|
|
103
|
-
exports.AccountConfigurationNotSupportedError = AccountConfigurationNotSupportedError;
|
|
104
91
|
class WalletClientNoConnectedAccountError extends AccountError {
|
|
105
92
|
constructor(params) {
|
|
106
93
|
super({
|
|
@@ -109,7 +96,6 @@ class WalletClientNoConnectedAccountError extends AccountError {
|
|
|
109
96
|
});
|
|
110
97
|
}
|
|
111
98
|
}
|
|
112
|
-
exports.WalletClientNoConnectedAccountError = WalletClientNoConnectedAccountError;
|
|
113
99
|
class ModuleInstallationNotSupportedError extends AccountError {
|
|
114
100
|
constructor(account, params) {
|
|
115
101
|
const accountName = getAccountName(account);
|
|
@@ -119,7 +105,6 @@ class ModuleInstallationNotSupportedError extends AccountError {
|
|
|
119
105
|
});
|
|
120
106
|
}
|
|
121
107
|
}
|
|
122
|
-
exports.ModuleInstallationNotSupportedError = ModuleInstallationNotSupportedError;
|
|
123
108
|
class EoaSigningNotSupportedError extends AccountError {
|
|
124
109
|
constructor(method, params) {
|
|
125
110
|
super({
|
|
@@ -128,7 +113,6 @@ class EoaSigningNotSupportedError extends AccountError {
|
|
|
128
113
|
});
|
|
129
114
|
}
|
|
130
115
|
}
|
|
131
|
-
exports.EoaSigningNotSupportedError = EoaSigningNotSupportedError;
|
|
132
116
|
class EoaSigningMethodNotConfiguredError extends AccountError {
|
|
133
117
|
constructor(method, params) {
|
|
134
118
|
super({
|
|
@@ -137,7 +121,6 @@ class EoaSigningMethodNotConfiguredError extends AccountError {
|
|
|
137
121
|
});
|
|
138
122
|
}
|
|
139
123
|
}
|
|
140
|
-
exports.EoaSigningMethodNotConfiguredError = EoaSigningMethodNotConfiguredError;
|
|
141
124
|
class OwnersFieldRequiredError extends AccountError {
|
|
142
125
|
constructor(params) {
|
|
143
126
|
super({
|
|
@@ -146,7 +129,6 @@ class OwnersFieldRequiredError extends AccountError {
|
|
|
146
129
|
});
|
|
147
130
|
}
|
|
148
131
|
}
|
|
149
|
-
exports.OwnersFieldRequiredError = OwnersFieldRequiredError;
|
|
150
132
|
class Eip712DomainNotAvailableError extends AccountError {
|
|
151
133
|
constructor(message) {
|
|
152
134
|
super({
|
|
@@ -154,7 +136,6 @@ class Eip712DomainNotAvailableError extends AccountError {
|
|
|
154
136
|
});
|
|
155
137
|
}
|
|
156
138
|
}
|
|
157
|
-
exports.Eip712DomainNotAvailableError = Eip712DomainNotAvailableError;
|
|
158
139
|
function isAccountError(error) {
|
|
159
140
|
return error instanceof AccountError;
|
|
160
141
|
}
|
|
@@ -172,3 +153,4 @@ function getAccountName(account) {
|
|
|
172
153
|
return 'EOA';
|
|
173
154
|
}
|
|
174
155
|
}
|
|
156
|
+
export { isAccountError, AccountError, Eip712DomainNotAvailableError, Eip7702AccountMustHaveEoaError, ExistingEip7702AccountsNotSupportedError, EoaAccountMustHaveAccountError, FactoryArgsNotAvailableError, SmartSessionsNotEnabledError, SigningNotSupportedForAccountError, Eip7702NotSupportedForAccountError, AccountConfigurationNotSupportedError, WalletClientNoConnectedAccountError, ModuleInstallationNotSupportedError, EoaSigningNotSupportedError, EoaSigningMethodNotConfiguredError, OwnersFieldRequiredError, };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type Chain, type HashTypedDataParameters, type Hex, type PublicClient, type TypedData } from 'viem';
|
|
2
|
-
import type { Module } from '../modules/common';
|
|
3
|
-
import type { ResolvedSessionSignerSet } from '../modules/validators/smart-sessions';
|
|
4
|
-
import type { AccountProviderConfig, Call, OwnerSet, RhinestoneConfig, SignerSet } from '../types';
|
|
5
|
-
import { AccountConfigurationNotSupportedError, AccountError, Eip712DomainNotAvailableError, Eip7702AccountMustHaveEoaError, Eip7702NotSupportedForAccountError, EoaAccountMustHaveAccountError, EoaSigningMethodNotConfiguredError, EoaSigningNotSupportedError, ExistingEip7702AccountsNotSupportedError, FactoryArgsNotAvailableError, isAccountError, ModuleInstallationNotSupportedError, OwnersFieldRequiredError, SigningNotSupportedForAccountError, SmartSessionsNotEnabledError, WalletClientNoConnectedAccountError } from './error';
|
|
6
|
-
import { type ValidatorConfig } from './utils';
|
|
2
|
+
import type { Module } from '../modules/common.js';
|
|
3
|
+
import type { ResolvedSessionSignerSet } from '../modules/validators/smart-sessions.js';
|
|
4
|
+
import type { AccountProviderConfig, Call, OwnerSet, RhinestoneConfig, SignerSet } from '../types.js';
|
|
5
|
+
import { AccountConfigurationNotSupportedError, AccountError, Eip712DomainNotAvailableError, Eip7702AccountMustHaveEoaError, Eip7702NotSupportedForAccountError, EoaAccountMustHaveAccountError, EoaSigningMethodNotConfiguredError, EoaSigningNotSupportedError, ExistingEip7702AccountsNotSupportedError, FactoryArgsNotAvailableError, isAccountError, ModuleInstallationNotSupportedError, OwnersFieldRequiredError, SigningNotSupportedForAccountError, SmartSessionsNotEnabledError, WalletClientNoConnectedAccountError } from './error.js';
|
|
6
|
+
import { type ValidatorConfig } from './utils.js';
|
|
7
7
|
type InternalSignerSet = SignerSet | ResolvedSessionSignerSet;
|
|
8
8
|
declare function getInitCode(config: RhinestoneConfig): {
|
|
9
9
|
address: import("viem").Address;
|