Skip to content

Commit 7405341

Browse files
committed
update docs
1 parent ab1ca24 commit 7405341

File tree

3 files changed

+28
-3
lines changed

3 files changed

+28
-3
lines changed

convex_api/account.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,21 @@
2424

2525

2626
class Account:
27+
"""
2728
29+
The Convex account class, contains the public/private keys and possibly an address.
30+
31+
You can create a new account object, it will only have it's public/private keys but does not have a valid account address.
32+
To obtain a new account address, you need to call the :py:meth:`.ConvexAPI.create_account` with the new account object.
33+
34+
This is so that you can use the same public/private keys for multiple convex accounts.
35+
36+
Once you have your new account you need to save the public/private keys using the `export..` methods and also you
37+
need to save the account address.
38+
39+
To re-use the account again, you can import the keys and set the account address using one of the `import..` methods.
40+
41+
"""
2842
def __init__(self, private_key, address=None):
2943
"""
3044
Create a new account with a private key as a Ed25519PrivateKey

convex_api/convex_api.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"""
22
3-
4-
Convex
3+
Convex API
54
65
"""
76

@@ -45,6 +44,19 @@ def __init__(self, url, language=LANGUAGE_LISP):
4544
self._language = language
4645

4746
def create_account(self, account=None, sequence_retry_count=20):
47+
"""
48+
49+
Create a new account with the convex network.
50+
51+
:param object account: Account object that you whish to use as the signing account. The Account object
52+
contains the public/private keys to access and submit commands on the convex network.
53+
54+
:param int sequence_retry_count: Number of retries to create the account. If too many clients are trying to
55+
create accounts on the same node, then we will get sequence errors.
56+
57+
:returns: A new account object, or the current supplied account object with a new `address` property set
58+
59+
"""
4860
if account is None:
4961
account = Account.create()
5062
create_account_url = urljoin(self._url, '/api/v1/createAccount')

docs/source/conf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@
104104
# Example configuration for intersphinx: refer to the Python standard library.
105105
intersphinx_mapping = {
106106
'python': ('https://docs.python.org/3', None),
107-
'starfishapi': ('https://dex-company.github.io/starfish-py', None)
108107
}
109108

110109
# -- Options for HTML output -------------------------------------------------

0 commit comments

Comments
 (0)