diff --git a/Package.swift b/Package.swift index 2a88606..2fff7a6 100644 --- a/Package.swift +++ b/Package.swift @@ -14,9 +14,9 @@ let package = Package( ], dependencies: [ .package(url: "https://github.com/nerzh/swift-regular-expression.git", .upToNextMajor(from: "0.2.4")), - .package(url: "https://github.com/nerzh/SwiftFileUtils", .upToNextMinor(from: "1.3.0")), + .package(url: "https://github.com/nerzh/SwiftFileUtils", .upToNextMajor(from: "1.3.0")), .package(url: "https://github.com/bytehubio/BigInt", exact: "5.3.0"), - .package(url: "https://github.com/nerzh/swift-extensions-pack", .upToNextMinor(from: "1.3.6")), + .package(url: "https://github.com/nerzh/swift-extensions-pack", .upToNextMajor(from: "1.3.6")), ], targets: [ .systemLibrary(name: "CTonSDK", pkgConfig: "libton_client"), diff --git a/README.md b/README.md index e0421a2..1e2ead6 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ ---> [![SPM](https://img.shields.io/badge/swift-package%20manager-green)](https://swift.org/package-manager/) -[![SPM](https://img.shields.io/badge/SDK%20VERSION-1.43.3-orange)](https://github.com/tonlabs/ever-sdk) +[![SPM](https://img.shields.io/badge/SDK%20VERSION-1.44.2-orange)](https://github.com/tonlabs/ever-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 TVM (toncoin, everscale, venom, gosh) 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/Debot/Debot.swift b/Sources/EverscaleClientSwift/Debot/Debot.swift index de470c4..c735775 100644 --- a/Sources/EverscaleClientSwift/Debot/Debot.swift +++ b/Sources/EverscaleClientSwift/Debot/Debot.swift @@ -7,7 +7,7 @@ public final class TSDKDebotModule { self.binding = binding } - /// [UNSTABLE](UNSTABLE.md) Creates and instance of DeBot. + /// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Creates and instance of DeBot. /// Downloads debot smart contract (code and data) from blockchain and createsan instance of Debot Engine for it. /// # RemarksIt does not switch debot to context 0. Browser Callbacks are not called. public func initialize(_ payload: TSDKParamsOfInit, _ handler: @escaping (TSDKBindingResponse) throws -> Void @@ -20,7 +20,7 @@ public final class TSDKDebotModule { } } - /// [UNSTABLE](UNSTABLE.md) Creates and instance of DeBot. + /// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Creates and instance of DeBot. /// Downloads debot smart contract (code and data) from blockchain and createsan instance of Debot Engine for it. /// # RemarksIt does not switch debot to context 0. Browser Callbacks are not called. @available(iOS 13, *) @@ -46,7 +46,7 @@ public final class TSDKDebotModule { } } - /// [UNSTABLE](UNSTABLE.md) Starts the DeBot. + /// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Starts the DeBot. /// Downloads debot smart contract from blockchain and switches it tocontext zero. /// This function must be used by Debot Browser to start a dialog with debot. /// While the function is executing, several Browser Callbacks can be called,since the debot tries to display all actions from the context 0 to the user. @@ -62,7 +62,7 @@ public final class TSDKDebotModule { } } - /// [UNSTABLE](UNSTABLE.md) Starts the DeBot. + /// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Starts the DeBot. /// Downloads debot smart contract from blockchain and switches it tocontext zero. /// This function must be used by Debot Browser to start a dialog with debot. /// While the function is executing, several Browser Callbacks can be called,since the debot tries to display all actions from the context 0 to the user. @@ -91,7 +91,7 @@ public final class TSDKDebotModule { } } - /// [UNSTABLE](UNSTABLE.md) Fetches DeBot metadata from blockchain. + /// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Fetches DeBot metadata from blockchain. /// Downloads DeBot from blockchain and creates and fetches its metadata. public func fetch(_ payload: TSDKParamsOfFetch, _ handler: @escaping (TSDKBindingResponse) throws -> Void ) throws { @@ -103,7 +103,7 @@ public final class TSDKDebotModule { } } - /// [UNSTABLE](UNSTABLE.md) Fetches DeBot metadata from blockchain. + /// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Fetches DeBot metadata from blockchain. /// Downloads DeBot from blockchain and creates and fetches its metadata. @available(iOS 13, *) @available(macOS 12, *) @@ -128,7 +128,7 @@ public final class TSDKDebotModule { } } - /// [UNSTABLE](UNSTABLE.md) Executes debot action. + /// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Executes debot action. /// Calls debot engine referenced by debot handle to execute input action. /// Calls Debot Browser Callbacks if needed. /// # RemarksChain of actions can be executed if input action generates a list of subactions. @@ -142,7 +142,7 @@ public final class TSDKDebotModule { } } - /// [UNSTABLE](UNSTABLE.md) Executes debot action. + /// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Executes debot action. /// Calls debot engine referenced by debot handle to execute input action. /// Calls Debot Browser Callbacks if needed. /// # RemarksChain of actions can be executed if input action generates a list of subactions. @@ -169,7 +169,7 @@ public final class TSDKDebotModule { } } - /// [UNSTABLE](UNSTABLE.md) Sends message to Debot. + /// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Sends message to Debot. /// Used by Debot Browser to send response on Dinterface call or from other Debots. public func send(_ payload: TSDKParamsOfSend, _ handler: @escaping (TSDKBindingResponse) throws -> Void ) throws { @@ -181,7 +181,7 @@ public final class TSDKDebotModule { } } - /// [UNSTABLE](UNSTABLE.md) Sends message to Debot. + /// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Sends message to Debot. /// Used by Debot Browser to send response on Dinterface call or from other Debots. @available(iOS 13, *) @available(macOS 12, *) @@ -206,7 +206,7 @@ public final class TSDKDebotModule { } } - /// [UNSTABLE](UNSTABLE.md) Destroys debot handle. + /// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Destroys debot handle. /// Removes handle from Client Context and drops debot engine referenced by that handle. public func remove(_ payload: TSDKParamsOfRemove, _ handler: @escaping (TSDKBindingResponse) throws -> Void ) throws { @@ -218,7 +218,7 @@ public final class TSDKDebotModule { } } - /// [UNSTABLE](UNSTABLE.md) Destroys debot handle. + /// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Destroys debot handle. /// Removes handle from Client Context and drops debot engine referenced by that handle. @available(iOS 13, *) @available(macOS 12, *) diff --git a/Sources/EverscaleClientSwift/Debot/DebotTypes.swift b/Sources/EverscaleClientSwift/Debot/DebotTypes.swift index 7def7ac..bc265be 100644 --- a/Sources/EverscaleClientSwift/Debot/DebotTypes.swift +++ b/Sources/EverscaleClientSwift/Debot/DebotTypes.swift @@ -142,7 +142,7 @@ public struct TSDKDebotActivity: Codable { } } -/// [UNSTABLE](UNSTABLE.md) Describes the operation that the DeBot wants to perform. +/// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Describes the operation that the DeBot wants to perform. public struct TSDKSpending: Codable { /// Amount of nanotokens that will be sent to `dst` address. public var amount: Int @@ -209,7 +209,7 @@ public struct TSDKParamsOfAppDebotBrowser: Codable { } } -/// [UNSTABLE](UNSTABLE.md) Debot Browser callbacks +/// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Debot Browser callbacks /// Called by debot engine to communicate with debot browser. public struct TSDKResultOfAppDebotBrowser: Codable { public var type: TSDKResultOfAppDebotBrowserEnumTypes @@ -229,7 +229,7 @@ public struct TSDKResultOfAppDebotBrowser: Codable { } } -/// [UNSTABLE](UNSTABLE.md) Returning values from Debot Browser callbacks. +/// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Returning values from Debot Browser callbacks. public struct TSDKParamsOfStart: Codable { /// Debot handle which references an instance of debot engine. public var debot_handle: TSDKDebotHandle diff --git a/Sources/EverscaleClientSwift/Processing/ProcessingTypes.swift b/Sources/EverscaleClientSwift/Processing/ProcessingTypes.swift index b77a96b..387e357 100644 --- a/Sources/EverscaleClientSwift/Processing/ProcessingTypes.swift +++ b/Sources/EverscaleClientSwift/Processing/ProcessingTypes.swift @@ -293,10 +293,10 @@ public struct TSDKParamsOfSendMessage: Codable { /// The `message already expired` error will be returned in thiscase. /// Note, that specifying `abi` for ABI compliant contracts isstrongly recommended, so that proper processing strategy can bechosen. public var abi: TSDKAbi? - /// Flag for requesting events sending - public var send_events: Bool + /// Flag for requesting events sending. Default is `false`. + public var send_events: Bool? - public init(message: String, abi: TSDKAbi? = nil, send_events: Bool) { + public init(message: String, abi: TSDKAbi? = nil, send_events: Bool? = nil) { self.message = message self.abi = abi self.send_events = send_events @@ -328,15 +328,15 @@ public struct TSDKParamsOfWaitForTransaction: Codable { /// The last generated block id of the destination account shard before the message was sent. /// You must provide the same value as the `send_message` has returned. public var shard_block_id: String - /// Flag that enables/disables intermediate events - public var send_events: Bool + /// Flag that enables/disables intermediate events. Default is `false`. + public var send_events: Bool? /// The list of endpoints to which the message was sent. /// Use this field to get more informative errors. /// Provide the same value as the `send_message` has returned. /// If the message was not delivered (expired), SDK will log the endpoint URLs, used for its sending. public var sending_endpoints: [String]? - public init(abi: TSDKAbi? = nil, message: String, shard_block_id: String, send_events: Bool, sending_endpoints: [String]? = nil) { + public init(abi: TSDKAbi? = nil, message: String, shard_block_id: String, send_events: Bool? = nil, sending_endpoints: [String]? = nil) { self.abi = abi self.message = message self.shard_block_id = shard_block_id @@ -348,10 +348,10 @@ public struct TSDKParamsOfWaitForTransaction: Codable { public struct TSDKParamsOfProcessMessage: Codable { /// Message encode parameters. public var message_encode_params: TSDKParamsOfEncodeMessage - /// Flag for requesting events sending - public var send_events: Bool + /// Flag for requesting events sending. Default is `false`. + public var send_events: Bool? - public init(message_encode_params: TSDKParamsOfEncodeMessage, send_events: Bool) { + public init(message_encode_params: TSDKParamsOfEncodeMessage, send_events: Bool? = nil) { self.message_encode_params = message_encode_params self.send_events = send_events }