s-patompong / nano-converter-php
Convert between Nano currency units.
Fund package maintenance!
s-patompong
github.com/s-patompong
Requires
- php: ^8.0
- brick/math: ^0.9.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.17
- phpunit/phpunit: ^9.5
- spatie/ray: ^1.10
- vimeo/psalm: ^4.3
This package is auto-updated.
Last update: 2024-10-25 21:42:07 UTC
README
Convert between Nano currency unit.
Support me
You can support me by send NANO to nano_3h9jnfh5j7j7bpyexb8uhze9fb35sy6gu6a8mhpzpj4ob1qnejfzkropmbw7
Installation
You can install the package via composer:
composer require s-patompong/nano-converter-php
Usage
Convert NANO to Raw.
$nano = new \SPatompong\NanoConverter\NANO("45.225513"); echo $nano->toRaw(); // Output: "45225513000000000000000000000000"
Convert Raw to NANO.
$raw = new \SPatompong\NanoConverter\Raw("7126405971523"); echo $raw->toNANO(); // Output: "0.000000000000000007126405971523"
It's important to note that the returned response is the object of BigDecimal class.
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please email me at p.pangpond@gmail.com
if you found vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.