js-conflux-sdk
Version:
JavaScript Conflux Software Development Kit
63 lines • 1.46 kB
TypeScript
declare const _exports: typeof Drip;
export = _exports;
/**
* Positive decimal integer string in `Drip`
*/
declare class Drip extends String {
/**
* Get `Drip` string from `CFX`
*
* @param {string|number|BigInt} value
* @return {Drip}
*
* @example
* > Drip.fromCFX(3.14)
[String (Drip): '3140000000000000000']
* > Drip.fromCFX('0xab')
[String (Drip): '171000000000000000000']
*/
static fromCFX(value: string | number | BigInt): Drip;
/**
* Get `Drip` string from `GDrip`
*
* @param {string|number|BigInt} value
* @return {Drip}
*
* @example
* > Drip.fromGDrip(3.14)
[String (Drip): '3140000000']
* > Drip.fromGDrip('0xab')
[String (Drip): '171000000000']
*/
static fromGDrip(value: string | number | BigInt): Drip;
/**
* @param {number|string|BigInt} value
* @return {Drip}
*
* @example
* > new Drip(1.00)
[String (Drip): '1']
* > new Drip('0xab')
[String (Drip): '171']
*/
constructor(value: number | string | BigInt);
/**
* Get `CFX` number string
* @return {string}
*
* @example
* > Drip(1e9).toCFX()
"0.000000001"
*/
toCFX(): string;
/**
* Get `GDrip` number string
* @return {string}
*
* @example
* > Drip(1e9).toGDrip()
"1"
*/
toGDrip(): string;
}
//# sourceMappingURL=Drip.d.ts.map