Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Tommel71 committed Nov 28, 2024
2 parents 0f4d290 + 5f99f52 commit b947114
Show file tree
Hide file tree
Showing 9 changed files with 66 additions and 6 deletions.
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

Please see the [changelog of GraphSense OpenAPI](https://github.com/graphsense/graphsense-openapi/blob/master/CHANGELOG.md) for changes related to the API.

## [24.11.1/1.8.1] - 2024-11-27

### Added
- Update to REST version 24.11.1.

## [24.01.0/1.4.1] - 2024-01-25

### Added
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ GraphSense API provides programmatic access to various ledgers' addresses, entit
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 1.8.0
- Package version: 1.8.0
- Package version: 1.8.1
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

## Requirements.
Expand All @@ -14,11 +14,12 @@ Python >= 3.6
## Installation & Usage
### pip install

You can install graphsense-python via pypi using:
If the python package is hosted on a repository, you can install directly using:

```sh
pip install graphsense-python
pip install git+https://github.com/graphsense/graphsense-python.git
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/graphsense/graphsense-python.git`)

Then import the package:
```python
Expand Down
1 change: 1 addition & 0 deletions docs/TxValue.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**address** | **[str]** | |
**value** | [**Values**](Values.md) | |
**index** | **int** | Optional index for the inputs and outputs | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
19 changes: 18 additions & 1 deletion docs/TxsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ with graphsense.ApiClient(configuration) as api_client:
currency = "btc" # str | The cryptocurrency code (e.g., btc)
tx_hash = "04d92601677d62a985310b61a301e74870fa942c8be0648e16b1db23b996a8cd" # str | The transaction hash
include_io = False # bool | Whether to include inputs/outputs of a transaction (UTXO only) (optional) if omitted the server will use the default value of False
include_nonstandard_io = False # bool | Whether to include non-standard inputs/outputs such as OP_RETURN of a transaction (UTXO only) (optional) if omitted the server will use the default value of False
include_io_index = False # bool | Whether to include the index of inputs/outputs of a transaction (UTXO only) (optional) if omitted the server will use the default value of False
token_tx_id = 1 # int | Select a specific token_transaction (Account model only) (optional)

# example passing only required values which don't have defaults set
Expand All @@ -253,7 +255,7 @@ with graphsense.ApiClient(configuration) as api_client:
# and optional values
try:
# Returns details of a specific transaction identified by its hash
api_response = api_instance.get_tx(currency, tx_hash, include_io=include_io, token_tx_id=token_tx_id)
api_response = api_instance.get_tx(currency, tx_hash, include_io=include_io, include_nonstandard_io=include_nonstandard_io, include_io_index=include_io_index, token_tx_id=token_tx_id)
pprint(api_response)
except graphsense.ApiException as e:
print("Exception when calling TxsApi->get_tx: %s\n" % e)
Expand All @@ -267,6 +269,8 @@ Name | Type | Description | Notes
**currency** | **str**| The cryptocurrency code (e.g., btc) |
**tx_hash** | **str**| The transaction hash |
**include_io** | **bool**| Whether to include inputs/outputs of a transaction (UTXO only) | [optional] if omitted the server will use the default value of False
**include_nonstandard_io** | **bool**| Whether to include non-standard inputs/outputs such as OP_RETURN of a transaction (UTXO only) | [optional] if omitted the server will use the default value of False
**include_io_index** | **bool**| Whether to include the index of inputs/outputs of a transaction (UTXO only) | [optional] if omitted the server will use the default value of False
**token_tx_id** | **int**| Select a specific token_transaction (Account model only) | [optional]
**_preload_content** | **bool** | If False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. | [optional] default is True.
**async_req** | **bool** | Execute request asynchronously | [optional] default is False.
Expand Down Expand Up @@ -336,6 +340,8 @@ with graphsense.ApiClient(configuration) as api_client:
currency = "btc" # str | The cryptocurrency code (e.g., btc)
tx_hash = "04d92601677d62a985310b61a301e74870fa942c8be0648e16b1db23b996a8cd" # str | The transaction hash
io = "outputs" # str | Input or outpus values of a transaction
include_nonstandard_io = False # bool | Whether to include non-standard inputs/outputs such as OP_RETURN of a transaction (UTXO only) (optional) if omitted the server will use the default value of False
include_io_index = False # bool | Whether to include the index of inputs/outputs of a transaction (UTXO only) (optional) if omitted the server will use the default value of False

# example passing only required values which don't have defaults set
try:
Expand All @@ -344,6 +350,15 @@ with graphsense.ApiClient(configuration) as api_client:
pprint(api_response)
except graphsense.ApiException as e:
print("Exception when calling TxsApi->get_tx_io: %s\n" % e)

# example passing only required values which don't have defaults set
# and optional values
try:
# Returns input/output values of a specific transaction identified by its hash
api_response = api_instance.get_tx_io(currency, tx_hash, io, include_nonstandard_io=include_nonstandard_io, include_io_index=include_io_index)
pprint(api_response)
except graphsense.ApiException as e:
print("Exception when calling TxsApi->get_tx_io: %s\n" % e)
```


