New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@cityofzion/dora-ts

Package Overview
Dependencies
Maintainers
6
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cityofzion/dora-ts - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

dist/api/neo_legacy/index.d.ts

2

dist/api/index.js

@@ -16,5 +16,5 @@ "use strict";

};
Object.defineProperty(exports, "__esModule", { value: true });
exports.__esModule = true;
__exportStar(require("./neoN3"), exports);
__exportStar(require("./neoLegacy"), exports);
//# sourceMappingURL=index.js.map

@@ -16,4 +16,4 @@ "use strict";

};
Object.defineProperty(exports, "__esModule", { value: true });
exports.__esModule = true;
__exportStar(require("./rest"), exports);
//# sourceMappingURL=index.js.map

@@ -17,3 +17,3 @@ "use strict";

if (f) throw new TypeError("Generator is already executing.");
while (g && (g = 0, op[0] && (_ = 0)), _) try {
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;

@@ -42,3 +42,3 @@ if (y = 0, t) op = [op[0] & 2, t.value];

};
Object.defineProperty(exports, "__esModule", { value: true });
exports.__esModule = true;
exports.NeoLegacyREST = exports.NeoLegacyRESTApi = void 0;

@@ -60,3 +60,3 @@ var constants_1 = require("../../constants");

}
this.axios = axios_1.default.create(axiosConfig);
this.axios = axios_1["default"].create(axiosConfig);
}

@@ -63,0 +63,0 @@ NeoLegacyRESTApi.prototype.addressStats = function (address, network) {

@@ -16,4 +16,4 @@ "use strict";

};
Object.defineProperty(exports, "__esModule", { value: true });
exports.__esModule = true;
__exportStar(require("./rest"), exports);
//# sourceMappingURL=index.js.map

@@ -22,3 +22,3 @@ import type { AddressTransactionsResponse, AddressTXFullResponse, AssetResponse, AssetsResponse, BalanceResponse, BlockResponse, BlocksResponse, ContractResponse, ContractsResponse, ContractStatsResponse, GetAllNodesResponse, HeightResponse, InvocationStatsResponse, LogResponse, TokenProvenanceResponse, TransactionResponse, TransactionsResponse, TransferHistoryResponse, VoterResponse } from '../../interfaces/api/neo';

log(txid: string, network?: string): Promise<LogResponse>;
tokenProvenance(contract: string, tokenId: string, network?: string): Promise<TokenProvenanceResponse>;
tokenProvenance(contract: string, tokenId: number, network?: string): Promise<TokenProvenanceResponse>;
transaction(txid: string, network?: string): Promise<TransactionResponse>;

@@ -25,0 +25,0 @@ transactions(page?: number, network?: string): Promise<TransactionsResponse>;

@@ -17,3 +17,3 @@ "use strict";

if (f) throw new TypeError("Generator is already executing.");
while (g && (g = 0, op[0] && (_ = 0)), _) try {
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;

@@ -42,3 +42,3 @@ if (y = 0, t) op = [op[0] & 2, t.value];

};
Object.defineProperty(exports, "__esModule", { value: true });
exports.__esModule = true;
exports.NeoN3REST = exports.NeoRESTApi = void 0;

@@ -60,3 +60,3 @@ var constants_1 = require("../../constants");

}
this.axios = axios_1.default.create(axiosConfig);
this.axios = axios_1["default"].create(axiosConfig);
}

@@ -63,0 +63,0 @@ NeoRESTApi.prototype.addressTransactions = function (address, page, network) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.__esModule = true;
exports.DORA_URL = void 0;
exports.DORA_URL = 'https://dora.coz.io';
//# sourceMappingURL=index.js.map

@@ -25,3 +25,3 @@ "use strict";

};
Object.defineProperty(exports, "__esModule", { value: true });
exports.__esModule = true;
exports.interfaces = exports.api = void 0;

@@ -28,0 +28,0 @@ exports.api = __importStar(require("./api"));

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.__esModule = true;
//# sourceMappingURL=index.js.map

