Comparing version 0.1.2 to 0.1.3
@@ -1,91 +0,3 @@ | ||
declare module "errors" { | ||
export class IndexerError extends Error { | ||
name: string; | ||
} | ||
} | ||
declare module "primitives" { | ||
export type Timeframe = "Block" | "Minute" | "Hour" | "Day" | "Week"; | ||
export enum PriceUnit { | ||
ETH = "ETH", | ||
USD = "USD", | ||
GWEI = "Gwei" | ||
} | ||
export type Block = { | ||
id: string; | ||
number: string; | ||
timestamp: string; | ||
gasUsed: string; | ||
baseFeePerGas: string; | ||
txnCount: number; | ||
minGasPrice: string; | ||
maxGasPrice: string; | ||
firstGasPrice: string; | ||
lastGasPrice: string; | ||
gasFees: string; | ||
burnedFees: string; | ||
minerTips: string; | ||
}; | ||
export type SimpleBlock = Omit<Block, "txns" | "timestamp"> & { | ||
timestamp: string; | ||
}; | ||
export type Candle = { | ||
close: string; | ||
high: string; | ||
low: string; | ||
open: string; | ||
timestamp: string; | ||
}; | ||
export function isCandle(value: unknown): value is Candle; | ||
export function isCandleArray(value: unknown[]): value is Candle[]; | ||
export type QueryRequest = { | ||
timeframe: Timeframe; | ||
since?: string; | ||
until?: string; | ||
priceUnit?: PriceUnit; | ||
}; | ||
export type QueryResult = Promise<Candle[] | SimpleBlock[]>; | ||
export type QueryFn = (request: QueryRequest) => QueryResult; | ||
} | ||
declare module "protofun" { | ||
export * from "errors"; | ||
export * from "primitives"; | ||
} | ||
declare module "metrics/comp/markets" { | ||
export const markets: { | ||
createdTimestamp: string; | ||
id: string; | ||
name: string; | ||
}[]; | ||
} | ||
declare module "metrics/comp/types" { | ||
export type Market = { | ||
id: string; | ||
name: string; | ||
}; | ||
export type MarketDailySnapshot = { | ||
market: Market; | ||
openPositionCount: number; | ||
timestamp: string; | ||
totalValueLockedUSD: string; | ||
}; | ||
} | ||
declare module "metrics/comp/tvl" { | ||
import { Timeframe, QueryResult, QueryRequest } from "primitives"; | ||
export const supportedTimeframes: Timeframe[]; | ||
export default function query(request: QueryRequest): QueryResult; | ||
} | ||
declare module "metrics/eth/base-fee-per-gas" { | ||
import { QueryRequest, QueryResult } from "primitives"; | ||
export default function query(request: QueryRequest): QueryResult; | ||
} | ||
declare module "metrics/eth/ether-price" { | ||
import { QueryRequest, QueryResult, Timeframe } from "primitives"; | ||
export const supportedTimeframes: Timeframe[]; | ||
export default function query(request: QueryRequest): QueryResult; | ||
} | ||
declare module "metrics/eth/tx-cost" { | ||
import { QueryRequest, QueryResult, Timeframe } from "primitives"; | ||
export const supportedTimeframes: Timeframe[]; | ||
export default function query(request: QueryRequest): QueryResult; | ||
} | ||
export * from "./errors"; | ||
export * from "./primitives"; | ||
//# sourceMappingURL=protofun.d.ts.map |
@@ -1,2 +0,19 @@ | ||
(function(e,n){typeof exports=="object"&&typeof module!="undefined"?n(exports):typeof define=="function"&&define.amd?define(["exports"],n):(e=typeof globalThis!="undefined"?globalThis:e||self,n(e.protofun={}))})(this,function(e){"use strict";var f=Object.defineProperty;var s=(e,n,i)=>n in e?f(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var t=(e,n,i)=>(s(e,typeof n!="symbol"?n+"":n,i),i);class n extends Error{constructor(){super(...arguments);t(this,"name","IndexerError")}}var i=(r=>(r.ETH="ETH",r.USD="USD",r.GWEI="Gwei",r))(i||{});function o(r){return typeof r=="object"&&r!==null&&"open"in r}function d(r){return Array.isArray(r)&&r.length>0&&o(r[0])}e.IndexerError=n,e.PriceUnit=i,e.isCandle=o,e.isCandleArray=d,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); | ||
//# sourceMappingURL=protofun.js.map | ||
"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 }); | ||
__exportStar(require("./errors"), exports); | ||
__exportStar(require("./primitives"), exports); | ||
//# sourceMappingURL=protofun.js.map |
{ | ||
"name": "protofun", | ||
"license": "UNLICENSED", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"files": [ | ||
@@ -14,4 +14,3 @@ "dist", | ||
"start": "concurrently 'vite build --watch' 'yarn types --watch --preserveWatchOutput' --names 'vite,tsc' -c 'green,blue'", | ||
"build": "vite build && yarn types", | ||
"types": "tsc --project tsconfig.prod.json", | ||
"build": "tsc --project tsconfig.prod.json", | ||
"check-types": "tsc --noEmit", | ||
@@ -18,0 +17,0 @@ "prepublish": "yarn build", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
38605
47
751
1