afp-sdk 0.1.0__tar.gz → 0.1.1__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/CHANGELOG.md +12 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/PKG-INFO +3 -3
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/README.md +1 -1
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/afp/__init__.py +1 -1
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/afp/bindings/__init__.py +1 -1
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/afp/bindings/bankruptcy_facet.py +2 -2
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/examples/create_product.py +7 -8
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/pyproject.toml +2 -2
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/uv.lock +1 -1
- afp_sdk-0.1.0/CHANGELOG.md +0 -5
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/.env.template +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/.envrc +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/LICENSE +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/afp/api/__init__.py +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/afp/api/admin.py +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/afp/api/base.py +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/afp/api/builder.py +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/afp/api/clearing.py +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/afp/api/liquidation.py +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/afp/api/trading.py +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/afp/bindings/auctioneer_facet.py +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/afp/bindings/clearing_facet.py +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/afp/bindings/erc20.py +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/afp/bindings/facade.py +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/afp/bindings/final_settlement_facet.py +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/afp/bindings/margin_account.py +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/afp/bindings/margin_account_registry.py +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/afp/bindings/mark_price_tracker_facet.py +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/afp/bindings/oracle_provider.py +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/afp/bindings/product_registry.py +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/afp/bindings/trading_protocol.py +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/afp/config.py +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/afp/decorators.py +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/afp/enums.py +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/afp/exceptions.py +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/afp/exchange.py +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/afp/py.typed +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/afp/schemas.py +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/afp/signing.py +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/afp/validators.py +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/devenv.lock +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/devenv.nix +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/devenv.yaml +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/examples/cancel_order.py +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/examples/execute_trade.py +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/tests/__init__.py +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/tests/test_decorators.py +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/tests/test_hashing.py +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/tests/test_login.py +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/tests/test_schemas.py +0 -0
- {afp_sdk-0.1.0 → afp_sdk-0.1.1}/tests/test_validators.py +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
## [v0.1.1] - 2025-08-28
|
|
2
|
+
|
|
3
|
+
### Fixed
|
|
4
|
+
|
|
5
|
+
- Fix incorrect parameter type in `afp.bindings.ClearingDiamond.mutializeLosses` ([#8](https://github.com/autonity/afp-sdk/pull/8))
|
|
6
|
+
|
|
7
|
+
## [v0.1.0] - 2025-08-22
|
|
8
|
+
|
|
9
|
+
_First release._
|
|
10
|
+
|
|
11
|
+
[v0.1.1]: https://github.com/autonity/afp-sdk/releases/tag/v0.1.1
|
|
12
|
+
[v0.1.0]: https://github.com/autonity/afp-sdk/releases/tag/v0.1.0
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: afp-sdk
|
|
3
|
-
Version: 0.1.
|
|
4
|
-
Summary:
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: Autonomous Futures Protocol Python SDK
|
|
5
5
|
Keywords: autonity,web3,trading,crypto,prediction,forecast,markets
|
|
6
6
|
License-Expression: MIT
|
|
7
7
|
License-File: LICENSE
|
|
@@ -23,7 +23,7 @@ Project-URL: Issues, https://github.com/autonity/afp-sdk/issues
|
|
|
23
23
|
Project-URL: Source, https://github.com/autonity/afp-sdk
|
|
24
24
|
Description-Content-Type: text/markdown
|
|
25
25
|
|
|
26
|
-
#
|
|
26
|
+
# Autonomous Futures Protocol Python SDK
|
|
27
27
|
|
|
28
28
|
## Installation
|
|
29
29
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""Typed bindings around the smart contracts of the
|
|
1
|
+
"""Typed bindings around the smart contracts of the Autonomous Futures Protocol."""
|
|
2
2
|
|
|
3
3
|
from .auctioneer_facet import AuctionConfig, AuctionData, BidData
|
|
4
4
|
from .bankruptcy_facet import LAAData, PositionLossData
|
|
@@ -83,7 +83,7 @@ class BankruptcyFacet:
|
|
|
83
83
|
bankrupt_account_id: eth_typing.ChecksumAddress,
|
|
84
84
|
collateral_token: eth_typing.ChecksumAddress,
|
|
85
85
|
product_ids: typing.List[hexbytes.HexBytes],
|
|
86
|
-
laas: typing.List[eth_typing.ChecksumAddress],
|
|
86
|
+
laas: typing.List[typing.List[eth_typing.ChecksumAddress]],
|
|
87
87
|
) -> contract.ContractFunction:
|
|
88
88
|
"""Binding for `mutualizeLosses` on the BankruptcyFacet contract.
|
|
89
89
|
|
|
@@ -92,7 +92,7 @@ class BankruptcyFacet:
|
|
|
92
92
|
bankrupt_account_id : eth_typing.ChecksumAddress
|
|
93
93
|
collateral_token : eth_typing.ChecksumAddress
|
|
94
94
|
product_ids : typing.List[hexbytes.HexBytes]
|
|
95
|
-
laas : typing.List[eth_typing.ChecksumAddress]
|
|
95
|
+
laas : typing.List[typing.List[eth_typing.ChecksumAddress]]
|
|
96
96
|
|
|
97
97
|
Returns
|
|
98
98
|
-------
|
|
@@ -9,26 +9,25 @@ BUILDER_ACCOUNT_PRIVATE_KEY = (
|
|
|
9
9
|
"0x926b0e772d87247fb08832e7fd55e528ae5997680713367a4786c92e7d909154"
|
|
10
10
|
)
|
|
11
11
|
|
|
12
|
-
AUTONITY_RPC_URL = "https://autonity.
|
|
12
|
+
AUTONITY_RPC_URL = "https://bakerloo.autonity-apis.com"
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
def main():
|
|
16
|
-
# Builder creates a product
|
|
17
16
|
builder = afp.Builder(BUILDER_ACCOUNT_PRIVATE_KEY, AUTONITY_RPC_URL)
|
|
18
17
|
|
|
19
18
|
product = builder.create_product(
|
|
20
19
|
symbol="SDK-TEST-1",
|
|
21
20
|
description="Test Product 1",
|
|
22
21
|
oracle_address="0xd8A8C5A492Fc2448cFcF980218c0F7D2De4d6FB3",
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
fsv_decimals=1,
|
|
23
|
+
fsp_alpha=Decimal("10000"),
|
|
24
|
+
fsp_beta=0,
|
|
25
|
+
fsv_calldata="0x",
|
|
27
26
|
start_time=datetime.now() + timedelta(minutes=1),
|
|
28
27
|
earliest_fsp_submission_time=datetime.now() + timedelta(days=7),
|
|
29
28
|
collateral_asset="0xB855D5e83363A4494e09f0Bb3152A70d3f161940",
|
|
30
|
-
tick_size=
|
|
31
|
-
unit_value=Decimal("
|
|
29
|
+
tick_size=6,
|
|
30
|
+
unit_value=Decimal("1"),
|
|
32
31
|
initial_margin_requirement=Decimal("0.2"),
|
|
33
32
|
maintenance_margin_requirement=Decimal("0.1"),
|
|
34
33
|
offer_price_buffer=Decimal("0.1"),
|
|
@@ -4,8 +4,8 @@ build-backend = "uv_build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "afp-sdk"
|
|
7
|
-
version = "0.1.
|
|
8
|
-
description = "
|
|
7
|
+
version = "0.1.1"
|
|
8
|
+
description = "Autonomous Futures Protocol Python SDK"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
11
11
|
license-files = ["LICENSE"]
|
afp_sdk-0.1.0/CHANGELOG.md
DELETED
|
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
|