compass_api_sdk 0.1.13__py3-none-any.whl → 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.

Potentially problematic release.


This version of compass_api_sdk might be problematic. Click here for more details.

@@ -1,152 +0,0 @@
1
- """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
-
3
- from __future__ import annotations
4
- from .chain import Chain
5
- from .token_enum import TokenEnum
6
- from compass_api_sdk.types import (
7
- BaseModel,
8
- Nullable,
9
- OptionalNullable,
10
- UNSET,
11
- UNSET_SENTINEL,
12
- )
13
- from pydantic import model_serializer
14
- from typing import Union
15
- from typing_extensions import NotRequired, TypeAliasType, TypedDict
16
-
17
-
18
- AerodromeRemoveLiquidityRequestLiquidityTypedDict = TypeAliasType(
19
- "AerodromeRemoveLiquidityRequestLiquidityTypedDict", Union[float, str]
20
- )
21
- r"""The amount of liquidity you want to remove"""
22
-
23
-
24
- AerodromeRemoveLiquidityRequestLiquidity = TypeAliasType(
25
- "AerodromeRemoveLiquidityRequestLiquidity", Union[float, str]
26
- )
27
- r"""The amount of liquidity you want to remove"""
28
-
29
-
30
- AerodromeRemoveLiquidityRequestAmountAMinTypedDict = TypeAliasType(
31
- "AerodromeRemoveLiquidityRequestAmountAMinTypedDict", Union[float, str]
32
- )
33
- r"""The minimal amount of token A you are willing to receive"""
34
-
35
-
36
- AerodromeRemoveLiquidityRequestAmountAMin = TypeAliasType(
37
- "AerodromeRemoveLiquidityRequestAmountAMin", Union[float, str]
38
- )
39
- r"""The minimal amount of token A you are willing to receive"""
40
-
41
-
42
- AerodromeRemoveLiquidityRequestAmountBMinTypedDict = TypeAliasType(
43
- "AerodromeRemoveLiquidityRequestAmountBMinTypedDict", Union[float, str]
44
- )
45
- r"""The minimal amount of token B you are willing to receive"""
46
-
47
-
48
- AerodromeRemoveLiquidityRequestAmountBMin = TypeAliasType(
49
- "AerodromeRemoveLiquidityRequestAmountBMin", Union[float, str]
50
- )
51
- r"""The minimal amount of token B you are willing to receive"""
52
-
53
-
54
- class AerodromeRemoveLiquidityRequestTypedDict(TypedDict):
55
- chain: Chain
56
- r"""The chain to use."""
57
- sender: str
58
- r"""The address of the transaction sender."""
59
- token_a: TokenEnum
60
- r"""A class representing the token.
61
-
62
- This class is used to represent the token in the system. Notice individual
63
- endpoints' documentation where per chain tokens are presented.
64
- """
65
- token_b: TokenEnum
66
- r"""A class representing the token.
67
-
68
- This class is used to represent the token in the system. Notice individual
69
- endpoints' documentation where per chain tokens are presented.
70
- """
71
- stable: bool
72
- r"""If true, try to remove liquidity from a stable pool with a bonding curve of K=x^3y+y^3x. If false, try to remove liquidity from a volatile pool with a bonding curve of K=xy"""
73
- liquidity: AerodromeRemoveLiquidityRequestLiquidityTypedDict
74
- r"""The amount of liquidity you want to remove"""
75
- amount_a_min: AerodromeRemoveLiquidityRequestAmountAMinTypedDict
76
- r"""The minimal amount of token A you are willing to receive"""
77
- amount_b_min: AerodromeRemoveLiquidityRequestAmountBMinTypedDict
78
- r"""The minimal amount of token B you are willing to receive"""
79
- deadline: Nullable[int]
80
- r"""The deadline for this transaction in seconds since epoch"""
81
- to: NotRequired[Nullable[str]]
82
- r"""The receiver of the tokens from this liquidity removal, default to sender"""
83
-
84
-
85
- class AerodromeRemoveLiquidityRequest(BaseModel):
86
- chain: Chain
87
- r"""The chain to use."""
88
-
89
- sender: str
90
- r"""The address of the transaction sender."""
91
-
92
- token_a: TokenEnum
93
- r"""A class representing the token.
94
-
95
- This class is used to represent the token in the system. Notice individual
96
- endpoints' documentation where per chain tokens are presented.
97
- """
98
-
99
- token_b: TokenEnum
100
- r"""A class representing the token.
101
-
102
- This class is used to represent the token in the system. Notice individual
103
- endpoints' documentation where per chain tokens are presented.
104
- """
105
-
106
- stable: bool
107
- r"""If true, try to remove liquidity from a stable pool with a bonding curve of K=x^3y+y^3x. If false, try to remove liquidity from a volatile pool with a bonding curve of K=xy"""
108
-
109
- liquidity: AerodromeRemoveLiquidityRequestLiquidity
110
- r"""The amount of liquidity you want to remove"""
111
-
112
- amount_a_min: AerodromeRemoveLiquidityRequestAmountAMin
113
- r"""The minimal amount of token A you are willing to receive"""
114
-
115
- amount_b_min: AerodromeRemoveLiquidityRequestAmountBMin
116
- r"""The minimal amount of token B you are willing to receive"""
117
-
118
- deadline: Nullable[int]
119
- r"""The deadline for this transaction in seconds since epoch"""
120
-
121
- to: OptionalNullable[str] = UNSET
122
- r"""The receiver of the tokens from this liquidity removal, default to sender"""
123
-
124
- @model_serializer(mode="wrap")
125
- def serialize_model(self, handler):
126
- optional_fields = ["to"]
127
- nullable_fields = ["to", "deadline"]
128
- null_default_fields = []
129
-
130
- serialized = handler(self)
131
-
132
- m = {}
133
-
134
- for n, f in type(self).model_fields.items():
135
- k = f.alias or n
136
- val = serialized.get(k)
137
- serialized.pop(k, None)
138
-
139
- optional_nullable = k in optional_fields and k in nullable_fields
140
- is_set = (
141
- self.__pydantic_fields_set__.intersection({n})
142
- or k in null_default_fields
143
- ) # pylint: disable=no-member
144
-
145
- if val is not None and val != UNSET_SENTINEL:
146
- m[k] = val
147
- elif val != UNSET_SENTINEL and (
148
- not k in optional_fields or (optional_nullable and is_set)
149
- ):
150
- m[k] = val
151
-
152
- return m
@@ -1,110 +0,0 @@
1
- """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
-
3
- from __future__ import annotations
4
- from .token_enum import TokenEnum
5
- from compass_api_sdk.types import (
6
- BaseModel,
7
- Nullable,
8
- OptionalNullable,
9
- UNSET,
10
- UNSET_SENTINEL,
11
- )
12
- from pydantic import model_serializer
13
- from typing import Union
14
- from typing_extensions import NotRequired, TypeAliasType, TypedDict
15
-
16
-
17
- AerodromeSwapEthForTokenParamsAmountInTypedDict = TypeAliasType(
18
- "AerodromeSwapEthForTokenParamsAmountInTypedDict", Union[float, str]
19
- )
20
- r"""The amount of ETH you will give to aerodrome_basic for this trade"""
21
-
22
-
23
- AerodromeSwapEthForTokenParamsAmountIn = TypeAliasType(
24
- "AerodromeSwapEthForTokenParamsAmountIn", Union[float, str]
25
- )
26
- r"""The amount of ETH you will give to aerodrome_basic for this trade"""
27
-
28
-
29
- AerodromeSwapEthForTokenParamsAmountOutMinTypedDict = TypeAliasType(
30
- "AerodromeSwapEthForTokenParamsAmountOutMinTypedDict", Union[float, str]
31
- )
32
- r"""The minimal amount of token you are willing to receive (will revert if the swap gives you less)"""
33
-
34
-
35
- AerodromeSwapEthForTokenParamsAmountOutMin = TypeAliasType(
36
- "AerodromeSwapEthForTokenParamsAmountOutMin", Union[float, str]
37
- )
38
- r"""The minimal amount of token you are willing to receive (will revert if the swap gives you less)"""
39
-
40
-
41
- class AerodromeSwapEthForTokenParamsTypedDict(TypedDict):
42
- r"""Parameters model for swapping ETH for tokens."""
43
-
44
- token_out: TokenEnum
45
- r"""A class representing the token.
46
-
47
- This class is used to represent the token in the system. Notice individual
48
- endpoints' documentation where per chain tokens are presented.
49
- """
50
- amount_in: AerodromeSwapEthForTokenParamsAmountInTypedDict
51
- r"""The amount of ETH you will give to aerodrome_basic for this trade"""
52
- amount_out_min: AerodromeSwapEthForTokenParamsAmountOutMinTypedDict
53
- r"""The minimal amount of token you are willing to receive (will revert if the swap gives you less)"""
54
- stable: bool
55
- r"""If true, try to trade on a stable pool with a bonding curve of K=x^3y+y^3x. If false, try to trade on a volatile pool with a bonding curve of K=xy"""
56
- to: NotRequired[Nullable[str]]
57
- r"""The receiver of the funds from this trade, default to sender"""
58
-
59
-
60
- class AerodromeSwapEthForTokenParams(BaseModel):
61
- r"""Parameters model for swapping ETH for tokens."""
62
-
63
- token_out: TokenEnum
64
- r"""A class representing the token.
65
-
66
- This class is used to represent the token in the system. Notice individual
67
- endpoints' documentation where per chain tokens are presented.
68
- """
69
-
70
- amount_in: AerodromeSwapEthForTokenParamsAmountIn
71
- r"""The amount of ETH you will give to aerodrome_basic for this trade"""
72
-
73
- amount_out_min: AerodromeSwapEthForTokenParamsAmountOutMin
74
- r"""The minimal amount of token you are willing to receive (will revert if the swap gives you less)"""
75
-
76
- stable: bool
77
- r"""If true, try to trade on a stable pool with a bonding curve of K=x^3y+y^3x. If false, try to trade on a volatile pool with a bonding curve of K=xy"""
78
-
79
- to: OptionalNullable[str] = UNSET
80
- r"""The receiver of the funds from this trade, default to sender"""
81
-
82
- @model_serializer(mode="wrap")
83
- def serialize_model(self, handler):
84
- optional_fields = ["to"]
85
- nullable_fields = ["to"]
86
- null_default_fields = []
87
-
88
- serialized = handler(self)
89
-
90
- m = {}
91
-
92
- for n, f in type(self).model_fields.items():
93
- k = f.alias or n
94
- val = serialized.get(k)
95
- serialized.pop(k, None)
96
-
97
- optional_nullable = k in optional_fields and k in nullable_fields
98
- is_set = (
99
- self.__pydantic_fields_set__.intersection({n})
100
- or k in null_default_fields
101
- ) # pylint: disable=no-member
102
-
103
- if val is not None and val != UNSET_SENTINEL:
104
- m[k] = val
105
- elif val != UNSET_SENTINEL and (
106
- not k in optional_fields or (optional_nullable and is_set)
107
- ):
108
- m[k] = val
109
-
110
- return m
@@ -1,110 +0,0 @@
1
- """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
-
3
- from __future__ import annotations
4
- from .token_enum import TokenEnum
5
- from compass_api_sdk.types import (
6
- BaseModel,
7
- Nullable,
8
- OptionalNullable,
9
- UNSET,
10
- UNSET_SENTINEL,
11
- )
12
- from pydantic import model_serializer
13
- from typing import Union
14
- from typing_extensions import NotRequired, TypeAliasType, TypedDict
15
-
16
-
17
- AerodromeSwapTokenForEthParamsAmountInTypedDict = TypeAliasType(
18
- "AerodromeSwapTokenForEthParamsAmountInTypedDict", Union[float, str]
19
- )
20
- r"""The amount of tokens you will give to aerodrome_basic for this trade"""
21
-
22
-
23
- AerodromeSwapTokenForEthParamsAmountIn = TypeAliasType(
24
- "AerodromeSwapTokenForEthParamsAmountIn", Union[float, str]
25
- )
26
- r"""The amount of tokens you will give to aerodrome_basic for this trade"""
27
-
28
-
29
- AerodromeSwapTokenForEthParamsAmountOutMinTypedDict = TypeAliasType(
30
- "AerodromeSwapTokenForEthParamsAmountOutMinTypedDict", Union[float, str]
31
- )
32
- r"""The minimal amount of ETH you are willing to receive (will revert if the swap gives you less)"""
33
-
34
-
35
- AerodromeSwapTokenForEthParamsAmountOutMin = TypeAliasType(
36
- "AerodromeSwapTokenForEthParamsAmountOutMin", Union[float, str]
37
- )
38
- r"""The minimal amount of ETH you are willing to receive (will revert if the swap gives you less)"""
39
-
40
-
41
- class AerodromeSwapTokenForEthParamsTypedDict(TypedDict):
42
- r"""Parameters model for swapping tokens for ETH."""
43
-
44
- token_in: TokenEnum
45
- r"""A class representing the token.
46
-
47
- This class is used to represent the token in the system. Notice individual
48
- endpoints' documentation where per chain tokens are presented.
49
- """
50
- amount_in: AerodromeSwapTokenForEthParamsAmountInTypedDict
51
- r"""The amount of tokens you will give to aerodrome_basic for this trade"""
52
- amount_out_min: AerodromeSwapTokenForEthParamsAmountOutMinTypedDict
53
- r"""The minimal amount of ETH you are willing to receive (will revert if the swap gives you less)"""
54
- stable: bool
55
- r"""If true, try to trade on a stable pool with a bonding curve of K=x^3y+y^3x. If false, try to trade on a volatile pool with a bonding curve of K=xy"""
56
- to: NotRequired[Nullable[str]]
57
- r"""The receiver of the funds from this trade, default to sender"""
58
-
59
-
60
- class AerodromeSwapTokenForEthParams(BaseModel):
61
- r"""Parameters model for swapping tokens for ETH."""
62
-
63
- token_in: TokenEnum
64
- r"""A class representing the token.
65
-
66
- This class is used to represent the token in the system. Notice individual
67
- endpoints' documentation where per chain tokens are presented.
68
- """
69
-
70
- amount_in: AerodromeSwapTokenForEthParamsAmountIn
71
- r"""The amount of tokens you will give to aerodrome_basic for this trade"""
72
-
73
- amount_out_min: AerodromeSwapTokenForEthParamsAmountOutMin
74
- r"""The minimal amount of ETH you are willing to receive (will revert if the swap gives you less)"""
75
-
76
- stable: bool
77
- r"""If true, try to trade on a stable pool with a bonding curve of K=x^3y+y^3x. If false, try to trade on a volatile pool with a bonding curve of K=xy"""
78
-
79
- to: OptionalNullable[str] = UNSET
80
- r"""The receiver of the funds from this trade, default to sender"""
81
-
82
- @model_serializer(mode="wrap")
83
- def serialize_model(self, handler):
84
- optional_fields = ["to"]
85
- nullable_fields = ["to"]
86
- null_default_fields = []
87
-
88
- serialized = handler(self)
89
-
90
- m = {}
91
-
92
- for n, f in type(self).model_fields.items():
93
- k = f.alias or n
94
- val = serialized.get(k)
95
- serialized.pop(k, None)
96
-
97
- optional_nullable = k in optional_fields and k in nullable_fields
98
- is_set = (
99
- self.__pydantic_fields_set__.intersection({n})
100
- or k in null_default_fields
101
- ) # pylint: disable=no-member
102
-
103
- if val is not None and val != UNSET_SENTINEL:
104
- m[k] = val
105
- elif val != UNSET_SENTINEL and (
106
- not k in optional_fields or (optional_nullable and is_set)
107
- ):
108
- m[k] = val
109
-
110
- return m
@@ -1,135 +0,0 @@
1
- """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
-
3
- from __future__ import annotations
4
- from .token_enum import TokenEnum
5
- from compass_api_sdk.types import (
6
- BaseModel,
7
- Nullable,
8
- OptionalNullable,
9
- UNSET,
10
- UNSET_SENTINEL,
11
- )
12
- from pydantic import model_serializer
13
- from typing import Union
14
- from typing_extensions import NotRequired, TypeAliasType, TypedDict
15
-
16
-
17
- AerodromeSwapTokensParamsAmountInTypedDict = TypeAliasType(
18
- "AerodromeSwapTokensParamsAmountInTypedDict", Union[float, str]
19
- )
20
- r"""The amount of tokens you will give to aerodrome_basic for this trade"""
21
-
22
-
23
- AerodromeSwapTokensParamsAmountIn = TypeAliasType(
24
- "AerodromeSwapTokensParamsAmountIn", Union[float, str]
25
- )
26
- r"""The amount of tokens you will give to aerodrome_basic for this trade"""
27
-
28
-
29
- AerodromeSwapTokensParamsAmountOutMinTypedDict = TypeAliasType(
30
- "AerodromeSwapTokensParamsAmountOutMinTypedDict", Union[float, str]
31
- )
32
- r"""The minimal amount of token you are willing to receive (will revert if the
33
- swap gives you less)
34
- """
35
-
36
-
37
- AerodromeSwapTokensParamsAmountOutMin = TypeAliasType(
38
- "AerodromeSwapTokensParamsAmountOutMin", Union[float, str]
39
- )
40
- r"""The minimal amount of token you are willing to receive (will revert if the
41
- swap gives you less)
42
- """
43
-
44
-
45
- class AerodromeSwapTokensParamsTypedDict(TypedDict):
46
- r"""Parameters model for swapping tokens."""
47
-
48
- token_in: TokenEnum
49
- r"""A class representing the token.
50
-
51
- This class is used to represent the token in the system. Notice individual
52
- endpoints' documentation where per chain tokens are presented.
53
- """
54
- token_out: TokenEnum
55
- r"""A class representing the token.
56
-
57
- This class is used to represent the token in the system. Notice individual
58
- endpoints' documentation where per chain tokens are presented.
59
- """
60
- amount_in: AerodromeSwapTokensParamsAmountInTypedDict
61
- r"""The amount of tokens you will give to aerodrome_basic for this trade"""
62
- amount_out_min: AerodromeSwapTokensParamsAmountOutMinTypedDict
63
- r"""The minimal amount of token you are willing to receive (will revert if the
64
- swap gives you less)
65
- """
66
- stable: bool
67
- r"""If true, try to trade on a stable pool with a bonding curve of K=x^3y+y^3x.
68
- If false, try to trade on a volatile pool with a bonding curve of K=xy
69
- """
70
- to: NotRequired[Nullable[str]]
71
- r"""The receiver of the funds from this trade, default to sender"""
72
-
73
-
74
- class AerodromeSwapTokensParams(BaseModel):
75
- r"""Parameters model for swapping tokens."""
76
-
77
- token_in: TokenEnum
78
- r"""A class representing the token.
79
-
80
- This class is used to represent the token in the system. Notice individual
81
- endpoints' documentation where per chain tokens are presented.
82
- """
83
-
84
- token_out: TokenEnum
85
- r"""A class representing the token.
86
-
87
- This class is used to represent the token in the system. Notice individual
88
- endpoints' documentation where per chain tokens are presented.
89
- """
90
-
91
- amount_in: AerodromeSwapTokensParamsAmountIn
92
- r"""The amount of tokens you will give to aerodrome_basic for this trade"""
93
-
94
- amount_out_min: AerodromeSwapTokensParamsAmountOutMin
95
- r"""The minimal amount of token you are willing to receive (will revert if the
96
- swap gives you less)
97
- """
98
-
99
- stable: bool
100
- r"""If true, try to trade on a stable pool with a bonding curve of K=x^3y+y^3x.
101
- If false, try to trade on a volatile pool with a bonding curve of K=xy
102
- """
103
-
104
- to: OptionalNullable[str] = UNSET
105
- r"""The receiver of the funds from this trade, default to sender"""
106
-
107
- @model_serializer(mode="wrap")
108
- def serialize_model(self, handler):
109
- optional_fields = ["to"]
110
- nullable_fields = ["to"]
111
- null_default_fields = []
112
-
113
- serialized = handler(self)
114
-
115
- m = {}
116
-
117
- for n, f in type(self).model_fields.items():
118
- k = f.alias or n
119
- val = serialized.get(k)
120
- serialized.pop(k, None)
121
-
122
- optional_nullable = k in optional_fields and k in nullable_fields
123
- is_set = (
124
- self.__pydantic_fields_set__.intersection({n})
125
- or k in null_default_fields
126
- ) # pylint: disable=no-member
127
-
128
- if val is not None and val != UNSET_SENTINEL:
129
- m[k] = val
130
- elif val != UNSET_SENTINEL and (
131
- not k in optional_fields or (optional_nullable and is_set)
132
- ):
133
- m[k] = val
134
-
135
- return m