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
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
pnpm install @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 |