Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountQueryOptions ¶
type AccountQueryOptions struct { OnFinalBlock bool OnStartOfEpoch core.OptionalUint32 BlockNonce core.OptionalUint64 BlockHash []byte BlockRootHash []byte HintEpoch core.OptionalUint32 }
AccountQueryOptions holds options for account queries
type AccountResponse ¶
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"` Epoch uint32 `json:"epoch"` Shard uint32 `json:"shard"` NumTxs uint32 `json:"numTxs"` Hash string `json:"hash"` PrevBlockHash string `json:"prevBlockHash"` StateRootHash string `json:"stateRootHash"` 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"` Timestamp time.Duration `json:"timestamp,omitempty"` NotarizedBlocks []*NotarizedBlock `json:"notarizedBlocks,omitempty"` MiniBlocks []*MiniBlock `json:"miniBlocks,omitempty"` EpochStartInfo *EpochStartInfo `json:"epochStartInfo,omitempty"` EpochStartShardsData []*EpochStartShardData `json:"epochStartShardsData,omitempty"` ScheduledData *ScheduledData `json:"scheduledData,omitempty"` }
Block represents the structure for block that is returned by api routes
type BlockInfo ¶
type BlockInfo struct { Nonce uint64 `json:"nonce,omitempty"` Hash string `json:"hash,omitempty"` RootHash string `json:"rootHash,omitempty"` }
BlockInfo is a data transfer object used on the API
type BlockQueryOptions ¶
BlockQueryOptions holds options for block queries
type DelegatedValue ¶
type DelegatedValue struct { DelegationScAddress string `json:"delegationScAddress"` Value string `json:"value"` }
DelegatedValue holds the value and the delegation system SC address
type Delegator ¶
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 ¶
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 ESDTSupply ¶
type ESDTSupply struct { InitialMinted string `json:"initialMinted"` Supply string `json:"supply"` Burned string `json:"burned"` Minted string `json:"minted"` }
ESDTSupply represents the structure for esdt supply that is returned by api routes
type EpochStartInfo ¶
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 EpochStartShardData ¶
type EpochStartShardData struct { ShardID uint32 `json:"shard"` Epoch uint32 `json:"epoch"` Round uint64 `json:"round,omitempty"` Nonce uint64 `json:"nonce,omitempty"` HeaderHash string `json:"headerHash,omitempty"` RootHash string `json:"rootHash,omitempty"` ScheduledRootHash string `json:"scheduledRootHash,omitempty"` FirstPendingMetaBlock string `json:"firstPendingMetaBlock,omitempty"` LastFinishedMetaBlock string `json:"lastFinishedMetaBlock,omitempty"` PendingMiniBlockHeaders []*MiniBlock `json:"pendingMiniBlockHeaders,omitempty"` }
EpochStartShardData is a structure that holds data about the epoch start shard data
type MiniBlock ¶
type MiniBlock struct { Hash string `json:"hash"` Type string `json:"type"` ProcessingType string `json:"processingType,omitempty"` ConstructionState string `json:"constructionState,omitempty"` IsFromReceiptsStorage bool `json:"isFromReceiptsStorage,omitempty"` SourceShard uint32 `json:"sourceShard"` DestinationShard uint32 `json:"destinationShard"` Transactions []*transaction.ApiTransactionResult `json:"transactions,omitempty"` Receipts []*transaction.ApiReceipt `json:"receipts,omitempty"` IndexOfFirstTxProcessed int32 `json:"indexOfFirstTxProcessed"` IndexOfLastTxProcessed int32 `json:"indexOfLastTxProcessed"` }
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 ScheduledData ¶
type ScheduledData struct { ScheduledRootHash string `json:"rootHash,omitempty"` ScheduledAccumulatedFees string `json:"accumulatedFees,omitempty"` ScheduledDeveloperFees string `json:"developerFees,omitempty"` ScheduledGasProvided uint64 `json:"gasProvided,omitempty"` ScheduledGasPenalized uint64 `json:"penalized,omitempty"` ScheduledGasRefunded uint64 `json:"gasRefunded,omitempty"` }
ScheduledData is a structure that hold information about scheduled events