diff --git a/CircleModularWalletsCore/Resources/Info.plist b/CircleModularWalletsCore/Resources/Info.plist index 4f49406..411b965 100644 --- a/CircleModularWalletsCore/Resources/Info.plist +++ b/CircleModularWalletsCore/Resources/Info.plist @@ -3,7 +3,7 @@ CFBundleShortVersionString - 1.0.6 + 1.0.7 CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleName diff --git a/CircleModularWalletsCore/Sources/Accounts/CircleSmartAccount.swift b/CircleModularWalletsCore/Sources/Accounts/CircleSmartAccount.swift index 2138552..0750d46 100644 --- a/CircleModularWalletsCore/Sources/Accounts/CircleSmartAccount.swift +++ b/CircleModularWalletsCore/Sources/Accounts/CircleSmartAccount.swift @@ -26,7 +26,7 @@ import web3swift /// - Parameters: /// - client: The client used to interact with the blockchain. /// - owner: The owner account associated with the Circle smart account. -/// - version: The version of the Circle smart account. Default is "circle_6900_v1". +/// - version: The version of the Circle smart account. Default is CIRCLE_SMART_ACCOUNT_VERSION_V1. /// - name: The wallet name assigned to the newly registered account defaults to the format "passkey-yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" /// /// - Throws: BaseError if there are any problems during the wallet creation process. @@ -35,9 +35,10 @@ import web3swift public func toCircleSmartAccount( client: Client, owner: A, - version: String = "circle_6900_v1", + version: String = CIRCLE_SMART_ACCOUNT_VERSION_V1, name: String? = nil ) async throws -> CircleSmartAccount where A.T == SignResult { + let version = CIRCLE_SMART_ACCOUNT_VERSION[version] ?? version let name = name ?? "passkey-\(Utils.getCurrentDateTime())" return try await .init(client: client, owner: owner, version: version, name: name) } diff --git a/CircleModularWalletsCore/Sources/Helpers/Constants.swift b/CircleModularWalletsCore/Sources/Helpers/Constants.swift index 63a2a06..31c7442 100644 --- a/CircleModularWalletsCore/Sources/Helpers/Constants.swift +++ b/CircleModularWalletsCore/Sources/Helpers/Constants.swift @@ -20,6 +20,11 @@ import Foundation public let CIRCLE_BASE_URL = "https://modular-sdk.circle.com/v1/rpc/w3s/buidl" public let ENTRYPOINT_V07_ADDRESS = "0x0000000071727De22E5E9d8BAf0edAc6f37da032" +public let CIRCLE_SMART_ACCOUNT_VERSION_V1 = "circle_passkey_account_v1" + +let CIRCLE_SMART_ACCOUNT_VERSION: [String: String] = [ + CIRCLE_SMART_ACCOUNT_VERSION_V1: "circle_6900_v1", +] let CONTRACT_ADDRESS: [String: String] = [ MainnetToken.USDT.name: "0xdAC17F958D2ee523a2206206994597C13D831ec7", diff --git a/CircleModularWalletsCore/Sources/Helpers/Extensions/Bundle+Extension.swift b/CircleModularWalletsCore/Sources/Helpers/Extensions/Bundle+Extension.swift index 9522c00..02ec776 100644 --- a/CircleModularWalletsCore/Sources/Helpers/Extensions/Bundle+Extension.swift +++ b/CircleModularWalletsCore/Sources/Helpers/Extensions/Bundle+Extension.swift @@ -21,7 +21,7 @@ import Foundation #if SWIFT_PACKAGE extension Bundle { public enum SDK { - public static let version = "1.0.6" + public static let version = "1.0.7" } } #else