Documentation ¶
Index ¶
Constants ¶
View Source
const ( // SignatureHeader is the header that contains the signature of the request SignatureHeader = "X-Signature" // PubKeyHeader is used for encrypting the response PubKeyHeader = "X-PubKey" // AddressHeader is the header that contains the address of the sender AddressHeader = "X-Address" )
Variables ¶
This section is empty.
Functions ¶
func GetAddressFromContext ¶
get address from context if exists
Types ¶
type ChainConfig ¶
type ChainConfig struct { Name string `json:"name"` Chain string `json:"chain"` Icon string `json:"icon"` RPC []string `json:"rpc"` Features []ChainFeature `json:"features"` Faucets []string `json:"faucets"` NativeCurrency ChainNativeCurrency `json:"nativeCurrency"` InfoURL string `json:"infoURL"` ShortName string `json:"shortName"` ChainID int `json:"chainId"` NetworkID int `json:"networkId"` Slip44 int `json:"slip44"` ENS ChainENS `json:"ens"` Explorers []ChainExplorer `json:"explorers"` }
ChainConfig is the configuration for a chain
func GetChain ¶
func GetChain(path string) (*ChainConfig, error)
GetChain returns the chain config for the local chain.json file
type ChainExplorer ¶
type ChainFeature ¶
type ChainFeature struct {
Name string `json:"name"`
}
type ChainNativeCurrency ¶
type ContextKey ¶
type ContextKey string
const ( ContextKeyPubKey ContextKey = PubKeyHeader ContextKeyAddress ContextKey = AddressHeader )
Click to show internal directories.
Click to hide internal directories.