AElfProject/aelf-web3.js

Need to encode using signed integer

gldeng opened this issue · 1 comments

Signed integers are to be transmitted in sint64 or sint32 format. Otherwise, the decoded value will be half of the intended value.

https://github.com/AElfProject/aelf-sdk.js/blob/de7e9599b11b871f15e73386f1754f1f792a97a5/lib/aelf/types/formatters.js#L86

https://imweb.io/topic/581a8eb02373d1aa606c8be7

https://github.com/dcodeIO/long.js

yep

When deal with int64.

Long.js is solution of Protobuf.js to solve the problem of int64 in javascript.