Interface AccountTransactionHandler<PayloadType, JSONType>

A handler for a specific AccountTransactionType.

Type Parameters

Hierarchy

  • AccountTransactionHandler

Implemented by

Properties

deserialize: ((serializedPayload: Cursor) => PayloadType)

Type declaration

    • (serializedPayload: Cursor): PayloadType
    • Deserializes the serialized payload into the payload type.

      Returns

      The deserialized payload.

      Parameters

      • serializedPayload: Cursor

        The serialized payload to be deserialized.

      Returns PayloadType

fromJSON: ((json: JSONType) => PayloadType)

Type declaration

    • (json: JSONType): PayloadType
    • Converts a JSON-serialized payload into the payload type.

      Returns

      The payload obtained from the JSON.

      Parameters

      • json: JSONType

        The JSON to be converted back into the payload.

      Returns PayloadType

getBaseEnergyCost: ((payload: PayloadType) => bigint)

Type declaration

    • (payload: PayloadType): bigint
    • Gets the base energy cost for the given payload.

      Returns

      The base energy cost for the payload.

      Parameters

      • payload: PayloadType

        The payload for which to get the base energy cost.

      Returns bigint

serialize: ((payload: PayloadType) => Buffer)

Type declaration

    • (payload: PayloadType): Buffer
    • Serializes the payload to a buffer.

      Returns

      The serialized payload.

      Parameters

      • payload: PayloadType

        The payload to serialize.

      Returns Buffer

toJSON: ((payload: PayloadType) => JSONType)

Type declaration

    • (payload: PayloadType): JSONType
    • Converts the payload into JSON format.

      Returns

      The payload in JSON format.

      Parameters

      • payload: PayloadType

        The payload to be converted into JSON.

      Returns JSONType

Generated using TypeDoc