- Preparing search index...
- The search index is not available
sdk-v2
- parseAssetId(raw: string | object | ZeitgeistPrimitivesAsset): IEither<SyntaxError, {
CategoricalOutcome: [MarketId, number];
} | {
ScalarOutcome: [MarketId, "Short" | "Long"];
} | {
Ztg: null;
} | {
PoolShare: number;
}>
-
Parameters
-
raw: string | object | ZeitgeistPrimitivesAsset
Returns IEither<SyntaxError, {
CategoricalOutcome: [MarketId, number];
} | {
ScalarOutcome: [MarketId, "Short" | "Long"];
} | {
Ztg: null;
} | {
PoolShare: number;
}>
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