github.com/status-im/status-go@v1.1.0/services/wallet/requests/address_details.go (about) 1 package requests 2 3 import ( 4 "errors" 5 6 "github.com/ethereum/go-ethereum/common" 7 ) 8 9 var ErrAddresInvalid = errors.New("address-details: invalid address") 10 11 type AddressDetails struct { 12 Address string `json:"address"` 13 ChainIDs []uint64 `json:"chainIds"` 14 TimeoutInMilliseconds int64 `json:"timeoutInMilliseconds"` 15 } 16 17 func (a *AddressDetails) Validate() error { 18 if !common.IsHexAddress(a.Address) { 19 return ErrAddresInvalid 20 } 21 22 return nil 23 }