Skip to content

Commit f5507cc

Browse files
committed
improve readme docs
1 parent 6115b2b commit f5507cc

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,28 @@ First you need to download the Convex-API-py package from the python package ind
1010

1111
pip install convex-api
1212

13-
You can now access the convex network using the following python commands.
13+
You can now access the convex network, and get a balance from an existing account on the network by doing the following:
1414

1515
>>> from convex_api import ConvexAPI
1616
>>> convex = ConvexAPI('https://convex.world')
1717
>>> convex.get_balance('0x7E66429CA9c10e68eFae2dCBF1804f0F6B3369c7164a3187D6233683c258710f')
1818
524786120
1919

20-
You can create a new account by doing the following:
20+
You can create a new emtpy account, with now balance:
2121

2222
>>> from convex_api import Account
2323
>>> account = Account.create_new()
2424
>>> print(account.address_checksum)
25-
0x6F0e5f252B31Dc78d460Dd301ab571F47f8Bb0d7557Afff8D26A12655Dc2F6aF ```
25+
0x6F0e5f252B31Dc78d460Dd301ab571F47f8Bb0d7557Afff8D26A12655Dc2F6aF
2626

27-
You can request some funds to the new account and see the account information:
27+
You can request some funds to the new account and then get the account information:
2828

2929
>>> convex.request_funds(1000000, account)
3030
1000000
3131
>>> convex.get_account_info(account)
3232
{'environment': {}, 'address': '6f0e5f252b31dc78d460dd301ab571f47f8bb0d7557afff8d26a12655dc2f6af', 'is_library': False, 'is_actor': False, 'memory_size': 8, 'balance': 1000000, 'allowance': 0, 'sequence': 0, 'type': 'user'}
33+
34+
You can export the accounts private key encoded as PKCS8 encrypt the key with a password:
35+
36+
>>> account.export_to_text('secret')
37+
'-----BEGIN ENCRYPTED PRIVATE KEY-----\nMIGbMFcGCSqGSIb3DQEFDTBKMCkGCSqGSIb3DQEFDDAcBAizl38718A38wICCAAw\nDAYIKoZIhvcNAgkFADAdBglghkgBZQMEASoEEGOHaBSsm8TSScgUSBK8pDAEQJCL\nMmES7ElmI+SB7xmfRdFq8Afh4FE9rhOsb6vSWlTkWcYDoZ8T4hYuZ9NDPJ/nNIsi\nh9Kwp0dVyN7SczuZqi0=\n-----END ENCRYPTED PRIVATE KEY-----\n'

0 commit comments

Comments
 (0)