Class ModuleV0
- Namespace
- Concordium.Sdk.Types
- Assembly
- Concordium.Sdk.dll
Version 0 module source.
public sealed record ModuleV0 : VersionedModuleSource, IEquatable<VersionedModuleSource>, IEquatable<ModuleV0>
- Inheritance
-
ModuleV0
- Implements
- Inherited Members
Constructors
ModuleV0(byte[])
Version 0 module source.
public ModuleV0(byte[] Source)
Parameters
Source
byte[]Source code of module
Methods
From(byte[])
Creates a WASM-module from byte array. Note: Does not copy the given byte array, so it assumes that the underlying byte array is not mutated
public static ModuleV0 From(byte[] source)
Parameters
source
byte[]WASM-module as a byte array.
Returns
Exceptions
- ArgumentException
The length of the supplied module exceeds "MaxLength".
FromHex(string)
Creates an instance from a hex encoded string.
public static ModuleV0 FromHex(string hexString)
Parameters
hexString
stringThe WASM-module represented as a hex encoded string representing at most "MaxLength" bytes.
Returns
Exceptions
- ArgumentException
The supplied string is not a hex encoded WASM-module representing at most "MaxLength" bytes.