Skip to content

fee_recipient

Provides classes to interact with the set of endpoints for management of fee recipient.

API reference: https://ethereum.github.io/keymanager-APIs/#/Fee%20Recipient

Each class provides access to a specific endpoint. The classes are organized in the same way as the API documentation.

Class API Endpoint
DeleteFeeRecipient https://ethereum.github.io/keymanager-APIs/#/Fee%20Recipient/deleteFeeRecipient
ListFeeRecipient https://ethereum.github.io/keymanager-APIs/#/Fee%20Recipient/listFeeRecipient
SetFeeRecipient https://ethereum.github.io/keymanager-APIs/#/Fee%20Recipient/setFeeRecipient

DeleteFeeRecipient

Contains methods for accessing the DELETE method of the /eth/v1/validator/{pubkey}/feerecipient endpoint.

The endpoint returns the following HTTP status code if successful
  • 204: No Content
Typical usage example - synchronous
import eth_2_key_manager_api_client

eth_2_key_manager = eth_2_key_manager_api_client.Eth2KeyManager()
pubkey = "0x99c4c42fac7d1393956bd9e2785ed67cf5aaca4bf56d2fcda94c42d6042aebb1723ce6bac6f0216ff8c5d4f9f013008b"
response = eth_2_key_manager.delete_fee_recipient.sync_detailed(pubkey=pubkey)
if response.status_code == 204:
    print("Fee Recipient deleted successfully")
else:
    print(f"Fee Recipient deletion failed with status code: {response.status_code}")
assert response.status_code == 204
Typical usage example - asynchronous
import eth_2_key_manager_api_client

eth_2_key_manager = eth_2_key_manager_api_client.Eth2KeyManager()
pubkey = "0x99c4c42fac7d1393956bd9e2785ed67cf5aaca4bf56d2fcda94c42d6042aebb1723ce6bac6f0216ff8c5d4f9f013008b"
response = await eth_2_key_manager.delete_fee_recipient.asyncio_detailed(pubkey=pubkey)
if response.status_code == 204:
    print("Fee Recipient deleted successfully")
else:
    print(f"Fee Recipient deletion failed with status code: {response.status_code}")
assert response.status_code == 204
Source code in eth_2_key_manager_api_client/api/fee_recipient.py
 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
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
@attr.s(auto_attribs=True)
class DeleteFeeRecipient:
    """Contains methods for accessing the DELETE method of the /eth/v1/validator/{pubkey}/feerecipient endpoint.

    The endpoint returns the following HTTP status code if successful:
        - 204: No Content

    Typical usage example - synchronous:
        ```python
        import eth_2_key_manager_api_client

        eth_2_key_manager = eth_2_key_manager_api_client.Eth2KeyManager()
        pubkey = "0x99c4c42fac7d1393956bd9e2785ed67cf5aaca4bf56d2fcda94c42d6042aebb1723ce6bac6f0216ff8c5d4f9f013008b"
        response = eth_2_key_manager.delete_fee_recipient.sync_detailed(pubkey=pubkey)
        if response.status_code == 204:
            print("Fee Recipient deleted successfully")
        else:
            print(f"Fee Recipient deletion failed with status code: {response.status_code}")
        assert response.status_code == 204
        ```

    Typical usage example - asynchronous:
        ```python
        import eth_2_key_manager_api_client

        eth_2_key_manager = eth_2_key_manager_api_client.Eth2KeyManager()
        pubkey = "0x99c4c42fac7d1393956bd9e2785ed67cf5aaca4bf56d2fcda94c42d6042aebb1723ce6bac6f0216ff8c5d4f9f013008b"
        response = await eth_2_key_manager.delete_fee_recipient.asyncio_detailed(pubkey=pubkey)
        if response.status_code == 204:
            print("Fee Recipient deleted successfully")
        else:
            print(f"Fee Recipient deletion failed with status code: {response.status_code}")
        assert response.status_code == 204
        ```
    """

    client: AuthenticatedClient
    METHOD: str = "DELETE"

    def sync_detailed(
        self,
        pubkey: str,
    ) -> httpx.Response:
        """Delete configured Fee Recipient (synchronous).

        Delete a configured fee recipient mapping for the specified public key.

        Args:
            pubkey: The validator's BLS public key, uniquely identifying them. _48-bytes, hex
                encoded with 0x prefix, case insensitive._
                Example: 0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1c
                fe39b56f43611df74a.

        Raises:
            errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
            httpx.TimeoutException: If the request takes longer than Client.timeout.

        Returns:
            Response object containing the response from the server, response headers and status code.
        """

        kwargs = _get_kwargs(
            client=self.client,
            endpoint=f"validator/{pubkey}/feerecipient",
            method=self.METHOD,
        )

        response = httpx.request(
            verify=self.client.verify_ssl,
            **kwargs,
        )

        return _build_response(client=self.client, response=response)

    def sync(
        self,
        pubkey: str,
    ) -> Optional[Union[Any, ErrorResponse]]:
        """Delete configured Fee Recipient (synchronous).

        Delete a configured fee recipient mapping for the specified public key.

        Args:
            pubkey: The validator's BLS public key, uniquely identifying them. _48-bytes, hex
                encoded with 0x prefix, case insensitive._
                Example: 0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1c
                fe39b56f43611df74a.

        Raises:
            errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
            httpx.TimeoutException: If the request takes longer than Client.timeout.

        Returns:
            Parsed response from the server.
        """

        return self.sync_detailed(pubkey=pubkey).parsed

    async def asyncio_detailed(self, pubkey: str) -> Response[Union[Any, ErrorResponse]]:
        """Delete configured Fee Recipient (asynchronous).

        Delete a configured fee recipient mapping for the specified public key.

        Args:
            pubkey: The validator's BLS public key, uniquely identifying them. _48-bytes, hex
                encoded with 0x prefix, case insensitive._
                Example: 0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1c
                fe39b56f43611df74a.

        Raises:
            errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
            httpx.TimeoutException: If the request takes longer than Client.timeout.

        Returns:
            Response object containing the response from the server, response headers and status code.
        """

        kwargs = _get_kwargs(
            client=self.client,
            endpoint=f"validator/{pubkey}/feerecipient",
            method=self.METHOD,
        )

        async with httpx.AsyncClient(verify=self.client.verify_ssl) as _client:
            response = await _client.request(**kwargs)

        return _build_response(client=self.client, response=response)

    async def asyncio(self, pubkey: str) -> Optional[Union[Any, ErrorResponse]]:
        """Delete configured Fee Recipient (asynchronous).

        Delete a configured fee recipient mapping for the specified public key.

        Args:
            pubkey: The validator's BLS public key, uniquely identifying them. _48-bytes, hex
                encoded with 0x prefix, case insensitive._
                Example: 0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1c
                fe39b56f43611df74a.

        Raises:
            errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
            httpx.TimeoutException: If the request takes longer than Client.timeout.

        Returns:
            Parsed response from the server.
        """

        return (await self.asyncio_detailed(pubkey=pubkey)).parsed

