Code Monkey home page Code Monkey logo

kryptokrona-kotlin-sdk's Introduction

Kryptokrona Kotlin SDK

alpha build kotlin release license codecov docs

Kryptokrona is a decentralized blockchain from the Nordic based on CryptoNote, which forms the basis for Monero, among others. CryptoNote is a so-called “application layer” protocol further developed by TurtleCoin that enables things like: private transactions, messages and arbitrary data storage, completely decentralized.

Kryptokrona SDK for Kotlin is currently the most fully featured implementation of the Kryptokrona Network protocols and includes many useful libraries and tools for building decentralized private communication and payment systems.

Development Resources

Getting Help

Are you having trouble with Kryptokrona Kotlin SDK? We want to help!

Reporting Issues

Kryptokrona Kotlin SDK uses GitHub’s integrated issue tracking system to record bugs and feature requests. If you want to raise an issue, please follow the recommendations below:

  • Before you log a bug, please search the issue tracker to see if someone has already reported the problem.

  • If the issue doesn’t already exist, create a new issue.

  • Please provide as much information as possible with the issue report. We like to know the Kryptokrona Kotlin SDK version, operating system, and JVM version you’re using.

  • If you need to paste code or include a stack trace, use Markdown. ``` escapes before and after your text.

  • If possible, try to create a test case or project that replicates the problem and attach it to the issue.

Contributors

The following contributors have either helped to start this project, have contributed code, are actively maintaining it (including documentation), or in other ways being awesome contributors to this project. We'd like to take a moment to recognize them.

mjovanc mjovanc n9lsjr TechyGuy17 appelskrutt34 axz02

Powered by

Kotlin Ktor Detekt Kotlin Coroutines GitHub Actions Sveltepress Vercel

License

The 3-Clause BSD License.

kryptokrona-kotlin-sdk's People

Contributors

appelskrutt34 avatar axz02 avatar marcuscvj avatar mjovanc avatar renovate[bot] avatar techyguy17 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

kryptokrona-kotlin-sdk's Issues

Error parsing transaction details by hashes

TransactionClient gives an error parsing transaction details by hashes. See error:

[Test worker @coroutine#319] ERROR TransactionClient - Error getting transaction details by hashes. Could not parse the response.
io.ktor.serialization.JsonConvertException: Unexpected JSON token at offset 31: Expected beginning of the string, but got { at path: $.transactions[0]
JSON input: ....."status":"OK","transactions":[{"blockHash":"2e9a0f1fb6e59a76.....

Restructure response models in kryptokrona-http

Move for example WalletSyncDataItem data class into WalletSyncData.kt to avoid multiple files.

Currently we have many different files for declaring the data class object. We should probabaly store most of them in a single file. Example here: https://github.com/kryptokrona/kryptokrona-kotlin-sdk/tree/master/kryptokrona-http/src/main/kotlin/org/kryptokrona/sdk/http/model/response/block

All BlockDetail files could be in a single BlockDetail.kt file instead.

To illustrate what I'm saying here is to first open BlockDetail.kt:

package org.kryptokrona.sdk.http.model.response.block

import kotlinx.serialization.Serializable

@Serializable
data class BlockDetail(val block: BlockDetailBlock, val status: String)

Then take the data class from all other files for example as BlockDetailBlock.kt into the same BlockDetail.kt file:

package org.kryptokrona.sdk.http.model.response.block

import kotlinx.serialization.Serializable

@Serializable
data class BlockDetail(val block: BlockDetailBlock, val status: String)

@Serializable
data class BlockDetailBlock(
    val alreadyGeneratedCoins: Long,
    val alreadyGeneratedTransactions: Long,
    val baseReward: Long,
    val blockSize: Long,
    val difficulty: Long,
    val hash: String,
    val index: Long,
    val majorVersion: Int,
    val minorVersion: Int,
    val nonce: Long,
    val prevBlockHash: String,
    val reward: Long,
    val sizeMedian: Long,
    val timestamp: Long,
    val totalFeeAmount: Long,
    val transactions: List<BlockDetailBlockTransaction>,
    val transactionsCumulativeSize: Long
)

After doing this, important to refactor all other files that are using these current files. Remove them after refactoring and just keep BlockDetail.kt.

Example of how to send request params

This is just a note:

val params = ParametersBuilder().apply {
            walletSyncData.blockIds?.let { append("blockIds", it.toString()) }
            walletSyncData.startHeight?.let { append("startHeight", it.toString()) }
            walletSyncData.startTimestamp?.let { append("startTimestamp", it.toString()) }
            walletSyncData.blockCount?.let { append("blockCount", it.toString()) }
            walletSyncData.items?.let { append("items", it.toString()) }
        }.build()

Then in a client.post() call we can add it with:

url { parameters.appendAll(params) }

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

docker-compose
docker-compose.yml
github-actions
.github/workflows/master-ci.yml
  • actions/checkout v3
  • actions/setup-java v3
  • egor-tensin/setup-mingw v2
  • actions/upload-artifact v3
  • actions/upload-artifact v3
  • actions/checkout v3
  • actions/setup-java v3
  • actions/download-artifact v3
  • actions/download-artifact v3
  • actions/download-artifact v3
  • actions/download-artifact v3
  • codecov/codecov-action v3
  • actions/checkout v3
  • actions/setup-java v3
.github/workflows/pr-ci.yml
  • actions/checkout v3
  • actions/setup-java v3
  • egor-tensin/setup-mingw v2
  • actions/upload-artifact v3
  • actions/upload-artifact v3
  • actions/checkout v3
  • actions/setup-java v3
  • actions/download-artifact v3
  • actions/download-artifact v3
  • actions/download-artifact v3
  • actions/download-artifact v3
  • codecov/codecov-action v3
  • actions/checkout v3
  • actions/setup-java v3
.github/workflows/publish.yml
  • actions/checkout v3
  • actions/setup-java v3
  • burrunan/gradle-cache-action v1
.github/workflows/release.yml
  • actions/checkout v3
  • actions/setup-java v3
  • burrunan/gradle-cache-action v1
gradle
gradle.properties
settings.gradle.kts
build.gradle.kts
  • org.jetbrains.kotlin.jvm 1.8.22
  • org.jetbrains.dokka 1.8.20
  • io.gitlab.arturbosch.detekt 1.23.1
  • io.github.gradle-nexus.publish-plugin 1.3.0
  • org.jetbrains.dokka:dokka-base 1.8.20
kryptokrona-crypto/gradle.properties
  • org.jetbrains.kotlinx:kotlinx-coroutines-core 1.7.3
  • org.slf4j:slf4j-api 2.0.7
  • org.slf4j:slf4j-simple 2.0.7
kryptokrona-crypto/settings.gradle.kts
kryptokrona-crypto/build.gradle.kts
  • org.jetbrains.kotlin.jvm 1.8.22
  • org.jetbrains.kotlin.plugin.serialization 1.8.22
  • org.jetbrains.kotlinx.kover 0.7.3
  • org.jetbrains.kotlinx:kotlinx-serialization-json-jvm 1.5.1
kryptokrona-huginapi/gradle.properties
  • org.jetbrains.kotlinx:kotlinx-coroutines-core 1.7.3
  • org.jetbrains.kotlin:kotlin-reflect 1.8.22
  • io.ktor:ktor-client-core 2.3.3
  • io.ktor:ktor-client-cio 2.3.3
  • io.ktor:ktor-client-content-negotiation 2.3.3
  • io.ktor:ktor-serialization-kotlinx-json 2.3.3
  • org.slf4j:slf4j-api 2.0.7
  • org.slf4j:slf4j-simple 2.0.7
kryptokrona-huginapi/settings.gradle.kts
  • org.gradle.toolchains.foojay-resolver-convention 0.6.0
kryptokrona-huginapi/build.gradle.kts
  • org.jetbrains.kotlin.jvm 1.8.22
  • org.jetbrains.kotlin.plugin.serialization 1.8.22
  • org.jetbrains.kotlinx.kover 0.7.3
  • org.jetbrains.kotlinx:kotlinx-serialization-json-jvm 1.5.1
  • org.jetbrains.kotlinx:kotlinx-coroutines-test 1.7.3
kryptokrona-node/gradle.properties
  • org.jetbrains.kotlinx:kotlinx-coroutines-core 1.7.3
  • org.jetbrains.kotlin:kotlin-reflect 1.8.22
  • io.ktor:ktor-client-core 2.3.3
  • io.ktor:ktor-client-cio 2.3.3
  • io.ktor:ktor-client-content-negotiation 2.3.3
  • io.ktor:ktor-serialization-kotlinx-json 2.3.3
  • org.slf4j:slf4j-api 2.0.7
  • org.slf4j:slf4j-simple 2.0.7
kryptokrona-node/settings.gradle.kts
kryptokrona-node/build.gradle.kts
  • org.jetbrains.kotlin.jvm 1.8.22
  • org.jetbrains.kotlin.plugin.serialization 1.8.22
  • org.jetbrains.kotlinx.kover 0.7.3
  • org.jetbrains.kotlinx:kotlinx-serialization-json-jvm 1.5.1
  • org.jetbrains.kotlinx:kotlinx-coroutines-test 1.7.3
kryptokrona-service/gradle.properties
  • org.jetbrains.kotlinx:kotlinx-coroutines-core 1.7.3
  • org.jetbrains.kotlin:kotlin-reflect 1.8.22
  • io.ktor:ktor-client-core 2.3.3
  • io.ktor:ktor-client-cio 2.3.3
  • io.ktor:ktor-client-content-negotiation 2.3.3
  • io.ktor:ktor-serialization-kotlinx-json 2.3.3
  • org.slf4j:slf4j-api 2.0.7
  • org.slf4j:slf4j-simple 2.0.7
kryptokrona-service/settings.gradle.kts
kryptokrona-service/build.gradle.kts
  • org.jetbrains.kotlin.jvm 1.8.22
  • org.jetbrains.kotlin.plugin.serialization 1.8.22
  • org.jetbrains.kotlinx.kover 0.7.3
  • org.jetbrains.kotlinx:kotlinx-serialization-json-jvm 1.5.1
  • org.jetbrains.kotlinx:kotlinx-coroutines-test 1.7.3
kryptokrona-util/gradle.properties
  • io.ktor:ktor-serialization-kotlinx-json 2.3.3
kryptokrona-util/settings.gradle.kts
kryptokrona-util/build.gradle.kts
  • org.jetbrains.kotlin.jvm 1.8.22
  • org.jetbrains.kotlin.plugin.serialization 1.8.22
  • org.jetbrains.kotlinx.kover 0.7.3
kryptokrona-wallet/gradle.properties
  • org.jetbrains.kotlinx:kotlinx-coroutines-core 1.7.3
  • org.slf4j:slf4j-api 2.0.7
  • org.slf4j:slf4j-simple 2.0.7
kryptokrona-wallet/settings.gradle.kts
kryptokrona-wallet/build.gradle.kts
  • org.jetbrains.kotlin.jvm 1.8.22
  • org.jetbrains.kotlinx.kover 0.7.3
  • org.jetbrains.kotlinx:kotlinx-coroutines-test 1.7.3
kryptokrona-walletapi/gradle.properties
  • org.jetbrains.kotlinx:kotlinx-coroutines-core 1.7.3
  • org.jetbrains.kotlin:kotlin-reflect 1.8.22
  • io.ktor:ktor-client-core 2.3.3
  • io.ktor:ktor-client-cio 2.3.3
  • io.ktor:ktor-client-content-negotiation 2.3.3
  • io.ktor:ktor-serialization-kotlinx-json 2.3.3
  • org.slf4j:slf4j-api 2.0.7
  • org.slf4j:slf4j-simple 2.0.7
kryptokrona-walletapi/settings.gradle.kts
kryptokrona-walletapi/build.gradle.kts
  • org.jetbrains.kotlin.jvm 1.8.22
  • org.jetbrains.kotlin.plugin.serialization 1.8.22
  • org.jetbrains.kotlinx.kover 0.7.3
  • org.jetbrains.kotlinx:kotlinx-serialization-json-jvm 1.5.1
  • org.jetbrains.kotlinx:kotlinx-coroutines-test 1.7.3
playground/gradle.properties
  • org.jetbrains.kotlinx:kotlinx-coroutines-core 1.7.3
  • org.slf4j:slf4j-api 2.0.7
  • org.slf4j:slf4j-simple 2.0.7
playground/settings.gradle.kts
playground/build.gradle.kts
  • org.jetbrains.kotlin.jvm 1.8.22
  • org.jetbrains.kotlinx.kover 0.7.3
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.2.1
kryptokrona-crypto/gradle/wrapper/gradle-wrapper.properties
  • gradle 8.2.1
kryptokrona-huginapi/gradle/wrapper/gradle-wrapper.properties
  • gradle 8.2.1
kryptokrona-node/gradle/wrapper/gradle-wrapper.properties
  • gradle 8.2.1
kryptokrona-service/gradle/wrapper/gradle-wrapper.properties
  • gradle 8.2.1
kryptokrona-util/gradle/wrapper/gradle-wrapper.properties
  • gradle 8.2.1
kryptokrona-wallet/gradle/wrapper/gradle-wrapper.properties
  • gradle 8.2.1
kryptokrona-walletapi/gradle/wrapper/gradle-wrapper.properties
  • gradle 8.2.1
playground/gradle/wrapper/gradle-wrapper.properties
  • gradle 8.2.1
npm
website/package.json
  • @sveltejs/adapter-auto ^2.0.1
  • @vercel/analytics ^1.0.1
  • @sveltejs/adapter-static ^2.0.1
  • @sveltejs/kit ^1.14.0
  • @sveltepress/theme-default 1.18.1
  • @sveltepress/vite ^0.27.0
  • @types/node ^18.11.17
  • svelte ^3.55.1
  • vite ^4.1.1

  • Check this box to trigger a request for Renovate to run again on this repository

Add docsaurus or alternative

Create a directory in the root of this repo with the name "website" and place the source code there.

The domain that will be used is: sdk.kryptokrona.org
Title of the website: Kryptokrona Kotlin SDK

For inspiration: https://detekt.dev/docs/intro

We will use Vercel to deploy it later.

What we need:

  • Docs (the documentation of the SDK)
  • Blog
  • API link to our API docs currently latest is 0.2.0 but this link will change later since we will use this domain for the website.
  • Version select (01.0, 0.1.1, 0.2.0)
  • Link to GitHub
  • Search
  • Dark/light mode button
  • Change the footer text to "Copyright © 2022-2023 The Kryptokrona Developers - Built with Docusaurus."
  • Add Discord link in the Community section and Kryptokrona Twitter account link

Reduce the amount of functions in WalletService to 11

With the standard static analysis config, we should reduce the amount of functions inside WalletService to 11 to increase clarity. Perhaps split into another class or Kotlin file with some of the functions.

Or, if we think it's more appropriate to change the config of Detekt static analysis. But, I think that too many functions is making the code less readble so perhaps not an option.

Add possibility to interact with a Kryptokrona service

This will make it possible for someone to make a backend service for a mining pool. Then can use a frontend UI library to fetch data from the backend etc.

Proposed library name:

  • kryptokrona-service

And since the SDK allows for creating a wallet this is easy using the kryptokrona-core library along with its library dependencies needed.

Deserialization issues

Look over request and response models if they can handle de-serialization and possibly if we use Int where we should be using Long data type.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.