afp-sdk 0.5.4__py3-none-any.whl → 0.6.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.
Files changed (49) hide show
  1. afp/__init__.py +4 -1
  2. afp/afp.py +11 -0
  3. afp/api/admin.py +1 -1
  4. afp/api/base.py +11 -2
  5. afp/api/margin_account.py +12 -148
  6. afp/api/product.py +302 -148
  7. afp/api/trading.py +10 -19
  8. afp/auth.py +14 -0
  9. afp/bindings/__init__.py +30 -16
  10. afp/bindings/admin_facet.py +890 -0
  11. afp/bindings/clearing_facet.py +356 -773
  12. afp/bindings/facade.py +9 -6
  13. afp/bindings/final_settlement_facet.py +258 -99
  14. afp/bindings/margin_account.py +524 -839
  15. afp/bindings/margin_account_facet.py +722 -0
  16. afp/bindings/margin_account_registry.py +184 -310
  17. afp/bindings/mark_price_tracker_facet.py +74 -16
  18. afp/bindings/product_registry.py +1577 -541
  19. afp/bindings/product_registry_facet.py +1467 -0
  20. afp/bindings/system_viewer.py +592 -369
  21. afp/bindings/types.py +223 -0
  22. afp/config.py +4 -0
  23. afp/constants.py +49 -6
  24. afp/decorators.py +25 -3
  25. afp/dtos.py +142 -0
  26. afp/exceptions.py +10 -0
  27. afp/exchange.py +10 -8
  28. afp/hashing.py +7 -5
  29. afp/ipfs.py +245 -0
  30. afp/json-schemas/bafyreiaw34o6l3rmatabzbds2i2myazdw2yolevcpsoyd2i2g3ms7wa2eq.json +1 -0
  31. afp/json-schemas/bafyreibnfg6nq74dvpkre5rakkccij7iadp5rxpim7omsatjnrpmj3y7v4.json +1 -0
  32. afp/json-schemas/bafyreicgr6dfo5yduixjkcifghiulskfegwojvuwodtouvivl362zndhxe.json +1 -0
  33. afp/json-schemas/bafyreicheoypx6synljushh7mq2572iyhlolf4nake2p5dwobgnj3r5eua.json +1 -0
  34. afp/json-schemas/bafyreid35a67db4sqh4fs6boddyt2xvscbqy6nqvsp5jjur56qhkw4ixre.json +1 -0
  35. afp/json-schemas/bafyreidzs7okcpqiss6ztftltyptqwnw5e5opsy5yntospekjha4kpykaa.json +1 -0
  36. afp/json-schemas/bafyreifcec2km7hxwq6oqzjlspni2mgipetjb7pqtaewh2efislzoctboi.json +1 -0
  37. afp/json-schemas/bafyreihn3oiaxffe4e2w7pwtreadpw3obfd7gqlogbcxm56jc2hzfvco74.json +1 -0
  38. afp/json-schemas/bafyreihur3dzwhja6uxsbcw6eeoj3xmmc4e3zkmyzpot5v5dleevxe5zam.json +1 -0
  39. afp/schemas.py +227 -177
  40. afp/types.py +169 -0
  41. afp/validators.py +218 -8
  42. {afp_sdk-0.5.4.dist-info → afp_sdk-0.6.0.dist-info}/METADATA +73 -10
  43. afp_sdk-0.6.0.dist-info/RECORD +50 -0
  44. afp/bindings/auctioneer_facet.py +0 -752
  45. afp/bindings/bankruptcy_facet.py +0 -391
  46. afp/bindings/trading_protocol.py +0 -1158
  47. afp_sdk-0.5.4.dist-info/RECORD +0 -37
  48. {afp_sdk-0.5.4.dist-info → afp_sdk-0.6.0.dist-info}/WHEEL +0 -0
  49. {afp_sdk-0.5.4.dist-info → afp_sdk-0.6.0.dist-info}/licenses/LICENSE +0 -0
afp/bindings/__init__.py CHANGED
@@ -1,8 +1,5 @@
1
1
  """Typed bindings around the smart contracts of the Autonomous Futures Protocol."""
2
2
 
3
- from .auctioneer_facet import AuctionConfig, AuctionData, BidData
4
- from .bankruptcy_facet import LAAData, PositionLossData
5
- from .clearing_facet import ClearingConfig, Config, Intent, IntentData, Side, Trade
6
3
  from .facade import (
7
4
  ClearingDiamond,
8
5
  MarginAccountRegistry,
@@ -10,15 +7,29 @@ from .facade import (
10
7
  ProductRegistry,
11
8
  SystemViewer,
12
9
  )
13
- from .margin_account import MarginAccount, PositionData, Settlement
14
- from .product_registry import (
10
+ from .margin_account import MarginAccount
11
+ from .types import (
12
+ BaseProduct,
13
+ ClearingConfig,
14
+ Config,
15
+ ExpirySpecification,
16
+ FinalSettlementConfig,
17
+ FuturesProductV1,
18
+ Intent,
19
+ IntentData,
20
+ MarginData,
21
+ MarginSpecification,
22
+ MarkPriceConfig,
15
23
  OracleSpecification,
16
- Product,
24
+ PositionData,
25
+ PredictionProductV1,
26
+ ProductConfig,
17
27
  ProductMetadata,
18
28
  ProductState,
29
+ Settlement,
30
+ Side,
31
+ Trade,
19
32
  )
20
- from .system_viewer import UserMarginAccountData
21
- from .trading_protocol import TradingProtocol
22
33
 
23
34
  __all__ = (
24
35
  # Contract bindings
@@ -28,24 +39,27 @@ __all__ = (
28
39
  "OracleProvider",
29
40
  "ProductRegistry",
30
41
  "SystemViewer",
31
- "TradingProtocol",
32
42
  # Structures
33
- "AuctionConfig",
34
- "AuctionData",
35
- "BidData",
43
+ "BaseProduct",
36
44
  "ClearingConfig",
37
45
  "Config",
46
+ "ExpirySpecification",
47
+ "FinalSettlementConfig",
48
+ "FuturesProductV1",
38
49
  "Intent",
39
50
  "IntentData",
40
- "LAAData",
51
+ "MarginData",
52
+ "MarginSpecification",
53
+ "MarkPriceConfig",
41
54
  "OracleSpecification",
42
55
  "PositionData",
43
- "PositionLossData",
44
- "Product",
56
+ "PredictionProductV1",
57
+ "ProductConfig",
45
58
  "ProductMetadata",
59
+ "ProductState",
46
60
  "Settlement",
61
+ "Side",
47
62
  "Trade",
48
- "UserMarginAccountData",
49
63
  # Enumerations
50
64
  "ProductState",
51
65
  "Side",