functions

package
v0.0.0-...-cf42d2a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2018 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ELEMENTS_FLAG = ""

Functions

func CreateIdentityChain

func CreateIdentityChain(sid *ServerIdentity) (string, string, error)

func CreateIdentityChainElements

func CreateIdentityChainElements(sid *ServerIdentity) (string, error)

func CreateNewBitcoinKey

func CreateNewBitcoinKey(rootChainID string, subChainID string, btcKeyLevel int, btcType int, btcKey []byte, privateKey []byte, ec *factom.ECAddress) (string, string, error)

Gets curl commands to make a new bitcoin key Params:

rootChainID 	string
subChainID		string
btcKeyLevel		int		=	1-4
btcType			int		=	0-1
btcKey			[]byte	=	len:20
pubKey			[]byte	=	len:32
privateKey		[]byte	=	len:32
ec				*factom.ECAddress

func CreateNewBitcoinKeyElements

func CreateNewBitcoinKeyElements(rootChainID string, subChainID string, btcKeyLevel int, btcType int, btcKey []byte, privateKey []byte, ec *factom.ECAddress) (string, error)

func CreateNewBitcoinKeyElementsUnsigned

func CreateNewBitcoinKeyElementsUnsigned(rootChainID string, subChainID string, btcKeyLevel int, btcType int, btcKey []byte, privateKey []byte, ec *factom.ECAddress) (string, error)

Up to timestamp

func CreateNewBlockSignEntry

func CreateNewBlockSignEntry(rootChainID string, subChainID string, levelAbovePrivate []byte, ec *factom.ECAddress) (string, string, []byte, error)

func CreateNewBlockSignEntryElements

func CreateNewBlockSignEntryElements(sid *ServerIdentity) (string, []byte, []byte, error)

func CreateNewBlockSignEntryUnsigned

func CreateNewBlockSignEntryUnsigned(sid *ServerIdentity, blockSigningPubkey []byte) (string, error)

func CreateNewMHash

func CreateNewMHash(rootChainID string, subChainID string, privateKey []byte, seed string, ec *factom.ECAddress) (string, string, string, error)

Gets curl commands to make a new Matryoshka Hash Params:

rootChainID 	string
seed			string	= Must be hex
privateKey		[]byte	=	len:32
ec				*factom.ECAddress

func CreateNewMHashElements

func CreateNewMHashElements(rootChainID string, subChainID string, privateKey []byte, seed string, ec *factom.ECAddress) (string, error)

func CreateNewMHashElementsUnsigned

func CreateNewMHashElementsUnsigned(rootChainID string, subChainID string, privateKey []byte, seed string, ec *factom.ECAddress) (string, error)

Up to timestamp

func CreateSubChain

func CreateSubChain(sid *ServerIdentity) (string, string, error)

func CreateSubChainElements

func CreateSubChainElements(sid *ServerIdentity) (string, error)

func CurlWrapGET

func CurlWrapGET(str string) string

func CurlWrapPOST

func CurlWrapPOST(str string) string

func RegisterServerIdentity

func RegisterServerIdentity(sid *ServerIdentity) (string, string, error)

func RegisterServerIdentityElements

func RegisterServerIdentityElements(sid *ServerIdentity) (string, error)

func RegisterSubChainElements

func RegisterSubChainElements(sid *ServerIdentity) (string, error)

func RegisterSubchain

func RegisterSubchain(sid *ServerIdentity) (string, string, error)

Types

type ServerIdentity

type ServerIdentity struct {
	ECAddr      *factom.ECAddress
	IDSet       *identity.IdentitySet
	RootChainID string
	SubChainID  string
}

func MakeServerIdentity

func MakeServerIdentity() (*ServerIdentity, error)

func MakeServerIdentityFromEC

func MakeServerIdentityFromEC(sec []byte) (*ServerIdentity, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL