Helper

The util module

Methods

(inner) createClient(path, chainId, accessKeyId, secretAccessKey) → {object}

Create an instance of ApiClient and AccessOptions.

Parameters:
Name Type Description
path string

The target url of KAS to use.

chainId number | string

The chain id of network to connect with.

accessKeyId string

The access key id.

secretAccessKey string

The secret access key.

Returns:
Type
object

(inner) formatDate(date) → {Date}

Create an instance of Date.

Parameters:
Name Type Description
date number | string | Date

The date to format.

Returns:
Type
Date

(inner) formatObjectKeyWithoutUnderscore(obj) → {object}

Format object key without underscore.

Parameters:
Name Type Description
obj object

The object to format

Returns:
Type
object

(inner) addUncompressedPublickeyPrefix(pub) → {string}

Format uncompressed public key with 04 prefix. If public key is compressed format, return without precessing.

Parameters:
Name Type Description
pub string

The public key to format.

Returns:
Type
string

(inner) formatAccountKey(accountKey) → {object}

Format uncompressed public key in accountKey with 04 prefix.

Parameters:
Name Type Description
accountKey object

The account key to format.

Returns:
Type
object