Skip to content

Should we parametrise era in cardano-wasm API? #1028

@palas

Description

@palas

Should we keep having methods for different eras? What to do about parametrising algebraic data types in JS?

Proposal:

  1. If it we are happy with having two functions (one for current era and one for upcoming), I think it is simpler.
  2. The moment we have more than two, or the number of functions is too high, then I would go with "strings". You can specify the literal strings in the types, so it is type safe, and it is simple.
  3. If we need more sophisticated algebraic datatypes (nested or with parameters), I would go with objects a la OOP.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions