Global_ResponseModels¶
AccountBalanceModel¶
- class AccountBalanceModel(*, accountName: str = None, accountHdPath: str = None, coinType: CoinType, amountConfirmed: Money, amountUnconfirmed: Money, spendableAmount: Money = None, addresses: List[AddressModel] = None)¶
A pydantic model for account balance.
- account_name: str | None¶
The account name. Will be None for multisig.
- account_hd_path: str | None¶
The account HD path. Will be None for multisig.
- addresses: List[AddressModel] | None¶
A list of addresses.
AddressBalanceModel¶
AddressDescriptor¶
AddressesModel¶
- class AddressesModel(*, addresses: List[AddressModel])¶
A pydantic model for a list of addressmodels.
- addresses: List[AddressModel]¶
The list of address models.
AddressModel¶
BlockModel¶
- class BlockModel(*, hash: uint256, confirmations: int, size: int, weight: int, height: int, version: int, versionHex: str, merkleroot: hexstr, tx: List[uint256] = None, time: datetime, mediantime: datetime, nonce: int, bits: str, difficulty: float, chainwork: str, nTx: int, previousblockhash: uint256 = None, nextblockhash: uint256 = None, signature: str = None, modifierv2: str = None, flags: str = None, hashproof: str = None, blocktrust: str = None, chaintrust: str = None)¶
A pydantic model of a block.
- confirmations: int¶
The number of confirmations.
- size: int¶
The size of the block.
- weight: int¶
The weight of the block.
- height: int¶
The height of the block.
- version: int¶
The block version.
- version_hex: str¶
The block version in hex.
- time: datetime¶
The time the block was produced.
- median_time: datetime¶
The median time.
- nonce: int¶
The block’s nonce.
- bits: str¶
The block bits.
- difficulty: float¶
The block difficulty.
- chainwork: str¶
The chain work.
- n_tx: int¶
The number of transactions in the block.
- signature: str | None¶
The signature.
- modifier_v2: str | None¶
The block modifier.
- flags: str | None¶
Block flags.
- hashproof: str | None¶
Block hashproof.
- blocktrust: str | None¶
Blocktrust.
- chaintrust: str | None¶
Chaintrust.
BlockTransactionDetailsModel¶
- class BlockTransactionDetailsModel(*, hash: uint256, confirmations: int, size: int, weight: int, height: int, version: int, versionHex: str, merkleroot: hexstr, tx: List[uint256] = None, time: datetime, mediantime: datetime, nonce: int, bits: str, difficulty: float, chainwork: str, nTx: int, previousblockhash: uint256 = None, nextblockhash: uint256 = None, signature: str = None, modifierv2: str = None, flags: str = None, hashproof: str = None, blocktrust: str = None, chaintrust: str = None, Transactions: List[TransactionModel])¶
A pydantic model for block transaction details.
- transactions: List[TransactionModel]¶
A list of transactions.
- confirmations: int¶
The number of confirmations.
- size: int¶
The size of the block.
- weight: int¶
The weight of the block.
- height: int¶
The height of the block.
- version: int¶
The block version.
- version_hex: str¶
The block version in hex.
- time: datetime¶
The time the block was produced.
- median_time: datetime¶
The median time.
- nonce: int¶
The block’s nonce.
- bits: str¶
The block bits.
- difficulty: float¶
The block difficulty.
- chainwork: str¶
The chain work.
- n_tx: int¶
The number of transactions in the block.
- signature: str | None¶
The signature.
- modifier_v2: str | None¶
The block modifier.
- flags: str | None¶
Block flags.
- hashproof: str | None¶
Block hashproof.
- blocktrust: str | None¶
Blocktrust.
- chaintrust: str | None¶
Chaintrust.
BuildContractTransactionModel¶
- class BuildContractTransactionModel(*, fee: Money, hex: hexstr, message: str = None, success: bool = None, transactionId: uint256 = None)¶
A pydantic model for building a smart contact transaction.
- message: str | None¶
The build transaction message.
- success: bool | None¶
True if build was successful.
BuildCreateContractTransactionModel¶
- class BuildCreateContractTransactionModel(*, fee: Money, hex: hexstr, message: str = None, success: bool = None, transactionId: uint256 = None, newContractAddress: Address)¶
A pydantic model for a create smart contact transaction.
- message: str | None¶
The build transaction message.
- success: bool | None¶
True if build was successful.
BuildOfflineSignModel¶
- class BuildOfflineSignModel(*, walletName: str, walletAccount: str, unsignedTransaction: hexstr, fee: Money, utxos: List[UtxoDescriptor], addresses: List[AddressDescriptor])¶
A pydantic model for a built offline sign request.
- wallet_name: str¶
The wallet name.
- wallet_account: str¶
The wallet account.
- utxos: List[UtxoDescriptor]¶
The utxos included in the transaction.
- addresses: List[AddressDescriptor]¶
The addresses and amounts receiving outputs.
BuildTransactionModel¶
MaturedBlockInfoModel¶
PollViewModel¶
- class PollViewModel(*, IsPending: bool, IsExecuted: bool, Id: int, PollVotedInFavorBlockDataHash: uint256 = None, PollVotedInFavorBlockDataHeight: int = None, PollStartFavorBlockDataHash: uint256 = None, PollStartFavorBlockDataHeight: int = None, PollExecutedBlockDataHash: uint256 = None, PollExecutedBlockDataHeight: int = None, PubKeysHexVotedInFavor: List[PubKey], VotingDataString: str)¶
A pydantic model for polling data.
- is_pending: bool¶
If true, poll is pending.
- is_executed: bool¶
If true, poll has been executed.
- poll_id: int¶
The poll id.
- poll_voted_in_favor_blockdata_height: int | None¶
If voted in favor, the height of the block.
- poll_start_favor_blockdata_height: int | None¶
The block height when polling started.
- poll_executed_blockdata_height: int | None¶
The block height when poll was executed, if executed.
- voting_data_string: str¶
Voting data.
RemovedTransactionModel¶
ScriptPubKey¶
- class ScriptPubKey(*, asm: str, hex: str, type: str, reqSigs: int = None, addresses: List[str] = None)¶
A ScriptPubKey.
A ScriptPubKey is a part of transaction’s output, and is the second half of a script.
Note
Learn more about transaction structure.
- req_sigs: int | None¶
The number of required signatures.
- asm: str¶
The assembly representation of the script.
- hex: str¶
The hex representation of the script.
- addresses: List[str] | None¶
A list of output addresses.
ScriptSig¶
- class ScriptSig(*, asm: str, hex: str)¶
Represents ScriptSig.
A ScriptSig is a part of transaction’s input, and is the first half of a script.
Note
Learn more about transaction structure.
- asm: str¶
The assembly representation of the script.
- hex: str¶
The hex representation of the script.
TransactionModel¶
- class TransactionModel(*, hex: hexstr, txid: uint256, hash: uint256, version: int, size: int, vsize: int, weight: int, locktime: int, vin: List[VIn], vout: List[VOut], blockhash: uint256 = None, confirmations: int = None, time: datetime = None, blocktime: datetime = None)¶
A pydantic model for a transaction.
- version: int¶
The transaction version.
- size: int¶
The transaction size.
- vsize: int¶
The transaction vsize.
- weight: int¶
The transaction weight.
- locktime: int¶
The transaction locktime.
- confirmations: int | None¶
The number of confirmations of the transaction.
- time: datetime | None¶
The transaction time.
- blocktime: datetime | None¶
The blocktime.
TransactionOutputModel¶
UtxoDescriptor¶
VIn¶
- class VIn(*, coinbase: str = None, txid: str = None, vout: int = None, scriptSig: ScriptSig = None, sequence: int)¶
Represents transaction’s input.
Note
Learn more about transaction input structure.
- coinbase: str | None¶
Three scriptSig off this was a coinbase transaction.
- txid: str | None¶
The transaction hash.
- vout: int | None¶
The index of the output.
- sequence: int¶
The transaction’s sequence number.
VOut¶
- class VOut(*, value: Money, n: int, scriptPubKey: ScriptPubKey)¶
Represents transaction’s output.
Note
Learn more about transaction output structure and scriptPubKey.
- n: int¶
The index of the output.
- script_pubkey: ScriptPubKey¶
The output’s scriptPubKey.
WalletBalanceModel¶
- class WalletBalanceModel(*, balances: List[AccountBalanceModel])¶
A pydantic model for a wallet balance.
- balances: List[AccountBalanceModel]¶
A list of account balances.
WalletGeneralInfoModel¶
- class WalletGeneralInfoModel(*, walletName: str = None, network: str, creationTime: datetime, isDecrypted: bool, lastBlockSyncedHeight: int, chainTip: int, isChainSynced: bool, connectedNodes: int)¶
A model representing general wallet info.
- wallet_name: str | None¶
The name of the wallet. Will be None for multisig.
- network: str¶
The name of the network the wallet is operating on.
- creation_time: datetime¶
The datetime of wallet creation
- is_decrypted: bool¶
If true, wallet is decrypted.
- last_block_synced_height: int¶
The height of last block synced by wallet.
- chain_tip: int¶
The height off the chain tip.
- is_chain_synced: bool¶
If true, chain is synced.
- connected_nodes: int¶
The number of connected nodes.
WalletSendTransactionModel¶
- class WalletSendTransactionModel(*, transactionId: uint256, outputs: List[TransactionOutputModel])¶
A pydantic model for a send transaction response.
- outputs: List[TransactionOutputModel]¶
A list of transaction outputs.