Add Accounts endpoint (#3540)

Co-authored-by: Rongjian Lan <rongjian.lan@gmail.com>
pull/3542/head
Sebastian Johnsson 4 years ago committed by GitHub
parent f00c90e3e6
commit 1e4ec4cb09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      rpc/blockchain.go

@ -56,6 +56,14 @@ func (s *PublicBlockchainService) ChainId(ctx context.Context) (interface{}, err
}
}
// Accounts returns the collection of accounts this node manages
// While this JSON-RPC method is supported, it will not return any accounts.
// Similar to e.g. Infura "unlocking" accounts isn't supported.
// Instead, users should send already signed raw transactions using hmy_sendRawTransaction or eth_sendRawTransaction
func (s *PublicBlockchainService) Accounts() []common.Address {
return []common.Address{}
}
// getBlockOptions is a helper to get block args given an interface option from RPC params.
func (s *PublicBlockchainService) getBlockOptions(opts interface{}) (*rpc_common.BlockArgs, error) {
switch s.version {

Loading…
Cancel
Save