Skip to content
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.1.3</string>
<string>1.2.0</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleName</key>
Expand Down
24 changes: 21 additions & 3 deletions CircleModularWalletsCore/Sources/APIs/Modular/ModularRpcApi.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ protocol ModularRpcApi {
transport: Transport,
walletAddress: String,
owners: [AddressMappingOwner]
) async throws -> [CreateAddressMappingResult]
) async throws -> [AddressMappingResult]

func getAddressMapping(
transport: Transport,
owner: AddressMappingOwner
) async throws -> [AddressMappingResult]

func getUserOperationGasPrice(
transport: Transport
Expand All @@ -45,7 +50,7 @@ extension ModularRpcApi {
transport: Transport,
walletAddress: String,
owners: [AddressMappingOwner]
) async throws -> [CreateAddressMappingResult] {
) async throws -> [AddressMappingResult] {
if !Utils.isAddress(walletAddress) {
throw BaseError(shortMessage: "walletAddress is invalid")
}
Expand Down Expand Up @@ -76,7 +81,20 @@ extension ModularRpcApi {
params: [CreateAddressMappingReq(walletAddress: walletAddress, owners: owners)]
)

let response = try await transport.request(req) as RpcResponse<[CreateAddressMappingResult]>
let response = try await transport.request(req) as RpcResponse<[AddressMappingResult]>
return response.result
}

func getAddressMapping(
transport: Transport,
owner: AddressMappingOwner
) async throws -> [AddressMappingResult] {
let req = RpcRequest(
method: "circle_getAddressMapping",
params: [GetAddressMappingReq(owner: owner)]
)

let response = try await transport.request(req) as RpcResponse<[AddressMappingResult]>
return response.result
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ struct CreateAddressMappingReq: Encodable {
let owners: [AddressMappingOwner]
}

struct GetAddressMappingReq: Encodable {
let owner: AddressMappingOwner
}

/// Represents the response from the circle_getUserOperationGasPrice RPC method.
/// This structure provides different gas price options (low, medium, high) for
/// user operations along with verification gas limits for both
Expand Down
Loading
Loading