2023-07-08 17:01:26 +00:00
|
|
|
package jsonrpc
|
2020-10-12 08:39:33 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"fmt"
|
2020-10-24 17:03:52 +00:00
|
|
|
|
2023-01-27 04:39:34 +00:00
|
|
|
"github.com/ledgerwatch/erigon-lib/common"
|
2023-04-13 11:19:02 +00:00
|
|
|
"github.com/ledgerwatch/erigon-lib/common/hexutility"
|
2020-10-12 08:39:33 +00:00
|
|
|
)
|
|
|
|
|
2020-10-24 17:03:52 +00:00
|
|
|
// Accounts implements eth_accounts. Returns a list of addresses owned by the client.
|
|
|
|
// Deprecated: This function will be removed in the future.
|
2023-01-27 04:39:34 +00:00
|
|
|
func (api *APIImpl) Accounts(ctx context.Context) ([]common.Address, error) {
|
|
|
|
return []common.Address{}, fmt.Errorf(NotAvailableDeprecated, "eth_accounts")
|
2020-10-12 08:39:33 +00:00
|
|
|
}
|
|
|
|
|
2020-10-24 17:03:52 +00:00
|
|
|
// Sign implements eth_sign. Calculates an Ethereum specific signature with: sign(keccak256('\\x19Ethereum Signed Message:\\n' + len(message) + message))).
|
|
|
|
// Deprecated: This function will be removed in the future.
|
2023-04-13 11:19:02 +00:00
|
|
|
func (api *APIImpl) Sign(ctx context.Context, _ common.Address, _ hexutility.Bytes) (hexutility.Bytes, error) {
|
|
|
|
return hexutility.Bytes(""), fmt.Errorf(NotAvailableDeprecated, "eth_sign")
|
2020-10-12 08:39:33 +00:00
|
|
|
}
|
2020-11-09 08:52:18 +00:00
|
|
|
|
|
|
|
// SignTransaction deprecated
|
2023-01-27 04:39:34 +00:00
|
|
|
func (api *APIImpl) SignTransaction(_ context.Context, txObject interface{}) (common.Hash, error) {
|
|
|
|
return common.Hash{0}, fmt.Errorf(NotAvailableDeprecated, "eth_signTransaction")
|
2020-11-09 08:52:18 +00:00
|
|
|
}
|