Skip to content

Named tuple field support #6

@mratsim

Description

@mratsim

Nim serialization doesn't support named tuple fields.

For example we can't use:

  BLSSignMsg* = object
    input*: tuple[
      privkey: ValidatorPrivKey,
      message: seq[byte],
      domain: Domain
    ]
    output*: Signature

But have to introduce an extra object

  BLSSignMsgInput = object
    privkey*: ValidatorPrivKey
    message*: seq[byte]
    domain*: Domain

  BLSSignMsg* = object
    input*: BLSSignMsgInput
    output*: Signature

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions