@metamask-previews/sentinel-api-service 0.0.0-preview-d34fa10c8

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.
Files changed (70) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/LICENSE +6 -0
  3. package/LICENSE.APACHE2 +201 -0
  4. package/LICENSE.MIT +21 -0
  5. package/README.md +15 -0
  6. package/dist/constants.cjs +71 -0
  7. package/dist/constants.cjs.map +1 -0
  8. package/dist/constants.d.cts +63 -0
  9. package/dist/constants.d.cts.map +1 -0
  10. package/dist/constants.d.mts +63 -0
  11. package/dist/constants.d.mts.map +1 -0
  12. package/dist/constants.mjs +68 -0
  13. package/dist/constants.mjs.map +1 -0
  14. package/dist/errors.cjs +43 -0
  15. package/dist/errors.cjs.map +1 -0
  16. package/dist/errors.d.cts +27 -0
  17. package/dist/errors.d.cts.map +1 -0
  18. package/dist/errors.d.mts +27 -0
  19. package/dist/errors.d.mts.map +1 -0
  20. package/dist/errors.mjs +37 -0
  21. package/dist/errors.mjs.map +1 -0
  22. package/dist/index.cjs +17 -0
  23. package/dist/index.cjs.map +1 -0
  24. package/dist/index.d.cts +7 -0
  25. package/dist/index.d.cts.map +1 -0
  26. package/dist/index.d.mts +7 -0
  27. package/dist/index.d.mts.map +1 -0
  28. package/dist/index.mjs +5 -0
  29. package/dist/index.mjs.map +1 -0
  30. package/dist/logger.cjs +7 -0
  31. package/dist/logger.cjs.map +1 -0
  32. package/dist/logger.d.cts +5 -0
  33. package/dist/logger.d.cts.map +1 -0
  34. package/dist/logger.d.mts +5 -0
  35. package/dist/logger.d.mts.map +1 -0
  36. package/dist/logger.mjs +4 -0
  37. package/dist/logger.mjs.map +1 -0
  38. package/dist/sentinel-api-service-method-action-types.cjs +7 -0
  39. package/dist/sentinel-api-service-method-action-types.cjs.map +1 -0
  40. package/dist/sentinel-api-service-method-action-types.d.cts +62 -0
  41. package/dist/sentinel-api-service-method-action-types.d.cts.map +1 -0
  42. package/dist/sentinel-api-service-method-action-types.d.mts +62 -0
  43. package/dist/sentinel-api-service-method-action-types.d.mts.map +1 -0
  44. package/dist/sentinel-api-service-method-action-types.mjs +6 -0
  45. package/dist/sentinel-api-service-method-action-types.mjs.map +1 -0
  46. package/dist/sentinel-api-service.cjs +316 -0
  47. package/dist/sentinel-api-service.cjs.map +1 -0
  48. package/dist/sentinel-api-service.d.cts +90 -0
  49. package/dist/sentinel-api-service.d.cts.map +1 -0
  50. package/dist/sentinel-api-service.d.mts +90 -0
  51. package/dist/sentinel-api-service.d.mts.map +1 -0
  52. package/dist/sentinel-api-service.mjs +312 -0
  53. package/dist/sentinel-api-service.mjs.map +1 -0
  54. package/dist/structs.cjs +58 -0
  55. package/dist/structs.cjs.map +1 -0
  56. package/dist/structs.d.cts +63 -0
  57. package/dist/structs.d.cts.map +1 -0
  58. package/dist/structs.d.mts +63 -0
  59. package/dist/structs.d.mts.map +1 -0
  60. package/dist/structs.mjs +55 -0
  61. package/dist/structs.mjs.map +1 -0
  62. package/dist/types.cjs +36 -0
  63. package/dist/types.cjs.map +1 -0
  64. package/dist/types.d.cts +420 -0
  65. package/dist/types.d.cts.map +1 -0
  66. package/dist/types.d.mts +420 -0
  67. package/dist/types.d.mts.map +1 -0
  68. package/dist/types.mjs +33 -0
  69. package/dist/types.mjs.map +1 -0
  70. package/package.json +79 -0
