Skip to content

docs: 完善 webhook 事件载荷与订阅指南 - #386

Open
rcsh1 wants to merge 9 commits into
CoboGlobal:masterfrom
rcsh1:playbook/run-run_f621f37a322c4aa4
Open

docs: 完善 webhook 事件载荷与订阅指南#386
rcsh1 wants to merge 9 commits into
CoboGlobal:masterfrom
rcsh1:playbook/run-run_f621f37a322c4aa4

Conversation

@rcsh1

@rcsh1 rcsh1 commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

关联来源

意图

补充 Custody/WaaS 2.0 的 wallets.transaction.*wallets.mpc.tss_request.* webhook 载荷参考,覆盖触发条件、字段语义和完整示例。明确交易事件的重叠关系、充值入账与提现状态订阅策略,并补充 endpoint 作用域、重试恢复和 API 对账指引。中英文内容保持同步,所有结论均基于已确认的实现或公开规范。

变更摘要

  • docs.json:在中英文 Webhooks and callbacks 导航中注册两个载荷参考页和交易事件订阅指南。
  • v2/guides/webhooks-callbacks/wallets-transaction-payload.mdx:新增 wallets.transaction.* 英文载荷参考,说明事件触发、字段语义及跨链完整示例。
  • v2_cn/guides/webhooks-callbacks/wallets-transaction-payload.mdx:新增对应中文载荷参考,并保持字段和枚举标识符不变。
  • v2/guides/webhooks-callbacks/wallets-mpc-tss-request-payload.mdx:新增 wallets.mpc.tss_request.* 英文载荷参考,说明状态映射、可空字段和完整示例。
  • v2_cn/guides/webhooks-callbacks/wallets-mpc-tss-request-payload.mdx:新增对应中文载荷参考,并同步触发条件与字段说明。
  • v2/guides/webhooks-callbacks/transaction-event-subscriptions.mdx:新增英文场景订阅指南,覆盖充值入账、提现状态、AutoSweep、Portal 发起交易和 API 对账。
  • v2_cn/guides/webhooks-callbacks/transaction-event-subscriptions.mdx:新增对应中文场景订阅指南。
  • v2/guides/webhooks-callbacks/webhook-event-type.mdx:补充英文载荷参考链接及 created、updated、succeeded、failed 的事件重叠关系。
  • v2_cn/guides/webhooks-callbacks/webhook-event-type.mdx:同步中文事件索引、载荷链接和事件重叠说明。
  • v2/guides/webhooks-callbacks/introduction.mdx:说明英文 endpoint 的组织与钱包作用域,以及事件去重和交易对账方式。
  • v2_cn/guides/webhooks-callbacks/introduction.mdx:同步中文 endpoint 作用域、去重和对账指引。
  • v2/guides/webhooks-callbacks/set-up-endpoint.mdx:补充英文 30 天事件查询窗口及详情、日志、重试和交易对账恢复流程。
  • v2_cn/guides/webhooks-callbacks/set-up-endpoint.mdx:同步中文事件查询窗口和恢复流程。
  • v2/guides/transactions/status.mdx:关联英文交易状态与 updatedsucceeded webhook 语义。
  • v2_cn/guides/transactions/status.mdx:同步中文交易状态与 webhook 语义。

关联 PR

  • product-manual 中 4 个中英文 Portal webhook 页面由后续步骤单独创建 PR,并以评论形式回链本 PR。

代码证据

  • custody/waas2/webhooks/data/enums.py:20custody/waas2/webhooks/managers/wallet_event.py:33:确认交易事件名称为 created、updated、succeeded、failed,并组成 wallets.transaction.<event_name>
  • custody/waas2/webhooks/managers/wallet_event_by_source.py:25custody/waas2/webhooks/managers/wallet_event_by_source.py:116:确认每次已处理的交易变更会尝试发送 updated,创建和终态会额外发送对应事件。
  • custody/waas2/webhooks/managers/wallet_event_by_source.py:51custody/waas2/transactions/mongo/manager/read/waas_transaction.py:178:确认 webhook 复用公开 TransactionDetail,并包含文档列出的交易字段。
  • custody/waas2/transactions/mongo/manager/read/waas_transaction.py:430:469:504:597:620:确认 replacement、source、destination、fee 与 raw_tx_info 的条件化结构。
  • custody/waas2/transactions/mongo/manager/write/fields/token.py:15:确认 token_id 是链上币种标识,asset_id 来自 unique_asset_id 且可为空。
  • custody/waas2/transactions/mongo/enums/transaction_fields.py:45custody/waas2/transactions/mongo/manager/write/fields/cobo_category.py:149:确认 cobo_category 包含 AutoSweep,并用于自动归集交易。
  • custody/waas2/mpc/managers/dev/webhook_wallet_mpc.py:21:26:110:确认 wallets.mpc.tss_request 的事件清单、状态触发规则和 TSSRequest 载荷结构。
  • custody/waas2/mpc/bo/dev/vault.py:235custody/waas2/mpc/enums/dev/mpc_vault.py:175:确认 TSSRequest 字段可空性及公开状态集合。
  • custody/waas2/transactions/dev/enums/transaction.py:220custody/waas2/transaction_query/handlers/withdraw_request.py:337:确认公开交易状态以及 Portal/API 提现共用的状态映射。
  • custody/waas2/transaction_query/enums/transaction_query.py:48:确认 Success、Rejected、Canceled、Failed 终态及 KYT/审核拒绝子状态。
  • custody/waas2/webhooks/controller/webhook_endpoint.py:22:确认 endpoint 归属请求组织,并保存 URL、订阅事件和可选钱包范围。
  • custody/waas2/transactions/dev/views/transaction_by_id.py:35custody/waas2/transactions/dev/bo/transaction_query/transaction.py:159:确认交易详情和列表 API 可用于标识符对账。
  • custody/waas2/webhooks/client/client.py:206custody/waas2/webhooks/views/event_retries.py:19:确认事件详情、日志及手动重试由公开接口委托 webhook 服务处理。
  • developer-site-waas2/v2/cobo_waas2_openapi_spec/components/schemas/webhooks/event_type.yaml:3:确认公开规范列出 4 个 transaction 事件和 4 个 mpc.tss_request 事件。
  • developer-site-waas2/v2/cobo_waas2_openapi_spec/components/schemas/webhooks/transaction_event_data.yaml:1developer-site-waas2/v2/cobo_waas2_openapi_spec/components/schemas/wallets/mpcs/tss_request.yaml:1:确认 webhook 数据分别复用 TransactionTSSRequest schema。
  • developer-site-waas2/v2/cobo_waas2_openapi_spec/paths/webhooks/events.yaml:6:确认 List all webhook events 提供最近 30 天的事件。

