@cityofzion/dora-ts
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -1,2 +0,2 @@ | ||
import type { AssetResponse, BalanceResponse, BlockResponse, BlocksResponse, ContractResponse, ContractsResponse, GetAllNodesResponse, HeightResponse, LogResponse, TransactionResponse, TransactionsResponse, TransferHistoryResponse } from '../../interfaces/api/neo'; | ||
import type { AssetResponse, BalanceResponse, BlockResponse, BlocksResponse, ContractResponse, ContractsResponse, GetAllNodesResponse, HeightResponse, InvocationStatsResponse, LogResponse, TransactionResponse, TransactionsResponse, TransferHistoryResponse } from '../../interfaces/api/neo'; | ||
export declare class NeoRest { | ||
@@ -14,2 +14,3 @@ static axios: import("axios").AxiosInstance; | ||
static height(network?: string): Promise<HeightResponse>; | ||
static invocationStats(network?: string): Promise<InvocationStatsResponse>; | ||
static log(txid: string, network?: string): Promise<LogResponse>; | ||
@@ -16,0 +17,0 @@ static transaction(txid: string, network?: string): Promise<TransactionResponse>; |
@@ -186,2 +186,16 @@ "use strict"; | ||
}; | ||
NeoRest.invocationStats = function (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 = 'invocation_stats'; | ||
return [4, this.get(network, method)]; | ||
case 1: return [2, _a.sent()]; | ||
} | ||
}); | ||
}); | ||
}; | ||
NeoRest.log = function (txid, network) { | ||
@@ -188,0 +202,0 @@ if (network === void 0) { network = 'mainnet'; } |
import { Asset, Balance, Block, NodeMetaData, TypedResponse, Witness } from '../common'; | ||
import { Contract, Manifest, NEF, Token, Transaction } from './interface'; | ||
import { TransferAbstract } from '../neo_legacy'; | ||
import { ContractInvocationStats, TransferAbstract } from '../neo_legacy'; | ||
export declare type AssetResponse = Token; | ||
@@ -47,2 +47,3 @@ export interface AssetsResponse { | ||
} | ||
export declare type InvocationStatsResponse = ContractInvocationStats[]; | ||
export interface LogResponse { | ||
@@ -49,0 +50,0 @@ exception?: any; |
{ | ||
"name": "@cityofzion/dora-ts", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index", |
@@ -9,3 +9,3 @@ import type { | ||
GetAllNodesResponse, | ||
HeightResponse, | ||
HeightResponse, InvocationStatsResponse, | ||
LogResponse, | ||
@@ -92,2 +92,9 @@ TransactionResponse, | ||
static async invocationStats( | ||
network = 'mainnet' | ||
): Promise<InvocationStatsResponse> { | ||
const method = 'invocation_stats' | ||
return await this.get(network, method) | ||
} | ||
static async log(txid: string, network = 'mainnet'): Promise<LogResponse> { | ||
@@ -94,0 +101,0 @@ const method = 'log' |
@@ -10,3 +10,3 @@ import { | ||
import {Contract, Manifest, NEF, Token, Transaction} from './interface' | ||
import { TransferAbstract } from '../neo_legacy' | ||
import {ContractInvocationStats, TransferAbstract} from '../neo_legacy' | ||
@@ -65,2 +65,4 @@ export type AssetResponse = Token | ||
export type InvocationStatsResponse = ContractInvocationStats[] | ||
export interface LogResponse { | ||
@@ -67,0 +69,0 @@ exception?: any |
Sorry, the diff of this file is not supported yet
124719
2683