@@ -238,14 +238,14 @@ async def reveal_public_key_as_hex(self, address: Optional[str] = None) -> str:
238
238
return self ._write_command ("address_reveal_public_key" , [self .account , address ])['result' ]['public_key_hex' ]
239
239
240
240
async def new_address (self ) -> str :
241
- return self ._write_command (f "address_new" , [self .account ])['result' ]['address' ]
241
+ return self ._write_command ("address_new" , [self .account ])['result' ]['address' ]
242
242
243
243
async def add_standalone_multisig_address (self , min_required_signatures : int , pub_keys : List [str ], label : Optional [str ] = None ) -> str :
244
244
return self ._write_command ("standalone_add_multisig" , [self .account , min_required_signatures , pub_keys , label , None ])['result' ]
245
245
246
246
async def list_utxos (self , utxo_types : str = '' , with_locked : str = '' , utxo_states : List [str ] = []) -> List [UtxoOutpoint ]:
247
247
outputs = self ._write_command ("account_utxos" , [self .account , utxo_types , with_locked , '' .join (utxo_states )])['result' ]
248
- return [UtxoOutpoint (tx_id = match ["outpoint" ]["source_id" ]["content" ]['tx_id' ], index = int (match ["outpoint" ]['index' ])) for match in outputs ]
248
+ return [UtxoOutpoint (id = match ["outpoint" ]["source_id" ]["content" ]['tx_id' ], index = int (match ["outpoint" ]['index' ])) for match in outputs ]
249
249
250
250
async def get_transaction (self , tx_id : str ) -> str :
251
251
return self ._write_command ("transaction_get" , [self .account , tx_id ])['result' ]
@@ -270,12 +270,12 @@ async def issue_new_token(self,
270
270
number_of_decimals : int ,
271
271
metadata_uri : str ,
272
272
destination_address : str ,
273
- token_supply : Optional [int ] = None ,
273
+ token_supply_fixed : Optional [int ] = None ,
274
274
is_freezable : bool = True ):
275
- if token_supply is None :
275
+ if token_supply_fixed is None :
276
276
token_supply = { "type" : "Lockable" }
277
277
else :
278
- token_supply = { "type" : "Fixed" , "content" : {'decimal' : str (token_supply )} }
278
+ token_supply = { "type" : "Fixed" , "content" : {'decimal' : str (token_supply_fixed )} }
279
279
280
280
result = self ._write_command ('token_issue_new' , [
281
281
self .account ,
@@ -375,7 +375,7 @@ async def decommission_stake_pool(self, pool_id: str, address: str) -> str:
375
375
return "The transaction was submitted successfully"
376
376
377
377
async def submit_transaction (self , transaction : str , do_not_store : bool = False ) -> str :
378
- result = self ._write_command (f "node_submit_transaction" , [transaction , do_not_store , {}])
378
+ result = self ._write_command ("node_submit_transaction" , [transaction , do_not_store , {}])
379
379
if 'result' in result :
380
380
return f"The transaction was submitted successfully\n \n { result ['result' ]['tx_id' ]} "
381
381
else :
@@ -397,7 +397,7 @@ async def create_delegation(self, address: str, pool_id: str) -> Optional[str]:
397
397
return self ._write_command ("delegation_create" , [self .account , address , pool_id , {'in_top_x_mb' : 5 }])['result' ]['delegation_id' ]
398
398
399
399
async def stake_delegation (self , amount : int , delegation_id : str ) -> str :
400
- self ._write_command (f "delegation_stake" , [self .account , {'decimal' : str (amount )}, delegation_id , {'in_top_x_mb' : 5 }])['result' ]
400
+ self ._write_command ("delegation_stake" , [self .account , {'decimal' : str (amount )}, delegation_id , {'in_top_x_mb' : 5 }])['result' ]
401
401
return "Success"
402
402
403
403
async def list_delegation_ids (self ) -> List [DelegationData ]:
@@ -412,22 +412,22 @@ async def sync(self) -> str:
412
412
return "Success"
413
413
414
414
async def start_staking (self ) -> str :
415
- self ._write_command (f "staking_start" , [self .account ])['result' ]
415
+ self ._write_command ("staking_start" , [self .account ])['result' ]
416
416
return "Staking started successfully"
417
417
418
418
async def stop_staking (self ) -> str :
419
- self ._write_command (f "staking_stop" , [self .account ])['result' ]
419
+ self ._write_command ("staking_stop" , [self .account ])['result' ]
420
420
return "Success"
421
421
422
422
async def staking_status (self ) -> str :
423
- result = self ._write_command (f "staking_status" , [self .account ])['result' ]
423
+ result = self ._write_command ("staking_status" , [self .account ])['result' ]
424
424
if result == "Staking" :
425
425
return "Staking"
426
426
else :
427
427
return "Not staking"
428
428
429
- async def get_addresses_usage (self ) -> str :
430
- return self ._write_command ("address_show" , [self .account ])['result' ]
429
+ async def get_addresses_usage (self , with_change : bool = False ) -> str :
430
+ return self ._write_command ("address_show" , [self .account , with_change ])['result' ]
431
431
432
432
async def get_balance (self , with_locked : str = 'unlocked' , utxo_states : List [str ] = ['confirmed' ]) -> str :
433
433
with_locked = with_locked .capitalize ()
0 commit comments