|
@@ -24,9 +24,9 @@ Open the file ```node_modules/@joystream/types/content-working-group/index.d.ts`
|
|
Save the changes and re-run ```yarn && yarn build``` again, the build should work fine.
|
|
Save the changes and re-run ```yarn && yarn build``` again, the build should work fine.
|
|
|
|
|
|
|
|
|
|
-### Scripts
|
|
|
|
|
|
+## Example Scripts
|
|
|
|
|
|
-#### general.js
|
|
|
|
|
|
+### [general.js](src/examples/general.ts)
|
|
|
|
|
|
Ideal for newcomers. Contains the very basic APIs usage examples: get the last blockchain finalized block, get total coin issuance.
|
|
Ideal for newcomers. Contains the very basic APIs usage examples: get the last blockchain finalized block, get total coin issuance.
|
|
Also shows how to iterate the events inside a given block.
|
|
Also shows how to iterate the events inside a given block.
|
|
@@ -35,7 +35,15 @@ Also shows how to iterate the events inside a given block.
|
|
node lib/examples/general.js
|
|
node lib/examples/general.js
|
|
```
|
|
```
|
|
|
|
|
|
-#### get-media-change.js
|
|
|
|
|
|
+### [status.js](src/general/status.ts)
|
|
|
|
+
|
|
|
|
+Another good starting point for newcomers to understand how APIs are called.
|
|
|
|
+
|
|
|
|
+```
|
|
|
|
+node lib/general/status.js
|
|
|
|
+```
|
|
|
|
+
|
|
|
|
+### [get-media-change.js](src/curators/get-media-change.ts)
|
|
|
|
|
|
Shows how to work with Substrate events and Extrinsics to get the information about Joystream media uploads.
|
|
Shows how to work with Substrate events and Extrinsics to get the information about Joystream media uploads.
|
|
|
|
|
|
@@ -43,7 +51,7 @@ Shows how to work with Substrate events and Extrinsics to get the information ab
|
|
node lib/curators/get-media-change.js
|
|
node lib/curators/get-media-change.js
|
|
```
|
|
```
|
|
|
|
|
|
-#### council.js
|
|
|
|
|
|
+### [council.js](src/examples/council.ts)
|
|
|
|
|
|
Shows how to use ```councilElection```, ```minting```, ```council``` APIs.
|
|
Shows how to use ```councilElection```, ```minting```, ```council``` APIs.
|
|
|
|
|
|
@@ -51,7 +59,7 @@ Shows how to use ```councilElection```, ```minting```, ```council``` APIs.
|
|
node lib/examples/council.js
|
|
node lib/examples/council.js
|
|
```
|
|
```
|
|
|
|
|
|
-#### get-events-and-extrinsics.js
|
|
|
|
|
|
+### [get-events-and-extrinsics.js](src/examples/get-events-and-extrinsics.ts)
|
|
|
|
|
|
Shows the variety of Substrate event Extrinsic types within a given range of blocks.
|
|
Shows the variety of Substrate event Extrinsic types within a given range of blocks.
|
|
|
|
|
|
@@ -59,7 +67,7 @@ Shows the variety of Substrate event Extrinsic types within a given range of blo
|
|
node lib/examples/get-events-and-extrinsics.js
|
|
node lib/examples/get-events-and-extrinsics.js
|
|
```
|
|
```
|
|
|
|
|
|
-#### working-groups.js
|
|
|
|
|
|
+### [working-groups.js](src/examples/working-groups.ts)
|
|
|
|
|
|
Shows how to use a set of APIs related to Joystream working groups: ```storageWorkingGroup```, ```recurringRewards```, ```contentDirectoryWorkingGroup```.
|
|
Shows how to use a set of APIs related to Joystream working groups: ```storageWorkingGroup```, ```recurringRewards```, ```contentDirectoryWorkingGroup```.
|
|
|
|
|
|
@@ -67,7 +75,7 @@ Shows how to use a set of APIs related to Joystream working groups: ```storageWo
|
|
node lib/examples/working-groups.js
|
|
node lib/examples/working-groups.js
|
|
```
|
|
```
|
|
|
|
|
|
-#### proposals.js
|
|
|
|
|
|
+### [proposals.js](src/examples/proposals.ts)
|
|
|
|
|
|
Shows how to use a APIs related to Joystream DAO proposals ```proposalsEngine```, ```staking```, ```members```.
|
|
Shows how to use a APIs related to Joystream DAO proposals ```proposalsEngine```, ```staking```, ```members```.
|
|
|
|
|
|
@@ -75,3 +83,17 @@ Shows how to use a APIs related to Joystream DAO proposals ```proposalsEngine```
|
|
node lib/examples/proposals.js
|
|
node lib/examples/proposals.js
|
|
```
|
|
```
|
|
|
|
|
|
|
|
+### Javascript scripts
|
|
|
|
+
|
|
|
|
+There are some untyped Javascript scripts available for working with the data directory. You can run them using yarn:
|
|
|
|
+
|
|
|
|
+```
|
|
|
|
+//shows the available scripts
|
|
|
|
+yarn script index
|
|
|
|
+
|
|
|
|
+yarn script exportDataDirectory
|
|
|
|
+yarn script listDataDirectory
|
|
|
|
+
|
|
|
|
+```
|
|
|
|
+
|
|
|
|
+or execute them in [Pioneer JS Toolbox](https://testnet.joystream.org/#/js)
|