dragonchain/webserver/routes/smart_contracts.py
def list_sc_heap_v1(prefix_key: str, **kwargs) -> Tuple[str, int, Dict[str, str]]:
    """
    /v1/list/<prefix_key>
    method = GET
    path = '/' seperate string where the left side is the contract_id
            and the right side is an optional object key in the heap

            i.e. /v1/list/currency_contract/folder_in_heap (to search the folder_in_heap for a the currency_contract SC)
            i.e. /v1/list/a_contract/ (to list at the root of the heap for the a_contract SC)
    Get an array of keys from the smart contract heap in storage
    List storage keys under a prefix
    """
    initial_index = prefix_key.find("/")
    if initial_index == -1:
        raise exceptions.BadRequest(
            "Path must look like /v1/list/<contract_id>/<object_folder> or /v1/list/<contract_id>/ to search the root of the heap"
        )
    contract_id = prefix_key[:initial_index]
    path = prefix_key[initial_index:]
    return helpers.flask_http_response(200, smart_contracts.heap_list_v1(contract_id, path))

    /v1/list/<prefix_key>
    method = GET
    path = '/' seperate string where the left side is the contract_id
            and the right side is an optional object key in the heap

            i.e. /v1/list/currency_contract/folder_in_heap (to search the folder_in_heap for a the currency_contract SC)
            i.e. /v1/list/a_contract/ (to list at the root of the heap for the a_contract SC)
    Get an array of keys from the smart contract heap in storage
    List storage keys under a prefix
    
v1/list/
method = GET
path = '/' seperate string where the left side is the contract_id
and the right side is an optional object key in the heap


v1 / list / method = GET path = ' / ' seperate string where the left side is the contract_id and the right side is an optional object key in the heap
def list_sc_heap_v1(prefix_key: str, **kwargs) -> Tuple[str, int, Dict[str, str]]:
    initial_index = prefix_key.find("/")
    if initial_index == -1:
        raise exceptions.BadRequest(
            "Path must look like /v1/list/<contract_id>/<object_folder> or /v1/list/<contract_id>/ to search the root of the heap"
        )
    contract_id = prefix_key[:initial_index]
    path = prefix_key[initial_index:]
    return helpers.flask_http_response(200, smart_contracts.heap_list_v1(contract_id, path))
def list_sc_heap_v1 ( prefix_key : str , ** kwargs ) -> Tuple [ str , int , Dict [ str , str ] ] : initial_index = prefix_key . find ( "/" ) if initial_index == - 1 : raise exceptions . BadRequest ( "Path must look like /v1/list/<contract_id>/<object_folder> or /v1/list/<contract_id>/ to search the root of the heap" ) contract_id = prefix_key [ : initial_index ] path = prefix_key [ initial_index : ] return helpers . flask_http_response ( 200 , smart_contracts . heap_list_v1 ( contract_id , path ) )
v1/list/<prefix_key>
method = GET
path = '/' seperate string where the left side is the contract_id
and the right side is an optional object key in the heap
v1 / list / <prefix_key > method = GET path = ' / ' seperate string where the left side is the contract_id and the right side is an optional object key in the heap
"""
    /v1/list/<prefix_key>
    method = GET
    path = '/' seperate string where the left side is the contract_id
            and the right side is an optional object key in the heap

            i.e. /v1/list/currency_contract/folder_in_heap (to search the folder_in_heap for a the currency_contract SC)
            i.e. /v1/list/a_contract/ (to list at the root of the heap for the a_contract SC)
    Get an array of keys from the smart contract heap in storage
    List storage keys under a prefix
    """
prefix_key
str