shield-swap-sdk 0.2.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.
- aleo_shield_swap/__init__.py +60 -0
- aleo_shield_swap/_api_models.py +832 -0
- aleo_shield_swap/_calls.py +98 -0
- aleo_shield_swap/_core.py +311 -0
- aleo_shield_swap/_generated.py +508 -0
- aleo_shield_swap/agent.py +177 -0
- aleo_shield_swap/api.py +236 -0
- aleo_shield_swap/async_client.py +323 -0
- aleo_shield_swap/client.py +603 -0
- aleo_shield_swap/derivations.py +179 -0
- aleo_shield_swap/errors.py +56 -0
- aleo_shield_swap/mcp.py +101 -0
- aleo_shield_swap/tick_hints.py +29 -0
- aleo_shield_swap/tick_math.py +58 -0
- aleo_shield_swap/types.py +108 -0
- shield_swap_sdk-0.2.0.dist-info/METADATA +182 -0
- shield_swap_sdk-0.2.0.dist-info/RECORD +18 -0
- shield_swap_sdk-0.2.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"""shield-swap-sdk — typed Python client for the shield_swap AMM on Aleo.
|
|
2
|
+
|
|
3
|
+
::
|
|
4
|
+
|
|
5
|
+
from aleo import Aleo
|
|
6
|
+
from aleo_shield_swap import ShieldSwap
|
|
7
|
+
|
|
8
|
+
aleo = Aleo(Aleo.HTTPProvider("https://api.provable.com"))
|
|
9
|
+
aleo.default_account = account
|
|
10
|
+
dex = ShieldSwap(aleo)
|
|
11
|
+
|
|
12
|
+
pools = dex.api.get_pools()
|
|
13
|
+
handle = dex.swap(pool_key=pools[0].key, token_in_id=pools[0].token0,
|
|
14
|
+
amount_in=10**9).delegate()
|
|
15
|
+
out = dex.claim_swap_output(handle).delegate()
|
|
16
|
+
"""
|
|
17
|
+
from .client import ShieldSwap as ShieldSwap
|
|
18
|
+
from .async_client import AsyncShieldSwap as AsyncShieldSwap
|
|
19
|
+
from .api import ApiClient as ApiClient, AsyncApiClient as AsyncApiClient
|
|
20
|
+
from .types import (
|
|
21
|
+
ClaimResult as ClaimResult,
|
|
22
|
+
MintResult as MintResult,
|
|
23
|
+
SlotView as SlotView,
|
|
24
|
+
SwapHandle as SwapHandle,
|
|
25
|
+
TxResult as TxResult,
|
|
26
|
+
)
|
|
27
|
+
from .derivations import (
|
|
28
|
+
BlindedIdentity as BlindedIdentity,
|
|
29
|
+
derive_blinded_address as derive_blinded_address,
|
|
30
|
+
derive_blinding_factor as derive_blinding_factor,
|
|
31
|
+
derive_pool_key as derive_pool_key,
|
|
32
|
+
derive_tick_key as derive_tick_key,
|
|
33
|
+
)
|
|
34
|
+
from .errors import (
|
|
35
|
+
DexApiError as DexApiError,
|
|
36
|
+
InsufficientRecordsError as InsufficientRecordsError,
|
|
37
|
+
InvalidFeeTierError as InvalidFeeTierError,
|
|
38
|
+
PoolNotFoundError as PoolNotFoundError,
|
|
39
|
+
PoolNotInitializedError as PoolNotInitializedError,
|
|
40
|
+
ShieldSwapError as ShieldSwapError,
|
|
41
|
+
SwapOutputNotFinalizedError as SwapOutputNotFinalizedError,
|
|
42
|
+
)
|
|
43
|
+
from .agent import (
|
|
44
|
+
dispatch_tool as dispatch_tool,
|
|
45
|
+
shield_swap_tools as shield_swap_tools,
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
__version__ = "0.2.0"
|
|
49
|
+
|
|
50
|
+
__all__ = [
|
|
51
|
+
"ShieldSwap", "AsyncShieldSwap", "ApiClient", "AsyncApiClient",
|
|
52
|
+
"SwapHandle", "ClaimResult", "MintResult", "TxResult", "SlotView",
|
|
53
|
+
"BlindedIdentity", "derive_blinding_factor", "derive_blinded_address",
|
|
54
|
+
"derive_pool_key", "derive_tick_key",
|
|
55
|
+
"ShieldSwapError", "SwapOutputNotFinalizedError", "PoolNotFoundError",
|
|
56
|
+
"PoolNotInitializedError", "InsufficientRecordsError",
|
|
57
|
+
"InvalidFeeTierError", "DexApiError",
|
|
58
|
+
"shield_swap_tools", "dispatch_tool",
|
|
59
|
+
"__version__",
|
|
60
|
+
]
|