From 18c7db76d97cf4bd4221e078a66d875df868b144 Mon Sep 17 00:00:00 2001 From: Trent Nelson Date: Fri, 7 May 2021 02:33:37 -0600 Subject: [PATCH] sdk: Move `signers` module into `signer` module --- sdk/src/lib.rs | 2 +- sdk/src/signer/mod.rs | 1 + sdk/src/{ => signer}/signers.rs | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) rename sdk/src/{ => signer}/signers.rs (98%) diff --git a/sdk/src/lib.rs b/sdk/src/lib.rs index 897a1db49b84f4..d9621bd4b3874c 100644 --- a/sdk/src/lib.rs +++ b/sdk/src/lib.rs @@ -5,6 +5,7 @@ // Allows macro expansion of `use ::solana_sdk::*` to work within this crate extern crate self as solana_sdk; +pub use signer::signers; pub use solana_program::*; pub mod account; @@ -41,7 +42,6 @@ pub mod secp256k1_instruction; pub mod shred_version; pub mod signature; pub mod signer; -pub mod signers; pub mod stake_weighted_timestamp; pub mod system_transaction; pub mod timing; diff --git a/sdk/src/signer/mod.rs b/sdk/src/signer/mod.rs index 5f97fa56a5a2a1..585d77ecb63a70 100644 --- a/sdk/src/signer/mod.rs +++ b/sdk/src/signer/mod.rs @@ -11,6 +11,7 @@ use { pub mod keypair; pub mod null_signer; pub mod presigner; +pub mod signers; #[derive(Debug, Error, PartialEq)] pub enum SignerError { diff --git a/sdk/src/signers.rs b/sdk/src/signer/signers.rs similarity index 98% rename from sdk/src/signers.rs rename to sdk/src/signer/signers.rs index e25b6a059d77ae..abc0772096a838 100644 --- a/sdk/src/signers.rs +++ b/sdk/src/signer/signers.rs @@ -4,6 +4,7 @@ use crate::{ signature::{Signature, Signer, SignerError}, }; +/// Convenience trait for working with mixed collections of `Signer`s pub trait Signers { fn pubkeys(&self) -> Vec; fn try_pubkeys(&self) -> Result, SignerError>;