gnostr
This commit is contained in:
parent
b04313d908
commit
80c1bf1728
@ -0,0 +1 @@
|
||||
{"content":"{\"maintainers_group\":[\"group\",\"292173f2470f198f4816eccc5e6de037c1b373eb30159fa4650167f66017cf54\",\"wss://relay.damus.io\",\"wss://nos.lol\"],\"name\":\"elements.py\",\"relays\":[\"wss://relay.damus.io\",\"wss://nos.lol\"]}","created_at":1706217362,"id":"81955cad0ffa00edf912e972699f7f130d372957f2fb4de66fdf7011a623712b","kind":40010,"pubkey":"16f1a0100d4cfffbcc4230e8e0e4290cc5849c1adc64d6653fda07c031b1074b","sig":"c79e19d4ef01c3cf8853c94b5a6f74e5ba4f264bea2591bf7bb793f92f94245ca14c38e7c8a3be7efb00a48760d80e1642ed292c1831b822c5f004880a4b9cc1","tags":[["group","292173f2470f198f4816eccc5e6de037c1b373eb30159fa4650167f66017cf54","wss://relay.damus.io","wss://nos.lol"],["t","gnostr-event"],["t","gnostr-format-0.0.0"],["relays","wss://relay.damus.io","wss://nos.lol"]]}
|
@ -0,0 +1 @@
|
||||
{"content":"From 06a984bbe3bda472183a5aa3e48832aca1cb4b1f Mon Sep 17 00:00:00 2001\nFrom: 0ceanSlim <chriskerr@gmx.com>\nDate: Wed, 8 Nov 2023 16:42:36 -0500\nSubject: [PATCH] added wallet selection to select UTXO\n\n---\n listUTXO.py | 29 +++++++++++++++++------------\n 1 file changed, 17 insertions(+), 12 deletions(-)\n\ndiff --git a/listUTXO.py b/listUTXO.py\nindex 4d7bbaa..aedf100 100644\n--- a/listUTXO.py\n+++ b/listUTXO.py\n@@ -10,12 +10,12 @@ rpc_port = config[\"rpc_port\"]\n rpc_user = config[\"rpc_user\"]\n rpc_password = config[\"rpc_password\"]\n \n+# List available wallets\n try:\n rpc_connection = AuthServiceProxy(\n f\"http://{rpc_user}:{rpc_password}@{rpc_host}:{rpc_port}\"\n )\n \n- # List available wallets\n wallet_list = rpc_connection.listwallets()\n \n if not wallet_list:\n@@ -41,18 +41,23 @@ try:\n print(\"Invalid wallet selection. Exiting.\")\n exit()\n \n- # Get the list of transactions for the selected wallet\n- transactions = rpc_connection.listtransactions(wallet_name)\n+ # Now that wallet_name is defined, proceed with the RPC connection\n+ rpc_connection = AuthServiceProxy(\n+ f\"http://{rpc_user}:{rpc_password}@{rpc_host}:{rpc_port}/wallet/{wallet_name}\"\n+ )\n \n- if not transactions:\n- print(f\"No transactions found for wallet '{wallet_name}'.\")\n- else:\n- print(f\"Transactions for wallet '{wallet_name}':\")\n- for transaction in transactions:\n- print(f\"Transaction ID: {transaction['txid']}\")\n- print(f\"Category: {transaction['category']}\")\n- print(f\"Amount: {transaction['amount']} {transaction['asset']}\")\n- print(f\"Confirmations: {transaction['confirmations']}\\n\")\n+ # Get the list of transactions for the selected wallet\n+ transactions = rpc_connection.listtransactions()\n+\n+ if not transactions:\n+ print(f\"No transactions found for wallet '{wallet_name}'.\")\n+ else:\n+ print(f\"Transactions for wallet '{wallet_name}':\")\n+ for transaction in transactions:\n+ print(f\"Transaction ID: {transaction['txid']}\")\n+ print(f\"Category: {transaction['category']}\")\n+ print(f\"Amount: {transaction['amount']} {transaction['asset']}\")\n+ print(f\"Confirmations: {transaction['confirmations']}\\n\")\n \n except JSONRPCException as json_exception:\n print(\"A JSON RPC Exception occurred: \" + str(json_exception))\n--\nlibgit2 1.6.4\n\n","created_at":1706217663,"id":"e4917eaa651fffc3ba9ea59b614e2c5ac52672f5eec81016201012bb2882f860","kind":410,"pubkey":"16f1a0100d4cfffbcc4230e8e0e4290cc5849c1adc64d6653fda07c031b1074b","sig":"5504a743d5c685223c86af9b2b0b6bac8107ab3d8c6422d15ea85d412039085cfd8b0196740beb0c5e3afa0befe4ef431ac0922e3e510657f722229f28c11df1","tags":[["repo","81955cad0ffa00edf912e972699f7f130d372957f2fb4de66fdf7011a623712b"],["e","81955cad0ffa00edf912e972699f7f130d372957f2fb4de66fdf7011a623712b"],["branch","81955cad0ffa00edf912e972699f7f130d372957f2fb4de66fdf7011a623712b"],["e","81955cad0ffa00edf912e972699f7f130d372957f2fb4de66fdf7011a623712b"],["commit-message","added wallet selection to select UTXO\n"],["t","gnostr-event"],["t","gnostr-format-0.0.0"],["commit","06a984bbe3bda472183a5aa3e48832aca1cb4b1f"],["parent-commit","afcffeea37d35afb115e72f46ca7fcddee7d7356"],["parent-patch","707f42661b6ce37602204511a6f0e63f7856dc334caf1bb96b85adca24b02e5e"],["e","707f42661b6ce37602204511a6f0e63f7856dc334caf1bb96b85adca24b02e5e"]]}
|
@ -0,0 +1 @@
|
||||
{"content":"From 0f18285565dc0bef0d9ad711879bd5873f9733af Mon Sep 17 00:00:00 2001\nFrom: 0ceanSlim <chriskerr@gmx.com>\nDate: Wed, 8 Nov 2023 16:49:44 -0500\nSubject: [PATCH] list balance fixed\n\n---\n .gitignore | 2 +-\n listBalance.py | 7 ++++++-\n 2 files changed, 7 insertions(+), 2 deletions(-)\n\ndiff --git a/.gitignore b/.gitignore\nindex 4bdc9d5..8f48e49 100644\n--- a/.gitignore\n+++ b/.gitignore\n@@ -1 +1 @@\n-/my_rpc_config.json\n\\ No newline at end of file\n+/rpc_config.json\n\\ No newline at end of file\ndiff --git a/listBalance.py b/listBalance.py\nindex 9b4897c..0bc5da4 100644\n--- a/listBalance.py\n+++ b/listBalance.py\n@@ -40,8 +40,13 @@ try:\n print(\"Invalid wallet selection. Exiting.\")\n exit()\n \n+ # Connect to the selected wallet by specifying the wallet file name\n+ rpc_wallet_connection = AuthServiceProxy(\n+ f\"http://{rpc_user}:{rpc_password}@{rpc_host}:{rpc_port}/wallet/{wallet_name}\"\n+ )\n+\n # List unspent transaction outputs (UTXOs)\n- utxos = rpc_connection.listunspent(0, 9999999, [], True)\n+ utxos = rpc_wallet_connection.listunspent(0, 9999999, [], True)\n \n # Calculate asset balances\n asset_balances = {}\n--\nlibgit2 1.6.4\n\n","created_at":1706217663,"id":"42c6ef3b7099c4a227d0f907776013c8717e4ee0708799fb8301dd8adf26af43","kind":410,"pubkey":"16f1a0100d4cfffbcc4230e8e0e4290cc5849c1adc64d6653fda07c031b1074b","sig":"c5b0a44420a875a9f4fc37e707294aaaf7abdb702f0d636871c6fc68eb066da562a9173e6c230a26d8ec1a5cd37d6363f97b575df34e7cdc8b72747b8f8e52ee","tags":[["repo","81955cad0ffa00edf912e972699f7f130d372957f2fb4de66fdf7011a623712b"],["e","81955cad0ffa00edf912e972699f7f130d372957f2fb4de66fdf7011a623712b"],["branch","81955cad0ffa00edf912e972699f7f130d372957f2fb4de66fdf7011a623712b"],["e","81955cad0ffa00edf912e972699f7f130d372957f2fb4de66fdf7011a623712b"],["commit-message","list balance fixed\n"],["t","gnostr-event"],["t","gnostr-format-0.0.0"],["commit","0f18285565dc0bef0d9ad711879bd5873f9733af"],["parent-commit","06a984bbe3bda472183a5aa3e48832aca1cb4b1f"],["parent-patch","e4917eaa651fffc3ba9ea59b614e2c5ac52672f5eec81016201012bb2882f860"],["e","e4917eaa651fffc3ba9ea59b614e2c5ac52672f5eec81016201012bb2882f860"]]}
|
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
||||
{"content":"From 83aeb3bc0d2015751a304fe511d1426c6eda7bbc Mon Sep 17 00:00:00 2001\nFrom: 0ceanSlim <89587889+0ceanSlim@users.noreply.github.com>\nDate: Wed, 8 Nov 2023 19:34:29 -0500\nSubject: [PATCH] bfg.jar added to ignore\n\n---\n .gitignore | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/.gitignore b/.gitignore\nindex 8f48e49..c28ebe6 100644\n--- a/.gitignore\n+++ b/.gitignore\n@@ -1 +1,2 @@\n-/rpc_config.json\n\\ No newline at end of file\n+/rpc_config.json\n+/bfg.jar\n\\ No newline at end of file\n--\nlibgit2 1.6.4\n\n","created_at":1706217663,"id":"b52c0cb98ed157a04e11577d0770ad016678bab74c776df0d8fe70ef7308ef61","kind":410,"pubkey":"16f1a0100d4cfffbcc4230e8e0e4290cc5849c1adc64d6653fda07c031b1074b","sig":"4b15bbc797b0033881802bd0ec504d119a7a0761c70da352b440234d714e584f3db66590814e082467285c3808ad38923187dcbf76f53ab2c3f3184109367609","tags":[["repo","81955cad0ffa00edf912e972699f7f130d372957f2fb4de66fdf7011a623712b"],["e","81955cad0ffa00edf912e972699f7f130d372957f2fb4de66fdf7011a623712b"],["branch","81955cad0ffa00edf912e972699f7f130d372957f2fb4de66fdf7011a623712b"],["e","81955cad0ffa00edf912e972699f7f130d372957f2fb4de66fdf7011a623712b"],["commit-message","bfg.jar added to ignore\n"],["t","gnostr-event"],["t","gnostr-format-0.0.0"],["commit","83aeb3bc0d2015751a304fe511d1426c6eda7bbc"],["parent-commit","f8701f5625e5576d9e6a96cf11f3d3ffd6f2b2be"],["parent-patch","d50ab269eb5c4b4728ab1055c3c11914b17db0887c6ab3c22790e410ba79fd28"],["e","d50ab269eb5c4b4728ab1055c3c11914b17db0887c6ab3c22790e410ba79fd28"]]}
|
@ -0,0 +1 @@
|
||||
{"content":"From 8b24aae23894e939cbc2278e89ffea62bd330c59 Mon Sep 17 00:00:00 2001\nFrom: 0ceanSlim <89587889+0ceanSlim@users.noreply.github.com>\nDate: Wed, 8 Nov 2023 19:02:34 -0500\nSubject: [PATCH] Remove confidential file\n\n---\n 0 files changed, 0 insertions(+), 0 deletions(-)\n\n--\nlibgit2 1.6.4\n\n","created_at":1706217663,"id":"7a635cbd32377f609100fd237cdbdf374d4de2a0ae01c68387614bf6c4faa15d","kind":410,"pubkey":"16f1a0100d4cfffbcc4230e8e0e4290cc5849c1adc64d6653fda07c031b1074b","sig":"1ad2be2d993fdcdd6cbd0505f330be24a57b5da95acce7322705ba6d7e32edd76d2144bdbd407e1f300b14536776a23597211316270c5c41bfc5d33f008d7ff6","tags":[["repo","81955cad0ffa00edf912e972699f7f130d372957f2fb4de66fdf7011a623712b"],["e","81955cad0ffa00edf912e972699f7f130d372957f2fb4de66fdf7011a623712b"],["branch","81955cad0ffa00edf912e972699f7f130d372957f2fb4de66fdf7011a623712b"],["e","81955cad0ffa00edf912e972699f7f130d372957f2fb4de66fdf7011a623712b"],["commit-message","Remove confidential file\n"],["t","gnostr-event"],["t","gnostr-format-0.0.0"],["commit","8b24aae23894e939cbc2278e89ffea62bd330c59"],["parent-commit","f161be50915cd4c267bf1ecf2cd190a9d16e0d09"],["parent-patch","1284e0dada4b8b8b046255f1e71c78984f39e7a43cf1e43eddf4f5621edea128"],["e","1284e0dada4b8b8b046255f1e71c78984f39e7a43cf1e43eddf4f5621edea128"]]}
|
@ -0,0 +1 @@
|
||||
{"content":"From afcffeea37d35afb115e72f46ca7fcddee7d7356 Mon Sep 17 00:00:00 2001\nFrom: 0ceanSlim <chriskerr@gmx.com>\nDate: Wed, 8 Nov 2023 15:40:42 -0500\nSubject: [PATCH] create wallet now prompts to name it,get address now lists wallets and aks for a selection\n\n---\n createWallet.py | 4 ++--\n getAddress.py | 39 +++++++++++++++------------------------\n 2 files changed, 17 insertions(+), 26 deletions(-)\n\ndiff --git a/createWallet.py b/createWallet.py\nindex bb589cb..e501a53 100644\n--- a/createWallet.py\n+++ b/createWallet.py\n@@ -10,8 +10,8 @@ rpc_port = config[\"rpc_port\"]\n rpc_user = config[\"rpc_user\"]\n rpc_password = config[\"rpc_password\"]\n \n-# Wallet name to create\n-wallet_name = \"wallet_1\" # Specify the desired wallet name\n+# Prompt the user for the wallet name\n+wallet_name = input(\"Enter the wallet name to create: \")\n \n try:\n rpc_connection = AuthServiceProxy(\ndiff --git a/getAddress.py b/getAddress.py\nindex 0ed48d0..6bcd6b1 100644\n--- a/getAddress.py\n+++ b/getAddress.py\n@@ -1,7 +1,7 @@\n from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException\n import json\n \n-## Read the RPC configuration from the configuration file\n+# Read the RPC configuration from the configuration file\n with open(\"rpc_config.json\", \"r\") as config_file:\n config = json.load(config_file)\n \n@@ -21,30 +21,21 @@ try:\n if not wallet_list:\n print(\"No wallets found.\")\n else:\n- if len(wallet_list) == 1:\n- # If there's only one wallet, use it\n- wallet_name = wallet_list[0]\n+ print(\"Available wallets:\")\n+ for i, wallet in enumerate(wallet_list):\n+ print(f\"{i + 1}. {wallet}\")\n+\n+ wallet_index = int(input(\"Enter the number of the wallet to get a new address for: \")) - 1\n+\n+ if 0 <= wallet_index < len(wallet_list):\n+ wallet_name = wallet_list[wallet_index]\n+\n+ # Get a new address for the selected wallet\n+ new_address = rpc_connection.getnewaddress(wallet_name)\n+ print(f\"New receiving address for wallet '{wallet_name}': {new_address}\")\n else:\n- # If multiple wallets exist, prompt the user to select one\n- print(\"Available wallets:\")\n- for i, wallet in enumerate(wallet_list):\n- print(f\"{i + 1}. {wallet}\")\n-\n- wallet_index = (\n- int(input(\"Enter the number of the wallet to get a new address for: \"))\n- - 1\n- )\n-\n- if 0 <= wallet_index < len(wallet_list):\n- wallet_name = wallet_list[wallet_index]\n- else:\n- print(\"Invalid wallet selection. Exiting.\")\n- exit()\n-\n- # Get a new address for the selected wallet\n- new_address = rpc_connection.getnewaddress(wallet_name)\n-\n- print(f\"New receiving address for wallet '{wallet_name}': {new_address}\")\n+ print(\"Invalid wallet selection. Exiting.\")\n+ exit()\n \n except JSONRPCException as json_exception:\n print(\"A JSON RPC Exception occurred: \" + str(json_exception))\n--\nlibgit2 1.6.4\n\n","created_at":1706217663,"id":"707f42661b6ce37602204511a6f0e63f7856dc334caf1bb96b85adca24b02e5e","kind":410,"pubkey":"16f1a0100d4cfffbcc4230e8e0e4290cc5849c1adc64d6653fda07c031b1074b","sig":"f18a091fc7fbd7692cf8967847f50015a28a5cd0e7af3a535bee2d08d033e7e054a001d1e9cbb13bafe2a3c572bb64c0c269294e4b0e627fc367218faabe5949","tags":[["repo","81955cad0ffa00edf912e972699f7f130d372957f2fb4de66fdf7011a623712b"],["e","81955cad0ffa00edf912e972699f7f130d372957f2fb4de66fdf7011a623712b"],["branch","81955cad0ffa00edf912e972699f7f130d372957f2fb4de66fdf7011a623712b"],["e","81955cad0ffa00edf912e972699f7f130d372957f2fb4de66fdf7011a623712b"],["commit-message","create wallet now prompts to name it,get address now lists wallets and aks for a selection\n"],["t","gnostr-event"],["t","gnostr-format-0.0.0"],["commit","afcffeea37d35afb115e72f46ca7fcddee7d7356"],["parent-commit","4983e79036dde0b6d299715a621466cd97c00fb9"],["parent-patch","919188186010727813724f696cfd5edd03a409f11e785d2ab194ccb4aa72f480"],["e","919188186010727813724f696cfd5edd03a409f11e785d2ab194ccb4aa72f480"]]}
|
@ -0,0 +1 @@
|
||||
{"content":"From f161be50915cd4c267bf1ecf2cd190a9d16e0d09 Mon Sep 17 00:00:00 2001\nFrom: 0ceanSlim <89587889+0ceanSlim@users.noreply.github.com>\nDate: Wed, 8 Nov 2023 19:01:12 -0500\nSubject: [PATCH] untrack config\n\n---\n 0 files changed, 0 insertions(+), 0 deletions(-)\n\n--\nlibgit2 1.6.4\n\n","created_at":1706217663,"id":"1284e0dada4b8b8b046255f1e71c78984f39e7a43cf1e43eddf4f5621edea128","kind":410,"pubkey":"16f1a0100d4cfffbcc4230e8e0e4290cc5849c1adc64d6653fda07c031b1074b","sig":"10c6f3f7f9129a712dbfe2ee1f72a39b76de1ff35e69bd3559d32ad34fe5393b7558304d0e87b44aabcc1126681281b3f42ea14e4ed03555a9d6febe69e1bf0d","tags":[["repo","81955cad0ffa00edf912e972699f7f130d372957f2fb4de66fdf7011a623712b"],["e","81955cad0ffa00edf912e972699f7f130d372957f2fb4de66fdf7011a623712b"],["branch","81955cad0ffa00edf912e972699f7f130d372957f2fb4de66fdf7011a623712b"],["e","81955cad0ffa00edf912e972699f7f130d372957f2fb4de66fdf7011a623712b"],["commit-message","untrack config\n"],["t","gnostr-event"],["t","gnostr-format-0.0.0"],["commit","f161be50915cd4c267bf1ecf2cd190a9d16e0d09"],["parent-commit","0f18285565dc0bef0d9ad711879bd5873f9733af"],["parent-patch","42c6ef3b7099c4a227d0f907776013c8717e4ee0708799fb8301dd8adf26af43"],["e","42c6ef3b7099c4a227d0f907776013c8717e4ee0708799fb8301dd8adf26af43"]]}
|
@ -0,0 +1 @@
|
||||
{"content":"From f8701f5625e5576d9e6a96cf11f3d3ffd6f2b2be Mon Sep 17 00:00:00 2001\nFrom: 0ceanSlim <89587889+0ceanSlim@users.noreply.github.com>\nDate: Wed, 8 Nov 2023 19:03:56 -0500\nSubject: [PATCH] readme error fix\n\n---\n README.md | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/README.md b/README.md\nindex 596fe1c..5b75672 100644\n--- a/README.md\n+++ b/README.md\n@@ -41,4 +41,4 @@ Modify the scripts to read the RPC configuration from the rpc_config.json file. \n \n ## License\n \n-This repository is provided under the MIT License. Feel free to use, modify, and distribute these scripts as needed. Contributions and improvements are welcome. ❤️\n\\ No newline at end of file\n+This repository is provided under the MIT License. Feel free to use, modify, and distribute these scripts as needed. Contributions and improvements are welcome. ❤️\n--\nlibgit2 1.6.4\n\n","created_at":1706217663,"id":"d50ab269eb5c4b4728ab1055c3c11914b17db0887c6ab3c22790e410ba79fd28","kind":410,"pubkey":"16f1a0100d4cfffbcc4230e8e0e4290cc5849c1adc64d6653fda07c031b1074b","sig":"6c1cdb9324bbd4823f31fd7f44dd9c683e7662243c8e61b22cebb2be66ff86f02a54c7ec4d61a23c10919973050c78cb37bbb297dd7fa7cffc46d5e58b9ff812","tags":[["repo","81955cad0ffa00edf912e972699f7f130d372957f2fb4de66fdf7011a623712b"],["e","81955cad0ffa00edf912e972699f7f130d372957f2fb4de66fdf7011a623712b"],["branch","81955cad0ffa00edf912e972699f7f130d372957f2fb4de66fdf7011a623712b"],["e","81955cad0ffa00edf912e972699f7f130d372957f2fb4de66fdf7011a623712b"],["commit-message","readme error fix\n"],["t","gnostr-event"],["t","gnostr-format-0.0.0"],["commit","f8701f5625e5576d9e6a96cf11f3d3ffd6f2b2be"],["parent-commit","8b24aae23894e939cbc2278e89ffea62bd330c59"],["parent-patch","7a635cbd32377f609100fd237cdbdf374d4de2a0ae01c68387614bf6c4faa15d"],["e","7a635cbd32377f609100fd237cdbdf374d4de2a0ae01c68387614bf6c4faa15d"]]}
|
Loading…
Reference in New Issue
Block a user