Protocols

The following protocols are available globally.

  • JSON-RPC 2.0 request type.

    Implementers should provide Decodable response types, example:

    struct MyResponse: Decodable {
        let hello: String
        let foo: Int
    }
    struct MyRequest: Steem.Request {
        typealias Response = MyResponse
        let method = "my_method"
        let params: RequestParams<String>
        init(name: String) {
            self.params = RequestParams(["hello": name])
        }
    }
    
    See more

    Declaration

    Swift

    public protocol Request
  • A type that represents a operation on the Steem blockchain.

    Declaration

    Swift

    public protocol OperationType : SteemEncodable, Decodable
  • A type that can be encoded into Steem binary wire format.

    See more

    Declaration

    Swift

    public protocol SteemEncodable : Encodable