zilswap-sdk / Exports / utils
▸ Const
contractInitToMap(params
): Object
Converts Value[]
array to map of string values.
Value.type
is ignored, all values are returned as string.
sample input:
[{
name: 'address',
type: 'ByStr20',
value: '0xbadbeef',
}, {
name: 'balance',
type: 'UInt28',
value: '100000000',
}]
output:
{
address: '0xbadbeef',
balance: '100000000',
}
Name | Type | Description |
---|---|---|
params |
Value [] |
parameters in Value[] array representation |
Object
mapped object representation - refer to sample output
▸ Const
isLocalStorageAvailable(): boolean
boolean
▸ Const
toPositiveQa(input
, unitOrDecimals
): BN
Name | Type |
---|---|
input |
string | number | BN |
unitOrDecimals |
number | Zil | Li | Qa |
BN
▸ Const
unitlessBigNumber(str
): BigNumber
Name | Type |
---|---|
str |
string |
BigNumber