OperationDelegation

public class OperationDelegation : Operation

Operation subclass for delegating an account to a baker

  • The baker to delegate too, or nil to undelegate

    Declaration

    Swift

    public let delegate: String?
  • Create an OperationDelegation.

    Declaration

    Swift

    public init(source: String, delegate: String?)

    Parameters

    source

    The address of the acocunt sending the operation.

    delegate

    Optional. The address of the baker to delegate to, or nil to undelegate the source address.

  • Create a base operation.

    Declaration

    Swift

    public required init(from decoder: Decoder) throws

    Parameters

    from

    A decoder used to convert a data fromat (such as JSON) into the model object.

  • Convert the object into a data format, such as JSON.

    Declaration

    Swift

    public override func encode(to encoder: Encoder) throws

    Parameters

    to

    An encoder that will allow conversions to multipel data formats.

  • A function to check if two operations are equal.

    Declaration

    Swift

    public func isEqual(_ op: OperationDelegation) -> Bool

    Parameters

    _

    An Operation to compare against

    Return Value

    A Bool indicating the result.