api

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2021 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountResponse added in v1.2.3

type AccountResponse struct {
	Address         string `json:"address"`
	Nonce           uint64 `json:"nonce"`
	Balance         string `json:"balance"`
	Username        string `json:"username"`
	Code            string `json:"code"`
	CodeHash        []byte `json:"codeHash"`
	RootHash        []byte `json:"rootHash"`
	CodeMetadata    []byte `json:"codeMetadata"`
	DeveloperReward string `json:"developerReward"`
	OwnerAddress    string `json:"ownerAddress"`
}

AccountResponse is the data transfer object to be returned on API when requesting an address data

type Block

type Block struct {
	Nonce                  uint64            `json:"nonce"`
	Round                  uint64            `json:"round"`
	Hash                   string            `json:"hash"`
	PrevBlockHash          string            `json:"prevBlockHash"`
	Epoch                  uint32            `json:"epoch"`
	Shard                  uint32            `json:"shard"`
	NumTxs                 uint32            `json:"numTxs"`
	NotarizedBlocks        []*NotarizedBlock `json:"notarizedBlocks,omitempty"`
	MiniBlocks             []*MiniBlock      `json:"miniBlocks,omitempty"`
	Timestamp              time.Duration     `json:"timestamp,omitempty"`
	AccumulatedFees        string            `json:"accumulatedFees,omitempty"`
	DeveloperFees          string            `json:"developerFees,omitempty"`
	AccumulatedFeesInEpoch string            `json:"accumulatedFeesInEpoch,omitempty"`
	DeveloperFeesInEpoch   string            `json:"developerFeesInEpoch,omitempty"`
	Status                 string            `json:"status,omitempty"`
	EpochStartInfo         *EpochStartInfo   `json:"epochStartInfo,omitempty"`
}

Block represents the structure for block that is returned by api routes

type DelegatedValue added in v1.1.45

type DelegatedValue struct {
	DelegationScAddress string `json:"delegationScAddress"`
	Value               string `json:"value"`
}

DelegatedValue holds the value and the delegation system SC address

type Delegator added in v1.1.45

type Delegator struct {
	DelegatorAddress string            `json:"delegatorAddress"`
	DelegatedTo      []*DelegatedValue `json:"delegatedTo"`
	Total            string            `json:"total"`
	TotalAsBigInt    *big.Int          `json:"-"`
}

Delegator holds the delegator address and the slice of delegated values

type DirectStakedValue added in v1.1.45

type DirectStakedValue struct {
	Address    string `json:"address"`
	BaseStaked string `json:"baseStaked"`
	TopUp      string `json:"topUp"`
	Total      string `json:"total"`
}

DirectStakedValue holds the total staked value for an address

type EpochStartInfo added in v1.2.0

type EpochStartInfo struct {
	TotalSupply                      string `json:"totalSupply"`
	TotalToDistribute                string `json:"totalToDistribute"`
	TotalNewlyMinted                 string `json:"totalNewlyMinted"`
	RewardsPerBlock                  string `json:"rewardsPerBlock"`
	RewardsForProtocolSustainability string `json:"rewardsForProtocolSustainability"`
	NodePrice                        string `json:"nodePrice"`
	PrevEpochStartRound              uint64 `json:"prevEpochStartRound"`
	PrevEpochStartHash               string `json:"prevEpochStartHash"`
}

EpochStartInfo is a structure that holds information about epoch start meta block

type MiniBlock

type MiniBlock struct {
	Hash             string                              `json:"hash"`
	Type             string                              `json:"type"`
	SourceShard      uint32                              `json:"sourceShard"`
	DestinationShard uint32                              `json:"destinationShard"`
	Transactions     []*transaction.ApiTransactionResult `json:"transactions,omitempty"`
}

MiniBlock represents the structure for a miniblock

type NotarizedBlock

type NotarizedBlock struct {
	Hash  string `json:"hash"`
	Nonce uint64 `json:"nonce"`
	Round uint64 `json:"round"`
	Shard uint32 `json:"shard"`
}

NotarizedBlock represents a notarized block

type StakeValues added in v1.1.34

type StakeValues struct {
	BaseStaked *big.Int
	TopUp      *big.Int
}

StakeValues is the structure that contains the total staked value and the total top up value

Jump to

Keyboard shortcuts

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