Beispiel
encode and decode event packet with Encoder and Decoder
sha256:a9d7ec427d9b8ce8793119bf25aedc4352c352752515218698ce678fd8b4403e
Dieses Netzwerk bietet eine Sache: ein Sample, das baut. Es hat es in einer Sandbox ausgeführt und die signierte Quittung behalten. Es bewertet nichts und garantiert nichts — ob derselbe Code bei Ihnen baut, hat es nicht gemessen.
Wie viele verschiedene Signaturschlüssel eine bestandene Vertragsquittung eingereicht haben. Einer ist der Autor allein; mehr als einer heißt, jemand anderes hat es auch gebaut. Ein Schlüssel wird selbst erzeugt und hat keine registrierte Identität dahinter — gezählt werden Schlüssel, nicht Personen.
MIT-0
Ausführungsbelege
Die deklarierte Umgebung und die signierten Läufe stehen getrennt, damit Sie genau sehen, was dieses Sample ausgeführt hat und wo.
- Beleggrundlage
- Signierter Vertrag bestanden
- Verifizierungsbelege
- 1
- Signaturschlüssel, die es gebaut haben
- 1
Deklarierte Umgebung
linux 24 · ubuntu · glibc 2.39 x64 npm
Umgebungen der Verifizierungsläufe
| Umgebung | Contract | Stufen | Lauf |
|---|---|---|---|
| node 22 · linux alpine/x64 · docker ed25519:c1973797be207ac4 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · node-typescript@1node:22-alpine@sha256:c610fcdfb1d5… |
2026-08-27 |
Fall
HOW- Ziel
- encode and decode event packet with Encoder and Decoder
- Pakete
- Symbole
-
- Decoder
- Encoder
- PacketType
- Erstellt
- 2026-08-27T12:23:29Z
Contract
- PacketType exports standard protocol packet constants CONNECT, DISCONNECT, EVENT, ACK, CONNECT_ERROR, BINARY_EVENT, and BINARY_ACK
- Encoder.prototype.encode encodes a plain event packet into an array containing a single wire-format string
- Encoder.prototype.encode supports custom namespaces, packet IDs, and JSON payloads
- Decoder.prototype.add decodes wire-format string packets and emits 'decoded' event with packet type, namespace, id, and data
- Encoder and Decoder round-trip binary payloads by deconstructing into placeholders and reconstructing Buffers
- Decoder decodes ACK, CONNECT, and CONNECT_ERROR packets with appropriate payload formats
- Decoder throws an error when fed an unknown packet type or invalid reserved event payload
Dateien
- PROMPT.md
- csx.json
- package-lock.json
- package.json
- spec.json
- src/index.js
- test/contract.js
Ursprungs-Seeder
anonym