@blockfrost/blockfrost-js
Advanced tools
Comparing version 0.5.3 to 0.6.0
@@ -8,2 +8,9 @@ # Changelog | ||
## [0.6.0] - 2021-06-22 | ||
### Added | ||
- `accountsMirs` and `txsMirs` endpoints = MIR support | ||
- `accountsWithdrawals` endpoint | ||
## [0.5.3] - 2021-06-22 | ||
@@ -10,0 +17,0 @@ |
@@ -6,4 +6,6 @@ import { components } from '../../types/OpenApi'; | ||
export declare function accountsHistory(this: BlockFrostAPI, stakeAddress: string, page?: number, count?: number, order?: "asc" | "desc"): Promise<components['schemas']['account_history_content']>; | ||
export declare function accountsWithdrawals(this: BlockFrostAPI, stakeAddress: string, page?: number, count?: number, order?: "asc" | "desc"): Promise<components['schemas']['account_withdrawal_content']>; | ||
export declare function accountsMirs(this: BlockFrostAPI, stakeAddress: string, page?: number, count?: number, order?: "asc" | "desc"): Promise<components['schemas']['account_mir_content']>; | ||
export declare function accountsDelegations(this: BlockFrostAPI, stakeAddress: string, page?: number, count?: number, order?: "asc" | "desc"): Promise<components['schemas']['account_delegation_content']>; | ||
export declare function accountsRegistrations(this: BlockFrostAPI, stakeAddress: string, page?: number, count?: number, order?: "asc" | "desc"): Promise<components['schemas']['account_registration_content']>; | ||
export declare function accountsAddresses(this: BlockFrostAPI, stakeAddress: string, page?: number, count?: number, order?: "asc" | "desc"): Promise<components['schemas']['account_addresses_content']>; |
@@ -6,3 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.accountsAddresses = exports.accountsRegistrations = exports.accountsDelegations = exports.accountsHistory = exports.accountsRewards = exports.accounts = void 0; | ||
exports.accountsAddresses = exports.accountsRegistrations = exports.accountsDelegations = exports.accountsMirs = exports.accountsWithdrawals = exports.accountsHistory = exports.accountsRewards = exports.accounts = void 0; | ||
const axios_1 = __importDefault(require("axios")); | ||
@@ -50,2 +50,28 @@ const utils_1 = require("../../utils"); | ||
exports.accountsHistory = accountsHistory; | ||
async function accountsWithdrawals(stakeAddress, page = config_1.DEFAULT_PAGINATION_PAGE_COUNT, count = config_1.DEFAULT_PAGINATION_PAGE_ITEMS_COUNT, order = config_1.DEFAULT_ORDER) { | ||
return new Promise((resolve, reject) => { | ||
axios_1.default | ||
.get(`${this.apiUrl}/accounts/${stakeAddress}/withdrawals?page=${page}&count=${count}&order=${order}`, { | ||
headers: utils_1.getHeaders(this), | ||
}) | ||
.then(resp => { | ||
resolve(resp.data); | ||
}) | ||
.catch(err => reject(utils_1.handleError(err))); | ||
}); | ||
} | ||
exports.accountsWithdrawals = accountsWithdrawals; | ||
async function accountsMirs(stakeAddress, page = config_1.DEFAULT_PAGINATION_PAGE_COUNT, count = config_1.DEFAULT_PAGINATION_PAGE_ITEMS_COUNT, order = config_1.DEFAULT_ORDER) { | ||
return new Promise((resolve, reject) => { | ||
axios_1.default | ||
.get(`${this.apiUrl}/accounts/${stakeAddress}/mirs?page=${page}&count=${count}&order=${order}`, { | ||
headers: utils_1.getHeaders(this), | ||
}) | ||
.then(resp => { | ||
resolve(resp.data); | ||
}) | ||
.catch(err => reject(utils_1.handleError(err))); | ||
}); | ||
} | ||
exports.accountsMirs = accountsMirs; | ||
async function accountsDelegations(stakeAddress, page = config_1.DEFAULT_PAGINATION_PAGE_COUNT, count = config_1.DEFAULT_PAGINATION_PAGE_ITEMS_COUNT, order = config_1.DEFAULT_ORDER) { | ||
@@ -52,0 +78,0 @@ return new Promise((resolve, reject) => { |
@@ -8,2 +8,3 @@ import { components } from '../../types/OpenApi'; | ||
export declare function txsWithdrawals(this: BlockFrostAPI, hash: string): Promise<components['schemas']['tx_content_withdrawals']>; | ||
export declare function txsMirs(this: BlockFrostAPI, hash: string): Promise<components['schemas']['tx_content_mirs']>; | ||
export declare function txsPoolUpdates(this: BlockFrostAPI, hash: string): Promise<components['schemas']['tx_content_pool_certs']>; | ||
@@ -10,0 +11,0 @@ export declare function txsPoolRetires(this: BlockFrostAPI, hash: string): Promise<components['schemas']['tx_content_pool_retires']>; |
@@ -6,3 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.txSubmit = exports.txsMetadataCbor = exports.txsMetadata = exports.txsPoolRetires = exports.txsPoolUpdates = exports.txsWithdrawals = exports.txsDelegations = exports.txsStakes = exports.txsUtxos = exports.txs = void 0; | ||
exports.txSubmit = exports.txsMetadataCbor = exports.txsMetadata = exports.txsPoolRetires = exports.txsPoolUpdates = exports.txsMirs = exports.txsWithdrawals = exports.txsDelegations = exports.txsStakes = exports.txsUtxos = exports.txs = void 0; | ||
const axios_1 = __importDefault(require("axios")); | ||
@@ -85,2 +85,17 @@ const utils_1 = require("../../utils"); | ||
exports.txsWithdrawals = txsWithdrawals; | ||
async function txsMirs(hash) { | ||
return new Promise((resolve, reject) => { | ||
axios_1.default | ||
.get(`${this.apiUrl}/txs/${hash}/mirs`, { | ||
headers: utils_1.getHeaders(this), | ||
}) | ||
.then(resp => { | ||
resolve(resp.data); | ||
}) | ||
.catch(err => { | ||
reject(utils_1.handleError(err)); | ||
}); | ||
}); | ||
} | ||
exports.txsMirs = txsMirs; | ||
async function txsPoolUpdates(hash) { | ||
@@ -87,0 +102,0 @@ return new Promise((resolve, reject) => { |
import { components } from './types/OpenApi'; | ||
import { accounts, accountsDelegations, accountsRegistrations, accountsRewards, accountsHistory, accountsAddresses } from './endpoints/accounts'; | ||
import { accounts, accountsDelegations, accountsRegistrations, accountsRewards, accountsHistory, accountsWithdrawals, accountsMirs, accountsAddresses } from './endpoints/accounts'; | ||
import { addresses, addressesTotal, addressesTxs, addressesTransactions, addressesTxsAll, addressesTransactionsAll, addressesUtxos, addressesUtxosAll } from './endpoints/addresses'; | ||
@@ -13,3 +13,3 @@ import { assets, assetsById, assetsHistory, assetsTxs, assetsTransactions, assetsAddresses, assetsPolicyById } from './endpoints/assets'; | ||
import { metrics, metricsEndpoints } from './endpoints/metrics'; | ||
import { txs, txsDelegations, txsMetadataCbor, txsPoolRetires, txsPoolUpdates, txsStakes, txsUtxos, txsWithdrawals, txsMetadata, txSubmit } from './endpoints/txs'; | ||
import { txs, txsDelegations, txsMetadataCbor, txsPoolRetires, txsPoolUpdates, txsStakes, txsUtxos, txsWithdrawals, txsMirs, txsMetadata, txSubmit } from './endpoints/txs'; | ||
import { Options } from './types'; | ||
@@ -62,2 +62,18 @@ declare class BlockFrostAPI { | ||
/** | ||
* accountsWithdrawals - Obtain information about the withdrawals of a specific account. | ||
* | ||
* @param stakeAddress - Bech32 stake address | ||
* @returns Information about the withdrawals of a specific account. | ||
* | ||
*/ | ||
accountsWithdrawals: typeof accountsWithdrawals; | ||
/** | ||
* accountsMirs - Obtain information about the MIRs of a specific account. | ||
* | ||
* @param stakeAddress - Bech32 stake address | ||
* @returns Information about the MIRs of a specific account. | ||
* | ||
*/ | ||
accountsMirs: typeof accountsMirs; | ||
/** | ||
* accountsAddresses - Obtain information about the addresses of a specific account. | ||
@@ -514,2 +530,10 @@ * | ||
/** | ||
* txsMirs | ||
* | ||
* @param hash | ||
* @returns xxx | ||
* | ||
*/ | ||
txsMirs: typeof txsMirs; | ||
/** | ||
* txsMetadata | ||
@@ -516,0 +540,0 @@ * |
@@ -72,2 +72,18 @@ "use strict"; | ||
/** | ||
* accountsWithdrawals - Obtain information about the withdrawals of a specific account. | ||
* | ||
* @param stakeAddress - Bech32 stake address | ||
* @returns Information about the withdrawals of a specific account. | ||
* | ||
*/ | ||
this.accountsWithdrawals = accounts_1.accountsWithdrawals; | ||
/** | ||
* accountsMirs - Obtain information about the MIRs of a specific account. | ||
* | ||
* @param stakeAddress - Bech32 stake address | ||
* @returns Information about the MIRs of a specific account. | ||
* | ||
*/ | ||
this.accountsMirs = accounts_1.accountsMirs; | ||
/** | ||
* accountsAddresses - Obtain information about the addresses of a specific account. | ||
@@ -524,2 +540,10 @@ * | ||
/** | ||
* txsMirs | ||
* | ||
* @param hash | ||
* @returns xxx | ||
* | ||
*/ | ||
this.txsMirs = txs_1.txsMirs; | ||
/** | ||
* txsMetadata | ||
@@ -526,0 +550,0 @@ * |
{ | ||
"name": "@blockfrost/blockfrost-js", | ||
"version": "0.5.3", | ||
"version": "0.6.0", | ||
"description": "A JavaScript/TypeScript SDK for interacting with the https://blockfrost.io API", | ||
@@ -5,0 +5,0 @@ "files": [ |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
212575
5467
0