Skip to content

keystores

ImportKeystoresJsonBody

Attributes:

Name Type Description
keystores List[str]

JSON-encoded keystore files generated with the Launchpad.

passwords List[str]

Passwords to unlock imported keystore files. passwords[i] must unlock keystores[i].

slashing_protection Union[Unset, str]

JSON serialized representation of the slash protection data in format defined in EIP-3076: Slashing Protection Interchange Format. Example: {"metadata":{"interchange_format_version":"5","genesis_validators_root":"0xcf8e0d4e9587369b2301d079034 7320302cc0943d5a1884560367e8208d920f2"},"data":[{"pubkey":"0x93247f2209abcacf57b75a51dafae777f9dd38ListKeysResponsebc7053d1af526 f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a","signed_blocks":[],"signed_attestations":[]}]}.

Source code in eth_2_key_manager_api_client/models/import_keystores_json_body.py
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
@attr.s(auto_attribs=True)
class ImportKeystoresJsonBody:
    """
    Attributes:
        keystores (List[str]): JSON-encoded keystore files generated with the Launchpad.
        passwords (List[str]): Passwords to unlock imported keystore files. `passwords[i]` must unlock `keystores[i]`.
        slashing_protection (Union[Unset, str]): JSON serialized representation of the slash protection data in format
            defined in EIP-3076: Slashing Protection Interchange Format.
             Example: {"metadata":{"interchange_format_version":"5","genesis_validators_root":"0xcf8e0d4e9587369b2301d079034
            7320302cc0943d5a1884560367e8208d920f2"},"data":[{"pubkey":"0x93247f2209abcacf57b75a51dafae777f9dd38ListKeysResponsebc7053d1af526
            f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a","signed_blocks":[],"signed_attestations":[]}]}.
    """

    keystores: List[str]
    passwords: List[str]
    slashing_protection: Union[Unset, str] = UNSET
    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)

    def to_dict(self) -> Dict[str, Any]:
        keystores = self.keystores

        passwords = self.passwords

        slashing_protection = self.slashing_protection

        field_dict: Dict[str, Any] = {}
        field_dict.update(self.additional_properties)
        field_dict.update(
            {
                "keystores": keystores,
                "passwords": passwords,
            }
        )
        if slashing_protection is not UNSET:
            field_dict["slashing_protection"] = slashing_protection

        return field_dict

    @classmethod
    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
        d = src_dict.copy()
        keystores = cast(List[str], d.pop("keystores"))

        passwords = cast(List[str], d.pop("passwords"))

        slashing_protection = d.pop("slashing_protection", UNSET)

        import_keystores_json_body = cls(
            keystores=keystores,
            passwords=passwords,
            slashing_protection=slashing_protection,
        )

        import_keystores_json_body.additional_properties = d
        return import_keystores_json_body

    @property
    def additional_keys(self) -> List[str]:
        return list(self.additional_properties.keys())

    def __getitem__(self, key: str) -> Any:
        return self.additional_properties[key]

    def __setitem__(self, key: str, value: Any) -> None:
        self.additional_properties[key] = value

    def __delitem__(self, key: str) -> None:
        del self.additional_properties[key]

    def __contains__(self, key: str) -> bool:
        return key in self.additional_properties

ImportKeystoresResponseDataItem

Attributes:

Name Type Description
status ImportKeystoresResponseDataItemStatus
  • imported: Keystore successfully decrypted and imported to keymanager permanent storage
  • duplicate: Keystore's pubkey is already known to the keymanager
  • error: Any other status different to the above: decrypting error, I/O errors, etc. Example: imported.
message Union[Unset, str]

error message if status == error

Source code in eth_2_key_manager_api_client/models/import_keystores_response_data_item.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
@attr.s(auto_attribs=True)
class ImportKeystoresResponseDataItem:
    """
    Attributes:
        status (ImportKeystoresResponseDataItemStatus): - imported: Keystore successfully decrypted and imported to
            keymanager permanent storage
            - duplicate: Keystore's pubkey is already known to the keymanager
            - error: Any other status different to the above: decrypting error, I/O errors, etc.
             Example: imported.
        message (Union[Unset, str]): error message if status == error
    """

    status: ImportKeystoresResponseDataItemStatus
    message: Union[Unset, str] = UNSET
    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)

    def to_dict(self) -> Dict[str, Any]:
        status = self.status.value

        message = self.message

        field_dict: Dict[str, Any] = {}
        field_dict.update(self.additional_properties)
        field_dict.update(
            {
                "status": status,
            }
        )
        if message is not UNSET:
            field_dict["message"] = message

        return field_dict

    @classmethod
    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
        d = src_dict.copy()
        status = ImportKeystoresResponseDataItemStatus(d.pop("status"))

        message = d.pop("message", UNSET)

        import_keystores_response_data_item = cls(
            status=status,
            message=message,
        )

        import_keystores_response_data_item.additional_properties = d
        return import_keystores_response_data_item

    @property
    def additional_keys(self) -> List[str]:
        return list(self.additional_properties.keys())

    def __getitem__(self, key: str) -> Any:
        return self.additional_properties[key]

    def __setitem__(self, key: str, value: Any) -> None:
        self.additional_properties[key] = value

    def __delitem__(self, key: str) -> None:
        del self.additional_properties[key]

    def __contains__(self, key: str) -> bool:
        return key in self.additional_properties

