cryptochief-crypto-processing-python 0.4.0__tar.gz → 0.5.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.
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/PKG-INFO +9 -1
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/README.md +8 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/pyproject.toml +1 -1
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/__init__.py +4 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/_version.py +1 -1
- cryptochief_crypto_processing_python-0.5.0/src/cryptochief/py.typed +0 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/webhook.py +65 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/.gitignore +0 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/LICENSE +0 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/_models.py +0 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/amount.py +0 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/assets.py +0 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/chains.py +0 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/client.py +0 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/contract/__init__.py +0 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/contract/base58.py +0 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/contract/borsh.py +0 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/contract/evm_abi.py +0 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/contract/keccak.py +0 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/contract/tron_address.py +0 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/errors.py +0 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/pagination.py +0 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/poll.py +0 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/rsa.py +0 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/sentinels.py +0 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/services/__init__.py +0 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/services/base.py +0 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/services/blockchain.py +0 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/services/credits.py +0 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/services/currencies.py +0 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/services/payins.py +0 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/services/payouts.py +0 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/services/static_deposits.py +0 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/services/sweeps.py +0 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/services/transactions.py +0 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/services/wallets.py +0 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/services/withdrawals.py +0 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/sign.py +0 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/ton/__init__.py +0 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/ton/address.py +0 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/ton/messages.py +0 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/ton/rpc.py +0 -0
- {cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/src/cryptochief/transport.py +0 -0
{cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: cryptochief-crypto-processing-python
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
4
4
|
Summary: Official async Python SDK for the Crypto Chief crypto payment gateway and crypto processing API. Accept crypto payments, send single and mass crypto payouts, sign on-chain transactions and smart-contract calls, manage wallets, convert fiat to crypto, and verify webhooks across Ethereum, BNB Smart Chain, Polygon, Tron, TON, Solana, Bitcoin, XRP and 20+ blockchains. USDT and USDC stablecoin support with int-precise amounts and asyncio/httpx.
|
|
5
5
|
Project-URL: Homepage, https://crypto-chief.com/processing/
|
|
6
6
|
Project-URL: Documentation, https://docs-sdk.crypto-chief.com/processing/python
|
|
@@ -200,6 +200,14 @@ decimal strings round-trip exactly. Discover an asset's decimals with
|
|
|
200
200
|
|
|
201
201
|
## Contract calls without hand-encoding
|
|
202
202
|
|
|
203
|
+
> **This snippet shows the encoder, not a complete swap.** Uniswap's router
|
|
204
|
+
> moves your input token with `transferFrom`, so it needs an ERC-20
|
|
205
|
+
> `approve(address,uint256)` on that token first, confirmed before the swap is
|
|
206
|
+
> signed — without it the swap reverts and burns the gas. And an `amountOutMin`
|
|
207
|
+
> of `0` accepts whatever the pool returns, which on a public mempool hands the
|
|
208
|
+
> trade to the first sandwich bot that sees it. The runnable version, with both,
|
|
209
|
+
> is in `examples/`.
|
|
210
|
+
|
|
203
211
|
```python
|
|
204
212
|
from cryptochief import EvmCallRequest, Erc20TransferRequest, Chain, human_to_base
|
|
205
213
|
|
{cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/README.md
RENAMED
|
@@ -161,6 +161,14 @@ decimal strings round-trip exactly. Discover an asset's decimals with
|
|
|
161
161
|
|
|
162
162
|
## Contract calls without hand-encoding
|
|
163
163
|
|
|
164
|
+
> **This snippet shows the encoder, not a complete swap.** Uniswap's router
|
|
165
|
+
> moves your input token with `transferFrom`, so it needs an ERC-20
|
|
166
|
+
> `approve(address,uint256)` on that token first, confirmed before the swap is
|
|
167
|
+
> signed — without it the swap reverts and burns the gas. And an `amountOutMin`
|
|
168
|
+
> of `0` accepts whatever the pool returns, which on a public mempool hands the
|
|
169
|
+
> trade to the first sandwich bot that sees it. The runnable version, with both,
|
|
170
|
+
> is in `examples/`.
|
|
171
|
+
|
|
164
172
|
```python
|
|
165
173
|
from cryptochief import EvmCallRequest, Erc20TransferRequest, Chain, human_to_base
|
|
166
174
|
|
|
@@ -170,6 +170,8 @@ from .webhook import (
|
|
|
170
170
|
PayInWebhookEvent,
|
|
171
171
|
PayoutWebhookEvent,
|
|
172
172
|
StaticDepositWebhookEvent,
|
|
173
|
+
SweepWebhookEvent,
|
|
174
|
+
SWEEP_EVENT_CONFIRMED,
|
|
173
175
|
TransactionWebhookEvent,
|
|
174
176
|
WebhookSignatureError,
|
|
175
177
|
coerce_webhook_event,
|
|
@@ -230,6 +232,8 @@ __all__ = [
|
|
|
230
232
|
"TransactionWebhookEvent",
|
|
231
233
|
"PayInWebhookEvent",
|
|
232
234
|
"StaticDepositWebhookEvent",
|
|
235
|
+
"SweepWebhookEvent",
|
|
236
|
+
"SWEEP_EVENT_CONFIRMED",
|
|
233
237
|
# Services
|
|
234
238
|
"PayoutsService",
|
|
235
239
|
"TransactionsService",
|
|
File without changes
|
|
@@ -175,11 +175,75 @@ class StaticDepositWebhookEvent:
|
|
|
175
175
|
paid_at: Optional[str] = None
|
|
176
176
|
|
|
177
177
|
|
|
178
|
+
#: The only sweep event the platform emits. There is deliberately no
|
|
179
|
+
#: ``sweep.broadcasted``: "we sent it" is not something you can act on, and an
|
|
180
|
+
#: event that means "maybe" is one more thing to reconcile.
|
|
181
|
+
SWEEP_EVENT_CONFIRMED = "sweep.confirmed"
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
@dataclass(kw_only=True)
|
|
185
|
+
class SweepWebhookEvent:
|
|
186
|
+
"""Funds swept off a deposit wallet, confirmed on chain.
|
|
187
|
+
|
|
188
|
+
A ``static_deposit.paid`` tells you a customer paid you. This tells you the
|
|
189
|
+
money has finished moving into your own custody - until it fires, the
|
|
190
|
+
balance still sits on the deposit address. Reconciliation, treasury
|
|
191
|
+
reporting and "funds available to pay out" all key off this event, not off
|
|
192
|
+
the deposit.
|
|
193
|
+
|
|
194
|
+
Sweeps run on static deposit wallets *and* on the transit wallets issued per
|
|
195
|
+
pay-in order; both deliver here, to the callback URL configured for the
|
|
196
|
+
wallet the funds left.
|
|
197
|
+
"""
|
|
198
|
+
|
|
199
|
+
event: str = ""
|
|
200
|
+
#: The sweeper task. One sweep settles once - use it as your idempotency key.
|
|
201
|
+
task_id: str = ""
|
|
202
|
+
#: Always ``"completed"``. A sweep reaches you in no other state.
|
|
203
|
+
status: str = ""
|
|
204
|
+
|
|
205
|
+
#: The wallet the funds left - the address your customer paid into.
|
|
206
|
+
wallet_address: str = ""
|
|
207
|
+
#: The master wallet they landed on.
|
|
208
|
+
to_address: Optional[str] = None
|
|
209
|
+
|
|
210
|
+
network: str = ""
|
|
211
|
+
chain_family: Optional[str] = None
|
|
212
|
+
asset_symbol: str = ""
|
|
213
|
+
asset_contract: Optional[str] = None
|
|
214
|
+
#: ``"native"`` or ``"token"``.
|
|
215
|
+
asset_type: Optional[str] = None
|
|
216
|
+
amount_raw: Optional[str] = None
|
|
217
|
+
amount_human: Optional[str] = None
|
|
218
|
+
|
|
219
|
+
sweep_tx_hash: str = ""
|
|
220
|
+
#: Set when the platform had to fund gas on the wallet before it could sweep.
|
|
221
|
+
gas_pump_tx_hash: Optional[str] = None
|
|
222
|
+
|
|
223
|
+
#: What makes this event true rather than hopeful, and never zero. It
|
|
224
|
+
#: travels with the event rather than being implied by it: "confirmed" is
|
|
225
|
+
#: not the same number on every chain, so if you run your own finality
|
|
226
|
+
#: policy you need the count to apply it.
|
|
227
|
+
sweep_confirmations: int = 0
|
|
228
|
+
|
|
229
|
+
#: When the chain was observed to hold the sweep. NOT the task's completion
|
|
230
|
+
#: timestamp, which is stamped on every terminal outcome - failures
|
|
231
|
+
#: included - and so says nothing about settlement.
|
|
232
|
+
confirmed_at: Optional[str] = None
|
|
233
|
+
|
|
234
|
+
#: What triggered it: ``"momentum"``, ``"threshold"`` or ``"force"``.
|
|
235
|
+
type_work: Optional[str] = None
|
|
236
|
+
#: What the sweep cost: network fee plus any gas or energy the platform
|
|
237
|
+
#: fronted to make it possible.
|
|
238
|
+
total_fee_usd: Optional[str] = None
|
|
239
|
+
|
|
240
|
+
|
|
178
241
|
WebhookEvent = Union[
|
|
179
242
|
PayoutWebhookEvent,
|
|
180
243
|
TransactionWebhookEvent,
|
|
181
244
|
PayInWebhookEvent,
|
|
182
245
|
StaticDepositWebhookEvent,
|
|
246
|
+
SweepWebhookEvent,
|
|
183
247
|
Dict[str, Any],
|
|
184
248
|
]
|
|
185
249
|
|
|
@@ -188,4 +252,5 @@ _EVENT_BY_PREFIX = {
|
|
|
188
252
|
"transaction": TransactionWebhookEvent,
|
|
189
253
|
"invoice": PayInWebhookEvent,
|
|
190
254
|
"static_deposit": StaticDepositWebhookEvent,
|
|
255
|
+
"sweep": SweepWebhookEvent,
|
|
191
256
|
}
|
{cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/.gitignore
RENAMED
|
File without changes
|
{cryptochief_crypto_processing_python-0.4.0 → cryptochief_crypto_processing_python-0.5.0}/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|