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.

coin_type: CoinType

The coin type.

amount_confirmed: Money

The amount confirmed.

amount_unconfirmed: Money

The amount unconfirmed.

spendable_amount: Optional[Money]

The spendable amount. Will be None for multisig.

addresses: Optional[List[AddressModel]]

A list of addresses.

AddressBalanceModel

class AddressBalanceModel(*, address: Address, coinType: CoinType, amountConfirmed: Money, amountUnconfirmed: Money, spendableAmount: Money)

A pydantic model for an address balance.

address: Address

The address.

coin_type: CoinType

The coin type.

amount_confirmed: Money

The confirmed amount.

amount_unconfirmed: Money

The unconfirmed amount.

spendable_amount: Money

The spendable amount.

AddressDescriptor

class AddressDescriptor(*, address: Address, keyPath: str, addressType: str)

A pydantic model of an address descriptor.

address: Address

The address.

key_path: str

The key path.

address_type: str

The address type.

AddressesModel

class AddressesModel(*, addresses: List[AddressModel])

A pydantic model for a list of addressmodels.

addresses: List[AddressModel]

The list of address models.

AddressModel

class AddressModel(*, address: Address, isUsed: bool, isChange: bool, amountConfirmed: Money, amountUnconfirmed: Money)

A pydantic model representing an address with balance.

address: Address

The address.

is_used: bool

If true, the address is used.

is_change: bool

If true, the address is a change address.

amount_confirmed: Money

The amount confirmed in the address.

amount_unconfirmed: Money

The amount unconfirmed in the address.

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.

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

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.

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.

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.

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.

new_contract_address: Address

The new address associated with the smart contract.

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.

unsigned_transaction: hexstr

The unsigned transaction hex.

fee: Money

The transaction fee.

utxos: List[UtxoDescriptor]

The utxos included in the transaction.

addresses: List[AddressDescriptor]

The addresses and amounts receiving outputs.

BuildTransactionModel

class BuildTransactionModel(*, fee: Money = 0, hex: hexstr, transactionId: uint256)

A pydantic model for a built transaction.

fee: Money

The transaction fee.

hex: hexstr

The transaction hex.

transaction_id: uint256

The transaction hash.

MaturedBlockInfoModel

class MaturedBlockInfoModel(*, blockHash: uint256, blockHeight: int, blockTime: datetime.datetime)

A pydantic model representing a married block.

block_hash: uint256

The block hash.

block_height: int

The block height.

block_time: datetime.datetime

The time block was produced.

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_hash: Optional[uint256]

If voted in favor, the block of the vote.

poll_voted_in_favor_blockdata_height: Optional[int]

If voted in favor, the height of the block.

poll_start_favor_blockdata_hash: Optional[uint256]

The block hash when polling started.

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.

pubkeys_hex_voted_in_favor: List[PubKey]

A list of pubkeys voting in favor of poll.

voting_data_string: str

Voting data.

RemovedTransactionModel

class RemovedTransactionModel(*, transactionId: uint256, creationTime: datetime.datetime)

A pydantic model for a removed transaction.

transaction_id: uint256

The removed transaction hash.

creation_time: datetime.datetime

The creation time of the removed transaction.

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.

type: str

The type of script. The list of supported types can be found in sources.

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.

hex: hexstr

The transaction hex.

txid: uint256

The transaction hash.

hash: uint256

The transaction hash.

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.

vin: List[VIn]

A list of VIn.

vout: List[VOut]

A list of VOut.

blockhash: Optional[uint256]

The hash of the block containing the transaction.

confirmations: Optional[int]

The number of confirmations of the transaction.

time: Optional[datetime.datetime]

The transaction time.

blocktime: Optional[datetime.datetime]

The blocktime.

TransactionOutputModel

class TransactionOutputModel(*, address: Optional[Union[int, Address]] = None, amount: Money, opReturnData: str = None)

A pydantic model of a transaction output.

address: Optional[Union[int, Address]]

The address receiving the output.

amount: Money

The output amount.

op_return_data: Optional[str]

The OP_RETURN data, if present.

UtxoDescriptor

class UtxoDescriptor(*, transactionId: uint256, index: int, scriptPubKey: str, amount: Money)

A pydantic model of a utxo descriptor.

transaction_id: uint256

The transaction hash off the utxo.

index: int

The index of the utxo in the transaction.

script_pubkey: str

The scriptpubkey of the utxo.

amount: Money

The amount in the utxo.

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.

script_sig: Optional[ScriptSig]

The scriptSig.

sequence: int

The transaction’s sequence number.

VOut

class VOut(*, value: Money, n: int, scriptPubKey: ScriptPubKey)

Represents transaction’s output.

value: Money

The value of a transaction’s output.

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.

transaction_id: uint256

The transaction hash.

outputs: List[TransactionOutputModel]

A list of transaction outputs.