Skip to content
Closed
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
19 changes: 19 additions & 0 deletions dfns_sdk/generated/allocations/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,22 @@ def get_allocation(self, allocation_id: str) -> T.GetAllocationResponse:
requires_signature=False,
)
return cast(T.GetAllocationResponse, response)

def get_allocations_info(self) -> T.GetAllocationsInfoResponse:
"""
Get Allocations Info.

Retrieve the current reward rate (APY) for each supported allocation protocol.

Returns:
T.GetAllocationsInfoResponse: The API response.
""" # noqa: E501
response = self._http.request(
method="GET",
path="/allocations/info",
path_params={},
query_params=None,
body=None,
requires_signature=False,
)
return cast(T.GetAllocationsInfoResponse, response)
19 changes: 19 additions & 0 deletions dfns_sdk/generated/allocations/delegated_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,22 @@ def get_allocation(self, allocation_id: str) -> T.GetAllocationResponse:
requires_signature=False,
)
return cast(T.GetAllocationResponse, response)

def get_allocations_info(self) -> T.GetAllocationsInfoResponse:
"""
Get Allocations Info.

Retrieve the current reward rate (APY) for each supported allocation protocol.

Returns:
T.GetAllocationsInfoResponse: The API response.
""" # noqa: E501
response = self._http.request(
method="GET",
path="/allocations/info",
path_params={},
query_params=None,
body=None,
requires_signature=False,
)
return cast(T.GetAllocationsInfoResponse, response)
12 changes: 12 additions & 0 deletions dfns_sdk/generated/allocations/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,15 @@ class GetAllocationResponse(TypedDict, total=False):
rewards: dict[str, Any]
date_created: str
actions: list[dict[str, Any]]


class GetAllocationsInfoResponse(TypedDict, total=False):
"""getAllocationsInfo response."""

ofns: NotRequired[dict[str, Any]]
sky_susds: NotRequired[dict[str, Any]]
gauntlet_usdc_prime: NotRequired[dict[str, Any]]
steakhouse_usdt: NotRequired[dict[str, Any]]
gauntlet_usdc_prime_base: NotRequired[dict[str, Any]]
steakhouse_usdc_base: NotRequired[dict[str, Any]]
sentora_pyusd_main: NotRequired[dict[str, Any]]
8 changes: 6 additions & 2 deletions dfns_sdk/generated/permissions/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ class CreatePermissionRequest(TypedDict, total=False):
"KeyStores:Fleets:Clone",
"KeyStores:Fleets:AddMacUser",
"KeyStores:Fleets:KeyHarvest",
"KeyStores:Fleets:AddProvisioner",
"KeyStores:Fleets:Cancel",
"KeyStores:ProofOfControl:Create",
"KeyStores:OnchainSignatures:Create",
"Networks:CantonValidators:Create",
Expand All @@ -185,7 +187,7 @@ class CreatePermissionRequest(TypedDict, total=False):
"Vaults:Tags:Add",
"Vaults:Tags:Delete",
"Vaults:Addresses:Create",
"Vaults:Balances:Unquarantine",
"Vaults:Quarantines:Release",
"Vaults:Transfers:Create",
"Webhooks:Create",
"Webhooks:Read",
Expand Down Expand Up @@ -351,6 +353,8 @@ class UpdatePermissionRequest(TypedDict, total=False):
"KeyStores:Fleets:Clone",
"KeyStores:Fleets:AddMacUser",
"KeyStores:Fleets:KeyHarvest",
"KeyStores:Fleets:AddProvisioner",
"KeyStores:Fleets:Cancel",
"KeyStores:ProofOfControl:Create",
"KeyStores:OnchainSignatures:Create",
"Networks:CantonValidators:Create",
Expand All @@ -376,7 +380,7 @@ class UpdatePermissionRequest(TypedDict, total=False):
"Vaults:Tags:Add",
"Vaults:Tags:Delete",
"Vaults:Addresses:Create",
"Vaults:Balances:Unquarantine",
"Vaults:Quarantines:Release",
"Vaults:Transfers:Create",
"Webhooks:Create",
"Webhooks:Read",
Expand Down
69 changes: 69 additions & 0 deletions dfns_sdk/generated/signers/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,29 @@ class SignersClient:
def __init__(self, http_client: HttpClient):
self._http = http_client

