tips table/total, pending txes, verification
parent
d937a12317
commit
e3a3e7aa19
Binary file not shown.
After Width: | Height: | Size: 57 KiB |
@ -1,19 +1,34 @@
|
|||||||
import peewee as pw
|
|
||||||
import playhouse.postgres_ext as pwpg
|
|
||||||
from monero.wallet import Wallet
|
from monero.wallet import Wallet
|
||||||
|
from monero.daemon import Daemon
|
||||||
|
|
||||||
from nerochan import config
|
from nerochan import config
|
||||||
|
|
||||||
|
|
||||||
def make_wallet_rpc(method, data={}):
|
daemon = Daemon(
|
||||||
try:
|
host=config.XMR_DAEMON_HOST,
|
||||||
w = Wallet(
|
port=config.XMR_DAEMON_PORT,
|
||||||
|
timeout=3
|
||||||
|
)
|
||||||
|
|
||||||
|
wallet = Wallet(
|
||||||
port=config.XMR_WALLET_RPC_PORT,
|
port=config.XMR_WALLET_RPC_PORT,
|
||||||
user=config.XMR_WALLET_RPC_USER,
|
user=config.XMR_WALLET_RPC_USER,
|
||||||
password=config.XMR_WALLET_RPC_PASS,
|
password=config.XMR_WALLET_RPC_PASS,
|
||||||
timeout=3
|
timeout=3
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def make_wallet_rpc(method, data={}):
|
||||||
|
try:
|
||||||
|
w = wallet
|
||||||
res = w._backend.raw_request(method, data)
|
res = w._backend.raw_request(method, data)
|
||||||
return res
|
return res
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise e
|
raise e
|
||||||
|
|
||||||
|
def make_daemon_rpc(method, data={}):
|
||||||
|
try:
|
||||||
|
d = daemon
|
||||||
|
res = d._backend.raw_request(method, data)
|
||||||
|
return res
|
||||||
|
except Exception as e:
|
||||||
|
raise e
|
||||||
|
Loading…
Reference in New Issue