pub fn pubkey_from_path(
    matches: &ArgMatches,
    path: &str,
    keypair_name: &str,
    wallet_manager: &mut Option<Arc<RemoteWalletManager>>,
) -> Result<Pubkey, Box<dyn error::Error>> {
    let SignerSource { kind, .. } = parse_signer_source(path)?;
    match kind {
        SignerSourceKind::Pubkey(pubkey) => Ok(pubkey),
        _ => Ok(signer_from_path(matches, path, keypair_name, wallet_manager)?.pubkey()),
    }
}
/// Loads the pubkey of a [Signer] from one of several possible sources.
///
/// The `path` is not strictly a file system path, but is interpreted as various
/// types of _signing source_, depending on its format, one of which is a path
/// to a keypair file. Some sources may require user interaction in the course
/// of calling this function.
///
/// The only difference between this function and [`signer_from_path`] is in the
/// case of a "pubkey" path: this function does not require that accompanying
/// command line arguments contain an offline signature.
///
/// See [`signer_from_path`] for full documentation of how this function
/// interprets its arguments.
///
/// # Examples
///
/// ```no_run
/// use clap::{App, Arg, value_t_or_exit};
/// use solana_clap_utils::keypair::pubkey_from_path;
///
/// let clap_app = App::new("my-program")
///     // The argument we'll parse as a signer "path"
///     .arg(Arg::with_name("keypair")
///         .required(true)
///         .help("The default signer"));
///
/// let clap_matches = clap_app.get_matches();
/// let keypair_str = value_t_or_exit!(clap_matches, "keypair", String);
/// let mut wallet_manager = None;
/// let pubkey = pubkey_from_path(
///     &clap_matches,
///     &keypair_str,
///     "keypair",
///     &mut wallet_manager,
/// )?;
/// # Ok::<(), Box<dyn std::error::Error>>(())
/// ```
Loads the pubkey of a [Signer] from one of several possible sources.
The `path` is not strictly a file system path, but is interpreted as various
types of _signing source_, depending on its format, one of which is a path
to a keypair file. Some sources may require user interaction in the course
of calling this function.

The only difference between this function and [`signer_from_path`] is in the
case of a "pubkey" path: this function does not require that accompanying
command line arguments contain an offline signature.

See [`signer_from_path`] for full documentation of how this function
interprets its arguments.
Loads the pubkey of a [ Signer ] from one of several possible sources . The ` path ` is not strictly a file system path but is interpreted as various types of _signing source_ depending on its format one of which is a path to a keypair file . Some sources may require user interaction in the course of calling this function . The only difference between this function and [ ` signer_from_path ` ] is in the case of a " pubkey " path : this function does not require that accompanying command line arguments contain an offline signature . See [ ` signer_from_path ` ] for full documentation of how this function interprets its arguments .
pub fn pubkey_from_path(
    matches: &ArgMatches,
    path: &str,
    keypair_name: &str,
    wallet_manager: &mut Option<Arc<RemoteWalletManager>>,
) -> Result<Pubkey, Box<dyn error::Error>> {
    let SignerSource { kind, .. } = parse_signer_source(path)?;
    match kind {
        SignerSourceKind::Pubkey(pubkey) => Ok(pubkey),
        _ => Ok(signer_from_path(matches, path, keypair_name, wallet_manager)?.pubkey()),
    }
}
pub fn pubkey_from_path ( matches : & ArgMatches , path : & str , keypair_name : & str , wallet_manager : & mut Option < Arc < RemoteWalletManager > > , ) -> Result < Pubkey , Box < dyn error :: Error > > { let SignerSource { kind , .. } = parse_signer_source ( path ) ? ; match kind { SignerSourceKind :: Pubkey ( pubkey ) => Ok ( pubkey ) , _ => Ok ( signer_from_path ( matches , path , keypair_name , wallet_manager ) ? . pubkey ( ) ) , } }
Loads the pubkey of a [Signer] from one of several possible sources.
Loads the pubkey of a [ Signer ] from one of several possible sources .
matches
&ArgMatches
path
&str
keypair_name
&str
wallet_manager
&mut Option<Arc<RemoteWalletManager>>
examples
```no_run
use clap::{App, Arg, value_t_or_exit};
use solana_clap_utils::keypair::pubkey_from_path.

let clap_app = App::new("my-program")
The argument we'll parse as a signer "path"
.arg(Arg::with_name("keypair")
.required(true)
.help("The default signer")).


` ` ` no_run use clap :: { App Arg value_t_or_exit } ; use solana_clap_utils :: keypair :: pubkey_from_path . let clap_app = App :: new ( " my - program " ) The argument we ' ll parse as a signer " path " . arg ( Arg :: with_name ( " keypair " ) . required ( true ) . help ( " The default signer " )) .
ok::<(), box<dyn std::error::error>>(())
None