Skip to content

Commit a7ee5f8

Browse files
committed
better search endpoint
1 parent 9c6c8fb commit a7ee5f8

File tree

18 files changed

+295
-55
lines changed

18 files changed

+295
-55
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file.
33

44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
55

6+
## [25.11.0/1.5.0] - 2025-11-07
7+
### changed
8+
- harmonize tagpack obfuscation handling
9+
- better search features (search with postfixes), scoped search that allows to enable/disable features.
10+
- stricter actor propagation handling
11+
- tags are now derived from addresses with the same pubkey (if feature is enabled)
12+
13+
614
## [25.09.4/1.14.4] - 2025-10-03
715
### fixed
816
- improvements thorchain handling on unknown networks (gslib 2.7.7)

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ all: format lint
22

33
-include .env
44

5-
GS_REST_SERVICE_VERSIONM ?= "25.11.0-rc2"
6-
GS_REST_SERVICE_VERSION ?= "1.15.0-rc2"
5+
GS_REST_SERVICE_VERSIONM ?= "25.11.0-rc3"
6+
GS_REST_SERVICE_VERSION ?= "1.15.0-rc3"
77

88
GS_REST_DEV_PORT ?= 9000
99
NUM_WORKERS ?= 1

clients/python/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ GraphSense API provides programmatic access to various ledgers' addresses, entit
33

44
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
55

6-
- API version: 1.15.0-rc2
7-
- Package version: 1.15.0-rc2
6+
- API version: 1.15.0-rc3
7+
- Package version: 1.15.0-rc3
88
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
99

1010
## Requirements.

clients/python/docs/GeneralApi.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,11 @@ with graphsense.ApiClient(configuration) as api_client:
115115
q = "foo" # str | It can be (the beginning of) an address, a transaction or a label
116116
currency = "btc" # str | The cryptocurrency (e.g., btc) (optional)
117117
limit = 10 # int | Maximum number of search results (optional) if omitted the server will use the default value of 10
118-
include_sub_tx_identifiers = True # bool | Whether to include sub-transaction identifiers (optional) if omitted the server will use the default value of False
118+
include_sub_tx_identifiers = False # bool | Whether to include sub-transaction identifiers (optional) if omitted the server will use the default value of False
119+
include_labels = True # bool | Whether to include labels (optional) if omitted the server will use the default value of True
120+
include_actors = True # bool | Whether to include actors (optional) if omitted the server will use the default value of True
121+
include_txs = True # bool | Whether to include transactions (optional) if omitted the server will use the default value of True
122+
include_addresses = True # bool | Whether to include addresses (optional) if omitted the server will use the default value of True
119123

120124
# example passing only required values which don't have defaults set
121125
try:
@@ -129,7 +133,7 @@ with graphsense.ApiClient(configuration) as api_client:
129133
# and optional values
130134
try:
131135
# Returns matching addresses, transactions and labels
132-
api_response = api_instance.search(q, currency=currency, limit=limit, include_sub_tx_identifiers=include_sub_tx_identifiers)
136+
api_response = api_instance.search(q, currency=currency, limit=limit, include_sub_tx_identifiers=include_sub_tx_identifiers, include_labels=include_labels, include_actors=include_actors, include_txs=include_txs, include_addresses=include_addresses)
133137
pprint(api_response)
134138
except graphsense.ApiException as e:
135139
print("Exception when calling GeneralApi->search: %s\n" % e)
@@ -144,6 +148,10 @@ Name | Type | Description | Notes
144148
**currency** | **str**| The cryptocurrency (e.g., btc) | [optional]
145149
**limit** | **int**| Maximum number of search results | [optional] if omitted the server will use the default value of 10
146150
**include_sub_tx_identifiers** | **bool**| Whether to include sub-transaction identifiers | [optional] if omitted the server will use the default value of False
151+
**include_labels** | **bool**| Whether to include labels | [optional] if omitted the server will use the default value of True
152+
**include_actors** | **bool**| Whether to include actors | [optional] if omitted the server will use the default value of True
153+
**include_txs** | **bool**| Whether to include transactions | [optional] if omitted the server will use the default value of True
154+
**include_addresses** | **bool**| Whether to include addresses | [optional] if omitted the server will use the default value of True
147155
**_preload_content** | **bool** | If False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. | [optional] default is True.
148156
**async_req** | **bool** | Execute request asynchronously | [optional] default is False.
149157

