Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

decentium

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

decentium

JavaScript library for interacting with Decentium

  • 1.1.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

decentiumjs Package Version

JavaScript library for interacting with the decentralized publishing platform Decentium.

Installing

With Yarn:

yarn add decentium

With NPM:

npm install --save decentium

Example

Fetch the top post in a category and render it as HTML to stdout using Node.js:

const {ApiClient, EosjsDataProvider, render} = require('decentium')
const {JsonRpc} = require('eosjs')
const fetch = require('node-fetch')

const rpc = new JsonRpc('https://eos.greymass.com', {fetch})
const dataProvider = new EosjsDataProvider(rpc)
const client = new ApiClient({dataProvider})

async function main() {
    const trending = await client.getTrending({category: 'art', limit: 1})
    const post = await client.resolvePost(trending.posts[0])
    console.log(render(post.doc))
}

main().catch((error) => console.warn(error))

FAQs

Package last updated on 07 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc