pub struct ValidateAddress {
pub is_valid: bool,
pub address: String,
pub script_pubkey: String,
pub is_script: bool,
pub is_witness: bool,
pub witness_version: Option<i64>,
pub witness_program: Option<String>,
}Expand description
Result of JSON-RPC method validateaddress.
validateaddress “address”
Return information about the given bitcoin address. DEPRECATION WARNING: Parts of this command have been deprecated and moved to getaddressinfo. Clients must transition to using getaddressinfo to access this information before upgrading to v0.18. The following deprecated fields have moved to getaddressinfo and will only be shown here with -deprecatedrpc=validateaddress: ismine, iswatchonly, script, hex, pubkeys, sigsrequired, pubkey, addresses, embedded, iscompressed, account, timestamp, hdkeypath, kdmasterkeyid.
Arguments:
- “address” (string, required) The bitcoin address to validate
Fields§
§is_valid: boolIf the address is valid or not. If not, this is the only property returned.
address: StringThe bitcoin address validated.
script_pubkey: StringThe hex encoded scriptPubKey generated by the address.
is_script: boolIf the key is a script.
is_witness: boolIf the address is a witness address.
witness_version: Option<i64>The version number of the witness program.
witness_program: Option<String>The hex value of the witness program.
Implementations§
Source§impl ValidateAddress
impl ValidateAddress
Sourcepub fn into_model(self) -> Result<ValidateAddress, ValidateAddressError>
pub fn into_model(self) -> Result<ValidateAddress, ValidateAddressError>
Converts version specific type to a version nonspecific, more strongly typed type.
Trait Implementations§
Source§impl Clone for ValidateAddress
impl Clone for ValidateAddress
Source§fn clone(&self) -> ValidateAddress
fn clone(&self) -> ValidateAddress
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more