diff --git a/fireblocks_sdk/api_types.py b/fireblocks_sdk/api_types.py index 2196fc6..4273c8a 100644 --- a/fireblocks_sdk/api_types.py +++ b/fireblocks_sdk/api_types.py @@ -714,5 +714,16 @@ def __init__(self, id: str, fee: str = None, fee_level: str = None, tx_note: str self.fee_level = fee_level self.tx_note = tx_note + def to_dict(self): + return convert_class_to_dict(self.__dict__) + +class SplitRequestDto: + def __init__(self, id: str, amount: str, fee: str = None, fee_level: str = None, tx_note: str = None): + self.id = id + self.amount = amount + self.fee = fee + self.fee_level = fee_level + self.tx_note = tx_note + def to_dict(self): return convert_class_to_dict(self.__dict__) \ No newline at end of file diff --git a/fireblocks_sdk/sdk.py b/fireblocks_sdk/sdk.py index ceda273..e8c9294 100644 --- a/fireblocks_sdk/sdk.py +++ b/fireblocks_sdk/sdk.py @@ -36,6 +36,7 @@ UnstakeRequestDto, WithdrawRequestDto, ClaimRewardsRequestDto, + SplitRequestDto, Role, SpamTokenOwnershipValues, TokenOwnershipSpamUpdatePayload, @@ -153,6 +154,11 @@ def execute_staking_claim_rewards(self, chain_descriptor: str, request_body: Cla """ return self._post_request(f"/v1/staking/chains/{chain_descriptor}/claimRewards", request_body.to_dict()) + def execute_staking_split(self, chain_descriptor: str, request_body: SplitRequestDto): + """Execute staking split on a chain. + """ + return self._post_request(f"/v1/staking/chains/{chain_descriptor}/split", request_body.to_dict()) + def get_staking_positions(self, chain_descriptor: str = None): """Get all staking positions, optionally filtered by chain.""" return self._get_request("/v1/staking/positions",