feat: add more options for wallets

This commit is contained in:
2026-06-08 10:25:51 +03:00
parent 6d7df5836a
commit 14df805209
10 changed files with 300 additions and 8 deletions

View File

@@ -7,9 +7,12 @@ from src.application.domain.entities.organization import (
PurchaseRequestEntity,
)
from src.presentation.schemas.organization import (
CreateWalletsResponse,
DocumentResponse,
MnemonicResponse,
OrganizationResponse,
PurchaseRequestResponse,
SecretKeyResponse,
WalletResponse,
)
@@ -48,6 +51,32 @@ def wallet_to_response(entity: OrganizationWalletEntity) -> WalletResponse:
)
def create_wallets_to_response(*, wallets: list[OrganizationWalletEntity], mnemonic: str) -> CreateWalletsResponse:
return CreateWalletsResponse(
wallets=[wallet_to_response(w) for w in wallets],
mnemonic=mnemonic,
)
def mnemonic_to_response(mnemonic: str) -> MnemonicResponse:
return MnemonicResponse(mnemonic=mnemonic)
def secret_key_to_response(
*,
chain: str,
address: str,
derivation_path: str,
private_key: str,
) -> SecretKeyResponse:
return SecretKeyResponse(
chain=chain,
address=address,
derivation_path=derivation_path,
private_key=private_key,
)
def document_to_response(
entity: OrganizationDocumentEntity,
*,