Skip to content

Commit ee69866

Browse files
committed
random uncommitted stuff
1 parent 8a5fb0c commit ee69866

File tree

6 files changed

+76
-8
lines changed

6 files changed

+76
-8
lines changed

libs.versions.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ coroutinesCore = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", ver
3232
coroutinesJdk8 = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-jdk8", version.ref = "kotlinxCoroutines" }
3333
kermit = { module = "co.touchlab:kermit", version.ref = "kermit" }
3434
kotlin-bom = { module = "org.jetbrains.kotlin:kotlin-bom", version.ref = "kotlin" }
35+
kotlinLogging = { module = "io.github.oshai:kotlin-logging", version = "6.0.9" }
3536
ktorClientContentNegotiation = { module = "io.ktor:ktor-client-content-negotiation", version.ref = "ktor" }
3637
ktorClientCio = { module = "io.ktor:ktor-client-cio", version.ref = "ktor" }
3738
ktorClientCore = { module = "io.ktor:ktor-client-core", version.ref = "ktor" }
@@ -45,6 +46,8 @@ ktorUtils = { module = "io.ktor:ktor-utils", version.ref = "ktor" }
4546
okio = { module = "com.squareup.okio:okio", version.ref = "okio" }
4647
okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp" }
4748
okhttpLoggingInterceptor = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "okhttp" }
49+
slf4j-api = { module = "org.slf4j:slf4j-api", version = "2.0.13" }
50+
slf4j-simple = { module = "org.slf4j:slf4j-simple", version = "2.0.13" }
4851
serializationCore = { module = "org.jetbrains.kotlinx:kotlinx-serialization-core", version.ref = "serialization" }
4952
serializationJson = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "serialization" }
5053
skie-configurationAnnotations = { module = "co.touchlab.skie:configuration-annotations", version.ref = "skie" }

solana-kotlin/build.gradle.kts

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import co.touchlab.skie.configuration.ClassInterop
22
import co.touchlab.skie.configuration.DefaultArgumentInterop
3+
import org.jetbrains.kotlin.gradle.plugin.KotlinJsCompilerType
34

