mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-24 03:54:21 +01:00
NUT-06: Mint contact info (#585)
* Implement NUT-06 change: https://github.com/cashubtc/nuts/pull/117 * wallet deserialize * ignore contact info for deprecated v0 response
This commit is contained in:
@@ -10,6 +10,7 @@ from ..core.models import (
|
||||
KeysetsResponseKeyset,
|
||||
KeysResponse,
|
||||
KeysResponseKeyset,
|
||||
MintInfoContact,
|
||||
PostCheckStateRequest,
|
||||
PostCheckStateResponse,
|
||||
PostMeltQuoteRequest,
|
||||
@@ -41,13 +42,16 @@ router: APIRouter = APIRouter()
|
||||
async def info() -> GetInfoResponse:
|
||||
logger.trace("> GET /v1/info")
|
||||
mint_features = ledger.mint_features()
|
||||
contact_info = [
|
||||
MintInfoContact(method=m, info=i) for m, i in settings.mint_info_contact
|
||||
]
|
||||
return GetInfoResponse(
|
||||
name=settings.mint_info_name,
|
||||
pubkey=ledger.pubkey.serialize().hex() if ledger.pubkey else None,
|
||||
version=f"Nutshell/{settings.version}",
|
||||
description=settings.mint_info_description,
|
||||
description_long=settings.mint_info_description_long,
|
||||
contact=settings.mint_info_contact,
|
||||
contact=contact_info,
|
||||
nuts=mint_features,
|
||||
motd=settings.mint_info_motd,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user