Dogecoin RPC
How to use it
// yarn add @tatumio/tatum
import { TatumSDK, Dogecoin, Network } from '@tatumio/tatum'
const tatum = await TatumSDK.init<Dogecoin>({ network: Network.DOGECOIN })
const result = await tatum.rpc.estimateSmartFee(20)
await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs
Overview
The estimatesmartfee
method provides an estimated fee rate (in DOGE/kB) for a transaction to be confirmed within a certain number of blocks. The estimation is based on recent transactions in the Dogecoin network.
This method can be useful for users or applications trying to decide on an appropriate fee for their transactions, based on the desired confirmation speed.
Parameters
The estimatesmartfee
method accepts the following parameters:
conf_target
: An integer representing the number of blocks within which the transaction should be confirmed.
Return Object
The estimatesmartfee
method returns an object containing the following fields:
feerate
: A decimal number representing the estimated fee rate in DOGE/kB.blocks
: An integer representing the number of blocks within which the transaction is expected to be confirmed.
JSON Examples
Request example:
{
"jsonrpc": "2.0",
"method": "estimatesmartfee",
"params": [20],
"id": 1
}
Response example:
{
"result": {
"feerate": 0.00017258,
"blocks": 20
},
"error": null,
"id": 1
}