Files
parser2/packages/ship-reader
claude fce498ce45
CI / Lint (push) Successful in 9m20s
CI / Typecheck (push) Failing after 11m9s
CI / Unit tests (push) Has been skipped
CI / Integration tests (push) Has been skipped
CI / Build (push) Has been skipped
feat(events): полный SHiP action_trace в ActionEvent (transaction_id, creator_action_ordinal, receipt.auth_sequence, …) (#1)
2026-05-26 04:26:33 +00:00
..

@coopenomics/coopos-ship-reader

Clean-room SHiP WebSocket client for EOSIO/Antelope blockchains. Streams blockchain blocks, deserializes actions and deltas via @wharfkit/antelope, with support for all 24 native system table delta types.

Primary consumer: @coopenomics/parser2.

Installation

pnpm add @coopenomics/coopos-ship-reader

Quickstart

import { ShipClient } from '@coopenomics/coopos-ship-reader'

const client = new ShipClient({
  ship: { url: 'ws://nodeos-ship:8080' },
  chain: { url: 'https://rpc.coopenomics.world' },
})

await client.connect()
const { chainId } = await client.handshake()
console.log('chain:', chainId)

for await (const block of client.streamBlocks({ startBlock: 1, fetchTraces: true, fetchDeltas: true })) {
  console.log('block', block.thisBlock.blockNum, '— traces:', block.traces.length)
  // deserialize actions with contract ABI
  // const action = client.deserializer.deserializeAction(trace, contractAbi)
}

Performance

Deserialization uses @wharfkit/antelope (pure JS, cross-platform).

Throughput on real-world payloads (Ubuntu 24.04, Node 22):

Scenario Throughput
transfer (short memo) ~22k ops/s
transfer (256-char memo) ~21k ops/s
updateauth (nested struct) ~9.5k ops/s
contract_row (accounts) ~34k ops/s

Baseline for regression tracking — run locally:

pnpm --filter @coopenomics/coopos-ship-reader bench

License

MIT. See NOTICE for third-party attributions.