You are viewing a single comment's thread from:

RE: Now Open Source: Koinos Types!

in Koinos3 years ago

No promises here, but I might look into a #ruby implementation of Koinos Types. I would love to see an official API to point at in order to test any implementations that come along, similar to database_api.get_transaction_hex.

Or, if running an official API like that is too redundant, I would suggest thatkoinos-types/README.md be expanded to show a developer how to verify their implementation.

I could probably figure it out by reading basetypes_test.go, but even just having the ability to run a local executable that can respond to JSON-RPC request like get_transaction_hex would be better than nothing.

Sort:  

Hey Inertia,

Since our APIs are going to change rapidly I would not advise trying to test against them.

Instead, we have a testing mechanism that generates language outputs based on JSON test data and serializes it back out to binary/JSON. It then compares the outputs of each language. This is how you could check the correctness of your implementation.

See:
https://github.com/koinos/koinos-types/blob/master/ci/test.sh#L17

We also run basic unit tests against each language individually, you can see examples of that in the test directory.

Thanks for contributing!