pub struct Mint {
pub lightning: Arc<dyn Lightning + Send + Sync>,
pub lightning_type: LightningType,
pub keyset_legacy: MintKeyset,
pub keyset: MintKeyset,
pub db: Arc<dyn Database + Send + Sync>,
pub dhke: Dhke,
pub onchain: Option<Arc<dyn BtcOnchain + Send + Sync>>,
pub config: MintConfig,
pub build_params: BuildParams,
}
Fields§
§lightning: Arc<dyn Lightning + Send + Sync>
§lightning_type: LightningType
§keyset_legacy: MintKeyset
§keyset: MintKeyset
§db: Arc<dyn Database + Send + Sync>
§dhke: Dhke
§onchain: Option<Arc<dyn BtcOnchain + Send + Sync>>
§config: MintConfig
§build_params: BuildParams
Implementations§
Source§impl Mint
impl Mint
pub fn new( lightning: Arc<dyn Lightning + Send + Sync>, lightning_type: LightningType, db: Arc<dyn Database + Send + Sync>, config: MintConfig, build_params: BuildParams, onchain: Option<Arc<dyn BtcOnchain + Send + Sync>>, ) -> Self
pub fn builder() -> MintBuilder
pub fn fee_reserve(&self, amount_msat: u64) -> u64
pub fn create_blinded_signatures( &self, blinded_messages: &[BlindedMessage], keyset: &MintKeyset, ) -> Result<Vec<BlindedSignature>, MokshaMintError>
pub async fn create_invoice( &self, key: String, amount: u64, ) -> Result<(String, String), MokshaMintError>
pub async fn mint_tokens( &self, payment_method: PaymentMethod, key: String, outputs: &[BlindedMessage], keyset: &MintKeyset, return_error: bool, ) -> Result<Vec<BlindedSignature>, MokshaMintError>
pub async fn swap( &self, proofs: &Proofs, blinded_messages: &[BlindedMessage], keyset: &MintKeyset, ) -> Result<Vec<BlindedSignature>, MokshaMintError>
pub async fn melt_bolt11( &self, payment_request: String, fee_reserve: u64, proofs: &Proofs, blinded_messages: &[BlindedMessage], keyset: &MintKeyset, ) -> Result<(bool, String, Vec<BlindedSignature>), MokshaMintError>
pub async fn check_used_proofs( &self, proofs: &Proofs, ) -> Result<(), MokshaMintError>
pub async fn melt_onchain( &self, quote: &OnchainMeltQuote, proofs: &Proofs, ) -> Result<String, MokshaMintError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Mint
impl !RefUnwindSafe for Mint
impl Send for Mint
impl Sync for Mint
impl Unpin for Mint
impl !UnwindSafe for Mint
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request