@metamask-previews/core-backend 14.0.0-preview-effabf81d → 14.0.0-preview-55295a2

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 CHANGED
@@ -11,10 +11,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
 
12
12
  - Bump `uuid` from `^14.0.1` to `^14.0.2` ([#11305](https://github.com/MetaMask/core/pull/11305))
13
13
 
14
- ### Fixed
15
-
16
- - Type `V5Transaction.methodId` as `string | null`, matching the `null` the Accounts API returns for plain native transfers ([#11379](https://github.com/MetaMask/core/pull/11379))
17
-
18
14
  ## [14.0.0]
19
15
 
20
16
  ### Added
@@ -235,8 +235,7 @@ export type V5Transaction = {
235
235
  blockHash: string;
236
236
  nonce?: string;
237
237
  value?: string;
238
- /** `null` for plain native transfers. */
239
- methodId?: string | null;
238
+ methodId?: string;
240
239
  operationCount?: number;
241
240
  memo?: string;
242
241
  transactionType?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/api/accounts/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAMnD,wCAAwC;AACxC,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,sBAAsB,CAAC;CACnC,CAAC;AAEF,yCAAyC;AACzC,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,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,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;CACxC,CAAC;AAEF,oBAAoB;AACpB,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC;AAMF,2BAA2B;AAC3B,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,sBAAsB;AACtB,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,kBAAkB,EAAE,CAAC;CAC5B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/api/accounts/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAmEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,SAAS;IACT,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,YAAY;CACJ,CAAC","sourcesContent":["/**\n * Accounts API types for the API Platform Client.\n * API: accounts.api.cx.metamask.io\n */\n\nimport type { PageInfo } from '../shared-types.js';\n\n// ============================================================================\n// BALANCE TYPES\n// ============================================================================\n\n/** V5 Balance Item from Accounts API */\nexport type V5BalanceItem = {\n object: 'token';\n symbol: string;\n name: string;\n type: 'native' | 'erc20';\n decimals: number;\n assetId: string;\n balance: string;\n accountId: string;\n /**\n * Token-level metadata such as Stellar trustline / native reserve fields.\n * Present when the upstream balance row carries it.\n */\n metadata?: V6TokenBalanceMetadata;\n};\n\n/** V5 Multi-account balances response */\nexport type V5BalancesResponse = {\n count: number;\n unprocessedNetworks: string[];\n balances: V5BalanceItem[];\n};\n\n/** V2 Balance item */\nexport type V2BalanceItem = {\n object: string;\n type?: string;\n timestamp?: string;\n address: string;\n symbol: string;\n name: string;\n decimals: number;\n chainId: number;\n balance: string;\n accountAddress?: string;\n};\n\n/** V2 Balances response */\nexport type V2BalancesResponse = {\n count: number;\n balances: V2BalanceItem[];\n unprocessedNetworks: number[];\n};\n\n/** V4 Multi-account balances response */\nexport type V4BalancesResponse = {\n count: number;\n balances: V2BalanceItem[];\n unprocessedNetworks: number[];\n};\n\n/**\n * Quote currency accepted by the v6 balances endpoint when `includePrices` is\n * true. A superset of {@link SupportedCurrency} (adds e.g. `sol`, `xdr`,\n * `xag`, `xau`, `bits`, `sats`). Defaults to `usd`.\n */\nexport type V6VsCurrency = string;\n\n/**\n * Possible `positionType` values on DeFi rows in the v6 balances response.\n * Categorizes the protocol module where the position is held.\n * Link here: https://developers.zerion.io/api-reference/wallets/get-wallet-fungible-positions#parameter-filter-position-types\n */\nexport const V6_DEFI_POSITION_TYPES = [\n 'deposit',\n 'loan',\n 'locked',\n 'staked',\n 'reward',\n 'wallet',\n 'investment',\n] as const;\n\n/**\n * The specific module or functionality within a DeFi protocol where a position\n * is held.\n */\nexport type V6DeFiPositionType = (typeof V6_DEFI_POSITION_TYPES)[number];\n\n/**\n * DeFi protocol metadata attached to an `object: defi` row in the v6 balances\n * response (`BalanceMetadataV3ResponseDto`).\n */\nexport type V6BalanceMetadata = {\n protocolId: string;\n productName: string;\n description: string;\n protocolUrl: string;\n protocolIconUrl?: string;\n positionType: V6DeFiPositionType;\n poolAddress: string;\n groupId: string;\n};\n\n/**\n * Stellar-specific token metadata (trustline and native reserve fields).\n */\nexport type V6StellarTokenBalanceMetadata = {\n /** Stellar trustline limit. */\n limit?: string;\n /** Whether the Stellar trustline is authorized. */\n authorized?: boolean;\n /** Whether the Stellar trustline is sponsored. */\n sponsored?: boolean;\n /** Stellar native spendable balance (unscaled stroops). */\n spendableBalance?: string;\n /** Stellar native minimum / reserve balance (unscaled stroops). */\n minimumReserveBalance?: string;\n};\n\n/**\n * Token-level metadata attached to an `object: token` row in the v5/v6\n * balances responses.\n *\n * Token decimals belong on the balance row (`decimals` / `assetsInfo`), not\n * here. Compose additional chain-specific types into this alias as they ship\n * (e.g. `V6StellarTokenBalanceMetadata & V6TronTokenBalanceMetadata`).\n */\nexport type V6TokenBalanceMetadata = V6StellarTokenBalanceMetadata;\n\n/**\n * A single balance row in the v6 balances response (`BalanceV3ResponseDto`).\n * `object: token` rows are token balances (and may carry\n * {@link V6TokenBalanceMetadata}, e.g. Stellar trustline info). `object: defi` rows\n * are flat DeFi positions and include {@link V6BalanceMetadata}.\n */\nexport type V6BalanceItem = {\n accountId: string;\n object: 'token' | 'defi';\n /** Asset standard reported by the network (for example `native` or `erc20`). */\n type: string;\n assetId: string;\n name: string;\n symbol: string;\n decimals: number;\n balance: string;\n /** Spot price in the requested `vsCurrency`. Present when `includePrices` is true. */\n price?: string;\n /** Asset metadata labels. Present when `includeLabels` is true. */\n labels?: string[];\n /** Canonical head asset ID. Present when `includeCanonicalHead` is true. */\n canonicalHead?: string;\n /**\n * DeFi protocol metadata for `object: defi` rows; token-level metadata such\n * as Stellar trustline info (e.g. `limit`, `authorized`) for `object: token`\n * rows.\n */\n metadata?: V6BalanceMetadata | V6TokenBalanceMetadata;\n};\n\n/**\n * V6 multi-account balances response (`MultiAccountBalancesV3ResponseDto`).\n */\nexport type V6BalancesResponse = {\n /** CAIP-2 networks that could not be processed for this request. */\n unprocessedNetworks: string[];\n /**\n * ERC-20 IDs from `includeAssetIds` that were not detected on any requested\n * account, plus other IDs that still need a client fallback flow.\n */\n unprocessedIncludeAssetIds: string[];\n /** Flat token and DeFi balance rows. */\n balances: V6BalanceItem[];\n /**\n * CAIP-10 account IDs whose DeFi positions are still being indexed upstream;\n * poll again shortly. DeFi balance rows for these accounts are omitted from\n * `balances` until indexing completes.\n */\n processingDefiPositions?: string[];\n};\n\n// ============================================================================\n// SUPPORTED NETWORKS TYPES\n// ============================================================================\n\n/** V1 Supported networks response */\nexport type V1SupportedNetworksResponse = {\n supportedNetworks: number[];\n};\n\n/** V2 Supported networks response (CAIP-2 chain IDs). */\nexport type V2SupportedNetworksResponse = {\n fullSupport: string[];\n partialSupport: string[];\n};\n\n/** Active networks response */\nexport type V2ActiveNetworksResponse = {\n activeNetworks: string[];\n};\n\n// ============================================================================\n// TRANSACTION TYPES\n// ============================================================================\n\n/** Transaction by hash response */\nexport type V1TransactionByHashResponse = {\n hash: string;\n timestamp: string;\n chainId: number;\n blockNumber: number;\n blockHash: string;\n gas: number;\n gasUsed: number;\n gasPrice: string;\n effectiveGasPrice: string;\n nonce: number;\n cumulativeGasUsed: number;\n methodId?: string;\n value: string;\n to: string;\n from: string;\n isError?: boolean;\n valueTransfers?: {\n from: string;\n to: string;\n amount: string;\n decimal: number;\n contractAddress: string;\n symbol: string;\n name: string;\n transferType: string;\n }[];\n logs?: {\n data: string;\n topics: string[];\n address: string;\n logIndex: number;\n }[];\n transactionType?: string;\n transactionCategory?: string;\n transactionProtocol?: string;\n};\n\n/** Account transactions response */\nexport type V1AccountTransactionsResponse = {\n data: V1TransactionByHashResponse[];\n pageInfo: PageInfo;\n};\n\n/** V4 Multi-account transactions response */\nexport type V4MultiAccountTransactionsResponse = {\n unprocessedNetworks: string[];\n pageInfo: {\n count: number;\n hasNextPage: boolean;\n endCursor?: string;\n };\n data: V1TransactionByHashResponse[];\n};\n\n/** Transaction header on a v5 multi-account transactions row. */\nexport type V5Transaction = {\n id: string;\n /** CAIP-2 chain ID. */\n chainId: string;\n status: string;\n /** Unix timestamp in milliseconds. */\n timestamp: number;\n date: string;\n from: string;\n to: string | null;\n blockNumber: string;\n blockHash: string;\n nonce?: string;\n value?: string;\n /** `null` for plain native transfers. */\n methodId?: string | null;\n operationCount?: number;\n memo?: string;\n transactionType?: string;\n transactionCategory?: string;\n transactionProtocol?: string;\n readable?: string;\n readableExtended?: string;\n};\n\n/** Value transfer on a v5 transaction. */\nexport type V5TransactionValueTransfer = {\n assetClass: string;\n from: string;\n to: string;\n /** CAIP-19 asset ID. */\n assetId: string;\n amount?: string;\n decimal?: number;\n symbol?: string;\n name?: string;\n tokenId?: string;\n};\n\n/** Non-transfer operation on a v5 transaction, such as a Stellar trustline update. */\nexport type V5TransactionMiscOperation = {\n type?: string;\n /** CAIP-19 asset ID. */\n assetId?: string;\n};\n\n/** Fee asset on a v5 transaction. */\nexport type V5TransactionFeeAsset = {\n /** CAIP-19 asset ID. */\n assetId: string;\n amount: string;\n decimals: number;\n symbol?: string;\n};\n\n/** Fee paid for a v5 transaction. `null` when the chain does not report one. */\nexport type V5TransactionFee = {\n /** CAIP-10 account ID of the fee payer. */\n payer: string;\n asset: V5TransactionFeeAsset;\n unitsConsumed?: number;\n unitPrice?: string;\n baseFee?: string;\n priorityFee?: string;\n stroops?: number;\n};\n\n/** EVM log included when `includeLogs` is true. */\nexport type V5TransactionLog = {\n data: string;\n topics: string[];\n address: string;\n logIndex: number;\n};\n\n/** One account's view of a transaction from `GET /v5/multiaccount/transactions`. */\nexport type V5TransactionRecord = {\n /** CAIP-10 account ID this row was fetched for. */\n accountId: string;\n tx: V5Transaction;\n valueTransfers: V5TransactionValueTransfer[];\n /** Present when `includeMiscOperations` is true. */\n miscOperations?: V5TransactionMiscOperation[];\n /** Present when `includeLogs` is true. */\n logs?: V5TransactionLog[];\n fee: V5TransactionFee | null;\n};\n\n/** V5 multi-account transactions response (`GetMultiAccountNetworkTransactionsV5Dto`). */\nexport type V5MultiAccountTransactionsResponse = {\n data: V5TransactionRecord[];\n pageInfo: {\n count: number;\n hasNextPage: boolean;\n endCursor?: string;\n };\n /** CAIP-10 account IDs that could not be processed for this request. */\n unprocessedAccounts: string[];\n};\n\n/** Query filters for `GET /v5/multiaccount/transactions`. */\nexport type V5MultiAccountTransactionsQueryOptions = {\n /** CAIP-2 chain IDs. */\n networks?: string[];\n /** CAIP-19 asset IDs. */\n assetIds?: string[];\n /** Start timestamp (epoch seconds). */\n startTimestamp?: number;\n /** End timestamp (epoch seconds). */\n endTimestamp?: number;\n /** Maximum number of transactions to return (1–50, default 20). */\n limit?: number;\n /** JWT containing the endCursor for the next page. */\n after?: string;\n /**\n * Accepted by the API and ignored. V5 pages forward only.\n */\n before?: string;\n sortDirection?: 'ASC' | 'DESC';\n includeMiscOperations?: boolean;\n includeTxMetadata?: boolean;\n includeLogs?: boolean;\n /**\n * When true, drop transactions whose ERC-20 transfers are not in the Token API.\n */\n filterSupportedTokens?: boolean;\n /**\n * When true, drop a transaction only when every value transfer is paid to a\n * watched account. Swaps are kept.\n */\n filterIncomingTransfers?: boolean;\n /**\n * When true, drop transactions whose protocol is `SPAM_TOKEN` or `SPAM`.\n */\n filterSpamTokens?: boolean;\n /** Maximum number of logs per transaction. */\n maxLogsPerTx?: number;\n /** Language for the transaction category. Defaults to `en`. */\n lang?: string;\n};\n\n// ============================================================================\n// RELATIONSHIP TYPES\n// ============================================================================\n\n/**\n * Value transfer within a transaction\n */\nexport type ValueTransfer = {\n from: string;\n to: string;\n amount: string;\n decimal: number;\n transferType: string;\n};\n\n/**\n * Account address relationship result from v1 endpoint\n */\nexport type V1AccountRelationshipResult = {\n /** Transaction hash of the relationship */\n txHash?: string;\n /** Chain ID */\n chainId?: number;\n /** Number of interactions */\n count?: number;\n /** Transaction data details */\n data?: {\n hash: string;\n timestamp: string;\n chainId: number;\n blockNumber: number;\n blockHash: string;\n gas: number;\n gasUsed: number;\n gasPrice: string;\n effectiveGasPrice: string;\n nonce: number;\n cumulativeGasUsed: number;\n methodId: string;\n value: string;\n to: string;\n from: string;\n isError: boolean;\n valueTransfers: ValueTransfer[];\n logs: unknown[];\n transactionType: string;\n transactionCategory: string;\n readable: string;\n textFunctionSignature: string;\n };\n /** Error information when relationship lookup fails */\n error?: {\n code: string;\n message: string;\n };\n};\n\n// ============================================================================\n// NFT TYPES\n// ============================================================================\n\n/** NFT item */\nexport type NftItem = {\n tokenId: string;\n contractAddress: string;\n chainId: number;\n name?: string;\n description?: string;\n imageUrl?: string;\n attributes?: Record<string, unknown>[];\n};\n\n/** NFTs response */\nexport type V2NftsResponse = {\n data: NftItem[];\n pageInfo: PageInfo;\n};\n\n// ============================================================================\n// TOKEN DISCOVERY TYPES\n// ============================================================================\n\n/** Token discovery item */\nexport type TokenDiscoveryItem = {\n address: string;\n chainId: number;\n symbol: string;\n name: string;\n decimals: number;\n balance?: string;\n};\n\n/** Tokens response */\nexport type V2TokensResponse = {\n data: TokenDiscoveryItem[];\n};\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/api/accounts/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAmEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,SAAS;IACT,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,YAAY;CACJ,CAAC","sourcesContent":["/**\n * Accounts API types for the API Platform Client.\n * API: accounts.api.cx.metamask.io\n */\n\nimport type { PageInfo } from '../shared-types.js';\n\n// ============================================================================\n// BALANCE TYPES\n// ============================================================================\n\n/** V5 Balance Item from Accounts API */\nexport type V5BalanceItem = {\n object: 'token';\n symbol: string;\n name: string;\n type: 'native' | 'erc20';\n decimals: number;\n assetId: string;\n balance: string;\n accountId: string;\n /**\n * Token-level metadata such as Stellar trustline / native reserve fields.\n * Present when the upstream balance row carries it.\n */\n metadata?: V6TokenBalanceMetadata;\n};\n\n/** V5 Multi-account balances response */\nexport type V5BalancesResponse = {\n count: number;\n unprocessedNetworks: string[];\n balances: V5BalanceItem[];\n};\n\n/** V2 Balance item */\nexport type V2BalanceItem = {\n object: string;\n type?: string;\n timestamp?: string;\n address: string;\n symbol: string;\n name: string;\n decimals: number;\n chainId: number;\n balance: string;\n accountAddress?: string;\n};\n\n/** V2 Balances response */\nexport type V2BalancesResponse = {\n count: number;\n balances: V2BalanceItem[];\n unprocessedNetworks: number[];\n};\n\n/** V4 Multi-account balances response */\nexport type V4BalancesResponse = {\n count: number;\n balances: V2BalanceItem[];\n unprocessedNetworks: number[];\n};\n\n/**\n * Quote currency accepted by the v6 balances endpoint when `includePrices` is\n * true. A superset of {@link SupportedCurrency} (adds e.g. `sol`, `xdr`,\n * `xag`, `xau`, `bits`, `sats`). Defaults to `usd`.\n */\nexport type V6VsCurrency = string;\n\n/**\n * Possible `positionType` values on DeFi rows in the v6 balances response.\n * Categorizes the protocol module where the position is held.\n * Link here: https://developers.zerion.io/api-reference/wallets/get-wallet-fungible-positions#parameter-filter-position-types\n */\nexport const V6_DEFI_POSITION_TYPES = [\n 'deposit',\n 'loan',\n 'locked',\n 'staked',\n 'reward',\n 'wallet',\n 'investment',\n] as const;\n\n/**\n * The specific module or functionality within a DeFi protocol where a position\n * is held.\n */\nexport type V6DeFiPositionType = (typeof V6_DEFI_POSITION_TYPES)[number];\n\n/**\n * DeFi protocol metadata attached to an `object: defi` row in the v6 balances\n * response (`BalanceMetadataV3ResponseDto`).\n */\nexport type V6BalanceMetadata = {\n protocolId: string;\n productName: string;\n description: string;\n protocolUrl: string;\n protocolIconUrl?: string;\n positionType: V6DeFiPositionType;\n poolAddress: string;\n groupId: string;\n};\n\n/**\n * Stellar-specific token metadata (trustline and native reserve fields).\n */\nexport type V6StellarTokenBalanceMetadata = {\n /** Stellar trustline limit. */\n limit?: string;\n /** Whether the Stellar trustline is authorized. */\n authorized?: boolean;\n /** Whether the Stellar trustline is sponsored. */\n sponsored?: boolean;\n /** Stellar native spendable balance (unscaled stroops). */\n spendableBalance?: string;\n /** Stellar native minimum / reserve balance (unscaled stroops). */\n minimumReserveBalance?: string;\n};\n\n/**\n * Token-level metadata attached to an `object: token` row in the v5/v6\n * balances responses.\n *\n * Token decimals belong on the balance row (`decimals` / `assetsInfo`), not\n * here. Compose additional chain-specific types into this alias as they ship\n * (e.g. `V6StellarTokenBalanceMetadata & V6TronTokenBalanceMetadata`).\n */\nexport type V6TokenBalanceMetadata = V6StellarTokenBalanceMetadata;\n\n/**\n * A single balance row in the v6 balances response (`BalanceV3ResponseDto`).\n * `object: token` rows are token balances (and may carry\n * {@link V6TokenBalanceMetadata}, e.g. Stellar trustline info). `object: defi` rows\n * are flat DeFi positions and include {@link V6BalanceMetadata}.\n */\nexport type V6BalanceItem = {\n accountId: string;\n object: 'token' | 'defi';\n /** Asset standard reported by the network (for example `native` or `erc20`). */\n type: string;\n assetId: string;\n name: string;\n symbol: string;\n decimals: number;\n balance: string;\n /** Spot price in the requested `vsCurrency`. Present when `includePrices` is true. */\n price?: string;\n /** Asset metadata labels. Present when `includeLabels` is true. */\n labels?: string[];\n /** Canonical head asset ID. Present when `includeCanonicalHead` is true. */\n canonicalHead?: string;\n /**\n * DeFi protocol metadata for `object: defi` rows; token-level metadata such\n * as Stellar trustline info (e.g. `limit`, `authorized`) for `object: token`\n * rows.\n */\n metadata?: V6BalanceMetadata | V6TokenBalanceMetadata;\n};\n\n/**\n * V6 multi-account balances response (`MultiAccountBalancesV3ResponseDto`).\n */\nexport type V6BalancesResponse = {\n /** CAIP-2 networks that could not be processed for this request. */\n unprocessedNetworks: string[];\n /**\n * ERC-20 IDs from `includeAssetIds` that were not detected on any requested\n * account, plus other IDs that still need a client fallback flow.\n */\n unprocessedIncludeAssetIds: string[];\n /** Flat token and DeFi balance rows. */\n balances: V6BalanceItem[];\n /**\n * CAIP-10 account IDs whose DeFi positions are still being indexed upstream;\n * poll again shortly. DeFi balance rows for these accounts are omitted from\n * `balances` until indexing completes.\n */\n processingDefiPositions?: string[];\n};\n\n// ============================================================================\n// SUPPORTED NETWORKS TYPES\n// ============================================================================\n\n/** V1 Supported networks response */\nexport type V1SupportedNetworksResponse = {\n supportedNetworks: number[];\n};\n\n/** V2 Supported networks response (CAIP-2 chain IDs). */\nexport type V2SupportedNetworksResponse = {\n fullSupport: string[];\n partialSupport: string[];\n};\n\n/** Active networks response */\nexport type V2ActiveNetworksResponse = {\n activeNetworks: string[];\n};\n\n// ============================================================================\n// TRANSACTION TYPES\n// ============================================================================\n\n/** Transaction by hash response */\nexport type V1TransactionByHashResponse = {\n hash: string;\n timestamp: string;\n chainId: number;\n blockNumber: number;\n blockHash: string;\n gas: number;\n gasUsed: number;\n gasPrice: string;\n effectiveGasPrice: string;\n nonce: number;\n cumulativeGasUsed: number;\n methodId?: string;\n value: string;\n to: string;\n from: string;\n isError?: boolean;\n valueTransfers?: {\n from: string;\n to: string;\n amount: string;\n decimal: number;\n contractAddress: string;\n symbol: string;\n name: string;\n transferType: string;\n }[];\n logs?: {\n data: string;\n topics: string[];\n address: string;\n logIndex: number;\n }[];\n transactionType?: string;\n transactionCategory?: string;\n transactionProtocol?: string;\n};\n\n/** Account transactions response */\nexport type V1AccountTransactionsResponse = {\n data: V1TransactionByHashResponse[];\n pageInfo: PageInfo;\n};\n\n/** V4 Multi-account transactions response */\nexport type V4MultiAccountTransactionsResponse = {\n unprocessedNetworks: string[];\n pageInfo: {\n count: number;\n hasNextPage: boolean;\n endCursor?: string;\n };\n data: V1TransactionByHashResponse[];\n};\n\n/** Transaction header on a v5 multi-account transactions row. */\nexport type V5Transaction = {\n id: string;\n /** CAIP-2 chain ID. */\n chainId: string;\n status: string;\n /** Unix timestamp in milliseconds. */\n timestamp: number;\n date: string;\n from: string;\n to: string | null;\n blockNumber: string;\n blockHash: string;\n nonce?: string;\n value?: string;\n methodId?: string;\n operationCount?: number;\n memo?: string;\n transactionType?: string;\n transactionCategory?: string;\n transactionProtocol?: string;\n readable?: string;\n readableExtended?: string;\n};\n\n/** Value transfer on a v5 transaction. */\nexport type V5TransactionValueTransfer = {\n assetClass: string;\n from: string;\n to: string;\n /** CAIP-19 asset ID. */\n assetId: string;\n amount?: string;\n decimal?: number;\n symbol?: string;\n name?: string;\n tokenId?: string;\n};\n\n/** Non-transfer operation on a v5 transaction, such as a Stellar trustline update. */\nexport type V5TransactionMiscOperation = {\n type?: string;\n /** CAIP-19 asset ID. */\n assetId?: string;\n};\n\n/** Fee asset on a v5 transaction. */\nexport type V5TransactionFeeAsset = {\n /** CAIP-19 asset ID. */\n assetId: string;\n amount: string;\n decimals: number;\n symbol?: string;\n};\n\n/** Fee paid for a v5 transaction. `null` when the chain does not report one. */\nexport type V5TransactionFee = {\n /** CAIP-10 account ID of the fee payer. */\n payer: string;\n asset: V5TransactionFeeAsset;\n unitsConsumed?: number;\n unitPrice?: string;\n baseFee?: string;\n priorityFee?: string;\n stroops?: number;\n};\n\n/** EVM log included when `includeLogs` is true. */\nexport type V5TransactionLog = {\n data: string;\n topics: string[];\n address: string;\n logIndex: number;\n};\n\n/** One account's view of a transaction from `GET /v5/multiaccount/transactions`. */\nexport type V5TransactionRecord = {\n /** CAIP-10 account ID this row was fetched for. */\n accountId: string;\n tx: V5Transaction;\n valueTransfers: V5TransactionValueTransfer[];\n /** Present when `includeMiscOperations` is true. */\n miscOperations?: V5TransactionMiscOperation[];\n /** Present when `includeLogs` is true. */\n logs?: V5TransactionLog[];\n fee: V5TransactionFee | null;\n};\n\n/** V5 multi-account transactions response (`GetMultiAccountNetworkTransactionsV5Dto`). */\nexport type V5MultiAccountTransactionsResponse = {\n data: V5TransactionRecord[];\n pageInfo: {\n count: number;\n hasNextPage: boolean;\n endCursor?: string;\n };\n /** CAIP-10 account IDs that could not be processed for this request. */\n unprocessedAccounts: string[];\n};\n\n/** Query filters for `GET /v5/multiaccount/transactions`. */\nexport type V5MultiAccountTransactionsQueryOptions = {\n /** CAIP-2 chain IDs. */\n networks?: string[];\n /** CAIP-19 asset IDs. */\n assetIds?: string[];\n /** Start timestamp (epoch seconds). */\n startTimestamp?: number;\n /** End timestamp (epoch seconds). */\n endTimestamp?: number;\n /** Maximum number of transactions to return (1–50, default 20). */\n limit?: number;\n /** JWT containing the endCursor for the next page. */\n after?: string;\n /**\n * Accepted by the API and ignored. V5 pages forward only.\n */\n before?: string;\n sortDirection?: 'ASC' | 'DESC';\n includeMiscOperations?: boolean;\n includeTxMetadata?: boolean;\n includeLogs?: boolean;\n /**\n * When true, drop transactions whose ERC-20 transfers are not in the Token API.\n */\n filterSupportedTokens?: boolean;\n /**\n * When true, drop a transaction only when every value transfer is paid to a\n * watched account. Swaps are kept.\n */\n filterIncomingTransfers?: boolean;\n /**\n * When true, drop transactions whose protocol is `SPAM_TOKEN` or `SPAM`.\n */\n filterSpamTokens?: boolean;\n /** Maximum number of logs per transaction. */\n maxLogsPerTx?: number;\n /** Language for the transaction category. Defaults to `en`. */\n lang?: string;\n};\n\n// ============================================================================\n// RELATIONSHIP TYPES\n// ============================================================================\n\n/**\n * Value transfer within a transaction\n */\nexport type ValueTransfer = {\n from: string;\n to: string;\n amount: string;\n decimal: number;\n transferType: string;\n};\n\n/**\n * Account address relationship result from v1 endpoint\n */\nexport type V1AccountRelationshipResult = {\n /** Transaction hash of the relationship */\n txHash?: string;\n /** Chain ID */\n chainId?: number;\n /** Number of interactions */\n count?: number;\n /** Transaction data details */\n data?: {\n hash: string;\n timestamp: string;\n chainId: number;\n blockNumber: number;\n blockHash: string;\n gas: number;\n gasUsed: number;\n gasPrice: string;\n effectiveGasPrice: string;\n nonce: number;\n cumulativeGasUsed: number;\n methodId: string;\n value: string;\n to: string;\n from: string;\n isError: boolean;\n valueTransfers: ValueTransfer[];\n logs: unknown[];\n transactionType: string;\n transactionCategory: string;\n readable: string;\n textFunctionSignature: string;\n };\n /** Error information when relationship lookup fails */\n error?: {\n code: string;\n message: string;\n };\n};\n\n// ============================================================================\n// NFT TYPES\n// ============================================================================\n\n/** NFT item */\nexport type NftItem = {\n tokenId: string;\n contractAddress: string;\n chainId: number;\n name?: string;\n description?: string;\n imageUrl?: string;\n attributes?: Record<string, unknown>[];\n};\n\n/** NFTs response */\nexport type V2NftsResponse = {\n data: NftItem[];\n pageInfo: PageInfo;\n};\n\n// ============================================================================\n// TOKEN DISCOVERY TYPES\n// ============================================================================\n\n/** Token discovery item */\nexport type TokenDiscoveryItem = {\n address: string;\n chainId: number;\n symbol: string;\n name: string;\n decimals: number;\n balance?: string;\n};\n\n/** Tokens response */\nexport type V2TokensResponse = {\n data: TokenDiscoveryItem[];\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask-previews/core-backend",
3
- "version": "14.0.0-preview-effabf81d",
3
+ "version": "14.0.0-preview-55295a2",
4
4
  "description": "Core backend services for MetaMask",
5
5
  "keywords": [
6
6
  "Ethereum",