pub enum Scope {
ReadInfo,
ReadPayments,
Read,
Receive,
ManageChannels,
Spend,
Full,
}Expand description
A named bundle of permissions to grant a ClientCredentials.
Variants§
ReadInfo
Read basic info: user identity, node version, balance, and channels.
ReadPayments
Read all payments.
Read
Read everything: ReadInfo + ReadPayments, plus on-chain
descriptors, Lexe SDK clients, and other miscellaneous data.
Cannot read any secrets that would allow spending funds.
Receive
Create invoices, offers, and addresses to receive to, resync the node, and cancel payments. Cannot determine if invoices or offers were actually paid.
ManageChannels
Open and close channels.
Spend
Pay invoices, offers, and on-chain addresses; update payment notes.
Full
Full admin access: every permission granted by other scopes, plus signing with the identity pubkey, managing and revoking SDK clients, reading encrypted files, and updating the user’s Human Bitcoin Address and node settings.
Implementations§
Source§impl Scope
impl Scope
Sourcepub fn children(self) -> Vec<Scope>
pub fn children(self) -> Vec<Scope>
The other scopes this scope fully covers, i.e. its “children”. Granting a scope implies each child, so granting a child alongside its parent is redundant (but harmless).
Sourcepub fn recommended(self) -> Vec<Scope>
pub fn recommended(self) -> Vec<Scope>
Scopes recommended to be granted alongside this one, but not implied
by it: e.g. most Receive clients also want the basic reads.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Scope
impl<'de> Deserialize<'de> for Scope
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Ord for Scope
impl Ord for Scope
Source§impl PartialOrd for Scope
impl PartialOrd for Scope
impl Copy for Scope
impl Eq for Scope
impl StructuralPartialEq for Scope
Auto Trait Implementations§
impl Freeze for Scope
impl RefUnwindSafe for Scope
impl Send for Scope
impl Sync for Scope
impl Unpin for Scope
impl UnwindSafe for Scope
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.