jsMain.jslibs.secretjs.encryption.module_secretjs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of client Show documentation
Show all versions of client Show documentation
A Kotlin multiplatform REST client utilizing secret network's gRPC gateway endpoints.
@file:Suppress(
"INTERFACE_WITH_SUPERCLASS",
"OVERRIDING_FINAL_MEMBER",
"RETURN_TYPE_MISMATCH_ON_OVERRIDE",
"CONFLICTING_OVERLOADS"
)
@file:JsModule("secretjs")
@file:JsNonModule
package jslibs.secretjs
import org.khronos.webgl.Uint8Array
import kotlin.js.Promise
external interface EncryptionUtils {
var getPubkey: () -> Promise
var decrypt: (ciphertext: Uint8Array, nonce: Uint8Array) -> Promise
var encrypt: (contractCodeHash: String, msg: Any?) -> Promise
var getTxEncryptionKey: (nonce: Uint8Array) -> Promise
}
external interface `T$2` {
var privkey: Uint8Array
var pubkey: Uint8Array
}
open external class EncryptionUtilsImpl(
registrationQuerier: Any,
seed: Uint8Array = definedExternally,
chainId: String = definedExternally
) : EncryptionUtils {
open var registrationQuerier: Any
open var seed: Any
open var privkey: Any
open var pubkey: Uint8Array
open var consensusIoPubKey: Any
open var getConsensusIoPubKey: Any
override var getTxEncryptionKey: (nonce: Uint8Array) -> Promise
override var encrypt: (contractCodeHash: String, msg: Any?) -> Promise
override var decrypt: (ciphertext: Uint8Array, nonce: Uint8Array) -> Promise
override var getPubkey: () -> Promise
companion object {
fun GenerateNewKeyPair(): `T$2`
fun GenerateNewSeed(): Uint8Array
fun GenerateNewKeyPairFromSeed(seed: Uint8Array): `T$2`
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy