koinos / koinos-types

The Rosetta Stone of the Koinos ecosystem. Allows for the interpretation of Koinos data structures in a multitude of languages. Useful in the development of microservices, clients, and smart contracts.
MIT License
12 stars 3 forks source link

Koinos Types Definition Language #124

Closed sgerbino closed 3 years ago

sgerbino commented 3 years ago

Issues to resolve:

module koinos.types

type1 = type2
my_variant = variant { alpha, beta, charlie }
my_enum = enum {
  alpha = 1,
  beta = 2,
  charlie = 3
}

block = struct {
  my_variant: my_variant,
  my_map: a -> opaque< b >,
  my_opaque_array: opaque< a >[]
}

Note:

Deliverable:

sgerbino commented 3 years ago

Should koinos-types support declaring const definitions? I think it should, we can share the definition of queue names and exchange names for example. I propose we support:

module koinos.mq
const string broadcast_exchange = "koinos_event"
const string rpc_exchange = "koinos_rpc"
sgerbino commented 3 years ago

Closed in favor of using Cap'n Proto.