pub struct PaymentCandidate {
pub chain_id: ChainId,
pub asset: CompactString,
pub amount: CompactString,
pub scheme: CompactString,
pub pay_to: CompactString,
pub signer: Box<dyn PaymentCandidateSigner + Send + Sync>,
}Expand description
A single payment option produced by SchemeClient::accept.
Fields§
§chain_id: ChainIdCAIP-2 chain id of the target chain.
asset: CompactStringToken asset address / mint.
amount: CompactStringAmount in the token’s smallest unit, stringified.
scheme: CompactStringScheme identifier ("exact", "upto", …).
pay_to: CompactStringRecipient address.
signer: Box<dyn PaymentCandidateSigner + Send + Sync>Signer that can produce the authorization.
Implementations§
Source§impl PaymentCandidate
impl PaymentCandidate
Sourcepub async fn sign(&self) -> Result<String, ClientError>
pub async fn sign(&self) -> Result<String, ClientError>
Signs the candidate, returning the base64-encoded payload.
§Errors
Returns ClientError when signing fails.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for PaymentCandidate
impl !UnwindSafe for PaymentCandidate
impl Freeze for PaymentCandidate
impl Send for PaymentCandidate
impl Sync for PaymentCandidate
impl Unpin for PaymentCandidate
impl UnsafeUnpin for PaymentCandidate
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