Class DatabaseAPI

Hierarchy

  • DatabaseAPI

Constructors

Properties

client: Client

Methods

  • Convenience for calling database_api.

    Type Parameters

    Type Parameters

    • T

    Parameters

    • method: string
    • Optional params: any[]

    Returns Promise<T>

  • Returns one or more account history objects for account operations

    Example

    const op = dhive.utils.operationOrders
    const operationsBitmask = dhive.utils.makeBitMaskFilter([
    op.transfer,
    op.transfer_to_vesting,
    op.withdraw_vesting,
    op.interest,
    op.liquidity_reward,
    op.transfer_to_savings,
    op.transfer_from_savings,
    op.escrow_transfer,
    op.cancel_transfer_from_savings,
    op.escrow_approve,
    op.escrow_dispute,
    op.escrow_release,
    op.fill_convert_request,
    op.fill_order,
    op.claim_reward_balance,
    ])

    Parameters

    • account: string

      The account to fetch

    • from: number

      The starting index

    • limit: number

      The maximum number of results to return

    • Optional operation_bitmask: [number, number]

    Returns Promise<[[number, AppliedOperation]]>

  • Return array of account info objects for the usernames passed.

    Parameters

    • usernames: string[]

      The accounts to fetch.

    Returns Promise<ExtendedAccount[]>

  • Return block blockNum.

    Parameters

    • blockNum: number

    Returns Promise<SignedBlock>

  • Return header for blockNum.

    Parameters

    • blockNum: number

    Returns Promise<BlockHeader>

  • Return median chain properties decided by witness.

    Returns Promise<ChainProperties>

  • Return median price in HBD for 1 HIVE as reported by the witnesses.

    Returns Promise<Price>

  • Return all applied operations in blockNum.

    Parameters

    • blockNum: number
    • onlyVirtual: boolean = false

    Returns Promise<AppliedOperation[]>

  • 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. @almost-digital or trending/travel

    Returns Promise<any>

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

    Parameters

    • txId: string

    Returns Promise<SignedTransaction>

  • return rpc node version

    Returns Promise<object>

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

  • Verify signed transaction.

    Parameters

    Returns Promise<boolean>

Generated using TypeDoc