Leprechaun avatar

Day Four: In Depth Research into Hive Engine & Typescript

leprechaun

Published: 11 May 2021 › Updated: 11 May 2021Day Four: In Depth Research into Hive Engine & Typescript

Day Four: In Depth Research into Hive Engine & Typescript

Here get a list of my coarse list of transfers:
https://accounts.hive-engine.com/accountHistory?account=leprechaun&limit=50&offset=100&symbol=POB

Here get a list of my fine list of transfers:
https://scot-api.hive-engine.com/get_account_history?account=leprechaun&token=POB&limit=50&offset=100

The Current POB merges these together. These lists have distinct types and it might make sense to have both and switch between one and the other. The coarse view is good for seeing how much I earned over the month but it's bad for seeing whether I earned anything on curation from eight days ago.

The Typescript language used by Ecency gives you an idea how the data structure is going to be before you run it for the first time. So, I'm combining the typescript with Hive Engine. It looks like I'll have something for displaying POB transactions first.

export interface HEFineTransaction {
    account    : string;
    author    : string;
    id    : number;
    // in satoshis
    int_amount    : number;
    permlink    : string;
    // For POB always 8
    precision    : number;
    // Iso string date
    timestamp    : string;
    // POB
    token    : string;
    trx    :  string| null;
    type    : string;
}


export interface HEAuthorReward extends HEFineTransaction {
    trx    : null;
    type    : "author_reward";
}

export interface HECurationReward extends HEFineTransaction {
    curator : string;
    trx: null;
    type: "curation_reward";
}

With fine transactions you get numeric values in satoshis, so if you got 1 POB for curation reward it will be listed as 100,000,000!


Leave Day Four: In Depth Research into Hive Engine & Typescript to:

Written by

An Economist, a Coder and a Carbonist. Author of https://Steemfiles.com, Author of https://ProofofBrain.blog Carbonist community admin (https://www.proofofbrain.blog/created/hive-139995). Discord: leprechaun#2185 Email: theleprechaun2022@steemfiles.com Lover of freedom

Read more #proofofbrain posts


Best Posts From Leprechaun

We have not curated any of leprechaun's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From Leprechaun