Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

2.4K
Views
How to programmatically validate Tether (TRC20) Wallet Addresses in PHP?

I am having an issue related to validating cryptocurrency wallet addresses, specifically USDT.

USDT can be validated either as a BTC or ETH address, depending on the network type.

Basically it goes like that:

  • If cryptocurrency is USDT and chain type is ERC20, validate the address against ETH address format.
  • If cryptocurrency is USDT and wallet type is OMNI, validate the address against BTC address format.

I haven't managed to find a specific validation for USDT:TRC20 addresses and I am not sure how to validate them.

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

trc20 address features:

An encoded Mainnet address begins with T and is 34 bytes in length.

<?php
    function isTrc20($address){
       return substr($address,0,1)=="T" and strlen($address)==34;
    }
    if(isTrc20("TC74QG8tbtixG5Raa4fEifywgjrFs45fNz"))
       echo "yes";
    else
        echo "no";

information source : https://medium.com/tron-foundation/tron-developer-guide-account-2446633a750

over 4 years ago · Santiago Trujillo Report

0

validating the address on your own is not preferred you should use an API like Tron protocol not only to check if the address is valid also to check if it's not a spam

you need to check the documentation
tronprotocol

also check how to make http request
here

also Shielded TRC-20

check this website as a reference

over 4 years ago · Santiago Trujillo Report

0

Regex for matching Tron address: T[A-Za-z1-9]{33}

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!