JSPM

@ocap/message

1.13.59
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6358
  • Score
    100M100P100Q120982F
  • License Apache-2.0

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

Package Exports

  • @ocap/message
  • @ocap/message/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@ocap/message) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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://ocap.arcblock.io