@exodus/activity-txs

中文文档
6.2.1发布于 2026/11/13MITTypeScriptES Module近 30 天下载 1.1万

The activity-txs feature

原始使用文档
文档目录5 节
  1. How it works
  2. Usage
  3. API Side
  4. Play with it
  5. UI Side

@exodus/activity-txs

This feature generates user-friendly activity from transactions, orders, fiat orders, NFTs, and connections by grouping, batching, and formatting them.

How it works

Each asset’s activity consists of a set of transactions transformed using asset.api.getActivityTxs, which returns an array of Tx models: [Tx, Tx, Tx].

Most assets don't have this API and simply return the original transactions.

For example, Bitcoin batched transactions are combined into a single activity item. Instead of multiple transactions (Txs), you get a single transaction with a summarized coinAmount.

This feature introduces atoms with activity items generated from txLog and accountState. It provides an efficient way to store these items by wallet accounts and update this extensive object while avoiding unnecessary re-computations.

Additionally, it offers extra Redux selectors to retrieve activity, limited by size or batched activity items. These selectors format activity depending on its type: NFTs (if the nfts module is integrated), fiat orders (if the fiat module is integrated), and swap orders (if the orders feature is integrated).

Usage

This feature is designed to be used together with @exodus/headless. See Using the SDK for more details.

API Side

The feature doesn't have a public API. Data is transformed automatically, stored in activityTxsAtom, and emitted to be stored in the Redux state.

Play with it

  1. Open the playground at https://exodus-hydra.pages.dev/features/activity-txs

  2. Run the following command in the Dev Tools Console to see activity for Bitcoin:

    selectors.activityTxs.createFullActivity({
      nftsNetworkNameToAssetName: { fantom: 'fantommainnet' },
    })({ assetName: 'bitcoin', walletAccount: 'exodus_0' })(store.getState())
    
  3. run the following command in the Dev Tools Console to see activity for Bitcoin and Ethereum together:

selectors.activityTxs.createMultiActivity({
  createAssetSourceActivitySelector: selectors.activityTxs.createFullActivity({
    nftsNetworkNameToAssetName: { fantom: 'fantommainnet' },
  }),
})({ assetNames: ['bitcoin', 'ethereum'], walletAccounts: ['exodus_0', 'exodus_1'] })(
  store.getState()
)
  1. Try out some other selectors from selectors.activityTxs. See example usage in tests.

UI Side

See using the sdk for more details on basic UI-side setup.

import selectors from '~/ui/flux/selectors'

const fullAssetSourceActivitySelector = selectors.activityTxs.createFullActivity({
  nftsNetworkNameToAssetName: { fantom: 'fantommainnet' },
})

const MyComponent = () => {
  const bitcoinActivity = useSelector(
    fullAssetSourceActivitySelector({ assetName: 'bitcoin', walletAccount: 'exodus_0' })
  )

  return bitcoinActivity.map((activityItem) => (
    <Text>
      {activityItem.assetName} : {activityItem.displayAmount}
    </Text>
  ))
}

版本与发布记录

@exodus/activity-txs 共发布 59 个版本,首次发布于 2023/09/28;过去 12 个月发布了 14 个版本。

版本发布日期距今
6.2.1latest2026/11/13今天
6.2.02026/11/103 天前
6.1.92026/09/092 个月前
6.1.82026/08/282 个月前
6.1.72026/08/043 个月前
6.1.62026/06/274 个月前

关于 @exodus/activity-txs 的常见问题

@exodus/activity-txs 是什么?

The activity-txs feature

如何安装 @exodus/activity-txs?

在项目目录运行 npm install @exodus/activity-txs,或使用 pnpm add / yarn add / bun add。

@exodus/activity-txs 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@exodus/activity-txs 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@exodus/activity-txs 可以商用吗?

@exodus/activity-txs 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@exodus/activity-txs 的下载量有多少?

根据 npm 官方下载统计,@exodus/activity-txs 在 2026/10/14 – 2026/11/12 这 30 天内被下载 11,097 次,日均约 370 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@exodus/activity-txs 还在维护吗?

最新版本 6.2.1 发布于 2026/11/13(今天);至今共发布 59 个版本,其中过去 12 个月发布了 14 个;首次发布于 2023/09/28。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。