26 Commits

Author SHA1 Message Date
Jacek Sieka
2e3d22b9e2
enable styleCheck:usages (#135) 2022-04-08 10:25:41 +02:00
jangko
51fadf850c
Fix #124 2022-02-14 12:16:31 +07:00
Jacek Sieka
64d40d6c1a
simplify imports (#98)
remove broken uint64 converter - upstream std/json also includes a
broken uint64 converter
2021-03-26 13:17:00 +01:00
Jacek Sieka
4eb39203eb
fixes (#95)
* fixes

* fix https://github.com/status-im/nimbus-eth2/issues/1650
* only one of `result` and `error` allowed in response
* fix invalid `string` instances being created from byte sequences
* fix large int64 parsing on 32-bit
* fix exception inheritance
* fix some dangling results
* some cleanups

* annotate exception issues, fix cancellation

* more error handling cleanup

* add rudimentary error tests

* cleanups

* simplify init
* use nextId -> lastId to avoid =1 init
* remove obsolete tests
2021-02-15 13:45:51 +01:00
Hanno Cornelius
dc3a2d33fc
Added marshalling support for uint32 (#88)
* Added marshalling support for uint32

* Update json_rpc/jsonmarshal.nim

Co-authored-by: Jacek Sieka <arnetheduck@gmail.com>

Co-authored-by: Jacek Sieka <arnetheduck@gmail.com>
2020-11-16 15:45:53 +01:00
Mamy Ratsimbazafy
99455437ba
Fix silent uint64 negative conversion https://github.com/status-im/nim-beacon-chain/issues/1671 https://github.com/status-im/nim-beacon-chain/pull/1819 (#85) 2020-10-07 12:09:36 +02:00
Zahary Karadjov
244254632b
Improved handling of invalid responses; Handle seq[byte] results such as eth_getCode 2020-06-19 20:42:49 +03:00
Viktor Kirilov
8c1a8ef8d9 serialization for tuples - just like for objects 2020-06-11 14:56:57 +03:00
Zahary Karadjov
4d1d2577e9
Trivial changes required for the beacon node integration 2020-03-17 00:17:10 +02:00
Ștefan Talpalaru
92a7b78f4a
Nim HEAD support 2019-04-26 00:17:04 +02:00
Ștefan Talpalaru
cbbdc34399 fix breakage with Nim HEAD 2019-01-04 15:57:52 +02:00
Yuriy Glukhov
839cc3ae33 Fixed compilation error with newer nim 2018-12-20 12:58:42 +02:00
coffeepots
798e86112c Cover optional cases within objects 2018-11-26 18:03:56 +00:00
coffeepots
51ed6f3000 Remove expectType for Option[T], use fromJson on subtype for validation 2018-11-23 16:10:35 +00:00
coffeepots
e942357de6 Fix iterating through return type 2018-11-23 16:05:46 +00:00
coffeepots
5e7f2d6a61
Merge pull request #42 from jangko/rpc_macro
add optional arg support to rpc macro
2018-11-19 10:58:38 +00:00
andri lim
a1fe7d57b4 allow optional parameters in the middle of parameters list 2018-11-16 20:07:39 +07:00
Zahary Karadjov
26953344c3 Turn some potentially dangerous templates into functions
Be careful when creating templates. If the input parameters are
referenced within the body multiple times, this may lead to multiple
evaluations of functions with side-effects.
2018-11-12 23:51:24 +02:00
andri lim
ee3ba6d5ad add optional arg support to rpc macro 2018-11-12 17:47:03 +07:00
coffeepots
40e2c83023 Added allowNull to expectType 2018-08-29 14:16:03 +03:00
coffeepots
e7f66a0b4d Support Option[T] types, added expectType, expect error to use [] in msgs 2018-08-29 14:16:03 +03:00
coffeepots
f6ad1fd1c7 Update to SomeInteger 2018-08-16 13:07:21 +03:00
coffeepots
13a9a1f58b Add ref int and ref int64 2018-08-16 13:07:21 +03:00
andri lim
be5107041b add comments to recently added codes 2018-07-17 10:39:22 +07:00
andri lim
4aedb214b6 fixes #18, rpc macro now can accept multiple variables of one type 2018-07-17 10:06:29 +07:00
coffeepots
0c98f79d9c Rename to json_rpc 2018-06-26 19:08:11 +01:00