as-serde-scale

0.3.0 • Public • Published

as-serde-scale

as-serde-scale provides ScaleSerializer class which implements Serializer and ScaleDeserializer class which implements Deserializer.

Supported Types

In addition to the types supported by as-serde, as-serde-scale also supports i128/u128 and Compact<T> types.

More detailed information about the SCALE codec specification.

Example

@serialize({ omitName: true })
@deserialize({ omitName: true })
class Person {
    name: string;
    gender: bool;
}

let person = ScaleSerializer.serialize(Person{name: "yjhmelody", gender: true});

See __test__ for more examples.

Package Sidebar

Install

npm i as-serde-scale

Weekly Downloads

16

Version

0.3.0

License

MIT

Unpacked Size

43.1 kB

Total Files

13

Last publish

Collaborators

  • yjhmelody