mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-21 19:14:19 +01:00
choose endpoint
This commit is contained in:
7
cashu
7
cashu
@@ -8,8 +8,6 @@ import json
|
||||
import base64
|
||||
from bech32 import bech32_encode, bech32_decode, convertbits
|
||||
|
||||
SERVER_ENDPOINT = "http://localhost:5000"
|
||||
|
||||
|
||||
import asyncio
|
||||
from functools import wraps
|
||||
@@ -25,14 +23,15 @@ def coro(f):
|
||||
|
||||
|
||||
@click.command("mint")
|
||||
@click.option("--host", default="http://localhost:5000", help="Mint tokens.")
|
||||
@click.option("--wallet", default="wallet", help="Mint tokens.")
|
||||
@click.option("--mint", default=0, help="Mint tokens.")
|
||||
@click.option("--send", default=0, help="Send tokens.")
|
||||
@click.option("--receive", default="", help="Receive tokens.")
|
||||
@click.option("--invalidate", default="", help="Invalidate tokens.")
|
||||
@coro
|
||||
async def main(wallet, mint, send, receive, invalidate):
|
||||
wallet = Wallet(SERVER_ENDPOINT, f"data/{wallet}")
|
||||
async def main(host, wallet, mint, send, receive, invalidate):
|
||||
wallet = Wallet(host, f"data/{wallet}")
|
||||
await m001_initial(db=wallet.db)
|
||||
await wallet.load_proofs()
|
||||
if mint:
|
||||
|
||||
@@ -6,8 +6,10 @@ from wallet.wallet import Wallet as Wallet2
|
||||
from wallet.migrations import m001_initial
|
||||
|
||||
|
||||
SERVER_ENDPOINT = "http://localhost:5000"
|
||||
|
||||
|
||||
async def run_test():
|
||||
SERVER_ENDPOINT = "http://localhost:5000"
|
||||
wallet1 = Wallet1(SERVER_ENDPOINT, "data/wallet1")
|
||||
await m001_initial(wallet1.db)
|
||||
wallet1.status()
|
||||
|
||||
Reference in New Issue
Block a user