@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/dist/graphql.d.ts
CHANGED
|
@@ -1,124 +1,124 @@
|
|
|
1
|
-
type BitqueryNetwork = 'ethereum' | 'goerli';
|
|
2
|
-
export type BitqueryTransaction = {
|
|
3
|
-
block: {
|
|
4
|
-
timestamp: {
|
|
5
|
-
unixtime: number;
|
|
6
|
-
};
|
|
7
|
-
height: number;
|
|
8
|
-
};
|
|
9
|
-
transaction: {
|
|
10
|
-
gasValue: number;
|
|
11
|
-
hash: string;
|
|
12
|
-
};
|
|
13
|
-
amount: number;
|
|
14
|
-
currency: {
|
|
15
|
-
address: string;
|
|
16
|
-
tokenType: string;
|
|
17
|
-
decimals: number;
|
|
18
|
-
symbol: string;
|
|
19
|
-
name: string;
|
|
20
|
-
};
|
|
21
|
-
sender: {
|
|
22
|
-
address: string;
|
|
23
|
-
};
|
|
24
|
-
receiver: {
|
|
25
|
-
address: string;
|
|
26
|
-
};
|
|
27
|
-
entityId: string;
|
|
28
|
-
};
|
|
29
|
-
type BitQueryGetTransactionsByAddressResponse = {
|
|
30
|
-
ethereum: {
|
|
31
|
-
sent: BitqueryTransaction[];
|
|
32
|
-
received: BitqueryTransaction[];
|
|
33
|
-
sentCount: {
|
|
34
|
-
count: number;
|
|
35
|
-
}[];
|
|
36
|
-
receiverCount: {
|
|
37
|
-
count: number;
|
|
38
|
-
}[];
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
type BitQueryGetTransactionsByAddressVariables = {
|
|
42
|
-
address: string;
|
|
43
|
-
limit: number;
|
|
44
|
-
offset: number;
|
|
45
|
-
network: BitqueryNetwork;
|
|
46
|
-
};
|
|
47
|
-
export declare const bitqueryGetTransactionsByAddressQuery: import("@urql/core/dist/urql-core-chunk").TypedDocumentNode<BitQueryGetTransactionsByAddressResponse, BitQueryGetTransactionsByAddressVariables>;
|
|
48
|
-
type BitQueryGetTransactionResponse = {
|
|
49
|
-
ethereum: {
|
|
50
|
-
transfers: BitqueryTransaction[];
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
type BitQueryGetTransactionVariables = {
|
|
54
|
-
hash: string;
|
|
55
|
-
network: BitqueryNetwork;
|
|
56
|
-
};
|
|
57
|
-
export declare const bitqueryGetTransactionQuery: import("@urql/core/dist/urql-core-chunk").TypedDocumentNode<BitQueryGetTransactionResponse, BitQueryGetTransactionVariables>;
|
|
58
|
-
type BitQueryGetContractResponse = {
|
|
59
|
-
ethereum: {
|
|
60
|
-
smartContractCalls: {
|
|
61
|
-
smartContract: {
|
|
62
|
-
address: {
|
|
63
|
-
address: string;
|
|
64
|
-
};
|
|
65
|
-
currency: {
|
|
66
|
-
symbol: string;
|
|
67
|
-
name: string;
|
|
68
|
-
decimals: number;
|
|
69
|
-
tokenType: string;
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
}[];
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
|
-
type BitQueryGetTokenInfoVariables = {
|
|
76
|
-
hash: string;
|
|
77
|
-
network: BitqueryNetwork;
|
|
78
|
-
};
|
|
79
|
-
export declare const bitqueryGetTokenInfoQuery: import("@urql/core/dist/urql-core-chunk").TypedDocumentNode<BitQueryGetContractResponse, BitQueryGetTokenInfoVariables>;
|
|
80
|
-
type BitQueryGetBalanceResponse = {
|
|
81
|
-
ethereum: {
|
|
82
|
-
address: {
|
|
83
|
-
balance: number;
|
|
84
|
-
balances: {
|
|
85
|
-
currency: {
|
|
86
|
-
address: string;
|
|
87
|
-
symbol: string;
|
|
88
|
-
name: string;
|
|
89
|
-
decimals: number;
|
|
90
|
-
};
|
|
91
|
-
value: number;
|
|
92
|
-
}[] | null;
|
|
93
|
-
}[];
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
type BitQueryGetBalanceVariables = {
|
|
97
|
-
address: string;
|
|
98
|
-
network: BitqueryNetwork;
|
|
99
|
-
};
|
|
100
|
-
export declare const bitqueryGetBalanceQuery: import("@urql/core/dist/urql-core-chunk").TypedDocumentNode<BitQueryGetBalanceResponse, BitQueryGetBalanceVariables>;
|
|
101
|
-
type BitQueryGetTokenPricesResponse = {
|
|
102
|
-
ethereum: {
|
|
103
|
-
dexTrades: {
|
|
104
|
-
baseCurrency: {
|
|
105
|
-
address: string;
|
|
106
|
-
symbol: string;
|
|
107
|
-
};
|
|
108
|
-
quoteCurrency: {
|
|
109
|
-
address: string;
|
|
110
|
-
symbol: string;
|
|
111
|
-
};
|
|
112
|
-
date: {
|
|
113
|
-
date: string;
|
|
114
|
-
};
|
|
115
|
-
quotePrice: number;
|
|
116
|
-
}[];
|
|
117
|
-
};
|
|
118
|
-
};
|
|
119
|
-
export type BitQueryGetTokenPricesVariables = {
|
|
120
|
-
after: string;
|
|
121
|
-
network: BitqueryNetwork;
|
|
122
|
-
};
|
|
123
|
-
export declare const bitqueryGetPricesQuery: import("@urql/core/dist/urql-core-chunk").TypedDocumentNode<BitQueryGetTokenPricesResponse, BitQueryGetTokenPricesVariables>;
|
|
124
|
-
export {};
|
|
1
|
+
type BitqueryNetwork = 'ethereum' | 'goerli';
|
|
2
|
+
export type BitqueryTransaction = {
|
|
3
|
+
block: {
|
|
4
|
+
timestamp: {
|
|
5
|
+
unixtime: number;
|
|
6
|
+
};
|
|
7
|
+
height: number;
|
|
8
|
+
};
|
|
9
|
+
transaction: {
|
|
10
|
+
gasValue: number;
|
|
11
|
+
hash: string;
|
|
12
|
+
};
|
|
13
|
+
amount: number;
|
|
14
|
+
currency: {
|
|
15
|
+
address: string;
|
|
16
|
+
tokenType: string;
|
|
17
|
+
decimals: number;
|
|
18
|
+
symbol: string;
|
|
19
|
+
name: string;
|
|
20
|
+
};
|
|
21
|
+
sender: {
|
|
22
|
+
address: string;
|
|
23
|
+
};
|
|
24
|
+
receiver: {
|
|
25
|
+
address: string;
|
|
26
|
+
};
|
|
27
|
+
entityId: string;
|
|
28
|
+
};
|
|
29
|
+
type BitQueryGetTransactionsByAddressResponse = {
|
|
30
|
+
ethereum: {
|
|
31
|
+
sent: BitqueryTransaction[];
|
|
32
|
+
received: BitqueryTransaction[];
|
|
33
|
+
sentCount: {
|
|
34
|
+
count: number;
|
|
35
|
+
}[];
|
|
36
|
+
receiverCount: {
|
|
37
|
+
count: number;
|
|
38
|
+
}[];
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
type BitQueryGetTransactionsByAddressVariables = {
|
|
42
|
+
address: string;
|
|
43
|
+
limit: number;
|
|
44
|
+
offset: number;
|
|
45
|
+
network: BitqueryNetwork;
|
|
46
|
+
};
|
|
47
|
+
export declare const bitqueryGetTransactionsByAddressQuery: import("@urql/core/dist/urql-core-chunk").TypedDocumentNode<BitQueryGetTransactionsByAddressResponse, BitQueryGetTransactionsByAddressVariables>;
|
|
48
|
+
type BitQueryGetTransactionResponse = {
|
|
49
|
+
ethereum: {
|
|
50
|
+
transfers: BitqueryTransaction[];
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
type BitQueryGetTransactionVariables = {
|
|
54
|
+
hash: string;
|
|
55
|
+
network: BitqueryNetwork;
|
|
56
|
+
};
|
|
57
|
+
export declare const bitqueryGetTransactionQuery: import("@urql/core/dist/urql-core-chunk").TypedDocumentNode<BitQueryGetTransactionResponse, BitQueryGetTransactionVariables>;
|
|
58
|
+
type BitQueryGetContractResponse = {
|
|
59
|
+
ethereum: {
|
|
60
|
+
smartContractCalls: {
|
|
61
|
+
smartContract: {
|
|
62
|
+
address: {
|
|
63
|
+
address: string;
|
|
64
|
+
};
|
|
65
|
+
currency: {
|
|
66
|
+
symbol: string;
|
|
67
|
+
name: string;
|
|
68
|
+
decimals: number;
|
|
69
|
+
tokenType: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
}[];
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
type BitQueryGetTokenInfoVariables = {
|
|
76
|
+
hash: string;
|
|
77
|
+
network: BitqueryNetwork;
|
|
78
|
+
};
|
|
79
|
+
export declare const bitqueryGetTokenInfoQuery: import("@urql/core/dist/urql-core-chunk").TypedDocumentNode<BitQueryGetContractResponse, BitQueryGetTokenInfoVariables>;
|
|
80
|
+
type BitQueryGetBalanceResponse = {
|
|
81
|
+
ethereum: {
|
|
82
|
+
address: {
|
|
83
|
+
balance: number;
|
|
84
|
+
balances: {
|
|
85
|
+
currency: {
|
|
86
|
+
address: string;
|
|
87
|
+
symbol: string;
|
|
88
|
+
name: string;
|
|
89
|
+
decimals: number;
|
|
90
|
+
};
|
|
91
|
+
value: number;
|
|
92
|
+
}[] | null;
|
|
93
|
+
}[];
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
type BitQueryGetBalanceVariables = {
|
|
97
|
+
address: string;
|
|
98
|
+
network: BitqueryNetwork;
|
|
99
|
+
};
|
|
100
|
+
export declare const bitqueryGetBalanceQuery: import("@urql/core/dist/urql-core-chunk").TypedDocumentNode<BitQueryGetBalanceResponse, BitQueryGetBalanceVariables>;
|
|
101
|
+
type BitQueryGetTokenPricesResponse = {
|
|
102
|
+
ethereum: {
|
|
103
|
+
dexTrades: {
|
|
104
|
+
baseCurrency: {
|
|
105
|
+
address: string;
|
|
106
|
+
symbol: string;
|
|
107
|
+
};
|
|
108
|
+
quoteCurrency: {
|
|
109
|
+
address: string;
|
|
110
|
+
symbol: string;
|
|
111
|
+
};
|
|
112
|
+
date: {
|
|
113
|
+
date: string;
|
|
114
|
+
};
|
|
115
|
+
quotePrice: number;
|
|
116
|
+
}[];
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
export type BitQueryGetTokenPricesVariables = {
|
|
120
|
+
after: string;
|
|
121
|
+
network: BitqueryNetwork;
|
|
122
|
+
};
|
|
123
|
+
export declare const bitqueryGetPricesQuery: import("@urql/core/dist/urql-core-chunk").TypedDocumentNode<BitQueryGetTokenPricesResponse, BitQueryGetTokenPricesVariables>;
|
|
124
|
+
export {};
|
package/dist/graphql.js
CHANGED
|
@@ -1,163 +1,163 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.bitqueryGetPricesQuery = exports.bitqueryGetBalanceQuery = exports.bitqueryGetTokenInfoQuery = exports.bitqueryGetTransactionQuery = exports.bitqueryGetTransactionsByAddressQuery = void 0;
|
|
4
|
-
const core_1 = require("@urql/core");
|
|
5
|
-
exports.bitqueryGetTransactionsByAddressQuery = (0, core_1.gql) `
|
|
6
|
-
query getTransactions($address: String!, $limit: Int!, $offset: Int!, $network: EthereumNetwork!) {
|
|
7
|
-
ethereum(network: $network) {
|
|
8
|
-
sent: transfers(
|
|
9
|
-
options: { limit: $limit, offset: $offset, desc: "block.timestamp.unixtime" }
|
|
10
|
-
sender: { is: $address }
|
|
11
|
-
) {
|
|
12
|
-
block {
|
|
13
|
-
timestamp {
|
|
14
|
-
unixtime
|
|
15
|
-
}
|
|
16
|
-
height
|
|
17
|
-
}
|
|
18
|
-
amount
|
|
19
|
-
currency {
|
|
20
|
-
address
|
|
21
|
-
tokenType
|
|
22
|
-
symbol
|
|
23
|
-
decimals
|
|
24
|
-
name
|
|
25
|
-
}
|
|
26
|
-
sender {
|
|
27
|
-
address
|
|
28
|
-
}
|
|
29
|
-
receiver {
|
|
30
|
-
address
|
|
31
|
-
}
|
|
32
|
-
transaction {
|
|
33
|
-
gasValue
|
|
34
|
-
hash
|
|
35
|
-
}
|
|
36
|
-
entityId
|
|
37
|
-
}
|
|
38
|
-
received: transfers(
|
|
39
|
-
options: { limit: $limit, offset: $offset, desc: "block.timestamp.unixtime" }
|
|
40
|
-
receiver: { is: $address }
|
|
41
|
-
) {
|
|
42
|
-
block {
|
|
43
|
-
timestamp {
|
|
44
|
-
unixtime
|
|
45
|
-
}
|
|
46
|
-
height
|
|
47
|
-
}
|
|
48
|
-
amount
|
|
49
|
-
currency {
|
|
50
|
-
address
|
|
51
|
-
tokenType
|
|
52
|
-
}
|
|
53
|
-
sender {
|
|
54
|
-
address
|
|
55
|
-
}
|
|
56
|
-
receiver {
|
|
57
|
-
address
|
|
58
|
-
}
|
|
59
|
-
transaction {
|
|
60
|
-
gasValue
|
|
61
|
-
hash
|
|
62
|
-
}
|
|
63
|
-
entityId
|
|
64
|
-
}
|
|
65
|
-
sentCount: transfers(sender: { is: $address }) {
|
|
66
|
-
count
|
|
67
|
-
}
|
|
68
|
-
receiverCount: transfers(receiver: { is: $address }) {
|
|
69
|
-
count
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
`;
|
|
74
|
-
exports.bitqueryGetTransactionQuery = (0, core_1.gql) `
|
|
75
|
-
query getTransaction($hash: String!, $network: EthereumNetwork!) {
|
|
76
|
-
ethereum(network: $network) {
|
|
77
|
-
transfers(txHash: { is: $hash }) {
|
|
78
|
-
block {
|
|
79
|
-
timestamp {
|
|
80
|
-
unixtime
|
|
81
|
-
}
|
|
82
|
-
height
|
|
83
|
-
}
|
|
84
|
-
amount
|
|
85
|
-
currency {
|
|
86
|
-
address
|
|
87
|
-
tokenType
|
|
88
|
-
}
|
|
89
|
-
sender {
|
|
90
|
-
address
|
|
91
|
-
}
|
|
92
|
-
receiver {
|
|
93
|
-
address
|
|
94
|
-
}
|
|
95
|
-
transaction {
|
|
96
|
-
gasValue
|
|
97
|
-
hash
|
|
98
|
-
}
|
|
99
|
-
entityId
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
`;
|
|
104
|
-
exports.bitqueryGetTokenInfoQuery = (0, core_1.gql) `
|
|
105
|
-
query getTokenInfo($hash: String!, $network: EthereumNetwork!) {
|
|
106
|
-
ethereum(network: $network) {
|
|
107
|
-
smartContractCalls(smartContractAddress: { is: $hash }, options: { limit: 1 }) {
|
|
108
|
-
smartContract {
|
|
109
|
-
address {
|
|
110
|
-
address
|
|
111
|
-
}
|
|
112
|
-
currency {
|
|
113
|
-
symbol
|
|
114
|
-
name
|
|
115
|
-
decimals
|
|
116
|
-
tokenType
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
`;
|
|
123
|
-
exports.bitqueryGetBalanceQuery = (0, core_1.gql) `
|
|
124
|
-
query getBalance($address: String!, $network: EthereumNetwork!) {
|
|
125
|
-
ethereum(network: $network) {
|
|
126
|
-
address(address: { is: $address }) {
|
|
127
|
-
balance
|
|
128
|
-
balances {
|
|
129
|
-
currency {
|
|
130
|
-
address
|
|
131
|
-
symbol
|
|
132
|
-
name
|
|
133
|
-
decimals
|
|
134
|
-
}
|
|
135
|
-
value
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
`;
|
|
141
|
-
exports.bitqueryGetPricesQuery = (0, core_1.gql) `
|
|
142
|
-
query getPrice($after: ISO8601DateTime!, $network: EthereumNetwork!) {
|
|
143
|
-
ethereum(network: $network) {
|
|
144
|
-
dexTrades(
|
|
145
|
-
options: { limitBy: { each: "baseCurrency.address", limit: 1 }, desc: "date.date" }
|
|
146
|
-
time: { after: $after }
|
|
147
|
-
) {
|
|
148
|
-
quoteCurrency(quoteCurrency: { is: "0xdac17f958d2ee523a2206206994597c13d831ec7" }) {
|
|
149
|
-
symbol
|
|
150
|
-
address
|
|
151
|
-
}
|
|
152
|
-
baseCurrency {
|
|
153
|
-
symbol
|
|
154
|
-
address
|
|
155
|
-
}
|
|
156
|
-
date {
|
|
157
|
-
date
|
|
158
|
-
}
|
|
159
|
-
quotePrice
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
`;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bitqueryGetPricesQuery = exports.bitqueryGetBalanceQuery = exports.bitqueryGetTokenInfoQuery = exports.bitqueryGetTransactionQuery = exports.bitqueryGetTransactionsByAddressQuery = void 0;
|
|
4
|
+
const core_1 = require("@urql/core");
|
|
5
|
+
exports.bitqueryGetTransactionsByAddressQuery = (0, core_1.gql) `
|
|
6
|
+
query getTransactions($address: String!, $limit: Int!, $offset: Int!, $network: EthereumNetwork!) {
|
|
7
|
+
ethereum(network: $network) {
|
|
8
|
+
sent: transfers(
|
|
9
|
+
options: { limit: $limit, offset: $offset, desc: "block.timestamp.unixtime" }
|
|
10
|
+
sender: { is: $address }
|
|
11
|
+
) {
|
|
12
|
+
block {
|
|
13
|
+
timestamp {
|
|
14
|
+
unixtime
|
|
15
|
+
}
|
|
16
|
+
height
|
|
17
|
+
}
|
|
18
|
+
amount
|
|
19
|
+
currency {
|
|
20
|
+
address
|
|
21
|
+
tokenType
|
|
22
|
+
symbol
|
|
23
|
+
decimals
|
|
24
|
+
name
|
|
25
|
+
}
|
|
26
|
+
sender {
|
|
27
|
+
address
|
|
28
|
+
}
|
|
29
|
+
receiver {
|
|
30
|
+
address
|
|
31
|
+
}
|
|
32
|
+
transaction {
|
|
33
|
+
gasValue
|
|
34
|
+
hash
|
|
35
|
+
}
|
|
36
|
+
entityId
|
|
37
|
+
}
|
|
38
|
+
received: transfers(
|
|
39
|
+
options: { limit: $limit, offset: $offset, desc: "block.timestamp.unixtime" }
|
|
40
|
+
receiver: { is: $address }
|
|
41
|
+
) {
|
|
42
|
+
block {
|
|
43
|
+
timestamp {
|
|
44
|
+
unixtime
|
|
45
|
+
}
|
|
46
|
+
height
|
|
47
|
+
}
|
|
48
|
+
amount
|
|
49
|
+
currency {
|
|
50
|
+
address
|
|
51
|
+
tokenType
|
|
52
|
+
}
|
|
53
|
+
sender {
|
|
54
|
+
address
|
|
55
|
+
}
|
|
56
|
+
receiver {
|
|
57
|
+
address
|
|
58
|
+
}
|
|
59
|
+
transaction {
|
|
60
|
+
gasValue
|
|
61
|
+
hash
|
|
62
|
+
}
|
|
63
|
+
entityId
|
|
64
|
+
}
|
|
65
|
+
sentCount: transfers(sender: { is: $address }) {
|
|
66
|
+
count
|
|
67
|
+
}
|
|
68
|
+
receiverCount: transfers(receiver: { is: $address }) {
|
|
69
|
+
count
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
`;
|
|
74
|
+
exports.bitqueryGetTransactionQuery = (0, core_1.gql) `
|
|
75
|
+
query getTransaction($hash: String!, $network: EthereumNetwork!) {
|
|
76
|
+
ethereum(network: $network) {
|
|
77
|
+
transfers(txHash: { is: $hash }) {
|
|
78
|
+
block {
|
|
79
|
+
timestamp {
|
|
80
|
+
unixtime
|
|
81
|
+
}
|
|
82
|
+
height
|
|
83
|
+
}
|
|
84
|
+
amount
|
|
85
|
+
currency {
|
|
86
|
+
address
|
|
87
|
+
tokenType
|
|
88
|
+
}
|
|
89
|
+
sender {
|
|
90
|
+
address
|
|
91
|
+
}
|
|
92
|
+
receiver {
|
|
93
|
+
address
|
|
94
|
+
}
|
|
95
|
+
transaction {
|
|
96
|
+
gasValue
|
|
97
|
+
hash
|
|
98
|
+
}
|
|
99
|
+
entityId
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
`;
|
|
104
|
+
exports.bitqueryGetTokenInfoQuery = (0, core_1.gql) `
|
|
105
|
+
query getTokenInfo($hash: String!, $network: EthereumNetwork!) {
|
|
106
|
+
ethereum(network: $network) {
|
|
107
|
+
smartContractCalls(smartContractAddress: { is: $hash }, options: { limit: 1 }) {
|
|
108
|
+
smartContract {
|
|
109
|
+
address {
|
|
110
|
+
address
|
|
111
|
+
}
|
|
112
|
+
currency {
|
|
113
|
+
symbol
|
|
114
|
+
name
|
|
115
|
+
decimals
|
|
116
|
+
tokenType
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
`;
|
|
123
|
+
exports.bitqueryGetBalanceQuery = (0, core_1.gql) `
|
|
124
|
+
query getBalance($address: String!, $network: EthereumNetwork!) {
|
|
125
|
+
ethereum(network: $network) {
|
|
126
|
+
address(address: { is: $address }) {
|
|
127
|
+
balance
|
|
128
|
+
balances {
|
|
129
|
+
currency {
|
|
130
|
+
address
|
|
131
|
+
symbol
|
|
132
|
+
name
|
|
133
|
+
decimals
|
|
134
|
+
}
|
|
135
|
+
value
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
`;
|
|
141
|
+
exports.bitqueryGetPricesQuery = (0, core_1.gql) `
|
|
142
|
+
query getPrice($after: ISO8601DateTime!, $network: EthereumNetwork!) {
|
|
143
|
+
ethereum(network: $network) {
|
|
144
|
+
dexTrades(
|
|
145
|
+
options: { limitBy: { each: "baseCurrency.address", limit: 1 }, desc: "date.date" }
|
|
146
|
+
time: { after: $after }
|
|
147
|
+
) {
|
|
148
|
+
quoteCurrency(quoteCurrency: { is: "0xdac17f958d2ee523a2206206994597c13d831ec7" }) {
|
|
149
|
+
symbol
|
|
150
|
+
address
|
|
151
|
+
}
|
|
152
|
+
baseCurrency {
|
|
153
|
+
symbol
|
|
154
|
+
address
|
|
155
|
+
}
|
|
156
|
+
date {
|
|
157
|
+
date
|
|
158
|
+
}
|
|
159
|
+
quotePrice
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
`;
|
package/dist/index.d.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/dist/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./BSEthereum"), exports);
|
|
18
|
-
__exportStar(require("./GhostMarketNDSEthereum"), exports);
|
|
19
|
-
__exportStar(require("./constants"), exports);
|
|
20
|
-
__exportStar(require("./BitqueryBDSEthereum"), exports);
|
|
21
|
-
__exportStar(require("./BitqueryEDSEthereum"), exports);
|
|
22
|
-
__exportStar(require("./RpcBDSEthereum"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./BSEthereum"), exports);
|
|
18
|
+
__exportStar(require("./GhostMarketNDSEthereum"), exports);
|
|
19
|
+
__exportStar(require("./constants"), exports);
|
|
20
|
+
__exportStar(require("./BitqueryBDSEthereum"), exports);
|
|
21
|
+
__exportStar(require("./BitqueryEDSEthereum"), exports);
|
|
22
|
+
__exportStar(require("./RpcBDSEthereum"), exports);
|
package/jest.config.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { JestConfigWithTsJest } from 'ts-jest'
|
|
2
|
-
const config: JestConfigWithTsJest = {
|
|
3
|
-
preset: 'ts-jest',
|
|
4
|
-
testEnvironment: 'node',
|
|
5
|
-
clearMocks: true,
|
|
6
|
-
verbose: true,
|
|
7
|
-
bail: true,
|
|
8
|
-
testMatch: ['<rootDir>/**/*.spec.ts'],
|
|
9
|
-
setupFiles: ['<rootDir>/jest.setup.ts'],
|
|
10
|
-
detectOpenHandles: true,
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export default config
|
|
1
|
+
import { JestConfigWithTsJest } from 'ts-jest'
|
|
2
|
+
const config: JestConfigWithTsJest = {
|
|
3
|
+
preset: 'ts-jest',
|
|
4
|
+
testEnvironment: 'node',
|
|
5
|
+
clearMocks: true,
|
|
6
|
+
verbose: true,
|
|
7
|
+
bail: true,
|
|
8
|
+
testMatch: ['<rootDir>/**/*.spec.ts'],
|
|
9
|
+
setupFiles: ['<rootDir>/jest.setup.ts'],
|
|
10
|
+
detectOpenHandles: true,
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default config
|
package/jest.setup.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import 'dotenv/config'
|
|
1
|
+
import 'dotenv/config'
|