3
0

types.ts 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. import { AccountId, AccountData } from "@polkadot/types/interfaces";
  2. import { GenericEventData } from "@polkadot/types/generic/Event";
  3. import { MemberId } from "@joystream/types/members";
  4. import { VotingResults } from "@joystream/types/proposals";
  5. import { Stake } from "@joystream/types/stake";
  6. import { RewardRelationship } from "@joystream/types/recurring-rewards";
  7. export interface AccountBalance {
  8. accountId: string;
  9. balance: AccountData;
  10. }
  11. export interface ElectionInfo {
  12. durations: number[];
  13. stage: any;
  14. round: number;
  15. stageEndsAt: number;
  16. termEndsAt: number;
  17. }
  18. export interface Vote {
  19. vote: string;
  20. handle: string;
  21. }
  22. export interface ProposalDetail {
  23. created: number;
  24. finalizedAt: number;
  25. message: string;
  26. parameters: string;
  27. stage: any;
  28. result: string;
  29. exec: any;
  30. id: number;
  31. title: string;
  32. description: any;
  33. votes: VotingResults;
  34. type: string;
  35. votesByAccount?: Vote[];
  36. author?: string;
  37. authorId: number;
  38. }
  39. export interface Round {
  40. round: number;
  41. start: number;
  42. end: number;
  43. }
  44. export class Bounty {
  45. constructor(
  46. public testnet: string,
  47. public proposalId: number,
  48. public title: string,
  49. public status: string,
  50. public amountAsked: number,
  51. public amountMinted: number
  52. ) {}
  53. }
  54. export class CacheEvent {
  55. constructor(
  56. public section: string,
  57. public method: string,
  58. public data: GenericEventData
  59. ) {}
  60. }
  61. export interface WorkerReward {
  62. id: number;
  63. memberId: MemberId;
  64. account: AccountId;
  65. handle: string;
  66. stake: Stake;
  67. reward: RewardRelationship;
  68. status: string;
  69. }