@charterlabs/rhinestone-sdk 0.2.7-dev.4 → 0.2.9
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 +46 -8
- package/dist/src/accounts/error.d.ts +4 -1
- package/dist/src/accounts/error.d.ts.map +1 -1
- package/dist/src/accounts/error.js +9 -1
- package/dist/src/accounts/index.d.ts +13 -3
- package/dist/src/accounts/index.d.ts.map +1 -1
- package/dist/src/accounts/index.js +62 -6
- package/dist/src/accounts/json-rpc/index.d.ts.map +1 -1
- package/dist/src/accounts/json-rpc/index.js +4 -0
- package/dist/src/accounts/json-rpc/index.test.d.ts +2 -0
- package/dist/src/accounts/json-rpc/index.test.d.ts.map +1 -0
- package/dist/src/accounts/json-rpc/index.test.js +33 -0
- package/dist/src/accounts/json-rpc/providers.d.ts +2 -1
- package/dist/src/accounts/json-rpc/providers.d.ts.map +1 -1
- package/dist/src/accounts/json-rpc/providers.js +8 -0
- package/dist/src/accounts/json-rpc/providers.test.d.ts +2 -0
- package/dist/src/accounts/json-rpc/providers.test.d.ts.map +1 -0
- package/dist/src/accounts/json-rpc/providers.test.js +43 -0
- package/dist/src/accounts/kernel.d.ts +9 -2
- package/dist/src/accounts/kernel.d.ts.map +1 -1
- package/dist/src/accounts/kernel.js +13 -0
- package/dist/src/accounts/nexus.d.ts +9 -2
- package/dist/src/accounts/nexus.d.ts.map +1 -1
- package/dist/src/accounts/nexus.js +15 -1
- package/dist/src/accounts/passport.d.ts +12 -0
- package/dist/src/accounts/passport.d.ts.map +1 -0
- package/dist/src/accounts/passport.js +173 -0
- package/dist/src/accounts/safe.d.ts +9 -2
- package/dist/src/accounts/safe.d.ts.map +1 -1
- package/dist/src/accounts/safe.js +15 -0
- package/dist/src/accounts/signing/common.d.ts.map +1 -1
- package/dist/src/accounts/signing/common.js +26 -5
- package/dist/src/accounts/signing/message.js +1 -1
- package/dist/src/accounts/startale.d.ts +9 -2
- package/dist/src/accounts/startale.d.ts.map +1 -1
- package/dist/src/accounts/startale.js +15 -0
- package/dist/src/accounts/walletClient.d.ts +27 -0
- package/dist/src/accounts/walletClient.d.ts.map +1 -1
- package/dist/src/accounts/walletClient.js +77 -0
- package/dist/src/actions/smart-sessions.d.ts +14 -0
- package/dist/src/actions/smart-sessions.d.ts.map +1 -0
- package/dist/src/actions/smart-sessions.js +16 -0
- package/dist/src/errors/index.d.ts +3 -3
- package/dist/src/errors/index.d.ts.map +1 -1
- package/dist/src/errors/index.js +18 -1
- package/dist/src/execution/compact.d.ts +3 -3
- package/dist/src/execution/compact.d.ts.map +1 -1
- package/dist/src/execution/compact.js +3 -3
- package/dist/src/execution/error.d.ts +8 -1
- package/dist/src/execution/error.d.ts.map +1 -1
- package/dist/src/execution/error.js +10 -1
- package/dist/src/execution/index.d.ts +10 -4
- package/dist/src/execution/index.d.ts.map +1 -1
- package/dist/src/execution/index.js +85 -12
- package/dist/src/execution/permit2.d.ts +2 -2
- package/dist/src/execution/permit2.d.ts.map +1 -1
- package/dist/src/execution/permit2.js +28 -19
- package/dist/src/execution/singleChainOps.d.ts +28 -0
- package/dist/src/execution/singleChainOps.d.ts.map +1 -0
- package/dist/src/execution/singleChainOps.js +32 -0
- package/dist/src/execution/smart-session.d.ts +5 -7
- package/dist/src/execution/smart-session.d.ts.map +1 -1
- package/dist/src/execution/smart-session.js +114 -229
- package/dist/src/execution/types.d.ts +2 -1
- package/dist/src/execution/types.d.ts.map +1 -1
- package/dist/src/execution/utils.d.ts +16 -9
- package/dist/src/execution/utils.d.ts.map +1 -1
- package/dist/src/execution/utils.js +151 -76
- package/dist/src/index.d.ts +18 -19
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +22 -25
- package/dist/src/modules/index.d.ts.map +1 -1
- package/dist/src/modules/index.js +1 -1
- package/dist/src/modules/index.test.js +1 -1
- package/dist/src/modules/read.js +2 -2
- package/dist/src/modules/validators/core.d.ts +5 -3
- package/dist/src/modules/validators/core.d.ts.map +1 -1
- package/dist/src/modules/validators/core.js +39 -2
- package/dist/src/modules/validators/smart-sessions.d.ts +8 -8
- package/dist/src/modules/validators/smart-sessions.d.ts.map +1 -1
- package/dist/src/modules/validators/smart-sessions.js +29 -80
- package/dist/src/modules/validators/smart-sessions.test.js +4 -5
- package/dist/src/orchestrator/client.d.ts +3 -2
- package/dist/src/orchestrator/client.d.ts.map +1 -1
- package/dist/src/orchestrator/client.js +230 -172
- package/dist/src/orchestrator/error.d.ts +137 -1
- package/dist/src/orchestrator/error.d.ts.map +1 -1
- package/dist/src/orchestrator/error.js +137 -1
- package/dist/src/orchestrator/index.d.ts +6 -6
- package/dist/src/orchestrator/index.d.ts.map +1 -1
- package/dist/src/orchestrator/index.js +19 -3
- package/dist/src/orchestrator/registry.d.ts +6 -2
- package/dist/src/orchestrator/registry.d.ts.map +1 -1
- package/dist/src/orchestrator/registry.js +16 -64
- package/dist/src/orchestrator/registry.test.js +24 -24
- package/dist/src/orchestrator/types.d.ts +63 -43
- package/dist/src/orchestrator/types.d.ts.map +1 -1
- package/dist/src/orchestrator/types.js +9 -5
- package/dist/src/types.d.ts +42 -9
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/index.d.ts +3 -0
- package/dist/src/utils/index.d.ts.map +1 -0
- package/dist/src/utils/index.js +5 -0
- package/package.json +4 -4
- package/dist/src/actions/smart-session.d.ts +0 -11
- package/dist/src/actions/smart-session.d.ts.map +0 -1
- package/dist/src/actions/smart-session.js +0 -13
- package/dist/src/execution/smart-session.test.d.ts +0 -2
- package/dist/src/execution/smart-session.test.d.ts.map +0 -1
- package/dist/src/execution/smart-session.test.js +0 -34
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../errors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qCAAqC,EACrC,YAAY,EACZ,8BAA8B,EAC9B,kCAAkC,EAClC,wCAAwC,EACxC,4BAA4B,EAC5B,cAAc,EACd,kCAAkC,EAClC,4BAA4B,EAC5B,mCAAmC,EACpC,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,gCAAgC,EAChC,yBAAyB,EACzB,uBAAuB,EACxB,MAAM,cAAc,CAAA;AACrB,OAAO,EACL,2BAA2B,EAC3B,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAClB,2BAA2B,EAC3B,mBAAmB,EACnB,gBAAgB,EAChB,uCAAuC,EACvC,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,iBAAiB,CAAA;AAExB,OAAO,EAEL,cAAc,EACd,YAAY,EACZ,qCAAqC,EACrC,8BAA8B,EAC9B,wCAAwC,EACxC,4BAA4B,EAC5B,4BAA4B,EAC5B,kCAAkC,EAClC,kCAAkC,EAClC,mCAAmC,EAEnC,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,gCAAgC,EAChC,yBAAyB,EACzB,uBAAuB,EAEvB,mBAAmB,EACnB,2BAA2B,EAC3B,wBAAwB,EACxB,kBAAkB,EAClB,2BAA2B,EAC3B,gBAAgB,EAChB,uCAAuC,EACvC,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,GACtB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../errors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qCAAqC,EACrC,YAAY,EACZ,6BAA6B,EAC7B,8BAA8B,EAC9B,kCAAkC,EAClC,wCAAwC,EACxC,4BAA4B,EAC5B,cAAc,EACd,kCAAkC,EAClC,4BAA4B,EAC5B,mCAAmC,EACpC,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,gCAAgC,EAChC,yBAAyB,EACzB,uBAAuB,EACxB,MAAM,cAAc,CAAA;AACrB,OAAO,EACL,2BAA2B,EAC3B,eAAe,EACf,eAAe,EACf,aAAa,EACb,cAAc,EACd,wBAAwB,EACxB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,2BAA2B,EAC3B,WAAW,EACX,mBAAmB,EACnB,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,uCAAuC,EACvC,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,iBAAiB,EACjB,wBAAwB,EACxB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,iBAAiB,CAAA;AAExB,OAAO,EAEL,cAAc,EACd,YAAY,EACZ,qCAAqC,EACrC,6BAA6B,EAC7B,8BAA8B,EAC9B,wCAAwC,EACxC,4BAA4B,EAC5B,4BAA4B,EAC5B,kCAAkC,EAClC,kCAAkC,EAClC,mCAAmC,EAEnC,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,gCAAgC,EAChC,yBAAyB,EACzB,uBAAuB,EAEvB,mBAAmB,EACnB,WAAW,EACX,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,2BAA2B,EAC3B,eAAe,EACf,eAAe,EACf,aAAa,EACb,cAAc,EACd,wBAAwB,EACxB,kBAAkB,EAClB,2BAA2B,EAC3B,gBAAgB,EAChB,uCAAuC,EACvC,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACrB,wBAAwB,EACxB,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,GACtB,CAAA"}
|
package/dist/src/errors/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UnsupportedTokenError = exports.UnsupportedChainIdError = exports.UnsupportedChainError = exports.TokenNotSupportedError = exports.IntentNotFoundError = exports.OrchestratorError = exports.OnlyOneTargetTokenAmountCanBeUnsetError = exports.NoPathFoundError = exports.InvalidIntentSignatureError = exports.InvalidApiKeyError = exports.InsufficientBalanceError = exports.AuthenticationRequiredError = exports.isOrchestratorError = exports.SignerNotSupportedError = exports.SessionChainRequiredError = exports.OrderPathRequiredForIntentsError = exports.IntentFailedError = exports.ExecutionError = exports.isExecutionError = exports.WalletClientNoConnectedAccountError = exports.Eip7702NotSupportedForAccountError = exports.SigningNotSupportedForAccountError = exports.SmartSessionsNotEnabledError = exports.FactoryArgsNotAvailableError = exports.ExistingEip7702AccountsNotSupportedError = exports.Eip7702AccountMustHaveEoaError = exports.AccountConfigurationNotSupportedError = exports.AccountError = exports.isAccountError = void 0;
|
|
3
|
+
exports.UnsupportedTokenError = exports.UnsupportedChainIdError = exports.UnsupportedChainError = exports.TokenNotSupportedError = exports.UnauthorizedError = exports.UnprocessableEntityError = exports.SimulationFailedError = exports.ServiceUnavailableError = exports.SchemaValidationError = exports.RateLimitedError = exports.ResourceNotFoundError = exports.InternalServerError = exports.IntentNotFoundError = exports.OrchestratorError = exports.OnlyOneTargetTokenAmountCanBeUnsetError = exports.NoPathFoundError = exports.InvalidIntentSignatureError = exports.InvalidApiKeyError = exports.InsufficientBalanceError = exports.ForbiddenError = exports.ConflictError = exports.BodyParserError = exports.BadRequestError = exports.AuthenticationRequiredError = exports.isRateLimited = exports.isValidationError = exports.isAuthError = exports.isRetryable = exports.isOrchestratorError = exports.SignerNotSupportedError = exports.SessionChainRequiredError = exports.OrderPathRequiredForIntentsError = exports.IntentFailedError = exports.ExecutionError = exports.isExecutionError = exports.WalletClientNoConnectedAccountError = exports.Eip7702NotSupportedForAccountError = exports.SigningNotSupportedForAccountError = exports.SmartSessionsNotEnabledError = exports.FactoryArgsNotAvailableError = exports.ExistingEip7702AccountsNotSupportedError = exports.Eip7702AccountMustHaveEoaError = exports.Eip712DomainNotAvailableError = exports.AccountConfigurationNotSupportedError = exports.AccountError = exports.isAccountError = void 0;
|
|
4
4
|
const accounts_1 = require("../accounts");
|
|
5
5
|
Object.defineProperty(exports, "AccountConfigurationNotSupportedError", { enumerable: true, get: function () { return accounts_1.AccountConfigurationNotSupportedError; } });
|
|
6
6
|
Object.defineProperty(exports, "AccountError", { enumerable: true, get: function () { return accounts_1.AccountError; } });
|
|
7
|
+
Object.defineProperty(exports, "Eip712DomainNotAvailableError", { enumerable: true, get: function () { return accounts_1.Eip712DomainNotAvailableError; } });
|
|
7
8
|
Object.defineProperty(exports, "Eip7702AccountMustHaveEoaError", { enumerable: true, get: function () { return accounts_1.Eip7702AccountMustHaveEoaError; } });
|
|
8
9
|
Object.defineProperty(exports, "Eip7702NotSupportedForAccountError", { enumerable: true, get: function () { return accounts_1.Eip7702NotSupportedForAccountError; } });
|
|
9
10
|
Object.defineProperty(exports, "ExistingEip7702AccountsNotSupportedError", { enumerable: true, get: function () { return accounts_1.ExistingEip7702AccountsNotSupportedError; } });
|
|
@@ -21,15 +22,31 @@ Object.defineProperty(exports, "SessionChainRequiredError", { enumerable: true,
|
|
|
21
22
|
Object.defineProperty(exports, "SignerNotSupportedError", { enumerable: true, get: function () { return execution_1.SignerNotSupportedError; } });
|
|
22
23
|
const orchestrator_1 = require("../orchestrator");
|
|
23
24
|
Object.defineProperty(exports, "AuthenticationRequiredError", { enumerable: true, get: function () { return orchestrator_1.AuthenticationRequiredError; } });
|
|
25
|
+
Object.defineProperty(exports, "BadRequestError", { enumerable: true, get: function () { return orchestrator_1.BadRequestError; } });
|
|
26
|
+
Object.defineProperty(exports, "BodyParserError", { enumerable: true, get: function () { return orchestrator_1.BodyParserError; } });
|
|
27
|
+
Object.defineProperty(exports, "ConflictError", { enumerable: true, get: function () { return orchestrator_1.ConflictError; } });
|
|
28
|
+
Object.defineProperty(exports, "ForbiddenError", { enumerable: true, get: function () { return orchestrator_1.ForbiddenError; } });
|
|
24
29
|
Object.defineProperty(exports, "InsufficientBalanceError", { enumerable: true, get: function () { return orchestrator_1.InsufficientBalanceError; } });
|
|
25
30
|
Object.defineProperty(exports, "IntentNotFoundError", { enumerable: true, get: function () { return orchestrator_1.IntentNotFoundError; } });
|
|
31
|
+
Object.defineProperty(exports, "InternalServerError", { enumerable: true, get: function () { return orchestrator_1.InternalServerError; } });
|
|
26
32
|
Object.defineProperty(exports, "InvalidApiKeyError", { enumerable: true, get: function () { return orchestrator_1.InvalidApiKeyError; } });
|
|
27
33
|
Object.defineProperty(exports, "InvalidIntentSignatureError", { enumerable: true, get: function () { return orchestrator_1.InvalidIntentSignatureError; } });
|
|
34
|
+
Object.defineProperty(exports, "isAuthError", { enumerable: true, get: function () { return orchestrator_1.isAuthError; } });
|
|
28
35
|
Object.defineProperty(exports, "isOrchestratorError", { enumerable: true, get: function () { return orchestrator_1.isOrchestratorError; } });
|
|
36
|
+
Object.defineProperty(exports, "isRateLimited", { enumerable: true, get: function () { return orchestrator_1.isRateLimited; } });
|
|
37
|
+
Object.defineProperty(exports, "isRetryable", { enumerable: true, get: function () { return orchestrator_1.isRetryable; } });
|
|
38
|
+
Object.defineProperty(exports, "isValidationError", { enumerable: true, get: function () { return orchestrator_1.isValidationError; } });
|
|
29
39
|
Object.defineProperty(exports, "NoPathFoundError", { enumerable: true, get: function () { return orchestrator_1.NoPathFoundError; } });
|
|
30
40
|
Object.defineProperty(exports, "OnlyOneTargetTokenAmountCanBeUnsetError", { enumerable: true, get: function () { return orchestrator_1.OnlyOneTargetTokenAmountCanBeUnsetError; } });
|
|
31
41
|
Object.defineProperty(exports, "OrchestratorError", { enumerable: true, get: function () { return orchestrator_1.OrchestratorError; } });
|
|
42
|
+
Object.defineProperty(exports, "RateLimitedError", { enumerable: true, get: function () { return orchestrator_1.RateLimitedError; } });
|
|
43
|
+
Object.defineProperty(exports, "ResourceNotFoundError", { enumerable: true, get: function () { return orchestrator_1.ResourceNotFoundError; } });
|
|
44
|
+
Object.defineProperty(exports, "SchemaValidationError", { enumerable: true, get: function () { return orchestrator_1.SchemaValidationError; } });
|
|
45
|
+
Object.defineProperty(exports, "ServiceUnavailableError", { enumerable: true, get: function () { return orchestrator_1.ServiceUnavailableError; } });
|
|
46
|
+
Object.defineProperty(exports, "SimulationFailedError", { enumerable: true, get: function () { return orchestrator_1.SimulationFailedError; } });
|
|
32
47
|
Object.defineProperty(exports, "TokenNotSupportedError", { enumerable: true, get: function () { return orchestrator_1.TokenNotSupportedError; } });
|
|
48
|
+
Object.defineProperty(exports, "UnauthorizedError", { enumerable: true, get: function () { return orchestrator_1.UnauthorizedError; } });
|
|
49
|
+
Object.defineProperty(exports, "UnprocessableEntityError", { enumerable: true, get: function () { return orchestrator_1.UnprocessableEntityError; } });
|
|
33
50
|
Object.defineProperty(exports, "UnsupportedChainError", { enumerable: true, get: function () { return orchestrator_1.UnsupportedChainError; } });
|
|
34
51
|
Object.defineProperty(exports, "UnsupportedChainIdError", { enumerable: true, get: function () { return orchestrator_1.UnsupportedChainIdError; } });
|
|
35
52
|
Object.defineProperty(exports, "UnsupportedTokenError", { enumerable: true, get: function () { return orchestrator_1.UnsupportedTokenError; } });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Hex } from 'viem';
|
|
2
|
-
import type { IntentOp } from '../orchestrator/types';
|
|
3
|
-
declare const COMPACT_ADDRESS = "
|
|
2
|
+
import type { IntentOp, IntentOpElement } from '../orchestrator/types';
|
|
3
|
+
declare const COMPACT_ADDRESS = "0x00000000000000171ede64904551eeDF3C6C9788";
|
|
4
4
|
declare function getCompactTypedData(intentOp: IntentOp): {
|
|
5
5
|
readonly domain: {
|
|
6
6
|
readonly name: "The Compact";
|
|
@@ -146,6 +146,6 @@ declare function getCompactDigest(intentOp: IntentOp): Hex;
|
|
|
146
146
|
* @param intentOp The intent operation
|
|
147
147
|
* @returns The digest hash
|
|
148
148
|
*/
|
|
149
|
-
declare function getPermit2Digest(
|
|
149
|
+
declare function getPermit2Digest(element: IntentOpElement, nonce: bigint, expires: bigint): Hex;
|
|
150
150
|
export { COMPACT_ADDRESS, getCompactTypedData, getCompactDigest, getPermit2Digest, };
|
|
151
151
|
//# sourceMappingURL=compact.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compact.d.ts","sourceRoot":"","sources":["../../../execution/compact.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAA0C,MAAM,MAAM,CAAA;AACvE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"compact.d.ts","sourceRoot":"","sources":["../../../execution/compact.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAA0C,MAAM,MAAM,CAAA;AACvE,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAGtE,QAAA,MAAM,eAAe,+CAA+C,CAAA;AA8CpE,iBAAS,mBAAmB,CAAC,QAAQ,EAAE,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmD9C;AAED;;;;GAIG;AACH,iBAAS,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,GAAG,GAAG,CAGjD;AAED;;;;GAIG;AACH,iBAAS,gBAAgB,CACvB,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,GACd,GAAG,CAGL;AAED,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,GACjB,CAAA"}
|
|
@@ -6,7 +6,7 @@ exports.getCompactDigest = getCompactDigest;
|
|
|
6
6
|
exports.getPermit2Digest = getPermit2Digest;
|
|
7
7
|
const viem_1 = require("viem");
|
|
8
8
|
const permit2_1 = require("./permit2");
|
|
9
|
-
const COMPACT_ADDRESS = '
|
|
9
|
+
const COMPACT_ADDRESS = '0x00000000000000171ede64904551eeDF3C6C9788';
|
|
10
10
|
exports.COMPACT_ADDRESS = COMPACT_ADDRESS;
|
|
11
11
|
// Define the typed data structure as const to preserve type safety
|
|
12
12
|
const COMPACT_TYPED_DATA_TYPES = {
|
|
@@ -116,7 +116,7 @@ function getCompactDigest(intentOp) {
|
|
|
116
116
|
* @param intentOp The intent operation
|
|
117
117
|
* @returns The digest hash
|
|
118
118
|
*/
|
|
119
|
-
function getPermit2Digest(
|
|
120
|
-
const typedData = (0, permit2_1.getTypedData)(
|
|
119
|
+
function getPermit2Digest(element, nonce, expires) {
|
|
120
|
+
const typedData = (0, permit2_1.getTypedData)(element, nonce, expires);
|
|
121
121
|
return (0, viem_1.hashTypedData)(typedData);
|
|
122
122
|
}
|
|
@@ -42,6 +42,13 @@ declare class IntentFailedError extends ExecutionError {
|
|
|
42
42
|
traceId?: string;
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
|
+
declare class IntentStatusTimeoutError extends ExecutionError {
|
|
46
|
+
constructor(params?: {
|
|
47
|
+
context?: any;
|
|
48
|
+
errorType?: string;
|
|
49
|
+
traceId?: string;
|
|
50
|
+
});
|
|
51
|
+
}
|
|
45
52
|
declare function isExecutionError(error: Error): error is ExecutionError;
|
|
46
|
-
export { isExecutionError, ExecutionError, OrderPathRequiredForIntentsError, SessionChainRequiredError, IntentFailedError, SignerNotSupportedError, };
|
|
53
|
+
export { isExecutionError, ExecutionError, OrderPathRequiredForIntentsError, SessionChainRequiredError, IntentFailedError, IntentStatusTimeoutError, SignerNotSupportedError, };
|
|
47
54
|
//# sourceMappingURL=error.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../execution/error.ts"],"names":[],"mappings":"AAAA,cAAM,cAAe,SAAQ,KAAK;IAChC,OAAO,CAAC,QAAQ,CAAC,QAAQ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B,OAAO,CAAC,EAAE,GAAG,CAAA;QACb,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,OAAO,CAAC,EAAE,MAAM,CAAA;KACjB;CAMF;AAED,cAAM,wBAAyB,SAAQ,cAAc;gBACvC,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,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,cAAc,CAE/D;AAED,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,gCAAgC,EAChC,yBAAyB,EACzB,iBAAiB,EACjB,wBAAwB,EACxB,uBAAuB,GACxB,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SignerNotSupportedError = exports.IntentFailedError = exports.SessionChainRequiredError = exports.OrderPathRequiredForIntentsError = exports.ExecutionError = void 0;
|
|
3
|
+
exports.SignerNotSupportedError = exports.IntentStatusTimeoutError = exports.IntentFailedError = exports.SessionChainRequiredError = exports.OrderPathRequiredForIntentsError = exports.ExecutionError = void 0;
|
|
4
4
|
exports.isExecutionError = isExecutionError;
|
|
5
5
|
class ExecutionError extends Error {
|
|
6
6
|
_message;
|
|
@@ -64,6 +64,15 @@ class IntentFailedError extends ExecutionError {
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
exports.IntentFailedError = IntentFailedError;
|
|
67
|
+
class IntentStatusTimeoutError extends ExecutionError {
|
|
68
|
+
constructor(params) {
|
|
69
|
+
super({
|
|
70
|
+
message: 'Intent status polling timed out',
|
|
71
|
+
...params,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
exports.IntentStatusTimeoutError = IntentStatusTimeoutError;
|
|
67
76
|
function isExecutionError(error) {
|
|
68
77
|
return error instanceof ExecutionError;
|
|
69
78
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { type Address, type Chain, type Hex } from 'viem';
|
|
2
2
|
import type { UserOperationReceipt } from 'viem/_types/account-abstraction';
|
|
3
|
-
import type {
|
|
3
|
+
import type { IntentOpStatus } from '../orchestrator';
|
|
4
|
+
import type { Account, SettlementLayer } from '../orchestrator/types';
|
|
4
5
|
import type { CalldataInput, CallInput, RhinestoneAccountConfig, RhinestoneConfig, SignerSet, SourceAssetInput, TokenRequest, TokenSymbol, Transaction, UserOperationTransaction } from '../types';
|
|
5
|
-
import { ExecutionError, IntentFailedError, isExecutionError, OrderPathRequiredForIntentsError, SessionChainRequiredError, SignerNotSupportedError } from './error';
|
|
6
|
+
import { ExecutionError, IntentFailedError, IntentStatusTimeoutError, isExecutionError, OrderPathRequiredForIntentsError, SessionChainRequiredError, SignerNotSupportedError } from './error';
|
|
6
7
|
import type { TransactionResult, UserOperationResult } from './utils';
|
|
7
8
|
interface TransactionStatus {
|
|
8
9
|
fill: {
|
|
@@ -19,17 +20,22 @@ declare function sendUserOperation(config: RhinestoneAccountConfig, transaction:
|
|
|
19
20
|
declare function sendTransactionInternal(config: RhinestoneConfig, sourceChains: Chain[], targetChain: Chain, callInputs: CallInput[], options: {
|
|
20
21
|
gasLimit?: bigint;
|
|
21
22
|
initialTokenRequests?: TokenRequest[];
|
|
23
|
+
recipient?: Account;
|
|
22
24
|
signers?: SignerSet;
|
|
23
25
|
sponsored?: boolean;
|
|
24
26
|
settlementLayers?: SettlementLayer[];
|
|
25
27
|
sourceAssets?: SourceAssetInput;
|
|
26
28
|
lockFunds?: boolean;
|
|
27
29
|
feeAsset?: Address | TokenSymbol;
|
|
30
|
+
dryRun?: boolean;
|
|
28
31
|
}): Promise<TransactionResult>;
|
|
29
32
|
declare function sendUserOperationInternal(config: RhinestoneConfig, chain: Chain, callInputs: CalldataInput[], signers?: SignerSet): Promise<UserOperationResult>;
|
|
30
33
|
declare function waitForExecution(config: RhinestoneConfig, result: TransactionResult | UserOperationResult, acceptsPreconfirmations: boolean): Promise<TransactionStatus | UserOperationReceipt>;
|
|
31
|
-
declare function getMaxSpendableAmount(config: RhinestoneConfig, chain: Chain,
|
|
34
|
+
declare function getMaxSpendableAmount(config: RhinestoneConfig, chain: Chain, token: Address | TokenSymbol, gasUnits: bigint, sponsored?: boolean): Promise<bigint>;
|
|
32
35
|
declare function getPortfolio(config: RhinestoneConfig, onTestnets: boolean): Promise<import("../orchestrator").Portfolio>;
|
|
33
|
-
|
|
36
|
+
declare function getIntentStatus(apiKey: string | undefined, endpointUrl: string | undefined, intentId: bigint): Promise<TransactionStatus & {
|
|
37
|
+
status: IntentOpStatus['status'];
|
|
38
|
+
}>;
|
|
39
|
+
export { sendTransaction, sendTransactionInternal, sendUserOperation, sendUserOperationInternal, waitForExecution, getMaxSpendableAmount, getPortfolio, getIntentStatus, isExecutionError, ExecutionError, IntentFailedError, IntentStatusTimeoutError, OrderPathRequiredForIntentsError, SessionChainRequiredError, SignerNotSupportedError, };
|
|
34
40
|
export type { TransactionStatus, TransactionResult, UserOperationResult };
|
|
35
41
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../execution/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,KAAK,EAAsB,KAAK,GAAG,EAAE,MAAM,MAAM,CAAA;AAC7E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../execution/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,KAAK,EAAsB,KAAK,GAAG,EAAE,MAAM,MAAM,CAAA;AAC7E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAA;AAI3E,OAAO,KA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B,CAAA;AACD,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SignerNotSupportedError = exports.SessionChainRequiredError = exports.OrderPathRequiredForIntentsError = exports.IntentFailedError = exports.ExecutionError = exports.isExecutionError = void 0;
|
|
3
|
+
exports.SignerNotSupportedError = exports.SessionChainRequiredError = exports.OrderPathRequiredForIntentsError = exports.IntentStatusTimeoutError = exports.IntentFailedError = exports.ExecutionError = exports.isExecutionError = void 0;
|
|
4
4
|
exports.sendTransaction = sendTransaction;
|
|
5
5
|
exports.sendTransactionInternal = sendTransactionInternal;
|
|
6
6
|
exports.sendUserOperation = sendUserOperation;
|
|
@@ -8,6 +8,7 @@ exports.sendUserOperationInternal = sendUserOperationInternal;
|
|
|
8
8
|
exports.waitForExecution = waitForExecution;
|
|
9
9
|
exports.getMaxSpendableAmount = getMaxSpendableAmount;
|
|
10
10
|
exports.getPortfolio = getPortfolio;
|
|
11
|
+
exports.getIntentStatus = getIntentStatus;
|
|
11
12
|
const viem_1 = require("viem");
|
|
12
13
|
const chains_1 = require("viem/chains");
|
|
13
14
|
const accounts_1 = require("../accounts");
|
|
@@ -17,19 +18,25 @@ const registry_1 = require("../orchestrator/registry");
|
|
|
17
18
|
const error_1 = require("./error");
|
|
18
19
|
Object.defineProperty(exports, "ExecutionError", { enumerable: true, get: function () { return error_1.ExecutionError; } });
|
|
19
20
|
Object.defineProperty(exports, "IntentFailedError", { enumerable: true, get: function () { return error_1.IntentFailedError; } });
|
|
21
|
+
Object.defineProperty(exports, "IntentStatusTimeoutError", { enumerable: true, get: function () { return error_1.IntentStatusTimeoutError; } });
|
|
20
22
|
Object.defineProperty(exports, "isExecutionError", { enumerable: true, get: function () { return error_1.isExecutionError; } });
|
|
21
23
|
Object.defineProperty(exports, "OrderPathRequiredForIntentsError", { enumerable: true, get: function () { return error_1.OrderPathRequiredForIntentsError; } });
|
|
22
24
|
Object.defineProperty(exports, "SessionChainRequiredError", { enumerable: true, get: function () { return error_1.SessionChainRequiredError; } });
|
|
23
25
|
Object.defineProperty(exports, "SignerNotSupportedError", { enumerable: true, get: function () { return error_1.SignerNotSupportedError; } });
|
|
24
26
|
const smart_session_1 = require("./smart-session");
|
|
25
27
|
const utils_2 = require("./utils");
|
|
26
|
-
const
|
|
28
|
+
const POLL_INITIAL_MS = 500;
|
|
29
|
+
const POLL_SLOW_AFTER_MS = 15000;
|
|
30
|
+
const POLL_SLOW_MS = 2000;
|
|
31
|
+
const POLL_MAX_WAIT_MS = 180000;
|
|
32
|
+
const POLL_ERROR_BACKOFF_MS = 1000;
|
|
33
|
+
const POLL_ERROR_BACKOFF_MAX_MS = 10000;
|
|
27
34
|
async function sendTransaction(config, transaction) {
|
|
28
35
|
const sourceChains = 'chain' in transaction
|
|
29
36
|
? [transaction.chain]
|
|
30
37
|
: transaction.sourceChains || [];
|
|
31
38
|
const targetChain = 'chain' in transaction ? transaction.chain : transaction.targetChain;
|
|
32
|
-
const { calls, gasLimit, tokenRequests, signers, sponsored, settlementLayers, sourceAssets, feeAsset, } = transaction;
|
|
39
|
+
const { calls, gasLimit, tokenRequests, recipient, signers, sponsored, settlementLayers, sourceAssets, feeAsset, dryRun, } = transaction;
|
|
33
40
|
const isUserOpSigner = signers?.type === 'guardians' || signers?.type === 'session';
|
|
34
41
|
if (isUserOpSigner) {
|
|
35
42
|
throw new error_1.SignerNotSupportedError();
|
|
@@ -37,11 +44,13 @@ async function sendTransaction(config, transaction) {
|
|
|
37
44
|
return await sendTransactionInternal(config, sourceChains, targetChain, calls, {
|
|
38
45
|
gasLimit,
|
|
39
46
|
initialTokenRequests: tokenRequests,
|
|
47
|
+
recipient,
|
|
40
48
|
signers,
|
|
41
49
|
sponsored,
|
|
42
50
|
settlementLayers,
|
|
43
51
|
sourceAssets,
|
|
44
52
|
feeAsset,
|
|
53
|
+
dryRun,
|
|
45
54
|
});
|
|
46
55
|
}
|
|
47
56
|
async function sendUserOperation(config, transaction) {
|
|
@@ -63,7 +72,7 @@ async function sendTransactionInternal(config, sourceChains, targetChain, callIn
|
|
|
63
72
|
throw new error_1.SignerNotSupportedError();
|
|
64
73
|
}
|
|
65
74
|
else {
|
|
66
|
-
return await sendTransactionAsIntent(config, sourceChains, targetChain, resolvedCalls, options.gasLimit, tokenRequests, accountAddress, options.signers, options.sponsored, options.settlementLayers, options.sourceAssets, options.feeAsset, options.lockFunds);
|
|
75
|
+
return await sendTransactionAsIntent(config, sourceChains, targetChain, resolvedCalls, options.gasLimit, tokenRequests, options.recipient, accountAddress, options.dryRun, options.signers, options.sponsored, options.settlementLayers, options.sourceAssets, options.feeAsset, options.lockFunds);
|
|
67
76
|
}
|
|
68
77
|
}
|
|
69
78
|
async function sendUserOperationInternal(config, chain, callInputs, signers) {
|
|
@@ -93,16 +102,16 @@ async function sendUserOperationInternal(config, chain, callInputs, signers) {
|
|
|
93
102
|
chain: chain.id,
|
|
94
103
|
};
|
|
95
104
|
}
|
|
96
|
-
async function sendTransactionAsIntent(config, sourceChains, targetChain, callInputs, gasLimit, tokenRequests, accountAddress, signers, sponsored, settlementLayers, sourceAssets, feeAsset, lockFunds) {
|
|
97
|
-
const intentRoute = await (0, utils_2.prepareTransactionAsIntent)(config, sourceChains, targetChain, callInputs, gasLimit, tokenRequests, accountAddress, sponsored ?? false, undefined, settlementLayers, sourceAssets, feeAsset, lockFunds);
|
|
105
|
+
async function sendTransactionAsIntent(config, sourceChains, targetChain, callInputs, gasLimit, tokenRequests, recipient, accountAddress, dryRun = false, signers, sponsored, settlementLayers, sourceAssets, feeAsset, lockFunds) {
|
|
106
|
+
const intentRoute = await (0, utils_2.prepareTransactionAsIntent)(config, sourceChains, targetChain, callInputs, gasLimit, tokenRequests, recipient, accountAddress, sponsored ?? false, undefined, settlementLayers, sourceAssets, feeAsset, lockFunds);
|
|
98
107
|
if (!intentRoute) {
|
|
99
108
|
throw new error_1.OrderPathRequiredForIntentsError();
|
|
100
109
|
}
|
|
101
|
-
const
|
|
110
|
+
const { originSignatures, destinationSignature } = await (0, utils_2.signIntent)(config, targetChain, intentRoute.intentOp, signers);
|
|
102
111
|
const authorizations = config.eoa
|
|
103
112
|
? await (0, utils_2.signAuthorizationsInternal)(config, intentRoute)
|
|
104
113
|
: [];
|
|
105
|
-
return await (0, utils_2.submitIntentInternal)(config, sourceChains, targetChain, intentRoute.intentOp,
|
|
114
|
+
return await (0, utils_2.submitIntentInternal)(config, sourceChains, targetChain, intentRoute.intentOp, originSignatures, destinationSignature, authorizations, dryRun);
|
|
106
115
|
}
|
|
107
116
|
async function waitForExecution(config, result, acceptsPreconfirmations) {
|
|
108
117
|
const validStatuses = new Set([
|
|
@@ -116,10 +125,56 @@ async function waitForExecution(config, result, acceptsPreconfirmations) {
|
|
|
116
125
|
switch (result.type) {
|
|
117
126
|
case 'intent': {
|
|
118
127
|
let intentStatus = null;
|
|
128
|
+
const startTs = Date.now();
|
|
129
|
+
let nextDelayMs = POLL_INITIAL_MS;
|
|
130
|
+
let errorBackoffMs = POLL_ERROR_BACKOFF_MS;
|
|
119
131
|
while (intentStatus === null || !validStatuses.has(intentStatus.status)) {
|
|
132
|
+
const now = Date.now();
|
|
133
|
+
if (now - startTs >= POLL_MAX_WAIT_MS) {
|
|
134
|
+
throw new error_1.IntentStatusTimeoutError({
|
|
135
|
+
context: { waitedMs: now - startTs },
|
|
136
|
+
});
|
|
137
|
+
}
|
|
120
138
|
const orchestrator = (0, utils_2.getOrchestratorByChain)(result.targetChain, config.apiKey, config.endpointUrl);
|
|
121
|
-
|
|
122
|
-
|
|
139
|
+
try {
|
|
140
|
+
intentStatus = await orchestrator.getIntentOpStatus(result.id);
|
|
141
|
+
// reset error backoff on success
|
|
142
|
+
errorBackoffMs = POLL_ERROR_BACKOFF_MS;
|
|
143
|
+
const elapsed = Date.now() - startTs;
|
|
144
|
+
nextDelayMs =
|
|
145
|
+
elapsed >= POLL_SLOW_AFTER_MS ? POLL_SLOW_MS : POLL_INITIAL_MS;
|
|
146
|
+
await new Promise((resolve) => setTimeout(resolve, nextDelayMs));
|
|
147
|
+
}
|
|
148
|
+
catch (err) {
|
|
149
|
+
if ((0, orchestrator_1.isRateLimited)(err)) {
|
|
150
|
+
const retryAfter = err?.context?.retryAfter;
|
|
151
|
+
let retryMs = nextDelayMs;
|
|
152
|
+
if (retryAfter) {
|
|
153
|
+
const parsed = Number(retryAfter);
|
|
154
|
+
if (!Number.isNaN(parsed)) {
|
|
155
|
+
retryMs = Math.max(parsed * 1000, nextDelayMs);
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
const asDate = Date.parse(retryAfter);
|
|
159
|
+
if (!Number.isNaN(asDate)) {
|
|
160
|
+
retryMs = Math.max(asDate - Date.now(), nextDelayMs);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
retryMs = Math.max(POLL_SLOW_MS, nextDelayMs);
|
|
166
|
+
}
|
|
167
|
+
await new Promise((resolve) => setTimeout(resolve, retryMs));
|
|
168
|
+
continue;
|
|
169
|
+
}
|
|
170
|
+
if ((0, orchestrator_1.isRetryable)(err)) {
|
|
171
|
+
const backoff = Math.min(errorBackoffMs, POLL_ERROR_BACKOFF_MAX_MS);
|
|
172
|
+
errorBackoffMs = Math.min(errorBackoffMs * 2, POLL_ERROR_BACKOFF_MAX_MS);
|
|
173
|
+
await new Promise((resolve) => setTimeout(resolve, backoff));
|
|
174
|
+
continue;
|
|
175
|
+
}
|
|
176
|
+
throw err;
|
|
177
|
+
}
|
|
123
178
|
}
|
|
124
179
|
if (intentStatus.status === orchestrator_1.INTENT_STATUS_FAILED) {
|
|
125
180
|
throw new error_1.IntentFailedError();
|
|
@@ -152,14 +207,32 @@ async function waitForExecution(config, result, acceptsPreconfirmations) {
|
|
|
152
207
|
}
|
|
153
208
|
}
|
|
154
209
|
}
|
|
155
|
-
async function getMaxSpendableAmount(config, chain,
|
|
210
|
+
async function getMaxSpendableAmount(config, chain, token, gasUnits, sponsored = false) {
|
|
156
211
|
const address = (0, accounts_1.getAddress)(config);
|
|
157
212
|
const orchestrator = (0, utils_2.getOrchestratorByChain)(chain.id, config.apiKey, config.endpointUrl);
|
|
213
|
+
const tokenAddress = (0, registry_1.resolveTokenAddress)(token, chain.id);
|
|
158
214
|
return orchestrator.getMaxTokenAmount(address, chain.id, tokenAddress, gasUnits, sponsored);
|
|
159
215
|
}
|
|
160
216
|
async function getPortfolio(config, onTestnets) {
|
|
161
217
|
const address = (0, accounts_1.getAddress)(config);
|
|
162
|
-
const chainId = onTestnets ? chains_1.
|
|
218
|
+
const chainId = onTestnets ? chains_1.baseSepolia.id : chains_1.base.id;
|
|
163
219
|
const orchestrator = (0, utils_2.getOrchestratorByChain)(chainId, config.apiKey, config.endpointUrl);
|
|
164
220
|
return orchestrator.getPortfolio(address);
|
|
165
221
|
}
|
|
222
|
+
async function getIntentStatus(apiKey, endpointUrl, intentId) {
|
|
223
|
+
const environment = BigInt(intentId.toString().slice(0, 1));
|
|
224
|
+
const chainId = environment === 4n ? chains_1.base.id : chains_1.baseSepolia.id;
|
|
225
|
+
const orchestrator = (0, utils_2.getOrchestratorByChain)(chainId, apiKey, endpointUrl);
|
|
226
|
+
const internalStatus = await orchestrator.getIntentOpStatus(intentId);
|
|
227
|
+
return {
|
|
228
|
+
status: internalStatus.status,
|
|
229
|
+
fill: {
|
|
230
|
+
hash: internalStatus.fillTransactionHash,
|
|
231
|
+
chainId: chainId,
|
|
232
|
+
},
|
|
233
|
+
claims: internalStatus.claims.map((claim) => ({
|
|
234
|
+
hash: claim.claimTransactionHash,
|
|
235
|
+
chainId: claim.chainId,
|
|
236
|
+
})),
|
|
237
|
+
};
|
|
238
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type Address, type Chain } from 'viem';
|
|
2
|
-
import type {
|
|
2
|
+
import type { IntentOpElement } from '../orchestrator/types';
|
|
3
3
|
import type { RhinestoneConfig } from '../types';
|
|
4
4
|
import type { BatchPermit2Result, MultiChainPermit2Config, MultiChainPermit2Result, TokenPermissions } from './types';
|
|
5
|
-
declare function getTypedData(
|
|
5
|
+
declare function getTypedData(element: IntentOpElement, nonce: bigint, expires: bigint): {
|
|
6
6
|
readonly domain: {
|
|
7
7
|
readonly name: "Permit2";
|
|
8
8
|
readonly chainId: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permit2.d.ts","sourceRoot":"","sources":["../../../execution/permit2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,KAAK,EAIX,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"permit2.d.ts","sourceRoot":"","sources":["../../../execution/permit2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,KAAK,EAIX,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAChD,OAAO,KAAK,EACV,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,EACvB,gBAAgB,EACjB,MAAM,SAAS,CAAA;AAQhB,iBAAS,YAAY,CACnB,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8FhB;AAED,iBAAe,yBAAyB,CACtC,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,OAAO,EACrB,YAAY,EAAE,GAAG,GAChB,OAAO,CAAC,MAAM,CAAC,CAyBjB;AAED,iBAAe,mBAAmB,CAChC,YAAY,EAAE,OAAO,EACrB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,gBAAgB,GACvB,OAAO,CAAC,MAAM,CAAC,CAuBjB;AAED;;;GAGG;AACH,iBAAS,iBAAiB,IAAI,OAAO,CAEpC;AAED;;;;;;;;;GASG;AACH,iBAAe,gBAAgB,CAC7B,OAAO,EAAE,uBAAuB,EAAE,GACjC,OAAO,CAAC,kBAAkB,CAAC,CAyE7B;AAED;;;;;;;;;;GAUG;AACH,iBAAe,qBAAqB,CAClC,OAAO,EAAE,uBAAuB,EAAE,EAClC,UAAU,CAAC,EAAE,CACX,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,uBAAuB,KAC7B,IAAI,GACR,OAAO,CAAC,kBAAkB,CAAC,CA8D7B;AAED,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,yBAAyB,EACzB,iBAAiB,EAEjB,gBAAgB,EAChB,qBAAqB,EAErB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,GACxB,CAAA"}
|
|
@@ -12,8 +12,7 @@ const PERMIT2_ADDRESS = '0x000000000022D473030F116dDEE9F6B43aC78BA3';
|
|
|
12
12
|
function toToken(id) {
|
|
13
13
|
return `0x${(id & ((1n << 160n) - 1n)).toString(16).padStart(40, '0')}`;
|
|
14
14
|
}
|
|
15
|
-
function getTypedData(
|
|
16
|
-
const element = intentOp.elements[0];
|
|
15
|
+
function getTypedData(element, nonce, expires) {
|
|
17
16
|
const tokens = element.idsAndAmounts.map(([id, amount]) => [
|
|
18
17
|
BigInt(id),
|
|
19
18
|
BigInt(amount),
|
|
@@ -30,7 +29,7 @@ function getTypedData(intentOp) {
|
|
|
30
29
|
const typedData = {
|
|
31
30
|
domain: {
|
|
32
31
|
name: 'Permit2',
|
|
33
|
-
chainId: Number(
|
|
32
|
+
chainId: Number(element.chainId),
|
|
34
33
|
verifyingContract: PERMIT2_ADDRESS,
|
|
35
34
|
},
|
|
36
35
|
types: {
|
|
@@ -73,8 +72,8 @@ function getTypedData(intentOp) {
|
|
|
73
72
|
message: {
|
|
74
73
|
permitted: tokenPermissions,
|
|
75
74
|
spender: spender,
|
|
76
|
-
nonce:
|
|
77
|
-
deadline:
|
|
75
|
+
nonce: nonce,
|
|
76
|
+
deadline: expires,
|
|
78
77
|
mandate: {
|
|
79
78
|
target: {
|
|
80
79
|
recipient: mandate.recipient,
|
|
@@ -171,16 +170,20 @@ async function signPermit2Batch(configs) {
|
|
|
171
170
|
// Process all signing operations in parallel
|
|
172
171
|
const signingPromises = configs.map(async (config) => {
|
|
173
172
|
try {
|
|
174
|
-
//
|
|
175
|
-
const typedData = getTypedData(config.intentOp);
|
|
176
|
-
// Sign with EOA account
|
|
173
|
+
// sign each element individually for this chain sequentially to preserve order
|
|
177
174
|
if (!config.eoaAccount.signTypedData) {
|
|
178
175
|
throw new Error('EOA account does not support typed data signing');
|
|
179
176
|
}
|
|
180
|
-
const
|
|
177
|
+
const originSignatures = [];
|
|
178
|
+
for (const element of config.intentOp.elements) {
|
|
179
|
+
const typedData = getTypedData(element, BigInt(config.intentOp.nonce), BigInt(config.intentOp.expires));
|
|
180
|
+
const sig = await config.eoaAccount.signTypedData(typedData);
|
|
181
|
+
originSignatures.push(sig);
|
|
182
|
+
}
|
|
181
183
|
const result = {
|
|
182
184
|
chainId: config.chain.id,
|
|
183
|
-
|
|
185
|
+
originSignatures,
|
|
186
|
+
destinationSignature: originSignatures[0] ?? '0x',
|
|
184
187
|
success: true,
|
|
185
188
|
};
|
|
186
189
|
successfulSignatures++;
|
|
@@ -189,7 +192,8 @@ async function signPermit2Batch(configs) {
|
|
|
189
192
|
catch (error) {
|
|
190
193
|
const result = {
|
|
191
194
|
chainId: config.chain.id,
|
|
192
|
-
|
|
195
|
+
originSignatures: [],
|
|
196
|
+
destinationSignature: '0x',
|
|
193
197
|
success: false,
|
|
194
198
|
error: error instanceof Error ? error : new Error(String(error)),
|
|
195
199
|
};
|
|
@@ -199,7 +203,6 @@ async function signPermit2Batch(configs) {
|
|
|
199
203
|
});
|
|
200
204
|
// Wait for all signing operations to complete
|
|
201
205
|
const signingResults = await Promise.allSettled(signingPromises);
|
|
202
|
-
// Process results
|
|
203
206
|
for (const result of signingResults) {
|
|
204
207
|
if (result.status === 'fulfilled') {
|
|
205
208
|
results.push(result.value);
|
|
@@ -209,7 +212,8 @@ async function signPermit2Batch(configs) {
|
|
|
209
212
|
failedSignatures++;
|
|
210
213
|
results.push({
|
|
211
214
|
chainId: 0,
|
|
212
|
-
|
|
215
|
+
originSignatures: [],
|
|
216
|
+
destinationSignature: '0x',
|
|
213
217
|
success: false,
|
|
214
218
|
error: result.reason,
|
|
215
219
|
});
|
|
@@ -242,16 +246,20 @@ async function signPermit2Sequential(configs, onProgress) {
|
|
|
242
246
|
for (let i = 0; i < configs.length; i++) {
|
|
243
247
|
const config = configs[i];
|
|
244
248
|
try {
|
|
245
|
-
//
|
|
246
|
-
const typedData = getTypedData(config.intentOp);
|
|
247
|
-
// Sign with EOA account
|
|
249
|
+
// sign each element for this chain sequentially to preserve order
|
|
248
250
|
if (!config.eoaAccount.signTypedData) {
|
|
249
251
|
throw new Error('EOA account does not support typed data signing');
|
|
250
252
|
}
|
|
251
|
-
const
|
|
253
|
+
const originSignatures = [];
|
|
254
|
+
for (const element of config.intentOp.elements) {
|
|
255
|
+
const typedData = getTypedData(element, BigInt(config.intentOp.nonce), BigInt(config.intentOp.expires));
|
|
256
|
+
const sig = await config.eoaAccount.signTypedData(typedData);
|
|
257
|
+
originSignatures.push(sig);
|
|
258
|
+
}
|
|
252
259
|
const result = {
|
|
253
260
|
chainId: config.chain.id,
|
|
254
|
-
|
|
261
|
+
originSignatures,
|
|
262
|
+
destinationSignature: originSignatures[0] ?? '0x',
|
|
255
263
|
success: true,
|
|
256
264
|
};
|
|
257
265
|
results.push(result);
|
|
@@ -262,7 +270,8 @@ async function signPermit2Sequential(configs, onProgress) {
|
|
|
262
270
|
catch (error) {
|
|
263
271
|
const result = {
|
|
264
272
|
chainId: config.chain.id,
|
|
265
|
-
|
|
273
|
+
originSignatures: [],
|
|
274
|
+
destinationSignature: '0x',
|
|
266
275
|
success: false,
|
|
267
276
|
error: error instanceof Error ? error : new Error(String(error)),
|
|
268
277
|
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Address } from 'viem';
|
|
2
|
+
import type { Execution, IntentOpElement } from '../orchestrator/types';
|
|
3
|
+
declare function getTypedData(account: Address, intentExecutorAddress: Address, element: IntentOpElement, nonce: bigint): {
|
|
4
|
+
domain: {
|
|
5
|
+
name: string;
|
|
6
|
+
version: string;
|
|
7
|
+
chainId: number;
|
|
8
|
+
verifyingContract: `0x${string}`;
|
|
9
|
+
};
|
|
10
|
+
types: {
|
|
11
|
+
SingleChainOps: {
|
|
12
|
+
name: string;
|
|
13
|
+
type: string;
|
|
14
|
+
}[];
|
|
15
|
+
Op: {
|
|
16
|
+
name: string;
|
|
17
|
+
type: string;
|
|
18
|
+
}[];
|
|
19
|
+
};
|
|
20
|
+
primaryType: "SingleChainOps";
|
|
21
|
+
message: {
|
|
22
|
+
account: `0x${string}`;
|
|
23
|
+
nonce: bigint;
|
|
24
|
+
ops: Execution[];
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export { getTypedData };
|
|
28
|
+
//# sourceMappingURL=singleChainOps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"singleChainOps.d.ts","sourceRoot":"","sources":["../../../execution/singleChainOps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AACnC,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEvE,iBAAS,YAAY,CACnB,OAAO,EAAE,OAAO,EAChB,qBAAqB,EAAE,OAAO,EAC9B,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;EA8Bd;AACD,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getTypedData = getTypedData;
|
|
4
|
+
function getTypedData(account, intentExecutorAddress, element, nonce) {
|
|
5
|
+
const ops = element.mandate.destinationOps;
|
|
6
|
+
return {
|
|
7
|
+
domain: {
|
|
8
|
+
name: 'IntentExecutor',
|
|
9
|
+
version: 'v0.0.1',
|
|
10
|
+
chainId: Number(element.mandate.destinationChainId),
|
|
11
|
+
verifyingContract: intentExecutorAddress,
|
|
12
|
+
},
|
|
13
|
+
types: {
|
|
14
|
+
SingleChainOps: [
|
|
15
|
+
{ name: 'account', type: 'address' },
|
|
16
|
+
{ name: 'nonce', type: 'uint256' },
|
|
17
|
+
{ name: 'ops', type: 'Op[]' },
|
|
18
|
+
],
|
|
19
|
+
Op: [
|
|
20
|
+
{ name: 'to', type: 'address' },
|
|
21
|
+
{ name: 'value', type: 'uint256' },
|
|
22
|
+
{ name: 'data', type: 'bytes' },
|
|
23
|
+
],
|
|
24
|
+
},
|
|
25
|
+
primaryType: 'SingleChainOps',
|
|
26
|
+
message: {
|
|
27
|
+
account,
|
|
28
|
+
nonce,
|
|
29
|
+
ops,
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { type Chain, type Hex } from 'viem';
|
|
2
|
-
import { type
|
|
2
|
+
import { type EnableSessionData } from '../modules/validators/smart-sessions';
|
|
3
3
|
import type { RhinestoneConfig, Session } from '../types';
|
|
4
4
|
interface SessionDetails {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
hashesAndChainIds: ChainDigest[];
|
|
5
|
+
signature: Hex;
|
|
6
|
+
nonces: bigint[];
|
|
8
7
|
enableSessionData: EnableSessionData;
|
|
9
8
|
}
|
|
10
|
-
declare function getSessionDetails(config: RhinestoneConfig, sessions: Session[], sessionIndex: number, signature?: Hex): Promise<SessionDetails>;
|
|
11
|
-
declare function getMultichainDigest(chainDigests: ChainDigest[]): Hex;
|
|
9
|
+
declare function getSessionDetails(config: RhinestoneConfig, sessions: Session[], sessionIndex: number, initialNonces?: bigint[], signature?: Hex): Promise<SessionDetails>;
|
|
12
10
|
declare function enableSmartSession(chain: Chain, config: RhinestoneConfig, session: Session): Promise<void>;
|
|
13
|
-
export { enableSmartSession, getSessionDetails
|
|
11
|
+
export { enableSmartSession, getSessionDetails };
|
|
14
12
|
export type { SessionDetails };
|
|
15
13
|
//# sourceMappingURL=smart-session.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smart-session.d.ts","sourceRoot":"","sources":["../../../execution/smart-session.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,KAAK,
|
|
1
|
+
{"version":3,"file":"smart-session.d.ts","sourceRoot":"","sources":["../../../execution/smart-session.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,KAAK,EAEV,KAAK,GAAG,EAIT,MAAM,MAAM,CAAA;AAiBb,OAAO,EACL,KAAK,iBAAiB,EAKvB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAGzD,UAAU,cAAc;IACtB,SAAS,EAAE,GAAG,CAAA;IACd,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,iBAAiB,EAAE,iBAAiB,CAAA;CACrC;AA6CD,iBAAe,iBAAiB,CAC9B,MAAM,EAAE,gBAAgB,EACxB,QAAQ,EAAE,OAAO,EAAE,EACnB,YAAY,EAAE,MAAM,EACpB,aAAa,CAAC,EAAE,MAAM,EAAE,EACxB,SAAS,CAAC,EAAE,GAAG,GACd,OAAO,CAAC,cAAc,CAAC,CAiHzB;AA+BD,iBAAe,kBAAkB,CAC/B,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,OAAO,iBA2BjB;AAED,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,CAAA;AAChD,YAAY,EAAE,cAAc,EAAE,CAAA"}
|