From ea212ffd10e09dcb78030b8932d32146326d7109 Mon Sep 17 00:00:00 2001 From: Andrey Pfau Date: Tue, 7 Feb 2023 15:37:42 +0300 Subject: [PATCH] 0.2.14 Release --- README.md | 2 +- build.gradle.kts | 2 +- ton-kotlin-bigint/build.gradle.kts | 1 - .../kotlin/org/ton/contract/wallet/WalletTest.kt | 15 +++++++++++++++ .../src/jvmTest/kotlin/WalletV4Example.kt | 2 +- .../kotlin/org/ton/mnemonic/MnemonicTest.kt | 3 ++- 6 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 ton-kotlin-contract/src/commonTest/kotlin/org/ton/contract/wallet/WalletTest.kt diff --git a/README.md b/README.md index 24d67832..377ac068 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ ```kotlin dependencies { - implementation("org.ton:ton-kotlin:0.2.13") + implementation("org.ton:ton-kotlin:0.2.14") } ``` diff --git a/build.gradle.kts b/build.gradle.kts index fd7154b1..53baafdc 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -17,7 +17,7 @@ val isCI = System.getenv("CI") == "true" allprojects { group = "org.ton" - version = "0.2.13" + version = "0.2.14" apply(plugin = "kotlin-multiplatform") apply(plugin = "kotlinx-serialization") diff --git a/ton-kotlin-bigint/build.gradle.kts b/ton-kotlin-bigint/build.gradle.kts index d3bd7e01..89b4fd53 100644 --- a/ton-kotlin-bigint/build.gradle.kts +++ b/ton-kotlin-bigint/build.gradle.kts @@ -3,7 +3,6 @@ kotlin { val commonMain by getting { dependencies { implementation(libs.serialization.json) - implementation("com.ionspin.kotlin:bignum:0.3.7") } } val commonTest by getting diff --git a/ton-kotlin-contract/src/commonTest/kotlin/org/ton/contract/wallet/WalletTest.kt b/ton-kotlin-contract/src/commonTest/kotlin/org/ton/contract/wallet/WalletTest.kt new file mode 100644 index 00000000..6405e617 --- /dev/null +++ b/ton-kotlin-contract/src/commonTest/kotlin/org/ton/contract/wallet/WalletTest.kt @@ -0,0 +1,15 @@ +package org.ton.contract.wallet + +import kotlinx.coroutines.runBlocking +import org.ton.api.pk.PrivateKeyEd25519 +import kotlin.test.Test + +class WalletTest { + @Test + fun test(): Unit = runBlocking { + val wallet = WalletV4R2Contract(PrivateKeyEd25519(ByteArray(32) { 0x00 }).publicKey()) + println(wallet.address.toString( + userFriendly = true + )) + } +} diff --git a/ton-kotlin-contract/src/jvmTest/kotlin/WalletV4Example.kt b/ton-kotlin-contract/src/jvmTest/kotlin/WalletV4Example.kt index 15452eca..cd4ce8e5 100644 --- a/ton-kotlin-contract/src/jvmTest/kotlin/WalletV4Example.kt +++ b/ton-kotlin-contract/src/jvmTest/kotlin/WalletV4Example.kt @@ -17,7 +17,7 @@ suspend fun main(args: Array) { val liteApi = liteClient().liteApi val privateKey = - PrivateKeyEd25519(Mnemonic.toSeed(mnemonics.toTypedArray())) + PrivateKeyEd25519(Mnemonic.toSeed(mnemonics)) val wallet = WalletV4R2Contract(privateKey.publicKey()) println(wallet.address) diff --git a/ton-kotlin-mnemonic/src/commonTest/kotlin/org/ton/mnemonic/MnemonicTest.kt b/ton-kotlin-mnemonic/src/commonTest/kotlin/org/ton/mnemonic/MnemonicTest.kt index 0a6a37eb..61cca393 100644 --- a/ton-kotlin-mnemonic/src/commonTest/kotlin/org/ton/mnemonic/MnemonicTest.kt +++ b/ton-kotlin-mnemonic/src/commonTest/kotlin/org/ton/mnemonic/MnemonicTest.kt @@ -1,6 +1,7 @@ package org.ton.mnemonic -import kotlinx.coroutines.runBlocking +import kotlinx.coroutines.* +import kotlinx.coroutines.channels.Channel import org.ton.crypto.hex import kotlin.test.Test import kotlin.test.assertEquals