@cityofzion/bs-ethereum 1.1.0 → 1.2.1
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/dist/BSEthereum.d.ts +2 -2
- package/dist/BSEthereum.js +12 -7
- package/dist/BitqueryBDSEthereum.d.ts +2 -3
- package/dist/BitqueryBDSEthereum.js +34 -50
- package/dist/BitqueryEDSEthereum.d.ts +2 -3
- package/dist/BitqueryEDSEthereum.js +27 -27
- package/dist/GhostMarketNDSEthereum.d.ts +1 -1
- package/dist/GhostMarketNDSEthereum.js +23 -11
- package/dist/LedgerServiceEthereum.d.ts +4 -2
- package/dist/LedgerServiceEthereum.js +13 -5
- package/dist/RpcBDSEthereum.d.ts +1 -1
- package/dist/RpcBDSEthereum.js +21 -7
- package/dist/constants.d.ts +2 -2
- package/dist/constants.js +3 -3
- package/package.json +6 -5
- package/.eslintignore +0 -13
- package/.eslintrc.cjs +0 -22
- package/.rush/temp/operation/build/all.log +0 -1
- package/.rush/temp/operation/build/state.json +0 -3
- package/.rush/temp/package-deps_build.json +0 -30
- package/.rush/temp/shrinkwrap-deps.json +0 -531
- package/CHANGELOG.json +0 -126
- package/CHANGELOG.md +0 -68
- package/bs-ethereum.build.log +0 -1
- package/dist/graphql.d.ts +0 -124
- package/dist/graphql.js +0 -160
- package/jest.config.ts +0 -13
- package/jest.setup.ts +0 -1
- package/src/BSEthereum.ts +0 -208
- package/src/BitqueryBDSEthereum.ts +0 -231
- package/src/BitqueryEDSEthereum.ts +0 -67
- package/src/GhostMarketNDSEthereum.ts +0 -125
- package/src/LedgerServiceEthereum.ts +0 -44
- package/src/RpcBDSEthereum.ts +0 -88
- package/src/__tests__/BSEthereum.spec.ts +0 -172
- package/src/__tests__/BitqueryBDSEthereum.spec.ts +0 -106
- package/src/__tests__/BitqueryEDSEthereum.spec.ts +0 -55
- package/src/__tests__/GhostMarketNDSEthereum.spec.ts +0 -49
- package/src/__tests__/RpcBDSEthereum.spec.ts +0 -62
- package/src/assets/tokens/common.json +0 -8
- package/src/constants.ts +0 -36
- package/src/graphql.ts +0 -288
- package/src/index.ts +0 -6
- package/tsconfig.build.json +0 -4
- package/tsconfig.json +0 -15
package/src/graphql.ts
DELETED
|
@@ -1,288 +0,0 @@
|
|
|
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(options: { desc: "date.date" }, time: { after: $after }) {
|
|
273
|
-
quoteCurrency(quoteCurrency: { is: "0xdac17f958d2ee523a2206206994597c13d831ec7" }) {
|
|
274
|
-
symbol
|
|
275
|
-
address
|
|
276
|
-
}
|
|
277
|
-
baseCurrency {
|
|
278
|
-
symbol
|
|
279
|
-
address
|
|
280
|
-
}
|
|
281
|
-
date {
|
|
282
|
-
date
|
|
283
|
-
}
|
|
284
|
-
quotePrice
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
`
|
package/src/index.ts
DELETED
package/tsconfig.build.json
DELETED
package/tsconfig.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
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
|
-
}
|