Skip to content

[Elephant] Metadata transaction types implementation #144

@evias

Description

@evias

Metadata features are being discussed in following NIP discussion thread: https://github.com/nemtech/NIP/issues/8

Following task assignment describes the Metadata key/value association features in the catapult-server project: https://github.com/nemtech/catapult-server/issues/17

--

Implementation will need the following modules to be added/modified:

  • Add interface for MetadataTarget
  • Make Account, Mosaic and Namespace implement MetadataTarget
  • Add new transaction type MetadataTransaction with following transaction data:
Field Type Description
Target Type enum Type of metadata target
Target Id union{signer, targetType, targetId, metadataKey} Identifier of the metadata target
Metadata key uint64_t Metadata identifier
Metadata value byte* Metadata payload (transaction.message-alike)
Metadata value hash hash_256 Hash of the payload to allow pruning. If payload size is less than 32 bytes, it will be inlined in this field (prevents pruning)
  • Additionally, MetadataTransaction will be possible only within AggregateBonded transaction because metadata assignments needs opt-in logic.

  • Default maximum payload content size 1024 bytes (transaction.message alike)

  • Discuss with catapult-rest team to provide with MetadataHttp implementation with :

    • MetadataHttp.getMetadata(targetType, targetId, metadataKey)
    • MetadataHttp.getMetadataFromIssuer(issuer, targetType, targetId, metadataKey)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions