integration-testing/client/CasperClient/casper_client/casper_client.py
def queryState(self, blockHash: str, key: str, path: str, keyType: str):
        """
        Query a value in the global state.

        :param blockHash:         Hash of the block to query the state of
        :param key:               Base16 encoding of the base key
        :param path:              Path to the value to query. Must be of the form
                                  'key1/key2/.../keyn'
        :param keyType:           Type of base key. Must be one of 'hash', 'uref',
                                  'address'.
        :return:                  QueryStateResponse object
        """
        def key_variant(keyType):
            return {'hash': casper.StateQuery.KeyVariant.HASH,
                    'uref': casper.StateQuery.KeyVariant.UREF,
                    'address': casper.StateQuery.KeyVariant.ADDRESS}[keyType]

        def path_segments(path):
            return path.split('/')

        return self.casperService.GetBlockState(
            casper.GetBlockStateRequest(block_hash_base16 = blockHash,
                                        query = casper.StateQuery(
                                                    key_variant = key_variant(keyType),
                                                    key_base16 = key,
                                                    path_segments = path_segments(path))))

        Query a value in the global state.

        :param blockHash:         Hash of the block to query the state of
        :param key:               Base16 encoding of the base key
        :param path:              Path to the value to query. Must be of the form
                                  'key1/key2/.../keyn'
        :param keyType:           Type of base key. Must be one of 'hash', 'uref',
                                  'address'.
        :return:                  QueryStateResponse object
        
Query a value in the global state.
Query a value in the global state .
def queryState(self, blockHash: str, key: str, path: str, keyType: str):
        def key_variant(keyType):
            return {'hash': casper.StateQuery.KeyVariant.HASH,
                    'uref': casper.StateQuery.KeyVariant.UREF,
                    'address': casper.StateQuery.KeyVariant.ADDRESS}[keyType]
        def path_segments(path):
            return path.split('/')
        return self.casperService.GetBlockState(
            casper.GetBlockStateRequest(block_hash_base16 = blockHash,
                                        query = casper.StateQuery(
                                                    key_variant = key_variant(keyType),
                                                    key_base16 = key,
                                                    path_segments = path_segments(path))))
def queryState ( self , blockHash : str , key : str , path : str , keyType : str ) : def key_variant ( keyType ) : return { 'hash' : casper . StateQuery . KeyVariant . HASH , 'uref' : casper . StateQuery . KeyVariant . UREF , 'address' : casper . StateQuery . KeyVariant . ADDRESS } [ keyType ] def path_segments ( path ) : return path . split ( '/' ) return self . casperService . GetBlockState ( casper . GetBlockStateRequest ( block_hash_base16 = blockHash , query = casper . StateQuery ( key_variant = key_variant ( keyType ) , key_base16 = key , path_segments = path_segments ( path ) ) ) )
Query a value in the global state.
Query a value in the global state .
"""
        Query a value in the global state.

        :param blockHash:         Hash of the block to query the state of
        :param key:               Base16 encoding of the base key
        :param path:              Path to the value to query. Must be of the form
                                  'key1/key2/.../keyn'
        :param keyType:           Type of base key. Must be one of 'hash', 'uref',
                                  'address'.
        :return:                  QueryStateResponse object
        """
None
self
blockHash
str
Hash of the block to query the state of
Hash of the block to query the state of
key
str
Base16 encoding of the base key
Base16 encoding of the base key
path
str
Path to the value to query. Must be of the form
'key1/key2/.../keyn'
Path to the value to query . Must be of the form ' key1 / key2 / ... / keyn '
keyType
str
Type of base key. Must be one of 'hash', 'uref',
'address'.
Type of base key . Must be one of ' hash ' ' uref ' ' address ' .