RPCRequest

public protocol RPCRequest

The protocol Solana JSON-RPC requests must confrom to.

  • The kind of response this request should receive back from a node after being made.

    Declaration

    Swift

    associatedtype Response : Decodable
  • The single-field-encoded value that forms the first part of this request’s RPCRequestPayload.

    Declaration

    Swift

    associatedtype Value : Decodable, Encodable
  • The key-value paired information necessary to perform a given the request. This is encoded alongside the basic value to create an RPCRequestPayload that reflects the information necessary to perform the request.

    Declaration

    Swift

    associatedtype KeyedBody : RPCRequestKeyedBody
  • The RPCRequestPayload generated and sent to the server as params in your final tagged request. This contains both the basic single-field value provided and any key-value paired body information.

    Declaration

    Swift

    var payload: RPCRequestPayload<Value, KeyedBody> { get }
  • The string name of the method which will be queried.

    Declaration

    Swift

    static var methodName: String { get }