{"id":31619431,"url":"https://github.com/multiversx/mx-sdk-kotlin","last_synced_at":"2025-10-06T14:06:23.967Z","repository":{"id":46392829,"uuid":"371369396","full_name":"multiversx/mx-sdk-kotlin","owner":"multiversx","description":"MultiversX kotlin SDK for interacting with the MultiversX blockchain (in general) and Smart Contracts (in particular).","archived":false,"fork":false,"pushed_at":"2021-10-22T10:10:14.000Z","size":244,"stargazers_count":8,"open_issues_count":4,"forks_count":6,"subscribers_count":27,"default_branch":"main","last_synced_at":"2024-04-01T15:08:42.520Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/multiversx.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}},"created_at":"2021-05-27T12:42:20.000Z","updated_at":"2023-01-11T11:23:03.000Z","dependencies_parsed_at":"2022-09-05T07:30:35.432Z","dependency_job_id":null,"html_url":"https://github.com/multiversx/mx-sdk-kotlin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/multiversx/mx-sdk-kotlin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiversx%2Fmx-sdk-kotlin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiversx%2Fmx-sdk-kotlin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiversx%2Fmx-sdk-kotlin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiversx%2Fmx-sdk-kotlin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/multiversx","download_url":"https://codeload.github.com/multiversx/mx-sdk-kotlin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiversx%2Fmx-sdk-kotlin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278621844,"owners_count":26017253,"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","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-10-06T14:06:21.955Z","updated_at":"2025-10-06T14:06:23.954Z","avatar_url":"https://github.com/multiversx.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n## [CHANGELOG](CHANGELOG.md)\n\n## Elrond Kotlin SDK\n\nThis is the kotlin implementation of Elrond SDK\n\nThis project was primarily designed for Android but is also compatible with any Kotlin-friendly app since it doesn't use the Android SDK\n\n## Usage\nThis SDK is built with the clean architecture principles.  \nInteraction are done through usecases\n\nHere is an example for sending a transaction.\n```\n// Create a wallet from mnemonics\nval wallet = Wallet.createFromMnemonic(..., 0)\n\n// Get information related to this address (ie: balance and nonce)\nval account = ErdSdk.getAccountUsecase().execute(Address.fromHex(wallet.publicKeyHex))\n\n// Get the network informations\nval networkConfig = ErdSdk.getNetworkConfigUsecase().execute()\n\n// Create the transaction object\nval transaction = Transaction(\n    sender = account.address,\n    receiver = Address.fromHex(...),\n    value = 1000000000000000000.toBigInteger(), // 1 xEGLD\n    data = \"Elrond rocks !\",\n    chainID = networkConfig.chainID,\n    gasPrice = networkConfig.minGasPrice,\n    gasLimit = networkConfig.minGasLimit,\n    nonce = account.nonce\n)\n\n// Send transaction.\n// Signature is handled internally\nval sentTransaction = ErdSdk.sendTransactionUsecase().execute(transaction, wallet)\nLog.d(\"Transaction\", \"tx:${sentTransaction.txHash}\")\n```\n\nIn a real world example, the usescases would be injected  \nThe sample application showcase how to do it on Android with Hilt framework (see the [Sample App](#sample-app)).\n\n## Usecases list\n\n##### API\n| Usecase  | Endpoint  |\n| ------------- | ------------- |\n| GetAccountUsecase  |  [GET address/:bech32Address](https://docs.elrond.com/sdk-and-tools/rest-api/addresses/#get-address) |\n| GetAddressBalanceUsecase  | [GET address/:bech32Address/balance](https://docs.elrond.com/sdk-and-tools/rest-api/addresses/#get-address-balance) |\n| GetAddressNonceUsecase  | [GET address/:bech32Address/nonce](https://docs.elrond.com/sdk-and-tools/rest-api/addresses/#get-address-nonce) |\n| GetAddressTransactionsUsecase  | [GET address/:bech32Address/transactions](https://docs.elrond.com/sdk-and-tools/rest-api/addresses/#get-address-transactions) |\n| GetTransactionInfoUsecase  | [GET transaction/:txHash](https://docs.elrond.com/sdk-and-tools/rest-api/transactions/#get-transaction) |\n| GetTransactionStatusUsecase  | [GET transaction/:txHash/status](https://docs.elrond.com/sdk-and-tools/rest-api/transactions/#get-transaction-status) |\n| SendTransactionUsecase  | [POST transaction/send](https://docs.elrond.com/sdk-and-tools/rest-api/transactions/#send-transaction) |\n| EstimateCostOfTransactionUsecase  | [POST transaction/cost](https://docs.elrond.com/sdk-and-tools/rest-api/transactions/#estimate-cost-of-transaction) |\n| GetNetworkConfigUsecase  | [GET network/config](https://docs.elrond.com/sdk-and-tools/rest-api/network/#get-network-configuration) |\n| QueryContractUsecase  | [POST vm-values/query](https://docs.elrond.com/sdk-and-tools/rest-api/virtual-machine/#compute-output-of-pure-function) |\n| QueryContractHexUsecase  | [POST vm-values/hex](https://docs.elrond.com/sdk-and-tools/rest-api/virtual-machine/#compute-hex-output-of-pure-function) |\n| QueryContractStringUsecase  | [POST vm-values/string](https://docs.elrond.com/sdk-and-tools/rest-api/virtual-machine/#compute-string-output-of-pure-function) |\n| QueryContractIntUsecase  | [POST vm-values/int](https://docs.elrond.com/sdk-and-tools/rest-api/virtual-machine/#get-integer-output-of-pure-function) |\n\n#### Contract\n| Usecase  | Description  |\n| ------------- | ------------- |\n| CallContractUsecase  | Interact with a Smart Contract (execute function): equivalent to [`erdpy contract call`](https://docs.elrond.com/sdk-and-tools/erdpy/erdpy/) |\n\n##### DNS\n| Usecase  | Description  |\n| ------------- | ------------- |\n| RegisterDnsUsecase  | Send a register transaction to the appropriate DNS contract from given user and with given name: equivalent to [`erdpy dns register`](https://docs.elrond.com/sdk-and-tools/erdpy/erdpy/) |\n| GetDnsRegistrationCostUsecase  | Gets the registration cost from a DNS smart contract: equivalent to [`erdpy dns registration-cost`](https://docs.elrond.com/sdk-and-tools/erdpy/erdpy/) |\n| CheckUsernameUsecase  | Can be useful for validating a text field before calling `RegisterDnsUsecase `|\n\n\n## Configuration\n```\n// default value is ProviderUrl.DevNet\nErdSdk.setNetwork(ProviderUrl.MainNet)\n\n// configure the OkHttpClient\nErdSdk.elrondHttpClientBuilder.apply {\n    addInterceptor(HttpLoggingInterceptor())\n}\n```\n\n## Build\nThe SDK is not yet uploaded to a maven repository  \nYou can build the jar from the sources by running `mvn package`\n\n## Sample App\nFor a complete example you can checkout this [sample application](https://github.com/Alexandre-saddour/ElrondKotlinSampleApp)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmultiversx%2Fmx-sdk-kotlin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmultiversx%2Fmx-sdk-kotlin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmultiversx%2Fmx-sdk-kotlin/lists"}