Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General Info: For Exchanges Integration #5195

Open
mnaamani opened this issue Dec 10, 2024 · 0 comments
Open

General Info: For Exchanges Integration #5195

mnaamani opened this issue Dec 10, 2024 · 0 comments

Comments

@mnaamani
Copy link
Member

Joystream - L1 Substrate based chain

Running a Joystream node

Native binary

Download latest version for your platform from https://github.com/Joystream/joystream/releases

curl -L -o joystream-node.tar.gz \
  https://github.com/Joystream/joystream/releases/download/v12.2004.0/joystream-node-8.7.0-87e2e24bf88-x86_64-linux-gnu.tar.gz

tar xzf joystream-node.tar.gz

Run a full public node

./joystream-node \
	--pruning archive
    --ws-external
    --rpc-external
    --rpc-methods Safe
    --rpc-cors all
    --chain joy-mainnet

Docker compose

services:
  joystream:
    image: joystream/node:latest
    command: >
      --pruning archive
      --ws-external
      --rpc-external
      --rpc-methods Safe
      --rpc-cors all
      --base-path /chain
      --chain joy-mainnet
    ports:
      - "127.0.0.1:9944:9944" # Websocket JSON-RPC
      - "127.0.0.1:9933:9933" # HTTP JSON-RPC
      - 30333:30333
    volumes:
      - ./joystream:/chain

From source

https://github.com/Joystream/joystream/tree/master/bin/node

Test/Development node

To run a local development node remove the argument --chain joy-mainnet and replace it with --dev

RPC interfaces on joystream node

The RPC nodes use JSON-RPC message protocol: https://www.jsonrpc.org/specification

RPC Call reference
https://polkadot.js.org/docs/api
https://polkadot.js.org/docs/substrate/rpc

RPC is available over two transports, Websocket and HTTP

Websocket Transport - by default on port 9944

Local node: ws://127.0.0.1:9944
Public endpoint: wss://rpc.joystream.org

HTTP Transport - by default on port 9933

Local node: http://127.0.0.1:9933
Public endpoint: https://http-rpc.joystream.org

REST API - Sidecar

Public endpoints:

API Endpoint https://api-sidecar.joystream.org
API Docs https://docs-sidecar.joystream.org

Running a local sidecar using public rpc endpoint

docker run --rm --read-only -e SAS_SUBSTRATE_URL=wss://rpc.joystream.org \
  -p 8080:8080 parity/substrate-api-sidecar

Libraries and Tools

Javascript/Typescript

Most upto-date and well maintained library for interacting with Polkadot/Substrate base networks
https://wiki.polkadot.network/docs/build-tools-index#polkadot-js-api

Python

https://github.com/polkascan/py-substrate-interface
Joystream metadata docs: https://polkascan.github.io/py-substrate-metadata-docs/joystream-node

Cli Tools

https://github.com/polkadot-js/tools/tree/master/packages/api-cli
https://github.com/polkadot-js/tools/tree/master/packages/signer-cli

Java

Library doesn't appear to be very well maintained and is possibly out of date.
We do not have experience using it.
https://github.com/strategyobject/substrate-client-java

Example code

https://github.com/mnaamani/joystream/tree/code-examples/utils/api-scripts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant