### Hierarchy

- DatabaseAPI

## Index

### Constructors

- constructor

### Properties

- client

### Methods

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

## Constructors

### constructor

- new DatabaseAPI(client: Client): DatabaseAPI

- - Defined in helpers/database.ts:82

  #### Parameters

  - ##### client: Client

  #### Returns DatabaseAPI

## Properties

### client

client: Client

- Defined in helpers/database.ts:84

## Methods

### call

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

- - Defined in helpers/database.ts:89

  Convenience for calling `database_api`.

  #### Parameters

  - ##### method: string

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

  #### Returns Promise<any>

### getAccounts

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

- - Defined in helpers/database.ts:179

  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:153

  Return block blockNum.

  #### Parameters

  - ##### blockNum: number

  #### Returns Promise<SignedBlock>

### getBlockHeader

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

- - Defined in helpers/database.ts:146

  Return header for blockNum.

  #### Parameters

  - ##### blockNum: number

  #### Returns Promise<BlockHeader>

### getChainProperties

- getChainProperties(): Promise<ChainProperties>

- - Defined in helpers/database.ts:103

  Return median chain properties decided by witness.

  #### Returns Promise<ChainProperties>

### getConfig

- getConfig(): Promise<object>

- - Defined in helpers/database.ts:139

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

  #### Returns Promise<object>

### getCurrentMedianHistoryPrice

- getCurrentMedianHistoryPrice(): Promise<Price>

- - Defined in helpers/database.ts:119

  Return median price in SBD for 1 STEEM as reported by the witnesses.

  #### Returns Promise<Price>

### getDiscussions

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

- - Defined in helpers/database.ts:171

  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:96

  Return state of server.

  #### Returns Promise<DynamicGlobalProperties>

### getOperations

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

- - Defined in helpers/database.ts:160

  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:112

  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(txc: TransactionConfirmation | object): Promise<SignedTransaction>

- - Defined in helpers/database.ts:186

  Convenience to fetch a block and return a specific transaction.

  #### Parameters

  - ##### txc: TransactionConfirmation | object

  #### Returns Promise<SignedTransaction>

### getVestingDelegations

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

- - Defined in helpers/database.ts:129

  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:198

  Verify signed transaction.

  #### Parameters

  - ##### stx: SignedTransaction

  #### Returns Promise<boolean>

Generated using TypeDoc