-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also improves wasm compatibility. The part disabling Ledger is rather preliminary and should be improved in the future. Specifically, even when the feature is disabled, relevant command options are still available that lead to runtime errors, which is not ideal.
- Loading branch information
1 parent
5b4f853
commit 669a6f0
Showing
8 changed files
with
101 additions
and
28 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
use std::convert::Infallible; | ||
|
||
use async_trait::async_trait; | ||
use starknet::{ | ||
core::types::Felt, | ||
signers::{Signer, SignerInteractivityContext, VerifyingKey}, | ||
}; | ||
use starknet_crypto::Signature; | ||
|
||
#[derive(Debug, Default)] | ||
pub struct VoidSigner; | ||
|
||
#[async_trait(?Send)] | ||
impl Signer for VoidSigner { | ||
type GetPublicKeyError = Infallible; | ||
type SignError = Infallible; | ||
|
||
async fn get_public_key(&self) -> Result<VerifyingKey, Self::GetPublicKeyError> { | ||
panic!("This signer is not supported on this platform") | ||
} | ||
|
||
async fn sign_hash(&self, _hash: &Felt) -> Result<Signature, Self::SignError> { | ||
panic!("This signer is not supported on this platform") | ||
} | ||
|
||
fn is_interactive(&self, _context: SignerInteractivityContext<'_>) -> bool { | ||
panic!("This signer is not supported on this platform") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters