pub struct Signer {
pub api_keys: ApiKeys,
/* private fields */
}Fields§
§api_keys: ApiKeysImplementations§
Source§impl Signer
impl Signer
pub fn new(key_path: &str) -> Result<Self>
pub fn from_data(secret: &str, session: &str) -> Result<Self>
Sourcepub fn sign_canonical_string(&self, request: &str) -> RequestPayloadSignature
pub fn sign_canonical_string(&self, request: &str) -> RequestPayloadSignature
Sign GraphQL payload request via payload signing key The output is a hex string where signature has been DER encoded Either implemented with k256 from rustcrypto (pure rust) or secp256k1 (better performance)
Sourcepub fn sign_child_key(
&self,
data: BigInt,
chain: Blockchain,
) -> Result<(BigInt, BigInt, String)>
pub fn sign_child_key( &self, data: BigInt, chain: Blockchain, ) -> Result<(BigInt, BigInt, String)>
Sign data hashed to BigInt with the MPC child key for the given Blockchain
Sourcepub fn child_public_key(&self, chain: Blockchain) -> Result<PublicKey>
pub fn child_public_key(&self, chain: Blockchain) -> Result<PublicKey>
Get public key for child key on chain
Sourcepub fn request_payload_public_key(&self) -> String
pub fn request_payload_public_key(&self) -> String
Return public key for payload signing in format expected by the Nash backend service BigInt conversion to hex will strip leading zeros, which Nash backend doesn’t like
pub fn paillier_pk(&self) -> &EncryptionKey
pub fn get_address(&self, chain: Blockchain) -> &str
pub fn get_child_key(&self, chain: Blockchain) -> APIchildkey
Sourcepub fn get_remaining_r_vals(&self, chain: &Blockchain) -> u32
pub fn get_remaining_r_vals(&self, chain: &Blockchain) -> u32
Get the current number of available R values for the given chain
Sourcepub fn fill_r_vals(&self, chain: Blockchain, n: u32)
pub fn fill_r_vals(&self, chain: Blockchain, n: u32)
Call after filling R values to update tracking
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Signer
impl RefUnwindSafe for Signer
impl Send for Signer
impl Sync for Signer
impl Unpin for Signer
impl UnwindSafe for Signer
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> 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 more