Skip to content

Commit

Permalink
Add Swift Generator for HTTP Protobuf Clients (#246)
Browse files Browse the repository at this point in the history
* version change 4.1

* move generated and interface wrappers to libmobilecoin

* update small things to make it compatible

* update libmobilecoin and podfiles

* latest libmobilecoin

* update lock files

* fix imports in libmobilecoin, update versions in podspec

* fix import on test file, update libmobilecoin

* remove duplicate conformance to fix warnings
  • Loading branch information
the-real-adammork authored Apr 15, 2023
1 parent a4bfa7c commit d45e2bb
Show file tree
Hide file tree
Showing 28 changed files with 39 additions and 939 deletions.
24 changes: 12 additions & 12 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -19,33 +19,33 @@ PODS:
- SwiftNIOTransportServices (< 2.0.0, >= 1.6.0)
- SwiftProtobuf (< 2.0.0, >= 1.9.0)
- Keys (1.0.1)
- LibMobileCoin/Core (4.1.0):
- LibMobileCoin/Core (4.1.2):
- gRPC-Swift
- SwiftProtobuf (~> 1.5)
- Logging (1.4.0)
- MobileCoin (4.1.0)
- MobileCoin/Core (4.1.0):
- MobileCoin (4.1.2)
- MobileCoin/Core (4.1.2):
- gRPC-Swift (= 1.0.0)
- LibMobileCoin/Core (~> 4.1.0)
- LibMobileCoin/Core (~> 4.1.2)
- Logging (~> 1.4)
- SwiftLint
- SwiftNIO (~> 2.40.0)
- SwiftNIOHPACK (~> 1.16.3)
- SwiftNIOHTTP1 (~> 2.40.0)
- SwiftProtobuf
- MobileCoin/Core/ProtocolUnitTests (4.1.0):
- MobileCoin/Core/ProtocolUnitTests (4.1.2):
- gRPC-Swift (= 1.0.0)
- LibMobileCoin/Core (~> 4.1.0)
- LibMobileCoin/Core (~> 4.1.2)
- Logging (~> 1.4)
- SwiftLint
- SwiftNIO (~> 2.40.0)
- SwiftNIOHPACK (~> 1.16.3)
- SwiftNIOHTTP1 (~> 2.40.0)
- SwiftProtobuf
- MobileCoin/IntegrationNonTransactingTests (4.1.0)
- MobileCoin/IntegrationTransactingTests (4.1.0)
- MobileCoin/PerformanceTests (4.1.0)
- MobileCoin/Tests (4.1.0)
- MobileCoin/IntegrationNonTransactingTests (4.1.2)
- MobileCoin/IntegrationTransactingTests (4.1.2)
- MobileCoin/PerformanceTests (4.1.2)
- MobileCoin/Tests (4.1.2)
- SwiftLint (0.47.1)
- SwiftNIO (2.40.0):
- _NIODataStructures (= 2.40.0)
Expand Down Expand Up @@ -224,9 +224,9 @@ SPEC CHECKSUMS:
CNIOWindows: 3047f2d8165848a3936a0a755fee27c6b5ee479b
gRPC-Swift: 77154009a019e97f8c4bd8f2bb75fe9726801157
Keys: a576f4c9c1c641ca913a959a9c62ed3f215a8de9
LibMobileCoin: 754c5883520cfb03c02496b9a762bd3ecbd7d048
LibMobileCoin: 9730ed51ef056c3e7f3ff4cdc0aff0ea0bd2626a
Logging: beeb016c9c80cf77042d62e83495816847ef108b
MobileCoin: 482ffc47f96b27cb38a59c38d1568e1d42370c24
MobileCoin: 0e736d7807c174ed94d8280230d9bb461d4d9b82
SwiftLint: f80f1be7fa96d30e0aa68e58d45d4ea1ccaac519
SwiftNIO: 829958aab300642625091f82fc2f49cb7cf4ef24
SwiftNIOConcurrencyHelpers: 697370136789b1074e4535eaae75cbd7f900370e
Expand Down
24 changes: 12 additions & 12 deletions ExampleHTTP/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
PODS:
- Keys (1.0.1)
- LibMobileCoin/CoreHTTP (4.1.0):
- LibMobileCoin/CoreHTTP (4.1.2):
- SwiftProtobuf (~> 1.5)
- Logging (1.4.0)
- MobileCoin (4.1.0)
- MobileCoin/CoreHTTP (4.1.0):
- LibMobileCoin/CoreHTTP (~> 4.1.0)
- MobileCoin (4.1.2)
- MobileCoin/CoreHTTP (4.1.2):
- LibMobileCoin/CoreHTTP (~> 4.1.2)
- Logging (~> 1.4)
- SwiftLint
- MobileCoin/CoreHTTP/HttpProtocolUnitTests (4.1.0):
- LibMobileCoin/CoreHTTP (~> 4.1.0)
- MobileCoin/CoreHTTP/HttpProtocolUnitTests (4.1.2):
- LibMobileCoin/CoreHTTP (~> 4.1.2)
- Logging (~> 1.4)
- SwiftLint
- MobileCoin/IntegrationNonTransactingTests (4.1.0)
- MobileCoin/IntegrationTransactingTests (4.1.0)
- MobileCoin/PerformanceTests (4.1.0)
- MobileCoin/Tests (4.1.0)
- MobileCoin/IntegrationNonTransactingTests (4.1.2)
- MobileCoin/IntegrationTransactingTests (4.1.2)
- MobileCoin/PerformanceTests (4.1.2)
- MobileCoin/Tests (4.1.2)
- SwiftLint (0.47.1)
- SwiftProtobuf (1.19.0)

Expand Down Expand Up @@ -48,9 +48,9 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
Keys: a576f4c9c1c641ca913a959a9c62ed3f215a8de9
LibMobileCoin: 754c5883520cfb03c02496b9a762bd3ecbd7d048
LibMobileCoin: 9730ed51ef056c3e7f3ff4cdc0aff0ea0bd2626a
Logging: beeb016c9c80cf77042d62e83495816847ef108b
MobileCoin: 482ffc47f96b27cb38a59c38d1568e1d42370c24
MobileCoin: 0e736d7807c174ed94d8280230d9bb461d4d9b82
SwiftLint: f80f1be7fa96d30e0aa68e58d45d4ea1ccaac519
SwiftProtobuf: 6ef3f0e422ef90d6605ca20b21a94f6c1324d6b3

Expand Down
6 changes: 3 additions & 3 deletions MobileCoin.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Pod::Spec.new do |s|
# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #

s.name = "MobileCoin"
s.version = "4.1.0"
s.version = "4.1.2"
s.summary = "A library for communicating with MobileCoin network"

s.author = "MobileCoin"
Expand Down Expand Up @@ -63,7 +63,7 @@ Pod::Spec.new do |s|
"Sources/Network/*.{h,m,swift}",
]

