Skip to content

Commit

Permalink
NUT-06: add urls field (#638)
Browse files Browse the repository at this point in the history
  • Loading branch information
prusnak authored Nov 5, 2024
1 parent 602687b commit 0de574e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ MINT_INFO_DESCRIPTION="The short mint description"
MINT_INFO_DESCRIPTION_LONG="A long mint description that can be a long piece of text."
MINT_INFO_CONTACT=[["email","[email protected]"], ["twitter","@me"], ["nostr", "npub..."]]
MINT_INFO_MOTD="Message to users"
MINT_INFO_ICON_URL="https://mint.host/icon.jpg"
MINT_INFO_URLS=["https://mint.host", "http://mint8gv0sq5ul602uxt2fe0t80e3c2bi9fy0cxedp69v1vat6ruj81wv.onion"]

MINT_PRIVATE_KEY=supersecretprivatekey

Expand Down
1 change: 1 addition & 0 deletions cashu/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class GetInfoResponse(BaseModel):
contact: Optional[List[MintInfoContact]] = None
motd: Optional[str] = None
icon_url: Optional[str] = None
urls: Optional[List[str]] = None
time: Optional[int] = None
nuts: Optional[Dict[int, Any]] = None

Expand Down
1 change: 1 addition & 0 deletions cashu/core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ class MintInformation(CashuSettings):
mint_info_contact: List[List[str]] = Field(default=[])
mint_info_motd: str = Field(default=None)
mint_info_icon_url: str = Field(default=None)
mint_info_urls: List[str] = Field(default=None)


class WalletSettings(CashuSettings):
Expand Down
1 change: 1 addition & 0 deletions cashu/mint/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ async def info() -> GetInfoResponse:
contact=contact_info,
nuts=mint_features,
icon_url=settings.mint_info_icon_url,
urls=settings.mint_info_urls,
motd=settings.mint_info_motd,
time=int(time.time()),
)
Expand Down

0 comments on commit 0de574e

Please sign in to comment.