Skip to content

Commit 4882cd8

Browse files
committed
feat: align order utils with kuest exchange signatures
1 parent d912688 commit 4882cd8

6 files changed

Lines changed: 41 additions & 18 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
## Polymarket CLOB Python order-utils
1+
## Kuest CLOB Python order-utils
22

33
<a href='https://pypi.org/project/py-order-utils'>
44
<img src='https://img.shields.io/pypi/v/py-order-utils.svg' alt='PyPI'/>
55
</a>
66

7-
Python utilities used to generate and sign orders from Polymarket's Exchange
7+
Python utilities used to generate and sign orders for the Kuest CTF Exchange
88

99
### Install
1010

py_order_utils/builders/base_builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def _get_domain_separator(
2020
self, chain_id: int, verifying_contract: str
2121
) -> EIP712Struct:
2222
return make_domain(
23-
name="Polymarket CTF Exchange",
23+
name="CTF Exchange",
2424
version="1",
2525
chainId=str(chain_id),
2626
verifyingContract=verifying_contract,

py_order_utils/builders/order_builder.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from ..utils import generate_seed, normalize_address, prepend_zx
55
from ..model.order import Order, SignedOrder, OrderData
66
from ..model.sides import BUY, SELL
7-
from ..model.signatures import EOA, POLY_GNOSIS_SAFE, POLY_PROXY
7+
from ..model.signatures import EOA, KUEST_EIP1271, KUEST_GNOSIS_SAFE, KUEST_PROXY
88

99

1010
class OrderBuilder(BaseBuilder):
@@ -86,5 +86,6 @@ def _validate_inputs(self, data: OrderData) -> bool:
8686
or not data.expiration.isnumeric()
8787
or int(data.expiration) < 0
8888
or data.signatureType is None
89-
or data.signatureType not in [EOA, POLY_GNOSIS_SAFE, POLY_PROXY]
89+
or data.signatureType
90+
not in [EOA, KUEST_GNOSIS_SAFE, KUEST_PROXY, KUEST_EIP1271]
9091
)

py_order_utils/model/__init__.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
11
from py_order_utils.model.order import OrderData, Order, SignedOrder
2-
from py_order_utils.model.signatures import EOA, POLY_PROXY, POLY_GNOSIS_SAFE
2+
from py_order_utils.model.signatures import (
3+
EIP1271_WALLET,
4+
EOA,
5+
GNOSIS_SAFE_WALLET,
6+
KUEST_EIP1271,
7+
KUEST_GNOSIS_SAFE,
8+
KUEST_PROXY,
9+
POLY_GNOSIS_SAFE,
10+
POLY_PROXY,
11+
PROXY_WALLET,
12+
)
313
from py_order_utils.model.sides import BUY, SELL

py_order_utils/model/signatures.py

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
1-
# ECDSA EIP712 signatures signed by EOAs
1+
# ECDSA EIP712 signatures signed by EOAs.
22
EOA = 0
33

4-
# EIP712 signatures signed by EOAs that own Polymarket Proxy wallets
5-
POLY_PROXY = 1
4+
# EIP712 signatures signed by EOAs that own proxy wallets.
5+
KUEST_PROXY = 1
66

7-
# EIP712 signatures signed by EOAs that own Polymarket Gnosis safes
8-
POLY_GNOSIS_SAFE = 2
7+
# EIP712 signatures signed by EOAs that own Gnosis Safe wallets.
8+
KUEST_GNOSIS_SAFE = 2
9+
10+
# EIP-1271 signatures from contract wallets.
11+
KUEST_EIP1271 = 3
12+
13+
# Neutral aliases for consumers who don't want branded constants.
14+
PROXY_WALLET = KUEST_PROXY
15+
GNOSIS_SAFE_WALLET = KUEST_GNOSIS_SAFE
16+
EIP1271_WALLET = KUEST_EIP1271
17+
18+
# Backwards-compatible aliases.
19+
POLY_PROXY = KUEST_PROXY
20+
POLY_GNOSIS_SAFE = KUEST_GNOSIS_SAFE

setup.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
setuptools.setup(
77
name="py_order_utils",
88
version="0.3.2",
9-
author="Polymarket Engineering",
10-
author_email="engineering@polymarket.com",
11-
maintainer="Polymarket Engineering",
12-
maintainer_email="engineering@polymarket.com",
13-
description="Python utilities used to generate and sign orders from Polymarket's Exchange",
9+
author="Kuest Engineering",
10+
author_email="support@kuest.com",
11+
maintainer="Kuest Engineering",
12+
maintainer_email="support@kuest.com",
13+
description="Python utilities used to generate and sign orders for the Kuest CTF Exchange",
1414
long_description=long_description,
1515
long_description_content_type="text/markdown",
16-
url="https://github.com/polymarket/python-order-utils",
16+
url="https://github.com/kuestcom/python-order-utils",
1717
install_requires=[
1818
"eth-utils>=4.1.1",
1919
"eth-account>=0.13.0",
@@ -26,7 +26,7 @@
2626
],
2727
},
2828
project_urls={
29-
"Bug Tracker": "https://github.com/polymarket/python-order-utils",
29+
"Bug Tracker": "https://github.com/kuestcom/python-order-utils",
3030
},
3131
classifiers=[
3232
"Programming Language :: Python :: 3",

0 commit comments

Comments
 (0)