@cityofzion/bs-ethereum 0.8.0 → 0.8.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.
Files changed (41) hide show
  1. package/.rush/temp/operation/build/all.log +1 -1
  2. package/.rush/temp/operation/build/state.json +1 -1
  3. package/.rush/temp/package-deps_build.json +4 -6
  4. package/bs-ethereum.build.log +1 -1
  5. package/dist/BSEthereum.d.ts +23 -23
  6. package/dist/BSEthereum.js +178 -178
  7. package/dist/BitqueryBDSEthereum.d.ts +14 -14
  8. package/dist/BitqueryBDSEthereum.js +197 -186
  9. package/dist/BitqueryEDSEthereum.d.ts +8 -8
  10. package/dist/BitqueryEDSEthereum.js +73 -73
  11. package/dist/GhostMarketNDSEthereum.d.ts +10 -10
  12. package/dist/GhostMarketNDSEthereum.js +77 -77
  13. package/dist/RpcBDSEthereum.d.ts +12 -12
  14. package/dist/RpcBDSEthereum.js +89 -89
  15. package/dist/assets/tokens/common.json +8 -8
  16. package/dist/constants.d.ts +16 -16
  17. package/dist/constants.js +33 -33
  18. package/dist/graphql.d.ts +124 -123
  19. package/dist/graphql.js +163 -162
  20. package/dist/index.d.ts +6 -6
  21. package/dist/index.js +22 -22
  22. package/jest.config.ts +13 -13
  23. package/jest.setup.ts +1 -1
  24. package/package.json +34 -34
  25. package/src/BSEthereum.ts +184 -184
  26. package/src/BitqueryBDSEthereum.ts +230 -220
  27. package/src/BitqueryEDSEthereum.ts +67 -67
  28. package/src/GhostMarketNDSEthereum.ts +122 -122
  29. package/src/RpcBDSEthereum.ts +88 -88
  30. package/src/__tests__/BDSEthereum.spec.ts +123 -123
  31. package/src/__tests__/BSEthereum.spec.ts +123 -123
  32. package/src/__tests__/BitqueryEDSEthereum.spec.ts +49 -49
  33. package/src/__tests__/GhostMarketNDSEthereum.spec.ts +45 -45
  34. package/src/assets/tokens/common.json +7 -7
  35. package/src/constants.ts +37 -37
  36. package/src/graphql.ts +291 -289
  37. package/src/index.ts +6 -6
  38. package/tsconfig.build.json +4 -4
  39. package/tsconfig.json +15 -15
  40. package/CHANGELOG.json +0 -22
  41. package/CHANGELOG.md +0 -11
package/dist/graphql.d.ts CHANGED
@@ -1,123 +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
- balances: {
84
- currency: {
85
- address: string;
86
- symbol: string;
87
- name: string;
88
- decimals: number;
89
- };
90
- value: number;
91
- }[] | null;
92
- }[];
93
- };
94
- };
95
- type BitQueryGetBalanceVariables = {
96
- address: string;
97
- network: BitqueryNetwork;
98
- };
99
- export declare const bitqueryGetBalanceQuery: import("@urql/core/dist/urql-core-chunk").TypedDocumentNode<BitQueryGetBalanceResponse, BitQueryGetBalanceVariables>;
100
- type BitQueryGetTokenPricesResponse = {
101
- ethereum: {
102
- dexTrades: {
103
- baseCurrency: {
104
- address: string;
105
- symbol: string;
106
- };
107
- quoteCurrency: {
108
- address: string;
109
- symbol: string;
110
- };
111
- date: {
112
- date: string;
113
- };
114
- quotePrice: number;
115
- }[];
116
- };
117
- };
118
- export type BitQueryGetTokenPricesVariables = {
119
- after: string;
120
- network: BitqueryNetwork;
121
- };
122
- export declare const bitqueryGetPricesQuery: import("@urql/core/dist/urql-core-chunk").TypedDocumentNode<BitQueryGetTokenPricesResponse, BitQueryGetTokenPricesVariables>;
123
- 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,162 +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
- balances {
128
- currency {
129
- address
130
- symbol
131
- name
132
- decimals
133
- }
134
- value
135
- }
136
- }
137
- }
138
- }
139
- `;
140
- exports.bitqueryGetPricesQuery = (0, core_1.gql) `
141
- query getPrice($after: ISO8601DateTime!, $network: EthereumNetwork!) {
142
- ethereum(network: $network) {
143
- dexTrades(
144
- options: { limitBy: { each: "baseCurrency.address", limit: 1 }, desc: "date.date" }
145
- time: { after: $after }
146
- ) {
147
- quoteCurrency(quoteCurrency: { is: "0xdac17f958d2ee523a2206206994597c13d831ec7" }) {
148
- symbol
149
- address
150
- }
151
- baseCurrency {
152
- symbol
153
- address
154
- }
155
- date {
156
- date
157
- }
158
- quotePrice
159
- }
160
- }
161
- }
162
- `;
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'