Skip to main content

bsv.Unit

scrypt-ts / bsv / Unit

Class: Unit

bsv.Unit

Table of contents

Constructors

Methods

Constructors

constructor

new Unit(amount, unitPreference)

Parameters

NameType
amountnumber
unitPreferencestring

Defined in

node_modules/bsv/index.d.ts:1442

Methods

toBTC

toBTC(): number

Returns

number

Defined in

node_modules/bsv/index.d.ts:1444


toBits

toBits(): number

Returns

number

Defined in

node_modules/bsv/index.d.ts:1446


toMilis

toMilis(): number

Returns

number

Defined in

node_modules/bsv/index.d.ts:1445


toSatoshis

toSatoshis(): number

Returns

number

Defined in

node_modules/bsv/index.d.ts:1447


fromBTC

Static fromBTC(amount): Unit

Parameters

NameType
amountnumber

Returns

Unit

Defined in

node_modules/bsv/index.d.ts:1437


fromBits

Static fromBits(amount): Unit

Parameters

NameType
amountnumber

Returns

Unit

Defined in

node_modules/bsv/index.d.ts:1439


fromMilis

Static fromMilis(amount): Unit

Parameters

NameType
amountnumber

Returns

Unit

Defined in

node_modules/bsv/index.d.ts:1438


fromSatoshis

Static fromSatoshis(amount): Unit

Parameters

NameType
amountnumber

Returns

Unit

Defined in

node_modules/bsv/index.d.ts:1440