Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CondenserAPI

Hierarchy

  • CondenserAPI

Index

Constructors

constructor

Properties

Readonly client

client: Client

Methods

call

  • call(method: string, params?: any[] | {}): Promise<any>
  • Convenience for calling condenser_api.

    Parameters

    • method: string
    • Optional params: any[] | {}

    Returns Promise<any>

getAccountHistory

  • getAccountHistory(account: string, from: number, limit: number, operation_bitmask?: (null | number)[]): Promise<[[number, AppliedOperation]]>
  • Returns one or more account history objects for account operations

    example
    import { utils } from "@beblurt/dblurt"
    const op = dblurt.utils.operationOrders
    const operationsBitmask = dblurt.utils.makeBitMaskFilter([
      op.vote,
      op.comment,
      op.delete_comment,
      op.comment_options,
      op.claim_reward_balance,
      op.author_reward,
      op.curation_reward,
      op.comment_reward,
      op.producer_reward,
    ])
    const accountHistory = await client.condenser.getAccountHistory('beblurt', -1, 10, operationsBitmask)

    Parameters

    • account: string

      The account to fetch

    • from: number

      The starting index

    • limit: number

      The maximum number of results to return

    • Optional operation_bitmask: (null | number)[]

    Returns Promise<[[number, AppliedOperation]]>

getAccounts

  • Return array of account info objects for the usernames passed. @param usernames The accounts to fetch.

    Parameters

    • usernames: string[]

    Returns Promise<ExtendedAccount[]>

getActiveVotes

  • getActiveVotes(author: string, permlink: string): Promise<Post["active_votes"]>
  • Returns all votes for the given post.

    Parameters

    • author: string
    • permlink: string

    Returns Promise<Post["active_votes"]>

getActiveWitnesses

  • getActiveWitnesses(): Promise<Witness[]>
  • Returns the list of active witnesses

    Returns Promise<Witness[]>

getBlock

  • Return block blockNum.

    Parameters

    • blockNum: number

    Returns Promise<SignedBlock>

getBlockHeader

  • getBlockHeader(blockNum: number): Promise<BlockHeader>
  • Return header for blockNum.

    Parameters

    • blockNum: number

    Returns Promise<BlockHeader>

getBlogEntries

  • getBlogEntries(account: string, start_entry_id: number, limit: number): Promise<BlogEntry[]>
  • Returns a list of blog entries for an account.

    Parameters

    • account: string
    • start_entry_id: number
    • limit: number

    Returns Promise<BlogEntry[]>

getChainProperties

  • Return median chain properties decided by witness.

    Returns Promise<ChainProperties>

getConfig

getContent

  • getContent(author: string, permlink: string): Promise<Post>
  • Returns a content (post or comment).

    Parameters

    • author: string
    • permlink: string

    Returns Promise<Post>

getContentReplies

  • getContentReplies(author: string, permlink: string): Promise<Post[]>
  • Returns a list of replies.

    Parameters

    • author: string
    • permlink: string

    Returns Promise<Post[]>

getDiscussions

  • Return array of discussions (a.k.a. posts).

    Parameters

    • by: DiscussionQueryCategory

      The type of sorting for the discussions, valid options are: active blog cashout children comments created feed hot promoted trending votes. Note that for blog and feed the tag is set to a username.

    • query: DisqussionQuery

    Returns Promise<Discussion[]>

getDynamicGlobalProperties

getFollowCount

  • getFollowCount(accounts: string[]): Promise<FollowCount>
  • return the count of followers/following for an account

    Parameters

    • accounts: string[]

    Returns Promise<FollowCount>

getFollowers

  • getFollowers(account: string, start: string | null, type: "blog" | "ignore" | null, limit: number): Promise<Followers[]>
  • return the list of the followers of an account

    Parameters

    • account: string
    • start: string | null
    • type: "blog" | "ignore" | null
    • limit: number

    Returns Promise<Followers[]>

getFollowing

  • getFollowing(account: string, start: string | null, type: "blog" | "ignore" | null, limit: number): Promise<Following[]>
  • return the list of accounts that are following an account

    Parameters

    • account: string
    • start: string | null
    • type: "blog" | "ignore" | null
    • limit: number

    Returns Promise<Following[]>

getOperations

  • getOperations(blockNum: number, onlyVirtual?: boolean): Promise<AppliedOperation[]>
  • Return all applied operations in blockNum.

    Parameters

    • blockNum: number
    • Default value onlyVirtual: boolean = false

    Returns Promise<AppliedOperation[]>

