• For the passed proto string or number, return a Protocol

    Parameters

    • proto: string | number

    Returns Protocol

    Example

    import { protocol } from '@multiformats/multiaddr'

    console.info(protocol(4))
    // { code: 4, size: 32, name: 'ip4', resolvable: false, path: false }