@rhinestone/sdk 1.5.1 → 2.0.0-beta.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.
- package/README.md +1 -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.d.ts.map +1 -1
- package/dist/src/accounts/json-rpc/providers.js +7 -9
- 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 +2 -2
- 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 +1 -1
- package/dist/src/auth/provider.js +1 -4
- package/dist/src/errors/index.d.ts +4 -4
- package/dist/src/errors/index.d.ts.map +1 -1
- package/dist/src/errors/index.js +12 -54
- package/dist/src/execution/compact.d.ts +1 -144
- package/dist/src/execution/compact.d.ts.map +1 -1
- package/dist/src/execution/compact.js +1 -117
- package/dist/src/execution/error.d.ts +10 -1
- package/dist/src/execution/error.d.ts.map +1 -1
- package/dist/src/execution/error.js +9 -11
- package/dist/src/execution/index.d.ts +10 -11
- package/dist/src/execution/index.d.ts.map +1 -1
- package/dist/src/execution/index.js +64 -75
- package/dist/src/execution/permit2.d.ts +2 -138
- package/dist/src/execution/permit2.d.ts.map +1 -1
- package/dist/src/execution/permit2.js +5 -239
- package/dist/src/execution/utils.d.ts +31 -15
- package/dist/src/execution/utils.d.ts.map +1 -1
- package/dist/src/execution/utils.js +283 -256
- package/dist/src/index.d.ts +15 -14
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +57 -68
- package/dist/src/jwt-server/digest.js +3 -6
- package/dist/src/jwt-server/express.d.ts +1 -1
- package/dist/src/jwt-server/express.d.ts.map +1 -1
- package/dist/src/jwt-server/express.js +6 -7
- package/dist/src/jwt-server/handlers.d.ts +1 -1
- package/dist/src/jwt-server/handlers.js +7 -11
- package/dist/src/jwt-server/index.d.ts +7 -7
- package/dist/src/jwt-server/index.js +6 -17
- package/dist/src/jwt-server/jcs.js +1 -4
- package/dist/src/jwt-server/signer.d.ts +1 -1
- package/dist/src/jwt-server/signer.js +10 -13
- package/dist/src/jwt-server/sponsorship.js +2 -7
- package/dist/src/jwt-server/web.d.ts +1 -1
- package/dist/src/jwt-server/web.js +5 -9
- 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 +3 -3
- package/dist/src/modules/validators/smart-sessions.js +65 -94
- package/dist/src/orchestrator/caip2.d.ts +7 -0
- package/dist/src/orchestrator/caip2.d.ts.map +1 -0
- package/dist/src/orchestrator/caip2.js +17 -0
- package/dist/src/orchestrator/client.d.ts +12 -12
- package/dist/src/orchestrator/client.d.ts.map +1 -1
- package/dist/src/orchestrator/client.js +199 -305
- package/dist/src/orchestrator/consts.d.ts +2 -2
- package/dist/src/orchestrator/consts.d.ts.map +1 -1
- package/dist/src/orchestrator/consts.js +3 -9
- package/dist/src/orchestrator/error.d.ts +72 -217
- package/dist/src/orchestrator/error.d.ts.map +1 -1
- package/dist/src/orchestrator/error.js +117 -227
- package/dist/src/orchestrator/index.d.ts +9 -9
- package/dist/src/orchestrator/index.d.ts.map +1 -1
- package/dist/src/orchestrator/index.js +7 -56
- package/dist/src/orchestrator/registry.d.ts +2 -2
- package/dist/src/orchestrator/registry.js +19 -33
- package/dist/src/orchestrator/types.d.ts +97 -232
- 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 +5 -7
- 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 +15 -98
- package/dist/src/execution/singleChainOps.d.ts +0 -41
- package/dist/src/execution/singleChainOps.d.ts.map +0 -1
- package/dist/src/execution/singleChainOps.js +0 -44
- package/dist/src/execution/types.d.ts +0 -36
- package/dist/src/execution/types.d.ts.map +0 -1
- package/dist/src/execution/types.js +0 -2
package/README.md
CHANGED
|
@@ -162,7 +162,7 @@ For a complete walkthrough, see the [Quickstart guide](https://docs.rhinestone.d
|
|
|
162
162
|
|
|
163
163
|
## Migrating from Orchestrator SDK
|
|
164
164
|
|
|
165
|
-
To migrate from the [Orchestrator SDK](https://github.com/rhinestonewtf/orchestrator-sdk), replace all imports of `@rhinestone/orchestrator-sdk` with `@rhinestone/sdk
|
|
165
|
+
To migrate from the [Orchestrator SDK](https://github.com/rhinestonewtf/orchestrator-sdk), replace all imports of `@rhinestone/orchestrator-sdk` with `@rhinestone/sdk`.
|
|
166
166
|
|
|
167
167
|
Let us know if you encounter any issues!
|
|
168
168
|
|
|
@@ -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;
|