dBlurt v0.9.7 update + some BLURT blockchain stats

in blurt-101010 •  last year 

image


Hi devs & Blurtians,

Still in my goal to provide a maximum of resources to people who want to develop dApps on BLURT, I decided to include in the dBlurt library a tool class.

As a reminder, dBlurt is a client library for connecting to the Blurt blockchain, making queries and broadcasting transactions. More info on this post: Blurt blockchain client library compatible Nexus

I thought it would be a good idea to start with the ones I use to calculate the remaining mana of an account as well as the vote value of a post. So I extracted these functions that I use in the BeBlurt application. Please note that I didn't invent anything and it's basically functions present in Condenser (if I don't say wrong the credit goes to @saboin) that I just refactored and adapted for Typescript.

This class works like the others, here is a basic example of how to calculate the value of a vote:


/** import the dblurt library */
import { Client } from "@beblurt/dblurt";

/** Create the client */
const client = new Client([
    "https://rpc.beblurt.com",
    "https://rpc.blurt.world",
    "https://blurt-rpc.saboin.com"
], { timeout: 1500 });

/** Retrieve the blockchain information needed */
const DGP = await client.condenser.getDynamicGlobalProperties()
const REWARD_FUND = await client.condenser.getRewardFund('post')

/** Retrieve the mana left (including the regeneration) of the voter */
const MANA = await client.tools.getAccountMana("nalexadre")

/**
 *  Retrieve the vote value 
 *  We need:
 *  - voteWeight: number (eg. 100 for 100%)
 *  - MANA: previously retrieved
 *  - net_rshares: Post to upvote property
 *  - cashout_time: Post to upvote property
 *  - DGP: previously retrieved
 *  - REWARD_FUND: previously retrieved
 */
client.tools.getAccountVoteValue(
     voteWeight,
     MANA,
     net_rshares,
     cashout_time,
     DGP,
     REWARD_FUND
).then(voteValue => console.log("vote value for the post", voteValue, "BLURT"))

The documentation at the address https://dblurt.beblurt.com/classes/tools.html has also been updated


dblurt is available on:

gitlab: https://gitlab.com/beblurt/dblurt
npm: https://www.npmjs.com/package/@beblurt/dblurt
and a documentation generated using TypeDoc is available at https://dblurt.beblurt.com/


November Stats

Today I'm not going to leave you with a teasing on the progress of the BeBlurt application, an update post should be done on Friday on the @beblurt account, but rather with some BLURT stats from the previous month ;)

First of all let's talk about my Witness, this one has registered in the BLURT blockchain 26,691 Blocks with a failure rate of 0% (0 block missed) and has generated 10,817.216 BLURT in November.

It's $34.669 at the current BLURT price (https://www.coingecko.com/en/coins/blurt) and this is far from paying for even the cost of my 2 server (witness + RPC) hahaha

But let's talk about the fun stuff, in November there were 268,064 operations registered in the BLURT blockchain including (but not all)

  • 189,991 votes operation
  • 29,965 comments operation (including 14,521 posts)
  • 680 power up operation
  • 244 power down operation
  • 576 witness votes operation

The 14,521 posts are divided per dApp as follows:

  • Blurt frontend: 9,871
  • Actifit: 2,235
  • Blurtlatam: 924
  • Dtube: 782
  • Not defined: 366
  • Beem: 100
  • boylikegirl: 61 (china)
  • BlurtOne: 32
  • ...

Maybe when I have a little more time I'll do something more developed.


Witnesses

You are not a dev but still want to support the development on Blurt? It's easy and it doesn't cost you anything!

Just vote for my witness @nalexadre here:
https://blurtwallet.com/~witnesses?highlight=nalexadre
or here https://beblurt.com/@nalexadre/witness

And/or for the many other developers on Blurt with a Witness ;)


Have fun
@nalexadre


Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE BLURT!
Sort Order:  

Can you please hurry up with that IOS app?? My daughter isn't returning to Blurt, unless her Iphone gets an app! ;D

Where I can send you my IBANN for the bank transfer 😂 More seriously I suggest you check the last post of @beblurt for an answer to your question.

I don't understand this interest for the Iphone, for my part it's been a long time since I switched to android.

Congratulations!

You have recieved a coconutty upvote! 🥥
Thank you for contributing to the Blurt Blockchain!
Keep up the great work!

Curated by @outofthematrix!

Please take a moment to vote for my witness! 🗳️ https://blurtwallet.com/~witnesses?highlight=outofthematrix


curationcoconut.jpg

Good job, i see that the future is bright for the blurt family

If you copied the math from Condenser, it should be accurate. I copied the math from Blurtd when I wrote the code for calculating the vote value.

I have an API for the price info on BLURT. It calculates the average from Coingecko, Hive-Engine, and Ionomy. You can call it at https://api.blurt.world/price_info

The code I run for that is here: https://gitlab.com/blurt/openblurt/blurt-price-info-api

Yep I took it 2 month ago in Condenser. It's what I learned few days before on Discord that you took the time to investigate the core code for the math 👍

Thanks for the feed price API, I will use it :)

Friday💃

"It's $34.669 at the current BLURT price (https://www.coingecko.com/en/coins/blurt) and this is far from paying for even the cost of my 2 server (witness + RPC)"

Since you're running 2 servers, it may not easy to cover the server cost even you're in top 20. But it's very bad for the witnesses who are outside the top 20 list.

As I don't want selling any BURT before it came back to $0.03 it's not a loose yet hahaha but yes for witness who can't run a server as investment it's really bad, I hope 2023 will be better for them with a better BLURT price

I also don't have a plan to sell any before reaching at least the previous price.🚀😃. Until then try to use my own money to run the servers whether it's profitable or not.