Browse Source

Merge pull request #1581 from metmirr/content-directory-mappings

Content directory mappings
Mokhtar Naamani 4 years ago
parent
commit
c0968e4964
100 changed files with 141 additions and 2206 deletions
  1. 0 104
      SUMMARY.md
  2. 0 2
      cli/bin/README.md
  3. 0 6
      cli/bin/run.md
  4. 0 2
      docs/README.md
  5. 0 2
      docs/using-docker/README.md
  6. 0 19
      pioneer/BOUNTIES.md
  7. 0 124
      pioneer/CHANGELOG.md
  8. 0 45
      pioneer/CONTRIBUTING.md
  9. 0 2
      pioneer/packages/README.md
  10. 0 23
      pioneer/packages/app-123code.md
  11. 0 2
      pioneer/packages/app-accounts/src/README.md
  12. 0 2
      pioneer/packages/app-accounts/src/md/README.md
  13. 0 2
      pioneer/packages/app-address-book/src/README.md
  14. 0 2
      pioneer/packages/app-address-book/src/md/README.md
  15. 0 2
      pioneer/packages/app-claims.md
  16. 0 2
      pioneer/packages/app-contracts/src/README.md
  17. 0 2
      pioneer/packages/app-contracts/src/md/README.md
  18. 0 2
      pioneer/packages/app-council.md
  19. 0 23
      pioneer/packages/app-dashboard.md
  20. 0 2
      pioneer/packages/app-democracy/src/README.md
  21. 0 2
      pioneer/packages/app-democracy/src/md/README.md
  22. 0 2
      pioneer/packages/app-explorer.md
  23. 0 2
      pioneer/packages/app-extrinsics.md
  24. 0 4
      pioneer/packages/app-generic-asset.md
  25. 0 2
      pioneer/packages/app-js.md
  26. 0 2
      pioneer/packages/app-parachains.md
  27. 0 2
      pioneer/packages/app-settings/src/README.md
  28. 0 2
      pioneer/packages/app-settings/src/md/README.md
  29. 0 2
      pioneer/packages/app-staking/src/README.md
  30. 0 2
      pioneer/packages/app-staking/src/md/README.md
  31. 0 2
      pioneer/packages/app-storage.md
  32. 0 2
      pioneer/packages/app-sudo.md
  33. 0 2
      pioneer/packages/app-toolbox.md
  34. 0 4
      pioneer/packages/app-transfer.md
  35. 0 2
      pioneer/packages/app-treasury/src/README.md
  36. 0 2
      pioneer/packages/app-treasury/src/md/README.md
  37. 0 4
      pioneer/packages/apps-routing.md
  38. 0 2
      pioneer/packages/apps.md
  39. 0 2
      pioneer/packages/joy-election.md
  40. 0 4
      pioneer/packages/joy-forum.md
  41. 0 4
      pioneer/packages/joy-help.md
  42. 0 4
      pioneer/packages/joy-media.md
  43. 0 2
      pioneer/packages/joy-members.md
  44. 0 2
      pioneer/packages/joy-pages/src/README.md
  45. 25 19
      pioneer/packages/joy-pages/src/md/Privacy.md
  46. 0 2
      pioneer/packages/joy-pages/src/md/README.md
  47. 14 14
      pioneer/packages/joy-pages/src/md/ToS.md
  48. 0 85
      pioneer/packages/joy-pages/src/md/privacy.md
  49. 0 40
      pioneer/packages/joy-pages/src/md/tos.md
  50. 0 2
      pioneer/packages/joy-proposals.md
  51. 0 2
      pioneer/packages/joy-roles.md
  52. 0 41
      pioneer/packages/joy-settings.md
  53. 0 2
      pioneer/packages/joy-storage.md
  54. 0 2
      pioneer/packages/joy-utils.md
  55. 0 6
      pioneer/packages/react-api.md
  56. 0 6
      pioneer/packages/react-components.md
  57. 0 6
      pioneer/packages/react-params.md
  58. 0 43
      pioneer/packages/react-query.md
  59. 0 6
      pioneer/packages/react-signer.md
  60. 59 0
      query-node/.env
  61. 43 0
      query-node/README.md
  62. 0 0
      query-node/bootstrap/index.ts
  63. 0 0
      query-node/bootstrap/members.ts
  64. 0 0
      query-node/bootstrap/package-lock.json
  65. 0 0
      query-node/bootstrap/package.json
  66. 0 0
      query-node/bootstrap/tsconfig.json
  67. 0 20
      query-node/docs/README.md
  68. 0 19
      query-node/docs/architecture.md
  69. 0 140
      query-node/docs/entity-relationship.md
  70. 0 0
      query-node/docs/indexer.md
  71. 0 53
      query-node/docs/install-hydra.md
  72. 0 73
      query-node/docs/manifest-spec.md
  73. 0 51
      query-node/docs/mappings/README.md
  74. 0 41
      query-node/docs/mappings/databasemanager.md
  75. 0 31
      query-node/docs/mappings/substrateevent.md
  76. 0 106
      query-node/docs/quick-start.md
  77. 0 15
      query-node/docs/schema-spec.md
  78. 0 16
      query-node/docs/schema-spec/README.md
  79. 0 51
      query-node/docs/schema-spec/entities.md
  80. 0 144
      query-node/docs/schema-spec/entity-relationship.md
  81. 0 17
      query-node/docs/schema-spec/enums.md
  82. 0 55
      query-node/docs/schema-spec/full-text-queries.md
  83. 0 43
      query-node/docs/schema-spec/interfaces.md
  84. 0 57
      query-node/docs/schema-spec/the-query-goodies.md
  85. 0 54
      query-node/docs/schema-spec/variant-types.md
  86. 0 2
      query-node/examples/README.md
  87. 0 2
      query-node/examples/kusama-query-node.md
  88. 0 11
      query-node/examples/kusama-query-node/.env
  89. 0 1
      query-node/examples/kusama-query-node/README.md
  90. BIN
      query-node/examples/kusama-query-node/mappings/.DS_Store
  91. 0 1
      query-node/examples/kusama-query-node/mappings/index.ts
  92. 0 2
      query-node/examples/kusama-query-node/mappings/treasury/index.ts
  93. 0 47
      query-node/examples/kusama-query-node/mappings/treasury/proposal.ts
  94. 0 77
      query-node/examples/kusama-query-node/mappings/treasury/tip.ts
  95. 0 11
      query-node/examples/kusama-query-node/package.json
  96. 0 57
      query-node/examples/kusama-query-node/schema.graphql
  97. 0 145
      query-node/joystream-query-node.md
  98. 0 12
      query-node/joystream-query-node/.env
  99. 0 145
      query-node/joystream-query-node/README.md
  100. 0 1
      query-node/joystream-query-node/mappings/index.ts

+ 0 - 104
SUMMARY.md

@@ -1,104 +0,0 @@
-# Table of contents
-
-* [Joystream](README.md)
-* [README](pioneer/README.md)
-  * [packages](pioneer/packages/README.md)
-    * [@polkadot/apps-routing](pioneer/packages/apps-routing.md)
-    * [@polkadot/app-explorer](pioneer/packages/app-explorer.md)
-    * [@polkadot/app-democracy](pioneer/packages/app-democracy/README.md)
-      * [src](pioneer/packages/app-democracy/src/README.md)
-        * [md](pioneer/packages/app-democracy/src/md/README.md)
-          * [basic](pioneer/packages/app-democracy/src/md/basic.md)
-    * [@polkadot/app-toolbox](pioneer/packages/app-toolbox.md)
-    * [@polkadot/app-address-book](pioneer/packages/app-address-book/README.md)
-      * [src](pioneer/packages/app-address-book/src/README.md)
-        * [md](pioneer/packages/app-address-book/src/md/README.md)
-          * [Address book](pioneer/packages/app-address-book/src/md/basic.md)
-    * [Forum module for Joystream node](pioneer/packages/joy-forum.md)
-    * [Proposals module for Joystream node](pioneer/packages/joy-proposals.md)
-    * [@polkadot/app-123code](pioneer/packages/app-dashboard.md)
-    * [@polkadot/app-treasury](pioneer/packages/app-treasury/README.md)
-      * [src](pioneer/packages/app-treasury/src/README.md)
-        * [md](pioneer/packages/app-treasury/src/md/README.md)
-          * [Treasury](pioneer/packages/app-treasury/src/md/basic.md)
-    * [@polkadot/app-settings](pioneer/packages/app-settings/README.md)
-      * [src](pioneer/packages/app-settings/src/README.md)
-        * [md](pioneer/packages/app-settings/src/md/README.md)
-          * [basics](pioneer/packages/app-settings/src/md/basics.md)
-    * [Media content module for Joystream node](pioneer/packages/joy-media.md)
-    * [@polkadot/app-staking](pioneer/packages/app-staking/README.md)
-      * [src](pioneer/packages/app-staking/src/README.md)
-        * [md](pioneer/packages/app-staking/src/md/README.md)
-          * [basic](pioneer/packages/app-staking/src/md/basic.md)
-    * [Joystream Pages Module](pioneer/packages/joy-pages/README.md)
-      * [src](pioneer/packages/joy-pages/src/README.md)
-        * [md](pioneer/packages/joy-pages/src/md/README.md)
-          * [Terms of Service](pioneer/packages/joy-pages/src/md/tos.md)
-          * [Privacy](pioneer/packages/joy-pages/src/md/privacy.md)
-    * [@polkadot/apps](pioneer/packages/apps.md)
-    * [Election module for Joystream node](pioneer/packages/joy-election.md)
-    * [@polkadot/app-accounts](pioneer/packages/app-accounts/README.md)
-      * [src](pioneer/packages/app-accounts/src/README.md)
-        * [md](pioneer/packages/app-accounts/src/md/README.md)
-          * [basic](pioneer/packages/app-accounts/src/md/basic.md)
-    * [@polkadot/react-api](pioneer/packages/react-api.md)
-    * [@polkadot/app-generic-asset](pioneer/packages/app-generic-asset.md)
-    * [@polkadot/react-params](pioneer/packages/react-params.md)
-    * [@polkadot/app-storage](pioneer/packages/app-storage.md)
-    * [@polkadot/app-js](pioneer/packages/app-js.md)
-    * [@polkadot/app-transfer](pioneer/packages/app-transfer.md)
-    * [@polkadot/react-signer](pioneer/packages/react-signer.md)
-    * [@polkadot/app-123code](pioneer/packages/app-123code.md)
-    * [@polkadot/app-sudo](pioneer/packages/app-sudo.md)
-    * [Help module for Joystream node](pioneer/packages/joy-help.md)
-    * [@polkadot/app-council](pioneer/packages/app-council.md)
-    * [@polkadot/app-contracts](pioneer/packages/app-contracts/README.md)
-      * [src](pioneer/packages/app-contracts/src/README.md)
-        * [md](pioneer/packages/app-contracts/src/md/README.md)
-          * [contracts](pioneer/packages/app-contracts/src/md/intro.md)
-    * [@polkadot/ui-settings](pioneer/packages/joy-settings.md)
-    * [Utils for Joystream node](pioneer/packages/joy-utils.md)
-    * [@polkadot/app-parachains](pioneer/packages/app-parachains.md)
-    * [@polkadot/react-query](pioneer/packages/react-query.md)
-    * [@polkadot/app-claims](pioneer/packages/app-claims.md)
-    * [@polkadot/react-components](pioneer/packages/react-components.md)
-    * [Membership module for Joystream node](pioneer/packages/joy-members.md)
-    * [@polkadot/app-extrinsics](pioneer/packages/app-extrinsics.md)
-    * [@polkadot/joy-actors](pioneer/packages/joy-storage.md)
-    * [@polkadot/joy-roles](pioneer/packages/joy-roles.md)
-  * [CHANGELOG](pioneer/changelog.md)
-  * [Contributing](pioneer/contributing.md)
-  * [Bounties](pioneer/bounties.md)
-* [README](cli/README.md)
-  * [bin](cli/bin/README.md)
-    * [run](cli/bin/run.md)
-* [@joystream/types](types.md)
-* [docs](docs/README.md)
-  * [using-docker](docs/using-docker/README.md)
-    * [Docker](docs/using-docker/building-node-and-runtime.md)
-* [runtime](runtime/README.md)
-  * [CHANGELOG](runtime/changelog.md)
-* [query-node](query-node/README.md)
-  * [Overview](query-node/docs/README.md)
-    * [Install Hydra](query-node/docs/install-hydra.md)
-    * [Architecture](query-node/docs/architecture.md)
-    * [Schema](query-node/docs/schema-spec/README.md)
-      * [Entities](query-node/docs/schema-spec/entities.md)
-      * [The Goodies](query-node/docs/schema-spec/the-query-goodies.md)
-      * [Entity Relationships](query-node/docs/schema-spec/entity-relationship.md)
-      * [Enums](query-node/docs/schema-spec/enums.md)
-      * [Algebraic types](query-node/docs/schema-spec/variant-types.md)
-      * [Interfaces](query-node/docs/schema-spec/interfaces.md)
-      * [Full-text queries](query-node/docs/schema-spec/full-text-queries.md)
-    * [Mappings](query-node/docs/mappings/README.md)
-      * [DatabaseManager](query-node/docs/mappings/databasemanager.md)
-      * [SubstrateEvent](query-node/docs/mappings/substrateevent.md)
-    * [Tutorial](query-node/docs/quick-start.md)
-  * [Substrate Query Node](query-node/substrate-query-framework/README.md)
-    * [cli](query-node/substrate-query-framework/cli/README.md)
-      * [bin](query-node/substrate-query-framework/cli/bin/README.md)
-        * [run](query-node/substrate-query-framework/cli/bin/run.md)
-  * [Joystream Query Node](query-node/joystream-query-node.md)
-  * [examples](query-node/examples/README.md)
-    * [kusama-query-node](query-node/examples/kusama-query-node.md)
-

