14 Commits

Author SHA1 Message Date
tomFlowee 94390e2fd1 Add parseAddress to Flowee namespace 2021-04-03 20:34:20 +02:00
tomFlowee 21836f1653 Support fetching fees for a transaction directly
Only on a Hub that enabled it, though
2021-03-18 12:32:59 +01:00
tomFlowee 2586e78bbb Add new method 2021-02-17 16:51:06 +01:00
tomFlowee e3fc17ecd5 more outputscripthash 2021-02-17 16:50:58 +01:00
tomFlowee 0b3487c2ea Add onChainChanged() callback for new blocks 2021-02-15 12:15:07 +01:00
tomFlowee 665b18cf0b Add 'stop()' to shut down the engine 2021-02-15 10:46:56 +01:00
tomFlowee acb0ddd842 Forward loglevels 2021-02-14 23:36:59 +01:00
TomZ ff70c7e4da Remove obsolete doc 2020-07-27 21:04:46 +02:00
TomZ be5663ba7e Start new service, add getLiveTransaction method 2020-07-27 12:41:23 +02:00
TomZ a529506cd0 Add getBlockHeader getter 2020-07-27 12:00:42 +02:00
TomZ 35c2b9d17a Add getRawTransaction method 2020-07-27 11:44:26 +02:00
TomZ c579d1da47 small fixes 2020-07-27 11:42:25 +02:00
TomZ d695d85ddb Make much complete the sending of messages
This converts more JS values to the proper NetworkManager values
and vice versa for the return message.

Return messages now have the following structure;

{
  serviceId: 1,
  messageId: 1,
  '67': 'main',
  '68': 644459,
  header: {},
  body: [
    { key: '67', value: 'main' },
    { key: '68', value: 644459 },
  ]
}

The keys in CMF are all intergers, and the 67 and 68 here are examples.
The body is now an array of properties.

For convenience each item is also set on the main return message.
Be aware, though, that for properties that are repeated only the last
one will be present on the return-message.

This commit also implements several blockchain service methods and
adds an example.

Last point is that for byte-arrays (like hashes) we produce a property
like this:
{
  key: '70',
  value: [Uint8Array],
  string: '000000000000000001613440a154e4c35c6467f65dafd70605d5578ec00b0192'
}

Again, as convenience, we add the string version of hashes. This is also
present on the return-message as '70str' next to the '70' bytearray.
2020-07-18 14:42:50 +02:00
TomZ 30108aba48 Combine with native JavaScript lib
This starts a native JS lib, taking inspiration for the basics
from the Flowee-JS-pure repo.
Additionally this exposes sending of CMF messages from JS over
the connection already set up in C++.
2020-07-17 23:20:23 +02:00