afp-sdk 0.1.1__tar.gz → 0.1.2__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.
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/CHANGELOG.md +7 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/PKG-INFO +1 -1
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/api/builder.py +2 -2
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/schemas.py +1 -1
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/examples/create_product.py +1 -1
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/pyproject.toml +1 -1
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/uv.lock +2 -2
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/.env.template +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/.envrc +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/LICENSE +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/README.md +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/__init__.py +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/api/__init__.py +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/api/admin.py +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/api/base.py +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/api/clearing.py +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/api/liquidation.py +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/api/trading.py +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/bindings/__init__.py +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/bindings/auctioneer_facet.py +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/bindings/bankruptcy_facet.py +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/bindings/clearing_facet.py +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/bindings/erc20.py +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/bindings/facade.py +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/bindings/final_settlement_facet.py +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/bindings/margin_account.py +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/bindings/margin_account_registry.py +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/bindings/mark_price_tracker_facet.py +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/bindings/oracle_provider.py +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/bindings/product_registry.py +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/bindings/trading_protocol.py +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/config.py +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/decorators.py +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/enums.py +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/exceptions.py +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/exchange.py +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/py.typed +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/signing.py +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/validators.py +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/devenv.lock +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/devenv.nix +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/devenv.yaml +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/examples/cancel_order.py +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/examples/execute_trade.py +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/tests/__init__.py +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/tests/test_decorators.py +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/tests/test_hashing.py +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/tests/test_login.py +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/tests/test_schemas.py +0 -0
- {afp_sdk-0.1.1 → afp_sdk-0.1.2}/tests/test_validators.py +0 -0
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [v0.1.2] - 2025-08-28
|
|
2
|
+
|
|
3
|
+
### Fixed
|
|
4
|
+
|
|
5
|
+
- Fix oracle specification decimal parsing in `afp.Builder.create_product` ([#9](https://github.com/autonity/afp-sdk/pull/9))
|
|
6
|
+
|
|
1
7
|
## [v0.1.1] - 2025-08-28
|
|
2
8
|
|
|
3
9
|
### Fixed
|
|
@@ -8,5 +14,6 @@
|
|
|
8
14
|
|
|
9
15
|
_First release._
|
|
10
16
|
|
|
17
|
+
[v0.1.2]: https://github.com/autonity/afp-sdk/releases/tag/v0.1.2
|
|
11
18
|
[v0.1.1]: https://github.com/autonity/afp-sdk/releases/tag/v0.1.1
|
|
12
19
|
[v0.1.0]: https://github.com/autonity/afp-sdk/releases/tag/v0.1.0
|
|
@@ -41,7 +41,7 @@ class Builder(ClearingSystemAPI):
|
|
|
41
41
|
oracle_address: str,
|
|
42
42
|
fsv_decimals: int,
|
|
43
43
|
fsp_alpha: Decimal,
|
|
44
|
-
fsp_beta:
|
|
44
|
+
fsp_beta: Decimal,
|
|
45
45
|
fsv_calldata: str,
|
|
46
46
|
start_time: datetime,
|
|
47
47
|
earliest_fsp_submission_time: datetime,
|
|
@@ -177,7 +177,7 @@ class Builder(ClearingSystemAPI):
|
|
|
177
177
|
oracle_address=cast(ChecksumAddress, product.oracle_address),
|
|
178
178
|
fsv_decimals=product.fsv_decimals,
|
|
179
179
|
fsp_alpha=int(product.fsp_alpha * config.FULL_PRECISION_MULTIPLIER),
|
|
180
|
-
fsp_beta=product.fsp_beta,
|
|
180
|
+
fsp_beta=int(product.fsp_beta * 10**product.fsv_decimals),
|
|
181
181
|
fsv_calldata=HexBytes(product.fsv_calldata),
|
|
182
182
|
),
|
|
183
183
|
price_quotation=product.price_quotation,
|
|
@@ -172,7 +172,7 @@ class ProductSpecification(Model):
|
|
|
172
172
|
oracle_address: Annotated[str, AfterValidator(validators.validate_address)]
|
|
173
173
|
fsv_decimals: Annotated[int, Field(ge=0, lt=256)] # uint8
|
|
174
174
|
fsp_alpha: Decimal
|
|
175
|
-
fsp_beta:
|
|
175
|
+
fsp_beta: Decimal
|
|
176
176
|
fsv_calldata: Annotated[str, AfterValidator(validators.validate_hexstr)]
|
|
177
177
|
# Product
|
|
178
178
|
start_time: Timestamp
|
|
@@ -21,7 +21,7 @@ def main():
|
|
|
21
21
|
oracle_address="0xd8A8C5A492Fc2448cFcF980218c0F7D2De4d6FB3",
|
|
22
22
|
fsv_decimals=1,
|
|
23
23
|
fsp_alpha=Decimal("10000"),
|
|
24
|
-
fsp_beta=0,
|
|
24
|
+
fsp_beta=Decimal("0"),
|
|
25
25
|
fsv_calldata="0x",
|
|
26
26
|
start_time=datetime.now() + timedelta(minutes=1),
|
|
27
27
|
earliest_fsp_submission_time=datetime.now() + timedelta(days=7),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
version = 1
|
|
2
|
-
revision =
|
|
2
|
+
revision = 3
|
|
3
3
|
requires-python = ">=3.11"
|
|
4
4
|
|
|
5
5
|
[[package]]
|
|
@@ -13,7 +13,7 @@ wheels = [
|
|
|
13
13
|
|
|
14
14
|
[[package]]
|
|
15
15
|
name = "afp-sdk"
|
|
16
|
-
version = "0.1.
|
|
16
|
+
version = "0.1.2"
|
|
17
17
|
source = { editable = "." }
|
|
18
18
|
dependencies = [
|
|
19
19
|
{ name = "decorator" },
|
|
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
|
|
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
|