Core

CoinType

class CoinType

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
Cirrus = 401
CirrusTest = 400
Strax = 105105
Testnet = 1

ContractTransactionItemType

class ContractTransactionItemType

Enum representing type of contract-related transaction item.

Corresponding type from StratisFullNode’s implementation can be found here.

ContractCall = 3
ContractCreate = 4
GasRefund = 5
Received = 0
Send = 1
Staked = 2

ConversionRequestStatus

class ConversionRequestStatus

Enum representing status of interop conversion request.

Corresponding type from StratisFullNode’s implementation can be found here.

NotOriginator = 6
OriginatorNotSubmitted = 3
OriginatorSubmitted = 4
Processed = 2
Submitted = 1
Unprocessed = 0
VoteFinalised = 5

ConversionRequestType

class ConversionRequestType

Enum representing type of interop conversion request.

Corresponding type from StratisFullNode’s implementation can be found here.

Burn = 1
Mint = 0

CrosschainTransferStatus

class CrossChainTransferStatus

Enum representing status of cross chain status.

Corresponding type from StratisFullNode’s implementation can be found here.

FullySigned = 'FullySigned'
Partial = 'Partial'
Rejected = 'Rejected'
SeenInBlock = 'SeenInBlock'
Suspended = 'Suspended'

Deposit

class Deposit

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.

DepositRetrievalType

class DepositRetrievalType

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).

ConversionLarge = 6
ConversionNormal = 5
ConversionSmall = 4
Distribution = 3
Large = 2
Normal = 1
Small = 0

DestinationChain

class DestinationChain

Chains supported by InterFlux integration. Symbols are defined according to the SLIP44 specification.

ADA = 5
AVAX = 4
BNB = 2
ETC = 3
ETH = 1
STRAX = 0

ExtKey

class ExtKey(value: Union[bytes, str, pystratis.core.key.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_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() → pystratis.core.key.Key

Get private key from this extended private key.

Returns:private key.
Return type:Key
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_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
classmethod validate(v) → pystratis.core.key.Key

pydantic model validation

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.
static calculate_checksum() → bytes

Calculates 4-bytes long checksum of payload

Parameters:payload (bytes) – data to calculate checksum from
Returns:4-bytes checksum
Return type:bytes
decode_extpubkey(extpubkey: str)

Deserialize extended public key, as specified in BIP32.

Parameters:extpubkey (str) – Base58 encoded serialized extended public key.
Raises:AssertionError – extpubkey has incorrect format.
get_payload() → bytes

Serialize extended public key, as specified in BIP32.

Returns:serialized extended public key.
Return type:bytes
classmethod validate_class(value) → pystratis.core.extpubkey.ExtPubKey

pydantic model validation

Key

class Key(value: Union[bytes, str, pystratis.core.key.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.
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
classmethod validate(v) → pystratis.core.key.Key

pydantic model validation

MultisigSecret

class MultisigSecret

A MultisigSecret.

Outpoint

class Outpoint

A pydantic model representing an 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.

compressed() → str

Retreives a compressed pubkey.

uncompressed() → str

Retrieves a uncompressed pubkey.

Recipient

class Recipient

A pydantic model for a recipient.

SmartContractParameter

class SmartContractParameter(value_type: pystratis.core.smartcontractparametertype.SmartContractParameterType, value: Any)

Type representing smart contract’s parameter.

Parameters:

Note

Learn more about smart contracts in Stratis Academy.

static validate_values(value: Any) → bool

Validates that type of value matching with value_type.

SmartContractParameterType

class SmartContractParameterType

Defines (de-)serialization rule for smart contract parameters.

Notes

Learn more about contract’s parameters serialization from Stratis Academy.

Address = 9
Boolean = 1
Byte = 2
ByteArray = 10
Char = 3
Int32 = 6
Int64 = 8
String = 4
UInt128 = 11
UInt256 = 12
UInt32 = 5
UInt64 = 7

TransactionItemType

class TransactionItemType

A TransactionItemType.

Mined = 'mined'
Received = 'received'
Send = 'send'
Staked = 'staked'

WalletSecret

class WalletSecret

A pydantic model representing credentials of the wallet.