asyncio(pubkey) async

Delete configured Fee Recipient (asynchronous).

Delete a configured fee recipient mapping for the specified public key.

Parameters:

Name Type Description Default
pubkey str

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

required

Raises:

Type Description
UnexpectedStatus

If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.

TimeoutException

If the request takes longer than Client.timeout.

Returns:

Type Description
Optional[Union[Any, ErrorResponse]]

Parsed response from the server.

Source code in eth_2_key_manager_api_client/api/fee_recipient.py
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
async def asyncio(self, pubkey: str) -> Optional[Union[Any, ErrorResponse]]:
    """Delete configured Fee Recipient (asynchronous).

    Delete a configured fee recipient mapping for the specified public key.

    Args:
        pubkey: The validator's BLS public key, uniquely identifying them. _48-bytes, hex
            encoded with 0x prefix, case insensitive._
            Example: 0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1c
            fe39b56f43611df74a.

    Raises:
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
        httpx.TimeoutException: If the request takes longer than Client.timeout.

    Returns:
        Parsed response from the server.
    """

    return (await self.asyncio_detailed(pubkey=pubkey)).parsed

asyncio_detailed(pubkey) async

Delete configured Fee Recipient (asynchronous).

Delete a configured fee recipient mapping for the specified public key.

Parameters:

Name Type Description Default
pubkey str

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

required

Raises:

Type Description
UnexpectedStatus

If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.

TimeoutException

If the request takes longer than Client.timeout.

Returns:

Type Description
Response[Union[Any, ErrorResponse]]

Response object containing the response from the server, response headers and status code.

Source code in eth_2_key_manager_api_client/api/fee_recipient.py
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
async def asyncio_detailed(self, pubkey: str) -> Response[Union[Any, ErrorResponse]]:
    """Delete configured Fee Recipient (asynchronous).

    Delete a configured fee recipient mapping for the specified public key.

    Args:
        pubkey: The validator's BLS public key, uniquely identifying them. _48-bytes, hex
            encoded with 0x prefix, case insensitive._
            Example: 0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1c
            fe39b56f43611df74a.

    Raises:
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
        httpx.TimeoutException: If the request takes longer than Client.timeout.

    Returns:
        Response object containing the response from the server, response headers and status code.
    """

    kwargs = _get_kwargs(
        client=self.client,
        endpoint=f"validator/{pubkey}/feerecipient",
        method=self.METHOD,
    )

    async with httpx.AsyncClient(verify=self.client.verify_ssl) as _client:
        response = await _client.request(**kwargs)

    return _build_response(client=self.client, response=response)

sync(pubkey)

Delete configured Fee Recipient (synchronous).

Delete a configured fee recipient mapping for the specified public key.

Parameters:

Name Type Description Default
pubkey str

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

required

Raises:

Type Description
UnexpectedStatus

If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.

TimeoutException

If the request takes longer than Client.timeout.

Returns:

Type Description
Optional[Union[Any, ErrorResponse]]

Parsed response from the server.

Source code in eth_2_key_manager_api_client/api/fee_recipient.py
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
def sync(
    self,
    pubkey: str,
) -> Optional[Union[Any, ErrorResponse]]:
    """Delete configured Fee Recipient (synchronous).

    Delete a configured fee recipient mapping for the specified public key.

    Args:
        pubkey: The validator's BLS public key, uniquely identifying them. _48-bytes, hex
            encoded with 0x prefix, case insensitive._
            Example: 0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1c
            fe39b56f43611df74a.

    Raises:
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
        httpx.TimeoutException: If the request takes longer than Client.timeout.

    Returns:
        Parsed response from the server.
    """

    return self.sync_detailed(pubkey=pubkey).parsed

