@credo-ts/core
Version:
<p align="center"> <br /> <img alt="Credo Logo" src="https://github.com/openwallet-foundation/credo-ts/blob/c7886cb8377ceb8ee4efe8d264211e561a75072d/images/credo-logo.png" height="250px" /> </p> <h1 align="center"><b>Credo - Core</b></h1
1 lines • 944 B
Source Map (JSON)
{"version":3,"file":"VarintEncoder.mjs","names":[],"sources":["../../src/utils/VarintEncoder.ts"],"sourcesContent":["import varint from 'varint'\n\n// biome-ignore lint/complexity/noStaticOnlyClass: no explanation\nexport class VarintEncoder {\n public static decode(data: Uint8Array | number[]) {\n const code = varint.decode(data)\n return [code, varint.decode.bytes] as const\n }\n\n public static encode(int: number) {\n const target = new Uint8Array(VarintEncoder.encodingLength(int))\n varint.encode(int, target)\n return target\n }\n\n public static encodingLength(int: number) {\n return varint.encodingLength(int)\n }\n}\n"],"mappings":";;AAGA,IAAa,gBAAb,MAAa,cAAc;CACzB,OAAc,OAAO,MAA6B;EAEhD,OAAO,CADM,OAAO,OAAO,IAChB,GAAG,OAAO,OAAO,KAAK;CACnC;CAEA,OAAc,OAAO,KAAa;EAChC,MAAM,SAAS,IAAI,WAAW,cAAc,eAAe,GAAG,CAAC;EAC/D,OAAO,OAAO,KAAK,MAAM;EACzB,OAAO;CACT;CAEA,OAAc,eAAe,KAAa;EACxC,OAAO,OAAO,eAAe,GAAG;CAClC;AACF"}