Skip to main content

@bloock/sdk / Bloock

Class: Bloock

Provides a centralized configuration for the Bloock SDK library. For information about Bloock SDK in Go, see https://bloock.com.

Table of contents​

Constructors​

Properties​

Methods​

Constructors​

constructor​

• new Bloock(): Bloock

Creates a new instance of Bloock instance.

Returns​

Bloock

Defined in​

bloock.ts:21

Properties​

apiHost​

• Private Optional apiHost: string

Defined in​

bloock.ts:13


apiKey​

• Private Optional apiKey: string

Defined in​

bloock.ts:11


identityApiHost​

• Private Optional identityApiHost: string

Defined in​

bloock.ts:12


networksConfig​

• Private Optional networksConfig: Object

Index signature​

▪ [key: number]: NetworkConfigProto

Defined in​

bloock.ts:14


instance​

▪ Static Private instance: Bloock

Defined in​

bloock.ts:10

Methods​

getApiHost​

▸ getApiHost(): undefined | string

Is a string variable representing the host URL used for API communication with the Bloock SDK.

Returns​

undefined | string

Defined in​

bloock.ts:75


getApiKey​

▸ getApiKey(): undefined | string

Is a string variable representing the API key used for authentication with the Bloock SDK, create here.

Returns​

undefined | string

Defined in​

bloock.ts:31


getIdentityApiHost​

▸ getIdentityApiHost(): undefined | string

Is a string variable representing the host URL used for Identity Managed API, required to be set for identity-related features of the Bloock SDK.

Returns​

undefined | string

Defined in​

bloock.ts:53


getNetworkConfiguration​

▸ getNetworkConfiguration(): undefined | { [key: number]: NetworkConfigProto; }

Is a variable that holds network configurations associated with specific network IDs in the Bloock SDK.

Returns​

undefined | { [key: number]: NetworkConfigProto; }

Defined in​

bloock.ts:97


setApiHost​

▸ setApiHost(host): void

Sets the host used for API communication with the Bloock SDK.

Parameters​

NameType
hoststring

Returns​

void

Defined in​

bloock.ts:86


setApiKey​

▸ setApiKey(apiKey): void

Sets the API key used for authentication with the Bloock SDK.

Parameters​

NameType
apiKeystring

Returns​

void

Defined in​

bloock.ts:42


setContractAddress​

▸ setContractAddress(network, contractAddress): void

Sets the contract address for the specified network in the Bloock SDK configuration.

Parameters​

NameType
networkNetwork
contractAddressstring

Returns​

void

Defined in​

bloock.ts:134


setIdentityApiHost​

▸ setIdentityApiHost(identityApiHost): void

Sets the host URL used for Identity Managed API.

Parameters​

NameType
identityApiHoststring

Returns​

void

Defined in​

bloock.ts:64


setProvider​

▸ setProvider(network, provider): void

Sets the HTTP provider for the specified network in the Bloock SDK configuration.

Parameters​

NameType
networkNetwork
providerstring

Returns​

void

Defined in​

bloock.ts:111