@@ -25,3 +25,3 @@ "use strict";

};
Object.defineProperty(exports, "__esModule", { value: true });
exports.__esModule = true;
exports.NeoN3 = exports.NeoLegacy = void 0;

@@ -28,0 +28,0 @@ exports.NeoLegacy = __importStar(require("./neo_legacy"));

@@ -16,5 +16,5 @@ "use strict";

};
Object.defineProperty(exports, "__esModule", { value: true });
exports.__esModule = true;
__exportStar(require("./interface"), exports);
__exportStar(require("./responses"), exports);
//# sourceMappingURL=index.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.__esModule = true;
//# sourceMappingURL=interface.js.map
import { ApplicationLog, Asset, ClaimableEvent, ContractMetaData, ContractState, ContractStorage, ContractTransfer, InputOutput, TimedBalance, Transaction } from './interface';
import { AddressAbstractEntry, Balance, Block, ContractInvocationStats, NodeMetaData, TransferAbstract, Witness } from '../common';
export type AddressStatsResponse = {
export declare type AddressStatsResponse = {
asset: string;

@@ -21,3 +21,3 @@ balances: TimedBalance[];

}
export type BalanceResponse = Balance[];
export declare type BalanceResponse = Balance[];
export interface BlockResponse {

@@ -40,3 +40,3 @@ hash: string;

}
export type ContractResponse = ContractState;
export declare type ContractResponse = ContractState;
export interface ContractsResponse {

@@ -56,3 +56,3 @@ items: ContractMetaData[];

}
export type GetAllNodesResponse = NodeMetaData[];
export declare type GetAllNodesResponse = NodeMetaData[];
export interface GetClaimableResponse {

@@ -71,3 +71,3 @@ claimable: ClaimableEvent[];

}
export type InvocationStatsResponse = ContractInvocationStats[];
export declare type InvocationStatsResponse = ContractInvocationStats[];
export interface LogResponse {

@@ -81,3 +81,3 @@ Item: ApplicationLog;

}
export type TransactionResponse = Transaction;
export declare type TransactionResponse = Transaction;
export interface TransactionsResponse {

@@ -84,0 +84,0 @@ transactions: Transaction[];

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.__esModule = true;
//# sourceMappingURL=responses.js.map

@@ -16,4 +16,4 @@ "use strict";

};
Object.defineProperty(exports, "__esModule", { value: true });
exports.__esModule = true;
__exportStar(require("./responses"), exports);
//# sourceMappingURL=index.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.__esModule = true;
exports.InvocationType = void 0;

@@ -10,3 +10,3 @@ var InvocationType;

InvocationType["VOTE"] = "vote";
})(InvocationType || (exports.InvocationType = InvocationType = {}));
})(InvocationType = exports.InvocationType || (exports.InvocationType = {}));
//# sourceMappingURL=interface.js.map

@@ -7,4 +7,4 @@ import { Asset, ContractInvocationStats, Balance, Block, NodeMetaData, TransferAbstract, TypedResponse, Witness } from '../common';

}
export type AddressTXFullResponse = AddressTransactionsResponse;
export type AssetResponse = Token;
export declare type AddressTXFullResponse = AddressTransactionsResponse;
export declare type AssetResponse = Token;
export interface AssetsResponse {

@@ -14,3 +14,3 @@ items: Asset[];

}
export type BalanceResponse = Balance[];
export declare type BalanceResponse = Balance[];
export interface BlockResponse {

@@ -64,7 +64,7 @@ hash: string;

}
export type GetAllNodesResponse = NodeMetaData[];
export declare type GetAllNodesResponse = NodeMetaData[];
export interface HeightResponse {
height: number;
}
export type InvocationStatsResponse = ContractInvocationStats[];
export declare type InvocationStatsResponse = ContractInvocationStats[];
export interface LogResponse {

@@ -80,4 +80,4 @@ exception?: unknown;

}
export type TokenProvenanceResponse = Provenance[];
export type TransactionResponse = Transaction;
export declare type TokenProvenanceResponse = Provenance[];
export declare type TransactionResponse = Transaction;
export interface TransactionsResponse {

@@ -84,0 +84,0 @@ items: Transaction[];

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.__esModule = true;
//# sourceMappingURL=responses.js.map

@@ -28,3 +28,3 @@ "use strict";

};
Object.defineProperty(exports, "__esModule", { value: true });
exports.__esModule = true;
exports.api = void 0;