ImportKeystoresResponse

Attributes:

Name Type Description
data List[ImportKeystoresResponseDataItem]

Status result of each request.keystores with same length and order of request.keystores

Source code in eth_2_key_manager_api_client/models/import_keystores_response.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
@attr.s(auto_attribs=True)
class ImportKeystoresResponse:
    """
    Attributes:
        data (List['ImportKeystoresResponseDataItem']): Status result of each `request.keystores` with same length and
            order of `request.keystores`
    """

    data: List["ImportKeystoresResponseDataItem"]
    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)

    def to_dict(self) -> Dict[str, Any]:
        data = []
        for data_item_data in self.data:
            data_item = data_item_data.to_dict()

            data.append(data_item)

        field_dict: Dict[str, Any] = {}
        field_dict.update(self.additional_properties)
        field_dict.update(
            {
                "data": data,
            }
        )

        return field_dict

    @classmethod
    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
        from eth_2_key_manager_api_client.models.import_keystores_response_data_item import (
            ImportKeystoresResponseDataItem,
        )

        d = src_dict.copy()
        data = []
        _data = d.pop("data")
        for data_item_data in _data:
            data_item = ImportKeystoresResponseDataItem.from_dict(data_item_data)

            data.append(data_item)

        import_keystores_response = cls(
            data=data,
        )

        import_keystores_response.additional_properties = d
        return import_keystores_response

    @property
    def additional_keys(self) -> List[str]:
        return list(self.additional_properties.keys())

    def __getitem__(self, key: str) -> Any:
        return self.additional_properties[key]

    def __setitem__(self, key: str, value: Any) -> None:
        self.additional_properties[key] = value

    def __delitem__(self, key: str) -> None:
        del self.additional_properties[key]

    def __contains__(self, key: str) -> bool:
        return key in self.additional_properties

ListKeysResponseDataItem

Attributes:

Name Type Description
validating_pubkey str

The validator's BLS public key, uniquely identifying them. 48-bytes, hex encoded with 0x prefix, case insensitive. Example: 0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a.

derivation_path Union[Unset, str]

The derivation path (if present in the imported keystore). Example: m/12381/3600/0/0/0.

readonly Union[Unset, bool]

The key associated with this pubkey cannot be deleted from the API

Source code in eth_2_key_manager_api_client/models/list_keys_response_data_item.py
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
@attr.s(auto_attribs=True)
class ListKeysResponseDataItem:
    """
    Attributes:
        validating_pubkey (str): The validator's BLS public key, uniquely identifying them. _48-bytes, hex encoded with
            0x prefix, case insensitive._
             Example: 0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a.
        derivation_path (Union[Unset, str]): The derivation path (if present in the imported keystore). Example:
            m/12381/3600/0/0/0.
        readonly (Union[Unset, bool]): The key associated with this pubkey cannot be deleted from the API
    """

    validating_pubkey: str
    derivation_path: Union[Unset, str] = UNSET
    readonly: Union[Unset, bool] = UNSET
    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)

    def to_dict(self) -> Dict[str, Any]:
        validating_pubkey = self.validating_pubkey
        derivation_path = self.derivation_path
        readonly = self.readonly

        field_dict: Dict[str, Any] = {}
        field_dict.update(self.additional_properties)
        field_dict.update(
            {
                "validating_pubkey": validating_pubkey,
            }
        )
        if derivation_path is not UNSET:
            field_dict["derivation_path"] = derivation_path
        if readonly is not UNSET:
            field_dict["readonly"] = readonly

        return field_dict

    @classmethod
    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
        d = src_dict.copy()
        validating_pubkey = d.pop("validating_pubkey")

        derivation_path = d.pop("derivation_path", UNSET)

        readonly = d.pop("readonly", UNSET)

        list_keys_response_data_item = cls(
            validating_pubkey=validating_pubkey,
            derivation_path=derivation_path,
            readonly=readonly,
        )

        list_keys_response_data_item.additional_properties = d
        return list_keys_response_data_item

    @property
    def additional_keys(self) -> List[str]:
        return list(self.additional_properties.keys())

    def __getitem__(self, key: str) -> Any:
        return self.additional_properties[key]

    def __setitem__(self, key: str, value: Any) -> None:
        self.additional_properties[key] = value

    def __delitem__(self, key: str) -> None:
        del self.additional_properties[key]

    def __contains__(self, key: str) -> bool:
        return key in self.additional_properties