sync_detailed(pubkey)

Delete configured Fee Recipient (synchronous).

Delete a configured fee recipient mapping for the specified public key.

Parameters:

Name Type Description Default
pubkey str

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

required

Raises:

Type Description
UnexpectedStatus

If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.

TimeoutException

If the request takes longer than Client.timeout.

Returns:

Type Description
Response

Response object containing the response from the server, response headers and status code.

Source code in eth_2_key_manager_api_client/api/fee_recipient.py
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
def sync_detailed(
    self,
    pubkey: str,
) -> httpx.Response:
    """Delete configured Fee Recipient (synchronous).

    Delete a configured fee recipient mapping for the specified public key.

    Args:
        pubkey: The validator's BLS public key, uniquely identifying them. _48-bytes, hex
            encoded with 0x prefix, case insensitive._
            Example: 0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1c
            fe39b56f43611df74a.

    Raises:
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
        httpx.TimeoutException: If the request takes longer than Client.timeout.

    Returns:
        Response object containing the response from the server, response headers and status code.
    """

    kwargs = _get_kwargs(
        client=self.client,
        endpoint=f"validator/{pubkey}/feerecipient",
        method=self.METHOD,
    )

    response = httpx.request(
        verify=self.client.verify_ssl,
        **kwargs,
    )

    return _build_response(client=self.client, response=response)

ListFeeRecipient

Contains methods for accessing the GET method of the /eth/v1/validator/{pubkey}/feerecipient endpoint.

The endpoint returns the following HTTP status code if successful
  • 200: OK
Typical usage example - synchronous
import eth_2_key_manager_api_client

eth_2_key_manager = eth_2_key_manager_api_client.Eth2KeyManager()
pubkey = "0x99c4c42fac7d1393956bd9e2785ed67cf5aaca4bf56d2fcda94c42d6042aebb1723ce6bac6f0216ff8c5d4f9f013008b"
response = eth_2_key_manager.list_fee_recipient.sync_detailed(pubkey=pubkey)
if response.status_code == 200:
    print(f"Fee recipient for pubkey {pubkey} is {response.parsed.data.ethaddress}")
else:
    print(f"Fee Recipient listing failed with status code: {response.status_code}")
assert response.status_code == 200
Typical usage example - asynchronous
import eth_2_key_manager_api_client

eth_2_key_manager = eth_2_key_manager_api_client.Eth2KeyManager()
pubkey = "0x99c4c42fac7d1393956bd9e2785ed67cf5aaca4bf56d2fcda94c42d6042aebb1723ce6bac6f0216ff8c5d4f9f013008b"
response = await eth_2_key_manager.list_fee_recipient.asyncio_detailed(pubkey=pubkey)
if response.status_code == 200:
    print(f"Fee recipient for pubkey {pubkey} is {response.parsed.data.ethaddress}")
else:
    print(f"Fee Recipient listing failed with status code: {response.status_code}")
