계정 복원

개요

보유중인 개인 키, 니모닉(12개의 영단어)을 사용하여 계정을 복원할 수 있습니다.

  1. 처음 kthulu 사용 시 외부에서 사용하던 계정을 니모닉으로 kthulu에서 복원하면, 기존에 사용하던 메인넷을 포함한 4가지 메인넷(ethereum, cypress(=klaytn), polygon, bnb)의 계정을 복구하고 생성합니다.

  2. kthulu는 외부 계정을 개인키 또는 니모닉으로 추가하여 기존에 사용중인 계정과 함께 사용할 수 있습니다.

Parameters

Response

value (array of object)

Example

// parameter
val network = arrayOf("ethereum")
val privateKey = "private..."
val mnemonic = "one two … twelve"

// if mnemonic = null
val restorePrivateKey = restoreAccountAsync(network, privateKey, null)
// if privateKey = null
val restoreMnemonic = restoreAccountAsync(network, null, mnemonic)
println(restorePrivateKey)
println(restoreMnemonic)

// restorePrivateKey, restoreMnemonic result log
/**
    {
        "result":"OK",
        "value":[
            {
                "network":"ethereum",
                "account":"0x..."
            }
        ]
    }
*/

Last updated