ListKeysResponse

Attributes:

Name Type Description
data List[ListKeysResponseDataItem]
Source code in eth_2_key_manager_api_client/models/list_keys_response.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
@attr.s(auto_attribs=True)
class ListKeysResponse:
    """
    Attributes:
        data (List['ListKeysResponseDataItem']):
    """

    data: List["ListKeysResponseDataItem"]
    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)

    def to_dict(self) -> Dict[str, Any]:
        data = []
        for data_item_data in self.data:
            data_item = data_item_data.to_dict()

            data.append(data_item)

        field_dict: Dict[str, Any] = {}
        field_dict.update(self.additional_properties)
        field_dict.update(
            {
                "data": data,
            }
        )

        return field_dict

    @classmethod
    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
        from eth_2_key_manager_api_client.models.list_keys_response_data_item import ListKeysResponseDataItem

        d = src_dict.copy()
        data = []
        _data = d.pop("data")
        for data_item_data in _data:
            data_item = ListKeysResponseDataItem.from_dict(data_item_data)

            data.append(data_item)

        list_keys_response = cls(
            data=data,
        )

        list_keys_response.additional_properties = d
        return list_keys_response

    @property
    def additional_keys(self) -> List[str]:
        return list(self.additional_properties.keys())

    def __getitem__(self, key: str) -> Any:
        return self.additional_properties[key]

    def __setitem__(self, key: str, value: Any) -> None:
        self.additional_properties[key] = value

    def __delitem__(self, key: str) -> None:
        del self.additional_properties[key]

    def __contains__(self, key: str) -> bool:
        return key in self.additional_properties

DeleteKeysJsonBody

Attributes:

Name Type Description
pubkeys List[str]

List of public keys to delete.

Source code in eth_2_key_manager_api_client/models/delete_keys_json_body.py
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
@attr.s(auto_attribs=True)
class DeleteKeysJsonBody:
    """
    Attributes:
        pubkeys (List[str]): List of public keys to delete.
    """

    pubkeys: List[str]
    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)

    def to_dict(self) -> Dict[str, Any]:
        pubkeys = self.pubkeys

        field_dict: Dict[str, Any] = {}
        field_dict.update(self.additional_properties)
        field_dict.update(
            {
                "pubkeys": pubkeys,
            }
        )

        return field_dict

    @classmethod
    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
        d = src_dict.copy()
        pubkeys = cast(List[str], d.pop("pubkeys"))

        delete_keys_json_body = cls(
            pubkeys=pubkeys,
        )

        delete_keys_json_body.additional_properties = d
        return delete_keys_json_body

    @property
    def additional_keys(self) -> List[str]:
        return list(self.additional_properties.keys())

    def __getitem__(self, key: str) -> Any:
        return self.additional_properties[key]

    def __setitem__(self, key: str, value: Any) -> None:
        self.additional_properties[key] = value

    def __delitem__(self, key: str) -> None:
        del self.additional_properties[key]

    def __contains__(self, key: str) -> bool:
        return key in self.additional_properties

DeleteKeysResponseDataItem

Attributes:

