Returns the account information of a given address. There are two different account types in Klaytn: Externally Owned Account (EOA) and Smart Contract Account. 자세한 내용은 Klaytn 계정을 참고해주세요.
참고 getAccount는 계정이 네트워크에 있는 경우에만 계정을 반환하므로 키 쌍이 생성 되었다 하더라도 주소와 일치하는 계정이 실제 블록체인 네트워크에 존재하지 않으면 null이 반환됩니다.
Returns the account key of the Externally Owned Account (EOA) of the given address. If the account has AccountKeyLegacy or the account of the given address is a Smart Contract Account, it will return an empty key value. 자세한 내용은 계정 키를 참고해주세요.
참고 getAccountKey는 계정이 네트워크에 있는 경우에만 계정 키를 반환하므로 키 쌍이 생성 되었다 하더라도 주소와 일치하는 계정이 실제 블록체인 네트워크에 존재하지 않으면 null이 반환됩니다.
Parameters
Return Value
Promise returns Object - The account key consist of public key(s) and a key type.
Returns true if an input account has a non-empty codeHash at the time of a specific block number. It returns false if the account is an EOA or a smart contract account which doesn't have codeHash.
Parameters
Return Value
프로미스는 Boolean을 반환 - true는 입력 파라미터가 블록에 존재하는 스마트 컨트랙트 주소임을 의미합니다.
참고: 이 API는 노드에 있는 계정으로 메시지에 서명하는 기능을 제공합니다. 노드에 있는 계정은 반드시 잠금 해제되어야 메시지에 서명할 수 있습니다. To sign a transaction, use caver.klay.signTransaction.
Parameters
Return Value
프로미스는 String을 반환 - 계정의 개인키로 서명한 메시지입니다.
Example
>caver.klay.sign('Message to sign','0x1427ac5d0f1c3174ee6ea05d29a9b05fd31d7579').then(console.log)0xde8bd2f5a45de6b1baea57ed0219735ab60f0ef55c5e31a4b774824abea31bfc34c8bdbca43ed4155e8e6a8e0d11d7aba191ba025e0487ada2bcc422252b81591b
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
address
String
The address of the account for which you want to get account information.
defaultBlock
Number | String
(optional) If you pass this parameter, it will not use the default block set with caver.klay.defaultBlock.
callback
Function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
callback
Function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
address
String
계정 키를 알고 싶은 계정 주소입니다.
defaultBlock
Number | String
(optional) If you pass this parameter, it will not use the default block set with caver.klay.defaultBlock.
callback
Function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
address
String
잔액을 알고 싶은 주소입니다.
defaultBlock
Number | String
(optional) If you pass this parameter, it will not use the default block set with caver.klay.defaultBlock.
callback
Function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
address
String
The address to get the code from.
defaultBlock
Number | String
(optional) If you pass this parameter, it will not use the default block set with caver.klay.defaultBlock.
callback
Function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
address
String
The address to get the number of transactions from.
blockNumber
number | string
(optional) A block number, the string pending for the pending nonce, or the string earliest or latest as in the default block parameter. If omitted, latest will be used.
callback
Function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
Number
주어진 주소에서 발신된 트랜잭션의 개수입니다.
address
String
isContractAccount로 확인할 계정 주소입니다.
defaultBlock
Number | String
(optional) If you pass this parameter, it will not use the default block set with caver.klay.defaultBlock.
callback
Function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
message
String
Message to sign.
address
String
메시지에 서명하는 계정 주소입니다.
callback
Function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.