mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-09-20 08:05:33 +03:00
3b084a165b
* configure isort to add the future annotations import * apply the new isort setting * remove type ignores for new mypy (#13539) https://pypi.org/project/mypy/0.981/ * another
31 lines
1003 B
Python
31 lines
1003 B
Python
from __future__ import annotations
|
|
|
|
from typing import Optional
|
|
|
|
from typing_extensions import Protocol
|
|
|
|
from chia.types.blockchain_format.program import Program
|
|
from chia.types.blockchain_format.sized_bytes import bytes32
|
|
from chia.wallet.puzzle_drivers import PuzzleInfo, Solver
|
|
from chia.wallet.uncurried_puzzle import UncurriedPuzzle
|
|
|
|
|
|
class DriverProtocol(Protocol):
|
|
def match(self, puzzle: UncurriedPuzzle) -> Optional[PuzzleInfo]:
|
|
...
|
|
|
|
def get_inner_puzzle(self, constructor: PuzzleInfo, puzzle_reveal: UncurriedPuzzle) -> Optional[Program]:
|
|
...
|
|
|
|
def get_inner_solution(self, constructor: PuzzleInfo, solution: Program) -> Optional[Program]:
|
|
...
|
|
|
|
def asset_id(self, constructor: PuzzleInfo) -> Optional[bytes32]:
|
|
...
|
|
|
|
def construct(self, constructor: PuzzleInfo, inner_puzzle: Program) -> Program:
|
|
...
|
|
|
|
def solve(self, constructor: PuzzleInfo, solver: Solver, inner_puzzle: Program, inner_solution: Program) -> Program:
|
|
...
|