@cityofzion/bs-ethereum 0.8.1 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.rush/temp/operation/build/all.log +1 -1
- package/.rush/temp/operation/build/state.json +1 -1
- package/.rush/temp/package-deps_build.json +6 -4
- package/CHANGELOG.json +27 -0
- package/CHANGELOG.md +15 -0
- package/bs-ethereum.build.log +1 -1
- package/dist/BSEthereum.d.ts +24 -23
- package/dist/BSEthereum.js +184 -178
- package/dist/BitqueryBDSEthereum.d.ts +14 -14
- package/dist/BitqueryBDSEthereum.js +197 -197
- package/dist/BitqueryEDSEthereum.d.ts +8 -8
- package/dist/BitqueryEDSEthereum.js +73 -73
- package/dist/GhostMarketNDSEthereum.d.ts +10 -10
- package/dist/GhostMarketNDSEthereum.js +77 -77
- package/dist/RpcBDSEthereum.d.ts +12 -12
- package/dist/RpcBDSEthereum.js +89 -89
- package/dist/assets/tokens/common.json +8 -8
- package/dist/constants.d.ts +16 -16
- package/dist/constants.js +33 -33
- package/dist/graphql.d.ts +124 -124
- package/dist/graphql.js +163 -163
- package/dist/index.d.ts +6 -6
- package/dist/index.js +22 -22
- package/jest.config.ts +13 -13
- package/jest.setup.ts +1 -1
- package/package.json +34 -34
- package/src/BSEthereum.ts +189 -184
- package/src/BitqueryBDSEthereum.ts +230 -230
- package/src/BitqueryEDSEthereum.ts +67 -67
- package/src/GhostMarketNDSEthereum.ts +122 -122
- package/src/RpcBDSEthereum.ts +88 -88
- package/src/__tests__/BDSEthereum.spec.ts +123 -123
- package/src/__tests__/BSEthereum.spec.ts +129 -123
- package/src/__tests__/BitqueryEDSEthereum.spec.ts +49 -49
- package/src/__tests__/GhostMarketNDSEthereum.spec.ts +45 -45
- package/src/assets/tokens/common.json +7 -7
- package/src/constants.ts +37 -37
- package/src/graphql.ts +291 -291
- package/src/index.ts +6 -6
- package/tsconfig.build.json +4 -4
- package/tsconfig.json +15 -15
package/src/graphql.ts
CHANGED
|
@@ -1,291 +1,291 @@
|
|
|
1
|
-
import { gql } from '@urql/core'
|
|
2
|
-
|
|
3
|
-
type BitqueryNetwork = 'ethereum' | 'goerli'
|
|
4
|
-
|
|
5
|
-
export type BitqueryTransaction = {
|
|
6
|
-
block: {
|
|
7
|
-
timestamp: {
|
|
8
|
-
unixtime: number
|
|
9
|
-
}
|
|
10
|
-
height: number
|
|
11
|
-
}
|
|
12
|
-
transaction: {
|
|
13
|
-
gasValue: number
|
|
14
|
-
hash: string
|
|
15
|
-
}
|
|
16
|
-
amount: number
|
|
17
|
-
currency: {
|
|
18
|
-
address: string
|
|
19
|
-
tokenType: string
|
|
20
|
-
decimals: number
|
|
21
|
-
symbol: string
|
|
22
|
-
name: string
|
|
23
|
-
}
|
|
24
|
-
sender: {
|
|
25
|
-
address: string
|
|
26
|
-
}
|
|
27
|
-
receiver: {
|
|
28
|
-
address: string
|
|
29
|
-
}
|
|
30
|
-
entityId: string
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
type BitQueryGetTransactionsByAddressResponse = {
|
|
34
|
-
ethereum: {
|
|
35
|
-
sent: BitqueryTransaction[]
|
|
36
|
-
received: BitqueryTransaction[]
|
|
37
|
-
sentCount: {
|
|
38
|
-
count: number
|
|
39
|
-
}[]
|
|
40
|
-
receiverCount: {
|
|
41
|
-
count: number
|
|
42
|
-
}[]
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
type BitQueryGetTransactionsByAddressVariables = {
|
|
47
|
-
address: string
|
|
48
|
-
limit: number
|
|
49
|
-
offset: number
|
|
50
|
-
network: BitqueryNetwork
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export const bitqueryGetTransactionsByAddressQuery = gql<
|
|
54
|
-
BitQueryGetTransactionsByAddressResponse,
|
|
55
|
-
BitQueryGetTransactionsByAddressVariables
|
|
56
|
-
>`
|
|
57
|
-
query getTransactions($address: String!, $limit: Int!, $offset: Int!, $network: EthereumNetwork!) {
|
|
58
|
-
ethereum(network: $network) {
|
|
59
|
-
sent: transfers(
|
|
60
|
-
options: { limit: $limit, offset: $offset, desc: "block.timestamp.unixtime" }
|
|
61
|
-
sender: { is: $address }
|
|
62
|
-
) {
|
|
63
|
-
block {
|
|
64
|
-
timestamp {
|
|
65
|
-
unixtime
|
|
66
|
-
}
|
|
67
|
-
height
|
|
68
|
-
}
|
|
69
|
-
amount
|
|
70
|
-
currency {
|
|
71
|
-
address
|
|
72
|
-
tokenType
|
|
73
|
-
symbol
|
|
74
|
-
decimals
|
|
75
|
-
name
|
|
76
|
-
}
|
|
77
|
-
sender {
|
|
78
|
-
address
|
|
79
|
-
}
|
|
80
|
-
receiver {
|
|
81
|
-
address
|
|
82
|
-
}
|
|
83
|
-
transaction {
|
|
84
|
-
gasValue
|
|
85
|
-
hash
|
|
86
|
-
}
|
|
87
|
-
entityId
|
|
88
|
-
}
|
|
89
|
-
received: transfers(
|
|
90
|
-
options: { limit: $limit, offset: $offset, desc: "block.timestamp.unixtime" }
|
|
91
|
-
receiver: { is: $address }
|
|
92
|
-
) {
|
|
93
|
-
block {
|
|
94
|
-
timestamp {
|
|
95
|
-
unixtime
|
|
96
|
-
}
|
|
97
|
-
height
|
|
98
|
-
}
|
|
99
|
-
amount
|
|
100
|
-
currency {
|
|
101
|
-
address
|
|
102
|
-
tokenType
|
|
103
|
-
}
|
|
104
|
-
sender {
|
|
105
|
-
address
|
|
106
|
-
}
|
|
107
|
-
receiver {
|
|
108
|
-
address
|
|
109
|
-
}
|
|
110
|
-
transaction {
|
|
111
|
-
gasValue
|
|
112
|
-
hash
|
|
113
|
-
}
|
|
114
|
-
entityId
|
|
115
|
-
}
|
|
116
|
-
sentCount: transfers(sender: { is: $address }) {
|
|
117
|
-
count
|
|
118
|
-
}
|
|
119
|
-
receiverCount: transfers(receiver: { is: $address }) {
|
|
120
|
-
count
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
`
|
|
125
|
-
|
|
126
|
-
type BitQueryGetTransactionResponse = {
|
|
127
|
-
ethereum: {
|
|
128
|
-
transfers: BitqueryTransaction[]
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
type BitQueryGetTransactionVariables = {
|
|
132
|
-
hash: string
|
|
133
|
-
network: BitqueryNetwork
|
|
134
|
-
}
|
|
135
|
-
export const bitqueryGetTransactionQuery = gql<BitQueryGetTransactionResponse, BitQueryGetTransactionVariables>`
|
|
136
|
-
query getTransaction($hash: String!, $network: EthereumNetwork!) {
|
|
137
|
-
ethereum(network: $network) {
|
|
138
|
-
transfers(txHash: { is: $hash }) {
|
|
139
|
-
block {
|
|
140
|
-
timestamp {
|
|
141
|
-
unixtime
|
|
142
|
-
}
|
|
143
|
-
height
|
|
144
|
-
}
|
|
145
|
-
amount
|
|
146
|
-
currency {
|
|
147
|
-
address
|
|
148
|
-
tokenType
|
|
149
|
-
}
|
|
150
|
-
sender {
|
|
151
|
-
address
|
|
152
|
-
}
|
|
153
|
-
receiver {
|
|
154
|
-
address
|
|
155
|
-
}
|
|
156
|
-
transaction {
|
|
157
|
-
gasValue
|
|
158
|
-
hash
|
|
159
|
-
}
|
|
160
|
-
entityId
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
`
|
|
165
|
-
|
|
166
|
-
type BitQueryGetContractResponse = {
|
|
167
|
-
ethereum: {
|
|
168
|
-
smartContractCalls: {
|
|
169
|
-
smartContract: {
|
|
170
|
-
address: {
|
|
171
|
-
address: string
|
|
172
|
-
}
|
|
173
|
-
currency: {
|
|
174
|
-
symbol: string
|
|
175
|
-
name: string
|
|
176
|
-
decimals: number
|
|
177
|
-
tokenType: string
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}[]
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
type BitQueryGetTokenInfoVariables = {
|
|
184
|
-
hash: string
|
|
185
|
-
network: BitqueryNetwork
|
|
186
|
-
}
|
|
187
|
-
export const bitqueryGetTokenInfoQuery = gql<BitQueryGetContractResponse, BitQueryGetTokenInfoVariables>`
|
|
188
|
-
query getTokenInfo($hash: String!, $network: EthereumNetwork!) {
|
|
189
|
-
ethereum(network: $network) {
|
|
190
|
-
smartContractCalls(smartContractAddress: { is: $hash }, options: { limit: 1 }) {
|
|
191
|
-
smartContract {
|
|
192
|
-
address {
|
|
193
|
-
address
|
|
194
|
-
}
|
|
195
|
-
currency {
|
|
196
|
-
symbol
|
|
197
|
-
name
|
|
198
|
-
decimals
|
|
199
|
-
tokenType
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
`
|
|
206
|
-
|
|
207
|
-
type BitQueryGetBalanceResponse = {
|
|
208
|
-
ethereum: {
|
|
209
|
-
address: {
|
|
210
|
-
balance: number
|
|
211
|
-
balances:
|
|
212
|
-
| {
|
|
213
|
-
currency: {
|
|
214
|
-
address: string
|
|
215
|
-
symbol: string
|
|
216
|
-
name: string
|
|
217
|
-
decimals: number
|
|
218
|
-
}
|
|
219
|
-
value: number
|
|
220
|
-
}[]
|
|
221
|
-
| null
|
|
222
|
-
}[]
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
type BitQueryGetBalanceVariables = {
|
|
226
|
-
address: string
|
|
227
|
-
network: BitqueryNetwork
|
|
228
|
-
}
|
|
229
|
-
export const bitqueryGetBalanceQuery = gql<BitQueryGetBalanceResponse, BitQueryGetBalanceVariables>`
|
|
230
|
-
query getBalance($address: String!, $network: EthereumNetwork!) {
|
|
231
|
-
ethereum(network: $network) {
|
|
232
|
-
address(address: { is: $address }) {
|
|
233
|
-
balance
|
|
234
|
-
balances {
|
|
235
|
-
currency {
|
|
236
|
-
address
|
|
237
|
-
symbol
|
|
238
|
-
name
|
|
239
|
-
decimals
|
|
240
|
-
}
|
|
241
|
-
value
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
`
|
|
247
|
-
type BitQueryGetTokenPricesResponse = {
|
|
248
|
-
ethereum: {
|
|
249
|
-
dexTrades: {
|
|
250
|
-
baseCurrency: {
|
|
251
|
-
address: string
|
|
252
|
-
symbol: string
|
|
253
|
-
}
|
|
254
|
-
quoteCurrency: {
|
|
255
|
-
address: string
|
|
256
|
-
symbol: string
|
|
257
|
-
}
|
|
258
|
-
date: {
|
|
259
|
-
date: string
|
|
260
|
-
}
|
|
261
|
-
quotePrice: number
|
|
262
|
-
}[]
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
export type BitQueryGetTokenPricesVariables = {
|
|
266
|
-
after: string
|
|
267
|
-
network: BitqueryNetwork
|
|
268
|
-
}
|
|
269
|
-
export const bitqueryGetPricesQuery = gql<BitQueryGetTokenPricesResponse, BitQueryGetTokenPricesVariables>`
|
|
270
|
-
query getPrice($after: ISO8601DateTime!, $network: EthereumNetwork!) {
|
|
271
|
-
ethereum(network: $network) {
|
|
272
|
-
dexTrades(
|
|
273
|
-
options: { limitBy: { each: "baseCurrency.address", limit: 1 }, desc: "date.date" }
|
|
274
|
-
time: { after: $after }
|
|
275
|
-
) {
|
|
276
|
-
quoteCurrency(quoteCurrency: { is: "0xdac17f958d2ee523a2206206994597c13d831ec7" }) {
|
|
277
|
-
symbol
|
|
278
|
-
address
|
|
279
|
-
}
|
|
280
|
-
baseCurrency {
|
|
281
|
-
symbol
|
|
282
|
-
address
|
|
283
|
-
}
|
|
284
|
-
date {
|
|
285
|
-
date
|
|
286
|
-
}
|
|
287
|
-
quotePrice
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
`
|
|
1
|
+
import { gql } from '@urql/core'
|
|
2
|
+
|
|
3
|
+
type BitqueryNetwork = 'ethereum' | 'goerli'
|
|
4
|
+
|
|
5
|
+
export type BitqueryTransaction = {
|
|
6
|
+
block: {
|
|
7
|
+
timestamp: {
|
|
8
|
+
unixtime: number
|
|
9
|
+
}
|
|
10
|
+
height: number
|
|
11
|
+
}
|
|
12
|
+
transaction: {
|
|
13
|
+
gasValue: number
|
|
14
|
+
hash: string
|
|
15
|
+
}
|
|
16
|
+
amount: number
|
|
17
|
+
currency: {
|
|
18
|
+
address: string
|
|
19
|
+
tokenType: string
|
|
20
|
+
decimals: number
|
|
21
|
+
symbol: string
|
|
22
|
+
name: string
|
|
23
|
+
}
|
|
24
|
+
sender: {
|
|
25
|
+
address: string
|
|
26
|
+
}
|
|
27
|
+
receiver: {
|
|
28
|
+
address: string
|
|
29
|
+
}
|
|
30
|
+
entityId: string
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
type BitQueryGetTransactionsByAddressResponse = {
|
|
34
|
+
ethereum: {
|
|
35
|
+
sent: BitqueryTransaction[]
|
|
36
|
+
received: BitqueryTransaction[]
|
|
37
|
+
sentCount: {
|
|
38
|
+
count: number
|
|
39
|
+
}[]
|
|
40
|
+
receiverCount: {
|
|
41
|
+
count: number
|
|
42
|
+
}[]
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
type BitQueryGetTransactionsByAddressVariables = {
|
|
47
|
+
address: string
|
|
48
|
+
limit: number
|
|
49
|
+
offset: number
|
|
50
|
+
network: BitqueryNetwork
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export const bitqueryGetTransactionsByAddressQuery = gql<
|
|
54
|
+
BitQueryGetTransactionsByAddressResponse,
|
|
55
|
+
BitQueryGetTransactionsByAddressVariables
|
|
56
|
+
>`
|
|
57
|
+
query getTransactions($address: String!, $limit: Int!, $offset: Int!, $network: EthereumNetwork!) {
|
|
58
|
+
ethereum(network: $network) {
|
|
59
|
+
sent: transfers(
|
|
60
|
+
options: { limit: $limit, offset: $offset, desc: "block.timestamp.unixtime" }
|
|
61
|
+
sender: { is: $address }
|
|
62
|
+
) {
|
|
63
|
+
block {
|
|
64
|
+
timestamp {
|
|
65
|
+
unixtime
|
|
66
|
+
}
|
|
67
|
+
height
|
|
68
|
+
}
|
|
69
|
+
amount
|
|
70
|
+
currency {
|
|
71
|
+
address
|
|
72
|
+
tokenType
|
|
73
|
+
symbol
|
|
74
|
+
decimals
|
|
75
|
+
name
|
|
76
|
+
}
|
|
77
|
+
sender {
|
|
78
|
+
address
|
|
79
|
+
}
|
|
80
|
+
receiver {
|
|
81
|
+
address
|
|
82
|
+
}
|
|
83
|
+
transaction {
|
|
84
|
+
gasValue
|
|
85
|
+
hash
|
|
86
|
+
}
|
|
87
|
+
entityId
|
|
88
|
+
}
|
|
89
|
+
received: transfers(
|
|
90
|
+
options: { limit: $limit, offset: $offset, desc: "block.timestamp.unixtime" }
|
|
91
|
+
receiver: { is: $address }
|
|
92
|
+
) {
|
|
93
|
+
block {
|
|
94
|
+
timestamp {
|
|
95
|
+
unixtime
|
|
96
|
+
}
|
|
97
|
+
height
|
|
98
|
+
}
|
|
99
|
+
amount
|
|
100
|
+
currency {
|
|
101
|
+
address
|
|
102
|
+
tokenType
|
|
103
|
+
}
|
|
104
|
+
sender {
|
|
105
|
+
address
|
|
106
|
+
}
|
|
107
|
+
receiver {
|
|
108
|
+
address
|
|
109
|
+
}
|
|
110
|
+
transaction {
|
|
111
|
+
gasValue
|
|
112
|
+
hash
|
|
113
|
+
}
|
|
114
|
+
entityId
|
|
115
|
+
}
|
|
116
|
+
sentCount: transfers(sender: { is: $address }) {
|
|
117
|
+
count
|
|
118
|
+
}
|
|
119
|
+
receiverCount: transfers(receiver: { is: $address }) {
|
|
120
|
+
count
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
`
|
|
125
|
+
|
|
126
|
+
type BitQueryGetTransactionResponse = {
|
|
127
|
+
ethereum: {
|
|
128
|
+
transfers: BitqueryTransaction[]
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
type BitQueryGetTransactionVariables = {
|
|
132
|
+
hash: string
|
|
133
|
+
network: BitqueryNetwork
|
|
134
|
+
}
|
|
135
|
+
export const bitqueryGetTransactionQuery = gql<BitQueryGetTransactionResponse, BitQueryGetTransactionVariables>`
|
|
136
|
+
query getTransaction($hash: String!, $network: EthereumNetwork!) {
|
|
137
|
+
ethereum(network: $network) {
|
|
138
|
+
transfers(txHash: { is: $hash }) {
|
|
139
|
+
block {
|
|
140
|
+
timestamp {
|
|
141
|
+
unixtime
|
|
142
|
+
}
|
|
143
|
+
height
|
|
144
|
+
}
|
|
145
|
+
amount
|
|
146
|
+
currency {
|
|
147
|
+
address
|
|
148
|
+
tokenType
|
|
149
|
+
}
|
|
150
|
+
sender {
|
|
151
|
+
address
|
|
152
|
+
}
|
|
153
|
+
receiver {
|
|
154
|
+
address
|
|
155
|
+
}
|
|
156
|
+
transaction {
|
|
157
|
+
gasValue
|
|
158
|
+
hash
|
|
159
|
+
}
|
|
160
|
+
entityId
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
`
|
|
165
|
+
|
|
166
|
+
type BitQueryGetContractResponse = {
|
|
167
|
+
ethereum: {
|
|
168
|
+
smartContractCalls: {
|
|
169
|
+
smartContract: {
|
|
170
|
+
address: {
|
|
171
|
+
address: string
|
|
172
|
+
}
|
|
173
|
+
currency: {
|
|
174
|
+
symbol: string
|
|
175
|
+
name: string
|
|
176
|
+
decimals: number
|
|
177
|
+
tokenType: string
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}[]
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
type BitQueryGetTokenInfoVariables = {
|
|
184
|
+
hash: string
|
|
185
|
+
network: BitqueryNetwork
|
|
186
|
+
}
|
|
187
|
+
export const bitqueryGetTokenInfoQuery = gql<BitQueryGetContractResponse, BitQueryGetTokenInfoVariables>`
|
|
188
|
+
query getTokenInfo($hash: String!, $network: EthereumNetwork!) {
|
|
189
|
+
ethereum(network: $network) {
|
|
190
|
+
smartContractCalls(smartContractAddress: { is: $hash }, options: { limit: 1 }) {
|
|
191
|
+
smartContract {
|
|
192
|
+
address {
|
|
193
|
+
address
|
|
194
|
+
}
|
|
195
|
+
currency {
|
|
196
|
+
symbol
|
|
197
|
+
name
|
|
198
|
+
decimals
|
|
199
|
+
tokenType
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
`
|
|
206
|
+
|
|
207
|
+
type BitQueryGetBalanceResponse = {
|
|
208
|
+
ethereum: {
|
|
209
|
+
address: {
|
|
210
|
+
balance: number
|
|
211
|
+
balances:
|
|
212
|
+
| {
|
|
213
|
+
currency: {
|
|
214
|
+
address: string
|
|
215
|
+
symbol: string
|
|
216
|
+
name: string
|
|
217
|
+
decimals: number
|
|
218
|
+
}
|
|
219
|
+
value: number
|
|
220
|
+
}[]
|
|
221
|
+
| null
|
|
222
|
+
}[]
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
type BitQueryGetBalanceVariables = {
|
|
226
|
+
address: string
|
|
227
|
+
network: BitqueryNetwork
|
|
228
|
+
}
|
|
229
|
+
export const bitqueryGetBalanceQuery = gql<BitQueryGetBalanceResponse, BitQueryGetBalanceVariables>`
|
|
230
|
+
query getBalance($address: String!, $network: EthereumNetwork!) {
|
|
231
|
+
ethereum(network: $network) {
|
|
232
|
+
address(address: { is: $address }) {
|
|
233
|
+
balance
|
|
234
|
+
balances {
|
|
235
|
+
currency {
|
|
236
|
+
address
|
|
237
|
+
symbol
|
|
238
|
+
name
|
|
239
|
+
decimals
|
|
240
|
+
}
|
|
241
|
+
value
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
`
|
|
247
|
+
type BitQueryGetTokenPricesResponse = {
|
|
248
|
+
ethereum: {
|
|
249
|
+
dexTrades: {
|
|
250
|
+
baseCurrency: {
|
|
251
|
+
address: string
|
|
252
|
+
symbol: string
|
|
253
|
+
}
|
|
254
|
+
quoteCurrency: {
|
|
255
|
+
address: string
|
|
256
|
+
symbol: string
|
|
257
|
+
}
|
|
258
|
+
date: {
|
|
259
|
+
date: string
|
|
260
|
+
}
|
|
261
|
+
quotePrice: number
|
|
262
|
+
}[]
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
export type BitQueryGetTokenPricesVariables = {
|
|
266
|
+
after: string
|
|
267
|
+
network: BitqueryNetwork
|
|
268
|
+
}
|
|
269
|
+
export const bitqueryGetPricesQuery = gql<BitQueryGetTokenPricesResponse, BitQueryGetTokenPricesVariables>`
|
|
270
|
+
query getPrice($after: ISO8601DateTime!, $network: EthereumNetwork!) {
|
|
271
|
+
ethereum(network: $network) {
|
|
272
|
+
dexTrades(
|
|
273
|
+
options: { limitBy: { each: "baseCurrency.address", limit: 1 }, desc: "date.date" }
|
|
274
|
+
time: { after: $after }
|
|
275
|
+
) {
|
|
276
|
+
quoteCurrency(quoteCurrency: { is: "0xdac17f958d2ee523a2206206994597c13d831ec7" }) {
|
|
277
|
+
symbol
|
|
278
|
+
address
|
|
279
|
+
}
|
|
280
|
+
baseCurrency {
|
|
281
|
+
symbol
|
|
282
|
+
address
|
|
283
|
+
}
|
|
284
|
+
date {
|
|
285
|
+
date
|
|
286
|
+
}
|
|
287
|
+
quotePrice
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
`
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './BSEthereum'
|
|
2
|
-
export * from './GhostMarketNDSEthereum'
|
|
3
|
-
export * from './constants'
|
|
4
|
-
export * from './BitqueryBDSEthereum'
|
|
5
|
-
export * from './BitqueryEDSEthereum'
|
|
6
|
-
export * from './RpcBDSEthereum'
|
|
1
|
+
export * from './BSEthereum'
|
|
2
|
+
export * from './GhostMarketNDSEthereum'
|
|
3
|
+
export * from './constants'
|
|
4
|
+
export * from './BitqueryBDSEthereum'
|
|
5
|
+
export * from './BitqueryEDSEthereum'
|
|
6
|
+
export * from './RpcBDSEthereum'
|
package/tsconfig.build.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.json",
|
|
3
|
-
"exclude": ["src/__tests__"]
|
|
4
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.json",
|
|
3
|
+
"exclude": ["src/__tests__"]
|
|
4
|
+
}
|
package/tsconfig.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"lib": ["ESNext"],
|
|
5
|
-
"outDir": "./dist",
|
|
6
|
-
"strict": true
|
|
7
|
-
},
|
|
8
|
-
"include": ["src"],
|
|
9
|
-
"exclude": ["node_modules"],
|
|
10
|
-
"typedocOptions": {
|
|
11
|
-
"entryPoints": ["./src/index.ts"],
|
|
12
|
-
"out": "docs",
|
|
13
|
-
"exclude": "**/node_modules/**"
|
|
14
|
-
}
|
|
15
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"lib": ["ESNext"],
|
|
5
|
+
"outDir": "./dist",
|
|
6
|
+
"strict": true
|
|
7
|
+
},
|
|
8
|
+
"include": ["src"],
|
|
9
|
+
"exclude": ["node_modules"],
|
|
10
|
+
"typedocOptions": {
|
|
11
|
+
"entryPoints": ["./src/index.ts"],
|
|
12
|
+
"out": "docs",
|
|
13
|
+
"exclude": "**/node_modules/**"
|
|
14
|
+
}
|
|
15
|
+
}
|