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.
Files changed (50) hide show
  1. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/CHANGELOG.md +7 -0
  2. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/PKG-INFO +1 -1
  3. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/api/builder.py +2 -2
  4. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/schemas.py +1 -1
  5. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/examples/create_product.py +1 -1
  6. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/pyproject.toml +1 -1
  7. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/uv.lock +2 -2
  8. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/.env.template +0 -0
  9. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/.envrc +0 -0
  10. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/LICENSE +0 -0
  11. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/README.md +0 -0
  12. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/__init__.py +0 -0
  13. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/api/__init__.py +0 -0
  14. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/api/admin.py +0 -0
  15. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/api/base.py +0 -0
  16. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/api/clearing.py +0 -0
  17. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/api/liquidation.py +0 -0
  18. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/api/trading.py +0 -0
  19. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/bindings/__init__.py +0 -0
  20. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/bindings/auctioneer_facet.py +0 -0
  21. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/bindings/bankruptcy_facet.py +0 -0
  22. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/bindings/clearing_facet.py +0 -0
  23. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/bindings/erc20.py +0 -0
  24. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/bindings/facade.py +0 -0
  25. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/bindings/final_settlement_facet.py +0 -0
  26. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/bindings/margin_account.py +0 -0
  27. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/bindings/margin_account_registry.py +0 -0
  28. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/bindings/mark_price_tracker_facet.py +0 -0
  29. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/bindings/oracle_provider.py +0 -0
  30. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/bindings/product_registry.py +0 -0
  31. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/bindings/trading_protocol.py +0 -0
  32. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/config.py +0 -0
  33. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/decorators.py +0 -0
  34. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/enums.py +0 -0
  35. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/exceptions.py +0 -0
  36. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/exchange.py +0 -0
  37. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/py.typed +0 -0
  38. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/signing.py +0 -0
  39. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/afp/validators.py +0 -0
  40. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/devenv.lock +0 -0
  41. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/devenv.nix +0 -0
  42. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/devenv.yaml +0 -0
  43. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/examples/cancel_order.py +0 -0
  44. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/examples/execute_trade.py +0 -0
  45. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/tests/__init__.py +0 -0
  46. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/tests/test_decorators.py +0 -0
  47. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/tests/test_hashing.py +0 -0
  48. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/tests/test_login.py +0 -0
  49. {afp_sdk-0.1.1 → afp_sdk-0.1.2}/tests/test_schemas.py +0 -0
  50. {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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: afp-sdk
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: Autonomous Futures Protocol Python SDK
5
5
  Keywords: autonity,web3,trading,crypto,prediction,forecast,markets
6
6
  License-Expression: MIT
@@ -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: int,
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: int
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),
@@ -4,7 +4,7 @@ build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "afp-sdk"
7
- version = "0.1.1"
7
+ version = "0.1.2"
8
8
  description = "Autonomous Futures Protocol Python SDK"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -1,5 +1,5 @@
1
1
  version = 1
2
- revision = 2
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.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