feat: added endpoint for receiving gas limits from OB

This commit is contained in:
Mikhail Gladchenko
2024-02-27 09:17:16 +00:00
parent 60a22f86fb
commit a4e2f5cb31
2 changed files with 8 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@orionprotocol/sdk",
"version": "0.20.60",
"version": "0.20.61-rc100",
"description": "Orion Protocol SDK",
"main": "./lib/index.cjs",
"module": "./lib/index.js",

View File

@@ -111,6 +111,7 @@ class BlockchainService {
this.getBlockNumber = this.getBlockNumber.bind(this);
this.getRedeemOrderBySecretHash = this.getRedeemOrderBySecretHash.bind(this);
this.claimOrder = this.claimOrder.bind(this);
this.getGasLimits = this.getGasLimits.bind(this);
}
get basicAuthHeaders() {
@@ -484,6 +485,12 @@ class BlockchainService {
body: JSON.stringify(secretHashes),
},
);
getGasLimits = () => fetchWithValidation(
`${this.apiUrl}api/baseLimits`,
z.record(z.number()),
{ headers: this.basicAuthHeaders }
);
}
export * as schemas from './schemas/index.js';