Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions packages/mesh-core/src/utils/deserializer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { DeserializedAddress } from "@meshsdk/common";

import { core } from "../core";
import { PoolId } from "@meshsdk/core-cst";

/**
* Deserialize bech32 address into payment and staking parts, with visibility of whether they are script or key hash
Expand All @@ -27,5 +28,7 @@ export const deserializeDatum = <T = any>(datumCbor: string): T =>
* @param poolId The poolxxxx bech32 pool id
* @returns The Ed25519 key hash
*/
export const deserializePoolId = (poolId: string): string =>
core.resolveEd25519KeyHash(poolId);
export const deserializePoolId = (poolId: string): string => {
const cardanoPoolId: PoolId = PoolId(poolId);
return PoolId.toKeyHash(cardanoPoolId).toString();
};