⚠️ 待确认事项

rcsh1 and others added 9 commits June 19, 2026 10:51
Reconstructed from ~/.workmate/playbook-traces/run_8d40a6d96746/events.jsonl
(25 captured Edit/Write ops replayed). Worktree was deleted on success
before the changes were committed; all real doc edits recovered intact.
- CN upgrade-guide.mdx: restore WaaS 2.0 API operation names to English
  (Create wallet, Create addresses in wallet, Transfer token, Speed up
  transaction, Drop transaction, Cancel transaction, Call smart contract,
  Sign message, List all transactions, Get transaction information)
- transfer-routing.mdx EN+CN: add note clarifying force_internal /
  force_external are mutually exclusive, and add JSON code examples
  showing force-Cobo-Loop, force-on-chain, and default routing
- status.mdx EN+CN: update FailedSignerTimeout remedy to specify retry
  operation by original transaction type (Transfer token / Call smart
  contract / Sign message) instead of always pointing to Transfer token

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@rcsh1

rcsh1 commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator Author

关联 product-manual PR:CoboGlobal/product-manual#754

@rcsh1

rcsh1 commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator Author

运行过程记录(自动生成)

本评论记录本次 doc 运行的内部过程,便于审查每个结论的来源。

1. 意图(确认后)

