Socket
Socket
Sign inDemoInstall

@zondax/beryx

Package Overview
Dependencies
Maintainers
3
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zondax/beryx - npm Package Compare versions

Comparing version 0.8.2 to 0.8.3

dist/filecoin/api/types/common.d.ts

8

dist/filecoin/api/index.d.ts
import { AxiosInstance, AxiosRequestConfig } from 'axios';
import { ClientConfig } from '../common/types';
import { AccountBalance, AccountInfo, AccountVesting, Deals, FilecoinDataITF, FilecoinITF, FilecoinToolsITF, Tipset, Transactions } from './types';
import { FilecoinDataITF, FilecoinITF, FilecoinToolsITF } from './types/filecoin';
import AccountBalance from './types/responses/accountBalance';
import AccountInfo from './types/responses/accountInfo';
import AccountVesting from './types/responses/accountVesting';
import Deals from './types/responses/deals';
import Tipset from './types/responses/tipset';
import Transactions from './types/responses/transactions';
export declare class Filecoin implements FilecoinITF {

@@ -5,0 +11,0 @@ protected config: ClientConfig;

28

dist/filecoin/api/index.js

@@ -19,2 +19,8 @@ "use strict";

const types_1 = require("../common/types");
const accountBalance_validator_1 = __importDefault(require("./types/responses/accountBalance.validator"));
const accountInfo_validator_1 = __importDefault(require("./types/responses/accountInfo.validator"));
const accountVesting_validator_1 = __importDefault(require("./types/responses/accountVesting.validator"));
const deals_validator_1 = __importDefault(require("./types/responses/deals.validator"));
const tipset_validator_1 = __importDefault(require("./types/responses/tipset.validator"));
const transactions_validator_1 = __importDefault(require("./types/responses/transactions.validator"));
class Filecoin {

@@ -100,3 +106,3 @@ constructor(config) {

response = yield this.client.get(`${this.servicePath}/tipset/latest`);
return response.data;
return (0, tipset_validator_1.default)(response.data);
});

@@ -110,34 +116,34 @@ this.getTransactions = (heightOrHash) => __awaiter(this, void 0, void 0, function* () {

const response = yield this.client.get(`${this.servicePath}/transactions/height/${heightOrHash}`);
return response.data;
return (0, transactions_validator_1.default)(response.data);
}
const response = yield this.client.get(`${this.servicePath}/transactions/hash/${heightOrHash}`);
return response.data;
return (0, transactions_validator_1.default)(response.data);
});
this.getAccountBalance = (address) => __awaiter(this, void 0, void 0, function* () {
const response = yield this.client.get(`${this.servicePath}/account/balance/${address}`);
return response.data;
return (0, accountBalance_validator_1.default)(response.data);
});
this.getAccountVesting = (address) => __awaiter(this, void 0, void 0, function* () {
const response = yield this.client.get(`${this.servicePath}/account/vesting/${address}`);
return response.data;
return (0, accountVesting_validator_1.default)(response.data);
});
this.getAccountTransactions = (address) => __awaiter(this, void 0, void 0, function* () {
const response = yield this.client.get(`${this.servicePath}/transactions/address/${address}`);
return response.data;
return (0, transactions_validator_1.default)(response.data);
});
this.getAccountInfo = (address) => __awaiter(this, void 0, void 0, function* () {
const response = yield this.client.get(`${this.servicePath}/account/info/${address}`);
return response.data;
return (0, accountInfo_validator_1.default)(response.data);
});
this.getDealsByCid = (cid) => __awaiter(this, void 0, void 0, function* () {
const response = yield this.client.get(`${this.servicePath}/deals/cid/${cid}`);
return response.data;
return (0, deals_validator_1.default)(response.data);
});
this.getDealsByClient = (client) => __awaiter(this, void 0, void 0, function* () {
const response = yield this.client.get(`${this.servicePath}/deals/client/${client}`);
return response.data;
return (0, deals_validator_1.default)(response.data);
});
this.getDealsByProvider = (provider) => __awaiter(this, void 0, void 0, function* () {
const response = yield this.client.get(`${this.servicePath}/deals/provider/${provider}`);
return response.data;
return (0, deals_validator_1.default)(response.data);
});

@@ -150,5 +156,5 @@ this.getDealsByHeight = (height) => __awaiter(this, void 0, void 0, function* () {

const response = yield this.client.get(`${this.servicePath}/deals/height/${height}`);
return response.data;
return (0, deals_validator_1.default)(response.data);
});
}
}
{
"name": "@zondax/beryx",
"version": "0.8.2",
"version": "0.8.3",
"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.",

@@ -8,9 +8,16 @@ "main": "dist/index.js",

"scripts": {
"build": "tsc",
"lint": "eslint .",
"lint:fix": "eslint --fix . ",
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"",
"test": "jest",
"test:watch": "jest --watch",
"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:jest && yarn test:package",
"test:jest": "jest",
"test:package": "yarn build && yalc publish && cd tests/package && yalc add @zondax/beryx@0.0.0 && yarn install && ts-node index.ts",
"build": "tsc",
"prebuild": "yarn remove @types/jest && yarn prebuild:transactions && yarn prebuild:accountBalance && yarn prebuild:deals && yarn prebuild:tipset && yarn prebuild:accountInfo && yarn prebuild:accountVesting && yarn add --dev @types/jest",
"prebuild:transactions": "npx typescript-json-validator ./src/filecoin/api/types/responses/transactions.ts Transactions",
"prebuild:accountBalance": "npx typescript-json-validator ./src/filecoin/api/types/responses/accountBalance.ts AccountBalance",
"prebuild:deals": "npx typescript-json-validator ./src/filecoin/api/types/responses/deals.ts Deals",
"prebuild:tipset": "npx typescript-json-validator ./src/filecoin/api/types/responses/tipset.ts Tipset",
"prebuild:accountInfo": "npx typescript-json-validator ./src/filecoin/api/types/responses/accountInfo.ts AccountInfo",
"prebuild:accountVesting": "npx typescript-json-validator ./src/filecoin/api/types/responses/accountVesting.ts AccountVesting"
},

@@ -39,3 +46,3 @@ "repository": {

"@trivago/prettier-plugin-sort-imports": "^4.0.0",
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.0",
"@typescript-eslint/eslint-plugin": "^5.38.0",

@@ -50,2 +57,3 @@ "@typescript-eslint/parser": "^5.38.0",

"typescript": "^4.8.3",
"typescript-json-validator": "^2.4.2",
"yalc": "^1.0.0-pre.53"

@@ -52,0 +60,0 @@ },

@@ -5,3 +5,3 @@ # Beryx Client

[![npm version](https://badge.fury.io/js/%40zondax%2Fberyx.svg)](https://badge.fury.io/js/%40zondax%2Fberyx)
[![GithubActions](https://github.com/Zondax/beryx-client-ts/actions/workflows/main.yaml/badge.svg)](https://github.com/Zondax/beryx-client-ts/blob/main/.github/workflows/main.yaml)
[![GithubActions](https://github.com/Zondax/beryx-client-ts/actions/workflows/main.yaml/badge.svg)](https://github.com/Zondax/beryx-client-ts/blob/master/.github/workflows/main.yaml)

@@ -8,0 +8,0 @@ ## Abstract

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc