@ocap/message
v1.27.16
Published
Utility functions to encode and decode message that can send to forge
Downloads
15,382
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/messageUsage
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 wireDocumentation
For full documentation, checkout https://asset-chain.netlify.com
Contributors
| Name | Website | | -------------- | ------------------------------- | | wangshijun | https://github.com/wangshijun |
