{"version":3,"file":"decode.cjs","sources":["../../../../../src/mods/abi/decode.ts"],"sourcesContent":["import { ZeroHexString } from \"@hazae41/hexane\"\nimport { TextCursor } from \"libs/cursor/cursor.js\"\n\nexport interface Decodable<T> {\n  decodeOrThrow(text: TextCursor): T\n}\n\nexport function decodeOrThrow<T>(decodable: Decodable<T>, hex: ZeroHexString): T {\n  return decodable.decodeOrThrow(new TextCursor(hex.slice(2)))\n}"],"names":["TextCursor"],"mappings":";;;;AAOgB,SAAA,aAAa,CAAI,SAAuB,EAAE,GAAkB,EAAA;AAC1E,IAAA,OAAO,SAAS,CAAC,aAAa,CAAC,IAAIA,iBAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9D;;;;"}