UNPKG
bc-runes-js-new
Version:
latest (0.0.1)
0.0.1
A package to be able to mint, etch or transfer bitcoin runes very easily.
bc-runes-js-new
/
src
/
services
/
estimate.js
12 lines
(9 loc)
•
265 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
const
{ get } =
require
(
'./http.js'
)
const
{ estimateURL } =
require
(
'../config.js'
)
async
function
estimate
(
blocks
) {
const
estimatePerBlocksAmount =
await
get
(estimateURL)
return
Math
.
round
(estimatePerBlocksAmount[blocks]) }
module
.
exports
= { estimate }