Convert between Nano currency unit.
You can support me by send NANO to nano_3h9jnfh5j7j7bpyexb8uhze9fb35sy6gu6a8mhpzpj4ob1qnejfzkropmbw7
You can install the package via composer:
composer require s-patompong/nano-converter-php
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.
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please email me at p.pangpond@gmail.com
if you found vulnerabilities.
The MIT License (MIT). Please see License File for more information.