import { C } from "https://deno.land/x/lucid@0.10.6/src/mod.ts";
const { PlutusDatumSchema } = C;
JSON <-> PlutusData conversion schemas. Follows ScriptDataJsonSchema in cardano-cli defined at: https://github.com/input-output-hk/cardano-node/blob/master/cardano-api/src/Cardano/Api/ScriptData.hs#L254
All methods here have the following restrictions due to limitations on dependencies:
- JSON numbers above u64::MAX (positive) or below i64::MIN (negative) will throw errors
- Hex strings for bytes don't accept odd-length (half-byte) strings. cardano-cli seems to support these however but it seems to be different than just 0-padding on either side when tested so proceed with caution