fromJSON

@twine-protocol/twine-core v0.1.0Docs


twine-js / @twine-protocol/twine-core / fromJSON

Function: fromJSON()

fromJSON(json): Promise<Chain | Pulse>

Convert a DAG-JSON encoded twine into a twine instance

This is one of the primary ways to read twine data.

Throws an error if the data is invalid.

Parameters

Parameter
Type

json

string | object

Returns

Promise<Chain | Pulse>

Defined in

packages/twine-core/src/conversion.ts:175

Last updated