This pull request adds HasByName and other fixes. It has three commits:
Use the latest go.mod replace berty/gno v0.0.6 . This includes HasByName, HasByAddress and HasByNameOrAddress. It also has the bug fix for GetByAddress to return the error ErrKeyNotFound same as GetByName. Therefore, we update GetByAddress in api.go to check for this and return rpc.ErrCode_ErrCryptoKeyNotFound.
The Keybase method GetByAddresstakes a crypto.Address. However in PR #64, we used a bech32 string address for GetKeyInfoByAddress. But it should take a byte array address, just like the Keybase method and like queryAccount. This is the same byte array address in the response to GetByKeyInfoByName, etc. (Currently the UI doesn't use GetKeyInfoByAddress so this change shouldn't affect the front end.)
Finally, add support for HasByName, HasByAddress and HasByNameOrAddress.
This pull request adds
HasByName
and other fixes. It has three commits:HasByName
,HasByAddress
andHasByNameOrAddress
. It also has the bug fix forGetByAddress
to return the errorErrKeyNotFound
same asGetByName
. Therefore, we updateGetByAddress
in api.go to check for this and returnrpc.ErrCode_ErrCryptoKeyNotFound
.GetByAddress
takes a crypto.Address. However in PR #64, we used a bech32 string address forGetKeyInfoByAddress
. But it should take a byte array address, just like the Keybase method and likequeryAccount
. This is the same byte array address in the response toGetByKeyInfoByName
, etc. (Currently the UI doesn't useGetKeyInfoByAddress
so this change shouldn't affect the front end.)HasByName
,HasByAddress
andHasByNameOrAddress
.