Giter Site home page Giter Site logo

dappforce / subsocial-js Goto Github PK

View Code? Open in Web Editor NEW
28.0 3.0 16.0 4.38 MB

JavaScript SDK for Subsocial blockchain.

Home Page: https://docs.subsocial.network/docs/develop

License: GNU General Public License v3.0

JavaScript 1.29% TypeScript 98.45% Shell 0.13% HTML 0.01% Dockerfile 0.05% CSS 0.08%
dappforce subsocial substrate polkadot polkadot-network polkadot-js kusama kusama-network npm javascript-libs

subsocial-js's Introduction

maintainability

Subsocial JS SDK by DappForce

Subsocial's JS SDK is a library for building social networking applications on top of the Subsocial blockchain. The library will help developers easily interact with the Subsocial blockchain from their UI, without prior knowledge of Subsocial’s pallet implementations. Inside the library, you will find the APIs required to perform different operations on the blockchain, which are detailed here.

What is Subsocial?

Subsocial provides the back-end tech, allowing for easy deployment of decentralized social dapps that share a social graph and content base. Users own their content and social connections on Subsocial, which automatically solves most of the problems of web2 social networks. Applications built on Subsocial do not have to be specifically focused on social networking, as Subsocial can support dapps like YouTube, Shopify, or even Airbnb. You can learn more about Subsocial by reading the lightpaper.

Docs & Tools

  • Subsocial Starter – a React app template that helps you start building on Subsocial. It uses the SDK and hides away the boilerplate code and boring configuration.
  • SDK cheatsheet – a short description of the most commonly used methods of the SDK.
  • TypeDoc API – detailed documentation of the SDK where you can learn about all its methods, parameters, and interfaces; API references (Subsocial and Substrate API); JS objects; and more.
  • Playground – an easy-to-use web app to experiment with Subsocial’s SDK. You can run different code samples and see the execution results.

Need Help?

In case you need help, the best way to reach us is through our Subsocial Devs Telegram chat or #developers channel on our Discord server.

License

Subsocial JS SDK is GPL 3.0 licensed.

subsocial-js's People

Contributors

antryas avatar dependabot[bot] avatar f3joule avatar ical10 avatar ifedorchenko avatar mckrava avatar olehmell avatar omidasadpour avatar samchuk-vlad avatar siman avatar subsocialdev avatar teodorus-nathaniel avatar tusharojha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

subsocial-js's Issues

Node 17, deprecation `main field` warning package.json

rel: @substrate/api-sidecar#771

The warning was found when running substrate-api-sidecar with @polkadot/[email protected].

2021-11-23 12:07:47 error: (node:20453) [DEP0128] DeprecationWarning: Invalid 'main' field in '/Users/aggron/dev/parity/substrate-api-sidecar/node_modules/@subsocial/utils/package.json' of 'build/index.js'. Please either fix that or report it to the module author

Sidecar: v11.3.1
Node: v17 and up.

Being that Node v16 is the Active LTS right now, and 17 is Current I don't think it's a major problem, but I thought it was worth documenting.

Try to cache things required by Polkadot API when connecting to the chain

Currently, Polkadot API spends over 5 seconds to connect to Substrate + retrieve initially required info about with several API requests from a chain and parse metadata. We need to speed up this setup process.

Jaco:

There is a lot of things it needs to do to get ready with the metadata.

it needs:

  • all the metadata
  • needs the genesis info
  • needs to latest info
  • needs the runtime versions
  • needs to tie all this together

You only know if things have not changed by retrieving what is on-chain. So you can skip metadata retrieval, for instance, you can pass the metadata.
(based on genesis hash and spec version)

you can pass the metadata if you want to use it that way. (Indexed by hash and version)

Code responsible for parsing / setting metadata:

https://github.com/polkadot-js/api/blob/master/packages/api/src/base/Init.ts#L171-L175

Improve CID validation in JS

Don't check for CID length.
Just try to create a new CID( /* string | buffer */ ) in a try/catch and if it doesn't fail, then this string or buffer/array represents a valid CID.

Can't receive blocks

Use polkadot api, I am triing to receive blocks from subsocial-parachain for subquery, but receive such error.

Unable to retrieve the specified block details. -32603: Unknown error occurred: Client, Application, UnknownBlock, State already discarded for BlockId::Hash, 0x4a12be580bb959937a1c7a61d5cf24428ed67fa571974b4007645d1886e7c89f
https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpara.subsocial.network#/explorer/query/1

I can receive only blocks from last two hours. Can I receive older blocks?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.