question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Proper hexstring support

See original GitHub issue

There can be improved support internally for hexstrings to differentiate between endianness, resolve the 0x sign and support for typing of different hexstrings.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
snowypowerscommented, Oct 23, 2019

For this to happen, all neon-js classes will have to migrate to the new pattern. Let us see how the Hexstring class works out first before committing.

0reactions
MorganDreamcommented, Oct 15, 2019

I think one of the biggest advantages using strong types is that user can use these types when writing codes to avoid confusion. And constructors are used a lot in neon-js. If only string is used to initiate some class, the generated instances would probably be invalid or we need to add redundant logic to throw error (e.g. a scripthash param would expect a 30-length string, user may input a “” to be a scripthash, or not even a hex).

Suggestion: So I think it’s better to type the params for constructors. Add a static function like fromJson to accept the -Like param.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Convert string to hex-string in C# - Stack Overflow
First you'll need to get it into a byte[] , so do this: byte[] ba = Encoding.Default.GetBytes("sample");. and then you can get the...
Read more >
How Do I Convert a Hex String to a Normal String? - NI - Support
For some values, a two digit hex string will start with a zero. In this case, there is one digit (0-9) after converting...
Read more >
How to convert between hexadecimal strings and numeric types
This example outputs the hexadecimal value of each character in a string . First it parses the string to an array of characters....
Read more >
hexdec - Manual - PHP
Returns the decimal equivalent of the hexadecimal number represented by the hex_string argument. hexdec() converts a hexadecimal string to a decimal number.
Read more >
Add support for converting integers encoded as Hex-STRING
It's a big-endian 64-bit integer which the device is claiming is a string, thus telegraf can't decode it properly. Support could probably be ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found