+ 0 - 2
cli/bin/README.md

@@ -1,2 +0,0 @@
-# bin
-

+ 0 - 6
cli/bin/run.md

@@ -1,6 +0,0 @@
-# run
-
-@echo off
-
-node "%~dp0\run" %\*
-

+ 0 - 2
docs/README.md

@@ -1,2 +0,0 @@
-# docs
-

+ 0 - 2
docs/using-docker/README.md

@@ -1,2 +0,0 @@
-# using-docker
-

+ 0 - 19
pioneer/BOUNTIES.md

@@ -1,19 +0,0 @@
-# Bounties
-
-From time-to-time we will add bounties for features.
-
-These are generously provided by the [Web3 Foundation](https://web3.foundation/) and as such employees of Parity or those of the W3F are ineligible for them. (This includes people being by either Party for development or community work, related or un-related to polkadot-js).
-
-The idea is that these bounties should be left open to community participation, so only if there is no outside interest for a specific issue, should those directly or indirectly paid by the W3F for work, attempt to close an issue. (in which case it will be "un-bountied")
-
-Current bounties are tracked by the [!bounty](https://github.com/polkadot-js/apps/labels/%21bounty) label.
-
-## Process
-
-Once listed, the normal [Gitcoin](https://gitcoin.co/) process kicks in. This means application, work and payment is managed by this tool. The values for bounties are determined by the size estimation done by the team.
-
-## Some small requests
-
-Please don't start work on an issue until you have been approved via the gitcoin interface. We generally love enthusiasm and code in the repo, however short-cutting the process does create some issues for the management of the bounties. We certainly don't want to be playing favorites if 2 PRs for the same issue are created at the same time. And in cases where somebody else has been approved and an unapproved PR comes in... well, it gets really murky.
-
-When making changes, please do not force push in your PRs, especially not after a review has been started. We will clone your repo and work from that, doing a simple `pull` on a force-pushed branch ends up being, well, less than simple. We squash merge all PRs, so you do not clutter up the history by using stock-standard pushes to your branch.

+ 0 - 124
pioneer/CHANGELOG.md

@@ -1,124 +0,0 @@
-# 0.36.1
-
-- Api 0.95.1, Util 1.6.1, Extension 0.13.1
-- Support latest contracts ABI (via API), incl. rework of contracts UI
-- Support for Kusama CC2
-- Support for Edgeware mainnet
-- Experimental Ledger support
-- Display forks on explorer (limited to Babe)
-- Change settings to have Save as well as Save & Reload (depending on changes made)
-- Updates to struct & enum rendering (as per extrinsic app)
-- Backup, Password change & Delete don't show for built-in dev accounts
-- Add commissions to the staking overview
-- UI theme update
-- A large number of components refactored for React functional components
-- Allow dismiss of all notifications (via bounty)
-- Migrate all buttons to have icons (via bounty)
-- Proposal submission via modal (via bounty)
-- i18n string extraction (via bounty)
-- adjust signature validity (via bounty)
-- Make the network selection clickable on network name (via bounty)
-- ... and a number of cleanups all around
-
-# 0.35.1
-
-- Api 0.91.1, Util 1.2.1, Extension 0.10.1
-- Support for accounts added via Qr (for instance, the Parity Signer)
-- Support for accounts tied to specific chains (instead of just available to all)
-- GenericAsset app transfers
-- Support for Edgeware with default types
-- Display received heartbeats for validators
-- Allow optional params (really as optional) in RPC toolbox
-- Add Polkascan for Kusama
-- Fix account derivation with `///password`
-- Lots of component & maintainability cleanups
-
-# 0.34.1
-
-- Kusama support
-- Full support for Substrate 2.x & Polkadot 0.5.0 networks
-- Lots of UI updated to support both Substrate 1.x & 2.x chains
-- Add of claims app for Kusama (and Polkadot)
-- Basic Council, Parachains & Treasury apps
-- Moved ui-* packages to react-*
-
-# 0.33.1
-
-- Allow for externally injected accounts (i.e. via extension, polkadot-js & SingleSource)
-- Links to extrnisics & addresses on Polkascan
-- Rework Account & Address layouts with cards
-- Transfer can happen from any point (via Transfer modal)
-- Use new api.derive functions
-- Introduce multi support (most via api.derive.*)
-- Update all account and address modals
-- Add seconding of proposals
-- Staking updates, including un-bonding & withdrawals
-- Update explorer with global query on hash/blocks
-- Add filters on the staking page
-- Vanitygen now supports sr25519 as well
-- Fixes for importing of old JSON
-- Latest @polkadot/util & @polkadot/api
-- A large number of optimizations and smaller fixes
-
-# 0.32.1
-
-- Support for Substrate 1.0 release & metadata v4
-- @polkadot/api 0.77.1
-
-# 0.31.1
-
-- Cleanups, fixes and features around the poc-4 staking module
-- Number of UI enhancements
-
-# 0.30.1
-
-- Staking page indicator for offline nodes (count & block)
-- Rework page tabs and content layouts
-- Cleanup of all UI summary headers
-- Emberic Elem support (replaces Dried Danta)
-
-# 0.29.1
-
-- @polkadot/util & @polkadot/api 0.75.1
-
-# 0.28.1
-
-- Support for substrate 1.0-rc
-
-# 0.27.1
-
-- Bring in new staking & nominating functions
-- Swap default keyring accounts (on creation) to sr25519
-- New faster crypto algorithms
-- Misc. bug fixes all around
-
-# 0.26.1
-
-- Swap keyring to HDKD derivation, mnemonic keys are now not backwards compatible with those created earlier. (Defaults are still for ed25519)
-- Swap crypto to new WASM-backed version (and remove libsodium dependency)
-- UI to allow for derived keys for ed25519 and sr25519
-- New mobile-friendly sidebar
-- Fix issues with nominating (old non-bonds interface)
-
-# 0.25.1
-
-- Swap to publishing -beta.x on merge (non-breaking testing)
-
- # 0.24.1
-
- Storage now handles Option type properly
-
- # 0.23.1
-
- JavaScript console introduced
-
-# 0.22.1
-
-- Use new Compact<Index> transaction format - this requires the latest binaries from either Polkadot or Substrate
-
-# 0.21.1
-
-- PoC-3 support with latest Substrate master & Polkadot master
-- Add support for Charred Cherry (Substrate) and Alexander (Polkadot) testnets
-- Too many changes to mention, master now only supports latest PoC-3 iteration
-- Use https://poc-2.polkadot.io if access is required to PoC-2 era networks

+ 0 - 45
pioneer/CONTRIBUTING.md

@@ -1,45 +0,0 @@
-# Contributing
-
-## What?
-
-Individuals making significant and valuable contributions are given commit-access to a project to contribute as they see fit.
-A project is more like an open wiki than a standard guarded open source project.
-
-## Rules
-
-There are a few basic ground-rules for contributors (including the maintainer(s) of the project):
-
-1. **No `--force` pushes** or modifying the Git history in any way. If you need to rebase, ensure you do it in your own repo.
-2. **Non-master branches**, prefixed with a short name moniker (e.g. `<initials>-<feature>`) must be used for ongoing work.
-3. **All modifications** must be made in a **pull-request** to solicit feedback from other contributors.
-4. A pull-request *must not be merged until CI* has finished successfully.
-
-#### Merging pull requests once CI is successful:
-- A pull request with no large change to logic that is an urgent fix may be merged after a non-author contributor has reviewed it well.
-- No PR should be merged until all reviews' comments are addressed.
-
-#### Reviewing pull requests:
-When reviewing a pull request, the end-goal is to suggest useful changes to the author. Reviews should finish with approval unless there are issues that would result in:
-
-- Buggy behaviour.
-- Undue maintenance burden.
-- Breaking with house coding style.
-- Pessimisation (i.e. reduction of speed as measured in the projects benchmarks).
-- Feature reduction (i.e. it removes some aspect of functionality that a significant minority of users rely on).
-- Uselessness (i.e. it does not strictly add a feature or fix a known issue).
-
-#### Reviews may not be used as an effective veto for a PR because:
-- There exists a somewhat cleaner/better/faster way of accomplishing the same feature/fix.
-- It does not fit well with some other contributors' longer-term vision for the project.
-
-## Releases
-
-Declaring formal releases remains the prerogative of the project maintainer(s).
-
-## Changes to this arrangement
-
-This is an experiment and feedback is welcome! This document may also be subject to pull-requests or changes by contributors where you believe you have something valuable to add or change.
-
-## Heritage
-
-These contributing guidelines are modified from the "OPEN Open Source Project" guidelines for the Level project: [https://github.com/Level/community/blob/master/CONTRIBUTING.md](https://github.com/Level/community/blob/master/CONTRIBUTING.md)

+ 0 - 2
pioneer/packages/README.md

@@ -1,2 +0,0 @@
-# packages
-

+ 0 - 23
pioneer/packages/app-123code.md

@@ -1,23 +0,0 @@
-# @polkadot/app-123code
-
-A simple template to get started with adding an "app" to this UI. It contains the bare minimum for a nicely hackable app \(if you just want to code _somewhere_\) and the steps needed to create, add and register an new app that appears in the UI.
-
-## adding an app
-
-If you want to add a new app to the UI, this is the place to start.
-
-1. Duplicate this `app-123code` folder and give it an appropriate name, in this case we will select `app-example` to keep things clear.
-2. Edit the `apps-example/package.json` app description, i.e. the name, author and relevant overview.
-
-And we have the basic app source setup, time to get the tooling correct.
-
-1. Add the new app to the TypeScript config in root, `tsconfig.json`, i.e. an entry such as `"@polkadot/app-example/*": [ "packages/app-example/src/*" ],`
-
-At this point the app should be buildable, but not quite reachable. The final step is to add it to the actual sidebar in `apps`.
-
-1. In `apps-routing/src` duplicate the `123code.ts` file to `example.ts` and edit it with the appropriate information, including the hash link, name and icon \(any icon name from semantic-ui-react/font-awesome 4 should be appropriate\).
-2. In the above description file, the `isHidden` field needs to be toggled to make it appear - the base template is hidden by default.
-3. Finally add the `template` to the `apps-routing/src/index.ts` file at the appropriate place for both full and light mode \(either optional\)
-
-Yes. After all that we have things hooked up. Run `yarn start` and your new app \(non-coded\) should show up. Now start having fun and building something great.
-

+ 0 - 2
pioneer/packages/app-accounts/src/README.md

@@ -1,2 +0,0 @@
-# src
-

+ 0 - 2
pioneer/packages/app-accounts/src/md/README.md

@@ -1,2 +0,0 @@
-# md
-

+ 0 - 2
pioneer/packages/app-address-book/src/README.md

@@ -1,2 +0,0 @@
-# src
-

+ 0 - 2
pioneer/packages/app-address-book/src/md/README.md

@@ -1,2 +0,0 @@
-# md
-

+ 0 - 2
pioneer/packages/app-claims.md

@@ -1,2 +0,0 @@
-# @polkadot/app-claims
-

+ 0 - 2
pioneer/packages/app-contracts/src/README.md

@@ -1,2 +0,0 @@
-# src
-

+ 0 - 2
pioneer/packages/app-contracts/src/md/README.md

@@ -1,2 +0,0 @@
-# md
-

+ 0 - 2
pioneer/packages/app-council.md

@@ -1,2 +0,0 @@
-# @polkadot/app-council
-

+ 0 - 23
pioneer/packages/app-dashboard.md

@@ -1,23 +0,0 @@
-# @polkadot/app-123code
-
-A simple template to get started with adding an "app" to this UI. It contains the bare minimum for a nicely hackable app \(if you just want to code _somewhere_\) and the steps needed to create, add and register an new app that appears in the UI.
-
-## adding an app
-
-If you want to add a new app to the UI, this is the place to start.
-
-1. Duplicate this `app-123code` folder and give it an appropriate name, in this case we will select `app-example` to keep things clear.
-2. Edit the `apps-example/package.json` app description, i.e. the name, author and relevant overview.
-
-And we have the basic app source setup, time to get the tooling correct.
-
-1. Add the new app to the TypeScript config in root, `tsconfig.json`, i.e. an entry such as `"@polkadot/app-example/*": [ "packages/app-example/src/*" ],`
-
-At this point the app should be buildable, but not quite reachable. The final step is to add it to the actual sidebar in `apps`.
-
-1. In `apps/src/routing/` duplicate the `123code.ts` file to `example.ts` and edit it with the appropriate information, including the hash link, name and icon \(any icon name from semantic-ui-react/font-awesome 4 should be appropriate\).
-2. In the above description file, the `isHidden` field needs to be toggled to make it appear - the base template is hidden by default.
-3. Finally add the `template` to the `apps/src/routing/index.ts` file at the appropriate place for both full and light mode \(either optional\)
-
-Yes. After all that we have things hooked up. Run `yarn start` and your new app \(non-coded\) should show up. Now start having fun and building something great.
-

+ 0 - 2
pioneer/packages/app-democracy/src/README.md

@@ -1,2 +0,0 @@
-# src
-

+ 0 - 2
pioneer/packages/app-democracy/src/md/README.md

@@ -1,2 +0,0 @@
-# md
-

+ 0 - 2
pioneer/packages/app-explorer.md

@@ -1,2 +0,0 @@
-# @polkadot/app-explorer
-

+ 0 - 2
pioneer/packages/app-extrinsics.md

@@ -1,2 +0,0 @@
-# @polkadot/app-extrinsics
-

+ 0 - 4
pioneer/packages/app-generic-asset.md

@@ -1,4 +0,0 @@
-# @polkadot/app-generic-asset
-
-A basic GenericAsset transfer application, allowing the movement of funds from one account to another.
-

+ 0 - 2
pioneer/packages/app-js.md

@@ -1,2 +0,0 @@
-# @polkadot/app-js
-

+ 0 - 2
pioneer/packages/app-parachains.md

@@ -1,2 +0,0 @@
-# @polkadot/app-parachains
-

+ 0 - 2
pioneer/packages/app-settings/src/README.md

@@ -1,2 +0,0 @@
-# src
-

+ 0 - 2
pioneer/packages/app-settings/src/md/README.md

@@ -1,2 +0,0 @@
-# md
-

+ 0 - 2
pioneer/packages/app-staking/src/README.md

@@ -1,2 +0,0 @@
-# src
-

+ 0 - 2
pioneer/packages/app-staking/src/md/README.md

@@ -1,2 +0,0 @@
-# md
-

+ 0 - 2
pioneer/packages/app-storage.md

@@ -1,2 +0,0 @@
-# @polkadot/app-storage
-

+ 0 - 2
pioneer/packages/app-sudo.md

@@ -1,2 +0,0 @@
-# @polkadot/app-sudo
-

+ 0 - 2
pioneer/packages/app-toolbox.md

@@ -1,2 +0,0 @@
-# @polkadot/app-toolbox
-

+ 0 - 4
pioneer/packages/app-transfer.md

@@ -1,4 +0,0 @@
-# @polkadot/app-transfer
-
-A basic DOT transfer application, allowing the movement of funds from one account to another.
-

+ 0 - 2
pioneer/packages/app-treasury/src/README.md

@@ -1,2 +0,0 @@
-# src
-

+ 0 - 2
pioneer/packages/app-treasury/src/md/README.md

@@ -1,2 +0,0 @@
-# md
-

+ 0 - 4
pioneer/packages/apps-routing.md

@@ -1,4 +0,0 @@
-# @polkadot/apps-routing
-
-The routing config for the application
-

+ 0 - 2
pioneer/packages/apps.md

@@ -1,2 +0,0 @@
-# @polkadot/apps
-

+ 0 - 2
pioneer/packages/joy-election.md

@@ -1,2 +0,0 @@
-# Election module for Joystream node
-

+ 0 - 4
pioneer/packages/joy-forum.md

@@ -1,4 +0,0 @@
-# Forum module for Joystream node
-
-Forum allows to create categories and subcategories, start discussion threads and reply to others.
-

+ 0 - 4
pioneer/packages/joy-help.md

@@ -1,4 +0,0 @@
-# Help module for Joystream node
-
-Here you can find a help and the latest news related to Joystream community and software.
-

+ 0 - 4
pioneer/packages/joy-media.md

@@ -1,4 +0,0 @@
-# Media content module for Joystream node
-
-This module works with multi-media content such as audio and video.
-

+ 0 - 2
pioneer/packages/joy-members.md

@@ -1,2 +0,0 @@
-# Membership module for Joystream node
-

+ 0 - 2
pioneer/packages/joy-pages/src/README.md

@@ -1,2 +0,0 @@
-# src
-

+ 25 - 19
pioneer/packages/joy-pages/src/md/Privacy.md

@@ -1,52 +1,58 @@
-# Privacy and Cookies
+# Privacy
+
+## Privacy and Cookies
+
 **Last updated on the 17th of April 2019**
 
 Jsgenesis values your privacy.
 
-This Privacy Policy ("Privacy Policy") and Cookie Policy ("Cookie Policy") explains how Jsgenesis AS ("Jsgenesis", "Company", "We", "Us", "Our") collect and use data and information when you ("User) use on or any of the Joystream products, developed in the GitHub organization [Joystream](https://github.com/JoyStream). These products (collectively "Software") include, but are not limited to, [all pages under the joystream.org domain](https://www.joystream.org/) ("Website"), the [Joyful node](https://github.com/Joystream/substrate-node-joystream) ("Full Node"), the [Colossus Storage Node](https://github.com/Joystream/storage-node-joystream) ("Storage node"), and the Pioneer User Interface, either [self hosted](https://github.com/Joystream/apps) or [hosted by Us](http://testnet.joystream.org/) ("App").
+This Privacy Policy \("Privacy Policy"\) and Cookie Policy \("Cookie Policy"\) explains how Jsgenesis AS \("Jsgenesis", "Company", "We", "Us", "Our"\) collect and use data and information when you \("User\) use on or any of the Joystream products, developed in the GitHub organization [Joystream](https://github.com/JoyStream). These products \(collectively "Software"\) include, but are not limited to, [all pages under the joystream.org domain](https://www.joystream.org/) \("Website"\), the [Joyful node](https://github.com/Joystream/substrate-node-joystream) \("Full Node"\), the [Colossus Storage Node](https://github.com/Joystream/storage-node-joystream) \("Storage node"\), and the Pioneer User Interface, either [self hosted](https://github.com/Joystream/apps) or [hosted by Us](http://testnet.joystream.org/) \("App"\).
 
 Relevant to the Privacy Policy and Cookie Policy are the following terms:
-* The term "Blockchain" refers to the blockchain(s) assembled by the Full Node.
+
+* The term "Blockchain" refers to the blockchain\(s\) assembled by the Full Node.
 * The term "Content" refers to media files accessible through our Software.
-* The term "Keys" refers to a private/public cryptographic keypair, that Users can generate in order to write (and decrypt data) on the Blockchain.
+* The term "Keys" refers to a private/public cryptographic keypair, that Users can generate in order to write \(and decrypt data\) on the Blockchain.
 * The term "Membership" refers to tying your Keys to a public profile, allowing users to access Content and interact with the Blockchain.
 * The term "Memo" refers to a markdown enabled text field, where users can input data tied to their Keys.
 
+## Privacy Policy
 
-# Privacy Policy
 **Last updated on the 19th of May 2020**
 
-## 1. Agreement to the Policy
+### 1. Agreement to the Policy
+
 By using any of Our Software, the User are accepting this Privacy Policy. If you are acting on behalf of another company or an employer, you must have the rights to act on their behalf. The Privacy Policy is not extended to any of our newsletters, where Users are bound by the [privacy policy](https://mailchimp.com/legal/privacy/) of [Mailchimp](https://mailchimp.com/).
 
 The Privacy Policy does not apply to any other third party services including, but not limited to, applications, websites, tools or software, even if accessible through links or guides in our Software.
 
-## 2. Changes to Policy
+### 2. Changes to Policy
+
 This Privacy Policy may be changed at the sole discretion of Company. If any material changes are made, the User will be notified in the Service that is used. Note that adding new products to be included in the term Software , e.g. a new User facing product replacing the App or a new tool for uploading Content, is not considered material as it will not affect Users unless they adopt the new product. Changing softare names, terminology used in this Privacy Policy, and changin link locations are aslo examples of non-material changes.
 
-## 3. Information Collected
-All data written to the Blockchain, is implicitly collected not only by Company, but also anyone else in the world that is running the Full Node locally, or accessed via the App or a third party.
-This includes, but is not limited to, Content hashes, Membership profile, Memo field, and any other way a User can record data on the Blockchain.
+### 3. Information Collected
+
+All data written to the Blockchain, is implicitly collected not only by Company, but also anyone else in the world that is running the Full Node locally, or accessed via the App or a third party. This includes, but is not limited to, Content hashes, Membership profile, Memo field, and any other way a User can record data on the Blockchain.
 
 Company uses [Google Analytics](https://marketingplatform.google.com/about/analytics/), with IP anonymization, to collect statistics on Website and the version of App hosted by us. All customizable data sharing settings are turned off to improve the privacy of Users.
 
 Company will not sell your data for advertising, or other purposes.
 
+## Cookie Policy
 
-# Cookie Policy
 **Last updated on the 17th of April 2019**
 
-Company uses cookies on Website and App when hosted by Us (collectively "Service"). By using the Service, you consent to the use of cookies.
+Company uses cookies on Website and App when hosted by Us \(collectively "Service"\). By using the Service, you consent to the use of cookies.
 
 Our Cookies Policy explains what cookies are, how we use cookies, how third-parties we partner with may use cookies on the Service, your choices regarding cookies and further information about cookies.
 
-## 1. What are Cookies?
+### 1. What are Cookies?
 
 Cookies are small pieces of text sent by your web browser by a website you visit. A cookie file is stored in your web browser and allows the Service or a third-party to recognize you and make your next visit easier and the Service more useful to you.
 
-Cookies can be *persistent* or *session* cookies.
+Cookies can be _persistent_ or _session_ cookies.
 
-## 2. How we use Cookies
+### 2. How we use Cookies
 
 We use cookies for the following purposes our Service:
 
@@ -54,26 +60,26 @@ We use cookies for the following purposes our Service:
 * Store preferences
 * Persistant local storage of Keys and Membership.
 
-## 3. Third-party Cookies
+### 3. Third-party Cookies
 
 In addition to our own cookies, we also use various third-party cookies to report usage statistics of the Service, deliver advertisements on and through the Service, and so on. They include:
 
 * Google Analytics
-* Mailchimp (Only when signing up for any of our newsletters)
+* Mailchimp \(Only when signing up for any of our newsletters\)
 * Godaddy
 
 Please see Item 3. of the Privacy Policy for more information on the extent of these providers.
 
-## Your Regarding Cookies
+### Your Regarding Cookies
 
 If you would like to delete cookies or instruct your web browser to delete or refuse cookies, please visit the help pages of your web browser.
 
 Please note, however, that if you delete cookies or refuse to accept them, you might not be able to use all of the features we offer, you may not be able to store your preferences, and some of our pages might not display properly.
 
-
 MORE INFORMATION About Cookies
 
 You can learn more about cookies and the following third-party websites:
 
 * [AllAboutCookies](http://www.allaboutcookies.org/)
 * [Network Advertising Initiative](http://www.networkadvertising.org/)
+

+ 0 - 2
pioneer/packages/joy-pages/src/md/README.md

@@ -1,2 +0,0 @@
-# md
-

+ 14 - 14
pioneer/packages/joy-pages/src/md/ToS.md

@@ -1,40 +1,40 @@
 # Terms of Service
+
 **Last updated on the 17th of April 2019**
 
-The Terms of Service ("Agreement") is a binding obligation between you ("User") and Jsgenesis AS ("Company", "We", "Us", "Our") for use of our Products. These products (collectively "Software") include [all pages under the joystream.org domain](https://www.joystream.org/) ("Website"), the [Joyful node](https://github.com/Joystream/substrate-node-joystream) ("Full node"), the [Colossus Storage Node](https://github.com/Joystream/storage-node-joystream) ("Storage node"), and the Pioneer User Interface, either [self hosted ](https://github.com/Joystream/apps) or [hosted by Us](http://testnet.joystream.org/) ("App").
+The Terms of Service \("Agreement"\) is a binding obligation between you \("User"\) and Jsgenesis AS \("Company", "We", "Us", "Our"\) for use of our Products. These products \(collectively "Software"\) include [all pages under the joystream.org domain](https://www.joystream.org/) \("Website"\), the [Joyful node](https://github.com/Joystream/substrate-node-joystream) \("Full node"\), the [Colossus Storage Node](https://github.com/Joystream/storage-node-joystream) \("Storage node"\), and the Pioneer User Interface, either [self hosted ](https://github.com/Joystream/apps) or [hosted by Us](http://testnet.joystream.org/) \("App"\).
 
 ## 1. Agreement to Terms
+
 By using this Software, the User are agreeing to be bound by this Agreement. If you are acting on behalf of another company or an employer, you must have the rights to act on their behalf.
 
 ## 2. Changes to Terms
+
 This Agreement may be changed at the sole discretion of Company without notice. Your continued use of our Software is a confirmation of Users acceptance of the newest Agreement.
 
 ## 3. Privacy Policy
-Please see our [privacy policy](https://joystream.org/privacy-cookies) ("Privacy Policy") for information regarding privacy.
+
+Please see our [privacy policy](https://joystream.org/privacy-cookies) \("Privacy Policy"\) for information regarding privacy.
 
 ## 4. Membership
-By generating private/public cryptographic keys ("Keys") or applying for a membership account ("Membershp"), you accept the risk of losing access to your Keys and Membership. Reasons include, but is not limited to:
-  1. Losing passwords
-  2. Losing recovery seeds or mnemonics
-  3. Deleting accounts and backups
-  4. Security breaches
-   
+
+By generating private/public cryptographic keys \("Keys"\) or applying for a membership account \("Membershp"\), you accept the risk of losing access to your Keys and Membership. Reasons include, but is not limited to: 1. Losing passwords 2. Losing recovery seeds or mnemonics 3. Deleting accounts and backups 4. Security breaches
+
 Under no circumstance will Company take any responsiblity for loss resulting of losing access to Membership or Keys.
 
 ## 5. User Conduct
 
-By using any of Our Software, you agree to not state, write, link to, download, distribute, share or encourage other users to state, write, link to, download, distribute, share or encourage anything that:
-1. breach or infringe any copyright or intellectual property of any third party.
-2. is abusive, malicious, threatening or unlawful in any way.
+By using any of Our Software, you agree to not state, write, link to, download, distribute, share or encourage other users to state, write, link to, download, distribute, share or encourage anything that: 1. breach or infringe any copyright or intellectual property of any third party. 2. is abusive, malicious, threatening or unlawful in any way.
 
-Company has not reviewed all content of this website, and is not responsible for content submitted or provided by individuals or groups not directly tied to them. 
+Company has not reviewed all content of this website, and is not responsible for content submitted or provided by individuals or groups not directly tied to them.
 
 ## 6. Responsibilites and Risks
 
-In no event shall Company, its contractors, employees or owners be liable for any damage or loss of any kind to User arising out of the use or inability to use any Software made by Company. 
+In no event shall Company, its contractors, employees or owners be liable for any damage or loss of any kind to User arising out of the use or inability to use any Software made by Company.
 
 In no event shall Company, its contractors, employees or owners be liable for any damage or loss of any kind to User resulting of clicking links, following guides, using software or doing anything else recommended by Company.
 
 ## 7. Governing Law
 
-These terms and conditions are governed by and construed in accordance with the laws of Norway.
+These terms and conditions are governed by and construed in accordance with the laws of Norway.
+

+ 0 - 85
pioneer/packages/joy-pages/src/md/privacy.md

@@ -1,85 +0,0 @@
-# Privacy
-
-## Privacy and Cookies
-
-**Last updated on the 17th of April 2019**
-
-Jsgenesis values your privacy.
-
-This Privacy Policy \("Privacy Policy"\) and Cookie Policy \("Cookie Policy"\) explains how Jsgenesis AS \("Jsgenesis", "Company", "We", "Us", "Our"\) collect and use data and information when you \("User\) use on or any of the Joystream products, developed in the GitHub organization [Joystream](https://github.com/JoyStream). These products \(collectively "Software"\) include, but are not limited to, [all pages under the joystream.org domain](https://www.joystream.org/) \("Website"\), the [Joyful node](https://github.com/Joystream/substrate-node-joystream) \("Full Node"\), the [Colossus Storage Node](https://github.com/Joystream/storage-node-joystream) \("Storage node"\), and the Pioneer User Interface, either [self hosted](https://github.com/Joystream/apps) or [hosted by Us](http://testnet.joystream.org/) \("App"\).
-
-Relevant to the Privacy Policy and Cookie Policy are the following terms:
-
-* The term "Blockchain" refers to the blockchain\(s\) assembled by the Full Node.
-* The term "Content" refers to media files accessible through our Software.
-* The term "Keys" refers to a private/public cryptographic keypair, that Users can generate in order to write \(and decrypt data\) on the Blockchain.
-* The term "Membership" refers to tying your Keys to a public profile, allowing users to access Content and interact with the Blockchain.
-* The term "Memo" refers to a markdown enabled text field, where users can input data tied to their Keys.
-
-## Privacy Policy
-
-**Last updated on the 19th of May 2020**
-
-### 1. Agreement to the Policy
-
-By using any of Our Software, the User are accepting this Privacy Policy. If you are acting on behalf of another company or an employer, you must have the rights to act on their behalf. The Privacy Policy is not extended to any of our newsletters, where Users are bound by the [privacy policy](https://mailchimp.com/legal/privacy/) of [Mailchimp](https://mailchimp.com/).
-
-The Privacy Policy does not apply to any other third party services including, but not limited to, applications, websites, tools or software, even if accessible through links or guides in our Software.
-
-### 2. Changes to Policy
-
-This Privacy Policy may be changed at the sole discretion of Company. If any material changes are made, the User will be notified in the Service that is used. Note that adding new products to be included in the term Software , e.g. a new User facing product replacing the App or a new tool for uploading Content, is not considered material as it will not affect Users unless they adopt the new product. Changing softare names, terminology used in this Privacy Policy, and changin link locations are aslo examples of non-material changes.
-
-### 3. Information Collected
-
-All data written to the Blockchain, is implicitly collected not only by Company, but also anyone else in the world that is running the Full Node locally, or accessed via the App or a third party. This includes, but is not limited to, Content hashes, Membership profile, Memo field, and any other way a User can record data on the Blockchain.
-
-Company uses [Google Analytics](https://marketingplatform.google.com/about/analytics/), with IP anonymization, to collect statistics on Website and the version of App hosted by us. All customizable data sharing settings are turned off to improve the privacy of Users.
-
-Company will not sell your data for advertising, or other purposes.
-
-## Cookie Policy
-
-**Last updated on the 17th of April 2019**
-
-Company uses cookies on Website and App when hosted by Us \(collectively "Service"\). By using the Service, you consent to the use of cookies.
-
-Our Cookies Policy explains what cookies are, how we use cookies, how third-parties we partner with may use cookies on the Service, your choices regarding cookies and further information about cookies.
-
-### 1. What are Cookies?
-
-Cookies are small pieces of text sent by your web browser by a website you visit. A cookie file is stored in your web browser and allows the Service or a third-party to recognize you and make your next visit easier and the Service more useful to you.
-
-Cookies can be _persistent_ or _session_ cookies.
-
-### 2. How we use Cookies
-
-We use cookies for the following purposes our Service:
-
-* Provide Analytics
-* Store preferences
-* Persistant local storage of Keys and Membership.
-
-### 3. Third-party Cookies
-
-In addition to our own cookies, we also use various third-party cookies to report usage statistics of the Service, deliver advertisements on and through the Service, and so on. They include:
-
-* Google Analytics
-* Mailchimp \(Only when signing up for any of our newsletters\)
-* Godaddy
-
-Please see Item 3. of the Privacy Policy for more information on the extent of these providers.
-
-### Your Regarding Cookies
-
-If you would like to delete cookies or instruct your web browser to delete or refuse cookies, please visit the help pages of your web browser.
-
-Please note, however, that if you delete cookies or refuse to accept them, you might not be able to use all of the features we offer, you may not be able to store your preferences, and some of our pages might not display properly.
-
-MORE INFORMATION About Cookies
-
-You can learn more about cookies and the following third-party websites:
-
-* [AllAboutCookies](http://www.allaboutcookies.org/)
-* [Network Advertising Initiative](http://www.networkadvertising.org/)
-

+ 0 - 40
pioneer/packages/joy-pages/src/md/tos.md

@@ -1,40 +0,0 @@
-# Terms of Service
-
-**Last updated on the 17th of April 2019**
-
-The Terms of Service \("Agreement"\) is a binding obligation between you \("User"\) and Jsgenesis AS \("Company", "We", "Us", "Our"\) for use of our Products. These products \(collectively "Software"\) include [all pages under the joystream.org domain](https://www.joystream.org/) \("Website"\), the [Joyful node](https://github.com/Joystream/substrate-node-joystream) \("Full node"\), the [Colossus Storage Node](https://github.com/Joystream/storage-node-joystream) \("Storage node"\), and the Pioneer User Interface, either [self hosted ](https://github.com/Joystream/apps) or [hosted by Us](http://testnet.joystream.org/) \("App"\).
-
-## 1. Agreement to Terms
-
-By using this Software, the User are agreeing to be bound by this Agreement. If you are acting on behalf of another company or an employer, you must have the rights to act on their behalf.
-
-## 2. Changes to Terms
-
-This Agreement may be changed at the sole discretion of Company without notice. Your continued use of our Software is a confirmation of Users acceptance of the newest Agreement.
-
-## 3. Privacy Policy
-
-Please see our [privacy policy](https://joystream.org/privacy-cookies) \("Privacy Policy"\) for information regarding privacy.
-
-## 4. Membership
-
-By generating private/public cryptographic keys \("Keys"\) or applying for a membership account \("Membershp"\), you accept the risk of losing access to your Keys and Membership. Reasons include, but is not limited to: 1. Losing passwords 2. Losing recovery seeds or mnemonics 3. Deleting accounts and backups 4. Security breaches
-
-Under no circumstance will Company take any responsiblity for loss resulting of losing access to Membership or Keys.
-
-## 5. User Conduct
-
-By using any of Our Software, you agree to not state, write, link to, download, distribute, share or encourage other users to state, write, link to, download, distribute, share or encourage anything that: 1. breach or infringe any copyright or intellectual property of any third party. 2. is abusive, malicious, threatening or unlawful in any way.
-
-Company has not reviewed all content of this website, and is not responsible for content submitted or provided by individuals or groups not directly tied to them.
-
-## 6. Responsibilites and Risks
-
-In no event shall Company, its contractors, employees or owners be liable for any damage or loss of any kind to User arising out of the use or inability to use any Software made by Company.
-
-In no event shall Company, its contractors, employees or owners be liable for any damage or loss of any kind to User resulting of clicking links, following guides, using software or doing anything else recommended by Company.
-
-## 7. Governing Law
-
-These terms and conditions are governed by and construed in accordance with the laws of Norway.
-

+ 0 - 2
pioneer/packages/joy-proposals.md

@@ -1,2 +0,0 @@
-# Proposals module for Joystream node
-

+ 0 - 2
pioneer/packages/joy-roles.md

@@ -1,2 +0,0 @@
-# @polkadot/joy-roles
-

+ 0 - 41
pioneer/packages/joy-settings.md

@@ -1,41 +0,0 @@
-# @polkadot/ui-settings
-
-Manages app settings including endpoints, themes and prefixes
-
-## Usage Example
-
-User preferences are set as a settings object in the browser's local storage.
-
-```text
-import settings from '@polkadot/ui-settings';
-
-render () {
-  // get api endpoint for the selected chain
-  const WS_URL = settings.apiUrl();
-
-  // get the selected il8n language
-  const language = settings.il8nLang();
-
-  // get all available il8n languages
-  const languages = settings.availableLanguages();
-
-  // update settings
-  const updatedSettings = {
-    ...settings,
-    i18nLang: 'Arabic'
-  }
-  settings.set(updatedSettings);
-
-  // NOTE: API currently does not handle hot reconnecting properly,
-  so you need to manually reload the page after updating settings.
-  window.location.reload();
-}
-```
-
-## Used by
-
-Apps that currently use the settings package
-
-* \[polkadot-js/apps\]\('[https://www.github.com/polkadot-js/apps](https://www.github.com/polkadot-js/apps)'\)
-* [paritytech/substrate-light-ui](https://github.com/paritytech/substrate-light-ui)
-

+ 0 - 2
pioneer/packages/joy-storage.md

@@ -1,2 +0,0 @@
-# @polkadot/joy-actors
-

+ 0 - 2
pioneer/packages/joy-utils.md

@@ -1,2 +0,0 @@
-# Utils for Joystream node
-

+ 0 - 6
pioneer/packages/react-api.md

@@ -1,6 +0,0 @@
-# @polkadot/react-api
-
-WARNING: This is is not deemed stable yet for external use in React-based apps and still included in the [polkadot-js/apps](https://github.com/polkadot-js/apps) repo. Since these are generic HOC components for React, they will move to the [polkadot-js/ui](https://github.com/polkadot-js/ui) repo once deemed stable and usable by external projects.
-
-For the existing sharable components usable in external React-based projects, take a look at the [polkadot-js/ui documentation](https://polkadot.js.org/ui/)
-

+ 0 - 6
pioneer/packages/react-components.md

@@ -1,6 +0,0 @@
-# @polkadot/react-components
-
-WARNING: This is an internal package to [polkadot-js/apps](https://github.com/polkadot-js/apps) so is not inteded \(yet\) for broad use.
-
-For the existing sharable components usable in external React-based projects, take a look at the [polkadot-js/ui documentation](https://polkadot.js.org/ui/)
-

+ 0 - 6
pioneer/packages/react-params.md

@@ -1,6 +0,0 @@
-# @polkadot/react-params
-
-WARNING: This is an internal package to [polkadot-js/apps](https://github.com/polkadot-js/apps) so is not inteded \(yet\) for broad use.
-
-For the existing sharable components usable in external React-based projects, take a look at the [polkadot-js/ui documentation](https://polkadot.js.org/ui/)
-

+ 0 - 43
pioneer/packages/react-query.md

@@ -1,43 +0,0 @@
-# @polkadot/react-query
-
-WARNING: This is an internal package to [polkadot-js/apps](https://github.com/polkadot-js/apps) so is not inteded \(yet\) for broad use. Since these are generic components, they will move to the [polkadot-js/ui](https://github.com/polkadot-js/ui) repo once deemed stable and usable.
-
-For the existing sharable components usable in external React-based projects, take a look at the [polkadot-js/ui documentation](https://polkadot.js.org/ui/)
-
-## Overview
-
-A collection of RxJS enabled React components that operate with the [@polkadot/api-rx](https://github.com/polkadot-js/api) library. It automatically manages subscriptions on behalf of the developer, providing a number of unstyled components that can be used to construct UIs.
-
-## Usage
-
-Basic usage entails creating a `ContextProvider` and just using the components. For instance, to display the current node time,
-
-```javascript
-import React from 'react';
-import ReactDOM from 'react-dom';
-
-import { Api, NodeTime } from '@polkadot/react-query';
-
-...
-ReactDOM.render(
-  <Api>
-    <NodeTime />
-  </Api>,
-  document.querySelector('#container')
-);
-...
-```
-
-All components are provided unstyled making no assumptions on the actual use, however they all support \(optionally\) the `label`, `className` and `style` attributes, that can be used to style to component.
-
-```javascript
-...
-ReactDOM.render(
-  <Api>
-    <NodeTime className='rx-time' label='current node time:' />
-  </Api>,
-  document.querySelector('#container')
-);
-...
-```
-

+ 0 - 6
pioneer/packages/react-signer.md

@@ -1,6 +0,0 @@
-# @polkadot/react-signer
-
-WARNING: This is an internal package to [polkadot-js/apps](https://github.com/polkadot-js/apps) so is not inteded \(yet\) for broad use.
-
-For the existing sharable components usable in external React-based projects, take a look at the [polkadot-js/ui documentation](https://polkadot.js.org/ui/)
-

+ 59 - 0
query-node/.env

@@ -0,0 +1,59 @@
+# Project name
+PROJECT_NAME=query_node
+
+###########################
+#     Common settings     #
+###########################
+
+# The env variables below are by default used by all services and should be 
+# overriden in local env files (e.g. ./generated/indexer) if needed
+# DB config
+DB_NAME=query_node
+DB_USER=postgres
+DB_PASS=postgres
+DB_HOST=localhost
+DB_PORT=5432
+DEBUG=index-builder:*
+TYPEORM_LOGGING=error
+
+###########################
+#    Indexer options      #
+###########################
+
+# Substrate endpoint to source events from
+WS_PROVIDER_ENDPOINT_URI=ws://localhost:9944/
+# Block height to start indexing from.
+# Note, that if there are already some indexed events, this setting is ignored
+BLOCK_HEIGHT=0
+
+# Custom types to register for Substrate API
+# TYPE_REGISTER_PACKAGE_NAME=
+# TYPE_REGISTER_PACKAGE_VERSION=
+# TYPE_REGISTER_FUNCTION=
+
+# Redis cache server
+REDIS_URI=redis://localhost:6379/0
+
+###########################
+#    Processor options    #
+###########################
+
+# Where the mapping scripts are located, relative to ./generated/indexer
+MAPPINGS_LOCATION=../../src
+TYPES_JSON=../../typedefs.json
+
+# Indexer GraphQL API endpoint to fetch indexed events
+INDEXER_ENDPOINT_URL=http://localhost:4100/graphql
+
+# Block height from which the processor starts. Note that if 
+# there are already processed events in the database, this setting is ignored
+BLOCK_HEIGHT=0
+
+###############################
+#    Processor GraphQL API    #
+###############################
+
+GRAPHQL_SERVER_PORT=4002
+GRAPHQL_SERVER_HOST=localhost
+WARTHOG_APP_PORT=4002
+WARTHOG_APP_HOST=localhost

+ 43 - 0
query-node/README.md

@@ -1,2 +1,45 @@
 # query-node
 
+The query-node project contains an input schema (schema.graphql) and mappings for the Joystream `content-directory` runtime module.
+
+## Code generation
+
+We use Hydra-cli to generate a graphql server and a block indexer for joystream chain:
+
+```bash
+$ cd query-node
+$ hydra-cli codegen
+```
+
+After codegen process is done, we must add this lines to the `indexer/tsconfig.json` file. It is required because we are using `joystream/types` for decoding chain data in the mappings:
+
+```json
+{
+  "compilerOptions":
+    ...
+    "baseUrl": ".",
+    "paths": {
+      "@polkadot/types/augment": ["../../node_modules/@joystream/types/augment-codec/augment-types.ts"]
+    }
+}
+```
+
+## Run mapping processor
+
+Before running mappings make sure indexer(`yarn indexer:start`) and indexer-api-server (mappings get the chain data from this graphql server) are both running:
+
+```bash
+yarn processor:start
+```
+
+## Query data
+
+Once processor start to store event data you will be able to query this data from `http://localhost:4002/graphql`.
+
+```graphql
+query {
+  channels {
+    title
+  }
+}
+```

+ 0 - 0
query-node/joystream-query-node/bootstrap/index.ts → query-node/bootstrap/index.ts


+ 0 - 0
query-node/joystream-query-node/bootstrap/members.ts → query-node/bootstrap/members.ts


+ 0 - 0
query-node/joystream-query-node/bootstrap/package-lock.json → query-node/bootstrap/package-lock.json


+ 0 - 0
query-node/joystream-query-node/bootstrap/package.json → query-node/bootstrap/package.json


+ 0 - 0
query-node/joystream-query-node/bootstrap/tsconfig.json → query-node/bootstrap/tsconfig.json


+ 0 - 20
query-node/docs/README.md

@@ -1,20 +0,0 @@
----
-description: 'Introducing Hydra, a GraphQL query node for substrate chains'
----
-
-# Overview
-
-Hydra is inspired by [TheGraph](http://thegraph.com/) protocol but targets Substrate chains.‌
-
-Hydra is a query node for Substrate-based blockchains. A query node ingests data from a substrate chain and provides rich, domain-specific, and highly customizable access to the blockchain data, far beyond the scope of direct RPC calls. For example, expired [Kusama Treasury](https://wiki.polkadot.network/docs/en/learn-treasury) spending [proposals](https://kusama.subscan.io/event?module=Treasury&event=Proposed) are pruned from the state of the[ Kusama blockchain](https://polkascan.io/kusama), so querying, say, one-year-old proposals becomes problematic. Indeed, one has to track the evolution of the state by sequentially applying the Treasury events and extrinsics in each historical block.
-
-That's where Hydra gets you covered. Define your data model and the Hydra indexer will get it in sync with the chain. On top of that, you get a batteries-included GraphQL server with comprehensive filtering, pagination, and even full-text search capabilities. 
-
-## What's next?
-
-* Explore live Hydra GraphQL server [playground](https://hakusama.joystream.app/graphql) and query historical Kusama Treasury proposals 
-* [Install](install-hydra.md) Hydra toolkit 
-* Hydra [tutorial](quick-start.md): spin a Hydra Indexer and GraphQL server in under five minutes
-* Look at the [examples](../examples/) 
-* Learn how to define your own data [schema](schema-spec/) and [mappings](mappings/) to run a Hydra Indexer
-

+ 0 - 19
query-node/docs/architecture.md

@@ -1,19 +0,0 @@
----
-description: A more in-depth look at how Hydra works under the hood
----
-
-# Architecture
-
-A Hydra query node consists of the following core parts:
-
-* Blockchain Indexer
-* PostgreSQL \(Data Storage\)
-* GraphQL Server
-* GraphQL-like data [schema](https://github.com/dzhelezov/joystream/tree/f07cb27a73ec74292811648cee8a92d8fab3b6c9/query-node/docs/schema.md) & event [mappings](https://github.com/dzhelezov/joystream/tree/f07cb27a73ec74292811648cee8a92d8fab3b6c9/query-node/docs/mappings.md)
-
-Hydra takes as an input a high-level GraphQL-like schema modeling the blockchain data \("entities"\) to be indexed. The mappings describe the event handlers telling the indexer how the blockchain events affect the schema entities.
-
-Once the schema and the mappings are set up, the Indexer prepares the database and starts the continuous scan of the blockchain, processing the events through the mappings and updating the entities in the database.
-
-The GraphQL Server is a separate web server providing a [GraphQL](https://graphql.org/) API for the entities in the data store. The API requests are resolved by the server into database queries, providing quick access to the most recent state of the entities. OpenCRUD filtering, entity relations, pagination, and text queries are supported out-of-the-box by the API.
-

+ 0 - 140
query-node/docs/entity-relationship.md

@@ -1,140 +0,0 @@
-# GraphQL Entity Relationships
-
-### One-To-One (1:1) Relationships
-
-In One-To-One relation, one entity instance is related to only one instance of another entity. One side of the relationship should always derive.
-
-```graphql
-type User @entity {
-	name: String!
-	profile: Profile! @derivedFrom(field: "user")
-}
-
-type Profile @entity {
-	avatar: String!
-	user: User!
-}
-```
-
-Database tables:
-
-```
-          user
-| Column  | Type
-----------|-------
-| id      | character varying
-| name    | character varying
-```
-
-```
-          profile
-| Column  | Type
-----------|-------
-| id      | character varying
-| avatar  | character varying
-| userId  | character varying FOREIGN KEY UNIQUE CONSTRAINT
-```
-
-### One-To-Many (1:n) Relationships
-
-In One-To-Many relation, one entity instance is related to multiple instance of the other entity.
-
-```graphql
-type User @entity {
-	name: String
-}
-
-type Post @entity {
-	title: String
-	author: User!
-}
-```
-
-Database table for the `Post` entity:
-
-```
-          post
-| Column  | Type
-----------|-------
-| id      | character varying
-| avatar  | character varying
-| authorId  | character varying FOREIGN KEY
-```
-
-The only difference between `1:1` and `1:n` is the unique constraint that `1:1` has.
-
-### Many-To-Many (n:n) Relationships
-
-Many-To-Many is a relationship where one entity instance is related to many instance of other entity and vice-versa. In this relationship one side of the relation must derive.
-
-```graphql
-type User @entity {
-	name: String
-	books: [Book!] @derivedFrom(field: "authors")
-}
-
-type Book @entity {
-	title: String
-	authors: [User!]
-}
-```
-
-A junction table is created for n:n relationship.
-
-Database tables:
-
-```
-          book
-| Column  | Type
-----------|-------
-| id      | character varying
-| title   | character varying
-```
-
-```
-          book_user
-| Column  | Type
-----------|-------
-| book_id | character varying
-| user_id | character varying
-```
-
-### Reverse Lookups
-
-Defining reverse lookups on an entity allows you to query other side of the relation. Use `@derivedFrom` directive to add reverse lookup to an entity.
-
-**Example**
-If we want to access a user's `posts` from the user entity we should add a derived field to `User` entity:
-
-```graphql
-type User @entity {
-	name: String
-	posts: [Post!] @derivedField(field: "author")
-}
-
-type Post @entity {
-	title: String
-	author: User!
-}
-```
-
-## Relationships In Mappings
-
-Each GraphQL entity has a corresponding typeorm entity and we use these entities to perform CRUD operations.
-
-**Example**
-
-We will create a new post for an existing user:
-
-```ts
-export async function handleNewPost(db: DB, event: SubstrateEvent) {
-	const { userId, title } = event.params;
-	const user = await db.get(User, { where: { id: userId } });
-
-	const newPost = new Post();
-	newPost.title = title;
-	newPost.author = user;
-
-	db.save<Post>(newPost);
-}
-```

+ 0 - 0
query-node/docs/indexer.md


+ 0 - 53
query-node/docs/install-hydra.md

@@ -1,53 +0,0 @@
-# Install Hydra
-
-## Prerequisites
-
-* Both Hydra-CLI and the generated project files have dependencies that require Node v10.16 or higher
-* `npm` and \(optional, but recommended\) [`npx`](https://www.npmjs.com/package/npx)
-* Hydra stores the substrate data in an external PostgresSQL 12 instance. The scaffolding tool provides a convenient shortcut for running the database instance from a Docker image. In this case the standard docker environment \(`docker` and `docker-compose`\) should be available.
-* \(Optional\) [Docker engine](https://docs.docker.com/engine/install/). The scaffolding tool provides targets for building Docker images for external deployment.
-
-## Installation
-
-{% hint style="warning" %}
-The npm repository and the`hydra-cli`version will likely change in the near future. In such a case simply replace `@dzlzv/hydra-cli`with`<npm_repo>/hydra-cli@<version>` in the instructions below ``
-{% endhint %}
-
-_Global installation:_
-
-```bash
-npm install -g @dzlzv/hydra-cli
-```
-
-The path to `hydra-cli` binaries will be added to the system-wide `$PATH`.
-
-_Local installation:_
-
-```bash
-npm install @dzlzv/hydra-cli
-```
-
-The binaries will be installed to the local `.bin` folder. You can execute `hydra-cli` commands by adding the`.bin`folder within your local `node_modules` to `$PATH`.
-
-_Isolated set-up:_
-
-Execute `hydra-cli` commands directly by typing
-
-```bash
-npx @dzlzv/hydra-cli <command>
-```
-
-This provides an isolated way to execute `hydra-cli` commands. 
-
-{% hint style="success" %}
-Run `hydra-cli --version` to check your installation
-{% endhint %}
-
-{% hint style="info" %}
-It may be convenient to create an alias for quick access to `hydra-cli` e.g.
-
-```text
-alias hydra-cli='npx @dzlzv/hydra-cli'
-```
-{% endhint %}
-

+ 0 - 73
query-node/docs/manifest-spec.md

@@ -1,73 +0,0 @@
-# Query Node Manifest
-
-## Overview
-
-The query node manifest specifies the extract-transform-load processes run by a query node. A query
-node ingests raw events and data from a substrate chain and transforms and loads to the downstream
-_sink_ sources as specified by the manifest. The manifest loosely follows the subgraph manifest of by the graph protocol.
-
-## Top Level API
-
-| Field  | Type | Description   |
-| --- | --- | --- |
-| **specVersion** | *String*   | A Semver version indicating which version of this API is being used.|
-| **description** | *String* | An optional description of the substrate chain. |
-| **repository**  | *String* | An optional link to where the subgraph lives. |
-| **dataSources** | Data Source Spec | Each data source spec defines the data that will be ingested |
-| **schema**   | [*String*] | Path to the GraphQL schema augmented with directives supporting e.g. elasticsearch indices |
-
-## Schema
-
-Schema is a GraphQL spec
-
-## Data Source
-
-| Field | Type | Description |
-| --- | --- | --- |
-| **kind** | *String* | The type of data source. Possible values: *substrate/index*.|
-| **name** | *String* | The name of the source data. Will be used to generate APIs in the mapping and also for self-documentation purposes. |
-| **network** | *String* | For blockchains, this describes which network the subgraph targets. For substrate network, this should specify substrate network name, e.g. 'joystream/constaninople' |
-| **source** | [*Source*] | The source data on a substrate blockchain. |
-| **startBlock** | integer | Block height to start from |
-
-### Mapping
-
-The `mapping` field may be one of the following supported mapping manifests:
-
-| Field | Type | Description |
-| --- | --- | --- |
-| **kind** | *String* | Must be "substrate/bootstrap" for Substrate Bootstrap Mapping. |
-| **apiVersion** | *String* | Semver string of the version of the Mappings API that will be used by the mapping script. |
-| **language** | *String* | The language of the runtime for the Mapping API. Possible values: *wasm/assemblyscript*. |
-| **file** | [*Path*](#16-path) | The path of the mapping script. |
-
-> **Note:** Each mapping is required to supply one or more handler type, available types: `EventHandler`, `CallHandler`, `BlockHandler` or `BootHandler`.
-
-#### BootHandler
-
-| Field | Type | Description |
-| --- | --- | --- |
-| **entity** | *String* | Entity that should be loaded
-| **handler** | *String* | Function name to be called
-
-#### EventHandler
-
-| Field | Type | Description |
-| --- | --- | --- |
-| **event** | *String* | An identifier for an event that will be handled in the mapping script. For Ethereum contracts, this must be the full event signature to distinguish from events that may share the same name. No alias types can be used. For example, uint will not work, uint256 must be used.|
-| **handler** | *String* | The name of an exported function in the mapping script that should handle the specified event. |
-| **topic0** | optional *String* | A `0x` prefixed hex string. If provided, events whose topic0 is equal to this value will be processed by the given handler. When topic0 is provided, _only_ the topic0 value will be matched, and not the hash of the event signature. This is useful for processing anonymous events in Solidity, which can have their topic0 set to anything.  By default, topic0 is equal to the hash of the event signature. |
-
-#### CallHandler
-
-| Field | Type | Description |
-| --- | --- | --- |
-| **function** | *String* | An identifier for a function that will be handled in the mapping script. For Ethereum contracts, this is the normalized function signature to filter calls by. |
-| **handler** | *String* | The name of an exported function in the mapping script that should handle the specified event. |
-
-#### BlockHandler
-
-| Field | Type | Description |
-| --- | --- | --- |
-| **handler** | *String* | The name of an exported function in the mapping script that should handle the specified event. |
-| **filter** | optional *String* | The name of the filter that will be applied to decide on which blocks will trigger the mapping. If none is supplied, the handler will be called on every block. |

+ 0 - 51
query-node/docs/mappings/README.md

@@ -1,51 +0,0 @@
----
-description: Mappings describe how Substate events should be handled by the indexer
----
-
-# Mappings
-
-A mapping file is a standalone typescript module defining how the Substrate events of interest should be handled by the Hydra indexer.
-
-The event handlers \(aka _mappings_\) should by convention be named `handle<EventName>` , so, for example, a handle for `trasury.Proposal` event should be named `handleProposal` 
-
-Each handler must have exactly two arguments exported by the Indexer: the `db` handle which gives access to the database and `SubstrateEvent` which contains all the necessary data extracted by the indexer from the Substrate chain.
-
-Let us look at the sample mapping generated by the scaffolder
-
-```typescript
-import { SubstrateEvent, DB } from '../generated/indexer';
-import { Proposal } from '../generated/graphql-server/src/modules/proposal/proposal.model';
-import { ProposalStatus } from '../generated/graphql-server/src/modules/enums/enums';
-import { assert } from 'console';
-import * as BN from 'bn.js';
-
-// New proposal
-export async function handleProposed(db: DB, event: SubstrateEvent) {
-  const { ProposalIndex } = event.event_params;
-  if (event.extrinsic) {
-    const proposal = new Proposal();
-    proposal.proposalIndex = new BN(ProposalIndex.toString());
-    proposal.value = new BN(event.extrinsic.args[0].toString());
-    proposal.bond = new BN(event.extrinsic.args[0].toString());
-    proposal.beneficiary = Buffer.from(event.extrinsic.args[1].toString());
-    proposal.proposer = Buffer.from(event.extrinsic.signer.toString());
-    proposal.status = ProposalStatus.NONE;
-
-    await db.save<Proposal>(proposal);
-  }
-}
-```
-
-Note that required entity classes are exported from 
-
-```text
-../generated/graphql-server/src/modules/<entity type>/<entity type>
-```
-
-and this is where all the auto-generated classes live by default.
-
-Next, the body of the handler transforms the event parameters and extrinsic arguments into the properties of the entity. There is currently no way to enforce type safety here and one should instead inspect the event parameters and extrinsics for the event in question. In the example above, we can consult the Kusama [explorer](https://kusama.subscan.io/extrinsic/0x1bba67ddb62117fc64710e35b6ccbef64d4df528d78310ccca725137e75823d4?event=2022835-5) and check that 
-
-* `ProposalIndex` is a single named param of `treasury.Proposed` event
-* The extrinsic has to arguments: `value` and `beneficiary`, propagated to the entity in a straightforward fashion.
-

+ 0 - 41
query-node/docs/mappings/databasemanager.md

@@ -1,41 +0,0 @@
----
-description: A closer look at the database handle passed as a first argument to the mappers
----
-
-# DatabaseManager
-
-The database handler is a proxy for the DatabaseManager and incapsulates the standard CRUD database operations:
-
-```typescript
-/**
- * Database access interface. Use typeorm transactional entity manager to perform get/save/remove operations.
- */
-export default interface DatabaseManager {
-  /**
-   * Save given entity instance, if entity is exists then just update
-   * @param entity
-   */
-  save<T>(entity: DeepPartial<T>): Promise<void>;
-
-  /**
-   * Removes a given entity from the database.
-   * @param entity: DeepPartial<T>
-   */
-  remove<T>(entity: DeepPartial<T>): Promise<void>;
-
-  /**
-   * Finds first entity that matches given options.
-   * @param entity: T
-   * @param options: FindOneOptions<T>
-   */
-  get<T>(entity: { new (...args: any[]): T }, options: FindOneOptions<T>): Promise<T | undefined>;
-
-  /**
-   * Finds entities that match given options.
-   * @param entity: T
-   * @param options: FindOneOptions<T>
-   */
-  getMany<T>(entity: { new (...args: any[]): T }, options: FindOneOptions<T>): Promise<T[]>;
-}
-```
-

+ 0 - 31
query-node/docs/mappings/substrateevent.md

@@ -1,31 +0,0 @@
----
-description: >-
-  Interface containing the required information about the emitted Substrate
-  event
----
-
-# SubstrateEvent
-
-The`SubstrateEvent` object is passed as the second argument for each event handler and contains all the essential information about the event being processed by Hydra Indexer. Let us take a closer look at the interface. 
-
-```typescript
-import { Extrinsic } from '@polkadot/types/interfaces';
-import { Codec } from '@polkadot/types/types';
-import * as BN from 'bn.js';
-
-interface EventParameters {
-  [key: string]: Codec;
-}
-
-export interface SubstrateEvent {
-  event_name: string;
-  event_method: string;
-  event_params: EventParameters;
-  index: BN;
-  block_number: BN;
-  extrinsic?: Extrinsic;
-}
-```
-
-As can be seen above,  the key information about the event is encapsulated by the `Extrinsic` interface of the `@polkadot` libraries. Therefore, unfortunately, the actual data payload passed to the mappers highly depends on the event and the underlying Substrate chain. A more user-friendly and type-safe approach is in the works and will be introduced in the future versions of Hydra.
-

+ 0 - 106
query-node/docs/quick-start.md

@@ -1,106 +0,0 @@
----
-description: Build a Hydra Indexer and GraphQL server from scratch under five minutes
----
-
-# Tutorial
-
-{% hint style="info" %}
-Before starting, make sure`hydra-cli`is [installed](install-hydra.md) on your machine together with all the prerequisites. 
-{% endhint %}
-
-## 0. Hello Hydra!
-
-Start off by setting up a project folder
-
-```bash
-mkdir hello-hydra && cd hello-hydra
-```
-
-## 1. From zero to one
-
-Next, run the scaffold command, which generates all the required files:
-
-```bash
-hydra-cli scaffold
-```
-
-Answer the prompts and the scaffolder will generate a sample backbone for our Hydra project. This includes:
-
-* Sample GraphQL data [schema](schema-spec/) in `schema.graphql` describing proposals in the Kusama network
-* Sample [mapping](mappings/) scripts in the `./mapping` folder translating substrate events into the `Proposal` entity CRUD operations
-* `docker-compose.yml` for running a Postgres instance locally as a Docker service.
-* `.env` with all the necessary environment variables.
-* `package.json` with a few utility yarn scripts to be used later on.
-
-## 2. Codegen
-
-Now all is set for generating the Graphql server and the indexer for Kusama proposals:
-
-```bash
-hydra-cli codegen
-```
-
-The codegen command creates two separate projects:
-
-* `./generated/graphql-server`: this is a GraphQL for querying the proposals
-* `./generated/indexer`: this is a background indexer tool that fetches the blocks from the Substrate chain \(in this case the public Kusama network\) and updates the database calling the mapping scripts
-
-## 3. Set up the database
-
-Now it's time to set up the database:
-
-```bash
-yarn db:start
-```
-
-This command simply spins up a Postgres Docker image.
-
-```bash
-yarn db:bootstrap
-```
-
-This creates a DB schema for our data model described in `schema.graphql`.
-
-## 4. Start Hydra Indexer
-
-Finally, we're ready to run the indexer and the GraphQL server:
-
-```bash
-yarn indexer:start
-```
-
-Keep an eye on the output to keep track of the indexer's progress.
-
-## 5. Start Hydra GraphQL server
-
-In a separate terminal window:
-
-```bash
-yarn server:start:dev
-```
-
-The last command starts the server in the dev mode and you will see a GraphQL playground opening in your browser \(if not, navigate manually to `localhost:4000/graphql`\). It's time to explore all the GraphQL queries supported out-of-the-box! Note, that depending on the starting block it may take a considerable time for the indexer to catch up with the Kusama network, and until then queries may return empty results.
-
-## 6. Dockerize
-
-Among other things, the scaffolder generates a top-level `package.json`with a bunch of convenient `yarn` targets. For example, putting your Hydra Indexer and GraphQL server is easy as running the following targets:
-
-```bash
-yarn docker:indexer:build
-```
-
-```bash
-yarn docker:server:build
-```
-
-This will create Docker images named `hydra-indexer` and `hydra-graphql-server`
-
-## What to do next?
-
-* Explore more [examples](../examples/)
-* Describe your own [schema](schema-spec/) in `schema.graphql`
-* Write your indexer [mappings](mappings/)
-* Push your Hydra indexer and GraphQL Docker images to [Docker Hub](https://hub.docker.com/) and deploy  
-
-
-

+ 0 - 15
query-node/docs/schema-spec.md

@@ -1,15 +0,0 @@
-# Query Node schema
-
-## Overview
-
-The query node schema is a graphql schema file encriched with directives explained below.
-The schema is used by `cli codegen` in order to generate a GraphQL API server for quering the
-substrate blockchain data.
-
-## Entities
-
-TBD
-
-## Derivatives
-
-TBD

+ 0 - 16
query-node/docs/schema-spec/README.md

@@ -1,16 +0,0 @@
----
-description: >-
-  The schema file describes your domain objects, relationships and the supported
-  queries.
----
-
-# Schema
-
-## Overview
-
-Hydra input schema is a dialect of the GraphQL schema definition language enriched with the additional directives and built-in primitive types described in what follows. The input schema is consumed by `hydra-cli codegen` to generate the entity classes for the database and the final API GraphQL schema served by the server. The latter is auto-generated and can be previewed by running 
-
-```text
-$ hydra-cli preview && cat apipreview.graphql
-```
-

+ 0 - 51
query-node/docs/schema-spec/entities.md

@@ -1,51 +0,0 @@
----
-description: Entities is the backbone of the data model and translate into the db schema
----
-
-# Entities
-
-Entities are the top-level type definitions in the input schema marked with the `@entity` directive. Entity fields are normally built-in scalar types but can also be 
-
-* an array of a primitive types
-* an [enum](enums.md),
-* an [entity reference](entity-relationship.md)
-* an [algebraic type ](variant-types.md)
-
-All entities have an auto-generated `ID` field which is reserved and cannot be used in the input schema.
-
-### Primitive types
-
-The following scalar types are supported:
-
-* `Boolean`
-* `String`
-* `Int`
-* `Float`
-* `BigInt` supports arbitrarily large numbers and is useful for representing e.g. large numbers `uint256`
-* `Bytes`
-
-Arrays follow the GraphQL [spec](https://spec.graphql.org/June2018/).
-
-### Modifiers and decorators 
-
-By default, each field is nullable. To indicate a no-null constraint mark the field with `!`
-
-If a property must be unique across all entities of the given type, mark it with a built-in `@unique` directive
-
-Schema comments are natively supported and are propagated to the output schema
-
-### Example
-
-```graphql
-"It is just a boring nine-five person"
-type Person @entity {
-    name: String!
-    married: Boolean
-    age: Int
-    "one person, one account, one live"
-    account: Bytes! @unique
-    salary: BigInt
-    interests: [String]
-}
-```
-

+ 0 - 144
query-node/docs/schema-spec/entity-relationship.md

@@ -1,144 +0,0 @@
----
-description: 'Define one-to-one, one-to-many and many-to-many relationships between entities'
----
-
-# Entity Relationships
-
-### One-To-One \(1:1\) Relationships
-
-In One-To-One relation, one entity instance is related to only one instance of another entity. One side of the relationship should always derive.
-
-```graphql
-type User @entity {
-    name: String!
-    profile: Profile! @derivedFrom(field: "user")
-}
-
-type Profile @entity {
-    avatar: String!
-    user: User!
-}
-```
-
-Database tables:
-
-```text
-          user
-| Column  | Type
-----------|-------
-| id      | character varying
-| name    | character varying
-```
-
-```text
-          profile
-| Column  | Type
-----------|-------
-| id      | character varying
-| avatar  | character varying
-| userId  | character varying FOREIGN KEY UNIQUE CONSTRAINT
-```
-
-### One-To-Many \(1:n\) Relationships
-
-In One-To-Many relation, one entity instance is related to multiple instances of the other entity.
-
-```graphql
-type User @entity {
-    name: String
-}
-
-type Post @entity {
-    title: String
-    author: User!
-}
-```
-
-Database table for the `Post` entity:
-
-```text
-          post
-| Column  | Type
-----------|-------
-| id      | character varying
-| avatar  | character varying
-| authorId  | character varying FOREIGN KEY
-```
-
-The only difference between `1:1` and `1:n` is the unique constraint that `1:1` has.
-
-### Many-To-Many \(n:n\) Relationships
-
-Many-To-Many is a relationship where one entity instance is related to a collection of instances of other entities and vice-versa. In this relationship, one side of the relation must derive.
-
-```graphql
-type User @entity {
-    name: String
-    books: [Book!] @derivedFrom(field: "authors")
-}
-
-type Book @entity {
-    title: String
-    authors: [User!]
-}
-```
-
-A junction table is created for n:n relationship.
-
-Database tables:
-
-```text
-          book
-| Column  | Type
-----------|-------
-| id      | character varying
-| title   | character varying
-```
-
-```text
-          book_user
-| Column  | Type
-----------|-------
-| book_id | character varying
-| user_id | character varying
-```
-
-### Reverse Lookups
-
-Defining reverse lookups on an entity allows you to query the other side of the relation. Use `@derivedFrom` directive to add a reverse lookup to an entity.
-
-**Example** If we want to access a user's `posts` from the user entity we should add a derived field to `User` entity:
-
-```graphql
-type User @entity {
-    name: String
-    posts: [Post!] @derivedField(field: "author")
-}
-
-type Post @entity {
-    title: String
-    author: User!
-}
-```
-
-## Relationships In Mappings
-
-Each GraphQL entity has a corresponding TypeORM entity and we use these entities to perform CRUD operations.
-
-**Example**
-
-We will create a new post for an existing user:
-
-```typescript
-export async function handleNewPost(db: DB, event: SubstrateEvent) {
-    const { userId, title } = event.params;
-    const user = await db.get(User, { where: { id: userId } });
-
-    const newPost = new Post();
-    newPost.title = title;
-    newPost.author = user;
-
-    db.save<Post>(newPost);
-}
-```
-

+ 0 - 17
query-node/docs/schema-spec/enums.md

@@ -1,17 +0,0 @@
-# Enums
-
-Enums are natively supported as described the GraphQL schema [spec](https://spec.graphql.org/June2018/#sec-Enums). Here is an illustrative example:
-
-```text
-enum {
-  NONE
-  REJECTED
-  APPROVED
-}
-
-type Proposal @entity {
-  status: ProposalStatus
-  bond: BigInt!
-}
-```
-

+ 0 - 55
query-node/docs/schema-spec/full-text-queries.md

@@ -1,55 +0,0 @@
----
-description: Run cross-field and cross-entity full-text queries
----
-
-# Full-text queries
-
-Full-text queries are able to search across a large amount of text data and aggregate the results across multiple fields and even entities. The query output provides the result rank and a highlight if there is a text match. 
-
-In order to enable full-text search queries in the API, decorate any number of `String`fields with `@fulltext(query: <query_name>)` decorator, like this:
-
-```graphql
-type Post @entity{
-   title: String @fulltext(query: "forum"),
-   body: String @fulltext(query: "forum")
-}
-
-type Comment @entity {
-   text: String @fulltext(query: "forum")
-}
-```
-
-The generated output schema will define the required output type and the query:
-
-```graphql
-type SearchResult {
-   item: Post | Comment,
-   rank: number, 
-   highligt: String
-}
-
-type Query {
-   forum(text: String, limit?: Int): SearchResult[]
-}
-```
-
-One can now run similarity query:
-
-```graphql
-query {
-   forum(text: "some partially matching text", limit: 5) {
-      rank
-      highlight 
-      item {
-         ... on Post {
-            body
-         }
-         ... on Comment {
-            title
-         }
-      }
-       
-   }
-}
-```
-

+ 0 - 43
query-node/docs/schema-spec/interfaces.md

@@ -1,43 +0,0 @@
----
-description: Extract interfaces and query multiple types in a single query
----
-
-# Interfaces
-
-Interfaces are useful when several entity types share some set of properties and one would like to have an aggregated result when such a common property is queried.
-
-This is achieved through the natively supported GraphQL [interface](https://graphql.org/learn/schema/#interfaces) type and [inline fragments](https://graphql.org/learn/queries/#inline-fragments) in the output schema. For example, let us define the following input schema:
-
-```graphql
-interface Profile {
-    about: String!
-}
-
-type Member implements About @entity {
-    about: String!
-    handle: String!
-}
-
-type Account implements Abount @entity {
-    about: String!
-    accountId: Bytes   
-}
-```
-
-The output schema will support a query by `about` which puts together `Member` and `Account` types. Note that `orderBy` is also supported for the inherited properties as well as OpenCRUD.
-
-```graphql
-query {
-  profiles(limit: 5, offset: 5, orderBy: about_ASC, where: { about_eq: "joystreamer" }) {
-    about
-    __typename 
-    ... on Member {
-      handle
-    }
-    ... on Account {
-      accountId
-    }
-  }
-}
-```
-

+ 0 - 57
query-node/docs/schema-spec/the-query-goodies.md

@@ -1,57 +0,0 @@
----
-description: >-
-  The output schema automatically supports OpenCRUD filtering, pagination and
-  ordering
----
-
-# The Goodies
-
-### Filtering
-
-All the scalar entity types enjoy first-class support in the output schema when it comes to filtering. The standard is known as [OpenCRUD](https://www.opencrud.org/) and dictates who filtering should look like depending on the field type. For example, if the input schema defines the following type:
-
-```graphql
-type Person @entity {
-    name: String!
-    married: Boolean
-    age: Int
-    account: Bytes! @unique
-    salary: BigInt
-    interests: [String]
-}
-```
-
-the output schema will support the following query:
-
-```text
-query {
-    persons(where: { name_startsWith: "Joh", age_gt: 20 }) {
-      name
-    }
-}
-```
-
-### Pagination
-
-All queries enjoy support of pagination by accepting `offset` and `limit` input parameters. By default, `limit` is set to 5.
-
-```graphql
-query {
-    persons(offset: 10, limit: 5) {
-      name
-    }
-}
-```
-
-### Ordering
-
-The results can also be ordered by any property with natural ordering. `_DESC`an  `_ASC` suffixes indicate the direction:
-
-```graphql
-query {
-    persons(offset: 10, limit: 5, orderBy: name_ASC) {
-      name
-    }
-}
-```
-

+ 0 - 54
query-node/docs/schema-spec/variant-types.md

@@ -1,54 +0,0 @@
-# Algebraic types
-
-One can construct complex types by defining unions of special non-entity type definitions decorated with `@variant`. The resulting complex type is mapped into JSON at the database level and should be prefixed with `_json` in when queried through the API. Here is an example
-
-```graphql
-type Miserable @variant {
-  hates: String!
-}
-
-type HappyPoor @variant {
-  isMale: boolean
-}
-
-union Poor = HappyPoor | Miserable
-
-type MiddleClass @variant {
-  father: Poor
-  mother: Poor
-}
-
-type Rich @variant {
-  bank: EntityC
-}
-
-union Status = Poor | MiddleClass | HappyPoor | Miserable
-
-type Account @entity {
-  status: Status!
-}
-```
-
-The resulting API will support [inline fragments](https://graphql.org/learn/schema/#union-types) and type resolutions:
-
-```graphql
-query {
-	accounts(limit: 5, orderBy: about_ASC, where: { status_json: { father: { isMale_eq: true }} }) {
-    about
-    status {
-      __typename 
-      ... on MiddleClass {
-        father {
-          ... on HappyPoor {
-            isMale
-          }
-          ... on Miserable {
-            hates
-          }
-        }
-      }
-    }
-  }
-}
-```
-

+ 0 - 2
query-node/examples/README.md

@@ -1,2 +0,0 @@
-# examples
-

+ 0 - 2
query-node/examples/kusama-query-node.md

@@ -1,2 +0,0 @@
-# kusama-query-node
-

+ 0 - 11
query-node/examples/kusama-query-node/.env

@@ -1,11 +0,0 @@
-WS_PROVIDER_ENDPOINT_URI=wss://kusama-rpc.polkadot.io/
-QUERY_NODE_BOOTSTRAP_DB=true
-BOOTSTRAP_PACK_LOCATION=../../bootstrap
-DB_NAME=query_node
-BLOCK_HEIGHT=3212286
-DB_USER=postgres
-DB_PASS=postgres
-DB_HOST=localhost
-DB_PORT=5432
-GRAPHQL_SERVER_PORT=4000
-DEBUG=index-builder:*

+ 0 - 1
query-node/examples/kusama-query-node/README.md

@@ -1 +0,0 @@
-# kusama-query-node

BIN
query-node/examples/kusama-query-node/mappings/.DS_Store


+ 0 - 1
query-node/examples/kusama-query-node/mappings/index.ts

@@ -1 +0,0 @@
-export * from './treasury';

+ 0 - 2
query-node/examples/kusama-query-node/mappings/treasury/index.ts

@@ -1,2 +0,0 @@
-export * from './proposal';
-export * from './tip';

+ 0 - 47
query-node/examples/kusama-query-node/mappings/treasury/proposal.ts

@@ -1,47 +0,0 @@
-import { SubstrateEvent, DB } from '../../generated/indexer';
-import { Proposal } from '../../generated/graphql-server/src/modules/proposal/proposal.model';
-import { ProposalStatus } from '../../generated/graphql-server/src/modules/enums/enums';
-import { assert } from 'console';
-import * as BN from 'bn.js';
-
-// New proposal
-export async function treasuryProposed(db: DB, event: SubstrateEvent) {
-  const { ProposalIndex } = event.event_params;
-  if (event.extrinsic) {
-    const proposal = new Proposal();
-    proposal.proposalIndex = new BN(ProposalIndex.toString());
-    proposal.value = new BN(event.extrinsic?.args[0].toString());
-    proposal.bond = new BN(event.extrinsic?.args[0].toString());
-    proposal.beneficiary = Buffer.from(event.extrinsic?.args[1].toString());
-    proposal.proposer = Buffer.from(event.extrinsic?.signer.toString());
-    proposal.status = ProposalStatus.NONE;
-
-    await db.save<Proposal>(proposal);
-  }
-}
-
-// A proposal was rejected
-export async function treasuryRejected(db: DB, event: SubstrateEvent) {
-  const { ProposalIndex } = event.event_params;
-  const proposal = await db.get(Proposal, { where: { proposalIndex: ProposalIndex.toString() } });
-
-  assert(proposal, 'Proposal not found! Invalid proposal id');
-
-  if (proposal) {
-    proposal.status = ProposalStatus.REJECTED;
-    await db.save<Proposal>(proposal);
-  }
-}
-
-// A proposal is approved! Some funds have been allocated.
-export async function treasuryAwarded(db: DB, event: SubstrateEvent) {
-  const { ProposalIndex } = event.event_params;
-  const proposal = await db.get(Proposal, { where: { proposalIndex: ProposalIndex.toString() } });
-
-  assert(proposal, 'Proposal not found! Invalid proposal id');
-
-  if (proposal) {
-    proposal.status = ProposalStatus.APPROVED;
-    await db.save<Proposal>(proposal);
-  }
-}

+ 0 - 77
query-node/examples/kusama-query-node/mappings/treasury/tip.ts

@@ -1,77 +0,0 @@
-import { DB, SubstrateEvent } from '../../generated/indexer';
-import { Tip } from '../../generated/graphql-server/src/modules/tip/tip.model';
-import { Tipper } from '../../generated/graphql-server/src/modules/tipper/tipper.model';
-import { assert } from 'console';
-import * as BN from 'bn.js';
-
-export async function treasuryNewTip(db: DB, event: SubstrateEvent) {
-  const { Hash } = event.event_params;
-  const { extrinsic } = event;
-
-  if (extrinsic) {
-    const tip = new Tip();
-    tip.reason = Buffer.from(Hash.toString());
-    tip.who = Buffer.from(extrinsic.args[1]);
-    tip.retracted = false;
-    tip.finder = Buffer.from(extrinsic?.signer.toString());
-
-    const runtimeFuncName = extrinsic.meta.name.toString();
-    // check runtime function name that emit the event
-    tip.findersFee = runtimeFuncName === 'report_awesome';
-
-    db.save<Tip>(tip);
-
-    // NewTip event can be fired from different runtime functions
-    if (runtimeFuncName !== 'report_awesome') {
-      //Give a tip for something new; no finder's fee will be taken.
-      const t = new Tipper();
-      t.tipValue = new BN(extrinsic.args[2].toString());
-      t.tipper = Buffer.from(extrinsic?.signer.toString());
-      t.tip = tip;
-      db.save<Tipper>(t);
-    }
-  }
-}
-
-export async function treasuryTipRetracted(db: DB, event: SubstrateEvent) {
-  const { Hash } = event.event_params;
-  const tip = await db.get(Tip, { where: { reason: Buffer.from(Hash.toString()) } });
-
-  assert(tip, 'Invalid reason hash!');
-  if (tip) {
-    tip.retracted = true;
-    db.save<Tip>(tip);
-  }
-}
-
-// A tip suggestion has reached threshold and is closing.
-export async function treasuryTipClosing(db: DB, event: SubstrateEvent) {
-  const { Hash } = event.event_params;
-  const { extrinsic } = event;
-  const tip = await db.get(Tip, { where: { reason: Buffer.from(Hash.toString()) } });
-
-  assert(tip, 'Invalid reason hash!');
-  if (tip && extrinsic) {
-    const t = new Tipper();
-    t.tipper = Buffer.from(extrinsic?.signer.toString());
-    t.tipValue = new BN(extrinsic.args[1].toString());
-    t.tip = tip;
-    db.save<Tipper>(t);
-
-    tip.closes = new BN(event.block_number.toString());
-    db.save<Tip>(tip);
-  }
-}
-
-// A tip suggestion has reached threshold and is closing.
-export async function treasuryTipClosed(db: DB, event: SubstrateEvent) {
-  const { Hash, AccountId } = event.event_params;
-  const { extrinsic } = event;
-  const tip = await db.get(Tip, { where: { reason: Buffer.from(Hash.toString()) } });
-
-  assert(tip, 'Invalid reason hash!');
-
-  if (tip && extrinsic) {
-    tip.who = Buffer.from(AccountId.toString());
-  }
-}

+ 0 - 11
query-node/examples/kusama-query-node/package.json

@@ -1,11 +0,0 @@
-{
-  "name": "kusama-query-node",
-  "version": "1.0.0",
-  "main": "index.js",
-  "license": "MIT",
-  "dependencies": {
-    "@types/bn.js": "^4.11.6",
-    "bn.js": "^5.1.2",
-    "tslib": "^2.0.0"
-  }
-}

+ 0 - 57
query-node/examples/kusama-query-node/schema.graphql

@@ -1,57 +0,0 @@
-enum ProposalStatus {
-  NONE
-  REJECTED
-  APPROVED
-}
-
-"A spending proposal"
-type Proposal @entity {
-  "The account proposing it"
-  proposer: Bytes!
-
-  "The (total) amount that should be paid if the proposal is accepted"
-  value: BigInt!
-
-  "The account to whom the payment should be made if the proposal is accepted"
-  beneficiary: Bytes!
-
-  "The amount held on deposit (reserved) for making this proposal"
-  bond: BigInt!
-
-  proposalIndex: BigInt! @unique
-
-  status: ProposalStatus
-}
-
-"The members who have voted for the tip."
-type Tipper @entity {
-  tip: Tip!
-  tipper: Bytes!
-  tipValue: BigInt!
-}
-
-type Tip @entity {
-  "The hash of the reason for the tip."
-  reason: Bytes! @unique
-
-  "The account to be tipped."
-  who: Bytes!
-
-  "The account who began this tip."
-  finder: Bytes!
-
-  "The amount held on deposit for this tip."
-  deposit: BigInt
-
-  "The block number at which this tip will close if Some."
-  closes: BigInt
-
-  "The members who have voted for this tip."
-  tippers: [Tipper!] @derivedFrom(field: "tip")
-
-  "Whether this tip should result in the finder taking a fee."
-  findersFee: Boolean!
-
-  "Cancel the process of tipping"
-  retracted: Boolean!
-}

+ 0 - 145
query-node/joystream-query-node.md

@@ -1,145 +0,0 @@
-# Joystream Query Node
-
-Joystream query node can be generated by using `substrate-query-node/cli`.
-
-## Getting Started
-
-Cli create a folder named `generated` and put everthing inside it.
-
-```text
-$ cli codegen
-```
-
-Start graphql server:
-
-```text
-$ cd generated/graphql-server
-$ yarn start:dev
-```
-
-Start block indexer:
-
-```text
-$ cd generated/indexer
-$ yarn start
-```
-
-## Add a new mapping for Joystream MemberRegistered event
-
-1. Every mapping function get a parameter of `DB` type
-
-```typescript
-import { DB } from '../generated/indexer';
-```
-
-1. `db` object is for database operations save/get/remove and access to event itself
-2. Define the event handler function with the following signature and import the entity class
-
-```typescript
-import { MemberRegistereds } from '../generated/indexer/entities/MemberRegistereds';
-export async function handleMemberRegistered(db: DB) {}
-```
-
-1. Inside the handler function create a new instance of the entity and fill properties with event data.
-
-```typescript
-// Get event data
-const { AccountId, MemberId } = db.event.event_params;
-const member = new MemberRegistereds({ accountId: AccountId.toString(), memberId: +MemberId });
-```
-
-1. Call `db.save()` method to save data on database
-
-```typescript
-// Save to database.
-db.save<MemberRegistereds>(member);
-```
-
-1. Query database
-
-```typescript
-// Query from database
-const findOptions = { where: { memberId: 123 } }; // match the record
-const m = await db.get(MemberRegistereds, findOptions);
-```
-
-Below you can find the complete code
-
-**Complete code**
-
-```typescript
-import { MemberRegistereds } from "../generated/indexer/entities/MemberRegistereds";
-import { DB } from "../generated/indexer";
-
-export async function handleMemberRegistered(db: DB) {
-  // Get event data
-  const { AccountId, MemberId } = db.event.event_params;
-
-  const member = new MemberRegistereds({ accountId: AccountId.toString(), memberId: +MemberId };
-
-  // Save to database.
-  db.save<MemberRegistereds>(member);
-
-  // Query from database
-  const m = await db.get(MemberRegistereds, { where: { memberId: 123 } });
-}
-```
-
-## Query Node Constructs Explained
-
-1. `schema.graphql` is where you define types for graphql server. Graphql server use these types to generate db models, db tables, graphql resolvers.
-
-Below you can find a type defination example:
-
-```graphql
-type Membership {
-  # Member's root account id
-  accountId: String!
-
-  # Member's id
-  memberId: Int!
-
-  # The unique handle chosen by member
-  handle: String
-
-  # A Url to member's Avatar image
-  avatarUri: String
-
-  # Short text chosen by member to share information about themselves
-  about: String
-}
-```
-
-**Important** Relationship between types not supported yet!
-
-1. Block indexer is block consumer and every block can have events that we want to store their data. So indexing data from events we need to send the event to a function or a class that can handle the event and stores the event data on the database. `mappings` are the functions that we use to update our database with events data. Functions that we define in our mappings will be called only when the event name match our function name \(function name pattern is `'handle' + eventName`\). We call mapping functions as event handlers. Each event handler have only one parameter which is the `db: DB`. Every database operation is made with `db` object and the event can be accessed with `db` object. Below you can find an example for the event a handler:
-
-```typescript
-// mappings/index.ts
-
-import { DB } from '../generated/indexer';
-
-export function handleMemberRegistered(db: DB) {
-  console.log(`Event parameters: ${db.event.event_params}`);
-}
-```
-
-1. Block indexer connects to a blockchain node via WebSocket so we need to tell block indexer where to find the address of the node. Also, on the initialization of the indexer, we must pass the type register function as a parameter. So we put these variables inside the `.env` file that indexer can find and use them. For Joystream we will be running a local development node and add the name of the function, the package for the type registration:
-
-```text
-WS_PROVIDER_ENDPOINT_URI=ws://localhost:9944
-TYPE_REGISTER_PACKAGE_NAME=@joystream/types
-TYPE_REGISTER_FUNCTION=registerJoystreamTypes
-```
-
-1. Database connections options are defined in `.env`:
-
-```text
-DB_NAME=test
-DB_USER=postgres
-DB_PASS=postgres
-DB_HOST=localhost
-DB_PORT=5432
-GRAPHQL_SERVER_PORT=4000
-```
-

+ 0 - 12
query-node/joystream-query-node/.env

@@ -1,12 +0,0 @@
-WS_PROVIDER_ENDPOINT_URI=ws://localhost:9944
-QUERY_NODE_BOOTSTRAP_DB=true
-BOOTSTRAP_PACK_LOCATION=../../bootstrap
-TYPE_REGISTER_PACKAGE_NAME=@joystream/types
-TYPE_REGISTER_FUNCTION=registerJoystreamTypes
-DB_NAME=query_node
-DB_USER=postgres
-DB_PASS=postgres
-DB_HOST=localhost
-DB_PORT=5432
-GRAPHQL_SERVER_PORT=4000
-DEBUG=index-builder:*

+ 0 - 145
query-node/joystream-query-node/README.md

@@ -1,145 +0,0 @@
-# Joystream Query Node
-
-Joystream query node can be generated by using `substrate-query-node/cli`.
-
-## Getting Started
-
-Cli create a folder named `generated` and put everthing inside it.
-
-```
-$ cli codegen
-```
-
-Start graphql server:
-
-```
-$ cd generated/graphql-server
-$ yarn start:dev
-```
-
-Start block indexer:
-
-```
-$ cd generated/indexer
-$ yarn start
-```
-
-## Add a new mapping for Joystream MemberRegistered event
-
-1. Every mapping function get a parameter of `DB` type
-
-```ts
-import { DB } from '../generated/indexer';
-```
-
-2. `db` object is for database operations save/get/remove and access to event itself
-
-3. Define the event handler function with the following signature and import the entity class
-
-```ts
-import { MemberRegistereds } from '../generated/indexer/entities/MemberRegistereds';
-export async function handleMemberRegistered(db: DB) {}
-```
-
-4. Inside the handler function create a new instance of the entity and fill properties with event data.
-
-```ts
-// Get event data
-const { AccountId, MemberId } = db.event.event_params;
-const member = new MemberRegistereds({ accountId: AccountId.toString(), memberId: +MemberId });
-```
-
-5. Call `db.save()` method to save data on database
-
-```ts
-// Save to database.
-db.save<MemberRegistereds>(member);
-```
-
-6. Query database
-
-```ts
-// Query from database
-const findOptions = { where: { memberId: 123 } }; // match the record
-const m = await db.get(MemberRegistereds, findOptions);
-```
-
-Below you can find the complete code
-
-**Complete code**
-
-```ts
-import { MemberRegistereds } from "../generated/indexer/entities/MemberRegistereds";
-import { DB } from "../generated/indexer";
-
-export async function handleMemberRegistered(db: DB) {
-  // Get event data
-  const { AccountId, MemberId } = db.event.event_params;
-
-  const member = new MemberRegistereds({ accountId: AccountId.toString(), memberId: +MemberId };
-
-  // Save to database.
-  db.save<MemberRegistereds>(member);
-
-  // Query from database
-  const m = await db.get(MemberRegistereds, { where: { memberId: 123 } });
-}
-```
-
-## Query Node Constructs Explained
-
-1. `schema.graphql` is where you define types for graphql server. Graphql server use these types to generate db models, db tables, graphql resolvers.
-
-Below you can find a type defination example:
-
-```graphql
-type Membership {
-  # Member's root account id
-  accountId: String!
-
-  # Member's id
-  memberId: Int!
-
-  # The unique handle chosen by member
-  handle: String
-
-  # A Url to member's Avatar image
-  avatarUri: String
-
-  # Short text chosen by member to share information about themselves
-  about: String
-}
-```
-
-**Important** Relationship between types not supported yet!
-
-2. Block indexer is block consumer and every block can have events that we want to store their data. So indexing data from events we need to send the event to a function or a class that can handle the event and stores the event data on the database. `mappings` are the functions that we use to update our database with events data. Functions that we define in our mappings will be called only when the event name match our function name (function name pattern is `'handle' + eventName`). We call mapping functions as event handlers. Each event handler have only one parameter which is the `db: DB`. Every database operation is made with `db` object and the event can be accessed with `db` object. Below you can find an example for the event a handler:
-
-```ts
-// mappings/index.ts
-
-import { DB } from '../generated/indexer';
-
-export function handleMemberRegistered(db: DB) {
-  console.log(`Event parameters: ${db.event.event_params}`);
-}
-```
-
-3. Block indexer connects to a blockchain node via WebSocket so we need to tell block indexer where to find the address of the node. Also, on the initialization of the indexer, we must pass the type register function as a parameter. So we put these variables inside the `.env` file that indexer can find and use them. For Joystream we will be running a local development node and add the name of the function, the package for the type registration:
-
-```
-WS_PROVIDER_ENDPOINT_URI=ws://localhost:9944
-TYPE_REGISTER_PACKAGE_NAME=@joystream/types
-TYPE_REGISTER_FUNCTION=registerJoystreamTypes
-```
-
-4. Database connections options are defined in `.env`:
-
-```
-DB_NAME=test
-DB_USER=postgres
-DB_PASS=postgres
-DB_HOST=localhost
-DB_PORT=5432
-GRAPHQL_SERVER_PORT=4000
-```

+ 0 - 1
query-node/joystream-query-node/mappings/index.ts

@@ -1 +0,0 @@
-export * from './members';

Some files were not shown because too many files changed in this diff