PHPackages                             xrplwin/xrpl-nfttxmutationparser - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. xrplwin/xrpl-nfttxmutationparser

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

xrplwin/xrpl-nfttxmutationparser
================================

Parse XRPL NFT transaction to context aware object providing direction, token id and roles.

v1.0.18(1y ago)1199[2 issues](https://github.com/XRPLWin/XRPL-NFTTxMutationParser/issues)MITPHPPHP ^8.1.0CI passing

Since Mar 7Pushed 1y agoCompare

[ Source](https://github.com/XRPLWin/XRPL-NFTTxMutationParser)[ Packagist](https://packagist.org/packages/xrplwin/xrpl-nfttxmutationparser)[ Docs](https://github.com/XRPLWin)[ RSS](/packages/xrplwin-xrpl-nfttxmutationparser/feed)WikiDiscussions main Synced yesterday

READMEChangelog (10)Dependencies (2)Versions (24)Used By (0)

[![CI workflow](https://github.com/XRPLWin/XRPL-NFTTxMutationParser/actions/workflows/main.yml/badge.svg)](https://github.com/XRPLWin/XRPL-NFTTxMutationParser/actions/workflows/main.yml)[![GitHub license](https://camo.githubusercontent.com/f32e95e718d8cd2353f5fff55426e2ab760ffe438f9cc108e41e220f4d7da10f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f5852504c57696e2f5852504c2d4e465454784d75746174696f6e506172736572)](https://github.com/XRPLWin/XRPL-NFTTxMutationParser/blob/main/LICENSE)[![Total Downloads](https://camo.githubusercontent.com/b64b6979391062bb1e0277547cf6dff911366baea21efda30a827309eb206bca/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7872706c77696e2f7872706c2d6e667474786d75746174696f6e7061727365722e7376673f7374796c653d666c6174)](https://packagist.org/packages/xrplwin/xrpl-nfttxmutationparser)

XRPL NFT Transaction Mutation Parser for PHP
============================================

[](#xrpl-nft-transaction-mutation-parser-for-php)

Supporting networks
-------------------

[](#supporting-networks)

- XRPL
- Xahau

Description
-----------

[](#description)

Parses NFToken and URIToken (referred as NFT) Transactions (`NFTokenMint`, `URITokenMint`, `NFTokenBurn`, `URITokenBurn`, `NFTokenAcceptOffer`, `URITokenBuy`, `NFTokenCancelOffer`, `URITokenCancelSellOffer`, `NFTokenCreateOffer`, `URITokenCreateSellOffer`, `Remit`) with account context and returns affected NFT, direction that NFT was transferred, minted or destroyed, and outputs roles referencing account has in specific transaction.

With this parser you can find out what has happened with referencing account after transaction was executed. For example when token is minted - parser will output token ID and direction IN, this means referenced account was minter and new token is added to reference account ownership.

**Remit (XLS-55)**
Remit Transaction Type can mint a single URIToken which is present in this transaction like any other NFT. Additionally Remit can transfer none, one or more existing URIToken-s from Account to Destination, those tokens are present in `nfts` and `ref.nfts` array key, sending Account has role 'SELLER' and receiver Destination has role 'OWNER'.

What is checked:

- **Token id** - affected token ID in question
- **Token direction** - minted - IN, burned, OUT, sold - OUT, bought - IN
- **Roles** - role of referencing account in this transaction, is it minter, burner, seller, buyer, broker, or issuer
- **Remitted URITokens** - list of tokens transferred in `Remit` transaction type

Note about NFToken (XLS-20) issuer:
Issuer can only happen in `NFTokenAcceptOffer` transaction type, it is extracted from modified AccountRoot node by checking if balance has been changed. If yes then this account gained percentage of sale, and it is issuer of NFToken.

### Note

[](#note)

This package is provided as is, please test it yourself first.
Found a bug? [Report issue here](https://github.com/XRPLWin/XRPL-NFTTxMutationParser/issues/new)

Requirements
------------

[](#requirements)

- PHP 8.1 or higher
- [Composer](https://getcomposer.org/)

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

[](#installation)

To install run

```
composer require xrplwin/xrpl-nfttxmutationparser

```

Usage
-----

[](#usage)

```
use XRPLWin\XRPLNFTTxMutatationParser\NFTTxMutationParser;

$txResult = [
  "Account" => "rBcd..."
  "Fee" => "1000",
  //...
];
$parser = new NFTTxMutationParser(
  "rAbc...", //This is reference account
  (object)$txResult //This is transaction result
);
$parsedTransaction = $parser->result();

print_r($parsedTransaction);

/*
┐
├ Output for $parsedTransaction:
├ Array (
├     [nft] => 00082710...
├     [nfts] => []
├     [context] => null
├     [ref] => Array
├         (
├             [account] => rAbc...
├             [nft] => 00082710...
├             [nfts] => []
├             [direction] => IN
├             [roles] => Array
├                 (
├                     [0] => OWNER
├                 )
├         )
├ )
┴
*/
```

Response
--------

[](#response)

KeyTypeDescriptionnft?StringNFToken or URIToken always present in types: `NFTokenMint`, `NFTokenBurn`, `NFTokenAcceptOffer`, `NFTokenCreateOffer`, `NFTokenModify`, `URI*`, null in `Remit` if there is no token mintednftsArrayNFTokens transferred in Remit transaction type (not including Minted token)context?StringContext of transaction (specifically offers). One of: `null`,`"BUY"`,`"SELL"`,`"BROKERED"`ref.accountStringReference accountref.nft?StringNFTokenID or URIToken which changed ownership depending on direction for reference account including minted URIToken in Remitref.nftsArrayURITokens which changed ownership depending on direction for reference account in Remit transaction only, NFTokens transferred in Remit transaction type (not including Minted token)ref.directionStringOne of: `"IN"`,`"OUT"`,`"UNKNOWN"`ref.rolesArrayArray of roles reference account has in this transaction, possible roles: `"UNKNOWN"`, `"OWNER"`, `"MINTER"`, `"BURNER"`, `"BUYER"`, `"SELLER"`, `"BROKER"`, `"ISSUER"`Running tests
-------------

[](#running-tests)

Run all tests in "tests" directory.

```
composer test

```

or

```
./vendor/bin/phpunit --testdox

```

Demo
----

[](#demo)

See this in action on [XRPLWin Playground](https://playground.xrpl.win/play/xrpl-nft-transaction-mutation-parser)

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity64

Established project with proven stability

 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

Every ~39 days

Recently: every ~156 days

Total

22

Last Release

386d ago

Major Versions

v0.0.3 → v1.0.02023-03-10

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/100956614?v=4)[XRPLWin](/maintainers/xrplwin)[@XRPLWin](https://github.com/XRPLWin)

---

Top Contributors

[![zgrguric](https://avatars.githubusercontent.com/u/108837406?v=4)](https://github.com/zgrguric "zgrguric (52 commits)")

---

Tags

nftnftokenparserphpuriuritokenxahauxrplcomposermutationparserpackagerippletransactionxrpnfttxxrplperspectiverippled

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/xrplwin-xrpl-nfttxmutationparser/health.svg)

```
[![Health](https://phpackages.com/badges/xrplwin-xrpl-nfttxmutationparser/health.svg)](https://phpackages.com/packages/xrplwin-xrpl-nfttxmutationparser)
```

###  Alternatives

[composer-unused/symbol-parser

Toolkit to parse symbols from a composer package

156.6M2](/packages/composer-unused-symbol-parser)[joshdifabio/composed

Easily parse your project's Composer configuration, and those of its dependencies, at runtime.

53276.0k7](/packages/joshdifabio-composed)[leonelquinteros/php-toml

PHP parser for TOML language ( https://github.com/toml-lang/toml )

286.9k](/packages/leonelquinteros-php-toml)[hardcastle/xrpl_php

PHP SDK / Client for the XRP Ledger

1110.7k7](/packages/hardcastle-xrpl-php)

PHPackages © 2026

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