@cityofzion/dora-ts
Advanced tools
Comparing version 0.0.11 to 0.0.12
@@ -1,2 +0,2 @@ | ||
import type { AddressTransactionsResponse, AddressTXFullResponse, AssetResponse, BalanceResponse, BlockResponse, BlocksResponse, ContractResponse, ContractsResponse, GetAddressAbstractsResponse, GetAllNodesResponse, HeightResponse, InvocationStatsResponse, LogResponse, TransactionResponse, TransactionsResponse, TransferHistoryResponse, VoterResponse } from '../../interfaces/api/neo'; | ||
import type { AddressTransactionsResponse, AddressTXFullResponse, AssetResponse, BalanceResponse, BlockResponse, BlocksResponse, ContractResponse, ContractsResponse, GetAllNodesResponse, HeightResponse, InvocationStatsResponse, LogResponse, TransactionResponse, TransactionsResponse, TransferHistoryResponse, VoterResponse } from '../../interfaces/api/neo'; | ||
import type { RestConfig } from "../../interfaces"; | ||
@@ -18,3 +18,2 @@ import type { AxiosInstance, AxiosRequestConfig } from 'axios'; | ||
contractStats(contractHash: string, network?: string): Promise<Object>; | ||
getAddressAbstracts(address: string, page?: number, network?: string): Promise<GetAddressAbstractsResponse>; | ||
getAllNodes(network?: string): Promise<GetAllNodesResponse>; | ||
@@ -21,0 +20,0 @@ height(network?: string): Promise<HeightResponse>; |
@@ -218,17 +218,2 @@ "use strict"; | ||
}; | ||
NeoRESTApi.prototype.getAddressAbstracts = function (address, page, network) { | ||
if (page === void 0) { page = 1; } | ||
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 = 'get_address_abstracts'; | ||
return [4, this.get(network, method, address, page)]; | ||
case 1: return [2, _a.sent()]; | ||
} | ||
}); | ||
}); | ||
}; | ||
NeoRESTApi.prototype.getAllNodes = function (network) { | ||
@@ -235,0 +220,0 @@ if (network === void 0) { network = 'mainnet'; } |
@@ -55,3 +55,3 @@ export interface AddressAbstractEntry { | ||
type: string; | ||
value: any; | ||
value?: string; | ||
} | ||
@@ -58,0 +58,0 @@ export interface Witness { |
@@ -34,4 +34,10 @@ import { TypedResponse, Witness } from '../common'; | ||
} | ||
export declare enum InvocationType { | ||
NEP17_TRANSFER = "nep17_transfer", | ||
NEP11_TRANSFER = "nep11_transfer", | ||
CONTRACT_INVOCATION = "contract_invocation", | ||
VOTE = "vote" | ||
} | ||
export interface InvocationDetails { | ||
type: string; | ||
type: InvocationType; | ||
metadata: InvocationDetailNEP17Transfer | InvocationDetailNEP11Transfer | InvocationDetailContractInvocation | InvocationDetailVote; | ||
@@ -103,3 +109,3 @@ } | ||
event_name: string; | ||
state: TypedResponse; | ||
state: TypedResponse[]; | ||
} | ||
@@ -106,0 +112,0 @@ export interface Parameter { |
"use strict"; | ||
exports.__esModule = true; | ||
exports.InvocationType = void 0; | ||
var InvocationType; | ||
(function (InvocationType) { | ||
InvocationType["NEP17_TRANSFER"] = "nep17_transfer"; | ||
InvocationType["NEP11_TRANSFER"] = "nep11_transfer"; | ||
InvocationType["CONTRACT_INVOCATION"] = "contract_invocation"; | ||
InvocationType["VOTE"] = "vote"; | ||
})(InvocationType = exports.InvocationType || (exports.InvocationType = {})); | ||
//# sourceMappingURL=interface.js.map |
@@ -1,2 +0,2 @@ | ||
import { AddressAbstractEntry, Asset, ContractInvocationStats, Balance, Block, NodeMetaData, TransferAbstract, TypedResponse, Witness } from '../common'; | ||
import { Asset, ContractInvocationStats, Balance, Block, NodeMetaData, TransferAbstract, TypedResponse, Witness } from '../common'; | ||
import { Contract, Manifest, NEF, Token, Transaction, TransactionEnhanced } from './interface'; | ||
@@ -62,9 +62,2 @@ export interface AddressTransactionsResponse { | ||
} | ||
export interface GetAddressAbstractsResponse { | ||
total_pages: number; | ||
total_entries: number; | ||
page_size: number; | ||
page_number: number; | ||
entries: AddressAbstractEntry[]; | ||
} | ||
export declare type GetAllNodesResponse = NodeMetaData[]; | ||
@@ -71,0 +64,0 @@ export interface HeightResponse { |
{ | ||
"name": "@cityofzion/dora-ts", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index", |
@@ -10,3 +10,2 @@ import type { | ||
ContractsResponse, | ||
GetAddressAbstractsResponse, | ||
GetAllNodesResponse, | ||
@@ -126,11 +125,2 @@ HeightResponse, | ||
async getAddressAbstracts( | ||
address: string, | ||
page = 1, | ||
network = 'mainnet' | ||
): Promise<GetAddressAbstractsResponse> { | ||
const method = 'get_address_abstracts' | ||
return await this.get(network, method, address, page) | ||
} | ||
async getAllNodes(network = 'mainnet'): Promise<GetAllNodesResponse> { | ||
@@ -137,0 +127,0 @@ const method = 'get_all_nodes' |
@@ -62,3 +62,3 @@ export interface AddressAbstractEntry { | ||
type: string | ||
value: any | ||
value?: string | ||
} | ||
@@ -65,0 +65,0 @@ |
@@ -39,4 +39,11 @@ import { TypedResponse, Witness } from '../common' | ||
export enum InvocationType { | ||
NEP17_TRANSFER = 'nep17_transfer', | ||
NEP11_TRANSFER = 'nep11_transfer', | ||
CONTRACT_INVOCATION = 'contract_invocation', | ||
VOTE = 'vote' | ||
} | ||
export interface InvocationDetails { | ||
type: string | ||
type: InvocationType | ||
metadata: | ||
@@ -120,3 +127,3 @@ | InvocationDetailNEP17Transfer | ||
event_name: string | ||
state: TypedResponse | ||
state: TypedResponse[] | ||
} | ||
@@ -123,0 +130,0 @@ |
import { | ||
AddressAbstractEntry, | ||
Asset, | ||
@@ -90,10 +89,2 @@ ContractInvocationStats, | ||
export interface GetAddressAbstractsResponse { | ||
total_pages: number | ||
total_entries: number | ||
page_size: number | ||
page_number: number | ||
entries: AddressAbstractEntry[] | ||
} | ||
export type GetAllNodesResponse = NodeMetaData[] | ||
@@ -100,0 +91,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
139771
3083