Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cosmostation/suikotlin
SUI Android SDK(beta)
https://github.com/cosmostation/suikotlin
android blockchain kotlin sui
Last synced: 3 months ago
JSON representation
SUI Android SDK(beta)
- Host: GitHub
- URL: https://github.com/cosmostation/suikotlin
- Owner: cosmostation
- License: apache-2.0
- Created: 2022-11-18T14:47:52.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-30T03:19:52.000Z (over 1 year ago)
- Last Synced: 2024-05-03T12:12:39.534Z (6 months ago)
- Topics: android, blockchain, kotlin, sui
- Language: Kotlin
- Homepage:
- Size: 168 KB
- Stars: 7
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-sui - Kotlin SDK
- awesome-move - Kotlin SDK
README
# sui kotlin
Android SDK for Sui
## Requirement
* Android API 26
* Kotlin## Dependency
```
implementation 'com.github.cosmostation:suikotlin:0.3.0'
```## Initialize
Initialize for security.
```kotlin
SuiClient.initialize(applicationContext)
```## API
Using api like below.
```kotlin
SuiCLient.instance.{API}
```### Generate new mnemonic
```kotlin
fun generateMnemonic(): String
```### Get address from mnemonic
```kotlin
fun getAddress(mnemonic: String): String
```### Get address from KeyPair
```kotlin
fun getAddress(keyPair: EdDSAKeyPair): String
```### Get KeyPair from mnemonic
```kotlin
fun getKeyPair(mnemonic: String): EdDSAKeyPair
```### Sign data bytearray with KeyPair
```kotlin
fun sign(keyPair: EdDSAKeyPair, data: ByteArray): ByteArray
```### Get objects by address
```kotlin
suspend fun getObjectsByOwner
```### Get object details from sui objects
```kotlin
suspend fun getObjectDetails
```### Get transactions
```kotlin
suspend fun getTransactions
```### Get transaction details from transaction digests
```kotlin
suspend fun getTransactionDetails
```### Fetch custom request(support sui json-rpc specs.)
```kotlin
suspend fun fetchCustomRequest(requests: JsonRpcRequest): JsonRpcResponse
```### Fetch custom request list(support sui json-rpc specs.) : Batch not working
```kotlin
suspend fun fetchCustomRequests(requests: List): List
```### Faucet
```kotlin
suspend fun faucet
```### Transfer object
```kotlin
suspend fun transferObject
```### Move Call
```kotlin
suspend fun moveCall
```### Transfer sui
```kotlin
suspend fun transferSui
```### Execute signed transaction
```kotlin
suspend fun executeTransaction
```