Expand All @@ -354,6 +369,8 @@ Name | Type | Description | Notes
**currency** | **str**| The cryptocurrency code (e.g., btc) |
**tx_hash** | **str**| The transaction hash |
**io** | **str**| Input or outpus values of a transaction |
**include_nonstandard_io** | **bool**| Whether to include non-standard inputs/outputs such as OP_RETURN of a transaction (UTXO only) | [optional] if omitted the server will use the default value of False
**include_io_index** | **bool**| Whether to include the index of inputs/outputs of a transaction (UTXO only) | [optional] if omitted the server will use the default value of False
**_preload_content** | **bool** | If False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. | [optional] default is True.
**async_req** | **bool** | Execute request asynchronously | [optional] default is False.

Expand Down
2 changes: 1 addition & 1 deletion graphsense/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"""


__version__ = "1.8.0"
__version__ = "1.8.1"

# import ApiClient
from graphsense.api_client import ApiClient
Expand Down
24 changes: 24 additions & 0 deletions graphsense/api/txs_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,8 @@ def __get_tx(
Keyword Args:
include_io (bool): Whether to include inputs/outputs of a transaction (UTXO only). [optional] if omitted the server will use the default value of False
include_nonstandard_io (bool): Whether to include non-standard inputs/outputs such as OP_RETURN of a transaction (UTXO only). [optional] if omitted the server will use the default value of False
include_io_index (bool): Whether to include the index of inputs/outputs of a transaction (UTXO only). [optional] if omitted the server will use the default value of False
token_tx_id (int): Select a specific token_transaction (Account model only). [optional]
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
Expand Down Expand Up @@ -395,6 +397,8 @@ def __get_tx(
'currency',
'tx_hash',
'include_io',
'include_nonstandard_io',
'include_io_index',
'token_tx_id',
],
'required': [
Expand All @@ -420,19 +424,27 @@ def __get_tx(
(str,),
'include_io':
(bool,),
'include_nonstandard_io':
(bool,),
'include_io_index':
(bool,),
'token_tx_id':
(int,),
},
'attribute_map': {
'currency': 'currency',
'tx_hash': 'tx_hash',
'include_io': 'include_io',
'include_nonstandard_io': 'include_nonstandard_io',
'include_io_index': 'include_io_index',
'token_tx_id': 'token_tx_id',
},
'location_map': {
'currency': 'path',
'tx_hash': 'path',
'include_io': 'query',
'include_nonstandard_io': 'query',
'include_io_index': 'query',
'token_tx_id': 'query',
},
'collection_format_map': {
Expand Down Expand Up @@ -469,6 +481,8 @@ def __get_tx_io(
io (str): Input or outpus values of a transaction
Keyword Args:
include_nonstandard_io (bool): Whether to include non-standard inputs/outputs such as OP_RETURN of a transaction (UTXO only). [optional] if omitted the server will use the default value of False
include_io_index (bool): Whether to include the index of inputs/outputs of a transaction (UTXO only). [optional] if omitted the server will use the default value of False
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
Expand Down Expand Up @@ -537,6 +551,8 @@ def __get_tx_io(
'currency',
'tx_hash',
'io',
'include_nonstandard_io',
'include_io_index',
],
'required': [
'currency',
Expand Down Expand Up @@ -568,16 +584,24 @@ def __get_tx_io(
(str,),
'io':
(str,),
'include_nonstandard_io':
(bool,),
'include_io_index':
(bool,),
},
'attribute_map': {
'currency': 'currency',
'tx_hash': 'tx_hash',
'io': 'io',
'include_nonstandard_io': 'include_nonstandard_io',
'include_io_index': 'include_io_index',
},
'location_map': {
'currency': 'path',
'tx_hash': 'path',
'io': 'path',
'include_nonstandard_io': 'query',
'include_io_index': 'query',
},
'collection_format_map': {
}
Expand Down
4 changes: 4 additions & 0 deletions graphsense/model/tx_value.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def openapi_types():
return {
'address': ([str],), # noqa: E501
'value': (Values,), # noqa: E501
'index': (int,), # noqa: E501
}

@cached_property
Expand All @@ -100,6 +101,7 @@ def discriminator():
attribute_map = {
'address': 'address', # noqa: E501
'value': 'value', # noqa: E501
'index': 'index', # noqa: E501
}

read_only_vars = {
Expand Down Expand Up @@ -147,6 +149,7 @@ def _from_openapi_data(cls, address, value, *args, **kwargs): # noqa: E501
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
index (int): Optional index for the inputs and outputs. [optional] # noqa: E501
"""

_check_type = kwargs.pop('_check_type', True)
Expand Down Expand Up @@ -234,6 +237,7 @@ def __init__(self, address, value, *args, **kwargs): # noqa: E501
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
index (int): Optional index for the inputs and outputs. [optional] # noqa: E501
"""

_check_type = kwargs.pop('_check_type', True)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from setuptools import setup, find_packages # noqa: H301

NAME = "graphsense-python"
VERSION = "1.8.0"
VERSION = "1.8.1"
# To install the library, run the following
#
# python setup.py install
Expand Down

0 comments on commit b947114

Please sign in to comment.