Skip to main content
POST

Networks: all supported EVM chains, plus Tron. See Supported Chains.

Using The Recommendation

recommended_action is the simplest field to integrate into a signing flow: The score gives finer-grained severity for sorting, analytics or UI colour: A response can contain multiple findings. Show all of them: each describes a different part of the risk — the dApp domain, the spender, the destination, the asset exposure.

Use name for application logic and description for user-facing copy. Key off name, not description: identifiers are stable, while wording improves over time.

Security Coverage

HashDit combines request context, threat intelligence, contract metadata and simulation evidence. Findings can cover:
  • Malicious or brand-impersonating dApp URLs
  • Risky destination addresses and addresses reached by internal calls
  • Unlimited approvals, approvals to wallet addresses, and NFT approval-for-all
  • Known-malicious or suspicious function calls
  • Unverified destinations, recipients and contract functions
  • Tron account-permission changes
Not every category appears in every response. risk_details contains only the findings triggered for the submitted transaction. Reverts and the actual balance, approval and ownership effects are reported separately, in the simulation result.

Security Analysis Without Simulation

Set simulate to false when you only need the verdict:
The response contains data.security and omits exec_summary, results and simulation_error. Checks that depend on execution evidence — an approval created inside a nested call, the proportion of a balance transferred — are unavailable in this mode.

Tron Transactions

Tron accepts two request shapes. The flat evm_transactions shape every other chain uses, or the unsigned transaction object tronWeb.transactionBuilder returns, as tron_transactions. The second lets a wallet forward what it already holds; prefer it on Tron.
Send the object tronWeb.transactionBuilder.* returned, unmodified. Addresses are accepted in either encoding tronWeb emits — 21-byte hex, or the Base58 form you get with visible: true. txID, visible and raw_data_hex are ignored, and the { "method": "tron_sendTransaction", "params": … } provider envelope is unwrapped. dapp_url, simulate and requested_items work exactly as they do for evm_transactions.

Amounts Are Decimal Here

Numbers inside a Tron transaction are read as decimal only — unlike the Numeric Fields of this API, where 0x marks hex. A 0x-prefixed amount is a 400, as is any amount, threshold or key weight that cannot be read. Nothing is defaulted to zero.

Which Operations Are Simulated

raw_data.contract[0].type decides. Simulated. TransferContract, TransferAssetContract, TriggerSmartContract, FreezeBalanceV2Contract, UnfreezeBalanceV2Contract, DelegateResourceContract, UnDelegateResourceContract, WithdrawExpireUnfreezeContract. Assessed, but not simulated. A vote, a reward withdrawal, an account-permission change and a Stake 1.0 freeze are all real transactions with nothing for the simulator to execute: AccountPermissionUpdateContract, VoteWitnessContract, WithdrawBalanceContract, AccountUpdateContract, CancelAllUnfreezeV2Contract, FreezeBalanceContract, UnfreezeBalanceContract, ParticipateAssetIssueContract, CreateSmartContract. For these, results is empty, simulation_error names the operation, and security is still a full assessment. Anything else also returns a verdict rather than an error, so a transaction type Tron adds later keeps working.

Account Permission Changes

AccountPermissionUpdateContract is read in full: which permission block each new key lands in, the signature threshold, the key weights, and — for an active permission — the operations it is limited to. All four come from the request, so they are reported with results empty. The flat evm_transactions shape cannot express this operation at all.

Input requirement: an active permission must carry its 32-byte operations bitmap, as hex or base64. Its contents decide which of the first two findings applies, so a bitmap that cannot be read is a 400.

Surface tx_tron_permission_transfer prominently. One signature grants a key to the account — TRX, every TRC-20 and TRC-10, staked balances and future deposits at once. It is not an approval, so it will not appear in any approval-review screen, and revoking it needs a further permission change.

Numeric Fields

Every int | string field in this request — value, gas, gas_price, max_fee_per_gas, max_priority_fee_per_gas, nonce, type, block_height, token_id, token_value, and the amount inside freeze_balance and delegate_resource — accepts all three of: The three are equivalent. Send strings above 2^53 so JavaScript callers do not lose precision. A hex string must carry the 0x prefix: "f4240" is a 400.
Numbers inside a tron_transactions object are decimal only. See Amounts Are Decimal Here.

Errors

Error responses include a detail or message explaining the failure:
Two more worth recognising, both specific to tron_transactions:

Request/Response

Request fields accept both camelCase and snake_case. See Request Field Names.

Headers

X-API-KEY
string
required

Your HashDit API key.

Body

application/json

Send exactly one transaction, in exactly one of evm_transactions or tron_transactions.

Sending both shapes, or more than one transaction, is a 400.

evm_transactions
object[]
required

The transaction to analyze. Alias: transactions.

Send this or tron_transactions, not both, and send exactly one item.

Required array length: 1 element
Example:
tron_transactions
object[]

On Tron you can skip the flattening entirely: send the object tronWeb.transactionBuilder.* returned, unmodified. See the Tron Unsigned Transaction example in the playground.

Unmodified unsigned Tron transactions. Alias: tronTransactions.

Send this or evm_transactions, not both, and send exactly one item. No chain_id is needed — a Tron transaction identifies its own chain.

See Tron Transactions.

Required array length: 1 element
dapp_url
string

Full URL of the dApp that initiated the transaction. Alias: dappUrl.

Optional, recommended.

simulate
boolean
default:true

Defaults to true.

Set to false to return the security verdict without simulation output. exec_summary, results and simulation_error are omitted. Checks that depend on execution evidence — an approval created inside a nested call, the proportion of a balance transferred — are unavailable in this mode.

requested_items
object

Which simulation sections to include in results.

Response

Successful response.

code: "0" means the API request succeeded; it does not mean the transaction would. Check exec_summary.result_code and results[0].revert for the simulation outcome.

A revert is served at HTTP 200. simulation_error is null when execution produced a result — including a revert.

Every successful call uses the standard envelope: code, status, data.

code
string

"0" when the API request succeeded.

Example:

"0"

status
string

"ok" on success; otherwise an error label.

Example:

"ok"

data
object

Successful payload.

security is always present on success.

exec_summary, results and simulation_error are omitted when simulate is false.

tron_fee_limit is Tron only, and present only when both inputs are available.