OperationPayload

public struct OperationPayload : Codable, Equatable

A structure representing the request that needs to be made when sending Opertion‘s to the RPC

  • The bracnh to use when sending

    Declaration

    Swift

    public var branch: String
  • An array of Operation‘s to be sent together in 1 request.

    Declaration

    Swift

    public var contents: [Operation]
  • Conforming to Equatable

    Declaration

    Swift

    public static func == (lhs: OperationPayload, rhs: OperationPayload) -> Bool
  • Add the signature and the protocol to the operation so that it can be injected to the blockchain

    Declaration

    Swift

    public mutating func addSignature(_ binarySignature: [UInt8], signingCurve: EllipticalCurve)

    Parameters

    binarySignature

    Use the Wallet.sign(...) function to sign the forged version of the operationPayload.

    signingCurve

    The EllipticalCurve used for signing.

    andProtocol

    An OperationMetadata containing the network protocol to use to perform the injection.

  • Declaration

    Swift

    public mutating func addProtcol(fromMetadata metadata: OperationMetadata)