@wharfkit/session - v4.0.1
    Preparing search index...

    Interface StructConstructor

    interface StructConstructor {
        new StructConstructor<T extends Struct>(...args: any[]): T;
        abiAlias?: ABITypeDescriptor;
        abiBase?: ABISerializableConstructor;
        abiDefault?: () => ABISerializable;
        abiFields?: ABIField[];
        abiName: string;
        abiVariant?: ABITypeDescriptor[];
        structFields: ABIField[];
        from(value: any): ABISerializable;
        fromABI?(decoder: ABIDecoder): ABISerializable;
        toABI?(value: any, encoder: ABIEncoder): void;
    }

    Hierarchy (View Summary)

    Index
    • Type Parameters

      Parameters

      • ...args: any[]

      Returns T

    abiAlias?: ABITypeDescriptor

    Alias to another type.

    For structs, the base class this type extends.

    abiDefault?: () => ABISerializable

    Return value to use when creating a new instance of this type, used when decoding binary extensions.

    abiFields?: ABIField[]

    For structs, the fields that this type contains.

    abiName: string

    Name of the type, e.g. asset.

    abiVariant?: ABITypeDescriptor[]

    For variants, the different types this type can represent.

    structFields: ABIField[]
    • Static ABI encoding can be used to encode non-class types. Will be used in favor of instance.toABI if both exists.

      Parameters

      • value: any

        The value to encode.

      • encoder: ABIEncoder

        The encoder to write the value to.

      Returns void