来源:Phabricator T96128(https://pha.1cobo.com/T96128)。任务及其交易历史通过 mcp-now Phabricator bridge 直接获取;最新描述取代了较早的措辞变更,且没有其他讨论评论。

  1. webhook-payload-wallets-transaction

    • 类别:缺少内容 / 缺少示例。
    • 证据:T96128 记录 Vantage 客户在升级到 TG 前四次询问“callback 的 payload 参考哪个 API 链接”,不同渠道至少八次要求“完整 JSON 示例”,并明确要求为 wallets.transaction.* 提供独立参考。
    • 疑似文档问题:Custody/WaaS 2.0 Webhook event reference 缺少可发现的 wallets.transaction.* payload 参考,未覆盖触发条件、schema 和完整示例。示例需覆盖 deposit/withdrawal、EVM/UTXO/TRON、native coin/token;共享 Transaction 字段可放在一个链接的 schema 页面。
    • 所需代码证据:枚举事件常量与 dispatch handlers;核实 Transaction webhook serializer、事件触发条件、链特定 fee/raw_tx_info 变体及 token_id/asset_id 填充。
  2. webhook-payload-wallets-mpc

    • 类别:缺少内容 / 缺少示例。
    • 证据:T96128 要求每种事件类型有独立参考,并明确将 wallets.mpc.* 列为单独 family;相同的 payload 链接与完整 JSON 诉求同样适用。
    • 疑似文档问题:缺少包含 triggers、schemas 和真实完整示例的 wallets.mpc.* payload 参考,且 wildcard 之外的准确 inventory 待探索确认。
    • 所需代码证据:枚举 wallets.mpc.* 常量、producers、serializers,并映射每个事件的 trigger、payload model 和 nullable/event-dependent fields。
  3. callback-payload-field-semantics

    • 类别:内容不清楚或不完整。
    • 证据:T96128 引用支持结论“接口返回和二次回调字段结构一样,只是回调阶段部分字段没值”,点名 cobo_idasset_idresult;同时引用 Aladdin 工单 1128876036453798224 和至少五个 source/destination 问题。
    • 疑似文档问题:Transaction API model 与 callback/webhook payload 参考未说明 callback 阶段 nullability、token_idasset_id、deposit/withdrawal source/destination、nullable request_id、RBF 的 replaced_by_transaction_hashAutoSweepcobo_category
    • 所需代码证据:比较 API-response 与 callback serializers/models;核实字段填充逻辑、asset/token mapping、方向特定 source/destination builders、RBF replacement 和 category enum。
  4. webhook-crediting-readiness

    • 类别:内容不清楚或不完整。
    • 证据:T96128 记录 DTGoCA、RFPay、Vantage、Portal AI、Mintlify 多次询问“CONFIRMED 是不是就提现完成了”,客户需要明确的入账规则。
    • 疑似文档问题:状态/事件文档未明确 wallets.transaction.succeeded 是否代表确认阈值已达到并可入账,以及 Confirming/wallets.transaction.updated 是否仅表示进度。
    • 所需代码证据:核实 confirmation-threshold 计算、状态转换、succeeded/updated emission,以及 succeeded 是否可能早于配置阈值。
  5. webhook-subscription-deposit-crediting

    • 类别:缺少内容。
    • 证据:T96128 记录 DTGoCA 客户原计划在 updated 时入账,支持纠正为 succeeded;另有 2026-06-11 Portal AI 关于 KYT screening 与 succeeded 的问题。
    • 疑似文档问题:缺少 deposit 自动入账的 scenario-to-event 指南,包括 succeeded 作为入账信号、created/updated 仅作进度,以及 KYT 阻断与 compliance events 的关系。
    • 所需代码证据:核实 deposit lifecycle emission、KYT gating、blocked transaction 是否不发 succeeded,以及暴露阻断的 compliance event。
  6. webhook-subscription-withdrawal-status

    • 类别:缺少内容。
    • 证据:T96128 显示客户需要 withdrawal 最终订阅清单,无法判断 PendingAuthorizationBroadcastingConfirmingCompletedRejectedFailed 与 created/updated/succeeded/failed 的映射,也不清楚 Guard/reviewer rejection 如何暴露。
    • 疑似文档问题:缺少 withdrawal progression table、推荐事件集和审批拒绝信号。
    • 所需代码证据:追踪 withdrawal state machine 与 dispatch,核实 Guard/reviewer rejection 和终态成功/失败的 status/event。
  7. webhook-subscription-event-overlap

    • 类别:内容不清楚或不完整。
    • 证据:T96128 表明用户需要在四五个近似事件中猜测,并明确询问只订阅 updated 是否足够。
    • 疑似文档问题:未解释 updated 是否与 succeeded/failed 重叠或包含其通知,也未说明可靠组合。
    • 所需代码证据:比较 created/updated/succeeded/failed 的 dispatch conditions 与 payload/status,确认 terminal transition 是否同时发 updated,以及 ordering/duplicate 是否有保证。
  8. webhook-subscription-boundary-scenarios

    • 类别:内容不清楚或不完整。
    • 证据:T96128 引用 Mintlify“归集之后有webhook回调吗”、UEEX 关于 Portal 发起 withdrawal 是否产生 webhook 的问题,并列出 unexpected deposit 边界场景。
    • 疑似文档问题:未覆盖 AutoSweep、Web/Portal 发起交易和 unexpected deposits 是否发出 wallets.transaction.*
    • 所需代码证据:检查 AutoSweep/category、UI/API origin 和 unexpected-deposit detection 的 producers,记录每种场景的准确事件与例外。
  9. webhook-subscription-scope-and-reconciliation

    • 类别:内容不清楚或不完整。
    • 证据:T96128 引用 Vantage“订阅是否只需设定一次”与“webhook 和 API 查询哪个作为到帐依据”。
    • 疑似文档问题:未明确 subscription 是否每个 endpoint 配置一次并适用于组织,也未推荐 webhook notification + API verification/reconciliation。
    • 所需代码证据:核实 endpoint subscription ownership/scope、canonical transaction lookup/list API、一致性保证及去重/对账标识符。
  10. webhook-delivery-operations

    • 类别:缺少内容 / 内容不清楚或不完整。
    • 证据:T96128 引用 Aladdin 工单 1126429538992722086、客户观察“只推5次”、endpoint A/B 是否独立重试,以及 Mintlify“webhook 数据的保留时间是多久”。
    • 疑似文档问题:缺少成功标准、retry limit/schedule/backoff/stop conditions、per-endpoint 独立投递、重试耗尽后的 Console history/List all webhook events/resend/transaction reconciliation,以及 Console/API retention。
    • 所需代码证据:检查 delivery success validation、retry worker config、endpoint-specific attempt state、停止逻辑、resend、events API/Console backing store、TTL 和 reconciliation APIs;所有数值必须来自 backend config/code,而非客户观察。
2. 探索发现(按仓库 × explorer)

原始探索 findings 总量超过 GitHub 单条评论限制。本节按规范截断为每个 explorer 的 handoff_brief 摘要,并保留关键 code_evidence;完整 findings 保存在本次运行产物中,未静默省略。

custody × explorer codex

handoff_brief:主要改动应进入 developer-site,而非 product-manual。新增 EN/CN 成对的 Transaction payload、TSSRequest payload 与场景订阅指南,并更新 docs.json 与现有 webhook/status/source/RBF/category 交叉链接。现有状态、合规、ordering、deduplication、retry 文案应定点修订。未确认项为 universal confirmation threshold、KYT 阻断、unexpected deposit,以及外部 delivery service 的 retry/backoff/per-endpoint state/retention。

code_evidence:custody/waas2/webhooks/data/enums.py:20custody/waas2/webhooks/managers/wallet_event_by_source.py:25,51,116custody/waas2/transactions/mongo/manager/read/waas_transaction.py:178,430,469,504,597,620custody/waas2/mpc/managers/dev/webhook_wallet_mpc.py:21,26,110custody/waas2/webhooks/controller/webhook_endpoint.py:22

custody × explorer claude

handoff_brief:确认 tasks 3–9 的核心 runtime 行为:updated 对每个已处理变更触发,终态额外触发 succeeded/failed;common dispatcher 不按 initiator/category 过滤,因此 AutoSweep 与 Portal-originated transactions 走同一路径。endpoint 以 organization channel 注册。payload/schema 与 retention 的初步探索存在缺口,要求在写作前进一步核对 TSS modules、wire names 与外部 webhook service。

code_evidence:custody/waas2/developers/managers/callback_message.py:201,404custody/waas2/webhooks/managers/wallet_event_by_source.py:26-31,139-152custody/waas2/transactions/mongo/models/transaction.py:107,109,113custody/waas2/webhooks/managers/wallet_event.py:149,153-155

custody-2.0-website × explorer codex

handoff_brief:Portal frontend 只确认 UI 与 API 调用,不是 payload/runtime source of truth。Portal 注册每个 endpoint 时要求 event selection 和 wallet scope;事件详情页展示完整 data 与 delivery attempts,并允许 Failed/Retrying 事件 resend。Frontend 的 30-day filters 不能证明 storage TTL。

code_evidence:custody-2.0-website/src/pages/Developers/Webhooks/AddOrWebhooksModal/index.tsx:202,215custody-2.0-website/src/services/developers/index.ts:162,169,175,181custody-2.0-website/src/pages/Developers/Events/Detail/index.tsx:82,125,145,160

custody-2.0-website × explorer claude

handoff_brief:确认 Portal-facing statuses、resend action、retryLeft/retryable 与逐次 WebhookAttemptsTable。tasks 1–8 的事件常量、serializer 和 dispatch 仍需 custody backend。task 10 多数基础 retry/timeout 文案已存在,应只补 retention、recovery 和已验证的 UI 路径。

code_evidence:custody-2.0-website/src/pages/Developers/Responses/Detail/index.tsx:29-39,77-81,97-111custody-2.0-website/src/pages/Developers/components/WebhookAttemptsTable/index.tsx:8-15,60-97custody-2.0-website/src/interfaces/transaction.ts:37-63,108-160

developer-site-waas2 × explorer codex

handoff_brief:spec-source 确认公开 inventory 与 model wiring,但不能单独证明 runtime triggers。应在 developer-site 新增三组成对指南;任何 API wording/example 修改都必须从 developer-site-waas2 source YAML 发起。本次无需 API spec 编辑。

code_evidence:developer-site-waas2/v2/cobo_waas2_openapi_spec/components/schemas/webhooks/event_type.yaml:3-10.../webhooks/transaction_event_data.yaml:1-4.../webhooks/tss_request_event_data.yaml:1-5.../wallets/mpcs/tss_request.yaml:1-27.../transactions/transactions/transaction.yaml:19-26,45-52,88-112.../paths/webhooks/events.yaml:6

developer-site-waas2 × explorer claude

handoff_brief:确认 wallets.transaction.*wallets.mpc.tss_request.* 各有 created/updated/failed/succeeded 四个事件,Transaction webhook 复用 Transaction schema,TSSRequest 有 7 个公开字段。现有 set-up guide 已包含 retry limit 与 timeout,明确缺口是公开 30-day query window;crediting、overlap、AutoSweep 和 scope 的 runtime 结论需 custody evidence。

code_evidence:developer-site-waas2/v2/cobo_waas2_openapi_spec/components/schemas/webhooks/event_type.yaml:3-10.../components/schemas/wallets/mpcs/tss_request.yaml:1-27.../components/schemas/transactions/transactions/transaction_status.yaml:2-13.../paths/webhooks/events.yaml:6

cobo-libs × explorer codex

handoff_brief:cobo-libs 仅保存并原样提交 producer-supplied opaque payload,可证明 organization channel scope、history/log/retry proxy,不能证明 Transaction/TSSRequest 内容或 delivery worker 的 retry/TTL。相关运行时事实应来自 custody 与外部 webhook service。

code_evidence:cobo-libs/cobo_libs/webhook/models.py:20,22cobo-libs/cobo_libs/webhook/managers/managers.py:45,63cobo-libs/cobo_libs/webhook/views/webhook_endpoints.py:29cobo-libs/cobo_libs/webhook/client/client.py:195,210

cobo-libs × explorer claude

handoff_brief:确认 custody 只向外部 webhook service 提交一次;服务 REST surface 提供 list events、event logs、manual retry,endpoint/subscription 以 channel_id 管理。精确 retry count/backoff/stop/retention 不在本 repo,不能从 cobo-libs 推断。

code_evidence:cobo-libs/cobo_libs/webhook/data/enums.py:4-13cobo-libs/cobo_libs/webhook/managers/managers.py:44-89cobo-libs/cobo_libs/webhook/client/client.py:105-137,170-226

3. 综合结论

result:这十项诉求构成一个连贯的文档问题,而非十个孤立缺陷:客户缺少一套可发现的契约,把 event names、payload shapes、transaction state、subscription choices 与 delivery recovery 串联起来。主目标是 developer-site,并保持 v2/v2_cn 对等;新增 Transaction payload、MPC TSSRequest payload、场景订阅指南三组成对内容,更新导航与现有 webhook/status/setup/introduction 页面。product-manual 只承担 Portal 注册、事件详情、delivery attempts 与 resend 的 EN/CN 说明。公开 OpenAPI inventory 与 backend runtime evidence 足以支持最终批准范围;未核实的 universal threshold、KYT、unexpected deposit、retry/backoff、per-endpoint state 与 storage TTL 均从发布内容中排除。无需修改 API spec。

confidence:0.91

open_questions:

  1. 所有 deposit path 是否都保证只有在 confirmed_num >= confirming_threshold 后才进入 Success/Completed?
  2. 所有 KYT/compliance blocked deposit 是否都会进入 Rejected、发送 updated+failed 且不发送 succeeded,还是存在不发 webhook 的产品/路径例外?
  3. 哪些 detection paths 属于 unexpected deposits,是否存在绕过 common transaction update producer 的路径?
  4. 外部 webhook-service 的精确 retry schedule、backoff、总 attempt 语义和 stop conditions 是什么?
  5. endpoint A/B 的 delivery attempt state 是否完全独立?
  6. 30-day List all webhook events query window 是否等同 Portal/store retention TTL?custody 的 7-day local staging cleanup 不足以证明这一点。

汇总代码证据:

  • custody/waas2/webhooks/data/enums.py:20:确认 lifecycle events 为 created、updated、succeeded、failed。
  • custody/waas2/webhooks/managers/wallet_event.py:33:确认 transaction event type 组成 wallets.transaction.<event_name>
  • custody/waas2/webhooks/managers/wallet_event_by_source.py:25,51,116:确认 terminal mapping、TransactionDetail payload 和重叠 dispatch 行为。
  • custody/waas2/transactions/mongo/manager/read/waas_transaction.py:178,430,469,504,597,620:确认 transaction fields、replacement、source/destination、fee 与 raw_tx_info variants。
  • custody/waas2/transactions/mongo/manager/write/fields/token.py:15:确认 token_id 与 nullable asset_id 的来源和语义。
  • custody/waas2/transactions/mongo/enums/transaction_fields.py:45custody/waas2/transactions/mongo/manager/write/fields/cobo_category.py:149:确认 AutoSweep category。
  • custody/waas2/mpc/managers/dev/webhook_wallet_mpc.py:21,26,110:确认 MPC inventory、trigger mapping 与 payload packing。
  • custody/waas2/mpc/bo/dev/vault.py:235custody/waas2/mpc/enums/dev/mpc_vault.py:175:确认 TSSRequest fields/nullability 与 public statuses。
  • custody/waas2/transaction_query/enums/transaction_query.py:48custody/waas2/transactions/dev/enums/transaction.py:220:确认 terminal/backend 与 public status mapping。
  • custody/waas2/transaction_query/handlers/withdraw_request.py:337:确认 Portal/API withdrawal 共用状态映射。
  • custody/waas2/webhooks/controller/webhook_endpoint.py:22:确认 endpoint organization ownership、event selection 与 optional wallet scopes。
  • custody/waas2/webhooks/client/client.py:206custody/waas2/webhooks/views/event_retries.py:19:确认 list/detail/log/retry 委托外部 webhook service。
  • custody/waas2/webhooks/managers/wallet_event.py:153:仅确认 custody local staging 7-day cleanup,不能证明 public retention。
  • custody/waas2/transactions/dev/views/transaction_by_id.py:35custody/waas2/transactions/dev/bo/transaction_query/transaction.py:159:确认 canonical detail/list reconciliation APIs 与 filters。
  • developer-site-waas2/v2/cobo_waas2_openapi_spec/components/schemas/webhooks/event_type.yaml:3:确认公开 4 个 transaction 与 4 个 mpc.tss_request events。
  • developer-site-waas2/v2/cobo_waas2_openapi_spec/components/schemas/webhooks/transaction_event_data.yaml:1.../wallets/mpcs/tss_request.yaml:1:确认 shared Transaction/TSSRequest schemas。
  • developer-site-waas2/v2/cobo_waas2_openapi_spec/paths/webhooks/events.yaml:6:确认最近 30 天的公开 query window。
  • cobo-libs/cobo_libs/webhook/models.py:22cobo-libs/cobo_libs/webhook/client/client.py:170:确认 organization channel 语义及 event list/detail/log/retry surface。
  • custody-2.0-website/src/pages/Developers/Webhooks/AddOrWebhooksModal/index.tsx:215:确认 Portal wallet scope control。
  • custody-2.0-website/src/pages/Developers/Events/Detail/index.tsx:125,160:确认 Failed/Retrying resend 与 delivery attempts UI。
4. 编辑计划
[{"task_id":"webhook-payload-wallets-transaction-en","action":"fix_docs","doc_file":"v2/guides/webhooks-callbacks/wallets-transaction-payload.mdx","repo_alias":"primary","doc_edit_description":"Create the English wallets.transaction payload reference. Enumerate created, updated, succeeded, and failed triggers; document the full webhook envelope and shared Transaction field semantics; explain conditional source, destination, fee, raw_tx_info, token_id, asset_id, result, request_id, replacement, and cobo_category values; include complete deposit and withdrawal JSON examples covering EVM, UTXO, and TRON plus native-coin and token cases. Link to existing source/destination, RBF, status, and category guides. Do not claim the configured confirmation-threshold invariant until separately verified.","code_evidence":["custody/waas2/webhooks/data/enums.py:20","custody/waas2/webhooks/managers/wallet_event.py:33","custody/waas2/webhooks/managers/wallet_event_by_source.py:51","custody/waas2/transactions/mongo/manager/read/waas_transaction.py:178","custody/waas2/transactions/mongo/manager/read/waas_transaction.py:469","custody/waas2/transactions/mongo/manager/read/waas_transaction.py:504","custody/waas2/transactions/mongo/manager/read/waas_transaction.py:597","custody/waas2/transactions/mongo/manager/read/waas_transaction.py:620","custody/waas2/transactions/mongo/manager/write/fields/token.py:15"],"code_evidence_missing":false},{"task_id":"webhook-payload-wallets-transaction-cn","action":"fix_docs","doc_file":"v2_cn/guides/webhooks-callbacks/wallets-transaction-payload.mdx","repo_alias":"primary","doc_edit_description":"Create the Chinese counterpart of the wallets.transaction payload reference with the same trigger table, complete field coverage, scenario matrix, JSON examples, and language-local links. Keep all event, field, status, and enum identifiers in English.","code_evidence":["custody/waas2/webhooks/data/enums.py:20","custody/waas2/webhooks/managers/wallet_event.py:33","custody/waas2/webhooks/managers/wallet_event_by_source.py:51","custody/waas2/transactions/mongo/manager/read/waas_transaction.py:178","custody/waas2/transactions/mongo/manager/read/waas_transaction.py:597","custody/waas2/transactions/mongo/manager/read/waas_transaction.py:620"],"code_evidence_missing":false},{"task_id":"webhook-payload-wallets-transaction-index-en","action":"fix_docs","doc_file":"v2/guides/webhooks-callbacks/webhook-event-type.mdx","repo_alias":"primary","doc_edit_description":"Link every wallets.transaction event row and the data-structure section to the new Transaction payload reference so the schema, triggers, and complete examples are discoverable.","code_evidence":["custody/waas2/webhooks/data/enums.py:20","custody/waas2/webhooks/managers/wallet_event.py:33"],"code_evidence_missing":false},{"task_id":"webhook-payload-wallets-transaction-index-cn","action":"fix_docs","doc_file":"v2_cn/guides/webhooks-callbacks/webhook-event-type.mdx","repo_alias":"primary","doc_edit_description":"Mirror the English event-index links to the Chinese Transaction payload reference.","code_evidence":["custody/waas2/webhooks/data/enums.py:20","custody/waas2/webhooks/managers/wallet_event.py:33"],"code_evidence_missing":false},{"task_id":"webhook-payload-wallets-mpc-en","action":"fix_docs","doc_file":"v2/guides/webhooks-callbacks/wallets-mpc-tss-request-payload.mdx","repo_alias":"primary","doc_edit_description":"Create the English TSSRequest webhook payload reference for wallets.mpc.tss_request.created, updated, succeeded, and failed. Give exact producer scope, state-to-event triggers including suppressed intermediate states, a complete field table with nullable fields, public statuses, and realistic full JSON examples.","code_evidence":["custody/waas2/mpc/managers/dev/webhook_wallet_mpc.py:21","custody/waas2/mpc/managers/dev/webhook_wallet_mpc.py:26","custody/waas2/mpc/managers/dev/webhook_wallet_mpc.py:110","custody/waas2/mpc/bo/dev/vault.py:235","custody/waas2/mpc/enums/dev/mpc_vault.py:175"],"code_evidence_missing":false},{"task_id":"webhook-payload-wallets-mpc-cn","action":"fix_docs","doc_file":"v2_cn/guides/webhooks-callbacks/wallets-mpc-tss-request-payload.mdx","repo_alias":"primary","doc_edit_description":"Create the Chinese counterpart of the TSSRequest payload reference with identical trigger, field, nullability, status, and complete-example coverage. Preserve all identifiers in English.","code_evidence":["custody/waas2/mpc/managers/dev/webhook_wallet_mpc.py:21","custody/waas2/mpc/managers/dev/webhook_wallet_mpc.py:26","custody/waas2/mpc/managers/dev/webhook_wallet_mpc.py:110","custody/waas2/mpc/bo/dev/vault.py:235","custody/waas2/mpc/enums/dev/mpc_vault.py:175"],"code_evidence_missing":false},{"task_id":"webhook-payload-wallets-mpc-index-en","action":"fix_docs","doc_file":"v2/guides/webhooks-callbacks/webhook-event-type.mdx","repo_alias":"primary","doc_edit_description":"Link each wallets.mpc.tss_request event row to the new TSSRequest payload reference and make clear that this is the supported wallets.mpc event family.","code_evidence":["custody/waas2/mpc/managers/dev/webhook_wallet_mpc.py:21","custody/waas2/mpc/managers/dev/webhook_wallet_mpc.py:26"],"code_evidence_missing":false},{"task_id":"webhook-payload-wallets-mpc-index-cn","action":"fix_docs","doc_file":"v2_cn/guides/webhooks-callbacks/webhook-event-type.mdx","repo_alias":"primary","doc_edit_description":"Mirror the English MPC event-index links and supported-family clarification in Chinese.","code_evidence":["custody/waas2/mpc/managers/dev/webhook_wallet_mpc.py:21","custody/waas2/mpc/managers/dev/webhook_wallet_mpc.py:26"],"code_evidence_missing":false},{"task_id":"callback-payload-field-semantics-en","action":"fix_docs","doc_file":"v2/guides/webhooks-callbacks/wallets-transaction-payload.mdx","repo_alias":"primary","doc_edit_description":"Add the owning field-semantics section: webhook data uses TransactionDetail; distinguish token_id from nullable asset_id; explain lifecycle-dependent cobo_id, request_id, result, source/destination variants, replacement hashes, and AutoSweep. Use the public wire field names, including replaced_by_transaction_hash, in examples.","code_evidence":["custody/waas2/webhooks/managers/wallet_event_by_source.py:51","custody/waas2/transactions/mongo/manager/read/waas_transaction.py:178","custody/waas2/transactions/mongo/manager/write/fields/token.py:15","custody/waas2/transactions/mongo/manager/read/waas_transaction.py:430","custody/waas2/transactions/mongo/enums/transaction_fields.py:45"],"code_evidence_missing":false},{"task_id":"callback-payload-field-semantics-cn","action":"fix_docs","doc_file":"v2_cn/guides/webhooks-callbacks/wallets-transaction-payload.mdx","repo_alias":"primary","doc_edit_description":"Mirror the Transaction callback/webhook field-semantics section in Chinese, preserving public field and enum identifiers in English.","code_evidence":["custody/waas2/webhooks/managers/wallet_event_by_source.py:51","custody/waas2/transactions/mongo/manager/read/waas_transaction.py:178","custody/waas2/transactions/mongo/manager/write/fields/token.py:15","custody/waas2/transactions/mongo/manager/read/waas_transaction.py:430","custody/waas2/transactions/mongo/enums/transaction_fields.py:45"],"code_evidence_missing":false},{"task_id":"webhook-crediting-readiness-en","action":"fix_docs","doc_file":"v2/guides/transactions/status.mdx","repo_alias":"primary","doc_edit_description":"Connect transaction statuses to webhook semantics: Confirming is nonterminal progress reported through updated; Completed/Success additionally produces succeeded and is the positive completion signal. Link to the subscription guide. Do not publish an absolute confirmed_num-versus-confirming_threshold guarantee until the owning transition code is verified.","code_evidence":["custody/waas2/transactions/dev/enums/transaction.py:220","custody/waas2/webhooks/managers/wallet_event_by_source.py:25","custody/waas2/webhooks/managers/wallet_event_by_source.py:116"],"code_evidence_missing":false},{"task_id":"webhook-crediting-readiness-cn","action":"fix_docs","doc_file":"v2_cn/guides/transactions/status.mdx","repo_alias":"primary","doc_edit_description":"Mirror the verified Confirming/updated and Completed/succeeded relationship and subscription-guide link in Chinese, without adding the unverified threshold invariant.","code_evidence":["custody/waas2/transactions/dev/enums/transaction.py:220","custody/waas2/webhooks/managers/wallet_event_by_source.py:25","custody/waas2/webhooks/managers/wallet_event_by_source.py:116"],"code_evidence_missing":false},{"task_id":"webhook-subscription-deposit-crediting-en","action":"fix_docs","doc_file":"v2/guides/webhooks-callbacks/transaction-event-subscriptions.mdx","repo_alias":"primary","doc_edit_description":"Create the English scenario guide and add a deposit auto-crediting recipe: use succeeded/Completed as the positive crediting signal, created and updated for progress, failed plus status/sub_status for rejection/failure, relevant compliance events for KYT state, idempotent processing, and API reconciliation. Do not claim every compliance-blocked deposit emits failed or that every such path suppresses all webhooks until the remaining KYT paths are verified.","code_evidence":["custody/waas2/webhooks/managers/wallet_event_by_source.py:25","custody/waas2/webhooks/managers/wallet_event_by_source.py:116","custody/waas2/transaction_query/enums/transaction_query.py:48","custody/waas2/transactions/dev/views/transaction_by_id.py:35"],"code_evidence_missing":false},{"task_id":"webhook-subscription-deposit-crediting-cn","action":"fix_docs","doc_file":"v2_cn/guides/webhooks-callbacks/transaction-event-subscriptions.mdx","repo_alias":"primary","doc_edit_description":"Create the Chinese counterpart and mirror the verified deposit crediting, progress, rejection/failure, compliance, idempotency, and reconciliation guidance while omitting unverified universal KYT behavior.","code_evidence":["custody/waas2/webhooks/managers/wallet_event_by_source.py:25","custody/waas2/webhooks/managers/wallet_event_by_source.py:116","custody/waas2/transaction_query/enums/transaction_query.py:48","custody/waas2/transactions/dev/views/transaction_by_id.py:35"],"code_evidence_missing":false},{"task_id":"webhook-subscription-withdrawal-status-en","action":"fix_docs","doc_file":"v2/guides/webhooks-callbacks/transaction-event-subscriptions.mdx","repo_alias":"primary","doc_edit_description":"Add a withdrawal progression and event matrix for PendingAuthorization, Broadcasting, Confirming, Completed, Rejected, and Failed. Recommend subscriptions and state that Portal/API withdrawals share mapping, every processed change produces updated, Completed additionally produces succeeded, and Guard/reviewer rejection appears as Rejected with failed plus the relevant sub_status.","code_evidence":["custody/waas2/transactions/dev/enums/transaction.py:220","custody/waas2/transaction_query/handlers/withdraw_request.py:337","custody/waas2/transaction_query/enums/transaction_query.py:48","custody/waas2/webhooks/managers/wallet_event_by_source.py:25","custody/waas2/webhooks/managers/wallet_event_by_source.py:116"],"code_evidence_missing":false},{"task_id":"webhook-subscription-withdrawal-status-cn","action":"fix_docs","doc_file":"v2_cn/guides/webhooks-callbacks/transaction-event-subscriptions.mdx","repo_alias":"primary","doc_edit_description":"Mirror the withdrawal status-to-event matrix, recommended subscriptions, Portal/API parity, and rejection handling in Chinese.","code_evidence":["custody/waas2/transactions/dev/enums/transaction.py:220","custody/waas2/transaction_query/handlers/withdraw_request.py:337","custody/waas2/transaction_query/enums/transaction_query.py:48","custody/waas2/webhooks/managers/wallet_event_by_source.py:25","custody/waas2/webhooks/managers/wallet_event_by_source.py:116"],"code_evidence_missing":false},{"task_id":"webhook-subscription-event-overlap-en","action":"fix_docs","doc_file":"v2/guides/webhooks-callbacks/webhook-event-type.mdx","repo_alias":"primary","doc_edit_description":"Replace the ambiguous updated-only note with an overlap matrix: updated is attempted for every processed transition; created is additional on creation; succeeded and failed are additional terminal notifications. Explain that updated-only consumers must inspect payload status, while dedicated terminal events are clearer; retain the existing non-guaranteed ordering and deduplication guidance by cross-link.","code_evidence":["custody/waas2/webhooks/managers/wallet_event_by_source.py:25","custody/waas2/webhooks/managers/wallet_event_by_source.py:116"],"code_evidence_missing":false},{"task_id":"webhook-subscription-event-overlap-cn","action":"fix_docs","doc_file":"v2_cn/guides/webhooks-callbacks/webhook-event-type.mdx","repo_alias":"primary","doc_edit_description":"Mirror the event-overlap matrix and subscription tradeoff in Chinese; do not imply payload containment or delivery ordering.","code_evidence":["custody/waas2/webhooks/managers/wallet_event_by_source.py:25","custody/waas2/webhooks/managers/wallet_event_by_source.py:116"],"code_evidence_missing":false},{"task_id":"webhook-subscription-boundary-scenarios-en","action":"fix_docs","doc_file":"v2/guides/webhooks-callbacks/transaction-event-subscriptions.mdx","repo_alias":"primary","doc_edit_description":"Add verified boundary rows for AutoSweep and Portal-originated withdrawals: both use the common transaction event path, with AutoSweep identified by cobo_category=AutoSweep and Portal/API withdrawals sharing state mapping. Omit a categorical unexpected-deposit row until its detection path and exceptions are traced.","code_evidence":["custody/waas2/transactions/mongo/enums/transaction_fields.py:45","custody/waas2/transactions/mongo/manager/write/fields/cobo_category.py:149","custody/waas2/transaction_query/handlers/withdraw_request.py:337","custody/waas2/webhooks/managers/wallet_event_by_source.py:116"],"code_evidence_missing":false},{"task_id":"webhook-subscription-boundary-scenarios-cn","action":"fix_docs","doc_file":"v2_cn/guides/webhooks-callbacks/transaction-event-subscriptions.mdx","repo_alias":"primary","doc_edit_description":"Mirror the verified AutoSweep and Portal-originated withdrawal boundary rows in Chinese and omit the unresolved unexpected-deposit claim.","code_evidence":["custody/waas2/transactions/mongo/enums/transaction_fields.py:45","custody/waas2/transactions/mongo/manager/write/fields/cobo_category.py:149","custody/waas2/transaction_query/handlers/withdraw_request.py:337","custody/waas2/webhooks/managers/wallet_event_by_source.py:116"],"code_evidence_missing":false},{"task_id":"webhook-subscription-scope-and-reconciliation-en","action":"fix_docs","doc_file":"v2/guides/webhooks-callbacks/introduction.mdx","repo_alias":"primary","doc_edit_description":"Explain that each endpoint is configured once for its organization with selected event types and an optional wallet scope. Add the notification-plus-reconciliation pattern: deduplicate deliveries by event_id, reconcile transactions by transaction_id, and use cobo_id, request_id, or hash where appropriate with Get transaction information/List all transactions.","code_evidence":["custody/waas2/webhooks/controller/webhook_endpoint.py:22","custody/waas2/transactions/dev/views/transaction_by_id.py:35","custody/waas2/transactions/dev/bo/transaction_query/transaction.py:159"],"code_evidence_missing":false},{"task_id":"webhook-subscription-scope-and-reconciliation-cn","action":"fix_docs","doc_file":"v2_cn/guides/webhooks-callbacks/introduction.mdx","repo_alias":"primary","doc_edit_description":"Mirror the organization ownership, selected-event/wallet scope, deduplication, and transaction reconciliation guidance in Chinese.","code_evidence":["custody/waas2/webhooks/controller/webhook_endpoint.py:22","custody/waas2/transactions/dev/views/transaction_by_id.py:35","custody/waas2/transactions/dev/bo/transaction_query/transaction.py:159"],"code_evidence_missing":false},{"task_id":"webhook-subscription-scope-portal-en","action":"fix_docs","doc_file":"en/portal/developer-console/webhooks-create.mdx","repo_alias":"alt-docs","alt_docs_repo":"product-manual","doc_edit_description":"Update the English Portal registration flow to explain one configuration per endpoint, organization ownership, required event selection, and the Portal wallet-scope selection shown by the current UI. Link to Developer Hub for payload and reconciliation behavior.","code_evidence":["custody/waas2/webhooks/controller/webhook_endpoint.py:22","custody-2.0-website/src/pages/Developers/Webhooks/AddOrWebhooksModal/index.tsx:215"],"code_evidence_missing":false},{"task_id":"webhook-subscription-scope-portal-cn","action":"fix_docs","doc_file":"cn/portal/developer-console/webhooks-create.mdx","repo_alias":"alt-docs","alt_docs_repo":"product-manual","doc_edit_description":"Mirror the Portal endpoint, organization, event-selection, wallet-scope, and Developer Hub link updates in Chinese.","code_evidence":["custody/waas2/webhooks/controller/webhook_endpoint.py:22","custody-2.0-website/src/pages/Developers/Webhooks/AddOrWebhooksModal/index.tsx:215"],"code_evidence_missing":false},{"task_id":"webhook-delivery-operations-en","action":"fix_docs","doc_file":"v2/guides/webhooks-callbacks/set-up-endpoint.mdx","repo_alias":"primary","doc_edit_description":"Make a targeted operations revision rather than a rewrite. Preserve the existing verified success codes, timeout, published attempt limits, ordering, duplicate, log, and resend guidance; add the public 30-day List all webhook events window and a recovery flow using event detail/logs, manual retry, and canonical transaction reconciliation. Do not add retry schedule/backoff, total-attempt semantics, endpoint-independent retry claims, or storage-TTL claims until the external delivery service is verified; do not confuse the 30-day public window with custody's seven-day staging cleanup.","code_evidence":["custody/waas2/webhooks/client/client.py:206","custody/waas2/webhooks/views/event_retries.py:19","custody/waas2/transactions/dev/views/transaction_by_id.py:35","developer-site-waas2/v2/cobo_waas2_openapi_spec/paths/webhooks/events.yaml:6","custody/waas2/webhooks/managers/wallet_event.py:153"],"code_evidence_missing":false},{"task_id":"webhook-delivery-operations-cn","action":"fix_docs","doc_file":"v2_cn/guides/webhooks-callbacks/set-up-endpoint.mdx","repo_alias":"primary","doc_edit_description":"Mirror the targeted 30-day event-query window and recovery/reconciliation workflow in Chinese, retaining existing delivery guidance and omitting unverified delivery-service mechanics.","code_evidence":["custody/waas2/webhooks/client/client.py:206","custody/waas2/webhooks/views/event_retries.py:19","custody/waas2/transactions/dev/views/transaction_by_id.py:35","developer-site-waas2/v2/cobo_waas2_openapi_spec/paths/webhooks/events.yaml:6","custody/waas2/webhooks/managers/wallet_event.py:153"],"code_evidence_missing":false},{"task_id":"webhook-delivery-operations-portal-en","action":"fix_docs","doc_file":"en/portal/developer-console/webhook-events.mdx","repo_alias":"alt-docs","alt_docs_repo":"product-manual","doc_edit_description":"Expand the English Portal event-history page with the verified event detail, delivery-attempt log, Failed/Retrying resend flow, and 30-day API query window. Link to Developer Hub for full recovery and reconciliation guidance; do not state a Portal storage TTL or retry backoff.","code_evidence":["custody-2.0-website/src/pages/Developers/Events/Detail/index.tsx:125","custody-2.0-website/src/pages/Developers/Events/Detail/index.tsx:160","developer-site-waas2/v2/cobo_waas2_openapi_spec/paths/webhooks/events.yaml:6"],"code_evidence_missing":false},{"task_id":"webhook-delivery-operations-portal-cn","action":"fix_docs","doc_file":"cn/portal/developer-console/webhook-events.mdx","repo_alias":"alt-docs","alt_docs_repo":"product-manual","doc_edit_description":"Mirror the Portal event detail, attempt-log, resend, 30-day query-window, and Developer Hub recovery-link updates in Chinese.","code_evidence":["custody-2.0-website/src/pages/Developers/Events/Detail/index.tsx:125","custody-2.0-website/src/pages/Developers/Events/Detail/index.tsx:160","developer-site-waas2/v2/cobo_waas2_openapi_spec/paths/webhooks/events.yaml:6"],"code_evidence_missing":false},{"task_id":"webhook-reference-navigation","action":"fix_docs","doc_file":"docs.json","repo_alias":"primary","doc_edit_description":"Register the two new payload references and transaction-event subscription guide in the existing Webhooks and callbacks groups for both v2 and v2_cn, preserving parallel ordering and the current information architecture.","code_evidence":[],"code_evidence_missing":false}]
5. 评审轮次

第 1 轮:未批准

反馈:修正 wallets.transaction.created 触发描述,不得限定为链上检测;补全 Completed→succeeded、Failed/Rejected/Canceled→failed 映射;将 cobo_id/request_id 改为生命周期相关 nullable 语义;订阅幂等键改用始终存在的 transaction_id;补全 timeline 子字段;使 CN examples 与 EN 完整镜像;补全 MPC updated/suppressed state mapping 与 source_key_share_holder_group 子字段;去掉 created/succeeded/failed “fires once”的 exactly-once 暗示。涉及文件均要求 EN/CN 同步。

第 2 轮:未批准

反馈:主 payload examples 与 repo 内 OpenAPI wire schema 不一致。所有 DepositFromAddress 应使用 plural addresses array;DepositToAddress 必须包含 wallet_idwallet_typeaddressamount;withdrawal Address destination 应分别使用 account-chain account_output 或 UTXO utxo_outputs,不得在顶层放 address/amount;TSS source_key_share_holder_group 不应包含 schema 未定义的 name。同时要求 CN/EN example parity,并补充 UTXO 下 nullable used_nonce。其余 11 个文件批准,无需重改。

第 3 轮:primary revision 已批准

反馈:10 项 reviewer findings 均已修复并完成 EN/CN 镜像。created wording、terminal mapping、nullable cobo_id/request_idtransaction_id idempotency、timeline、六组 mirrored examples、MPC state mapping、structured group fields 及 “attempted in addition to updated” 均通过检查;无 internal citations、uncertainty flags 或翻译 identifier 泄漏。后续若要精确收紧 cobo_id null window,需要 transaction read-path code,但不构成本轮 blocker。

第 4 轮:alt-docs 已批准

反馈:product-manual 四个任务的 executor report 与 brief 一致,Mintlify validation、git diff --check、exact 4-file scope audit 和 marker/anchor scan 均通过。reviewer 因 sandbox 无法直接读取 alt-docs worktree,批准基于 executor self-report;未确认的 wallet-scope literal UI label 被正确省略,作为后续人工 spot check,不阻塞本次 PR。

6. 基线与同步
  • 编辑前同步到的 upstream 基线 commit:执行者未报告。
  • Primary docs:15 个文件最终提交为 006668df,PR 为 https://github.com/CoboGlobal/developer-site/pull/386。
  • API spec 编辑:无。
  • API spec 同步:不适用。
  • Alt-docs:product-manual EN/CN Portal webhook 页面已单独创建 PR:https://github.com/CoboGlobal/product-manual/pull/754。
  • Primary 独立验证结果:要求的 Mintlify 命令因 PreToolUse hook 无法静态验证 /dev/null redirection 而未执行;后续 revision review 报告的 scoped self-tests、JSON parse 与 EN/CN parity checks 通过。
  • Alt-docs 验证结果:Mintlify validation 与 git diff --check 通过。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants