affinidi_tdk_wallets_client 1.60.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- affinidi_tdk_wallets_client-1.60.0/PKG-INFO +216 -0
- affinidi_tdk_wallets_client-1.60.0/README.md +190 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/__init__.py +77 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/api/__init__.py +6 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/api/revocation_api.py +662 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/api/wallet_api.py +1734 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/api_client.py +767 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/api_response.py +25 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/configuration.py +464 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/exceptions.py +167 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/__init__.py +59 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/authcrypt_message_input.py +84 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/authcrypt_message_result_dto.py +72 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/create_wallet_input.py +98 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/create_wallet_response.py +76 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/create_wallet_v2_input.py +110 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/create_wallet_v2_response.py +76 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/entity_not_found_error.py +109 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/get_revocation_credential_status_ok.py +72 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/get_revocation_list_credential_result_dto.py +72 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/invalid_did_parameter_error.py +109 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/invalid_parameter_error.py +109 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/key_not_found_error.py +109 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/not_found_error.py +109 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/operation_forbidden_error.py +109 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/revoke_credential_input.py +79 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/revoke_credentials_input.py +74 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/service_error_response.py +86 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/service_error_response_details_inner.py +78 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/sign_credential400_response.py +142 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/sign_credential_input_dto.py +92 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/sign_credential_input_dto_unsigned_credential_params.py +89 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/sign_credential_result_dto.py +72 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/sign_credentials_dm1_ld_input_dto.py +86 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/sign_credentials_dm1_ld_result_dto.py +72 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/sign_credentials_dm2_sd_jwt_input_dto.py +88 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/sign_credentials_dm2_sd_jwt_result_dto.py +72 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/sign_credentials_jwt_input_dto.py +86 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/sign_credentials_jwt_result_dto.py +72 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/sign_credentials_ldp_input_dto.py +86 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/sign_credentials_ldp_result_dto.py +72 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/sign_jwt_token.py +74 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/sign_jwt_token_ok.py +72 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/sign_message_input.py +84 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/sign_message_result_dto.py +72 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/sign_presentation_ldp_input_dto.py +88 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/sign_presentation_ldp_result_dto.py +72 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/signing_failed_error.py +109 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/update_wallet_input.py +74 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/wallet_dto.py +96 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/wallet_dto_keys_inner.py +74 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/wallet_v2_dto.py +98 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/models/wallets_list_dto.py +80 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/py.typed +0 -0
- affinidi_tdk_wallets_client-1.60.0/affinidi_tdk_wallets_client/rest.py +330 -0
- affinidi_tdk_wallets_client-1.60.0/pyproject.toml +30 -0
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: affinidi_tdk_wallets_client
|
|
3
|
+
Version: 1.60.0
|
|
4
|
+
Summary: CloudWalletEssentials
|
|
5
|
+
Home-page: https://github.com/affinidi/affinidi-tdk
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Keywords: OpenAPI,OpenAPI-Generator,CloudWalletEssentials
|
|
8
|
+
Author: Affinidi
|
|
9
|
+
Author-email: info@affinidi.com
|
|
10
|
+
Requires-Python: >=3.8,<4.0
|
|
11
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Requires-Dist: aenum (>=3.1.11)
|
|
20
|
+
Requires-Dist: pydantic (>=1.10.5,<2.0.0)
|
|
21
|
+
Requires-Dist: python-dateutil (>=2.8.2)
|
|
22
|
+
Requires-Dist: urllib3 (>=1.25.3)
|
|
23
|
+
Project-URL: Repository, https://github.com/affinidi/affinidi-tdk
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
|
|
26
|
+
# affinidi_tdk_wallets_client
|
|
27
|
+
|
|
28
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
29
|
+
|
|
30
|
+
For more information, please visit [https://www.affinidi.com](https://www.affinidi.com)
|
|
31
|
+
|
|
32
|
+
Documentation is available at [https://docs.affinidi.com/dev-tools/affinidi-tdk/clients/wallets](https://docs.affinidi.com/dev-tools/affinidi-tdk/clients/wallets)
|
|
33
|
+
|
|
34
|
+
## Requirements.
|
|
35
|
+
|
|
36
|
+
Python 3.7+
|
|
37
|
+
|
|
38
|
+
## Installation & Usage
|
|
39
|
+
|
|
40
|
+
### pip install
|
|
41
|
+
|
|
42
|
+
If the python package is hosted on a repository, you can install directly using:
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
pip install affinidi_tdk_wallets_client
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Then import the package:
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
import affinidi_tdk_wallets_client
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Setuptools
|
|
55
|
+
|
|
56
|
+
Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
python setup.py install --user
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Then import the package:
|
|
63
|
+
|
|
64
|
+
```python
|
|
65
|
+
import affinidi_tdk_wallets_client
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Tests
|
|
69
|
+
|
|
70
|
+
Execute `pytest` to run the tests.
|
|
71
|
+
|
|
72
|
+
## Getting Started
|
|
73
|
+
|
|
74
|
+
Please follow the [installation procedure](#installation--usage) and then run the following:
|
|
75
|
+
|
|
76
|
+
```python
|
|
77
|
+
|
|
78
|
+
import time
|
|
79
|
+
import affinidi_tdk_wallets_client
|
|
80
|
+
from affinidi_tdk_wallets_client.rest import ApiException
|
|
81
|
+
from pprint import pprint
|
|
82
|
+
|
|
83
|
+
# Defining the host is optional and defaults to https://apse1.api.affinidi.io/cwe
|
|
84
|
+
# See configuration.py for a list of all supported configuration parameters.
|
|
85
|
+
configuration = affinidi_tdk_wallets_client.Configuration(
|
|
86
|
+
host = "https://apse1.api.affinidi.io/cwe"
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
# The client must configure the authentication and authorization parameters
|
|
90
|
+
# in accordance with the API server security policy.
|
|
91
|
+
# Examples for each auth method are provided below, use the example that
|
|
92
|
+
# satisfies your auth use case.
|
|
93
|
+
|
|
94
|
+
# Configure API key authorization: ProjectTokenAuth
|
|
95
|
+
configuration.api_key['ProjectTokenAuth'] = os.environ["API_KEY"]
|
|
96
|
+
|
|
97
|
+
# Configure a hook to auto-refresh API key for your personal access token (PAT), if expired
|
|
98
|
+
import affinidi_tdk_auth_provider
|
|
99
|
+
|
|
100
|
+
stats = {
|
|
101
|
+
apiGatewayUrl,
|
|
102
|
+
keyId,
|
|
103
|
+
passphrase,
|
|
104
|
+
privateKey,
|
|
105
|
+
projectId,
|
|
106
|
+
tokenEndpoint,
|
|
107
|
+
tokenId,
|
|
108
|
+
}
|
|
109
|
+
authProvider = affinidi_tdk_auth_provider.AuthProvider(stats)
|
|
110
|
+
configuration.refresh_api_key_hook = lambda api_client: authProvider.fetch_project_scoped_token()
|
|
111
|
+
|
|
112
|
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
113
|
+
# configuration.api_key_prefix['ProjectTokenAuth'] = 'Bearer'
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
# Enter a context with an instance of the API client
|
|
117
|
+
with affinidi_tdk_wallets_client.ApiClient(configuration) as api_client:
|
|
118
|
+
# Create an instance of the API class
|
|
119
|
+
api_instance = affinidi_tdk_wallets_client.RevocationApi(api_client)
|
|
120
|
+
project_id = 'project_id_example' # str | Description for projectId.
|
|
121
|
+
wallet_id = 'wallet_id_example' # str | Description for walletId.
|
|
122
|
+
status_id = 'status_id_example' # str | Description for statusId.
|
|
123
|
+
|
|
124
|
+
try:
|
|
125
|
+
api_response = api_instance.get_revocation_credential_status(project_id, wallet_id, status_id)
|
|
126
|
+
print("The response of RevocationApi->get_revocation_credential_status:\n")
|
|
127
|
+
pprint(api_response)
|
|
128
|
+
except ApiException as e:
|
|
129
|
+
print("Exception when calling RevocationApi->get_revocation_credential_status: %s\n" % e)
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Documentation for API Endpoints
|
|
134
|
+
|
|
135
|
+
All URIs are relative to *https://apse1.api.affinidi.io/cwe*
|
|
136
|
+
|
|
137
|
+
| Class | Method | HTTP request | Description |
|
|
138
|
+
| --------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------- |
|
|
139
|
+
| _RevocationApi_ | [**get_revocation_credential_status**](docs/RevocationApi.md#get_revocation_credential_status) | **GET** /v1/projects/{projectId}/wallets/{walletId}/revocation-statuses/{statusId} |
|
|
140
|
+
| _RevocationApi_ | [**get_revocation_list_credential**](docs/RevocationApi.md#get_revocation_list_credential) | **GET** /v1/wallets/{walletId}/revocation-list/{listId} | Return revocation list credential. |
|
|
141
|
+
| _RevocationApi_ | [**revoke_credential**](docs/RevocationApi.md#revoke_credential) | **POST** /v1/wallets/{walletId}/revoke | Revoke Credential. |
|
|
142
|
+
| _RevocationApi_ | [**revoke_credentials**](docs/RevocationApi.md#revoke_credentials) | **POST** /v2/wallets/{walletId}/credentials/revoke | Revoke Credentials. |
|
|
143
|
+
| _WalletApi_ | [**create_wallet**](docs/WalletApi.md#create_wallet) | **POST** /v1/wallets |
|
|
144
|
+
| _WalletApi_ | [**delete_wallet**](docs/WalletApi.md#delete_wallet) | **DELETE** /v1/wallets/{walletId} |
|
|
145
|
+
| _WalletApi_ | [**get_wallet**](docs/WalletApi.md#get_wallet) | **GET** /v1/wallets/{walletId} |
|
|
146
|
+
| _WalletApi_ | [**list_wallets**](docs/WalletApi.md#list_wallets) | **GET** /v1/wallets |
|
|
147
|
+
| _WalletApi_ | [**sign_credential**](docs/WalletApi.md#sign_credential) | **POST** /v1/wallets/{walletId}/sign-credential |
|
|
148
|
+
| _WalletApi_ | [**sign_credentials_jwt**](docs/WalletApi.md#sign_credentials_jwt) | **POST** /v2/wallets/{walletId}/credentials/jwt/sign |
|
|
149
|
+
| _WalletApi_ | [**sign_credentials_ldp**](docs/WalletApi.md#sign_credentials_ldp) | **POST** /v2/wallets/{walletId}/credentials/ldp/sign |
|
|
150
|
+
| _WalletApi_ | [**sign_credentials_sd_jwt**](docs/WalletApi.md#sign_credentials_sd_jwt) | **POST** /v2/wallets/{walletId}/credentials/sd-jwt/sign |
|
|
151
|
+
| _WalletApi_ | [**sign_jwt_token**](docs/WalletApi.md#sign_jwt_token) | **POST** /v1/wallets/{walletId}/sign-jwt |
|
|
152
|
+
| _WalletApi_ | [**sign_presentations_ldp**](docs/WalletApi.md#sign_presentations_ldp) | **POST** /v2/wallets/{walletId}/presentations/ldp/sign |
|
|
153
|
+
| _WalletApi_ | [**update_wallet**](docs/WalletApi.md#update_wallet) | **PATCH** /v1/wallets/{walletId} |
|
|
154
|
+
|
|
155
|
+
## Documentation For Models
|
|
156
|
+
|
|
157
|
+
- [AuthcryptMessageInput](docs/AuthcryptMessageInput.md)
|
|
158
|
+
- [AuthcryptMessageResultDto](docs/AuthcryptMessageResultDto.md)
|
|
159
|
+
- [CreateWalletInput](docs/CreateWalletInput.md)
|
|
160
|
+
- [CreateWalletResponse](docs/CreateWalletResponse.md)
|
|
161
|
+
- [CreateWalletV2Input](docs/CreateWalletV2Input.md)
|
|
162
|
+
- [CreateWalletV2Response](docs/CreateWalletV2Response.md)
|
|
163
|
+
- [EntityNotFoundError](docs/EntityNotFoundError.md)
|
|
164
|
+
- [GetRevocationCredentialStatusOK](docs/GetRevocationCredentialStatusOK.md)
|
|
165
|
+
- [GetRevocationListCredentialResultDto](docs/GetRevocationListCredentialResultDto.md)
|
|
166
|
+
- [InvalidDidParameterError](docs/InvalidDidParameterError.md)
|
|
167
|
+
- [InvalidParameterError](docs/InvalidParameterError.md)
|
|
168
|
+
- [KeyNotFoundError](docs/KeyNotFoundError.md)
|
|
169
|
+
- [NotFoundError](docs/NotFoundError.md)
|
|
170
|
+
- [OperationForbiddenError](docs/OperationForbiddenError.md)
|
|
171
|
+
- [RevokeCredentialInput](docs/RevokeCredentialInput.md)
|
|
172
|
+
- [RevokeCredentialsInput](docs/RevokeCredentialsInput.md)
|
|
173
|
+
- [ServiceErrorResponse](docs/ServiceErrorResponse.md)
|
|
174
|
+
- [ServiceErrorResponseDetailsInner](docs/ServiceErrorResponseDetailsInner.md)
|
|
175
|
+
- [SignCredential400Response](docs/SignCredential400Response.md)
|
|
176
|
+
- [SignCredentialInputDto](docs/SignCredentialInputDto.md)
|
|
177
|
+
- [SignCredentialInputDtoUnsignedCredentialParams](docs/SignCredentialInputDtoUnsignedCredentialParams.md)
|
|
178
|
+
- [SignCredentialResultDto](docs/SignCredentialResultDto.md)
|
|
179
|
+
- [SignCredentialsDm1LdInputDto](docs/SignCredentialsDm1LdInputDto.md)
|
|
180
|
+
- [SignCredentialsDm1LdResultDto](docs/SignCredentialsDm1LdResultDto.md)
|
|
181
|
+
- [SignCredentialsDm2SdJwtInputDto](docs/SignCredentialsDm2SdJwtInputDto.md)
|
|
182
|
+
- [SignCredentialsDm2SdJwtResultDto](docs/SignCredentialsDm2SdJwtResultDto.md)
|
|
183
|
+
- [SignCredentialsJwtInputDto](docs/SignCredentialsJwtInputDto.md)
|
|
184
|
+
- [SignCredentialsJwtResultDto](docs/SignCredentialsJwtResultDto.md)
|
|
185
|
+
- [SignCredentialsLdpInputDto](docs/SignCredentialsLdpInputDto.md)
|
|
186
|
+
- [SignCredentialsLdpResultDto](docs/SignCredentialsLdpResultDto.md)
|
|
187
|
+
- [SignJwtToken](docs/SignJwtToken.md)
|
|
188
|
+
- [SignJwtTokenOK](docs/SignJwtTokenOK.md)
|
|
189
|
+
- [SignMessageInput](docs/SignMessageInput.md)
|
|
190
|
+
- [SignMessageResultDto](docs/SignMessageResultDto.md)
|
|
191
|
+
- [SignPresentationLdpInputDto](docs/SignPresentationLdpInputDto.md)
|
|
192
|
+
- [SignPresentationLdpResultDto](docs/SignPresentationLdpResultDto.md)
|
|
193
|
+
- [SigningFailedError](docs/SigningFailedError.md)
|
|
194
|
+
- [UpdateWalletInput](docs/UpdateWalletInput.md)
|
|
195
|
+
- [WalletDto](docs/WalletDto.md)
|
|
196
|
+
- [WalletDtoKeysInner](docs/WalletDtoKeysInner.md)
|
|
197
|
+
- [WalletV2Dto](docs/WalletV2Dto.md)
|
|
198
|
+
- [WalletsListDto](docs/WalletsListDto.md)
|
|
199
|
+
|
|
200
|
+
<a id="documentation-for-authorization"></a>
|
|
201
|
+
|
|
202
|
+
## Documentation For Authorization
|
|
203
|
+
|
|
204
|
+
Authentication schemes defined for the API:
|
|
205
|
+
<a id="ProjectTokenAuth"></a>
|
|
206
|
+
|
|
207
|
+
### ProjectTokenAuth
|
|
208
|
+
|
|
209
|
+
- **Type**: API key
|
|
210
|
+
- **API key parameter name**: authorization
|
|
211
|
+
- **Location**: HTTP header
|
|
212
|
+
|
|
213
|
+
## Author
|
|
214
|
+
|
|
215
|
+
info@affinidi.com
|
|
216
|
+
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
# affinidi_tdk_wallets_client
|
|
2
|
+
|
|
3
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
|
|
5
|
+
For more information, please visit [https://www.affinidi.com](https://www.affinidi.com)
|
|
6
|
+
|
|
7
|
+
Documentation is available at [https://docs.affinidi.com/dev-tools/affinidi-tdk/clients/wallets](https://docs.affinidi.com/dev-tools/affinidi-tdk/clients/wallets)
|
|
8
|
+
|
|
9
|
+
## Requirements.
|
|
10
|
+
|
|
11
|
+
Python 3.7+
|
|
12
|
+
|
|
13
|
+
## Installation & Usage
|
|
14
|
+
|
|
15
|
+
### pip install
|
|
16
|
+
|
|
17
|
+
If the python package is hosted on a repository, you can install directly using:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
pip install affinidi_tdk_wallets_client
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Then import the package:
|
|
24
|
+
|
|
25
|
+
```python
|
|
26
|
+
import affinidi_tdk_wallets_client
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Setuptools
|
|
30
|
+
|
|
31
|
+
Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
python setup.py install --user
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Then import the package:
|
|
38
|
+
|
|
39
|
+
```python
|
|
40
|
+
import affinidi_tdk_wallets_client
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Tests
|
|
44
|
+
|
|
45
|
+
Execute `pytest` to run the tests.
|
|
46
|
+
|
|
47
|
+
## Getting Started
|
|
48
|
+
|
|
49
|
+
Please follow the [installation procedure](#installation--usage) and then run the following:
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
|
|
53
|
+
import time
|
|
54
|
+
import affinidi_tdk_wallets_client
|
|
55
|
+
from affinidi_tdk_wallets_client.rest import ApiException
|
|
56
|
+
from pprint import pprint
|
|
57
|
+
|
|
58
|
+
# Defining the host is optional and defaults to https://apse1.api.affinidi.io/cwe
|
|
59
|
+
# See configuration.py for a list of all supported configuration parameters.
|
|
60
|
+
configuration = affinidi_tdk_wallets_client.Configuration(
|
|
61
|
+
host = "https://apse1.api.affinidi.io/cwe"
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
# The client must configure the authentication and authorization parameters
|
|
65
|
+
# in accordance with the API server security policy.
|
|
66
|
+
# Examples for each auth method are provided below, use the example that
|
|
67
|
+
# satisfies your auth use case.
|
|
68
|
+
|
|
69
|
+
# Configure API key authorization: ProjectTokenAuth
|
|
70
|
+
configuration.api_key['ProjectTokenAuth'] = os.environ["API_KEY"]
|
|
71
|
+
|
|
72
|
+
# Configure a hook to auto-refresh API key for your personal access token (PAT), if expired
|
|
73
|
+
import affinidi_tdk_auth_provider
|
|
74
|
+
|
|
75
|
+
stats = {
|
|
76
|
+
apiGatewayUrl,
|
|
77
|
+
keyId,
|
|
78
|
+
passphrase,
|
|
79
|
+
privateKey,
|
|
80
|
+
projectId,
|
|
81
|
+
tokenEndpoint,
|
|
82
|
+
tokenId,
|
|
83
|
+
}
|
|
84
|
+
authProvider = affinidi_tdk_auth_provider.AuthProvider(stats)
|
|
85
|
+
configuration.refresh_api_key_hook = lambda api_client: authProvider.fetch_project_scoped_token()
|
|
86
|
+
|
|
87
|
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
88
|
+
# configuration.api_key_prefix['ProjectTokenAuth'] = 'Bearer'
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
# Enter a context with an instance of the API client
|
|
92
|
+
with affinidi_tdk_wallets_client.ApiClient(configuration) as api_client:
|
|
93
|
+
# Create an instance of the API class
|
|
94
|
+
api_instance = affinidi_tdk_wallets_client.RevocationApi(api_client)
|
|
95
|
+
project_id = 'project_id_example' # str | Description for projectId.
|
|
96
|
+
wallet_id = 'wallet_id_example' # str | Description for walletId.
|
|
97
|
+
status_id = 'status_id_example' # str | Description for statusId.
|
|
98
|
+
|
|
99
|
+
try:
|
|
100
|
+
api_response = api_instance.get_revocation_credential_status(project_id, wallet_id, status_id)
|
|
101
|
+
print("The response of RevocationApi->get_revocation_credential_status:\n")
|
|
102
|
+
pprint(api_response)
|
|
103
|
+
except ApiException as e:
|
|
104
|
+
print("Exception when calling RevocationApi->get_revocation_credential_status: %s\n" % e)
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Documentation for API Endpoints
|
|
109
|
+
|
|
110
|
+
All URIs are relative to *https://apse1.api.affinidi.io/cwe*
|
|
111
|
+
|
|
112
|
+
| Class | Method | HTTP request | Description |
|
|
113
|
+
| --------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------- |
|
|
114
|
+
| _RevocationApi_ | [**get_revocation_credential_status**](docs/RevocationApi.md#get_revocation_credential_status) | **GET** /v1/projects/{projectId}/wallets/{walletId}/revocation-statuses/{statusId} |
|
|
115
|
+
| _RevocationApi_ | [**get_revocation_list_credential**](docs/RevocationApi.md#get_revocation_list_credential) | **GET** /v1/wallets/{walletId}/revocation-list/{listId} | Return revocation list credential. |
|
|
116
|
+
| _RevocationApi_ | [**revoke_credential**](docs/RevocationApi.md#revoke_credential) | **POST** /v1/wallets/{walletId}/revoke | Revoke Credential. |
|
|
117
|
+
| _RevocationApi_ | [**revoke_credentials**](docs/RevocationApi.md#revoke_credentials) | **POST** /v2/wallets/{walletId}/credentials/revoke | Revoke Credentials. |
|
|
118
|
+
| _WalletApi_ | [**create_wallet**](docs/WalletApi.md#create_wallet) | **POST** /v1/wallets |
|
|
119
|
+
| _WalletApi_ | [**delete_wallet**](docs/WalletApi.md#delete_wallet) | **DELETE** /v1/wallets/{walletId} |
|
|
120
|
+
| _WalletApi_ | [**get_wallet**](docs/WalletApi.md#get_wallet) | **GET** /v1/wallets/{walletId} |
|
|
121
|
+
| _WalletApi_ | [**list_wallets**](docs/WalletApi.md#list_wallets) | **GET** /v1/wallets |
|
|
122
|
+
| _WalletApi_ | [**sign_credential**](docs/WalletApi.md#sign_credential) | **POST** /v1/wallets/{walletId}/sign-credential |
|
|
123
|
+
| _WalletApi_ | [**sign_credentials_jwt**](docs/WalletApi.md#sign_credentials_jwt) | **POST** /v2/wallets/{walletId}/credentials/jwt/sign |
|
|
124
|
+
| _WalletApi_ | [**sign_credentials_ldp**](docs/WalletApi.md#sign_credentials_ldp) | **POST** /v2/wallets/{walletId}/credentials/ldp/sign |
|
|
125
|
+
| _WalletApi_ | [**sign_credentials_sd_jwt**](docs/WalletApi.md#sign_credentials_sd_jwt) | **POST** /v2/wallets/{walletId}/credentials/sd-jwt/sign |
|
|
126
|
+
| _WalletApi_ | [**sign_jwt_token**](docs/WalletApi.md#sign_jwt_token) | **POST** /v1/wallets/{walletId}/sign-jwt |
|
|
127
|
+
| _WalletApi_ | [**sign_presentations_ldp**](docs/WalletApi.md#sign_presentations_ldp) | **POST** /v2/wallets/{walletId}/presentations/ldp/sign |
|
|
128
|
+
| _WalletApi_ | [**update_wallet**](docs/WalletApi.md#update_wallet) | **PATCH** /v1/wallets/{walletId} |
|
|
129
|
+
|
|
130
|
+
## Documentation For Models
|
|
131
|
+
|
|
132
|
+
- [AuthcryptMessageInput](docs/AuthcryptMessageInput.md)
|
|
133
|
+
- [AuthcryptMessageResultDto](docs/AuthcryptMessageResultDto.md)
|
|
134
|
+
- [CreateWalletInput](docs/CreateWalletInput.md)
|
|
135
|
+
- [CreateWalletResponse](docs/CreateWalletResponse.md)
|
|
136
|
+
- [CreateWalletV2Input](docs/CreateWalletV2Input.md)
|
|
137
|
+
- [CreateWalletV2Response](docs/CreateWalletV2Response.md)
|
|
138
|
+
- [EntityNotFoundError](docs/EntityNotFoundError.md)
|
|
139
|
+
- [GetRevocationCredentialStatusOK](docs/GetRevocationCredentialStatusOK.md)
|
|
140
|
+
- [GetRevocationListCredentialResultDto](docs/GetRevocationListCredentialResultDto.md)
|
|
141
|
+
- [InvalidDidParameterError](docs/InvalidDidParameterError.md)
|
|
142
|
+
- [InvalidParameterError](docs/InvalidParameterError.md)
|
|
143
|
+
- [KeyNotFoundError](docs/KeyNotFoundError.md)
|
|
144
|
+
- [NotFoundError](docs/NotFoundError.md)
|
|
145
|
+
- [OperationForbiddenError](docs/OperationForbiddenError.md)
|
|
146
|
+
- [RevokeCredentialInput](docs/RevokeCredentialInput.md)
|
|
147
|
+
- [RevokeCredentialsInput](docs/RevokeCredentialsInput.md)
|
|
148
|
+
- [ServiceErrorResponse](docs/ServiceErrorResponse.md)
|
|
149
|
+
- [ServiceErrorResponseDetailsInner](docs/ServiceErrorResponseDetailsInner.md)
|
|
150
|
+
- [SignCredential400Response](docs/SignCredential400Response.md)
|
|
151
|
+
- [SignCredentialInputDto](docs/SignCredentialInputDto.md)
|
|
152
|
+
- [SignCredentialInputDtoUnsignedCredentialParams](docs/SignCredentialInputDtoUnsignedCredentialParams.md)
|
|
153
|
+
- [SignCredentialResultDto](docs/SignCredentialResultDto.md)
|
|
154
|
+
- [SignCredentialsDm1LdInputDto](docs/SignCredentialsDm1LdInputDto.md)
|
|
155
|
+
- [SignCredentialsDm1LdResultDto](docs/SignCredentialsDm1LdResultDto.md)
|
|
156
|
+
- [SignCredentialsDm2SdJwtInputDto](docs/SignCredentialsDm2SdJwtInputDto.md)
|
|
157
|
+
- [SignCredentialsDm2SdJwtResultDto](docs/SignCredentialsDm2SdJwtResultDto.md)
|
|
158
|
+
- [SignCredentialsJwtInputDto](docs/SignCredentialsJwtInputDto.md)
|
|
159
|
+
- [SignCredentialsJwtResultDto](docs/SignCredentialsJwtResultDto.md)
|
|
160
|
+
- [SignCredentialsLdpInputDto](docs/SignCredentialsLdpInputDto.md)
|
|
161
|
+
- [SignCredentialsLdpResultDto](docs/SignCredentialsLdpResultDto.md)
|
|
162
|
+
- [SignJwtToken](docs/SignJwtToken.md)
|
|
163
|
+
- [SignJwtTokenOK](docs/SignJwtTokenOK.md)
|
|
164
|
+
- [SignMessageInput](docs/SignMessageInput.md)
|
|
165
|
+
- [SignMessageResultDto](docs/SignMessageResultDto.md)
|
|
166
|
+
- [SignPresentationLdpInputDto](docs/SignPresentationLdpInputDto.md)
|
|
167
|
+
- [SignPresentationLdpResultDto](docs/SignPresentationLdpResultDto.md)
|
|
168
|
+
- [SigningFailedError](docs/SigningFailedError.md)
|
|
169
|
+
- [UpdateWalletInput](docs/UpdateWalletInput.md)
|
|
170
|
+
- [WalletDto](docs/WalletDto.md)
|
|
171
|
+
- [WalletDtoKeysInner](docs/WalletDtoKeysInner.md)
|
|
172
|
+
- [WalletV2Dto](docs/WalletV2Dto.md)
|
|
173
|
+
- [WalletsListDto](docs/WalletsListDto.md)
|
|
174
|
+
|
|
175
|
+
<a id="documentation-for-authorization"></a>
|
|
176
|
+
|
|
177
|
+
## Documentation For Authorization
|
|
178
|
+
|
|
179
|
+
Authentication schemes defined for the API:
|
|
180
|
+
<a id="ProjectTokenAuth"></a>
|
|
181
|
+
|
|
182
|
+
### ProjectTokenAuth
|
|
183
|
+
|
|
184
|
+
- **Type**: API key
|
|
185
|
+
- **API key parameter name**: authorization
|
|
186
|
+
- **Location**: HTTP header
|
|
187
|
+
|
|
188
|
+
## Author
|
|
189
|
+
|
|
190
|
+
info@affinidi.com
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
# flake8: noqa
|
|
4
|
+
|
|
5
|
+
"""
|
|
6
|
+
CloudWalletEssentials
|
|
7
|
+
|
|
8
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
9
|
+
|
|
10
|
+
The version of the OpenAPI document: 1.0.0
|
|
11
|
+
Contact: info@affinidi.com
|
|
12
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
13
|
+
|
|
14
|
+
Do not edit the class manually.
|
|
15
|
+
""" # noqa: E501
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
__version__ = "1.0.0"
|
|
19
|
+
|
|
20
|
+
# import apis into sdk package
|
|
21
|
+
from affinidi_tdk_wallets_client.api.revocation_api import RevocationApi
|
|
22
|
+
from affinidi_tdk_wallets_client.api.wallet_api import WalletApi
|
|
23
|
+
|
|
24
|
+
# import ApiClient
|
|
25
|
+
from affinidi_tdk_wallets_client.api_response import ApiResponse
|
|
26
|
+
from affinidi_tdk_wallets_client.api_client import ApiClient
|
|
27
|
+
from affinidi_tdk_wallets_client.configuration import Configuration
|
|
28
|
+
from affinidi_tdk_wallets_client.exceptions import OpenApiException
|
|
29
|
+
from affinidi_tdk_wallets_client.exceptions import ApiTypeError
|
|
30
|
+
from affinidi_tdk_wallets_client.exceptions import ApiValueError
|
|
31
|
+
from affinidi_tdk_wallets_client.exceptions import ApiKeyError
|
|
32
|
+
from affinidi_tdk_wallets_client.exceptions import ApiAttributeError
|
|
33
|
+
from affinidi_tdk_wallets_client.exceptions import ApiException
|
|
34
|
+
|
|
35
|
+
# import models into sdk package
|
|
36
|
+
from affinidi_tdk_wallets_client.models.authcrypt_message_input import AuthcryptMessageInput
|
|
37
|
+
from affinidi_tdk_wallets_client.models.authcrypt_message_result_dto import AuthcryptMessageResultDto
|
|
38
|
+
from affinidi_tdk_wallets_client.models.create_wallet_input import CreateWalletInput
|
|
39
|
+
from affinidi_tdk_wallets_client.models.create_wallet_response import CreateWalletResponse
|
|
40
|
+
from affinidi_tdk_wallets_client.models.create_wallet_v2_input import CreateWalletV2Input
|
|
41
|
+
from affinidi_tdk_wallets_client.models.create_wallet_v2_response import CreateWalletV2Response
|
|
42
|
+
from affinidi_tdk_wallets_client.models.entity_not_found_error import EntityNotFoundError
|
|
43
|
+
from affinidi_tdk_wallets_client.models.get_revocation_credential_status_ok import GetRevocationCredentialStatusOK
|
|
44
|
+
from affinidi_tdk_wallets_client.models.get_revocation_list_credential_result_dto import GetRevocationListCredentialResultDto
|
|
45
|
+
from affinidi_tdk_wallets_client.models.invalid_did_parameter_error import InvalidDidParameterError
|
|
46
|
+
from affinidi_tdk_wallets_client.models.invalid_parameter_error import InvalidParameterError
|
|
47
|
+
from affinidi_tdk_wallets_client.models.key_not_found_error import KeyNotFoundError
|
|
48
|
+
from affinidi_tdk_wallets_client.models.not_found_error import NotFoundError
|
|
49
|
+
from affinidi_tdk_wallets_client.models.operation_forbidden_error import OperationForbiddenError
|
|
50
|
+
from affinidi_tdk_wallets_client.models.revoke_credential_input import RevokeCredentialInput
|
|
51
|
+
from affinidi_tdk_wallets_client.models.revoke_credentials_input import RevokeCredentialsInput
|
|
52
|
+
from affinidi_tdk_wallets_client.models.service_error_response import ServiceErrorResponse
|
|
53
|
+
from affinidi_tdk_wallets_client.models.service_error_response_details_inner import ServiceErrorResponseDetailsInner
|
|
54
|
+
from affinidi_tdk_wallets_client.models.sign_credential400_response import SignCredential400Response
|
|
55
|
+
from affinidi_tdk_wallets_client.models.sign_credential_input_dto import SignCredentialInputDto
|
|
56
|
+
from affinidi_tdk_wallets_client.models.sign_credential_input_dto_unsigned_credential_params import SignCredentialInputDtoUnsignedCredentialParams
|
|
57
|
+
from affinidi_tdk_wallets_client.models.sign_credential_result_dto import SignCredentialResultDto
|
|
58
|
+
from affinidi_tdk_wallets_client.models.sign_credentials_dm1_ld_input_dto import SignCredentialsDm1LdInputDto
|
|
59
|
+
from affinidi_tdk_wallets_client.models.sign_credentials_dm1_ld_result_dto import SignCredentialsDm1LdResultDto
|
|
60
|
+
from affinidi_tdk_wallets_client.models.sign_credentials_dm2_sd_jwt_input_dto import SignCredentialsDm2SdJwtInputDto
|
|
61
|
+
from affinidi_tdk_wallets_client.models.sign_credentials_dm2_sd_jwt_result_dto import SignCredentialsDm2SdJwtResultDto
|
|
62
|
+
from affinidi_tdk_wallets_client.models.sign_credentials_jwt_input_dto import SignCredentialsJwtInputDto
|
|
63
|
+
from affinidi_tdk_wallets_client.models.sign_credentials_jwt_result_dto import SignCredentialsJwtResultDto
|
|
64
|
+
from affinidi_tdk_wallets_client.models.sign_credentials_ldp_input_dto import SignCredentialsLdpInputDto
|
|
65
|
+
from affinidi_tdk_wallets_client.models.sign_credentials_ldp_result_dto import SignCredentialsLdpResultDto
|
|
66
|
+
from affinidi_tdk_wallets_client.models.sign_jwt_token import SignJwtToken
|
|
67
|
+
from affinidi_tdk_wallets_client.models.sign_jwt_token_ok import SignJwtTokenOK
|
|
68
|
+
from affinidi_tdk_wallets_client.models.sign_message_input import SignMessageInput
|
|
69
|
+
from affinidi_tdk_wallets_client.models.sign_message_result_dto import SignMessageResultDto
|
|
70
|
+
from affinidi_tdk_wallets_client.models.sign_presentation_ldp_input_dto import SignPresentationLdpInputDto
|
|
71
|
+
from affinidi_tdk_wallets_client.models.sign_presentation_ldp_result_dto import SignPresentationLdpResultDto
|
|
72
|
+
from affinidi_tdk_wallets_client.models.signing_failed_error import SigningFailedError
|
|
73
|
+
from affinidi_tdk_wallets_client.models.update_wallet_input import UpdateWalletInput
|
|
74
|
+
from affinidi_tdk_wallets_client.models.wallet_dto import WalletDto
|
|
75
|
+
from affinidi_tdk_wallets_client.models.wallet_dto_keys_inner import WalletDtoKeysInner
|
|
76
|
+
from affinidi_tdk_wallets_client.models.wallet_v2_dto import WalletV2Dto
|
|
77
|
+
from affinidi_tdk_wallets_client.models.wallets_list_dto import WalletsListDto
|