def cancel_fleet_operation(
self, store_id: str, body: T.CancelFleetOperationRequest
) -> T.CancelFleetOperationResponse:
"""
Cancel Fleet Operation.

Args:
store_id: Path parameter.
body: Request body.

Returns:
T.CancelFleetOperationResponse: The API response.
""" # noqa: E501
response = self._http.request(
method="POST",
path="/key-stores/{storeId}/fleet-operations/cancel",
path_params={"storeId": store_id},
query_params=None,
body=body,
requires_signature=True,
)
return cast(T.CancelFleetOperationResponse, response)

def create_add_mac_user_input(self, store_id: str, body: T.CreateAddMacUserInputRequest) -> None:
"""
Create Add Mac User Input.
Expand All @@ -31,6 +54,25 @@ def create_add_mac_user_input(self, store_id: str, body: T.CreateAddMacUserInput
requires_signature=True,
)

def create_add_provisioner_input(self, store_id: str, body: T.CreateAddProvisionerInputRequest) -> None:
"""
Create Add Provisioner Input.

Creates the input archive for an add-provisioner fleet operation, which registers a new provisioner YubiKey into the key store's governance set.

Args:
store_id: Path parameter.
body: Request body.
""" # noqa: E501
self._http.request(
method="POST",
path="/key-stores/{storeId}/add-provisioner/input",
path_params={"storeId": store_id},
query_params=None,
body=body,
requires_signature=True,
)

def create_clone_input(self, store_id: str, body: T.CreateCloneInputRequest) -> None:
"""
Create Clone Input.
Expand Down Expand Up @@ -189,6 +231,33 @@ def submit_add_mac_user_output(
)
return cast(T.SubmitAddMacUserOutputResponse, response)

def submit_add_provisioner_output(
self, store_id: str, body: T.SubmitAddProvisionerOutputRequest, file: bytes
) -> T.SubmitAddProvisionerOutputResponse:
"""
Submit Add Provisioner Output.

Submits the output archive produced by the offline signer fleet for an add-provisioner operation.

Args:
store_id: Path parameter.
body: Request body.
file: The file bytes to upload.

Returns:
T.SubmitAddProvisionerOutputResponse: The API response.
""" # noqa: E501
response = self._http.request(
method="POST",
path="/key-stores/{storeId}/add-provisioner/output",
path_params={"storeId": store_id},
query_params=None,
body=body,
file=file,
requires_signature=True,
)
return cast(T.SubmitAddProvisionerOutputResponse, response)

def submit_clone_output(
self, store_id: str, body: T.SubmitCloneOutputRequest, file: bytes
) -> T.SubmitCloneOutputResponse:
Expand Down
133 changes: 133 additions & 0 deletions dfns_sdk/generated/signers/delegated_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,61 @@ class DelegatedSignersClient:
def __init__(self, http_client: HttpClient):
self._http = http_client

def cancel_fleet_operation_init(
self, store_id: str, body: T.CancelFleetOperationRequest
) -> UserActionChallengeResponse:
"""
Initialize Cancel Fleet Operation.

Creates a user action challenge for external signing.

Args:
store_id: Path parameter.
body: Request body.

Returns:
UserActionChallengeResponse: The challenge to sign externally.
""" # noqa: E501
path = "/key-stores/{storeId}/fleet-operations/cancel"
path = path.replace("{storeId}", str(store_id))
payload = json.dumps(body, separators=(",", ":")) if body else ""

return BaseAuthApi.create_user_action_challenge(
self._http,
user_action_http_method="POST",
user_action_http_path=path,
user_action_payload=payload,
)

