algokit_utils.applications.app_spec.arc32 ========================================= .. py:module:: algokit_utils.applications.app_spec.arc32 Attributes ---------- .. autoapisummary:: algokit_utils.applications.app_spec.arc32.AppSpecStateDict algokit_utils.applications.app_spec.arc32.OnCompleteActionName algokit_utils.applications.app_spec.arc32.MethodConfigDict algokit_utils.applications.app_spec.arc32.DefaultArgumentType algokit_utils.applications.app_spec.arc32.StateDict Classes ------- .. autoapisummary:: algokit_utils.applications.app_spec.arc32.CallConfig algokit_utils.applications.app_spec.arc32.StructArgDict algokit_utils.applications.app_spec.arc32.DefaultArgumentDict algokit_utils.applications.app_spec.arc32.MethodHints algokit_utils.applications.app_spec.arc32.Arc32Contract Module Contents --------------- .. py:data:: AppSpecStateDict :type: TypeAlias :value: dict[str, dict[str, dict]] Type defining Application Specification state entries .. py:class:: CallConfig Bases: :py:obj:`enum.IntFlag` Describes the type of calls a method can be used for based on {py:class}`algosdk.transaction.OnComplete` type .. py:attribute:: NEVER :value: 0 Never handle the specified on completion type .. py:attribute:: CALL :value: 1 Only handle the specified on completion type for application calls .. py:attribute:: CREATE :value: 2 Only handle the specified on completion type for application create calls .. py:attribute:: ALL :value: 3 Handle the specified on completion type for both create and normal application calls .. py:class:: StructArgDict Bases: :py:obj:`TypedDict` dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) .. py:attribute:: name :type: str .. py:attribute:: elements :type: list[list[str]] .. py:data:: OnCompleteActionName :type: TypeAlias :value: Literal['no_op', 'opt_in', 'close_out', 'clear_state', 'update_application', 'delete_application'] String literals representing on completion transaction types .. py:data:: MethodConfigDict :type: TypeAlias :value: dict[OnCompleteActionName, CallConfig] Dictionary of `dict[OnCompletionActionName, CallConfig]` representing allowed actions for each on completion type .. py:data:: DefaultArgumentType :type: TypeAlias :value: Literal['abi-method', 'local-state', 'global-state', 'constant'] Literal values describing the types of default argument sources .. py:class:: DefaultArgumentDict Bases: :py:obj:`TypedDict` DefaultArgument is a container for any arguments that may be resolved prior to calling some target method .. py:attribute:: source :type: DefaultArgumentType .. py:attribute:: data :type: int | str | bytes | algosdk.abi.method.MethodDict .. py:data:: StateDict .. py:class:: MethodHints MethodHints provides hints to the caller about how to call the method .. py:attribute:: read_only :type: bool :value: False .. py:attribute:: structs :type: dict[str, StructArgDict] .. py:attribute:: default_arguments :type: dict[str, DefaultArgumentDict] .. py:attribute:: call_config :type: MethodConfigDict .. py:method:: empty() -> bool .. py:method:: dictify() -> dict[str, Any] .. py:method:: undictify(data: dict[str, Any]) -> MethodHints :staticmethod: .. py:class:: Arc32Contract ARC-0032 application specification See .. py:attribute:: approval_program :type: str .. py:attribute:: clear_program :type: str .. py:attribute:: contract :type: algosdk.abi.Contract .. py:attribute:: hints :type: dict[str, MethodHints] .. py:attribute:: schema :type: StateDict .. py:attribute:: global_state_schema :type: algosdk.transaction.StateSchema .. py:attribute:: local_state_schema :type: algosdk.transaction.StateSchema .. py:attribute:: bare_call_config :type: MethodConfigDict .. py:method:: dictify() -> dict .. py:method:: to_json(indent: int | None = None) -> str .. py:method:: from_json(application_spec: str) -> Arc32Contract :staticmethod: .. py:method:: export(directory: pathlib.Path | str | None = None) -> None Write out the artifacts generated by the application to disk. Writes the approval program, clear program, contract specification and application specification to files in the specified directory. :param directory: Path to the directory where the artifacts should be written. If not specified, uses the current working directory