pub async fn fetch_secrets(
    cluster: &str,
    fn_authority: &str,
    url: Option<&str>,
    feed: &str,
    oracle: Pubkey,
    secrets_signer: Arc<SecretKey>
) -> Result<Secrets, SbError>
Expand description

fetch_secrets: to be used in conjunction with the Switchboard Secrets Server stack.

When hosting your own secrets server, you may list the MR_ENCLAVE of the functions you wish to reveal your secrets to. This will only ever expose your secrets to your code. Unless exported in your code, no chain or oracle will be able to view these secrets:

§Relevant Materials:

§Parameters:

  • fn_authority: the authority of the function you wish to retrieve secrets for
  • url: the url or ip address of the secrets server to use. If none are provided, the default behavior will be to use Switchboard’s hosted https://api.secrets.switchboard.xyz.

§Returns

  • Map<String, String>: The key-value store of your secrets.