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: Optional[str]
The account name. Will be None for multisig.
- account_hd_path: Optional[str]
The account HD path. Will be None for multisig.
- addresses: Optional[List[AddressModel]]
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.datetime, mediantime: datetime.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.datetime
The time the block was produced.
- median_time: datetime.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: Optional[str]
The signature.
- modifier_v2: Optional[str]
The block modifier.
- flags: Optional[str]
Block flags.
- hashproof: Optional[str]
Block hashproof.
- blocktrust: Optional[str]
Blocktrust.
- chaintrust: Optional[str]
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.datetime, mediantime: datetime.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.
- hash: uint256
The block hash.
- 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.
- merkleroot: hexstr
The block merkleroot.
- tx: Optional[List[uint256]]
A list of transactions in the block.
- 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.
- previous_blockhash: Optional[uint256]
The previous block hash.
- next_blockhash: Optional[uint256]
The next block hash.
- signature: Optional[str]
The signature.
- modifier_v2: Optional[str]
The block modifier.
- flags: Optional[str]
Block flags.
- hashproof: Optional[str]
Block hashproof.
- blocktrust: Optional[str]
Blocktrust.
- chaintrust: Optional[str]
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: Optional[str]
The build transaction message.
- success: Optional[bool]
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.
- fee: Money
The transaction fee.
- hex: hexstr
The hex serialized transaction.
- message: Optional[str]
The build transaction message.
- success: Optional[bool]
True if build was successful.
- transaction_id: Optional[uint256]
The transaction hash, if build 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: Optional[int]
If voted in favor, the height of the block.
- poll_start_favor_blockdata_height: Optional[int]
The block height when polling started.
- poll_executed_blockdata_hash: Optional[uint256]
The block hash when poll was executed, if executed.
- poll_executed_blockdata_height: Optional[int]
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: Optional[int]
The number of required signatures.
- asm: str
The assembly representation of the script.
- hex: str
The hex representation of the script.
- addresses: Optional[List[str]]
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.datetime = None, blocktime: datetime.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: Optional[int]
The number of confirmations of the transaction.
- time: Optional[datetime.datetime]
The transaction time.
- blocktime: Optional[datetime.datetime]
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: Optional[str]
Three scriptSig off this was a coinbase transaction.
- txid: Optional[str]
The transaction hash.
- vout: Optional[int]
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.datetime, isDecrypted: bool, lastBlockSyncedHeight: int, chainTip: int, isChainSynced: bool, connectedNodes: int)
A model representing general wallet info.
- wallet_name: Optional[str]
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.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.