assert response.status_code == 200
Source code in eth_2_key_manager_api_client/api/fee_recipient.py
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
@attr.s(auto_attribs=True)
class ListFeeRecipient:
    """Contains methods for accessing the GET method of the /eth/v1/validator/{pubkey}/feerecipient endpoint.

    The endpoint returns the following HTTP status code if successful:
        - 200: OK

    Typical usage example - synchronous:
        ```python
        import eth_2_key_manager_api_client

        eth_2_key_manager = eth_2_key_manager_api_client.Eth2KeyManager()
        pubkey = "0x99c4c42fac7d1393956bd9e2785ed67cf5aaca4bf56d2fcda94c42d6042aebb1723ce6bac6f0216ff8c5d4f9f013008b"
        response = eth_2_key_manager.list_fee_recipient.sync_detailed(pubkey=pubkey)
        if response.status_code == 200:
            print(f"Fee recipient for pubkey {pubkey} is {response.parsed.data.ethaddress}")
        else:
            print(f"Fee Recipient listing failed with status code: {response.status_code}")
        assert response.status_code == 200
        ```

    Typical usage example - asynchronous:
        ```python
        import eth_2_key_manager_api_client

        eth_2_key_manager = eth_2_key_manager_api_client.Eth2KeyManager()
        pubkey = "0x99c4c42fac7d1393956bd9e2785ed67cf5aaca4bf56d2fcda94c42d6042aebb1723ce6bac6f0216ff8c5d4f9f013008b"
        response = await eth_2_key_manager.list_fee_recipient.asyncio_detailed(pubkey=pubkey)
        if response.status_code == 200:
            print(f"Fee recipient for pubkey {pubkey} is {response.parsed.data.ethaddress}")
        else:
            print(f"Fee Recipient listing failed with status code: {response.status_code}")
        assert response.status_code == 200
        ```
    """

    client: AuthenticatedClient
    METHOD: str = "GET"

    def sync_detailed(
        self,
        pubkey: str,
    ) -> Response[Union[ListFeeRecipientResponse, ErrorResponse]]:
        """List Fee Recipient (synchronous).

        List the validator public key to eth address mapping for fee recipient feature on a specific public
        key.
        The validator public key will return with the default fee recipient address if a specific one was
        not found.

        WARNING: The fee_recipient is not used on Phase0 or Altair networks.

        Args:
            pubkey: The validator's BLS public key, uniquely identifying them. _48-bytes, hex
                encoded with 0x prefix, case insensitive._
                Example: 0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1c
                fe39b56f43611df74a.

        Raises:
            errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
            httpx.TimeoutException: If the request takes longer than Client.timeout.

        Returns:
            Response object containing the response from the server, response headers and status code.
        """

        kwargs = _get_kwargs(
            client=self.client,
            endpoint=f"validator/{pubkey}/feerecipient",
            method=self.METHOD,
        )

        response = httpx.request(
            verify=self.client.verify_ssl,
            **kwargs,
        )

        return _build_response(client=self.client, response=response, cls=ListFeeRecipientResponse)

    def sync(
        self,
        pubkey: str,
    ) -> Optional[Union[ListFeeRecipientResponse, ErrorResponse]]:
        """List Fee Recipient (synchronous).

            List the validator public key to eth address mapping for fee recipient feature on a specific public
        key.
        The validator public key will return with the default fee recipient address if a specific one was
        not found.

        WARNING: The fee_recipient is not used on Phase0 or Altair networks.

        Args:
            pubkey: The validator's BLS public key, uniquely identifying them. _48-bytes, hex
                encoded with 0x prefix, case insensitive._
                Example: 0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1c
                fe39b56f43611df74a.

        Raises:
            errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
            httpx.TimeoutException: If the request takes longer than Client.timeout.

        Returns:
            Parsed response from the server.
        """

        return self.sync_detailed(pubkey=pubkey).parsed

    async def asyncio_detailed(self, pubkey: str) -> Response[Union[ListFeeRecipientResponse, ErrorResponse]]:
        """List Fee Recipient (asynchronous).

        List the validator public key to eth address mapping for fee recipient feature on a specific public
        key.
        The validator public key will return with the default fee recipient address if a specific one was
        not found.

        WARNING: The fee_recipient is not used on Phase0 or Altair networks.

        Args:
            pubkey: The validator's BLS public key, uniquely identifying them. _48-bytes, hex
                encoded with 0x prefix, case insensitive._
                Example: 0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1c
                fe39b56f43611df74a.

        Raises:
            errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
            httpx.TimeoutException: If the request takes longer than Client.timeout.

        Returns:
            Response object containing the response from the server, response headers and status code.
        """

        kwargs = _get_kwargs(client=self.client, endpoint=f"validator/{pubkey}/feerecipient", method=self.METHOD)

        async with httpx.AsyncClient(verify=self.client.verify_ssl) as _client:
            response = await _client.request(**kwargs)

        return _build_response(client=self.client, response=response, cls=ListFeeRecipientResponse)

    async def asyncio(self, pubkey: str) -> Optional[Union[ListFeeRecipientResponse, ErrorResponse]]:
        """List Fee Recipient (asynchronous).

        List the validator public key to eth address mapping for fee recipient feature on a specific public
        key.
        The validator public key will return with the default fee recipient address if a specific one was
        not found.

        WARNING: The fee_recipient is not used on Phase0 or Altair networks.

        Args:
            pubkey (str): The validator's BLS public key, uniquely identifying them. _48-bytes, hex
                encoded with 0x prefix, case insensitive._
                Example: 0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1c
                fe39b56f43611df74a.

        Raises:
            errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
            httpx.TimeoutException: If the request takes longer than Client.timeout.

        Returns:
            Parsed response from the server.
        """

        return (await self.asyncio_detailed(pubkey=pubkey)).parsed

asyncio(pubkey) async

List Fee Recipient (asynchronous).

List the validator public key to eth address mapping for fee recipient feature on a specific public key. The validator public key will return with the default fee recipient address if a specific one was not found.

WARNING: The fee_recipient is not used on Phase0 or Altair networks.

Parameters:

Name Type Description Default
pubkey str

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

required

Raises:

Type Description
UnexpectedStatus

If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.

TimeoutException

If the request takes longer than Client.timeout.

Returns:

Type Description
Optional[Union[ListFeeRecipientResponse, ErrorResponse]]

Parsed response from the server.

Source code in eth_2_key_manager_api_client/api/fee_recipient.py
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
async def asyncio(self, pubkey: str) -> Optional[Union[ListFeeRecipientResponse, ErrorResponse]]:
    """List Fee Recipient (asynchronous).

    List the validator public key to eth address mapping for fee recipient feature on a specific public
    key.
    The validator public key will return with the default fee recipient address if a specific one was
    not found.

    WARNING: The fee_recipient is not used on Phase0 or Altair networks.

    Args:
        pubkey (str): The validator's BLS public key, uniquely identifying them. _48-bytes, hex
            encoded with 0x prefix, case insensitive._
            Example: 0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1c
            fe39b56f43611df74a.

    Raises:
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
        httpx.TimeoutException: If the request takes longer than Client.timeout.

    Returns:
        Parsed response from the server.
    """

    return (await self.asyncio_detailed(pubkey=pubkey)).parsed

asyncio_detailed(pubkey) async

List Fee Recipient (asynchronous).

List the validator public key to eth address mapping for fee recipient feature on a specific public key. The validator public key will return with the default fee recipient address if a specific one was not found.

WARNING: The fee_recipient is not used on Phase0 or Altair networks.

Parameters:

Name Type Description Default
pubkey str

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

required

Raises:

Type Description
UnexpectedStatus

If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.

TimeoutException

If the request takes longer than Client.timeout.

Returns:

