<gh_stars>1-10
from pycspr.types import CLAccessRights
from pycspr.types import UnforgeableReference

from pycspr.types import DictionaryIdentifier_AccountNamedKey
from pycspr.types import DictionaryIdentifier_ContractNamedKey
from pycspr.types import DictionaryIdentifier_SeedURef
from pycspr.types import DictionaryIdentifier_UniqueKey


def create_uref_from_string(as_string: str):
    """Returns an unforgeable reference from it's string representation.
    """
    _, address_hex, access_rights = as_string.split("-")
    return UnforgeableReference(bytes.fromhex(address_hex),
                                CLAccessRights(int(access_rights)))


# @TODO: naming! suggestion-> get_account_named_key
def create_dictionary_identifier_for_an_account_named_key(
    name: str,
    item_key: str,
    key: str
) -> DictionaryIdentifier_AccountNamedKey:
    """Returns a dictionary item identifier for querying an account's
        associated state.
    """
    return DictionaryIdentifier_AccountNamedKey(
        dictionary_item_key=item_key,
        dictionary_name=name,
        key=key,
    )


# @TODO: naming! suggestion-> get_contract_named_key
def create_dictionary_identifier_for_a_contract_named_key(
) -> DictionaryIdentifier_ContractNamedKey:
    """Returns a dictionary item identifier for querying a contract's
    associated state.
    """
    # @TODO: key not defined!
    # return DictionaryIdentifier_ContractNamedKey(key=key)
    pass


# @TODO: naming! suggestion-> get_seed_uref
def create_dictionary_identifier_for_a_seed_uref(
) -> DictionaryIdentifier_SeedURef:
    """Returns a dictionary item identifier for querying a uref's
        associated state.
    """
    # @TODO: key not defined!
    # return DictionaryIdentifier_SeedURef(key=key)
    pass


# @TODO: naming! suggestion-> get_id_for_unique_key
def create_dictionary_identifier_for_a_unique_key(
    key: str
) -> DictionaryIdentifier_UniqueKey:
    """Returns a dictionary item identifier for querying a uref's
        associated state.
    """
    return DictionaryIdentifier_UniqueKey(key=key)

from pycspr.types import CLAccessRights
from pycspr.types import UnforgeableReference

from pycspr.types import DictionaryIdentifier_AccountNamedKey
from pycspr.types import DictionaryIdentifier_ContractNamedKey
from pycspr.types import DictionaryIdentifier_SeedURef
from pycspr.types import DictionaryIdentifier_UniqueKey


def create_uref_from_string(as_string: str):
    """Returns an unforgeable reference from it's string representation.
    """
    _, address_hex, access_rights = as_string.split("-")
    return UnforgeableReference(bytes.fromhex(address_hex),
                                CLAccessRights(int(access_rights)))


# @TODO: naming! suggestion-> get_account_named_key
def create_dictionary_identifier_for_an_account_named_key(
    name: str,
    item_key: str,
    key: str
) -> DictionaryIdentifier_AccountNamedKey:
    """Returns a dictionary item identifier for querying an account's
        associated state.
    """
    return DictionaryIdentifier_AccountNamedKey(
        dictionary_item_key=item_key,
        dictionary_name=name,
        key=key,
    )


# @TODO: naming! suggestion-> get_contract_named_key
def create_dictionary_identifier_for_a_contract_named_key(
) -> DictionaryIdentifier_ContractNamedKey:
    """Returns a dictionary item identifier for querying a contract's
    associated state.
    """
    # @TODO: key not defined!
    # return DictionaryIdentifier_ContractNamedKey(key=key)
    pass


# @TODO: naming! suggestion-> get_seed_uref
def create_dictionary_identifier_for_a_seed_uref(
) -> DictionaryIdentifier_SeedURef:
    """Returns a dictionary item identifier for querying a uref's
        associated state.
    """
    # @TODO: key not defined!
    # return DictionaryIdentifier_SeedURef(key=key)
    pass


# @TODO: naming! suggestion-> get_id_for_unique_key
def create_dictionary_identifier_for_a_unique_key(
    key: str
) -> DictionaryIdentifier_UniqueKey:
    """Returns a dictionary item identifier for querying a uref's
        associated state.
    """
    return DictionaryIdentifier_UniqueKey(key=key)
Returns an unforgeable reference from it's string representation. # @TODO: naming! suggestion-> get_account_named_key Returns a dictionary item identifier for querying an account's         associated state. # @TODO: naming! suggestion-> get_contract_named_key Returns a dictionary item identifier for querying a contract's     associated state. # @TODO: key not defined! # return DictionaryIdentifier_ContractNamedKey(key=key) # @TODO: naming! suggestion-> get_seed_uref Returns a dictionary item identifier for querying a uref's         associated state. # @TODO: key not defined! # return DictionaryIdentifier_SeedURef(key=key) # @TODO: naming! suggestion-> get_id_for_unique_key Returns a dictionary item identifier for querying a uref's         associated state.