@interlay/interbtc-api / Exports / Ratio
Name
Ratio
Permill
↳ Ratio
• Private #private: any
Permill.#private
node_modules/@polkadot/types-codec/abstract/Int.d.ts:12
• Optional createdAtHash: IU8a
Permill.createdAtHash
node_modules/@polkadot/types-codec/abstract/Int.d.ts:16
• Readonly encodedLength: number
Permill.encodedLength
node_modules/@polkadot/types-codec/abstract/Int.d.ts:14
• Optional initialU8aLength: number
Permill.initialU8aLength
node_modules/@polkadot/types-codec/abstract/Int.d.ts:17
• Optional isStorageFallback: boolean
Permill.isStorageFallback
node_modules/@polkadot/types-codec/abstract/Int.d.ts:18
• Readonly isUnsigned: boolean
Permill.isUnsigned
node_modules/@polkadot/types-codec/abstract/Int.d.ts:15
• Readonly registry: Registry
Permill.registry
node_modules/@polkadot/types-codec/abstract/Int.d.ts:13
• get hash(): IU8a
IU8a
Description
returns a hash of the contents
Permill.hash
node_modules/@polkadot/types-codec/abstract/Int.d.ts:23
• get isEmpty(): boolean
boolean
Description
Checks if the value is a zero value (align elsewhere)
Permill.isEmpty
node_modules/@polkadot/types-codec/abstract/Int.d.ts:27
▸ abs(): BN
BN
Description
absolute value
Permill.abs
node_modules/@types/bn.js/index.d.ts:233
▸ add(b): BN
| Name | Type |
|---|---|
b |
BN |
BN
Description
addition
Permill.add
node_modules/@types/bn.js/index.d.ts:243
▸ addn(b): BN
| Name | Type |
|---|---|
b |
number |
BN
Description
addition
Permill.addn
node_modules/@types/bn.js/index.d.ts:253
▸ and(b): BN
| Name | Type |
|---|---|
b |
BN |
BN
Description
and
Permill.and
node_modules/@types/bn.js/index.d.ts:384
▸ andln(b): BN
| Name | Type |
|---|---|
b |
number |
BN
Description
and (NOTE: andln is going to be replaced with andn in future)
Permill.andln
node_modules/@types/bn.js/index.d.ts:404
▸ bincn(b): BN
| Name | Type |
|---|---|
b |
number |
BN
Description
add 1 << b to the number
Permill.bincn
node_modules/@types/bn.js/index.d.ts:488
▸ bitLength(): number
number
Description
Returns the number of bits in the value
Permill.bitLength
node_modules/@polkadot/types-codec/abstract/Int.d.ts:31
▸ byteLength(): number
number
Description
return number of bytes occupied
Permill.byteLength
node_modules/@types/bn.js/index.d.ts:123
▸ clone(): BN
BN
Description
clone number
Permill.clone
node_modules/@types/bn.js/index.d.ts:68
▸ cmp(b): -1 | 0 | 1
| Name | Type |
|---|---|
b |
BN |
-1 | 0 | 1
Description
compare numbers and return -1 (a < b), 0 (a == b), or 1 (a > b) depending on the comparison result
Permill.cmp
node_modules/@types/bn.js/index.d.ts:148
▸ cmpn(b): -1 | 0 | 1
| Name | Type |
|---|---|
b |
number |
-1 | 0 | 1
Description
compare numbers and return -1 (a < b), 0 (a == b), or 1 (a > b) depending on the comparison result
Permill.cmpn
node_modules/@types/bn.js/index.d.ts:158
▸ copy(dest): void
| Name | Type |
|---|---|
dest |
BN |
void
Description
Copy to dest number
Permill.copy
node_modules/@types/bn.js/index.d.ts:63
▸ div(b): BN
| Name | Type |
|---|---|
b |
BN |
BN
Description
divide
Permill.div
node_modules/@types/bn.js/index.d.ts:318
▸ divRound(b): BN
| Name | Type |
|---|---|
b |
BN |
BN
Description
rounded division
Permill.divRound
node_modules/@types/bn.js/index.d.ts:359
▸ divmod(b, mode?, positive?): Object
| Name | Type |
|---|---|
b |
BN |
mode? |
"div" | "mod" |
positive? |
boolean |
Object
| Name | Type |
|---|---|
div |
BN |
mod |
BN |
Description
division with remainder
Permill.divmod
node_modules/@types/bn.js/index.d.ts:333
▸ divn(b): BN
| Name | Type |
|---|---|
b |
number |
BN
Description
divide
Permill.divn
node_modules/@types/bn.js/index.d.ts:323
▸ egcd(b): Object
| Name | Type |
|---|---|
b |
BN |
Object
| Name | Type |
|---|---|
a |
BN |
b |
BN |
gcd |
BN |
Description
Extended GCD results ({ a: ..., b: ..., gcd: ... })
Permill.egcd
node_modules/@types/bn.js/index.d.ts:508
▸ eq(other?): boolean
| Name | Type |
|---|---|
other? |
unknown |
boolean
Description
Compares the value of the input to see if there is a match
Permill.eq
node_modules/@polkadot/types-codec/abstract/Int.d.ts:35
▸ eqn(b): boolean
| Name | Type |
|---|---|
b |
number |
boolean
Description
a equals b
Permill.eqn
node_modules/@types/bn.js/index.d.ts:208
▸ fromTwos(width): BN
| Name | Type |
|---|---|
width |
number |
BN
Description
convert from two’s complement representation, where width is the bit width
Permill.fromTwos
node_modules/@types/bn.js/index.d.ts:218
▸ gcd(b): BN
| Name | Type |
|---|---|
b |
BN |
BN
Description
GCD
Permill.gcd
node_modules/@types/bn.js/index.d.ts:503
▸ gt(b): boolean
| Name | Type |
|---|---|
b |
BN |
boolean
Description
a greater than b
Permill.gt
node_modules/@types/bn.js/index.d.ts:183
▸ gte(b): boolean
| Name | Type |
|---|---|
b |
BN |
boolean
Description
a greater than or equals b
Permill.gte
node_modules/@types/bn.js/index.d.ts:193
▸ gten(b): boolean
| Name | Type |
|---|---|
b |
number |
boolean
Description
a greater than or equals b
Permill.gten
node_modules/@types/bn.js/index.d.ts:198
▸ gtn(b): boolean
| Name | Type |
|---|---|
b |
number |
boolean
Description
a greater than b
Permill.gtn
node_modules/@types/bn.js/index.d.ts:188
▸ iabs(): BN
BN
Description
absolute value
Permill.iabs
node_modules/@types/bn.js/index.d.ts:238
▸ iadd(b): BN
| Name | Type |
|---|---|
b |
BN |
BN
Description
addition
Permill.iadd
node_modules/@types/bn.js/index.d.ts:248
▸ iaddn(b): BN
| Name | Type |
|---|---|
b |
number |
BN
Description
addition
Permill.iaddn
node_modules/@types/bn.js/index.d.ts:258
▸ iand(b): BN
| Name | Type |
|---|---|
b |
BN |
BN
Description
and
Permill.iand
node_modules/@types/bn.js/index.d.ts:389
▸ idivn(b): BN
| Name | Type |
|---|---|
b |
number |
BN
Description
divide
Permill.idivn
node_modules/@types/bn.js/index.d.ts:328
▸ imaskn(b): BN
| Name | Type |
|---|---|
b |
number |
BN
Description
clear bits with indexes higher or equal to b
Permill.imaskn
node_modules/@types/bn.js/index.d.ts:484
▸ imul(b): BN
| Name | Type |
|---|---|
b |
BN |
BN
Description
multiply
Permill.imul
node_modules/@types/bn.js/index.d.ts:288
▸ imuln(b): BN
| Name | Type |
|---|---|
b |
number |
BN
Description
multiply
Permill.imuln
node_modules/@types/bn.js/index.d.ts:298
▸ ineg(): BN
BN
Description
negate sign
Permill.ineg
node_modules/@types/bn.js/index.d.ts:228
▸ inotn(w): BN
| Name | Type |
|---|---|
w |
number |
BN
Description
not (for the width specified by w)
Permill.inotn
node_modules/@types/bn.js/index.d.ts:498
▸ inspect(): Inspect
Inspect
Description
Returns a breakdown of the hex encoding for this Codec
Permill.inspect
node_modules/@polkadot/types-codec/abstract/Int.d.ts:39
▸ invm(b): BN
| Name | Type |
|---|---|
b |
BN |
BN
Description
inverse a modulo b
Permill.invm
node_modules/@types/bn.js/index.d.ts:513
▸ ior(b): BN
| Name | Type |
|---|---|
b |
BN |
BN
Description
or
Permill.ior
node_modules/@types/bn.js/index.d.ts:369
▸ isEven(): boolean
boolean
Description
check if value is even
Permill.isEven
node_modules/@types/bn.js/index.d.ts:133
▸ isMax(): boolean
boolean
Description
True if this value is the max of the type
Permill.isMax
node_modules/@polkadot/types-codec/abstract/Int.d.ts:43
▸ isNeg(): boolean
boolean
Description
true if the number is negative
Permill.isNeg
node_modules/@types/bn.js/index.d.ts:128
▸ isOdd(): boolean
boolean
Description
check if value is odd
Permill.isOdd
node_modules/@types/bn.js/index.d.ts:138
▸ isZero(): boolean
boolean
Description
check if value is zero
Permill.isZero
node_modules/@types/bn.js/index.d.ts:143
▸ ishln(b): BN
| Name | Type |
|---|---|
b |
number |
BN
Description
shift left
Permill.ishln
node_modules/@types/bn.js/index.d.ts:439
▸ ishrn(b): BN
| Name | Type |
|---|---|
b |
number |
BN
Description
shift right (unimplemented https://github.com/indutny/bn.js/blob/master/lib/bn.js#L2086)
Permill.ishrn
node_modules/@types/bn.js/index.d.ts:459
▸ isqr(): BN
BN
Description
square
Permill.isqr
node_modules/@types/bn.js/index.d.ts:308
▸ isub(b): BN
| Name | Type |
|---|---|
b |
BN |
BN
Description
subtraction
Permill.isub
node_modules/@types/bn.js/index.d.ts:268
▸ isubn(b): BN
| Name | Type |
|---|---|
b |
number |
BN
Description
subtraction
Permill.isubn
node_modules/@types/bn.js/index.d.ts:278
▸ iuand(b): BN
| Name | Type |
|---|---|
b |
BN |
BN
Description
and
Permill.iuand
node_modules/@types/bn.js/index.d.ts:399
▸ iuor(b): BN
| Name | Type |
|---|---|
b |
BN |
BN
Description
or
Permill.iuor
node_modules/@types/bn.js/index.d.ts:379
▸ iushln(b): BN
| Name | Type |
|---|---|
b |
number |
BN
Description
shift left
Permill.iushln
node_modules/@types/bn.js/index.d.ts:449
▸ iushrn(b): BN
| Name | Type |
|---|---|
b |
number |
BN
Description
shift right
Permill.iushrn
node_modules/@types/bn.js/index.d.ts:469
▸ iuxor(b): BN
| Name | Type |
|---|---|
b |
BN |
BN
Description
xor
Permill.iuxor
node_modules/@types/bn.js/index.d.ts:424
▸ ixor(b): BN
| Name | Type |
|---|---|
b |
BN |
BN
Description
xor
Permill.ixor
node_modules/@types/bn.js/index.d.ts:414
▸ lt(b): boolean
| Name | Type |
|---|---|
b |
BN |
boolean
Description
a less than b
Permill.lt
node_modules/@types/bn.js/index.d.ts:163
▸ lte(b): boolean
| Name | Type |
|---|---|
b |
BN |
boolean
Description
a less than or equals b
Permill.lte
node_modules/@types/bn.js/index.d.ts:173
▸ lten(b): boolean
| Name | Type |
|---|---|
b |
number |
boolean
Description
a less than or equals b
Permill.lten
node_modules/@types/bn.js/index.d.ts:178
▸ ltn(b): boolean
| Name | Type |
|---|---|
b |
number |
boolean
Description
a less than b
Permill.ltn
node_modules/@types/bn.js/index.d.ts:168
▸ maskn(b): BN
| Name | Type |
|---|---|
b |
number |
BN
Description
clear bits with indexes higher or equal to b
Permill.maskn
node_modules/@types/bn.js/index.d.ts:479
▸ mod(b): BN
| Name | Type |
|---|---|
b |
BN |
BN
Description
reduct
Permill.mod
node_modules/@types/bn.js/index.d.ts:338
▸ modn(b): number
| Name | Type |
|---|---|
b |
number |
number
Deprecated
Description
reduct
Permill.modn
node_modules/@types/bn.js/index.d.ts:349
▸ modrn(b): number
| Name | Type |
|---|---|
b |
number |
number
Description
reduct
Permill.modrn
node_modules/@types/bn.js/index.d.ts:354
▸ mul(b): BN
| Name | Type |
|---|---|
b |
BN |
BN
Description
multiply
Permill.mul
node_modules/@types/bn.js/index.d.ts:283
▸ muln(b): BN
| Name | Type |
|---|---|
b |
number |
BN
Description
multiply
Permill.muln
node_modules/@types/bn.js/index.d.ts:293
▸ neg(): BN
BN
Description
negate sign
Permill.neg
node_modules/@types/bn.js/index.d.ts:223
▸ notn(w): BN
| Name | Type |
|---|---|
w |
number |
BN
Description
not (for the width specified by w)
Permill.notn
node_modules/@types/bn.js/index.d.ts:493
▸ or(b): BN
| Name | Type |
|---|---|
b |
BN |
BN
Description
or
Permill.or
node_modules/@types/bn.js/index.d.ts:364
▸ pow(b): BN
| Name | Type |
|---|---|
b |
BN |
BN
Description
raise a to the power of b
Permill.pow
node_modules/@types/bn.js/index.d.ts:313
▸ setn(b, value): BN
| Name | Type |
|---|---|
b |
number |
value |
boolean | 0 | 1 |
BN
Description
set specified bit to value
Permill.setn
node_modules/@types/bn.js/index.d.ts:429
▸ shln(b): BN
| Name | Type |
|---|---|
b |
number |
BN
Description
shift left
Permill.shln
node_modules/@types/bn.js/index.d.ts:434
▸ shrn(b): BN
| Name | Type |
|---|---|
b |
number |
BN
Description
shift right
Permill.shrn
node_modules/@types/bn.js/index.d.ts:454
▸ sqr(): BN
BN
Description
square
Permill.sqr
node_modules/@types/bn.js/index.d.ts:303
▸ sub(b): BN
| Name | Type |
|---|---|
b |
BN |
BN
Description
subtraction
Permill.sub
node_modules/@types/bn.js/index.d.ts:263
▸ subn(b): BN
| Name | Type |
|---|---|
b |
number |
BN
Description
subtraction
Permill.subn
node_modules/@types/bn.js/index.d.ts:273
▸ testn(b): boolean
| Name | Type |
|---|---|
b |
number |
boolean
Description
test if specified bit is set
Permill.testn
node_modules/@types/bn.js/index.d.ts:474
▸ toArray(endian?, length?): number[]
| Name | Type |
|---|---|
endian? |
Endianness |
length? |
number |
number[]
Description
convert to byte Array, and optionally zero pad to length, throwing if already exceeding
Permill.toArray
node_modules/@types/bn.js/index.d.ts:88
▸ toArrayLike(ArrayType, endian?, length?): Buffer
| Name | Type |
|---|---|
ArrayType |
BufferConstructor |
endian? |
Endianness |
length? |
number |
Buffer
Description
convert to an instance of type, which must behave like an Array
Permill.toArrayLike
node_modules/@types/bn.js/index.d.ts:93
▸ toArrayLike(ArrayType, endian?, length?): any[]
| Name | Type |
|---|---|
ArrayType |
any[] |
endian? |
Endianness |
length? |
number |
any[]
Permill.toArrayLike
node_modules/@types/bn.js/index.d.ts:99
▸ toBigInt(): bigint
bigint
Description
Returns a BigInt representation of the number
Permill.toBigInt
node_modules/@polkadot/types-codec/abstract/Int.d.ts:47
▸ toBn(): BN
BN
Description
Returns the BN representation of the number. (Compatibility)
Permill.toBn
node_modules/@polkadot/types-codec/abstract/Int.d.ts:51
▸ toBuffer(endian?, length?): Buffer
| Name | Type |
|---|---|
endian? |
Endianness |
length? |
number |
Buffer
Description
convert to Node.js Buffer (if available). For compatibility with browserify and similar tools, use this instead: a.toArrayLike(Buffer, endian, length)
Permill.toBuffer
node_modules/@types/bn.js/index.d.ts:108
▸ toHex(isLe?): `0x${string}`
| Name | Type |
|---|---|
isLe? |
boolean |
`0x${string}`
Description
Returns a hex string representation of the value
Permill.toHex
node_modules/@polkadot/types-codec/abstract/Int.d.ts:55
▸ toHuman(_isExpanded?): string
| Name | Type |
|---|---|
_isExpanded? |
boolean |
string
Description
Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
Permill.toHuman
node_modules/@polkadot/types-codec/abstract/Int.d.ts:59
▸ toJSON(onlyHex?): any
| Name | Type |
|---|---|
onlyHex? |
boolean |
any
Description
Converts the Object to JSON, typically used for RPC transfers
Permill.toJSON
node_modules/@polkadot/types-codec/abstract/Int.d.ts:63
▸ toNumber(): number
number
Description
convert to Javascript Number (limited to 53 bits)
Permill.toNumber
node_modules/@types/bn.js/index.d.ts:78
▸ toPrimitive(): string | number
string | number
Description
Returns the value in a primitive form, either number when <= 52 bits, or string otherwise
Permill.toPrimitive
node_modules/@polkadot/types-codec/abstract/Int.d.ts:67
▸ toRawType(): string
string
Description
Returns the base runtime type name for this instance
Permill.toRawType
node_modules/@polkadot/types-codec/abstract/Int.d.ts:71
▸ toRed(reductionContext): RedBN
| Name | Type |
|---|---|
reductionContext |
ReductionContext |
RedBN
Description
Convert number to red
Permill.toRed
node_modules/@types/bn.js/index.d.ts:518
▸ toString(base?): string
| Name | Type | Description |
|---|---|---|
base? |
number |
The base to use for the conversion |
string
Description
Returns the string representation of the value
Permill.toString
node_modules/@polkadot/types-codec/abstract/Int.d.ts:76
▸ toTwos(width): BN
| Name | Type |
|---|---|
width |
number |
BN
Description
convert to two’s complement representation, where width is bit width
Permill.toTwos
node_modules/@types/bn.js/index.d.ts:213
▸ toU8a(_isBare?): Uint8Array
| Name | Type |
|---|---|
_isBare? |
boolean |
Uint8Array
Description
Encodes the value as a Uint8Array as per the SCALE specifications
Permill.toU8a
node_modules/@polkadot/types-codec/abstract/Int.d.ts:80
▸ uand(b): BN
| Name | Type |
|---|---|
b |
BN |
BN
Description
and
Permill.uand
node_modules/@types/bn.js/index.d.ts:394
▸ ucmp(b): -1 | 0 | 1
| Name | Type |
|---|---|
b |
BN |
-1 | 0 | 1
Description
compare numbers and return -1 (a < b), 0 (a == b), or 1 (a > b) depending on the comparison result
Permill.ucmp
node_modules/@types/bn.js/index.d.ts:153
▸ umod(b): BN
| Name | Type |
|---|---|
b |
BN |
BN
Description
reduct
Permill.umod
node_modules/@types/bn.js/index.d.ts:343
▸ uor(b): BN
| Name | Type |
|---|---|
b |
BN |
BN
Description
or
Permill.uor
node_modules/@types/bn.js/index.d.ts:374
▸ ushln(b): BN
| Name | Type |
|---|---|
b |
number |
BN
Description
shift left
Permill.ushln
node_modules/@types/bn.js/index.d.ts:444
▸ ushrn(b): BN
| Name | Type |
|---|---|
b |
number |
BN
Description
shift right
Permill.ushrn
node_modules/@types/bn.js/index.d.ts:464
▸ uxor(b): BN
| Name | Type |
|---|---|
b |
BN |
BN
Description
xor
Permill.uxor
node_modules/@types/bn.js/index.d.ts:419
▸ xor(b): BN
| Name | Type |
|---|---|
b |
BN |
BN
Description
xor
Permill.xor
node_modules/@types/bn.js/index.d.ts:409
▸ zeroBits(): number
number
Description
return number of less-significant consequent zero bits (example: 1010000 has 4 zero bits)
Permill.zeroBits
node_modules/@types/bn.js/index.d.ts:118