serialize library

Classes

SerialBuffer
Serialize and deserialize data */
SerializerOptions
Options for serialize() and deserialize() */
SerializerState
State for serialize() and deserialize() */

Functions

arrayToHex(Uint8List data) String
Convert binary data to hex */
blockTimestampToDate(int slot) String
Convert block_timestamp_type (half-seconds since a different epoch) to to date in ISO format */
checkDateParse(String date) DateTime
checkRange(int orig, int converted) int
createInitialTypes() Map<String, Type>
Create the set of types built-in to the abi format */
createType({String name = '<missing name>', String aliasOfName = "", Type arrayOf, Type optionalOf, void serialize(Type self, SerialBuffer buffer, Object data, {bool allowExtensions, SerializerState state}), Object deserialize(Type self, SerialBuffer buffer, {bool allowExtensions, SerializerState state}), String baseName = "", List<Field> fields = const [], Type extensionOf}) Type
dateToBlockTimestamp(String date) int
Convert date in ISO format to block_timestamp_type (half-seconds since a different epoch) */
dateToTimePoint(String date) int
Convert date in ISO format to time_point (miliseconds since epoch) */
dateToTimePointSec(String date) int
Convert date in ISO format to time_point_sec (seconds since epoch) */
deserializeArray(Type self, SerialBuffer buffer, {SerializerState state, dynamic allowExtensions = true}) → dynamic
deserializeExtension(Type self, SerialBuffer buffer, {SerializerState state, dynamic allowExtensions = true}) → dynamic
deserializeOptional(Type self, SerialBuffer buffer, {SerializerState state, dynamic allowExtensions = true}) → dynamic
deserializeStruct(Type self, SerialBuffer buffer, {SerializerState state, dynamic allowExtensions = true}) → dynamic
deserializeVariant(Type self, SerialBuffer buffer, {SerializerState state, dynamic allowExtensions = true}) → dynamic
getType(Map<String, Type> types, String name) Type
Get type from types */
getTypesFromAbi(Map<String, Type> initialTypes, Abi abi) Map<String, Type>
Get types from abi @param initialTypes Set of types to build on. In most cases, it's best to fill this from a fresh call to getTypesFromAbi().
hexToUint8List(String hex) Uint8List
Convert hex to binary data */
serializeArray(Type self, SerialBuffer buffer, Object data, {SerializerState state, dynamic allowExtensions = true}) → dynamic
serializeExtension(Type self, SerialBuffer buffer, Object data, {SerializerState state, dynamic allowExtensions = true}) → dynamic
serializeOptional(Type self, SerialBuffer buffer, Object data, {SerializerState state, dynamic allowExtensions = true}) → dynamic
serializeStruct(Type self, SerialBuffer buffer, Object data, {SerializerState state, dynamic allowExtensions = true}) → void
serializeVariant(Type self, SerialBuffer buffer, Object data, {SerializerState state, dynamic allowExtensions = true}) → dynamic
stringToHex(String str) List<int>
stringToSymbol(String s) Symbol
Convert string to Symbol. format: precision,NAME. */
supportedAbiVersion(String version) bool
Is this a supported ABI version? */
symbolToString(Symbol s) Future<String>
Convert Symbol to string. format: precision,NAME. */
timePointSecToDate(int sec) String
Convert time_point_sec (seconds since epoch) to to date in ISO format */
timePointToDate(int us) String
Convert time_point (miliseconds since epoch) to date in ISO format */