https://github.com/cosmostation/suikotlin
SUI Android SDK(beta)
https://github.com/cosmostation/suikotlin
android blockchain kotlin sui
Last synced: 9 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 (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-01T04:04:22.000Z (about 1 year ago)
- Last Synced: 2024-11-05T07:34:54.288Z (about 1 year ago)
- Topics: android, blockchain, kotlin, sui
- Language: Kotlin
- Homepage:
- Size: 171 KB
- Stars: 8
- Watchers: 1
- Forks: 4
- 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
```