getProposalVotes

  • getProposalVotes(start: string[] | number[], limit: number, order: "by_voter_proposal" | "by_proposal_voter", order_direction: "ascending" | "descending", status: "all" | "inactive" | "active" | "expired" | "votable"): Promise<ProposalVote[]>
  • Returns all proposal votes, starting with the specified voter or proposal.id.

    Parameters

    • start: string[] | number[]

      Depends on order (see below)

      • voter - voter of the proposal (account name string)
      • proposal.id - id the proposal (int)
    • limit: number

      The maximum number of proposals to return (max 1000).

    • order: "by_voter_proposal" | "by_proposal_voter"

      can be one of:

      • by_voter_proposal - order by proposal voter
      • by_proposal_voter - order by proposal.id
    • order_direction: "ascending" | "descending"

      The direction in which to order the results. Can be ascending or descending

    • status: "all" | "inactive" | "active" | "expired" | "votable"

      The status of proposals to return.

    Returns Promise<ProposalVote[]>

    A Promise that resolves to an array of ProposalVote objects.

getProposals

  • getProposals(start: string[] | number[], limit: number, order: "by_creator" | "by_start_date" | "by_end_date" | "by_total_votes", order_direction: "ascending" | "descending", status: "all" | "inactive" | "active" | "expired" | "votable"): Promise<Proposal[]>
  • Returns an array of proposals filtered by the specified parameters.

    Parameters

    • start: string[] | number[]

      Depends on order (see below)

      • creator - creator of the proposal (account name string)
      • start_date - start date of the proposal (date string)
      • end_date - end date of the proposal (date string)
      • total_votes - total votes of the proposal (int)
    • limit: number

      The maximum number of proposals to return (max 1000).

    • order: "by_creator" | "by_start_date" | "by_end_date" | "by_total_votes"

      can be one of:

      • by_creator - order by proposal creator
      • by_start_date - order by proposal start date
      • by_end_date - order by proposal end date
      • by_total_votes - order by proposal total votes
    • order_direction: "ascending" | "descending"

      The direction in which to order the results. Can be ascending or descending

    • status: "all" | "inactive" | "active" | "expired" | "votable"

      The status of proposals to return.

    Returns Promise<Proposal[]>

    A Promise that resolves to an array of Proposal objects.

getRebloggedBy

  • getRebloggedBy(author: string, permlink: string): Promise<string[]>
  • Returns the list of accounts that are reblogged a content (post).

    Parameters

    • author: string
    • permlink: string

    Returns Promise<string[]>

getRewardFund

  • getRewardFund(fund: "post"): Promise<RewardFund>
  • Returns information about the current reward funds

    Parameters

    • fund: "post"

    Returns Promise<RewardFund>

getState

  • getState(path: string): Promise<any>
  • Return all of the state required for a particular url path.

    Parameters

    • path: string

      Path component of url conforming to condenser's scheme e.g. @beblurt or trending/travel

    Returns Promise<any>

getTransaction

  • Returns the details of a transaction based on a transaction id.

    Parameters

    • txId: string

    Returns Promise<SignedTransaction>

getVersion

  • getVersion(): Promise<object>
  • return rpc node version

    Returns Promise<object>

getVestingDelegations

  • getVestingDelegations(account: string, from?: string, limit?: number): Promise<VestingDelegation[]>
  • Get list of delegations made by account.

    Parameters

    • account: string

      Account delegating

    • Default value from: string = ""

      Delegatee start offset, used for paging.

    • Default value limit: number = 1000

      Number of results, max 1000.

    Returns Promise<VestingDelegation[]>

getWitnesseSchedule

  • getWitnesseSchedule(): Promise<Witness[]>
  • Returns the current witness schedule

    Returns Promise<Witness[]>

getWitnessesByVote

  • getWitnessesByVote(account: string | null, limit: number): Promise<Witness[]>
  • Returns current witnesses by vote

    Parameters

    • account: string | null
    • limit: number

    Returns Promise<Witness[]>

getWitnessesCount

  • getWitnessesCount(): Promise<Witness[]>
  • Returns the current number of witnesses

    Returns Promise<Witness[]>

lookupAccounts

  • lookupAccounts(account: string, limit: number): Promise<string[]>
  • Looks up accounts starting with name

    Parameters

    • account: string
    • limit: number

    Returns Promise<string[]>

lookupWitnessAccounts

  • lookupWitnessAccounts(account: string, limit: number): Promise<string[]>
  • Looks up accounts starting with name

    Parameters

    • account: string
    • limit: number

    Returns Promise<string[]>

verifyAuthority

  • Verify signed transaction.

    Parameters

    Returns Promise<boolean>

Generated using TypeDoc