diff --git a/bindings/python/iota_sdk/__init__.py b/bindings/python/iota_sdk/__init__.py index d59e9e0a47..2c6aaf12de 100644 --- a/bindings/python/iota_sdk/__init__.py +++ b/bindings/python/iota_sdk/__init__.py @@ -17,6 +17,7 @@ from .types.burn import * from .types.client_options import * from .types.common import * +from .types.context_input import * from .types.event import * from .types.feature import * from .types.filter_options import * diff --git a/bindings/python/iota_sdk/client/_high_level_api.py b/bindings/python/iota_sdk/client/_high_level_api.py index 77f16c4a0b..931cbb5cfb 100644 --- a/bindings/python/iota_sdk/client/_high_level_api.py +++ b/bindings/python/iota_sdk/client/_high_level_api.py @@ -3,6 +3,7 @@ from typing import List, Optional from dataclasses import dataclass +from iota_sdk.types.block import Block from iota_sdk.types.common import HexStr, json from iota_sdk.types.output import OutputWithMetadata from iota_sdk.types.output_id import OutputId diff --git a/bindings/python/iota_sdk/types/context_input.py b/bindings/python/iota_sdk/types/context_input.py new file mode 100644 index 0000000000..ac7b57efea --- /dev/null +++ b/bindings/python/iota_sdk/types/context_input.py @@ -0,0 +1,34 @@ +# Copyright 2023 IOTA Stiftung +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations +from dataclasses import dataclass, field +from enum import IntEnum +from iota_sdk.types.common import HexStr, json + + +class ContextInputType(IntEnum): + """Context input types. + """ + BlockIssuanceCredit = 1 + + +@json +@dataclass +class ContextInput(): + """Base class for context inputs. + """ + type: int + + +@json +@dataclass +class BlockIssuanceCreditContextInput(ContextInput): + """A Block Issuance Credit (BIC) Context Input provides the VM with context for the value of + the BIC vector of a specific slot. + """ + account_id: HexStr + type: int = field( + default_factory=lambda: int( + ContextInputType.BlockIssuanceCredit), + init=False) diff --git a/bindings/python/iota_sdk/types/feature.py b/bindings/python/iota_sdk/types/feature.py index 043c1faf2f..24a9cc56ef 100644 --- a/bindings/python/iota_sdk/types/feature.py +++ b/bindings/python/iota_sdk/types/feature.py @@ -4,6 +4,7 @@ from enum import IntEnum from dataclasses import dataclass, field +from typing import List from iota_sdk.types.address import Ed25519Address, AccountAddress, NFTAddress from iota_sdk.types.common import HexStr, json @@ -99,4 +100,7 @@ class BlockIssuer(Feature): expiry_slot: str # TODO Replace with a list of PublicKey types public_keys: List[HexStr] - type: int = field(default_factory=lambda: int(FeatureType.BlockIssuer), init=False) + type: int = field( + default_factory=lambda: int( + FeatureType.BlockIssuer), + init=False)