From 03c79621deb3eac23c69f3159c41c84a3d7d33c7 Mon Sep 17 00:00:00 2001 From: anquii <50277099+anquii@users.noreply.github.com> Date: Sat, 4 Feb 2023 14:01:32 +0000 Subject: [PATCH] Updated README --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 851c575..06901d1 100644 --- a/README.md +++ b/README.md @@ -30,14 +30,16 @@ let serializedKeyCoder: SerializedKeyCoding = SerializedKeyCoder() let privateMasterKeyDerivator: PrivateMasterKeyDerivating = PrivateMasterKeyDerivator() let privateMasterKey = try privateMasterKeyDerivator.privateKey(seed: seed) -let privateMasterKeyAttributes = MasterKeyAttributes(accessControl: .`private`, version: version) +let privateMasterKeyVersion = KeyVersion(network: network, keyAccessControl: .`private`).wrappedValue +let privateMasterKeyAttributes = MasterKeyAttributes(accessControl: .`private`, version: privateMasterKeyVersion) let serializedPrivateMasterKey = try keySerializer.serializedKey(extendedKey: privateMasterKey, attributes: privateMasterKeyAttributes) let encodedPrivateMasterKey = serializedKeyCoder.encode(serializedKey: serializedPrivateMasterKey) // e.g. xprv9s21ZrQH143K3QTDL4LXw2F7HEK3wJUD2nW2nRk4stbPy6cq3jPPqjiChkVvvNKmPGJxWUtg6LnF5kejMRNNU3TGtRBeJgk33yuGBxrMPHi let publicMasterKeyDerivator: PublicMasterKeyDerivating = PublicMasterKeyDerivator() let publicMasterKey = try publicMasterKeyDerivator.publicKey(privateKey: privateMasterKey) -let publicMasterKeyAttributes = MasterKeyAttributes(accessControl: .`public`, version: version) +let publicMasterKeyVersion = KeyVersion(network: network, keyAccessControl: .`public`).wrappedValue +let publicMasterKeyAttributes = MasterKeyAttributes(accessControl: .`public`, version: publicMasterKeyVersion) let serializedPublicMasterKey = try keySerializer.serializedKey(extendedKey: publicMasterKey, attributes: publicMasterKeyAttributes) let encodedPublicMasterKey = serializedKeyCoder.encode(serializedKey: serializedPublicMasterKey) // e.g. xpub661MyMwAqRbcFtXgS5sYJABqqG9YLmC4Q1Rdap9gSE8NqtwybGhePY2gZ29ESFjqJoCu1Rupje8YtGqsefD265TMg7usUDFdp6W1EGMcet8