Optional
aliasesA numeric code that will be used in the binary representation of the tuple.
A string name that will be used in the string representation of the addr.
Optional
pathIf this protocol is a path protocol.
Optional
resolvableIf this protocol can be resolved using configured resolvers.
Optional
sizeSize defines the expected length of the address part of the tuple - valid
values are -1
(or the V
constant) for variable length (this will be
varint encoded in the binary representation), 0
for no address part or a
number that represents a fixed-length address.
Optional
bytesTo decode bytes to a multiaddr, convert the value bytes to a string
Optional
stringWhere the multiaddr has been encoded as a string, decode the value if necessary, unescaping any escaped values
Optional
validatePerform any necessary validation on the string value
Optional
valueTo encode the multiaddr as bytes, convert the value to bytes
Optional
valueTo encode the multiaddr as a string, escape any necessary values
If specified this protocol codec will also be used to decode tuples with these names from string multiaddrs.