Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yuzhiyou1990 committed Jul 29, 2022
1 parent cad7e79 commit 03c4199
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Sources/NearSwift/Signature.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,26 @@
//

import Foundation
import Base58Swift

public struct Signature {
public let data: Data
public let keyType: KeyType
}

extension Signature: CustomStringConvertible {
public var description: String {
return "\(keyType.rawValue):\(data.bytes.base58EncodedString)"
}
}

extension Signature: Equatable {

public static func == (lhs: Self, rhs: Self) -> Bool {
return lhs.data == rhs.data && lhs.keyType == rhs.keyType
}
}

extension Signature: BorshCodable {

public func serialize(to writer: inout Data) throws {
try keyType.serialize(to: &writer)
switch keyType {
Expand Down

0 comments on commit 03c4199

Please sign in to comment.