Contents
dpixa, the chain client
@pixagram/dpixa is a fork of dhive, Hive's TypeScript client, with Pixa's chain ID, key prefix and asset symbols built in. It runs in Node and in the browser, speaks JSON-RPC over HTTPS with failover between nodes, and covers the whole surface: reading state and blocks, signing and broadcasting operations, resource credits, and the social API served by Hivemind.
Install and connect
npm install @pixagram/dpixa
Node, ES modules
import { Client } from "@pixagram/dpixa";
const client = new Client(["https://api.pixagram.com", "https://merlion.surf", "https://blockforge.lol", "https://pixarex.net"]);
const props = await client.database.getDynamicGlobalProperties();
console.log(`head block ${props.head_block_number}, signed by ${props.current_witness}`);
Node, CommonJS
The prebuilt bundle is the path used by the registration script in the node guide; it needs no bundler and no polyfills.
const { Client, PrivateKey } = require("@pixagram/dpixa/dist/dpixa.js");
const client = new Client(["https://api.pixagram.com"]);
const key = PrivateKey.fromString(process.env.POSTING_WIF); // never write a key into a file
client.broadcast.vote({ voter: "you", author: "author", permlink: "permlink", weight: 10000 }, key)
.then(r => console.log("included in block", r.block_num));
Browser, no build step
<script src="https://unpkg.com/@pixagram/dpixa@1.5.4/dist/dpixa.js"></script>
<script>
const client = new dpixa.Client(["https://api.pixagram.com"]);
client.pixamind.getRankedPosts({ sort: "trending", tag: "", limit: 5 })
.then(posts => posts.forEach(p => console.log(p.title, "by", p.author)));
</script>
Give the client several nodes: it retries the next one when a request fails, and consoleOnFailover: true in the options logs when it does. All four public endpoints answer identically and allow browser requests from any origin.
What the client exposes
| Property | Purpose | Examples |
|---|---|---|
client.database | Chain state and history | getDynamicGlobalProperties(), getAccounts([names]), getBlock(n), getAccountHistory(account, from, limit), getCurrentMedianHistoryPrice(), getConfig() |
client.blockchain | Follow blocks as they arrive | getCurrentBlockNum(mode), getBlocks(), getOperations() as async iterators; Node streams |
client.broadcast | Sign and send operations | vote(), transfer(), comment(), json(), claimRewardBalance(), sendOperations(ops, key) for anything else, including witness_update |
client.rc | Resource credits — the fee-less bandwidth model | getRCMana(account), getVPMana(account), findRCAccounts([names]), getResourcePool() |
client.pixamind | The social API served by Hivemind (bridge.*) | getRankedPosts(), getAccountPosts(), getCommunity(), listCommunities(), getAccountNotifications() |
client.keys | Reverse lookup | getKeyReferences([publicKeys]) — which accounts a key belongs to |
client.call(api, method, params) | Any JSON-RPC method, raw | client.call("database_api", "list_witnesses", { start: "", limit: 100, order: "by_name" }) |
PrivateKey, PublicKey | Keys in WIF and PIX… form | PrivateKey.fromString(wif), PrivateKey.fromLogin(name, password, role), key.createPublic("PIX") |
Asset, Price | Amounts with three decimals and their symbol | Asset.from("1.000 PIXA"), getVestingSharePrice(props), getVests(account) |
Pixa specifics
The client already carries the chain ID (706978616772616d…, the ASCII string pixagram padded to 32 bytes) and the PIX key prefix as defaults. What you still need to know:
| Assets | PIXA is the liquid coin, PXS the stable unit, VESTS the staked form. Three decimals for PIXA and PXS, six for VESTS. Legacy-format payloads carry these symbols on the wire, not the Hive ones. |
| Renamed fields | Jussi rewrites Hive names in responses: pxs_balance, pxs_exchange_rate, reward_pixa, total_vesting_fund_pixa, current_pxs_supply, dpf_interval_ledger. Requests accept the new names. |
| Manabar percentages | Manabar.percentage is in basis points — 0 to 10,000 — not the 0 to 100 that the README example suggests. Divide by 100 to display. |
| Bigger payloads | Transactions up to 128 KiB and custom_json up to 64 KiB, twice Hive's limits. This is what lets a full base64 image sit inside a post. |
| No passive yield | pxs_interest_rate is always 0 and the vesting fund receives no inflation. Do not build anything that expects VESTS to appreciate. |
| Restricted accounts | pixa.rex and pixa.team can only transfer VESTS; every other operation is rejected. pixa.omnibus, the treasury, is keyless. |
| Communities | Hivemind community names keep Hive's shape: portal- followed by a digit 1–3 and four to six more digits, for example portal-100001. |
| No testnet | Whatever endpoint you pass, you are on mainnet. Test with small amounts and with posting keys where a posting key will do. |
The complete list of deltas from Hive — genesis allocations, reward-curve tuning, the feed quorum — is the SKILL.md file, written for AI agents but just as useful to a person.
All packages
Versions are read live from the npm registry when the page can reach it; otherwise the figures are those of 5 September 2026.
Storage and dataRenderingContent safetySimilarityKey protection
Storage and data
The app's on-device database, on top of IndexedDB: B-tree indexes, encryption, OPFS storage, a quick key-value store for settings. A cold open of the app's settings takes two milliseconds. Serialises with TurboSerial.
Binary serialisation for any JavaScript value — typed arrays, BigInt, Map, Set, Date, circular references — into a compact wire format, faster than JSON for the payloads the app moves.
Base64 encoding and decoding tuned for speed, used wherever the app moves images between the chain's text fields and pixels.
A fast non-cryptographic fingerprint in WebAssembly, tuned for 5–30 kB payloads: 32, 64, 128 or 256-bit output as bytes, hex or base58, with a worker pool for batches.
Rendering
Pixel-art rendering engines with a WebGL2 backend and a WebAssembly fallback: draws small on-chain images crisply at any display size, with the filters the editor offers.
The WebAssembly core of renderart on its own, for environments without WebGL2 or outside the browser.
High-ratio pixel-art upscaling, including xBRZ at 7× and 8×, as WebGL2 shaders and a Rust port compiled to WebAssembly.
A maintained, optimised fork of react-virtualized 9.22 for long feeds and tables. Needs React.
Content safety
Everything read from the chain is treated as untrusted, and all checks run on the device — no content leaves the browser to be classified.
Markdown and HTML rendering with sanitisation, metadata parsing and summaries for post bodies, compiled to WebAssembly. Insecure images are removed entirely rather than rewritten.
NSFW image classification in the browser with an EfficientNet model over onnxruntime-web, running in a Web Worker with a main-thread fallback. The model ships in the package.
The fast binary variant: a quantised MobileNetV4 under one megabyte gzipped, about 65 ms per image on CPU at 160 px, tuned for pixel art.
A 4.5 MB int8-quantised bert-tiny toxicity classifier for comments and posts, offline, over onnxruntime-web.
Similarity
PAPH, Pixagram's perceptual hash for pixel art: integer-only, deterministic, with a calibrated comparator that weighs structural, geometric and diversity evidence to tell a copy from a coincidence. Used for plagiarism detection before an image becomes an NFT.
The previous generation of the hash, kept for wires already written with it. Two backends, byte-identical output.
Key protection
The vault the app keeps keys in: Argon2id key derivation, ChaCha20-Poly1305 encryption and BLAKE3, in Rust compiled to WebAssembly, designed so that a short PIN still costs an attacker real time. A drop-in replacement for PBKDF2-based schemes.
Other languages, other tools
Pixa is a Hive fork, so every Hive client that lets you set the chain ID and the key prefix can talk to it: pass the chain ID above, PIX as the prefix, and one of the four endpoints. Legacy-format asset strings must read PIXA and PXS; the HF26 numeric asset identifiers work unchanged. Everything the Hive developer portal documents about operations and API methods applies, with PIXA for HIVE and PXS for HBD.
Without any library, one curl is enough:
curl -s -X POST https://api.pixagram.com -H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"condenser_api.get_accounts","params":[["account"]],"id":1}'
The witness-status project ships a dependency-free command-line tool that runs the whole health pipeline: npx github:pixagram-blockchain/witness-status --check exits 0, 1 or 2 like a monitoring plugin, and --format json prints the full model. The AGENT.md file documents every formula it uses.
Docker images
The node software is published to Docker Hub under pixadock, for amd64. Both Compose stacks in the node guide pull from here.
| Image | Contents |
|---|---|
pixadock/pixagram:mainnet | hived 1.28.7 for Pixa, and /home/hived/bin/cli_wallet for offline key generation and signing |
pixadock/pixagram-haf:mainnet | HAF: hived paired with PostgreSQL, recording every block for applications |
pixadock/hivemind:mainnet | Hivemind setup, sync and the social API server |
pixadock/bigmac-feed:v1.0.2 | The price-feed publisher, --witness, --rpc, --token-price, --interval |
Without a config.ini in the bind-mounted data directory, hived starts in isolation — no seed node, no witness, default plugins only. The witness stack is the shortest path to a node that joins the live network.