Struct ckb_signer::FileSystemKeystoreSigner
source · pub struct FileSystemKeystoreSigner { /* private fields */ }Expand description
A signer use filesystem keystore as backend.
Implementations§
source§impl FileSystemKeystoreSigner
impl FileSystemKeystoreSigner
pub fn new(keystore: KeyStore) -> FileSystemKeystoreSigner
pub fn lock(&self, hash160: &H160) -> bool
pub fn unlock(
&self,
hash160: &H160,
password: &[u8]
) -> Result<KeyTimeout, SignerError>
pub fn cache_key_set(
&mut self,
hash160: &H160,
external_len: u32,
change_len: u32
) -> Result<(), SignerError>
Trait Implementations§
source§impl Signer for FileSystemKeystoreSigner
impl Signer for FileSystemKeystoreSigner
source§fn match_id(&self, id: &[u8]) -> bool
fn match_id(&self, id: &[u8]) -> bool
typecial id are blake160(pubkey) and keccak256(pubkey)[12..20]
source§fn sign(
&self,
id: &[u8],
message: &[u8],
recoverable: bool,
_tx: &TransactionView
) -> Result<Bytes, SignerError>
fn sign(
&self,
id: &[u8],
message: &[u8],
recoverable: bool,
_tx: &TransactionView
) -> Result<Bytes, SignerError>
message type is variable length, because different algorithm have
different length of message: Read more