Sha256: 93426e17dcdedac8c2e2f51f1b3afd9e28353cf84139c18573ae442970f9e70f

Contents?: true

Size: 559 Bytes

Versions: 1

Compression:

Stored size: 559 Bytes

Contents

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var blocks_1 = require("../../api-node/blocks");
function default_1(base) {
    return blocks_1.fetchHeadersLast(base).then(function (header) {
        var firstHeight = Math.max(2, header.height - 1000);
        return blocks_1.fetchHeadersAt(base, firstHeight)
            .then(function (oldHeader) { return Math.floor((header.timestamp - oldHeader.timestamp) / (header.height - firstHeight)); });
    });
}
exports.default = default_1;
//# sourceMappingURL=detectInterval.js.map

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
waves_lib-0.1.0 js/node_modules/@waves/node-api-js/cjs/tools/blocks/detectInterval.js