Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
DarthMike committed Jul 15, 2021
2 parents db2bc64 + 1a6b45e commit 8205d3f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion web3.swift.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'web3.swift'
s.version = '0.8.0'
s.version = '0.8.1'
s.license = 'MIT'
s.summary = 'Ethereum API for Swift'
s.homepage = 'https://github.com/argentlabs/web3.swift'
Expand Down
16 changes: 16 additions & 0 deletions web3swift/src/Account/TypedData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ import GenericJSON
public struct TypedVariable: Codable, Equatable {
let name: String
let type: String

public init(name: String,
type: String) {
self.name = name
self.type = type
}
}

/// Typed data as per EIP712
Expand All @@ -22,6 +28,16 @@ public struct TypedData: Codable, Equatable {
public let primaryType: String
public let domain: JSON
public let message: JSON

public init(types: [String : [TypedVariable]],
primaryType: String,
domain: JSON,
message: JSON) {
self.types = types
self.primaryType = primaryType
self.domain = domain
self.message = message
}
}

extension TypedData: CustomStringConvertible {
Expand Down

0 comments on commit 8205d3f

Please sign in to comment.