utilities

package
v0.0.0-...-9dc30f5 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCookie

func CreateCookie(publicKey string) http.Cookie

func GetPublicKeyCookie

func GetPublicKeyCookie(r *http.Request) (*http.Cookie, error)

func SerializeHashContent

func SerializeHashContent(data interface{}) (hash [32]byte)

Types

type Account

type Account struct {
	Hash        string
	Address     string
	Balance     int64
	TxCount     int32
	FundsTxData []string
	IsStaking   bool
	UrlLevel    string
}

type Accountsandurl

type Accountsandurl struct {
	Accounts []Account
	UrlLevel string
}

type Accountwithtxs

type Accountwithtxs struct {
	Account  Account
	Txs      []Fundstx
	UrlLevel string
}

type Accsandurl

type Accsandurl struct {
	Txs      []Acctx
	UrlLevel string
}

type Acctx

type Acctx struct {
	Hash      string
	BlockHash string
	Issuer    string
	Fee       uint64
	PubKey    string
	Timestamp int64
	Signature string
	UrlLevel  string
}

func ConvertAccTransaction

func ConvertAccTransaction(unconvertedTx *protocol.AccTx, unconvertedBlockHash [32]byte, unconvertedTxHash [32]byte, blockTimestamp int64) Acctx

type Block

type Block struct {
	Header             string
	Hash               string
	PrevHash           string
	Timestamp          int64
	TimeString         string
	MerkleRoot         string
	Beneficiary        string
	Seed               string
	HashedSeed         string
	Height             uint16
	NrFundsTx          uint16
	NrAccTx            uint16
	NrConfigTx         uint8
	NrStakeTx          uint16
	FundsTxDataString  sql.NullString
	FundsTxData        []string
	AccTxDataString    sql.NullString
	AccTxData          []string
	ConfigTxDataString sql.NullString
	ConfigTxData       []string
	StakeTxDataString  sql.NullString
	StakeTxData        []string
	UrlLevel           string
}

func ConvertBlock

func ConvertBlock(unconvertedBlock *protocol.Block) Block

type Blocksandtx

type Blocksandtx struct {
	Blocks   []Block
	Txs      []Fundstx
	UrlLevel string
}

type Blocksandurl

type Blocksandurl struct {
	Blocks   []Block
	UrlLevel string
}

type Configsandurl

type Configsandurl struct {
	Txs      []Configtx
	UrlLevel string
}

type Configtx

type Configtx struct {
	Hash      string
	BlockHash string
	Id        uint8
	Payload   uint64
	Fee       uint64
	TxCount   uint8
	Timestamp int64
	Signature string
	UrlLevel  string
}

func ConvertConfigTransaction

func ConvertConfigTransaction(unconvertedTx *protocol.ConfigTx, unconvertedBlockHash [32]byte, unconvertedTxHash [32]byte, blockTimestamp int64) Configtx

type Emptyresponse

type Emptyresponse struct {
	UrlLevel string
	// contains filtered or unexported fields
}

type Fundsandurl

type Fundsandurl struct {
	Txs      []Fundstx
	UrlLevel string
}

type Fundstx

type Fundstx struct {
	Hash      string
	BlockHash string
	Amount    uint64
	Fee       uint64
	TxCount   uint32
	From      string
	To        string
	Timestamp int64
	Signature string
	UrlLevel  string
}

func ConvertFundsTransaction

func ConvertFundsTransaction(unconvertedTx *protocol.FundsTx, unconvertedBlockHash [32]byte, unconvertedTxHash [32]byte, blockTimestamp int64) Fundstx

type JSONAccount

type JSONAccount struct {
	Address       [64]byte `json:"-"`
	AddressString string   `json:"address"`
	Balance       uint64   `json:"balance"`
	TxCnt         uint32   `json:"txCnt"`
	IsCreated     bool     `json:"isCreated"`
	IsRoot        bool     `json:"isRoot"`
}

func RequestAccountInformation

func RequestAccountInformation(publicKey string) JSONAccount

type Serie

type Serie struct {
	Name  string `json:"x"`
	Value int    `json:"value"`
}

type Stakesandurl

type Stakesandurl struct {
	Txs      []Staketx
	UrlLevel string
}

type Staketx

type Staketx struct {
	Hash      string
	BlockHash string
	Timestamp int64
	Fee       uint64
	IsStaking bool
	Account   string
	Signature string
	UrlLevel  string
}

func ConvertStakeTransaction

func ConvertStakeTransaction(unconvertedTx *protocol.StakeTx, unconvertedBlockHash [32]byte, unconvertedTxHash [32]byte, blockTimestamp int64) Staketx

type Stats

type Stats struct {
	ChartData       string
	TotalSupply     int
	TotalNrAccounts int
	Parameters      Systemparams
	UrlLevel        string
}

type Systemparams

type Systemparams struct {
	Timestamp          int64
	BlockHash          string
	BlockSize          uint64
	DiffInterval       uint64
	MinFee             uint64
	BlockInterval      uint64
	BlockReward        uint64
	StakingMin         uint64
	WaitingMin         uint64
	AcceptanceTimeDiff uint64
	SlashingWindowSize uint64
	SlashingReward     uint64
	UrlLevel           string
}

func ExtractParameters

func ExtractParameters(tx Configtx, currentParams Systemparams) Systemparams

Jump to

Keyboard shortcuts

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