interbtc-api

@interlay/interbtc-api / Exports / SignedFixedPoint

Interface: SignedFixedPoint

Name

SignedFixedPoint

Hierarchy

Table of contents

Properties

Accessors

Methods

Properties

#private

Private #private: any

Inherited from

FixedU128.#private

Defined in

node_modules/@polkadot/types-codec/abstract/Int.d.ts:12


createdAtHash

Optional createdAtHash: IU8a

Inherited from

FixedU128.createdAtHash

Defined in

node_modules/@polkadot/types-codec/abstract/Int.d.ts:16


encodedLength

Readonly encodedLength: number

Inherited from

FixedU128.encodedLength

Defined in

node_modules/@polkadot/types-codec/abstract/Int.d.ts:14


initialU8aLength

Optional initialU8aLength: number

Inherited from

FixedU128.initialU8aLength

Defined in

node_modules/@polkadot/types-codec/abstract/Int.d.ts:17


isStorageFallback

Optional isStorageFallback: boolean

Inherited from

FixedU128.isStorageFallback

Defined in

node_modules/@polkadot/types-codec/abstract/Int.d.ts:18


isUnsigned

Readonly isUnsigned: boolean

Inherited from

FixedU128.isUnsigned

Defined in

node_modules/@polkadot/types-codec/abstract/Int.d.ts:15


registry

Readonly registry: Registry

Inherited from

FixedU128.registry

Defined in

node_modules/@polkadot/types-codec/abstract/Int.d.ts:13

Accessors

hash

get hash(): IU8a

Returns

IU8a

Description

returns a hash of the contents

Inherited from

FixedU128.hash

Defined in

node_modules/@polkadot/types-codec/abstract/Int.d.ts:23


isEmpty

get isEmpty(): boolean

Returns

boolean

Description

Checks if the value is a zero value (align elsewhere)

Inherited from

FixedU128.isEmpty

Defined in

node_modules/@polkadot/types-codec/abstract/Int.d.ts:27

Methods

abs

abs(): BN

Returns

BN

Description

absolute value

Inherited from

FixedU128.abs

Defined in

node_modules/@types/bn.js/index.d.ts:233


add

add(b): BN

Parameters

Name Type
b BN

Returns

BN

Description

addition

Inherited from

FixedU128.add

Defined in

node_modules/@types/bn.js/index.d.ts:243


addn

addn(b): BN

Parameters

Name Type
b number

Returns

BN

Description

addition

Inherited from

FixedU128.addn

Defined in

node_modules/@types/bn.js/index.d.ts:253


and

and(b): BN

Parameters

Name Type
b BN

Returns

BN

Description

and

Inherited from

FixedU128.and

Defined in

node_modules/@types/bn.js/index.d.ts:384


andln

andln(b): BN

Parameters

Name Type
b number

Returns

BN

Description

and (NOTE: andln is going to be replaced with andn in future)

Inherited from

FixedU128.andln

Defined in

node_modules/@types/bn.js/index.d.ts:404


bincn

bincn(b): BN

Parameters

Name Type
b number

Returns

BN

Description

add 1 << b to the number

Inherited from

FixedU128.bincn

Defined in

node_modules/@types/bn.js/index.d.ts:488


bitLength

bitLength(): number

Returns

number

Description

Returns the number of bits in the value

Inherited from

FixedU128.bitLength

Defined in

node_modules/@polkadot/types-codec/abstract/Int.d.ts:31


byteLength

byteLength(): number

Returns

number

Description

return number of bytes occupied

Inherited from

FixedU128.byteLength

Defined in

node_modules/@types/bn.js/index.d.ts:123


clone

clone(): BN

Returns

BN

Description

clone number

Inherited from

FixedU128.clone

Defined in

node_modules/@types/bn.js/index.d.ts:68


cmp

cmp(b): -1 | 0 | 1

Parameters

Name Type
b BN

Returns

-1 | 0 | 1

Description

compare numbers and return -1 (a < b), 0 (a == b), or 1 (a > b) depending on the comparison result

Inherited from

FixedU128.cmp

Defined in

node_modules/@types/bn.js/index.d.ts:148


cmpn

cmpn(b): -1 | 0 | 1

Parameters

Name Type
b number

Returns

-1 | 0 | 1

Description

compare numbers and return -1 (a < b), 0 (a == b), or 1 (a > b) depending on the comparison result

Inherited from

FixedU128.cmpn

Defined in

node_modules/@types/bn.js/index.d.ts:158


copy

copy(dest): void

Parameters

Name Type
dest BN

Returns

void

Description

Copy to dest number

Inherited from

FixedU128.copy

Defined in

node_modules/@types/bn.js/index.d.ts:63


div

div(b): BN

Parameters

Name Type
b BN

Returns

BN

Description

divide

Inherited from

FixedU128.div

Defined in

node_modules/@types/bn.js/index.d.ts:318


divRound

divRound(b): BN

Parameters

Name Type
b BN

Returns

BN

Description

rounded division

Inherited from

FixedU128.divRound

Defined in

node_modules/@types/bn.js/index.d.ts:359


divmod

divmod(b, mode?, positive?): Object

Parameters

Name Type
b BN
mode? "div" | "mod"
positive? boolean

Returns

Object

Name Type
div BN
mod BN

Description

division with remainder

Inherited from

FixedU128.divmod

Defined in

node_modules/@types/bn.js/index.d.ts:333


divn

divn(b): BN

Parameters

Name Type
b number

Returns

BN

Description

divide

Inherited from

FixedU128.divn

Defined in

node_modules/@types/bn.js/index.d.ts:323


egcd

egcd(b): Object

Parameters

Name Type
b BN

Returns

Object

Name Type
a BN
b BN
gcd BN

Description

Extended GCD results ({ a: ..., b: ..., gcd: ... })

Inherited from

FixedU128.egcd

Defined in

node_modules/@types/bn.js/index.d.ts:508


eq

eq(other?): boolean

Parameters

Name Type
other? unknown

Returns

boolean

Description

Compares the value of the input to see if there is a match

Inherited from

FixedU128.eq

Defined in

node_modules/@polkadot/types-codec/abstract/Int.d.ts:35


eqn

eqn(b): boolean

Parameters

Name Type
b number

Returns

boolean

Description

a equals b

Inherited from

FixedU128.eqn

Defined in

node_modules/@types/bn.js/index.d.ts:208


fromTwos

fromTwos(width): BN

Parameters

Name Type
width number

Returns

BN

Description

convert from two’s complement representation, where width is the bit width

Inherited from

FixedU128.fromTwos

Defined in

node_modules/@types/bn.js/index.d.ts:218


gcd

gcd(b): BN

Parameters

Name Type
b BN

Returns

BN

Description

GCD

Inherited from

FixedU128.gcd

Defined in

node_modules/@types/bn.js/index.d.ts:503


gt

gt(b): boolean

Parameters

Name Type
b BN

Returns

boolean

Description

a greater than b

Inherited from

FixedU128.gt

Defined in

node_modules/@types/bn.js/index.d.ts:183


gte

gte(b): boolean

Parameters

Name Type
b BN

Returns

boolean

Description

a greater than or equals b

Inherited from

FixedU128.gte

Defined in

node_modules/@types/bn.js/index.d.ts:193


gten

gten(b): boolean

Parameters

Name Type
b number

Returns

boolean

Description

a greater than or equals b

Inherited from

FixedU128.gten

Defined in

node_modules/@types/bn.js/index.d.ts:198


gtn

gtn(b): boolean

Parameters

Name Type
b number

Returns

boolean

Description

a greater than b

Inherited from

FixedU128.gtn

Defined in

node_modules/@types/bn.js/index.d.ts:188


iabs

iabs(): BN

Returns

BN

Description

absolute value

Inherited from

FixedU128.iabs

Defined in

node_modules/@types/bn.js/index.d.ts:238


iadd

iadd(b): BN

Parameters

Name Type
b BN

Returns

BN

Description

addition

Inherited from

FixedU128.iadd

Defined in

node_modules/@types/bn.js/index.d.ts:248


iaddn

iaddn(b): BN

Parameters

Name Type
b number

Returns

BN

Description

addition

Inherited from

FixedU128.iaddn

Defined in

node_modules/@types/bn.js/index.d.ts:258


iand

iand(b): BN

Parameters

Name Type
b BN

Returns

BN

Description

and

Inherited from

FixedU128.iand

Defined in

node_modules/@types/bn.js/index.d.ts:389


idivn

idivn(b): BN

Parameters

Name Type
b number

Returns

BN

Description

divide

Inherited from

FixedU128.idivn

Defined in

node_modules/@types/bn.js/index.d.ts:328


imaskn

imaskn(b): BN

Parameters

Name Type
b number

Returns

BN

Description

clear bits with indexes higher or equal to b

Inherited from

FixedU128.imaskn

Defined in

node_modules/@types/bn.js/index.d.ts:484


imul

imul(b): BN

Parameters

Name Type
b BN

Returns

BN

Description

multiply

Inherited from

FixedU128.imul

Defined in

node_modules/@types/bn.js/index.d.ts:288


imuln

imuln(b): BN

Parameters

Name Type
b number

Returns

BN

Description

multiply

Inherited from

FixedU128.imuln

Defined in

node_modules/@types/bn.js/index.d.ts:298


ineg

ineg(): BN

Returns

BN

Description

negate sign

Inherited from

FixedU128.ineg

Defined in

node_modules/@types/bn.js/index.d.ts:228


inotn

inotn(w): BN

Parameters

Name Type
w number

Returns

BN

Description

not (for the width specified by w)

Inherited from

FixedU128.inotn

Defined in

node_modules/@types/bn.js/index.d.ts:498


inspect

inspect(): Inspect

Returns

Inspect

Description

Returns a breakdown of the hex encoding for this Codec

Inherited from

FixedU128.inspect

Defined in

node_modules/@polkadot/types-codec/abstract/Int.d.ts:39


invm

invm(b): BN

Parameters

Name Type
b BN

Returns

BN

Description

inverse a modulo b

Inherited from

FixedU128.invm

Defined in

node_modules/@types/bn.js/index.d.ts:513


ior

ior(b): BN

Parameters

Name Type
b BN

Returns

BN

Description

or

Inherited from

FixedU128.ior

Defined in

node_modules/@types/bn.js/index.d.ts:369


isEven

isEven(): boolean

Returns

boolean

Description

check if value is even

Inherited from

FixedU128.isEven

Defined in

node_modules/@types/bn.js/index.d.ts:133


isMax

isMax(): boolean

Returns

boolean

Description

True if this value is the max of the type

Inherited from

FixedU128.isMax

Defined in

node_modules/@polkadot/types-codec/abstract/Int.d.ts:43


isNeg

isNeg(): boolean

Returns

boolean

Description

true if the number is negative

Inherited from

FixedU128.isNeg

Defined in

node_modules/@types/bn.js/index.d.ts:128


isOdd

isOdd(): boolean

Returns

boolean

Description

check if value is odd

Inherited from

FixedU128.isOdd

Defined in

node_modules/@types/bn.js/index.d.ts:138


isZero

isZero(): boolean

Returns

boolean

Description

check if value is zero

Inherited from

FixedU128.isZero

Defined in

node_modules/@types/bn.js/index.d.ts:143


ishln

ishln(b): BN

Parameters

Name Type
b number

Returns

BN

Description

shift left

Inherited from

FixedU128.ishln

Defined in

node_modules/@types/bn.js/index.d.ts:439


ishrn

ishrn(b): BN

Parameters

Name Type
b number

Returns

BN

Description

