File tree Expand file tree Collapse file tree 6 files changed +20
-5
lines changed
commonTest/kotlin/org/ton/contract/wallet
ton-kotlin-mnemonic/src/commonTest/kotlin/org/ton/mnemonic Expand file tree Collapse file tree 6 files changed +20
-5
lines changed Original file line number Diff line number Diff line change 1111
1212``` kotlin
1313dependencies {
14- implementation(" org.ton:ton-kotlin:0.2.13 " )
14+ implementation(" org.ton:ton-kotlin:0.2.14 " )
1515}
1616```
1717
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ val isCI = System.getenv("CI") == "true"
1717
1818allprojects {
1919 group = " org.ton"
20- version = " 0.2.13 "
20+ version = " 0.2.14 "
2121
2222 apply (plugin = " kotlin-multiplatform" )
2323 apply (plugin = " kotlinx-serialization" )
Original file line number Diff line number Diff line change 33 val commonMain by getting {
44 dependencies {
55 implementation(libs.serialization.json)
6- implementation(" com.ionspin.kotlin:bignum:0.3.7" )
76 }
87 }
98 val commonTest by getting
Original file line number Diff line number Diff line change 1+ package org.ton.contract.wallet
2+
3+ import kotlinx.coroutines.runBlocking
4+ import org.ton.api.pk.PrivateKeyEd25519
5+ import kotlin.test.Test
6+
7+ class WalletTest {
8+ @Test
9+ fun test (): Unit = runBlocking {
10+ val wallet = WalletV4R2Contract (PrivateKeyEd25519 (ByteArray (32 ) { 0x00 }).publicKey())
11+ println (wallet.address.toString(
12+ userFriendly = true
13+ ))
14+ }
15+ }
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ suspend fun main(args: Array<String>) {
1717
1818 val liteApi = liteClient().liteApi
1919 val privateKey =
20- PrivateKeyEd25519 (Mnemonic .toSeed(mnemonics.toTypedArray() ))
20+ PrivateKeyEd25519 (Mnemonic .toSeed(mnemonics))
2121
2222 val wallet = WalletV4R2Contract (privateKey.publicKey())
2323 println (wallet.address)
Original file line number Diff line number Diff line change 11package org.ton.mnemonic
22
3- import kotlinx.coroutines.runBlocking
3+ import kotlinx.coroutines.*
4+ import kotlinx.coroutines.channels.Channel
45import org.ton.crypto.hex
56import kotlin.test.Test
67import kotlin.test.assertEquals
You can’t perform that action at this time.
0 commit comments