mirror of
https://github.com/more-tech4-magnum-opus/backend.git
synced 2024-11-21 19:16:33 +03:00
add create wallet
This commit is contained in:
parent
4e4735d7e2
commit
ccdaacfe8a
18
app/utils/blockchain.py
Normal file
18
app/utils/blockchain.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
from xml.dom import pulldom
|
||||
from pydantic import BaseModel
|
||||
import requests as r
|
||||
|
||||
URL = 'https://hackathon.lsp.team/hk'
|
||||
|
||||
"""TODO: Сделать обвязку апишки блокчейна"""
|
||||
|
||||
|
||||
class WalletCreation(BaseModel):
|
||||
publicKey: str
|
||||
privateKey: str
|
||||
|
||||
|
||||
def create_wallet() -> WalletCreation:
|
||||
response = r.post(URL+'/v1/wallets/new')
|
||||
data = response.json()
|
||||
return WalletCreation(publicKey=data['publicKey'], privateKey=data['privateKey'])
|
Loading…
Reference in New Issue
Block a user