Skip to content

Commit 5bf0dca

Browse files
committed
Implement fix for Blake2B function, implement initial protocols for new R1 Key type
1 parent c21a3b6 commit 5bf0dca

28 files changed

Lines changed: 253 additions & 45 deletions

Examples/iOS_Example/iOS_Example.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
7D657DBA2A05B5E9008D3754 /* CreateCollectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D657DB92A05B5E9008D3754 /* CreateCollectionView.swift */; };
2020
7D657DBC2A05B665008D3754 /* MintNFTView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D657DBB2A05B665008D3754 /* MintNFTView.swift */; };
2121
7D657DC42A09FBE6008D3754 /* Package.json in Resources */ = {isa = PBXBuildFile; fileRef = 7D657DC32A09FBE6008D3754 /* Package.json */; };
22+
7D809C8F2AA0FA4700A27F24 /* nft.json in Resources */ = {isa = PBXBuildFile; fileRef = 7D809C8E2AA0FA4700A27F24 /* nft.json */; };
2223
/* End PBXBuildFile section */
2324

2425
/* Begin PBXFileReference section */
@@ -35,6 +36,7 @@
3536
7D657DB92A05B5E9008D3754 /* CreateCollectionView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CreateCollectionView.swift; sourceTree = "<group>"; };
3637
7D657DBB2A05B665008D3754 /* MintNFTView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MintNFTView.swift; sourceTree = "<group>"; };
3738
7D657DC32A09FBE6008D3754 /* Package.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = Package.json; sourceTree = "<group>"; };
39+
7D809C8E2AA0FA4700A27F24 /* nft.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = nft.json; path = ../../../../../../../../../Users/marcodotio/Downloads/SuiEaselARNFT/nft.json; sourceTree = "<group>"; };
3840
/* End PBXFileReference section */
3941

