AlexanderBuzz / xrpl-php

A PHP library to interact with the XRP Ledger (XRPL) blockchain
ISC License
5 stars 3 forks source link

Longer Currency Codes #26

Closed JohnGabrielRodi closed 7 months ago

JohnGabrielRodi commented 8 months ago

Does this SDK support longer currency names in hex for custom tokens?

Like "Dropzop" token instead of "DZT"

I'm not able to get it working.

AlexanderBuzz commented 8 months ago

Hi @JohnGabrielRodi, yes it does, I'll make an example for that!

AlexanderBuzz commented 8 months ago

@JohnGabrielRodi If go to the examples folder, you can create an example setup with:

console php token-create.php --tokenName 44726F707A6F7000000000000000000000000000 --issuerBalance 100000 --customerBalance 1000

Example Bithomp test account: https://test.bithomp.com/explorer/r9PvAD9TeGv3huQ1Tku9deTpSBHQ9QtFdS

I'll publish a new package with a helper function ASAP, but if you need "Dropzop', its custom currency value is "44726F707A6F7000000000000000000000000000", which is basically a packed and padded string.

AlexanderBuzz commented 7 months ago

It is now avaliable in the latest Package, see examples/custom_currency_codes.php