Function parseAssetId

  • Convert a indexer asset id string or object to an AssetId.

    TODO: should return an Either since parsing can fail. Users expect parsing to work, not working is an exception.

    Returns

    O.IOption

    Parameters

    • raw: string | object | ZeitgeistPrimitivesAsset

      object | string

    Returns IEither<SyntaxError, {
        CategoricalOutcome: [MarketId, number];
    } | {
        ScalarOutcome: [MarketId, "Short" | "Long"];
    } | {
        Ztg: null;
    } | {
        PoolShare: number;
    }>

Generated using TypeDoc