# @ocap/message

> Utility functions to encode and decode message that can send to forge

Latest version **1.30.24** (published 2026-05-14) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @ocap/message
pnpm add @ocap/message
yarn add @ocap/message
bun add @ocap/message
```

## Health

**Score 60/100 (C)** — status: active.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.30.24 |
| Published | 2026-05-14 |
| First published | 2021-03-09 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 6 |
| Unpacked size | 237 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | wangshijun |
| Maintainers | wangshijun, polunzh, mave99a |
| Keywords | blockchain, arcblock, sdk, nodejs |

## Links

- npm: https://www.npmjs.com/package/@ocap/message
- Repository: https://github.com/ArcBlock/blockchain.git#master
- Homepage: https://github.com/ArcBlock/blockchain/tree/master/core/forge-message
- Issues: https://github.com/ArcBlock/blockchain/issues
- npm.io page: https://npm.io/package/@ocap/message

## Dependencies (6)

- [cborg](https://npm.io/package/cborg.md) ^5.1.0
- [debug](https://npm.io/package/debug.md) ^4.4.3
- [lodash](https://npm.io/package/lodash.md) ^4.17.23
- [@ocap/util](https://npm.io/package/@ocap/util.md) 1.30.24
- [@ocap/proto](https://npm.io/package/@ocap/proto.md) 1.30.24
- [google-protobuf](https://npm.io/package/google-protobuf.md) 3.21.0

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 1.30.24 (latest) — 2026-05-14
- 1.30.23 — 2026-05-13
- 1.30.22 — 2026-05-13
- 1.30.21 — 2026-05-12
- 1.30.20 — 2026-05-12
- 1.30.19 — 2026-05-12
- 1.30.18 — 2026-05-11
- 1.30.17 — 2026-05-11
- 1.30.16 — 2026-05-10
- 1.30.15 — 2026-05-08
- 1.30.14 — 2026-05-08
- 1.30.13 — 2026-05-08
- 1.30.12 — 2026-05-05
- 1.30.11 — 2026-05-03
- 1.30.10 — 2026-04-22
- … 599 more at https://npm.io/package/@ocap/message/versions

## README

![forge-message](https://www.arcblock.io/.netlify/functions/badge/?text=forge-message)

[![docs](https://img.shields.io/badge/powered%20by-arcblock-green.svg)](https://docs.arcblock.io)
[![Gitter](https://badges.gitter.im/ArcBlock/community.svg)](https://gitter.im/ArcBlock/community?utm_source=badge\&utm_medium=badge\&utm_campaign=pr-badge)

> Utility function to encode and format message that can be sent to or received from forge framework.


## Table of Contents

* [Install](#install)
* [Usage](#usage)
* [Documentation](#documentation)
* [Contributors](#contributors)


## Install

```sh
npm i @ocap/message
// OR
bun install @ocap/message
```


## Usage

```js
const { createMessage, formatMessage } = require('@ocap/message');

const message = createMessage('Transaction', {
  from: '',
  nonce: 0,
  signature: 'abc',
  itx: {
    type: 'TransferTx',
    value: {
      to: '2019-04-25',
    },
  },
});

const buffer = message.serializeBinary();
// Then: send the buffer over the wire
```


## Documentation

For full documentation, checkout [https://asset-chain.netlify.com](https://asset-chain.netlify.com/)


## Contributors

| Name           | Website                         |
| -------------- | ------------------------------- |
| **wangshijun** | <https://github.com/wangshijun> |

---
_Source: https://npm.io/package/@ocap/message · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
