Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DitConfig ditConfig
DitConfig is exported since it needs to be accessed from other packages all the time
var EthereumNodes = []string{"https://node.ditcraft.io", "https://dai.poa.network"}
EthereumNodes is an array of rpc nodes that are used. First one is the primary, if one fails, the next one is used
var KyberNetworkProxy = "0x818E6FECD516Ecc3849DAf6845e3EC868087B755"
KyberNetworkProxy address that will be used for the ETH<->DAI swap
var MainnetNodes = []string{"https://mainnet.infura.io/v3/e0c6c62366d14f509033c919f2c72767"}
MainnetNodes contains the infura address to the eth mainnet
var Version = 5
Version of the config, will be incremented after every ditCLI update that modified the config file or the smart contracts in a way that an update is necessaray
Functions ¶
func GetPrivateKey ¶
GetPrivateKey will prompt the user for his password and return the decrypted ethereum private key
Types ¶
type ActiveVote ¶
type ActiveVote struct { KNWVoteID int `json:"knw_vote_id"` KnowledgeLabel KnowledgeLabel `json:"knowledge_label"` BranchHash string `json:"branch_hash"` NewHeadHash string `json:"new_head_hash"` Choice int `json:"choice"` Salt string `json:"salt"` NumTokens string `json:"num_tokens"` NumVotes string `json:"num_votes"` NumKNW string `json:"num_knw"` CommitEnd int `json:"commit_end"` RevealEnd int `json:"reveal_end"` Resolved bool `json:"resolved"` }
ActiveVote struct, exported since its used in the ethereum package for new votes
type KnowledgeLabel ¶
KnowledgeLabel struct, exported since its used in the ethereum package for new repositories
type Repository ¶
type Repository struct { Provider string `json:"provider"` KnowledgeLabels []KnowledgeLabel `json:"knowledge_labels"` ActiveVotes map[string]*ActiveVote `json:"active_votes"` }
Repository struct, exported since its used in the ethereum package for new repositories