2022-02-07 13:22:43 +00:00
|
|
|
import json
|
|
|
|
from sqlite3 import Row
|
|
|
|
from typing import Optional
|
|
|
|
|
|
|
|
from fastapi import Request
|
|
|
|
from pydantic import BaseModel
|
|
|
|
from pydantic.main import BaseModel
|
|
|
|
|
|
|
|
class nostrKeys(BaseModel):
|
|
|
|
pubkey: str
|
|
|
|
privkey: str
|
|
|
|
|
|
|
|
class nostrNotes(BaseModel):
|
|
|
|
id: str
|
|
|
|
pubkey: str
|
|
|
|
created_at: str
|
|
|
|
kind: int
|
|
|
|
tags: str
|
|
|
|
content: str
|
|
|
|
sig: str
|
|
|
|
|
2022-02-07 20:01:01 +00:00
|
|
|
class nostrCreateRelays(BaseModel):
|
|
|
|
relay: str
|
|
|
|
|
|
|
|
class nostrCreateConnections(BaseModel):
|
|
|
|
pubkey: str
|
|
|
|
relayid: str
|
|
|
|
|
2022-02-07 13:22:43 +00:00
|
|
|
class nostrRelays(BaseModel):
|
|
|
|
id: str
|
|
|
|
relay: str
|
|
|
|
|
|
|
|
class nostrConnections(BaseModel):
|
|
|
|
id: str
|
|
|
|
pubkey: str
|
|
|
|
relayid: str
|