pub async fn gen_transport<K: SignatureKey + 'static>(
    identity: Keypair,
    stake_table: Option<HashSet<K>>,
    auth_message: Option<Vec<u8>>
) -> Result<Boxed<(PeerId, StreamMuxerBox)>, NetworkError>
Expand description

Generates an authenticated transport checked against the stake table. If the stake table or authentication message is not provided, the transport will not participate in stake table authentication.

§Errors

If we could not create a DNS transport