How to use the jsonrpcclient.requests.Request function in jsonrpcclient

To help you get started, we’ve selected a few jsonrpcclient examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bcb / jsonrpcclient / tests / test_client.py View on Github external
def test_send_batch(*_):
    requests = [Request("foo"), Request("bar")]
    response = DummyClient().send(requests)
    assert response.data.ok == True
github CodeChain-io / codechain-sdk-python / codechain / rpc / account.py View on Github external
def import_raw(self, secret, passphrase):
        if isinstance(secret, bytes):
            secret = "0x" + binascii.hexlify(secret).decode("ascii")
        payload = Request("account_importRaw", secret, passphrase)
        response = self.client.send(payload)

        return response.data.result
github CodeChain-io / codechain-sdk-python / codechain / rpc / chain.py View on Github external
def get_genesis_accounts(self):
        payload = Request("chain_getGenesisAccounts")
        response = self.client.send(payload)

        return response.data.result
github CodeChain-io / codechain-sdk-python / codechain / rpc / net.py View on Github external
def remove_from_blacklist(self, address: str):
        payload = Request("net_removeFromBlacklist", address)
        response = self.client.send(payload)

        return response.data.result
github CodeChain-io / codechain-sdk-python / codechain / rpc / account.py View on Github external
def unlock(self, account, passphrase, duration):
        payload = Request("account_unlock", account, passphrase, duration)
        response = self.client.send(payload)

        return response.data.result
github CodeChain-io / codechain-sdk-python / codechain / rpc / devel.py View on Github external
def get_state_trie_value(self, key: str):
        payload = Request("devel_getStateTrieValue", key)
        response = self.client.send(payload)

        return response.data.result
github CodeChain-io / codechain-sdk-python / codechain / rpc / net.py View on Github external
def get_peer_count(self):
        payload = Request("net_getPeerCount")
        response = self.client.send(payload)

        return response.data.result
github CodeChain-io / codechain-sdk-python / codechain / rpc / chain.py View on Github external
def get_network_id(self):
        payload = Request("chain_getNetworkId")
        response = self.client.send(payload)

        return response.data.result
github CodeChain-io / codechain-sdk-python / codechain / rpc / chain.py View on Github external
def get_possible_authors(self, block_number: Union[int, None]):
        payload = Request("chain_getPossibleAuthors", block_number)
        response = self.client.send(payload)

        return response.data.result