npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@atendi9/atxp-protocol

v1.2.0

Published

lightweight, text-framed application wire protocol designed for secure, fast, and structured communication over raw TCP or encrypted TLS transport layers.

Readme

ATXP (Atendi9 Transmission Exchange Protocol)

A lightweight, text-framed application wire protocol designed for secure, fast, and structured communication over raw TCP or encrypted TLS transport layers. This repository provides cross-ecosystem implementations for both Node.js (NPM) and Go (Golang).

📦 Ecosystem Installation

Node.js (NPM)

npm install @atendi9/atxp-protocol

Go (pkg.go.dev)

go get -u github.com/atendi9/atxp

🛠️ Usage Guide: Node.js

1. Initialize a Server (Node.js)

import { Server, MT, ResponseCode, validateURLHandler } from '@atendi9/atxp-protocol';

// Configure server with authentication rules
const server = new Server((username, password) => {
  if (username === 'atendi9' && password === 'supersecret') {
    return { authorized: true, data: new AuthData({ role: 'admin' }) };
  }
  return { authorized: false, data: new AuthData(null) };
});

// Register validation middleware handlers for specific message types
server.registerHandler(MT.URL, validateURLHandler());

// Register a document tracker that prints the incoming filename
server.registerHandler(MT.DOCUMENT, (msg) => {
  console.log(`[Document Received]: File Name: ${msg.filename || 'unknown'}, Size: ${msg.data.length} bytes`);
  return ResponseCode.OK;
});

// Start listening over a local port
await server.listen(8080);
console.log('ATXP JavaScript server running on port 8080');

2. Initialize a Client (Node.js)

import net from 'node:net';
import { Client } from '@atendi9/atxp-protocol';

const socket = net.createConnection({ port: 8080 }, async () => {
  const client = new Client(socket, 'atendi9', 'supersecret');

  // Dispatch a Document transaction frame along with an explicit filename tracking property
  const fileBuffer = Buffer.from('pdf_binary_content_stream');
  const code = await client.sendDocument(fileBuffer, 'annual_report.pdf');
  console.log(`Server handling code returned: ${code}`);

  socket.end();
});

🐹 Usage Guide: Go (Golang)

1. Initialize a Server (Go)

package main

import (
    "fmt"
    "log"
    "github.com/atendi9/atxp"
    "github.com/atendi9/box"
)

func main() {
    // Create a TCP server with credential authorization callback checking rules
    server := atxp.NewServer(func(username, password string) (bool, atxp.AuthData) {
        if username == "atendi9" && password == "supersecret" {
            return true, box.NewSome(map[string]any{"role": "admin"})
        }
        return false, box.NewNone[map[string]any]()
    })

    // Register custom document handling tracking rules that extract the sent filename
    server.RegisterHandler(atxp.DOCUMENT, func(msg *atxp.Message, authData atxp.AuthData) atxp.ResponseCode {
        fmt.Printf("[Go Server] Document received! Name: %s, Data size: %d\n", msg.Filename, len(msg.Data.Get()))
        return atxp.OK
    })

    // Bind raw socket listener configuration channels
    listener, err := atxp.CreateServer(8080)
    if err != nil {
        log.Fatalf("Failed to initialize server port binding: %v", err)
    }

    fmt.Println("ATXP Go server is successfully running and listening over port 8080...")
    if err := server.Serve(listener); err != nil {
        log.Fatalf("Server connection loop encountered failure: %v", err)
    }
}

2. Initialize a Client (Go)

package main

import (
    "fmt"
    "log"
    "github.com/atendi9/atxp"
)

func main() {
    // Establish client network pipeline targets
    conn, err := atxp.ConnectClient("127.0.0.1", 8080)
    if err != nil {
        log.Fatalf("Failed to dial destination host: %v", err)
    }
    defer atxp.CloseClient(conn)

    // Wrap active stream inside an ATXP Client interface instance
    client := atxp.NewClient(conn, "atendi9", "supersecret")

    // Transmit document payload bytes with an attached tracking filename over the wire channel
    documentBytes := []byte("example data slice content")
    status, err := client.SendDocument(documentBytes, "logs.txt")
    if err != nil {
        log.Fatalf("Failed to dispatch frame over wire stream: %v", err)
    }

    fmt.Printf("Server processing validation result returned status: %v\n", status)
}

📑 Wire Protocol Data Specification

ATXP frames separate parameters cleanly over active TCP sequences divided using explicit control double tab-stops (\t\t) and trailing delimiters (\n\n):

[MESSAGE_TYPE]\t\t[BINARY_PAYLOAD_DATA]\t\tAuth:[USERNAME]::[PASSWORD]::[FILENAME]\n\n

Note: The ::[FILENAME] parameter is optional and only sent when the message type is DOCUMENT and has a configured file name.

Enum References

| Name Value Token | Code Mapping Enum (Node.js) | Code Mapping Enum (Go) | Numeric Identifier Value | Description Parameters | | --- | --- | --- | --- | --- | | URL | MT.URL | atxp.URL | 0 | Resource target mapping indicator URLs. | | DOCUMENT | MT.DOCUMENT | atxp.DOCUMENT | 1 | Binary data buffers payloads or structural objects with optional filename attribute payload fields. | | NOTIFICATION | MT.NOTIFICATION | atxp.NOTIFICATION | 2 | Plain text alert descriptors or operational updates. |


📜 License

Distributed under the terms of the open-source MIT License.