Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/blocto/solana-web3.kotlin
Solana SDK in Kotlin
https://github.com/blocto/solana-web3.kotlin
kotlin solana web3
Last synced: 3 months ago
JSON representation
Solana SDK in Kotlin
- Host: GitHub
- URL: https://github.com/blocto/solana-web3.kotlin
- Owner: blocto
- License: mit
- Created: 2022-04-09T23:47:43.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-04-27T10:57:41.000Z (almost 2 years ago)
- Last Synced: 2023-07-28T17:17:25.320Z (over 1 year ago)
- Topics: kotlin, solana, web3
- Language: Kotlin
- Homepage: https://docs.blocto.app/blocto-sdk/android-sdk/solana
- Size: 194 KB
- Stars: 5
- Watchers: 3
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SolanaWeb3
[![Maven Central](https://img.shields.io/maven-central/v/com.portto.solana/web3.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.portto.solana%22%20AND%20a:%22web3%22)
[![CircleCI](https://img.shields.io/circleci/build/github/portto/solana-web3.kotlin/master)](https://circleci.com/gh/portto/solana-web3.kotlin/tree/master)
![GitHub](https://img.shields.io/github/license/portto/solana-web3.kotlin)This is a open source library on kotlin for Solana protocol.
**SolanaWeb3 that is currently under development, alpha builds are available in the [Sonatype staging repository](https://s01.oss.sonatype.org/content/repositories/staging/com/portto/solana/web3/).**
## How to
```gradle
repositories {
mavenCentral()
// If you need to get SolanaWeb3 versions that are not uploaded to Maven Central.
maven { url "https://s01.oss.sonatype.org/content/repositories/staging/" }
}dependencies {
implementation 'com.portto.solana:web3:0.1.3'
}
```## Example
```kotlin
val api = Connection(Cluster.DEVNET)val account = KeyPair.fromSecretKey(walletPrivateKey.decodeBase58())
val instructions = SystemProgram.transfer(
fromPublicKey = PublicKey("58ewYwS4XiZo5VuspKDdYkgi82n9carELJ63oGb7AZUq"),
toPublicKey = PublicKey("ENkttsgNeYUJ1HFVHs77c4tqMqyWE3WeHMMkiZ1hkr7x"),
lamports = 10000
)val transaction = Transaction().add(instructions)
val txSignature = api.sendTransaction(
transaction = transaction,
signers = listOf(account)
)println(txSignature)
```### Developed By
Kihon,
### License
MIT. Original by [Arturo Jamaica](https://github.com/ajamaica/Solana.kt), forked and maintained by [portto](https://github.com/portto/).