tech.pylons.lib.core.ICore.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of libpylons Show documentation
Show all versions of libpylons Show documentation
Library providing common functionality for interacting with the Pylons ecosystem
The newest version!
package tech.pylons.lib.core
import tech.pylons.lib.types.*
import tech.pylons.lib.types.tx.Trade
import tech.pylons.lib.types.tx.recipe.Recipe
@ExperimentalUnsignedTypes
interface ICore {
companion object {
var current : ICore? = null
private set
}
val userData : UserData
val lowLevel : ILowLevel
var engine: IEngine
var userProfile: MyProfile?
var sane : Boolean
var started : Boolean
var suspendedAction : String?
var statusBlock : StatusBlock
var onWipeUserData : (() -> Unit)?
/**
* Serializes persistent user data as a JSON string. All wallet apps will need to take care of calling
* backupUserData() and storing the results in local storage on their own.
*/
fun backupUserData () : String?
fun setProfile (myProfile: MyProfile)
fun forceKeys (keyString : String, address : String)
fun dumpKeys () : List
fun updateStatusBlock ()
fun use() : ICore
fun start (userJson : String)
var onCompletedOperation : (() -> Unit)?
fun isReady () : Boolean {
return sane && started
}
fun getProfile (addr : String?) : Profile?
fun applyRecipe (recipe : String, cookbook : String, itemInputs : List) : Transaction
fun batchCreateCookbook (ids : List, names : List, developers : List, descriptions : List, versions : List,
supportEmails : List, levels : List, costsPerBlock : List) : List
fun batchCreateRecipe (names : List, cookbooks : List, descriptions : List,
blockIntervals : List, coinInputs: List, itemInputs : List,
outputTables : List, outputs : List) : List
fun batchDisableRecipe (recipes : List) : List
fun batchEnableRecipe (recipes : List) : List
fun batchUpdateCookbook (names : List, developers : List, descriptions : List, versions : List,
supportEmails : List, ids : List) : List
fun batchUpdateRecipe (ids : List, names : List, cookbooks : List, descriptions : List,
blockIntervals : List, coinInputs: List, itemInputs : List,
outputTables : List, outputs : List) : List
fun cancelTrade(tradeId : String) : Transaction
fun checkExecution(id : String, payForCompletion : Boolean) : Transaction
fun createTrade (coinInputs: List, itemInputs : List,
coinOutputs : List, itemOutputs : List,
extraInfo : String) : Transaction
fun fulfillTrade(tradeId : String, itemIds : List) : Transaction
fun getCookbooks () : List
fun getPendingExecutions () : List
fun getPylons (q : Long) : Transaction
fun getRecipes () : List
fun getTransaction(txHash : String): Transaction
fun googleIapGetPylons (productId: String, purchaseToken : String, receiptData : String,
signature : String) : Transaction
fun newProfile (name : String, kp : PylonsSECP256K1.KeyPair? = null) : Transaction
fun sendCoins (coins : String, receiver : String) : Transaction
fun setItemString (itemId : String, field : String, value : String) : Transaction
fun walletServiceTest(string: String): String
fun walletUiTest() : String
fun wipeUserData ()
fun listCompletedExecutions () : List
fun listTrades () : List
fun buildJsonForTxPost(msg: String, signComponent: String, accountNumber: Long, sequence: Long, pubkey: PylonsSECP256K1.PublicKey, gas: Long) : String
fun getRecipe(recipeId: String): Recipe?
fun getRecipesByCookbook(cookbookId: String): List
fun getRecipesBySender() : List
}