clients/python/graphsense/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"""
1111

1212

13-
__version__ = "1.15.0-rc2"
13+
__version__ = "1.15.0-rc3"
1414

1515
# import ApiClient
1616
from graphsense.api_client import ApiClient

clients/python/graphsense/api/general_api.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ def __search(
161161
currency (str): The cryptocurrency (e.g., btc). [optional]
162162
limit (int): Maximum number of search results. [optional] if omitted the server will use the default value of 10
163163
include_sub_tx_identifiers (bool): Whether to include sub-transaction identifiers. [optional] if omitted the server will use the default value of False
164+
include_labels (bool): Whether to include labels. [optional] if omitted the server will use the default value of True
165+
include_actors (bool): Whether to include actors. [optional] if omitted the server will use the default value of True
166+
include_txs (bool): Whether to include transactions. [optional] if omitted the server will use the default value of True
167+
include_addresses (bool): Whether to include addresses. [optional] if omitted the server will use the default value of True
164168
_return_http_data_only (bool): response data without head status
165169
code and headers. Default is True.
166170
_preload_content (bool): if False, the urllib3.HTTPResponse object
@@ -226,6 +230,10 @@ def __search(
226230
'currency',
227231
'limit',
228232
'include_sub_tx_identifiers',
233+
'include_labels',
234+
'include_actors',
235+
'include_txs',
236+
'include_addresses',
229237
],
230238
'required': [
231239
'q',
@@ -261,18 +269,34 @@ def __search(
261269
(int,),
262270
'include_sub_tx_identifiers':
263271
(bool,),
272+
'include_labels':
273+
(bool,),
274+
'include_actors':
275+
(bool,),
276+
'include_txs':
277+
(bool,),
278+
'include_addresses':
279+
(bool,),
264280
},
265281
'attribute_map': {
266282
'q': 'q',
267283
'currency': 'currency',
268284
'limit': 'limit',
269285
'include_sub_tx_identifiers': 'include_sub_tx_identifiers',
286+
'include_labels': 'include_labels',
287+
'include_actors': 'include_actors',
288+
'include_txs': 'include_txs',
289+
'include_addresses': 'include_addresses',
270290
},
271291
'location_map': {
272292
'q': 'query',
273293
'currency': 'query',
274294
'limit': 'query',
275295
'include_sub_tx_identifiers': 'query',
296+
'include_labels': 'query',
297+
'include_actors': 'query',
298+
'include_txs': 'query',
299+
'include_addresses': 'query',
276300
},
277301
'collection_format_map': {
278302
}

clients/python/graphsense/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
7676
self.default_headers[header_name] = header_value
7777
self.cookie = cookie
7878
# Set default User-Agent.
79-
self.user_agent = 'OpenAPI-Generator/1.15.0-rc2/python'
79+
self.user_agent = 'OpenAPI-Generator/1.15.0-rc3/python'
8080

8181
def __enter__(self):
8282
return self

clients/python/graphsense/configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,8 @@ def to_debug_report(self):
405405
return "Python SDK Debug Report:\n"\
406406
"OS: {env}\n"\
407407
"Python Version: {pyversion}\n"\
408-
"Version of the API: 1.15.0-rc2\n"\
409-
"SDK Package Version: 1.15.0-rc2".\
408+
"Version of the API: 1.15.0-rc3\n"\
409+
"SDK Package Version: 1.15.0-rc3".\
410410
format(env=sys.platform, pyversion=sys.version)
411411

412412
def get_host_settings(self):

clients/python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "graphsense-python"
3-
version = "1.15.0-rc2"
3+
version = "1.15.0-rc3"
44
description = "GraphSense API"
55
readme = { file = "README.md", content-type = "text/markdown; charset=UTF-8; variant=GFM" }
66
requires-python = ">=3.6"

gsrest/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
from graphsenselib.utils.slack import SlackLogHandler
1212

1313
import gsrest.db
14+
from gsrest.builtin.plugins.obfuscate_tags.obfuscate_tags import ObfuscateTags
1415
from gsrest.config import GSRestConfig, LoggingConfig
1516
from gsrest.dependencies import ConceptsCacheService, ServiceContainer
1617
from gsrest.plugins import get_subclass
17-
from gsrest.builtin.plugins.obfuscate_tags.obfuscate_tags import ObfuscateTags
1818

1919
CONFIG_FILE = "./instance/config.yaml"
2020

@@ -195,7 +195,9 @@ async def setup_services(app):
195195
builtinPlugin = ObfuscateTags
196196
name = f"{builtinPlugin.__module__}"
197197
app.app["plugins"].append(builtinPlugin)
198-
app.app["plugin_contexts"][name] = {}
198+
app.app["plugin_contexts"][name] = {
199+
"config": app.app["config"].get_plugin_config(name)
200+
}
199201
if hasattr(builtinPlugin, "setup"):
200202
app.app.cleanup_ctx.append(plugin_setup(builtinPlugin, name))
201203

0 commit comments

Comments
 (0)