mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-22 11:24:19 +01:00
feat: early multimint support
This commit is contained in:
@@ -23,11 +23,23 @@ router: APIRouter = APIRouter()
|
||||
|
||||
@router.get("/keys")
|
||||
async def keys() -> dict[int, str]:
|
||||
"""Get the public keys of the mint"""
|
||||
"""Get the public keys of the mint of the newest keyset"""
|
||||
keyset = ledger.get_keyset()
|
||||
return keyset
|
||||
|
||||
|
||||
@router.get("/keys/{idBase64Urlsafe}")
|
||||
async def keyset_keys(idBase64Urlsafe: str) -> dict[int, str]:
|
||||
"""
|
||||
Get the public keys of the mint of a specificy keyset id.
|
||||
The id is encoded in base64_urlsafe and needs to be converted back to
|
||||
normal base64 before it can be processed.
|
||||
"""
|
||||
id = idBase64Urlsafe.replace("-", "+").replace("_", "/")
|
||||
keyset = ledger.get_keyset(keyset_id=id)
|
||||
return keyset
|
||||
|
||||
|
||||
@router.get("/keysets")
|
||||
async def keysets() -> dict[str, list[str]]:
|
||||
"""Get all active keysets of the mint"""
|
||||
|
||||
Reference in New Issue
Block a user