Create molecule codec which can parse 0x-prefix into number.
import * as json from "@ckb-cobuild/molecule-json";import mol from "@ckb-cobuild/molecule";const Uint32 = json.createNumberJsonCodec(mol.Uint32);Uint32.parse("0x1");// => 1 Copy
import * as json from "@ckb-cobuild/molecule-json";import mol from "@ckb-cobuild/molecule";const Uint32 = json.createNumberJsonCodec(mol.Uint32);Uint32.parse("0x1");// => 1
Generated using TypeDoc
Create molecule codec which can parse 0x-prefix into number.