@metamask-previews/core-backend 10.0.1-preview-56ced5c22 → 11.0.0-preview-4454eb0

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
@@ -7,12 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [11.0.0]
11
+
10
12
  ### Added
11
13
 
12
14
  - Add optional `apiUrls` option to `ApiPlatformClientOptions`, allowing API base URLs (accounts, prices, token, tokens) to be overridden per client instance, e.g. from client env vars; unspecified services fall back to the production `API_URLS` ([#10196](https://github.com/MetaMask/core/pull/10196))
15
+ - Add optional `metadata` to `V5BalanceItem` and to the Account Activity `Balance` type ([#10194](https://github.com/MetaMask/core/pull/10194))
16
+ - Add optional `sponsored`, `spendableBalance`, and `minimumReserveBalance` Stellar fields to `V6TokenBalanceMetadata` ([#10194](https://github.com/MetaMask/core/pull/10194))
13
17
 
14
18
  ### Changed
15
19
 
20
+ - **BREAKING:** Rename `V6TokenMetadata` to `V6TokenBalanceMetadata` and `V6TokenStellarMetadata` to `V6StellarTokenBalanceMetadata`
16
21
  - **BREAKING:** Accounts API `V2SupportedNetworksResponse` now uses CAIP-2 string arrays for both `fullSupport` and `partialSupport`, replacing decimal `fullSupport` and object-shaped `partialSupport.balances` ([#10144](https://github.com/MetaMask/core/pull/10144))
17
22
  - Bump `@metamask/profile-sync-controller` from `^32.0.0` to `^32.1.1` ([#10184](https://github.com/MetaMask/core/pull/10184), [#10220](https://github.com/MetaMask/core/pull/10220))
18
23
  - Bump `@metamask/utils` from `^11.12.0` to `^12.0.0` ([#10192](https://github.com/MetaMask/core/pull/10192))
@@ -455,7 +460,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
455
460
  - **Type definitions** - Comprehensive TypeScript types for transactions, balances, WebSocket messages, and service configurations
456
461
  - **Logging infrastructure** - Structured logging with module-specific loggers for debugging and monitoring
457
462
 
458
- [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/core-backend@10.0.1...HEAD
463
+ [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/core-backend@11.0.0...HEAD
464
+ [11.0.0]: https://github.com/MetaMask/core/compare/@metamask/core-backend@10.0.1...@metamask/core-backend@11.0.0
459
465
  [10.0.1]: https://github.com/MetaMask/core/compare/@metamask/core-backend@10.0.0...@metamask/core-backend@10.0.1
460
466
  [10.0.0]: https://github.com/MetaMask/core/compare/@metamask/core-backend@9.1.1...@metamask/core-backend@10.0.0
461
467
  [9.1.1]: https://github.com/MetaMask/core/compare/@metamask/core-backend@9.1.0...@metamask/core-backend@9.1.1
@@ -3,5 +3,5 @@
3
3
  */
4
4
  export { AccountsApiClient } from './client.js';
5
5
  export { V6_DEFI_POSITION_TYPES } from './types.js';
6
- export type { V5BalanceItem, V5BalancesResponse, V2BalanceItem, V2BalancesResponse, V4BalancesResponse, V6VsCurrency, V6DeFiPositionType, V6BalanceMetadata, V6TokenMetadata, V6BalanceItem, V6BalancesResponse, V1SupportedNetworksResponse, V2SupportedNetworksResponse, V2ActiveNetworksResponse, V1TransactionByHashResponse, V1AccountTransactionsResponse, V4MultiAccountTransactionsResponse, ValueTransfer, V1AccountRelationshipResult, NftItem, V2NftsResponse, TokenDiscoveryItem, V2TokensResponse, } from './types.js';
6
+ export type { V5BalanceItem, V5BalancesResponse, V2BalanceItem, V2BalancesResponse, V4BalancesResponse, V6VsCurrency, V6DeFiPositionType, V6BalanceMetadata, V6StellarTokenBalanceMetadata, V6TokenBalanceMetadata, V6BalanceItem, V6BalancesResponse, V1SupportedNetworksResponse, V2SupportedNetworksResponse, V2ActiveNetworksResponse, V1TransactionByHashResponse, V1AccountTransactionsResponse, V4MultiAccountTransactionsResponse, ValueTransfer, V1AccountRelationshipResult, NftItem, V2NftsResponse, TokenDiscoveryItem, V2TokensResponse, } from './types.js';
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/accounts/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AACpD,YAAY,EACV,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,2BAA2B,EAC3B,2BAA2B,EAC3B,wBAAwB,EACxB,2BAA2B,EAC3B,6BAA6B,EAC7B,kCAAkC,EAClC,aAAa,EACb,2BAA2B,EAC3B,OAAO,EACP,cAAc,EACd,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/accounts/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AACpD,YAAY,EACV,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,6BAA6B,EAC7B,sBAAsB,EACtB,aAAa,EACb,kBAAkB,EAClB,2BAA2B,EAC3B,2BAA2B,EAC3B,wBAAwB,EACxB,2BAA2B,EAC3B,6BAA6B,EAC7B,kCAAkC,EAClC,aAAa,EACb,2BAA2B,EAC3B,OAAO,EACP,cAAc,EACd,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,YAAY,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/accounts/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC","sourcesContent":["/**\n * Accounts API barrel export.\n */\n\nexport { AccountsApiClient } from './client.js';\nexport { V6_DEFI_POSITION_TYPES } from './types.js';\nexport type {\n V5BalanceItem,\n V5BalancesResponse,\n V2BalanceItem,\n V2BalancesResponse,\n V4BalancesResponse,\n V6VsCurrency,\n V6DeFiPositionType,\n V6BalanceMetadata,\n V6TokenMetadata,\n V6BalanceItem,\n V6BalancesResponse,\n V1SupportedNetworksResponse,\n V2SupportedNetworksResponse,\n V2ActiveNetworksResponse,\n V1TransactionByHashResponse,\n V1AccountTransactionsResponse,\n V4MultiAccountTransactionsResponse,\n ValueTransfer,\n V1AccountRelationshipResult,\n NftItem,\n V2NftsResponse,\n TokenDiscoveryItem,\n V2TokensResponse,\n} from './types.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/accounts/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC","sourcesContent":["/**\n * Accounts API barrel export.\n */\n\nexport { AccountsApiClient } from './client.js';\nexport { V6_DEFI_POSITION_TYPES } from './types.js';\nexport type {\n V5BalanceItem,\n V5BalancesResponse,\n V2BalanceItem,\n V2BalancesResponse,\n V4BalancesResponse,\n V6VsCurrency,\n V6DeFiPositionType,\n V6BalanceMetadata,\n V6StellarTokenBalanceMetadata,\n V6TokenBalanceMetadata,\n V6BalanceItem,\n V6BalancesResponse,\n V1SupportedNetworksResponse,\n V2SupportedNetworksResponse,\n V2ActiveNetworksResponse,\n V1TransactionByHashResponse,\n V1AccountTransactionsResponse,\n V4MultiAccountTransactionsResponse,\n ValueTransfer,\n V1AccountRelationshipResult,\n NftItem,\n V2NftsResponse,\n TokenDiscoveryItem,\n V2TokensResponse,\n} from './types.js';\n"]}
@@ -13,6 +13,11 @@ export type V5BalanceItem = {
13
13
  assetId: string;
14
14
  balance: string;
15
15
  accountId: string;
16
+ /**
17
+ * Token-level metadata such as Stellar trustline / native reserve fields.
18
+ * Present when the upstream balance row carries it.
19
+ */
20
+ metadata?: V6TokenBalanceMetadata;
16
21
  };
17
22
  /** V5 Multi-account balances response */
18
23
  export type V5BalancesResponse = {
@@ -77,20 +82,33 @@ export type V6BalanceMetadata = {
77
82
  groupId: string;
78
83
  };
79
84
  /**
80
- * Token-level metadata attached to an `object: token` row in the v6 balances
81
- * response, e.g. Stellar trustline metadata. Additional keys may be present.
85
+ * Stellar-specific token metadata (trustline and native reserve fields).
82
86
  */
83
- export type V6TokenMetadata = {
87
+ export type V6StellarTokenBalanceMetadata = {
84
88
  /** Stellar trustline limit. */
85
89
  limit?: string;
86
90
  /** Whether the Stellar trustline is authorized. */
87
91
  authorized?: boolean;
88
- [key: string]: unknown;
92
+ /** Whether the Stellar trustline is sponsored. */
93
+ sponsored?: boolean;
94
+ /** Stellar native spendable balance (unscaled stroops). */
95
+ spendableBalance?: string;
96
+ /** Stellar native minimum / reserve balance (unscaled stroops). */
97
+ minimumReserveBalance?: string;
89
98
  };
99
+ /**
100
+ * Token-level metadata attached to an `object: token` row in the v5/v6
101
+ * balances responses.
102
+ *
103
+ * Token decimals belong on the balance row (`decimals` / `assetsInfo`), not
104
+ * here. Compose additional chain-specific types into this alias as they ship
105
+ * (e.g. `V6StellarTokenBalanceMetadata & V6TronTokenBalanceMetadata`).
106
+ */
107
+ export type V6TokenBalanceMetadata = V6StellarTokenBalanceMetadata;
90
108
  /**
91
109
  * A single balance row in the v6 balances response (`BalanceV3ResponseDto`).
92
110
  * `object: token` rows are token balances (and may carry
93
- * {@link V6TokenMetadata}, e.g. Stellar trustline info). `object: defi` rows
111
+ * {@link V6TokenBalanceMetadata}, e.g. Stellar trustline info). `object: defi` rows
94
112
  * are flat DeFi positions and include {@link V6BalanceMetadata}.
95
113
  */
96
114
  export type V6BalanceItem = {
@@ -114,7 +132,7 @@ export type V6BalanceItem = {
114
132
  * as Stellar trustline info (e.g. `limit`, `authorized`) for `object: token`
115
133
  * rows.
116
134
  */
117
- metadata?: V6BalanceMetadata | V6TokenMetadata;
135
+ metadata?: V6BalanceMetadata | V6TokenBalanceMetadata;
118
136
  };
119
137
  /**
120
138
  * V6 multi-account balances response (`MultiAccountBalancesV3ResponseDto`).
@@ -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;CACnB,CAAC;AAEF,yCAAyC;AACzC,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC3B,CAAC;AAEF,sBAAsB;AACtB,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,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ACd,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;AA8DH;;;;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\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 * Token-level metadata attached to an `object: token` row in the v6 balances\n * response, e.g. Stellar trustline metadata. Additional keys may be present.\n */\nexport type V6TokenMetadata = {\n /** Stellar trustline limit. */\n limit?: string;\n /** Whether the Stellar trustline is authorized. */\n authorized?: boolean;\n [key: string]: unknown;\n};\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 V6TokenMetadata}, 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 | V6TokenMetadata;\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// ============================================================================\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// ============================================================================\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"]}
@@ -5,7 +5,7 @@
5
5
  export type { PageInfo, SupportedCurrency, MarketDataDetails, ApiPlatformClientOptions, ApiUrls, FetchOptions, } from './shared-types.js';
6
6
  export { API_URLS, STALE_TIMES, GC_TIMES, DEFAULT_AUTH_TOKEN_TIMEOUT, RETRY_CONFIG, calculateRetryDelay, getQueryOptionsOverrides, shouldRetry, HttpError, } from './shared-types.js';
7
7
  export { AccountsApiClient, V6_DEFI_POSITION_TYPES } from './accounts/index.js';
8
- export type { V5BalanceItem, V5BalancesResponse, V2BalanceItem, V2BalancesResponse, V4BalancesResponse, V6VsCurrency, V6DeFiPositionType, V6BalanceMetadata, V6TokenMetadata, V6BalanceItem, V6BalancesResponse, V1SupportedNetworksResponse, V2SupportedNetworksResponse, V2ActiveNetworksResponse, V1TransactionByHashResponse, V1AccountTransactionsResponse, V4MultiAccountTransactionsResponse, ValueTransfer, V1AccountRelationshipResult, NftItem, V2NftsResponse, TokenDiscoveryItem, V2TokensResponse, } from './accounts/index.js';
8
+ export type { V5BalanceItem, V5BalancesResponse, V2BalanceItem, V2BalancesResponse, V4BalancesResponse, V6VsCurrency, V6DeFiPositionType, V6BalanceMetadata, V6StellarTokenBalanceMetadata, V6TokenBalanceMetadata, V6BalanceItem, V6BalancesResponse, V1SupportedNetworksResponse, V2SupportedNetworksResponse, V2ActiveNetworksResponse, V1TransactionByHashResponse, V1AccountTransactionsResponse, V4MultiAccountTransactionsResponse, ValueTransfer, V1AccountRelationshipResult, NftItem, V2NftsResponse, TokenDiscoveryItem, V2TokensResponse, } from './accounts/index.js';
9
9
  export { PricesApiClient } from './prices/index.js';
10
10
  export type { V3SpotPricesResponse, CoinGeckoSpotPrice, ExchangeRateInfo, V1ExchangeRatesResponse, PriceSupportedNetworksResponse, V1HistoricalPricesResponse, V3HistoricalPricesResponse, } from './prices/index.js';
11
11
  export { TokenApiClient } from './token/index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,YAAY,EACV,QAAQ,EACR,iBAAiB,EACjB,iBAAiB,EACjB,wBAAwB,EACxB,OAAO,EACP,YAAY,GACb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,0BAA0B,EAC1B,YAAY,EACZ,mBAAmB,EACnB,wBAAwB,EACxB,WAAW,EACX,SAAS,GACV,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAChF,YAAY,EACV,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,2BAA2B,EAC3B,2BAA2B,EAC3B,wBAAwB,EACxB,2BAA2B,EAC3B,6BAA6B,EAC7B,kCAAkC,EAClC,aAAa,EACb,2BAA2B,EAC3B,OAAO,EACP,cAAc,EACd,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EACV,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,EACvB,8BAA8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O,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAalD,aAAa;AACb,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAOpD,cAAc;AACd,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD,uCAAuC;AACvC,OAAO,EACL,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,wBAAwB,CAAC","sourcesContent":["/**\n * API barrel export.\n * Re-exports all types and clients from the API folder.\n */\n\n// Shared types and utilities\nexport type {\n PageInfo,\n SupportedCurrency,\n MarketDataDetails,\n ApiPlatformClientOptions,\n ApiUrls,\n FetchOptions,\n} from './shared-types.js';\nexport {\n API_URLS,\n STALE_TIMES,\n GC_TIMES,\n DEFAULT_AUTH_TOKEN_TIMEOUT,\n RETRY_CONFIG,\n calculateRetryDelay,\n getQueryOptionsOverrides,\n shouldRetry,\n HttpError,\n} from './shared-types.js';\n\n// Accounts API\nexport { AccountsApiClient, V6_DEFI_POSITION_TYPES } from './accounts/index.js';\nexport type {\n V5BalanceItem,\n V5BalancesResponse,\n V2BalanceItem,\n V2BalancesResponse,\n V4BalancesResponse,\n V6VsCurrency,\n V6DeFiPositionType,\n V6BalanceMetadata,\n V6TokenMetadata,\n V6BalanceItem,\n V6BalancesResponse,\n V1SupportedNetworksResponse,\n V2SupportedNetworksResponse,\n V2ActiveNetworksResponse,\n V1TransactionByHashResponse,\n V1AccountTransactionsResponse,\n V4MultiAccountTransactionsResponse,\n ValueTransfer,\n V1AccountRelationshipResult,\n NftItem,\n V2NftsResponse,\n TokenDiscoveryItem,\n V2TokensResponse,\n} from './accounts/index.js';\n\n// Prices API\nexport { PricesApiClient } from './prices/index.js';\nexport type {\n V3SpotPricesResponse,\n CoinGeckoSpotPrice,\n ExchangeRateInfo,\n V1ExchangeRatesResponse,\n PriceSupportedNetworksResponse,\n V1HistoricalPricesResponse,\n V3HistoricalPricesResponse,\n} from './prices/index.js';\n\n// Token API\nexport { TokenApiClient } from './token/index.js';\nexport type {\n TokenMetadata,\n V1TokenDescriptionResponse,\n NetworkInfo,\n TopAsset,\n TrendingSortBy,\n TrendingToken,\n TopGainersSortOption,\n TrendingSortOption,\n V1SuggestedOccurrenceFloorsResponse,\n} from './token/index.js';\n\n// Tokens API\nexport { TokensApiClient } from './tokens/index.js';\nexport type {\n V1TokenSupportedNetworksResponse,\n V2TokenSupportedNetworksResponse,\n V3AssetResponse,\n} from './tokens/index.js';\n\n// Base client\nexport { BaseApiClient } from './base-client.js';\nexport type { InternalFetchOptions } from './base-client.js';\n\n// API Platform Client (unified client)\nexport {\n ApiPlatformClient,\n createApiPlatformClient,\n} from './ApiPlatformClient.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH,OAAO,EACL,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,0BAA0B,EAC1B,YAAY,EACZ,mBAAmB,EACnB,wBAAwB,EACxB,WAAW,EACX,SAAS,GACV,MAAM,mBAAmB,CAAC;AAE3B,eAAe;AACf,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AA4BhF,aAAa;AACb,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAWpD,YAAY;AACZ,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAalD,aAAa;AACb,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAOpD,cAAc;AACd,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD,uCAAuC;AACvC,OAAO,EACL,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,wBAAwB,CAAC","sourcesContent":["/**\n * API barrel export.\n * Re-exports all types and clients from the API folder.\n */\n\n// Shared types and utilities\nexport type {\n PageInfo,\n SupportedCurrency,\n MarketDataDetails,\n ApiPlatformClientOptions,\n ApiUrls,\n FetchOptions,\n} from './shared-types.js';\nexport {\n API_URLS,\n STALE_TIMES,\n GC_TIMES,\n DEFAULT_AUTH_TOKEN_TIMEOUT,\n RETRY_CONFIG,\n calculateRetryDelay,\n getQueryOptionsOverrides,\n shouldRetry,\n HttpError,\n} from './shared-types.js';\n\n// Accounts API\nexport { AccountsApiClient, V6_DEFI_POSITION_TYPES } from './accounts/index.js';\nexport type {\n V5BalanceItem,\n V5BalancesResponse,\n V2BalanceItem,\n V2BalancesResponse,\n V4BalancesResponse,\n V6VsCurrency,\n V6DeFiPositionType,\n V6BalanceMetadata,\n V6StellarTokenBalanceMetadata,\n V6TokenBalanceMetadata,\n V6BalanceItem,\n V6BalancesResponse,\n V1SupportedNetworksResponse,\n V2SupportedNetworksResponse,\n V2ActiveNetworksResponse,\n V1TransactionByHashResponse,\n V1AccountTransactionsResponse,\n V4MultiAccountTransactionsResponse,\n ValueTransfer,\n V1AccountRelationshipResult,\n NftItem,\n V2NftsResponse,\n TokenDiscoveryItem,\n V2TokensResponse,\n} from './accounts/index.js';\n\n// Prices API\nexport { PricesApiClient } from './prices/index.js';\nexport type {\n V3SpotPricesResponse,\n CoinGeckoSpotPrice,\n ExchangeRateInfo,\n V1ExchangeRatesResponse,\n PriceSupportedNetworksResponse,\n V1HistoricalPricesResponse,\n V3HistoricalPricesResponse,\n} from './prices/index.js';\n\n// Token API\nexport { TokenApiClient } from './token/index.js';\nexport type {\n TokenMetadata,\n V1TokenDescriptionResponse,\n NetworkInfo,\n TopAsset,\n TrendingSortBy,\n TrendingToken,\n TopGainersSortOption,\n TrendingSortOption,\n V1SuggestedOccurrenceFloorsResponse,\n} from './token/index.js';\n\n// Tokens API\nexport { TokensApiClient } from './tokens/index.js';\nexport type {\n V1TokenSupportedNetworksResponse,\n V2TokenSupportedNetworksResponse,\n V3AssetResponse,\n} from './tokens/index.js';\n\n// Base client\nexport { BaseApiClient } from './base-client.js';\nexport type { InternalFetchOptions } from './base-client.js';\n\n// API Platform Client (unified client)\nexport {\n ApiPlatformClient,\n createApiPlatformClient,\n} from './ApiPlatformClient.js';\n"]}
package/dist/index.d.ts CHANGED
@@ -8,5 +8,5 @@ export type { ApiPlatformClientServiceOptions, ApiPlatformClientServiceActions,
8
8
  export { OHLCVService, OHLCV_SERVICE_ALLOWED_ACTIONS, OHLCV_SERVICE_ALLOWED_EVENTS, } from './ws/ohlcv/index.js';
9
9
  export type { OHLCVBar, OHLCVSubscriptionOptions, OHLCVSystemNotificationData, OHLCVServiceOptions, OHLCVServiceActions, OHLCVServiceAllowedActions, OHLCVServiceBarUpdatedEvent, OHLCVServiceChainStatusChangedEvent, OHLCVServiceSubscriptionErrorEvent, OHLCVServiceEvents, OHLCVServiceAllowedEvents, OHLCVServiceMessenger, } from './ws/ohlcv/index.js';
10
10
  export { ApiPlatformClient, createApiPlatformClient, AccountsApiClient, PricesApiClient, TokenApiClient, TokensApiClient, API_URLS, STALE_TIMES, GC_TIMES, V6_DEFI_POSITION_TYPES, calculateRetryDelay, getQueryOptionsOverrides, shouldRetry, HttpError, } from './api/index.js';
11
- export type { ApiPlatformClientOptions, ApiUrls, FetchOptions, PageInfo, SupportedCurrency, MarketDataDetails, V5BalanceItem, V5BalancesResponse, V2BalanceItem, V2BalancesResponse, V4BalancesResponse, V6VsCurrency, V6DeFiPositionType, V6BalanceMetadata, V6TokenMetadata, V6BalanceItem, V6BalancesResponse, V1SupportedNetworksResponse, V2SupportedNetworksResponse, V2ActiveNetworksResponse, V1TransactionByHashResponse, V1AccountTransactionsResponse, V4MultiAccountTransactionsResponse, ValueTransfer, V1AccountRelationshipResult, NftItem, V2NftsResponse, TokenDiscoveryItem, V2TokensResponse, V3SpotPricesResponse, CoinGeckoSpotPrice, ExchangeRateInfo, V1ExchangeRatesResponse, PriceSupportedNetworksResponse, V1HistoricalPricesResponse, V3HistoricalPricesResponse, TokenMetadata, V1TokenDescriptionResponse, NetworkInfo, TopAsset, TrendingSortBy, TrendingToken, TopGainersSortOption, TrendingSortOption, V1SuggestedOccurrenceFloorsResponse, V1TokenSupportedNetworksResponse, V2TokenSupportedNetworksResponse, V3AssetResponse, } from './api/index.js';
11
+ export type { ApiPlatformClientOptions, ApiUrls, FetchOptions, PageInfo, SupportedCurrency, MarketDataDetails, V5BalanceItem, V5BalancesResponse, V2BalanceItem, V2BalancesResponse, V4BalancesResponse, V6VsCurrency, V6DeFiPositionType, V6BalanceMetadata, V6StellarTokenBalanceMetadata, V6TokenBalanceMetadata, V6BalanceItem, V6BalancesResponse, V1SupportedNetworksResponse, V2SupportedNetworksResponse, V2ActiveNetworksResponse, V1TransactionByHashResponse, V1AccountTransactionsResponse, V4MultiAccountTransactionsResponse, ValueTransfer, V1AccountRelationshipResult, NftItem, V2NftsResponse, TokenDiscoveryItem, V2TokensResponse, V3SpotPricesResponse, CoinGeckoSpotPrice, ExchangeRateInfo, V1ExchangeRatesResponse, PriceSupportedNetworksResponse, V1HistoricalPricesResponse, V3HistoricalPricesResponse, TokenMetadata, V1TokenDescriptionResponse, NetworkInfo, TopAsset, TrendingSortBy, TrendingToken, TopGainersSortOption, TrendingSortOption, V1SuggestedOccurrenceFloorsResponse, V1TokenSupportedNetworksResponse, V2TokenSupportedNetworksResponse, V3AssetResponse, } from './api/index.js';
12
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,uBAAuB,EACvB,cAAc,EACd,cAAc,EACd,kBAAkB,GACnB,MAAM,iCAAiC,CAAC;AAEzC,YAAY,EACV,8BAA8B,EAC9B,oBAAoB,EACpB,qBAAqB,EACrB,yBAAyB,EACzB,gBAAgB,EAChB,eAAe,EACf,qBAAqB,EACrB,uBAAuB,EACvB,8BAA8B,EAC9B,kDAAkD,EAClD,6BAA6B,EAC7B,gCAAgC,GACjC,MAAM,iCAAiC,CAAC;AAMzC,OAAO,EACL,sBAAsB,EACtB,wCAAwC,EACxC,uCAAuC,GACxC,MAAM,gCAAgC,CAAC;AAExC,Y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,EACf,aAAa,EACb,kBAAkB,EAClB,2BAA2B,EAC3B,2BAA2B,EAC3B,wBAAwB,EACxB,2BAA2B,EAC3B,6BAA6B,EAC7B,kCAAkC,EAClC,aAAa,EACb,2BAA2B,EAC3B,OAAO,EACP,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAEhB,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,EACvB,8BAA8B,EAC9B,0BAA0B,EAC1B,0BAA0B,EAE1B,aAAa,EACb,0BAA0B,EAC1B,WAAW,EACX,QAAQ,EACR,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,kBAAkB,EAClB,mCAAmC,EAEnC,gCAAgC,EAChC,gCAAgC,EAChC,eAAe,GAChB,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,uBAAuB,EACvB,cAAc,EACd,cAAc,EACd,kBAAkB,GACnB,MAAM,iCAAiC,CAAC;AAEzC,YAAY,EACV,8BAA8B,EAC9B,oBAAoB,EACpB,qBAAqB,EACrB,yBAAyB,EACzB,gBAAgB,EAChB,eAAe,EACf,qBAAqB,EACrB,uBAAuB,EACvB,8BAA8B,EAC9B,kDAAkD,EAClD,6BAA6B,EAC7B,gCAAgC,GACjC,MAAM,iCAAiC,CAAC;AAMzC,OAAO,EACL,sBAAsB,EACtB,wCAAwC,EACxC,uCAAuC,GACxC,MAAM,gCAAgC,CAAC;AAExC,YAAY,EACV,sBAAsB,EACtB,mBAAmB,EACnB,6BAA6B,EAC7B,6BAA6B,EAC7B,cAAc,IAAI,oCAAoC,EACtD,6CAA6C,EAC7C,yCAAyC,EACzC,4CAA4C,EAC5C,wCAAwC,EACxC,4BAA4B,EAC5B,aAAa,IAAI,mCAAmC,EACpD,+BAA+B,GAChC,MAAM,gCAAgC,CAAC;AAMxC,YAAY,EACV,WAAW,EACX,KAAK,EACL,OAAO,EACP,QAAQ,EAC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0BAA0B,EAC1B,0BAA0B,EAE1B,aAAa,EACb,0BAA0B,EAC1B,WAAW,EACX,QAAQ,EACR,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,kBAAkB,EAClB,mCAAmC,EAEnC,gCAAgC,EAChC,gCAAgC,EAChC,eAAe,GAChB,MAAM,gBAAgB,CAAC"}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAE/B,+EAA+E;AAC/E,4BAA4B;AAC5B,+EAA+E;AAE/E,OAAO,EACL,uBAAuB,EACvB,cAAc,EACd,cAAc,EACd,kBAAkB,GACnB,MAAM,iCAAiC,CAAC;AAiBzC,+EAA+E;AAC/E,2BAA2B;AAC3B,+EAA+E;AAE/E,OAAO,EACL,sBAAsB,EACtB,wCAAwC,EACxC,uCAAuC,GACxC,MAAM,gCAAgC,CAAC;AA8BxC,+EAA+E;AAC/E,8BAA8B;AAC9B,+EAA+E;AAE/E,OAAO,EACL,wBAAwB,EACxB,4BAA4B,GAC7B,MAAM,+BAA+B,CAAC;AASvC,+EAA+E;AAC/E,gBAAgB;AAChB,+EAA+E;AAE/E,OAAO,EACL,YAAY,EACZ,6BAA6B,EAC7B,4BAA4B,GAC7B,MAAM,qBAAqB,CAAC;AAiB7B,+EAA+E;AAC/E,sBAAsB;AACtB,+EAA+E;AAE/E,OAAO,EACL,iBAAiB,EACjB,uBAAuB;AACvB,yBAAyB;AACzB,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,eAAe;AACf,YAAY;AACZ,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,sBAAsB;AACtB,UAAU;AACV,mBAAmB,EACnB,wBAAwB,EACxB,WAAW;AACX,SAAS;AACT,SAAS,GACV,MAAM,gBAAgB,CAAC","sourcesContent":["// Core Backend Package Exports\n\n// ============================================================================\n// BACKEND WEBSOCKET SERVICE\n// ============================================================================\n\nexport {\n BackendWebSocketService,\n getCloseReason,\n WebSocketState,\n WebSocketEventType,\n} from './ws/BackendWebSocketService.js';\n\nexport type {\n BackendWebSocketServiceOptions,\n ClientRequestMessage,\n ServerResponseMessage,\n ServerNotificationMessage,\n WebSocketMessage,\n ChannelCallback,\n WebSocketSubscription,\n WebSocketConnectionInfo,\n BackendWebSocketServiceActions,\n BackendWebSocketServiceConnectionStateChangedEvent,\n BackendWebSocketServiceEvents,\n BackendWebSocketServiceMessenger,\n} from './ws/BackendWebSocketService.js';\n\n// ============================================================================\n// ACCOUNT ACTIVITY SERVICE\n// ============================================================================\n\nexport {\n AccountActivityService,\n ACCOUNT_ACTIVITY_SERVICE_ALLOWED_ACTIONS,\n ACCOUNT_ACTIVITY_SERVICE_ALLOWED_EVENTS,\n} from './ws/AccountActivityService.js';\n\nexport type {\n SystemNotificationData,\n SubscriptionOptions,\n AccountActivityServiceOptions,\n AccountActivityServiceActions,\n AllowedActions as AccountActivityServiceAllowedActions,\n AccountActivityServiceTransactionUpdatedEvent,\n AccountActivityServiceBalanceUpdatedEvent,\n AccountActivityServiceSubscriptionErrorEvent,\n AccountActivityServiceStatusChangedEvent,\n AccountActivityServiceEvents,\n AllowedEvents as AccountActivityServiceAllowedEvents,\n AccountActivityServiceMessenger,\n} from './ws/AccountActivityService.js';\n\n// ============================================================================\n// SHARED TYPES\n// ============================================================================\n\nexport type {\n Transaction,\n Asset,\n Balance,\n Transfer,\n BalanceUpdate,\n AccountActivityMessage,\n} from './types.js';\n\n// ============================================================================\n// API PLATFORM CLIENT SERVICE\n// ============================================================================\n\nexport {\n ApiPlatformClientService,\n apiPlatformClientServiceName,\n} from './ApiPlatformClientService.js';\n\nexport type {\n ApiPlatformClientServiceOptions,\n ApiPlatformClientServiceActions,\n ApiPlatformClientServiceEvents,\n ApiPlatformClientServiceMessenger,\n} from './ApiPlatformClientService.js';\n\n// ============================================================================\n// OHLCV SERVICE\n// ============================================================================\n\nexport {\n OHLCVService,\n OHLCV_SERVICE_ALLOWED_ACTIONS,\n OHLCV_SERVICE_ALLOWED_EVENTS,\n} from './ws/ohlcv/index.js';\n\nexport type {\n OHLCVBar,\n OHLCVSubscriptionOptions,\n OHLCVSystemNotificationData,\n OHLCVServiceOptions,\n OHLCVServiceActions,\n OHLCVServiceAllowedActions,\n OHLCVServiceBarUpdatedEvent,\n OHLCVServiceChainStatusChangedEvent,\n OHLCVServiceSubscriptionErrorEvent,\n OHLCVServiceEvents,\n OHLCVServiceAllowedEvents,\n OHLCVServiceMessenger,\n} from './ws/ohlcv/index.js';\n\n// ============================================================================\n// API PLATFORM CLIENT\n// ============================================================================\n\nexport {\n ApiPlatformClient,\n createApiPlatformClient,\n // Individual API clients\n AccountsApiClient,\n PricesApiClient,\n TokenApiClient,\n TokensApiClient,\n // Constants\n API_URLS,\n STALE_TIMES,\n GC_TIMES,\n V6_DEFI_POSITION_TYPES,\n // Helpers\n calculateRetryDelay,\n getQueryOptionsOverrides,\n shouldRetry,\n // Errors\n HttpError,\n} from './api/index.js';\n\n// ============================================================================\n// API PLATFORM CLIENT TYPES\n// ============================================================================\n\nexport type {\n // Client options\n ApiPlatformClientOptions,\n ApiUrls,\n FetchOptions,\n // Shared types\n PageInfo,\n SupportedCurrency,\n MarketDataDetails,\n // Accounts API types\n V5BalanceItem,\n V5BalancesResponse,\n V2BalanceItem,\n V2BalancesResponse,\n V4BalancesResponse,\n V6VsCurrency,\n V6DeFiPositionType,\n V6BalanceMetadata,\n V6TokenMetadata,\n V6BalanceItem,\n V6BalancesResponse,\n V1SupportedNetworksResponse,\n V2SupportedNetworksResponse,\n V2ActiveNetworksResponse,\n V1TransactionByHashResponse,\n V1AccountTransactionsResponse,\n V4MultiAccountTransactionsResponse,\n ValueTransfer,\n V1AccountRelationshipResult,\n NftItem,\n V2NftsResponse,\n TokenDiscoveryItem,\n V2TokensResponse,\n // Prices API types\n V3SpotPricesResponse,\n CoinGeckoSpotPrice,\n ExchangeRateInfo,\n V1ExchangeRatesResponse,\n PriceSupportedNetworksResponse,\n V1HistoricalPricesResponse,\n V3HistoricalPricesResponse,\n // Token API types\n TokenMetadata,\n V1TokenDescriptionResponse,\n NetworkInfo,\n TopAsset,\n TrendingSortBy,\n TrendingToken,\n TopGainersSortOption,\n TrendingSortOption,\n V1SuggestedOccurrenceFloorsResponse,\n // Tokens API types\n V1TokenSupportedNetworksResponse,\n V2TokenSupportedNetworksResponse,\n V3AssetResponse,\n} from './api/index.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAE/B,+EAA+E;AAC/E,4BAA4B;AAC5B,+EAA+E;AAE/E,OAAO,EACL,uBAAuB,EACvB,cAAc,EACd,cAAc,EACd,kBAAkB,GACnB,MAAM,iCAAiC,CAAC;AAiBzC,+EAA+E;AAC/E,2BAA2B;AAC3B,+EAA+E;AAE/E,OAAO,EACL,sBAAsB,EACtB,wCAAwC,EACxC,uCAAuC,GACxC,MAAM,gCAAgC,CAAC;AA8BxC,+EAA+E;AAC/E,8BAA8B;AAC9B,+EAA+E;AAE/E,OAAO,EACL,wBAAwB,EACxB,4BAA4B,GAC7B,MAAM,+BAA+B,CAAC;AASvC,+EAA+E;AAC/E,gBAAgB;AAChB,+EAA+E;AAE/E,OAAO,EACL,YAAY,EACZ,6BAA6B,EAC7B,4BAA4B,GAC7B,MAAM,qBAAqB,CAAC;AAiB7B,+EAA+E;AAC/E,sBAAsB;AACtB,+EAA+E;AAE/E,OAAO,EACL,iBAAiB,EACjB,uBAAuB;AACvB,yBAAyB;AACzB,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,eAAe;AACf,YAAY;AACZ,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,sBAAsB;AACtB,UAAU;AACV,mBAAmB,EACnB,wBAAwB,EACxB,WAAW;AACX,SAAS;AACT,SAAS,GACV,MAAM,gBAAgB,CAAC","sourcesContent":["// Core Backend Package Exports\n\n// ============================================================================\n// BACKEND WEBSOCKET SERVICE\n// ============================================================================\n\nexport {\n BackendWebSocketService,\n getCloseReason,\n WebSocketState,\n WebSocketEventType,\n} from './ws/BackendWebSocketService.js';\n\nexport type {\n BackendWebSocketServiceOptions,\n ClientRequestMessage,\n ServerResponseMessage,\n ServerNotificationMessage,\n WebSocketMessage,\n ChannelCallback,\n WebSocketSubscription,\n WebSocketConnectionInfo,\n BackendWebSocketServiceActions,\n BackendWebSocketServiceConnectionStateChangedEvent,\n BackendWebSocketServiceEvents,\n BackendWebSocketServiceMessenger,\n} from './ws/BackendWebSocketService.js';\n\n// ============================================================================\n// ACCOUNT ACTIVITY SERVICE\n// ============================================================================\n\nexport {\n AccountActivityService,\n ACCOUNT_ACTIVITY_SERVICE_ALLOWED_ACTIONS,\n ACCOUNT_ACTIVITY_SERVICE_ALLOWED_EVENTS,\n} from './ws/AccountActivityService.js';\n\nexport type {\n SystemNotificationData,\n SubscriptionOptions,\n AccountActivityServiceOptions,\n AccountActivityServiceActions,\n AllowedActions as AccountActivityServiceAllowedActions,\n AccountActivityServiceTransactionUpdatedEvent,\n AccountActivityServiceBalanceUpdatedEvent,\n AccountActivityServiceSubscriptionErrorEvent,\n AccountActivityServiceStatusChangedEvent,\n AccountActivityServiceEvents,\n AllowedEvents as AccountActivityServiceAllowedEvents,\n AccountActivityServiceMessenger,\n} from './ws/AccountActivityService.js';\n\n// ============================================================================\n// SHARED TYPES\n// ============================================================================\n\nexport type {\n Transaction,\n Asset,\n Balance,\n Transfer,\n BalanceUpdate,\n AccountActivityMessage,\n} from './types.js';\n\n// ============================================================================\n// API PLATFORM CLIENT SERVICE\n// ============================================================================\n\nexport {\n ApiPlatformClientService,\n apiPlatformClientServiceName,\n} from './ApiPlatformClientService.js';\n\nexport type {\n ApiPlatformClientServiceOptions,\n ApiPlatformClientServiceActions,\n ApiPlatformClientServiceEvents,\n ApiPlatformClientServiceMessenger,\n} from './ApiPlatformClientService.js';\n\n// ============================================================================\n// OHLCV SERVICE\n// ============================================================================\n\nexport {\n OHLCVService,\n OHLCV_SERVICE_ALLOWED_ACTIONS,\n OHLCV_SERVICE_ALLOWED_EVENTS,\n} from './ws/ohlcv/index.js';\n\nexport type {\n OHLCVBar,\n OHLCVSubscriptionOptions,\n OHLCVSystemNotificationData,\n OHLCVServiceOptions,\n OHLCVServiceActions,\n OHLCVServiceAllowedActions,\n OHLCVServiceBarUpdatedEvent,\n OHLCVServiceChainStatusChangedEvent,\n OHLCVServiceSubscriptionErrorEvent,\n OHLCVServiceEvents,\n OHLCVServiceAllowedEvents,\n OHLCVServiceMessenger,\n} from './ws/ohlcv/index.js';\n\n// ============================================================================\n// API PLATFORM CLIENT\n// ============================================================================\n\nexport {\n ApiPlatformClient,\n createApiPlatformClient,\n // Individual API clients\n AccountsApiClient,\n PricesApiClient,\n TokenApiClient,\n TokensApiClient,\n // Constants\n API_URLS,\n STALE_TIMES,\n GC_TIMES,\n V6_DEFI_POSITION_TYPES,\n // Helpers\n calculateRetryDelay,\n getQueryOptionsOverrides,\n shouldRetry,\n // Errors\n HttpError,\n} from './api/index.js';\n\n// ============================================================================\n// API PLATFORM CLIENT TYPES\n// ============================================================================\n\nexport type {\n // Client options\n ApiPlatformClientOptions,\n ApiUrls,\n FetchOptions,\n // Shared types\n PageInfo,\n SupportedCurrency,\n MarketDataDetails,\n // Accounts API types\n V5BalanceItem,\n V5BalancesResponse,\n V2BalanceItem,\n V2BalancesResponse,\n V4BalancesResponse,\n V6VsCurrency,\n V6DeFiPositionType,\n V6BalanceMetadata,\n V6StellarTokenBalanceMetadata,\n V6TokenBalanceMetadata,\n V6BalanceItem,\n V6BalancesResponse,\n V1SupportedNetworksResponse,\n V2SupportedNetworksResponse,\n V2ActiveNetworksResponse,\n V1TransactionByHashResponse,\n V1AccountTransactionsResponse,\n V4MultiAccountTransactionsResponse,\n ValueTransfer,\n V1AccountRelationshipResult,\n NftItem,\n V2NftsResponse,\n TokenDiscoveryItem,\n V2TokensResponse,\n // Prices API types\n V3SpotPricesResponse,\n CoinGeckoSpotPrice,\n ExchangeRateInfo,\n V1ExchangeRatesResponse,\n PriceSupportedNetworksResponse,\n V1HistoricalPricesResponse,\n V3HistoricalPricesResponse,\n // Token API types\n TokenMetadata,\n V1TokenDescriptionResponse,\n NetworkInfo,\n TopAsset,\n TrendingSortBy,\n TrendingToken,\n TopGainersSortOption,\n TrendingSortOption,\n V1SuggestedOccurrenceFloorsResponse,\n // Tokens API types\n V1TokenSupportedNetworksResponse,\n V2TokenSupportedNetworksResponse,\n V3AssetResponse,\n} from './api/index.js';\n"]}
package/dist/types.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { Json } from '@metamask/utils';
1
2
  /**
2
3
  * Basic transaction information
3
4
  */
@@ -36,6 +37,13 @@ export type Balance = {
36
37
  amount: string;
37
38
  /** Optional error message */
38
39
  error?: string;
40
+ /**
41
+ * Network-specific balance properties from Account Activity websocket
42
+ * messages. Stellar trustlines typically include `limit`, `authorized`, and
43
+ * optionally `sponsor` (sponsor address). This is the stream payload, not
44
+ * the Accounts API camelCase fields (`sponsored`, `spendableBalance`, …).
45
+ */
46
+ metadata?: Json;
39
47
  };
40
48
  /**
41
49
  * Transfer information
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,0BAA0B;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,2DAA2D;IAC3D,KAAK,EAAE,MAAM,CAAC;IACd,yBAAyB;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,mDAAmD;IACnD,SAAS,EAAE,MAAM,CAAC;IAClB,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,4CAA4C;IAC5C,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG;IAClB,oCAAoC;IACpC,QAAQ,EAAE,OAAO,CAAC;IAClB,+DAA+D;IAC/D,IAAI,EAAE,MA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;IACb,4CAA4C;IAC5C,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG;IAClB,oCAAoC;IACpC,QAAQ,EAAE,OAAO,CAAC;IAClB,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,+BAA+B;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,6BAA6B;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,IAAI,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,qCAAqC;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,gCAAgC;IAChC,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,wBAAwB;IACxB,KAAK,EAAE,KAAK,CAAC;IACb,+BAA+B;IAC/B,WAAW,EAAE,OAAO,CAAC;IACrB,uCAAuC;IACvC,SAAS,EAAE,QAAQ,EAAE,CAAC;CACvB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,sBAAsB;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,8BAA8B;IAC9B,EAAE,EAAE,WAAW,CAAC;IAChB,oDAAoD;IACpD,OAAO,EAAE,aAAa,EAAE,CAAC;CAC1B,CAAC"}
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Basic transaction information\n */\nexport type Transaction = {\n /** Transaction ID/hash */\n id: string;\n /** Chain identifier in CAIP-2 format (e.g., \"eip155:1\") */\n chain: string;\n /** Transaction status */\n status: string;\n /** Timestamp when the transaction was processed */\n timestamp: number;\n /** Address that initiated the transaction */\n from: string;\n /** Address that received the transaction */\n to: string;\n};\n\n/**\n * Asset information for balance updates\n */\nexport type Asset = {\n /** Whether the asset is fungible */\n fungible: boolean;\n /** Asset type in CAIP format (e.g., \"eip155:1/erc20:0x...\") */\n type: string;\n /** Asset unit/symbol (e.g., \"USDT\", \"ETH\") */\n unit: string;\n /** Number of decimal places for the asset */\n decimals: number;\n};\n\n/**\n * Balance information\n */\nexport type Balance = {\n /** Balance amount as string */\n amount: string;\n /** Optional error message */\n error?: string;\n};\n\n/**\n * Transfer information\n */\nexport type Transfer = {\n /** Address sending the transfer */\n from: string;\n /** Address receiving the transfer */\n to: string;\n /** Transfer amount as string */\n amount: string;\n};\n\n/**\n * Balance update information for a specific asset\n */\nexport type BalanceUpdate = {\n /** Asset information */\n asset: Asset;\n /** Post-transaction balance */\n postBalance: Balance;\n /** List of transfers for this asset */\n transfers: Transfer[];\n};\n\n/**\n * Complete transaction/balance update message\n */\nexport type AccountActivityMessage = {\n /** Account address */\n address: string;\n /** Transaction information */\n tx: Transaction;\n /** Array of balance updates for different assets */\n updates: BalanceUpdate[];\n};\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Json } from '@metamask/utils';\n\n/**\n * Basic transaction information\n */\nexport type Transaction = {\n /** Transaction ID/hash */\n id: string;\n /** Chain identifier in CAIP-2 format (e.g., \"eip155:1\") */\n chain: string;\n /** Transaction status */\n status: string;\n /** Timestamp when the transaction was processed */\n timestamp: number;\n /** Address that initiated the transaction */\n from: string;\n /** Address that received the transaction */\n to: string;\n};\n\n/**\n * Asset information for balance updates\n */\nexport type Asset = {\n /** Whether the asset is fungible */\n fungible: boolean;\n /** Asset type in CAIP format (e.g., \"eip155:1/erc20:0x...\") */\n type: string;\n /** Asset unit/symbol (e.g., \"USDT\", \"ETH\") */\n unit: string;\n /** Number of decimal places for the asset */\n decimals: number;\n};\n\n/**\n * Balance information\n */\nexport type Balance = {\n /** Balance amount as string */\n amount: string;\n /** Optional error message */\n error?: string;\n /**\n * Network-specific balance properties from Account Activity websocket\n * messages. Stellar trustlines typically include `limit`, `authorized`, and\n * optionally `sponsor` (sponsor address). This is the stream payload, not\n * the Accounts API camelCase fields (`sponsored`, `spendableBalance`, …).\n */\n metadata?: Json;\n};\n\n/**\n * Transfer information\n */\nexport type Transfer = {\n /** Address sending the transfer */\n from: string;\n /** Address receiving the transfer */\n to: string;\n /** Transfer amount as string */\n amount: string;\n};\n\n/**\n * Balance update information for a specific asset\n */\nexport type BalanceUpdate = {\n /** Asset information */\n asset: Asset;\n /** Post-transaction balance */\n postBalance: Balance;\n /** List of transfers for this asset */\n transfers: Transfer[];\n};\n\n/**\n * Complete transaction/balance update message\n */\nexport type AccountActivityMessage = {\n /** Account address */\n address: string;\n /** Transaction information */\n tx: Transaction;\n /** Array of balance updates for different assets */\n updates: BalanceUpdate[];\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask-previews/core-backend",
3
- "version": "10.0.1-preview-56ced5c22",
3
+ "version": "11.0.0-preview-4454eb0",
4
4
  "description": "Core backend services for MetaMask",
5
5
  "keywords": [
6
6
  "Ethereum",