diff --git a/README.md b/README.md index 640d643..f8b426a 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ async def main(): client = BluefinClient( True, # agree to terms and conditions Networks[TEST_NETWORK], # network to connect with - TEST_ACCT_KEY, # private key of wallet + TEST_ACCT_KEY, # seed phrase of the wallet ) # on boards user on bluefin. Must be set to true for firs time use @@ -126,7 +126,7 @@ async def main(): client = BluefinClient( True, # agree to terms and conditions Networks[TEST_NETWORK], # network to connect with - TEST_ACCT_KEY, # private key of wallet + TEST_ACCT_KEY, # seed phrase of the wallet ) await client.init(True) @@ -179,7 +179,7 @@ async def main(): client = BluefinClient( True, # agree to terms and conditions Networks[TEST_NETWORK], # network to connect with - TEST_ACCT_KEY, # private key of wallet + TEST_ACCT_KEY, # seed phrase of the wallet ) await client.init(True) # make connection with bluefin exchange @@ -220,7 +220,7 @@ async def main(): client = BluefinClient( True, # agree to terms and conditions Networks[TEST_NETWORK], # network to connect with - TEST_ACCT_KEY, # private key of wallet + TEST_ACCT_KEY, # seed phrase of the wallet ) await client.init(True) diff --git a/examples/1.initialization.py b/examples/1.initialization.py index e878ef7..4bc64f7 100644 --- a/examples/1.initialization.py +++ b/examples/1.initialization.py @@ -15,7 +15,7 @@ async def main(): client = BluefinClient( True, # agree to terms and conditions Networks[TEST_NETWORK], # network to connect with - TEST_ACCT_KEY, # private key of wallet + TEST_ACCT_KEY, # seed phrase of the wallet ) # Initializing client for the private key provided. The second argument api_token is optional diff --git a/examples/19.Generate_readonly_token.py b/examples/19.Generate_readonly_token.py index eea55c4..706e4cf 100644 --- a/examples/19.Generate_readonly_token.py +++ b/examples/19.Generate_readonly_token.py @@ -12,7 +12,7 @@ async def main(): client = BluefinClient( True, # agree to terms and conditions Networks[TEST_NETWORK], # network to connect with - TEST_ACCT_KEY, # private key of wallet + TEST_ACCT_KEY, # seed phrase of the wallet ) # initialize the client diff --git a/examples/2.user_info.py b/examples/2.user_info.py index b7424e6..dc1e6e3 100644 --- a/examples/2.user_info.py +++ b/examples/2.user_info.py @@ -12,7 +12,7 @@ async def main(): client = BluefinClient( True, # agree to terms and conditions Networks[TEST_NETWORK], # network to connect with - TEST_ACCT_KEY, # private key of wallet + TEST_ACCT_KEY, # seed phrase of the wallet ) # initialize the client diff --git a/examples/3.balance.py b/examples/3.balance.py index bae01da..c0e418f 100644 --- a/examples/3.balance.py +++ b/examples/3.balance.py @@ -12,7 +12,7 @@ async def main(): client = BluefinClient( True, # agree to terms and conditions Networks[TEST_NETWORK], # network to connect with - TEST_ACCT_KEY, # private key of wallet + TEST_ACCT_KEY, # seed phrase of the wallet ) # initialize the client diff --git a/examples/4.placing_orders.py b/examples/4.placing_orders.py index 02619cb..52eda7f 100644 --- a/examples/4.placing_orders.py +++ b/examples/4.placing_orders.py @@ -77,7 +77,7 @@ async def main(): client = BluefinClient( True, # agree to terms and conditions Networks[TEST_NETWORK], # network to connect with - TEST_ACCT_KEY, # private key of wallet + TEST_ACCT_KEY, # seed phrase of the wallet ) await client.init(True) diff --git a/examples/5.adjusting_leverage.py b/examples/5.adjusting_leverage.py index 427df79..38b78c5 100644 --- a/examples/5.adjusting_leverage.py +++ b/examples/5.adjusting_leverage.py @@ -12,7 +12,7 @@ async def main(): client = BluefinClient( True, # agree to terms and conditions Networks[TEST_NETWORK], # network to connect with - TEST_ACCT_KEY, # private key of wallet + TEST_ACCT_KEY, # seed phrase of the wallet ) await client.init(True) diff --git a/examples/contract_call.py b/examples/contract_call.py index 321cbf3..d84e540 100644 --- a/examples/contract_call.py +++ b/examples/contract_call.py @@ -2,7 +2,7 @@ sys.path.append(os.getcwd() + "/src/") import base64 -from bluefin_client_sui.utilities import * +from bluefin_v2_client.utilities import * from config import TEST_ACCT_KEY, TEST_NETWORK from bluefin_v2_client import ( BluefinClient, @@ -22,7 +22,7 @@ async def main(): client = BluefinClient( True, # agree to terms and conditions Networks[TEST_NETWORK], # network to connect with - TEST_ACCT_KEY, # private key of wallet + TEST_ACCT_KEY, # seed phrase of the wallet ) await client.init(True) @@ -35,11 +35,6 @@ async def main(): seed = "negative repeat fold noodle symptom spirit spend trophy merge ethics math erupt" sui_wallet = SuiWallet(seed=seed) - # private_key=mnemonicToPrivateKey(seed) - # privateKeyBytes=private_key.ToBytes() - # publicKey=privateKeyToPublicKey(private_key) - # publicKeyBytes=publicKey.ToBytes() - result = mysigner.sign_tx(dec_msg, sui_wallet) print(result) diff --git a/pyproject.toml b/pyproject.toml index 3ed1012..b830e93 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "bluefin_v2_client" -version = "2.0.4" +version = "2.1.0" description = "Library to interact with Bluefin exchange protocol including its off-chain api-gateway and on-chain contracts" readme = "README.md" requires-python = ">=3.8" diff --git a/src/bluefin_v2_client/enumerations.py b/src/bluefin_v2_client/enumerations.py index 2c512fb..4f6421d 100644 --- a/src/bluefin_v2_client/enumerations.py +++ b/src/bluefin_v2_client/enumerations.py @@ -17,7 +17,6 @@ class MARKET_SYMBOLS(Enum): class TIME_IN_FORCE(Enum): - FILL_OR_KILL = "FOK" IMMEDIATE_OR_CANCEL = "IOC" GOOD_TILL_TIME = "GTT" diff --git a/src/bluefin_v2_client/interfaces.py b/src/bluefin_v2_client/interfaces.py index 35036ad..4dc4d90 100644 --- a/src/bluefin_v2_client/interfaces.py +++ b/src/bluefin_v2_client/interfaces.py @@ -48,7 +48,7 @@ class OrderSignatureResponse(RequiredOrderFields): class PlaceOrderRequest(OrderSignatureResponse): - timeInForce: TIME_IN_FORCE # FOK/IOC/GTT by default all orders are GTT + timeInForce: TIME_IN_FORCE # IOC/GTT by default all orders are GTT postOnly: bool # true/false, default is true cancelOnRevert: bool # if true, the order will be cancelled in case of on-chain settlement error, default is false clientId: str # id of the client diff --git a/src/check.py b/src/check.py index 0c62fff..bcc05b2 100644 --- a/src/check.py +++ b/src/check.py @@ -11,7 +11,7 @@ async def main(): client = BluefinClient( True, # agree to terms and conditions Networks[TEST_NETWORK], # network to connect with - TEST_ACCT_KEY, # private key of wallet + TEST_ACCT_KEY, # seed phrase of the wallet ) # Initializing client for the private key provided. The second argument api_token is optional