Skip to content

Latest commit

 

History

History
112 lines (72 loc) · 2 KB

Drip.md

File metadata and controls

112 lines (72 loc) · 2 KB

Drip

Positive decimal integer string in Drip

Drip.fromCFX

Get Drip string from CFX

  • Parameters
Name Type Required Default Description
value string,number true
  • Returns

Drip

  • Examples
> Drip.fromCFX(3.14)
   [String (Drip): '3140000000000000000']
> Drip.fromCFX('0xab')
   [String (Drip): '171000000000000000000']

Drip.fromGDrip

Get Drip string from GDrip

  • Parameters
Name Type Required Default Description
value string,number true
  • Returns

Drip

  • Examples
> Drip.fromGDrip(3.14)
   [String (Drip): '3140000000']
> Drip.fromGDrip('0xab')
   [String (Drip): '171000000000']

Drip.prototype.constructor

  • Parameters
Name Type Required Default Description
value number,string true
  • Returns

Drip

  • Examples
> new Drip(1.00)
   [String (Drip): '1']
> new Drip('0xab')
   [String (Drip): '171']

Drip.prototype.toCFX

Get CFX number string

  • Returns

string

  • Examples
> Drip(1e9).toCFX()
   "0.000000001"

Drip.prototype.toGDrip

Get GDrip number string

  • Returns

string

  • Examples
> Drip(1e9).toGDrip()
   "1"