Skip to content

mcxross/sui-client-gen

 
 

Repository files navigation

sui-client-gen

A tool for generating Kotlin Multiplatform SDKs for Sui Move smart contracts. Supports code generation both for source code and on-chain packages with no IDLs or ABIs required.

Lifecycle: Experimental

Quick Start

  1. Install the generator by either:

    plugins {
        id("xyz.mcxross.codegen") version "0.1.0"
     }
    
  2. Create a new directory and in it a gen.toml file like so:

[config]
# will be set to mainnet by default if omitted
rpc = "https://fullnode.devnet.sui.io:443"

[packages]
# based on source code (syntax same as in Move.toml):
DeepBookV3 = { git = "https://github.com/MystenLabs/deepbookv3.git", subdir = "packages/deepbook", rev = "releases/sui-v1.4.0-release" }
AMM = { local = "../move/amm" }
# an on-chain package:
P2PRamp = { id = "0x12345" }
  1. Run the generator from inside the directory: codegen-kt
  2. Run the formatter on the generated code: ktfmt [--kotlinlang-style] [files...]

About

A tool for generating KMP SDKs for Sui Move smart contracts.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 95.8%
  • Move 2.2%
  • Rust 2.0%