@zondax/beryx
Advanced tools
Comparing version 0.2.0 to 0.3.0
import { AxiosInstance, AxiosRequestConfig } from "axios"; | ||
import { ClientConfig } from "../common/types"; | ||
import { AccountBalance, AccountInfo, FilecoinApiITF, Tipset, Transactions, VersionAPI } from "./types"; | ||
import { AccountBalance, AccountInfo, AccountVesting, FilecoinApiITF, Tipset, Transactions, VersionAPI } from "./types"; | ||
export declare class FilecoinAPI implements FilecoinApiITF { | ||
@@ -14,4 +14,5 @@ protected config: ClientConfig; | ||
getAccountBalance: (address: string) => Promise<AccountBalance>; | ||
getAccountVesting: (address: string) => Promise<AccountVesting>; | ||
getAccountTransactions: (address: string) => Promise<Transactions>; | ||
getAccountInfo: (address: string) => Promise<AccountInfo>; | ||
} |
@@ -48,2 +48,6 @@ "use strict"; | ||
}); | ||
this.getAccountVesting = (address) => __awaiter(this, void 0, void 0, function* () { | ||
const response = yield this.client.get(`${this.servicePath}/account/vesting/${address}`); | ||
return response.data; | ||
}); | ||
this.getAccountTransactions = (address) => __awaiter(this, void 0, void 0, function* () { | ||
@@ -50,0 +54,0 @@ const response = yield this.client.get(`${this.servicePath}/transactions/address/${address}`); |
@@ -6,2 +6,3 @@ export interface FilecoinApiITF { | ||
getAccountBalance: (address: string) => Promise<AccountBalance>; | ||
getAccountVesting: (address: string) => Promise<AccountVesting>; | ||
getAccountInfo: (address: string) => Promise<AccountInfo>; | ||
@@ -46,2 +47,9 @@ } | ||
}; | ||
export declare type AccountVesting = { | ||
address: string; | ||
initial_balance: number; | ||
start_epoch: number; | ||
unlock_duration: number; | ||
unlock_height: number; | ||
}; | ||
export declare type AccountInfo = { | ||
@@ -48,0 +56,0 @@ actor_type: string; |
{ | ||
"name": "@zondax/beryx", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "Beryx indexes and exposes via a public API Filecoin historical and real-time data. We provide historical transactions of every account, interactions with multisig accounts, fees details and many more.", | ||
@@ -10,3 +10,5 @@ "main": "dist/index.js", | ||
"lint": "eslint .", | ||
"test": "jest" | ||
"test:code": "jest", | ||
"test:package": "yarn build && yalc publish && cd tests/package && yalc add @zondax/beryx@0.0.0 && yarn install && ts-node index.ts", | ||
"test": "yarn test:code && yarn test:package" | ||
}, | ||
@@ -13,0 +15,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22386
190