Name Type Description
status DeleteKeysResponseDataItemStatus
  • deleted: key was active and removed
  • not_active: slashing protection data returned but key was not active
  • not_found: key was not found to be removed, and no slashing data can be returned
  • error: unexpected condition meant the key could not be removed (the key was actually found, but we couldn't stop using it) - this would be a sign that making it active elsewhere would almost certainly cause you headaches / slashing conditions etc. Example: deleted.
message Union[Unset, str]

error message if status == error

Source code in eth_2_key_manager_api_client/models/delete_keys_response_data_item.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
@attr.s(auto_attribs=True)
class DeleteKeysResponseDataItem:
    """
    Attributes:
        status (DeleteKeysResponseDataItemStatus): - deleted: key was active and removed
            - not_active: slashing protection data returned but key was not active
            - not_found: key was not found to be removed, and no slashing data can be returned
            - error: unexpected condition meant the key could not be removed (the key was actually found, but we couldn't
            stop using it) - this would be a sign that making it active elsewhere would almost certainly cause you headaches
            / slashing conditions etc.
             Example: deleted.
        message (Union[Unset, str]): error message if status == error
    """

    status: DeleteKeysResponseDataItemStatus
    message: Union[Unset, str] = UNSET
    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)

    def to_dict(self) -> Dict[str, Any]:
        status = self.status.value

        message = self.message

        field_dict: Dict[str, Any] = {}
        field_dict.update(self.additional_properties)
        field_dict.update(
            {
                "status": status,
            }
        )
        if message is not UNSET:
            field_dict["message"] = message

        return field_dict

    @classmethod
    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
        d = src_dict.copy()
        status = DeleteKeysResponseDataItemStatus(d.pop("status"))

        message = d.pop("message", UNSET)

        delete_keys_response_data_item = cls(
            status=status,
            message=message,
        )

        delete_keys_response_data_item.additional_properties = d
        return delete_keys_response_data_item

    @property
    def additional_keys(self) -> List[str]:
        return list(self.additional_properties.keys())

    def __getitem__(self, key: str) -> Any:
        return self.additional_properties[key]

    def __setitem__(self, key: str, value: Any) -> None:
        self.additional_properties[key] = value

    def __delitem__(self, key: str) -> None:
        del self.additional_properties[key]

    def __contains__(self, key: str) -> bool:
        return key in self.additional_properties

DeleteKeysResponse

Attributes:

Name Type Description
data List[DeleteKeysResponseDataItem]

Deletion status of all keys in request.pubkeys in the same order.

slashing_protection str

JSON serialized representation of the slash protection data in format defined in EIP-3076: Slashing Protection Interchange Format. Example: {"metadata":{"interchange_format_version":"5","genesis_validators_root":"0xcf8e0d4e9587369b2301d079034 7320302cc0943d5a1884560367e8208d920f2"},"data":[{"pubkey":"0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526 f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a","signed_blocks":[],"signed_attestations":[]}]}.

Source code in eth_2_key_manager_api_client/models/delete_keys_response.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
@attr.s(auto_attribs=True)
class DeleteKeysResponse:
    """
    Attributes:
        data (List['DeleteKeysResponseDataItem']): Deletion status of all keys in `request.pubkeys` in the same order.
        slashing_protection (str): JSON serialized representation of the slash protection data in format defined in
            EIP-3076: Slashing Protection Interchange Format.
             Example: {"metadata":{"interchange_format_version":"5","genesis_validators_root":"0xcf8e0d4e9587369b2301d079034
            7320302cc0943d5a1884560367e8208d920f2"},"data":[{"pubkey":"0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526
            f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a","signed_blocks":[],"signed_attestations":[]}]}.
    """

    data: List["DeleteKeysResponseDataItem"]
    slashing_protection: str
    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)

    def to_dict(self) -> Dict[str, Any]:
        data = []
        for data_item_data in self.data:
            data_item = data_item_data.to_dict()

            data.append(data_item)

        slashing_protection = self.slashing_protection

        field_dict: Dict[str, Any] = {}
        field_dict.update(self.additional_properties)
        field_dict.update(
            {
                "data": data,
                "slashing_protection": slashing_protection,
            }
        )

        return field_dict

    @classmethod
    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
        from eth_2_key_manager_api_client.models.delete_keys_response_data_item import DeleteKeysResponseDataItem

        d = src_dict.copy()
        data = []
        _data = d.pop("data")
        for data_item_data in _data:
            data_item = DeleteKeysResponseDataItem.from_dict(data_item_data)

            data.append(data_item)

        slashing_protection = d.pop("slashing_protection")

        delete_keys_response = cls(
            data=data,
            slashing_protection=slashing_protection,
        )

        delete_keys_response.additional_properties = d
        return delete_keys_response

    @property
    def additional_keys(self) -> List[str]:
        return list(self.additional_properties.keys())

    def __getitem__(self, key: str) -> Any:
        return self.additional_properties[key]

    def __setitem__(self, key: str, value: Any) -> None:
        self.additional_properties[key] = value

    def __delitem__(self, key: str) -> None:
        del self.additional_properties[key]

    def __contains__(self, key: str) -> bool:
        return key in self.additional_properties