Core
Subpackages
CoinType
- class CoinType(value)
Enum representing type of coin, as specified in BIP44. Registered cointypes specified in SLIP44.
Corresponding type from StratisFullNode’s implementation can be found here.
Note
Coin type for Cirrus mainnet is not a registered coin type (as well as testnets). According to SLIP44, ID 401 belongs to another coin, that has nothing to do with Statis Platform.
- Bitcoin = 0
- Testnet = 1
- CirrusTest = 400
- Cirrus = 401
- Strax = 105105
ContractTransactionItemType
ConversionRequestStatus
- class ConversionRequestStatus(value)
Enum representing status of interop conversion request.
Corresponding type from StratisFullNode’s implementation can be found here.
- Unprocessed = 0
- Submitted = 1
- Processed = 2
- OriginatorNotSubmitted = 3
- OriginatorSubmitted = 4
- VoteFinalised = 5
- NotOriginator = 6
ConversionRequestType
CrosschainTransferStatus
Deposit
- class Deposit(*, id: uint256, amount: Money, targetAddress: Address, targetChain: DestinationChain = None, blockNumber: int, blockHash: uint256, retrievalType: DepositRetrievalType)
A pydantic model representing a deposit made to a sidechain mutlisig, with the aim of triggering a cross chain transfer.
Note
Learn how to acquire CRS token using GUI.
- target_address: Address
The target address, on the target chain, for the fund deposited on the multisig.
- target_chain: Optional[DestinationChain]
Chain on which STRAX minting or burning should occur.
- block_number: int
The block number where the source deposit has been persisted.
- retrieval_type: DepositRetrievalType
Whether the deposit is a “faster” or “normal” deposit.
DepositRetrievalType
- class DepositRetrievalType(value)
Represents type of deposit retrival.
Small deposits are processed after IFederatedPegSettings.MinimumConfirmationsSmallDeposits confirmations (blocks).
Normal deposits are processed after IFederatedPegSettings.MinimumConfirmationsNormalDeposits confirmations (blocks).
Large deposits are only processed after the height has increased past max re-org (IFederatedPegSettings.MinimumConfirmationsLargeDeposits) confirmations (blocks).
Conversion deposits are processed after similar intervals to the above, according to their size.
Reward distribution deposits are only processed after the height has increased past max re-org (IFederatedPegSettings.MinimumConfirmationsDistributionDeposits) confirmations (blocks).
- Small = 0
- Normal = 1
- Large = 2
- Distribution = 3
- ConversionSmall = 4
- ConversionNormal = 5
- ConversionLarge = 6
DestinationChain
ExtKey
- class ExtKey(value: Union[bytes, str, Key])
Type representing extended private key, as specified in BIP32.
Corresponding type from StratisFullNode’s implementation can be found here.
- Parameters
value (bytes, str, Key) – data for a private key.
- Raises
ValueError – Attempt to create ExtKey with unsupported value type. Attempt to create with incorrect length.
- generate_private_key_bytes() bytes
Get private key from this extended private key.
- Returns
private key, represented by the first 32 bytes of extended private key.
- Return type
bytes
- generate_chain_code_bytes() bytes
Get chain code from this extended private key.
- Returns
chain code, represented by the last 32 bytes of extended private key.
- Return type
bytes
- generate_private_key_base58() str
Get Base58-encoded private key from this extended private key.
- Returns
base58-encoded private key
- Return type
str
- generate_private_key() Key
Get private key from this extended private key.
- Returns
private key.
- Return type
- generate_wif_key() str
Convert current key to Wallet import format
- Returns
WIF compilant key.
- Return type
str
- get_bytes() bytes
Get private key bytes
- Returns
raw private key data
- Return type
bytes
ExtPubKey
- class ExtPubKey(extpubkey: str)
Type representing extended public key, as specified in BIP32.
Corresponding type from StratisFullNode’s implementation can be found here.
- Parameters
extpubkey (str) – encoded extended public key.
- version
- depth
- parent_fingerprint
- index
- chain_code
- key
- checksum
Key
- class Key(value: Union[bytes, str, Key])
Type representing private key. A private key is a secret number, known only to the person that generated it.
Corresponding type from StratisFullNode’s implementation can be found here.
- Parameters
value (bytes, str, Key) – data for private key.
- Raises
ValueError – Attempt to create Key with unsupported value type.
- get_bytes() bytes
Get private key bytes
- Returns
raw private key data
- Return type
bytes
- generate_wif_key() str
Convert current key to Wallet import format
- Returns
WIF compilant key.
- Return type
str
MultisigSecret
Outpoint
PubKey
- class PubKey(value: str)
Type representing public key. A public key is the number that corresponds to a private key, but does not need to be kept secret. A public key can be calculated from a private key, but not vice versa.
A public key can be presented in compressed or uncompressed format.
Note
Read more about public key formats.
- x
- y
- uncompressed() str
Retrieves a uncompressed pubkey.
- compressed() str
Retreives a compressed pubkey.
Recipient
SmartContractParameter
- class SmartContractParameter(value_type: SmartContractParameterType, value: Any)
Type representing smart contract’s parameter.
- Parameters
value_type (SmartContractParameterType) – The type of parameter.
value – The value of the paramater.
Note
Learn more about smart contracts in Stratis Academy.
- static validate_values(value_type: SmartContractParameterType, value: Any) bool
Validates that type of value matching with value_type.
SmartContractParameterType
- class SmartContractParameterType(value)
Defines (de-)serialization rule for smart contract parameters.
Notes
Learn more about contract’s parameters serialization from Stratis Academy.
- Boolean = 1
- Byte = 2
- Char = 3
- String = 4
- UInt32 = 5
- Int32 = 6
- UInt64 = 7
- Int64 = 8
- Address = 9
- ByteArray = 10
- UInt128 = 11
- UInt256 = 12