Skip to content

Commit

Permalink
Merge pull request #572 from WalletConnect/develop
Browse files Browse the repository at this point in the history
1.0.5
  • Loading branch information
flypaper0 authored Nov 8, 2022
2 parents 7ccf26c + c2dc00e commit 02b3b8f
Show file tree
Hide file tree
Showing 146 changed files with 268 additions and 362 deletions.
23 changes: 23 additions & 0 deletions .github/scripts/set-user-agent.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

set -e

printf '\nset user agent\n\n'

FILE=Sources/WalletConnectRelay/PackageConfig.json

if [ -f "$FILE" ];
then
printf '\ncurrent user agent:\n'
cat "$FILE"
printf '\nsetting user agent... \n'
echo "{\"version\": \"$PACKAGE_VERSION\"}" > "$FILE"
printf '\nuser agent set for:\n'
cat "$FILE"

else

printf '\nError setting PACKAGE_VERSION\n\n'

fi

27 changes: 27 additions & 0 deletions .github/workflows/set-user-agent.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This workflow sets the package version for user agent
# when pull request to main branch is opened
# it takes pull request name
# and automatically commit it as a package version
# pull request name should always be a version of a new release

name: set-user-agent

on:
pull_request:
branches: [ main ]
env:
PACKAGE_VERSION: ${{ github.event.pull_request.title }}

jobs:
set-user-agent:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Set User Agent
shell: bash
run: ./.github/scripts/set-user-agent.sh

- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Set User Agent

