wowok
Version:
Wowok Blockchain TypeScript API
95 lines (94 loc) • 2.63 kB
TypeScript
import type { Checkpoint, DynamicFieldInfo, SuiCallArg, WowMoveNormalizedModule, WowParsedData, SuiTransaction, SuiValidatorSummary } from "./generated.js";
export type EpochInfo = {
epoch: string;
validators: SuiValidatorSummary[];
epochTotalTransactions: string;
firstCheckpointId: string;
epochStartTimestamp: string;
endOfEpochInfo: EndOfEpochInfo | null;
referenceGasPrice: number | null;
};
export type EpochMetrics = {
epoch: string;
epochTotalTransactions: string;
firstCheckpointId: string;
epochStartTimestamp: string;
endOfEpochInfo: EndOfEpochInfo | null;
};
export type EpochPage = {
data: EpochInfo[];
nextCursor: string | null;
hasNextPage: boolean;
};
export type EpochMetricsPage = {
data: EpochMetrics[];
nextCursor: string | null;
hasNextPage: boolean;
};
export type EndOfEpochInfo = {
lastCheckpointId: string;
epochEndTimestamp: string;
protocolVersion: string;
referenceGasPrice: string;
totalStake: string;
storageFundReinvestment: string;
storageCharge: string;
storageRebate: string;
storageFundBalance: string;
stakeSubsidyAmount: string;
totalGasFees: string;
totalStakeRewardsDistributed: string;
leftoverStorageFundInflow: string;
};
export type CheckpointPage = {
data: Checkpoint[];
nextCursor: string | null;
hasNextPage: boolean;
};
export type NetworkMetrics = {
currentTps: number;
tps30Days: number;
currentCheckpoint: string;
currentEpoch: string;
totalAddresses: string;
totalObjects: string;
totalPackages: string;
};
export type AddressMetrics = {
checkpoint: number;
epoch: number;
timestampMs: number;
cumulativeAddresses: number;
cumulativeActiveAddresses: number;
dailyActiveAddresses: number;
};
export type AllEpochsAddressMetrics = AddressMetrics[];
export type MoveCallMetrics = {
rank3Days: MoveCallMetric[];
rank7Days: MoveCallMetric[];
rank30Days: MoveCallMetric[];
};
export type MoveCallMetric = [
{
module: string;
package: string;
function: string;
},
string
];
export type DynamicFieldPage = {
data: DynamicFieldInfo[];
nextCursor: string | null;
hasNextPage: boolean;
};
export type WowMoveNormalizedModules = Record<string, WowMoveNormalizedModule>;
export type SuiMoveObject = Extract<WowParsedData, {
dataType: "moveObject";
}>;
export type SuiMovePackage = Extract<WowParsedData, {
dataType: "package";
}>;
export type ProgrammableTransaction = {
transactions: SuiTransaction[];
inputs: SuiCallArg[];
};