Skip to main content

WalletOperatorAddressResult

Enum WalletOperatorAddressResult 

Source
pub enum WalletOperatorAddressResult {
    Known {
        address: String,
        puzzle_hash: String,
    },
    Unavailable {
        reason: WalletOperatorAddressUnavailableReason,
    },
}
Expand description

Where the node’s OWN operator wallet lives on chain — the MACHINE wallet, not the user’s.

§Two wallets, and confusing them costs real money

A node has an operator wallet of its own, derived from a machine-custody autoseed. It is the wallet that pays mirror-coin collateral, and it is NOT the wallet whose keys the user holds and whose addresses they watch. Nothing on any surface named which wallet a mirror figure was about, and the cost of that was measured: a node reported three mirror bonds unfunded, short 1010 while the operator’s OWN wallet held 1,015,000 base units of $DIG. Both statements were true and they were about different wallets. This method exists so a client can name the second one, and so somebody wanting to fund the machine wallet can find out where to send the money.

§The custody boundary (§908) is the whole design of this result

It carries an ADDRESS and a PUZZLE HASH and nothing else, and it never may carry more. Both are public values in exactly the sense a coin id or an amount is: they say WHERE money can be sent, never HOW it can be spent. A seed, a mnemonic, a private key, an extended key, a derivation path with an index, or any other material from which a spend could be authorised MUST NOT appear here, in any form, however encoded. The node signs its own mirror spends and no key ever leaves it; a method that exported one would move the node from machine custody to no custody at all.

§It is TOKEN-GATED and it is answered by THIS node

Gated rather than open because the address links this specific node to a chain identity, and a stranger able to ask any node for that mapping learns something about its operator that no other open read discloses. Owned rather than delegated because the question is which wallet does THIS node spend from — forwarding it upstream would return a different machine’s address, which is precisely the confusion the method exists to end.

Variants§

§

Known

The node knows its operator wallet and reports where it is.

Fields

§address: String

The bech32m address, xch1… on mainnet — the value a person pastes into a wallet to send this node money.

§puzzle_hash: String

The same destination as a puzzle hash: LOWERCASE 64-hex, unprefixed.

Beside the address rather than instead of it, because a client that must match this wallet against a coin record is comparing puzzle hashes, and re-deriving one from an address is a bech32m decode a consumer should not have to reimplement to answer is this coin the machine wallet’s?

§

Unavailable

The node cannot say where its operator wallet is.

A DEFINITE statement that the answer is unavailable, with the reason — never an empty string or a placeholder address. An address a client renders is an address somebody may send money to, so a fabricated or blank one is a money statement of the worst kind.

Trait Implementations§

Source§

impl Clone for WalletOperatorAddressResult

Source§

fn clone(&self) -> WalletOperatorAddressResult

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for WalletOperatorAddressResult

Source§

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

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

impl<'de> Deserialize<'de> for WalletOperatorAddressResult

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 Eq for WalletOperatorAddressResult

Source§

impl PartialEq for WalletOperatorAddressResult

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl Serialize for WalletOperatorAddressResult

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 WalletOperatorAddressResult

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.