@ocap/message
TypeScript icon, indicating that this package has built-in type declarations

1.18.115 • Public • Published

forge-message

styled with prettier docs Gitter

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

Table of Contents

Install

npm i @ocap/message
// OR
yarn add @ocap/message

Usage

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

Contributors

Name Website
wangshijun https://github.com/wangshijun

Package Sidebar

Install

npm i @ocap/message

Weekly Downloads

837

Version

1.18.115

License

Apache-2.0

Unpacked Size

27.6 kB

Total Files

12

Last publish

Collaborators

  • wangshijun
  • polunzh
  • mave99a