import { hexToU8a } from '@polkadot/util';
import { stringify as uuidStringify } from 'uuid';

export const getMockUId = async ({
  did,
  confidentialIdentity,
}: {
  did: string;
  confidentialIdentity: any;
}) => {
  const mockUIdHex = `0x${confidentialIdentity.process_create_mocked_investor_uid(
    did
  )}`;
  const mockUId = uuidStringify(hexToU8a(mockUIdHex));
  return mockUId;
};
