Skip to content

Commit

Permalink
2.0 new default ws endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
PaTara43 committed Oct 25, 2024
1 parent b938df1 commit 54fa41d
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 16 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# robonomics-interface
This is a simple wrapper over polkascan/py-substrate-interface used to facilitate writing code for applications using Robonomics.
This is a simple wrapper over polkascan/py-substrate-interface used to facilitate writing code for applications using Robonomics Polkadot Parachain.

> [!WARNING]
> Starting from 2.0 the default websocket is changed to `wss://polkadot.rpc.robonomics.network/`.
> Use `wss://kusama.rpc.robonomics.network/` for Kusama Parachain.
Robonomics project: https://robonomics.network/

Robonomics parachain dapp: https://parachain.robonomics.network/
Robonomics parachain dapp: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot.rpc.robonomics.network%2F#/explorer

Documentation: https://airalab.github.io/robonomics-interface/
_______
Expand Down
6 changes: 3 additions & 3 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Welcome to robonomics-interface's documentation!
================================================
*This is a simple wrapper over https://github.com/polkascan/py-substrate-interface used to facilitate writing code for
applications using Robonomics.*
*This is a simple wrapper over polkascan/py-substrate-interface used to facilitate writing code for applications using
Robonomics Polkadot Parachain. Kusama Parachain is also supported.*

**Robonomics project:** https://robonomics.network/

**Robonomics parachain dapp** https://parachain.robonomics.network/
**Robonomics parachain dapp** https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot.rpc.robonomics.network%2F#/explorer

.. toctree::

Expand Down
4 changes: 2 additions & 2 deletions docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Initialization
account = Account()
By default, you will only be able to fetch Chainstate info from
`Robonomics Kusama parachain <https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama.rpc.robonomics.network%2F#/explorer>`_
`Robonomics Polkadot parachain <https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot.rpc.robonomics.network%2F#/explorer>`_
and use :ref:`PubSub <PubSub>` and :ref:`ReqRes <ReqRes API>` patterns.

You can specify another ``remote_ws`` (e.g. local), ``seed`` to sign extrinsics, custom ``type_registry`` and ``crypto_type``.
Expand All @@ -40,7 +40,7 @@ Service Functions
+++++++++++++++++

As have been said, when initiating :ref:`account<Initialization>` instance without a seed, you will be able to read any
Chainstate info from the Robonomics Kusama parachain. This is possible by some dedicated below-mentioned classes and a
Chainstate info from the Robonomics Polkadot parachain. This is possible by some dedicated below-mentioned classes and a
``ServiceFunctions``'s method ``chainstate_query`` allowing user to execute any query.

.. code-block:: python
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "robonomics-interface"
version = "1.6.3"
description = "Robonomics wrapper over https://github.com/polkascan/py-substrate-interface created to facilitate programming with Robonomics"
version = "2.0.0"
description = "This is a simple wrapper over polkascan/py-substrate-interface used to facilitate writing code for applications using Robonomics Polkadot Parachain."
authors = ["Pavel Tarasov <p040399@outlook.com>"]
license = "Apache-2.0"

Expand Down
2 changes: 1 addition & 1 deletion robonomicsinterface/classes/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __init__(
as a parameter.
:param seed: Account seed (mnemonic or raw) as a key to sign transactions.
:param remote_ws: Node url. Default node address is "wss://kusama.rpc.robonomics.network". Another address may
:param remote_ws: Node url. Default node address is "wss://polkadot.rpc.robonomics.network". Another address may
be specified (e.g. "ws://127.0.0.1:9944" for local node).
:param type_registry: Types used in the chain. Defaults are the most frequently used in Robonomics.
:param crypto_type: Use KeypairType.SR25519 or KeypairType.ED25519 cryptography for generating the Keypair.
Expand Down
2 changes: 1 addition & 1 deletion robonomicsinterface/classes/chain_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __init__(
"""
Initiate ChainUtils class with node address passed as an argument.
:param remote_ws: Node url. Default node address is "wss://kusama.rpc.robonomics.network". Another address may
:param remote_ws: Node url. Default node address is "wss://polkadot.rpc.robonomics.network". Another address may
be specified (e.g. "ws://127.0.0.1:9944" for local node).
:param type_registry: Types used in the chain. Defaults are the most frequently used in Robonomics.
Expand Down
2 changes: 1 addition & 1 deletion robonomicsinterface/constants.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
REMOTE_WS = "wss://kusama.rpc.robonomics.network"
REMOTE_WS = "wss://polkadot.rpc.robonomics.network/"
TYPE_REGISTRY = {
"types": {
"Record": "Vec<u8>",
Expand Down
8 changes: 4 additions & 4 deletions robonomicsinterface/robonomics_interface_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def read() -> None:
type=str,
default=constants.REMOTE_WS,
help="Node websocket address used to connect to any node. E.g. local is ws://127.0.0.1:9944. Default is "
"wss://kusama.rpc.robonomics.network",
"wss://polkadot.rpc.robonomics.network",
)
@click.option("-s", type=str, required=True, help="Account seed in mnemonic/raw form.")
def datalog(input_string: sys.stdin, remote_ws: str, s: str) -> None:
Expand All @@ -71,7 +71,7 @@ def datalog(input_string: sys.stdin, remote_ws: str, s: str) -> None:
type=str,
default=constants.REMOTE_WS,
help="Node websocket address used to connect to any node. E.g. local is ws://127.0.0.1:9944. Default is "
"wss://kusama.rpc.robonomics.network",
"wss://polkadot.rpc.robonomics.network",
)
@click.option("-s", type=str, required=True, help="Account seed in mnemonic/raw form.")
@click.option("-r", type=str, required=True, help="Target account ss58_address.")
Expand All @@ -94,7 +94,7 @@ def launch(command: sys.stdin, remote_ws: str, s: str, r: str) -> None:
type=str,
default=constants.REMOTE_WS,
help="Node websocket address used to connect to any node. E.g. local is ws://127.0.0.1:9944. Default is "
"wss://kusama.rpc.robonomics.network",
"wss://polkadot.rpc.robonomics.network",
)
@click.option("-r", type=str, help="Target account ss58_address.")
def datalog(remote_ws: str, r: str) -> None:
Expand All @@ -112,7 +112,7 @@ def datalog(remote_ws: str, r: str) -> None:
type=str,
default=constants.REMOTE_WS,
help="Node websocket address used to connect to any node. E.g. local is ws://127.0.0.1:9944. Default is "
"wss://kusama.rpc.robonomics.network",
"wss://polkadot.rpc.robonomics.network",
)
@click.option("-r", type=str, help="Target account ss58_address.")
def launch(remote_ws: str, r: str) -> None:
Expand Down

0 comments on commit 54fa41d

Please sign in to comment.