0.0.1-alpha.29 • Published 3 years ago

@daemon-land/sdk v0.0.1-alpha.29

Weekly downloads
18
License
(Apache-2.0 OR MI...
Repository
github
Last release
3 years ago

filecoin-message

Travis CI

Install

npm i @openworklabs/filecoin-message

Usage

const Message = require('@openworklabs/filecoin-message')
const BigNumber = require('bignumber.js')

const message = new Message({
  to: 't03832874859695014541',
  from: 't1pyfq7dg6sq65acyomqvzvbgwni4zllglqffw5dy',
  nonce: 1,
  value: new BigNumber('1000000000'),
  method: 0
})

const messageForSerialization = await message.toSerializeableType()
const messageForLotus = message.toLotusType()

Test

npm i npm run test

License

This repository is dual-licensed under Apache 2.0 and MIT terms.