{"id":28992486,"url":"https://github.com/tact-lang/txtracer-core","last_synced_at":"2025-06-25T02:39:53.998Z","repository":{"id":293345478,"uuid":"981145016","full_name":"tact-lang/TxTracer-core","owner":"tact-lang","description":"Core txtracer library for collecting transaction information","archived":false,"fork":false,"pushed_at":"2025-05-17T07:16:10.000Z","size":288,"stargazers_count":2,"open_issues_count":8,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-11T08:59:43.559Z","etag":null,"topics":["blockchain","tact","ton","tracing","txtracer"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@tonstudio/txtracer-core","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tact-lang.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-10T12:48:51.000Z","updated_at":"2025-05-17T07:09:21.000Z","dependencies_parsed_at":"2025-06-11T08:59:45.944Z","dependency_job_id":"43e68b32-a155-48e5-8fbf-73774051a64e","html_url":"https://github.com/tact-lang/TxTracer-core","commit_stats":null,"previous_names":["tact-lang/txtracer-core","tact-lang/retracer-core"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/tact-lang/TxTracer-core","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tact-lang%2FTxTracer-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tact-lang%2FTxTracer-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tact-lang%2FTxTracer-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tact-lang%2FTxTracer-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tact-lang","download_url":"https://codeload.github.com/tact-lang/TxTracer-core/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tact-lang%2FTxTracer-core/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261792600,"owners_count":23210335,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","tact","ton","tracing","txtracer"],"created_at":"2025-06-25T02:39:53.272Z","updated_at":"2025-06-25T02:39:53.978Z","avatar_url":"https://github.com/tact-lang.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TxTracer-core\n\n**TxTracer-core** is a core library for deep analysis, emulation, and tracing transactions on the TON blockchain. The library allows you to reproduce transaction execution in a local sandbox, obtain detailed reports on computation, actions, and money flow, and collect low-level information about blocks, accounts, and messages.\n\n## Features\n\n- **Detailed transaction tracing**: Emulate transaction execution in an environment identical to TON blockchain's mainnet.\n- **Block and account data collection**: Obtain account state snapshots, block configuration, and transaction history.\n- **Work with libraries and contracts**: Automatic loading and handling of exotic library cells.\n- **Analysis of incoming/outgoing messages, balance calculations, and VM log collection.**\n- **Supports both mainnet and testnet.**\n\n## Installation\n\n```bash\nyarn add @tonstudio/txtracer-core\n# or\nnpm install @tonstudio/txtracer-core\n```\n\n## Quick Start\n\n```ts\nimport {retrace} from \"@tonstudio/txtracer-core\"\n\n// Example: trace a transaction by its hash\nconst result = await retrace(false, \"YOUR_TX_HASH\")\nconsole.log(result)\n```\n\n## Main API\n\n### Transaction Tracing\n\n```ts\nimport {retrace} from \"@tonstudio/txtracer-core\"\n\n/**\n * @param testnet - true for testnet, false for mainnet\n * @param txHash - hex transaction hash\n * @returns Detailed execution report (TraceResult)\n */\nconst result1 = await retrace(testnet, txHash)\n\n/**\n * Retrace a transaction described as triple\n */\nconst result2 = await retraceBaseTx(testnet, {\n    lt: 56166043000001n,\n    hash: Buffer.from(\"T6Y6ZoW71mrznFA0RyU/xV5ILpz9WUPJ9i9/4xPq1Is=\", \"base64\"),\n    address: Address.parse(\"EQCqKZrrce8Ss6SZaLI-OkH2w8-xtPP9_ZvyyIZLhy9Hmpf8\"),\n})\n```\n\n### Helper Methods\n\nAll methods are exported from `@tonstudio/txtracer-core` and can be used independently:\n\n- **findBaseTxByHash(testnet, txHash)** — Find base transaction info by hash.\n- **findRawTxByHash(testnet, baseTxInfo)** — Get full transaction details.\n- **findShardBlockForTx(testnet, rawTx)** — Find the shard block containing the transaction.\n- **findFullBlockForSeqno(testnet, seqno)** — Get master-block by seqno.\n- **findAllTransactionsBetween(testnet, baseTx, minLt)** — Get all account transactions in a given range.\n- **getBlockConfig(testnet, blockInfo)** — Get global config for a block.\n- **getBlockAccount(testnet, address, blockInfo)** — Get account snapshot before a block.\n- **collectUsedLibraries(testnet, account, tx)** — Collect used library cells.\n- **prepareEmulator(blockConfig, libs, randSeed)** — Prepare the emulator for transaction execution.\n- **emulatePreviousTransactions(...)** — Emulate a chain of previous transactions to restore the state.\n- **computeFinalData(...)** — Gather final data from emulation result.\n- **findFinalActions(logs)** — Extract final actions from VM logs.\n- **shardAccountToBase64(shardAccount)** — Serialize an account to base64 for the emulator.\n\n## Types\n\nAll main types (transactions, blocks, messages, tracing results) are exported from `@tonstudio/txtracer-core` and are fully typed (see [src/types.ts](src/types.ts)).\n\n## Projects based on txtracer-core\n\n- [TxTracer](https://txtracer.ton.org) — Web application for tracing and debugging any TON blockchain transactions\n\n## License\n\nMIT © TON Studio\n\n## Links\n\n- [TON Documentation](https://ton.org/docs/)\n- [Source code \u0026 issue tracker](https://github.com/tact-lang/txtracer-core)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftact-lang%2Ftxtracer-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftact-lang%2Ftxtracer-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftact-lang%2Ftxtracer-core/lists"}