Skip to main content

GetAddressInfoResponse

Struct GetAddressInfoResponse 

Source
pub struct GetAddressInfoResponse {
Show 24 fields pub address: String, pub desc: Option<String>, pub embedded: Option<Value>, pub hdkeypath: Option<String>, pub hdmasterfingerprint: Option<String>, pub hdseedid: Option<String>, pub hex: Option<String>, pub ischange: bool, pub iscompressed: Option<bool>, pub ismine: bool, pub isscript: Option<bool>, pub iswatchonly: bool, pub iswitness: bool, pub labels: Value, pub parent_desc: Option<String>, pub pubkey: Option<String>, pub pubkeys: Option<Value>, pub script: Option<ScriptBuf>, pub scriptPubKey: ScriptBuf, pub sigsrequired: Option<u64>, pub solvable: bool, pub timestamp: Option<u64>, pub witness_program: Option<String>, pub witness_version: Option<u64>,
}
Expand description

Response for the GetAddressInfo RPC method

Fields§

§address: String

The bitcoin address validated.

§desc: Option<String>

A descriptor for spending coins sent to this address (only when solvable).

§embedded: Option<Value>

Information about the address embedded in P2SH or P2WSH, if relevant and known.

§hdkeypath: Option<String>

The HD keypath, if the key is HD and available.

§hdmasterfingerprint: Option<String>

The fingerprint of the master key.

§hdseedid: Option<String>

The Hash160 of the HD seed.

§hex: Option<String>

The redeemscript for the p2sh address.

§ischange: bool

If the address was used for change output.

§iscompressed: Option<bool>

If the pubkey is compressed.

§ismine: bool

If the address is yours.

§isscript: Option<bool>

If the key is a script.

§iswatchonly: bool

(DEPRECATED) Always false.

§iswitness: bool

If the address is a witness address.

§labels: Value

Array of labels associated with the address. Currently limited to one label but returned as an array to keep the API stable if multiple labels are enabled in the future.

§parent_desc: Option<String>

The descriptor used to derive this address if this is a descriptor wallet

§pubkey: Option<String>

The hex value of the raw public key for single-key addresses (possibly embedded in P2SH or P2WSH).

§pubkeys: Option<Value>

Array of pubkeys associated with the known redeemscript (only if script is multisig).

§script: Option<ScriptBuf>

The output script type. Only if isscript is true and the redeemscript is known. Possible types: nonstandard, pubkey, pubkeyhash, scripthash, multisig, nulldata, witness_v0_keyhash, witness_v0_scripthash, witness_unknown.

§scriptPubKey: ScriptBuf

The hex-encoded output script generated by the address.

§sigsrequired: Option<u64>

The number of signatures required to spend multisig output (only if script is multisig).

§solvable: bool

If we know how to spend coins sent to this address, ignoring the possible lack of private keys.

§timestamp: Option<u64>

The creation time of the key, if available, expressed in UNIX epoch time.

§witness_program: Option<String>

The hex value of the witness program.

§witness_version: Option<u64>

The version number of the witness program.

Trait Implementations§

Source§

impl Clone for GetAddressInfoResponse

Source§

fn clone(&self) -> GetAddressInfoResponse

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GetAddressInfoResponse

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for GetAddressInfoResponse

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for GetAddressInfoResponse

Source§

fn eq(&self, other: &GetAddressInfoResponse) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for GetAddressInfoResponse

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for GetAddressInfoResponse

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,