Type Description
Response[Union[ListFeeRecipientResponse, ErrorResponse]]

Response object containing the response from the server, response headers and status code.

Source code in eth_2_key_manager_api_client/api/fee_recipient.py
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
async def asyncio_detailed(self, pubkey: str) -> Response[Union[ListFeeRecipientResponse, ErrorResponse]]:
    """List Fee Recipient (asynchronous).

    List the validator public key to eth address mapping for fee recipient feature on a specific public
    key.
    The validator public key will return with the default fee recipient address if a specific one was
    not found.

    WARNING: The fee_recipient is not used on Phase0 or Altair networks.

    Args:
        pubkey: The validator's BLS public key, uniquely identifying them. _48-bytes, hex
            encoded with 0x prefix, case insensitive._
            Example: 0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1c
            fe39b56f43611df74a.

    Raises:
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
        httpx.TimeoutException: If the request takes longer than Client.timeout.

    Returns:
        Response object containing the response from the server, response headers and status code.
    """

    kwargs = _get_kwargs(client=self.client, endpoint=f"validator/{pubkey}/feerecipient", method=self.METHOD)

    async with httpx.AsyncClient(verify=self.client.verify_ssl) as _client:
        response = await _client.request(**kwargs)

    return _build_response(client=self.client, response=response, cls=ListFeeRecipientResponse)

sync(pubkey)

List Fee Recipient (synchronous).

List the validator public key to eth address mapping for fee recipient feature on a specific public

key. The validator public key will return with the default fee recipient address if a specific one was not found.

WARNING: The fee_recipient is not used on Phase0 or Altair networks.

Parameters:

Name Type Description Default
pubkey str

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

required

Raises:

Type Description
UnexpectedStatus

If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.

TimeoutException

If the request takes longer than Client.timeout.

Returns:

Type Description
Optional[Union[ListFeeRecipientResponse, ErrorResponse]]

Parsed response from the server.

Source code in eth_2_key_manager_api_client/api/fee_recipient.py
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
def sync(
    self,
    pubkey: str,
) -> Optional[Union[ListFeeRecipientResponse, ErrorResponse]]:
    """List Fee Recipient (synchronous).

        List the validator public key to eth address mapping for fee recipient feature on a specific public
    key.
    The validator public key will return with the default fee recipient address if a specific one was
    not found.

    WARNING: The fee_recipient is not used on Phase0 or Altair networks.

    Args:
        pubkey: The validator's BLS public key, uniquely identifying them. _48-bytes, hex
            encoded with 0x prefix, case insensitive._
            Example: 0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1c
            fe39b56f43611df74a.

    Raises:
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
        httpx.TimeoutException: If the request takes longer than Client.timeout.

    Returns:
        Parsed response from the server.
    """

    return self.sync_detailed(pubkey=pubkey).parsed

sync_detailed(pubkey)

List Fee Recipient (synchronous).

List the validator public key to eth address mapping for fee recipient feature on a specific public key. The validator public key will return with the default fee recipient address if a specific one was not found.

WARNING: The fee_recipient is not used on Phase0 or Altair networks.

Parameters:

Name Type Description Default
pubkey str

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

required

Raises:

Type Description
UnexpectedStatus

If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.

TimeoutException

If the request takes longer than Client.timeout.

Returns:

Type Description
Response[Union[ListFeeRecipientResponse, ErrorResponse]]

Response object containing the response from the server, response headers and status code.

Source code in eth_2_key_manager_api_client/api/fee_recipient.py
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
def sync_detailed(
    self,
    pubkey: str,
) -> Response[Union[ListFeeRecipientResponse, ErrorResponse]]:
    """List Fee Recipient (synchronous).

    List the validator public key to eth address mapping for fee recipient feature on a specific public
    key.
    The validator public key will return with the default fee recipient address if a specific one was
    not found.

    WARNING: The fee_recipient is not used on Phase0 or Altair networks.

    Args:
        pubkey: The validator's BLS public key, uniquely identifying them. _48-bytes, hex
            encoded with 0x prefix, case insensitive._
            Example: 0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1c
            fe39b56f43611df74a.

    Raises:
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
        httpx.TimeoutException: If the request takes longer than Client.timeout.

    Returns:
        Response object containing the response from the server, response headers and status code.
    """

    kwargs = _get_kwargs(
        client=self.client,
        endpoint=f"validator/{pubkey}/feerecipient",
        method=self.METHOD,
    )

    response = httpx.request(
        verify=self.client.verify_ssl,
        **kwargs,
    )

    return _build_response(client=self.client, response=response, cls=ListFeeRecipientResponse)

SetFeeRecipient

Contains methods for accessing the POST method of the /eth/v1/validator/{pubkey}/feerecipient endpoint.

The endpoint returns the following HTTP status code if successful
  • 202: Accepted
Typical usage example
import eth_2_key_manager_api_client

eth_2_key_manager = eth_2_key_manager_api_client.Eth2KeyManager()
pubkey = "0x99c4c42fac7d1393956bd9e2785ed67cf5aaca4bf56d2fcda94c42d6042aebb1723ce6bac6f0216ff8c5d4f9f013008b"
response = eth_2_key_manager.set_fee_recipient.sync_detailed(pubkey=pubkey, ethaddress="0xabcf8e0d4e9587369b2301d0790347320302cc09")
if response.status_code == 202:
    print("Fee Recipient set successfully")
