utils/index
Last updated
Was this helpful?
Last updated
Was this helpful?
▸ areSameAddress(a
: string, b
: string): boolean
Check if two addresses correspond to the same wallet
Parameters:
Name
Type
a
string
b
string
Returns: boolean
▸ checkStringLength(value
: string, variableName
: string, opts
: object): void
Check the length of a given string to ensure it meets correct bounds
Parameters:
▪ value: string
the string itself
▪ variableName: string
the name of the variable associated to the string itself
▪Default value
opts: object= { maxLength: 32 }
optional min and max length of the string. Defaults to a minimum of 0 (empty string) and a maximum of 32 characters
Name
Type
maxLength
number
minLength?
undefined | number
Returns: void
▸ convertVersionToEnum(versionBigNumber
: BigNumber[]): V3_0_0 | V3_1_0
Convert a version number array into a string of type [[Version]]
Parameters:
Name
Type
versionBigNumber
BigNumber[]
Returns: V3_0_0 | V3_1_0
Const
delay▸ delay(amount
: number): Promise‹Object›
Promisified version of a timeout
Parameters:
Name
Type
Description
amount
number
time to wait
Returns: Promise‹Object›
Defined in
Defined in
Defined in
Defined in