```ts
export function stampTable(dies: [string, number][]): Map<string, number> {
  const table = new Map<string, number>();
  for (const [fragment, price] of dies) {
    if (typeof fragment !== "string" || fragment.length === 0) {
      throw new Error("a die fragment must be a non-empty string");
    }
    if (!Number.isInteger(price) || price <= 0) {
      throw new Error("a die price must be a positive integer");
    }
    if (table.has(fragment)) {
      throw new Error("die listed twice: " + fragment);
    }
    table.set(fragment, price);
  }
  return table;
}

export function stampCover(label: string, dies: [string, number][]): number {
  if (typeof label !== "string" || label.length === 0) {
    throw new Error("a label must be a non-empty string");
  }

  const table = stampTable(dies);

  // Helper function to find the cheapest price for a given prefix
  const dp: { [key: string]: number } = {};
  dp[""] = 0;

  for (const fragment of label) {
    const newDp: { [key: string]: number } = {};
    for (const [prefix, cost] of Object.entries(dp)) {
      if (table.has(prefix + fragment)) {
        newDp[prefix + fragment] = Math.min(
          newDp[prefix + fragment] || Infinity,
          cost + table.get(prefix + fragment)!
        );
      }
    }
    dp = { ...dp, ...newDp };
  }

  const result = Object.values(dp).find((cost) => cost !== undefined);
  if (result === undefined) {
    throw new Error("no sequence of dies can spell the label");
  }

  return result;
}
```