Skip to main content

RgbWallet

Struct RgbWallet 

Source
pub struct RgbWallet<W: WalletProvider, S: StashProvider = MemStash, H: StateProvider = MemState, I: IndexProvider = MemIndex> { /* private fields */ }

Implementations§

Source§

impl<W: WalletProvider, S: StashProvider, H: StateProvider, I: IndexProvider> RgbWallet<W, S, H, I>

Source

pub fn stock(&self) -> &Stock<S, H, I>

Method borrowing RgbWallet::stock field.

Source

pub fn wallet(&self) -> &W

Method borrowing RgbWallet::wallet field.

Source§

impl<K, D: DescriptorRgb + Descriptor<K>, S: StashProvider, H: StateProvider, I: IndexProvider> RgbWallet<Wallet<K, D>, S, H, I>

Source

pub fn load( stock_path: PathBuf, wallet_path: PathBuf, autosave: bool, ) -> Result<Self, WalletError>

Source§

impl<W: WalletProvider, S: StashProvider, H: StateProvider, I: IndexProvider> RgbWallet<W, S, H, I>

Source

pub fn new(stock: Stock<S, H, I>, wallet: W) -> Self

Source

pub fn stock_mut(&mut self) -> &mut Stock<S, H, I>

Source

pub fn wallet_mut(&mut self) -> &mut W

Source

pub fn history( &self, contract_id: ContractId, ) -> Result<Vec<ContractOp>, StockError<S, H, I>>

Source

pub fn pay<P: RgbPropKeyExt, O: RgbOutExt<P>>( &mut self, invoice: &RgbInvoice, params: TransferParams, ) -> Result<(W::Psbt, PsbtMeta, Transfer), PayError>

Source

pub fn construct_psbt<P: RgbPropKeyExt, O: RgbOutExt<P>>( &mut self, invoice: &RgbInvoice, params: TransferParams, ) -> Result<(W::Psbt, PsbtMeta), CompositionError>

Source

pub fn transfer( &mut self, invoice: &RgbInvoice, psbt: &mut W::Psbt, beneficiary_vout: Option<u32>, ) -> Result<Transfer, CompletionError>

Auto Trait Implementations§

§

impl<W, S, H, I> Freeze for RgbWallet<W, S, H, I>
where W: Freeze, S: Freeze, H: Freeze, I: Freeze,

§

impl<W, S, H, I> RefUnwindSafe for RgbWallet<W, S, H, I>

§

impl<W, S, H, I> Send for RgbWallet<W, S, H, I>
where W: Send, S: Send, H: Send, I: Send,

§

impl<W, S, H, I> Sync for RgbWallet<W, S, H, I>
where W: Sync, S: Sync, H: Sync, I: Sync,

§

impl<W, S, H, I> Unpin for RgbWallet<W, S, H, I>
where W: Unpin, S: Unpin, H: Unpin, I: Unpin,

§

impl<W, S, H, I> UnsafeUnpin for RgbWallet<W, S, H, I>

§

impl<W, S, H, I> UnwindSafe for RgbWallet<W, S, H, I>

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V