All files types.ts

100% Statements 1/1
50% Branches 3/6
100% Functions 1/1
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 16312x                                                                                                                                                                                                                                                                                                                                    
import {Checksum256, Name, TimePoint} from '@wharfkit/antelope'
 
export interface PermissionLevel {
    actor: Name | string
    permission: Name | string
}
 
export type ProposalStatus = 'proposed' | 'executed' | 'cancelled' | 'expired'
 
export type ActivityAction = 'proposed' | 'approved' | 'unapproved' | 'executed' | 'cancelled'
 
export interface Transaction {
    expiration: string | TimePoint
    ref_block_num: number
    ref_block_prefix: number
    max_net_usage_words: number
    max_cpu_usage_ms: number
    delay_sec: number
    context_free_actions: any[]
    actions: any[]
    transaction_extensions: any[]
}
 
export interface Proposal {
    proposer: Name | string
    proposal_name: Name | string
    status: ProposalStatus
    created_at: string | TimePoint
    created_block: number
    created_trx_id: Checksum256 | string
    globalseq: number
    expiration: string | TimePoint
    actions_count: number
    requested_approvals?: PermissionLevel[]
    provided_approvals?: PermissionLevel[]
    // Summary fields (present in list endpoints, absent in detail endpoint)
    approvals_required?: number
    approvals_received?: number
    approval_ratio?: number
    time_remaining_seconds?: number
    transaction?: Transaction
    executed_at?: string | TimePoint | null
    executed_by?: Name | string | null
    executed_trx_id?: Checksum256 | string | null
    cancelled_at?: string | TimePoint | null
    cancelled_by?: Name | string | null
    cancelled_trx_id?: Checksum256 | string | null
}
 
export interface ProposalVersion {
    globalseq: number
    status: ProposalStatus
    timestamp: string | TimePoint
    block_num: number
    trx_id: Checksum256 | string
    proposal: Proposal
}
 
export interface ApprovalEvent {
    action: 'approve' | 'unapprove' | 'invalidate'
    actor: Name | string
    permission: Name | string
    timestamp: string | TimePoint
    globalseq: number
    trx_id: Checksum256 | string
}
 
export interface ActivityEvent {
    action: ActivityAction
    timestamp: string | TimePoint
    proposer: Name | string
    proposal_name: Name | string
    globalseq: number
    trx_id: Checksum256 | string
}
 
export interface ServiceStatus {
    head_block_num?: number
    last_irreversible_block_num?: number
    chain_id?: string
    server_version?: string
    accepting_http?: boolean
    database_size?: number
    database_size_mb?: number
    last_account_action_seq?: number
    synced?: boolean
    max_proposal_results?: number
    max_approval_results?: number
}
export interface GetProposalResponse extends Proposal {
    version_history?: ProposalVersion[]
}
 
export interface GetProposalHistoryResponse {
    proposer: Name | string
    proposal_name: Name | string
    versions: ProposalVersion[]
    more: boolean
    total: number
}
 
export interface GetProposalsResponse {
    proposals: Proposal[]
    more: boolean
    total: number
}
 
export interface GetApprovalsResponse {
    proposer: Name | string
    proposal_name: Name | string
    globalseq: number
    timeline: ApprovalEvent[]
    total: number
    more: boolean
}
 
export interface GetActivityResponse {
    account: Name | string
    activity: ActivityEvent[]
    more: boolean
    total: number
}
 
export interface GetApproverProposalsResponse {
    approver: Name | string
    proposals: Proposal[]
    more: boolean
    total: number
}
 
export interface SearchProposalsResponse {
    query: string
    status?: string
    proposals: Proposal[]
    more: boolean
    total: number
}
 
export type GetStatusResponse = ServiceStatus
 
export interface DebugProposalResponse {
    proposer: Name | string
    proposal_name: Name | string
    globalseq: number
    actions_count: number
    stored_status_byte: number
    stored_status_string: ProposalStatus
    computed_status_byte: number
    computed_status_string: ProposalStatus
    status_changed: boolean
    stored_proposed_at: number
    stored_executed_at: number
    stored_cancelled_at: number
    stored_expiration_unix: number
    stored_expiration_iso: string | TimePoint
    current_time_unix: number
    current_time_iso: string | TimePoint
    is_expiration_past: boolean
    time_until_expiration: number
    approvals_requested: number
    approvals_provided: number
}