SPB Git

Repository Public

Vectors.swift 677 B 22 lines swift

1// SP Wallet Core2// File: Tests/SPWalletCoreTests/Support/Vectors.swift3// Description: Loader of the canonical vectors generated by the backend's own TypeScript (Vectors/README.md).4//5// Author: Simon-Pierre Boucher6// Contact: contact@spboucher.ai7import Foundation8@testable import SPWalletCore910struct CanonicalVector: Decodable, Sendable {11    let name: String12    let domain: String13    let source: String14    let object: JSONValue15    let canonicalHex: String16    let hashHex: String1718    static func load(_ file: String) throws -> [CanonicalVector] {19        try JSONDecoder().decode([CanonicalVector].self, from: try TestResources.data(file, in: "Vectors"))20    }21}22
Files main
Menu

Theme