def cancel_fleet_operation_complete(
self, store_id: str, body: T.CancelFleetOperationRequest, signed_challenge: SignUserActionChallengeRequest
) -> T.CancelFleetOperationResponse:
"""
Complete Cancel Fleet Operation.

Submits the signed challenge and makes the API request.

Args:
store_id: Path parameter.
body: Request body.
signed_challenge: The signed challenge from external signing.

Returns:
T.CancelFleetOperationResponse: The API response.
""" # noqa: E501
user_action_result = BaseAuthApi.sign_user_action_challenge(self._http, signed_challenge)
user_action_token = user_action_result["userAction"]

response = self._http.request_with_user_action(
method="POST",
path="/key-stores/{storeId}/fleet-operations/cancel",
path_params={"storeId": store_id},
query_params=None,
body=body,
user_action=user_action_token,
)
return cast(T.CancelFleetOperationResponse, response)

def create_add_mac_user_input_init(
self, store_id: str, body: T.CreateAddMacUserInputRequest
) -> UserActionChallengeResponse:
Expand Down Expand Up @@ -70,6 +125,57 @@ def create_add_mac_user_input_complete(
user_action=user_action_token,
)

def create_add_provisioner_input_init(
self, store_id: str, body: T.CreateAddProvisionerInputRequest
) -> UserActionChallengeResponse:
"""
Initialize Create Add Provisioner Input.

Creates a user action challenge for external signing.

Args:
store_id: Path parameter.
body: Request body.

Returns:
UserActionChallengeResponse: The challenge to sign externally.
""" # noqa: E501
path = "/key-stores/{storeId}/add-provisioner/input"
path = path.replace("{storeId}", str(store_id))
payload = json.dumps(body, separators=(",", ":")) if body else ""

return BaseAuthApi.create_user_action_challenge(
self._http,
user_action_http_method="POST",
user_action_http_path=path,
user_action_payload=payload,
)

def create_add_provisioner_input_complete(
self, store_id: str, body: T.CreateAddProvisionerInputRequest, signed_challenge: SignUserActionChallengeRequest
) -> None:
"""
Complete Create Add Provisioner Input.

Submits the signed challenge and makes the API request.

Args:
store_id: Path parameter.
body: Request body.
signed_challenge: The signed challenge from external signing.
""" # noqa: E501
user_action_result = BaseAuthApi.sign_user_action_challenge(self._http, signed_challenge)
user_action_token = user_action_result["userAction"]

self._http.request_with_user_action(
method="POST",
path="/key-stores/{storeId}/add-provisioner/input",
path_params={"storeId": store_id},
query_params=None,
body=body,
user_action=user_action_token,
)

def create_clone_input_init(self, store_id: str, body: T.CreateCloneInputRequest) -> UserActionChallengeResponse:
"""
Initialize Create Clone Input.
Expand Down Expand Up @@ -388,6 +494,33 @@ def submit_add_mac_user_output(
)
return cast(T.SubmitAddMacUserOutputResponse, response)

def submit_add_provisioner_output(
self, store_id: str, body: T.SubmitAddProvisionerOutputRequest, file: bytes
) -> T.SubmitAddProvisionerOutputResponse:
"""
Submit Add Provisioner Output.

Submits the output archive produced by the offline signer fleet for an add-provisioner operation.

Args:
store_id: Path parameter.
body: Request body.
file: The file bytes to upload.

Returns:
T.SubmitAddProvisionerOutputResponse: The API response.
""" # noqa: E501
response = self._http.request(
method="POST",
path="/key-stores/{storeId}/add-provisioner/output",
path_params={"storeId": store_id},
query_params=None,
body=body,
file=file,
requires_signature=True,
)
return cast(T.SubmitAddProvisionerOutputResponse, response)

def submit_clone_output(
self, store_id: str, body: T.SubmitCloneOutputRequest, file: bytes
) -> T.SubmitCloneOutputResponse:
Expand Down
Loading