UNPKG

sth-ts

Version:

An SmartHoldem API wrapper, written in TypeScript to interact with SmartHoldem blockchain.

25 lines (24 loc) 898 B
import { Observable } from 'rxjs/Observable'; import * as model from '../model/Account'; import Http from '../services/Http'; /** Account related API calls. */ export default class AccountApi { private http; constructor(http: Http); /** * Returns account information of an address. */ get(params: model.AccountQueryParams): Observable<model.AccountResponse>; /** * Get the balance of an account. */ balance(params: model.AccountQueryParams): Observable<model.AccountBalanceResponse>; /** * Get the public key of an account. If the account does not exist the API call will return an error. */ publicKey(params: model.AccountQueryParams): Observable<model.AccountResponse>; /** * Get votes by account address. */ votes(params: model.AccountQueryParams): Observable<model.AccountVotesResponse>; }