else:
    print(f"Fee Recipient set failed with status code: {response.status_code}")
assert response.status_code == 202
Typical usage example - asynchronous
import eth_2_key_manager_api_client

eth_2_key_manager = eth_2_key_manager_api_client.Eth2KeyManager()
pubkey = "0x99c4c42fac7d1393956bd9e2785ed67cf5aaca4bf56d2fcda94c42d6042aebb1723ce6bac6f0216ff8c5d4f9f013008b"
response = await eth_2_key_manager.set_fee_recipient.asyncio_detailed(pubkey=pubkey, ethaddress="0xabcf8e0d4e9587369b2301d0790347320302cc09")
if response.status_code == 202:
    print("Fee Recipient set successfully")
else:
    print(f"Fee Recipient set failed with status code: {response.status_code}")
assert response.status_code == 202
Source code in eth_2_key_manager_api_client/api/fee_recipient.py
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
@attr.s(auto_attribs=True)
class SetFeeRecipient:
    """Contains methods for accessing the POST method of the /eth/v1/validator/{pubkey}/feerecipient endpoint.

    The endpoint returns the following HTTP status code if successful:
        - 202: Accepted

    Typical usage example:
        ```python
        import eth_2_key_manager_api_client

        eth_2_key_manager = eth_2_key_manager_api_client.Eth2KeyManager()
        pubkey = "0x99c4c42fac7d1393956bd9e2785ed67cf5aaca4bf56d2fcda94c42d6042aebb1723ce6bac6f0216ff8c5d4f9f013008b"
        response = eth_2_key_manager.set_fee_recipient.sync_detailed(pubkey=pubkey, ethaddress="0xabcf8e0d4e9587369b2301d0790347320302cc09")
        if response.status_code == 202:
            print("Fee Recipient set successfully")
        else:
            print(f"Fee Recipient set failed with status code: {response.status_code}")
        assert response.status_code == 202
        ```

    Typical usage example - asynchronous:
        ```python
        import eth_2_key_manager_api_client

        eth_2_key_manager = eth_2_key_manager_api_client.Eth2KeyManager()
        pubkey = "0x99c4c42fac7d1393956bd9e2785ed67cf5aaca4bf56d2fcda94c42d6042aebb1723ce6bac6f0216ff8c5d4f9f013008b"
        response = await eth_2_key_manager.set_fee_recipient.asyncio_detailed(pubkey=pubkey, ethaddress="0xabcf8e0d4e9587369b2301d0790347320302cc09")
        if response.status_code == 202:
            print("Fee Recipient set successfully")
        else:
            print(f"Fee Recipient set failed with status code: {response.status_code}")
        assert response.status_code == 202
        ```
    """

    client: AuthenticatedClient
    METHOD: str = "POST"

    def sync_detailed(self, pubkey: str, ethaddress: str) -> Response[Union[Any, ErrorResponse]]:
        """Set Fee Recipient (synchronous).

        Sets the validator client fee recipient mapping which will then update the beacon node.
        Existing mappings for the same validator public key will be overwritten.
        Specific Public keys not mapped will continue to use the default address for fee recipient in
        accordance to the startup of the validator client and beacon node.
        Cannot specify the 0x00 fee recipient address through the API.

        WARNING: The fee_recipient is not used on Phase0 or Altair networks.

        Args:
            pubkey: The validator's BLS public key, uniquely identifying them. _48-bytes, hex
                encoded with 0x prefix, case insensitive._
                Example: 0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1c
                fe39b56f43611df74a.
            ethaddress: The fee recipient address to set for the validator.

        Raises:
            errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
            httpx.TimeoutException: If the request takes longer than Client.timeout.

        Returns:
            Response object containing the response from the server, response headers and status code.
        """

        set_fee_recipient_body = SetFeeRecipientRequest(ethaddress=ethaddress)

        kwargs = _get_kwargs(client=self.client, endpoint=f"validator/{pubkey}/feerecipient", method=self.METHOD, json_body=set_fee_recipient_body)

        response = httpx.request(
            verify=self.client.verify_ssl,
            **kwargs,
        )

        return _build_response(client=self.client, response=response)

    def sync(self, pubkey: str, ethaddress: str) -> Optional[Union[Any, ErrorResponse]]:
        """Set Fee Recipient (synchronous).

        Sets the validator client fee recipient mapping which will then update the beacon node.
        Existing mappings for the same validator public key will be overwritten.
        Specific Public keys not mapped will continue to use the default address for fee recipient in
        accordance to the startup of the validator client and beacon node.
        Cannot specify the 0x00 fee recipient address through the API.

        WARNING: The fee_recipient is not used on Phase0 or Altair networks.

        Args:
            pubkey: The validator's BLS public key, uniquely identifying them. _48-bytes, hex
                encoded with 0x prefix, case insensitive._
                Example: 0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1c
                fe39b56f43611df74a.
            ethaddress: The fee recipient address to set for the validator.

        Raises:
            errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
            httpx.TimeoutException: If the request takes longer than Client.timeout.

        Returns:
            Returns parsed response from the server.
        """

        return self.sync_detailed(pubkey=pubkey, ethaddress=ethaddress).parsed

    async def asyncio_detailed(self, pubkey: str, ethaddress: str) -> Response[Union[Any, ErrorResponse]]:
        """Set Fee Recipient (asynchronous).

        Sets the validator client fee recipient mapping which will then update the beacon node.
        Existing mappings for the same validator public key will be overwritten.
        Specific Public keys not mapped will continue to use the default address for fee recipient in
        accordance to the startup of the validator client and beacon node.
        Cannot specify the 0x00 fee recipient address through the API.

        WARNING: The fee_recipient is not used on Phase0 or Altair networks.

        Args:
            pubkey: The validator's BLS public key, uniquely identifying them. _48-bytes, hex
                encoded with 0x prefix, case insensitive._
                Example: 0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1c
                fe39b56f43611df74a.
            ethaddress: The fee recipient address to set for the validator.

        Raises:
            errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
            httpx.TimeoutException: If the request takes longer than Client.timeout.

        Returns:
            Response object containing the response from the server, response headers and status code.
        """

        set_fee_recipient_body = SetFeeRecipientRequest(ethaddress=ethaddress)

        kwargs = _get_kwargs(client=self.client, endpoint=f"validator/{pubkey}/feerecipient", method=self.METHOD, json_body=set_fee_recipient_body)

        async with httpx.AsyncClient(verify=self.client.verify_ssl) as _client:
            response = await _client.request(**kwargs)

        return _build_response(client=self.client, response=response)

    async def asyncio(self, pubkey: str, ethaddress: str) -> Optional[Union[Any, ErrorResponse]]:
        """Set Fee Recipient (asynchronous).

        Sets the validator client fee recipient mapping which will then update the beacon node.
        Existing mappings for the same validator public key will be overwritten.
        Specific Public keys not mapped will continue to use the default address for fee recipient in
        accordance to the startup of the validator client and beacon node.
        Cannot specify the 0x00 fee recipient address through the API.

        WARNING: The fee_recipient is not used on Phase0 or Altair networks.

        Args:
            pubkey: The validator's BLS public key, uniquely identifying them. _48-bytes, hex
                encoded with 0x prefix, case insensitive._
                Example: 0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1c
                fe39b56f43611df74a.
            ethaddress: The fee recipient address to set for the validator.

        Raises:
            errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
            httpx.TimeoutException: If the request takes longer than Client.timeout.

        Returns:
            Returns parsed response from the server.
        """

        return (await self.asyncio_detailed(pubkey=pubkey, ethaddress=ethaddress)).parsed

