Spaces:
Runtime error
Runtime error
Commit
·
b8f294c
1
Parent(s):
210a945
output private key
Browse files
app.py
CHANGED
|
@@ -16,14 +16,14 @@ def wallet(hello):
|
|
| 16 |
private_key = account.key
|
| 17 |
address = account.address
|
| 18 |
|
| 19 |
-
wallet = Wallet(ocean.web3, private_key, transaction_timeout=20, block_confirmations=config.block_confirmations)
|
| 20 |
|
| 21 |
-
OCEAN_token = BToken(ocean.web3, ocean.OCEAN_address)
|
| 22 |
|
| 23 |
-
eth_balance = from_wei(ocean.web3.eth.get_balance(address))
|
| 24 |
-
ocean_balance = from_wei(OCEAN_token.balanceOf(address))
|
| 25 |
|
| 26 |
-
return address, mnemonic, eth_balance, ocean_balance
|
| 27 |
|
| 28 |
# def wallet(private_key, did):
|
| 29 |
# wallet = Wallet(ocean.web3, private_key, transaction_timeout=20, block_confirmations=config.block_confirmations)
|
|
@@ -75,10 +75,11 @@ interface = gr.Interface(
|
|
| 75 |
[
|
| 76 |
#gr.outputs.Textbox(label="Public Key"),
|
| 77 |
#gr.outputs.Textbox(label="Algorithm token balance"),
|
| 78 |
-
gr.outputs.Textbox(label="
|
|
|
|
| 79 |
gr.outputs.Textbox(label="Recovery Passphrase"),
|
| 80 |
-
gr.outputs.Textbox(label="ETH balance"),
|
| 81 |
-
gr.outputs.Textbox(label="OCEAN balance"),
|
| 82 |
],
|
| 83 |
title="Algorithm Web3 Wallet",
|
| 84 |
description=description,
|
|
|
|
| 16 |
private_key = account.key
|
| 17 |
address = account.address
|
| 18 |
|
| 19 |
+
# wallet = Wallet(ocean.web3, private_key, transaction_timeout=20, block_confirmations=config.block_confirmations)
|
| 20 |
|
| 21 |
+
# OCEAN_token = BToken(ocean.web3, ocean.OCEAN_address)
|
| 22 |
|
| 23 |
+
# eth_balance = from_wei(ocean.web3.eth.get_balance(address))
|
| 24 |
+
# ocean_balance = from_wei(OCEAN_token.balanceOf(address))
|
| 25 |
|
| 26 |
+
return address, mnemonic, private_key # eth_balance, ocean_balance
|
| 27 |
|
| 28 |
# def wallet(private_key, did):
|
| 29 |
# wallet = Wallet(ocean.web3, private_key, transaction_timeout=20, block_confirmations=config.block_confirmations)
|
|
|
|
| 75 |
[
|
| 76 |
#gr.outputs.Textbox(label="Public Key"),
|
| 77 |
#gr.outputs.Textbox(label="Algorithm token balance"),
|
| 78 |
+
gr.outputs.Textbox(label="Public Address"),
|
| 79 |
+
gr.outputs.Textbox(label="Private Key"),
|
| 80 |
gr.outputs.Textbox(label="Recovery Passphrase"),
|
| 81 |
+
# gr.outputs.Textbox(label="ETH balance"),
|
| 82 |
+
# gr.outputs.Textbox(label="OCEAN balance"),
|
| 83 |
],
|
| 84 |
title="Algorithm Web3 Wallet",
|
| 85 |
description=description,
|