Defines the interface for a set of serializers that can be used to serialize/deserialize any Serde types.

Deprecated

This interface is deprecated. You can now directly use @metaplex-foundation/umi/serializers instead.

Hierarchy

  • SerializerInterface

Properties

array: (<T, U>(item: Serializer<T, U>, options?: ArraySerializerOptions) => Serializer<T[], U[]>)

Type declaration

bool: ((options?: BoolSerializerOptions) => Serializer<boolean, boolean>)

Type declaration

bytes: ((options?: BytesSerializerOptions) => Serializer<Uint8Array, Uint8Array>)

Type declaration

f32: ((options?: NumberSerializerOptions) => Serializer<number, number>)

Type declaration

f64: ((options?: NumberSerializerOptions) => Serializer<number, number>)

Type declaration

i128: ((options?: NumberSerializerOptions) => Serializer<number | bigint, bigint>)

Type declaration

i16: ((options?: NumberSerializerOptions) => Serializer<number, number>)

Type declaration

i32: ((options?: NumberSerializerOptions) => Serializer<number, number>)

Type declaration

i64: ((options?: NumberSerializerOptions) => Serializer<number | bigint, bigint>)

Type declaration

i8: ((options?: BaseSerializerOptions) => Serializer<number, number>)

Type declaration

map: (<TK, TV, UK, UV>(key: Serializer<TK, UK>, value: Serializer<TV, UV>, options?: MapSerializerOptions) => Serializer<Map<TK, TV>, Map<UK, UV>>)

Type declaration

nullable: (<T, U>(item: Serializer<T, U>, options?: NullableSerializerOptions) => Serializer<Nullable<T>, Nullable<U>>)

Type declaration

option: (<T, U>(item: Serializer<T, U>, options?: OptionSerializerOptions) => Serializer<Option<T> | Nullable<T>, Option<U>>)

Type declaration

publicKey: ((options?: BaseSerializerOptions) => Serializer<PublicKey<string> | PublicKeyInput<string>, PublicKey<string>>)

Type declaration

set: (<T, U>(item: Serializer<T, U>, options?: SetSerializerOptions) => Serializer<Set<T>, Set<U>>)

Type declaration

string: ((options?: StringSerializerOptions) => Serializer<string, string>)

Type declaration

struct: (<T, U>(fields: StructToSerializerTuple<T, U>, options?: BaseSerializerOptions) => Serializer<T, U>)

Type declaration

tuple: (<T, U>(items: [...WrapInSerializer<T, [...U[]]>[]], options?: BaseSerializerOptions) => Serializer<T, U>)

Type declaration

u128: ((options?: NumberSerializerOptions) => Serializer<number | bigint, bigint>)

Type declaration

u16: ((options?: NumberSerializerOptions) => Serializer<number, number>)

Type declaration

u32: ((options?: NumberSerializerOptions) => Serializer<number, number>)

Type declaration

u64: ((options?: NumberSerializerOptions) => Serializer<number | bigint, bigint>)

Type declaration

u8: ((options?: BaseSerializerOptions) => Serializer<number, number>)

Type declaration

unit: ((options?: BaseSerializerOptions) => Serializer<void, void>)

Type declaration

Methods

  • Creates a scalar enum serializer.

    Type Parameters

    • T

    Parameters

    • constructor: Object

      The constructor of the scalar enum.

    • Optional options: ScalarEnumSerializerOptions

      A set of options for the serializer.

    Returns Serializer<T, T>

Generated using TypeDoc