### Hierarchy

- DatabaseAPI

## Index

### Constructors

- constructor

### Properties

- client

### Methods

- call
- getAccountHistory
- getAccounts
- getBlock
- getBlockHeader
- getChainProperties
- getConfig
- getCurrentMedianHistoryPrice
- getDiscussions
- getDynamicGlobalProperties
- getOperations
- getState
- getTransaction
- getVersion
- getVestingDelegations
- verifyAuthority

## Constructors

### constructor

- new DatabaseAPI(client: Client): DatabaseAPI

- - Defined in helpers/database.ts:95

  #### Parameters

  - ##### client: Client

  #### Returns DatabaseAPI

## Properties

### client

client: Client

- Defined in helpers/database.ts:96

## Methods

### call

- call(method: string, params?: any[]): Promise<any>

- - Defined in helpers/database.ts:101

  Convenience for calling `database_api`.

  #### Parameters

  - ##### method: string

  - ##### Optional params: any[]

  #### Returns Promise<any>

### getAccountHistory

- getAccountHistory(account: string, from: number, limit: number): Promise<[[number, AppliedOperation]]>

- - Defined in helpers/database.ts:219

  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

  #### Returns Promise<[[number, AppliedOperation]]>

### getAccounts

- getAccounts(usernames: string[]): Promise<ExtendedAccount[]>

- - Defined in helpers/database.ts:199

  Return array of account info objects for the usernames passed.

  #### Parameters

  - ##### usernames: string[]

    The accounts to fetch.

  #### Returns Promise<ExtendedAccount[]>

### getBlock

- getBlock(blockNum: number): Promise<SignedBlock>

- - Defined in helpers/database.ts:167

  Return block blockNum.

  #### Parameters

  - ##### blockNum: number

  #### Returns Promise<SignedBlock>

### getBlockHeader

- getBlockHeader(blockNum: number): Promise<BlockHeader>

- - Defined in helpers/database.ts:160

  Return header for blockNum.

  #### Parameters

  - ##### blockNum: number

  #### Returns Promise<BlockHeader>

### getChainProperties

- getChainProperties(): Promise<ChainProperties>

- - Defined in helpers/database.ts:115

  Return median chain properties decided by witness.

  #### Returns Promise<ChainProperties>

### getConfig

- getConfig(): Promise<{}>

- - Defined in helpers/database.ts:153

  Return server config. See: https://github.com/steemit/steem/blob/master/libraries/protocol/include/steemit/protocol/config.hpp

  #### Returns Promise<{}>

### getCurrentMedianHistoryPrice

- getCurrentMedianHistoryPrice(): Promise<Price>

- - Defined in helpers/database.ts:131

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

  #### Returns Promise<Price>

### getDiscussions

- getDiscussions(by: DiscussionQueryCategory, query: DisqussionQuery): Promise<Discussion[]>

- - Defined in helpers/database.ts:188

  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

- getDynamicGlobalProperties(): Promise<DynamicGlobalProperties>

- - Defined in helpers/database.ts:108

  Return state of server.

  #### Returns Promise<DynamicGlobalProperties>

### getOperations

- getOperations(blockNum: number, onlyVirtual?: boolean): Promise<AppliedOperation[]>

- - Defined in helpers/database.ts:174

  Return all applied operations in blockNum.

  #### Parameters

  - ##### blockNum: number

  - ##### Default value onlyVirtual: boolean = false

  #### Returns Promise<AppliedOperation[]>

### getState

- getState(path: string): Promise<any>

- - Defined in helpers/database.ts:124

  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>

### getTransaction

- getTransaction(txId: string): Promise<SignedTransaction>

- - Defined in helpers/database.ts:206

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

  #### Parameters

  - ##### txId: string

  #### Returns Promise<SignedTransaction>

### getVersion

- getVersion(): Promise<object>

- - Defined in helpers/database.ts:231

  return rpc node version

  #### Returns Promise<object>

### getVestingDelegations

- getVestingDelegations(account: string, from?: string, limit?: number): Promise<VestingDelegation[]>

- - Defined in helpers/database.ts:141

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

### verifyAuthority

- verifyAuthority(stx: SignedTransaction): Promise<boolean>

- - Defined in helpers/database.ts:226

  Verify signed transaction.

  #### Parameters

  - ##### stx: SignedTransaction

  #### Returns Promise<boolean>

Generated using TypeDoc