asyncio(pubkey, ethaddress) async

Set Fee Recipient (asynchronous).

Sets the validator client fee recipient mapping which will then update the beacon node. Existing mappings for the same validator public key will be overwritten. Specific Public keys not mapped will continue to use the default address for fee recipient in accordance to the startup of the validator client and beacon node. Cannot specify the 0x00 fee recipient address through the API.

WARNING: The fee_recipient is not used on Phase0 or Altair networks.

Parameters:

Name Type Description Default
pubkey str

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

required
ethaddress str

The fee recipient address to set for the validator.

required

Raises:

Type Description
UnexpectedStatus

If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.

TimeoutException

If the request takes longer than Client.timeout.

Returns:

Type Description
Optional[Union[Any, ErrorResponse]]

Returns parsed response from the server.

Source code in eth_2_key_manager_api_client/api/fee_recipient.py
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
async def asyncio(self, pubkey: str, ethaddress: str) -> Optional[Union[Any, ErrorResponse]]:
    """Set Fee Recipient (asynchronous).

    Sets the validator client fee recipient mapping which will then update the beacon node.
    Existing mappings for the same validator public key will be overwritten.
    Specific Public keys not mapped will continue to use the default address for fee recipient in
    accordance to the startup of the validator client and beacon node.
    Cannot specify the 0x00 fee recipient address through the API.

    WARNING: The fee_recipient is not used on Phase0 or Altair networks.

    Args:
        pubkey: The validator's BLS public key, uniquely identifying them. _48-bytes, hex
            encoded with 0x prefix, case insensitive._
            Example: 0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1c
            fe39b56f43611df74a.
        ethaddress: The fee recipient address to set for the validator.

    Raises:
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
        httpx.TimeoutException: If the request takes longer than Client.timeout.

    Returns:
        Returns parsed response from the server.
    """

    return (await self.asyncio_detailed(pubkey=pubkey, ethaddress=ethaddress)).parsed

asyncio_detailed(pubkey, ethaddress) async

Set Fee Recipient (asynchronous).

Sets the validator client fee recipient mapping which will then update the beacon node. Existing mappings for the same validator public key will be overwritten. Specific Public keys not mapped will continue to use the default address for fee recipient in accordance to the startup of the validator client and beacon node. Cannot specify the 0x00 fee recipient address through the API.

WARNING: The fee_recipient is not used on Phase0 or Altair networks.

Parameters:

Name Type Description Default
pubkey str

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

required
ethaddress str

The fee recipient address to set for the validator.

required

Raises:

Type Description
UnexpectedStatus

If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.

TimeoutException

If the request takes longer than Client.timeout.

Returns:

Type Description
Response[Union[Any, ErrorResponse]]

Response object containing the response from the server, response headers and status code.