45
plugins {
56
alias(libs.plugins.kotlinMultiplatform)
@@ -41,14 +42,44 @@ kotlin {
4142
mingwX64()
4243
linuxX64()
4344

45+
js(KotlinJsCompilerType.IR) {
46+
browser {
47+
compilations.all {
48+
kotlinOptions {
49+
sourceMap = true
50+
sourceMapEmbedSources = "always"
51+
}
52+
}
53+
testTask {
54+
useMocha {
55+
timeout = "60s"
56+
}
57+
}
58+
}
59+
nodejs {
60+
compilations.all {
61+
kotlinOptions {
62+
sourceMap = true
63+
sourceMapEmbedSources = "always"
64+
}
65+
}
66+
}
67+
generateTypeScriptDefinitions()
68+
}
69+
4470
sourceSets {
4571
val jvmMain by getting {
4672
dependencies {
4773
implementation(libs.ktorClientOkHttp)
4874
implementation(libs.bouncyCastle)
75+
implementation(libs.slf4j.api)
76+
}
77+
}
78+
val jvmTest by getting {
79+
dependencies {
80+
implementation(libs.slf4j.simple)
4981
}
5082
}
51-
val jvmTest by getting
5283

5384
val commonMain by getting {
5485
dependencies {
@@ -62,6 +93,7 @@ kotlin {
6293
implementation(libs.kermit)
6394
implementation(libs.okio)
6495
implementation(libs.skie.configurationAnnotations)
96+
implementation(libs.kotlinLogging)
6597
}
6698
}
6799
val commonTest by getting {
@@ -93,6 +125,12 @@ kotlin {
93125
implementation(libs.ktorClientWinHttp)
94126
}
95127
}
128+
129+
val jsMain by getting {
130+
dependencies {
131+
implementation(libs.ktorClientJs)
132+
}
133+
}
96134
}
97135
}
98136

solana-kotlin/src/commonTest/kotlin/net/avianlabs/solana/domain/program/AssociatedTokenProgramTest.kt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ class AssociatedTokenProgramTest {
1111
fun testFindProgramAddress() {
1212
for (i in 0..1000) {
1313
val programId = randomKey().publicKey
14-
println("programId: $programId")
1514

1615
val seeds = listOf(
1716
"Lil'".encodeToByteArray(),
@@ -21,15 +20,12 @@ class AssociatedTokenProgramTest {
2120
seeds = seeds,
2221
programId = programId,
2322
)
24-
println("address: $address")
2523

2624
val created = Program.createProgramAddress(
2725
seeds = seeds + byteArrayOf(address.nonce.toByte()),
2826
programId = programId,
2927
)
3028

31-
println("created: $created")
32-
3329
assertEquals(address.address, created)
3430
}
3531
}
@@ -46,7 +42,6 @@ class AssociatedTokenProgramTest {
4642
val wallet = PublicKey.fromBase58(wallet)
4743

4844
val associated = wallet.associatedTokenAddress(mint)
49-
println(associated)
5045

5146
val expectedAssociated = PublicKey.fromBase58(expectedAssociated)
5247

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# SLF4J's SimpleLogger configuration file
2+
# Simple implementation of Logger that sends all enabled log messages, for all defined loggers, to System.err.
3+
# Default logging detail level for all instances of SimpleLogger.
4+
# Must be one of ("trace", "debug", "info", "warn", or "error").
5+
# If not specified, defaults to "info".
6+
org.slf4j.simpleLogger.defaultLogLevel=debug
7+
# Logging detail level for a SimpleLogger instance named "xxxxx".
8+
# Must be one of ("trace", "debug", "info", "warn", or "error").
9+
# If not specified, the default logging detail level is used.
10+
#org.slf4j.simpleLogger.log.xxxxx=
11+
# Set to true if you want the current date and time to be included in output messages.
12+
# Default is false, and will output the number of milliseconds elapsed since startup.
13+
org.slf4j.simpleLogger.showDateTime=true
14+
# The date and time format to be used in the output messages.
15+
# The pattern describing the date and time format is the same that is used in java.text.SimpleDateFormat.
16+
# If the format is not specified or is invalid, the default format is used.
17+
# The default format is yyyy-MM-dd HH:mm:ss:SSS Z.
18+
org.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd HH:mm:ss:SSS Z
19+
# Set to true if you want to output the current thread name.
20+
# Defaults to true.
21+
org.slf4j.simpleLogger.showThreadName=false
22+
# Set to true if you want the Logger instance name to be included in output messages.
23+
# Defaults to true.
24+
org.slf4j.simpleLogger.showLogName=false
25+
# Set to true if you want the last component of the name to be included in output messages.
26+
# Defaults to false.
27+
#org.slf4j.simpleLogger.showShortLogName=false

tweetnacl-multiplatform/build.gradle.kts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,18 @@ kotlin {
7070
dependencies {
7171
implementation(libs.tweetNaClJava)
7272
implementation(libs.bouncyCastle)
73+
implementation(libs.slf4j.api)
74+
}
75+
}
76+
val jvmTest by getting {
77+
dependencies {
78+
implementation(libs.slf4j.simple)
7379
}
7480
}
75-
val jvmTest by getting
7681

7782
val commonMain by getting {
7883
dependencies {
84+
implementation(libs.kotlinLogging)
7985
}
8086
}
8187
val commonTest by getting {

tweetnacl-multiplatform/src/jsMain/kotlin/net/avianlabs/solana/tweetnacl/TweetNaCl.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ internal actual fun isOnCurveInternal(publicKey: ByteArray): Boolean =
1212
Curves.ed25519.extendedPoint.fromHex(publicKey.asUint8Array())
1313
true
1414
} catch (e: Throwable) {
15-
println(e.stackTraceToString())
1615
false
1716
}
1817

0 commit comments

Comments
 (0)