- Preparing search index...
- The search index is not available
sotez
Constructors
constructor
- new AbstractTezModule(provider: string, chain?: string, debugMode?: boolean): AbstractTezModule
-
Parameters
-
provider: string
-
chain: string = 'main'
-
debugMode: boolean = false
Properties
_debugMode
_debugMode: boolean
_provider
_provider: string
Accessors
chain
- get chain(): string
-
Returns string
- set chain(value: string): void
-
Returns void
debugMode
- get debugMode(): boolean
-
Returns boolean
- set debugMode(value: boolean): void
-
Returns void
provider
- get provider(): string
-
Returns string
- set provider(provider: string): void
-
Returns void
Methods
query
- query(path: string, payload?: any, method?: string): Promise<any>
-
Parameters
-
path: string
-
Optional
payload: any
-
Optional
method: string
Returns Promise<any>
setProvider
- setProvider(provider: string, chain?: string): void
-
Parameters
-
provider: string
-
chain: string = ...
Returns void
Description
Queries a node given a path and payload
Returns
The response of the query
Example
sotez.query(
/chains/main/blocks/head
) .then(head => console.log(head));