21 Commits

Author SHA1 Message Date
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 506751d22d Use the lib 2021-02-15 12:16:14 +01:00
tomFlowee 0b3487c2ea Add onChainChanged() callback for new blocks 2021-02-15 12:15:07 +01:00
tomFlowee bfc510c3d9 Less confusion 2020-12-08 12:23:18 +01:00
TomZ cb3470d72e Move processing to the main() 2020-07-27 20:54:08 +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
TomZ 24adc83b29 JS has an off-by-one in the month 2020-05-23 00:07:22 +02:00
TomZ 6590d39b3b List the indexer status 2020-05-20 12:06:21 +02:00
TomZ 2df7ee7e52 minor; add missing semicolon 2019-12-30 18:50:11 +01:00
TomZ d7dc95dac4 Add support for the AddressMonitor service 2019-12-30 18:49:53 +01:00
TomZ eed2884155 example script for sendTransaction 2019-12-27 22:27:46 +01:00
TomZ 239764caa9 Make examples take arguments 2019-12-26 22:05:59 +01:00
TomZ 40855e3db3 First try at list-details-about-tx 2019-12-23 15:32:09 +01:00
TomZ d0152b1c55 fixlet in JS. Time is in seconds 2019-12-23 15:06:39 +01:00
TomZ ebb1b5da99 Make output a bit nicer. 2019-12-19 01:27:12 +01:00
TomZ 95f7717b2f Report a bit more 2019-12-10 17:47:47 +01:00
TomZ 7539772be0 Re-do the connect() family of methods.
Working around lots of NodeJS stupidities.
2019-12-09 15:10:27 +01:00
TomZ 189a668f7b Make nicer for devs
this adds some docs, converts hashes and scripts to strings.
2019-12-09 15:09:23 +01:00
TomZ c6efe6ad62 populate the blockheader objects too. 2019-12-08 21:22:24 +01:00
TomZ 4a082bf1e9 Make some more examples work. 2019-12-08 19:01:24 +01:00