pub struct OrderSigner { /* private fields */ }Expand description
EIP-712 order signer for the Polymarket CTF Exchange.
Implementations§
Source§impl OrderSigner
impl OrderSigner
Sourcepub fn new(private_key: &EvmPrivateKey) -> Result<Self>
pub fn new(private_key: &EvmPrivateKey) -> Result<Self>
Creates a new OrderSigner from an EVM private key.
Sourcepub fn sign_order(
&self,
order: &PolymarketOrder,
neg_risk: bool,
) -> Result<String>
pub fn sign_order( &self, order: &PolymarketOrder, neg_risk: bool, ) -> Result<String>
Signs a PolymarketOrder and returns the hex-encoded ECDSA signature.
The neg_risk flag selects which exchange contract to use as the
EIP-712 verifyingContract.
§Errors
Returns an error if order.signer does not match this signer’s address.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OrderSigner
impl RefUnwindSafe for OrderSigner
impl Send for OrderSigner
impl Sync for OrderSigner
impl Unpin for OrderSigner
impl UnsafeUnpin for OrderSigner
impl UnwindSafe for OrderSigner
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more