{"id":13392925,"url":"https://github.com/MixinNetwork/bot-api-kotlin-client","last_synced_at":"2025-03-13T19:31:13.946Z","repository":{"id":42570732,"uuid":"290238458","full_name":"MixinNetwork/bot-api-kotlin-client","owner":"MixinNetwork","description":"Mixin bot SDK for Java/Kotlin","archived":false,"fork":false,"pushed_at":"2025-02-05T08:43:14.000Z","size":13121,"stargazers_count":4,"open_issues_count":0,"forks_count":6,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-03-07T04:48:58.641Z","etag":null,"topics":["kotlin"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MixinNetwork.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-25T14:32:38.000Z","updated_at":"2025-02-05T08:43:16.000Z","dependencies_parsed_at":"2024-01-13T17:11:12.113Z","dependency_job_id":"4bac9cde-994b-4ecb-9afb-411457425041","html_url":"https://github.com/MixinNetwork/bot-api-kotlin-client","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MixinNetwork%2Fbot-api-kotlin-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MixinNetwork%2Fbot-api-kotlin-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MixinNetwork%2Fbot-api-kotlin-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MixinNetwork%2Fbot-api-kotlin-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MixinNetwork","download_url":"https://codeload.github.com/MixinNetwork/bot-api-kotlin-client/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243469135,"owners_count":20295693,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kotlin"],"created_at":"2024-07-30T17:00:39.504Z","updated_at":"2025-03-13T19:31:13.450Z","avatar_url":"https://github.com/MixinNetwork.png","language":"Kotlin","funding_links":[],"categories":["SDK"],"sub_categories":["Official SDK"],"readme":"# bot-api-kotlin-client\nThe [Mixin Network](https://mixin.one/) based wallet allows for the rapid construction of decentralized wallets, decentralized on-chain exchanges, and other products.\n\n# Installation\n\n## gradle\nAdd it in your root build.gradle at the end of repositories:\n```\nallprojects {\n    repositories {\n        ...\n        maven { url 'https://jitpack.io' }\n    }\n}\n```\nAdd the dependency\n```\ndependencies {\n    implementation 'com.github.MixinNetwork:bot-api-kotlin-client:v1.0.0'\n}\n```\n\n## maven\nAdd the JitPack repository to your build file\n```\n\u003crepositories\u003e\n    \u003crepository\u003e\n        \u003cid\u003ejitpack.io\u003c/id\u003e\n        \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n    \u003c/repository\u003e\n\u003c/repositories\u003e\n```\nAdd the dependency\n```\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.MixinNetwork\u003c/groupId\u003e\n    \u003cartifactId\u003ebot-api-kotlin-client\u003c/artifactId\u003e\n    \u003cversion\u003ev1.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Send and Receive Messages\n```kotlin\nfun main(): Unit = runBlocking {\n    val job = launch {\n        val keyPair = newKeyPairFromPrivateKey(Config.privateKey.base64Decode())\n        val blazeClient = BlazeClient.Builder()\n            .configSafeUser(Config.userId, Config.sessionId, keyPair.privateKey)\n            .enableDebug()\n            .enableParseData()\n            .enableAutoAck()\n            .blazeHandler(MyBlazeHandler())\n            .build()\n        blazeClient.start()\n    }\n    job.join()\n}\n\nprivate class MyBlazeHandler : BlazeHandler {\n    override fun onMessage(webSocket: WebSocket, blazeMsg: BlazeMsg): Boolean {\n        println(blazeMsg)\n        blazeMsg.data?.let { data -\u003e\n            sendTextMsg(webSocket, data.conversionId, data.userId, \"read\")\n        }\n        return true\n    }\n}\n```\n\n# Licence\n[WTFPL](http://www.wtfpl.net/txt/copying/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMixinNetwork%2Fbot-api-kotlin-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMixinNetwork%2Fbot-api-kotlin-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMixinNetwork%2Fbot-api-kotlin-client/lists"}