affinidi_tdk_wallets_client 1.19.0__py3-none-any.whl
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.
Potentially problematic release.
This version of affinidi_tdk_wallets_client might be problematic. Click here for more details.
- affinidi_tdk_wallets_client/__init__.py +63 -0
- affinidi_tdk_wallets_client/api/__init__.py +7 -0
- affinidi_tdk_wallets_client/api/default_api.py +202 -0
- affinidi_tdk_wallets_client/api/revocation_api.py +351 -0
- affinidi_tdk_wallets_client/api/wallet_api.py +1094 -0
- affinidi_tdk_wallets_client/api_client.py +760 -0
- affinidi_tdk_wallets_client/api_response.py +25 -0
- affinidi_tdk_wallets_client/configuration.py +464 -0
- affinidi_tdk_wallets_client/exceptions.py +167 -0
- affinidi_tdk_wallets_client/models/__init__.py +44 -0
- affinidi_tdk_wallets_client/models/create_wallet_input.py +142 -0
- affinidi_tdk_wallets_client/models/create_wallet_response.py +76 -0
- affinidi_tdk_wallets_client/models/did_key_input_params.py +86 -0
- affinidi_tdk_wallets_client/models/did_web_input_params.py +92 -0
- affinidi_tdk_wallets_client/models/entity_not_found_error.py +109 -0
- affinidi_tdk_wallets_client/models/get_revocation_credential_status_ok.py +72 -0
- affinidi_tdk_wallets_client/models/get_revocation_list_credential_result_dto.py +72 -0
- affinidi_tdk_wallets_client/models/invalid_did_parameter_error.py +109 -0
- affinidi_tdk_wallets_client/models/invalid_parameter_error.py +109 -0
- affinidi_tdk_wallets_client/models/key_not_found_error.py +109 -0
- affinidi_tdk_wallets_client/models/not_found_error.py +109 -0
- affinidi_tdk_wallets_client/models/operation_forbidden_error.py +109 -0
- affinidi_tdk_wallets_client/models/revoke_credential_input.py +79 -0
- affinidi_tdk_wallets_client/models/service_error_response.py +86 -0
- affinidi_tdk_wallets_client/models/service_error_response_details_inner.py +78 -0
- affinidi_tdk_wallets_client/models/sign_credential400_response.py +142 -0
- affinidi_tdk_wallets_client/models/sign_credential_input_dto.py +92 -0
- affinidi_tdk_wallets_client/models/sign_credential_input_dto_unsigned_credential_params.py +89 -0
- affinidi_tdk_wallets_client/models/sign_credential_result_dto.py +76 -0
- affinidi_tdk_wallets_client/models/sign_credential_result_dto_signed_credential.py +148 -0
- affinidi_tdk_wallets_client/models/sign_jwt_token.py +74 -0
- affinidi_tdk_wallets_client/models/sign_jwt_token_ok.py +72 -0
- affinidi_tdk_wallets_client/models/signing_failed_error.py +109 -0
- affinidi_tdk_wallets_client/models/update_wallet_input.py +74 -0
- affinidi_tdk_wallets_client/models/wallet_dto.py +96 -0
- affinidi_tdk_wallets_client/models/wallet_dto_keys_inner.py +74 -0
- affinidi_tdk_wallets_client/models/wallets_list_dto.py +80 -0
- affinidi_tdk_wallets_client/py.typed +0 -0
- affinidi_tdk_wallets_client/rest.py +328 -0
- affinidi_tdk_wallets_client-1.19.0.dist-info/METADATA +188 -0
- affinidi_tdk_wallets_client-1.19.0.dist-info/RECORD +42 -0
- affinidi_tdk_wallets_client-1.19.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
CloudWalletEssentials
|
|
5
|
+
|
|
6
|
+
Cloud Wallet For Enterprise Structure
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Contact: info@affinidi.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
from typing import List, Optional
|
|
23
|
+
from pydantic import BaseModel, conlist
|
|
24
|
+
from affinidi_tdk_wallets_client.models.wallet_dto import WalletDto
|
|
25
|
+
|
|
26
|
+
class WalletsListDto(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
list of wallets # noqa: E501
|
|
29
|
+
"""
|
|
30
|
+
wallets: Optional[conlist(WalletDto)] = None
|
|
31
|
+
__properties = ["wallets"]
|
|
32
|
+
|
|
33
|
+
class Config:
|
|
34
|
+
"""Pydantic configuration"""
|
|
35
|
+
allow_population_by_field_name = True
|
|
36
|
+
validate_assignment = True
|
|
37
|
+
|
|
38
|
+
def to_str(self) -> str:
|
|
39
|
+
"""Returns the string representation of the model using alias"""
|
|
40
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
41
|
+
|
|
42
|
+
def to_json(self) -> str:
|
|
43
|
+
"""Returns the JSON representation of the model using alias"""
|
|
44
|
+
return json.dumps(self.to_dict())
|
|
45
|
+
|
|
46
|
+
@classmethod
|
|
47
|
+
def from_json(cls, json_str: str) -> WalletsListDto:
|
|
48
|
+
"""Create an instance of WalletsListDto from a JSON string"""
|
|
49
|
+
return cls.from_dict(json.loads(json_str))
|
|
50
|
+
|
|
51
|
+
def to_dict(self):
|
|
52
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
53
|
+
_dict = self.dict(by_alias=True,
|
|
54
|
+
exclude={
|
|
55
|
+
},
|
|
56
|
+
exclude_none=True)
|
|
57
|
+
# override the default output from pydantic by calling `to_dict()` of each item in wallets (list)
|
|
58
|
+
_items = []
|
|
59
|
+
if self.wallets:
|
|
60
|
+
for _item in self.wallets:
|
|
61
|
+
if _item:
|
|
62
|
+
_items.append(_item.to_dict())
|
|
63
|
+
_dict['wallets'] = _items
|
|
64
|
+
return _dict
|
|
65
|
+
|
|
66
|
+
@classmethod
|
|
67
|
+
def from_dict(cls, obj: dict) -> WalletsListDto:
|
|
68
|
+
"""Create an instance of WalletsListDto from a dict"""
|
|
69
|
+
if obj is None:
|
|
70
|
+
return None
|
|
71
|
+
|
|
72
|
+
if not isinstance(obj, dict):
|
|
73
|
+
return WalletsListDto.parse_obj(obj)
|
|
74
|
+
|
|
75
|
+
_obj = WalletsListDto.parse_obj({
|
|
76
|
+
"wallets": [WalletDto.from_dict(_item) for _item in obj.get("wallets")] if obj.get("wallets") is not None else None
|
|
77
|
+
})
|
|
78
|
+
return _obj
|
|
79
|
+
|
|
80
|
+
|
|
File without changes
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
CloudWalletEssentials
|
|
5
|
+
|
|
6
|
+
Cloud Wallet For Enterprise Structure
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Contact: info@affinidi.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import io
|
|
17
|
+
import json
|
|
18
|
+
import logging
|
|
19
|
+
import re
|
|
20
|
+
import ssl
|
|
21
|
+
|
|
22
|
+
from urllib.parse import urlencode, quote_plus
|
|
23
|
+
import urllib3
|
|
24
|
+
|
|
25
|
+
from affinidi_tdk_wallets_client.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError, BadRequestException
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
logger = logging.getLogger(__name__)
|
|
29
|
+
|
|
30
|
+
SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def is_socks_proxy_url(url):
|
|
34
|
+
if url is None:
|
|
35
|
+
return False
|
|
36
|
+
split_section = url.split("://")
|
|
37
|
+
if len(split_section) < 2:
|
|
38
|
+
return False
|
|
39
|
+
else:
|
|
40
|
+
return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class RESTResponse(io.IOBase):
|
|
44
|
+
|
|
45
|
+
def __init__(self, resp) -> None:
|
|
46
|
+
self.urllib3_response = resp
|
|
47
|
+
self.status = resp.status
|
|
48
|
+
self.reason = resp.reason
|
|
49
|
+
self.data = resp.data
|
|
50
|
+
|
|
51
|
+
def getheaders(self):
|
|
52
|
+
"""Returns a dictionary of the response headers."""
|
|
53
|
+
return self.urllib3_response.headers
|
|
54
|
+
|
|
55
|
+
def getheader(self, name, default=None):
|
|
56
|
+
"""Returns a given response header."""
|
|
57
|
+
return self.urllib3_response.headers.get(name, default)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
class RESTClientObject:
|
|
61
|
+
|
|
62
|
+
def __init__(self, configuration, pools_size=4, maxsize=None) -> None:
|
|
63
|
+
# urllib3.PoolManager will pass all kw parameters to connectionpool
|
|
64
|
+
# https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501
|
|
65
|
+
# https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501
|
|
66
|
+
# maxsize is the number of requests to host that are allowed in parallel # noqa: E501
|
|
67
|
+
# Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501
|
|
68
|
+
|
|
69
|
+
# cert_reqs
|
|
70
|
+
if configuration.verify_ssl:
|
|
71
|
+
cert_reqs = ssl.CERT_REQUIRED
|
|
72
|
+
else:
|
|
73
|
+
cert_reqs = ssl.CERT_NONE
|
|
74
|
+
|
|
75
|
+
addition_pool_args = {}
|
|
76
|
+
if configuration.assert_hostname is not None:
|
|
77
|
+
addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501
|
|
78
|
+
|
|
79
|
+
if configuration.retries is not None:
|
|
80
|
+
addition_pool_args['retries'] = configuration.retries
|
|
81
|
+
|
|
82
|
+
if configuration.tls_server_name:
|
|
83
|
+
addition_pool_args['server_hostname'] = configuration.tls_server_name
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
if configuration.socket_options is not None:
|
|
87
|
+
addition_pool_args['socket_options'] = configuration.socket_options
|
|
88
|
+
|
|
89
|
+
if maxsize is None:
|
|
90
|
+
if configuration.connection_pool_maxsize is not None:
|
|
91
|
+
maxsize = configuration.connection_pool_maxsize
|
|
92
|
+
else:
|
|
93
|
+
maxsize = 4
|
|
94
|
+
|
|
95
|
+
# https pool manager
|
|
96
|
+
if configuration.proxy:
|
|
97
|
+
if is_socks_proxy_url(configuration.proxy):
|
|
98
|
+
from urllib3.contrib.socks import SOCKSProxyManager
|
|
99
|
+
self.pool_manager = SOCKSProxyManager(
|
|
100
|
+
cert_reqs=cert_reqs,
|
|
101
|
+
ca_certs=configuration.ssl_ca_cert,
|
|
102
|
+
cert_file=configuration.cert_file,
|
|
103
|
+
key_file=configuration.key_file,
|
|
104
|
+
proxy_url=configuration.proxy,
|
|
105
|
+
headers=configuration.proxy_headers,
|
|
106
|
+
**addition_pool_args
|
|
107
|
+
)
|
|
108
|
+
else:
|
|
109
|
+
self.pool_manager = urllib3.ProxyManager(
|
|
110
|
+
num_pools=pools_size,
|
|
111
|
+
maxsize=maxsize,
|
|
112
|
+
cert_reqs=cert_reqs,
|
|
113
|
+
ca_certs=configuration.ssl_ca_cert,
|
|
114
|
+
cert_file=configuration.cert_file,
|
|
115
|
+
key_file=configuration.key_file,
|
|
116
|
+
proxy_url=configuration.proxy,
|
|
117
|
+
proxy_headers=configuration.proxy_headers,
|
|
118
|
+
**addition_pool_args
|
|
119
|
+
)
|
|
120
|
+
else:
|
|
121
|
+
self.pool_manager = urllib3.PoolManager(
|
|
122
|
+
num_pools=pools_size,
|
|
123
|
+
maxsize=maxsize,
|
|
124
|
+
cert_reqs=cert_reqs,
|
|
125
|
+
ca_certs=configuration.ssl_ca_cert,
|
|
126
|
+
cert_file=configuration.cert_file,
|
|
127
|
+
key_file=configuration.key_file,
|
|
128
|
+
**addition_pool_args
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
def request(self, method, url, query_params=None, headers=None,
|
|
132
|
+
body=None, post_params=None, _preload_content=True,
|
|
133
|
+
_request_timeout=None):
|
|
134
|
+
"""Perform requests.
|
|
135
|
+
|
|
136
|
+
:param method: http request method
|
|
137
|
+
:param url: http request url
|
|
138
|
+
:param query_params: query parameters in the url
|
|
139
|
+
:param headers: http request headers
|
|
140
|
+
:param body: request json body, for `application/json`
|
|
141
|
+
:param post_params: request post parameters,
|
|
142
|
+
`application/x-www-form-urlencoded`
|
|
143
|
+
and `multipart/form-data`
|
|
144
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
145
|
+
be returned without reading/decoding response
|
|
146
|
+
data. Default is True.
|
|
147
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
148
|
+
number provided, it will be total request
|
|
149
|
+
timeout. It can also be a pair (tuple) of
|
|
150
|
+
(connection, read) timeouts.
|
|
151
|
+
"""
|
|
152
|
+
method = method.upper()
|
|
153
|
+
assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT',
|
|
154
|
+
'PATCH', 'OPTIONS']
|
|
155
|
+
|
|
156
|
+
if post_params and body:
|
|
157
|
+
raise ApiValueError(
|
|
158
|
+
"body parameter cannot be used with post_params parameter."
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
post_params = post_params or {}
|
|
162
|
+
headers = headers or {}
|
|
163
|
+
# url already contains the URL query string
|
|
164
|
+
# so reset query_params to empty dict
|
|
165
|
+
query_params = {}
|
|
166
|
+
|
|
167
|
+
timeout = None
|
|
168
|
+
if _request_timeout:
|
|
169
|
+
if isinstance(_request_timeout, (int,float)): # noqa: E501,F821
|
|
170
|
+
timeout = urllib3.Timeout(total=_request_timeout)
|
|
171
|
+
elif (isinstance(_request_timeout, tuple) and
|
|
172
|
+
len(_request_timeout) == 2):
|
|
173
|
+
timeout = urllib3.Timeout(
|
|
174
|
+
connect=_request_timeout[0], read=_request_timeout[1])
|
|
175
|
+
|
|
176
|
+
try:
|
|
177
|
+
# For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE`
|
|
178
|
+
if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']:
|
|
179
|
+
|
|
180
|
+
# no content type provided or payload is json
|
|
181
|
+
if not headers.get('Content-Type') or re.search('json', headers['Content-Type'], re.IGNORECASE):
|
|
182
|
+
request_body = None
|
|
183
|
+
if body is not None:
|
|
184
|
+
request_body = json.dumps(body)
|
|
185
|
+
r = self.pool_manager.request(
|
|
186
|
+
method, url,
|
|
187
|
+
body=request_body,
|
|
188
|
+
preload_content=_preload_content,
|
|
189
|
+
timeout=timeout,
|
|
190
|
+
headers=headers)
|
|
191
|
+
elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501
|
|
192
|
+
r = self.pool_manager.request(
|
|
193
|
+
method, url,
|
|
194
|
+
fields=post_params,
|
|
195
|
+
encode_multipart=False,
|
|
196
|
+
preload_content=_preload_content,
|
|
197
|
+
timeout=timeout,
|
|
198
|
+
headers=headers)
|
|
199
|
+
elif headers['Content-Type'] == 'multipart/form-data':
|
|
200
|
+
# must del headers['Content-Type'], or the correct
|
|
201
|
+
# Content-Type which generated by urllib3 will be
|
|
202
|
+
# overwritten.
|
|
203
|
+
del headers['Content-Type']
|
|
204
|
+
r = self.pool_manager.request(
|
|
205
|
+
method, url,
|
|
206
|
+
fields=post_params,
|
|
207
|
+
encode_multipart=True,
|
|
208
|
+
preload_content=_preload_content,
|
|
209
|
+
timeout=timeout,
|
|
210
|
+
headers=headers)
|
|
211
|
+
# Pass a `string` parameter directly in the body to support
|
|
212
|
+
# other content types than Json when `body` argument is
|
|
213
|
+
# provided in serialized form
|
|
214
|
+
elif isinstance(body, str) or isinstance(body, bytes):
|
|
215
|
+
request_body = body
|
|
216
|
+
r = self.pool_manager.request(
|
|
217
|
+
method, url,
|
|
218
|
+
body=request_body,
|
|
219
|
+
preload_content=_preload_content,
|
|
220
|
+
timeout=timeout,
|
|
221
|
+
headers=headers)
|
|
222
|
+
else:
|
|
223
|
+
# Cannot generate the request from given parameters
|
|
224
|
+
msg = """Cannot prepare a request message for provided
|
|
225
|
+
arguments. Please check that your arguments match
|
|
226
|
+
declared content type."""
|
|
227
|
+
raise ApiException(status=0, reason=msg)
|
|
228
|
+
# For `GET`, `HEAD`
|
|
229
|
+
else:
|
|
230
|
+
r = self.pool_manager.request(method, url,
|
|
231
|
+
fields={},
|
|
232
|
+
preload_content=_preload_content,
|
|
233
|
+
timeout=timeout,
|
|
234
|
+
headers=headers)
|
|
235
|
+
except urllib3.exceptions.SSLError as e:
|
|
236
|
+
msg = "{0}\n{1}".format(type(e).__name__, str(e))
|
|
237
|
+
raise ApiException(status=0, reason=msg)
|
|
238
|
+
|
|
239
|
+
if _preload_content:
|
|
240
|
+
r = RESTResponse(r)
|
|
241
|
+
|
|
242
|
+
# log response body
|
|
243
|
+
logger.debug("response body: %s", r.data)
|
|
244
|
+
|
|
245
|
+
if not 200 <= r.status <= 299:
|
|
246
|
+
if r.status == 400:
|
|
247
|
+
raise BadRequestException(http_resp=r)
|
|
248
|
+
|
|
249
|
+
if r.status == 401:
|
|
250
|
+
raise UnauthorizedException(http_resp=r)
|
|
251
|
+
|
|
252
|
+
if r.status == 403:
|
|
253
|
+
raise ForbiddenException(http_resp=r)
|
|
254
|
+
|
|
255
|
+
if r.status == 404:
|
|
256
|
+
raise NotFoundException(http_resp=r)
|
|
257
|
+
|
|
258
|
+
if 500 <= r.status <= 599:
|
|
259
|
+
raise ServiceException(http_resp=r)
|
|
260
|
+
|
|
261
|
+
raise ApiException(http_resp=r)
|
|
262
|
+
|
|
263
|
+
return r
|
|
264
|
+
|
|
265
|
+
def get_request(self, url, headers=None, query_params=None, _preload_content=True,
|
|
266
|
+
_request_timeout=None):
|
|
267
|
+
return self.request("GET", url,
|
|
268
|
+
headers=headers,
|
|
269
|
+
_preload_content=_preload_content,
|
|
270
|
+
_request_timeout=_request_timeout,
|
|
271
|
+
query_params=query_params)
|
|
272
|
+
|
|
273
|
+
def head_request(self, url, headers=None, query_params=None, _preload_content=True,
|
|
274
|
+
_request_timeout=None):
|
|
275
|
+
return self.request("HEAD", url,
|
|
276
|
+
headers=headers,
|
|
277
|
+
_preload_content=_preload_content,
|
|
278
|
+
_request_timeout=_request_timeout,
|
|
279
|
+
query_params=query_params)
|
|
280
|
+
|
|
281
|
+
def options_request(self, url, headers=None, query_params=None, post_params=None,
|
|
282
|
+
body=None, _preload_content=True, _request_timeout=None):
|
|
283
|
+
return self.request("OPTIONS", url,
|
|
284
|
+
headers=headers,
|
|
285
|
+
query_params=query_params,
|
|
286
|
+
post_params=post_params,
|
|
287
|
+
_preload_content=_preload_content,
|
|
288
|
+
_request_timeout=_request_timeout,
|
|
289
|
+
body=body)
|
|
290
|
+
|
|
291
|
+
def delete_request(self, url, headers=None, query_params=None, body=None,
|
|
292
|
+
_preload_content=True, _request_timeout=None):
|
|
293
|
+
return self.request("DELETE", url,
|
|
294
|
+
headers=headers,
|
|
295
|
+
query_params=query_params,
|
|
296
|
+
_preload_content=_preload_content,
|
|
297
|
+
_request_timeout=_request_timeout,
|
|
298
|
+
body=body)
|
|
299
|
+
|
|
300
|
+
def post_request(self, url, headers=None, query_params=None, post_params=None,
|
|
301
|
+
body=None, _preload_content=True, _request_timeout=None):
|
|
302
|
+
return self.request("POST", url,
|
|
303
|
+
headers=headers,
|
|
304
|
+
query_params=query_params,
|
|
305
|
+
post_params=post_params,
|
|
306
|
+
_preload_content=_preload_content,
|
|
307
|
+
_request_timeout=_request_timeout,
|
|
308
|
+
body=body)
|
|
309
|
+
|
|
310
|
+
def put_request(self, url, headers=None, query_params=None, post_params=None,
|
|
311
|
+
body=None, _preload_content=True, _request_timeout=None):
|
|
312
|
+
return self.request("PUT", url,
|
|
313
|
+
headers=headers,
|
|
314
|
+
query_params=query_params,
|
|
315
|
+
post_params=post_params,
|
|
316
|
+
_preload_content=_preload_content,
|
|
317
|
+
_request_timeout=_request_timeout,
|
|
318
|
+
body=body)
|
|
319
|
+
|
|
320
|
+
def patch_request(self, url, headers=None, query_params=None, post_params=None,
|
|
321
|
+
body=None, _preload_content=True, _request_timeout=None):
|
|
322
|
+
return self.request("PATCH", url,
|
|
323
|
+
headers=headers,
|
|
324
|
+
query_params=query_params,
|
|
325
|
+
post_params=post_params,
|
|
326
|
+
_preload_content=_preload_content,
|
|
327
|
+
_request_timeout=_request_timeout,
|
|
328
|
+
body=body)
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: affinidi_tdk_wallets_client
|
|
3
|
+
Version: 1.19.0
|
|
4
|
+
Summary: CloudWalletEssentials
|
|
5
|
+
Home-page: https://github.com/GIT_USER_ID/GIT_REPO_ID
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Keywords: OpenAPI,OpenAPI-Generator,CloudWalletEssentials
|
|
8
|
+
Author: Affinidi
|
|
9
|
+
Author-email: info@affinidi.com
|
|
10
|
+
Requires-Python: >=3.7,<4.0
|
|
11
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
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/GIT_USER_ID/GIT_REPO_ID
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
|
|
26
|
+
# affinidi_tdk_wallets_client
|
|
27
|
+
|
|
28
|
+
Cloud Wallet For Enterprise Structure
|
|
29
|
+
|
|
30
|
+
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
31
|
+
|
|
32
|
+
- API version: 1.0.0
|
|
33
|
+
- Package version: 1.0.0
|
|
34
|
+
- Build package: org.openapitools.codegen.languages.PythonPydanticV1ClientCodegen
|
|
35
|
+
For more information, please visit [https://github.com/affinidi/affinidi-tdk](https://github.com/affinidi/affinidi-tdk)
|
|
36
|
+
|
|
37
|
+
## Requirements.
|
|
38
|
+
|
|
39
|
+
Python 3.7+
|
|
40
|
+
|
|
41
|
+
## Installation & Usage
|
|
42
|
+
|
|
43
|
+
### pip install
|
|
44
|
+
|
|
45
|
+
If the python package is hosted on a repository, you can install directly using:
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)
|
|
52
|
+
|
|
53
|
+
Then import the package:
|
|
54
|
+
|
|
55
|
+
```python
|
|
56
|
+
import affinidi_tdk_wallets_client
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Setuptools
|
|
60
|
+
|
|
61
|
+
Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
python setup.py install --user
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
(or `sudo python setup.py install` to install the package for all users)
|
|
68
|
+
|
|
69
|
+
Then import the package:
|
|
70
|
+
|
|
71
|
+
```python
|
|
72
|
+
import affinidi_tdk_wallets_client
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Tests
|
|
76
|
+
|
|
77
|
+
Execute `pytest` to run the tests.
|
|
78
|
+
|
|
79
|
+
## Getting Started
|
|
80
|
+
|
|
81
|
+
Please follow the [installation procedure](#installation--usage) and then run the following:
|
|
82
|
+
|
|
83
|
+
```python
|
|
84
|
+
|
|
85
|
+
import time
|
|
86
|
+
import affinidi_tdk_wallets_client
|
|
87
|
+
from affinidi_tdk_wallets_client.rest import ApiException
|
|
88
|
+
from pprint import pprint
|
|
89
|
+
|
|
90
|
+
# Defining the host is optional and defaults to https://apse1.api.affinidi.io/cwe
|
|
91
|
+
# See configuration.py for a list of all supported configuration parameters.
|
|
92
|
+
configuration = affinidi_tdk_wallets_client.Configuration(
|
|
93
|
+
host = "https://apse1.api.affinidi.io/cwe"
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
# The client must configure the authentication and authorization parameters
|
|
97
|
+
# in accordance with the API server security policy.
|
|
98
|
+
# Examples for each auth method are provided below, use the example that
|
|
99
|
+
# satisfies your auth use case.
|
|
100
|
+
|
|
101
|
+
# Configure API key authorization: ProjectTokenAuth
|
|
102
|
+
configuration.api_key['ProjectTokenAuth'] = os.environ["API_KEY"]
|
|
103
|
+
|
|
104
|
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
105
|
+
# configuration.api_key_prefix['ProjectTokenAuth'] = 'Bearer'
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
# Enter a context with an instance of the API client
|
|
109
|
+
with affinidi_tdk_wallets_client.ApiClient(configuration) as api_client:
|
|
110
|
+
# Create an instance of the API class
|
|
111
|
+
api_instance = affinidi_tdk_wallets_client.RevocationApi(api_client)
|
|
112
|
+
list_id = 'list_id_example' # str |
|
|
113
|
+
wallet_id = 'wallet_id_example' # str | id of the wallet
|
|
114
|
+
|
|
115
|
+
try:
|
|
116
|
+
# Return revocation list credential.
|
|
117
|
+
api_response = api_instance.get_revocation_list_credential(list_id, wallet_id)
|
|
118
|
+
print("The response of RevocationApi->get_revocation_list_credential:\n")
|
|
119
|
+
pprint(api_response)
|
|
120
|
+
except ApiException as e:
|
|
121
|
+
print("Exception when calling RevocationApi->get_revocation_list_credential: %s\n" % e)
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Documentation for API Endpoints
|
|
126
|
+
|
|
127
|
+
All URIs are relative to *https://apse1.api.affinidi.io/cwe*
|
|
128
|
+
|
|
129
|
+
| Class | Method | HTTP request | Description |
|
|
130
|
+
| --------------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------- |
|
|
131
|
+
| _RevocationApi_ | [**get_revocation_list_credential**](docs/RevocationApi.md#get_revocation_list_credential) | **GET** /v1/wallets/{walletId}/revocation-list/{listId} | Return revocation list credential. |
|
|
132
|
+
| _RevocationApi_ | [**revoke_credential**](docs/RevocationApi.md#revoke_credential) | **POST** /v1/wallets/{walletId}/revoke | Revoke Credential. |
|
|
133
|
+
| _DefaultApi_ | [**get_revocation_credential_status**](docs/DefaultApi.md#get_revocation_credential_status) | **GET** /v1/projects/{projectId}/wallets/{walletId}/revocation-statuses/{statusId} |
|
|
134
|
+
| _WalletApi_ | [**create_wallet**](docs/WalletApi.md#create_wallet) | **POST** /v1/wallets |
|
|
135
|
+
| _WalletApi_ | [**delete_wallet**](docs/WalletApi.md#delete_wallet) | **DELETE** /v1/wallets/{walletId} |
|
|
136
|
+
| _WalletApi_ | [**get_wallet**](docs/WalletApi.md#get_wallet) | **GET** /v1/wallets/{walletId} |
|
|
137
|
+
| _WalletApi_ | [**list_wallets**](docs/WalletApi.md#list_wallets) | **GET** /v1/wallets |
|
|
138
|
+
| _WalletApi_ | [**sign_credential**](docs/WalletApi.md#sign_credential) | **POST** /v1/wallets/{walletId}/sign-credential |
|
|
139
|
+
| _WalletApi_ | [**sign_jwt_token**](docs/WalletApi.md#sign_jwt_token) | **POST** /v1/wallets/{walletId}/sign-jwt |
|
|
140
|
+
| _WalletApi_ | [**update_wallet**](docs/WalletApi.md#update_wallet) | **PATCH** /v1/wallets/{walletId} |
|
|
141
|
+
|
|
142
|
+
## Documentation For Models
|
|
143
|
+
|
|
144
|
+
- [CreateWalletInput](docs/CreateWalletInput.md)
|
|
145
|
+
- [CreateWalletResponse](docs/CreateWalletResponse.md)
|
|
146
|
+
- [DidKeyInputParams](docs/DidKeyInputParams.md)
|
|
147
|
+
- [DidWebInputParams](docs/DidWebInputParams.md)
|
|
148
|
+
- [EntityNotFoundError](docs/EntityNotFoundError.md)
|
|
149
|
+
- [GetRevocationCredentialStatusOK](docs/GetRevocationCredentialStatusOK.md)
|
|
150
|
+
- [GetRevocationListCredentialResultDto](docs/GetRevocationListCredentialResultDto.md)
|
|
151
|
+
- [InvalidDidParameterError](docs/InvalidDidParameterError.md)
|
|
152
|
+
- [InvalidParameterError](docs/InvalidParameterError.md)
|
|
153
|
+
- [KeyNotFoundError](docs/KeyNotFoundError.md)
|
|
154
|
+
- [NotFoundError](docs/NotFoundError.md)
|
|
155
|
+
- [OperationForbiddenError](docs/OperationForbiddenError.md)
|
|
156
|
+
- [RevokeCredentialInput](docs/RevokeCredentialInput.md)
|
|
157
|
+
- [ServiceErrorResponse](docs/ServiceErrorResponse.md)
|
|
158
|
+
- [ServiceErrorResponseDetailsInner](docs/ServiceErrorResponseDetailsInner.md)
|
|
159
|
+
- [SignCredential400Response](docs/SignCredential400Response.md)
|
|
160
|
+
- [SignCredentialInputDto](docs/SignCredentialInputDto.md)
|
|
161
|
+
- [SignCredentialInputDtoUnsignedCredentialParams](docs/SignCredentialInputDtoUnsignedCredentialParams.md)
|
|
162
|
+
- [SignCredentialResultDto](docs/SignCredentialResultDto.md)
|
|
163
|
+
- [SignCredentialResultDtoSignedCredential](docs/SignCredentialResultDtoSignedCredential.md)
|
|
164
|
+
- [SignJwtToken](docs/SignJwtToken.md)
|
|
165
|
+
- [SignJwtTokenOK](docs/SignJwtTokenOK.md)
|
|
166
|
+
- [SigningFailedError](docs/SigningFailedError.md)
|
|
167
|
+
- [UpdateWalletInput](docs/UpdateWalletInput.md)
|
|
168
|
+
- [WalletDto](docs/WalletDto.md)
|
|
169
|
+
- [WalletDtoKeysInner](docs/WalletDtoKeysInner.md)
|
|
170
|
+
- [WalletsListDto](docs/WalletsListDto.md)
|
|
171
|
+
|
|
172
|
+
<a id="documentation-for-authorization"></a>
|
|
173
|
+
|
|
174
|
+
## Documentation For Authorization
|
|
175
|
+
|
|
176
|
+
Authentication schemes defined for the API:
|
|
177
|
+
<a id="ProjectTokenAuth"></a>
|
|
178
|
+
|
|
179
|
+
### ProjectTokenAuth
|
|
180
|
+
|
|
181
|
+
- **Type**: API key
|
|
182
|
+
- **API key parameter name**: authorization
|
|
183
|
+
- **Location**: HTTP header
|
|
184
|
+
|
|
185
|
+
## Author
|
|
186
|
+
|
|
187
|
+
info@affinidi.com
|
|
188
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
affinidi_tdk_wallets_client/__init__.py,sha256=MwA0OowQmElJhXrNaFFe7SK_aCAAVTpDV-gab-v_WsE,3777
|
|
2
|
+
affinidi_tdk_wallets_client/api/__init__.py,sha256=6lDsMuTp0a4fXfhi1Et1tuj59ejdyfVf7HC2MVy8R5k,253
|
|
3
|
+
affinidi_tdk_wallets_client/api/default_api.py,sha256=TYb3lozdRS9ghhmS8joxTavYzFmqJA1Nr-WVJQOPyf4,8645
|
|
4
|
+
affinidi_tdk_wallets_client/api/revocation_api.py,sha256=uSd4aWa9bnlxxhjaJmXkOk_OpADmlyOL6uPLAhAnQQI,15191
|
|
5
|
+
affinidi_tdk_wallets_client/api/wallet_api.py,sha256=0EpuwCuqEhi3Ju2YarpPV4inXtY-tGt2Fc35vUhitRg,47063
|
|
6
|
+
affinidi_tdk_wallets_client/api_client.py,sha256=RmoxdOk2MId1w5vImguwa-4K3GjDrv5GuVEbUT_dcP4,29560
|
|
7
|
+
affinidi_tdk_wallets_client/api_response.py,sha256=uCehWdXXDnAO2HAHGKe0SgpQ_mJiGDbcu-BHDF3n_IM,852
|
|
8
|
+
affinidi_tdk_wallets_client/configuration.py,sha256=Km3NCVF0k0O0XgHtzUGKb5KL6CvXq_ZdYUuEKm8VeD4,15323
|
|
9
|
+
affinidi_tdk_wallets_client/exceptions.py,sha256=pXghv6lC0qS5DsbX7OFLAVz2tO0JmquU24C8G5NjYvo,5401
|
|
10
|
+
affinidi_tdk_wallets_client/models/__init__.py,sha256=sOHUv0BTzp0AYSz3l7SnudGjfUMwnjizh6M8Prka7zw,2911
|
|
11
|
+
affinidi_tdk_wallets_client/models/create_wallet_input.py,sha256=ZGo8afSff8mcYoDwfBj7B4gIJ6HFC-0-ZbvZZmGYUgk,5375
|
|
12
|
+
affinidi_tdk_wallets_client/models/create_wallet_response.py,sha256=SMN2cKji6aU34k3PD76LuQX6bWp667rqJllnvVs7hpg,2218
|
|
13
|
+
affinidi_tdk_wallets_client/models/did_key_input_params.py,sha256=idC_vOJ38_CpvaRx64RhIWVYLXwf4NyrZhvfm_m0IYg,2554
|
|
14
|
+
affinidi_tdk_wallets_client/models/did_web_input_params.py,sha256=h60kwtDqBSMj8BfTLJcKm0nqZF0amYGK6BZUOpIGucY,3120
|
|
15
|
+
affinidi_tdk_wallets_client/models/entity_not_found_error.py,sha256=YUJFO1Vln_CM7PdXgkz1dKktE9rpVCCASZtofDaDSlE,3736
|
|
16
|
+
affinidi_tdk_wallets_client/models/get_revocation_credential_status_ok.py,sha256=MCIt2TY0HfnY23cquWt6wtdfHQFLfDfNhdnV8gRatG8,2150
|
|
17
|
+
affinidi_tdk_wallets_client/models/get_revocation_list_credential_result_dto.py,sha256=CFQi6bZ5H4I_gbMgO4GHSfVJeDWNfYxEJMzPfTbjPx4,2185
|
|
18
|
+
affinidi_tdk_wallets_client/models/invalid_did_parameter_error.py,sha256=L9lf-SXUv_iLT2K15o5aGKmRkI3EpSbBDdxsRQ4uSa4,3896
|
|
19
|
+
affinidi_tdk_wallets_client/models/invalid_parameter_error.py,sha256=2J41QpMalxwKTFW6bTuXXj3tgMlVSfwy4T_-53QPWB8,3780
|
|
20
|
+
affinidi_tdk_wallets_client/models/key_not_found_error.py,sha256=xqjtWrwZkbxptvqsa5Ep9vg6N1FKP_TRh0uQD1tHjcA,3700
|
|
21
|
+
affinidi_tdk_wallets_client/models/not_found_error.py,sha256=jOmXOXPd66Ky5L_e2QRRR6N1zplde1KI5I_-vgU_Nak,3684
|
|
22
|
+
affinidi_tdk_wallets_client/models/operation_forbidden_error.py,sha256=7_1YFznYYGUa-Bw0YbdxQdYmUyW9xrnZtxFf3Yvxj9w,3804
|
|
23
|
+
affinidi_tdk_wallets_client/models/revoke_credential_input.py,sha256=iOqhrKWtxdrV6cntNOeQwv0VIH3Sfd4A9B3TJxZGWQ8,2413
|
|
24
|
+
affinidi_tdk_wallets_client/models/service_error_response.py,sha256=YQJfh88Odooc0y9NSoBTF8Om3rnM6kTUaiWmw0A0jaw,2944
|
|
25
|
+
affinidi_tdk_wallets_client/models/service_error_response_details_inner.py,sha256=EZ7ezscyLboaPScn9Kh_PcyV_bpaULjeReWW3CTUO3o,2297
|
|
26
|
+
affinidi_tdk_wallets_client/models/sign_credential400_response.py,sha256=QeY42tWjpO4vaqytmZj0lGcjh4-AHwMbhE_9Ffv7Dtw,5544
|
|
27
|
+
affinidi_tdk_wallets_client/models/sign_credential_input_dto.py,sha256=fAf-egQg0PTUqX97nGBlMBQFOfyLJp1G8iTYE1VQ1Rs,3557
|
|
28
|
+
affinidi_tdk_wallets_client/models/sign_credential_input_dto_unsigned_credential_params.py,sha256=WEklAVYeNFODGDOPi-f6r20Gdlbl7pRxxBPyaN-1Jg4,3300
|
|
29
|
+
affinidi_tdk_wallets_client/models/sign_credential_result_dto.py,sha256=ujCYIDynMijcCe59wycfp1EXoPQlJ-9GdjoX7o-MiUY,2480
|
|
30
|
+
affinidi_tdk_wallets_client/models/sign_credential_result_dto_signed_credential.py,sha256=Ken1xjnWtQ5YmrnS2Xnk_u-6SW1sGO_Dh6zXkrTRkA8,5505
|
|
31
|
+
affinidi_tdk_wallets_client/models/sign_jwt_token.py,sha256=-fJTVZh7IzMYvzTsgtCxtFDceewRdRA1ci2TBPuDWa0,2001
|
|
32
|
+
affinidi_tdk_wallets_client/models/sign_jwt_token_ok.py,sha256=yIzW2TZbwal1DHFUb8Zwl9UzpuO_weH9AhupELd1OQw,1931
|
|
33
|
+
affinidi_tdk_wallets_client/models/signing_failed_error.py,sha256=RQ376OMWs87BSmW7b3b-rbwdbMM4jFpIQ4LubG5g9_E,3724
|
|
34
|
+
affinidi_tdk_wallets_client/models/update_wallet_input.py,sha256=oTiBvmDeZWOgreVuOx6nz0GD3qsec5gaV1nHeOs3-Rs,2137
|
|
35
|
+
affinidi_tdk_wallets_client/models/wallet_dto.py,sha256=xKnrEuJBHqoIqK4pFNB1fxNAZaZtn-qyi0lGL46-GT4,3482
|
|
36
|
+
affinidi_tdk_wallets_client/models/wallet_dto_keys_inner.py,sha256=vg68rsJ7W1i9uqaEwRENfv_dp9CLKhnbrXIt8Bts-l0,2064
|
|
37
|
+
affinidi_tdk_wallets_client/models/wallets_list_dto.py,sha256=nbKc-X-dxFSf7j1Cly7crfd7_6Hh2U0Spg8GPFp_OlQ,2375
|
|
38
|
+
affinidi_tdk_wallets_client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
39
|
+
affinidi_tdk_wallets_client/rest.py,sha256=biaEu2reB7AuTusyvnHoTFpfBXrbmUajTXTPPvtGlE8,13865
|
|
40
|
+
affinidi_tdk_wallets_client-1.19.0.dist-info/METADATA,sha256=M0ygkebOiPzBdRMbhvvu96Q6kmu2BI3SfwtDNzR7jKI,8450
|
|
41
|
+
affinidi_tdk_wallets_client-1.19.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
42
|
+
affinidi_tdk_wallets_client-1.19.0.dist-info/RECORD,,
|