BcsVariantSerialization class abstract
Abstract class to handle serialization for BCS variants (similar to enums).
- Inheritance
- 
    - Object
- BcsSerialization
- BcsVariantSerialization
 
- Implementers
- AptosAccountAuthenticator
- AptosAnySignature
- AptosCryptoPublicKey
- AptosMultisigTransactionPayload
- AptosRawTransactionWithData
- AptosTransactionAuthenticator
- AptosTransactionPayload
- AptosTypeTag
- MoveArgument
- SuiAccountPublicKey
- SuiArgument
- SuiBaseSignature
- SuiCallArg
- SuiCommand
- SuiCryptoPublicKey
- SuiGenericSignature
- SuiIntentApplicationId
- SuiIntentScope
- SuiIntentVersion
- SuiObjectArg
- SuiTransactionData
- SuiTransactionExpiration
- SuiTransactionKind
- SuiTypeInput
 
Constructors
- BcsVariantSerialization()
- 
          
            const
Properties
- hashCode → int
- 
  The hash code for this object.
  no setterinherited
- runtimeType → Type
- 
  A representation of the runtime type of the object.
  no setterinherited
- serializableType → BcsSerializableType
- 
  Specifies that this class represents a varianttype.no setteroverride
- variantName → String
- 
  Returns the name of the variant (used as the key during serialization).
  no setter
Methods
- 
  createLayout({String? property}) → Layout< Map< String, dynamic> >
- 
  Creates a layout structure for serialization.
  inherited
- 
  createVariantLayout({String? property}) → Layout< Map< String, dynamic> >
- Creates a layout structure specifically for variants.
- 
  noSuchMethod(Invocation invocation) → dynamic 
- 
  Invoked when a nonexistent method or property is accessed.
  inherited
- 
  toBcs({String? property}) → List< int> 
- 
  Serializes the object to BCS format (List of bytes).
  inherited
- 
  toBcsBase64() → String 
- 
  Converts the BCS-encoded bytes to a Base64 string.
  inherited
- 
  toBcsHex() → String 
- 
  Converts the BCS-encoded bytes to a hexadecimal string.
  inherited
- 
  toJson() → Map< String, dynamic> 
- 
  Converts the variant structure to a JSON-compatible Map.
  override
- 
  toLayoutStruct() → Map< String, dynamic> 
- 
  Converts the current object to a layout-friendly structure (Map format).
  inherited
- 
  toString() → String 
- 
  A string representation of this object.
  inherited
- 
  toVariantBcs({String? property}) → List< int> 
- Serializes the variant into BCS format (List of bytes).
- 
  toVariantBcsBase64() → String 
- Converts the serialized variant into a Base64 string.
- 
  toVariantBcsHex() → String 
- Converts the serialized variant into a hexadecimal string.
- 
  toVariantLayoutStruct() → Map< String, dynamic> 
- Converts the variant to a layout-friendly structure with the variant name as the key.
Operators
- 
  operator ==(Object other) → bool 
- 
  The equality operator.
  inherited
Static Methods
- 
  deserialize({required List< int> bytes, required Layout<Map< layout}) → Map<String, dynamic> >String, dynamic> 
- 
  Deserializes bytes into a BCS variant structure.
Validates the presence of keyandvaluein the deserialized data.override
- 
  toVariantDecodeResult(Map< String, dynamic> json) → BcsVariantDecodeResult
- 
  Converts JSON data into a BCS variant decode result.
Ensures the JSON structure has both keyandvalue.