Skip to content

Commit

Permalink
UP 1.34
Browse files Browse the repository at this point in the history
  • Loading branch information
nerzh committed May 20, 2022
1 parent ec1a219 commit 72a174d
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
11 changes: 11 additions & 0 deletions Sources/EverscaleClientSwift/Client/Client.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,17 @@ public final class TSDKClientModule {
}
}

/// Returns Core Library API reference
public func config(_ handler: @escaping (TSDKBindingResponse<TSDKClientConfig, TSDKClientError>) throws -> Void
) {
let method: String = "config"
binding.requestLibraryAsync(methodName(module, method), "") { (requestId, params, responseType, finished) in
var response: TSDKBindingResponse<TSDKClientConfig, TSDKClientError> = .init()
response.update(requestId, params, responseType, finished)
try handler(response)
}
}

/// Returns detailed information about this build.
public func build_info(_ handler: @escaping (TSDKBindingResponse<TSDKResultOfBuildInfo, TSDKClientError>) throws -> Void
) {
Expand Down
23 changes: 21 additions & 2 deletions Sources/EverscaleClientSwift/Tvm/TvmTypes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down

0 comments on commit 72a174d

Please sign in to comment.