utils/index

Index

Interfaces

Functions

Functions

areSameAddress

areSameAddress(a: string, b: string): boolean

Defined in src/utils/index.ts:57

Check if two addresses correspond to the same wallet

Parameters:

Name

Type

a

string

b

string

Returns: boolean

checkStringLength

checkStringLength(value: string, variableName: string, opts: object): void

Defined in src/utils/index.ts:68

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

convertVersionToEnum(versionBigNumber: BigNumber[]): V3_0_0 | V3_1_0

Defined in src/utils/index.ts:296

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›

Defined in src/utils/index.ts:46

Promisified version of a timeout

Parameters:

Name

Type

Description

amount

number

time to wait

Returns: Promise‹Object›

Last updated