diff --git a/src/main/kotlin/ee/nx01/tonclient/process/ProcessModule.kt b/src/main/kotlin/ee/nx01/tonclient/process/ProcessModule.kt index 84c9f46..7a12376 100644 --- a/src/main/kotlin/ee/nx01/tonclient/process/ProcessModule.kt +++ b/src/main/kotlin/ee/nx01/tonclient/process/ProcessModule.kt @@ -47,6 +47,14 @@ class ProcessModule(private val tonClient: TonClient) { return tonClient.request("processing.send_message", params) } + /** + ## send_messages + Sends specified messages to the blockchain. + */ + suspend fun sendMessages(params: ParamsOfSendMessages): ResultOfSendMessages { + return tonClient.request("processing.send_messages", params) + } + /** ## wait_for_transaction diff --git a/src/main/kotlin/ee/nx01/tonclient/process/Types.kt b/src/main/kotlin/ee/nx01/tonclient/process/Types.kt index 2538339..1c4c8ac 100644 --- a/src/main/kotlin/ee/nx01/tonclient/process/Types.kt +++ b/src/main/kotlin/ee/nx01/tonclient/process/Types.kt @@ -57,3 +57,36 @@ enum class ProcessingEventType { MessageExpired, TransactionReceived } + +data class ParamsOfSendMessages( + val messages: List, + val monitorQueue: String? = null +) + +data class ResultOfSendMessages( + val messages: List +) + +data class MessageSendingParams( + val boc: String, + val waitUntil: Int, + val userData: Any? = null +) + +data class ParamsOfMonitorMessages( + val queue: String, + val messages: List +) + +data class MessageMonitoringParams( + val message: MonitoredMessage, + val waitUntil: Int, + val userData: Any? = null +) + +data class MonitoredMessage( + val type: String, + val boc: String? = null, + val hash: String? = null, + val address: String? = null +) \ No newline at end of file diff --git a/src/main/resources/natives/osx_64/libtonclientjni.dylib b/src/main/resources/natives/osx_64/libtonclientjni.dylib index 625d0a5..3570228 100644 Binary files a/src/main/resources/natives/osx_64/libtonclientjni.dylib and b/src/main/resources/natives/osx_64/libtonclientjni.dylib differ diff --git a/src/main/resources/natives/osx_arm64/libtonclientjni.dylib b/src/main/resources/natives/osx_arm64/libtonclientjni.dylib index 4e2652f..a5f13df 100644 Binary files a/src/main/resources/natives/osx_arm64/libtonclientjni.dylib and b/src/main/resources/natives/osx_arm64/libtonclientjni.dylib differ