@cityofzion/dora-ts
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -12,2 +12,3 @@ import type { AddressStatsResponse, AssetResponse, AssetsResponse, BalanceResponse, BlockResponse, BlocksResponse, ContractResponse, ContractsResponse, ContractTransfersResponse, GetAddressAbstractsResponse, GetAllNodesResponse, GetClaimableResponse, GetUnclaimedResponse, HeightResponse, InvocationStatsResponse, LogResponse, StorageResponse, TransactionAbstractsResponse, TransactionResponse, TransactionsResponse, TransferHistoryResponse } from '../../interfaces/api/neo_legacy'; | ||
static contracts(page: number, network?: string): Promise<ContractsResponse>; | ||
static contractStats(contractHash: string, network?: string): Promise<Object>; | ||
static contractTransfers(contractHash: string, page?: number, network?: string): Promise<ContractTransfersResponse>; | ||
@@ -14,0 +15,0 @@ static getAddressAbstracts(address: string, page?: number, network?: string): Promise<GetAddressAbstractsResponse>; |
@@ -158,2 +158,16 @@ "use strict"; | ||
}; | ||
NeoLegacyREST.contractStats = function (contractHash, network) { | ||
if (network === void 0) { network = 'mainnet'; } | ||
return __awaiter(this, void 0, void 0, function () { | ||
var method; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
method = "contract_stats"; | ||
return [4, this.get(network, method)]; | ||
case 1: return [2, _a.sent()]; | ||
} | ||
}); | ||
}); | ||
}; | ||
NeoLegacyREST.contractTransfers = function (contractHash, page, network) { | ||
@@ -160,0 +174,0 @@ if (page === void 0) { page = 1; } |
{ | ||
"name": "@cityofzion/dora-ts", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index", |
@@ -91,2 +91,9 @@ import type { | ||
static async contractStats( | ||
contractHash: string, | ||
network = 'mainnet'): Promise<Object> { | ||
const method = "contract_stats" | ||
return await this.get(network, method) | ||
} | ||
static async contractTransfers( | ||
@@ -93,0 +100,0 @@ contractHash: string, |
Sorry, the diff of this file is not supported yet
123350
2651