@iotexproject/kit 0.1.89 → 0.1.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +22 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -9088,6 +9088,13 @@ declare class Zkpass extends BaseDBModule {
|
|
|
9088
9088
|
data: null;
|
|
9089
9089
|
}>;
|
|
9090
9090
|
}
|
|
9091
|
+
export type Vote = {
|
|
9092
|
+
voter: string;
|
|
9093
|
+
vote_weight: string;
|
|
9094
|
+
vote_value: "yes" | "no" | "abstain";
|
|
9095
|
+
vote_percentage?: number;
|
|
9096
|
+
created_at: string;
|
|
9097
|
+
};
|
|
9091
9098
|
export type Proposal = {
|
|
9092
9099
|
id: number;
|
|
9093
9100
|
title: string;
|
|
@@ -9102,6 +9109,8 @@ export type Proposal = {
|
|
|
9102
9109
|
updated_at: string;
|
|
9103
9110
|
start_time: string;
|
|
9104
9111
|
end_time: string;
|
|
9112
|
+
is_voted?: boolean;
|
|
9113
|
+
votes?: Vote[];
|
|
9105
9114
|
};
|
|
9106
9115
|
declare class Dao extends BaseDBModule {
|
|
9107
9116
|
proposalsDataLoader: DataLoader<number, Proposal | undefined, number>;
|
|
@@ -9113,8 +9122,12 @@ declare class Dao extends BaseDBModule {
|
|
|
9113
9122
|
height: number;
|
|
9114
9123
|
address: string;
|
|
9115
9124
|
}>;
|
|
9116
|
-
|
|
9125
|
+
getVotesByProposalId({ proposal_id, }: {
|
|
9126
|
+
proposal_id: number;
|
|
9127
|
+
}): Promise<Vote[]>;
|
|
9128
|
+
getProposal({ id, voter }: {
|
|
9117
9129
|
id: number;
|
|
9130
|
+
voter?: string;
|
|
9118
9131
|
}): Promise<Proposal | undefined>;
|
|
9119
9132
|
getProposalListByIds({ ids }: {
|
|
9120
9133
|
ids: readonly number[];
|
|
@@ -9135,6 +9148,14 @@ declare class Dao extends BaseDBModule {
|
|
|
9135
9148
|
signature: string;
|
|
9136
9149
|
proposal_id: number;
|
|
9137
9150
|
}): Promise<import("postgres").RowList<import("postgres").Row[]>>;
|
|
9151
|
+
createProposal(args: {
|
|
9152
|
+
title: string;
|
|
9153
|
+
content: string;
|
|
9154
|
+
message: string;
|
|
9155
|
+
signature: string;
|
|
9156
|
+
start_time: string;
|
|
9157
|
+
end_time: string;
|
|
9158
|
+
}): Promise<import("postgres").RowList<import("postgres").Row[]>>;
|
|
9138
9159
|
}
|
|
9139
9160
|
declare const modules$1: {
|
|
9140
9161
|
account: Account;
|