mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-25 23:27:41 +03:00
Added OB getBlockNumber method
This commit is contained in:
@@ -82,6 +82,8 @@ class OrionBlockchain {
|
||||
this.getTargetAtomicSwapHistory = this.getTargetAtomicSwapHistory.bind(this);
|
||||
this.checkPoolInformation = this.checkPoolInformation.bind(this);
|
||||
this.checkIfHashUsed = this.checkIfHashUsed.bind(this);
|
||||
this.getQueueLength = this.getQueueLength.bind(this);
|
||||
this.getBlockNumber = this.getBlockNumber.bind(this);
|
||||
}
|
||||
|
||||
get orionBlockchainWsUrl() {
|
||||
@@ -190,6 +192,10 @@ class OrionBlockchain {
|
||||
);
|
||||
}
|
||||
|
||||
getBlockNumber() {
|
||||
return fetchWithValidation(`https://${this.apiUrl}/api/blocknumber`, z.number().int());
|
||||
}
|
||||
|
||||
getQueueLength() {
|
||||
return fetchWithValidation(`https://${this.apiUrl}/api/queueLength`, z.number().int());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user