https://github.com/csfloat/cs-inspect-serializer
Lightweight serializer for CS inspect links
https://github.com/csfloat/cs-inspect-serializer
Last synced: 3 months ago
JSON representation
Lightweight serializer for CS inspect links
- Host: GitHub
- URL: https://github.com/csfloat/cs-inspect-serializer
- Owner: csfloat
- License: mit
- Created: 2025-09-18T21:16:31.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2025-09-19T01:23:08.000Z (9 months ago)
- Last Synced: 2025-09-19T03:32:39.369Z (9 months ago)
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@csfloat/cs2-inspect-serializer
- Size: 63.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CS2 Inspect Link Serializer
Lightweight serializer and decoder for CS2 inspect links. Fork of the package
[cs2-inspect-create](https://github.com/candyboyz/cs2-inspect-create).
# Installation
```bash
npm i @csfloat/cs2-inspect-serializer
```
# Usage
See the [tests](tests/gen.test.ts) for examples.
```ts
import { decodeHex, decodeLink, generateHex, generateLink } from "@csfloat/cs2-inspect-serializer";
const props = {
defindex: 7,
paintindex: 474,
paintseed: 306,
paintwear: 0.6336590647697449,
rarity: 6,
stickers: [],
keychains: [],
};
const hex = generateHex(props);
const link = generateLink(props);
decodeHex(hex);
decodeLink(link);
```
# Development
```bash
# Generate the protobuf file based on econ.proto
npm run protoc
# Build the project
npm run build
# Run the tests
npm run test
```