Constructors

Properties

client: Client

Methods

  • Convenience for calling condenser_api.

    Parameters

    • method: string
    • Optionalparams: any[] | {
          [key: string]: any;
      }

    Returns Promise<any>

  • Returns one or more account history objects for account operations

    Parameters

    • account: string

      The account to fetch

    • from: number

      The starting index

    • limit: number

      The maximum number of results to return

    • Optionaloperation_bitmask: (null | number)[]

      Generated by utils.makeBitMaskFilter() - see example below (not yet usable)

    Returns Promise<[[number, AppliedOperation]]>

    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)
  • Return Layer 1 account state for one or more account names.

    Backing JSON-RPC method: condenser_api.get_accounts.

    Use this when exact account balances, authorities or chain state matter. For Nexus profile metadata, use client.nexus.getProfile instead.

    Parameters

    • usernames: string[]

      Account names to fetch.

    Returns Promise<ExtendedAccount[]>

    Account objects in the same order as requested names when found.

    const accounts = await client.condenser.getAccounts(['beblurt']);
    
  • Return active Layer 1 votes for a post or comment.

    Backing JSON-RPC method: condenser_api.get_active_votes.

    Parameters

    • author: string

      Post/comment author.

    • permlink: string

      Post/comment permlink.

    Returns Promise<ActiveVote[]>

    Active vote entries known by the RPC node.

    const votes = await client.condenser.getActiveVotes(author, permlink);
    
  • Returns the list of active witnesses

    Returns Promise<string[]>

  • Returns a list of blog entries for an account.

    Parameters

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

    Returns Promise<BlogEntry[]>

  • Return a Layer 1 content object for a post or comment.

    Backing JSON-RPC method: condenser_api.get_content.

    This reads the chain content object. If you need social/indexed ranking, discovery or community context, use Nexus helpers first and then read the Layer 1 object with this method when exact chain content matters.

    Parameters

    • author: string

      Post/comment author.

    • permlink: string

      Post/comment permlink.

    Returns Promise<Post>

    The content object returned by the RPC node.

  • Returns a list of replies.

    Parameters

    • author: string
    • permlink: string

    Returns Promise<Post[]>

  • 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[]>

  • Return current Layer 1 dynamic global properties.

    Backing JSON-RPC method: condenser_api.get_dynamic_global_properties.

    This is the usual source for head block number, last irreversible block, time and other current chain-level values.

    Returns Promise<DynamicGlobalProperties>

  • return the list of the followers of an account

    Parameters

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

    Returns Promise<Followers[]>

  • return the list of accounts that are following an account

    Parameters

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

    Returns Promise<Following[]>

  • Return applied operations in a Layer 1 block.

    Backing JSON-RPC method: condenser_api.get_ops_in_block.

    Operation order is the order reported by the node for that block. Use an irreversible block number when building examples or replay tools that must avoid reversible chain state.

    Parameters

    • blockNum: number

      Block number to inspect.

    • onlyVirtual: boolean = false

      When true, return only virtual operations.

    Returns Promise<AppliedOperation[]>

    Applied operations for the requested block.

    const operations = await client.condenser.getOperations(blockNum, false);
    
  • 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"
          | "active"
          | "inactive"
          | "expired"
          | "votable"

      The status of proposals to return.

    Returns Promise<Proposal[]>

    A Promise that resolves to an array of Proposal objects.

  • 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"
          | "active"
          | "inactive"
          | "expired"
          | "votable"

      The status of proposals to return.

    Returns Promise<ProposalVote[]>

    A Promise that resolves to an array of ProposalVote objects.

  • Returns the list of accounts that are reblogged a content (post).

    Parameters

    • author: string
    • permlink: string

    Returns Promise<string[]>

  • 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>

  • Get list of delegations made by account.

    Parameters

    • account: string

      Account delegating

    • from: string = ''

      Delegatee start offset, used for paging.

    • limit: number = 1000

      Number of results, max 1000.

    Returns Promise<VestingDelegation[]>

  • Return Layer 1 witness information for an account.

    Backing JSON-RPC method: condenser_api.get_witness_by_account.

    Not every account is a witness. Use getActiveWitnesses or getWitnessesByVote when you need to discover witness accounts first.

    Parameters

    • account: string

      Witness account name.

    Returns Promise<Witness>

  • Returns list of witnesses by vote

    Parameters

    • account: null | string
    • limit: number

    Returns Promise<Witness[]>

  • Returns the current number of witnesses

    Returns Promise<number>

  • Looks up accounts starting with name

    Parameters

    • account: string
    • limit: number

    Returns Promise<string[]>

  • Looks up accounts starting with name

    Parameters

    • account: string
    • limit: number

    Returns Promise<string[]>

  • Validate whether a public/private key satisfies an account's Layer 1 posting authority.

    This helper reads the account through condenser_api.get_accounts, follows delegated account authorities through their posting authorities, and returns an explanatory result without broadcasting or signing anything.

    Parameters

    Returns Promise<AccountAuthorityValidationResult>