Returns true if the account associated with the address is created. It returns false otherwise.
NOTE accountCreated checks if the account exists on the network, so even if a key pair is created, false is returned if the account matching the address does not exist on the actual blockchain network.
Parameters
Return Value
Promise returns Boolean - The existence of an input address.
Returns the account information of a given address. There are two different account types in Klaytn: Externally Owned Account (EOA) and Smart Contract Account. See Klaytn Accounts.
NOTE getAccount returns the account that exists on the network, so even if a key pair is created, null is returned if the account matching the address does not exist on the actual blockchain network.
Parameters
Return Value
Promise returns a JSON object - A JSON object that contains the account information.
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. See Account Key.
NOTE getAccountKey returns the account key if the account exists on the network, so even if a key pair is created, null is returned if the account matching the address does not exist on the actual blockchain network.
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
Promise returns Boolean - true means the input parameter is an existing smart contract address.
Generates signed data specific to the Klaytn network. Refer to Klaytn Platform API - klay_sign to know how the signature is generated.
NOTE: This API provides the function to sign a message using an account that exists in your node. The account in the node must be unlocked to sign the message. To sign a transaction, use caver.klay.signTransaction.
Parameters
Return Value
Promise returns String - The message signature signed with the account's private key.
Example
>caver.klay.sign('Message to sign','0x1427ac5d0f1c3174ee6ea05d29a9b05fd31d7579').then(console.log)0xde8bd2f5a45de6b1baea57ed0219735ab60f0ef55c5e31a4b774824abea31bfc34c8bdbca43ed4155e8e6a8e0d11d7aba191ba025e0487ada2bcc422252b81591b