@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
- getApiHost
- getApiKey
- getIdentityApiHost
- getNetworkConfiguration
- setApiHost
- setApiKey
- setContractAddress
- setIdentityApiHost
- setProvider
Constructors
constructor
• new Bloock(): Bloock
Creates a new instance of Bloock instance.
Returns
Defined in
Properties
apiHost
• Private
Optional
apiHost: string
Defined in
apiKey
• Private
Optional
apiKey: string
Defined in
identityApiHost
• Private
Optional
identityApiHost: string
Defined in
networksConfig
• Private
Optional
networksConfig: Object
Index signature
▪ [key: number
]: NetworkConfigProto
Defined in
instance
▪ Static
Private
instance: Bloock
Defined in
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
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
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
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
setApiHost
▸ setApiHost(host
): void
Sets the host used for API communication with the Bloock SDK.
Parameters
Name | Type |
---|---|
host | string |
Returns
void
Defined in
setApiKey
▸ setApiKey(apiKey
): void
Sets the API key used for authentication with the Bloock SDK.
Parameters
Name | Type |
---|---|
apiKey | string |
Returns
void
Defined in
setContractAddress
▸ setContractAddress(network
, contractAddress
): void
Sets the contract address for the specified network in the Bloock SDK configuration.
Parameters
Name | Type |
---|---|
network | Network |
contractAddress | string |
Returns
void
Defined in
setIdentityApiHost
▸ setIdentityApiHost(identityApiHost
): void
Sets the host URL used for Identity Managed API.
Parameters
Name | Type |
---|---|
identityApiHost | string |
Returns
void
Defined in
setProvider
▸ setProvider(network
, provider
): void
Sets the HTTP provider for the specified network in the Bloock SDK configuration.
Parameters
Name | Type |
---|---|
network | Network |
provider | string |
Returns
void