@@ -25,10 +25,10 @@ class KinClient(object):
25
25
26
26
def __init__ (self , environment ):
27
27
"""Create a new instance of the KinClient to query the Kin blockchain.
28
- :param ` kin.Environment` environment: an environment for the client to point to.
28
+ :param kin.Environment environment: an environment for the client to point to.
29
29
30
30
:return: An instance of the KinClient.
31
- :rtype: :class:` KinErrors.KinClient`
31
+ :rtype: KinErrors.KinClient
32
32
"""
33
33
34
34
self .environment = environment
@@ -41,12 +41,12 @@ def kin_account(self, seed, channel_secret_keys=None, app_id=ANON_APP_ID):
41
41
"""
42
42
Create a new instance of a KinAccount to perform authenticated operations on the blockchain.
43
43
:param str seed: The secret seed of the account that will be used
44
- :param list of str channel_secret_keys: A list of seeds to be used as channels
44
+ :param list[ str] channel_secret_keys: A list of seeds to be used as channels
45
45
:param str app_id: the unique id of your app
46
46
:return: An instance of KinAccount
47
47
:rtype: kin.KinAccount
48
48
49
- :raises: :class:` KinErrors.AccountNotFoundError`: if SDK wallet or channel account is not yet created.
49
+ :raises: KinErrors.AccountNotFoundError if SDK wallet or channel account is not yet created.
50
50
"""
51
51
52
52
# Create a new kin account, using self as the KinClient to be used
@@ -101,7 +101,7 @@ def get_account_balance(self, address):
101
101
:rtype: float
102
102
103
103
:raises: StellarAddressInvalidError: if the provided address has the wrong format.
104
- :raises: :class:` KinErrors.AccountNotFoundError`: if the account does not exist.
104
+ :raises: KinErrors.AccountNotFoundError if the account does not exist.
105
105
"""
106
106
107
107
if not is_valid_address (address ):
@@ -119,7 +119,7 @@ def does_account_exists(self, address):
119
119
:return: does the account exists on the blockchain
120
120
:rtype boolean
121
121
122
- :raises: :class:` KinErrors.StellarAddressInvalidError`: if the address is not valid.
122
+ :raises: KinErrors.StellarAddressInvalidError if the address is not valid.
123
123
"""
124
124
125
125
if not is_valid_address (address ):
@@ -137,7 +137,7 @@ def get_account_data(self, address):
137
137
:param str address: the public address of the account to query.
138
138
139
139
:return: account data
140
- :rtype: :class:` kin.AccountData`
140
+ :rtype: kin.blockchain.horizon_models. AccountData
141
141
142
142
:raises: StellarAddressInvalidError: if the provided address has a wrong format.
143
143
:raises: :class:`KinErrors.AccountNotFoundError`: if the account does not exist.
@@ -161,7 +161,7 @@ def get_transaction_data(self, tx_hash, simple=True):
161
161
:param boolean simple: (optional) returns a simplified transaction object
162
162
163
163
:return: transaction data
164
- :rtype: :class:` kin.TransactionData` or ` kin.SimplifiedTransaction`
164
+ :rtype: kin.transactions.RawTransaction | kin.transactions. SimplifiedTransaction
165
165
166
166
:raises: ValueError: if the provided hash is invalid.
167
167
:raises: :class:`KinErrors.ResourceNotFoundError`: if the transaction does not exist.
@@ -189,7 +189,7 @@ def get_account_tx_history(self, address, amount=10, descending=True, cursor=Non
189
189
:param int cursor: The horizon paging token
190
190
:param bool simple: Should the returned txs be simplified, if True, complicated txs will be ignored
191
191
:return: A list of transactions
192
- :rtype: list
192
+ :rtype: list[kin.transactions.RawTransaction | kin.transactions.SimplifiedTransaction]
193
193
"""
194
194
195
195
if not is_valid_address (address ):
@@ -264,13 +264,14 @@ def friendbot(self, address):
264
264
"""
265
265
Use the friendbot service to create and fund an account
266
266
:param str address: The address to create and fund
267
- :return: the hash of the friendobt transaction
267
+
268
+ :return: the hash of the friendbot transaction
268
269
:rtype str
269
270
270
271
:raises ValueError: if no friendbot service was provided
271
272
:raises ValueError: if the address is invalid
272
- :raises :class: ` KinErrors.AccountExistsError`: if the account already exists
273
- :raises :class: ` KinErrors.FriendbotError`: If the friendbot request failed
273
+ :raises KinErrors.AccountExistsError if the account already exists
274
+ :raises KinErrors.FriendbotError If the friendbot request failed
274
275
"""
275
276
276
277
if self .environment .friendbot_url is None :
@@ -294,14 +295,14 @@ def monitor_account_payments(self, address, callback_fn):
294
295
:param str address: the address of the account to query.
295
296
296
297
:param callback_fn: the function to call on each received payment as `callback_fn(address, tx_data, monitor)`.
297
- :type: callable[str,:class:` kin.TransactionData`,:class:` kin.SingleMonitor` ]
298
+ :type: callable[str,kin.transactions.SimplifiedTransaction, kin.SingleMonitor]
298
299
299
300
:return: a monitor instance
300
- :rtype: :class:` kin.SingleMonitor`
301
+ :rtype: kin.monitors. SingleMonitor
301
302
302
303
:raises: ValueError: when no address is given.
303
304
:raises: ValueError: if the address is in the wrong format
304
- :raises: :class:` KinErrors.AccountNotActivatedError`: if the account given is not activated
305
+ :raises: KinErrors.AccountNotActivatedError if the account given is not activated
305
306
"""
306
307
307
308
return SingleMonitor (self , address , callback_fn )
@@ -313,14 +314,14 @@ def monitor_accounts_payments(self, addresses, callback_fn):
313
314
:param str addresses: the addresses of the accounts to query.
314
315
315
316
:param callback_fn: the function to call on each received payment as `callback_fn(address, tx_data, monitor)`.
316
- :type: callable[str,:class:` kin.TransactionData`,:class:` kin.MultiMonitor` ]
317
+ :type: callable[str,kin.transactions.SimplifiedTransaction , kin.monitors. MultiMonitor]
317
318
318
319
:return: a monitor instance
319
- :rtype: :class:` kin.MultiMonitor`
320
+ :rtype: kin.monitors. MultiMonitor
320
321
321
322
:raises: ValueError: when no address is given.
322
323
:raises: ValueError: if the addresses are in the wrong format
323
- :raises: :class:` KinErrors.AccountNotActivatedError`: if the accounts given are not activated
324
+ :raises: KinErrors.AccountNotActivatedError if the accounts given are not activated
324
325
"""
325
326
326
327
return MultiMonitor (self , addresses , callback_fn )
0 commit comments