@iotexproject/kit 0.1.90 → 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 +19 -0
- 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;
|
|
@@ -9103,6 +9110,7 @@ export type Proposal = {
|
|
|
9103
9110
|
start_time: string;
|
|
9104
9111
|
end_time: string;
|
|
9105
9112
|
is_voted?: boolean;
|
|
9113
|
+
votes?: Vote[];
|
|
9106
9114
|
};
|
|
9107
9115
|
declare class Dao extends BaseDBModule {
|
|
9108
9116
|
proposalsDataLoader: DataLoader<number, Proposal | undefined, number>;
|
|
@@ -9114,6 +9122,9 @@ declare class Dao extends BaseDBModule {
|
|
|
9114
9122
|
height: number;
|
|
9115
9123
|
address: string;
|
|
9116
9124
|
}>;
|
|
9125
|
+
getVotesByProposalId({ proposal_id, }: {
|
|
9126
|
+
proposal_id: number;
|
|
9127
|
+
}): Promise<Vote[]>;
|
|
9117
9128
|
getProposal({ id, voter }: {
|
|
9118
9129
|
id: number;
|
|
9119
9130
|
voter?: string;
|
|
@@ -9137,6 +9148,14 @@ declare class Dao extends BaseDBModule {
|
|
|
9137
9148
|
signature: string;
|
|
9138
9149
|
proposal_id: number;
|
|
9139
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[]>>;
|
|
9140
9159
|
}
|
|
9141
9160
|
declare const modules$1: {
|
|
9142
9161
|
account: Account;
|