pub struct PaymentInLieuToken {
pub issuer: String,
pub signature: String,
pub id: String,
pub notional: u64,
pub auction_id: u64,
pub auction_epoch: u64,
pub market_maker: String,
pub endorsement: Endorsement,
}
Fields§
§issuer: String
Base58-encoded Ed25519 public key used to sign the payment in lieu message.
signature: String
Issuer’s Base64-encoded signature of
"{id},{notional},{auctionId},{auctionEpoch},{endorsement.signature}"
id: String
Unique identifier for the payment in lieu token.
notional: u64
§auction_id: u64
§auction_epoch: u64
§market_maker: String
DFlow network public key identifying the market maker.
endorsement: Endorsement
The order flow source’s endorsement of the firm quote request.
Implementations§
Source§impl PaymentInLieuToken
impl PaymentInLieuToken
Sourcepub fn new(params: &CreatePaymentInLieuTokenParams<'_>) -> Self
pub fn new(params: &CreatePaymentInLieuTokenParams<'_>) -> Self
Create a payment in lieu token signed by the issuer.
Sourcepub fn verify(&self) -> Result<Signature, VerifyTokenError>
pub fn verify(&self) -> Result<Signature, VerifyTokenError>
Verify the issuer’s signature of the payment in lieu token. Returns the issuer’s signature.
Sourcepub fn approve(
&self,
endorsement_key: &EndorsementKey,
now_utc_seconds: u64,
) -> Result<PaymentInLieuApproval, ApprovalError>
pub fn approve( &self, endorsement_key: &EndorsementKey, now_utc_seconds: u64, ) -> Result<PaymentInLieuApproval, ApprovalError>
Create an approval of the token, signed by the endorsement_key
.
base58_endorsement_key
must be specified as the Base58-encoded public
key of the endorsement key.
Trait Implementations§
Source§impl Clone for PaymentInLieuToken
impl Clone for PaymentInLieuToken
Source§fn clone(&self) -> PaymentInLieuToken
fn clone(&self) -> PaymentInLieuToken
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PaymentInLieuToken
impl Debug for PaymentInLieuToken
Source§impl<'de> Deserialize<'de> for PaymentInLieuToken
impl<'de> Deserialize<'de> for PaymentInLieuToken
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for PaymentInLieuToken
impl Hash for PaymentInLieuToken
Source§impl PartialEq for PaymentInLieuToken
impl PartialEq for PaymentInLieuToken
Source§impl Serialize for PaymentInLieuToken
impl Serialize for PaymentInLieuToken
impl Eq for PaymentInLieuToken
impl StructuralPartialEq for PaymentInLieuToken
Auto Trait Implementations§
impl Freeze for PaymentInLieuToken
impl RefUnwindSafe for PaymentInLieuToken
impl Send for PaymentInLieuToken
impl Sync for PaymentInLieuToken
impl Unpin for PaymentInLieuToken
impl UnwindSafe for PaymentInLieuToken
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