Account
eth_accounts
Returns a list of addresses owned by client.
Parameters
None
Return Value
Type | Description |
---|---|
Array of 20-byte DATA | Addresses owned by the client. |
Example
eth_getBalance
Returns the balance of the account of given address.
Parameters
Name | Type | Description |
---|---|---|
address | 20-byte DATA | Address to check for balance. |
block number or hash | QUANTITY | TAG | HASH | Integer or hexadecimal block number, or the string |
Return Value
Type | Description |
---|---|
QUANTITY | Integer of the current balance in peb. |
Example
eth_getCode
Returns code at a given address.
Parameters
Type | Description |
---|---|
20-byte DATA | Address |
QUANTITY | TAG | HASH | Integer or hexadecimal block number, or the string |
Return Value
Type | Description |
---|---|
DATA | The code from the given address. |
Example
eth_getTransactionCount
Returns the number of transactions sent from an address.
Parameters
Type | Description |
---|---|
20-byte DATA | Address |
QUANTITY | TAG | HASH | Integer or hexadecimal block number, or the string |
Return Value
Type | Description |
---|---|
QUANTITY | Integer of the number of transactions send from this address. |
Example
eth_sign
The sign method calculates a Klaytn-specific signature with:
Adding a prefix to the message makes the calculated signature recognizable as a Klaytn-specific signature. This prevents misuse where a malicious dApp signs arbitrary data (e.g. transaction) and uses the signature for impersonation.
NOTE: The address to sign with must be unlocked.
Parameters
Name | Type | Description |
---|---|---|
account | 20-byte DATA | Address |
message | N-byte DATA | Message to sign |
Return Value
Type | Description |
---|---|
DATA | Signature |
Example
Last updated