Source code in eth_2_key_manager_api_client/api/fee_recipient.py
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
async def asyncio_detailed(self, pubkey: str, ethaddress: str) -> Response[Union[Any, ErrorResponse]]:
    """Set Fee Recipient (asynchronous).

    Sets the validator client fee recipient mapping which will then update the beacon node.
    Existing mappings for the same validator public key will be overwritten.
    Specific Public keys not mapped will continue to use the default address for fee recipient in
    accordance to the startup of the validator client and beacon node.
    Cannot specify the 0x00 fee recipient address through the API.

    WARNING: The fee_recipient is not used on Phase0 or Altair networks.

    Args:
        pubkey: The validator's BLS public key, uniquely identifying them. _48-bytes, hex
            encoded with 0x prefix, case insensitive._
            Example: 0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1c
            fe39b56f43611df74a.
        ethaddress: The fee recipient address to set for the validator.

    Raises:
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
        httpx.TimeoutException: If the request takes longer than Client.timeout.

    Returns:
        Response object containing the response from the server, response headers and status code.
    """

    set_fee_recipient_body = SetFeeRecipientRequest(ethaddress=ethaddress)

    kwargs = _get_kwargs(client=self.client, endpoint=f"validator/{pubkey}/feerecipient", method=self.METHOD, json_body=set_fee_recipient_body)

    async with httpx.AsyncClient(verify=self.client.verify_ssl) as _client:
        response = await _client.request(**kwargs)

    return _build_response(client=self.client, response=response)

sync(pubkey, ethaddress)

Set Fee Recipient (synchronous).

Sets the validator client fee recipient mapping which will then update the beacon node. Existing mappings for the same validator public key will be overwritten. Specific Public keys not mapped will continue to use the default address for fee recipient in accordance to the startup of the validator client and beacon node. Cannot specify the 0x00 fee recipient address through the API.

WARNING: The fee_recipient is not used on Phase0 or Altair networks.

Parameters:

Name Type Description Default
pubkey str

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

required
ethaddress str

The fee recipient address to set for the validator.

required

Raises:

Type Description
UnexpectedStatus

If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.

TimeoutException

If the request takes longer than Client.timeout.

Returns:

Type Description
Optional[Union[Any, ErrorResponse]]

Returns parsed response from the server.

Source code in eth_2_key_manager_api_client/api/fee_recipient.py
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
def sync(self, pubkey: str, ethaddress: str) -> Optional[Union[Any, ErrorResponse]]:
    """Set Fee Recipient (synchronous).

    Sets the validator client fee recipient mapping which will then update the beacon node.
    Existing mappings for the same validator public key will be overwritten.
    Specific Public keys not mapped will continue to use the default address for fee recipient in
    accordance to the startup of the validator client and beacon node.
    Cannot specify the 0x00 fee recipient address through the API.

    WARNING: The fee_recipient is not used on Phase0 or Altair networks.

    Args:
        pubkey: The validator's BLS public key, uniquely identifying them. _48-bytes, hex
            encoded with 0x prefix, case insensitive._
            Example: 0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1c
            fe39b56f43611df74a.
        ethaddress: The fee recipient address to set for the validator.

    Raises:
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
        httpx.TimeoutException: If the request takes longer than Client.timeout.

    Returns:
        Returns parsed response from the server.
    """

    return self.sync_detailed(pubkey=pubkey, ethaddress=ethaddress).parsed

sync_detailed(pubkey, ethaddress)

Set Fee Recipient (synchronous).

Sets the validator client fee recipient mapping which will then update the beacon node. Existing mappings for the same validator public key will be overwritten. Specific Public keys not mapped will continue to use the default address for fee recipient in accordance to the startup of the validator client and beacon node. Cannot specify the 0x00 fee recipient address through the API.

WARNING: The fee_recipient is not used on Phase0 or Altair networks.

Parameters:

Name Type Description Default
pubkey str

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

required
ethaddress str

The fee recipient address to set for the validator.

required

Raises:

Type Description
UnexpectedStatus

If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.

TimeoutException

If the request takes longer than Client.timeout.

Returns:

Type Description
Response[Union[Any, ErrorResponse]]

Response object containing the response from the server, response headers and status code.

Source code in eth_2_key_manager_api_client/api/fee_recipient.py
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
def sync_detailed(self, pubkey: str, ethaddress: str) -> Response[Union[Any, ErrorResponse]]:
    """Set Fee Recipient (synchronous).

    Sets the validator client fee recipient mapping which will then update the beacon node.
    Existing mappings for the same validator public key will be overwritten.
    Specific Public keys not mapped will continue to use the default address for fee recipient in
    accordance to the startup of the validator client and beacon node.
    Cannot specify the 0x00 fee recipient address through the API.

    WARNING: The fee_recipient is not used on Phase0 or Altair networks.

    Args:
        pubkey: The validator's BLS public key, uniquely identifying them. _48-bytes, hex
            encoded with 0x prefix, case insensitive._
            Example: 0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1c
            fe39b56f43611df74a.
        ethaddress: The fee recipient address to set for the validator.

    Raises:
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
        httpx.TimeoutException: If the request takes longer than Client.timeout.

    Returns:
        Response object containing the response from the server, response headers and status code.
    """

    set_fee_recipient_body = SetFeeRecipientRequest(ethaddress=ethaddress)

    kwargs = _get_kwargs(client=self.client, endpoint=f"validator/{pubkey}/feerecipient", method=self.METHOD, json_body=set_fee_recipient_body)

    response = httpx.request(
        verify=self.client.verify_ssl,
        **kwargs,
    )

    return _build_response(client=self.client, response=response)