PHPackages                             xdc3/php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. xdc3/php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

xdc3/php
========

By This Library We can Access the XRC20 and XRC721 Methods

1.0.0(4y ago)112PHP

Since Jan 27Pushed 3y agoCompare

[ Source](https://github.com/XDCFoundation/XDC3PHP)[ Packagist](https://packagist.org/packages/xdc3/php)[ RSS](/packages/xdc3-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (3)Used By (0)

XDC3PHP
=======

[](#xdc3php)

XDC3\_PHP SDK with support for smart contracts, XRC20 and XRC721.

### This SDK supports the following read and write methods.

[](#this-sdk-supports-the-following-read-and-write-methods)

XRC20 Token: Read methodsXRC20 Token: Write methodsname()approve(receiverAddress , amount)symbol()transfer(recipient, amount)decimal()transferFrom(sender, recipient, amount)totalSupply()increaseAllowance(spender, addedValue)balanceOf(account)decreaseAllowance(spender, subtractedValue)allowance(owner, spender)XRC721 Token: Read methodsXRC721 Token: Write methodsname()setApprovalForAll(operatorAddress, booleanValuesymbol()approve(receiverAddress , tokenId)totalSupply()transferFrom(recipient, tokenId)balanceOf(owner address)safeTransferFrom(spender, tokenId)ownerOf(tokenId)tokenURI(tokenId)tokenByIndex(index)tokenOfOwnerByIndex(ownerAddress,index)supportInterface(interfaceId)getApproved(tokenId)isApprovedForAll(ownerAddress, operatorAddress)Usage
-----

[](#usage)

```
User need to follow the following steps for using the XDCPHP Library.
Step1 :- Create a folder (eg : sdk).
Step2 :- Inside the folder open the command prompt and type 'composer require xdc3/php'.
Step3 :- Create a file (eg : index.php).
Step4 :- After creating user need to add the path, import the classes and create the object.
Step5 :- (optional) If user wants to change the URL of (Apothem testnet Network)  goto vendor -> XDC3 folder -> PHP folder -> .env file and make changes there.

```

Installation
------------

[](#installation)

```
This library provides simple way to interact with XDC XRC20 & XRC721 tokens.

Before Installing This Library

1.Install php version 7.4.25 in the System.

2.Go to PHP Folder in the system, open php.ini file then enable gmp and curl extensions.

ex: Before it has ';extension=gmp' just remove ";" to enable this Extension.

    Before it has ';extension=curl' just remove ";" to enable this Extension.

3.After that enable this one '(;curl.cainfo =)' and add ssl certificate path here.

  For download this certificate

  go to this url https://curl.se/docs/caextract.html then click on cacert.pem on the top.

  Copy the path of the certificate and paste in php .ini file.

  ex: curl.cainfo = "C:\Users\HP\Downloads\cacert.pem"

4.Install openssl in the system by chocolately.

  Run below command in admin powershell to install openssl.

  ex: choco install openssl

```

Example for XRC20
-----------------

[](#example-for-xrc20)

```
Test.php

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1571d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ac53c593983ae65e2df3caf68c8c07fdb9ded40c4753802a40881f3450a43527?d=identicon)[XDCFoundation](/maintainers/XDCFoundation)

---

Top Contributors

[![WalterBlueu](https://avatars.githubusercontent.com/u/86977117?v=4)](https://github.com/WalterBlueu "WalterBlueu (2 commits)")

### Embed Badge

![Health badge](/badges/xdc3-php/health.svg)

```
[![Health](https://phpackages.com/badges/xdc3-php/health.svg)](https://phpackages.com/packages/xdc3-php)
```

###  Alternatives

[sop/crypto-types

A PHP library of various ASN.1 types for cryptographic applications.

111.4M33](/packages/sop-crypto-types)[sop/x509

A PHP library for X.509 public key certificates, attribute certificates, certification requests and certification path validation.

45884.0k10](/packages/sop-x509)[madwizard/webauthn

Web Authentication API server for PHP

6194.9k1](/packages/madwizard-webauthn)[fenguoz/bsc-php

Support Binance's BNB and BEP20, which include functions such as address creation, balance query, transaction transfer, query the latest blockchain, query information based on the blockchain, and query information based on the transaction hash

4720.9k](/packages/fenguoz-bsc-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
