#move #tags #off-chain #standard #type #instance #object

af-move-type

Standard for representing Move types (MoveType) off-chain and their type tags

7 releases

0.8.3 Feb 3, 2025
0.8.2 Jan 29, 2025
0.7.3 Jan 14, 2025

#12 in #off-chain

Download history 63/week @ 2025-01-06 311/week @ 2025-01-13 289/week @ 2025-01-20 338/week @ 2025-01-27 482/week @ 2025-02-03 81/week @ 2025-02-10

1,207 downloads per month
Used in 10 crates (8 directly)

Apache-2.0

155KB
3.5K SLoC

Defines the core standard for representing Move types off-chain and their type tags.

The core items are MoveType and MoveTypeTag. These are useful trait bounds to use when dealing with generic off-chain Move type representations. They are implemented for the primitive types that correspond to Move's primitives (integers/bool). Also included is MoveVec, corresponding to vector and defining a pretty Display.

For Move structs (objects), MoveStruct should be used as it has an associated MoveStructTag. The MoveStruct derive macro is exported for automatically creating a MoveStructTag implementation from normal Rust struct declarations.

A specific instance of a Move type is represented by MoveInstance.


lib.rs:

Defines the core standard for representing Move types off-chain and their type tags.

The core items are MoveType and MoveTypeTag. These are useful trait bounds to use when dealing with generic off-chain Move type representations. They are implemented for the primitive types that correspond to Move's primitives (integers/bool). Also included is MoveVec, corresponding to vector and defining a pretty Display.

For Move structs (objects), MoveStruct should be used as it has an associated MoveStructTag. The MoveStruct derive macro is exported for automatically creating a MoveStructTag implementation from normal Rust struct declarations.

A specific instance of a Move type is represented by MoveInstance.

Dependencies

~12MB
~238K SLoC