ProofServerClient
Midnight.js API Reference v2.0.2
Midnight.js API Reference / @midnight-ntwrk/midnight-js-testing / ProofServerClient
Class: ProofServerClient
Constructorsβ
Constructorβ
new ProofServerClient(
proofServer,logger):ProofServerClient
Creates an instance of ProofServerClient.
Parametersβ
proofServerβ
string
The URL of the proof server service.
loggerβ
Logger
The logger instance for logging information.
Returnsβ
ProofServerClient
Propertiesβ
proofServerβ
readonlyproofServer:string
Methodsβ
health()β
health():
Promise<void|AxiosResponse<any,any>>
Checks the health status of the indexer service. Makes a GET request to the status endpoint of the indexer service.
Returnsβ
Promise<void | AxiosResponse<any, any>>
A promise that resolves to the response of the health check or logs an error if the request fails.
proveTx()β
proveTx(
data?,config?):Promise<void|AxiosResponse<any,any>>
Proves a transaction by sending a POST request to the proof server.
Parametersβ
data?β
ArrayBuffer
serialized transaction data
config?β
AxiosRequestConfig = ...
Axios request configuration
Returnsβ
Promise<void | AxiosResponse<any, any>>