Skip to content

feat: transaction history API for non-custodial (external-key) users #272

@sadiq1971

Description

@sadiq1971

Background

For custodial users, transaction history works today via standard Ethereum JSON-RPC:

  • The api-server's miner (pkg/ethrpc/miner/miner.go) wraps each custodial Canton transfer in a synthetic EVM block and writes a synthetic Transfer(address,address,uint256) log to the evm_logs table (pkg/ethrpc/store/pg.go:130 AddEvmLog).
  • Clients (MetaMask, block explorers, dApps) read history via eth_getLogs — implemented in pkg/ethrpc/service/service.go:467 GetLogs against GetEvmLogs.
  • Filtering by user address works because the custodial user's EVM address is encoded as from/to in the synthetic log topics.

For non-custodial (external-key) users, no equivalent exists:

  • External users submit Canton commands directly with their own keys (the api-server only signs/forwards; it does not custody). Their transfers do not flow through the miner, so no synthetic EVM logs are written for them.
  • The indexer captures the underlying Canton events (TokenTransferEvent, TransferOffer create/archive, Holding create/archive — see pkg/indexer/engine/processor.go) and stores them keyed by canton_party_id.
  • The only read surface today is the admin endpoint /indexer/v1/admin/parties/{partyID}/events (pkg/indexer/service/http.go:41), which returns raw indexer events and is not designed for external user consumption.

Result: a non-custodial user has no API to list "my transfers" the way a custodial user does via eth_getLogs.

Goal

Provide a first-class transaction history API for non-custodial users.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority: P2Added to issues and PRs relating to a medium severity bugs.Status: Needs ClarificationAdded to issues that are not clearly understood, and require additional input.Type: FeatureAdded to issues and PRs to identify that the change is a new feature.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions