diff --git a/README.md b/README.md index 233f7b3..12b4d66 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Swift Client for Everscale SDK [![SPM](https://img.shields.io/badge/swift-package%20manager-green)](https://swift.org/package-manager/) -[![SPM](https://img.shields.io/badge/SDK%20VERSION-1.33.1-orange)](https://github.com/tonlabs/TON-SDK) +[![SPM](https://img.shields.io/badge/SDK%20VERSION-1.34.0-orange)](https://github.com/tonlabs/TON-SDK) Swift is a strongly typed language that has long been used not only for iOS development. Apple is actively promoting it to new platforms and today it can be used for almost any task. Thanks to this, this implementation provides the work of Everscale SDK on many platforms at once, including the native one for mobile phones. Let me remind you that swift can also be built for android. diff --git a/Sources/EverscaleClientSwift/Client/Client.swift b/Sources/EverscaleClientSwift/Client/Client.swift index b23fd04..840a718 100644 --- a/Sources/EverscaleClientSwift/Client/Client.swift +++ b/Sources/EverscaleClientSwift/Client/Client.swift @@ -49,6 +49,17 @@ public final class TSDKClientModule { } } + /// Returns Core Library API reference + public func config(_ handler: @escaping (TSDKBindingResponse) throws -> Void + ) { + let method: String = "config" + binding.requestLibraryAsync(methodName(module, method), "") { (requestId, params, responseType, finished) in + var response: TSDKBindingResponse = .init() + response.update(requestId, params, responseType, finished) + try handler(response) + } + } + /// Returns detailed information about this build. public func build_info(_ handler: @escaping (TSDKBindingResponse) throws -> Void ) { diff --git a/Sources/EverscaleClientSwift/Tvm/TvmTypes.swift b/Sources/EverscaleClientSwift/Tvm/TvmTypes.swift index 25909a2..c15d6e2 100644 --- a/Sources/EverscaleClientSwift/Tvm/TvmTypes.swift +++ b/Sources/EverscaleClientSwift/Tvm/TvmTypes.swift @@ -56,20 +56,39 @@ public struct TSDKAccountForExecutor: Codable { } public struct TSDKTransactionFees: Codable { + /// Deprecated. + /// Left for backward compatibility. Does not participate in account transaction fees calculation. public var in_msg_fwd_fee: Int + /// Fee for account storage public var storage_fee: Int + /// Fee for processing public var gas_fee: Int + /// Deprecated. + /// Contains the same data as total_fwd_fees field. Deprecated because of its confusing name, that is not the same with GraphQL API Transaction type's field. public var out_msgs_fwd_fee: Int + /// Deprecated. + /// This is the field that is named as `total_fees` in GraphQL API Transaction type. `total_account_fees` name is misleading, because it does not mean account fees, instead it meansvalidators total fees received for the transaction execution. It does not include some forward fees that accountactually pays now, but validators will receive later during value delivery to another account (not even in the receivingtransaction). + /// Because of all of this, this field is not interesting for those who wants to understandthe real account fees, this is why it is deprecated and left for backward compatibility. public var total_account_fees: Int + /// Deprecated because it means total value sent in the transaction, which does not relate to any fees. public var total_output: Int - - public init(in_msg_fwd_fee: Int, storage_fee: Int, gas_fee: Int, out_msgs_fwd_fee: Int, total_account_fees: Int, total_output: Int) { + /// Fee for inbound external message import. + public var ext_in_msg_fee: Int + /// Total fees the account pays for message forwarding + public var total_fwd_fees: Int + /// Total account fees for the transaction execution. Compounds of storage_fee + gas_fee + ext_in_msg_fee + total_fwd_fees + public var account_fees: Int + + public init(in_msg_fwd_fee: Int, storage_fee: Int, gas_fee: Int, out_msgs_fwd_fee: Int, total_account_fees: Int, total_output: Int, ext_in_msg_fee: Int, total_fwd_fees: Int, account_fees: Int) { self.in_msg_fwd_fee = in_msg_fwd_fee self.storage_fee = storage_fee self.gas_fee = gas_fee self.out_msgs_fwd_fee = out_msgs_fwd_fee self.total_account_fees = total_account_fees self.total_output = total_output + self.ext_in_msg_fee = ext_in_msg_fee + self.total_fwd_fees = total_fwd_fees + self.account_fees = account_fees } }