moipayway 0.1.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.
- moipayway-0.1.0/LICENSE +21 -0
- moipayway-0.1.0/PKG-INFO +63 -0
- moipayway-0.1.0/README.md +48 -0
- moipayway-0.1.0/pyproject.toml +23 -0
- moipayway-0.1.0/setup.cfg +4 -0
- moipayway-0.1.0/src/moipayway/__init__.py +3 -0
- moipayway-0.1.0/src/moipayway/client.py +1050 -0
- moipayway-0.1.0/src/moipayway.egg-info/PKG-INFO +63 -0
- moipayway-0.1.0/src/moipayway.egg-info/SOURCES.txt +9 -0
- moipayway-0.1.0/src/moipayway.egg-info/dependency_links.txt +1 -0
- moipayway-0.1.0/src/moipayway.egg-info/top_level.txt +1 -0
moipayway-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 MoiPayWay
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
moipayway-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: moipayway
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Official Python SDK for the MoiPayWay API.
|
|
5
|
+
Author: MoiPayWay
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/mpwsocial/python
|
|
8
|
+
Keywords: moipayway,payments,wallets,africa
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Requires-Python: >=3.9
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Dynamic: license-file
|
|
15
|
+
|
|
16
|
+
# MoiPayWay Python SDK
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pip install moipayway
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
```python
|
|
23
|
+
import os
|
|
24
|
+
from moipayway import Client
|
|
25
|
+
|
|
26
|
+
mpw = Client(os.environ["MOIPAYWAY_API_KEY"], environment="test")
|
|
27
|
+
|
|
28
|
+
wallet = mpw.wallet.create({
|
|
29
|
+
"code": "NGN",
|
|
30
|
+
"meta": {"name": "Operations", "user_id": "user-uuid"},
|
|
31
|
+
})
|
|
32
|
+
order = mpw.wallet.collection.initiate({
|
|
33
|
+
"order_reference_code": "ORD-1001",
|
|
34
|
+
"meta": {
|
|
35
|
+
"amount": "5000",
|
|
36
|
+
"narration": "Invoice 1001",
|
|
37
|
+
"wallet_id": "wallet-uuid",
|
|
38
|
+
"user_id": "user-uuid",
|
|
39
|
+
},
|
|
40
|
+
})
|
|
41
|
+
individual = mpw.user.account.individual.create({
|
|
42
|
+
# request body
|
|
43
|
+
})
|
|
44
|
+
job_types = mpw.user.misc.job_types()
|
|
45
|
+
lookup = mpw.verification.lookup({"code": "cac"})
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Collection paths are methods on the client:
|
|
49
|
+
|
|
50
|
+
- `POST wallet/create` → `mpw.wallet.create(body)`
|
|
51
|
+
- `POST wallet/collection/initiate` → `mpw.wallet.collection.initiate(body)`
|
|
52
|
+
- `POST user/account/individual/create` → `mpw.user.account.individual.create(body)`
|
|
53
|
+
- `GET user/misc/job-types` → `mpw.user.misc.job_types()`
|
|
54
|
+
- `POST verification/lookup` → `mpw.verification.lookup(body)`
|
|
55
|
+
- `POST omnichain/wallet/evm/eoa/create-wallet` → `mpw.omnichain.wallet.evm.eoa.create_wallet(body)`
|
|
56
|
+
|
|
57
|
+
`test` uses `https://dev.moipayway.co`. `live` uses `https://api.moipayway.co`.
|
|
58
|
+
|
|
59
|
+
```python
|
|
60
|
+
from moipayway import verify_webhook
|
|
61
|
+
|
|
62
|
+
ok = verify_webhook(raw_body, signature_header, timestamp_header, os.environ["MOIPAYWAY_API_KEY"])
|
|
63
|
+
```
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# MoiPayWay Python SDK
|
|
2
|
+
|
|
3
|
+
```bash
|
|
4
|
+
pip install moipayway
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
```python
|
|
8
|
+
import os
|
|
9
|
+
from moipayway import Client
|
|
10
|
+
|
|
11
|
+
mpw = Client(os.environ["MOIPAYWAY_API_KEY"], environment="test")
|
|
12
|
+
|
|
13
|
+
wallet = mpw.wallet.create({
|
|
14
|
+
"code": "NGN",
|
|
15
|
+
"meta": {"name": "Operations", "user_id": "user-uuid"},
|
|
16
|
+
})
|
|
17
|
+
order = mpw.wallet.collection.initiate({
|
|
18
|
+
"order_reference_code": "ORD-1001",
|
|
19
|
+
"meta": {
|
|
20
|
+
"amount": "5000",
|
|
21
|
+
"narration": "Invoice 1001",
|
|
22
|
+
"wallet_id": "wallet-uuid",
|
|
23
|
+
"user_id": "user-uuid",
|
|
24
|
+
},
|
|
25
|
+
})
|
|
26
|
+
individual = mpw.user.account.individual.create({
|
|
27
|
+
# request body
|
|
28
|
+
})
|
|
29
|
+
job_types = mpw.user.misc.job_types()
|
|
30
|
+
lookup = mpw.verification.lookup({"code": "cac"})
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Collection paths are methods on the client:
|
|
34
|
+
|
|
35
|
+
- `POST wallet/create` → `mpw.wallet.create(body)`
|
|
36
|
+
- `POST wallet/collection/initiate` → `mpw.wallet.collection.initiate(body)`
|
|
37
|
+
- `POST user/account/individual/create` → `mpw.user.account.individual.create(body)`
|
|
38
|
+
- `GET user/misc/job-types` → `mpw.user.misc.job_types()`
|
|
39
|
+
- `POST verification/lookup` → `mpw.verification.lookup(body)`
|
|
40
|
+
- `POST omnichain/wallet/evm/eoa/create-wallet` → `mpw.omnichain.wallet.evm.eoa.create_wallet(body)`
|
|
41
|
+
|
|
42
|
+
`test` uses `https://dev.moipayway.co`. `live` uses `https://api.moipayway.co`.
|
|
43
|
+
|
|
44
|
+
```python
|
|
45
|
+
from moipayway import verify_webhook
|
|
46
|
+
|
|
47
|
+
ok = verify_webhook(raw_body, signature_header, timestamp_header, os.environ["MOIPAYWAY_API_KEY"])
|
|
48
|
+
```
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "moipayway"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Official Python SDK for the MoiPayWay API."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
license = { text = "MIT" }
|
|
12
|
+
authors = [{ name = "MoiPayWay" }]
|
|
13
|
+
keywords = ["moipayway", "payments", "wallets", "africa"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Programming Language :: Python :: 3",
|
|
16
|
+
"License :: OSI Approved :: MIT License",
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
[project.urls]
|
|
20
|
+
Homepage = "https://github.com/mpwsocial/python"
|
|
21
|
+
|
|
22
|
+
[tool.setuptools.packages.find]
|
|
23
|
+
where = ["src"]
|
|
@@ -0,0 +1,1050 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import hashlib
|
|
4
|
+
import hmac
|
|
5
|
+
import json
|
|
6
|
+
import time
|
|
7
|
+
import urllib.error
|
|
8
|
+
import urllib.request
|
|
9
|
+
from typing import Any
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
BASES = {
|
|
13
|
+
"test": "https://dev.moipayway.co",
|
|
14
|
+
"live": "https://api.moipayway.co",
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class ApiError(RuntimeError):
|
|
19
|
+
def __init__(self, message: str, http_status: int = 0, payload: dict | None = None):
|
|
20
|
+
super().__init__(message)
|
|
21
|
+
self.http_status = http_status
|
|
22
|
+
self.payload = payload or {}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def verify_webhook(
|
|
26
|
+
raw_body: str | bytes,
|
|
27
|
+
signature_header: str,
|
|
28
|
+
timestamp_header: str,
|
|
29
|
+
api_key: str,
|
|
30
|
+
tolerance_seconds: int = 300,
|
|
31
|
+
) -> bool:
|
|
32
|
+
if not raw_body or not signature_header or not timestamp_header or not api_key:
|
|
33
|
+
return False
|
|
34
|
+
if not str(timestamp_header).isdigit():
|
|
35
|
+
return False
|
|
36
|
+
age = abs(int(time.time()) - int(timestamp_header))
|
|
37
|
+
if tolerance_seconds > 0 and age > tolerance_seconds:
|
|
38
|
+
return False
|
|
39
|
+
provided = signature_header
|
|
40
|
+
if provided.lower().startswith("sha256="):
|
|
41
|
+
provided = provided[7:]
|
|
42
|
+
body = raw_body if isinstance(raw_body, (bytes, bytearray)) else str(raw_body).encode("utf-8")
|
|
43
|
+
signed = timestamp_header.encode("utf-8") + b"." + body
|
|
44
|
+
expected = hmac.new(api_key.encode("utf-8"), signed, hashlib.sha256).hexdigest()
|
|
45
|
+
return hmac.compare_digest(expected, provided)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
class Client:
|
|
49
|
+
def __init__(self, api_key: str = "", environment: str = "test", timeout: int = 30):
|
|
50
|
+
env = (environment or "test").lower()
|
|
51
|
+
if env not in BASES:
|
|
52
|
+
raise ValueError("environment must be test or live")
|
|
53
|
+
self.api_key = str(api_key).strip()
|
|
54
|
+
self.environment = env
|
|
55
|
+
self.timeout = timeout
|
|
56
|
+
self.account = Account(self)
|
|
57
|
+
self.authentication = Authentication(self)
|
|
58
|
+
self.card = Card(self)
|
|
59
|
+
self.misc = Misc(self)
|
|
60
|
+
self.omnichain = Omnichain(self)
|
|
61
|
+
self.simulation = Simulation(self)
|
|
62
|
+
self.user = User(self)
|
|
63
|
+
self.verification = Verification(self)
|
|
64
|
+
self.wallet = Wallet(self)
|
|
65
|
+
|
|
66
|
+
@property
|
|
67
|
+
def base_url(self) -> str:
|
|
68
|
+
return BASES[self.environment]
|
|
69
|
+
|
|
70
|
+
def request(self, method: str, path: str, body: dict | None = None, auth: bool = True) -> dict[str, Any]:
|
|
71
|
+
url = self.base_url.rstrip("/") + "/" + path.lstrip("/")
|
|
72
|
+
data = None
|
|
73
|
+
headers = {"Accept": "application/json", "Content-Type": "application/json"}
|
|
74
|
+
if auth:
|
|
75
|
+
if not self.api_key:
|
|
76
|
+
raise ValueError("api_key is required")
|
|
77
|
+
headers["Authorization"] = f"Bearer {self.api_key}"
|
|
78
|
+
if method.upper() not in ("GET", "HEAD"):
|
|
79
|
+
data = json.dumps(body or {}, separators=(",", ":")).encode("utf-8")
|
|
80
|
+
req = urllib.request.Request(url, data=data, headers=headers, method=method.upper())
|
|
81
|
+
try:
|
|
82
|
+
with urllib.request.urlopen(req, timeout=self.timeout) as res:
|
|
83
|
+
raw = res.read().decode("utf-8")
|
|
84
|
+
http_status = res.status
|
|
85
|
+
except urllib.error.HTTPError as exc:
|
|
86
|
+
raw = exc.read().decode("utf-8", errors="replace")
|
|
87
|
+
http_status = exc.code
|
|
88
|
+
except urllib.error.URLError as exc:
|
|
89
|
+
raise ApiError("Unable to reach MoiPayWay") from exc
|
|
90
|
+
|
|
91
|
+
try:
|
|
92
|
+
decoded = json.loads(raw) if raw else {}
|
|
93
|
+
except json.JSONDecodeError as exc:
|
|
94
|
+
raise ApiError("Invalid JSON response", http_status) from exc
|
|
95
|
+
|
|
96
|
+
status = str(decoded.get("status") or "").lower()
|
|
97
|
+
if status in ("failed", "error"):
|
|
98
|
+
raise ApiError(str(decoded.get("message") or "Request failed"), http_status, decoded)
|
|
99
|
+
return decoded
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
class Account:
|
|
103
|
+
def __init__(self, client: "Client"):
|
|
104
|
+
self._client = client
|
|
105
|
+
self.merchant = AccountMerchant(client)
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
class AccountMerchant:
|
|
109
|
+
def __init__(self, client: "Client"):
|
|
110
|
+
self._client = client
|
|
111
|
+
self.product = AccountMerchantProduct(client)
|
|
112
|
+
self.team = AccountMerchantTeam(client)
|
|
113
|
+
|
|
114
|
+
def resend_webhook(self, body: dict | None = None) -> dict[str, Any]:
|
|
115
|
+
return self._client.request('POST', 'account/merchant/resend-webhook', body or {}, True)
|
|
116
|
+
|
|
117
|
+
def update_notification(self, body: dict | None = None) -> dict[str, Any]:
|
|
118
|
+
return self._client.request('POST', 'account/merchant/update-notification', body or {}, True)
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
class AccountMerchantProduct:
|
|
122
|
+
def __init__(self, client: "Client"):
|
|
123
|
+
self._client = client
|
|
124
|
+
self.subscription = AccountMerchantProductSubscription(client)
|
|
125
|
+
|
|
126
|
+
def update(self, body: dict | None = None) -> dict[str, Any]:
|
|
127
|
+
return self._client.request('POST', 'account/merchant/product/update', body or {}, True)
|
|
128
|
+
|
|
129
|
+
def view(self, body: dict | None = None) -> dict[str, Any]:
|
|
130
|
+
return self._client.request('POST', 'account/merchant/product/view', body or {}, True)
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
class AccountMerchantProductSubscription:
|
|
134
|
+
def __init__(self, client: "Client"):
|
|
135
|
+
self._client = client
|
|
136
|
+
|
|
137
|
+
def class_(self, body: dict | None = None) -> dict[str, Any]:
|
|
138
|
+
return self._client.request('POST', 'account/merchant/product/subscription/class', body or {}, True)
|
|
139
|
+
|
|
140
|
+
def class_product_type(self, body: dict | None = None) -> dict[str, Any]:
|
|
141
|
+
return self._client.request('POST', 'account/merchant/product/subscription/class-product-type', body or {}, True)
|
|
142
|
+
|
|
143
|
+
def finalise(self, body: dict | None = None) -> dict[str, Any]:
|
|
144
|
+
return self._client.request('POST', 'account/merchant/product/subscription/finalise', body or {}, True)
|
|
145
|
+
|
|
146
|
+
def history(self, body: dict | None = None) -> dict[str, Any]:
|
|
147
|
+
return self._client.request('POST', 'account/merchant/product/subscription/history', body or {}, True)
|
|
148
|
+
|
|
149
|
+
def initiate(self, body: dict | None = None) -> dict[str, Any]:
|
|
150
|
+
return self._client.request('POST', 'account/merchant/product/subscription/initiate', body or {}, True)
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
class AccountMerchantTeam:
|
|
154
|
+
def __init__(self, client: "Client"):
|
|
155
|
+
self._client = client
|
|
156
|
+
self.permission = AccountMerchantTeamPermission(client)
|
|
157
|
+
|
|
158
|
+
def add(self, body: dict | None = None) -> dict[str, Any]:
|
|
159
|
+
return self._client.request('POST', 'account/merchant/team/add', body or {}, True)
|
|
160
|
+
|
|
161
|
+
def logs(self, body: dict | None = None) -> dict[str, Any]:
|
|
162
|
+
return self._client.request('POST', 'account/merchant/team/logs', body or {}, True)
|
|
163
|
+
|
|
164
|
+
def remove(self, body: dict | None = None) -> dict[str, Any]:
|
|
165
|
+
return self._client.request('POST', 'account/merchant/team/remove', body or {}, True)
|
|
166
|
+
|
|
167
|
+
def update(self, body: dict | None = None) -> dict[str, Any]:
|
|
168
|
+
return self._client.request('POST', 'account/merchant/team/update', body or {}, True)
|
|
169
|
+
|
|
170
|
+
def view(self, body: dict | None = None) -> dict[str, Any]:
|
|
171
|
+
return self._client.request('POST', 'account/merchant/team/view', body or {}, True)
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
class AccountMerchantTeamPermission:
|
|
175
|
+
def __init__(self, client: "Client"):
|
|
176
|
+
self._client = client
|
|
177
|
+
|
|
178
|
+
def add(self, body: dict | None = None) -> dict[str, Any]:
|
|
179
|
+
return self._client.request('POST', 'account/merchant/team/permission/add', body or {}, True)
|
|
180
|
+
|
|
181
|
+
def remove(self, body: dict | None = None) -> dict[str, Any]:
|
|
182
|
+
return self._client.request('POST', 'account/merchant/team/permission/remove', body or {}, True)
|
|
183
|
+
|
|
184
|
+
def update(self, body: dict | None = None) -> dict[str, Any]:
|
|
185
|
+
return self._client.request('POST', 'account/merchant/team/permission/update', body or {}, True)
|
|
186
|
+
|
|
187
|
+
def view(self, body: dict | None = None) -> dict[str, Any]:
|
|
188
|
+
return self._client.request('POST', 'account/merchant/team/permission/view', body or {}, True)
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
class Authentication:
|
|
192
|
+
def __init__(self, client: "Client"):
|
|
193
|
+
self._client = client
|
|
194
|
+
|
|
195
|
+
def connect(self, body: dict | None = None) -> dict[str, Any]:
|
|
196
|
+
return self._client.request('POST', 'authentication/connect', body or {}, True)
|
|
197
|
+
|
|
198
|
+
def initiate(self, body: dict | None = None) -> dict[str, Any]:
|
|
199
|
+
return self._client.request('POST', 'authentication/initiate', body or {}, False)
|
|
200
|
+
|
|
201
|
+
def sign_out(self, body: dict | None = None) -> dict[str, Any]:
|
|
202
|
+
return self._client.request('POST', 'authentication/sign-out', body or {}, True)
|
|
203
|
+
|
|
204
|
+
def validate(self, body: dict | None = None) -> dict[str, Any]:
|
|
205
|
+
return self._client.request('POST', 'authentication/validate', body or {}, True)
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
class Card:
|
|
209
|
+
def __init__(self, client: "Client"):
|
|
210
|
+
self._client = client
|
|
211
|
+
|
|
212
|
+
def close(self, body: dict | None = None) -> dict[str, Any]:
|
|
213
|
+
return self._client.request('POST', 'card/close', body or {}, True)
|
|
214
|
+
|
|
215
|
+
def create(self, body: dict | None = None) -> dict[str, Any]:
|
|
216
|
+
return self._client.request('POST', 'card/create', body or {}, True)
|
|
217
|
+
|
|
218
|
+
def details(self, body: dict | None = None) -> dict[str, Any]:
|
|
219
|
+
return self._client.request('POST', 'card/details', body or {}, True)
|
|
220
|
+
|
|
221
|
+
def freeze(self, body: dict | None = None) -> dict[str, Any]:
|
|
222
|
+
return self._client.request('POST', 'card/freeze', body or {}, True)
|
|
223
|
+
|
|
224
|
+
def fund(self, body: dict | None = None) -> dict[str, Any]:
|
|
225
|
+
return self._client.request('POST', 'card/fund', body or {}, True)
|
|
226
|
+
|
|
227
|
+
def resubscribe(self, body: dict | None = None) -> dict[str, Any]:
|
|
228
|
+
return self._client.request('POST', 'card/resubscribe', body or {}, True)
|
|
229
|
+
|
|
230
|
+
def supported(self, body: dict | None = None) -> dict[str, Any]:
|
|
231
|
+
return self._client.request('POST', 'card/supported', body or {}, True)
|
|
232
|
+
|
|
233
|
+
def unfreeze(self, body: dict | None = None) -> dict[str, Any]:
|
|
234
|
+
return self._client.request('POST', 'card/unfreeze', body or {}, True)
|
|
235
|
+
|
|
236
|
+
def update_security_settings(self, body: dict | None = None) -> dict[str, Any]:
|
|
237
|
+
return self._client.request('POST', 'card/update-security-settings', body or {}, True)
|
|
238
|
+
|
|
239
|
+
def withdraw(self, body: dict | None = None) -> dict[str, Any]:
|
|
240
|
+
return self._client.request('POST', 'card/withdraw', body or {}, True)
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
class Misc:
|
|
244
|
+
def __init__(self, client: "Client"):
|
|
245
|
+
self._client = client
|
|
246
|
+
|
|
247
|
+
def actions(self, body: dict | None = None) -> dict[str, Any]:
|
|
248
|
+
return self._client.request('POST', 'actions', body or {}, True)
|
|
249
|
+
|
|
250
|
+
def codes(self, body: dict | None = None) -> dict[str, Any]:
|
|
251
|
+
return self._client.request('POST', 'codes', body or {}, True)
|
|
252
|
+
|
|
253
|
+
def countries(self, body: dict | None = None) -> dict[str, Any]:
|
|
254
|
+
return self._client.request('POST', 'countries', body or {}, True)
|
|
255
|
+
|
|
256
|
+
def file_upload(self, body: dict | None = None) -> dict[str, Any]:
|
|
257
|
+
return self._client.request('POST', 'file-upload', body or {}, True)
|
|
258
|
+
|
|
259
|
+
def payment_purpose(self, body: dict | None = None) -> dict[str, Any]:
|
|
260
|
+
return self._client.request('POST', 'payment-purpose', body or {}, True)
|
|
261
|
+
|
|
262
|
+
def products(self, body: dict | None = None) -> dict[str, Any]:
|
|
263
|
+
return self._client.request('POST', 'products', body or {}, True)
|
|
264
|
+
|
|
265
|
+
def state_province_region(self, body: dict | None = None) -> dict[str, Any]:
|
|
266
|
+
return self._client.request('POST', 'state-province-region', body or {}, True)
|
|
267
|
+
|
|
268
|
+
def supported_currencies(self, body: dict | None = None) -> dict[str, Any]:
|
|
269
|
+
return self._client.request('POST', 'supported-currencies', body or {}, True)
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
class Omnichain:
|
|
273
|
+
def __init__(self, client: "Client"):
|
|
274
|
+
self._client = client
|
|
275
|
+
self.storage = OmnichainStorage(client)
|
|
276
|
+
self.tokenization = OmnichainTokenization(client)
|
|
277
|
+
self.wallet = OmnichainWallet(client)
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
class OmnichainStorage:
|
|
281
|
+
def __init__(self, client: "Client"):
|
|
282
|
+
self._client = client
|
|
283
|
+
|
|
284
|
+
def details(self, body: dict | None = None) -> dict[str, Any]:
|
|
285
|
+
return self._client.request('POST', 'omnichain/storage/details', body or {}, True)
|
|
286
|
+
|
|
287
|
+
def upload(self, body: dict | None = None) -> dict[str, Any]:
|
|
288
|
+
return self._client.request('POST', 'omnichain/storage/upload', body or {}, True)
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
class OmnichainTokenization:
|
|
292
|
+
def __init__(self, client: "Client"):
|
|
293
|
+
self._client = client
|
|
294
|
+
self.erc1155 = OmnichainTokenizationErc1155(client)
|
|
295
|
+
self.erc20 = OmnichainTokenizationErc20(client)
|
|
296
|
+
self.erc721 = OmnichainTokenizationErc721(client)
|
|
297
|
+
self.sep41 = OmnichainTokenizationSep41(client)
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
class OmnichainTokenizationErc1155:
|
|
301
|
+
def __init__(self, client: "Client"):
|
|
302
|
+
self._client = client
|
|
303
|
+
|
|
304
|
+
def balance(self, body: dict | None = None) -> dict[str, Any]:
|
|
305
|
+
return self._client.request('POST', 'omnichain/tokenization/erc1155/balance', body or {}, True)
|
|
306
|
+
|
|
307
|
+
def burn(self, body: dict | None = None) -> dict[str, Any]:
|
|
308
|
+
return self._client.request('POST', 'omnichain/tokenization/erc1155/burn', body or {}, True)
|
|
309
|
+
|
|
310
|
+
def deploy(self, body: dict | None = None) -> dict[str, Any]:
|
|
311
|
+
return self._client.request('POST', 'omnichain/tokenization/erc1155/deploy', body or {}, True)
|
|
312
|
+
|
|
313
|
+
def mint(self, body: dict | None = None) -> dict[str, Any]:
|
|
314
|
+
return self._client.request('POST', 'omnichain/tokenization/erc1155/mint', body or {}, True)
|
|
315
|
+
|
|
316
|
+
def transactions(self, body: dict | None = None) -> dict[str, Any]:
|
|
317
|
+
return self._client.request('POST', 'omnichain/tokenization/erc1155/transactions', body or {}, True)
|
|
318
|
+
|
|
319
|
+
def transfer(self, body: dict | None = None) -> dict[str, Any]:
|
|
320
|
+
return self._client.request('POST', 'omnichain/tokenization/erc1155/transfer', body or {}, True)
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
class OmnichainTokenizationErc20:
|
|
324
|
+
def __init__(self, client: "Client"):
|
|
325
|
+
self._client = client
|
|
326
|
+
|
|
327
|
+
def balance(self, body: dict | None = None) -> dict[str, Any]:
|
|
328
|
+
return self._client.request('POST', 'omnichain/tokenization/erc20/balance', body or {}, True)
|
|
329
|
+
|
|
330
|
+
def burn(self, body: dict | None = None) -> dict[str, Any]:
|
|
331
|
+
return self._client.request('POST', 'omnichain/tokenization/erc20/burn', body or {}, True)
|
|
332
|
+
|
|
333
|
+
def chains(self, body: dict | None = None) -> dict[str, Any]:
|
|
334
|
+
return self._client.request('GET', 'omnichain/tokenization/erc20/chains', body or {}, True)
|
|
335
|
+
|
|
336
|
+
def deploy(self, body: dict | None = None) -> dict[str, Any]:
|
|
337
|
+
return self._client.request('POST', 'omnichain/tokenization/erc20/deploy', body or {}, True)
|
|
338
|
+
|
|
339
|
+
def mint(self, body: dict | None = None) -> dict[str, Any]:
|
|
340
|
+
return self._client.request('POST', 'omnichain/tokenization/erc20/mint', body or {}, True)
|
|
341
|
+
|
|
342
|
+
def transactions(self, body: dict | None = None) -> dict[str, Any]:
|
|
343
|
+
return self._client.request('POST', 'omnichain/tokenization/erc20/transactions', body or {}, True)
|
|
344
|
+
|
|
345
|
+
def transfer(self, body: dict | None = None) -> dict[str, Any]:
|
|
346
|
+
return self._client.request('POST', 'omnichain/tokenization/erc20/transfer', body or {}, True)
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
class OmnichainTokenizationErc721:
|
|
350
|
+
def __init__(self, client: "Client"):
|
|
351
|
+
self._client = client
|
|
352
|
+
|
|
353
|
+
def balance(self, body: dict | None = None) -> dict[str, Any]:
|
|
354
|
+
return self._client.request('POST', 'omnichain/tokenization/erc721/balance', body or {}, True)
|
|
355
|
+
|
|
356
|
+
def burn(self, body: dict | None = None) -> dict[str, Any]:
|
|
357
|
+
return self._client.request('POST', 'omnichain/tokenization/erc721/burn', body or {}, True)
|
|
358
|
+
|
|
359
|
+
def deploy(self, body: dict | None = None) -> dict[str, Any]:
|
|
360
|
+
return self._client.request('POST', 'omnichain/tokenization/erc721/deploy', body or {}, True)
|
|
361
|
+
|
|
362
|
+
def mint(self, body: dict | None = None) -> dict[str, Any]:
|
|
363
|
+
return self._client.request('POST', 'omnichain/tokenization/erc721/mint', body or {}, True)
|
|
364
|
+
|
|
365
|
+
def transactions(self, body: dict | None = None) -> dict[str, Any]:
|
|
366
|
+
return self._client.request('POST', 'omnichain/tokenization/erc721/transactions', body or {}, True)
|
|
367
|
+
|
|
368
|
+
def transfer(self, body: dict | None = None) -> dict[str, Any]:
|
|
369
|
+
return self._client.request('POST', 'omnichain/tokenization/erc721/transfer', body or {}, True)
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
class OmnichainTokenizationSep41:
|
|
373
|
+
def __init__(self, client: "Client"):
|
|
374
|
+
self._client = client
|
|
375
|
+
|
|
376
|
+
def balance(self, body: dict | None = None) -> dict[str, Any]:
|
|
377
|
+
return self._client.request('POST', 'omnichain/tokenization/sep41/balance', body or {}, True)
|
|
378
|
+
|
|
379
|
+
def burn(self, body: dict | None = None) -> dict[str, Any]:
|
|
380
|
+
return self._client.request('POST', 'omnichain/tokenization/sep41/burn', body or {}, True)
|
|
381
|
+
|
|
382
|
+
def deploy(self, body: dict | None = None) -> dict[str, Any]:
|
|
383
|
+
return self._client.request('POST', 'omnichain/tokenization/sep41/deploy', body or {}, True)
|
|
384
|
+
|
|
385
|
+
def mint(self, body: dict | None = None) -> dict[str, Any]:
|
|
386
|
+
return self._client.request('POST', 'omnichain/tokenization/sep41/mint', body or {}, True)
|
|
387
|
+
|
|
388
|
+
def transactions(self, body: dict | None = None) -> dict[str, Any]:
|
|
389
|
+
return self._client.request('POST', 'omnichain/tokenization/sep41/transactions', body or {}, True)
|
|
390
|
+
|
|
391
|
+
def transfer(self, body: dict | None = None) -> dict[str, Any]:
|
|
392
|
+
return self._client.request('POST', 'omnichain/tokenization/sep41/transfer', body or {}, True)
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
class OmnichainWallet:
|
|
396
|
+
def __init__(self, client: "Client"):
|
|
397
|
+
self._client = client
|
|
398
|
+
self.evm = OmnichainWalletEvm(client)
|
|
399
|
+
self.stellar = OmnichainWalletStellar(client)
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
class OmnichainWalletEvm:
|
|
403
|
+
def __init__(self, client: "Client"):
|
|
404
|
+
self._client = client
|
|
405
|
+
self.eoa = OmnichainWalletEvmEoa(client)
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
class OmnichainWalletEvmEoa:
|
|
409
|
+
def __init__(self, client: "Client"):
|
|
410
|
+
self._client = client
|
|
411
|
+
self.operations = OmnichainWalletEvmEoaOperations(client)
|
|
412
|
+
self.transfer = OmnichainWalletEvmEoaTransfer(client)
|
|
413
|
+
|
|
414
|
+
def balance(self, body: dict | None = None) -> dict[str, Any]:
|
|
415
|
+
return self._client.request('POST', 'omnichain/wallet/evm/eoa/balance', body or {}, True)
|
|
416
|
+
|
|
417
|
+
def chains(self, body: dict | None = None) -> dict[str, Any]:
|
|
418
|
+
return self._client.request('GET', 'omnichain/wallet/evm/eoa/chains', body or {}, True)
|
|
419
|
+
|
|
420
|
+
def create_wallet(self, body: dict | None = None) -> dict[str, Any]:
|
|
421
|
+
return self._client.request('POST', 'omnichain/wallet/evm/eoa/create-wallet', body or {}, True)
|
|
422
|
+
|
|
423
|
+
def generate_address(self, body: dict | None = None) -> dict[str, Any]:
|
|
424
|
+
return self._client.request('POST', 'omnichain/wallet/evm/eoa/generate-address', body or {}, True)
|
|
425
|
+
|
|
426
|
+
def supported_stablecoin(self, body: dict | None = None) -> dict[str, Any]:
|
|
427
|
+
return self._client.request('GET', 'omnichain/wallet/evm/eoa/supported-stablecoin', body or {}, True)
|
|
428
|
+
|
|
429
|
+
def transactions(self, body: dict | None = None) -> dict[str, Any]:
|
|
430
|
+
return self._client.request('POST', 'omnichain/wallet/evm/eoa/transactions', body or {}, True)
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
class OmnichainWalletEvmEoaOperations:
|
|
434
|
+
def __init__(self, client: "Client"):
|
|
435
|
+
self._client = client
|
|
436
|
+
|
|
437
|
+
def broadcast_transaction(self, body: dict | None = None) -> dict[str, Any]:
|
|
438
|
+
return self._client.request('POST', 'omnichain/wallet/evm/eoa/operations/broadcast-transaction', body or {}, True)
|
|
439
|
+
|
|
440
|
+
def estimate_gas(self, body: dict | None = None) -> dict[str, Any]:
|
|
441
|
+
return self._client.request('POST', 'omnichain/wallet/evm/eoa/operations/estimate-gas', body or {}, True)
|
|
442
|
+
|
|
443
|
+
def sign_transaction(self, body: dict | None = None) -> dict[str, Any]:
|
|
444
|
+
return self._client.request('POST', 'omnichain/wallet/evm/eoa/operations/sign-transaction', body or {}, True)
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
class OmnichainWalletEvmEoaTransfer:
|
|
448
|
+
def __init__(self, client: "Client"):
|
|
449
|
+
self._client = client
|
|
450
|
+
|
|
451
|
+
def native_token(self, body: dict | None = None) -> dict[str, Any]:
|
|
452
|
+
return self._client.request('POST', 'omnichain/wallet/evm/eoa/transfer/native-token', body or {}, True)
|
|
453
|
+
|
|
454
|
+
def stablecoin(self, body: dict | None = None) -> dict[str, Any]:
|
|
455
|
+
return self._client.request('POST', 'omnichain/wallet/evm/eoa/transfer/stablecoin', body or {}, True)
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
class OmnichainWalletStellar:
|
|
459
|
+
def __init__(self, client: "Client"):
|
|
460
|
+
self._client = client
|
|
461
|
+
self.eoa = OmnichainWalletStellarEoa(client)
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
class OmnichainWalletStellarEoa:
|
|
465
|
+
def __init__(self, client: "Client"):
|
|
466
|
+
self._client = client
|
|
467
|
+
self.operations = OmnichainWalletStellarEoaOperations(client)
|
|
468
|
+
self.transfer = OmnichainWalletStellarEoaTransfer(client)
|
|
469
|
+
|
|
470
|
+
def balance(self, body: dict | None = None) -> dict[str, Any]:
|
|
471
|
+
return self._client.request('POST', 'omnichain/wallet/stellar/eoa/balance', body or {}, True)
|
|
472
|
+
|
|
473
|
+
def create_wallet(self, body: dict | None = None) -> dict[str, Any]:
|
|
474
|
+
return self._client.request('POST', 'omnichain/wallet/stellar/eoa/create-wallet', body or {}, True)
|
|
475
|
+
|
|
476
|
+
def generate_address(self, body: dict | None = None) -> dict[str, Any]:
|
|
477
|
+
return self._client.request('POST', 'omnichain/wallet/stellar/eoa/generate-address', body or {}, True)
|
|
478
|
+
|
|
479
|
+
def supported_stablecoin(self, body: dict | None = None) -> dict[str, Any]:
|
|
480
|
+
return self._client.request('GET', 'omnichain/wallet/stellar/eoa/supported-stablecoin', body or {}, True)
|
|
481
|
+
|
|
482
|
+
def transactions(self, body: dict | None = None) -> dict[str, Any]:
|
|
483
|
+
return self._client.request('POST', 'omnichain/wallet/stellar/eoa/transactions', body or {}, True)
|
|
484
|
+
|
|
485
|
+
|
|
486
|
+
class OmnichainWalletStellarEoaOperations:
|
|
487
|
+
def __init__(self, client: "Client"):
|
|
488
|
+
self._client = client
|
|
489
|
+
|
|
490
|
+
def create_trustline(self, body: dict | None = None) -> dict[str, Any]:
|
|
491
|
+
return self._client.request('POST', 'omnichain/wallet/stellar/eoa/operations/create-trustline', body or {}, True)
|
|
492
|
+
|
|
493
|
+
def estimate_gas(self, body: dict | None = None) -> dict[str, Any]:
|
|
494
|
+
return self._client.request('POST', 'omnichain/wallet/stellar/eoa/operations/estimate-gas', body or {}, True)
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
class OmnichainWalletStellarEoaTransfer:
|
|
498
|
+
def __init__(self, client: "Client"):
|
|
499
|
+
self._client = client
|
|
500
|
+
|
|
501
|
+
def native_token(self, body: dict | None = None) -> dict[str, Any]:
|
|
502
|
+
return self._client.request('POST', 'omnichain/wallet/stellar/eoa/transfer/native-token', body or {}, True)
|
|
503
|
+
|
|
504
|
+
def stablecoin(self, body: dict | None = None) -> dict[str, Any]:
|
|
505
|
+
return self._client.request('POST', 'omnichain/wallet/stellar/eoa/transfer/stablecoin', body or {}, True)
|
|
506
|
+
|
|
507
|
+
|
|
508
|
+
class Simulation:
|
|
509
|
+
def __init__(self, client: "Client"):
|
|
510
|
+
self._client = client
|
|
511
|
+
self.card = SimulationCard(client)
|
|
512
|
+
self.collection = SimulationCollection(client)
|
|
513
|
+
self.direct_debit = SimulationDirectDebit(client)
|
|
514
|
+
self.transfer = SimulationTransfer(client)
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
class SimulationCard:
|
|
518
|
+
def __init__(self, client: "Client"):
|
|
519
|
+
self._client = client
|
|
520
|
+
|
|
521
|
+
def spend(self, body: dict | None = None) -> dict[str, Any]:
|
|
522
|
+
return self._client.request('POST', 'simulation/card/spend', body or {}, True)
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
class SimulationCollection:
|
|
526
|
+
def __init__(self, client: "Client"):
|
|
527
|
+
self._client = client
|
|
528
|
+
|
|
529
|
+
def initiated_order(self, body: dict | None = None) -> dict[str, Any]:
|
|
530
|
+
return self._client.request('POST', 'simulation/collection/initiated-order', body or {}, True)
|
|
531
|
+
|
|
532
|
+
def static_virtual_account(self, body: dict | None = None) -> dict[str, Any]:
|
|
533
|
+
return self._client.request('POST', 'simulation/collection/static-virtual-account', body or {}, True)
|
|
534
|
+
|
|
535
|
+
def static_wallet_address(self, body: dict | None = None) -> dict[str, Any]:
|
|
536
|
+
return self._client.request('POST', 'simulation/collection/static-wallet-address', body or {}, True)
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
class SimulationDirectDebit:
|
|
540
|
+
def __init__(self, client: "Client"):
|
|
541
|
+
self._client = client
|
|
542
|
+
|
|
543
|
+
def status(self, body: dict | None = None) -> dict[str, Any]:
|
|
544
|
+
return self._client.request('POST', 'simulation/direct-debit/status', body or {}, True)
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
class SimulationTransfer:
|
|
548
|
+
def __init__(self, client: "Client"):
|
|
549
|
+
self._client = client
|
|
550
|
+
|
|
551
|
+
def initiated_order(self, body: dict | None = None) -> dict[str, Any]:
|
|
552
|
+
return self._client.request('POST', 'simulation/transfer/initiated-order', body or {}, True)
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
class User:
|
|
556
|
+
def __init__(self, client: "Client"):
|
|
557
|
+
self._client = client
|
|
558
|
+
self.account = UserAccount(client)
|
|
559
|
+
self.misc = UserMisc(client)
|
|
560
|
+
self.subscription = UserSubscription(client)
|
|
561
|
+
self.verification = UserVerification(client)
|
|
562
|
+
|
|
563
|
+
|
|
564
|
+
class UserAccount:
|
|
565
|
+
def __init__(self, client: "Client"):
|
|
566
|
+
self._client = client
|
|
567
|
+
self.business = UserAccountBusiness(client)
|
|
568
|
+
self.individual = UserAccountIndividual(client)
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
class UserAccountBusiness:
|
|
572
|
+
def __init__(self, client: "Client"):
|
|
573
|
+
self._client = client
|
|
574
|
+
|
|
575
|
+
def create(self, body: dict | None = None) -> dict[str, Any]:
|
|
576
|
+
return self._client.request('POST', 'user/account/business/create', body or {}, True)
|
|
577
|
+
|
|
578
|
+
def details(self, body: dict | None = None) -> dict[str, Any]:
|
|
579
|
+
return self._client.request('POST', 'user/account/business/details', body or {}, True)
|
|
580
|
+
|
|
581
|
+
def update(self, body: dict | None = None) -> dict[str, Any]:
|
|
582
|
+
return self._client.request('POST', 'user/account/business/update', body or {}, True)
|
|
583
|
+
|
|
584
|
+
|
|
585
|
+
class UserAccountIndividual:
|
|
586
|
+
def __init__(self, client: "Client"):
|
|
587
|
+
self._client = client
|
|
588
|
+
|
|
589
|
+
def create(self, body: dict | None = None) -> dict[str, Any]:
|
|
590
|
+
return self._client.request('POST', 'user/account/individual/create', body or {}, True)
|
|
591
|
+
|
|
592
|
+
def details(self, body: dict | None = None) -> dict[str, Any]:
|
|
593
|
+
return self._client.request('POST', 'user/account/individual/details', body or {}, True)
|
|
594
|
+
|
|
595
|
+
def update(self, body: dict | None = None) -> dict[str, Any]:
|
|
596
|
+
return self._client.request('POST', 'user/account/individual/update', body or {}, True)
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
class UserMisc:
|
|
600
|
+
def __init__(self, client: "Client"):
|
|
601
|
+
self._client = client
|
|
602
|
+
|
|
603
|
+
def business_industry_list(self, body: dict | None = None) -> dict[str, Any]:
|
|
604
|
+
return self._client.request('POST', 'user/misc/business-industry-list', body or {}, True)
|
|
605
|
+
|
|
606
|
+
def business_product_service_type(self, body: dict | None = None) -> dict[str, Any]:
|
|
607
|
+
return self._client.request('GET', 'user/misc/business-product-service-type', body or {}, False)
|
|
608
|
+
|
|
609
|
+
def business_registration_type(self, body: dict | None = None) -> dict[str, Any]:
|
|
610
|
+
return self._client.request('POST', 'user/misc/business-registration-type', body or {}, True)
|
|
611
|
+
|
|
612
|
+
def business_trade_type(self, body: dict | None = None) -> dict[str, Any]:
|
|
613
|
+
return self._client.request('POST', 'user/misc/business-trade-type', body or {}, True)
|
|
614
|
+
|
|
615
|
+
def countries(self, body: dict | None = None) -> dict[str, Any]:
|
|
616
|
+
return self._client.request('POST', 'user/misc/countries', body or {}, True)
|
|
617
|
+
|
|
618
|
+
def job_types(self, body: dict | None = None) -> dict[str, Any]:
|
|
619
|
+
return self._client.request('POST', 'user/misc/job-types', body or {}, True)
|
|
620
|
+
|
|
621
|
+
def source_of_funds_type(self, body: dict | None = None) -> dict[str, Any]:
|
|
622
|
+
return self._client.request('GET', 'user/misc/source-of-funds-type', body or {}, False)
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
class UserSubscription:
|
|
626
|
+
def __init__(self, client: "Client"):
|
|
627
|
+
self._client = client
|
|
628
|
+
|
|
629
|
+
def class_(self, body: dict | None = None) -> dict[str, Any]:
|
|
630
|
+
return self._client.request('POST', 'user/subscription/class', body or {}, True)
|
|
631
|
+
|
|
632
|
+
def initiate(self, body: dict | None = None) -> dict[str, Any]:
|
|
633
|
+
return self._client.request('POST', 'user/subscription/initiate', body or {}, True)
|
|
634
|
+
|
|
635
|
+
def products(self, body: dict | None = None) -> dict[str, Any]:
|
|
636
|
+
return self._client.request('POST', 'user/subscription/products', body or {}, True)
|
|
637
|
+
|
|
638
|
+
def requery(self, body: dict | None = None) -> dict[str, Any]:
|
|
639
|
+
return self._client.request('POST', 'user/subscription/requery', body or {}, True)
|
|
640
|
+
|
|
641
|
+
def status(self, body: dict | None = None) -> dict[str, Any]:
|
|
642
|
+
return self._client.request('POST', 'user/subscription/status', body or {}, True)
|
|
643
|
+
|
|
644
|
+
def transactions(self, body: dict | None = None) -> dict[str, Any]:
|
|
645
|
+
return self._client.request('POST', 'user/subscription/transactions', body or {}, True)
|
|
646
|
+
|
|
647
|
+
|
|
648
|
+
class UserVerification:
|
|
649
|
+
def __init__(self, client: "Client"):
|
|
650
|
+
self._client = client
|
|
651
|
+
|
|
652
|
+
def bulk_process(self, body: dict | None = None) -> dict[str, Any]:
|
|
653
|
+
return self._client.request('POST', 'user/verification/bulk-process', body or {}, True)
|
|
654
|
+
|
|
655
|
+
def requirement(self, body: dict | None = None) -> dict[str, Any]:
|
|
656
|
+
return self._client.request('POST', 'user/verification/requirement', body or {}, True)
|
|
657
|
+
|
|
658
|
+
def single_process(self, body: dict | None = None) -> dict[str, Any]:
|
|
659
|
+
return self._client.request('POST', 'user/verification/single-process', body or {}, True)
|
|
660
|
+
|
|
661
|
+
|
|
662
|
+
class Verification:
|
|
663
|
+
def __init__(self, client: "Client"):
|
|
664
|
+
self._client = client
|
|
665
|
+
|
|
666
|
+
def lookup(self, body: dict | None = None) -> dict[str, Any]:
|
|
667
|
+
return self._client.request('POST', 'verification/lookup', body or {}, True)
|
|
668
|
+
|
|
669
|
+
|
|
670
|
+
class Wallet:
|
|
671
|
+
def __init__(self, client: "Client"):
|
|
672
|
+
self._client = client
|
|
673
|
+
self.channel = WalletChannel(client)
|
|
674
|
+
self.collection = WalletCollection(client)
|
|
675
|
+
self.exchange = WalletExchange(client)
|
|
676
|
+
self.mpwt = WalletMpwt(client)
|
|
677
|
+
self.transfer = WalletTransfer(client)
|
|
678
|
+
|
|
679
|
+
def create(self, body: dict | None = None) -> dict[str, Any]:
|
|
680
|
+
return self._client.request('POST', 'wallet/create', body or {}, True)
|
|
681
|
+
|
|
682
|
+
def details(self, body: dict | None = None) -> dict[str, Any]:
|
|
683
|
+
return self._client.request('POST', 'wallet/details', body or {}, True)
|
|
684
|
+
|
|
685
|
+
def transactions(self, body: dict | None = None) -> dict[str, Any]:
|
|
686
|
+
return self._client.request('POST', 'wallet/transactions', body or {}, True)
|
|
687
|
+
|
|
688
|
+
def update(self, body: dict | None = None) -> dict[str, Any]:
|
|
689
|
+
return self._client.request('POST', 'wallet/update', body or {}, True)
|
|
690
|
+
|
|
691
|
+
|
|
692
|
+
class WalletChannel:
|
|
693
|
+
def __init__(self, client: "Client"):
|
|
694
|
+
self._client = client
|
|
695
|
+
self.transfer_recipient = WalletChannelTransferRecipient(client)
|
|
696
|
+
self.virtual_account = WalletChannelVirtualAccount(client)
|
|
697
|
+
self.wallet_address = WalletChannelWalletAddress(client)
|
|
698
|
+
|
|
699
|
+
|
|
700
|
+
class WalletChannelTransferRecipient:
|
|
701
|
+
def __init__(self, client: "Client"):
|
|
702
|
+
self._client = client
|
|
703
|
+
self.bank = WalletChannelTransferRecipientBank(client)
|
|
704
|
+
self.mobile_money = WalletChannelTransferRecipientMobileMoney(client)
|
|
705
|
+
self.wallet_address = WalletChannelTransferRecipientWalletAddress(client)
|
|
706
|
+
|
|
707
|
+
|
|
708
|
+
class WalletChannelTransferRecipientBank:
|
|
709
|
+
def __init__(self, client: "Client"):
|
|
710
|
+
self._client = client
|
|
711
|
+
|
|
712
|
+
def add(self, body: dict | None = None) -> dict[str, Any]:
|
|
713
|
+
return self._client.request('POST', 'wallet/channel/transfer-recipient/bank/add', body or {}, True)
|
|
714
|
+
|
|
715
|
+
def countries(self, body: dict | None = None) -> dict[str, Any]:
|
|
716
|
+
return self._client.request('POST', 'wallet/channel/transfer-recipient/bank/countries', body or {}, True)
|
|
717
|
+
|
|
718
|
+
def details(self, body: dict | None = None) -> dict[str, Any]:
|
|
719
|
+
return self._client.request('POST', 'wallet/channel/transfer-recipient/bank/details', body or {}, True)
|
|
720
|
+
|
|
721
|
+
def institutions(self, body: dict | None = None) -> dict[str, Any]:
|
|
722
|
+
return self._client.request('POST', 'wallet/channel/transfer-recipient/bank/institutions', body or {}, True)
|
|
723
|
+
|
|
724
|
+
def requirements(self, body: dict | None = None) -> dict[str, Any]:
|
|
725
|
+
return self._client.request('POST', 'wallet/channel/transfer-recipient/bank/requirements', body or {}, True)
|
|
726
|
+
|
|
727
|
+
def resolve(self, body: dict | None = None) -> dict[str, Any]:
|
|
728
|
+
return self._client.request('POST', 'wallet/channel/transfer-recipient/bank/resolve', body or {}, True)
|
|
729
|
+
|
|
730
|
+
def sample_account(self, body: dict | None = None) -> dict[str, Any]:
|
|
731
|
+
return self._client.request('POST', 'wallet/channel/transfer-recipient/bank/sample-account', body or {}, True)
|
|
732
|
+
|
|
733
|
+
def supported_currencies(self, body: dict | None = None) -> dict[str, Any]:
|
|
734
|
+
return self._client.request('POST', 'wallet/channel/transfer-recipient/bank/supported-currencies', body or {}, True)
|
|
735
|
+
|
|
736
|
+
def supported_route_type(self, body: dict | None = None) -> dict[str, Any]:
|
|
737
|
+
return self._client.request('POST', 'wallet/channel/transfer-recipient/bank/supported-route-type', body or {}, True)
|
|
738
|
+
|
|
739
|
+
|
|
740
|
+
class WalletChannelTransferRecipientMobileMoney:
|
|
741
|
+
def __init__(self, client: "Client"):
|
|
742
|
+
self._client = client
|
|
743
|
+
|
|
744
|
+
def add(self, body: dict | None = None) -> dict[str, Any]:
|
|
745
|
+
return self._client.request('POST', 'wallet/channel/transfer-recipient/mobile-money/add', body or {}, True)
|
|
746
|
+
|
|
747
|
+
def details(self, body: dict | None = None) -> dict[str, Any]:
|
|
748
|
+
return self._client.request('POST', 'wallet/channel/transfer-recipient/mobile-money/details', body or {}, True)
|
|
749
|
+
|
|
750
|
+
def sample_account(self, body: dict | None = None) -> dict[str, Any]:
|
|
751
|
+
return self._client.request('POST', 'wallet/channel/transfer-recipient/mobile-money/sample-account', body or {}, True)
|
|
752
|
+
|
|
753
|
+
def supported_countries(self, body: dict | None = None) -> dict[str, Any]:
|
|
754
|
+
return self._client.request('POST', 'wallet/channel/transfer-recipient/mobile-money/supported-countries', body or {}, True)
|
|
755
|
+
|
|
756
|
+
def supported_currencies(self, body: dict | None = None) -> dict[str, Any]:
|
|
757
|
+
return self._client.request('POST', 'wallet/channel/transfer-recipient/mobile-money/supported-currencies', body or {}, True)
|
|
758
|
+
|
|
759
|
+
def supported_networks(self, body: dict | None = None) -> dict[str, Any]:
|
|
760
|
+
return self._client.request('POST', 'wallet/channel/transfer-recipient/mobile-money/supported-networks', body or {}, True)
|
|
761
|
+
|
|
762
|
+
|
|
763
|
+
class WalletChannelTransferRecipientWalletAddress:
|
|
764
|
+
def __init__(self, client: "Client"):
|
|
765
|
+
self._client = client
|
|
766
|
+
|
|
767
|
+
def add(self, body: dict | None = None) -> dict[str, Any]:
|
|
768
|
+
return self._client.request('POST', 'wallet/channel/transfer-recipient/wallet-address/add', body or {}, True)
|
|
769
|
+
|
|
770
|
+
def details(self, body: dict | None = None) -> dict[str, Any]:
|
|
771
|
+
return self._client.request('POST', 'wallet/channel/transfer-recipient/wallet-address/details', body or {}, True)
|
|
772
|
+
|
|
773
|
+
|
|
774
|
+
class WalletChannelVirtualAccount:
|
|
775
|
+
def __init__(self, client: "Client"):
|
|
776
|
+
self._client = client
|
|
777
|
+
|
|
778
|
+
def details(self, body: dict | None = None) -> dict[str, Any]:
|
|
779
|
+
return self._client.request('POST', 'wallet/channel/virtual-account/details', body or {}, True)
|
|
780
|
+
|
|
781
|
+
def generate(self, body: dict | None = None) -> dict[str, Any]:
|
|
782
|
+
return self._client.request('POST', 'wallet/channel/virtual-account/generate', body or {}, True)
|
|
783
|
+
|
|
784
|
+
def resubscribe(self, body: dict | None = None) -> dict[str, Any]:
|
|
785
|
+
return self._client.request('POST', 'wallet/channel/virtual-account/resubscribe', body or {}, True)
|
|
786
|
+
|
|
787
|
+
def supported_currencies(self, body: dict | None = None) -> dict[str, Any]:
|
|
788
|
+
return self._client.request('POST', 'wallet/channel/virtual-account/supported-currencies', body or {}, True)
|
|
789
|
+
|
|
790
|
+
def supported_institutions(self, body: dict | None = None) -> dict[str, Any]:
|
|
791
|
+
return self._client.request('POST', 'wallet/channel/virtual-account/supported-institutions', body or {}, True)
|
|
792
|
+
|
|
793
|
+
|
|
794
|
+
class WalletChannelWalletAddress:
|
|
795
|
+
def __init__(self, client: "Client"):
|
|
796
|
+
self._client = client
|
|
797
|
+
|
|
798
|
+
def details(self, body: dict | None = None) -> dict[str, Any]:
|
|
799
|
+
return self._client.request('POST', 'wallet/channel/wallet-address/details', body or {}, True)
|
|
800
|
+
|
|
801
|
+
def generate(self, body: dict | None = None) -> dict[str, Any]:
|
|
802
|
+
return self._client.request('POST', 'wallet/channel/wallet-address/generate', body or {}, True)
|
|
803
|
+
|
|
804
|
+
def supported_tokens(self, body: dict | None = None) -> dict[str, Any]:
|
|
805
|
+
return self._client.request('POST', 'wallet/channel/wallet-address/supported-tokens', body or {}, True)
|
|
806
|
+
|
|
807
|
+
|
|
808
|
+
class WalletCollection:
|
|
809
|
+
def __init__(self, client: "Client"):
|
|
810
|
+
self._client = client
|
|
811
|
+
self.method = WalletCollectionMethod(client)
|
|
812
|
+
|
|
813
|
+
def calculator(self, body: dict | None = None) -> dict[str, Any]:
|
|
814
|
+
return self._client.request('POST', 'wallet/collection/calculator', body or {}, True)
|
|
815
|
+
|
|
816
|
+
def design_options(self, body: dict | None = None) -> dict[str, Any]:
|
|
817
|
+
return self._client.request('POST', 'wallet/collection/design-options', body or {}, True)
|
|
818
|
+
|
|
819
|
+
def info(self, body: dict | None = None) -> dict[str, Any]:
|
|
820
|
+
return self._client.request('POST', 'wallet/collection/info', body or {}, True)
|
|
821
|
+
|
|
822
|
+
def initiate(self, body: dict | None = None) -> dict[str, Any]:
|
|
823
|
+
return self._client.request('POST', 'wallet/collection/initiate', body or {}, True)
|
|
824
|
+
|
|
825
|
+
def supported_methods(self, body: dict | None = None) -> dict[str, Any]:
|
|
826
|
+
return self._client.request('POST', 'wallet/collection/supported-methods', body or {}, True)
|
|
827
|
+
|
|
828
|
+
|
|
829
|
+
class WalletCollectionMethod:
|
|
830
|
+
def __init__(self, client: "Client"):
|
|
831
|
+
self._client = client
|
|
832
|
+
|
|
833
|
+
def authorize_3ds(self, body: dict | None = None) -> dict[str, Any]:
|
|
834
|
+
return self._client.request('POST', 'wallet/collection/method/authorize-3ds', body or {}, True)
|
|
835
|
+
|
|
836
|
+
def authorize_otp(self, body: dict | None = None) -> dict[str, Any]:
|
|
837
|
+
return self._client.request('POST', 'wallet/collection/method/authorize-otp', body or {}, True)
|
|
838
|
+
|
|
839
|
+
def charge(self, body: dict | None = None) -> dict[str, Any]:
|
|
840
|
+
return self._client.request('POST', 'wallet/collection/method/charge', body or {}, True)
|
|
841
|
+
|
|
842
|
+
def confirmation(self, body: dict | None = None) -> dict[str, Any]:
|
|
843
|
+
return self._client.request('POST', 'wallet/collection/method/confirmation', body or {}, True)
|
|
844
|
+
|
|
845
|
+
def create(self, body: dict | None = None) -> dict[str, Any]:
|
|
846
|
+
return self._client.request('POST', 'wallet/collection/method/create', body or {}, True)
|
|
847
|
+
|
|
848
|
+
def details(self, body: dict | None = None) -> dict[str, Any]:
|
|
849
|
+
return self._client.request('POST', 'wallet/collection/method/details', body or {}, True)
|
|
850
|
+
|
|
851
|
+
def link(self, body: dict | None = None) -> dict[str, Any]:
|
|
852
|
+
return self._client.request('POST', 'wallet/collection/method/link', body or {}, True)
|
|
853
|
+
|
|
854
|
+
def resend_otp(self, body: dict | None = None) -> dict[str, Any]:
|
|
855
|
+
return self._client.request('POST', 'wallet/collection/method/resend-otp', body or {}, True)
|
|
856
|
+
|
|
857
|
+
def supported_countries(self, body: dict | None = None) -> dict[str, Any]:
|
|
858
|
+
return self._client.request('POST', 'wallet/collection/method/supported-countries', body or {}, True)
|
|
859
|
+
|
|
860
|
+
def supported_currencies(self, body: dict | None = None) -> dict[str, Any]:
|
|
861
|
+
return self._client.request('POST', 'wallet/collection/method/supported-currencies', body or {}, True)
|
|
862
|
+
|
|
863
|
+
def supported_institutions(self, body: dict | None = None) -> dict[str, Any]:
|
|
864
|
+
return self._client.request('POST', 'wallet/collection/method/supported-institutions', body or {}, True)
|
|
865
|
+
|
|
866
|
+
def supported_networks(self, body: dict | None = None) -> dict[str, Any]:
|
|
867
|
+
return self._client.request('POST', 'wallet/collection/method/supported-networks', body or {}, True)
|
|
868
|
+
|
|
869
|
+
def terminate(self, body: dict | None = None) -> dict[str, Any]:
|
|
870
|
+
return self._client.request('POST', 'wallet/collection/method/terminate', body or {}, True)
|
|
871
|
+
|
|
872
|
+
|
|
873
|
+
class WalletExchange:
|
|
874
|
+
def __init__(self, client: "Client"):
|
|
875
|
+
self._client = client
|
|
876
|
+
self.cryptotocrypto = WalletExchangeCryptotocrypto(client)
|
|
877
|
+
self.cryptotofiat = WalletExchangeCryptotofiat(client)
|
|
878
|
+
self.fiattocrypto = WalletExchangeFiattocrypto(client)
|
|
879
|
+
self.fiattofiat = WalletExchangeFiattofiat(client)
|
|
880
|
+
|
|
881
|
+
|
|
882
|
+
class WalletExchangeCryptotocrypto:
|
|
883
|
+
def __init__(self, client: "Client"):
|
|
884
|
+
self._client = client
|
|
885
|
+
self.external = WalletExchangeCryptotocryptoExternal(client)
|
|
886
|
+
|
|
887
|
+
|
|
888
|
+
class WalletExchangeCryptotocryptoExternal:
|
|
889
|
+
def __init__(self, client: "Client"):
|
|
890
|
+
self._client = client
|
|
891
|
+
self.bridge = WalletExchangeCryptotocryptoExternalBridge(client)
|
|
892
|
+
self.swap = WalletExchangeCryptotocryptoExternalSwap(client)
|
|
893
|
+
|
|
894
|
+
|
|
895
|
+
class WalletExchangeCryptotocryptoExternalBridge:
|
|
896
|
+
def __init__(self, client: "Client"):
|
|
897
|
+
self._client = client
|
|
898
|
+
self.usdc = WalletExchangeCryptotocryptoExternalBridgeUsdc(client)
|
|
899
|
+
|
|
900
|
+
|
|
901
|
+
class WalletExchangeCryptotocryptoExternalBridgeUsdc:
|
|
902
|
+
def __init__(self, client: "Client"):
|
|
903
|
+
self._client = client
|
|
904
|
+
|
|
905
|
+
def fees(self, body: dict | None = None) -> dict[str, Any]:
|
|
906
|
+
return self._client.request('POST', 'wallet/exchange/cryptotocrypto/external/bridge/usdc/fees', body or {}, True)
|
|
907
|
+
|
|
908
|
+
def initiate(self, body: dict | None = None) -> dict[str, Any]:
|
|
909
|
+
return self._client.request('POST', 'wallet/exchange/cryptotocrypto/external/bridge/usdc/initiate', body or {}, True)
|
|
910
|
+
|
|
911
|
+
def status(self, body: dict | None = None) -> dict[str, Any]:
|
|
912
|
+
return self._client.request('POST', 'wallet/exchange/cryptotocrypto/external/bridge/usdc/status', body or {}, True)
|
|
913
|
+
|
|
914
|
+
def supported_chains(self, body: dict | None = None) -> dict[str, Any]:
|
|
915
|
+
return self._client.request('POST', 'wallet/exchange/cryptotocrypto/external/bridge/usdc/supported-chains', body or {}, True)
|
|
916
|
+
|
|
917
|
+
|
|
918
|
+
class WalletExchangeCryptotocryptoExternalSwap:
|
|
919
|
+
def __init__(self, client: "Client"):
|
|
920
|
+
self._client = client
|
|
921
|
+
|
|
922
|
+
def fees(self, body: dict | None = None) -> dict[str, Any]:
|
|
923
|
+
return self._client.request('POST', 'wallet/exchange/cryptotocrypto/external/swap/fees', body or {}, True)
|
|
924
|
+
|
|
925
|
+
def initiate(self, body: dict | None = None) -> dict[str, Any]:
|
|
926
|
+
return self._client.request('POST', 'wallet/exchange/cryptotocrypto/external/swap/initiate', body or {}, True)
|
|
927
|
+
|
|
928
|
+
def status(self, body: dict | None = None) -> dict[str, Any]:
|
|
929
|
+
return self._client.request('POST', 'wallet/exchange/cryptotocrypto/external/swap/status', body or {}, True)
|
|
930
|
+
|
|
931
|
+
def supported_pairs(self, body: dict | None = None) -> dict[str, Any]:
|
|
932
|
+
return self._client.request('POST', 'wallet/exchange/cryptotocrypto/external/swap/supported-pairs', body or {}, True)
|
|
933
|
+
|
|
934
|
+
|
|
935
|
+
class WalletExchangeCryptotofiat:
|
|
936
|
+
def __init__(self, client: "Client"):
|
|
937
|
+
self._client = client
|
|
938
|
+
self.external = WalletExchangeCryptotofiatExternal(client)
|
|
939
|
+
|
|
940
|
+
|
|
941
|
+
class WalletExchangeCryptotofiatExternal:
|
|
942
|
+
def __init__(self, client: "Client"):
|
|
943
|
+
self._client = client
|
|
944
|
+
|
|
945
|
+
def fees(self, body: dict | None = None) -> dict[str, Any]:
|
|
946
|
+
return self._client.request('POST', 'wallet/exchange/cryptotofiat/external/fees', body or {}, True)
|
|
947
|
+
|
|
948
|
+
def initiate(self, body: dict | None = None) -> dict[str, Any]:
|
|
949
|
+
return self._client.request('POST', 'wallet/exchange/cryptotofiat/external/initiate', body or {}, True)
|
|
950
|
+
|
|
951
|
+
def supported_pairs(self, body: dict | None = None) -> dict[str, Any]:
|
|
952
|
+
return self._client.request('POST', 'wallet/exchange/cryptotofiat/external/supported-pairs', body or {}, True)
|
|
953
|
+
|
|
954
|
+
|
|
955
|
+
class WalletExchangeFiattocrypto:
|
|
956
|
+
def __init__(self, client: "Client"):
|
|
957
|
+
self._client = client
|
|
958
|
+
self.wallet = WalletExchangeFiattocryptoWallet(client)
|
|
959
|
+
|
|
960
|
+
|
|
961
|
+
class WalletExchangeFiattocryptoWallet:
|
|
962
|
+
def __init__(self, client: "Client"):
|
|
963
|
+
self._client = client
|
|
964
|
+
|
|
965
|
+
def fees(self, body: dict | None = None) -> dict[str, Any]:
|
|
966
|
+
return self._client.request('POST', 'wallet/exchange/fiattocrypto/wallet/fees', body or {}, True)
|
|
967
|
+
|
|
968
|
+
def initiate(self, body: dict | None = None) -> dict[str, Any]:
|
|
969
|
+
return self._client.request('POST', 'wallet/exchange/fiattocrypto/wallet/initiate', body or {}, True)
|
|
970
|
+
|
|
971
|
+
def supported_pairs(self, body: dict | None = None) -> dict[str, Any]:
|
|
972
|
+
return self._client.request('POST', 'wallet/exchange/fiattocrypto/wallet/supported-pairs', body or {}, True)
|
|
973
|
+
|
|
974
|
+
|
|
975
|
+
class WalletExchangeFiattofiat:
|
|
976
|
+
def __init__(self, client: "Client"):
|
|
977
|
+
self._client = client
|
|
978
|
+
self.wallet = WalletExchangeFiattofiatWallet(client)
|
|
979
|
+
|
|
980
|
+
|
|
981
|
+
class WalletExchangeFiattofiatWallet:
|
|
982
|
+
def __init__(self, client: "Client"):
|
|
983
|
+
self._client = client
|
|
984
|
+
|
|
985
|
+
def fees(self, body: dict | None = None) -> dict[str, Any]:
|
|
986
|
+
return self._client.request('POST', 'wallet/exchange/fiattofiat/wallet/fees', body or {}, True)
|
|
987
|
+
|
|
988
|
+
def initiate(self, body: dict | None = None) -> dict[str, Any]:
|
|
989
|
+
return self._client.request('POST', 'wallet/exchange/fiattofiat/wallet/initiate', body or {}, True)
|
|
990
|
+
|
|
991
|
+
def supported_pairs(self, body: dict | None = None) -> dict[str, Any]:
|
|
992
|
+
return self._client.request('POST', 'wallet/exchange/fiattofiat/wallet/supported-pairs', body or {}, True)
|
|
993
|
+
|
|
994
|
+
|
|
995
|
+
class WalletMpwt:
|
|
996
|
+
def __init__(self, client: "Client"):
|
|
997
|
+
self._client = client
|
|
998
|
+
|
|
999
|
+
def balance(self, body: dict | None = None) -> dict[str, Any]:
|
|
1000
|
+
return self._client.request('POST', 'wallet/mpwt/balance', body or {}, True)
|
|
1001
|
+
|
|
1002
|
+
def fees(self, body: dict | None = None) -> dict[str, Any]:
|
|
1003
|
+
return self._client.request('POST', 'wallet/mpwt/fees', body or {}, True)
|
|
1004
|
+
|
|
1005
|
+
def fund(self, body: dict | None = None) -> dict[str, Any]:
|
|
1006
|
+
return self._client.request('POST', 'wallet/mpwt/fund', body or {}, True)
|
|
1007
|
+
|
|
1008
|
+
|
|
1009
|
+
class WalletTransfer:
|
|
1010
|
+
def __init__(self, client: "Client"):
|
|
1011
|
+
self._client = client
|
|
1012
|
+
self.cross = WalletTransferCross(client)
|
|
1013
|
+
self.direct = WalletTransferDirect(client)
|
|
1014
|
+
|
|
1015
|
+
|
|
1016
|
+
class WalletTransferCross:
|
|
1017
|
+
def __init__(self, client: "Client"):
|
|
1018
|
+
self._client = client
|
|
1019
|
+
|
|
1020
|
+
def fees(self, body: dict | None = None) -> dict[str, Any]:
|
|
1021
|
+
return self._client.request('POST', 'wallet/transfer/cross/fees', body or {}, True)
|
|
1022
|
+
|
|
1023
|
+
def single(self, body: dict | None = None) -> dict[str, Any]:
|
|
1024
|
+
return self._client.request('POST', 'wallet/transfer/cross/single', body or {}, True)
|
|
1025
|
+
|
|
1026
|
+
def supported_routes(self, body: dict | None = None) -> dict[str, Any]:
|
|
1027
|
+
return self._client.request('POST', 'wallet/transfer/cross/supported-routes', body or {}, True)
|
|
1028
|
+
|
|
1029
|
+
|
|
1030
|
+
class WalletTransferDirect:
|
|
1031
|
+
def __init__(self, client: "Client"):
|
|
1032
|
+
self._client = client
|
|
1033
|
+
|
|
1034
|
+
def bulk(self, body: dict | None = None) -> dict[str, Any]:
|
|
1035
|
+
return self._client.request('POST', 'wallet/transfer/direct/bulk', body or {}, True)
|
|
1036
|
+
|
|
1037
|
+
def fees(self, body: dict | None = None) -> dict[str, Any]:
|
|
1038
|
+
return self._client.request('POST', 'wallet/transfer/direct/fees', body or {}, True)
|
|
1039
|
+
|
|
1040
|
+
def queue(self, body: dict | None = None) -> dict[str, Any]:
|
|
1041
|
+
return self._client.request('POST', 'wallet/transfer/direct/queue', body or {}, True)
|
|
1042
|
+
|
|
1043
|
+
def single(self, body: dict | None = None) -> dict[str, Any]:
|
|
1044
|
+
return self._client.request('POST', 'wallet/transfer/direct/single', body or {}, True)
|
|
1045
|
+
|
|
1046
|
+
def supported_currencies(self, body: dict | None = None) -> dict[str, Any]:
|
|
1047
|
+
return self._client.request('POST', 'wallet/transfer/direct/supported-currencies', body or {}, True)
|
|
1048
|
+
|
|
1049
|
+
def supported_network(self, body: dict | None = None) -> dict[str, Any]:
|
|
1050
|
+
return self._client.request('POST', 'wallet/transfer/direct/supported-network', body or {}, True)
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: moipayway
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Official Python SDK for the MoiPayWay API.
|
|
5
|
+
Author: MoiPayWay
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/mpwsocial/python
|
|
8
|
+
Keywords: moipayway,payments,wallets,africa
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Requires-Python: >=3.9
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Dynamic: license-file
|
|
15
|
+
|
|
16
|
+
# MoiPayWay Python SDK
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pip install moipayway
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
```python
|
|
23
|
+
import os
|
|
24
|
+
from moipayway import Client
|
|
25
|
+
|
|
26
|
+
mpw = Client(os.environ["MOIPAYWAY_API_KEY"], environment="test")
|
|
27
|
+
|
|
28
|
+
wallet = mpw.wallet.create({
|
|
29
|
+
"code": "NGN",
|
|
30
|
+
"meta": {"name": "Operations", "user_id": "user-uuid"},
|
|
31
|
+
})
|
|
32
|
+
order = mpw.wallet.collection.initiate({
|
|
33
|
+
"order_reference_code": "ORD-1001",
|
|
34
|
+
"meta": {
|
|
35
|
+
"amount": "5000",
|
|
36
|
+
"narration": "Invoice 1001",
|
|
37
|
+
"wallet_id": "wallet-uuid",
|
|
38
|
+
"user_id": "user-uuid",
|
|
39
|
+
},
|
|
40
|
+
})
|
|
41
|
+
individual = mpw.user.account.individual.create({
|
|
42
|
+
# request body
|
|
43
|
+
})
|
|
44
|
+
job_types = mpw.user.misc.job_types()
|
|
45
|
+
lookup = mpw.verification.lookup({"code": "cac"})
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Collection paths are methods on the client:
|
|
49
|
+
|
|
50
|
+
- `POST wallet/create` → `mpw.wallet.create(body)`
|
|
51
|
+
- `POST wallet/collection/initiate` → `mpw.wallet.collection.initiate(body)`
|
|
52
|
+
- `POST user/account/individual/create` → `mpw.user.account.individual.create(body)`
|
|
53
|
+
- `GET user/misc/job-types` → `mpw.user.misc.job_types()`
|
|
54
|
+
- `POST verification/lookup` → `mpw.verification.lookup(body)`
|
|
55
|
+
- `POST omnichain/wallet/evm/eoa/create-wallet` → `mpw.omnichain.wallet.evm.eoa.create_wallet(body)`
|
|
56
|
+
|
|
57
|
+
`test` uses `https://dev.moipayway.co`. `live` uses `https://api.moipayway.co`.
|
|
58
|
+
|
|
59
|
+
```python
|
|
60
|
+
from moipayway import verify_webhook
|
|
61
|
+
|
|
62
|
+
ok = verify_webhook(raw_body, signature_header, timestamp_header, os.environ["MOIPAYWAY_API_KEY"])
|
|
63
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
moipayway
|