@rhinestone/sdk 2.0.0 → 2.2.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/dist/src/accounts/adapters/hca.d.ts.map +1 -1
- package/dist/src/accounts/adapters/hca.js +4 -1
- package/dist/src/actions/ecdsa.d.ts +1 -1
- package/dist/src/actions/ecdsa.d.ts.map +1 -1
- package/dist/src/actions/ecdsa.js +4 -57
- package/dist/src/actions/ownable.d.ts +6 -0
- package/dist/src/actions/ownable.d.ts.map +1 -0
- package/dist/src/actions/ownable.js +63 -0
- package/dist/src/actions/passkeys.d.ts.map +1 -1
- package/dist/src/actions/passkeys.js +4 -64
- package/dist/src/actions/recovery.d.ts +67 -0
- package/dist/src/actions/recovery.d.ts.map +1 -0
- package/dist/src/actions/recovery.js +134 -0
- package/dist/src/actions/runtime.d.ts +5 -0
- package/dist/src/actions/runtime.d.ts.map +1 -1
- package/dist/src/actions/runtime.js +25 -1
- package/dist/src/actions/webauthn.d.ts +6 -0
- package/dist/src/actions/webauthn.d.ts.map +1 -0
- package/dist/src/actions/webauthn.js +67 -0
- package/dist/src/api/account.d.ts.map +1 -1
- package/dist/src/api/account.js +8 -2
- package/dist/src/api/compose.d.ts.map +1 -1
- package/dist/src/api/compose.js +6 -0
- package/dist/src/api/signer-selection.d.ts +13 -0
- package/dist/src/api/signer-selection.d.ts.map +1 -1
- package/dist/src/api/signer-selection.js +50 -0
- package/dist/src/clients/orchestrator/auth.d.ts +2 -1
- package/dist/src/clients/orchestrator/auth.d.ts.map +1 -1
- package/dist/src/clients/orchestrator/client.d.ts.map +1 -1
- package/dist/src/clients/orchestrator/client.js +1 -1
- package/dist/src/clients/orchestrator/public.d.ts +31 -6
- package/dist/src/clients/orchestrator/public.d.ts.map +1 -1
- package/dist/src/clients/orchestrator/types.d.ts +2 -2
- package/dist/src/clients/orchestrator/types.d.ts.map +1 -1
- package/dist/src/config/account.d.ts +32 -7
- package/dist/src/config/account.d.ts.map +1 -1
- package/dist/src/config/input.d.ts +7 -1
- package/dist/src/config/input.d.ts.map +1 -1
- package/dist/src/config/resolve.d.ts.map +1 -1
- package/dist/src/config/resolve.js +27 -1
- package/dist/src/config/resolved.d.ts +2 -1
- package/dist/src/config/resolved.d.ts.map +1 -1
- package/dist/src/errors/execution.d.ts +8 -1
- package/dist/src/errors/execution.d.ts.map +1 -1
- package/dist/src/errors/execution.js +9 -1
- package/dist/src/errors/index.d.ts +2 -2
- package/dist/src/errors/index.d.ts.map +1 -1
- package/dist/src/errors/index.js +2 -2
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/modules/read-core.d.ts +23 -0
- package/dist/src/modules/read-core.d.ts.map +1 -1
- package/dist/src/modules/read-core.js +58 -1
- package/dist/src/modules/validators/social-recovery.d.ts +16 -0
- package/dist/src/modules/validators/social-recovery.d.ts.map +1 -0
- package/dist/src/modules/validators/social-recovery.js +17 -0
- package/dist/src/transactions/intents/compatibility.d.ts +2 -1
- package/dist/src/transactions/intents/compatibility.d.ts.map +1 -1
- package/dist/src/transactions/intents/compatibility.js +3 -0
- package/dist/src/transactions/intents/types.d.ts +3 -2
- package/dist/src/transactions/intents/types.d.ts.map +1 -1
- package/package.json +5 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { defineValidator } from '../modules/validators/definition.js';
|
|
2
|
+
import { resolveSocialRecoveryValidator } from '../modules/validators/social-recovery.js';
|
|
2
3
|
import { currentV2Defaults, standaloneDefaults, } from './defaults.js';
|
|
3
4
|
const emptyHeaders = Object.freeze({});
|
|
4
5
|
function selectValue(value, profile) {
|
|
@@ -25,6 +26,28 @@ function configureModules(modules) {
|
|
|
25
26
|
additionalContext: selectModuleData(module.additionalContext),
|
|
26
27
|
}));
|
|
27
28
|
}
|
|
29
|
+
function configureRecovery(recovery) {
|
|
30
|
+
if (!recovery)
|
|
31
|
+
return [];
|
|
32
|
+
const module = resolveSocialRecoveryValidator({
|
|
33
|
+
guardians: recovery.guardians.map((guardian) => guardian.address),
|
|
34
|
+
...(recovery.threshold === undefined
|
|
35
|
+
? {}
|
|
36
|
+
: { threshold: recovery.threshold }),
|
|
37
|
+
});
|
|
38
|
+
return [
|
|
39
|
+
{
|
|
40
|
+
kind: module.kind,
|
|
41
|
+
address: module.address,
|
|
42
|
+
initData: { source: 'explicit', value: module.initData },
|
|
43
|
+
deInitData: { source: 'explicit', value: module.deInitData },
|
|
44
|
+
additionalContext: {
|
|
45
|
+
source: 'explicit',
|
|
46
|
+
value: module.additionalContext,
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
];
|
|
50
|
+
}
|
|
28
51
|
function resolveAuth(input) {
|
|
29
52
|
let auth;
|
|
30
53
|
if ('auth' in input && input.auth) {
|
|
@@ -111,7 +134,10 @@ function resolveAccountWithDefaults(input, defaults, environment) {
|
|
|
111
134
|
account: resolveAccountDefinition(input.account, defaults),
|
|
112
135
|
...(input.owners ? { owners: defineValidator(input.owners) } : {}),
|
|
113
136
|
...(input.eoa ? { eoa: input.eoa } : {}),
|
|
114
|
-
modules:
|
|
137
|
+
modules: [
|
|
138
|
+
...configureRecovery(input.recovery),
|
|
139
|
+
...configureModules(input.modules),
|
|
140
|
+
],
|
|
115
141
|
...(input.initData ? { initData: input.initData } : {}),
|
|
116
142
|
sessions: resolveSessions(input.sessions, environment),
|
|
117
143
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Account, Address } from 'viem';
|
|
2
2
|
import type { AccountDefinition, AccountInitData } from '../accounts/types.js';
|
|
3
|
+
import type { SerializedIntentInput } from '../clients/orchestrator/public.js';
|
|
3
4
|
import type { ConfiguredModule } from '../modules/types.js';
|
|
4
5
|
import type { ResolvedValidatorDefinition } from '../modules/validators/types.js';
|
|
5
6
|
export type ConfigProfileId = 'current-v2' | 'legacy-v0';
|
|
@@ -9,7 +10,7 @@ export type ResolvedAuth = {
|
|
|
9
10
|
} | {
|
|
10
11
|
readonly kind: 'jwt';
|
|
11
12
|
readonly accessToken: string | (() => Promise<string>);
|
|
12
|
-
readonly getIntentExtensionToken?: (intentInput:
|
|
13
|
+
readonly getIntentExtensionToken?: (intentInput: SerializedIntentInput) => Promise<string>;
|
|
13
14
|
};
|
|
14
15
|
export type ResolvedProvider = {
|
|
15
16
|
readonly kind: 'public';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolved.d.ts","sourceRoot":"","sources":["../../../config/resolved.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAC5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAC3E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAA;AAE9E,MAAM,MAAM,eAAe,GAAG,YAAY,GAAG,WAAW,CAAA;AAExD,MAAM,MAAM,YAAY,GACpB;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACrD;IACE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAA;IACpB,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,CAAC,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC,CAAA;IACtD,QAAQ,CAAC,uBAAuB,CAAC,EAAE,CACjC,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"resolved.d.ts","sourceRoot":"","sources":["../../../config/resolved.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAC5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAC3E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAA;AAC3E,OAAO,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AAA;CACnD;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAA;IACjC,QAAQ,CAAC,OAAO,EAAE,iBAAiB,CAAA;IACnC,QAAQ,CAAC,MAAM,CAAC,EAAE,2BAA2B,CAAA;IAC7C,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,OAAO,EAAE,SAAS,gBAAgB,EAAE,CAAA;IAC7C,QAAQ,CAAC,QAAQ,CAAC,EAAE,eAAe,CAAA;IACnC,QAAQ,CAAC,QAAQ,EAAE,2BAA2B,CAAA;CAC/C;AAED,MAAM,MAAM,qBAAqB,GAC7B,QAAQ,GACR,aAAa,GACb,OAAO,GACP,eAAe,GACf,wBAAwB,GACxB,gBAAgB,GAChB,qBAAqB,GACrB,aAAa,GACb,iBAAiB,GACjB,qBAAqB,GACrB,cAAc,GACd,iBAAiB,GACjB,eAAe,GACf,wBAAwB,GACxB,qBAAqB,GACrB,uBAAuB,GACvB,qBAAqB,GACrB,oBAAoB,GACpB,aAAa,GACb,eAAe,GACf,YAAY,GACZ,gBAAgB,GAChB,eAAe,GACf,qBAAqB,GACrB,oBAAoB,GACpB,qBAAqB,GACrB,WAAW,CAAA;AAEf,MAAM,WAAW,wBAAwB,CAAC,mBAAmB,GAAG,OAAO;IACrE,QAAQ,CAAC,MAAM,EAAE,qBAAqB,CAAA;IACtC,QAAQ,CAAC,GAAG,EAAE,iBAAiB,CAAA;IAC/B,QAAQ,CAAC,OAAO,EAAE,qBAAqB,CAAA;IACvC,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB,CAAA;CAClD"}
|
|
@@ -15,6 +15,13 @@ declare class ExecutionError extends Error {
|
|
|
15
15
|
get errorType(): string;
|
|
16
16
|
get traceId(): string;
|
|
17
17
|
}
|
|
18
|
+
declare class SignerNotSupportedError extends ExecutionError {
|
|
19
|
+
constructor(params?: {
|
|
20
|
+
context?: any;
|
|
21
|
+
errorType?: string;
|
|
22
|
+
traceId?: string;
|
|
23
|
+
});
|
|
24
|
+
}
|
|
18
25
|
declare class OrderPathRequiredForIntentsError extends ExecutionError {
|
|
19
26
|
constructor(params?: {
|
|
20
27
|
context?: any;
|
|
@@ -98,5 +105,5 @@ declare class IndependentSigningNotSupportedError extends ExecutionError {
|
|
|
98
105
|
});
|
|
99
106
|
}
|
|
100
107
|
declare function isExecutionError(error: Error): error is ExecutionError;
|
|
101
|
-
export { isExecutionError, ExecutionError, Eip7702InitSignatureRequiredError, IndependentSigningNotSupportedError, InsufficientOwnerSignaturesError, IntentFailedError, InvalidOwnerSigningOptionsError, InvalidSourceCallsError, MismatchedOwnerSignaturesError, OrderPathRequiredForIntentsError, QuoteNotInPreparedTransactionError, UnknownOwnerError, };
|
|
108
|
+
export { isExecutionError, ExecutionError, Eip7702InitSignatureRequiredError, IndependentSigningNotSupportedError, InsufficientOwnerSignaturesError, IntentFailedError, InvalidOwnerSigningOptionsError, InvalidSourceCallsError, MismatchedOwnerSignaturesError, OrderPathRequiredForIntentsError, QuoteNotInPreparedTransactionError, SignerNotSupportedError, UnknownOwnerError, };
|
|
102
109
|
//# sourceMappingURL=execution.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution.d.ts","sourceRoot":"","sources":["../../../errors/execution.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAE/B,cAAM,cAAe,SAAQ,KAAK;IAChC,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;Q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CAAC,EAAE;QACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,WAAW,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;QAC1B,OAAO,CAAC,EAAE,GAAG,CAAA;QACb,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,OAAO,CAAC,EAAE,MAAM,CAAA;KACjB;CAkBF;AAED,cAAM,+BAAgC,SAAQ,cAAc;gBAC9C,MAAM,CAAC,EAAE;QACnB,OAAO,CAAC,EAAE,GAAG,CAAA;QACb,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,OAAO,CAAC,EAAE,MAAM,CAAA;KACjB;CAOF;AAED,cAAM,mCAAoC,SAAQ,cAAc;gBAClD,MAAM,CAAC,EAAE;QACnB,OAAO,CAAC,EAAE,GAAG,CAAA;QACb,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,OAAO,CAAC,EAAE,MAAM,CAAA;KACjB;CAOF;AAED,iBAAS,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,cAAc,CAE/D;AAED,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,iCAAiC,EACjC,mCAAmC,EACnC,gCAAgC,EAChC,iBAAiB,EACjB,+BAA+B,EAC/B,uBAAuB,EACvB,8BAA8B,EAC9B,gCAAgC,EAChC,kCAAkC,EAClC,uBAAuB,EACvB,iBAAiB,GAClB,CAAA"}
|
|
@@ -23,6 +23,14 @@ class ExecutionError extends Error {
|
|
|
23
23
|
return this._traceId;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
+
class SignerNotSupportedError extends ExecutionError {
|
|
27
|
+
constructor(params) {
|
|
28
|
+
super({
|
|
29
|
+
message: 'Sending a transaction is not supported for this type of signers. Use user operations instead.',
|
|
30
|
+
...params,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
26
34
|
class OrderPathRequiredForIntentsError extends ExecutionError {
|
|
27
35
|
constructor(params) {
|
|
28
36
|
super({
|
|
@@ -120,4 +128,4 @@ class IndependentSigningNotSupportedError extends ExecutionError {
|
|
|
120
128
|
function isExecutionError(error) {
|
|
121
129
|
return error instanceof ExecutionError;
|
|
122
130
|
}
|
|
123
|
-
export { isExecutionError, ExecutionError, Eip7702InitSignatureRequiredError, IndependentSigningNotSupportedError, InsufficientOwnerSignaturesError, IntentFailedError, InvalidOwnerSigningOptionsError, InvalidSourceCallsError, MismatchedOwnerSignaturesError, OrderPathRequiredForIntentsError, QuoteNotInPreparedTransactionError, UnknownOwnerError, };
|
|
131
|
+
export { isExecutionError, ExecutionError, Eip7702InitSignatureRequiredError, IndependentSigningNotSupportedError, InsufficientOwnerSignaturesError, IntentFailedError, InvalidOwnerSigningOptionsError, InvalidSourceCallsError, MismatchedOwnerSignaturesError, OrderPathRequiredForIntentsError, QuoteNotInPreparedTransactionError, SignerNotSupportedError, UnknownOwnerError, };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AccountConfigurationNotSupportedError, AccountError, DefaultValidatorAlreadyInitializedError, Eip712DomainNotAvailableError, Eip7702AccountMustHaveEoaError, Eip7702NotSupportedForAccountError, EoaAccountMustHaveAccountError, EoaSigningMethodNotConfiguredError, EoaSigningNotSupportedError, FactoryArgsNotAvailableError, isAccountError, ModuleInstallationNotSupportedError, OwnersFieldRequiredError, SigningNotSupportedForAccountError, WalletClientNoConnectedAccountError } from '../accounts/error.js';
|
|
2
2
|
import { UnsupportedChainError, UnsupportedTokenError } from '../chains/errors.js';
|
|
3
3
|
import { ConflictError, type ErrorDetail, ExternalServiceTimeoutError, ForbiddenError, InsufficientLiquidityError, InsufficientSponsorBalanceError, InternalServerError, isAuthError, isInsufficientSponsorBalance, isOrchestratorError, isRateLimited, isRetryable, isSimulationFailed, isSponsorError, isSponsorLimitExceeded, isValidationError, KeyScopeDeniedError, NotFoundError, OrchestratorError, RateLimitedError, RelayerMarketUnavailableError, SettlementExecutionError, SettlementQuoteError, SimulationFailedError, SponsorLimitExceededError, type SponsorLimitKey, UnauthorizedError, UnprocessableContentError, ValidationError } from '../clients/orchestrator/errors.js';
|
|
4
|
-
import { Eip7702InitSignatureRequiredError, ExecutionError, IndependentSigningNotSupportedError, InsufficientOwnerSignaturesError, IntentFailedError, InvalidOwnerSigningOptionsError, InvalidSourceCallsError, isExecutionError, MismatchedOwnerSignaturesError, OrderPathRequiredForIntentsError, QuoteNotInPreparedTransactionError, UnknownOwnerError } from './execution.js';
|
|
4
|
+
import { Eip7702InitSignatureRequiredError, ExecutionError, IndependentSigningNotSupportedError, InsufficientOwnerSignaturesError, IntentFailedError, InvalidOwnerSigningOptionsError, InvalidSourceCallsError, isExecutionError, MismatchedOwnerSignaturesError, OrderPathRequiredForIntentsError, QuoteNotInPreparedTransactionError, SignerNotSupportedError, UnknownOwnerError } from './execution.js';
|
|
5
5
|
export type { ErrorDetail, SponsorLimitKey };
|
|
6
|
-
export { isAccountError, AccountError, AccountConfigurationNotSupportedError, DefaultValidatorAlreadyInitializedError, Eip712DomainNotAvailableError, Eip7702AccountMustHaveEoaError, Eip7702NotSupportedForAccountError, EoaAccountMustHaveAccountError, EoaSigningMethodNotConfiguredError, EoaSigningNotSupportedError, FactoryArgsNotAvailableError, ModuleInstallationNotSupportedError, OwnersFieldRequiredError, SigningNotSupportedForAccountError, WalletClientNoConnectedAccountError, isExecutionError, ExecutionError, Eip7702InitSignatureRequiredError, IndependentSigningNotSupportedError, InsufficientOwnerSignaturesError, IntentFailedError, InvalidOwnerSigningOptionsError, InvalidSourceCallsError, MismatchedOwnerSignaturesError, OrderPathRequiredForIntentsError, QuoteNotInPreparedTransactionError, UnknownOwnerError, isOrchestratorError, isRetryable, isAuthError, isValidationError, isRateLimited, isSimulationFailed, isSponsorLimitExceeded, isInsufficientSponsorBalance, isSponsorError, ConflictError, ExternalServiceTimeoutError, ForbiddenError, InsufficientLiquidityError, InsufficientSponsorBalanceError, InternalServerError, KeyScopeDeniedError, NotFoundError, OrchestratorError, RateLimitedError, RelayerMarketUnavailableError, SimulationFailedError, SettlementExecutionError, SettlementQuoteError, SponsorLimitExceededError, UnauthorizedError, UnprocessableContentError, ValidationError, UnsupportedChainError, UnsupportedTokenError, };
|
|
6
|
+
export { isAccountError, AccountError, AccountConfigurationNotSupportedError, DefaultValidatorAlreadyInitializedError, Eip712DomainNotAvailableError, Eip7702AccountMustHaveEoaError, Eip7702NotSupportedForAccountError, EoaAccountMustHaveAccountError, EoaSigningMethodNotConfiguredError, EoaSigningNotSupportedError, FactoryArgsNotAvailableError, ModuleInstallationNotSupportedError, OwnersFieldRequiredError, SigningNotSupportedForAccountError, WalletClientNoConnectedAccountError, isExecutionError, ExecutionError, Eip7702InitSignatureRequiredError, IndependentSigningNotSupportedError, InsufficientOwnerSignaturesError, IntentFailedError, InvalidOwnerSigningOptionsError, InvalidSourceCallsError, MismatchedOwnerSignaturesError, OrderPathRequiredForIntentsError, QuoteNotInPreparedTransactionError, SignerNotSupportedError, UnknownOwnerError, isOrchestratorError, isRetryable, isAuthError, isValidationError, isRateLimited, isSimulationFailed, isSponsorLimitExceeded, isInsufficientSponsorBalance, isSponsorError, ConflictError, ExternalServiceTimeoutError, ForbiddenError, InsufficientLiquidityError, InsufficientSponsorBalanceError, InternalServerError, KeyScopeDeniedError, NotFoundError, OrchestratorError, RateLimitedError, RelayerMarketUnavailableError, SimulationFailedError, SettlementExecutionError, SettlementQuoteError, SponsorLimitExceededError, UnauthorizedError, UnprocessableContentError, ValidationError, UnsupportedChainError, UnsupportedTokenError, };
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../errors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qCAAqC,EACrC,YAAY,EACZ,uCAAuC,EACvC,6BAA6B,EAC7B,8BAA8B,EAC9B,kCAAkC,EAClC,8BAA8B,EAC9B,kCAAkC,EAClC,2BAA2B,EAC3B,4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C9B,gCAAgC,EAChC,kCAAkC,EAClC,iBAAiB,EAEjB,mBAAmB,EACnB,WAAW,EACX,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,kBAAkB,EAClB,sBAAsB,EACtB,4BAA4B,EAC5B,cAAc,EACd,aAAa,EACb,2BAA2B,EAC3B,cAAc,EACd,0BAA0B,EAC1B,+BAA+B,EAC/B,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,6BAA6B,EAC7B,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,EACpB,yBAAyB,EACzB,iBAAiB,EACjB,yBAAyB,EACzB,eAAe,EAEf,qBAAqB,EACrB,qBAAqB,GACtB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../errors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qCAAqC,EACrC,YAAY,EACZ,uCAAuC,EACvC,6BAA6B,EAC7B,8BAA8B,EAC9B,kCAAkC,EAClC,8BAA8B,EAC9B,kCAAkC,EAClC,2BAA2B,EAC3B,4BAA4B,EAC5B,cAAc,EACd,mCAAmC,EACnC,wBAAwB,EACxB,kCAAkC,EAClC,mCAAmC,EACpC,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAA;AAC/E,OAAO,EACL,aAAa,EACb,KAAK,WAAW,EAChB,2BAA2B,EAC3B,cAAc,EACd,0BAA0B,EAC1B,+BAA+B,EAC/B,mBAAmB,EACnB,WAAW,EACX,4BAA4B,EAC5B,mBAAmB,EACnB,aAAa,EACb,WAAW,EACX,kBAAkB,EAClB,cAAc,EACd,sBAAsB,EACtB,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,6BAA6B,EAC7B,wBAAwB,EACxB,oBAAoB,EACpB,qBAAqB,EACrB,yBAAyB,EACzB,KAAK,eAAe,EACp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ountConfigurationNotSupportedError, AccountError, DefaultValidatorAlreadyInitializedError, Eip712DomainNotAvailableError, Eip7702AccountMustHaveEoaError, Eip7702NotSupportedForAccountError, EoaAccountMustHaveAccountError, EoaSigningMethodNotConfiguredError, EoaSigningNotSupportedError, FactoryArgsNotAvailableError, isAccountError, ModuleInstallationNotSupportedError, OwnersFieldRequiredError, SigningNotSupportedForAccountError, WalletClientNoConnectedAccountError, } from '../accounts/error.js';
|
|
2
2
|
import { UnsupportedChainError, UnsupportedTokenError } from '../chains/errors.js';
|
|
3
3
|
import { ConflictError, ExternalServiceTimeoutError, ForbiddenError, InsufficientLiquidityError, InsufficientSponsorBalanceError, InternalServerError, isAuthError, isInsufficientSponsorBalance, isOrchestratorError, isRateLimited, isRetryable, isSimulationFailed, isSponsorError, isSponsorLimitExceeded, isValidationError, KeyScopeDeniedError, NotFoundError, OrchestratorError, RateLimitedError, RelayerMarketUnavailableError, SettlementExecutionError, SettlementQuoteError, SimulationFailedError, SponsorLimitExceededError, UnauthorizedError, UnprocessableContentError, ValidationError, } from '../clients/orchestrator/errors.js';
|
|
4
|
-
import { Eip7702InitSignatureRequiredError, ExecutionError, IndependentSigningNotSupportedError, InsufficientOwnerSignaturesError, IntentFailedError, InvalidOwnerSigningOptionsError, InvalidSourceCallsError, isExecutionError, MismatchedOwnerSignaturesError, OrderPathRequiredForIntentsError, QuoteNotInPreparedTransactionError, UnknownOwnerError, } from './execution.js';
|
|
4
|
+
import { Eip7702InitSignatureRequiredError, ExecutionError, IndependentSigningNotSupportedError, InsufficientOwnerSignaturesError, IntentFailedError, InvalidOwnerSigningOptionsError, InvalidSourceCallsError, isExecutionError, MismatchedOwnerSignaturesError, OrderPathRequiredForIntentsError, QuoteNotInPreparedTransactionError, SignerNotSupportedError, UnknownOwnerError, } from './execution.js';
|
|
5
5
|
export {
|
|
6
6
|
// Account
|
|
7
7
|
isAccountError, AccountError, AccountConfigurationNotSupportedError, DefaultValidatorAlreadyInitializedError, Eip712DomainNotAvailableError, Eip7702AccountMustHaveEoaError, Eip7702NotSupportedForAccountError, EoaAccountMustHaveAccountError, EoaSigningMethodNotConfiguredError, EoaSigningNotSupportedError, FactoryArgsNotAvailableError, ModuleInstallationNotSupportedError, OwnersFieldRequiredError, SigningNotSupportedForAccountError, WalletClientNoConnectedAccountError,
|
|
8
8
|
// Execution
|
|
9
|
-
isExecutionError, ExecutionError, Eip7702InitSignatureRequiredError, IndependentSigningNotSupportedError, InsufficientOwnerSignaturesError, IntentFailedError, InvalidOwnerSigningOptionsError, InvalidSourceCallsError, MismatchedOwnerSignaturesError, OrderPathRequiredForIntentsError, QuoteNotInPreparedTransactionError, UnknownOwnerError,
|
|
9
|
+
isExecutionError, ExecutionError, Eip7702InitSignatureRequiredError, IndependentSigningNotSupportedError, InsufficientOwnerSignaturesError, IntentFailedError, InvalidOwnerSigningOptionsError, InvalidSourceCallsError, MismatchedOwnerSignaturesError, OrderPathRequiredForIntentsError, QuoteNotInPreparedTransactionError, SignerNotSupportedError, UnknownOwnerError,
|
|
10
10
|
// Orchestrator
|
|
11
11
|
isOrchestratorError, isRetryable, isAuthError, isValidationError, isRateLimited, isSimulationFailed, isSponsorLimitExceeded, isInsufficientSponsorBalance, isSponsorError, ConflictError, ExternalServiceTimeoutError, ForbiddenError, InsufficientLiquidityError, InsufficientSponsorBalanceError, InternalServerError, KeyScopeDeniedError, NotFoundError, OrchestratorError, RateLimitedError, RelayerMarketUnavailableError, SimulationFailedError, SettlementExecutionError, SettlementQuoteError, SponsorLimitExceededError, UnauthorizedError, UnprocessableContentError, ValidationError,
|
|
12
12
|
// Registry (SDK-local validation)
|
package/dist/src/index.d.ts
CHANGED
|
@@ -7,8 +7,8 @@ import { WEBAUTHN_VALIDATOR_ADDRESS } from './modules/validators/webauthn.js';
|
|
|
7
7
|
export { RhinestoneSDK, hyperCoreMainnet, solanaMainnet, tronMainnet, OWNABLE_VALIDATOR_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS, MULTI_FACTOR_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, };
|
|
8
8
|
export type { RhinestoneAccount, SignedIntentData } from './api/account.js';
|
|
9
9
|
export type { DestinationChain, NonEvmAddress, NonEvmChain, } from './chains/non-evm.js';
|
|
10
|
-
export type { AppFeeBalances, AppFeeRate, ApprovalRequired, AuxiliaryFunds, BridgeFill, ChainOperation, FailureReason, IntentInput, IntentOpStatus, OperationStatus, OriginSignature, Portfolio, ProtocolFeeRate, Quote, SettlementLayer, SettlementLayerFilter, SignData, SplitIntentsInput, SplitIntentsResult, TokenRequirements, WrapRequired, } from './clients/orchestrator/public.js';
|
|
11
|
-
export type { AccountProviderConfig, AccountType, BundlerConfig, Call, CallInput, ChainSessionConfig, CrossChainPermissionInput, CrossChainPermit, CrossChainSettlementLayer, FromLeg, MultiFactorValidatorConfig, NonEvmTokenRequest, NonEvmTokenRequests, OwnableValidatorConfig, OwnerSet, ParamConstraint, PaymasterConfig, Permission, PermissionFunctionConfig, Permit2ClaimPolicy, Policy, ProviderConfig, RhinestoneAccountConfig, Session, SessionDefinition, SignerSet, SourceCallInput, SourceCallProvidedFunds, TokenRequest, TokenSymbol, ToLeg, Transaction, UniversalActionPolicyParamCondition, WebauthnValidatorConfig, } from './config/account.js';
|
|
10
|
+
export type { AppFeeBalances, AppFeeRate, ApprovalRequired, AuxiliaryFunds, BridgeFill, ChainOperation, FailureReason, IntentInput, IntentOpStatus, OperationStatus, OriginSignature, Portfolio, ProtocolFeeRate, Quote, SerializedIntentInput, SettlementLayer, SettlementLayerFilter, SignData, SplitIntentsInput, SplitIntentsResult, TokenRequirements, WrapRequired, } from './clients/orchestrator/public.js';
|
|
11
|
+
export type { AccountProviderConfig, AccountType, BundlerConfig, Call, CallInput, ChainSessionConfig, CrossChainPermissionInput, CrossChainPermit, CrossChainSettlementLayer, FromLeg, GuardiansSignerSet, MultiFactorValidatorConfig, NonEvmTokenRequest, NonEvmTokenRequests, OwnableValidatorConfig, OwnerSet, ParamConstraint, PaymasterConfig, Permission, PermissionFunctionConfig, Permit2ClaimPolicy, Policy, ProviderConfig, Recovery, RhinestoneAccountConfig, Session, SessionDefinition, SignerSet, SourceCallInput, SourceCallProvidedFunds, TokenRequest, TokenSymbol, ToLeg, Transaction, UniversalActionPolicyParamCondition, WebauthnValidatorConfig, } from './config/account.js';
|
|
12
12
|
export type { OwnerPasskeySignature, OwnerSignature, OwnerSignatureData, SignAsOwnerOptions, } from './signing/types.js';
|
|
13
13
|
export type { PreparedQuotes, PreparedTransactionData, QuoteSelection, SignedTransactionData, TransactionResult, } from './transactions/intents/types.js';
|
|
14
14
|
export type { PreparedUserOperationData, SignedUserOperationData, UserOperationResult, } from './transactions/user-operations/types.js';
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC/E,OAAO,EAAE,8BAA8B,EAAE,MAAM,mCAAmC,CAAA;AAClF,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAA;AACxE,OAAO,EAAE,8BAA8B,EAAE,MAAM,4CAA4C,CAAA;AAC3F,OAAO,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAA;AAE1E,OAAO,EACL,aAAa,EAEb,gBAAgB,EAChB,aAAa,EACb,WAAW,EAEX,yBAAyB,EACzB,0BAA0B,EAC1B,8BAA8B,EAC9B,8BAA8B,GAC/B,CAAA;AAED,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AACxE,YAAY,EACV,gBAAgB,EAChB,aAAa,EACb,WAAW,GACZ,MAAM,kBAAkB,CAAA;AACzB,YAAY,EACV,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,cAAc,EACd,aAAa,EACb,WAAW,EACX,cAAc,EACd,eAAe,EACf,eAAe,EACf,SAAS,EACT,eAAe,EACf,KAAK,EACL,eAAe,EACf,qBAAqB,EACrB,QAAQ,EACR,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,YAAY,GACb,MAAM,+BAA+B,CAAA;AACtC,YAAY,EACV,qBAAqB,EACrB,WAAW,EACX,aAAa,EACb,IAAI,EACJ,SAAS,EACT,kBAAkB,EAClB,yBAAyB,EACzB,gBAAgB,EAChB,yBAAyB,EACzB,OAAO,EACP,0BAA0B,EAC1B,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,QAAQ,EACR,eAAe,EACf,eAAe,EACf,UAAU,EACV,wBAAwB,EACxB,kBAAkB,EAClB,MAAM,EACN,cAAc,EACd,uBAAuB,EACvB,OAAO,EACP,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,uBAAuB,EACvB,YAAY,EACZ,WAAW,EACX,KAAK,EACL,WAAW,EACX,mCAAmC,EACnC,uBAAuB,GACxB,MAAM,kBAAkB,CAAA;AACzB,YAAY,EACV,qBAAqB,EACrB,cAAc,EACd,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,iBAAiB,CAAA;AACxB,YAAY,EACV,cAAc,EACd,uBAAuB,EACvB,cAAc,EACd,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,8BAA8B,CAAA;AACrC,YAAY,EACV,yBAAyB,EACzB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,sCAAsC,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC/E,OAAO,EAAE,8BAA8B,EAAE,MAAM,mCAAmC,CAAA;AAClF,OAAO,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BAAqB,EACrB,cAAc,EACd,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,iBAAiB,CAAA;AACxB,YAAY,EACV,cAAc,EACd,uBAAuB,EACvB,cAAc,EACd,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,8BAA8B,CAAA;AACrC,YAAY,EACV,yBAAyB,EACzB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,sCAAsC,CAAA"}
|
|
@@ -15,6 +15,28 @@ export declare function readValidatorInitialized(input: {
|
|
|
15
15
|
readonly account: Address;
|
|
16
16
|
readonly validator: Address;
|
|
17
17
|
}): Promise<boolean>;
|
|
18
|
+
/**
|
|
19
|
+
* Reads an ownable-style validator's owner list and threshold.
|
|
20
|
+
*
|
|
21
|
+
* The owner list is returned in the validator's own linked-list order, which
|
|
22
|
+
* callers need to derive the `prevOwner` argument for removals.
|
|
23
|
+
*/
|
|
24
|
+
export declare function readValidatorOwnership(input: {
|
|
25
|
+
readonly rpc: RpcReadPort;
|
|
26
|
+
readonly chain: EvmChainReference;
|
|
27
|
+
readonly account: Address;
|
|
28
|
+
readonly validator: Address;
|
|
29
|
+
}): Promise<{
|
|
30
|
+
readonly owners: readonly Address[];
|
|
31
|
+
readonly threshold: number;
|
|
32
|
+
}>;
|
|
33
|
+
/** Reads a validator's signature threshold for an account. */
|
|
34
|
+
export declare function readValidatorThreshold(input: {
|
|
35
|
+
readonly rpc: RpcReadPort;
|
|
36
|
+
readonly chain: EvmChainReference;
|
|
37
|
+
readonly account: Address;
|
|
38
|
+
readonly validator: Address;
|
|
39
|
+
}): Promise<number>;
|
|
18
40
|
export declare function readModuleInstallations(input: {
|
|
19
41
|
readonly rpc: RpcReadPort;
|
|
20
42
|
readonly chain: EvmChainReference;
|
|
@@ -26,6 +48,7 @@ export declare function readOwners(input: {
|
|
|
26
48
|
readonly chain: EvmChainReference;
|
|
27
49
|
readonly accountKind: string;
|
|
28
50
|
readonly account: Address;
|
|
51
|
+
readonly ownerValidator?: Address;
|
|
29
52
|
readonly hcaFactory?: Address;
|
|
30
53
|
}): Promise<{
|
|
31
54
|
readonly accounts: readonly Address[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-core.d.ts","sourceRoot":"","sources":["../../../modules/read-core.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAuB,KAAK,GAAG,EAAE,MAAM,MAAM,CAAA;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAEtD,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAyBzD,wBAAsB,oBAAoB,CAAC,KAAK,EAAE;IAChD,QAAQ,CAAC,GAAG,EAAE,WAAW,CAAA;IACzB,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAA;IACjC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,UAAU,EAAE,WAAW,GAAG,UAAU,CAAC,CAAA;CAC7D,GAAG,OAAO,CAAC,SAAS,OAAO,EAAE,CAAC,CAmB9B;AAED,wBAAsB,wBAAwB,CAAC,KAAK,EAAE;IACpD,QAAQ,CAAC,GAAG,EAAE,WAAW,CAAA;IACzB,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAA;IACjC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;CAC5B,GAAG,OAAO,CAAC,OAAO,CAAC,CAkBnB;AAgBD,wBAAsB,uBAAuB,CAAC,KAAK,EAAE;IACnD,QAAQ,CAAC,GAAG,EAAE,WAAW,CAAA;IACzB,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAA;IACjC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACz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EAAE,iBAAiB,CAAA;IACjC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,OAAO,EAAE,SAAS,cAAc,EAAE,CAAA;CAC5C,GAAG,OAAO,CAAC,SAAS,OAAO,EAAE,CAAC,CAiB9B;AAED,wBAAsB,UAAU,CAAC,KAAK,EAAE;IACtC,QAAQ,CAAC,GAAG,EAAE,WAAW,CAAA;IACzB,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAA;IACjC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAA;IACjC,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAC9B,GAAG,OAAO,CAAC;IACV,QAAQ,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,CAAA;IACrC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAC3B,GAAG,IAAI,CAAC,CAmER;AAED,wBAAgB,6BAA6B,CAAC,KAAK,EAAE;IACnD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAA;IAC/B,QAAQ,CAAC,SAAS,EAAE,SAAS,OAAO,EAAE,CAAA;CACvC,GAAG,GAAG,CAkBN"}
|
|
@@ -50,6 +50,63 @@ export async function readValidatorInitialized(input) {
|
|
|
50
50
|
args: [input.account],
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
+
const validatorThresholdAbi = [
|
|
54
|
+
{
|
|
55
|
+
name: 'threshold',
|
|
56
|
+
type: 'function',
|
|
57
|
+
stateMutability: 'view',
|
|
58
|
+
inputs: [{ name: 'account', type: 'address' }],
|
|
59
|
+
outputs: [{ name: '', type: 'uint256' }],
|
|
60
|
+
},
|
|
61
|
+
];
|
|
62
|
+
const validatorOwnersAbi = [
|
|
63
|
+
{
|
|
64
|
+
name: 'getOwners',
|
|
65
|
+
type: 'function',
|
|
66
|
+
stateMutability: 'view',
|
|
67
|
+
inputs: [{ name: 'account', type: 'address' }],
|
|
68
|
+
outputs: [{ name: 'ownersArray', type: 'address[]' }],
|
|
69
|
+
},
|
|
70
|
+
];
|
|
71
|
+
/**
|
|
72
|
+
* Reads an ownable-style validator's owner list and threshold.
|
|
73
|
+
*
|
|
74
|
+
* The owner list is returned in the validator's own linked-list order, which
|
|
75
|
+
* callers need to derive the `prevOwner` argument for removals.
|
|
76
|
+
*/
|
|
77
|
+
export async function readValidatorOwnership(input) {
|
|
78
|
+
const [owners, threshold] = await input.rpc.multicall({ chain: input.chain }, [
|
|
79
|
+
{
|
|
80
|
+
address: input.validator,
|
|
81
|
+
abi: validatorOwnersAbi,
|
|
82
|
+
functionName: 'getOwners',
|
|
83
|
+
args: [input.account],
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
address: input.validator,
|
|
87
|
+
abi: validatorThresholdAbi,
|
|
88
|
+
functionName: 'threshold',
|
|
89
|
+
args: [input.account],
|
|
90
|
+
},
|
|
91
|
+
]);
|
|
92
|
+
if (!owners.result || threshold.result === undefined) {
|
|
93
|
+
throw new Error('Failed to read existing owners or threshold');
|
|
94
|
+
}
|
|
95
|
+
return {
|
|
96
|
+
owners: owners.result.map((owner) => owner.toLowerCase()),
|
|
97
|
+
threshold: Number(threshold.result),
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
/** Reads a validator's signature threshold for an account. */
|
|
101
|
+
export async function readValidatorThreshold(input) {
|
|
102
|
+
const threshold = await input.rpc.readContract({ chain: input.chain }, {
|
|
103
|
+
address: input.validator,
|
|
104
|
+
abi: validatorThresholdAbi,
|
|
105
|
+
functionName: 'threshold',
|
|
106
|
+
args: [input.account],
|
|
107
|
+
});
|
|
108
|
+
return Number(threshold);
|
|
109
|
+
}
|
|
53
110
|
const moduleInstalledAbi = [
|
|
54
111
|
{
|
|
55
112
|
type: 'function',
|
|
@@ -77,7 +134,7 @@ export async function readModuleInstallations(input) {
|
|
|
77
134
|
return results.map(({ result }) => result === true);
|
|
78
135
|
}
|
|
79
136
|
export async function readOwners(input) {
|
|
80
|
-
let validator = OWNABLE_VALIDATOR_ADDRESS;
|
|
137
|
+
let validator = input.ownerValidator ?? OWNABLE_VALIDATOR_ADDRESS;
|
|
81
138
|
if (input.accountKind === 'hca') {
|
|
82
139
|
validator = input.hcaFactory
|
|
83
140
|
? await input.rpc.readContract({ chain: input.chain }, {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Address } from 'viem';
|
|
2
|
+
import type { ResolvedModule } from '../types.js';
|
|
3
|
+
export declare const SOCIAL_RECOVERY_VALIDATOR_ADDRESS: Address;
|
|
4
|
+
/**
|
|
5
|
+
* Resolves the social recovery validator module.
|
|
6
|
+
*
|
|
7
|
+
* The module shares the ownable validator's `(threshold, address[])` init
|
|
8
|
+
* encoding and its concatenated-ECDSA signature format, so it resolves through
|
|
9
|
+
* the same encoder at a different address. `onInstall` requires the guardian
|
|
10
|
+
* list to be sorted and unique, which `resolveOwnableAddresses` guarantees.
|
|
11
|
+
*/
|
|
12
|
+
export declare function resolveSocialRecoveryValidator(input: {
|
|
13
|
+
readonly guardians: readonly Address[];
|
|
14
|
+
readonly threshold?: number;
|
|
15
|
+
}): ResolvedModule;
|
|
16
|
+
//# sourceMappingURL=social-recovery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"social-recovery.d.ts","sourceRoot":"","sources":["../../../../modules/validators/social-recovery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AACnC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAG9C,eAAO,MAAM,iCAAiC,EAAE,OACF,CAAA;AAE9C;;;;;;;GAOG;AACH,wBAAgB,8BAA8B,CAAC,KAAK,EAAE;IACpD,QAAQ,CAAC,SAAS,EAAE,SAAS,OAAO,EAAE,CAAA;IACtC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC5B,GAAG,cAAc,CAMjB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { resolveOwnableAddresses } from './ownable.js';
|
|
2
|
+
export const SOCIAL_RECOVERY_VALIDATOR_ADDRESS = '0xa04d053b3c8021e8d5bf641816c42daa75d8b597';
|
|
3
|
+
/**
|
|
4
|
+
* Resolves the social recovery validator module.
|
|
5
|
+
*
|
|
6
|
+
* The module shares the ownable validator's `(threshold, address[])` init
|
|
7
|
+
* encoding and its concatenated-ECDSA signature format, so it resolves through
|
|
8
|
+
* the same encoder at a different address. `onInstall` requires the guardian
|
|
9
|
+
* list to be sorted and unique, which `resolveOwnableAddresses` guarantees.
|
|
10
|
+
*/
|
|
11
|
+
export function resolveSocialRecoveryValidator(input) {
|
|
12
|
+
return resolveOwnableAddresses({
|
|
13
|
+
owners: input.guardians,
|
|
14
|
+
threshold: input.threshold ?? 1,
|
|
15
|
+
address: SOCIAL_RECOVERY_VALIDATOR_ADDRESS,
|
|
16
|
+
});
|
|
17
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import type { SerializedIntentInput } from '../../clients/orchestrator/public.js';
|
|
1
2
|
import type { OrchestratorIntentRequest, OrchestratorQuote } from '../../clients/orchestrator/types.js';
|
|
2
|
-
export declare function projectCompatibleIntentInput(input: OrchestratorIntentRequest):
|
|
3
|
+
export declare function projectCompatibleIntentInput(input: OrchestratorIntentRequest): SerializedIntentInput;
|
|
3
4
|
export declare function projectCompatibleQuote(quote: OrchestratorQuote): OrchestratorQuote;
|
|
4
5
|
//# sourceMappingURL=compatibility.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compatibility.d.ts","sourceRoot":"","sources":["../../../../transactions/intents/compatibility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,yBAAyB,EACzB,iBAAiB,EAClB,MAAM,kCAAkC,CAAA;
|
|
1
|
+
{"version":3,"file":"compatibility.d.ts","sourceRoot":"","sources":["../../../../transactions/intents/compatibility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAA;AAC9E,OAAO,KAAK,EACV,yBAAyB,EACzB,iBAAiB,EAClB,MAAM,kCAAkC,CAAA;AAKzC,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,yBAAyB,GAC/B,qBAAqB,CAEvB;AAED,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,iBAAiB,GACvB,iBAAiB,CAKnB"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// The request is structurally the public `IntentInput` with `readonly`
|
|
2
|
+
// modifiers, so the serialized value is a `SerializedIntentInput` — the cast
|
|
3
|
+
// only re-attaches the type `serializeBigInts` erases.
|
|
1
4
|
export function projectCompatibleIntentInput(input) {
|
|
2
5
|
return serializeBigInts(input);
|
|
3
6
|
}
|
|
@@ -3,7 +3,7 @@ import type { AccountRuntimePort } from '../../accounts/adapter.js';
|
|
|
3
3
|
import type { UnresolvedCall } from '../../calls/types.js';
|
|
4
4
|
import type { ChainReference, EvmChainReference } from '../../chains/types.js';
|
|
5
5
|
import type { IntentQuotePort, IntentStatusPort, IntentSubmissionPort } from '../../clients/orchestrator/port.js';
|
|
6
|
-
import type { IntentOpStatus, OriginSignature, Quote } from '../../clients/orchestrator/public.js';
|
|
6
|
+
import type { IntentOpStatus, OriginSignature, Quote, SerializedIntentInput } from '../../clients/orchestrator/public.js';
|
|
7
7
|
import type { OrchestratorAccount, OrchestratorAccountAccessList, OrchestratorIntentOptions, OrchestratorIntentRequest, OrchestratorOriginSignature, OrchestratorQuote } from '../../clients/orchestrator/types.js';
|
|
8
8
|
import type { Transaction } from '../../config/account.js';
|
|
9
9
|
import type { ResolvedSessionSignerSet, Session, SessionEnableData } from '../../modules/validators/smart-sessions/types.js';
|
|
@@ -111,7 +111,8 @@ export interface PreparedQuotes {
|
|
|
111
111
|
}
|
|
112
112
|
export interface PreparedTransactionData {
|
|
113
113
|
quotes: PreparedQuotes;
|
|
114
|
-
|
|
114
|
+
/** Canonical serialized intent input; the shape a sponsorship digest covers. */
|
|
115
|
+
intentInput: SerializedIntentInput;
|
|
115
116
|
transaction: Transaction;
|
|
116
117
|
}
|
|
117
118
|
export interface QuoteSelection {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../transactions/intents/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,mBAAmB,EAAE,MAAM,MAAM,CAAA;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3E,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../transactions/intents/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,mBAAmB,EAAE,MAAM,MAAM,CAAA;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3E,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,KAAK,EACL,qBAAqB,EAC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BAAqB,CAAA;IAClC,WAAW,EAAE,WAAW,CAAA;CACzB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,qBAAsB,SAAQ,uBAAuB;IACpE,KAAK,EAAE,KAAK,CAAA;IACZ,gBAAgB,EAAE,eAAe,EAAE,CAAA;IACnC,oBAAoB,EAAE,GAAG,CAAA;IACzB,wBAAwB,EAAE,GAAG,GAAG,SAAS,CAAA;CAC1C;AAED,MAAM,WAAW,iBAAiB;IAChC,kEAAkE;IAClE,OAAO,EAAE,cAAc,CAAC,SAAS,CAAC,CAAA;IAClC,gCAAgC;IAChC,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAA;IAChC,iDAAiD;IACjD,cAAc,EAAE,OAAO,CAAA;IACvB,uDAAuD;IACvD,UAAU,EAAE,cAAc,CAAC,YAAY,CAAC,CAAA;CACzC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rhinestone/sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "End-to-end chain abstraction and modularity toolkit",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Rhinestone",
|
|
@@ -35,6 +35,10 @@
|
|
|
35
35
|
"types": "./dist/src/actions/passkeys.d.ts",
|
|
36
36
|
"import": "./dist/src/actions/passkeys.js"
|
|
37
37
|
},
|
|
38
|
+
"./actions/recovery": {
|
|
39
|
+
"types": "./dist/src/actions/recovery.d.ts",
|
|
40
|
+
"import": "./dist/src/actions/recovery.js"
|
|
41
|
+
},
|
|
38
42
|
"./signing/passkeys": {
|
|
39
43
|
"types": "./dist/src/signing/passkeys.d.ts",
|
|
40
44
|
"import": "./dist/src/signing/passkeys.js"
|