Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
48 changes: 48 additions & 0 deletions src/api/info/_methods/validatorL1Votes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,30 @@ export type ValidatorL1VotesResponse = {
/** Named outcomes (name and description). */
namedOutcomes: [string, string][];
};
} | {
/** Register an outcome template. */
registerTemplate: {
/** Template identifier. */
id: string;
/** Role of the template. */
role: {
/** Deploys a single outcome. */
standaloneOutcome: {
/** Names of the Yes and No sides. */
sideNames: [string, string];
};
};
/** Name and description containing `{keyword}` placeholders. */
nameAndDescription: [string, string];
/**
* Keywords of the template and the value format of each:
* - `dateTime` = `%Y%m%d-%H%M`, within the next year; e.g. `20260712-1830`.
* - `date` = `YYYYMMDD` (end of day), within the next year; e.g. `20260712`.
* - `string` = free text.
* - `hlPerp` = coin name of an existing perp; e.g. `ABC` or `test:ABC`.
*/
keywordToHint: [string, "dateTime" | "date" | "string" | "hlPerp"][];
};
} | {
/** Settle an outcome. */
settleOutcome: {
Expand Down Expand Up @@ -94,6 +118,30 @@ export type ValidatorL1VotesResponse = {
],
][];
};
} | {
/** Settle all remaining named outcomes of a question. */
settleQuestion2: {
/** Question identifier. */
question: number;
/** Settlement of each remaining active named outcome. */
outcomeSettlements: {
/** Outcome identifier. */
outcome: number;
/**
* Payout fraction of the Yes side (between 0 and 1).
* @pattern ^[0-9]+(\.[0-9]+)?$
*/
settleFraction: string;
/** Settlement details. */
details: string;
/** Name and description of the outcome being settled. */
nameAndDescription: [string, string];
/** Names of the Yes and No sides of the outcome being settled. */
sideNames: [string, string];
}[];
/** Name and description of the question being settled. */
nameAndDescription: [string, string];
};
};
} | {
/** Token and treasury governance action. */
Expand Down
2 changes: 2 additions & 0 deletions tests/api/info/validatorL1Votes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ runTest({
"#/items/properties/action/anyOf/2/properties/O/anyOf/1",
"#/items/properties/action/anyOf/2/properties/O/anyOf/2",
"#/items/properties/action/anyOf/2/properties/O/anyOf/3",
"#/items/properties/action/anyOf/2/properties/O/anyOf/4",
"#/items/properties/action/anyOf/2/properties/O/anyOf/5",
"#/items/properties/action/anyOf/3",
]);
},
Expand Down