shift right (unimplemented https://github.com/indutny/bn.js/blob/master/lib/bn.js#L2086)

Inherited from

FixedU128.ishrn

Defined in

node_modules/@types/bn.js/index.d.ts:459


isqr

isqr(): BN

Returns

BN

Description

square

Inherited from

FixedU128.isqr

Defined in

node_modules/@types/bn.js/index.d.ts:308


isub

isub(b): BN

Parameters

Name Type
b BN

Returns

BN

Description

subtraction

Inherited from

FixedU128.isub

Defined in

node_modules/@types/bn.js/index.d.ts:268


isubn

isubn(b): BN

Parameters

Name Type
b number

Returns

BN

Description

subtraction

Inherited from

FixedU128.isubn

Defined in

node_modules/@types/bn.js/index.d.ts:278


iuand

iuand(b): BN

Parameters

Name Type
b BN

Returns

BN

Description

and

Inherited from

FixedU128.iuand

Defined in

node_modules/@types/bn.js/index.d.ts:399


iuor

iuor(b): BN

Parameters

Name Type
b BN

Returns

BN

Description

or

Inherited from

FixedU128.iuor

Defined in

node_modules/@types/bn.js/index.d.ts:379


iushln

iushln(b): BN

Parameters

Name Type
b number

Returns

BN

Description

shift left

Inherited from

FixedU128.iushln

Defined in

node_modules/@types/bn.js/index.d.ts:449


iushrn

iushrn(b): BN

Parameters

Name Type
b number

Returns

BN

Description

shift right

Inherited from

FixedU128.iushrn

Defined in

node_modules/@types/bn.js/index.d.ts:469


iuxor

iuxor(b): BN

Parameters

Name Type
b BN

Returns

BN

Description

xor

Inherited from

FixedU128.iuxor

Defined in

node_modules/@types/bn.js/index.d.ts:424


ixor

ixor(b): BN

Parameters

Name Type
b BN

Returns

BN

Description

xor

Inherited from

FixedU128.ixor

Defined in

node_modules/@types/bn.js/index.d.ts:414


lt

lt(b): boolean

Parameters

Name Type
b BN

Returns

boolean

Description

a less than b

Inherited from

FixedU128.lt

Defined in

node_modules/@types/bn.js/index.d.ts:163


lte

lte(b): boolean

Parameters

Name Type
b BN

Returns

boolean

Description

a less than or equals b

Inherited from

FixedU128.lte

Defined in

node_modules/@types/bn.js/index.d.ts:173


lten

lten(b): boolean

Parameters

Name Type
b number

Returns

boolean

Description

a less than or equals b

Inherited from

FixedU128.lten

Defined in

node_modules/@types/bn.js/index.d.ts:178


ltn

ltn(b): boolean

Parameters

Name Type
b number

Returns

boolean

Description

a less than b

Inherited from

FixedU128.ltn

Defined in

node_modules/@types/bn.js/index.d.ts:168


maskn

maskn(b): BN

Parameters

Name Type
b number

Returns

BN

Description

clear bits with indexes higher or equal to b

Inherited from

FixedU128.maskn

Defined in

node_modules/@types/bn.js/index.d.ts:479


mod

mod(b): BN

Parameters

Name Type
b BN

Returns

BN

Description

reduct

Inherited from

FixedU128.mod

Defined in

node_modules/@types/bn.js/index.d.ts:338


modn

modn(b): number

Parameters

Name Type
b number

Returns

number

Deprecated

Description

reduct

Inherited from

FixedU128.modn

Defined in

node_modules/@types/bn.js/index.d.ts:349


modrn

modrn(b): number

Parameters

Name Type
b number

Returns

number

Description

reduct

Inherited from

FixedU128.modrn

Defined in

node_modules/@types/bn.js/index.d.ts:354


mul

mul(b): BN

Parameters

Name Type
b BN

Returns

BN

Description

multiply

Inherited from

FixedU128.mul

Defined in

node_modules/@types/bn.js/index.d.ts:283


muln

muln(b): BN

Parameters

Name Type
b number

Returns

BN

Description

multiply

Inherited from

FixedU128.muln

Defined in

node_modules/@types/bn.js/index.d.ts:293


neg

neg(): BN

Returns

BN

Description

negate sign

Inherited from

FixedU128.neg

Defined in

node_modules/@types/bn.js/index.d.ts:223


notn

notn(w): BN

Parameters

Name Type
w number

Returns

BN

Description

not (for the width specified by w)

Inherited from

FixedU128.notn

Defined in

node_modules/@types/bn.js/index.d.ts:493


or

or(b): BN

Parameters

Name Type
b BN

Returns

BN

Description

or

Inherited from

FixedU128.or

Defined in

node_modules/@types/bn.js/index.d.ts:364


pow

pow(b): BN

Parameters

Name Type
b BN

Returns

BN

Description

raise a to the power of b

Inherited from

FixedU128.pow

Defined in

node_modules/@types/bn.js/index.d.ts:313


setn

setn(b, value): BN

Parameters

Name Type
b number
value boolean | 0 | 1

Returns

BN

Description

set specified bit to value

Inherited from

FixedU128.setn

Defined in

node_modules/@types/bn.js/index.d.ts:429


shln

shln(b): BN

Parameters

Name Type
b number

Returns

BN

Description

shift left

Inherited from

FixedU128.shln

Defined in

node_modules/@types/bn.js/index.d.ts:434


shrn

shrn(b): BN

Parameters

Name Type
b number

Returns

BN

Description

shift right

Inherited from

FixedU128.shrn

Defined in

node_modules/@types/bn.js/index.d.ts:454


sqr

sqr(): BN

Returns

BN

Description

square

Inherited from

FixedU128.sqr

Defined in

node_modules/@types/bn.js/index.d.ts:303


sub

sub(b): BN

Parameters

Name Type
b BN

Returns

BN

Description

subtraction

Inherited from

FixedU128.sub

Defined in

node_modules/@types/bn.js/index.d.ts:263


subn

subn(b): BN

Parameters

Name Type
b number

Returns

BN

Description

subtraction

Inherited from

FixedU128.subn

Defined in

node_modules/@types/bn.js/index.d.ts:273


testn

testn(b): boolean

Parameters

Name Type
b number

Returns

boolean

Description

test if specified bit is set

Inherited from

FixedU128.testn

Defined in

node_modules/@types/bn.js/index.d.ts:474


toArray

toArray(endian?, length?): number[]

Parameters

Name Type
endian? Endianness
length? number

Returns

number[]

Description

convert to byte Array, and optionally zero pad to length, throwing if already exceeding

Inherited from

FixedU128.toArray

Defined in

node_modules/@types/bn.js/index.d.ts:88


toArrayLike

toArrayLike(ArrayType, endian?, length?): Buffer

Parameters

Name Type
ArrayType BufferConstructor
endian? Endianness
length? number

Returns

Buffer

Description

convert to an instance of type, which must behave like an Array

Inherited from

FixedU128.toArrayLike

Defined in

node_modules/@types/bn.js/index.d.ts:93

toArrayLike(ArrayType, endian?, length?): any[]

Parameters

Name Type
ArrayType any[]
endian? Endianness
length? number

Returns

any[]

Inherited from

FixedU128.toArrayLike

Defined in

node_modules/@types/bn.js/index.d.ts:99


toBigInt

toBigInt(): bigint

Returns

bigint

Description

Returns a BigInt representation of the number

Inherited from

FixedU128.toBigInt

Defined in

node_modules/@polkadot/types-codec/abstract/Int.d.ts:47


toBn

toBn(): BN

Returns

BN

Description

Returns the BN representation of the number. (Compatibility)

Inherited from

FixedU128.toBn

Defined in

node_modules/@polkadot/types-codec/abstract/Int.d.ts:51


toBuffer

toBuffer(endian?, length?): Buffer

Parameters

Name Type
endian? Endianness
length? number

Returns

Buffer

Description

convert to Node.js Buffer (if available). For compatibility with browserify and similar tools, use this instead: a.toArrayLike(Buffer, endian, length)

Inherited from

FixedU128.toBuffer

Defined in

node_modules/@types/bn.js/index.d.ts:108


toHex

toHex(isLe?): `0x${string}`

Parameters

Name Type
isLe? boolean

Returns

`0x${string}`

Description

Returns a hex string representation of the value

Inherited from

FixedU128.toHex

Defined in

node_modules/@polkadot/types-codec/abstract/Int.d.ts:55


toHuman

toHuman(_isExpanded?): string

Parameters

Name Type
_isExpanded? boolean

Returns

string

Description

Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information

Inherited from

FixedU128.toHuman

Defined in

node_modules/@polkadot/types-codec/abstract/Int.d.ts:59


toJSON

toJSON(onlyHex?): any

Parameters

Name Type
onlyHex? boolean

Returns

any

Description

Converts the Object to JSON, typically used for RPC transfers

Inherited from

FixedU128.toJSON

Defined in

node_modules/@polkadot/types-codec/abstract/Int.d.ts:63


toNumber

toNumber(): number

Returns

number

Description

convert to Javascript Number (limited to 53 bits)

Inherited from

FixedU128.toNumber

Defined in

node_modules/@types/bn.js/index.d.ts:78


toPrimitive

toPrimitive(): string | number

Returns

string | number

Description

Returns the value in a primitive form, either number when <= 52 bits, or string otherwise

Inherited from

FixedU128.toPrimitive

Defined in

node_modules/@polkadot/types-codec/abstract/Int.d.ts:67


toRawType

toRawType(): string

Returns

string

Description

Returns the base runtime type name for this instance

Inherited from

FixedU128.toRawType

Defined in

node_modules/@polkadot/types-codec/abstract/Int.d.ts:71


toRed

toRed(reductionContext): RedBN

Parameters

Name Type
reductionContext ReductionContext

Returns

RedBN

Description

Convert number to red

Inherited from

FixedU128.toRed

Defined in

node_modules/@types/bn.js/index.d.ts:518


toString

toString(base?): string

Parameters

Name Type Description
base? number The base to use for the conversion

Returns

string

Description

Returns the string representation of the value

Inherited from

FixedU128.toString

Defined in

node_modules/@polkadot/types-codec/abstract/Int.d.ts:76


toTwos

toTwos(width): BN

Parameters

Name Type
width number

Returns

BN

Description

convert to two’s complement representation, where width is bit width

Inherited from

FixedU128.toTwos

Defined in

node_modules/@types/bn.js/index.d.ts:213


toU8a

toU8a(_isBare?): Uint8Array

Parameters

Name Type
_isBare? boolean

Returns

Uint8Array

Description

Encodes the value as a Uint8Array as per the SCALE specifications

Inherited from

FixedU128.toU8a

Defined in

node_modules/@polkadot/types-codec/abstract/Int.d.ts:80


uand

uand(b): BN

Parameters

Name Type
b BN

Returns

BN

Description

and

Inherited from

FixedU128.uand

Defined in

node_modules/@types/bn.js/index.d.ts:394


ucmp

ucmp(b): -1 | 0 | 1

Parameters

Name Type
b BN

Returns

-1 | 0 | 1

Description

compare numbers and return -1 (a < b), 0 (a == b), or 1 (a > b) depending on the comparison result

Inherited from

FixedU128.ucmp

Defined in

node_modules/@types/bn.js/index.d.ts:153


umod

umod(b): BN

Parameters

Name Type
b BN

Returns

BN

Description

reduct

Inherited from

FixedU128.umod

Defined in

node_modules/@types/bn.js/index.d.ts:343


uor

uor(b): BN

Parameters

Name Type
b BN

Returns

BN

Description

or

Inherited from

FixedU128.uor

Defined in

node_modules/@types/bn.js/index.d.ts:374


ushln

ushln(b): BN

Parameters

Name Type
b number

Returns

BN

Description

shift left

Inherited from

FixedU128.ushln

Defined in

node_modules/@types/bn.js/index.d.ts:444


ushrn

ushrn(b): BN

Parameters

Name Type
b number

Returns

BN

Description

shift right

Inherited from

FixedU128.ushrn

Defined in

node_modules/@types/bn.js/index.d.ts:464


uxor

uxor(b): BN

Parameters

Name Type
b BN

Returns

BN

Description

xor

Inherited from

FixedU128.uxor

Defined in

node_modules/@types/bn.js/index.d.ts:419


xor

xor(b): BN

Parameters

Name Type
b BN

Returns

BN

Description

xor

Inherited from

FixedU128.xor

Defined in

node_modules/@types/bn.js/index.d.ts:409


zeroBits

zeroBits(): number

Returns

number

Description

return number of less-significant consequent zero bits (example: 1010000 has 4 zero bits)

Inherited from

FixedU128.zeroBits

Defined in

node_modules/@types/bn.js/index.d.ts:118