subspec.dependency "LibMobileCoin/Core", "~> 4.1.0"
subspec.dependency "LibMobileCoin/Core", "~> 4.1.2"

subspec.dependency "gRPC-Swift", "1.0.0"
subspec.dependency "Logging", "~> 1.4"
Expand Down Expand Up @@ -95,7 +95,7 @@ Pod::Spec.new do |s|
"Sources/Network/*.{h,m,swift}",
]

subspec.dependency "LibMobileCoin/CoreHTTP", "~> 4.1.0"
subspec.dependency "LibMobileCoin/CoreHTTP", "~> 4.1.2"

subspec.dependency "Logging", "~> 1.4"

Expand Down
1 change: 1 addition & 0 deletions Sources/Network/HTTPS/DefaultHttpRequester.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
//

import Foundation
import LibMobileCoin

public class DefaultHttpRequester: NSObject, HttpRequester {
private var fogTrustRoots: SecSSLCertificates?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
//

import Foundation
import LibMobileCoin

class ArbitraryHttpConnection {
private let inner: SerialDispatchLock<Inner>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
//

import Foundation
import LibMobileCoin

public protocol HttpCallable {
associatedtype Request
Expand Down
1 change: 1 addition & 0 deletions Sources/Network/HTTPS/HttpConnection/HttpConnection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
//

import Foundation
import LibMobileCoin

class HttpConnection: ConnectionProtocol {
private let inner: SerialDispatchLock<Inner>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ extension ConsensusHttpConnection {
}

extension ConsensusHttpConnection: ConsensusServiceConnection {}
extension Attest_AttestedApiRestClient: AuthHttpCallee, HTTPClient {}
extension Attest_AttestedApiRestClient: AuthHttpCallee {}
Loading

0 comments on commit d45e2bb

Please sign in to comment.