TaggedRPCResponse

public struct TaggedRPCResponse<Success, Failure> : Decodable where Success : Decodable, Success : Encodable, Failure : Decodable, Failure : Error

A JSON-RPC response, indicating either success or failure, wrapped in an identifier and specification version.

  • The result of the RPC call, if it succeeded.

    Declaration

    Swift

    public let result: Success?
  • An error associated with the RPC call, if it failed.

    Declaration

    Swift

    public let error: Failure?
  • id

    The request identifier shared with the server.

    Declaration

    Swift

    public let id: UInt
  • The version of the JSON-RPC spec.

    Declaration

    Swift

    public let rpcSpecificationVersion: String
  • A Result typed object that shows either success or failure of the RPC call.

    Declaration

    Swift

    public var outcome: Result<Success, Failure> { get }