4042
/* Begin PBXFrameworksBuildPhase section */
@@ -110,6 +112,7 @@
110112
7D657DB02A0546D1008D3754 /* View Models */ = {
111113
isa = PBXGroup;
112114
children = (
115+
7D809C8E2AA0FA4700A27F24 /* nft.json */,
113116
7D657DC32A09FBE6008D3754 /* Package.json */,
114117
7D657DB12A0546DE008D3754 /* HomeViewModel.swift */,
115118
);
@@ -177,6 +180,7 @@
177180
isa = PBXResourcesBuildPhase;
178181
buildActionMask = 2147483647;
179182
files = (
183+
7D809C8F2AA0FA4700A27F24 /* nft.json in Resources */,
180184
7D657DA32A000965008D3754 /* Preview Assets.xcassets in Resources */,
181185
7D657DA02A000965008D3754 /* Assets.xcassets in Resources */,
182186
7D657DC42A09FBE6008D3754 /* Package.json in Resources */,

Examples/iOS_Example/iOS_Example/View Models/HomeViewModel.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ public class HomeViewModel: ObservableObject {
3434
@Published var walletAddress: String = ""
3535
@Published var collectionId: String = ""
3636

37-
public let restClient = SuiProvider(connection: devnetConnection())
38-
public let faucetClient = FaucetClient(connection: devnetConnection())
37+
public let restClient = SuiProvider(connection: DevnetConnection())
38+
public let faucetClient = FaucetClient(connection: DevnetConnection())
3939

4040
public init(_ mnemos: [[String]]? = nil) throws {
4141
if let mnemos {
@@ -122,7 +122,7 @@ public class HomeViewModel: ObservableObject {
122122
}
123123

124124
public func createCollection() async throws {
125-
guard let fileUrl = Bundle.main.url(forResource: "Package", withExtension: "json") else {
125+
guard let fileUrl = Bundle.main.url(forResource: "nft", withExtension: "json") else {
126126
throw NSError(domain: "package is missing", code: -1)
127127
}
128128
guard let fileCompiledData = try? Data(contentsOf: fileUrl) else {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"modules":["oRzrCwYAAAAKAQAOAg4cAypOBHgGBX5bB9kB+wEI1ANgCrQEGgzOBIUBDdMFBgAXARYCDAISAhgCGQIbAAMMAAABAwABAgcAAwAHAAMFBAAFBAIABgYHAAAPAAEAAAoAAQAAGwACAAAOAwQAABgFBAAAGgYEAAAHBwQAARwNDgACCxQEAQMDCQwEAAMNERIBCAMQCwwABBQVBAEMBRUJCgAGEQ0PAAoQCBMMEAEGCAABBggCAQYIBgQKAgoCCgIHCAUAAwgABQcIBQMHCAAKAgcIBQIIAAcIBQIIAAUBBggFAQUBBwgFAQgEAQoCAQgCAQgGAQgAAQYJAAEIAwEIAQEJAAIJAAUCSUQJTkZUTWludGVkBlN0cmluZwtTdWlFYXNlbE5GVAlUeENvbnRleHQDVUlEA1VybARidXJuB2NyZWF0b3IGZGVsZXRlC2Rlc2NyaXB0aW9uBGVtaXQFZXZlbnQCaWQObWludF90b19zZW5kZXIEbmFtZQNuZXcVbmV3X3Vuc2FmZV9mcm9tX2J5dGVzBm9iamVjdAlvYmplY3RfaWQPcHVibGljX3RyYW5zZmVyBnNlbmRlcgZzdHJpbmcNc3VpX2Vhc2VsX25mdAh0cmFuc2Zlcgp0eF9jb250ZXh0EnVwZGF0ZV9kZXNjcmlwdGlvbgN1cmwEdXRmOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgACBA0IBA8IAgoIAhsIBgECAxMIAwgFDwgCAAEAAAQDCwAQAAIBAQAABAMLABABAgIBAAAEAwsAEAICAwEEAAgaCgMuEQ0MBQsDEQsLABEHCwERBwsCEQ4SAAwEDgQ4AAoFDgQQABQSATgBCwQLBTgCAgQBBAAEBAsACwE4AgIFAQQABAYLAREHCwAPARUCBgEEAAQHCwATAAEBAREJAgABAAIAAwA="],"dependencies":["0x0000000000000000000000000000000000000000000000000000000000000001","0x0000000000000000000000000000000000000000000000000000000000000002"],"digest":[196,240,205,161,98,172,79,23,95,118,155,51,175,127,194,206,5,159,180,154,41,143,240,66,215,27,93,142,34,114,29,75]}

Package.resolved

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ let package = Package(
1414
.package(url: "https://github.com/hyugit/UInt256.git", from: "0.2.2"),
1515
.package(url: "https://github.com/pebble8888/ed25519swift.git", from: "1.2.7"),
1616
.package(url: "https://github.com/SwiftyJSON/SwiftyJSON.git", from: "4.0.0"),
17-
.package(url: "https://github.com/tesseract-one/Blake2.swift.git", exact: "0.1.2"),
17+
.package(url: "https://github.com/tesseract-one/Blake2.swift.git", from: "0.1.0"),
1818
.package(url: "https://github.com/Flight-School/AnyCodable", from: "0.6.0"),
1919
.package(url: "https://github.com/keefertaylor/Base58Swift.git", from: "2.1.0"),
2020
.package(url: "https://github.com/tesseract-one/Bip39.swift.git", from: "0.1.1"),

Package@swift-5.5.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ let package = Package(
1414
.package(url: "https://github.com/hyugit/UInt256.git", from: "0.2.2"),
1515
.package(url: "https://github.com/pebble8888/ed25519swift.git", from: "1.2.7"),
1616
.package(url: "https://github.com/SwiftyJSON/SwiftyJSON.git", from: "4.0.0"),
17-
.package(url: "https://github.com/tesseract-one/Blake2.swift.git", exact: "0.1.2"),
17+
.package(url: "https://github.com/tesseract-one/Blake2.swift.git", from: "0.1.0"),
1818
.package(url: "https://github.com/Flight-School/AnyCodable", from: "0.6.0"),
1919
.package(url: "https://github.com/keefertaylor/Base58Swift.git", from: "2.1.0"),
2020
.package(url: "https://github.com/tesseract-one/Bip39.swift.git", from: "0.1.1"),

Package@swift-5.6.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ let package = Package(
1414
.package(url: "https://github.com/hyugit/UInt256.git", from: "0.2.2"),
1515
.package(url: "https://github.com/pebble8888/ed25519swift.git", from: "1.2.7"),
1616
.package(url: "https://github.com/SwiftyJSON/SwiftyJSON.git", from: "4.0.0"),
17-
.package(url: "https://github.com/tesseract-one/Blake2.swift.git", exact: "0.1.2"),
17+
.package(url: "https://github.com/tesseract-one/Blake2.swift.git", from: "0.1.0"),
1818
.package(url: "https://github.com/Flight-School/AnyCodable", from: "0.6.0"),
1919
.package(url: "https://github.com/keefertaylor/Base58Swift.git", from: "2.1.0"),
2020
.package(url: "https://github.com/tesseract-one/Bip39.swift.git", from: "0.1.1"),

Package@swift-5.7.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ let package = Package(
1414
.package(url: "https://github.com/hyugit/UInt256.git", from: "0.2.2"),
1515
.package(url: "https://github.com/pebble8888/ed25519swift.git", from: "1.2.7"),
1616
.package(url: "https://github.com/SwiftyJSON/SwiftyJSON.git", from: "4.0.0"),
17-
.package(url: "https://github.com/tesseract-one/Blake2.swift.git", exact: "0.1.2"),
17+
.package(url: "https://github.com/tesseract-one/Blake2.swift.git", from: "0.1.0"),
1818
.package(url: "https://github.com/Flight-School/AnyCodable", from: "0.6.0"),
1919
.package(url: "https://github.com/keefertaylor/Base58Swift.git", from: "2.1.0"),
2020
.package(url: "https://github.com/tesseract-one/Bip39.swift.git", from: "0.1.1"),

Package@swift-5.8.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ let package = Package(
1414
.package(url: "https://github.com/hyugit/UInt256.git", from: "0.2.2"),
1515
.package(url: "https://github.com/pebble8888/ed25519swift.git", from: "1.2.7"),
1616
.package(url: "https://github.com/SwiftyJSON/SwiftyJSON.git", from: "4.0.0"),
17-
.package(url: "https://github.com/tesseract-one/Blake2.swift.git", exact: "0.1.2"),
17+
.package(url: "https://github.com/tesseract-one/Blake2.swift.git", from: "0.1.0"),
1818
.package(url: "https://github.com/Flight-School/AnyCodable", from: "0.6.0"),
1919
.package(url: "https://github.com/keefertaylor/Base58Swift.git", from: "2.1.0"),
2020
.package(url: "https://github.com/tesseract-one/Bip39.swift.git", from: "0.1.1"),

Sources/SuiKit/Protocols/BCS/KeyProtocol.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public protocol KeyProtocol: EncodingProtocol {
3232
///
3333
/// - Throws: An error if the serialization fails.
3434
func serialize(_ serializer: Serializer) throws
35-
35+
3636
/// Deserializes an output instance from a Deserializer.
3737
///
3838
/// - Parameter deserializer: The Deserializer instance used to deserialize the data.

0 commit comments

Comments
 (0)