Interface AccountTransactionHandler<Payload, JSONPayload, Input>

Type Parameters

Hierarchy

  • AccountTransactionHandler

Implemented by

Properties

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

Type declaration

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

      Returns

      The deserialized payload.

      Throws

      If deserializing the type was not possible.

      Parameters

      • serializedPayload: Cursor

        The serialized payload to be deserialized.

      Returns Payload

fromJSON: ((json: JSONPayload) => Payload | Input)

Type declaration

    • (json: JSONPayload): Payload | Input
    • Converts a JSON-serialized payload into the payload type.

      Returns

      The payload obtained from the JSON.

      Parameters

      • json: JSONPayload

        The JSON to be converted back into the payload.

      Returns Payload | Input

getBaseEnergyCost: ((input: Input) => bigint)

Type declaration

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

      Returns

      The base energy cost for the payload.

      Parameters

      • input: Input

        The transction input for which to get the base energy cost.

      Returns bigint

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

Type declaration

    • (payload: Payload): Buffer
    • Serializes the payload to a buffer. This does NOT include the serialized transaction type. To have this included, use serializeAccountTransactionPayload instead.

      Returns

      The serialized payload.

      Throws

      If serializing the type was not possible.

      Parameters

      • payload: Payload

        The payload to serialize.

      Returns Buffer

toJSON: ((payload: Payload | Input) => JSONPayload)

Type declaration

    • (payload: Payload | Input): JSONPayload
    • Converts the payload into JSON format.

      Returns

      The payload in JSON format.

      Parameters

      • payload: Payload | Input

        The payload to be converted into JSON.

      Returns JSONPayload

Generated using TypeDoc