Staking
Staking
- class Staking(**kwargs)
Implements the staking api endpoints.
- get_staking_info(**kwargs) GetStakingInfoModel
Gets current staking information.
- Parameters
**kwargs – Extra keyword arguments.
- Returns
Information about current staking status.
- Return type
- Raises
APIError – Error thrown by node API. See message for details.
- start_staking(name: str, password: str, **kwargs) None
Start staking
- Parameters
name (str) – The wallet name.
password (str) – The wallet password.
**kwargs – Extra keyword arguments.
- Returns
None
- Raises
APIError – Error thrown by node API. See message for details.
- start_multistaking(wallet_credentials: List[WalletSecret], **kwargs) None
Start staking for multiple wallets simultaneously
- Parameters
wallet_credentials (List[WalletSecret]) – A list of wallet credentials to launch staking of multiple wallets with one command.
**kwargs – Extra keyword arguments.
- Returns
None
- Raises
APIError – Error thrown by node API. See message for details.
GetStakingInfoModel
- class GetStakingInfoModel(*, enabled: bool, staking: bool, errors: str = None, currentBlockSize: int, currentBlockTx: int, pooledTx: int, difficulty: float, searchInterval: int, weight: int, netStakeWeight: int = None, immature: int, expectedTime: int)
A pydantic model for staking information.
- enabled: bool
If true, staking is enabled.
- staking: bool
If true, is currently staking.
- errors: Optional[str]
Error messages, if present.
- current_blocksize: int
The current block size.
- current_block_tx: int
The current number of block transactions.
- pooled_tx: int
The number of pooled transactions.
- difficulty: float
The current difficulty.
- search_interval: int
The search interval.
- weight: int
The current staking weight.
- net_stake_weight: Optional[int]
The network staking weight.
- immature: int
The number of immature coins that can’t stake.
- expected_time: int
The expected number of seconds between stakes.