Skip to content

Commit

Permalink
Merge branch 'release/1.4.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
myrho committed Jan 25, 2024
2 parents c2f5aab + bd5c6b4 commit da8e8c0
Show file tree
Hide file tree
Showing 117 changed files with 2,724 additions and 718 deletions.
2 changes: 2 additions & 0 deletions .openapi-generator-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@
#!docs/README.md

docs/BulkApi.md
.travis.yml
.gitlab-ci.yml
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Changelog

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

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

### Added
- Added instructions and templates for generating the library using openapi-generator.
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
generate-openapi-client:
docker run --rm \
-v "${PWD}:/build:Z" \
-v "${PWD}/templates:/templates:Z" \
openapitools/openapi-generator-cli:v5.2.1 \
generate -i "$(GS_REST_SERVICE_URL)/openapi.json" \
-g python \
-t /templates \
-o /build \
--additional-properties=packageName=graphsense \
--additional-properties=projectName=graphsense-python


.PHONY: generate-openapi-client
36 changes: 15 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ 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.4.0
- Package version: 1.4.0
- API version: 1.4.1
- Package version: 1.4.1
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

## Requirements.
Expand Down Expand Up @@ -40,21 +40,6 @@ Then import the package:
import graphsense
```


### Generate from OpenAPI specification

In order to generate the client from [Graphsense's OpenAPI specification](https://github.com/graphsense/graphsense-openapi) run the [OpenAPI Generator CLI](https://openapi-generator.tech/), eg. using docker:

```
URL=https://github.com/graphsense/graphsense-openapi/blob/master/graphsense.yaml
docker run --rm \
-v "${PWD}:/build" \
openapitools/openapi-generator-cli:v5.1.1 \
generate -i "$URL" \
-g python \
-o /build
```

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:
Expand All @@ -72,10 +57,10 @@ from graphsense.model.entity import Entity
from graphsense.model.height import Height
from graphsense.model.links import Links
from graphsense.model.neighbor_addresses import NeighborAddresses
# Defining the host is optional and defaults to https://api.ikna.io
# Defining the host is optional and defaults to https://api.test.ikna.io
# See configuration.py for a list of all supported configuration parameters.
configuration = graphsense.Configuration(
host = "https://api.ikna.io"
host = "https://api.test.ikna.io"
)

# The client must configure the authentication and authorization parameters
Expand All @@ -95,7 +80,7 @@ with graphsense.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = addresses_api.AddressesApi(api_client)
currency = "btc" # str | The cryptocurrency code (e.g., btc)
address = "addressA" # str | The cryptocurrency address
address = "addressA" # str | The cryptocurrency address

try:
# Get an address
Expand All @@ -107,7 +92,7 @@ address = "addressA" # str | The cryptocurrency address

## Documentation for API Endpoints

All URIs are relative to *https://api.ikna.io*
All URIs are relative to *https://api.test.ikna.io*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
Expand Down Expand Up @@ -229,3 +214,12 @@ Run the jupyter notebooks
jupyter notebook



## Generation from OpenAPI specification

This python package has been generated from [Graphsense's OpenAPI specification](https://api.test.ikna.io) hosted by [Iknaio Cryptoasset Analytics GmbH](https://ikna.io) using this command:

```
make GS_REST_SERVICE_URL="https://api.test.ikna.io" generate-openapi-client
```

6 changes: 3 additions & 3 deletions docs/Actor.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**categories** | [**[LabeledItemRef]**](LabeledItemRef.md) | A list actor categories |
**id** | **str** | Id of the actor |
**jurisdictions** | [**[LabeledItemRef]**](LabeledItemRef.md) | A list jurisdictions |
**label** | **str** | Label |
**uri** | **str** | URI |
**context** | [**ActorContext**](ActorContext.md) | | [optional]
**categories** | [**[LabeledItemRef]**](LabeledItemRef.md) | A list actor categories |
**jurisdictions** | [**[LabeledItemRef]**](LabeledItemRef.md) | A list jurisdictions |
**nr_tags** | **int** | number of address tags of the actor | [optional]
**context** | [**ActorContext**](ActorContext.md) | | [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
8 changes: 4 additions & 4 deletions docs/ActorContext.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**coingecko_ids** | **[str]** | list of references to coingecko exchanges or coins |
**defilama_ids** | **[str]** | list of references to defilama |
**uris** | **[str]** | list of additonal uris identifying the actor |
**images** | **[str]** | list of uris to logos of the actor |
**refs** | **[str]** | list of uris to further information of the actors. |
**uris** | **[str]** | list of additonal uris identifying the actor |
**coingecko_ids** | **[str]** | list of references to coingecko exchanges or coins |
**defilama_ids** | **[str]** | list of references to defilama |
**twitter_handle** | **str** | semi-colon separated list of twitter handles used by the actor | [optional]
**github_organisation** | **str** | semi-colon separated list of github organisations used by the actor | [optional]
**legal_name** | **str** | Name of the legal entity registerd by the actor. | [optional]
**twitter_handle** | **str** | semi-colon separated list of twitter handles used by the actor | [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
14 changes: 7 additions & 7 deletions docs/Address.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**address** | **str** | Address |
**balance** | [**Values**](Values.md) | |
**currency** | **str** | crypto currency code |
**address** | **str** | Address |
**entity** | **int** | Entity id |
**balance** | [**Values**](Values.md) | |
**first_tx** | [**TxSummary**](TxSummary.md) | |
**in_degree** | **int** | |
**last_tx** | [**TxSummary**](TxSummary.md) | |
**in_degree** | **int** | |
**out_degree** | **int** | |
**no_incoming_txs** | **int** | |
**no_outgoing_txs** | **int** | |
**out_degree** | **int** | |
**status** | **str** | |
**total_received** | [**Values**](Values.md) | |
**total_spent** | [**Values**](Values.md) | |
**actors** | [**LabeledItemRefs**](LabeledItemRefs.md) | | [optional]
**is_contract** | **bool** | | [optional]
**status** | **str** | |
**token_balances** | [**TokenValues**](TokenValues.md) | | [optional]
**total_tokens_received** | [**TokenValues**](TokenValues.md) | | [optional]
**total_tokens_spent** | [**TokenValues**](TokenValues.md) | | [optional]
**actors** | [**LabeledItemRefs**](LabeledItemRefs.md) | | [optional]
**is_contract** | **bool** | | [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
18 changes: 9 additions & 9 deletions docs/AddressTag.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**currency** | **str** | crypto currency code |
**is_cluster_definer** | **bool** | whether the address tag applies to the entity level |
**label** | **str** | Label |
**tagpack_creator** | **str** | Tagpack creator |
**tagpack_is_public** | **bool** | whether the address is public |
**tagpack_title** | **str** | Tagpack title |
**tagpack_is_public** | **bool** | whether the address is public |
**tagpack_creator** | **str** | Tagpack creator |
**is_cluster_definer** | **bool** | whether the address tag applies to the entity level |
**currency** | **str** | crypto currency code |
**address** | **str** | Address |
**entity** | **int** | Entity id |
**abuse** | **str** | Abuses | [optional]
**actor** | **str** | id of the actor that controlls the address | [optional]
**category** | **str** | Category | [optional]
**actor** | **str** | id of the actor that controlls the address | [optional]
**abuse** | **str** | Abuses | [optional]
**tagpack_uri** | **str** | Tagpack URI | [optional]
**source** | **str** | Source | [optional]
**lastmod** | **int** | Last modified | [optional]
**confidence** | **str** | Confidence name | [optional]
**confidence_level** | **int** | Confidence level | [optional]
**lastmod** | **int** | Last modified | [optional]
**source** | **str** | Source | [optional]
**tagpack_uri** | **str** | Tagpack URI | [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
6 changes: 3 additions & 3 deletions docs/AddressTx.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**tx_type** | **str** | | defaults to "account"
**contract_creation** | **bool** | Indicates if this transaction created a new contract. Recipient address is the address of the new contract. | [optional]
**token_tx_id** | **int** | | [optional]
**coinbase** | **bool** | Coinbase transaction flag | [optional]
**contract_creation** | **bool** | Indicates if this transaction created a new contract. Recipient address is the address of the new contract. | [optional]
**tx_hash** | **str** | Transaction hash | [optional]
**currency** | **str** | crypto currency code | [optional]
**coinbase** | **bool** | Coinbase transaction flag | [optional]
**height** | [**Height**](Height.md) | | [optional]
**timestamp** | **int** | Timestamp | [optional]
**tx_hash** | **str** | Transaction hash | [optional]
**value** | [**Values**](Values.md) | | [optional]
**from_address** | **str** | Address | [optional]
**to_address** | **str** | Address | [optional]
Expand Down
4 changes: 2 additions & 2 deletions docs/AddressTxUtxo.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**coinbase** | **bool** | Coinbase transaction flag |
**tx_hash** | **str** | Transaction hash |
**currency** | **str** | crypto currency code |
**coinbase** | **bool** | Coinbase transaction flag |
**height** | [**Height**](Height.md) | |
**timestamp** | **int** | Timestamp |
**tx_hash** | **str** | Transaction hash |
**value** | [**Values**](Values.md) | |
**tx_type** | **str** | | defaults to "utxo"
**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]
Expand Down
26 changes: 13 additions & 13 deletions docs/AddressesApi.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# graphsense.AddressesApi

All URIs are relative to *https://api.ikna.io*
All URIs are relative to *https://api.test.ikna.io*

Method | HTTP request | Description
------------- | ------------- | -------------
Expand All @@ -26,10 +26,10 @@ import graphsense
from graphsense.api import addresses_api
from graphsense.model.address import Address
from pprint import pprint
# Defining the host is optional and defaults to https://api.ikna.io
# Defining the host is optional and defaults to https://api.test.ikna.io
# See configuration.py for a list of all supported configuration parameters.
configuration = graphsense.Configuration(
host = "https://api.ikna.io"
host = "https://api.test.ikna.io"
)

# The client must configure the authentication and authorization parameters
Expand Down Expand Up @@ -110,10 +110,10 @@ import graphsense
from graphsense.api import addresses_api
from graphsense.model.entity import Entity
from pprint import pprint
# Defining the host is optional and defaults to https://api.ikna.io
# Defining the host is optional and defaults to https://api.test.ikna.io
# See configuration.py for a list of all supported configuration parameters.
configuration = graphsense.Configuration(
host = "https://api.ikna.io"
host = "https://api.test.ikna.io"
)

# The client must configure the authentication and authorization parameters
Expand Down Expand Up @@ -194,10 +194,10 @@ import graphsense
from graphsense.api import addresses_api
from graphsense.model.links import Links
from pprint import pprint
# Defining the host is optional and defaults to https://api.ikna.io
# Defining the host is optional and defaults to https://api.test.ikna.io
# See configuration.py for a list of all supported configuration parameters.
configuration = graphsense.Configuration(
host = "https://api.ikna.io"
host = "https://api.test.ikna.io"
)

# The client must configure the authentication and authorization parameters
Expand Down Expand Up @@ -293,10 +293,10 @@ import graphsense
from graphsense.api import addresses_api
from graphsense.model.neighbor_addresses import NeighborAddresses
from pprint import pprint
# Defining the host is optional and defaults to https://api.ikna.io
# Defining the host is optional and defaults to https://api.test.ikna.io
# See configuration.py for a list of all supported configuration parameters.
configuration = graphsense.Configuration(
host = "https://api.ikna.io"
host = "https://api.test.ikna.io"
)

# The client must configure the authentication and authorization parameters
Expand Down Expand Up @@ -399,10 +399,10 @@ from graphsense.api import addresses_api
from graphsense.model.height import Height
from graphsense.model.address_txs import AddressTxs
from pprint import pprint
# Defining the host is optional and defaults to https://api.ikna.io
# Defining the host is optional and defaults to https://api.test.ikna.io
# See configuration.py for a list of all supported configuration parameters.
configuration = graphsense.Configuration(
host = "https://api.ikna.io"
host = "https://api.test.ikna.io"
)

# The client must configure the authentication and authorization parameters
Expand Down Expand Up @@ -504,10 +504,10 @@ import graphsense
from graphsense.api import addresses_api
from graphsense.model.address_tags import AddressTags
from pprint import pprint
# Defining the host is optional and defaults to https://api.ikna.io
# Defining the host is optional and defaults to https://api.test.ikna.io
# See configuration.py for a list of all supported configuration parameters.
configuration = graphsense.Configuration(
host = "https://api.ikna.io"
host = "https://api.test.ikna.io"
)

# The client must configure the authentication and authorization parameters
Expand Down
10 changes: 5 additions & 5 deletions docs/BlocksApi.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# graphsense.BlocksApi

All URIs are relative to *https://api.ikna.io*
All URIs are relative to *https://api.test.ikna.io*

Method | HTTP request | Description
------------- | ------------- | -------------
Expand All @@ -23,10 +23,10 @@ from graphsense.api import blocks_api
from graphsense.model.block import Block
from graphsense.model.height import Height
from pprint import pprint
# Defining the host is optional and defaults to https://api.ikna.io
# Defining the host is optional and defaults to https://api.test.ikna.io
# See configuration.py for a list of all supported configuration parameters.
configuration = graphsense.Configuration(
host = "https://api.ikna.io"
host = "https://api.test.ikna.io"
)

# The client must configure the authentication and authorization parameters
Expand Down Expand Up @@ -108,10 +108,10 @@ from graphsense.api import blocks_api
from graphsense.model.tx import Tx
from graphsense.model.height import Height
from pprint import pprint
# Defining the host is optional and defaults to https://api.ikna.io
# Defining the host is optional and defaults to https://api.test.ikna.io
# See configuration.py for a list of all supported configuration parameters.
configuration = graphsense.Configuration(
host = "https://api.ikna.io"
host = "https://api.test.ikna.io"
)

# The client must configure the authentication and authorization parameters
Expand Down
Loading

0 comments on commit da8e8c0

Please sign in to comment.