@blockfrost/blockfrost-js
Version:
A JavaScript/TypeScript SDK for interacting with the https://blockfrost.io API
21 lines (20 loc) • 482 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.root = void 0;
const errors_1 = require("../../../utils/errors");
/**
* Obtains backend version number.
*
* @returns Backend version in a format `{ url: string; version: string }`
*
*/
async function root() {
try {
const res = await this.instance(``);
return res.body;
}
catch (error) {
throw (0, errors_1.handleError)(error);
}
}
exports.root = root;