package/dist/types.cjs ADDED
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SentinelSmartTransactionStatus = exports.SentinelKind = exports.SentinelFeature = void 0;
4
+ /**
5
+ * The feature that originated a relay (gas station) submission. Used purely as
6
+ * metadata forwarded to the Sentinel API for observability. Redefined here so
7
+ * that this package does not depend on `@metamask/smart-transactions-controller`.
8
+ */
9
+ var SentinelFeature;
10
+ (function (SentinelFeature) {
11
+ SentinelFeature["Advanced"] = "advanced";
12
+ SentinelFeature["Default"] = "default";
13
+ SentinelFeature["Sponsored"] = "sponsored";
14
+ })(SentinelFeature || (exports.SentinelFeature = SentinelFeature = {}));
15
+ /**
16
+ * The kind of relay (gas station) submission. Redefined here so that this
17
+ * package does not depend on `@metamask/smart-transactions-controller`.
18
+ */
19
+ var SentinelKind;
20
+ (function (SentinelKind) {
21
+ SentinelKind["Bundle"] = "bundle";
22
+ SentinelKind["Default"] = "default";
23
+ SentinelKind["GaslessEIP7702"] = "gaslessEIP7702";
24
+ SentinelKind["GaslessSendBundle"] = "gaslessSendBundle";
25
+ })(SentinelKind || (exports.SentinelKind = SentinelKind = {}));
26
+ /**
27
+ * Terminal and non-terminal statuses reported by the smart-transactions
28
+ * endpoint.
29
+ */
30
+ var SentinelSmartTransactionStatus;
31
+ (function (SentinelSmartTransactionStatus) {
32
+ SentinelSmartTransactionStatus["Pending"] = "PENDING";
33
+ SentinelSmartTransactionStatus["Validated"] = "VALIDATED";
34
+ SentinelSmartTransactionStatus["Failed"] = "FAILED";
35
+ })(SentinelSmartTransactionStatus || (exports.SentinelSmartTransactionStatus = SentinelSmartTransactionStatus = {}));
36
+ //# sourceMappingURL=types.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.cjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAgHA;;;;GAIG;AACH,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,wCAAqB,CAAA;IACrB,sCAAmB,CAAA;IACnB,0CAAuB,CAAA;AACzB,CAAC,EAJW,eAAe,+BAAf,eAAe,QAI1B;AAED;;;GAGG;AACH,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,iCAAiB,CAAA;IACjB,mCAAmB,CAAA;IACnB,iDAAiC,CAAA;IACjC,uDAAuC,CAAA;AACzC,CAAC,EALW,YAAY,4BAAZ,YAAY,QAKvB;AAyWD;;;GAGG;AACH,IAAY,8BAIX;AAJD,WAAY,8BAA8B;IACxC,qDAAmB,CAAA;IACnB,yDAAuB,CAAA;IACvB,mDAAiB,CAAA;AACnB,CAAC,EAJW,8BAA8B,8CAA9B,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';\nimport type { SentinelApiServiceMethodActions } from './sentinel-api-service-method-action-types';\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 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 /** 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.\n */\nexport type SentinelNetwork = {\n /** Whether simulation (confirmations) is supported for this chain. */\n confirmations?: boolean;\n\n /** Raw field name from the Sentinel API response; note uppercase 'D'. */\n chainID?: number;\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 smart transactions are supported for this chain. */\n smartTransactions?: boolean;\n\n /** Whether the bundle path is supported for this chain. */\n sendBundle?: 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\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"]}
@@ -0,0 +1,420 @@
1
+ import type { DataServiceCacheUpdatedEvent, DataServiceGranularCacheUpdatedEvent, DataServiceInvalidateQueriesAction } from "@metamask/base-data-service";
2
+ import type { CreateServicePolicyOptions } from "@metamask/controller-utils";
3
+ import type { Messenger } from "@metamask/messenger";
4
+ import type { Hex } from "@metamask/utils";
5
+ import type { QueryClientConfig } from "@tanstack/query-core";
6
+ import type { SentinelEnvironment, serviceName } from "./constants.cjs";
7
+ import type { SentinelApiServiceMethodActions } from "./sentinel-api-service-method-action-types.cjs";
8
+ /**
9
+ * Invalidates cached queries for {@link SentinelApiService}.
10
+ */
11
+ export type SentinelApiServiceInvalidateQueriesAction = DataServiceInvalidateQueriesAction<typeof serviceName>;
12
+ /**
13
+ * Actions that {@link SentinelApiService} exposes to other consumers.
14
+ */
15
+ export type SentinelApiServiceActions = SentinelApiServiceMethodActions | SentinelApiServiceInvalidateQueriesAction;
16
+ /**
17
+ * Published when {@link SentinelApiService}'s cache is updated.
18
+ */
19
+ export type SentinelApiServiceCacheUpdatedEvent = DataServiceCacheUpdatedEvent<typeof serviceName>;
20
+ /**
21
+ * Published when a key within {@link SentinelApiService}'s cache is updated.
22
+ */
23
+ export type SentinelApiServiceGranularCacheUpdatedEvent = DataServiceGranularCacheUpdatedEvent<typeof serviceName>;
24
+ /**
25
+ * Events that {@link SentinelApiService} exposes to other consumers.
26
+ */
27
+ export type SentinelApiServiceEvents = SentinelApiServiceCacheUpdatedEvent | SentinelApiServiceGranularCacheUpdatedEvent;
28
+ /**
29
+ * Retrieves a bearer token from the `AuthenticationController` in
30
+ * `@metamask/profile-sync-controller`. Declared structurally to avoid pulling
31
+ * that package's transitive dependency tree in for a single action contract.
32
+ */
33
+ type AuthenticationControllerGetBearerTokenAction = {
34
+ type: 'AuthenticationController:getBearerToken';
35
+ handler: (entropySourceId?: string) => Promise<string>;
36
+ };
37
+ /**
38
+ * Actions from other messengers that {@link SentinelApiService} calls.
39
+ */
40
+ type AllowedActions = AuthenticationControllerGetBearerTokenAction;
41
+ /**
42
+ * The messenger which is restricted to actions and events accessed by
43
+ * {@link SentinelApiService}.
44
+ */
45
+ export type SentinelApiServiceMessenger = Messenger<typeof serviceName, SentinelApiServiceActions | AllowedActions, SentinelApiServiceEvents>;
46
+ /**
47
+ * Constructor options for {@link SentinelApiService}.
48
+ */
49
+ export type SentinelApiServiceOptions = {
50
+ /** The messenger suited for this service. */
51
+ messenger: SentinelApiServiceMessenger;
52
+ /**
53
+ * The `fetch` function to use for requests. Defaults to the global `fetch`.
54
+ */
55
+ fetch?: typeof fetch;
56
+ /**
57
+ * The Sentinel API environment to target (`dev`, `uat`, or `prod`).
58
+ * Defaults to `prod`.
59
+ */
60
+ environment?: SentinelEnvironment;
61
+ /**
62
+ * Identifier for the calling client (for example `extension` or `mobile`),
63
+ * sent as the `X-Client-Id` header.
64
+ */
65
+ clientId?: string;
66
+ /**
67
+ * Version of the calling client, sent as the `X-Client-Version` header when
68
+ * provided.
69
+ */
70
+ clientVersion?: string;
71
+ /** Configuration for the underlying TanStack Query client. */
72
+ queryClientConfig?: QueryClientConfig;
73
+ /**
74
+ * Options to pass to `createServicePolicy`. Retries are disabled by default
75
+ * (`maxRetries: 0`) to preserve the single-attempt behaviour of the clients
76
+ * this service replaces; pass `maxRetries` here to opt in.
77
+ */
78
+ policyOptions?: CreateServicePolicyOptions;
79
+ };
80
+ /**
81
+ * The feature that originated a relay (gas station) submission. Used purely as
82
+ * metadata forwarded to the Sentinel API for observability. Redefined here so
83
+ * that this package does not depend on `@metamask/smart-transactions-controller`.
84
+ */
85
+ export declare enum SentinelFeature {
86
+ Advanced = "advanced",
87
+ Default = "default",
88
+ Sponsored = "sponsored"
89
+ }
90
+ /**
91
+ * The kind of relay (gas station) submission. Redefined here so that this
92
+ * package does not depend on `@metamask/smart-transactions-controller`.
93
+ */
94
+ export declare enum SentinelKind {
95
+ Bundle = "bundle",
96
+ Default = "default",
97
+ GaslessEIP7702 = "gaslessEIP7702",
98
+ GaslessSendBundle = "gaslessSendBundle"
99
+ }
100
+ /**
101
+ * Optional metadata forwarded with a relay submission for observability. All
102
+ * fields are optional and passed through verbatim to the Sentinel API.
103
+ */
104
+ export type SentinelMeta = {
105
+ client?: string;
106
+ clientVersion?: string;
107
+ feature?: SentinelFeature;
108
+ kind?: SentinelKind;
109
+ origin?: string;
110
+ txType?: string;
111
+ wallet?: string;
112
+ };
113
+ /**
114
+ * An EIP-7702 authorization entry, as accepted by the Sentinel simulation API.
115
+ */
116
+ export type SentinelAuthorization = {
117
+ /** Address of the smart contract that contains the code to be set. */
118
+ address: Hex;
119
+ /** Address of the account being upgraded. */
120
+ from: Hex;
121
+ };
122
+ /**
123
+ * A single transaction to simulate in a Sentinel simulation request.
124
+ */
125
+ export type SentinelSimulationTransaction = {
126
+ /** EIP-7702 authorization list for the transaction. */
127
+ authorizationList?: SentinelAuthorization[];
128
+ /** Data to send with the transaction. */
129
+ data?: Hex;
130
+ /** Sender of the transaction. */
131
+ from: Hex;
132
+ /** Gas limit for the transaction. */
133
+ gas?: Hex;
134
+ /** Maximum fee per gas for the transaction. */
135
+ maxFeePerGas?: Hex;
136
+ /** Maximum priority fee per gas for the transaction. */
137
+ maxPriorityFeePerGas?: Hex;
138
+ /** Recipient of the transaction. */
139
+ to?: Hex;
140
+ /** Value to send with the transaction. */
141
+ value?: Hex;
142
+ };
143
+ /**
144
+ * Overrides to blockchain state, keyed by address, for a simulation request.
145
+ */
146
+ export type SentinelStateOverrides = {
147
+ [address: Hex]: {
148
+ /** Override the code for an address. */
149
+ code?: Hex;
150
+ /** Overrides to the storage slots for an address. */
151
+ stateDiff?: {
152
+ [slot: Hex]: Hex;
153
+ };
154
+ };
155
+ };
156
+ /**
157
+ * A request to the Sentinel API to simulate transactions. This is the superset
158
+ * of the shapes previously used by `@metamask/transaction-controller` and
159
+ * `@metamask/transaction-pay-controller`.
160
+ */
161
+ export type SentinelSimulationRequest = {
162
+ /** Overrides to block data for the simulation. */
163
+ blockOverrides?: {
164
+ time?: Hex;
165
+ };
166
+ /** Overrides to blockchain state, keyed by address. */
167
+ overrides?: SentinelStateOverrides;
168
+ /** Whether to include available token fees in the response. */
169
+ suggestFees?: {
170
+ /** Whether the transaction is submitted via a delegation (EIP-7702). */
171
+ with7702?: boolean;
172
+ /** Whether to include the gas fee of the token transfer. */
173
+ withFeeTransfer?: boolean;
174
+ /** Whether to include the native transfer if available. */
175
+ withTransfer?: boolean;
176
+ };
177
+ /**
178
+ * Transactions to be sequentially simulated. State changes impact subsequent
179
+ * transactions in the list.
180
+ */
181
+ transactions: SentinelSimulationTransaction[];
182
+ /** Whether to include call traces in the response. Defaults to false. */
183
+ withCallTrace?: boolean;
184
+ /** Whether to include the default block data. Defaults to false. */
185
+ withDefaultBlockOverrides?: boolean;
186
+ /** Whether to use gas fees in the simulation. Defaults to false. */
187
+ withGas?: boolean;
188
+ /** Whether to include event logs in the response. Defaults to false. */
189
+ withLogs?: boolean;
190
+ };
191
+ /**
192
+ * A request to submit a signed relay (gas station) transaction to the Sentinel
193
+ * API via `eth_sendRelayTransaction`.
194
+ */
195
+ export type SentinelRelaySubmitRequest = {
196
+ /** EIP-7702 authorization tuples for the delegation. */
197
+ authorizationList?: SentinelSignedAuthorization[];
198
+ /** The chain to submit the transaction on. */
199
+ chainId: Hex;
200
+ /** The encoded calldata (for example `redeemDelegations`). */
201
+ data: Hex;
202
+ /** Optional metadata forwarded to the API for observability. */
203
+ metadata?: SentinelMeta;
204
+ /** The recipient of the transaction (for example the DelegationManager). */
205
+ to: Hex;
206
+ };
207
+ /**
208
+ * A fully signed EIP-7702 authorization tuple, as submitted to the relay.
209
+ */
210
+ export type SentinelSignedAuthorization = {
211
+ address: Hex;
212
+ chainId: Hex;
213
+ nonce: Hex;
214
+ r: Hex;
215
+ s: Hex;
216
+ yParity: Hex;
217
+ };
218
+ /**
219
+ * A request to look up the state of a submitted smart transaction by UUID.
220
+ */
221
+ export type SentinelSmartTransactionRequest = {
222
+ /** The chain the transaction was submitted on. */
223
+ chainId: Hex;
224
+ /** The UUID returned by {@link SentinelRelaySubmitResponse}. */
225
+ uuid: string;
226
+ };
227
+ /**
228
+ * A single network entry from the Sentinel `/networks` registry.
229
+ */
230
+ export type SentinelNetwork = {
231
+ /** Whether simulation (confirmations) is supported for this chain. */
232
+ confirmations?: boolean;
233
+ /** Raw field name from the Sentinel API response; note uppercase 'D'. */
234
+ chainID?: number;
235
+ /** The subdomain used to build the Sentinel URL for this chain. */
236
+ network: string;
237
+ /** Whether the gas station relay is supported for this chain. */
238
+ relayTransactions?: boolean;
239
+ /** Whether smart transactions are supported for this chain. */
240
+ smartTransactions?: boolean;
241
+ /** Whether the bundle path is supported for this chain. */
242
+ sendBundle?: boolean;
243
+ };
244
+ /**
245
+ * The Sentinel `/networks` registry response, keyed by decimal chain ID.
246
+ */
247
+ export type SentinelNetworkRegistry = Record<string, SentinelNetwork>;
248
+ /**
249
+ * Raw event log emitted by a simulated transaction.
250
+ */
251
+ export type SentinelSimulationLog = {
252
+ /** Address of the account that created the event. */
253
+ address: Hex;
254
+ /** Raw data in the event that is not indexed. */
255
+ data: Hex;
256
+ /** Raw indexed data from the event. */
257
+ topics: Hex[];
258
+ };
259
+ /**
260
+ * Call trace of a single simulated transaction.
261
+ */
262
+ export type SentinelSimulationCallTrace = {
263
+ /** Nested calls. */
264
+ calls?: SentinelSimulationCallTrace[] | null;
265
+ /** Error message for the call, if any. */
266
+ error?: string;
267
+ /** Raw event logs created by the call. */
268
+ logs?: SentinelSimulationLog[] | null;
269
+ /** Raw return data from the call (revert hex when reverted). */
270
+ output?: Hex;
271
+ };
272
+ /**
273
+ * Per-account state changes recorded by a simulated transaction.
274
+ */
275
+ export type SentinelSimulationStateDiffAccount = {
276
+ /** Native balance of the account. */
277
+ balance?: Hex;
278
+ /** Nonce of the account. */
279
+ nonce?: Hex;
280
+ /** Storage values per slot. */
281
+ storage?: {
282
+ [slot: Hex]: Hex;
283
+ };
284
+ };
285
+ /**
286
+ * Changes to the blockchain state (pre/post) for a single simulated
287
+ * transaction. Each side is keyed by account address.
288
+ */
289
+ export type SentinelSimulationStateDiff = {
290
+ /** Initial blockchain state before the transaction. */
291
+ pre?: {
292
+ [address: Hex]: SentinelSimulationStateDiffAccount;
293
+ };
294
+ /** Updated blockchain state after the transaction. */
295
+ post?: {
296
+ [address: Hex]: SentinelSimulationStateDiffAccount;
297
+ };
298
+ };
299
+ /**
300
+ * A token-denominated fee option returned by the simulation API when
301
+ * `suggestFees` is requested.
302
+ */
303
+ export type SentinelSimulationTokenFee = {
304
+ /** Amount of tokens needed to pay for gas. */
305
+ balanceNeededToken: Hex;
306
+ /** Current token balance of the sender. */
307
+ currentBalanceToken: Hex;
308
+ /** Account address that the token should be transferred to. */
309
+ feeRecipient: Hex;
310
+ /** Conversion rate of 1 token to native WEI. */
311
+ rateWei: Hex;
312
+ /** Portion of `balanceNeededToken` that is the fee paid to MetaMask. */
313
+ serviceFee?: Hex;
314
+ /** Token data independent of the current transaction. */
315
+ token: {
316
+ /** Address of the token contract. */
317
+ address: Hex;
318
+ /** Number of decimals used by the token. */
319
+ decimals: number;
320
+ /** Symbol of the token. */
321
+ symbol: string;
322
+ };
323
+ /** Estimated gas limit required for the fee transfer. */
324
+ transferEstimate: Hex;
325
+ };
326
+ /**
327
+ * A single recommended fee level for a simulated transaction, including the
328
+ * gas fee parameters and the token-fee options at that level.
329
+ */
330
+ export type SentinelSimulationFeeLevel = {
331
+ /** Gas limit for the fee level. */
332
+ gas: Hex;
333
+ /** Maximum fee per gas for the fee level. */
334
+ maxFeePerGas: Hex;
335
+ /** Maximum priority fee per gas for the fee level. */
336
+ maxPriorityFeePerGas: Hex;
337
+ /** Token fee options for the fee level. */
338
+ tokenFees: SentinelSimulationTokenFee[];
339
+ };
340
+ /**
341
+ * The result of simulating a single transaction.
342
+ */
343
+ export type SentinelSimulationResponseTransaction = {
344
+ /** Hierarchy of call data including nested calls and logs. */
345
+ callTrace?: SentinelSimulationCallTrace;
346
+ /** An error message indicating the transaction could not be simulated. */
347
+ error?: string;
348
+ /** Recommended gas fees for the transaction, per fee level. */
349
+ fees?: SentinelSimulationFeeLevel[];
350
+ /**
351
+ * Estimated total gas cost of the transaction, in wei as a decimal number.
352
+ * Included in the `stateDiff` when `withGas` is true.
353
+ */
354
+ gasCost?: number;
355
+ /** Required `gasLimit` for the transaction. */
356
+ gasLimit?: Hex;
357
+ /** Total gas used by the transaction. */
358
+ gasUsed?: Hex;
359
+ /** Return value of the transaction (for example the balance from `balanceOf`). */
360
+ return: Hex;
361
+ /** Changes to the blockchain state produced by the transaction. */
362
+ stateDiff?: SentinelSimulationStateDiff;
363
+ };
364
+ /**
365
+ * The response from the Sentinel simulation API.
366
+ */
367
+ export type SentinelSimulationResponse = {
368
+ /** Sponsorship determination for the request. */
369
+ sponsorship: {
370
+ /** Whether the gas costs are sponsored (no transfer required). */
371
+ isSponsored: boolean;
372
+ /** Error message for the sponsorship determination, if any. */
373
+ error: string | null;
374
+ };
375
+ /** Simulation data for each transaction in the request. */
376
+ transactions: SentinelSimulationResponseTransaction[];
377
+ };
378
+ /**
379
+ * The response from submitting a relay transaction.
380
+ */
381
+ export type SentinelRelaySubmitResponse = {
382
+ uuid: string;
383
+ };
384
+ /**
385
+ * Terminal and non-terminal statuses reported by the smart-transactions
386
+ * endpoint.
387
+ */
388
+ export declare enum SentinelSmartTransactionStatus {
389
+ Pending = "PENDING",
390
+ Validated = "VALIDATED",
391
+ Failed = "FAILED"
392
+ }
393
+ /**
394
+ * A single smart-transaction entry returned by the `/smart-transactions/{uuid}`
395
+ * endpoint.
396
+ */
397
+ export type SentinelSmartTransaction = {
398
+ /** The on-chain transaction hash, once available. */
399
+ hash?: string;
400
+ /**
401
+ * The current status of the smart transaction. Compare against
402
+ * {@link SentinelSmartTransactionStatus} values.
403
+ */
404
+ status: string;
405
+ /**
406
+ * The reason the transaction failed, if any. May be `null` when the API
407
+ * explicitly reports no error reason.
408
+ */
409
+ errorReason?: string | null;
410
+ };
411
+ /**
412
+ * The response from the `/smart-transactions/{uuid}` endpoint. Consumers
413
+ * select the transaction(s) they care about from the `transactions` array
414
+ * (typically the first entry).
415
+ */
416
+ export type SentinelSmartTransactionResponse = {
417
+ transactions: SentinelSmartTransaction[];
418
+ };
419
+ export {};
420
+ //# sourceMappingURL=types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,4BAA4B,EAC5B,oCAAoC,EACpC,kCAAkC,EACnC,oCAAoC;AACrC,OAAO,KAAK,EAAE,0BAA0B,EAAE,mCAAmC;AAC7E,OAAO,KAAK,EAAE,SAAS,EAAE,4BAA4B;AACrD,OAAO,KAAK,EAAE,GAAG,EAAE,wBAAwB;AAC3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,6BAA6B;AAE9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,wBAAoB;AACpE,OAAO,KAAK,EAAE,+BAA+B,EAAE,uDAAmD;AAElG;;GAEG;AACH,MAAM,MAAM,yCAAyC,GACnD,kCAAkC,CAAC,OAAO,WAAW,CAAC,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,yBAAyB,GACjC,+BAA+B,GAC/B,yCAAyC,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,4BAA4B,CAC5E,OAAO,WAAW,CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,2CAA2C,GACrD,oCAAoC,CAAC,OAAO,WAAW,CAAC,CAAC;AAE3D;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAChC,m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