- mapSerializer<NewFrom, OldFrom, To>(serializer: Serializer<OldFrom, To>, unmap: ((value: NewFrom) => OldFrom)): Serializer<NewFrom, To>
-
Parameters
-
serializer: Serializer<OldFrom, To>
-
unmap: ((value: NewFrom) => OldFrom)
-
- (value: NewFrom): OldFrom
-
Returns OldFrom
Returns Serializer<NewFrom, To>
- mapSerializer<NewFrom, OldFrom, NewTo, OldTo>(serializer: Serializer<OldFrom, OldTo>, unmap: ((value: NewFrom) => OldFrom), map: ((value: OldTo, buffer: Uint8Array, offset: number) => NewTo)): Serializer<NewFrom, NewTo>
-
Type Parameters
-
NewFrom
-
OldFrom
-
NewTo = NewFrom
-
OldTo = OldFrom
Parameters
-
serializer: Serializer<OldFrom, OldTo>
-
unmap: ((value: NewFrom) => OldFrom)
-
- (value: NewFrom): OldFrom
-
Returns OldFrom
-
map: ((value: OldTo, buffer: Uint8Array, offset: number) => NewTo)
-
- (value: OldTo, buffer: Uint8Array, offset: number): NewTo
-
Parameters
-
value: OldTo
-
buffer: Uint8Array
-
offset: number
Returns NewTo
Returns Serializer<NewFrom, NewTo>
Deprecated
import from "@metaplex-foundation/umi/serializers" instead.