Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/AdditionalInfo.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Additional information related to the blockchain. This may include extra details

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**estimated_annual_reward** | **float** | The estimated annual reward rate for the blockchain, represented as a decimal percentage value. |
**lockup_period** | **float** | The duration of the lockup period for certain actions on the blockchain, measured in milliseconds. |
**activation_period** | **float** | The duration of the activation period for certain actions on the blockchain, measured in milliseconds. |

Expand Down
1 change: 1 addition & 0 deletions docs/DelegationBlockchainPositionInfo.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Name | Type | Description | Notes
**stake_account_derivation_change_value** | **float** | The value of the change level in the BIP32 path which was used to derive the stake account address. |
**rewards_breakdown** | [**SolanaRewardsBreakdown**](SolanaRewardsBreakdown.md) | | [optional]
**is_compounding_validator** | **bool** | Is the validator compounding (i.e it was created with compounding validator type). |
**estimated_activation_time** | **str** | Estimated time the staked ETH will activate, derived from the beacon-chain deposit queue. Present only while the position is pending/activating; omitted once active. | [optional]
**total_withdrawable_amount** | **str** | The total amount available for withdrawal. |
**total_inactive_amount** | **str** | The total inactive amount. |

Expand Down
1 change: 1 addition & 0 deletions docs/EthereumBlockchainData.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Additional fields per blockchain for Ethereum (ETH) - can be empty or missing if
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**is_compounding_validator** | **bool** | Is the validator compounding (i.e it was created with compounding validator type). |
**estimated_activation_time** | **str** | Estimated time the staked ETH will activate, derived from the beacon-chain deposit queue. Present only while the position is pending/activating; omitted once active. | [optional]

## Example

Expand Down
4 changes: 1 addition & 3 deletions fireblocks/models/additional_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ class AdditionalInfo(BaseModel):
"""
Additional information related to the blockchain. This may include extra details about the blockchain network.
""" # noqa: E501
estimated_annual_reward: Union[StrictFloat, StrictInt] = Field(description="The estimated annual reward rate for the blockchain, represented as a decimal percentage value.", alias="estimatedAnnualReward")
lockup_period: Union[StrictFloat, StrictInt] = Field(description="The duration of the lockup period for certain actions on the blockchain, measured in milliseconds.", alias="lockupPeriod")
activation_period: Union[StrictFloat, StrictInt] = Field(description="The duration of the activation period for certain actions on the blockchain, measured in milliseconds.", alias="activationPeriod")
__properties: ClassVar[List[str]] = ["estimatedAnnualReward", "lockupPeriod", "activationPeriod"]
__properties: ClassVar[List[str]] = ["lockupPeriod", "activationPeriod"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -83,7 +82,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)

_obj = cls.model_validate({
"estimatedAnnualReward": obj.get("estimatedAnnualReward"),
"lockupPeriod": obj.get("lockupPeriod"),
"activationPeriod": obj.get("activationPeriod")
})
Expand Down
10 changes: 6 additions & 4 deletions fireblocks/models/ethereum_blockchain_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
import re # noqa: F401
import json

from pydantic import BaseModel, ConfigDict, Field, StrictBool
from typing import Any, ClassVar, Dict, List
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self

Expand All @@ -28,7 +28,8 @@ class EthereumBlockchainData(BaseModel):
Additional fields per blockchain for Ethereum (ETH) - can be empty or missing if not initialized or no specific data is available.
""" # noqa: E501
is_compounding_validator: StrictBool = Field(description="Is the validator compounding (i.e it was created with compounding validator type).", alias="isCompoundingValidator")
__properties: ClassVar[List[str]] = ["isCompoundingValidator"]
estimated_activation_time: Optional[StrictStr] = Field(default=None, description="Estimated time the staked ETH will activate, derived from the beacon-chain deposit queue. Present only while the position is pending/activating; omitted once active.", alias="estimatedActivationTime")
__properties: ClassVar[List[str]] = ["isCompoundingValidator", "estimatedActivationTime"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -81,7 +82,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)

_obj = cls.model_validate({
"isCompoundingValidator": obj.get("isCompoundingValidator")
"isCompoundingValidator": obj.get("isCompoundingValidator"),
"estimatedActivationTime": obj.get("estimatedActivationTime")
})
return _obj

Expand Down
4 changes: 2 additions & 2 deletions test/test_add_connected_account_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def make_instance(self, include_optional) -> AddConnectedAccountRequest:
return AddConnectedAccountRequest(
provider_id = 'BINANCE',
display_name = 'My Binance Account',
creds = '[B@7e8e70d5',
creds = '[B@3f182db1',
api_key = 'api_key_abc123',
main_account_id = 'acc-parent-001',
account_id = 'provider-acc-001',
Expand All @@ -47,7 +47,7 @@ def make_instance(self, include_optional) -> AddConnectedAccountRequest:
else:
return AddConnectedAccountRequest(
provider_id = 'BINANCE',
creds = '[B@7e8e70d5',
creds = '[B@3f182db1',
api_key = 'api_key_abc123',
)
"""
Expand Down
2 changes: 0 additions & 2 deletions test/test_additional_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,11 @@ def make_instance(self, include_optional) -> AdditionalInfo:
model = AdditionalInfo()
if include_optional:
return AdditionalInfo(
estimated_annual_reward = 6.48,
lockup_period = 172800000,
activation_period = 172800000
)
else:
return AdditionalInfo(
estimated_annual_reward = 6.48,
lockup_period = 172800000,
activation_period = 172800000,
)
Expand Down
2 changes: 0 additions & 2 deletions test/test_chain_info_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ def make_instance(self, include_optional) -> ChainInfoResponse:
epoch_elapsed = 0.31,
epoch_duration = 172800000,
additional_info = fireblocks.models.additional_info.AdditionalInfo(
estimated_annual_reward = 6.48,
lockup_period = 172800000,
activation_period = 172800000, ),
last_updated = 1706602061938
Expand All @@ -53,7 +52,6 @@ def make_instance(self, include_optional) -> ChainInfoResponse:
epoch_elapsed = 0.31,
epoch_duration = 172800000,
additional_info = fireblocks.models.additional_info.AdditionalInfo(
estimated_annual_reward = 6.48,
lockup_period = 172800000,
activation_period = 172800000, ),
last_updated = 1706602061938,
Expand Down
1 change: 1 addition & 0 deletions test/test_delegation_blockchain_position_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def make_instance(self, include_optional) -> DelegationBlockchainPositionInfo:
stake_account_derivation_change_value = 7,
rewards_breakdown = {"inflation":"0.000856038","mev":"0.000123456","lastRewardSyncedAt":"2023-07-13T15:55:34.256Z"},
is_compounding_validator = True,
estimated_activation_time = '2024-01-15T14:30:00.000Z',
total_withdrawable_amount = '1.5',
total_inactive_amount = '2.0'
)
Expand Down
3 changes: 2 additions & 1 deletion test/test_ethereum_blockchain_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ def make_instance(self, include_optional) -> EthereumBlockchainData:
model = EthereumBlockchainData()
if include_optional:
return EthereumBlockchainData(
is_compounding_validator = True
is_compounding_validator = True,
estimated_activation_time = '2024-01-15T14:30:00.000Z'
)
else:
return EthereumBlockchainData(
Expand Down
Loading