Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ transaction.api_url = 'some specific node ip/address and port'
## Arql
You can now perform searches using the arql method:
```buildoutcfg
import arweave
from arweave.arweave_lib import arql

wallet_file_path = "/some/folder/on/your/system"
Expand All @@ -143,11 +144,12 @@ transaction_ids = arql(
Alternatively, you can use a the helper method arql_with_transaction_data() to get all transaction ids as well as all the data stored in the blockchain
```buildoutcfg
import arweave
from arweave.arweave_lib import arql_with_transaction_data

wallet_file_path = "/some/folder/on/your/system"
wallet = arweave.Wallet(wallet_file_path)

transactions = aweave.arql_with_transaction_data(
transactions = arql_with_transaction_data(
wallet,
{
"op": "equals",
Expand Down
19 changes: 9 additions & 10 deletions arweave/arweave_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,13 +477,12 @@ def arql_with_transaction_data(wallet, query):
"""

transaction_ids = arql(wallet, query)
if transaction_ids:
transactions = []
for transaction_id in transaction_ids:
tx = Transaction(wallet, id=transaction_id)
tx.get_transaction()
tx.get_data()

transactions.append(tx)

return None
if not transaction_ids:
return None
transactions = []
for transaction_id in transaction_ids:
tx = Transaction(wallet, id=transaction_id)
tx.get_transaction()
tx.get_data()
transactions.append(tx)
return transactions