@rhinestone/sdk 0.12.6 → 0.12.8
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/error.d.ts +69 -0
- package/dist/src/accounts/error.d.ts.map +1 -0
- package/dist/src/accounts/error.js +107 -0
- package/dist/src/accounts/index.d.ts +2 -1
- package/dist/src/accounts/index.d.ts.map +1 -1
- package/dist/src/accounts/index.js +20 -9
- package/dist/src/accounts/kernel.d.ts.map +1 -1
- package/dist/src/accounts/kernel.js +3 -2
- package/dist/src/accounts/nexus.d.ts.map +1 -1
- package/dist/src/accounts/nexus.js +3 -2
- package/dist/src/accounts/safe.d.ts.map +1 -1
- package/dist/src/accounts/safe.js +3 -2
- package/dist/src/execution/error.d.ts +54 -0
- package/dist/src/execution/error.d.ts.map +1 -0
- package/dist/src/execution/error.js +78 -0
- package/dist/src/execution/index.d.ts +2 -1
- package/dist/src/execution/index.d.ts.map +1 -1
- package/dist/src/execution/index.js +12 -3
- package/dist/src/execution/smart-session.d.ts.map +1 -1
- package/dist/src/execution/smart-session.js +4 -3
- package/dist/src/execution/utils.d.ts.map +1 -1
- package/dist/src/execution/utils.js +7 -6
- package/dist/src/index.d.ts +5 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +31 -1
- package/dist/src/orchestrator/client.d.ts.map +1 -1
- package/dist/src/orchestrator/client.js +82 -6
- package/dist/src/orchestrator/error.d.ts +80 -2
- package/dist/src/orchestrator/error.d.ts.map +1 -1
- package/dist/src/orchestrator/error.js +100 -1
- package/dist/src/orchestrator/index.d.ts +2 -2
- package/dist/src/orchestrator/index.d.ts.map +1 -1
- package/dist/src/orchestrator/index.js +12 -1
- package/dist/src/orchestrator/types.d.ts +2 -2
- package/dist/src/orchestrator/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -12,13 +12,14 @@ const modules_1 = require("../modules");
|
|
|
12
12
|
const validators_1 = require("../modules/validators");
|
|
13
13
|
const smart_sessions_1 = require("../modules/validators/smart-sessions");
|
|
14
14
|
const utils_2 = require("../orchestrator/utils");
|
|
15
|
+
const error_1 = require("./error");
|
|
15
16
|
async function getSessionDetails(config, sessions, sessionIndex, signature) {
|
|
16
17
|
const account = (0, accounts_1.getAccountProvider)(config);
|
|
17
18
|
const accountAddress = (0, accounts_1.getAddress)(config);
|
|
18
19
|
const sessionDetails = await getEnableSessionDetails(account.type, sessions, sessionIndex, accountAddress);
|
|
19
20
|
const chain = sessions[sessionIndex].chain;
|
|
20
21
|
if (!chain) {
|
|
21
|
-
throw new
|
|
22
|
+
throw new error_1.SessionChainRequiredError();
|
|
22
23
|
}
|
|
23
24
|
const validator = {
|
|
24
25
|
address: sessionDetails.enableSessionData.validator,
|
|
@@ -40,7 +41,7 @@ async function getEnableSessionDetails(accountType, sessions, sessionIndex, acco
|
|
|
40
41
|
});
|
|
41
42
|
const sessionChain = session.chain;
|
|
42
43
|
if (!sessionChain) {
|
|
43
|
-
throw new
|
|
44
|
+
throw new error_1.SessionChainRequiredError();
|
|
44
45
|
}
|
|
45
46
|
const sessionNonce = await getSessionNonce(publicClient, accountAddress, permissionId);
|
|
46
47
|
const sessionData = await (0, smart_sessions_1.getSessionData)(sessionChain, session);
|
|
@@ -74,7 +75,7 @@ async function getEnableSessionDetails(accountType, sessions, sessionIndex, acco
|
|
|
74
75
|
const sessionToEnable = sessions[sessionIndex || 0];
|
|
75
76
|
const sessionChain = sessionToEnable.chain;
|
|
76
77
|
if (!sessionChain) {
|
|
77
|
-
throw new
|
|
78
|
+
throw new error_1.SessionChainRequiredError();
|
|
78
79
|
}
|
|
79
80
|
const sessionData = await (0, smart_sessions_1.getSessionData)(sessionChain, sessionToEnable);
|
|
80
81
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../execution/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,KAAK,EAGL,GAAG,EAOJ,MAA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EAAE,YAAY,EAAE,EAC7B,cAAc,EAAE,OAAO,EACvB,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,gBAAgB,EAAE,MAAM,sBAuBzB;AAED,iBAAe,SAAS,CACtB,MAAM,EAAE,uBAAuB,EAC/B,WAAW,EAAE,KAAK,EAClB,OAAO,EAAE,SAAS,GAAG,SAAS,EAC9B,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,IAAI,EAAE,EACb,aAAa,EAAE,YAAY,EAAE,EAC7B,cAAc,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CxB;AAED,iBAAe,oBAAoB,CACjC,MAAM,EAAE,uBAAuB,EAC/B,WAAW,EAAE,KAAK,GAAG,SAAS,EAC9B,WAAW,EAAE,KAAK,EAClB,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,GAAG,EACd,MAAM,EAAE,OAAO,8BA6BhB;AAED,iBAAe,mBAAmB,CAChC,MAAM,EAAE,uBAAuB,EAC/B,OAAO,EAAE,SAAS,GAAG,SAAS,EAC9B,YAAY,EAAE,GAAG,EACjB,KAAK,EAAE,KAAK,yKAuBb;AA0FD,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,sBAAsB,EACtB,kBAAkB,EAClB,SAAS,EACT,UAAU,EACV,UAAU,EACV,YAAY,EACZ,0BAA0B,EAC1B,oBAAoB,EACpB,mBAAmB,GACpB,CAAA;AACD,YAAY,EACV,UAAU,EACV,iBAAiB,EACjB,uBAAuB,EACvB,qBAAqB,GACtB,CAAA"}
|
|
@@ -21,6 +21,7 @@ const core_1 = require("../modules/validators/core");
|
|
|
21
21
|
const orchestrator_1 = require("../orchestrator");
|
|
22
22
|
const consts_1 = require("../orchestrator/consts");
|
|
23
23
|
const registry_1 = require("../orchestrator/registry");
|
|
24
|
+
const error_1 = require("./error");
|
|
24
25
|
const smart_session_1 = require("./smart-session");
|
|
25
26
|
async function prepareTransaction(config, transaction) {
|
|
26
27
|
const { sourceChain, targetChain, tokenRequests, signers } = getTransactionParams(transaction);
|
|
@@ -29,7 +30,7 @@ async function prepareTransaction(config, transaction) {
|
|
|
29
30
|
const asUserOp = signers?.type === 'guardians' || signers?.type === 'session';
|
|
30
31
|
if (asUserOp) {
|
|
31
32
|
if (!sourceChain) {
|
|
32
|
-
throw new
|
|
33
|
+
throw new error_1.SourceChainRequiredForSmartSessionsError();
|
|
33
34
|
}
|
|
34
35
|
// Smart sessions require a UserOp flow
|
|
35
36
|
bundleData = await prepareTransactionAsUserOp(config, sourceChain, targetChain, transaction.calls, transaction.gasLimit, tokenRequests, accountAddress, signers);
|
|
@@ -50,11 +51,11 @@ async function signTransaction(config, preparedTransaction) {
|
|
|
50
51
|
let signature;
|
|
51
52
|
if (withSession) {
|
|
52
53
|
if (!sourceChain) {
|
|
53
|
-
throw new
|
|
54
|
+
throw new error_1.SourceChainRequiredForSmartSessionsError();
|
|
54
55
|
}
|
|
55
56
|
const userOp = bundleData.userOp;
|
|
56
57
|
if (!userOp) {
|
|
57
|
-
throw new
|
|
58
|
+
throw new error_1.UserOperationRequiredForSmartSessionsError();
|
|
58
59
|
}
|
|
59
60
|
// Smart sessions require a UserOp flow
|
|
60
61
|
signature = await signUserOp(config, sourceChain, targetChain, accountAddress, signers, userOp, bundleData.orderPath);
|
|
@@ -74,11 +75,11 @@ async function submitTransaction(config, signedTransaction) {
|
|
|
74
75
|
const withSession = signers?.type === 'session' ? signers.session : null;
|
|
75
76
|
if (withSession) {
|
|
76
77
|
if (!sourceChain) {
|
|
77
|
-
throw new
|
|
78
|
+
throw new error_1.SourceChainRequiredForSmartSessionsError();
|
|
78
79
|
}
|
|
79
80
|
const userOp = bundleData.userOp;
|
|
80
81
|
if (!userOp) {
|
|
81
|
-
throw new
|
|
82
|
+
throw new error_1.UserOperationRequiredForSmartSessionsError();
|
|
82
83
|
}
|
|
83
84
|
// Smart sessions require a UserOp flow
|
|
84
85
|
return await submitUserOp(config, sourceChain, targetChain, userOp, signature, bundleData.orderPath);
|
|
@@ -86,7 +87,7 @@ async function submitTransaction(config, signedTransaction) {
|
|
|
86
87
|
else {
|
|
87
88
|
const orderPath = bundleData.orderPath;
|
|
88
89
|
if (!orderPath) {
|
|
89
|
-
throw new
|
|
90
|
+
throw new error_1.OrderPathRequiredForIntentsError();
|
|
90
91
|
}
|
|
91
92
|
return await submitIntent(config, sourceChain, targetChain, orderPath, signature);
|
|
92
93
|
}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import type { Address, Chain, Hex } from 'viem';
|
|
2
2
|
import { UserOperationReceipt } from 'viem/account-abstraction';
|
|
3
|
+
import { AccountError, Eip7702AccountMustHaveEoaError, Eip7702NotSupportedForAccountError, ExistingEip7702AccountsNotSupportedError, FactoryArgsNotAvailableError, isAccountError, SigningNotSupportedForAccountError, SignMessageNotSupportedByAccountError, SmartSessionsNotEnabledError } from './accounts';
|
|
3
4
|
import { addOwner, changeThreshold, disableEcdsa, disablePasskeys, enableEcdsa, enablePasskeys, encodeSmartSessionSignature, recover, removeOwner, setUpRecovery, trustAttester } from './actions';
|
|
4
5
|
import type { TransactionResult } from './execution';
|
|
6
|
+
import { BundleFailedError, ExecutionError, isExecutionError, OrderPathRequiredForIntentsError, SessionChainRequiredError, SourceChainRequiredForSmartSessionsError, UserOperationRequiredForSmartSessionsError } from './execution';
|
|
5
7
|
import { SessionDetails } from './execution/smart-session';
|
|
6
8
|
import { BundleData, PreparedTransactionData, SignedTransactionData } from './execution/utils';
|
|
7
|
-
import
|
|
9
|
+
import { BundleResult, BundleStatus, MetaIntent, MultiChainCompact, PostOrderBundleResult, SignedMultiChainCompact, UserTokenBalance } from './orchestrator';
|
|
10
|
+
import { AuthenticationRequiredError, InsufficientBalanceError, InvalidApiKeyError, InvalidBundleSignatureError, isOrchestratorError, NoPathFoundError, OnlyOneTargetTokenAmountCanBeUnsetError, OrchestratorError, OrderBundleNotFoundError, TokenNotSupportedError, UnsupportedChainError, UnsupportedChainIdError, UnsupportedTokenError } from './orchestrator';
|
|
8
11
|
import type { Call, Execution, RhinestoneAccountConfig, Session, Transaction } from './types';
|
|
9
12
|
interface RhinestoneAccount {
|
|
10
13
|
config: RhinestoneAccountConfig;
|
|
@@ -32,6 +35,6 @@ interface RhinestoneAccount {
|
|
|
32
35
|
* @returns account
|
|
33
36
|
*/
|
|
34
37
|
declare function createRhinestoneAccount(config: RhinestoneAccountConfig): Promise<RhinestoneAccount>;
|
|
35
|
-
export { createRhinestoneAccount, addOwner, changeThreshold, disableEcdsa, disablePasskeys, enableEcdsa, enablePasskeys, recover, removeOwner, setUpRecovery, encodeSmartSessionSignature, trustAttester, };
|
|
38
|
+
export { createRhinestoneAccount, addOwner, changeThreshold, disableEcdsa, disablePasskeys, enableEcdsa, enablePasskeys, recover, removeOwner, setUpRecovery, encodeSmartSessionSignature, trustAttester, isAccountError, AccountError, Eip7702AccountMustHaveEoaError, ExistingEip7702AccountsNotSupportedError, FactoryArgsNotAvailableError, SmartSessionsNotEnabledError, SigningNotSupportedForAccountError, SignMessageNotSupportedByAccountError, Eip7702NotSupportedForAccountError, isExecutionError, BundleFailedError, ExecutionError, SourceChainRequiredForSmartSessionsError, UserOperationRequiredForSmartSessionsError, OrderPathRequiredForIntentsError, SessionChainRequiredError, isOrchestratorError, AuthenticationRequiredError, InsufficientBalanceError, InvalidApiKeyError, InvalidBundleSignatureError, NoPathFoundError, OnlyOneTargetTokenAmountCanBeUnsetError, OrchestratorError, OrderBundleNotFoundError, TokenNotSupportedError, UnsupportedChainError, UnsupportedChainIdError, UnsupportedTokenError, };
|
|
36
39
|
export type { RhinestoneAccount, BundleStatus, Session, Call, Execution, MetaIntent, MultiChainCompact, PostOrderBundleResult, SignedMultiChainCompact, BundleData, PreparedTransactionData, SignedTransactionData, TransactionResult, };
|
|
37
40
|
//# sourceMappingURL=index.d.ts.map
|
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,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EACL,YAAY,EAEZ,8BAA8B,EAC9B,kCAAkC,EAClC,wCAAwC,EACxC,4BAA4B,EAE5B,cAAc,EACd,kCAAkC,EAClC,qCAAqC,EACrC,4BAA4B,EAC7B,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,eAAe,EACf,WAAW,EACX,cAAc,EACd,2BAA2B,EAC3B,OAAO,EACP,WAAW,EACX,aAAa,EACb,aAAa,EACd,MAAM,WAAW,CAAA;AAClB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,EACL,iBAAiB,EACjB,cAAc,EAGd,gBAAgB,EAChB,gCAAgC,EAChC,yBAAyB,EACzB,wCAAwC,EAExC,0CAA0C,EAE3C,MAAM,aAAa,CAAA;AACpB,OAAO,EAEL,cAAc,EACf,MAAM,2BAA2B,CAAA;AAClC,OAAO,EACL,UAAU,EACV,uBAAuB,EAEvB,qBAAqB,EAGtB,MAAM,mBAAmB,CAAA;AAM1B,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,qBAAqB,EACrB,uBAAuB,EACvB,gBAAgB,EACjB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACL,2BAA2B,EAC3B,wBAAwB,EACxB,kBAAkB,EAClB,2BAA2B,EA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B,EACrB,iBAAiB,GAClB,CAAA"}
|
package/dist/src/index.js
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.trustAttester = exports.encodeSmartSessionSignature = exports.setUpRecovery = exports.removeOwner = exports.recover = exports.enablePasskeys = exports.enableEcdsa = exports.disablePasskeys = exports.disableEcdsa = exports.changeThreshold = exports.addOwner = void 0;
|
|
3
|
+
exports.UnsupportedTokenError = exports.UnsupportedChainIdError = exports.UnsupportedChainError = exports.TokenNotSupportedError = exports.OrderBundleNotFoundError = exports.OrchestratorError = exports.OnlyOneTargetTokenAmountCanBeUnsetError = exports.NoPathFoundError = exports.InvalidBundleSignatureError = exports.InvalidApiKeyError = exports.InsufficientBalanceError = exports.AuthenticationRequiredError = exports.isOrchestratorError = exports.SessionChainRequiredError = exports.OrderPathRequiredForIntentsError = exports.UserOperationRequiredForSmartSessionsError = exports.SourceChainRequiredForSmartSessionsError = exports.ExecutionError = exports.BundleFailedError = exports.isExecutionError = exports.Eip7702NotSupportedForAccountError = exports.SignMessageNotSupportedByAccountError = exports.SigningNotSupportedForAccountError = exports.SmartSessionsNotEnabledError = exports.FactoryArgsNotAvailableError = exports.ExistingEip7702AccountsNotSupportedError = exports.Eip7702AccountMustHaveEoaError = exports.AccountError = exports.isAccountError = exports.trustAttester = exports.encodeSmartSessionSignature = exports.setUpRecovery = exports.removeOwner = exports.recover = exports.enablePasskeys = exports.enableEcdsa = exports.disablePasskeys = exports.disableEcdsa = exports.changeThreshold = exports.addOwner = void 0;
|
|
4
4
|
exports.createRhinestoneAccount = createRhinestoneAccount;
|
|
5
5
|
const accounts_1 = require("./accounts");
|
|
6
|
+
Object.defineProperty(exports, "AccountError", { enumerable: true, get: function () { return accounts_1.AccountError; } });
|
|
7
|
+
Object.defineProperty(exports, "Eip7702AccountMustHaveEoaError", { enumerable: true, get: function () { return accounts_1.Eip7702AccountMustHaveEoaError; } });
|
|
8
|
+
Object.defineProperty(exports, "Eip7702NotSupportedForAccountError", { enumerable: true, get: function () { return accounts_1.Eip7702NotSupportedForAccountError; } });
|
|
9
|
+
Object.defineProperty(exports, "ExistingEip7702AccountsNotSupportedError", { enumerable: true, get: function () { return accounts_1.ExistingEip7702AccountsNotSupportedError; } });
|
|
10
|
+
Object.defineProperty(exports, "FactoryArgsNotAvailableError", { enumerable: true, get: function () { return accounts_1.FactoryArgsNotAvailableError; } });
|
|
11
|
+
Object.defineProperty(exports, "isAccountError", { enumerable: true, get: function () { return accounts_1.isAccountError; } });
|
|
12
|
+
Object.defineProperty(exports, "SigningNotSupportedForAccountError", { enumerable: true, get: function () { return accounts_1.SigningNotSupportedForAccountError; } });
|
|
13
|
+
Object.defineProperty(exports, "SignMessageNotSupportedByAccountError", { enumerable: true, get: function () { return accounts_1.SignMessageNotSupportedByAccountError; } });
|
|
14
|
+
Object.defineProperty(exports, "SmartSessionsNotEnabledError", { enumerable: true, get: function () { return accounts_1.SmartSessionsNotEnabledError; } });
|
|
6
15
|
const actions_1 = require("./actions");
|
|
7
16
|
Object.defineProperty(exports, "addOwner", { enumerable: true, get: function () { return actions_1.addOwner; } });
|
|
8
17
|
Object.defineProperty(exports, "changeThreshold", { enumerable: true, get: function () { return actions_1.changeThreshold; } });
|
|
@@ -16,9 +25,30 @@ Object.defineProperty(exports, "removeOwner", { enumerable: true, get: function
|
|
|
16
25
|
Object.defineProperty(exports, "setUpRecovery", { enumerable: true, get: function () { return actions_1.setUpRecovery; } });
|
|
17
26
|
Object.defineProperty(exports, "trustAttester", { enumerable: true, get: function () { return actions_1.trustAttester; } });
|
|
18
27
|
const execution_1 = require("./execution");
|
|
28
|
+
Object.defineProperty(exports, "BundleFailedError", { enumerable: true, get: function () { return execution_1.BundleFailedError; } });
|
|
29
|
+
Object.defineProperty(exports, "ExecutionError", { enumerable: true, get: function () { return execution_1.ExecutionError; } });
|
|
30
|
+
Object.defineProperty(exports, "isExecutionError", { enumerable: true, get: function () { return execution_1.isExecutionError; } });
|
|
31
|
+
Object.defineProperty(exports, "OrderPathRequiredForIntentsError", { enumerable: true, get: function () { return execution_1.OrderPathRequiredForIntentsError; } });
|
|
32
|
+
Object.defineProperty(exports, "SessionChainRequiredError", { enumerable: true, get: function () { return execution_1.SessionChainRequiredError; } });
|
|
33
|
+
Object.defineProperty(exports, "SourceChainRequiredForSmartSessionsError", { enumerable: true, get: function () { return execution_1.SourceChainRequiredForSmartSessionsError; } });
|
|
34
|
+
Object.defineProperty(exports, "UserOperationRequiredForSmartSessionsError", { enumerable: true, get: function () { return execution_1.UserOperationRequiredForSmartSessionsError; } });
|
|
19
35
|
const smart_session_1 = require("./execution/smart-session");
|
|
20
36
|
const utils_1 = require("./execution/utils");
|
|
21
37
|
const modules_1 = require("./modules");
|
|
38
|
+
const orchestrator_1 = require("./orchestrator");
|
|
39
|
+
Object.defineProperty(exports, "AuthenticationRequiredError", { enumerable: true, get: function () { return orchestrator_1.AuthenticationRequiredError; } });
|
|
40
|
+
Object.defineProperty(exports, "InsufficientBalanceError", { enumerable: true, get: function () { return orchestrator_1.InsufficientBalanceError; } });
|
|
41
|
+
Object.defineProperty(exports, "InvalidApiKeyError", { enumerable: true, get: function () { return orchestrator_1.InvalidApiKeyError; } });
|
|
42
|
+
Object.defineProperty(exports, "InvalidBundleSignatureError", { enumerable: true, get: function () { return orchestrator_1.InvalidBundleSignatureError; } });
|
|
43
|
+
Object.defineProperty(exports, "isOrchestratorError", { enumerable: true, get: function () { return orchestrator_1.isOrchestratorError; } });
|
|
44
|
+
Object.defineProperty(exports, "NoPathFoundError", { enumerable: true, get: function () { return orchestrator_1.NoPathFoundError; } });
|
|
45
|
+
Object.defineProperty(exports, "OnlyOneTargetTokenAmountCanBeUnsetError", { enumerable: true, get: function () { return orchestrator_1.OnlyOneTargetTokenAmountCanBeUnsetError; } });
|
|
46
|
+
Object.defineProperty(exports, "OrchestratorError", { enumerable: true, get: function () { return orchestrator_1.OrchestratorError; } });
|
|
47
|
+
Object.defineProperty(exports, "OrderBundleNotFoundError", { enumerable: true, get: function () { return orchestrator_1.OrderBundleNotFoundError; } });
|
|
48
|
+
Object.defineProperty(exports, "TokenNotSupportedError", { enumerable: true, get: function () { return orchestrator_1.TokenNotSupportedError; } });
|
|
49
|
+
Object.defineProperty(exports, "UnsupportedChainError", { enumerable: true, get: function () { return orchestrator_1.UnsupportedChainError; } });
|
|
50
|
+
Object.defineProperty(exports, "UnsupportedChainIdError", { enumerable: true, get: function () { return orchestrator_1.UnsupportedChainIdError; } });
|
|
51
|
+
Object.defineProperty(exports, "UnsupportedTokenError", { enumerable: true, get: function () { return orchestrator_1.UnsupportedTokenError; } });
|
|
22
52
|
/**
|
|
23
53
|
* Initialize a Rhinestone account
|
|
24
54
|
* Note: accounts are deployed onchain only when the first transaction is sent.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../orchestrator/client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,OAAO,EAAU,KAAK,GAAG,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../orchestrator/client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,OAAO,EAAU,KAAK,GAAG,EAAe,MAAM,MAAM,CAAA;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAgB7D,OAAO,KAAK,EACV,WAAW,EACX,YAAY,EACZ,UAAU,EACV,eAAe,EACf,aAAa,EACb,SAAS,EACT,qBAAqB,EACrB,uBAAuB,EACvB,gBAAgB,EACjB,MAAM,SAAS,CAAA;AAShB,qBAAa,YAAY;IACvB,OAAO,CAAC,SAAS,CAAQ;IACzB,OAAO,CAAC,MAAM,CAAQ;gBAEV,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAKvC,YAAY,CAChB,WAAW,EAAE,OAAO,EACpB,MAAM,CAAC,EAAE;QACP,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;QACnB,MAAM,CAAC,EAAE;YACP,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,EAAE,CAAA;SAC7B,CAAA;KACF,GACA,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAwCxB,iBAAiB,CACrB,WAAW,EAAE,OAAO,EACpB,aAAa,EAAE,MAAM,EACrB,kBAAkB,EAAE,OAAO,EAC3B,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,MAAM,CAAC;IAgCZ,aAAa,CACjB,MAAM,EAAE,aAAa,EACrB,WAAW,EAAE,OAAO,GACnB,OAAO,CAAC,eAAe,CAAC;IAkCrB,YAAY,CAChB,MAAM,EAAE,UAAU,EAClB,WAAW,EAAE,OAAO,GACnB,OAAO,CAAC,SAAS,CAAC;IA6Cf,qBAAqB,CACzB,kBAAkB,EAAE;QAClB,iBAAiB,EAAE,uBAAuB,CAAA;QAC1C,QAAQ,CAAC,EAAE,GAAG,CAAA;QACd,MAAM,CAAC,EAAE,aAAa,CAAA;KACvB,EAAE,GACF,OAAO,CAAC,qBAAqB,CAAC;IA2C3B,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAyBxD,iBAAiB,CACrB,KAAK,GAAE,MAAW,EAClB,MAAM,GAAE,MAAU,GACjB,OAAO,CAAC;QAAE,cAAc,EAAE,WAAW,EAAE,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAuBlE,OAAO,CAAC,UAAU;CAwHnB"}
|
|
@@ -73,6 +73,17 @@ class Orchestrator {
|
|
|
73
73
|
}
|
|
74
74
|
async getIntentCost(intent, userAddress) {
|
|
75
75
|
try {
|
|
76
|
+
// Provide default value for token transfers
|
|
77
|
+
const initialTokenRequests = intent.tokenTransfers ?? [];
|
|
78
|
+
const tokenRequests = initialTokenRequests.length === 0
|
|
79
|
+
? [
|
|
80
|
+
{
|
|
81
|
+
tokenAddress: viem_1.zeroAddress,
|
|
82
|
+
amount: 1n,
|
|
83
|
+
},
|
|
84
|
+
]
|
|
85
|
+
: initialTokenRequests;
|
|
86
|
+
intent.tokenTransfers = tokenRequests;
|
|
76
87
|
const response = await axios_1.default.post(`${this.serverUrl}/accounts/${userAddress}/bundles/cost`, {
|
|
77
88
|
...(0, utils_1.convertBigIntFields)(intent),
|
|
78
89
|
}, {
|
|
@@ -89,6 +100,17 @@ class Orchestrator {
|
|
|
89
100
|
}
|
|
90
101
|
async getOrderPath(intent, userAddress) {
|
|
91
102
|
try {
|
|
103
|
+
// Provide default value for token transfers
|
|
104
|
+
const initialTokenRequests = intent.tokenTransfers ?? [];
|
|
105
|
+
const tokenRequests = initialTokenRequests.length === 0
|
|
106
|
+
? [
|
|
107
|
+
{
|
|
108
|
+
tokenAddress: viem_1.zeroAddress,
|
|
109
|
+
amount: 1n,
|
|
110
|
+
},
|
|
111
|
+
]
|
|
112
|
+
: initialTokenRequests;
|
|
113
|
+
intent.tokenTransfers = tokenRequests;
|
|
92
114
|
const response = await axios_1.default.post(`${this.serverUrl}/accounts/${userAddress}/bundles/path`, {
|
|
93
115
|
...(0, utils_1.convertBigIntFields)(intent),
|
|
94
116
|
}, {
|
|
@@ -233,17 +255,71 @@ class Orchestrator {
|
|
|
233
255
|
console.error(`Context: ${JSON.stringify(err.context, undefined, 4)}`);
|
|
234
256
|
}
|
|
235
257
|
context = { ...context, ...err.context };
|
|
258
|
+
const message = err.message;
|
|
259
|
+
const finalErrorParams = {
|
|
260
|
+
context: { ...context, traceId },
|
|
261
|
+
errorType,
|
|
262
|
+
traceId,
|
|
263
|
+
};
|
|
264
|
+
if (message === 'Insufficient balance') {
|
|
265
|
+
throw new error_1.InsufficientBalanceError(finalErrorParams);
|
|
266
|
+
}
|
|
267
|
+
else if (message === 'Unsupported chain id') {
|
|
268
|
+
throw new error_1.UnsupportedChainIdError(finalErrorParams);
|
|
269
|
+
}
|
|
270
|
+
else if (message.startsWith('Unsupported chain ')) {
|
|
271
|
+
const chainIdMatch = message.match(/Unsupported chain (\d+)/);
|
|
272
|
+
if (chainIdMatch) {
|
|
273
|
+
const chainId = parseInt(chainIdMatch[1], 10);
|
|
274
|
+
throw new error_1.UnsupportedChainError(chainId, finalErrorParams);
|
|
275
|
+
}
|
|
276
|
+
throw new error_1.UnsupportedChainIdError(finalErrorParams);
|
|
277
|
+
}
|
|
278
|
+
else if (message.includes('Unsupported token') &&
|
|
279
|
+
message.includes('for chain')) {
|
|
280
|
+
const tokenMatch = message.match(/Unsupported token (\w+) for chain (\d+)/);
|
|
281
|
+
if (tokenMatch) {
|
|
282
|
+
const tokenSymbol = tokenMatch[1];
|
|
283
|
+
const chainId = parseInt(tokenMatch[2], 10);
|
|
284
|
+
throw new error_1.UnsupportedTokenError(tokenSymbol, chainId, finalErrorParams);
|
|
285
|
+
}
|
|
286
|
+
throw new error_1.OrchestratorError({ message, ...finalErrorParams });
|
|
287
|
+
}
|
|
288
|
+
else if (message.includes('not supported on chain')) {
|
|
289
|
+
const tokenMatch = message.match(/Token (.+) not supported on chain (\d+)/);
|
|
290
|
+
if (tokenMatch) {
|
|
291
|
+
const tokenAddress = tokenMatch[1];
|
|
292
|
+
const chainId = parseInt(tokenMatch[2], 10);
|
|
293
|
+
throw new error_1.TokenNotSupportedError(tokenAddress, chainId, finalErrorParams);
|
|
294
|
+
}
|
|
295
|
+
throw new error_1.OrchestratorError({ message, ...finalErrorParams });
|
|
296
|
+
}
|
|
297
|
+
else if (message === 'Authentication is required') {
|
|
298
|
+
throw new error_1.AuthenticationRequiredError(finalErrorParams);
|
|
299
|
+
}
|
|
300
|
+
else if (message === 'Invalid API key') {
|
|
301
|
+
throw new error_1.InvalidApiKeyError(finalErrorParams);
|
|
302
|
+
}
|
|
303
|
+
else if (message === 'Invalid bundle signature') {
|
|
304
|
+
throw new error_1.InvalidBundleSignatureError(finalErrorParams);
|
|
305
|
+
}
|
|
306
|
+
else if (message === 'Only one target token amount can be unset') {
|
|
307
|
+
throw new error_1.OnlyOneTargetTokenAmountCanBeUnsetError(finalErrorParams);
|
|
308
|
+
}
|
|
309
|
+
else if (message === 'No Path Found') {
|
|
310
|
+
throw new error_1.NoPathFoundError(finalErrorParams);
|
|
311
|
+
}
|
|
312
|
+
else if (message === 'Order bundle not found') {
|
|
313
|
+
throw new error_1.OrderBundleNotFoundError(finalErrorParams);
|
|
314
|
+
}
|
|
315
|
+
else {
|
|
316
|
+
throw new error_1.OrchestratorError({ message, ...finalErrorParams });
|
|
317
|
+
}
|
|
236
318
|
}
|
|
237
319
|
}
|
|
238
320
|
else {
|
|
239
321
|
console.error(error);
|
|
240
322
|
}
|
|
241
|
-
throw new error_1.OrchestratorError({
|
|
242
|
-
message: error.response.data.errors[0].message,
|
|
243
|
-
context,
|
|
244
|
-
errorType,
|
|
245
|
-
traceId: context.traceId,
|
|
246
|
-
});
|
|
247
323
|
}
|
|
248
324
|
}
|
|
249
325
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
declare class OrchestratorError extends Error {
|
|
2
2
|
private readonly _message;
|
|
3
3
|
private readonly _context;
|
|
4
4
|
private readonly _errorType;
|
|
@@ -14,5 +14,83 @@ export declare class OrchestratorError extends Error {
|
|
|
14
14
|
get errorType(): string;
|
|
15
15
|
get traceId(): string;
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
declare class InsufficientBalanceError extends OrchestratorError {
|
|
18
|
+
constructor(params?: {
|
|
19
|
+
context?: any;
|
|
20
|
+
errorType?: string;
|
|
21
|
+
traceId?: string;
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
declare class UnsupportedChainIdError extends OrchestratorError {
|
|
25
|
+
constructor(params?: {
|
|
26
|
+
context?: any;
|
|
27
|
+
errorType?: string;
|
|
28
|
+
traceId?: string;
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
declare class UnsupportedChainError extends OrchestratorError {
|
|
32
|
+
constructor(chainId: number, params?: {
|
|
33
|
+
context?: any;
|
|
34
|
+
errorType?: string;
|
|
35
|
+
traceId?: string;
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
declare class UnsupportedTokenError extends OrchestratorError {
|
|
39
|
+
constructor(tokenSymbol: string, chainId: number, params?: {
|
|
40
|
+
context?: any;
|
|
41
|
+
errorType?: string;
|
|
42
|
+
traceId?: string;
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
declare class TokenNotSupportedError extends OrchestratorError {
|
|
46
|
+
constructor(tokenAddress: string, chainId: number, params?: {
|
|
47
|
+
context?: any;
|
|
48
|
+
errorType?: string;
|
|
49
|
+
traceId?: string;
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
declare class AuthenticationRequiredError extends OrchestratorError {
|
|
53
|
+
constructor(params?: {
|
|
54
|
+
context?: any;
|
|
55
|
+
errorType?: string;
|
|
56
|
+
traceId?: string;
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
declare class InvalidApiKeyError extends OrchestratorError {
|
|
60
|
+
constructor(params?: {
|
|
61
|
+
context?: any;
|
|
62
|
+
errorType?: string;
|
|
63
|
+
traceId?: string;
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
declare class InvalidBundleSignatureError extends OrchestratorError {
|
|
67
|
+
constructor(params?: {
|
|
68
|
+
context?: any;
|
|
69
|
+
errorType?: string;
|
|
70
|
+
traceId?: string;
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
declare class OnlyOneTargetTokenAmountCanBeUnsetError extends OrchestratorError {
|
|
74
|
+
constructor(params?: {
|
|
75
|
+
context?: any;
|
|
76
|
+
errorType?: string;
|
|
77
|
+
traceId?: string;
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
declare class NoPathFoundError extends OrchestratorError {
|
|
81
|
+
constructor(params?: {
|
|
82
|
+
context?: any;
|
|
83
|
+
errorType?: string;
|
|
84
|
+
traceId?: string;
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
declare class OrderBundleNotFoundError extends OrchestratorError {
|
|
88
|
+
constructor(params?: {
|
|
89
|
+
context?: any;
|
|
90
|
+
errorType?: string;
|
|
91
|
+
traceId?: string;
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
declare function isOrchestratorError(error: Error): error is OrchestratorError;
|
|
95
|
+
export { isOrchestratorError, OrchestratorError, InsufficientBalanceError, UnsupportedChainIdError, UnsupportedChainError, UnsupportedTokenError, TokenNotSupportedError, AuthenticationRequiredError, InvalidApiKeyError, InvalidBundleSignatureError, OnlyOneTargetTokenAmountCanBeUnsetError, NoPathFoundError, OrderBundleNotFoundError, };
|
|
18
96
|
//# sourceMappingURL=error.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../orchestrator/error.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../orchestrator/error.ts"],"names":[],"mappings":"AAAA,cAAM,iBAAkB,SAAQ,KAAK;IACnC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAQ;IACjC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAK;IAC9B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAQ;IACnC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAQ;gBAErB,MAAM,CAAC,EAAE;QACnB,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,OAAO,CAAC,EAAE,GAAG,CAAA;QACb,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,OAAO,CAAC,EAAE,MAAM,CAAA;KACjB;IAQD,IAAI,OAAO,WAEV;IAED,IAAI,OAAO,QAEV;IAED,IAAI,SAAS,WAEZ;IAED,IAAI,OAAO,WAEV;CACF;AAED,cAAM,wBAAyB,SAAQ,iBAAiB;gBAC1C,MAAM,CAAC,EAAE;QACnB,OAAO,CAAC,EAAE,GAAG,CAAA;QACb,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,OA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ACjB;CAMF;AAED,cAAM,2BAA4B,SAAQ,iBAAiB;gBAC7C,MAAM,CAAC,EAAE;QACnB,OAAO,CAAC,EAAE,GAAG,CAAA;QACb,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,OAAO,CAAC,EAAE,MAAM,CAAA;KACjB;CAMF;AAED,cAAM,uCAAwC,SAAQ,iBAAiB;gBACzD,MAAM,CAAC,EAAE;QACnB,OAAO,CAAC,EAAE,GAAG,CAAA;QACb,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,OAAO,CAAC,EAAE,MAAM,CAAA;KACjB;CAMF;AAED,cAAM,gBAAiB,SAAQ,iBAAiB;gBAClC,MAAM,CAAC,EAAE;QACnB,OAAO,CAAC,EAAE,GAAG,CAAA;QACb,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,OAAO,CAAC,EAAE,MAAM,CAAA;KACjB;CAMF;AAED,cAAM,wBAAyB,SAAQ,iBAAiB;gBAC1C,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,mBAAmB,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,iBAAiB,CAErE;AAED,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,wBAAwB,EACxB,uBAAuB,EACvB,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,2BAA2B,EAC3B,kBAAkB,EAClB,2BAA2B,EAC3B,uCAAuC,EACvC,gBAAgB,EAChB,wBAAwB,GACzB,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OrchestratorError = void 0;
|
|
3
|
+
exports.OrderBundleNotFoundError = exports.NoPathFoundError = exports.OnlyOneTargetTokenAmountCanBeUnsetError = exports.InvalidBundleSignatureError = exports.InvalidApiKeyError = exports.AuthenticationRequiredError = exports.TokenNotSupportedError = exports.UnsupportedTokenError = exports.UnsupportedChainError = exports.UnsupportedChainIdError = exports.InsufficientBalanceError = exports.OrchestratorError = void 0;
|
|
4
4
|
exports.isOrchestratorError = isOrchestratorError;
|
|
5
5
|
class OrchestratorError extends Error {
|
|
6
6
|
_message;
|
|
@@ -28,6 +28,105 @@ class OrchestratorError extends Error {
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
exports.OrchestratorError = OrchestratorError;
|
|
31
|
+
class InsufficientBalanceError extends OrchestratorError {
|
|
32
|
+
constructor(params) {
|
|
33
|
+
super({
|
|
34
|
+
message: 'Insufficient balance',
|
|
35
|
+
...params,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.InsufficientBalanceError = InsufficientBalanceError;
|
|
40
|
+
class UnsupportedChainIdError extends OrchestratorError {
|
|
41
|
+
constructor(params) {
|
|
42
|
+
super({
|
|
43
|
+
message: 'Unsupported chain id',
|
|
44
|
+
...params,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.UnsupportedChainIdError = UnsupportedChainIdError;
|
|
49
|
+
class UnsupportedChainError extends OrchestratorError {
|
|
50
|
+
constructor(chainId, params) {
|
|
51
|
+
super({
|
|
52
|
+
message: `Unsupported chain ${chainId}`,
|
|
53
|
+
...params,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.UnsupportedChainError = UnsupportedChainError;
|
|
58
|
+
class UnsupportedTokenError extends OrchestratorError {
|
|
59
|
+
constructor(tokenSymbol, chainId, params) {
|
|
60
|
+
super({
|
|
61
|
+
message: `Unsupported token ${tokenSymbol} for chain ${chainId}`,
|
|
62
|
+
...params,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.UnsupportedTokenError = UnsupportedTokenError;
|
|
67
|
+
class TokenNotSupportedError extends OrchestratorError {
|
|
68
|
+
constructor(tokenAddress, chainId, params) {
|
|
69
|
+
super({
|
|
70
|
+
message: `Token ${tokenAddress} not supported on chain ${chainId}`,
|
|
71
|
+
...params,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
exports.TokenNotSupportedError = TokenNotSupportedError;
|
|
76
|
+
class AuthenticationRequiredError extends OrchestratorError {
|
|
77
|
+
constructor(params) {
|
|
78
|
+
super({
|
|
79
|
+
message: 'Authentication is required',
|
|
80
|
+
...params,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
exports.AuthenticationRequiredError = AuthenticationRequiredError;
|
|
85
|
+
class InvalidApiKeyError extends OrchestratorError {
|
|
86
|
+
constructor(params) {
|
|
87
|
+
super({
|
|
88
|
+
message: 'Invalid API key',
|
|
89
|
+
...params,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
exports.InvalidApiKeyError = InvalidApiKeyError;
|
|
94
|
+
class InvalidBundleSignatureError extends OrchestratorError {
|
|
95
|
+
constructor(params) {
|
|
96
|
+
super({
|
|
97
|
+
message: 'Invalid bundle signature',
|
|
98
|
+
...params,
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
exports.InvalidBundleSignatureError = InvalidBundleSignatureError;
|
|
103
|
+
class OnlyOneTargetTokenAmountCanBeUnsetError extends OrchestratorError {
|
|
104
|
+
constructor(params) {
|
|
105
|
+
super({
|
|
106
|
+
message: 'Only one target token amount can be unset',
|
|
107
|
+
...params,
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
exports.OnlyOneTargetTokenAmountCanBeUnsetError = OnlyOneTargetTokenAmountCanBeUnsetError;
|
|
112
|
+
class NoPathFoundError extends OrchestratorError {
|
|
113
|
+
constructor(params) {
|
|
114
|
+
super({
|
|
115
|
+
message: 'No Path Found',
|
|
116
|
+
...params,
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
exports.NoPathFoundError = NoPathFoundError;
|
|
121
|
+
class OrderBundleNotFoundError extends OrchestratorError {
|
|
122
|
+
constructor(params) {
|
|
123
|
+
super({
|
|
124
|
+
message: 'Order bundle not found',
|
|
125
|
+
...params,
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
exports.OrderBundleNotFoundError = OrderBundleNotFoundError;
|
|
31
130
|
function isOrchestratorError(error) {
|
|
32
131
|
return error instanceof OrchestratorError;
|
|
33
132
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Orchestrator } from './client';
|
|
2
2
|
import { RHINESTONE_SPOKE_POOL_ADDRESS } from './consts';
|
|
3
|
-
import { isOrchestratorError, OrchestratorError } from './error';
|
|
3
|
+
import { AuthenticationRequiredError, InsufficientBalanceError, InvalidApiKeyError, InvalidBundleSignatureError, isOrchestratorError, NoPathFoundError, OnlyOneTargetTokenAmountCanBeUnsetError, OrchestratorError, OrderBundleNotFoundError, TokenNotSupportedError, UnsupportedChainError, UnsupportedChainIdError, UnsupportedTokenError } from './error';
|
|
4
4
|
import { getHookAddress, getRhinestoneSpokePoolAddress, getSameChainModuleAddress, getSupportedTokens, getTargetModuleAddress, getTokenAddress, getTokenBalanceSlot, getTokenRootBalanceSlot, getTokenSymbol, getWethAddress, isTokenAddressSupported } from './registry';
|
|
5
5
|
import type { BundleResult, Execution, MetaIntent, MultiChainCompact, OrderCost, OrderCostResult, OrderFeeInput, OrderPath, PostOrderBundleResult, SignedMultiChainCompact, UserTokenBalance } from './types';
|
|
6
6
|
import { BUNDLE_STATUS_COMPLETED, BUNDLE_STATUS_EXPIRED, BUNDLE_STATUS_FAILED, BUNDLE_STATUS_FILLED, BUNDLE_STATUS_PARTIALLY_COMPLETED, BUNDLE_STATUS_PENDING, BUNDLE_STATUS_PRECONFIRMED, BUNDLE_STATUS_UNKNOWN } from './types';
|
|
7
7
|
import { applyInjectedExecutions, BundleStatusEnum, getEmptyUserOp, getOrderBundleHash } from './utils';
|
|
8
8
|
declare function getOrchestrator(apiKey: string, orchestratorUrl?: string): Orchestrator;
|
|
9
9
|
export type { Execution, BundleResult, MetaIntent, MultiChainCompact, OrderPath, SignedMultiChainCompact, PostOrderBundleResult, OrderCost, OrderCostResult, OrderFeeInput, UserTokenBalance, };
|
|
10
|
-
export { BundleStatusEnum as BundleStatus, BUNDLE_STATUS_PENDING, BUNDLE_STATUS_EXPIRED, BUNDLE_STATUS_PARTIALLY_COMPLETED, BUNDLE_STATUS_COMPLETED, BUNDLE_STATUS_FILLED, BUNDLE_STATUS_FAILED, BUNDLE_STATUS_PRECONFIRMED, BUNDLE_STATUS_UNKNOWN, RHINESTONE_SPOKE_POOL_ADDRESS, Orchestrator, OrchestratorError, getOrchestrator, getOrderBundleHash, getEmptyUserOp, getWethAddress, getTokenBalanceSlot, getTokenRootBalanceSlot, getTokenSymbol, getHookAddress, getSameChainModuleAddress, getTargetModuleAddress, getRhinestoneSpokePoolAddress, getTokenAddress, getSupportedTokens, isOrchestratorError, isTokenAddressSupported, applyInjectedExecutions, };
|
|
10
|
+
export { BundleStatusEnum as BundleStatus, BUNDLE_STATUS_PENDING, BUNDLE_STATUS_EXPIRED, BUNDLE_STATUS_PARTIALLY_COMPLETED, BUNDLE_STATUS_COMPLETED, BUNDLE_STATUS_FILLED, BUNDLE_STATUS_FAILED, BUNDLE_STATUS_PRECONFIRMED, BUNDLE_STATUS_UNKNOWN, RHINESTONE_SPOKE_POOL_ADDRESS, Orchestrator, AuthenticationRequiredError, InsufficientBalanceError, InvalidApiKeyError, InvalidBundleSignatureError, NoPathFoundError, OnlyOneTargetTokenAmountCanBeUnsetError, OrchestratorError, OrderBundleNotFoundError, TokenNotSupportedError, UnsupportedChainError, UnsupportedChainIdError, UnsupportedTokenError, getOrchestrator, getOrderBundleHash, getEmptyUserOp, getWethAddress, getTokenBalanceSlot, getTokenRootBalanceSlot, getTokenSymbol, getHookAddress, getSameChainModuleAddress, getTargetModuleAddress, getRhinestoneSpokePoolAddress, getTokenAddress, getSupportedTokens, isOrchestratorError, isTokenAddressSupported, applyInjectedExecutions, };
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../orchestrator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,OAAO,EAAyB,6BAA6B,EAAE,MAAM,UAAU,CAAA;AAC/E,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../orchestrator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,OAAO,EAAyB,6BAA6B,EAAE,MAAM,UAAU,CAAA;AAC/E,OAAO,EACL,2BAA2B,EAC3B,wBAAwB,EACxB,kBAAkB,EAClB,2BAA2B,EAC3B,mBAAmB,EACnB,gBAAgB,EAChB,uCAAuC,EACvC,iBAAiB,EACjB,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,cAAc,EACd,6BAA6B,EAC7B,yBAAyB,EACzB,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,mBAAmB,EACnB,uBAAuB,EACvB,cAAc,EACd,cAAc,EACd,uBAAuB,EACxB,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EACV,YAAY,EACZ,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,aAAa,EACb,SAAS,EACT,qBAAqB,EACrB,uBAAuB,EACvB,gBAAgB,EACjB,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,iCAAiC,EACjC,qBAAqB,EACrB,0BAA0B,EAC1B,qBAAqB,EACtB,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,uBAAuB,EACvB,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EACnB,MAAM,SAAS,CAAA;AAEhB,iBAAS,eAAe,CACtB,MAAM,EAAE,MAAM,EACd,eAAe,CAAC,EAAE,MAAM,GACvB,YAAY,CAEd;AAED,YAAY,EACV,SAAS,EACT,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,SAAS,EACT,uBAAuB,EACvB,qBAAqB,EACrB,SAAS,EACT,eAAe,EACf,aAAa,EACb,gBAAgB,GACjB,CAAA;AACD,OAAO,EACL,gBAAgB,IAAI,YAAY,EAChC,qBAAqB,EACrB,qBAAqB,EACrB,iCAAiC,EACjC,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,EACpB,0BAA0B,EAC1B,qBAAqB,EACrB,6BAA6B,EAC7B,YAAY,EACZ,2BAA2B,EAC3B,wBAAwB,EACxB,kBAAkB,EAClB,2BAA2B,EAC3B,gBAAgB,EAChB,uCAAuC,EACvC,iBAAiB,EACjB,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACrB,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,uBAAuB,EACvB,cAAc,EACd,cAAc,EACd,yBAAyB,EACzB,sBAAsB,EACtB,6BAA6B,EAC7B,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,EACvB,uBAAuB,GACxB,CAAA"}
|
|
@@ -1,14 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.applyInjectedExecutions = exports.isTokenAddressSupported = exports.isOrchestratorError = exports.getSupportedTokens = exports.getTokenAddress = exports.getRhinestoneSpokePoolAddress = exports.getTargetModuleAddress = exports.getSameChainModuleAddress = exports.getHookAddress = exports.getTokenSymbol = exports.getTokenRootBalanceSlot = exports.getTokenBalanceSlot = exports.getWethAddress = exports.getEmptyUserOp = exports.getOrderBundleHash = exports.OrchestratorError = exports.Orchestrator = exports.RHINESTONE_SPOKE_POOL_ADDRESS = exports.BUNDLE_STATUS_UNKNOWN = exports.BUNDLE_STATUS_PRECONFIRMED = exports.BUNDLE_STATUS_FAILED = exports.BUNDLE_STATUS_FILLED = exports.BUNDLE_STATUS_COMPLETED = exports.BUNDLE_STATUS_PARTIALLY_COMPLETED = exports.BUNDLE_STATUS_EXPIRED = exports.BUNDLE_STATUS_PENDING = exports.BundleStatus = void 0;
|
|
3
|
+
exports.applyInjectedExecutions = exports.isTokenAddressSupported = exports.isOrchestratorError = exports.getSupportedTokens = exports.getTokenAddress = exports.getRhinestoneSpokePoolAddress = exports.getTargetModuleAddress = exports.getSameChainModuleAddress = exports.getHookAddress = exports.getTokenSymbol = exports.getTokenRootBalanceSlot = exports.getTokenBalanceSlot = exports.getWethAddress = exports.getEmptyUserOp = exports.getOrderBundleHash = exports.UnsupportedTokenError = exports.UnsupportedChainIdError = exports.UnsupportedChainError = exports.TokenNotSupportedError = exports.OrderBundleNotFoundError = exports.OrchestratorError = exports.OnlyOneTargetTokenAmountCanBeUnsetError = exports.NoPathFoundError = exports.InvalidBundleSignatureError = exports.InvalidApiKeyError = exports.InsufficientBalanceError = exports.AuthenticationRequiredError = exports.Orchestrator = exports.RHINESTONE_SPOKE_POOL_ADDRESS = exports.BUNDLE_STATUS_UNKNOWN = exports.BUNDLE_STATUS_PRECONFIRMED = exports.BUNDLE_STATUS_FAILED = exports.BUNDLE_STATUS_FILLED = exports.BUNDLE_STATUS_COMPLETED = exports.BUNDLE_STATUS_PARTIALLY_COMPLETED = exports.BUNDLE_STATUS_EXPIRED = exports.BUNDLE_STATUS_PENDING = exports.BundleStatus = void 0;
|
|
4
4
|
exports.getOrchestrator = getOrchestrator;
|
|
5
5
|
const client_1 = require("./client");
|
|
6
6
|
Object.defineProperty(exports, "Orchestrator", { enumerable: true, get: function () { return client_1.Orchestrator; } });
|
|
7
7
|
const consts_1 = require("./consts");
|
|
8
8
|
Object.defineProperty(exports, "RHINESTONE_SPOKE_POOL_ADDRESS", { enumerable: true, get: function () { return consts_1.RHINESTONE_SPOKE_POOL_ADDRESS; } });
|
|
9
9
|
const error_1 = require("./error");
|
|
10
|
+
Object.defineProperty(exports, "AuthenticationRequiredError", { enumerable: true, get: function () { return error_1.AuthenticationRequiredError; } });
|
|
11
|
+
Object.defineProperty(exports, "InsufficientBalanceError", { enumerable: true, get: function () { return error_1.InsufficientBalanceError; } });
|
|
12
|
+
Object.defineProperty(exports, "InvalidApiKeyError", { enumerable: true, get: function () { return error_1.InvalidApiKeyError; } });
|
|
13
|
+
Object.defineProperty(exports, "InvalidBundleSignatureError", { enumerable: true, get: function () { return error_1.InvalidBundleSignatureError; } });
|
|
10
14
|
Object.defineProperty(exports, "isOrchestratorError", { enumerable: true, get: function () { return error_1.isOrchestratorError; } });
|
|
15
|
+
Object.defineProperty(exports, "NoPathFoundError", { enumerable: true, get: function () { return error_1.NoPathFoundError; } });
|
|
16
|
+
Object.defineProperty(exports, "OnlyOneTargetTokenAmountCanBeUnsetError", { enumerable: true, get: function () { return error_1.OnlyOneTargetTokenAmountCanBeUnsetError; } });
|
|
11
17
|
Object.defineProperty(exports, "OrchestratorError", { enumerable: true, get: function () { return error_1.OrchestratorError; } });
|
|
18
|
+
Object.defineProperty(exports, "OrderBundleNotFoundError", { enumerable: true, get: function () { return error_1.OrderBundleNotFoundError; } });
|
|
19
|
+
Object.defineProperty(exports, "TokenNotSupportedError", { enumerable: true, get: function () { return error_1.TokenNotSupportedError; } });
|
|
20
|
+
Object.defineProperty(exports, "UnsupportedChainError", { enumerable: true, get: function () { return error_1.UnsupportedChainError; } });
|
|
21
|
+
Object.defineProperty(exports, "UnsupportedChainIdError", { enumerable: true, get: function () { return error_1.UnsupportedChainIdError; } });
|
|
22
|
+
Object.defineProperty(exports, "UnsupportedTokenError", { enumerable: true, get: function () { return error_1.UnsupportedTokenError; } });
|
|
12
23
|
const registry_1 = require("./registry");
|
|
13
24
|
Object.defineProperty(exports, "getHookAddress", { enumerable: true, get: function () { return registry_1.getHookAddress; } });
|
|
14
25
|
Object.defineProperty(exports, "getRhinestoneSpokePoolAddress", { enumerable: true, get: function () { return registry_1.getRhinestoneSpokePoolAddress; } });
|
|
@@ -83,7 +83,7 @@ interface MetaIntentBase {
|
|
|
83
83
|
targetAccount: Address;
|
|
84
84
|
targetChainId: number;
|
|
85
85
|
targetGasUnits?: bigint;
|
|
86
|
-
tokenTransfers
|
|
86
|
+
tokenTransfers?: TokenTransfer[];
|
|
87
87
|
accountAccessList?: AccountAccessList;
|
|
88
88
|
lockMode?: LockMode;
|
|
89
89
|
omniLock?: boolean;
|
|
@@ -175,7 +175,7 @@ interface OrderFeeInput {
|
|
|
175
175
|
verificationGasLimit: bigint;
|
|
176
176
|
preVerificationGas: bigint;
|
|
177
177
|
};
|
|
178
|
-
tokenTransfers
|
|
178
|
+
tokenTransfers?: {
|
|
179
179
|
tokenAddress: Address;
|
|
180
180
|
amount?: bigint;
|
|
181
181
|
}[];
|