For the passed proto string or number, return a Protocol
import { protocol } from '@multiformats/multiaddr'console.info(protocol(4))// { code: 4, size: 32, name: 'ip4', resolvable: false, path: false } Copy
import { protocol } from '@multiformats/multiaddr'console.info(protocol(4))// { code: 4, size: 32, name: 'ip4', resolvable: false, path: false }
For the passed proto string or number, return a Protocol