Documentation ¶
Index ¶
- type AccountQueryOptions
- type AccountResponse
- type Block
- type BlockFetchType
- type BlockInfo
- type BlockQueryOptions
- type DCTSupply
- type DelegatedValue
- type Delegator
- type DirectStakedValue
- type EpochStartInfo
- type EpochStartShardData
- type GetAlteredAccountsForBlockOptions
- type GetBlockParameters
- type Guardian
- type GuardianData
- type Hyperblock
- type MiniBlock
- type NotarizedBlock
- type ScheduledData
- type StakeValues
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountQueryOptions ¶ added in v0.0.3
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"` RandSeed string `json:"randSeed,omitempty"` PrevRandSeed string `json:"prevRandSeed,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 BlockFetchType ¶ added in v0.0.3
type BlockFetchType string
BlockFetchType is the type that specifies how a block should be queried from API
const ( // BlockFetchTypeByHash is to be used when a block should be fetched from API based on its hash BlockFetchTypeByHash BlockFetchType = "by-hash" // BlockFetchTypeByNonce is to be used when a block should be fetched from API based on its nonce BlockFetchTypeByNonce BlockFetchType = "by-nonce" )
func (BlockFetchType) String ¶ added in v0.0.3
func (aft BlockFetchType) String() string
type BlockInfo ¶ added in v0.0.3
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 ¶ added in v0.0.3
BlockQueryOptions holds options for block queries
type DCTSupply ¶ added in v0.0.3
type DCTSupply struct { InitialMinted string `json:"initialMinted"` Supply string `json:"supply"` Burned string `json:"burned"` Minted string `json:"minted"` }
DCTSupply represents the structure for dct supply that is returned by api routes
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 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 ¶ added in v0.0.3
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 GetAlteredAccountsForBlockOptions ¶ added in v0.0.3
type GetAlteredAccountsForBlockOptions struct { GetBlockParameters TokensFilter string }
GetAlteredAccountsForBlockOptions specifies the options for returning altered accounts for a given block
type GetBlockParameters ¶ added in v0.0.3
type GetBlockParameters struct { RequestType BlockFetchType Hash []byte Nonce uint64 }
GetBlockParameters holds the parameters for requesting a block on API
type Guardian ¶ added in v0.0.6
type Guardian struct { Address string `json:"address"` ActivationEpoch uint32 `json:"activationEpoch"` ServiceUID string `json:"serviceUID"` }
Guardian holds the relevant information for an account guardian
type GuardianData ¶ added in v0.0.6
type GuardianData struct { ActiveGuardian *Guardian `json:"activeGuardian,omitempty"` PendingGuardian *Guardian `json:"pendingGuardian,omitempty"` Guarded bool `json:"guarded,omitempty"` }
GuardianData holds data relating to the configured guardian(s) and guarded state of an account
type Hyperblock ¶ added in v0.0.3
type Hyperblock struct { Hash string `json:"hash"` PrevBlockHash string `json:"prevBlockHash"` StateRootHash string `json:"stateRootHash"` Nonce uint64 `json:"nonce"` Round uint64 `json:"round"` Epoch uint32 `json:"epoch"` NumTxs uint32 `json:"numTxs"` AccumulatedFees string `json:"accumulatedFees,omitempty"` DeveloperFees string `json:"developerFees,omitempty"` AccumulatedFeesInEpoch string `json:"accumulatedFeesInEpoch,omitempty"` DeveloperFeesInEpoch string `json:"developerFeesInEpoch,omitempty"` Timestamp time.Duration `json:"timestamp,omitempty"` EpochStartInfo *EpochStartInfo `json:"epochStartInfo,omitempty"` EpochStartShardsData []*EpochStartShardData `json:"epochStartShardsData,omitempty"` ShardBlocks []*NotarizedBlock `json:"shardBlocks"` Transactions []*transaction.ApiTransactionResult `json:"transactions"` Status string `json:"status,omitempty"` }
Hyperblock contains all fully executed (both in source and in destination shards) transactions notarized in a given metablock
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"` RootHash string `json:"rootHash"` MiniBlockHashes []string `json:"miniBlockHashes,omitempty"` AlteredAccounts []*outport.AlteredAccount `json:"alteredAccounts,omitempty"` }
NotarizedBlock represents a notarized block
type ScheduledData ¶ added in v0.0.3
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