fromBytes
@twine-protocol/twine-core v0.1.0 • Docs
twine-js / @twine-protocol/twine-core / fromBytes
Function: fromBytes()
Converts a bytes array (ipld block) into a twine instance
The CID must be provided, as it is not encoded in the bytes. It will be used to verify the bytes.
Throws an error if the data is invalid.
Parameters
Parameter
Type
__namedParameters
object
__namedParameters.bytes
Uint8Array
__namedParameters.cid
__namedParameters.hasher
?
MultihashHasher
<number
>
Returns
Defined in
Last updated