Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔄 synced file(s) with circlefin/modularwallets-ios-sdk-internal #9

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CircleModularWalletsCore/Resources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>CFBundleShortVersionString</key>
<string>1.0.6</string>
<string>1.0.7</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleName</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -35,9 +35,10 @@ import web3swift
public func toCircleSmartAccount<A: Account>(
client: Client,
owner: A,
version: String = "circle_6900_v1",
version: String = CIRCLE_SMART_ACCOUNT_VERSION_V1,
name: String? = nil
) async throws -> CircleSmartAccount<A> 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)
}
Expand Down
5 changes: 5 additions & 0 deletions CircleModularWalletsCore/Sources/Helpers/Constants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading