legacy_bcs library
BCS implementation https://github.com/diem/bcs
Classes
- BcsConfig
- Configuration that is passed into BCS constructor.
- BcsConfigTypes
- LegacyBCS
- BCS implementation for Move types and few additional built-ins.
- TypeEncodeDecode
Mixins
- TypeInterface
- Set of methods that allows data encoding/decoding as standalone BCS value or a part of a composed structure/vector.
Constants
- SUI_ADDRESS_LENGTH → const int
Functions
-
getRustConfig(
) → BcsConfig -
getSuiMoveConfig(
) → BcsConfig -
registerPrimitives(
LegacyBCS bcs) → void -
Register the base set of primitive and common types.
Is called in the
BCS
constructor automatically but can be ignored if thewithPrimitives
argument is not set. -
toBN(
dynamic number) → BigInt - Unify argument types by converting them to BigInt.
Typedefs
-
DecodeCb
= dynamic Function(BcsReader reader, List typeParams, Map<
String, dynamic> typeMap) -
EncodeCb
= BcsWriter Function(BcsWriter writer, dynamic data, List typeParams, Map<
String, dynamic> typeMap) -
EnumTypeDefinition
= Map<
String, dynamic> -
Enum type definition. Used as input format in BcsConfig.types
as well as an argument type for
bcs.registerEnumType
. -
StructTypeDefinition
= Map<
String, dynamic> -
Struct type definition. Used as input format in BcsConfig.types
as well as an argument type for
bcs.registerStructType
. - TypeName = dynamic
- Allows for array definitions for names.
- ValidateCb = bool Function(dynamic data)