@rhinestone/sdk 2.0.0-beta.41 → 2.0.0-beta.42
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/errors/index.d.ts +4 -4
- package/dist/src/errors/index.d.ts.map +1 -1
- package/dist/src/errors/index.js +2 -2
- package/dist/src/execution/index.d.ts +1 -0
- package/dist/src/execution/index.d.ts.map +1 -1
- package/dist/src/execution/index.js +3 -3
- package/dist/src/execution/utils.d.ts +1 -1
- package/dist/src/execution/utils.d.ts.map +1 -1
- package/dist/src/execution/utils.js +8 -3
- package/dist/src/orchestrator/consts.d.ts +1 -1
- package/dist/src/orchestrator/consts.js +1 -1
- package/dist/src/orchestrator/error.d.ts +67 -2
- package/dist/src/orchestrator/error.d.ts.map +1 -1
- package/dist/src/orchestrator/error.js +123 -6
- package/dist/src/orchestrator/index.d.ts +4 -4
- package/dist/src/orchestrator/index.d.ts.map +1 -1
- package/dist/src/orchestrator/index.js +2 -2
- package/dist/src/orchestrator/types.d.ts +6 -0
- package/dist/src/orchestrator/types.d.ts.map +1 -1
- package/dist/src/orchestrator/wire.gen.d.ts +1486 -27
- package/dist/src/orchestrator/wire.gen.d.ts.map +1 -1
- package/dist/src/types.d.ts +10 -0
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AccountConfigurationNotSupportedError, AccountError, DefaultValidatorAlreadyInitializedError, Eip712DomainNotAvailableError, Eip7702AccountMustHaveEoaError, Eip7702NotSupportedForAccountError, EoaAccountMustHaveAccountError, EoaSigningMethodNotConfiguredError, EoaSigningNotSupportedError, FactoryArgsNotAvailableError, isAccountError, ModuleInstallationNotSupportedError, OwnersFieldRequiredError, SigningNotSupportedForAccountError, WalletClientNoConnectedAccountError } from '../accounts/index.js';
|
|
2
2
|
import { Eip7702InitSignatureRequiredError, ExecutionError, IndependentSigningNotSupportedError, InsufficientOwnerSignaturesError, IntentFailedError, InvalidOwnerSigningOptionsError, InvalidSourceCallsError, isExecutionError, MismatchedOwnerSignaturesError, OrderPathRequiredForIntentsError, QuoteNotInPreparedTransactionError, UnknownOwnerError } from '../execution/index.js';
|
|
3
|
-
import type { ErrorDetail } from '../orchestrator/index.js';
|
|
4
|
-
import { ConflictError, ExternalServiceTimeoutError, ForbiddenError, InsufficientLiquidityError, InternalServerError, isAuthError, isOrchestratorError, isRateLimited, isRetryable, isSimulationFailed, isValidationError, KeyScopeDeniedError, NotFoundError, OrchestratorError, RateLimitedError, RelayerMarketUnavailableError, SettlementExecutionError, SettlementQuoteError, SimulationFailedError, UnauthorizedError, UnprocessableContentError, UnsupportedChainError, UnsupportedTokenError, ValidationError } from '../orchestrator/index.js';
|
|
5
|
-
export type { ErrorDetail };
|
|
6
|
-
export { isAccountError, AccountError, AccountConfigurationNotSupportedError, DefaultValidatorAlreadyInitializedError, Eip712DomainNotAvailableError, Eip7702AccountMustHaveEoaError, Eip7702NotSupportedForAccountError, EoaAccountMustHaveAccountError, EoaSigningMethodNotConfiguredError, EoaSigningNotSupportedError, FactoryArgsNotAvailableError, ModuleInstallationNotSupportedError, OwnersFieldRequiredError, SigningNotSupportedForAccountError, WalletClientNoConnectedAccountError, isExecutionError, ExecutionError, Eip7702InitSignatureRequiredError, IndependentSigningNotSupportedError, InsufficientOwnerSignaturesError, IntentFailedError, InvalidOwnerSigningOptionsError, InvalidSourceCallsError, MismatchedOwnerSignaturesError, OrderPathRequiredForIntentsError, QuoteNotInPreparedTransactionError, UnknownOwnerError, isOrchestratorError, isRetryable, isAuthError, isValidationError, isRateLimited, isSimulationFailed, ConflictError, ExternalServiceTimeoutError, ForbiddenError, InsufficientLiquidityError, InternalServerError, KeyScopeDeniedError, NotFoundError, OrchestratorError, RateLimitedError, RelayerMarketUnavailableError, SimulationFailedError, SettlementExecutionError, SettlementQuoteError, UnauthorizedError, UnprocessableContentError, ValidationError, UnsupportedChainError, UnsupportedTokenError, };
|
|
3
|
+
import type { ErrorDetail, SponsorLimitKey } from '../orchestrator/index.js';
|
|
4
|
+
import { ConflictError, ExternalServiceTimeoutError, ForbiddenError, InsufficientLiquidityError, InsufficientSponsorBalanceError, InternalServerError, isAuthError, isInsufficientSponsorBalance, isOrchestratorError, isRateLimited, isRetryable, isSimulationFailed, isSponsorError, isSponsorLimitExceeded, isValidationError, KeyScopeDeniedError, NotFoundError, OrchestratorError, RateLimitedError, RelayerMarketUnavailableError, SettlementExecutionError, SettlementQuoteError, SimulationFailedError, SponsorLimitExceededError, UnauthorizedError, UnprocessableContentError, UnsupportedChainError, UnsupportedTokenError, ValidationError } from '../orchestrator/index.js';
|
|
5
|
+
export type { ErrorDetail, SponsorLimitKey };
|
|
6
|
+
export { isAccountError, AccountError, AccountConfigurationNotSupportedError, DefaultValidatorAlreadyInitializedError, Eip712DomainNotAvailableError, Eip7702AccountMustHaveEoaError, Eip7702NotSupportedForAccountError, EoaAccountMustHaveAccountError, EoaSigningMethodNotConfiguredError, EoaSigningNotSupportedError, FactoryArgsNotAvailableError, ModuleInstallationNotSupportedError, OwnersFieldRequiredError, SigningNotSupportedForAccountError, WalletClientNoConnectedAccountError, isExecutionError, ExecutionError, Eip7702InitSignatureRequiredError, IndependentSigningNotSupportedError, InsufficientOwnerSignaturesError, IntentFailedError, InvalidOwnerSigningOptionsError, InvalidSourceCallsError, MismatchedOwnerSignaturesError, OrderPathRequiredForIntentsError, QuoteNotInPreparedTransactionError, UnknownOwnerError, isOrchestratorError, isRetryable, isAuthError, isValidationError, isRateLimited, isSimulationFailed, isSponsorLimitExceeded, isInsufficientSponsorBalance, isSponsorError, ConflictError, ExternalServiceTimeoutError, ForbiddenError, InsufficientLiquidityError, InsufficientSponsorBalanceError, InternalServerError, KeyScopeDeniedError, NotFoundError, OrchestratorError, RateLimitedError, RelayerMarketUnavailableError, SimulationFailedError, SettlementExecutionError, SettlementQuoteError, SponsorLimitExceededError, UnauthorizedError, UnprocessableContentError, ValidationError, UnsupportedChainError, UnsupportedTokenError, };
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../errors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qCAAqC,EACrC,YAAY,EACZ,uCAAuC,EACvC,6BAA6B,EAC7B,8BAA8B,EAC9B,kCAAkC,EAClC,8BAA8B,EAC9B,kCAAkC,EAClC,2BAA2B,EAC3B,4BAA4B,EAC5B,cAAc,EACd,mCAAmC,EACnC,wBAAwB,EACxB,kCAAkC,EAClC,mCAAmC,EACpC,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,iCAAiC,EACjC,cAAc,EACd,mCAAmC,EACnC,gCAAgC,EAChC,iBAAiB,EACjB,+BAA+B,EAC/B,uBAAuB,EACvB,gBAAgB,EAChB,8BAA8B,EAC9B,gCAAgC,EAChC,kCAAkC,EAClC,iBAAiB,EAClB,MAAM,cAAc,CAAA;AACrB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../errors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qCAAqC,EACrC,YAAY,EACZ,uCAAuC,EACvC,6BAA6B,EAC7B,8BAA8B,EAC9B,kCAAkC,EAClC,8BAA8B,EAC9B,kCAAkC,EAClC,2BAA2B,EAC3B,4BAA4B,EAC5B,cAAc,EACd,mCAAmC,EACnC,wBAAwB,EACxB,kCAAkC,EAClC,mCAAmC,EACpC,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,iCAAiC,EACjC,cAAc,EACd,mCAAmC,EACnC,gCAAgC,EAChC,iBAAiB,EACjB,+BAA+B,EAC/B,uBAAuB,EACvB,gBAAgB,EAChB,8BAA8B,EAC9B,gCAAgC,EAChC,kCAAkC,EAClC,iBAAiB,EAClB,MAAM,cAAc,CAAA;AACrB,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,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yBAAyB,EACzB,iBAAiB,EACjB,yBAAyB,EACzB,eAAe,EAEf,qBAAqB,EACrB,qBAAqB,GACtB,CAAA"}
|
package/dist/src/errors/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { AccountConfigurationNotSupportedError, AccountError, DefaultValidatorAlreadyInitializedError, Eip712DomainNotAvailableError, Eip7702AccountMustHaveEoaError, Eip7702NotSupportedForAccountError, EoaAccountMustHaveAccountError, EoaSigningMethodNotConfiguredError, EoaSigningNotSupportedError, FactoryArgsNotAvailableError, isAccountError, ModuleInstallationNotSupportedError, OwnersFieldRequiredError, SigningNotSupportedForAccountError, WalletClientNoConnectedAccountError, } from '../accounts/index.js';
|
|
2
2
|
import { Eip7702InitSignatureRequiredError, ExecutionError, IndependentSigningNotSupportedError, InsufficientOwnerSignaturesError, IntentFailedError, InvalidOwnerSigningOptionsError, InvalidSourceCallsError, isExecutionError, MismatchedOwnerSignaturesError, OrderPathRequiredForIntentsError, QuoteNotInPreparedTransactionError, UnknownOwnerError, } from '../execution/index.js';
|
|
3
|
-
import { ConflictError, ExternalServiceTimeoutError, ForbiddenError, InsufficientLiquidityError, InternalServerError, isAuthError, isOrchestratorError, isRateLimited, isRetryable, isSimulationFailed, isValidationError, KeyScopeDeniedError, NotFoundError, OrchestratorError, RateLimitedError, RelayerMarketUnavailableError, SettlementExecutionError, SettlementQuoteError, SimulationFailedError, UnauthorizedError, UnprocessableContentError, UnsupportedChainError, UnsupportedTokenError, ValidationError, } from '../orchestrator/index.js';
|
|
3
|
+
import { ConflictError, ExternalServiceTimeoutError, ForbiddenError, InsufficientLiquidityError, InsufficientSponsorBalanceError, InternalServerError, isAuthError, isInsufficientSponsorBalance, isOrchestratorError, isRateLimited, isRetryable, isSimulationFailed, isSponsorError, isSponsorLimitExceeded, isValidationError, KeyScopeDeniedError, NotFoundError, OrchestratorError, RateLimitedError, RelayerMarketUnavailableError, SettlementExecutionError, SettlementQuoteError, SimulationFailedError, SponsorLimitExceededError, UnauthorizedError, UnprocessableContentError, UnsupportedChainError, UnsupportedTokenError, ValidationError, } from '../orchestrator/index.js';
|
|
4
4
|
export {
|
|
5
5
|
// Account
|
|
6
6
|
isAccountError, AccountError, AccountConfigurationNotSupportedError, DefaultValidatorAlreadyInitializedError, Eip712DomainNotAvailableError, Eip7702AccountMustHaveEoaError, Eip7702NotSupportedForAccountError, EoaAccountMustHaveAccountError, EoaSigningMethodNotConfiguredError, EoaSigningNotSupportedError, FactoryArgsNotAvailableError, ModuleInstallationNotSupportedError, OwnersFieldRequiredError, SigningNotSupportedForAccountError, WalletClientNoConnectedAccountError,
|
|
7
7
|
// Execution
|
|
8
8
|
isExecutionError, ExecutionError, Eip7702InitSignatureRequiredError, IndependentSigningNotSupportedError, InsufficientOwnerSignaturesError, IntentFailedError, InvalidOwnerSigningOptionsError, InvalidSourceCallsError, MismatchedOwnerSignaturesError, OrderPathRequiredForIntentsError, QuoteNotInPreparedTransactionError, UnknownOwnerError,
|
|
9
9
|
// Orchestrator
|
|
10
|
-
isOrchestratorError, isRetryable, isAuthError, isValidationError, isRateLimited, isSimulationFailed, ConflictError, ExternalServiceTimeoutError, ForbiddenError, InsufficientLiquidityError, InternalServerError, KeyScopeDeniedError, NotFoundError, OrchestratorError, RateLimitedError, RelayerMarketUnavailableError, SimulationFailedError, SettlementExecutionError, SettlementQuoteError, UnauthorizedError, UnprocessableContentError, ValidationError,
|
|
10
|
+
isOrchestratorError, isRetryable, isAuthError, isValidationError, isRateLimited, isSimulationFailed, isSponsorLimitExceeded, isInsufficientSponsorBalance, isSponsorError, ConflictError, ExternalServiceTimeoutError, ForbiddenError, InsufficientLiquidityError, InsufficientSponsorBalanceError, InternalServerError, KeyScopeDeniedError, NotFoundError, OrchestratorError, RateLimitedError, RelayerMarketUnavailableError, SimulationFailedError, SettlementExecutionError, SettlementQuoteError, SponsorLimitExceededError, UnauthorizedError, UnprocessableContentError, ValidationError,
|
|
11
11
|
// Registry (SDK-local validation)
|
|
12
12
|
UnsupportedChainError, UnsupportedTokenError, };
|
|
@@ -29,6 +29,7 @@ declare function sendTransactionInternal(config: RhinestoneConfig, sourceChains:
|
|
|
29
29
|
settlementLayers?: SettlementLayerFilter;
|
|
30
30
|
sourceAssets?: SourceAssetInput;
|
|
31
31
|
appFees?: AppFeeRate;
|
|
32
|
+
customDeadline?: number;
|
|
32
33
|
}): Promise<TransactionResult>;
|
|
33
34
|
declare function sendUserOperationInternal(config: RhinestoneConfig, chain: Chain, callInputs: CalldataInput[], signers?: SignerSet): Promise<UserOperationResult>;
|
|
34
35
|
declare function waitForExecution(config: RhinestoneConfig, result: TransactionResult | UserOperationResult): Promise<TransactionStatus | UserOperationReceipt>;
|
|
@@ -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,0BAA0B,CAAA;AAGpE,OAAO,EAAE,KAAK,YAAY,EAAsB,MAAM,kBAAkB,CAAA;AACxE,OAAO,EAIL,KAAK,cAAc,EAInB,KAAK,iBAAiB,EACvB,MAAM,iBAAiB,CAAA;AAOxB,OAAO,KAAK,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAC9E,OAAO,KAAK,EACV,aAAa,EACb,SAAS,EAET,uBAAuB,EACvB,gBAAgB,EAChB,SAAS,EACT,gBAAgB,EAChB,eAAe,EACf,WAAW,EACX,YAAY,EACZ,wBAAwB,EACzB,MAAM,UAAU,CAAA;AACjB,OAAO,EACL,iCAAiC,EACjC,cAAc,EACd,mCAAmC,EACnC,gCAAgC,EAChC,iBAAiB,EACjB,+BAA+B,EAC/B,uBAAuB,EACvB,gBAAgB,EAChB,8BAA8B,EAC9B,gCAAgC,EAChC,kCAAkC,EAClC,iB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,EAAE,YAAY,EAC1B,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,KAAK,EAAE,iBAAiB,EACxB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,yDAIjC;AAED,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,yBAAyB,EACzB,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,YAAY,EAEZ,gBAAgB,EAChB,cAAc,EACd,iCAAiC,EACjC,mCAAmC,EACnC,gCAAgC,EAChC,iBAAiB,EACjB,+BAA+B,EAC/B,uBAAuB,EACvB,8BAA8B,EAC9B,gCAAgC,EAChC,kCAAkC,EAClC,iBAAiB,GAClB,CAAA;AACD,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,CAAA"}
|
|
@@ -20,7 +20,7 @@ async function sendTransactionInternal(config, sourceChains, targetChain, option
|
|
|
20
20
|
const accountAddress = getAddress(config);
|
|
21
21
|
const resolvedCalls = await resolveCallInputs(options.callInputs, config, targetChain, accountAddress);
|
|
22
22
|
const tokenRequests = getTokenRequests(targetChain, options.initialTokenRequests);
|
|
23
|
-
return await sendTransactionAsIntent(config, sourceChains, targetChain, resolvedCalls, options.gasLimit, tokenRequests, options.recipient, options.signers, options.sponsored, options.eip7702InitSignature, options.settlementLayers, options.sourceAssets, options.sourceCalls, options.appFees);
|
|
23
|
+
return await sendTransactionAsIntent(config, sourceChains, targetChain, resolvedCalls, options.gasLimit, tokenRequests, options.recipient, options.signers, options.sponsored, options.eip7702InitSignature, options.settlementLayers, options.sourceAssets, options.sourceCalls, options.appFees, options.customDeadline);
|
|
24
24
|
}
|
|
25
25
|
async function sendUserOperationInternal(config, chain, callInputs, signers) {
|
|
26
26
|
// Make sure the account is deployed
|
|
@@ -45,8 +45,8 @@ async function sendUserOperationInternal(config, chain, callInputs, signers) {
|
|
|
45
45
|
chain: chain.id,
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
-
async function sendTransactionAsIntent(config, sourceChains, targetChain, callInputs, gasLimit, tokenRequests, recipient, signers, sponsored, eip7702InitSignature, settlementLayers, sourceAssets, sourceCalls, appFees) {
|
|
49
|
-
const prepared = await prepareTransactionAsIntent(config, sourceChains, targetChain, callInputs, gasLimit, tokenRequests, recipient, sponsored ?? false, eip7702InitSignature, settlementLayers, sourceAssets, undefined, undefined, signers, sourceCalls, appFees);
|
|
48
|
+
async function sendTransactionAsIntent(config, sourceChains, targetChain, callInputs, gasLimit, tokenRequests, recipient, signers, sponsored, eip7702InitSignature, settlementLayers, sourceAssets, sourceCalls, appFees, customDeadline) {
|
|
49
|
+
const prepared = await prepareTransactionAsIntent(config, sourceChains, targetChain, callInputs, gasLimit, tokenRequests, recipient, sponsored ?? false, eip7702InitSignature, settlementLayers, sourceAssets, undefined, undefined, signers, sourceCalls, appFees, customDeadline);
|
|
50
50
|
if (!prepared) {
|
|
51
51
|
throw new OrderPathRequiredForIntentsError();
|
|
52
52
|
}
|
|
@@ -134,7 +134,7 @@ declare function prepareTransactionAsIntent(config: RhinestoneConfig, sourceChai
|
|
|
134
134
|
to: Address;
|
|
135
135
|
data: Hex;
|
|
136
136
|
}[];
|
|
137
|
-
} | undefined, signers: SignerSet | undefined, sourceCalls?: Record<number, SourceCallInput[]>, appFees?: AppFeeRate): Promise<{
|
|
137
|
+
} | undefined, signers: SignerSet | undefined, sourceCalls?: Record<number, SourceCallInput[]>, appFees?: AppFeeRate, customDeadline?: number): Promise<{
|
|
138
138
|
quotes: {
|
|
139
139
|
traceId: string;
|
|
140
140
|
best: Quote;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../execution/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,KAAK,EAMV,KAAK,uBAAuB,EAC5B,KAAK,GAAG,EAOR,KAAK,YAAY,EAGjB,KAAK,eAAe,EAC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GAAG,IAAI,EAAE,CAQnE;AA4LD,iBAAS,6BAA6B,CAAC,EACrC,MAAM,EACN,KAAK,EACL,WAAW,EACX,OAAO,EACP,cAAc,GACf,EAAE;IACD,MAAM,EAAE,eAAe,CAAA;IACvB,KAAK,EAAE,SAAS,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAChC,cAAc,EAAE;QACd,IAAI,EAAE,MAAM,CAAA;QACZ,OAAO,EAAE,MAAM,CAAA;QACf,OAAO,EAAE,MAAM,CAAA;QACf,iBAAiB,EAAE,OAAO,CAAA;QAC1B,IAAI,EAAE,GAAG,CAAA;KACV,CAAA;CACF,GAAG,GAAG,CAsFN;AAED,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,0BAA0B,EAC1B,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,UAAU,EACV,0BAA0B,EAC1B,oBAAoB,EACpB,mBAAmB,EACnB,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,2BAA2B,EAC3B,6BAA6B,EAC7B,sBAAsB,EACtB,oBAAoB,GACrB,CAAA;AACD,YAAY,EACV,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,uBAAuB,EACvB,yBAAyB,EACzB,qBAAqB,EACrB,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,GACpB,CAAA"}
|
|
@@ -93,7 +93,7 @@ function resolveSessionForChain(signers, chainId) {
|
|
|
93
93
|
return { session: signers.session, enableData: signers.enableData };
|
|
94
94
|
}
|
|
95
95
|
async function prepareTransaction(config, transaction) {
|
|
96
|
-
const { sourceChains, targetChain, tokenRequests, signers, sponsored, eip7702InitSignature, settlementLayers, sourceAssets, auxiliaryFunds, appFees, account, recipient, sourceCalls, } = getTransactionParams(transaction);
|
|
96
|
+
const { sourceChains, targetChain, tokenRequests, signers, sponsored, eip7702InitSignature, settlementLayers, sourceAssets, auxiliaryFunds, appFees, customDeadline, account, recipient, sourceCalls, } = getTransactionParams(transaction);
|
|
97
97
|
const accountAddress = getAddress(config);
|
|
98
98
|
// Destination calls (transaction.calls on a cross-chain transaction) are
|
|
99
99
|
// executed on the destination chain by the solver/account. For non-EVM
|
|
@@ -109,7 +109,7 @@ async function prepareTransaction(config, transaction) {
|
|
|
109
109
|
else {
|
|
110
110
|
resolvedCalls = await resolveCallInputs(transaction.calls, config, targetChain, accountAddress);
|
|
111
111
|
}
|
|
112
|
-
const prepared = await prepareTransactionAsIntent(config, sourceChains, targetChain, resolvedCalls, transaction.gasLimit, tokenRequests, recipient, sponsored, eip7702InitSignature, settlementLayers, sourceAssets, auxiliaryFunds, account, signers, sourceCalls, appFees);
|
|
112
|
+
const prepared = await prepareTransactionAsIntent(config, sourceChains, targetChain, resolvedCalls, transaction.gasLimit, tokenRequests, recipient, sponsored, eip7702InitSignature, settlementLayers, sourceAssets, auxiliaryFunds, account, signers, sourceCalls, appFees, customDeadline);
|
|
113
113
|
return {
|
|
114
114
|
quotes: prepared.quotes,
|
|
115
115
|
intentInput: prepared.intentInput,
|
|
@@ -730,6 +730,9 @@ function getTransactionParams(transaction) {
|
|
|
730
730
|
const sourceAssets = transaction.sourceAssets;
|
|
731
731
|
const auxiliaryFunds = transaction.auxiliaryFunds;
|
|
732
732
|
const appFees = transaction.appFees;
|
|
733
|
+
// customDeadline lives only on same-chain transactions (see types.ts) — it's
|
|
734
|
+
// meaningless cross-chain, so narrow before reading it.
|
|
735
|
+
const customDeadline = 'chain' in transaction ? transaction.customDeadline : undefined;
|
|
733
736
|
const account = transaction.experimental_accountOverride;
|
|
734
737
|
const recipient = transaction.recipient;
|
|
735
738
|
const sourceCalls = transaction.sourceCalls;
|
|
@@ -746,6 +749,7 @@ function getTransactionParams(transaction) {
|
|
|
746
749
|
sourceAssets,
|
|
747
750
|
auxiliaryFunds,
|
|
748
751
|
appFees,
|
|
752
|
+
customDeadline,
|
|
749
753
|
account,
|
|
750
754
|
recipient,
|
|
751
755
|
sourceCalls,
|
|
@@ -833,7 +837,7 @@ function addProvidedFunds(auxiliaryFunds, chainId, calls) {
|
|
|
833
837
|
}
|
|
834
838
|
return next;
|
|
835
839
|
}
|
|
836
|
-
async function prepareTransactionAsIntent(config, sourceChains, targetChain, callInputs, gasLimit, tokenRequests, recipientInput, sponsored, eip7702InitSignature, settlementLayers, sourceAssets, auxiliaryFunds, account, signers, sourceCalls, appFees) {
|
|
840
|
+
async function prepareTransactionAsIntent(config, sourceChains, targetChain, callInputs, gasLimit, tokenRequests, recipientInput, sponsored, eip7702InitSignature, settlementLayers, sourceAssets, auxiliaryFunds, account, signers, sourceCalls, appFees, customDeadline) {
|
|
837
841
|
const targetChainId = getChainId(targetChain);
|
|
838
842
|
const calls = parseCalls(callInputs, targetChainId);
|
|
839
843
|
const accountAccessList = createAccountAccessList(sourceChains, sourceAssets);
|
|
@@ -1005,6 +1009,7 @@ async function prepareTransactionAsIntent(config, sourceChains, targetChain, cal
|
|
|
1005
1009
|
signatureMode,
|
|
1006
1010
|
auxiliaryFunds: combinedAuxiliaryFunds,
|
|
1007
1011
|
appFees,
|
|
1012
|
+
customDeadline,
|
|
1008
1013
|
},
|
|
1009
1014
|
...(Object.keys(preClaimExecutions).length > 0 && { preClaimExecutions }),
|
|
1010
1015
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const PROD_ORCHESTRATOR_URL = "https://v1.orchestrator.rhinestone.dev";
|
|
2
2
|
declare const RHINESTONE_SPOKE_POOL_ADDRESS = "0x000000000060f6e853447881951574cdd0663530";
|
|
3
|
-
declare const SDK_VERSION = "2.0.0-beta.
|
|
3
|
+
declare const SDK_VERSION = "2.0.0-beta.42";
|
|
4
4
|
declare const API_VERSION = "2026-04.blanc";
|
|
5
5
|
export { PROD_ORCHESTRATOR_URL, RHINESTONE_SPOKE_POOL_ADDRESS, SDK_VERSION, API_VERSION, };
|
|
6
6
|
//# sourceMappingURL=consts.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const PROD_ORCHESTRATOR_URL = 'https://v1.orchestrator.rhinestone.dev';
|
|
2
2
|
const RHINESTONE_SPOKE_POOL_ADDRESS = '0x000000000060f6e853447881951574cdd0663530';
|
|
3
|
-
const SDK_VERSION = '2.0.0-beta.
|
|
3
|
+
const SDK_VERSION = '2.0.0-beta.42';
|
|
4
4
|
const API_VERSION = '2026-04.blanc';
|
|
5
5
|
export { PROD_ORCHESTRATOR_URL, RHINESTONE_SPOKE_POOL_ADDRESS, SDK_VERSION, API_VERSION, };
|
|
@@ -108,6 +108,67 @@ declare class UnprocessableContentError extends OrchestratorError {
|
|
|
108
108
|
details?: ErrorDetail[];
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
|
+
/** Per-client sponsorship cap a quote can breach. Mirrors the orchestrator's
|
|
112
|
+
* `SponsorLimits` keys: per-intent gas, per-intent bridge fee, or the
|
|
113
|
+
* per-intent aggregate. */
|
|
114
|
+
declare const SPONSOR_LIMIT_KEYS: readonly ["gasPerIntentUSD", "bridgeFeePerIntentUSD", "perIntentUSD"];
|
|
115
|
+
type SponsorLimitKey = (typeof SPONSOR_LIMIT_KEYS)[number];
|
|
116
|
+
/**
|
|
117
|
+
* A configured per-client sponsorship cap was exceeded by a quote.
|
|
118
|
+
*
|
|
119
|
+
* A `422 UNPROCESSABLE_CONTENT` specialization: the integrator's sponsor
|
|
120
|
+
* policy sets a per-intent USD ceiling (gas, bridge-fee, or aggregate) and
|
|
121
|
+
* this quote's sponsored coverage would exceed it. Distinct from
|
|
122
|
+
* {@link InsufficientSponsorBalanceError} (a funds shortfall) — a cap breach
|
|
123
|
+
* is deterministic and does NOT clear by topping up the sponsorship balance;
|
|
124
|
+
* the cap itself must be raised or the intent made cheaper.
|
|
125
|
+
*
|
|
126
|
+
* Extends {@link UnprocessableContentError} and keeps `code` as
|
|
127
|
+
* `'UNPROCESSABLE_CONTENT'` (the wire does not yet carry a dedicated code), so
|
|
128
|
+
* existing handling of that error still catches it. `sponsorAddress` is
|
|
129
|
+
* populated only for the pre-fold check; the post-fold multi-candidate
|
|
130
|
+
* rejection omits it, so treat every field as best-effort.
|
|
131
|
+
*/
|
|
132
|
+
declare class SponsorLimitExceededError extends UnprocessableContentError {
|
|
133
|
+
readonly limitKey?: SponsorLimitKey;
|
|
134
|
+
readonly capUsd?: number;
|
|
135
|
+
readonly coverageUsd?: number;
|
|
136
|
+
readonly sponsorAddress?: string;
|
|
137
|
+
constructor(params: BaseErrorParams & {
|
|
138
|
+
details?: ErrorDetail[];
|
|
139
|
+
limitKey?: SponsorLimitKey;
|
|
140
|
+
capUsd?: number;
|
|
141
|
+
coverageUsd?: number;
|
|
142
|
+
sponsorAddress?: string;
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* The sponsor's prefunded balance cannot cover the sponsored categories for a
|
|
147
|
+
* quote.
|
|
148
|
+
*
|
|
149
|
+
* A `422 UNPROCESSABLE_CONTENT` specialization. Coverage is all-or-nothing:
|
|
150
|
+
* `failedCategories` lists the enabled categories (`gas`, `bridgeFee`,
|
|
151
|
+
* `swapFee`) that could not be covered. Unlike
|
|
152
|
+
* {@link SponsorLimitExceededError} (a configured policy cap), this clears once
|
|
153
|
+
* the sponsorship balance is topped up.
|
|
154
|
+
*
|
|
155
|
+
* Extends {@link UnprocessableContentError} and keeps `code` as
|
|
156
|
+
* `'UNPROCESSABLE_CONTENT'`, so existing handling of that error still catches
|
|
157
|
+
* it.
|
|
158
|
+
*/
|
|
159
|
+
declare class InsufficientSponsorBalanceError extends UnprocessableContentError {
|
|
160
|
+
readonly failedCategories: string[];
|
|
161
|
+
readonly sponsorAddress?: string;
|
|
162
|
+
readonly remainingBalanceUsd?: number;
|
|
163
|
+
readonly totalSponsoredUsd?: number;
|
|
164
|
+
constructor(params: BaseErrorParams & {
|
|
165
|
+
details?: ErrorDetail[];
|
|
166
|
+
failedCategories?: string[];
|
|
167
|
+
sponsorAddress?: string;
|
|
168
|
+
remainingBalanceUsd?: number;
|
|
169
|
+
totalSponsoredUsd?: number;
|
|
170
|
+
});
|
|
171
|
+
}
|
|
111
172
|
declare class RateLimitedError extends OrchestratorError {
|
|
112
173
|
readonly retryAfter?: string;
|
|
113
174
|
constructor(params: BaseErrorParams & {
|
|
@@ -166,6 +227,10 @@ declare function isRateLimited(error: unknown): error is RateLimitedError;
|
|
|
166
227
|
declare function isValidationError(error: unknown): error is ValidationError;
|
|
167
228
|
declare function isAuthError(error: unknown): error is UnauthorizedError | ForbiddenError;
|
|
168
229
|
declare function isSimulationFailed(error: unknown): error is SimulationFailedError;
|
|
230
|
+
declare function isSponsorLimitExceeded(error: unknown): error is SponsorLimitExceededError;
|
|
231
|
+
declare function isInsufficientSponsorBalance(error: unknown): error is InsufficientSponsorBalanceError;
|
|
232
|
+
/** Either sponsor failure: a configured cap breach or a balance shortfall. */
|
|
233
|
+
declare function isSponsorError(error: unknown): error is SponsorLimitExceededError | InsufficientSponsorBalanceError;
|
|
169
234
|
declare function isRetryable(error: unknown): boolean;
|
|
170
235
|
/**
|
|
171
236
|
* Detects transport-level failures (connection reset, socket closed, DNS, TLS)
|
|
@@ -182,6 +247,6 @@ declare function isRetryable(error: unknown): boolean;
|
|
|
182
247
|
* aborts are excluded so deadlines/cancellation still propagate.
|
|
183
248
|
*/
|
|
184
249
|
declare function isConnectionError(error: unknown): boolean;
|
|
185
|
-
export type { ErrorCode, ErrorDetail, ErrorEnvelope, SimulationAction, SimulationCall, SimulationDetails, SimulationErrorCategory, SimulationFailureDetails, SimulationFailureSimulation, SimulationRetryHint, ValidationIssue, };
|
|
186
|
-
export { parseErrorEnvelope, isOrchestratorError, isRetryable, isConnectionError, isAuthError, isValidationError, isRateLimited, isSimulationFailed, OrchestratorError, ValidationError, InsufficientLiquidityError, NotFoundError, UnauthorizedError, ForbiddenError, KeyScopeDeniedError, ConflictError, UnprocessableContentError, RateLimitedError, SettlementQuoteError, SettlementExecutionError, SimulationFailedError, ExternalServiceTimeoutError, RelayerMarketUnavailableError, InternalServerError, UnsupportedChainError, UnsupportedTokenError, };
|
|
250
|
+
export type { ErrorCode, ErrorDetail, ErrorEnvelope, SimulationAction, SimulationCall, SimulationDetails, SimulationErrorCategory, SimulationFailureDetails, SimulationFailureSimulation, SimulationRetryHint, SponsorLimitKey, ValidationIssue, };
|
|
251
|
+
export { parseErrorEnvelope, isOrchestratorError, isRetryable, isConnectionError, isAuthError, isValidationError, isRateLimited, isSimulationFailed, isSponsorLimitExceeded, isInsufficientSponsorBalance, isSponsorError, OrchestratorError, ValidationError, InsufficientLiquidityError, SponsorLimitExceededError, InsufficientSponsorBalanceError, NotFoundError, UnauthorizedError, ForbiddenError, KeyScopeDeniedError, ConflictError, UnprocessableContentError, RateLimitedError, SettlementQuoteError, SettlementExecutionError, SimulationFailedError, ExternalServiceTimeoutError, RelayerMarketUnavailableError, InternalServerError, UnsupportedChainError, UnsupportedTokenError, };
|
|
187
252
|
//# sourceMappingURL=error.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../orchestrator/error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAExC,KAAK,SAAS,GACV,kBAAkB,GAClB,wBAAwB,GACxB,WAAW,GACX,cAAc,GACd,WAAW,GACX,kBAAkB,GAClB,UAAU,GACV,uBAAuB,GACvB,mBAAmB,GACnB,wBAAwB,GACxB,4BAA4B,GAC5B,mBAAmB,GACnB,0BAA0B,GAC1B,4BAA4B,GAC5B,gBAAgB,CAAA;AAEpB,UAAU,eAAe;IACvB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAC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1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../orchestrator/error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAExC,KAAK,SAAS,GACV,kBAAkB,GAClB,wBAAwB,GACxB,WAAW,GACX,cAAc,GACd,WAAW,GACX,kBAAkB,GAClB,UAAU,GACV,uBAAuB,GACvB,mBAAmB,GACnB,wBAAwB,GACxB,4BAA4B,GAC5B,mBAAmB,GACnB,0BAA0B,GAC1B,4BAA4B,GAC5B,gBAAgB,CAAA;AAEpB,UAAU,eAAe;IACvB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAClC;AAED,UAAU,WAAW;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAClC;AAED,UAAU,eAAe;IACvB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,KAAK,gBAAgB,GAAG,OAAO,GAAG,MAAM,CAAA;AACxC,KAAK,mBAAmB,GAAG,YAAY,GAAG,aAAa,CAAA;AACvD,KAAK,uBAAuB,GACxB,eAAe,GACf,eAAe,GACf,gBAAgB,GAChB,wBAAwB,GACxB,yBAAyB,GACzB,mBAAmB,GACnB,2BAA2B,GAC3B,4BAA4B,GAC5B,gBAAgB,GAChB,sBAAsB,GACtB,wBAAwB,GACxB,yBAAyB,GACzB,sBAAsB,GACtB,qBAAqB,GACrB,kBAAkB,GAClB,cAAc,GACd,eAAe,GACf,mBAAmB,GACnB,OAAO,GACP,gBAAgB,GAChB,qBAAqB,GACrB,cAAc,CAAA;AAElB,UAAU,cAAc;IACtB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,EAAE,CAAC,EA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S,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CA0BlD;AAED,YAAY,EACV,SAAS,EACT,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,uBAAuB,EACvB,wBAAwB,EACxB,2BAA2B,EAC3B,mBAAmB,EACnB,eAAe,EACf,eAAe,GAChB,CAAA;AACD,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,WAAW,EACX,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,kBAAkB,EAClB,sBAAsB,EACtB,4BAA4B,EAC5B,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,0BAA0B,EAC1B,yBAAyB,EACzB,+BAA+B,EAC/B,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,yBAAyB,EACzB,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,EACxB,qBAAqB,EACrB,2BAA2B,EAC3B,6BAA6B,EAC7B,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,GACtB,CAAA"}
|
|
@@ -70,6 +70,70 @@ class UnprocessableContentError extends OrchestratorError {
|
|
|
70
70
|
this.details = params.details ?? [];
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
+
/** Per-client sponsorship cap a quote can breach. Mirrors the orchestrator's
|
|
74
|
+
* `SponsorLimits` keys: per-intent gas, per-intent bridge fee, or the
|
|
75
|
+
* per-intent aggregate. */
|
|
76
|
+
const SPONSOR_LIMIT_KEYS = [
|
|
77
|
+
'gasPerIntentUSD',
|
|
78
|
+
'bridgeFeePerIntentUSD',
|
|
79
|
+
'perIntentUSD',
|
|
80
|
+
];
|
|
81
|
+
/**
|
|
82
|
+
* A configured per-client sponsorship cap was exceeded by a quote.
|
|
83
|
+
*
|
|
84
|
+
* A `422 UNPROCESSABLE_CONTENT` specialization: the integrator's sponsor
|
|
85
|
+
* policy sets a per-intent USD ceiling (gas, bridge-fee, or aggregate) and
|
|
86
|
+
* this quote's sponsored coverage would exceed it. Distinct from
|
|
87
|
+
* {@link InsufficientSponsorBalanceError} (a funds shortfall) — a cap breach
|
|
88
|
+
* is deterministic and does NOT clear by topping up the sponsorship balance;
|
|
89
|
+
* the cap itself must be raised or the intent made cheaper.
|
|
90
|
+
*
|
|
91
|
+
* Extends {@link UnprocessableContentError} and keeps `code` as
|
|
92
|
+
* `'UNPROCESSABLE_CONTENT'` (the wire does not yet carry a dedicated code), so
|
|
93
|
+
* existing handling of that error still catches it. `sponsorAddress` is
|
|
94
|
+
* populated only for the pre-fold check; the post-fold multi-candidate
|
|
95
|
+
* rejection omits it, so treat every field as best-effort.
|
|
96
|
+
*/
|
|
97
|
+
class SponsorLimitExceededError extends UnprocessableContentError {
|
|
98
|
+
limitKey;
|
|
99
|
+
capUsd;
|
|
100
|
+
coverageUsd;
|
|
101
|
+
sponsorAddress;
|
|
102
|
+
constructor(params) {
|
|
103
|
+
super(params);
|
|
104
|
+
this.limitKey = params.limitKey;
|
|
105
|
+
this.capUsd = params.capUsd;
|
|
106
|
+
this.coverageUsd = params.coverageUsd;
|
|
107
|
+
this.sponsorAddress = params.sponsorAddress;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The sponsor's prefunded balance cannot cover the sponsored categories for a
|
|
112
|
+
* quote.
|
|
113
|
+
*
|
|
114
|
+
* A `422 UNPROCESSABLE_CONTENT` specialization. Coverage is all-or-nothing:
|
|
115
|
+
* `failedCategories` lists the enabled categories (`gas`, `bridgeFee`,
|
|
116
|
+
* `swapFee`) that could not be covered. Unlike
|
|
117
|
+
* {@link SponsorLimitExceededError} (a configured policy cap), this clears once
|
|
118
|
+
* the sponsorship balance is topped up.
|
|
119
|
+
*
|
|
120
|
+
* Extends {@link UnprocessableContentError} and keeps `code` as
|
|
121
|
+
* `'UNPROCESSABLE_CONTENT'`, so existing handling of that error still catches
|
|
122
|
+
* it.
|
|
123
|
+
*/
|
|
124
|
+
class InsufficientSponsorBalanceError extends UnprocessableContentError {
|
|
125
|
+
failedCategories;
|
|
126
|
+
sponsorAddress;
|
|
127
|
+
remainingBalanceUsd;
|
|
128
|
+
totalSponsoredUsd;
|
|
129
|
+
constructor(params) {
|
|
130
|
+
super(params);
|
|
131
|
+
this.failedCategories = params.failedCategories ?? [];
|
|
132
|
+
this.sponsorAddress = params.sponsorAddress;
|
|
133
|
+
this.remainingBalanceUsd = params.remainingBalanceUsd;
|
|
134
|
+
this.totalSponsoredUsd = params.totalSponsoredUsd;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
73
137
|
class RateLimitedError extends OrchestratorError {
|
|
74
138
|
retryAfter;
|
|
75
139
|
constructor(params) {
|
|
@@ -156,6 +220,9 @@ function stringValue(value) {
|
|
|
156
220
|
function booleanValue(value) {
|
|
157
221
|
return typeof value === 'boolean' ? value : undefined;
|
|
158
222
|
}
|
|
223
|
+
function numberValue(value) {
|
|
224
|
+
return typeof value === 'number' && Number.isFinite(value) ? value : undefined;
|
|
225
|
+
}
|
|
159
226
|
function recordValue(value) {
|
|
160
227
|
return isRecord(value) ? value : undefined;
|
|
161
228
|
}
|
|
@@ -272,6 +339,46 @@ function parseSimulationFailureDetails(details) {
|
|
|
272
339
|
: undefined,
|
|
273
340
|
};
|
|
274
341
|
}
|
|
342
|
+
/**
|
|
343
|
+
* Detect a sponsor-specific failure inside a generic `UNPROCESSABLE_CONTENT`
|
|
344
|
+
* envelope. The orchestrator collapses both sponsor errors onto that wire code
|
|
345
|
+
* and carries the distinguishing code plus structured fields in the first
|
|
346
|
+
* detail's `context`. This reads that (untyped) context defensively and mints
|
|
347
|
+
* the typed error; anything unrecognized returns `undefined` so the caller
|
|
348
|
+
* falls back to a plain {@link UnprocessableContentError}.
|
|
349
|
+
*
|
|
350
|
+
* Interim: keyed on `details[0].context.code`, which is not part of the formal
|
|
351
|
+
* wire schema. If the orchestrator stops emitting it, detection degrades to the
|
|
352
|
+
* generic error (non-breaking). Superseded once a dedicated wire code ships.
|
|
353
|
+
*/
|
|
354
|
+
function parseSponsorError(base, details) {
|
|
355
|
+
const context = details[0]?.context;
|
|
356
|
+
if (!context) {
|
|
357
|
+
return undefined;
|
|
358
|
+
}
|
|
359
|
+
switch (stringValue(context.code)) {
|
|
360
|
+
case 'SPONSOR_LIMIT_EXCEEDED':
|
|
361
|
+
return new SponsorLimitExceededError({
|
|
362
|
+
...base,
|
|
363
|
+
details,
|
|
364
|
+
limitKey: oneOf(context.limitKey, SPONSOR_LIMIT_KEYS),
|
|
365
|
+
capUsd: numberValue(context.capUSD),
|
|
366
|
+
coverageUsd: numberValue(context.coverageUSD),
|
|
367
|
+
sponsorAddress: stringValue(context.sponsorAddress),
|
|
368
|
+
});
|
|
369
|
+
case 'INSUFFICIENT_SPONSOR_BALANCE':
|
|
370
|
+
return new InsufficientSponsorBalanceError({
|
|
371
|
+
...base,
|
|
372
|
+
details,
|
|
373
|
+
failedCategories: stringArrayValue(context.failedCategories),
|
|
374
|
+
sponsorAddress: stringValue(context.sponsorAddress),
|
|
375
|
+
remainingBalanceUsd: numberValue(context.remainingBalanceUSD),
|
|
376
|
+
totalSponsoredUsd: numberValue(context.totalSponsoredUSD),
|
|
377
|
+
});
|
|
378
|
+
default:
|
|
379
|
+
return undefined;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
275
382
|
function parseErrorEnvelope(envelope, statusCode, retryAfter) {
|
|
276
383
|
const base = {
|
|
277
384
|
message: envelope.message,
|
|
@@ -313,11 +420,11 @@ function parseErrorEnvelope(envelope, statusCode, retryAfter) {
|
|
|
313
420
|
}
|
|
314
421
|
case 'CONFLICT':
|
|
315
422
|
return new ConflictError(base);
|
|
316
|
-
case 'UNPROCESSABLE_CONTENT':
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
423
|
+
case 'UNPROCESSABLE_CONTENT': {
|
|
424
|
+
const details = parseErrorDetails(envelope.details);
|
|
425
|
+
return (parseSponsorError(base, details) ??
|
|
426
|
+
new UnprocessableContentError({ ...base, details }));
|
|
427
|
+
}
|
|
321
428
|
case 'TOO_MANY_REQUESTS':
|
|
322
429
|
return new RateLimitedError({ ...base, retryAfter });
|
|
323
430
|
case 'SETTLEMENT_QUOTE_ERROR':
|
|
@@ -354,6 +461,16 @@ function isAuthError(error) {
|
|
|
354
461
|
function isSimulationFailed(error) {
|
|
355
462
|
return error instanceof SimulationFailedError;
|
|
356
463
|
}
|
|
464
|
+
function isSponsorLimitExceeded(error) {
|
|
465
|
+
return error instanceof SponsorLimitExceededError;
|
|
466
|
+
}
|
|
467
|
+
function isInsufficientSponsorBalance(error) {
|
|
468
|
+
return error instanceof InsufficientSponsorBalanceError;
|
|
469
|
+
}
|
|
470
|
+
/** Either sponsor failure: a configured cap breach or a balance shortfall. */
|
|
471
|
+
function isSponsorError(error) {
|
|
472
|
+
return isSponsorLimitExceeded(error) || isInsufficientSponsorBalance(error);
|
|
473
|
+
}
|
|
357
474
|
function isRetryable(error) {
|
|
358
475
|
return (error instanceof InternalServerError ||
|
|
359
476
|
error instanceof ExternalServiceTimeoutError ||
|
|
@@ -426,4 +543,4 @@ function isConnectionError(error) {
|
|
|
426
543
|
}
|
|
427
544
|
return false;
|
|
428
545
|
}
|
|
429
|
-
export { parseErrorEnvelope, isOrchestratorError, isRetryable, isConnectionError, isAuthError, isValidationError, isRateLimited, isSimulationFailed, OrchestratorError, ValidationError, InsufficientLiquidityError, NotFoundError, UnauthorizedError, ForbiddenError, KeyScopeDeniedError, ConflictError, UnprocessableContentError, RateLimitedError, SettlementQuoteError, SettlementExecutionError, SimulationFailedError, ExternalServiceTimeoutError, RelayerMarketUnavailableError, InternalServerError, UnsupportedChainError, UnsupportedTokenError, };
|
|
546
|
+
export { parseErrorEnvelope, isOrchestratorError, isRetryable, isConnectionError, isAuthError, isValidationError, isRateLimited, isSimulationFailed, isSponsorLimitExceeded, isInsufficientSponsorBalance, isSponsorError, OrchestratorError, ValidationError, InsufficientLiquidityError, SponsorLimitExceededError, InsufficientSponsorBalanceError, NotFoundError, UnauthorizedError, ForbiddenError, KeyScopeDeniedError, ConflictError, UnprocessableContentError, RateLimitedError, SettlementQuoteError, SettlementExecutionError, SimulationFailedError, ExternalServiceTimeoutError, RelayerMarketUnavailableError, InternalServerError, UnsupportedChainError, UnsupportedTokenError, };
|
|
@@ -2,12 +2,12 @@ import type { AuthProvider } from '../auth/provider.js';
|
|
|
2
2
|
import { Orchestrator } from './client.js';
|
|
3
3
|
import { RHINESTONE_SPOKE_POOL_ADDRESS } from './consts.js';
|
|
4
4
|
import { type DestinationChain, hyperCoreMainnet, isNonEvmChain, type NonEvmAddress, type NonEvmChain, solanaMainnet, tronMainnet } from './destinations.js';
|
|
5
|
-
import type { ErrorDetail } from './error.js';
|
|
6
|
-
import { ConflictError, ExternalServiceTimeoutError, ForbiddenError, InsufficientLiquidityError, InternalServerError, isAuthError, isConnectionError, isOrchestratorError, isRateLimited, isRetryable, isSimulationFailed, isValidationError, KeyScopeDeniedError, NotFoundError, OrchestratorError, RateLimitedError, RelayerMarketUnavailableError, SettlementExecutionError, SettlementQuoteError, SimulationFailedError, UnauthorizedError, UnprocessableContentError, UnsupportedChainError, UnsupportedTokenError, ValidationError } from './error.js';
|
|
5
|
+
import type { ErrorDetail, SponsorLimitKey } from './error.js';
|
|
6
|
+
import { ConflictError, ExternalServiceTimeoutError, ForbiddenError, InsufficientLiquidityError, InsufficientSponsorBalanceError, InternalServerError, isAuthError, isConnectionError, isInsufficientSponsorBalance, isOrchestratorError, isRateLimited, isRetryable, isSimulationFailed, isSponsorError, isSponsorLimitExceeded, isValidationError, KeyScopeDeniedError, NotFoundError, OrchestratorError, RateLimitedError, RelayerMarketUnavailableError, SettlementExecutionError, SettlementQuoteError, SimulationFailedError, SponsorLimitExceededError, UnauthorizedError, UnprocessableContentError, UnsupportedChainError, UnsupportedTokenError, ValidationError } from './error.js';
|
|
7
7
|
import { getTokenSymbol, getWethAddress, isTokenAddressSupported } from './registry.js';
|
|
8
8
|
import type { AppFeeBalances, AppFeeRate, ApprovalRequired, AuxiliaryFunds, BridgeFill, ChainOperation, Cost, CostTokenEntry, EstimatedFillTime, Execution, FailureReason, FeeBreakdown, Fees, IntentInput, IntentOpStatus, IntentOptions, IntentSubmitRequest, IntentSubmitResponse, OperationStatus, OriginSignature, Portfolio, Price, Quote, QuoteResponse, SettlementLayer, SettlementLayerFilter, SignatureMode, SignData, SignedAuthorization, SplitIntentsInput, SplitIntentsResult, SponsorSettings, SupportedChain, TokenConfig, TokenRequirements, TypedDataDefinition, UsdAmount, WrapRequired } from './types.js';
|
|
9
9
|
import { INTENT_STATUS_COMPLETED, INTENT_STATUS_FAILED, INTENT_STATUS_PENDING } from './types.js';
|
|
10
10
|
declare function getOrchestrator(authProvider: AuthProvider, orchestratorUrl?: string, headers?: Record<string, string>): Orchestrator;
|
|
11
|
-
export type { ApprovalRequired, AppFeeBalances, AppFeeRate, AuxiliaryFunds, BridgeFill, ChainOperation, Cost, CostTokenEntry, DestinationChain, ErrorDetail, NonEvmAddress, NonEvmChain, EstimatedFillTime, Execution, FailureReason, FeeBreakdown, Fees, IntentInput, IntentOpStatus, IntentOptions, IntentSubmitRequest, IntentSubmitResponse, OperationStatus, OriginSignature, Portfolio, Price, Quote, QuoteResponse, SettlementLayer, SettlementLayerFilter, SignatureMode, SignData, SignedAuthorization, SplitIntentsInput, SplitIntentsResult, SponsorSettings, SupportedChain, TokenConfig, TokenRequirements, TypedDataDefinition, UsdAmount, WrapRequired, };
|
|
12
|
-
export { hyperCoreMainnet, isNonEvmChain, solanaMainnet, tronMainnet, INTENT_STATUS_PENDING, INTENT_STATUS_COMPLETED, INTENT_STATUS_FAILED, RHINESTONE_SPOKE_POOL_ADDRESS, Orchestrator, ConflictError, ExternalServiceTimeoutError, ForbiddenError, InsufficientLiquidityError, InternalServerError, KeyScopeDeniedError, NotFoundError, OrchestratorError, RateLimitedError, RelayerMarketUnavailableError, SimulationFailedError, SettlementExecutionError, SettlementQuoteError, UnauthorizedError, UnprocessableContentError, UnsupportedChainError, UnsupportedTokenError, ValidationError, getOrchestrator, getWethAddress, getTokenSymbol, isOrchestratorError, isRetryable, isConnectionError, isAuthError, isValidationError, isRateLimited, isSimulationFailed, isTokenAddressSupported, };
|
|
11
|
+
export type { ApprovalRequired, AppFeeBalances, AppFeeRate, AuxiliaryFunds, BridgeFill, ChainOperation, Cost, CostTokenEntry, DestinationChain, ErrorDetail, SponsorLimitKey, NonEvmAddress, NonEvmChain, EstimatedFillTime, Execution, FailureReason, FeeBreakdown, Fees, IntentInput, IntentOpStatus, IntentOptions, IntentSubmitRequest, IntentSubmitResponse, OperationStatus, OriginSignature, Portfolio, Price, Quote, QuoteResponse, SettlementLayer, SettlementLayerFilter, SignatureMode, SignData, SignedAuthorization, SplitIntentsInput, SplitIntentsResult, SponsorSettings, SupportedChain, TokenConfig, TokenRequirements, TypedDataDefinition, UsdAmount, WrapRequired, };
|
|
12
|
+
export { hyperCoreMainnet, isNonEvmChain, solanaMainnet, tronMainnet, INTENT_STATUS_PENDING, INTENT_STATUS_COMPLETED, INTENT_STATUS_FAILED, RHINESTONE_SPOKE_POOL_ADDRESS, Orchestrator, ConflictError, ExternalServiceTimeoutError, ForbiddenError, InsufficientLiquidityError, InsufficientSponsorBalanceError, InternalServerError, KeyScopeDeniedError, NotFoundError, OrchestratorError, RateLimitedError, RelayerMarketUnavailableError, SimulationFailedError, SettlementExecutionError, SettlementQuoteError, SponsorLimitExceededError, UnauthorizedError, UnprocessableContentError, UnsupportedChainError, UnsupportedTokenError, ValidationError, getOrchestrator, getWethAddress, getTokenSymbol, isOrchestratorError, isRetryable, isConnectionError, isAuthError, isValidationError, isRateLimited, isSimulationFailed, isSponsorLimitExceeded, isInsufficientSponsorBalance, isSponsorError, isTokenAddressSupported, };
|
|
13
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../orchestrator/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,OAAO,EAAyB,6BAA6B,EAAE,MAAM,UAAU,CAAA;AAC/E,OAAO,EACL,KAAK,gBAAgB,EACrB,gBAAgB,EAChB,aAAa,EACb,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,aAAa,EACb,WAAW,EACZ,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../orchestrator/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,OAAO,EAAyB,6BAA6B,EAAE,MAAM,UAAU,CAAA;AAC/E,OAAO,EACL,KAAK,gBAAgB,EACrB,gBAAgB,EAChB,aAAa,EACb,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,aAAa,EACb,WAAW,EACZ,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAC3D,OAAO,EACL,aAAa,EACb,2BAA2B,EAC3B,cAAc,EACd,0BAA0B,EAC1B,+BAA+B,EAC/B,mBAAmB,EACnB,WAAW,EACX,iBAAiB,EACjB,4BAA4B,EAC5B,mBAAmB,EACnB,aAAa,EACb,WAAW,EACX,kBAAkB,EAClB,cAAc,EACd,sBAAsB,EACtB,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,6BAA6B,EAC7B,wBAAwB,EACxB,oBAAoB,EACpB,qBAAqB,EACrB,yBAAyB,EACzB,iBAAiB,EACjB,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,eAA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EACnB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,SAAS,EACT,YAAY,GACb,CAAA;AACD,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,WAAW,EACX,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,EACpB,6BAA6B,EAC7B,YAAY,EACZ,aAAa,EACb,2BAA2B,EAC3B,cAAc,EACd,0BAA0B,EAC1B,+BAA+B,EAC/B,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,6BAA6B,EAC7B,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,EACpB,yBAAyB,EACzB,iBAAiB,EACjB,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,eAAe,EACf,eAAe,EACf,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,WAAW,EACX,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,kBAAkB,EAClB,sBAAsB,EACtB,4BAA4B,EAC5B,cAAc,EACd,uBAAuB,GACxB,CAAA"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Orchestrator } from './client.js';
|
|
2
2
|
import { PROD_ORCHESTRATOR_URL, RHINESTONE_SPOKE_POOL_ADDRESS } from './consts.js';
|
|
3
3
|
import { hyperCoreMainnet, isNonEvmChain, solanaMainnet, tronMainnet, } from './destinations.js';
|
|
4
|
-
import { ConflictError, ExternalServiceTimeoutError, ForbiddenError, InsufficientLiquidityError, InternalServerError, isAuthError, isConnectionError, isOrchestratorError, isRateLimited, isRetryable, isSimulationFailed, isValidationError, KeyScopeDeniedError, NotFoundError, OrchestratorError, RateLimitedError, RelayerMarketUnavailableError, SettlementExecutionError, SettlementQuoteError, SimulationFailedError, UnauthorizedError, UnprocessableContentError, UnsupportedChainError, UnsupportedTokenError, ValidationError, } from './error.js';
|
|
4
|
+
import { ConflictError, ExternalServiceTimeoutError, ForbiddenError, InsufficientLiquidityError, InsufficientSponsorBalanceError, InternalServerError, isAuthError, isConnectionError, isInsufficientSponsorBalance, isOrchestratorError, isRateLimited, isRetryable, isSimulationFailed, isSponsorError, isSponsorLimitExceeded, isValidationError, KeyScopeDeniedError, NotFoundError, OrchestratorError, RateLimitedError, RelayerMarketUnavailableError, SettlementExecutionError, SettlementQuoteError, SimulationFailedError, SponsorLimitExceededError, UnauthorizedError, UnprocessableContentError, UnsupportedChainError, UnsupportedTokenError, ValidationError, } from './error.js';
|
|
5
5
|
import { getTokenSymbol, getWethAddress, isTokenAddressSupported, } from './registry.js';
|
|
6
6
|
import { INTENT_STATUS_COMPLETED, INTENT_STATUS_FAILED, INTENT_STATUS_PENDING, } from './types.js';
|
|
7
7
|
function getOrchestrator(authProvider, orchestratorUrl, headers) {
|
|
8
8
|
return new Orchestrator(orchestratorUrl ?? PROD_ORCHESTRATOR_URL, authProvider, headers);
|
|
9
9
|
}
|
|
10
|
-
export { hyperCoreMainnet, isNonEvmChain, solanaMainnet, tronMainnet, INTENT_STATUS_PENDING, INTENT_STATUS_COMPLETED, INTENT_STATUS_FAILED, RHINESTONE_SPOKE_POOL_ADDRESS, Orchestrator, ConflictError, ExternalServiceTimeoutError, ForbiddenError, InsufficientLiquidityError, InternalServerError, KeyScopeDeniedError, NotFoundError, OrchestratorError, RateLimitedError, RelayerMarketUnavailableError, SimulationFailedError, SettlementExecutionError, SettlementQuoteError, UnauthorizedError, UnprocessableContentError, UnsupportedChainError, UnsupportedTokenError, ValidationError, getOrchestrator, getWethAddress, getTokenSymbol, isOrchestratorError, isRetryable, isConnectionError, isAuthError, isValidationError, isRateLimited, isSimulationFailed, isTokenAddressSupported, };
|
|
10
|
+
export { hyperCoreMainnet, isNonEvmChain, solanaMainnet, tronMainnet, INTENT_STATUS_PENDING, INTENT_STATUS_COMPLETED, INTENT_STATUS_FAILED, RHINESTONE_SPOKE_POOL_ADDRESS, Orchestrator, ConflictError, ExternalServiceTimeoutError, ForbiddenError, InsufficientLiquidityError, InsufficientSponsorBalanceError, InternalServerError, KeyScopeDeniedError, NotFoundError, OrchestratorError, RateLimitedError, RelayerMarketUnavailableError, SimulationFailedError, SettlementExecutionError, SettlementQuoteError, SponsorLimitExceededError, UnauthorizedError, UnprocessableContentError, UnsupportedChainError, UnsupportedTokenError, ValidationError, getOrchestrator, getWethAddress, getTokenSymbol, isOrchestratorError, isRetryable, isConnectionError, isAuthError, isValidationError, isRateLimited, isSimulationFailed, isSponsorLimitExceeded, isInsufficientSponsorBalance, isSponsorError, isTokenAddressSupported, };
|
|
@@ -85,6 +85,12 @@ type AuxiliaryFunds = {
|
|
|
85
85
|
};
|
|
86
86
|
interface IntentOptions {
|
|
87
87
|
appFees?: AppFeeRate;
|
|
88
|
+
/**
|
|
89
|
+
* Absolute unix timestamp (seconds) overriding the on-chain fill deadline.
|
|
90
|
+
* Same-chain (tokenless) route only; ignored elsewhere. Bounds (`now + 120s`
|
|
91
|
+
* .. `now + 86400s`) are enforced by the orchestrator.
|
|
92
|
+
*/
|
|
93
|
+
customDeadline?: number;
|
|
88
94
|
sponsorSettings?: SponsorSettings;
|
|
89
95
|
settlementLayers?: SettlementLayerFilter;
|
|
90
96
|
signatureMode?: SignatureMode;
|