diff --git a/web3.swift.podspec b/web3.swift.podspec index 094aeeaa..d0b108ab 100644 --- a/web3.swift.podspec +++ b/web3.swift.podspec @@ -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' diff --git a/web3swift/src/Account/TypedData.swift b/web3swift/src/Account/TypedData.swift index 2d02fbad..aa1bd230 100644 --- a/web3swift/src/Account/TypedData.swift +++ b/web3swift/src/Account/TypedData.swift @@ -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 @@ -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 {