dragonchain/lib/dto/bnb.py
def new_from_at_rest(binance_network_at_rest: Dict[str, Any]) -> "BinanceNetwork":
    """Instantiate a new BinanceNetwork model from storage
    Args:
        binance_network_at_rest: The dto of the at-rest network from storage
    Returns:
        Instantiated BinanceNetwork client
    Raises:
        NotImplementedError: When the version of the dto passed in is unknown
    """
    dto_version = binance_network_at_rest.get("version")
    if dto_version == "1":
        return BinanceNetwork(
            name=binance_network_at_rest["name"],
            testnet=binance_network_at_rest["testnet"],
            node_url=binance_network_at_rest["node_url"],
            rpc_port=binance_network_at_rest["rpc_port"],
            api_port=binance_network_at_rest["api_port"],
            b64_private_key=binance_network_at_rest["private_key"],
        )
    else:
        raise NotImplementedError(f"DTO version {dto_version} not supported for binance network")
Instantiate a new BinanceNetwork model from storage
    Args:
        binance_network_at_rest: The dto of the at-rest network from storage
    Returns:
        Instantiated BinanceNetwork client
    Raises:
        NotImplementedError: When the version of the dto passed in is unknown
    
Instantiate a new BinanceNetwork model from storage
Instantiate a new BinanceNetwork model from storage
def new_from_at_rest(binance_network_at_rest: Dict[str, Any]) -> "BinanceNetwork":
    dto_version = binance_network_at_rest.get("version")
    if dto_version == "1":
        return BinanceNetwork(
            name=binance_network_at_rest["name"],
            testnet=binance_network_at_rest["testnet"],
            node_url=binance_network_at_rest["node_url"],
            rpc_port=binance_network_at_rest["rpc_port"],
            api_port=binance_network_at_rest["api_port"],
            b64_private_key=binance_network_at_rest["private_key"],
        )
    else:
        raise NotImplementedError(f"DTO version {dto_version} not supported for binance network")
def new_from_at_rest ( binance_network_at_rest : Dict [ str , Any ] ) -> "BinanceNetwork" : dto_version = binance_network_at_rest . get ( "version" ) if dto_version == "1" : return BinanceNetwork ( name = binance_network_at_rest [ "name" ] , testnet = binance_network_at_rest [ "testnet" ] , node_url = binance_network_at_rest [ "node_url" ] , rpc_port = binance_network_at_rest [ "rpc_port" ] , api_port = binance_network_at_rest [ "api_port" ] , b64_private_key = binance_network_at_rest [ "private_key" ] , ) else : raise NotImplementedError ( f"DTO version {dto_version} not supported for binance network" )
Instantiate a new BinanceNetwork model from storage
Instantiate a new BinanceNetwork model from storage
"""Instantiate a new BinanceNetwork model from storage
    Args:
        binance_network_at_rest: The dto of the at-rest network from storage
    Returns:
        Instantiated BinanceNetwork client
    Raises:
        NotImplementedError: When the version of the dto passed in is unknown
    """
Instantiated BinanceNetwork client
Instantiated BinanceNetwork client
When the version of the dto passed in is unknown
When the version of the dto passed in is unknown
NotImplementedError
binance_network_at_rest
Dict[str, Any]
The dto of the at-rest network from storage
The dto of the at - rest network from storage