Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ members = [
"indexer-standalone",
"indexer-tests",
"spo-indexer",
"spo-api",
]

[workspace.package]
Expand Down
272 changes: 247 additions & 25 deletions indexer-api/graphql/schema-v3.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,19 @@ type CollapsedMerkleTree {
protocolVersion: Int!
}

"""
Committee member for an epoch.
"""
type CommitteeMember {
epochNo: Int!
position: Int!
sidechainPubkeyHex: String!
expectedSlots: Int!
auraPubkeyHex: String
poolIdHex: String
spoSkHex: String
}

"""
A contract action.
"""
Expand Down Expand Up @@ -354,35 +367,43 @@ type DustSpendProcessed implements DustLedgerEvent {
maxId: Int!
}

scalar HexEncoded
"""
Current epoch information.
"""
type EpochInfo {
epochNo: Int!
durationSeconds: Int!
elapsedSeconds: Int!
}

type Mutation {
"""
Connect the wallet with the given viewing key and return a session ID.
"""
connect(viewingKey: ViewingKey!): HexEncoded!
"""
Disconnect the wallet with the given session ID.
"""
disconnect(sessionId: HexEncoded!): Unit!
"""
SPO performance for an epoch.
"""
type EpochPerf {
epochNo: Int!
spoSkHex: String!
produced: Int!
expected: Int!
identityLabel: String
stakeSnapshot: String
poolIdHex: String
validatorClass: String
}

type ParamChange implements DustLedgerEvent {
"""
The ID of this dust ledger event.
"""
id: Int!
"""
The hex-encoded serialized event.
"""
raw: HexEncoded!
"""
The maximum ID of all dust ledger events.
"""
maxId: Int!
"""
First valid epoch for an SPO identity.
"""
type FirstValidEpoch {
idKey: String!
firstValidEpoch: Int!
}

type Query {
scalar HexEncoded

"""
Merged Query combining core queries with SPO queries.
"""
type MergedQuery {
"""
Find a block for the given optional offset; if not present, the latest block is returned.
"""
Expand All @@ -407,6 +428,155 @@ type Query {
Get the full history of Terms and Conditions changes for governance auditability.
"""
termsAndConditionsHistory: [TermsAndConditionsChange!]!
"""
List SPO identities with pagination.
"""
spoIdentities(limit: Int, offset: Int): [SpoIdentity!]!
"""
Get SPO identity by pool ID.
"""
spoIdentityByPoolId(poolIdHex: String!): SpoIdentity
"""
Get total count of SPOs.
"""
spoCount: Int
"""
Get pool metadata by pool ID.
"""
poolMetadata(poolIdHex: String!): PoolMetadata
"""
List pool metadata with pagination.
"""
poolMetadataList(limit: Int, offset: Int, withNameOnly: Boolean): [PoolMetadata!]!
"""
Get SPO with metadata by pool ID.
"""
spoByPoolId(poolIdHex: String!): Spo
"""
List SPOs with optional search.
"""
spoList(limit: Int, offset: Int, search: String): [Spo!]!
"""
Get composite SPO data (identity + metadata + performance).
"""
spoCompositeByPoolId(poolIdHex: String!): SpoComposite
"""
Get SPO identifiers ordered by performance.
"""
stakePoolOperators(limit: Int): [String!]!
"""
Get latest SPO performance entries.
"""
spoPerformanceLatest(limit: Int, offset: Int): [EpochPerf!]!
"""
Get SPO performance by SPO key.
"""
spoPerformanceBySpoSk(spoSkHex: String!, limit: Int, offset: Int): [EpochPerf!]!
"""
Get epoch performance for all SPOs.
"""
epochPerformance(epoch: Int!, limit: Int, offset: Int): [EpochPerf!]!
"""
Get current epoch information.
"""
currentEpochInfo: EpochInfo
"""
Get epoch utilization (produced/expected ratio).
"""
epochUtilization(epoch: Int!): Float
"""
Get committee membership for an epoch.
"""
committee(epoch: Int!): [CommitteeMember!]!
"""
Get cumulative registration totals for an epoch range.
"""
registeredTotalsSeries(fromEpoch: Int!, toEpoch: Int!): [RegisteredTotals!]!
"""
Get registration statistics for an epoch range.
"""
registeredSpoSeries(fromEpoch: Int!, toEpoch: Int!): [RegisteredStat!]!
"""
Get raw presence events for an epoch range.
"""
registeredPresence(fromEpoch: Int!, toEpoch: Int!): [PresenceEvent!]!
"""
Get first valid epoch for each SPO identity.
"""
registeredFirstValidEpochs(uptoEpoch: Int): [FirstValidEpoch!]!
"""
Get stake distribution with search and ordering.
"""
stakeDistribution(limit: Int, offset: Int, search: String, orderByStakeDesc: Boolean): [StakeShare!]!
}

type Mutation {
"""
Connect the wallet with the given viewing key and return a session ID.
"""
connect(viewingKey: ViewingKey!): HexEncoded!
"""
Disconnect the wallet with the given session ID.
"""
disconnect(sessionId: HexEncoded!): Unit!
}

type ParamChange implements DustLedgerEvent {
"""
The ID of this dust ledger event.
"""
id: Int!
"""
The hex-encoded serialized event.
"""
raw: HexEncoded!
"""
The maximum ID of all dust ledger events.
"""
maxId: Int!
}

"""
Pool metadata from Cardano.
"""
type PoolMetadata {
poolIdHex: String!
hexId: String
name: String
ticker: String
homepageUrl: String
logoUrl: String
}

"""
Presence event for an SPO in an epoch.
"""
type PresenceEvent {
epochNo: Int!
idKey: String!
source: String!
status: String
}

"""
Registration statistics for an epoch.
"""
type RegisteredStat {
epochNo: Int!
federatedValidCount: Int!
federatedInvalidCount: Int!
registeredValidCount: Int!
registeredInvalidCount: Int!
dparam: Float
}

"""
Cumulative registration totals for an epoch.
"""
type RegisteredTotals {
epochNo: Int!
totalRegistered: Int!
newlyRegistered: Int!
}

"""
Expand Down Expand Up @@ -539,6 +709,58 @@ type ShieldedTransactionsProgress {
highestRelevantEndIndex: Int!
}

"""
SPO with optional metadata.
"""
type Spo {
poolIdHex: String!
validatorClass: String!
sidechainPubkeyHex: String!
auraPubkeyHex: String
name: String
ticker: String
homepageUrl: String
logoUrl: String
}

"""
Composite SPO data (identity + metadata + performance).
"""
type SpoComposite {
identity: SpoIdentity
metadata: PoolMetadata
performance: [EpochPerf!]!
}

"""
SPO identity information.
"""
type SpoIdentity {
poolIdHex: String!
mainchainPubkeyHex: String!
sidechainPubkeyHex: String!
auraPubkeyHex: String
validatorClass: String!
}

"""
Stake share information for an SPO.
"""
type StakeShare {
poolIdHex: String!
name: String
ticker: String
homepageUrl: String
logoUrl: String
liveStake: String
activeStake: String
liveDelegators: Int
liveSaturation: Float
declaredPledge: String
livePledge: String
stakeShare: Float
}

type Subscription {
"""
Subscribe to blocks starting at the given offset or at the latest block if the offset is
Expand Down Expand Up @@ -848,7 +1070,7 @@ Directs the executor to skip this field or fragment when the `if` argument is tr
"""
directive @skip(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
schema {
query: Query
query: MergedQuery
mutation: Mutation
subscription: Subscription
}
Expand Down
1 change: 1 addition & 0 deletions indexer-api/src/domain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ mod contract_action;
pub mod dust;
mod ledger_event;
mod ledger_state;
pub mod spo;
pub mod system_parameters;
mod transaction;
mod unshielded;
Expand Down
Loading
Loading