17 changes: 9 additions & 8 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,25 @@ let package = Package(
targets: [
.target(
name: "WalletConnectSign",
dependencies: ["WalletConnectNetworking", "WalletConnectPairing"],
dependencies: ["WalletConnectPairing"],
path: "Sources/WalletConnectSign"),
.target(
name: "WalletConnectChat",
dependencies: ["WalletConnectNetworking"],
path: "Sources/Chat"),
.target(
name: "Auth",
dependencies: ["WalletConnectPairing", "WalletConnectNetworking", .product(name: "Web3", package: "Web3.swift")],
dependencies: ["WalletConnectPairing", .product(name: "Web3", package: "Web3.swift")],
path: "Sources/Auth"),
.target(
name: "WalletConnectPush",
dependencies: ["WalletConnectPairing", "WalletConnectNetworking"],
dependencies: ["WalletConnectPairing"],
path: "Sources/WalletConnectPush"),
.target(
name: "WalletConnectRelay",
dependencies: ["WalletConnectUtils", "WalletConnectKMS"],
path: "Sources/WalletConnectRelay"),
dependencies: ["WalletConnectKMS"],
path: "Sources/WalletConnectRelay",
resources: [.copy("PackageConfig.json")]),
.target(
name: "WalletConnectKMS",
dependencies: ["WalletConnectUtils"],
Expand All @@ -65,7 +66,7 @@ let package = Package(
dependencies: ["WalletConnectNetworking"]),
.target(
name: "WalletConnectUtils",
dependencies: ["Commons", "JSONRPC"]),
dependencies: ["JSONRPC"]),
.target(
name: "JSONRPC",
dependencies: ["Commons"]),
Expand All @@ -74,7 +75,7 @@ let package = Package(
dependencies: []),
.target(
name: "WalletConnectNetworking",
dependencies: ["JSONRPC", "WalletConnectKMS", "WalletConnectRelay", "WalletConnectUtils"]),
dependencies: ["WalletConnectRelay"]),
.target(
name: "WalletConnectRouter",
dependencies: []),
Expand All @@ -98,7 +99,7 @@ let package = Package(
dependencies: ["WalletConnectKMS", "WalletConnectUtils", "TestingUtils"]),
.target(
name: "TestingUtils",
dependencies: ["WalletConnectPairing", "WalletConnectNetworking"],
dependencies: ["WalletConnectPairing"],
path: "Tests/TestingUtils"),
.testTarget(
name: "WalletConnectUtilsTests",
Expand Down
2 changes: 0 additions & 2 deletions Sources/Auth/Auth.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import Foundation
import WalletConnectNetworking
import WalletConnectPairing
import Combine

/// Auth instatnce wrapper
Expand Down
3 changes: 0 additions & 3 deletions Sources/Auth/AuthClient.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import Foundation
import Combine
import WalletConnectUtils
import WalletConnectPairing
import WalletConnectRelay

/// WalletConnect Auth Client
///
Expand Down
5 changes: 0 additions & 5 deletions Sources/Auth/AuthClientFactory.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import Foundation
import WalletConnectRelay
import WalletConnectUtils
import WalletConnectKMS
import WalletConnectPairing
import WalletConnectNetworking

public struct AuthClientFactory {

Expand Down
3 changes: 3 additions & 0 deletions Sources/Auth/AuthImports.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#if !CocoaPods
@_exported import WalletConnectPairing
#endif
1 change: 0 additions & 1 deletion Sources/Auth/AuthProtocolMethod.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Foundation
import WalletConnectNetworking

struct AuthRequestProtocolMethod: ProtocolMethod {
let method: String = "wc_authRequest"
Expand Down
26 changes: 0 additions & 26 deletions Sources/Auth/Services/App/AppPairService.swift

This file was deleted.

4 changes: 0 additions & 4 deletions Sources/Auth/Services/App/AppRequestService.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import Foundation
import JSONRPC
import WalletConnectNetworking
import WalletConnectUtils
import WalletConnectKMS

actor AppRequestService {
private let networkingInteractor: NetworkInteracting
Expand Down
4 changes: 0 additions & 4 deletions Sources/Auth/Services/App/AppRespondSubscriber.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import Foundation
import Combine
import JSONRPC
import WalletConnectNetworking
import WalletConnectUtils
import WalletConnectPairing

class AppRespondSubscriber {
private let networkingInteractor: NetworkInteracting
Expand Down
1 change: 0 additions & 1 deletion Sources/Auth/Services/Common/SIWEMessageFormatter.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Foundation
import WalletConnectUtils

protocol SIWEMessageFormatting {
func formatMessage(from authPayload: AuthPayload, address: String) -> String?
Expand Down
1 change: 0 additions & 1 deletion Sources/Auth/Services/Signer/DIDPKH.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Foundation
import WalletConnectUtils

struct DIDPKH {
static let didPrefix: String = "did:pkh"
Expand Down
3 changes: 0 additions & 3 deletions Sources/Auth/Services/Signer/EIP1271/EIP1271Verifier.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import Foundation
import JSONRPC
import WalletConnectNetworking
import WalletConnectUtils

actor EIP1271Verifier {
private let projectId: String
Expand Down
1 change: 0 additions & 1 deletion Sources/Auth/Services/Signer/EIP1271/RPCService.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Foundation
import WalletConnectNetworking

struct RPCService: HTTPService {
let data: Data
Expand Down
1 change: 0 additions & 1 deletion Sources/Auth/Services/Signer/MessageSignerFactory.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Foundation
import WalletConnectNetworking

public struct MessageSignerFactory {

Expand Down
2 changes: 0 additions & 2 deletions Sources/Auth/Services/Wallet/PendingRequestsProvider.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import Foundation
import JSONRPC
import WalletConnectUtils

class PendingRequestsProvider {
private let rpcHistory: RPCHistory
Expand Down
4 changes: 0 additions & 4 deletions Sources/Auth/Services/Wallet/WalletErrorResponder.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import Foundation
import JSONRPC
import WalletConnectNetworking
import WalletConnectUtils
import WalletConnectKMS

actor WalletErrorResponder {
enum Errors: Error {
Expand Down
5 changes: 0 additions & 5 deletions Sources/Auth/Services/Wallet/WalletRequestSubscriber.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import Foundation
import Combine
import JSONRPC
import WalletConnectNetworking
import WalletConnectUtils
import WalletConnectKMS
import WalletConnectPairing

class WalletRequestSubscriber {
private let networkingInteractor: NetworkInteracting
Expand Down
4 changes: 0 additions & 4 deletions Sources/Auth/Services/Wallet/WalletRespondService.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import Foundation
import JSONRPC
import WalletConnectKMS
import WalletConnectUtils
import WalletConnectNetworking

actor WalletRespondService {
enum Errors: Error {
Expand Down
4 changes: 0 additions & 4 deletions Sources/Auth/Types/Aliases/Account.swift

This file was deleted.

3 changes: 0 additions & 3 deletions Sources/Auth/Types/Aliases/AppMetadata.swift

This file was deleted.

4 changes: 0 additions & 4 deletions Sources/Auth/Types/Aliases/Pairing.swift

This file was deleted.

4 changes: 0 additions & 4 deletions Sources/Auth/Types/Aliases/RPCID.swift

This file was deleted.

4 changes: 0 additions & 4 deletions Sources/Auth/Types/Aliases/WalletConnectURI.swift

This file was deleted.

1 change: 0 additions & 1 deletion Sources/Auth/Types/Errors/AuthError.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Foundation
import WalletConnectNetworking

/// Authentication error
public enum AuthError: Codable, Equatable, Error {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Foundation
import WalletConnectUtils

/// wc_authRequest RPC method request param
struct AuthRequestParams: Codable, Equatable {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Foundation
import WalletConnectUtils

/// wc_authRequest RPC method respond param
typealias AuthResponseParams = Cacao
4 changes: 0 additions & 4 deletions Sources/Auth/Types/RelayProtocolOptions.swift

This file was deleted.

4 changes: 0 additions & 4 deletions Sources/Chat/ChatClient.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import Foundation
import WalletConnectUtils
import WalletConnectKMS
import WalletConnectRelay
import WalletConnectNetworking
import Combine

public class ChatClient {
Expand Down
4 changes: 0 additions & 4 deletions Sources/Chat/ChatClientFactory.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import Foundation
import WalletConnectRelay
import WalletConnectUtils
import WalletConnectKMS
import WalletConnectNetworking

public struct ChatClientFactory {

Expand Down
3 changes: 3 additions & 0 deletions Sources/Chat/ChatImports.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#if !CocoaPods
@_exported import WalletConnectNetworking
#endif
1 change: 0 additions & 1 deletion Sources/Chat/Database.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Foundation
import WalletConnectUtils

class Database<Element> where Element: Codable {

Expand Down
1 change: 0 additions & 1 deletion Sources/Chat/HTTPServices/RegisterService.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Foundation
import WalletConnectNetworking

struct RegisterService: HTTPService {

Expand Down
2 changes: 0 additions & 2 deletions Sources/Chat/HTTPServices/ResolveService.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import Foundation
import WalletConnectNetworking
import WalletConnectUtils

struct ResolveService: HTTPService {

Expand Down
3 changes: 0 additions & 3 deletions Sources/Chat/ProtocolServices/Common/MessagingService.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import Foundation
import Combine
import JSONRPC
import WalletConnectUtils
import WalletConnectNetworking

class MessagingService {
enum Errors: Error {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import Foundation
import Combine
import WalletConnectRelay
import WalletConnectUtils
import WalletConnectNetworking

class ResubscriptionService {
private let networkingInteractor: NetworkInteracting
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import Foundation
import Combine
import JSONRPC
import WalletConnectKMS
import WalletConnectUtils
import WalletConnectRelay
import WalletConnectNetworking

class InvitationHandlingService {
enum Error: Swift.Error {
Expand Down
3 changes: 0 additions & 3 deletions Sources/Chat/ProtocolServices/Invitee/RegistryService.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import Foundation
import WalletConnectUtils
import WalletConnectKMS
import WalletConnectNetworking

actor RegistryService {
let networkingInteractor: NetworkInteracting
Expand Down
4 changes: 0 additions & 4 deletions Sources/Chat/ProtocolServices/Inviter/InviteService.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import Foundation
import Combine
import JSONRPC
import WalletConnectKMS
import WalletConnectUtils
import WalletConnectNetworking

class InviteService {
private var publishers = [AnyCancellable]()
Expand Down
Loading

0 comments on commit 02b3b8f

Please sign in to comment.