@@ -31,0 +31,0 @@ exports.api = __importStar(require("./api"));

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.__esModule = true;
//# sourceMappingURL=rest.js.map

@@ -17,3 +17,3 @@ "use strict";

if (f) throw new TypeError("Generator is already executing.");
while (g && (g = 0, op[0] && (_ = 0)), _) try {
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;

@@ -39,3 +39,3 @@ if (y = 0, t) op = [op[0] & 2, t.value];

};
Object.defineProperty(exports, "__esModule", { value: true });
exports.__esModule = true;
var chai_1 = require("chai");

@@ -42,0 +42,0 @@ var neoLegacy_1 = require("../../../api/neoLegacy");

@@ -17,3 +17,3 @@ "use strict";

if (f) throw new TypeError("Generator is already executing.");
while (g && (g = 0, op[0] && (_ = 0)), _) try {
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;

@@ -39,3 +39,3 @@ if (y = 0, t) op = [op[0] & 2, t.value];

};
Object.defineProperty(exports, "__esModule", { value: true });
exports.__esModule = true;
var chai_1 = require("chai");

@@ -304,11 +304,13 @@ var neoN3_1 = require("../../../api/neoN3");

switch (_a.label) {
case 0: return [4, neoN3_1.NeoN3REST.tokenProvenance('0x904deb56fdd9a87b48d89e0cc0ac3415f9207840', '31')];
case 0: return [4, neoN3_1.NeoN3REST.tokenProvenance('0x904deb56fdd9a87b48d89e0cc0ac3415f9207840', 796)];
case 1:
res = _a.sent();
console.log(res);
chai_1.assert.equal(JSON.stringify(res[0]), JSON.stringify({
blockheight: 3344359,
timestamp: 1682461762,
txid: '0xece84f5ddd3787915a8c113f5f8748be5fc2dff560b202304264de42fb2b83ca',
blockheight: 3409447,
timestamp: 1683512180,
txid: '0x0333e4450a0b2f4295e8f86ce405bc1f1efca66cdd9691d4f51708f92026796c',
owner: 'NaZwraSdJv9BYwYzZryiZcydaPDof56beK'
}));
chai_1.assert.isAbove(res.length, 1);
return [2];

@@ -315,0 +317,0 @@ }

{
"name": "@cityofzion/dora-ts",
"version": "0.3.0",
"version": "0.3.1",
"description": "A typescript sdk for the dora blockchain data aggregator by COZ.",

@@ -5,0 +5,0 @@ "license": "Apache-2.0",

@@ -179,3 +179,3 @@ import type {

contract: string,
tokenId : string,
tokenId : number,
network = 'mainnet'

@@ -182,0 +182,0 @@ ): Promise<TokenProvenanceResponse> {

@@ -179,10 +179,14 @@ import { assert } from 'chai'

it('should get the token provenance', async () => {
const res = await NeoN3REST.tokenProvenance('0x904deb56fdd9a87b48d89e0cc0ac3415f9207840', '31')
assert.equal(JSON.stringify(res[0]), JSON.stringify({
blockheight: 3344359,
timestamp: 1682461762,
txid: '0xece84f5ddd3787915a8c113f5f8748be5fc2dff560b202304264de42fb2b83ca',
owner: 'NaZwraSdJv9BYwYzZryiZcydaPDof56beK'
}))
const res = await NeoN3REST.tokenProvenance('0x904deb56fdd9a87b48d89e0cc0ac3415f9207840', 796)
console.log(res)
assert.equal(JSON.stringify(res[0]), JSON.stringify(
{
blockheight: 3409447,
timestamp: 1683512180,
txid: '0x0333e4450a0b2f4295e8f86ce405bc1f1efca66cdd9691d4f51708f92026796c',
owner: 'NaZwraSdJv9BYwYzZryiZcydaPDof56beK'
}
))
assert.isAbove(res.length, 1)
})
})

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc