@metamask-previews/sentinel-api-service 2.1.0-preview-e80304db4 → 2.1.0-preview-e92ccc12d
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/CHANGELOG.md +13 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/sentinel-api-service-method-action-types.d.ts +48 -1
- package/dist/sentinel-api-service-method-action-types.d.ts.map +1 -1
- package/dist/sentinel-api-service-method-action-types.js.map +1 -1
- package/dist/sentinel-api-service.d.ts +44 -1
- package/dist/sentinel-api-service.d.ts.map +1 -1
- package/dist/sentinel-api-service.js +209 -1
- package/dist/sentinel-api-service.js.map +1 -1
- package/dist/structs.d.ts +104 -0
- package/dist/structs.d.ts.map +1 -1
- package/dist/structs.js +60 -0
- package/dist/structs.js.map +1 -1
- package/dist/types.d.ts +240 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +69 -0
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,4BAA4B,EAC5B,oCAAoC,EACpC,kCAAkC,EACnC,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAC7E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,+CAA+C,C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AM,CAAC;IAE3B,6DAA6D;IAC7D,kBAAkB,EAAE,0BAA0B,CAAC;IAE/C;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,SAAS,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB,+CAA+C;IAC/C,OAAO,EAAE,qBAAqB,CAAC;IAE/B;;;;OAIG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAE3B,8DAA8D;IAC9D,UAAU,EAAE,OAAO,CAAC;IAEpB,0CAA0C;IAC1C,OAAO,EAAE,OAAO,CAAC;IAEjB,wCAAwC;IACxC,QAAQ,EAAE,OAAO,CAAC;IAElB,0CAA0C;IAC1C,yBAAyB,EAAE,iCAAiC,CAAC;CAC9D,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,2BAA2B,GAAG,MAAM,CAC9C,MAAM,EACN,gCAAgC,CACjC,CAAC"}
|
package/dist/types.js
CHANGED
|
@@ -12,6 +12,9 @@ export var SentinelFeature;
|
|
|
12
12
|
/**
|
|
13
13
|
* The kind of relay (gas station) submission. Redefined here so that this
|
|
14
14
|
* package does not depend on `@metamask/smart-transactions-controller`.
|
|
15
|
+
*
|
|
16
|
+
* @deprecated Sentinel no longer takes a `kind` in its metadata. This enum
|
|
17
|
+
* will be removed in a future major version.
|
|
15
18
|
*/
|
|
16
19
|
export var SentinelKind;
|
|
17
20
|
(function (SentinelKind) {
|
|
@@ -20,6 +23,18 @@ export var SentinelKind;
|
|
|
20
23
|
SentinelKind["GaslessEIP7702"] = "gaslessEIP7702";
|
|
21
24
|
SentinelKind["GaslessSendBundle"] = "gaslessSendBundle";
|
|
22
25
|
})(SentinelKind || (SentinelKind = {}));
|
|
26
|
+
export var SentinelProductFeature;
|
|
27
|
+
(function (SentinelProductFeature) {
|
|
28
|
+
SentinelProductFeature["Bridge"] = "Bridge";
|
|
29
|
+
SentinelProductFeature["Card"] = "Card";
|
|
30
|
+
SentinelProductFeature["dAppTransaction"] = "dAppTransaction";
|
|
31
|
+
SentinelProductFeature["Earn"] = "Earn";
|
|
32
|
+
SentinelProductFeature["Perp"] = "Perp";
|
|
33
|
+
SentinelProductFeature["Prediction"] = "Prediction";
|
|
34
|
+
SentinelProductFeature["Ramp"] = "Ramp";
|
|
35
|
+
SentinelProductFeature["Staking"] = "Staking";
|
|
36
|
+
SentinelProductFeature["Swap"] = "Swap";
|
|
37
|
+
})(SentinelProductFeature || (SentinelProductFeature = {}));
|
|
23
38
|
/**
|
|
24
39
|
* Terminal and non-terminal statuses reported by the smart-transactions
|
|
25
40
|
* endpoint.
|
|
@@ -30,4 +45,58 @@ export var SentinelSmartTransactionStatus;
|
|
|
30
45
|
SentinelSmartTransactionStatus["Validated"] = "VALIDATED";
|
|
31
46
|
SentinelSmartTransactionStatus["Failed"] = "FAILED";
|
|
32
47
|
})(SentinelSmartTransactionStatus || (SentinelSmartTransactionStatus = {}));
|
|
48
|
+
/**
|
|
49
|
+
* Values of `cancellationReason` on a batch-status entry.
|
|
50
|
+
* Compliant with the Transaction API (SCP).
|
|
51
|
+
*/
|
|
52
|
+
export var SentinelCancellationReason;
|
|
53
|
+
(function (SentinelCancellationReason) {
|
|
54
|
+
SentinelCancellationReason["DeadlineMissed"] = "deadline_missed";
|
|
55
|
+
SentinelCancellationReason["InvalidNonce"] = "invalid_nonce";
|
|
56
|
+
SentinelCancellationReason["NotCancelled"] = "not_cancelled";
|
|
57
|
+
SentinelCancellationReason["TooCheap"] = "too_cheap";
|
|
58
|
+
SentinelCancellationReason["UserCancelled"] = "user_cancelled";
|
|
59
|
+
SentinelCancellationReason["WouldRevert"] = "would_revert";
|
|
60
|
+
})(SentinelCancellationReason || (SentinelCancellationReason = {}));
|
|
61
|
+
/**
|
|
62
|
+
* Values of `minedTx` on a batch-status entry.
|
|
63
|
+
* Compliant with the Transaction API (SCP).
|
|
64
|
+
*/
|
|
65
|
+
export var SentinelMinedTxStatus;
|
|
66
|
+
(function (SentinelMinedTxStatus) {
|
|
67
|
+
SentinelMinedTxStatus["Cancelled"] = "cancelled";
|
|
68
|
+
SentinelMinedTxStatus["NotMined"] = "not_mined";
|
|
69
|
+
SentinelMinedTxStatus["Reverted"] = "reverted";
|
|
70
|
+
SentinelMinedTxStatus["Success"] = "success";
|
|
71
|
+
})(SentinelMinedTxStatus || (SentinelMinedTxStatus = {}));
|
|
72
|
+
/**
|
|
73
|
+
* Values of `originalTransactionStatus` on a batch-status entry.
|
|
74
|
+
* `UNKNOWN_STATUS` is the Go `String()` fallback and is not produced for a
|
|
75
|
+
* status loaded from the database.
|
|
76
|
+
*/
|
|
77
|
+
export var SentinelOriginalTransactionStatus;
|
|
78
|
+
(function (SentinelOriginalTransactionStatus) {
|
|
79
|
+
SentinelOriginalTransactionStatus["Cancelled"] = "CANCELLED";
|
|
80
|
+
SentinelOriginalTransactionStatus["CancelledLeakedReverted"] = "CANCELLED_LEAKED_REVERTED";
|
|
81
|
+
SentinelOriginalTransactionStatus["CancelledLeakedValidated"] = "CANCELLED_LEAKED_VALIDATED";
|
|
82
|
+
SentinelOriginalTransactionStatus["Failed"] = "FAILED";
|
|
83
|
+
SentinelOriginalTransactionStatus["FailedAuth"] = "FAILED_AUTH";
|
|
84
|
+
SentinelOriginalTransactionStatus["FailedGaslessConfig"] = "FAILED_GASLESS_CONFIG";
|
|
85
|
+
SentinelOriginalTransactionStatus["FailedGasTooLow"] = "FAILED_GAS_TOO_LOW";
|
|
86
|
+
SentinelOriginalTransactionStatus["FailedInsufficientFee"] = "FAILED_INSUFFICIENT_FEE";
|
|
87
|
+
SentinelOriginalTransactionStatus["FailedInsufficientFunds"] = "FAILED_INSUFFICIENT_FUNDS";
|
|
88
|
+
SentinelOriginalTransactionStatus["FailedNonceTooHigh"] = "FAILED_NONCE_TOO_HIGH";
|
|
89
|
+
SentinelOriginalTransactionStatus["FailedSpam"] = "FAILED_SPAM";
|
|
90
|
+
SentinelOriginalTransactionStatus["FailedSponsorshipRule"] = "FAILED_SPONSORSHIP_RULE";
|
|
91
|
+
SentinelOriginalTransactionStatus["FailedTimeout"] = "FAILED_TIMEOUT";
|
|
92
|
+
SentinelOriginalTransactionStatus["FailedUnknown"] = "FAILED_UNKNOWN";
|
|
93
|
+
SentinelOriginalTransactionStatus["FailedWouldRevert"] = "FAILED_WOULD_REVERT";
|
|
94
|
+
SentinelOriginalTransactionStatus["LeakedReverted"] = "LEAKED_REVERTED";
|
|
95
|
+
SentinelOriginalTransactionStatus["LeakedValidated"] = "LEAKED_VALIDATED";
|
|
96
|
+
SentinelOriginalTransactionStatus["NonceTooLow"] = "NONCE_TOO_LOW";
|
|
97
|
+
SentinelOriginalTransactionStatus["Pending"] = "PENDING";
|
|
98
|
+
SentinelOriginalTransactionStatus["PendingCancelled"] = "PENDING_CANCELLED";
|
|
99
|
+
SentinelOriginalTransactionStatus["Reverted"] = "REVERTED";
|
|
100
|
+
SentinelOriginalTransactionStatus["Validated"] = "VALIDATED";
|
|
101
|
+
})(SentinelOriginalTransactionStatus || (SentinelOriginalTransactionStatus = {}));
|
|
33
102
|
//# sourceMappingURL=types.js.map
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAgHA;;;;GAIG;AACH,MAAM,CAAN,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,wCAAqB,CAAA;IACrB,sCAAmB,CAAA;IACnB,0CAAuB,CAAA;AACzB,CAAC,EAJW,eAAe,KAAf,eAAe,QAI1B;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,iCAAiB,CAAA;IACjB,mCAAmB,CAAA;IACnB,iDAAiC,CAAA;IACjC,uDAAuC,CAAA;AACzC,CAAC,EALW,YAAY,KAAZ,YAAY,QAKvB;AA4XD;;;GAGG;AACH,MAAM,CAAN,IAAY,8BAIX;AAJD,WAAY,8BAA8B;IACxC,qDAAmB,CAAA;IACnB,yDAAuB,CAAA;IACvB,mDAAiB,CAAA;AACnB,CAAC,EAJW,8BAA8B,KAA9B,8BAA8B,QAIzC","sourcesContent":["import type {\n DataServiceCacheUpdatedEvent,\n DataServiceGranularCacheUpdatedEvent,\n DataServiceInvalidateQueriesAction,\n} from '@metamask/base-data-service';\nimport type { CreateServicePolicyOptions } from '@metamask/controller-utils';\nimport type { Messenger } from '@metamask/messenger';\nimport type { Hex } from '@metamask/utils';\nimport type { QueryClientConfig } from '@tanstack/query-core';\n\nimport type { SentinelEnvironment, serviceName } from './constants.js';\nimport type { SentinelApiServiceMethodActions } from './sentinel-api-service-method-action-types.js';\n\n/**\n * Invalidates cached queries for {@link SentinelApiService}.\n */\nexport type SentinelApiServiceInvalidateQueriesAction =\n DataServiceInvalidateQueriesAction<typeof serviceName>;\n\n/**\n * Actions that {@link SentinelApiService} exposes to other consumers.\n */\nexport type SentinelApiServiceActions =\n | SentinelApiServiceMethodActions\n | SentinelApiServiceInvalidateQueriesAction;\n\n/**\n * Published when {@link SentinelApiService}'s cache is updated.\n */\nexport type SentinelApiServiceCacheUpdatedEvent = DataServiceCacheUpdatedEvent<\n typeof serviceName\n>;\n\n/**\n * Published when a key within {@link SentinelApiService}'s cache is updated.\n */\nexport type SentinelApiServiceGranularCacheUpdatedEvent =\n DataServiceGranularCacheUpdatedEvent<typeof serviceName>;\n\n/**\n * Events that {@link SentinelApiService} exposes to other consumers.\n */\nexport type SentinelApiServiceEvents =\n | SentinelApiServiceCacheUpdatedEvent\n | SentinelApiServiceGranularCacheUpdatedEvent;\n\n/**\n * Retrieves a bearer token from the `AuthenticationController` in\n * `@metamask/profile-sync-controller`. Declared structurally to avoid pulling\n * that package's transitive dependency tree in for a single action contract.\n */\ntype AuthenticationControllerGetBearerTokenAction = {\n type: 'AuthenticationController:getBearerToken';\n handler: (entropySourceId?: string) => Promise<string>;\n};\n\n/**\n * Actions from other messengers that {@link SentinelApiService} calls.\n */\ntype AllowedActions = AuthenticationControllerGetBearerTokenAction;\n\n/**\n * The messenger which is restricted to actions and events accessed by\n * {@link SentinelApiService}.\n */\nexport type SentinelApiServiceMessenger = Messenger<\n typeof serviceName,\n SentinelApiServiceActions | AllowedActions,\n SentinelApiServiceEvents\n>;\n\n/**\n * Constructor options for {@link SentinelApiService}.\n */\nexport type SentinelApiServiceOptions = {\n /** The messenger suited for this service. */\n messenger: SentinelApiServiceMessenger;\n\n /**\n * The `fetch` function to use for requests. Defaults to the global `fetch`.\n */\n fetch?: typeof fetch;\n\n /**\n * The Sentinel API environment to target (`dev`, `uat`, or `prod`).\n * Defaults to `prod`.\n */\n environment?: SentinelEnvironment;\n\n /**\n * Identifier for the calling client (for example `extension` or `mobile`),\n * sent as the `X-Client-Id` header.\n */\n clientId?: string;\n\n /**\n * Version of the calling client, sent as the `X-Client-Version` header when\n * provided.\n */\n clientVersion?: string;\n\n /** Configuration for the underlying TanStack Query client. */\n queryClientConfig?: QueryClientConfig;\n\n /**\n * Options to pass to `createServicePolicy`. Retries are disabled by default\n * (`maxRetries: 0`) to preserve the single-attempt behaviour of the clients\n * this service replaces; pass `maxRetries` here to opt in.\n */\n policyOptions?: CreateServicePolicyOptions;\n};\n\n/**\n * The feature that originated a relay (gas station) submission. Used purely as\n * metadata forwarded to the Sentinel API for observability. Redefined here so\n * that this package does not depend on `@metamask/smart-transactions-controller`.\n */\nexport enum SentinelFeature {\n Advanced = 'advanced',\n Default = 'default',\n Sponsored = 'sponsored',\n}\n\n/**\n * The kind of relay (gas station) submission. Redefined here so that this\n * package does not depend on `@metamask/smart-transactions-controller`.\n */\nexport enum SentinelKind {\n Bundle = 'bundle',\n Default = 'default',\n GaslessEIP7702 = 'gaslessEIP7702',\n GaslessSendBundle = 'gaslessSendBundle',\n}\n\n/**\n * Optional metadata forwarded with a relay submission for observability. All\n * fields are optional and passed through verbatim to the Sentinel API.\n */\nexport type SentinelMeta = {\n client?: string;\n clientVersion?: string;\n feature?: SentinelFeature;\n kind?: SentinelKind;\n origin?: string;\n txType?: string;\n wallet?: string;\n};\n\n/**\n * An EIP-7702 authorization entry, as accepted by the Sentinel simulation API.\n */\nexport type SentinelAuthorization = {\n /** Address of the smart contract that contains the code to be set. */\n address: Hex;\n\n /** Address of the account being upgraded. */\n from: Hex;\n};\n\n/**\n * A single transaction to simulate in a Sentinel simulation request.\n */\nexport type SentinelSimulationTransaction = {\n /** EIP-7702 authorization list for the transaction. */\n authorizationList?: SentinelAuthorization[];\n\n /** Data to send with the transaction. */\n data?: Hex;\n\n /** Sender of the transaction. */\n from: Hex;\n\n /** Gas limit for the transaction. */\n gas?: Hex;\n\n /** Maximum fee per gas for the transaction. */\n maxFeePerGas?: Hex;\n\n /** Maximum priority fee per gas for the transaction. */\n maxPriorityFeePerGas?: Hex;\n\n /** Recipient of the transaction. */\n to?: Hex;\n\n /** Value to send with the transaction. */\n value?: Hex;\n};\n\n/**\n * Overrides to blockchain state, keyed by address, for a simulation request.\n */\nexport type SentinelStateOverrides = {\n [address: Hex]: {\n /** Override the native balance of an address. */\n balance?: Hex;\n\n /** Override the code for an address. */\n code?: Hex;\n\n /** Overrides to the storage slots for an address. */\n stateDiff?: {\n [slot: Hex]: Hex;\n };\n };\n};\n\n/**\n * A request to the Sentinel API to simulate transactions. This is the superset\n * of the shapes previously used by `@metamask/transaction-controller` and\n * `@metamask/transaction-pay-controller`.\n */\nexport type SentinelSimulationRequest = {\n /** Overrides to block data for the simulation. */\n blockOverrides?: {\n time?: Hex;\n };\n\n /** Overrides to blockchain state, keyed by address. */\n overrides?: SentinelStateOverrides;\n\n /** Whether to include available token fees in the response. */\n suggestFees?: {\n /** Whether the transaction is submitted via a delegation (EIP-7702). */\n with7702?: boolean;\n\n /** Whether to include the gas fee of the token transfer. */\n withFeeTransfer?: boolean;\n\n /**\n * Whether to include a RedeemerEnforcer caveat, restricting redemption to\n * the relay signers, in the delegation used for the EIP-7702 estimate.\n */\n withRedeemerEnforcer?: boolean;\n\n /** Whether to include the native transfer if available. */\n withTransfer?: boolean;\n };\n\n /**\n * Transactions to be sequentially simulated. State changes impact subsequent\n * transactions in the list.\n */\n transactions: SentinelSimulationTransaction[];\n\n /** Whether to include call traces in the response. Defaults to false. */\n withCallTrace?: boolean;\n\n /** Whether to include the default block data. Defaults to false. */\n withDefaultBlockOverrides?: boolean;\n\n /** Whether to use gas fees in the simulation. Defaults to false. */\n withGas?: boolean;\n\n /** Whether to include event logs in the response. Defaults to false. */\n withLogs?: boolean;\n};\n\n/**\n * A request to submit a signed relay (gas station) transaction to the Sentinel\n * API via `eth_sendRelayTransaction`.\n */\nexport type SentinelRelaySubmitRequest = {\n /** EIP-7702 authorization tuples for the delegation. */\n authorizationList?: SentinelSignedAuthorization[];\n\n /** The chain to submit the transaction on. */\n chainId: Hex;\n\n /** The encoded calldata (for example `redeemDelegations`). */\n data: Hex;\n\n /** Optional metadata forwarded to the API for observability. */\n metadata?: SentinelMeta;\n\n /** The recipient of the transaction (for example the DelegationManager). */\n to: Hex;\n};\n\n/**\n * A fully signed EIP-7702 authorization tuple, as submitted to the relay.\n */\nexport type SentinelSignedAuthorization = {\n address: Hex;\n chainId: Hex;\n nonce: Hex;\n r: Hex;\n s: Hex;\n yParity: Hex;\n};\n\n/**\n * A request to look up the state of a submitted smart transaction by UUID.\n */\nexport type SentinelSmartTransactionRequest = {\n /** The chain the transaction was submitted on. */\n chainId: Hex;\n\n /** The UUID returned by {@link SentinelRelaySubmitResponse}. */\n uuid: string;\n};\n\n/**\n * A single network entry from the Sentinel `/networks` registry, or the\n * configuration of a single network from the `/network` endpoint.\n */\nexport type SentinelNetwork = {\n /** Raw field name from the Sentinel API response; note uppercase 'D'. */\n chainID?: number;\n\n /** Whether simulation (confirmations) is supported for this chain. */\n confirmations?: boolean;\n\n /** Addresses of the relay signers that submit relay transactions. */\n cubistSigners?: Hex[];\n\n /** The subdomain used to build the Sentinel URL for this chain. */\n network: string;\n\n /** Whether the gas station relay is supported for this chain. */\n relayTransactions?: boolean;\n\n /** Whether the bundle path is supported for this chain. */\n sendBundle?: boolean;\n\n /** Whether simulations on this chain include gas fees for native tokens. */\n simulationIncludeFees?: boolean;\n\n /** Whether smart transactions are supported for this chain. */\n smartTransactions?: boolean;\n};\n\n/**\n * The Sentinel `/networks` registry response, keyed by decimal chain ID.\n */\nexport type SentinelNetworkRegistry = Record<string, SentinelNetwork>;\n\n/**\n * Raw event log emitted by a simulated transaction.\n */\nexport type SentinelSimulationLog = {\n /** Address of the account that created the event. */\n address: Hex;\n\n /** Raw data in the event that is not indexed. */\n data: Hex;\n\n /** Raw indexed data from the event. */\n topics: Hex[];\n};\n\n/**\n * Call trace of a single simulated transaction.\n */\nexport type SentinelSimulationCallTrace = {\n /** Nested calls. */\n calls?: SentinelSimulationCallTrace[] | null;\n\n /** Error message for the call, if any. */\n error?: string;\n\n /** Raw event logs created by the call. */\n logs?: SentinelSimulationLog[] | null;\n\n /** Raw return data from the call (revert hex when reverted). */\n output?: Hex;\n};\n\n/**\n * Per-account state changes recorded by a simulated transaction.\n */\nexport type SentinelSimulationStateDiffAccount = {\n /** Native balance of the account. */\n balance?: Hex;\n\n /** Nonce of the account. */\n nonce?: Hex;\n\n /** Storage values per slot. */\n storage?: {\n [slot: Hex]: Hex;\n };\n};\n\n/**\n * Changes to the blockchain state (pre/post) for a single simulated\n * transaction. Each side is keyed by account address.\n */\nexport type SentinelSimulationStateDiff = {\n /** Initial blockchain state before the transaction. */\n pre?: {\n [address: Hex]: SentinelSimulationStateDiffAccount;\n };\n\n /** Updated blockchain state after the transaction. */\n post?: {\n [address: Hex]: SentinelSimulationStateDiffAccount;\n };\n};\n\n/**\n * A token-denominated fee option returned by the simulation API when\n * `suggestFees` is requested.\n */\nexport type SentinelSimulationTokenFee = {\n /** Amount of tokens needed to pay for gas. */\n balanceNeededToken: Hex;\n\n /** Current token balance of the sender. */\n currentBalanceToken: Hex;\n\n /** Account address that the token should be transferred to. */\n feeRecipient: Hex;\n\n /** Conversion rate of 1 token to native WEI. */\n rateWei: Hex;\n\n /** Portion of `balanceNeededToken` that is the fee paid to MetaMask. */\n serviceFee?: Hex;\n\n /** Token data independent of the current transaction. */\n token: {\n /** Address of the token contract. */\n address: Hex;\n\n /** Number of decimals used by the token. */\n decimals: number;\n\n /** Symbol of the token. */\n symbol: string;\n };\n\n /** Estimated gas limit required for the fee transfer. */\n transferEstimate: Hex;\n};\n\n/**\n * A single recommended fee level for a simulated transaction, including the\n * gas fee parameters and the token-fee options at that level.\n */\nexport type SentinelSimulationFeeLevel = {\n /** Gas limit for the fee level. */\n gas: Hex;\n\n /** Maximum fee per gas for the fee level. */\n maxFeePerGas: Hex;\n\n /** Maximum priority fee per gas for the fee level. */\n maxPriorityFeePerGas: Hex;\n\n /** Token fee options for the fee level. */\n tokenFees: SentinelSimulationTokenFee[];\n};\n\n/**\n * The result of simulating a single transaction.\n */\nexport type SentinelSimulationResponseTransaction = {\n /** Hierarchy of call data including nested calls and logs. */\n callTrace?: SentinelSimulationCallTrace;\n\n /** An error message indicating the transaction could not be simulated. */\n error?: string;\n\n /** Recommended gas fees for the transaction, per fee level. */\n fees?: SentinelSimulationFeeLevel[];\n\n /**\n * Estimated total gas cost of the transaction, in wei as a decimal number.\n * Included in the `stateDiff` when `withGas` is true.\n */\n gasCost?: number;\n\n /** Required `gasLimit` for the transaction. */\n gasLimit?: Hex;\n\n /** Total gas used by the transaction. */\n gasUsed?: Hex;\n\n /** Return value of the transaction (for example the balance from `balanceOf`). */\n return: Hex;\n\n /** Changes to the blockchain state produced by the transaction. */\n stateDiff?: SentinelSimulationStateDiff;\n};\n\n/**\n * The response from the Sentinel simulation API.\n */\nexport type SentinelSimulationResponse = {\n /** Sponsorship determination for the request. */\n sponsorship: {\n /** Whether the gas costs are sponsored (no transfer required). */\n isSponsored: boolean;\n\n /** Error message for the sponsorship determination, if any. */\n error: string | null;\n\n /** Name of the party paying the gas fee, such as `Uniswap` or `MetaMask`. */\n sponsor?: string;\n };\n\n /** Simulation data for each transaction in the request. */\n transactions: SentinelSimulationResponseTransaction[];\n};\n\n/**\n * The response from submitting a relay transaction.\n */\nexport type SentinelRelaySubmitResponse = {\n uuid: string;\n};\n\n/**\n * Terminal and non-terminal statuses reported by the smart-transactions\n * endpoint.\n */\nexport enum SentinelSmartTransactionStatus {\n Pending = 'PENDING',\n Validated = 'VALIDATED',\n Failed = 'FAILED',\n}\n\n/**\n * A single smart-transaction entry returned by the `/smart-transactions/{uuid}`\n * endpoint.\n */\nexport type SentinelSmartTransaction = {\n /** The on-chain transaction hash, once available. */\n hash?: string;\n\n /**\n * The current status of the smart transaction. Compare against\n * {@link SentinelSmartTransactionStatus} values.\n */\n status: string;\n\n /**\n * The reason the transaction failed, if any. May be `null` when the API\n * explicitly reports no error reason.\n */\n errorReason?: string | null;\n};\n\n/**\n * The response from the `/smart-transactions/{uuid}` endpoint. Consumers\n * select the transaction(s) they care about from the `transactions` array\n * (typically the first entry).\n */\nexport type SentinelSmartTransactionResponse = {\n transactions: SentinelSmartTransaction[];\n};\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAgHA;;;;GAIG;AACH,MAAM,CAAN,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,wCAAqB,CAAA;IACrB,sCAAmB,CAAA;IACnB,0CAAuB,CAAA;AACzB,CAAC,EAJW,eAAe,KAAf,eAAe,QAI1B;AAED;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,iCAAiB,CAAA;IACjB,mCAAmB,CAAA;IACnB,iDAAiC,CAAA;IACjC,uDAAuC,CAAA;AACzC,CAAC,EALW,YAAY,KAAZ,YAAY,QAKvB;AAED,MAAM,CAAN,IAAY,sBAUX;AAVD,WAAY,sBAAsB;IAChC,2CAAiB,CAAA;IACjB,uCAAa,CAAA;IACb,6DAAmC,CAAA;IACnC,uCAAa,CAAA;IACb,uCAAa,CAAA;IACb,mDAAyB,CAAA;IACzB,uCAAa,CAAA;IACb,6CAAm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CAAiC,KAAjC,iCAAiC,QAuB5C","sourcesContent":["import type {\n DataServiceCacheUpdatedEvent,\n DataServiceGranularCacheUpdatedEvent,\n DataServiceInvalidateQueriesAction,\n} from '@metamask/base-data-service';\nimport type { CreateServicePolicyOptions } from '@metamask/controller-utils';\nimport type { Messenger } from '@metamask/messenger';\nimport type { Hex } from '@metamask/utils';\nimport type { QueryClientConfig } from '@tanstack/query-core';\n\nimport type { SentinelEnvironment, serviceName } from './constants.js';\nimport type { SentinelApiServiceMethodActions } from './sentinel-api-service-method-action-types.js';\n\n/**\n * Invalidates cached queries for {@link SentinelApiService}.\n */\nexport type SentinelApiServiceInvalidateQueriesAction =\n DataServiceInvalidateQueriesAction<typeof serviceName>;\n\n/**\n * Actions that {@link SentinelApiService} exposes to other consumers.\n */\nexport type SentinelApiServiceActions =\n | SentinelApiServiceMethodActions\n | SentinelApiServiceInvalidateQueriesAction;\n\n/**\n * Published when {@link SentinelApiService}'s cache is updated.\n */\nexport type SentinelApiServiceCacheUpdatedEvent = DataServiceCacheUpdatedEvent<\n typeof serviceName\n>;\n\n/**\n * Published when a key within {@link SentinelApiService}'s cache is updated.\n */\nexport type SentinelApiServiceGranularCacheUpdatedEvent =\n DataServiceGranularCacheUpdatedEvent<typeof serviceName>;\n\n/**\n * Events that {@link SentinelApiService} exposes to other consumers.\n */\nexport type SentinelApiServiceEvents =\n | SentinelApiServiceCacheUpdatedEvent\n | SentinelApiServiceGranularCacheUpdatedEvent;\n\n/**\n * Retrieves a bearer token from the `AuthenticationController` in\n * `@metamask/profile-sync-controller`. Declared structurally to avoid pulling\n * that package's transitive dependency tree in for a single action contract.\n */\ntype AuthenticationControllerGetBearerTokenAction = {\n type: 'AuthenticationController:getBearerToken';\n handler: (entropySourceId?: string) => Promise<string>;\n};\n\n/**\n * Actions from other messengers that {@link SentinelApiService} calls.\n */\ntype AllowedActions = AuthenticationControllerGetBearerTokenAction;\n\n/**\n * The messenger which is restricted to actions and events accessed by\n * {@link SentinelApiService}.\n */\nexport type SentinelApiServiceMessenger = Messenger<\n typeof serviceName,\n SentinelApiServiceActions | AllowedActions,\n SentinelApiServiceEvents\n>;\n\n/**\n * Constructor options for {@link SentinelApiService}.\n */\nexport type SentinelApiServiceOptions = {\n /** The messenger suited for this service. */\n messenger: SentinelApiServiceMessenger;\n\n /**\n * The `fetch` function to use for requests. Defaults to the global `fetch`.\n */\n fetch?: typeof fetch;\n\n /**\n * The Sentinel API environment to target (`dev`, `uat`, or `prod`).\n * Defaults to `prod`.\n */\n environment?: SentinelEnvironment;\n\n /**\n * Identifier for the calling client (for example `extension` or `mobile`),\n * sent as the `X-Client-Id` header.\n */\n clientId?: string;\n\n /**\n * Version of the calling client, sent as the `X-Client-Version` header when\n * provided.\n */\n clientVersion?: string;\n\n /** Configuration for the underlying TanStack Query client. */\n queryClientConfig?: QueryClientConfig;\n\n /**\n * Options to pass to `createServicePolicy`. Retries are disabled by default\n * (`maxRetries: 0`) to preserve the single-attempt behaviour of the clients\n * this service replaces; pass `maxRetries` here to opt in.\n */\n policyOptions?: CreateServicePolicyOptions;\n};\n\n/**\n * The feature that originated a relay (gas station) submission. Used purely as\n * metadata forwarded to the Sentinel API for observability. Redefined here so\n * that this package does not depend on `@metamask/smart-transactions-controller`.\n */\nexport enum SentinelFeature {\n Advanced = 'advanced',\n Default = 'default',\n Sponsored = 'sponsored',\n}\n\n/**\n * The kind of relay (gas station) submission. Redefined here so that this\n * package does not depend on `@metamask/smart-transactions-controller`.\n *\n * @deprecated Sentinel no longer takes a `kind` in its metadata. This enum\n * will be removed in a future major version.\n */\nexport enum SentinelKind {\n Bundle = 'bundle',\n Default = 'default',\n GaslessEIP7702 = 'gaslessEIP7702',\n GaslessSendBundle = 'gaslessSendBundle',\n}\n\nexport enum SentinelProductFeature {\n Bridge = 'Bridge',\n Card = 'Card',\n dAppTransaction = 'dAppTransaction',\n Earn = 'Earn',\n Perp = 'Perp',\n Prediction = 'Prediction',\n Ramp = 'Ramp',\n Staking = 'Staking',\n Swap = 'Swap',\n}\n\n/**\n * Optional metadata forwarded with a relay submission for observability. All\n * fields are optional and passed through verbatim to the Sentinel API.\n */\nexport type SentinelMeta = {\n client?: string;\n clientVersion?: string;\n feature?: SentinelFeature | SentinelProductFeature;\n\n /**\n * @deprecated Sentinel no longer takes a `kind` in its metadata. This field\n * will be removed in a future major version.\n */\n kind?: SentinelKind;\n origin?: string;\n txType?: string;\n\n /**\n * @deprecated Sentinel no longer takes a `wallet` in its metadata. This field\n * will be removed in a future major version.\n */\n wallet?: string;\n // Hardware wallet manufacturer. Omitted when the signer is not a hardware wallet.\n accountHardwareType?: string;\n};\n\n/**\n * An EIP-7702 authorization entry, as accepted by the Sentinel simulation API.\n */\nexport type SentinelAuthorization = {\n /** Address of the smart contract that contains the code to be set. */\n address: Hex;\n\n /** Address of the account being upgraded. */\n from: Hex;\n};\n\n/**\n * A single transaction to simulate in a Sentinel simulation request.\n */\nexport type SentinelSimulationTransaction = {\n /** EIP-7702 authorization list for the transaction. */\n authorizationList?: SentinelAuthorization[];\n\n /** Data to send with the transaction. */\n data?: Hex;\n\n /** Sender of the transaction. */\n from: Hex;\n\n /** Gas limit for the transaction. */\n gas?: Hex;\n\n /** Maximum fee per gas for the transaction. */\n maxFeePerGas?: Hex;\n\n /** Maximum priority fee per gas for the transaction. */\n maxPriorityFeePerGas?: Hex;\n\n /** Recipient of the transaction. */\n to?: Hex;\n\n /** Value to send with the transaction. */\n value?: Hex;\n};\n\n/**\n * Overrides to blockchain state, keyed by address, for a simulation request.\n */\nexport type SentinelStateOverrides = {\n [address: Hex]: {\n /** Override the native balance of an address. */\n balance?: Hex;\n\n /** Override the code for an address. */\n code?: Hex;\n\n /** Overrides to the storage slots for an address. */\n stateDiff?: {\n [slot: Hex]: Hex;\n };\n };\n};\n\n/**\n * A request to the Sentinel API to simulate transactions. This is the superset\n * of the shapes previously used by `@metamask/transaction-controller` and\n * `@metamask/transaction-pay-controller`.\n */\nexport type SentinelSimulationRequest = {\n /** Overrides to block data for the simulation. */\n blockOverrides?: {\n time?: Hex;\n };\n\n /** Overrides to blockchain state, keyed by address. */\n overrides?: SentinelStateOverrides;\n\n /** Whether to include available token fees in the response. */\n suggestFees?: {\n /** Whether the transaction is submitted via a delegation (EIP-7702). */\n with7702?: boolean;\n\n /** Whether to include the gas fee of the token transfer. */\n withFeeTransfer?: boolean;\n\n /**\n * Whether to include a RedeemerEnforcer caveat, restricting redemption to\n * the relay signers, in the delegation used for the EIP-7702 estimate.\n */\n withRedeemerEnforcer?: boolean;\n\n /** Whether to include the native transfer if available. */\n withTransfer?: boolean;\n };\n\n /**\n * Transactions to be sequentially simulated. State changes impact subsequent\n * transactions in the list.\n */\n transactions: SentinelSimulationTransaction[];\n\n /** Whether to include call traces in the response. Defaults to false. */\n withCallTrace?: boolean;\n\n /** Whether to include the default block data. Defaults to false. */\n withDefaultBlockOverrides?: boolean;\n\n /** Whether to use gas fees in the simulation. Defaults to false. */\n withGas?: boolean;\n\n /** Whether to include event logs in the response. Defaults to false. */\n withLogs?: boolean;\n};\n\n/**\n * A request to submit a signed relay (gas station) transaction to the Sentinel\n * API via `eth_sendRelayTransaction`.\n */\nexport type SentinelRelaySubmitRequest = {\n /** EIP-7702 authorization tuples for the delegation. */\n authorizationList?: SentinelSignedAuthorization[];\n\n /** The chain to submit the transaction on. */\n chainId: Hex;\n\n /** The encoded calldata (for example `redeemDelegations`). */\n data: Hex;\n\n /** Optional metadata forwarded to the API for observability. */\n metadata?: SentinelMeta;\n\n /** The recipient of the transaction (for example the DelegationManager). */\n to: Hex;\n};\n\n/**\n * A fully signed EIP-7702 authorization tuple, as submitted to the relay.\n */\nexport type SentinelSignedAuthorization = {\n address: Hex;\n chainId: Hex;\n nonce: Hex;\n r: Hex;\n s: Hex;\n yParity: Hex;\n};\n\n/**\n * A request to look up the state of a submitted smart transaction by UUID.\n */\nexport type SentinelSmartTransactionRequest = {\n /** The chain the transaction was submitted on. */\n chainId: Hex;\n\n /** The UUID returned by {@link SentinelRelaySubmitResponse}. */\n uuid: string;\n};\n\n/**\n * A request to quote gas fees for unsigned smart transactions via\n * `POST /v1/networks/{chainId}/getFees`.\n */\nexport type SentinelGetFeesRequest = {\n /** The chain to quote fees on. */\n chainId: Hex;\n\n /**\n * Transactions to quote, in the order the fees should be returned. Each\n * entry is a {@link SentinelSimulationTransaction}. The handler forwards\n * them as the `txs` array.\n */\n transactions: SentinelSimulationTransaction[];\n};\n\n/**\n * A raw signed smart transaction and the metadata stored with it.\n */\nexport type SentinelSubmitTransactionWithMetadata = {\n /** Raw signed transaction. */\n tx: Hex;\n\n /** Observability metadata stored with the transaction. */\n metadata?: SentinelMeta;\n};\n\n/**\n * A request to submit signed smart transactions via\n * `POST /v1/networks/{chainId}/submitTransactions`.\n */\nexport type SentinelSubmitTransactionsRequest = {\n /** The chain to submit the transactions on. */\n chainId: Hex;\n\n /**\n * Raw signed transactions. Used when `rawTxsWithMetadata` is omitted or\n * empty.\n */\n rawTxs: Hex[];\n\n /** Raw signed transactions that cancel the submitted batch. */\n rawCancelTxs?: Hex[];\n\n /**\n * Raw signed transactions with metadata. When non-empty, the API submits\n * these instead of `rawTxs`.\n */\n rawTxsWithMetadata?: SentinelSubmitTransactionWithMetadata[];\n};\n\n/**\n * A request to cancel a smart transaction via\n * `POST /v1/networks/{chainId}/cancel`.\n */\nexport type SentinelCancelRequest = {\n /** The chain to cancel the transaction on. */\n chainId: Hex;\n\n /** UUID of the smart transaction to cancel. */\n uuid: string;\n};\n\n/**\n * A request to look up smart-transaction statuses via\n * `GET /v1/networks/{chainId}/batchStatus`.\n */\nexport type SentinelBatchStatusRequest = {\n /** The chain to look up statuses on. */\n chainId: Hex;\n\n /**\n * UUIDs to look up. Sent as the comma-separated `uuids` query parameter.\n * The handler rejects a list longer than 128.\n */\n uuids: string[];\n};\n\n/**\n * A single network entry from the Sentinel `/networks` registry, or the\n * configuration of a single network from the `/network` endpoint.\n */\nexport type SentinelNetwork = {\n /** Raw field name from the Sentinel API response; note uppercase 'D'. */\n chainID?: number;\n\n /** Whether simulation (confirmations) is supported for this chain. */\n confirmations?: boolean;\n\n /** Addresses of the relay signers that submit relay transactions. */\n cubistSigners?: Hex[];\n\n /** The subdomain used to build the Sentinel URL for this chain. */\n network: string;\n\n /** Whether the gas station relay is supported for this chain. */\n relayTransactions?: boolean;\n\n /** Whether the bundle path is supported for this chain. */\n sendBundle?: boolean;\n\n /** Whether simulations on this chain include gas fees for native tokens. */\n simulationIncludeFees?: boolean;\n\n /** Whether smart transactions are supported for this chain. */\n smartTransactions?: boolean;\n};\n\n/**\n * The Sentinel `/networks` registry response, keyed by decimal chain ID.\n */\nexport type SentinelNetworkRegistry = Record<string, SentinelNetwork>;\n\n/**\n * Raw event log emitted by a simulated transaction.\n */\nexport type SentinelSimulationLog = {\n /** Address of the account that created the event. */\n address: Hex;\n\n /** Raw data in the event that is not indexed. */\n data: Hex;\n\n /** Raw indexed data from the event. */\n topics: Hex[];\n};\n\n/**\n * Call trace of a single simulated transaction.\n */\nexport type SentinelSimulationCallTrace = {\n /** Nested calls. */\n calls?: SentinelSimulationCallTrace[] | null;\n\n /** Error message for the call, if any. */\n error?: string;\n\n /** Raw event logs created by the call. */\n logs?: SentinelSimulationLog[] | null;\n\n /** Raw return data from the call (revert hex when reverted). */\n output?: Hex;\n};\n\n/**\n * Per-account state changes recorded by a simulated transaction.\n */\nexport type SentinelSimulationStateDiffAccount = {\n /** Native balance of the account. */\n balance?: Hex;\n\n /** Nonce of the account. */\n nonce?: Hex;\n\n /** Storage values per slot. */\n storage?: {\n [slot: Hex]: Hex;\n };\n};\n\n/**\n * Changes to the blockchain state (pre/post) for a single simulated\n * transaction. Each side is keyed by account address.\n */\nexport type SentinelSimulationStateDiff = {\n /** Initial blockchain state before the transaction. */\n pre?: {\n [address: Hex]: SentinelSimulationStateDiffAccount;\n };\n\n /** Updated blockchain state after the transaction. */\n post?: {\n [address: Hex]: SentinelSimulationStateDiffAccount;\n };\n};\n\n/**\n * A token-denominated fee option returned by the simulation API when\n * `suggestFees` is requested.\n */\nexport type SentinelSimulationTokenFee = {\n /** Amount of tokens needed to pay for gas. */\n balanceNeededToken: Hex;\n\n /** Current token balance of the sender. */\n currentBalanceToken: Hex;\n\n /** Account address that the token should be transferred to. */\n feeRecipient: Hex;\n\n /** Conversion rate of 1 token to native WEI. */\n rateWei: Hex;\n\n /** Portion of `balanceNeededToken` that is the fee paid to MetaMask. */\n serviceFee?: Hex;\n\n /** Token data independent of the current transaction. */\n token: {\n /** Address of the token contract. */\n address: Hex;\n\n /** Number of decimals used by the token. */\n decimals: number;\n\n /** Symbol of the token. */\n symbol: string;\n };\n\n /** Estimated gas limit required for the fee transfer. */\n transferEstimate: Hex;\n};\n\n/**\n * A single recommended fee level for a simulated transaction, including the\n * gas fee parameters and the token-fee options at that level.\n */\nexport type SentinelSimulationFeeLevel = {\n /** Gas limit for the fee level. */\n gas: Hex;\n\n /** Maximum fee per gas for the fee level. */\n maxFeePerGas: Hex;\n\n /** Maximum priority fee per gas for the fee level. */\n maxPriorityFeePerGas: Hex;\n\n /** Token fee options for the fee level. */\n tokenFees: SentinelSimulationTokenFee[];\n};\n\n/**\n * The result of simulating a single transaction.\n */\nexport type SentinelSimulationResponseTransaction = {\n /** Hierarchy of call data including nested calls and logs. */\n callTrace?: SentinelSimulationCallTrace;\n\n /** An error message indicating the transaction could not be simulated. */\n error?: string;\n\n /** Recommended gas fees for the transaction, per fee level. */\n fees?: SentinelSimulationFeeLevel[];\n\n /**\n * Estimated total gas cost of the transaction, in wei as a decimal number.\n * Included in the `stateDiff` when `withGas` is true.\n */\n gasCost?: number;\n\n /** Required `gasLimit` for the transaction. */\n gasLimit?: Hex;\n\n /** Total gas used by the transaction. */\n gasUsed?: Hex;\n\n /** Return value of the transaction (for example the balance from `balanceOf`). */\n return: Hex;\n\n /** Changes to the blockchain state produced by the transaction. */\n stateDiff?: SentinelSimulationStateDiff;\n};\n\n/**\n * The response from the Sentinel simulation API.\n */\nexport type SentinelSimulationResponse = {\n /** Sponsorship determination for the request. */\n sponsorship: {\n /** Whether the gas costs are sponsored (no transfer required). */\n isSponsored: boolean;\n\n /** Error message for the sponsorship determination, if any. */\n error: string | null;\n\n /** Name of the party paying the gas fee, such as `Uniswap` or `MetaMask`. */\n sponsor?: string;\n };\n\n /** Simulation data for each transaction in the request. */\n transactions: SentinelSimulationResponseTransaction[];\n};\n\n/**\n * The response from submitting a relay transaction.\n */\nexport type SentinelRelaySubmitResponse = {\n uuid: string;\n};\n\n/**\n * Terminal and non-terminal statuses reported by the smart-transactions\n * endpoint.\n */\nexport enum SentinelSmartTransactionStatus {\n Pending = 'PENDING',\n Validated = 'VALIDATED',\n Failed = 'FAILED',\n}\n\n/**\n * A single smart-transaction entry returned by the `/smart-transactions/{uuid}`\n * endpoint.\n */\nexport type SentinelSmartTransaction = {\n /** The on-chain transaction hash, once available. */\n hash?: string;\n\n /**\n * The current status of the smart transaction. Compare against\n * {@link SentinelSmartTransactionStatus} values.\n */\n status: string;\n\n /**\n * The reason the transaction failed, if any. May be `null` when the API\n * explicitly reports no error reason.\n */\n errorReason?: string | null;\n};\n\n/**\n * The response from the `/smart-transactions/{uuid}` endpoint. Consumers\n * select the transaction(s) they care about from the `transactions` array\n * (typically the first entry).\n */\nexport type SentinelSmartTransactionResponse = {\n transactions: SentinelSmartTransaction[];\n};\n\n/**\n * One gas-fee level returned by the smart-transactions `/getFees` endpoint.\n * Amounts are decimal numbers, in wei.\n */\nexport type SentinelSmartTransactionFee = {\n /** Maximum fee per gas, in wei. */\n maxFeePerGas: number;\n\n /** Maximum priority fee per gas, in wei. */\n maxPriorityFeePerGas: number;\n};\n\n/**\n * Fee quote for a single transaction from the `/getFees` endpoint.\n */\nexport type SentinelSmartTransactionFees = {\n /** Candidate fees for submitting the transaction. */\n fees: SentinelSmartTransactionFee[];\n\n /** Candidate fees for cancelling the transaction. */\n cancelFees: SentinelSmartTransactionFee[];\n\n /** Estimated total fee, in wei. */\n feeEstimate: number;\n\n /** Gas limit used for the quote. */\n gasLimit: number;\n\n /** Gas used by the quote. */\n gasUsed: number;\n};\n\n/**\n * The response from `POST /v1/networks/{chainId}/getFees`. One entry in `txs`\n * per transaction in the request, in the same order.\n */\nexport type SentinelGetFeesResponse = {\n txs: SentinelSmartTransactionFees[];\n};\n\n/**\n * The response from `POST /v1/networks/{chainId}/submitTransactions`.\n */\nexport type SentinelSubmitTransactionsResponse = {\n /** UUID assigned to the submitted batch. */\n uuid: string;\n};\n\n/**\n * The response from `POST /v1/networks/{chainId}/cancel`.\n */\nexport type SentinelCancelResponse = {\n /** UUID of the cancelled smart transaction. */\n uuid: string;\n\n /** Number of pending transactions the cancel updated. */\n affected: number;\n\n /**\n * Always `true` on a 200 response. The handler sets this itself; the RPC\n * result only carries `uuid` and `affected`.\n */\n cancelled: boolean;\n};\n\n/**\n * Values of `cancellationReason` on a batch-status entry.\n * Compliant with the Transaction API (SCP).\n */\nexport enum SentinelCancellationReason {\n DeadlineMissed = 'deadline_missed',\n InvalidNonce = 'invalid_nonce',\n NotCancelled = 'not_cancelled',\n TooCheap = 'too_cheap',\n UserCancelled = 'user_cancelled',\n WouldRevert = 'would_revert',\n}\n\n/**\n * Values of `minedTx` on a batch-status entry.\n * Compliant with the Transaction API (SCP).\n */\nexport enum SentinelMinedTxStatus {\n Cancelled = 'cancelled',\n NotMined = 'not_mined',\n Reverted = 'reverted',\n Success = 'success',\n}\n\n/**\n * Values of `originalTransactionStatus` on a batch-status entry.\n * `UNKNOWN_STATUS` is the Go `String()` fallback and is not produced for a\n * status loaded from the database.\n */\nexport enum SentinelOriginalTransactionStatus {\n Cancelled = 'CANCELLED',\n CancelledLeakedReverted = 'CANCELLED_LEAKED_REVERTED',\n CancelledLeakedValidated = 'CANCELLED_LEAKED_VALIDATED',\n Failed = 'FAILED',\n FailedAuth = 'FAILED_AUTH',\n FailedGaslessConfig = 'FAILED_GASLESS_CONFIG',\n FailedGasTooLow = 'FAILED_GAS_TOO_LOW',\n FailedInsufficientFee = 'FAILED_INSUFFICIENT_FEE',\n FailedInsufficientFunds = 'FAILED_INSUFFICIENT_FUNDS',\n FailedNonceTooHigh = 'FAILED_NONCE_TOO_HIGH',\n FailedSpam = 'FAILED_SPAM',\n FailedSponsorshipRule = 'FAILED_SPONSORSHIP_RULE',\n FailedTimeout = 'FAILED_TIMEOUT',\n FailedUnknown = 'FAILED_UNKNOWN',\n FailedWouldRevert = 'FAILED_WOULD_REVERT',\n LeakedReverted = 'LEAKED_REVERTED',\n LeakedValidated = 'LEAKED_VALIDATED',\n NonceTooLow = 'NONCE_TOO_LOW',\n Pending = 'PENDING',\n PendingCancelled = 'PENDING_CANCELLED',\n Reverted = 'REVERTED',\n Validated = 'VALIDATED',\n}\n\n/**\n * One UUID's status from `GET /v1/networks/{chainId}/batchStatus`.\n */\nexport type SentinelBatchedTransactionStatus = {\n /**\n * Cancellation fee in wei. The handler always sends `0`.\n */\n cancellationFeeWei: number;\n\n /** Why the transaction was cancelled, or `not_cancelled`. */\n cancellationReason: SentinelCancellationReason;\n\n /**\n * Deadline ratio. The handler always sends `0`.\n */\n deadlineRatio: number;\n\n /**\n * Whether the transaction has left `PENDING`. `PENDING_CANCELLED` is\n * settled.\n */\n isSettled: boolean;\n\n /**\n * Hash of the mined submission. Empty when the aggregate status is not a\n * mined status, or when no submission hash matches that status.\n */\n minedHash: string;\n\n /** Mining outcome of the smart transaction. */\n minedTx: SentinelMinedTxStatus;\n\n /**\n * Failure message. Empty unless the aggregate status is\n * `FAILED_WOULD_REVERT`, `FAILED_SPONSORSHIP_RULE`,\n * `FAILED_INSUFFICIENT_FUNDS`, or `FAILED_INSUFFICIENT_FEE`.\n */\n wouldRevertMessage: string;\n\n /** Whether Sentinel treated the submission as a duplicate. */\n duplicated: boolean;\n\n /** Whether the submission was proxied. */\n proxied: boolean;\n\n /** Whether the submission timed out. */\n timedOut: boolean;\n\n /** Aggregate smart-transaction status. */\n originalTransactionStatus: SentinelOriginalTransactionStatus;\n};\n\n/**\n * The response from `GET /v1/networks/{chainId}/batchStatus`.\n * Keys are the smart-transaction UUIDs from the request.\n */\nexport type SentinelBatchStatusResponse = Record<\n string,\n SentinelBatchedTransactionStatus\n>;\n"]}
|