feat: add more options for wallets
This commit is contained in:
@@ -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,
|
||||
*,
|
||||
|
||||
Reference in New Issue
Block a user