Documentation ¶
Index ¶
- Variables
- func CheckHumanReadable(key []byte) bool
- func CheckNonce(upToNonce []byte, nonceInt int) bool
- func GetChainCommitString(c *factom.Chain, ec *factom.ECAddress) (string, error)
- func GetChainRevealString(c *factom.Chain) (string, error)
- func GetEntryCommitString(e *factom.Entry, ec *factom.ECAddress) (string, error)
- func GetEntryRevealString(e *factom.Entry) (string, error)
- func MapToObject(source interface{}, dst interface{}) error
- func MergeKeys(key1 [ed.PrivateKeySize]byte, key2 [ed.PrivateKeySize]byte, ...) [4]*[ed.PrivateKeySize]byte
- func NewRootChainCreate(idSet *IdentitySet, ecAddr *factom.ECAddress) (*factom.Chain, error)
- type BitcoinKey
- type BlockSigningKey
- func MakeBlockSigningKey(rootChainIDStr string, subchainID string, privateKey *[64]byte) (*BlockSigningKey, []byte, error)
- func MakeBlockSigningKeyFixed(rootChainIDStr string, subchainID string, privateKey *[64]byte, random bool) (*BlockSigningKey, []byte, error)
- func MakeBlockSigningKeySeeded(rootChainIDStr string, subchainID string, privateKey *[64]byte, ...) (*BlockSigningKey, []byte, error)
- type Commit
- type Identity
- func (i *Identity) GenerateIdentity(count int) error
- func (i *Identity) GenerateIdentityFromPrivateKey(key *[ed.PrivateKeySize]byte, count int) error
- func (i *Identity) GetIdentityKey() *[ed.PublicKeySize]byte
- func (i *Identity) GetPrefix() []byte
- func (i *Identity) GetPrivateKey() *[ed.PrivateKeySize]byte
- func (i *Identity) GetPublicKey() *[ed.PublicKeySize]byte
- func (i *Identity) HumanReadableIdentity() string
- func (i *Identity) HumanReadablePrivate() string
- func (i *Identity) HumanReadablePublic() string
- type IdentitySet
- type MHash
- type ParamC
- type ParamCommitChain
- type ParamEntry
- type ParamR
- type RegisterIdentity
- type RegisterSubchain
- type Reveal
- type RootChain
- type Subchain
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Level to use in signing when registering RegisterIdentityLevel int = 1 // For ChainIDs ProofOfWorkChainID = []byte{0x88, 0x88, 0x88} ProofOfWorkLength int = 3 // DEFAULT = 3, set lower for faster tests // For Registering Root Chain // e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 RootRegisterChain string = "888888001750ede0eff4b05f0c3f557890b256450cabbb84cada937f9c258327" // If true will show "." on screen to show user program is computing ShowBruteForce bool = true // Will change frequency of dots for brute forcing BruteForcePeriod int = 400000 // Amount of hashes on seed to generate MHash MHashAmount int = 100000 //Seed Hex Length (length/2 = bytes) SeedMin int = 4 SeedMax int = 64 // Curl Commands for Milestone 1 or 2 Version int = 2 )
Functions ¶
func CheckHumanReadable ¶
func CheckNonce ¶
func GetChainCommitString ¶
func GetEntryCommitString ¶
func MapToObject ¶
func MapToObject(source interface{}, dst interface{}) error
func MergeKeys ¶
func MergeKeys(key1 [ed.PrivateKeySize]byte, key2 [ed.PrivateKeySize]byte, key3 [ed.PrivateKeySize]byte, key4 [ed.PrivateKeySize]byte) [4]*[ed.PrivateKeySize]byte
func NewRootChainCreate ¶
Types ¶
type BitcoinKey ¶
type BitcoinKey struct {
// contains filtered or unexported fields
}
func MakeBitcoinKey ¶
func MakeBitcoinKey(rootChainID string, subChainID string, btcKeyLevel int, btcType int, btcKey []byte, privateKey *[64]byte) (*BitcoinKey, error)
Creates a new BitcoinKey type. Used to add bitcoinkeys to subchain Params:
rootChainID string subChainID string btcKeyLevel int = 1-4 btcType int = 0-1 btcKey []byte = len:20 identiyPrimage []byte = len:33 privateKey *[64]byte
func (*BitcoinKey) GetEntry ¶
func (b *BitcoinKey) GetEntry() *factom.Entry
type BlockSigningKey ¶
type BlockSigningKey struct {
// contains filtered or unexported fields
}
func MakeBlockSigningKey ¶
func MakeBlockSigningKeyFixed ¶
func MakeBlockSigningKeyFixed(rootChainIDStr string, subchainID string, privateKey *[64]byte, random bool) (*BlockSigningKey, []byte, error)
Creates a new BlockSigningKey type. Used to change keys in identity chain
func (*BlockSigningKey) GetEntry ¶
func (b *BlockSigningKey) GetEntry() *factom.Entry
type Identity ¶
type Identity struct {
// contains filtered or unexported fields
}
Individual component level in an IdentitySet
func NewIdentity ¶
func NewIdentity() *Identity
func (*Identity) GenerateIdentity ¶
func (*Identity) GenerateIdentityFromPrivateKey ¶
func (*Identity) GetIdentityKey ¶
func (i *Identity) GetIdentityKey() *[ed.PublicKeySize]byte
func (*Identity) GetPrivateKey ¶
func (i *Identity) GetPrivateKey() *[ed.PrivateKeySize]byte
func (*Identity) GetPublicKey ¶
func (i *Identity) GetPublicKey() *[ed.PublicKeySize]byte
func (*Identity) HumanReadableIdentity ¶
func (*Identity) HumanReadablePrivate ¶
func (*Identity) HumanReadablePublic ¶
type IdentitySet ¶
type IdentitySet struct {
IdentityLevel [4]*Identity
}
Set of 4 Identities
func NewIdentitySet ¶
func NewIdentitySet() *IdentitySet
func (*IdentitySet) GenerateIdentitySet ¶
func (i *IdentitySet) GenerateIdentitySet() error
func (*IdentitySet) GenerateIdentitySetFromPrivateKeys ¶
func (i *IdentitySet) GenerateIdentitySetFromPrivateKeys(keys [4]*[ed.PrivateKeySize]byte) error
type ParamCommitChain ¶
type ParamCommitChain struct {
Message string `json:"message"`
}
type ParamEntry ¶
type ParamEntry struct {
Entry string `json:"entry"`
}
type RegisterIdentity ¶
type RegisterIdentity struct { Version []byte Message []byte EncodedChainID []byte IdentityPreimage []byte Signiture []byte }
func MakeRegisterIdentity ¶
func MakeRegisterIdentity(idSet *IdentitySet, chainID string) (*RegisterIdentity, error)
func (*RegisterIdentity) GetEntry ¶
func (r *RegisterIdentity) GetEntry() *factom.Entry
type RegisterSubchain ¶
type RegisterSubchain struct { Version []byte Message []byte IdentityPreimage []byte Signiture []byte // contains filtered or unexported fields }
func MakeRegisterSubchain ¶
func MakeRegisterSubchain(idSet *IdentitySet, chainID string) (*RegisterSubchain, error)
func (*RegisterSubchain) ExtIDList ¶
func (r *RegisterSubchain) ExtIDList() [][]byte
type RootChain ¶
type RootChain struct { IdSet *IdentitySet // contains filtered or unexported fields }
func MakeRootChain ¶
func MakeRootChain() *RootChain
* Generates all the keys and nonce * Preffered to use MakeRootChainFromIdentitySet
func MakeRootChainFromIdentitySet ¶
func MakeRootChainFromIdentitySet(idSet *IdentitySet) *RootChain
* If you have a set of 4 private keys, the IdentityChainHead can be * constructed from them * * param: * IdentitySet id = A type IdentitySet that constructs IdentityKeys * from a set of private keys
Click to show internal directories.
Click to hide internal directories.