2.0.16-e • Published 2 years ago

@lost-worlds/validation v2.0.16-e

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

validation

Small util package used in the creation and validation of on-chain lost worlds assets (i.e. LostWorlds and LostAchievements)

Depends on

  • @lost-worlds/sdk

MetadataBlock Types

  • LocationNameIssuerMetadata # states / soapbox # location
  • NameIssuerMetadata # soapbox
  • LocationIssuerMetadata # portals

  • DescriptionMetadata # achievements

  • LocationRadiusMetadata # summit

  • LocationRadiusNameIssuerMetadata # continents"

Structure

The repo uses fairly intense code building and curry patterns in order to minimize copypasta across editions.

Specifically, every edition should have the following structure:

  • schema
    • raw.json
    • processed.json
    • index.ts
  • types/* (auto-generated by the type-generator)
  • achievements.ts - This must define:
    • transform
    • handleLostAchievementOptions
  • worlds/
    • creation/
      • raw.ts - This must define:
        • transformInitializationParams
        • lostWorldFactories
      • transformed.ts - This must define:
        • lostWorldFactories
    • validation/
      • raw.ts - This must define:
        • validate
      • transformed.ts - This must define:
        • validate
    • core.ts - This must define:
      • handleLostWorldOptions
2.0.16-e

2 years ago