Skip to content

Commit 713a5ff

Browse files
committed
add docs to get_account_info
1 parent 7322251 commit 713a5ff

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

convex_api/convex_api.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,30 @@ def transfer(self, to_address_account, amount, account):
182182
return result
183183

184184
def get_account_info(self, address_account):
185+
"""
186+
Get account information. This will only work with an account that has a balance or has had some transactions
187+
processed on the convex network. New accounts with no transfer or transactions will raise:
188+
189+
ConvexRequestError(404, 'The Account for this Address does not exist.') error
190+
191+
The returned information is dictionary of account information.
192+
193+
:param Account, str address_account: Account or str address of an account to get current information on.
194+
:returns: dict of information, such as
195+
196+
{
197+
"address": "7E66429CA9c10e68eFae2dCBF1804f0F6B3369c7164a3187D6233683c258710f",
198+
"is_library": false,
199+
"is_actor": false,
200+
"memory_size": 75,
201+
"allowance": 10000000,
202+
"type": "user",
203+
"balance": 10000000000,
204+
"sequence": 0,
205+
"environment": {}
206+
}
207+
208+
"""
185209
if isinstance(address_account, str):
186210
address = remove_0x_prefix(address_account)
187211
else:

0 commit comments

Comments
 (0)