import { type PlutusData } from "https://deno.land/x/lucid@0.5.2/src/mod.ts";
These are the arguments that conform a BuiltinData in Plutus:
data Data =
Constr Integer [Data]
| Map [(Data, Data)]
| List [Data]
| I Integer
| B BS.ByteString
deriving stock (Show, Eq, Ord, Generic)
deriving anyclass (NFData)
So we can define an arbitrary mapping for these types
bigint -> I
string -> B
Map -> Map
list -> List
Note: We need to wrap it in an object to prevent circular references