Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@definedfi/sdk

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@definedfi/sdk - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

dist/sdk/Mutation.d.ts

5

dist/sdk/generated/gql.js

@@ -40,2 +40,4 @@ "use strict";

const documents = {
"mutation CreateWebhooks($input: CreateWebhooksInput!) {\n createWebhooks(input: $input) {\n priceWebhooks {\n id\n webhookType\n name\n created\n alertRecurrence\n callbackUrl\n status\n groupId\n conditions {\n ... on PriceEventWebhookCondition {\n tokenAddressPriceEventWebhookCondition: tokenAddress {\n eq\n }\n networkIdPriceEventWebhookCondition: networkId {\n eq\n }\n priceUsd {\n gt\n gte\n lt\n lte\n eq\n }\n }\n ... on DecodedLogWebhookCondition {\n decodingId {\n eq\n }\n eventName {\n eq\n }\n address {\n eq\n }\n event\n }\n ... on DecodedCallWebhookCondition {\n decodingId {\n eq\n }\n methodName {\n eq\n }\n address {\n eq\n }\n from {\n eq\n }\n to {\n eq\n }\n methodId {\n eq\n }\n inputDecodedCallWebhookCondition: input\n output\n }\n ... on RawCallTraceWebhookCondition {\n traceType {\n eq\n }\n result {\n code {\n contains\n notContains\n }\n }\n networkId {\n oneOf\n }\n }\n ... on TokenPairEventWebhookCondition {\n tokenAddress {\n eq\n }\n networkId {\n oneOf\n }\n swapValue {\n gt\n gte\n lt\n lte\n eq\n }\n maker {\n eq\n }\n pairAddress {\n eq\n }\n exchangeAddress {\n eq\n }\n eventType {\n oneOf\n }\n }\n ... on NftEventWebhookCondition {\n networkId {\n oneOf\n }\n maker {\n eq\n }\n contractAddress {\n eq\n }\n exchangeAddress {\n eq\n }\n tokenId {\n eq\n }\n tokenAddress {\n eq\n }\n individualBaseTokenPrice {\n gt\n gte\n lt\n lte\n eq\n }\n eventType {\n eq\n }\n fillSource {\n oneOf\n }\n }\n ... on RawTransactionWebhookCondition {\n networkId {\n oneOf\n }\n to {\n eq\n }\n from {\n eq\n }\n toOrFrom {\n eq\n }\n input {\n contains\n notContains\n }\n ignoreTokenPairEvents\n ignoreNftEvents\n }\n }\n retrySettings {\n maxTimeElapsed\n minRetryDelay\n maxRetryDelay\n maxRetries\n }\n bucketId\n bucketSortkey\n }\n decodedLogWebhooks {\n id\n webhookType\n name\n created\n alertRecurrence\n callbackUrl\n status\n groupId\n bucketId\n bucketSortkey\n conditions {\n ... on PriceEventWebhookCondition {\n tokenAddressPriceEventWebhookCondition: tokenAddress {\n eq\n }\n networkIdPriceEventWebhookCondition: networkId {\n eq\n }\n priceUsd {\n gt\n gte\n lt\n lte\n eq\n }\n }\n ... on DecodedLogWebhookCondition {\n decodingId {\n eq\n }\n eventName {\n eq\n }\n address {\n eq\n }\n event\n }\n ... on DecodedCallWebhookCondition {\n decodingId {\n eq\n }\n methodName {\n eq\n }\n address {\n eq\n }\n from {\n eq\n }\n to {\n eq\n }\n methodId {\n eq\n }\n inputDecodedCallWebhookCondition: input\n output\n }\n ... on RawCallTraceWebhookCondition {\n traceType {\n eq\n }\n result {\n code {\n contains\n notContains\n }\n }\n networkId {\n oneOf\n }\n }\n ... on TokenPairEventWebhookCondition {\n tokenAddress {\n eq\n }\n networkId {\n oneOf\n }\n swapValue {\n gt\n gte\n lt\n lte\n eq\n }\n maker {\n eq\n }\n pairAddress {\n eq\n }\n exchangeAddress {\n eq\n }\n eventType {\n oneOf\n }\n }\n ... on NftEventWebhookCondition {\n networkId {\n oneOf\n }\n maker {\n eq\n }\n contractAddress {\n eq\n }\n exchangeAddress {\n eq\n }\n tokenId {\n eq\n }\n tokenAddress {\n eq\n }\n individualBaseTokenPrice {\n gt\n gte\n lt\n lte\n eq\n }\n eventType {\n eq\n }\n fillSource {\n oneOf\n }\n }\n ... on RawTransactionWebhookCondition {\n networkId {\n oneOf\n }\n to {\n eq\n }\n from {\n eq\n }\n toOrFrom {\n eq\n }\n input {\n contains\n notContains\n }\n ignoreTokenPairEvents\n ignoreNftEvents\n }\n }\n retrySettings {\n maxTimeElapsed\n minRetryDelay\n maxRetryDelay\n maxRetries\n }\n }\n decodedCallWebhooks {\n id\n webhookType\n name\n created\n alertRecurrence\n callbackUrl\n status\n groupId\n bucketId\n bucketSortkey\n conditions {\n ... on PriceEventWebhookCondition {\n tokenAddressPriceEventWebhookCondition: tokenAddress {\n eq\n }\n networkIdPriceEventWebhookCondition: networkId {\n eq\n }\n priceUsd {\n gt\n gte\n lt\n lte\n eq\n }\n }\n ... on DecodedLogWebhookCondition {\n decodingId {\n eq\n }\n eventName {\n eq\n }\n address {\n eq\n }\n event\n }\n ... on DecodedCallWebhookCondition {\n decodingId {\n eq\n }\n methodName {\n eq\n }\n address {\n eq\n }\n from {\n eq\n }\n to {\n eq\n }\n methodId {\n eq\n }\n inputDecodedCallWebhookCondition: input\n output\n }\n ... on RawCallTraceWebhookCondition {\n traceType {\n eq\n }\n result {\n code {\n contains\n notContains\n }\n }\n networkId {\n oneOf\n }\n }\n ... on TokenPairEventWebhookCondition {\n tokenAddress {\n eq\n }\n networkId {\n oneOf\n }\n swapValue {\n gt\n gte\n lt\n lte\n eq\n }\n maker {\n eq\n }\n pairAddress {\n eq\n }\n exchangeAddress {\n eq\n }\n eventType {\n oneOf\n }\n }\n ... on NftEventWebhookCondition {\n networkId {\n oneOf\n }\n maker {\n eq\n }\n contractAddress {\n eq\n }\n exchangeAddress {\n eq\n }\n tokenId {\n eq\n }\n tokenAddress {\n eq\n }\n individualBaseTokenPrice {\n gt\n gte\n lt\n lte\n eq\n }\n eventType {\n eq\n }\n fillSource {\n oneOf\n }\n }\n ... on RawTransactionWebhookCondition {\n networkId {\n oneOf\n }\n to {\n eq\n }\n from {\n eq\n }\n toOrFrom {\n eq\n }\n input {\n contains\n notContains\n }\n ignoreTokenPairEvents\n ignoreNftEvents\n }\n }\n retrySettings {\n maxTimeElapsed\n minRetryDelay\n maxRetryDelay\n maxRetries\n }\n }\n rawCallTraceWebhooks {\n id\n webhookType\n name\n created\n alertRecurrence\n callbackUrl\n status\n groupId\n bucketId\n bucketSortkey\n conditions {\n ... on PriceEventWebhookCondition {\n tokenAddressPriceEventWebhookCondition: tokenAddress {\n eq\n }\n networkIdPriceEventWebhookCondition: networkId {\n eq\n }\n priceUsd {\n gt\n gte\n lt\n lte\n eq\n }\n }\n ... on DecodedLogWebhookCondition {\n decodingId {\n eq\n }\n eventName {\n eq\n }\n address {\n eq\n }\n event\n }\n ... on DecodedCallWebhookCondition {\n decodingId {\n eq\n }\n methodName {\n eq\n }\n address {\n eq\n }\n from {\n eq\n }\n to {\n eq\n }\n methodId {\n eq\n }\n inputDecodedCallWebhookCondition: input\n output\n }\n ... on RawCallTraceWebhookCondition {\n traceType {\n eq\n }\n result {\n code {\n contains\n notContains\n }\n }\n networkId {\n oneOf\n }\n }\n ... on TokenPairEventWebhookCondition {\n tokenAddress {\n eq\n }\n networkId {\n oneOf\n }\n swapValue {\n gt\n gte\n lt\n lte\n eq\n }\n maker {\n eq\n }\n pairAddress {\n eq\n }\n exchangeAddress {\n eq\n }\n eventType {\n oneOf\n }\n }\n ... on NftEventWebhookCondition {\n networkId {\n oneOf\n }\n maker {\n eq\n }\n contractAddress {\n eq\n }\n exchangeAddress {\n eq\n }\n tokenId {\n eq\n }\n tokenAddress {\n eq\n }\n individualBaseTokenPrice {\n gt\n gte\n lt\n lte\n eq\n }\n eventType {\n eq\n }\n fillSource {\n oneOf\n }\n }\n ... on RawTransactionWebhookCondition {\n networkId {\n oneOf\n }\n to {\n eq\n }\n from {\n eq\n }\n toOrFrom {\n eq\n }\n input {\n contains\n notContains\n }\n ignoreTokenPairEvents\n ignoreNftEvents\n }\n }\n retrySettings {\n maxTimeElapsed\n minRetryDelay\n maxRetryDelay\n maxRetries\n }\n }\n tokenPairEventWebhooks {\n id\n webhookType\n name\n created\n alertRecurrence\n callbackUrl\n status\n groupId\n bucketId\n bucketSortkey\n conditions {\n ... on PriceEventWebhookCondition {\n tokenAddressPriceEventWebhookCondition: tokenAddress {\n eq\n }\n networkIdPriceEventWebhookCondition: networkId {\n eq\n }\n priceUsd {\n gt\n gte\n lt\n lte\n eq\n }\n }\n ... on DecodedLogWebhookCondition {\n decodingId {\n eq\n }\n eventName {\n eq\n }\n address {\n eq\n }\n event\n }\n ... on DecodedCallWebhookCondition {\n decodingId {\n eq\n }\n methodName {\n eq\n }\n address {\n eq\n }\n from {\n eq\n }\n to {\n eq\n }\n methodId {\n eq\n }\n inputDecodedCallWebhookCondition: input\n output\n }\n ... on RawCallTraceWebhookCondition {\n traceType {\n eq\n }\n result {\n code {\n contains\n notContains\n }\n }\n networkId {\n oneOf\n }\n }\n ... on TokenPairEventWebhookCondition {\n tokenAddress {\n eq\n }\n networkId {\n oneOf\n }\n swapValue {\n gt\n gte\n lt\n lte\n eq\n }\n maker {\n eq\n }\n pairAddress {\n eq\n }\n exchangeAddress {\n eq\n }\n eventType {\n oneOf\n }\n }\n ... on NftEventWebhookCondition {\n networkId {\n oneOf\n }\n maker {\n eq\n }\n contractAddress {\n eq\n }\n exchangeAddress {\n eq\n }\n tokenId {\n eq\n }\n tokenAddress {\n eq\n }\n individualBaseTokenPrice {\n gt\n gte\n lt\n lte\n eq\n }\n eventType {\n eq\n }\n fillSource {\n oneOf\n }\n }\n ... on RawTransactionWebhookCondition {\n networkId {\n oneOf\n }\n to {\n eq\n }\n from {\n eq\n }\n toOrFrom {\n eq\n }\n input {\n contains\n notContains\n }\n ignoreTokenPairEvents\n ignoreNftEvents\n }\n }\n retrySettings {\n maxTimeElapsed\n minRetryDelay\n maxRetryDelay\n maxRetries\n }\n }\n nftEventWebhooks {\n id\n webhookType\n name\n created\n alertRecurrence\n callbackUrl\n status\n groupId\n bucketId\n bucketSortkey\n retrySettings {\n maxTimeElapsed\n minRetryDelay\n maxRetryDelay\n maxRetries\n }\n conditions {\n ... on PriceEventWebhookCondition {\n tokenAddressPriceEventWebhookCondition: tokenAddress {\n eq\n }\n networkIdPriceEventWebhookCondition: networkId {\n eq\n }\n priceUsd {\n gt\n gte\n lt\n lte\n eq\n }\n }\n ... on DecodedLogWebhookCondition {\n decodingId {\n eq\n }\n eventName {\n eq\n }\n address {\n eq\n }\n event\n }\n ... on DecodedCallWebhookCondition {\n decodingId {\n eq\n }\n methodName {\n eq\n }\n address {\n eq\n }\n from {\n eq\n }\n to {\n eq\n }\n methodId {\n eq\n }\n inputDecodedCallWebhookCondition: input\n output\n }\n ... on RawCallTraceWebhookCondition {\n traceType {\n eq\n }\n result {\n code {\n contains\n notContains\n }\n }\n networkId {\n oneOf\n }\n }\n ... on TokenPairEventWebhookCondition {\n tokenAddress {\n eq\n }\n networkId {\n oneOf\n }\n swapValue {\n gt\n gte\n lt\n lte\n eq\n }\n maker {\n eq\n }\n pairAddress {\n eq\n }\n exchangeAddress {\n eq\n }\n eventType {\n oneOf\n }\n }\n ... on NftEventWebhookCondition {\n networkId {\n oneOf\n }\n maker {\n eq\n }\n contractAddress {\n eq\n }\n exchangeAddress {\n eq\n }\n tokenId {\n eq\n }\n tokenAddress {\n eq\n }\n individualBaseTokenPrice {\n gt\n gte\n lt\n lte\n eq\n }\n eventType {\n eq\n }\n fillSource {\n oneOf\n }\n }\n ... on RawTransactionWebhookCondition {\n networkId {\n oneOf\n }\n to {\n eq\n }\n from {\n eq\n }\n toOrFrom {\n eq\n }\n input {\n contains\n notContains\n }\n ignoreTokenPairEvents\n ignoreNftEvents\n }\n }\n }\n rawTransactionWebhooks {\n id\n webhookType\n name\n created\n alertRecurrence\n callbackUrl\n status\n groupId\n bucketId\n bucketSortkey\n conditions {\n ... on PriceEventWebhookCondition {\n tokenAddressPriceEventWebhookCondition: tokenAddress {\n eq\n }\n networkIdPriceEventWebhookCondition: networkId {\n eq\n }\n priceUsd {\n gt\n gte\n lt\n lte\n eq\n }\n }\n ... on DecodedLogWebhookCondition {\n decodingId {\n eq\n }\n eventName {\n eq\n }\n address {\n eq\n }\n event\n }\n ... on DecodedCallWebhookCondition {\n decodingId {\n eq\n }\n methodName {\n eq\n }\n address {\n eq\n }\n from {\n eq\n }\n to {\n eq\n }\n methodId {\n eq\n }\n inputDecodedCallWebhookCondition: input\n output\n }\n ... on RawCallTraceWebhookCondition {\n traceType {\n eq\n }\n result {\n code {\n contains\n notContains\n }\n }\n networkId {\n oneOf\n }\n }\n ... on TokenPairEventWebhookCondition {\n tokenAddress {\n eq\n }\n networkId {\n oneOf\n }\n swapValue {\n gt\n gte\n lt\n lte\n eq\n }\n maker {\n eq\n }\n pairAddress {\n eq\n }\n exchangeAddress {\n eq\n }\n eventType {\n oneOf\n }\n }\n ... on NftEventWebhookCondition {\n networkId {\n oneOf\n }\n maker {\n eq\n }\n contractAddress {\n eq\n }\n exchangeAddress {\n eq\n }\n tokenId {\n eq\n }\n tokenAddress {\n eq\n }\n individualBaseTokenPrice {\n gt\n gte\n lt\n lte\n eq\n }\n eventType {\n eq\n }\n fillSource {\n oneOf\n }\n }\n ... on RawTransactionWebhookCondition {\n networkId {\n oneOf\n }\n to {\n eq\n }\n from {\n eq\n }\n toOrFrom {\n eq\n }\n input {\n contains\n notContains\n }\n ignoreTokenPairEvents\n ignoreNftEvents\n }\n }\n retrySettings {\n maxTimeElapsed\n minRetryDelay\n maxRetryDelay\n maxRetries\n }\n }\n }\n}": types.CreateWebhooksDocument,
"mutation DeleteWebhooks($input: DeleteWebhooksInput!) {\n deleteWebhooks(input: $input) {\n deletedIds\n }\n}": types.DeleteWebhooksDocument,
"query FilterExchanges($filters: ExchangeFilters, $phrase: String, $rankings: [ExchangeRanking], $limit: Int, $offset: Int) {\n filterExchanges(\n filters: $filters\n rankings: $rankings\n limit: $limit\n phrase: $phrase\n offset: $offset\n ) {\n results {\n exchange {\n address\n iconUrl\n name\n tradeUrl\n }\n dailyActiveUsers\n monthlyActiveUsers\n txnCount1\n volumeNBT12\n volumeUSD24\n }\n }\n}": types.FilterExchangesDocument,

@@ -45,2 +47,3 @@ "query FilterPairs($filters: PairFilters, $phrase: String, $pairs: [String], $rankings: [PairRanking], $limit: Int, $offset: Int, $matchTokens: PairFilterMatchTokens) {\n filterPairs(\n filters: $filters\n phrase: $phrase\n pairs: $pairs\n rankings: $rankings\n limit: $limit\n offset: $offset\n matchTokens: $matchTokens\n ) {\n count\n offset\n results {\n createdAt\n lastTransaction\n buyCount1\n buyCount4\n buyCount12\n buyCount24\n highPrice1\n highPrice4\n highPrice12\n highPrice24\n liquidity\n liquidityToken\n quoteToken\n lowPrice1\n lowPrice4\n lowPrice12\n lowPrice24\n marketCap\n price\n priceScale\n priceChange1\n priceChange4\n priceChange12\n priceChange24\n sellCount1\n sellCount4\n sellCount12\n sellCount24\n txnCount1\n txnCount4\n txnCount12\n txnCount24\n uniqueBuys1\n uniqueBuys4\n uniqueBuys12\n uniqueBuys24\n uniqueSells1\n uniqueSells4\n uniqueSells12\n uniqueSells24\n uniqueTransactions1\n uniqueTransactions4\n uniqueTransactions12\n uniqueTransactions24\n volumeUSD1\n volumeUSD4\n volumeUSD12\n volumeUSD24\n pair {\n token0\n token1\n pooled {\n token0\n token1\n }\n }\n token0 {\n address\n decimals\n name\n networkId\n symbol\n info {\n imageSmallUrl\n circulatingSupply\n totalSupply\n }\n }\n token1 {\n address\n decimals\n name\n networkId\n symbol\n info {\n imageSmallUrl\n circulatingSupply\n totalSupply\n }\n }\n exchange {\n address\n id\n name\n exchangeVersion\n iconUrl\n networkId\n tradeUrl\n }\n }\n }\n}": types.FilterPairsDocument,

"query GetBars($symbol: String!, $from: Int!, $to: Int!, $resolution: String!, $currencyCode: String, $quoteToken: QuoteToken) {\n getBars(\n symbol: $symbol\n from: $from\n to: $to\n resolution: $resolution\n currencyCode: $currencyCode\n quoteToken: $quoteToken\n ) {\n o\n h\n l\n c\n volume\n }\n}": types.GetBarsDocument,
"query GetDetailedPairStats($pairAddress: String!, $networkId: Int!, $tokenOfInterest: TokenOfInterest, $timestamp: Int, $durations: [DetailedPairStatsDuration], $bucketCount: Int) {\n getDetailedPairStats(\n pairAddress: $pairAddress\n networkId: $networkId\n tokenOfInterest: $tokenOfInterest\n timestamp: $timestamp\n durations: $durations\n bucketCount: $bucketCount\n ) {\n pairAddress\n networkId\n tokenOfInterest\n lastTransaction\n pair {\n address\n exchangeHash\n fee\n id\n networkId\n tickSpacing\n token0\n token1\n createdAt\n token0Data {\n address\n cmcId\n decimals\n id\n isScam\n name\n networkId\n symbol\n totalSupply\n socialLinks {\n bitcointalk\n blog\n coingecko\n coinmarketcap\n discord\n email\n facebook\n github\n instagram\n linkedin\n reddit\n slack\n telegram\n twitch\n twitter\n website\n wechat\n whitepaper\n youtube\n }\n info {\n id\n address\n circulatingSupply\n cmcId\n isScam\n name\n networkId\n symbol\n totalSupply\n imageThumbUrl\n imageSmallUrl\n imageLargeUrl\n }\n explorerData {\n id\n blueCheckmark\n description\n divisor\n tokenPriceUSD\n tokenType\n }\n exchanges {\n address\n color\n id\n name\n exchangeVersion\n iconUrl\n networkId\n tradeUrl\n }\n }\n token1Data {\n address\n cmcId\n decimals\n id\n isScam\n name\n networkId\n symbol\n totalSupply\n socialLinks {\n bitcointalk\n blog\n coingecko\n coinmarketcap\n discord\n email\n facebook\n github\n instagram\n linkedin\n reddit\n slack\n telegram\n twitch\n twitter\n website\n wechat\n whitepaper\n youtube\n }\n info {\n id\n address\n circulatingSupply\n cmcId\n isScam\n name\n networkId\n symbol\n totalSupply\n imageThumbUrl\n imageSmallUrl\n imageLargeUrl\n }\n explorerData {\n id\n blueCheckmark\n description\n divisor\n tokenPriceUSD\n tokenType\n }\n exchanges {\n address\n color\n id\n name\n exchangeVersion\n iconUrl\n networkId\n tradeUrl\n }\n }\n pooled {\n token0\n token1\n }\n }\n stats_day1 {\n duration\n start\n end\n timestamps {\n start\n end\n }\n statsUsd {\n volume {\n change\n currentValue\n previousValue\n buckets\n }\n buyVolume {\n change\n currentValue\n previousValue\n buckets\n }\n sellVolume {\n change\n currentValue\n previousValue\n buckets\n }\n open {\n change\n currentValue\n previousValue\n buckets\n }\n highest {\n change\n currentValue\n previousValue\n buckets\n }\n lowest {\n change\n currentValue\n previousValue\n buckets\n }\n close {\n change\n currentValue\n previousValue\n buckets\n }\n liquidity {\n change\n currentValue\n previousValue\n buckets\n }\n }\n statsNonCurrency {\n transactions {\n change\n currentValue\n previousValue\n buckets\n }\n buys {\n change\n currentValue\n previousValue\n buckets\n }\n sells {\n change\n currentValue\n previousValue\n buckets\n }\n traders {\n change\n currentValue\n previousValue\n buckets\n }\n buyers {\n change\n currentValue\n previousValue\n buckets\n }\n sellers {\n change\n currentValue\n previousValue\n buckets\n }\n }\n }\n stats_day30 {\n duration\n start\n end\n timestamps {\n start\n end\n }\n statsUsd {\n volume {\n change\n currentValue\n previousValue\n buckets\n }\n buyVolume {\n change\n currentValue\n previousValue\n buckets\n }\n sellVolume {\n change\n currentValue\n previousValue\n buckets\n }\n open {\n change\n currentValue\n previousValue\n buckets\n }\n highest {\n change\n currentValue\n previousValue\n buckets\n }\n lowest {\n change\n currentValue\n previousValue\n buckets\n }\n close {\n change\n currentValue\n previousValue\n buckets\n }\n liquidity {\n change\n currentValue\n previousValue\n buckets\n }\n }\n statsNonCurrency {\n transactions {\n change\n currentValue\n previousValue\n buckets\n }\n buys {\n change\n currentValue\n previousValue\n buckets\n }\n sells {\n change\n currentValue\n previousValue\n buckets\n }\n traders {\n change\n currentValue\n previousValue\n buckets\n }\n buyers {\n change\n currentValue\n previousValue\n buckets\n }\n sellers {\n change\n currentValue\n previousValue\n buckets\n }\n }\n }\n stats_hour1 {\n duration\n start\n end\n timestamps {\n start\n end\n }\n statsUsd {\n volume {\n change\n currentValue\n previousValue\n buckets\n }\n buyVolume {\n change\n currentValue\n previousValue\n buckets\n }\n sellVolume {\n change\n currentValue\n previousValue\n buckets\n }\n open {\n change\n currentValue\n previousValue\n buckets\n }\n highest {\n change\n currentValue\n previousValue\n buckets\n }\n lowest {\n change\n currentValue\n previousValue\n buckets\n }\n close {\n change\n currentValue\n previousValue\n buckets\n }\n liquidity {\n change\n currentValue\n previousValue\n buckets\n }\n }\n statsNonCurrency {\n transactions {\n change\n currentValue\n previousValue\n buckets\n }\n buys {\n change\n currentValue\n previousValue\n buckets\n }\n sells {\n change\n currentValue\n previousValue\n buckets\n }\n traders {\n change\n currentValue\n previousValue\n buckets\n }\n buyers {\n change\n currentValue\n previousValue\n buckets\n }\n sellers {\n change\n currentValue\n previousValue\n buckets\n }\n }\n }\n stats_hour12 {\n duration\n start\n end\n timestamps {\n start\n end\n }\n statsUsd {\n volume {\n change\n currentValue\n previousValue\n buckets\n }\n buyVolume {\n change\n currentValue\n previousValue\n buckets\n }\n sellVolume {\n change\n currentValue\n previousValue\n buckets\n }\n open {\n change\n currentValue\n previousValue\n buckets\n }\n highest {\n change\n currentValue\n previousValue\n buckets\n }\n lowest {\n change\n currentValue\n previousValue\n buckets\n }\n close {\n change\n currentValue\n previousValue\n buckets\n }\n liquidity {\n change\n currentValue\n previousValue\n buckets\n }\n }\n statsNonCurrency {\n transactions {\n change\n currentValue\n previousValue\n buckets\n }\n buys {\n change\n currentValue\n previousValue\n buckets\n }\n sells {\n change\n currentValue\n previousValue\n buckets\n }\n traders {\n change\n currentValue\n previousValue\n buckets\n }\n buyers {\n change\n currentValue\n previousValue\n buckets\n }\n sellers {\n change\n currentValue\n previousValue\n buckets\n }\n }\n }\n stats_hour4 {\n duration\n start\n end\n timestamps {\n start\n end\n }\n statsUsd {\n volume {\n change\n currentValue\n previousValue\n buckets\n }\n buyVolume {\n change\n currentValue\n previousValue\n buckets\n }\n sellVolume {\n change\n currentValue\n previousValue\n buckets\n }\n open {\n change\n currentValue\n previousValue\n buckets\n }\n highest {\n change\n currentValue\n previousValue\n buckets\n }\n lowest {\n change\n currentValue\n previousValue\n buckets\n }\n close {\n change\n currentValue\n previousValue\n buckets\n }\n liquidity {\n change\n currentValue\n previousValue\n buckets\n }\n }\n statsNonCurrency {\n transactions {\n change\n currentValue\n previousValue\n buckets\n }\n buys {\n change\n currentValue\n previousValue\n buckets\n }\n sells {\n change\n currentValue\n previousValue\n buckets\n }\n traders {\n change\n currentValue\n previousValue\n buckets\n }\n buyers {\n change\n currentValue\n previousValue\n buckets\n }\n sellers {\n change\n currentValue\n previousValue\n buckets\n }\n }\n }\n stats_min15 {\n duration\n start\n end\n timestamps {\n start\n end\n }\n statsUsd {\n volume {\n change\n currentValue\n previousValue\n buckets\n }\n buyVolume {\n change\n currentValue\n previousValue\n buckets\n }\n sellVolume {\n change\n currentValue\n previousValue\n buckets\n }\n open {\n change\n currentValue\n previousValue\n buckets\n }\n highest {\n change\n currentValue\n previousValue\n buckets\n }\n lowest {\n change\n currentValue\n previousValue\n buckets\n }\n close {\n change\n currentValue\n previousValue\n buckets\n }\n liquidity {\n change\n currentValue\n previousValue\n buckets\n }\n }\n statsNonCurrency {\n transactions {\n change\n currentValue\n previousValue\n buckets\n }\n buys {\n change\n currentValue\n previousValue\n buckets\n }\n sells {\n change\n currentValue\n previousValue\n buckets\n }\n traders {\n change\n currentValue\n previousValue\n buckets\n }\n buyers {\n change\n currentValue\n previousValue\n buckets\n }\n sellers {\n change\n currentValue\n previousValue\n buckets\n }\n }\n }\n stats_min5 {\n duration\n start\n end\n timestamps {\n start\n end\n }\n statsUsd {\n volume {\n change\n currentValue\n previousValue\n buckets\n }\n buyVolume {\n change\n currentValue\n previousValue\n buckets\n }\n sellVolume {\n change\n currentValue\n previousValue\n buckets\n }\n open {\n change\n currentValue\n previousValue\n buckets\n }\n highest {\n change\n currentValue\n previousValue\n buckets\n }\n lowest {\n change\n currentValue\n previousValue\n buckets\n }\n close {\n change\n currentValue\n previousValue\n buckets\n }\n liquidity {\n change\n currentValue\n previousValue\n buckets\n }\n }\n statsNonCurrency {\n transactions {\n change\n currentValue\n previousValue\n buckets\n }\n buys {\n change\n currentValue\n previousValue\n buckets\n }\n sells {\n change\n currentValue\n previousValue\n buckets\n }\n traders {\n change\n currentValue\n previousValue\n buckets\n }\n buyers {\n change\n currentValue\n previousValue\n buckets\n }\n sellers {\n change\n currentValue\n previousValue\n buckets\n }\n }\n }\n stats_week1 {\n duration\n start\n end\n timestamps {\n start\n end\n }\n statsUsd {\n volume {\n change\n currentValue\n previousValue\n buckets\n }\n buyVolume {\n change\n currentValue\n previousValue\n buckets\n }\n sellVolume {\n change\n currentValue\n previousValue\n buckets\n }\n open {\n change\n currentValue\n previousValue\n buckets\n }\n highest {\n change\n currentValue\n previousValue\n buckets\n }\n lowest {\n change\n currentValue\n previousValue\n buckets\n }\n close {\n change\n currentValue\n previousValue\n buckets\n }\n liquidity {\n change\n currentValue\n previousValue\n buckets\n }\n }\n statsNonCurrency {\n transactions {\n change\n currentValue\n previousValue\n buckets\n }\n buys {\n change\n currentValue\n previousValue\n buckets\n }\n sells {\n change\n currentValue\n previousValue\n buckets\n }\n traders {\n change\n currentValue\n previousValue\n buckets\n }\n buyers {\n change\n currentValue\n previousValue\n buckets\n }\n sellers {\n change\n currentValue\n previousValue\n buckets\n }\n }\n }\n }\n}": types.GetDetailedPairStatsDocument,
"query GetNetworkStatus($networkIds: [Int!]!) {\n getNetworkStatus(networkIds: $networkIds) {\n networkName\n lastProcessedBlock\n lastProcessedTimestamp\n }\n}": types.GetNetworkStatusDocument,

@@ -53,2 +56,4 @@ "query GetNetworks {\n getNetworks {\n id\n name\n }\n}": types.GetNetworksDocument,

"query GetTokens($input: [TokenInput!]) {\n tokens(ids: $input) {\n address\n decimals\n id\n name\n networkId\n symbol\n totalSupply\n }\n}": types.GetTokensDocument,
"query GetWebhooks($cursor: String, $webhookId: String, $bucketId: String, $bucketSortkey: String, $limit: Int) {\n getWebhooks(\n cursor: $cursor\n webhookId: $webhookId\n bucketId: $bucketId\n bucketSortkey: $bucketSortkey\n limit: $limit\n ) {\n cursor\n items {\n alertRecurrence\n bucketId\n bucketSortkey\n callbackUrl\n conditions {\n ... on PriceEventWebhookCondition {\n tokenAddressPriceEvent: tokenAddress {\n eq\n }\n networkIdPriceEvent: networkId {\n eq\n }\n priceUsd {\n gt\n gte\n lt\n lte\n eq\n }\n }\n ... on DecodedLogWebhookCondition {\n decodingId {\n eq\n }\n eventName {\n eq\n }\n address {\n eq\n }\n event\n }\n ... on DecodedCallWebhookCondition {\n decodingId {\n eq\n }\n methodName {\n eq\n }\n address {\n eq\n }\n from {\n eq\n }\n to {\n eq\n }\n methodId {\n eq\n }\n output\n inputJSON: input\n }\n ... on RawCallTraceWebhookCondition {\n traceType {\n eq\n }\n result {\n code {\n contains\n notContains\n }\n }\n networkId {\n oneOf\n }\n }\n ... on TokenPairEventWebhookCondition {\n tokenAddress {\n eq\n }\n networkId {\n oneOf\n }\n swapValue {\n gt\n gte\n lt\n lte\n eq\n }\n maker {\n eq\n }\n pairAddress {\n eq\n }\n exchangeAddress {\n eq\n }\n eventType {\n oneOf\n }\n }\n ... on NftEventWebhookCondition {\n networkId {\n oneOf\n }\n maker {\n eq\n }\n contractAddress {\n eq\n }\n exchangeAddress {\n eq\n }\n tokenId {\n eq\n }\n tokenAddress {\n eq\n }\n individualBaseTokenPrice {\n gt\n gte\n lt\n lte\n eq\n }\n eventType {\n eq\n }\n fillSource {\n oneOf\n }\n }\n ... on RawTransactionWebhookCondition {\n networkId {\n oneOf\n }\n to {\n eq\n }\n from {\n eq\n }\n toOrFrom {\n eq\n }\n input {\n contains\n notContains\n }\n ignoreTokenPairEvents\n ignoreNftEvents\n }\n }\n }\n }\n}": types.GetWebhooksDocument,
"query ListPairsForToken($networkId: Int!, $tokenAddress: String!, $limit: Int) {\n listPairsForToken(\n networkId: $networkId\n tokenAddress: $tokenAddress\n limit: $limit\n ) {\n address\n exchangeHash\n fee\n id\n networkId\n tickSpacing\n pooled {\n token0\n token1\n }\n token0\n token1\n createdAt\n token0Data {\n address\n cmcId\n decimals\n id\n isScam\n name\n networkId\n symbol\n exchanges {\n address\n color\n id\n name\n exchangeVersion\n iconUrl\n networkId\n tradeUrl\n }\n info {\n id\n address\n circulatingSupply\n cmcId\n isScam\n name\n networkId\n symbol\n totalSupply\n imageThumbUrl\n imageSmallUrl\n imageLargeUrl\n }\n explorerData {\n id\n blueCheckmark\n description\n divisor\n tokenPriceUSD\n tokenType\n }\n }\n token1Data {\n address\n cmcId\n decimals\n id\n isScam\n name\n networkId\n symbol\n exchanges {\n address\n color\n id\n name\n exchangeVersion\n iconUrl\n networkId\n tradeUrl\n }\n info {\n id\n address\n circulatingSupply\n cmcId\n isScam\n name\n networkId\n symbol\n totalSupply\n imageThumbUrl\n imageSmallUrl\n imageLargeUrl\n }\n explorerData {\n id\n blueCheckmark\n description\n divisor\n tokenPriceUSD\n tokenType\n }\n }\n }\n}": types.ListPairsForTokenDocument,
"query ListTopTokens($limit: Int, $networkFilter: [Int!], $resolution: String) {\n listTopTokens(\n limit: $limit\n networkFilter: $networkFilter\n resolution: $resolution\n ) {\n address\n decimals\n exchanges {\n address\n id\n name\n iconUrl\n networkId\n tradeUrl\n }\n id\n liquidity\n name\n networkId\n price\n resolution\n symbol\n topPairId\n volume\n uniqueBuys24\n uniqueSells24\n txnCount24\n priceChange24\n }\n}": types.ListTopTokensDocument,

@@ -55,0 +60,0 @@ "subscription OnBarsUpdated($pairId: String, $quoteToken: QuoteToken) {\n onBarsUpdated(pairId: $pairId, quoteToken: $quoteToken) {\n eventSortKey\n networkId\n pairAddress\n pairId\n timestamp\n quoteToken\n aggregates {\n r1 {\n t\n usd {\n t\n o\n h\n l\n c\n volume\n }\n token {\n t\n o\n h\n l\n c\n volume\n }\n }\n r5 {\n t\n usd {\n t\n o\n h\n l\n c\n volume\n }\n token {\n t\n o\n h\n l\n c\n volume\n }\n }\n r15 {\n t\n usd {\n t\n o\n h\n l\n c\n volume\n }\n token {\n t\n o\n h\n l\n c\n volume\n }\n }\n r30 {\n t\n usd {\n t\n o\n h\n l\n c\n volume\n }\n token {\n t\n o\n h\n l\n c\n volume\n }\n }\n r60 {\n t\n usd {\n t\n o\n h\n l\n c\n volume\n }\n token {\n t\n o\n h\n l\n c\n volume\n }\n }\n r240 {\n t\n usd {\n t\n o\n h\n l\n c\n volume\n }\n token {\n t\n o\n h\n l\n c\n volume\n }\n }\n r720 {\n t\n usd {\n t\n o\n h\n l\n c\n volume\n }\n token {\n t\n o\n h\n l\n c\n volume\n }\n }\n r1D {\n t\n usd {\n t\n o\n h\n l\n c\n volume\n }\n token {\n t\n o\n h\n l\n c\n volume\n }\n }\n r7D {\n t\n usd {\n t\n o\n h\n l\n c\n volume\n }\n token {\n t\n o\n h\n l\n c\n volume\n }\n }\n }\n }\n}": types.OnBarsUpdatedDocument,

3

dist/sdk/index.d.ts
import { TypedDocumentNode } from "@graphql-typed-document-node/core";
import { Variables } from "graphql-request";
import { ExecutionResult, Sink } from "graphql-ws";
import { Mutation } from "./Mutation";
import { Query } from "./Query";

@@ -14,5 +15,7 @@ import { Subscribe } from "./Subscribe";

queries: Query;
mutations: Mutation;
subscriptions: Subscribe;
constructor(apiKey: string, apiUrl?: string, apiRealtimeUrl?: string);
query<TResults, TVars extends Variables>(doc: TypedDocumentNode<TResults, TVars>, args?: TVars): Promise<TResults>;
mutation<TResults, TVars extends Variables>(doc: TypedDocumentNode<TResults, TVars>, args?: TVars): Promise<TResults>;
send<TResults, V extends Variables = Variables>(gqlString: string, args?: V): Promise<TResults>;

@@ -19,0 +22,0 @@ subscribe<TResults, TVars extends Record<string, unknown> = Record<string, never>>(doc: string, args: TVars, sink: Sink<ExecutionResult<TResults>>): CleanupFunction;

@@ -20,2 +20,3 @@ "use strict";

const invariant_1 = require("./invariant");
const Mutation_1 = require("./Mutation");
const Query_1 = require("./Query");

@@ -30,2 +31,3 @@ const Subscribe_1 = require("./Subscribe");

this.queries = new Query_1.Query(this);
this.mutations = new Mutation_1.Mutation(this);
this.subscriptions = new Subscribe_1.Subscribe(this);

@@ -54,2 +56,8 @@ this.client = new graphql_request_1.GraphQLClient(this.apiUrl, {

}
mutation(doc, args = {}) {
return __awaiter(this, void 0, void 0, function* () {
const res = yield this.client.request(doc, ...[args]);
return res;
});
}
// Very simple network based fetch implementation, no compilation required

@@ -56,0 +64,0 @@ send(gqlString, args = {}) {

6

dist/sdk/Query.d.ts

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

import { QueryGetBarsArgs, QueryGetNetworkStatusArgs } from "../resources/graphql";
import { FilterExchangesQueryVariables, FilterPairsQueryVariables, FilterTokensQueryVariables, GetSparklinesQueryVariables, GetSymbolQueryVariables, PairEventsQueryVariables, QueryGetTokenPricesArgs, QueryListTopTokensArgs, QueryTokenArgs } from "./generated/graphql";
import { FilterExchangesQueryVariables, FilterPairsQueryVariables, FilterTokensQueryVariables, GetSparklinesQueryVariables, GetSymbolQueryVariables, ListPairsForTokenQueryVariables, PairEventsQueryVariables, QueryGetBarsArgs, QueryGetDetailedPairStatsArgs, QueryGetNetworkStatusArgs, QueryGetTokenPricesArgs, QueryGetWebhooksArgs, QueryListTopTokensArgs, QueryTokenArgs } from "./generated/graphql";
import { Defined } from "./index";

@@ -11,2 +10,3 @@ export declare class Query {

price: (vars: QueryGetTokenPricesArgs) => Promise<import("./generated/graphql").GetTokenPriceQuery>;
detailedPairStats: (vars: QueryGetDetailedPairStatsArgs) => Promise<import("./generated/graphql").GetDetailedPairStatsQuery>;
bars: (vars: QueryGetBarsArgs) => Promise<import("./generated/graphql").GetBarsQuery>;

@@ -16,2 +16,3 @@ topTokens: (vars: QueryListTopTokensArgs) => Promise<import("./generated/graphql").ListTopTokensQuery>;

filterPairs: (vars: FilterPairsQueryVariables) => Promise<import("./generated/graphql").FilterPairsQuery>;
listPairsForToken: (vars: ListPairsForTokenQueryVariables) => Promise<import("./generated/graphql").ListPairsForTokenQuery>;
filterExchanges: (vars: FilterExchangesQueryVariables) => Promise<import("./generated/graphql").FilterExchangesQuery>;

@@ -21,3 +22,4 @@ symbol: (vars: GetSymbolQueryVariables) => Promise<import("./generated/graphql").GetSymbolQuery>;

networkStatus: (vars: QueryGetNetworkStatusArgs) => Promise<import("./generated/graphql").GetNetworkStatusQuery>;
getWebhooks: (vars: QueryGetWebhooksArgs) => Promise<import("./generated/graphql").GetWebhooksQuery>;
}
//# sourceMappingURL=Query.d.ts.map

@@ -21,2 +21,3 @@ "use strict";

this.price = (vars) => __awaiter(this, void 0, void 0, function* () { return this.sdk.query(graphql_1.GetTokenPriceDocument, vars); });
this.detailedPairStats = (vars) => __awaiter(this, void 0, void 0, function* () { return this.sdk.query(graphql_1.GetDetailedPairStatsDocument, vars); });
this.bars = (vars) => __awaiter(this, void 0, void 0, function* () { return this.sdk.query(graphql_1.GetBarsDocument, vars); });

@@ -26,2 +27,3 @@ this.topTokens = (vars) => __awaiter(this, void 0, void 0, function* () { return this.sdk.query(graphql_1.ListTopTokensDocument, vars); });

this.filterPairs = (vars) => __awaiter(this, void 0, void 0, function* () { return this.sdk.query(graphql_1.FilterPairsDocument, vars); });
this.listPairsForToken = (vars) => __awaiter(this, void 0, void 0, function* () { return this.sdk.query(graphql_1.ListPairsForTokenDocument, vars); });
this.filterExchanges = (vars) => __awaiter(this, void 0, void 0, function* () { return this.sdk.query(graphql_1.FilterExchangesDocument, vars); });

@@ -31,2 +33,3 @@ this.symbol = (vars) => __awaiter(this, void 0, void 0, function* () { return this.sdk.query(graphql_1.GetSymbolDocument, vars); });

this.networkStatus = (vars) => __awaiter(this, void 0, void 0, function* () { return this.sdk.query(graphql_1.GetNetworkStatusDocument, vars); });
this.getWebhooks = (vars) => __awaiter(this, void 0, void 0, function* () { return this.sdk.query(graphql_1.GetWebhooksDocument, vars); });
}

@@ -33,0 +36,0 @@ }

{
"name": "@definedfi/sdk",
"version": "0.3.0",
"version": "0.4.0",
"engines": {
"node": ">=17.5.0"
},
"main": "dist/index.js",

@@ -5,0 +8,0 @@ "types": "dist/index.d.ts",

@@ -13,2 +13,3 @@ import { TypedDocumentNode } from "@graphql-typed-document-node/core";

import { invariant } from "./invariant";
import { Mutation } from "./Mutation";
import { Query } from "./Query";

@@ -23,2 +24,3 @@ import { Subscribe } from "./Subscribe";

public queries: Query;
public mutations: Mutation;
public subscriptions: Subscribe;

@@ -33,2 +35,3 @@

this.queries = new Query(this);
this.mutations = new Mutation(this);
this.subscriptions = new Subscribe(this);

@@ -63,2 +66,13 @@ this.client = new GraphQLClient(this.apiUrl, {

public async mutation<TResults, TVars extends Variables>(
doc: TypedDocumentNode<TResults, TVars>,
args: TVars = {} as TVars,
) {
const res = await this.client.request<typeof doc, TVars>(
doc,
...([args] as unknown as VariablesAndRequestHeadersArgs<TVars>),
);
return res as TResults;
}
// Very simple network based fetch implementation, no compilation required

@@ -65,0 +79,0 @@ public async send<TResults, V extends Variables = Variables>(

import {
QueryGetBarsArgs,
QueryGetNetworkStatusArgs,
} from "../resources/graphql";
import {
FilterExchangesDocument,

@@ -13,2 +9,3 @@ FilterExchangesQueryVariables,

GetBarsDocument,
GetDetailedPairStatsDocument,
GetNetworksDocument,

@@ -22,6 +19,13 @@ GetNetworkStatusDocument,

GetTokensDocument,
GetWebhooksDocument,
ListPairsForTokenDocument,
ListPairsForTokenQueryVariables,
ListTopTokensDocument,
PairEventsDocument,
PairEventsQueryVariables,
QueryGetBarsArgs,
QueryGetDetailedPairStatsArgs,
QueryGetNetworkStatusArgs,
QueryGetTokenPricesArgs,
QueryGetWebhooksArgs,
QueryListTopTokensArgs,

@@ -42,2 +46,4 @@ QueryTokenArgs,

this.sdk.query(GetTokenPriceDocument, vars);
detailedPairStats = async (vars: QueryGetDetailedPairStatsArgs) =>
this.sdk.query(GetDetailedPairStatsDocument, vars);
bars = async (vars: QueryGetBarsArgs) =>

@@ -51,2 +57,4 @@ this.sdk.query(GetBarsDocument, vars);

this.sdk.query(FilterPairsDocument, vars);
listPairsForToken = async (vars: ListPairsForTokenQueryVariables) =>
this.sdk.query(ListPairsForTokenDocument, vars);
filterExchanges = async (vars: FilterExchangesQueryVariables) =>

@@ -59,2 +67,4 @@ this.sdk.query(FilterExchangesDocument, vars);

this.sdk.query(GetNetworkStatusDocument, vars);
getWebhooks = async (vars: QueryGetWebhooksArgs) =>
this.sdk.query(GetWebhooksDocument, vars);
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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 too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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