123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279 |
- import { ApiPromise } from '@polkadot/api'
- import { MemberId } from '@joystream/types/members'
- import {
- ProposalParameters,
- ProposalStatus,
- VotingResults,
- } from '@joystream/types/proposals'
- import { AccountId, Nominations } from '@polkadot/types/interfaces'
- import { Option } from '@polkadot/types/codec'
- import { StorageKey } from '@polkadot/types/primitive'
- export interface Api {
- query: any
- rpc: any
- derive: any
- }
- export interface IState {
- //gethandle: (account: AccountId | string) => string;
- connecting: boolean
- now: number
- block: number
- blocks: Block[]
- nominators: string[]
- validators: string[]
- stashes: string[]
- loading: boolean
- councils: Seat[][]
- councilElection?: { stage: any; round: number; termEndsAt: number }
- channels: Channel[]
- categories: Category[]
- proposals: ProposalDetail[]
- posts: Post[]
- threads: Thread[]
- domain: string
- proposalCount: number
- proposalPosts: any[]
- handles: Handles
- members: Member[]
- tokenomics?: Tokenomics
- reports: { [key: string]: string }
- [key: string]: any
- stars: { [key: string]: boolean }
- stakes?: { [key: string]: Stakes }
- rewardPoints?: RewardPoints
- lastReward: number
- }
- export interface RewardPoints {
- total: number
- individual: { [account: string]: number }
- }
- export interface Stake {
- who: string
- value: number
- }
- export interface Stakes {
- total: number
- own: number
- others: Stake[]
- commission: number
- }
- export interface Seat {
- member: string
- handle?: string
- id?: number
- stake: number
- backers: Backer[]
- }
- export interface Backer {
- member: string
- stake: number
- }
- export interface CouncilType {
- round: number
- last: string
- }
- export interface CouncilModel {}
- export interface Options {
- verbose: number
- channel: boolean
- council: boolean
- forum: boolean
- proposals: boolean
- }
- export interface ProposalDetail {
- createdAt: number
- finalizedAt: number
- message: string
- parameters: string
- stage: any
- result: string
- exec: any
- id: number
- title: string
- description: any
- votes: VotingResults
- type: string
- votesByAccount?: Vote[]
- author?: string
- authorId: number
- }
- export interface Vote {
- vote: string
- handle: string
- }
- export type ProposalArray = number[]
- export interface ProposalPost {
- threadId: number
- text: string
- id: number
- }
- export interface Proposals {
- current: number
- last: number
- active: ProposalArray
- executing: ProposalArray
- }
- export interface ChannelType {
- id: number
- handle: string
- title: string
- description: string
- avatar: string
- banner: string
- content: string
- ownerId: number
- accountId: string
- publicationStatus: boolean
- curation: string
- createdAt: string
- principal: number
- }
- export interface CategoryType {
- id: number
- threadId: number
- title: string
- description: string
- createdAt: number
- deleted: boolean
- archived: boolean
- subcategories: number
- unmoderatedThreads: number
- moderatedThreads: number
- position: number
- moderatorId: string
- }
- export interface PostType {
- id: number
- text: string
- threadId: number
- authorId: string
- createdAt: { block: number; time: number }
- }
- export interface ThreadType {
- id: number
- title: string
- categoryId: number
- nrInCategory: number
- moderation: string
- createdAt: string
- authorId: string
- }
- export interface MemberType {
- account: string
- handle: string
- id: number
- registeredAt: number
- about: string
- addPost: any
- }
- export interface Header {
- number: number
- timestamp: number
- author: string
- }
- export interface Summary {
- blocks: Block[]
- validators: number[]
- nominators: number[]
- }
- export type NominatorsEntries = [StorageKey, Option<Nominations>][]
- export interface ProviderStatus {
- [propName: string]: boolean
- }
- export interface Handles {
- [key: string]: string
- }
- export interface Tokenomics {
- price: string
- totalIssuance: string
- validators: { total_stake: string }
- burns: Burn[]
- exchanges: Exchange[]
- extecutedBurnsAmount: number
- }
- export interface Burn {
- amount: number
- blockHeight: number
- date: string // "2020-09-21T11:07:54.000Z"
- logTime: string //"2020-09-21T11:08:54.091Z"
- }
- export interface Exchange {
- amount: number
- amountUSD: number
- blockHeight: number
- date: string // "2020-09-21T11:07:48.000Z"
- logTime: string // "2020-09-21T11:08:48.552Z"
- price: number // 0.000053676219442924057
- recipient: string //"5D5PhZQNJzcJXVBxwJxZcsutjKPqUPydrvpu6HeiBfMaeKQu"
- sender: string // "5DACzSg65taZ2NRktUtzBjhLZr8H5T8rwNoZUng9gQV6ayqT"
- senderMemo: string //"4Testing1337SendToBurnerAddressHopingItWorksOfc5D5PhZQNJzcJXVBxwJxZcsutjKPqUPydrvpu6HeiBfMaeKQu"
- status: string // FINALIZED | PENDING
- xmrAddress: string //"No address found"
- }
- export interface Event {
- text: string
- date: number
- category: {
- tag: string
- color: string
- }
- link: {
- url: string
- text: string
- }
- }
- export interface CalendarItem {
- id: number
- group: number
- title: string
- start_time: number
- end_time: number
- }
- export interface CalendarGroup {
- id: number
- title: string
- }
- export interface Status {
- block: number
- era: number
- round: number
- members: number
- channels: number
- categories: number
- threads: number
- posts: number
- proposals: number
- proposalPosts: number
- }
|