@defichain/jellyfish-api-core
Advanced tools
Comparing version 0.1.0 to 0.2.0
import BigNumber from 'bignumber.js'; | ||
import { ApiClient } from '../.'; | ||
/** | ||
* Single account ID (CScript or address) or reserved words, | ||
* 'mine' to list history for all owned accounts or | ||
* 'all' to list the whole DB | ||
*/ | ||
* Single account ID (CScript or address) or reserved words, | ||
* - 'mine' to list history for all owned accounts or | ||
* - 'all' to list the whole DB | ||
*/ | ||
declare type OwnerType = 'mine' | 'all' | string; | ||
@@ -181,3 +181,3 @@ /** | ||
* @param {AccountHistoryOptions} [options] | ||
* @param {number} [options.maxBlockHeight] Optional height to iterate from (downto genesis block), (default = chaintip). | ||
* @param {number} [options.maxBlockHeight] Optional height to iterate from (down to genesis block), (default = chaintip). | ||
* @param {number} [options.depth] Maximum depth, from the genesis block is the default | ||
@@ -193,3 +193,3 @@ * @param {boolean} [options.no_rewards] Filter out rewards | ||
export interface AccountPagination { | ||
start?: string | number; | ||
start?: number; | ||
including_start?: boolean; | ||
@@ -196,0 +196,0 @@ limit?: number; |
@@ -43,3 +43,3 @@ "use strict"; | ||
* @param {AccountHistoryOptions} [options] | ||
* @param {number} [options.maxBlockHeight] Optional height to iterate from (downto genesis block), (default = chaintip). | ||
* @param {number} [options.maxBlockHeight] Optional height to iterate from (down to genesis block), (default = chaintip). | ||
* @param {number} [options.depth] Maximum depth, from the genesis block is the default | ||
@@ -46,0 +46,0 @@ * @param {boolean} [options.no_rewards] Filter out rewards |
@@ -19,4 +19,10 @@ import { ApiClient } from '../.'; | ||
* @return {Promise<MintingInfo>} | ||
* @deprecated Prefer using getMiningInfo. | ||
*/ | ||
getMintingInfo(): Promise<MintingInfo>; | ||
/** | ||
* Get mining-related information, replaces deprecated getMintingInfo | ||
* @return {Promise<MiningInfo>} | ||
*/ | ||
getMiningInfo(): Promise<MiningInfo>; | ||
} | ||
@@ -42,1 +48,27 @@ /** | ||
} | ||
/** | ||
* Minting related information | ||
*/ | ||
export interface MiningInfo { | ||
blocks: number; | ||
currentblockweight?: number; | ||
currentblocktx?: number; | ||
difficulty: string; | ||
isoperator: boolean; | ||
masternodes: MasternodeInfo[]; | ||
networkhashps: number; | ||
pooledtx: number; | ||
chain: 'main' | 'test' | 'regtest' | string; | ||
warnings: string; | ||
} | ||
/** | ||
* Masternode related information | ||
*/ | ||
export interface MasternodeInfo { | ||
masternodeid?: string; | ||
masternodeoperator?: string; | ||
masternodestate?: 'PRE_ENABLED' | 'ENABLED' | 'PRE_RESIGNED' | 'RESIGNED' | 'PRE_BANNED' | 'BANNED'; | ||
generate?: boolean; | ||
mintedblocks?: number; | ||
lastblockcreationattempt?: string; | ||
} |
@@ -35,2 +35,3 @@ "use strict"; | ||
* @return {Promise<MintingInfo>} | ||
* @deprecated Prefer using getMiningInfo. | ||
*/ | ||
@@ -42,3 +43,12 @@ getMintingInfo() { | ||
} | ||
/** | ||
* Get mining-related information, replaces deprecated getMintingInfo | ||
* @return {Promise<MiningInfo>} | ||
*/ | ||
getMiningInfo() { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield this.client.call('getmininginfo', [], 'number'); | ||
}); | ||
} | ||
} | ||
exports.Mining = Mining; |
{ | ||
"private": false, | ||
"name": "@defichain/jellyfish-api-core", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "A collection of TypeScript + JavaScript tools and libraries for DeFi Blockchain developers to build decentralized finance on Bitcoin", | ||
@@ -38,7 +38,7 @@ "keywords": [ | ||
"dependencies": { | ||
"@defichain/jellyfish-json": "^0.1.0" | ||
"@defichain/jellyfish-json": "^0.2.0" | ||
}, | ||
"devDependencies": { | ||
"@defichain/testcontainers": "^0.1.0" | ||
"@defichain/testcontainers": "^0.2.0" | ||
} | ||
} |
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
85888
2190
+ Added@defichain/jellyfish-json@0.2.0(transitive)
- Removed@defichain/jellyfish-json@0.1.0(transitive)