jmwallet.wallet.models
jmwallet.wallet.models
Wallet data models.
Attributes
AddressStatus = Literal['deposit', 'cj-out', 'non-cj-change', 'new', 'reused', 'used-empty', 'bond', 'flagged']
module-attribute
Classes
AddressInfo
Information about a wallet address for display.
Source code in jmwallet/src/jmwallet/wallet/models.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | |
Attributes
address: str
instance-attribute
balance: int
instance-attribute
has_unconfirmed: bool = False
class-attribute
instance-attribute
index: int
instance-attribute
is_bond: bool = False
class-attribute
instance-attribute
is_external: bool
instance-attribute
locktime: int | None = None
class-attribute
instance-attribute
path: str
instance-attribute
short_path: str
property
Get shortened path for display (e.g., m/84'/0'/0'/0/5 -> 0/5).
status: AddressStatus
instance-attribute
CoinSelection
Result of coin selection
Source code in jmwallet/src/jmwallet/wallet/models.py
111 112 113 114 115 116 117 118 | |
Attributes
change_value: int
instance-attribute
fee: int
instance-attribute
total_value: int
instance-attribute
utxos: list[UTXOInfo]
instance-attribute
UTXOInfo
Extended UTXO information with wallet context
Source code in jmwallet/src/jmwallet/wallet/models.py
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | |
Attributes
address: str
instance-attribute
confirmations: int
instance-attribute
frozen: bool = False
class-attribute
instance-attribute
height: int | None = None
class-attribute
instance-attribute
is_fidelity_bond: bool
property
Check if this is a fidelity bond UTXO (has a locktime, regardless of expiry).
is_locked: bool
property
Check if this fidelity bond UTXO is currently locked (timelock not yet expired).
Returns False for non-fidelity-bond UTXOs.
is_p2wpkh: bool
property
Check if this UTXO is P2WPKH based on scriptpubkey.
is_p2wsh: bool
property
Check if this UTXO is P2WSH based on scriptpubkey.
is_timelocked: bool
property
Check if this is a timelocked (fidelity bond) UTXO.
Alias for is_fidelity_bond for backward compatibility.
label: str | None = None
class-attribute
instance-attribute
locktime: int | None = None
class-attribute
instance-attribute
mixdepth: int
instance-attribute
outpoint: str
property
Get the outpoint string (txid:vout) for this UTXO.