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

@zeitgeistpm/indexer

Package Overview
Dependencies
Maintainers
3
Versions
144
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zeitgeistpm/indexer - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

6

CHANGELOG.md
# @zeitgeistpm/indexer
## 2.0.4
### Patch Changes
- Use commonjs for now
## 2.0.3

@@ -4,0 +10,0 @@

10

dist/augments/index.js

@@ -1,2 +0,5 @@

import { ping } from './ping';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.augments = void 0;
const ping_1 = require("./ping");
/**

@@ -8,6 +11,7 @@ * Create the augmented api.

*/
export const augments = (gql) => {
const augments = (gql) => {
return {
ping: () => ping(gql),
ping: () => (0, ping_1.ping)(gql),
};
};
exports.augments = augments;

@@ -0,1 +1,4 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ping = void 0;
/**

@@ -7,3 +10,3 @@ * Ping the indexer with a lightweight query and return the response time in ms.

*/
export const ping = async (indexer) => {
const ping = async (indexer) => {
const start = Date.now();

@@ -13,1 +16,2 @@ await indexer.pingQuery();

};
exports.ping = ping;

@@ -1,3 +0,9 @@

import gql from 'graphql-tag';
export var AccountBalanceOrderByInput;
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getSdk = exports.PoolsDocument = exports.PingQueryDocument = exports.MarketsDocument = exports.HistoricalAssetsDocument = exports.HistoricalAccountBalancesDocument = exports.AssetsDocument = exports.AccountBalancesDocument = exports.FullPoolFragmentDoc = exports.FullMarketFragmentDoc = exports.FullHistoricalAssetsFragmentDoc = exports.FullHistoricalAccountBalanceFragmentDoc = exports.FullAssetFragmentDoc = exports.FullAccountBalanceFragmentDoc = exports.PoolOrderByInput = exports.MarketOrderByInput = exports.HistoricalPoolOrderByInput = exports.HistoricalMarketOrderByInput = exports.HistoricalAssetOrderByInput = exports.HistoricalAccountBalanceOrderByInput = exports.AssetOrderByInput = exports.AccountOrderByInput = exports.AccountBalanceOrderByInput = void 0;
const graphql_tag_1 = __importDefault(require("graphql-tag"));
var AccountBalanceOrderByInput;
(function (AccountBalanceOrderByInput) {

@@ -22,4 +28,4 @@ AccountBalanceOrderByInput["AccountAccountIdAsc"] = "account_accountId_ASC";

AccountBalanceOrderByInput["ValueDesc"] = "value_DESC";
})(AccountBalanceOrderByInput || (AccountBalanceOrderByInput = {}));
export var AccountOrderByInput;
})(AccountBalanceOrderByInput = exports.AccountBalanceOrderByInput || (exports.AccountBalanceOrderByInput = {}));
var AccountOrderByInput;
(function (AccountOrderByInput) {

@@ -36,4 +42,4 @@ AccountOrderByInput["AccountIdAsc"] = "accountId_ASC";

AccountOrderByInput["PvalueDesc"] = "pvalue_DESC";
})(AccountOrderByInput || (AccountOrderByInput = {}));
export var AssetOrderByInput;
})(AccountOrderByInput = exports.AccountOrderByInput || (exports.AccountOrderByInput = {}));
var AssetOrderByInput;
(function (AssetOrderByInput) {

@@ -50,4 +56,4 @@ AssetOrderByInput["AmountInPoolAsc"] = "amountInPool_ASC";

AssetOrderByInput["PriceDesc"] = "price_DESC";
})(AssetOrderByInput || (AssetOrderByInput = {}));
export var HistoricalAccountBalanceOrderByInput;
})(AssetOrderByInput = exports.AssetOrderByInput || (exports.AssetOrderByInput = {}));
var HistoricalAccountBalanceOrderByInput;
(function (HistoricalAccountBalanceOrderByInput) {

@@ -76,4 +82,4 @@ HistoricalAccountBalanceOrderByInput["AccountIdAsc"] = "accountId_ASC";

HistoricalAccountBalanceOrderByInput["ValueDesc"] = "value_DESC";
})(HistoricalAccountBalanceOrderByInput || (HistoricalAccountBalanceOrderByInput = {}));
export var HistoricalAssetOrderByInput;
})(HistoricalAccountBalanceOrderByInput = exports.HistoricalAccountBalanceOrderByInput || (exports.HistoricalAccountBalanceOrderByInput = {}));
var HistoricalAssetOrderByInput;
(function (HistoricalAssetOrderByInput) {

@@ -102,4 +108,4 @@ HistoricalAssetOrderByInput["AccountIdAsc"] = "accountId_ASC";

HistoricalAssetOrderByInput["ZtgTradedDesc"] = "ztgTraded_DESC";
})(HistoricalAssetOrderByInput || (HistoricalAssetOrderByInput = {}));
export var HistoricalMarketOrderByInput;
})(HistoricalAssetOrderByInput = exports.HistoricalAssetOrderByInput || (exports.HistoricalAssetOrderByInput = {}));
var HistoricalMarketOrderByInput;
(function (HistoricalMarketOrderByInput) {

@@ -126,4 +132,4 @@ HistoricalMarketOrderByInput["BlockNumberAsc"] = "blockNumber_ASC";

HistoricalMarketOrderByInput["TimestampDesc"] = "timestamp_DESC";
})(HistoricalMarketOrderByInput || (HistoricalMarketOrderByInput = {}));
export var HistoricalPoolOrderByInput;
})(HistoricalMarketOrderByInput = exports.HistoricalMarketOrderByInput || (exports.HistoricalMarketOrderByInput = {}));
var HistoricalPoolOrderByInput;
(function (HistoricalPoolOrderByInput) {

@@ -146,4 +152,4 @@ HistoricalPoolOrderByInput["BlockNumberAsc"] = "blockNumber_ASC";

HistoricalPoolOrderByInput["ZtgQtyDesc"] = "ztgQty_DESC";
})(HistoricalPoolOrderByInput || (HistoricalPoolOrderByInput = {}));
export var MarketOrderByInput;
})(HistoricalPoolOrderByInput = exports.HistoricalPoolOrderByInput || (exports.HistoricalPoolOrderByInput = {}));
var MarketOrderByInput;
(function (MarketOrderByInput) {

@@ -202,4 +208,4 @@ MarketOrderByInput["CreationAsc"] = "creation_ASC";

MarketOrderByInput["StatusDesc"] = "status_DESC";
})(MarketOrderByInput || (MarketOrderByInput = {}));
export var PoolOrderByInput;
})(MarketOrderByInput = exports.MarketOrderByInput || (exports.MarketOrderByInput = {}));
var PoolOrderByInput;
(function (PoolOrderByInput) {

@@ -232,4 +238,4 @@ PoolOrderByInput["AccountIdAsc"] = "accountId_ASC";

PoolOrderByInput["ZtgQtyDesc"] = "ztgQty_DESC";
})(PoolOrderByInput || (PoolOrderByInput = {}));
export const FullAccountBalanceFragmentDoc = gql `
})(PoolOrderByInput = exports.PoolOrderByInput || (exports.PoolOrderByInput = {}));
exports.FullAccountBalanceFragmentDoc = (0, graphql_tag_1.default) `
fragment FullAccountBalance on AccountBalance {

@@ -249,3 +255,3 @@ id

`;
export const FullAssetFragmentDoc = gql `
exports.FullAssetFragmentDoc = (0, graphql_tag_1.default) `
fragment FullAsset on Asset {

@@ -259,3 +265,3 @@ id

`;
export const FullHistoricalAccountBalanceFragmentDoc = gql `
exports.FullHistoricalAccountBalanceFragmentDoc = (0, graphql_tag_1.default) `
fragment FullHistoricalAccountBalance on HistoricalAccountBalance {

@@ -275,3 +281,3 @@ id

`;
export const FullHistoricalAssetsFragmentDoc = gql `
exports.FullHistoricalAssetsFragmentDoc = (0, graphql_tag_1.default) `
fragment FullHistoricalAssets on HistoricalAsset {

@@ -291,3 +297,3 @@ id

`;
export const FullMarketFragmentDoc = gql `
exports.FullMarketFragmentDoc = (0, graphql_tag_1.default) `
fragment FullMarket on Market {

@@ -338,3 +344,3 @@ id

`;
export const FullPoolFragmentDoc = gql `
exports.FullPoolFragmentDoc = (0, graphql_tag_1.default) `
fragment FullPool on Pool {

@@ -360,3 +366,3 @@ id

`;
export const AccountBalancesDocument = gql `
exports.AccountBalancesDocument = (0, graphql_tag_1.default) `
query accountBalances($where: AccountBalanceWhereInput, $order: [AccountBalanceOrderByInput!], $offset: Int, $limit: Int) {

@@ -367,4 +373,4 @@ accountBalances(where: $where, orderBy: $order, offset: $offset, limit: $limit) {

}
${FullAccountBalanceFragmentDoc}`;
export const AssetsDocument = gql `
${exports.FullAccountBalanceFragmentDoc}`;
exports.AssetsDocument = (0, graphql_tag_1.default) `
query assets($where: AssetWhereInput, $order: [AssetOrderByInput!], $offset: Int, $limit: Int) {

@@ -375,4 +381,4 @@ assets(where: $where, orderBy: $order, offset: $offset, limit: $limit) {

}
${FullAssetFragmentDoc}`;
export const HistoricalAccountBalancesDocument = gql `
${exports.FullAssetFragmentDoc}`;
exports.HistoricalAccountBalancesDocument = (0, graphql_tag_1.default) `
query historicalAccountBalances($where: HistoricalAccountBalanceWhereInput, $order: [HistoricalAccountBalanceOrderByInput!], $offset: Int, $limit: Int) {

@@ -388,4 +394,4 @@ historicalAccountBalances(

}
${FullHistoricalAccountBalanceFragmentDoc}`;
export const HistoricalAssetsDocument = gql `
${exports.FullHistoricalAccountBalanceFragmentDoc}`;
exports.HistoricalAssetsDocument = (0, graphql_tag_1.default) `
query historicalAssets($where: HistoricalAssetWhereInput, $order: [HistoricalAssetOrderByInput!], $offset: Int, $limit: Int) {

@@ -396,4 +402,4 @@ historicalAssets(where: $where, orderBy: $order, offset: $offset, limit: $limit) {

}
${FullHistoricalAssetsFragmentDoc}`;
export const MarketsDocument = gql `
${exports.FullHistoricalAssetsFragmentDoc}`;
exports.MarketsDocument = (0, graphql_tag_1.default) `
query markets($where: MarketWhereInput, $order: [MarketOrderByInput!], $limit: Int, $offset: Int) {

@@ -404,4 +410,4 @@ markets(where: $where, limit: $limit, offset: $offset, orderBy: $order) {

}
${FullMarketFragmentDoc}`;
export const PingQueryDocument = gql `
${exports.FullMarketFragmentDoc}`;
exports.PingQueryDocument = (0, graphql_tag_1.default) `
query pingQuery {

@@ -413,3 +419,3 @@ markets(limit: 1) {

`;
export const PoolsDocument = gql `
exports.PoolsDocument = (0, graphql_tag_1.default) `
query pools($where: PoolWhereInput, $order: [PoolOrderByInput!], $offset: Int, $limit: Int) {

@@ -420,28 +426,29 @@ pools(where: $where, orderBy: $order, offset: $offset, limit: $limit) {

}
${FullPoolFragmentDoc}`;
${exports.FullPoolFragmentDoc}`;
const defaultWrapper = (action, _operationName, _operationType) => action();
export function getSdk(client, withWrapper = defaultWrapper) {
function getSdk(client, withWrapper = defaultWrapper) {
return {
accountBalances(variables, requestHeaders) {
return withWrapper((wrappedRequestHeaders) => client.request(AccountBalancesDocument, variables, { ...requestHeaders, ...wrappedRequestHeaders }), 'accountBalances', 'query');
return withWrapper((wrappedRequestHeaders) => client.request(exports.AccountBalancesDocument, variables, { ...requestHeaders, ...wrappedRequestHeaders }), 'accountBalances', 'query');
},
assets(variables, requestHeaders) {
return withWrapper((wrappedRequestHeaders) => client.request(AssetsDocument, variables, { ...requestHeaders, ...wrappedRequestHeaders }), 'assets', 'query');
return withWrapper((wrappedRequestHeaders) => client.request(exports.AssetsDocument, variables, { ...requestHeaders, ...wrappedRequestHeaders }), 'assets', 'query');
},
historicalAccountBalances(variables, requestHeaders) {
return withWrapper((wrappedRequestHeaders) => client.request(HistoricalAccountBalancesDocument, variables, { ...requestHeaders, ...wrappedRequestHeaders }), 'historicalAccountBalances', 'query');
return withWrapper((wrappedRequestHeaders) => client.request(exports.HistoricalAccountBalancesDocument, variables, { ...requestHeaders, ...wrappedRequestHeaders }), 'historicalAccountBalances', 'query');
},
historicalAssets(variables, requestHeaders) {
return withWrapper((wrappedRequestHeaders) => client.request(HistoricalAssetsDocument, variables, { ...requestHeaders, ...wrappedRequestHeaders }), 'historicalAssets', 'query');
return withWrapper((wrappedRequestHeaders) => client.request(exports.HistoricalAssetsDocument, variables, { ...requestHeaders, ...wrappedRequestHeaders }), 'historicalAssets', 'query');
},
markets(variables, requestHeaders) {
return withWrapper((wrappedRequestHeaders) => client.request(MarketsDocument, variables, { ...requestHeaders, ...wrappedRequestHeaders }), 'markets', 'query');
return withWrapper((wrappedRequestHeaders) => client.request(exports.MarketsDocument, variables, { ...requestHeaders, ...wrappedRequestHeaders }), 'markets', 'query');
},
pingQuery(variables, requestHeaders) {
return withWrapper((wrappedRequestHeaders) => client.request(PingQueryDocument, variables, { ...requestHeaders, ...wrappedRequestHeaders }), 'pingQuery', 'query');
return withWrapper((wrappedRequestHeaders) => client.request(exports.PingQueryDocument, variables, { ...requestHeaders, ...wrappedRequestHeaders }), 'pingQuery', 'query');
},
pools(variables, requestHeaders) {
return withWrapper((wrappedRequestHeaders) => client.request(PoolsDocument, variables, { ...requestHeaders, ...wrappedRequestHeaders }), 'pools', 'query');
return withWrapper((wrappedRequestHeaders) => client.request(exports.PoolsDocument, variables, { ...requestHeaders, ...wrappedRequestHeaders }), 'pools', 'query');
}
};
}
exports.getSdk = getSdk;

@@ -1,6 +0,23 @@

import { GraphQLClient } from 'graphql-request';
import { augments } from './augments';
import { getSdk } from './graphql/sdk';
export * from './graphql/sdk';
export * from './types';
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.create = void 0;
const graphql_request_1 = require("graphql-request");
const augments_1 = require("./augments");
const sdk_1 = require("./graphql/sdk");
__exportStar(require("./graphql/sdk"), exports);
__exportStar(require("./types"), exports);
/**

@@ -12,10 +29,11 @@ * Create a zeitgeist indexer client.

*/
export const create = (config) => {
const client = new GraphQLClient(config.uri);
const gql = getSdk(client);
const create = (config) => {
const client = new graphql_request_1.GraphQLClient(config.uri);
const gql = (0, sdk_1.getSdk)(client);
return {
client,
...gql,
...augments(gql),
...(0, augments_1.augments)(gql),
};
};
exports.create = create;

@@ -1,1 +0,2 @@

export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
{
"name": "@zeitgeistpm/indexer",
"version": "2.0.3",
"version": "2.0.4",
"publishConfig": {

@@ -5,0 +5,0 @@ "access": "public"

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