@codex-data/sdk 0.5.7

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 (97) hide show
  1. package/README.md +104 -0
  2. package/dist/index.d.ts +3 -0
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +32 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/resources/graphql.d.ts +7438 -0
  7. package/dist/resources/graphql.d.ts.map +1 -0
  8. package/dist/resources/graphql.js +1314 -0
  9. package/dist/resources/graphql.js.map +1 -0
  10. package/dist/resources/graphql.schema.json +50830 -0
  11. package/dist/resources/graphql.ts +7976 -0
  12. package/dist/resources/schema.graphql +10393 -0
  13. package/dist/sdk/Mutation.d.ts +14 -0
  14. package/dist/sdk/Mutation.d.ts.map +1 -0
  15. package/dist/sdk/Mutation.js +22 -0
  16. package/dist/sdk/Mutation.js.map +1 -0
  17. package/dist/sdk/Query.d.ts +22 -0
  18. package/dist/sdk/Query.d.ts.map +1 -0
  19. package/dist/sdk/Query.js +35 -0
  20. package/dist/sdk/Query.js.map +1 -0
  21. package/dist/sdk/Query.test.d.ts +2 -0
  22. package/dist/sdk/Query.test.d.ts.map +1 -0
  23. package/dist/sdk/Query.test.js +50 -0
  24. package/dist/sdk/Query.test.js.map +1 -0
  25. package/dist/sdk/Subscribe.d.ts +17 -0
  26. package/dist/sdk/Subscribe.d.ts.map +1 -0
  27. package/dist/sdk/Subscribe.js +28 -0
  28. package/dist/sdk/Subscribe.js.map +1 -0
  29. package/dist/sdk/generated/fragment-masking.d.ts +16 -0
  30. package/dist/sdk/generated/fragment-masking.d.ts.map +1 -0
  31. package/dist/sdk/generated/fragment-masking.js +23 -0
  32. package/dist/sdk/generated/fragment-masking.js.map +1 -0
  33. package/dist/sdk/generated/gql.d.ts +243 -0
  34. package/dist/sdk/generated/gql.d.ts.map +1 -0
  35. package/dist/sdk/generated/gql.js +70 -0
  36. package/dist/sdk/generated/gql.js.map +1 -0
  37. package/dist/sdk/generated/graphql.d.ts +11765 -0
  38. package/dist/sdk/generated/graphql.d.ts.map +1 -0
  39. package/dist/sdk/generated/graphql.js +1338 -0
  40. package/dist/sdk/generated/graphql.js.map +1 -0
  41. package/dist/sdk/generated/index.d.ts +3 -0
  42. package/dist/sdk/generated/index.d.ts.map +1 -0
  43. package/dist/sdk/generated/index.js +19 -0
  44. package/dist/sdk/generated/index.js.map +1 -0
  45. package/dist/sdk/index.d.ts +23 -0
  46. package/dist/sdk/index.d.ts.map +1 -0
  47. package/dist/sdk/index.js +76 -0
  48. package/dist/sdk/index.js.map +1 -0
  49. package/dist/sdk/index.test.d.ts +2 -0
  50. package/dist/sdk/index.test.d.ts.map +1 -0
  51. package/dist/sdk/index.test.js +78 -0
  52. package/dist/sdk/index.test.js.map +1 -0
  53. package/dist/sdk/invariant.d.ts +2 -0
  54. package/dist/sdk/invariant.d.ts.map +1 -0
  55. package/dist/sdk/invariant.js +31 -0
  56. package/dist/sdk/invariant.js.map +1 -0
  57. package/package.json +60 -0
  58. package/src/index.ts +2 -0
  59. package/src/resources/.keep +0 -0
  60. package/src/resources/graphql.schema.json +50830 -0
  61. package/src/resources/graphql.ts +7976 -0
  62. package/src/resources/schema.graphql +10393 -0
  63. package/src/sdk/Mutation.ts +15 -0
  64. package/src/sdk/Query.test.ts +40 -0
  65. package/src/sdk/Query.ts +65 -0
  66. package/src/sdk/Subscribe.ts +61 -0
  67. package/src/sdk/generated/fragment-masking.ts +66 -0
  68. package/src/sdk/generated/gql.ts +157 -0
  69. package/src/sdk/generated/graphql.ts +8215 -0
  70. package/src/sdk/generated/index.ts +2 -0
  71. package/src/sdk/graphql/CreateWebhooks.graphql +1145 -0
  72. package/src/sdk/graphql/DeleteWebhooks.graphql +5 -0
  73. package/src/sdk/graphql/FilterExchanges.graphql +23 -0
  74. package/src/sdk/graphql/FilterPairs.graphql +124 -0
  75. package/src/sdk/graphql/FilterTokens.graphql +129 -0
  76. package/src/sdk/graphql/GetBars.graphql +32 -0
  77. package/src/sdk/graphql/GetDetailedPairStats.graphql +941 -0
  78. package/src/sdk/graphql/GetNetworkStatus.graphql +7 -0
  79. package/src/sdk/graphql/GetNetworks.graphql +6 -0
  80. package/src/sdk/graphql/GetPairEvents.graphql +28 -0
  81. package/src/sdk/graphql/GetPrice.graphql +9 -0
  82. package/src/sdk/graphql/GetSparklines.graphql +10 -0
  83. package/src/sdk/graphql/GetSymbol.graphql +11 -0
  84. package/src/sdk/graphql/GetTokens.graphql +14 -0
  85. package/src/sdk/graphql/GetWebhooks.graphql +168 -0
  86. package/src/sdk/graphql/ListPairsForToken.graphql +105 -0
  87. package/src/sdk/graphql/ListTopTokens.graphql +48 -0
  88. package/src/sdk/graphql/OnBarsUpdated.graphql +183 -0
  89. package/src/sdk/graphql/OnDetailedStatsUpdated.graphql +324 -0
  90. package/src/sdk/graphql/OnEventsCreated.graphql +62 -0
  91. package/src/sdk/graphql/OnNftAssetsCreated.graphql +29 -0
  92. package/src/sdk/graphql/OnNftEventsCreated.graphql +83 -0
  93. package/src/sdk/graphql/OnPairMetadataUpdated.graphql +55 -0
  94. package/src/sdk/graphql/OnPriceUpdated.graphql +9 -0
  95. package/src/sdk/index.test.ts +78 -0
  96. package/src/sdk/index.ts +100 -0
  97. package/src/sdk/invariant.ts +34 -0
@@ -0,0 +1,7 @@
1
+ query GetNetworkStatus($networkIds: [Int!]!) {
2
+ getNetworkStatus(networkIds: $networkIds) {
3
+ networkName
4
+ lastProcessedBlock
5
+ lastProcessedTimestamp
6
+ }
7
+ }
@@ -0,0 +1,6 @@
1
+ query GetNetworks {
2
+ getNetworks {
3
+ id
4
+ name
5
+ }
6
+ }
@@ -0,0 +1,28 @@
1
+ query PairEvents($query: EventsQueryInput!) {
2
+ pairEvents: getTokenEvents(query: $query) {
3
+ cursor
4
+ items {
5
+ address
6
+ baseTokenPrice
7
+ blockHash
8
+ blockNumber
9
+ eventDisplayType
10
+ eventType
11
+ id
12
+ liquidityToken
13
+ maker
14
+ networkId
15
+ quoteToken
16
+ token0PoolValueUsd
17
+ token0SwapValueUsd
18
+ timestamp
19
+ token0ValueBase
20
+ token1PoolValueUsd
21
+ token1SwapValueUsd
22
+ token1ValueBase
23
+ transactionHash
24
+ transactionIndex
25
+ logIndex
26
+ }
27
+ }
28
+ }
@@ -0,0 +1,9 @@
1
+ query GetTokenPrice($inputs: [GetPriceInput]) {
2
+ getTokenPrices(
3
+ inputs: $inputs
4
+ ) {
5
+ address
6
+ networkId
7
+ priceUsd
8
+ }
9
+ }
@@ -0,0 +1,10 @@
1
+ query GetSparklines($input: TokenSparklineInput!) {
2
+ tokenSparklines(input: $input) {
3
+ attribute
4
+ id
5
+ sparkline {
6
+ timestamp
7
+ value
8
+ }
9
+ }
10
+ }
@@ -0,0 +1,11 @@
1
+ query GetSymbol($symbol: String!, $currencyCode: String) {
2
+ getSymbol(symbol: $symbol, currencyCode: $currencyCode) {
3
+ name
4
+ description
5
+ currency_code
6
+ supported_resolutions
7
+ pricescale
8
+ ticker
9
+ original_currency_code
10
+ }
11
+ }
@@ -0,0 +1,14 @@
1
+ query GetTokens($input: [TokenInput!]) {
2
+ tokens(ids: $input) {
3
+ address
4
+ decimals
5
+ id
6
+ name
7
+ networkId
8
+ symbol
9
+ totalSupply
10
+ createBlockNumber
11
+ createdAt
12
+ createTransactionHash
13
+ }
14
+ }
@@ -0,0 +1,168 @@
1
+ query GetWebhooks(
2
+ $cursor: String
3
+ $webhookId: String
4
+ $bucketId: String
5
+ $bucketSortkey: String
6
+ $limit: Int
7
+ ) {
8
+ getWebhooks(
9
+ cursor: $cursor
10
+ webhookId: $webhookId
11
+ bucketId: $bucketId
12
+ bucketSortkey: $bucketSortkey
13
+ limit: $limit
14
+ ) {
15
+ cursor
16
+ items {
17
+ alertRecurrence
18
+ bucketId
19
+ bucketSortkey
20
+ callbackUrl
21
+ conditions {
22
+ ... on PriceEventWebhookCondition {
23
+ tokenAddressPriceEvent: tokenAddress {
24
+ eq
25
+ }
26
+ networkIdPriceEvent: networkId {
27
+ eq
28
+ }
29
+ priceUsd {
30
+ gt
31
+ gte
32
+ lt
33
+ lte
34
+ eq
35
+ }
36
+ }
37
+ ... on DecodedLogWebhookCondition {
38
+ decodingId {
39
+ eq
40
+ }
41
+ eventName {
42
+ eq
43
+ }
44
+ address {
45
+ eq
46
+ }
47
+ event
48
+ }
49
+ ... on DecodedCallWebhookCondition {
50
+ decodingId {
51
+ eq
52
+ }
53
+ methodName {
54
+ eq
55
+ }
56
+ address {
57
+ eq
58
+ }
59
+ from {
60
+ eq
61
+ }
62
+ to {
63
+ eq
64
+ }
65
+ methodId {
66
+ eq
67
+ }
68
+ output
69
+ inputJSON: input
70
+ }
71
+ ... on RawCallTraceWebhookCondition {
72
+ traceType {
73
+ eq
74
+ }
75
+ result {
76
+ code {
77
+ contains
78
+ notContains
79
+ }
80
+ }
81
+ networkId {
82
+ oneOf
83
+ }
84
+ }
85
+ ... on TokenPairEventWebhookCondition {
86
+ tokenAddress {
87
+ eq
88
+ }
89
+ networkId {
90
+ oneOf
91
+ }
92
+ swapValue {
93
+ gt
94
+ gte
95
+ lt
96
+ lte
97
+ eq
98
+ }
99
+ maker {
100
+ eq
101
+ }
102
+ pairAddress {
103
+ eq
104
+ }
105
+ exchangeAddress {
106
+ eq
107
+ }
108
+ eventType {
109
+ oneOf
110
+ }
111
+ }
112
+ ... on NftEventWebhookCondition {
113
+ networkId {
114
+ oneOf
115
+ }
116
+ maker {
117
+ eq
118
+ }
119
+ contractAddress {
120
+ eq
121
+ }
122
+ exchangeAddress {
123
+ eq
124
+ }
125
+ tokenId {
126
+ eq
127
+ }
128
+ tokenAddress {
129
+ eq
130
+ }
131
+ individualBaseTokenPrice {
132
+ gt
133
+ gte
134
+ lt
135
+ lte
136
+ eq
137
+ }
138
+ eventType {
139
+ eq
140
+ }
141
+ fillSource {
142
+ oneOf
143
+ }
144
+ }
145
+ ... on RawTransactionWebhookCondition {
146
+ networkId {
147
+ oneOf
148
+ }
149
+ to {
150
+ eq
151
+ }
152
+ from {
153
+ eq
154
+ }
155
+ toOrFrom {
156
+ eq
157
+ }
158
+ input {
159
+ contains
160
+ notContains
161
+ }
162
+ ignoreTokenPairEvents
163
+ ignoreNftEvents
164
+ }
165
+ }
166
+ }
167
+ }
168
+ }
@@ -0,0 +1,105 @@
1
+ query ListPairsForToken($networkId: Int!, $tokenAddress: String!, $limit: Int) {
2
+ listPairsForToken(
3
+ networkId: $networkId
4
+ tokenAddress: $tokenAddress
5
+ limit: $limit
6
+ ) {
7
+ address
8
+ exchangeHash
9
+ fee
10
+ id
11
+ networkId
12
+ tickSpacing
13
+ pooled {
14
+ token0
15
+ token1
16
+ }
17
+ token0
18
+ token1
19
+ createdAt
20
+ token0Data {
21
+ address
22
+ cmcId
23
+ decimals
24
+ id
25
+ isScam
26
+ name
27
+ networkId
28
+ symbol
29
+ exchanges {
30
+ address
31
+ color
32
+ id
33
+ name
34
+ exchangeVersion
35
+ iconUrl
36
+ networkId
37
+ tradeUrl
38
+ }
39
+ info {
40
+ id
41
+ address
42
+ circulatingSupply
43
+ cmcId
44
+ isScam
45
+ name
46
+ networkId
47
+ symbol
48
+ totalSupply
49
+ imageThumbUrl
50
+ imageSmallUrl
51
+ imageLargeUrl
52
+ }
53
+ explorerData {
54
+ id
55
+ blueCheckmark
56
+ description
57
+ divisor
58
+ tokenPriceUSD
59
+ tokenType
60
+ }
61
+ }
62
+ token1Data {
63
+ address
64
+ cmcId
65
+ decimals
66
+ id
67
+ isScam
68
+ name
69
+ networkId
70
+ symbol
71
+ exchanges {
72
+ address
73
+ color
74
+ id
75
+ name
76
+ exchangeVersion
77
+ iconUrl
78
+ networkId
79
+ tradeUrl
80
+ }
81
+ info {
82
+ id
83
+ address
84
+ circulatingSupply
85
+ cmcId
86
+ isScam
87
+ name
88
+ networkId
89
+ symbol
90
+ totalSupply
91
+ imageThumbUrl
92
+ imageSmallUrl
93
+ imageLargeUrl
94
+ }
95
+ explorerData {
96
+ id
97
+ blueCheckmark
98
+ description
99
+ divisor
100
+ tokenPriceUSD
101
+ tokenType
102
+ }
103
+ }
104
+ }
105
+ }
@@ -0,0 +1,48 @@
1
+ query ListTopTokens($limit: Int, $networkFilter: [Int!], $resolution: String) {
2
+ listTopTokens(limit: $limit, networkFilter: $networkFilter, resolution: $resolution) {
3
+ address
4
+ decimals
5
+ exchanges {
6
+ address
7
+ id
8
+ name
9
+ iconUrl
10
+ networkId
11
+ tradeUrl
12
+ }
13
+ id
14
+ liquidity
15
+ name
16
+ networkId
17
+ price
18
+ priceChange
19
+ isScam
20
+ priceChange1
21
+ priceChange4
22
+ priceChange12
23
+ priceChange24
24
+ quoteToken
25
+ marketCap
26
+ txnCount1
27
+ txnCount12
28
+ txnCount24
29
+ txnCount4
30
+ uniqueBuys1
31
+ uniqueBuys12
32
+ uniqueBuys24
33
+ uniqueBuys4
34
+ uniqueSells1
35
+ uniqueSells12
36
+ uniqueSells24
37
+ uniqueSells4
38
+ resolution
39
+ symbol
40
+ topPairId
41
+ volume
42
+ imageThumbUrl
43
+ imageSmallUrl
44
+ imageLargeUrl
45
+ createdAt
46
+ lastTransaction
47
+ }
48
+ }
@@ -0,0 +1,183 @@
1
+ subscription OnBarsUpdated($pairId: String, $quoteToken: QuoteToken) {
2
+ onBarsUpdated(pairId: $pairId, quoteToken: $quoteToken) {
3
+ eventSortKey
4
+ networkId
5
+ pairAddress
6
+ pairId
7
+ timestamp
8
+ quoteToken
9
+ aggregates {
10
+ r1 {
11
+ t
12
+ usd {
13
+ t
14
+ o
15
+ h
16
+ l
17
+ c
18
+ volume
19
+ }
20
+ token {
21
+ t
22
+ o
23
+ h
24
+ l
25
+ c
26
+ volume
27
+ }
28
+ }
29
+ r5 {
30
+ t
31
+ usd {
32
+ t
33
+ o
34
+ h
35
+ l
36
+ c
37
+ volume
38
+ }
39
+ token {
40
+ t
41
+ o
42
+ h
43
+ l
44
+ c
45
+ volume
46
+ }
47
+ }
48
+ r15 {
49
+ t
50
+ usd {
51
+ t
52
+ o
53
+ h
54
+ l
55
+ c
56
+ volume
57
+ }
58
+ token {
59
+ t
60
+ o
61
+ h
62
+ l
63
+ c
64
+ volume
65
+ }
66
+ }
67
+ r30 {
68
+ t
69
+ usd {
70
+ t
71
+ o
72
+ h
73
+ l
74
+ c
75
+ volume
76
+ }
77
+ token {
78
+ t
79
+ o
80
+ h
81
+ l
82
+ c
83
+ volume
84
+ }
85
+ }
86
+ r60 {
87
+ t
88
+ usd {
89
+ t
90
+ o
91
+ h
92
+ l
93
+ c
94
+ volume
95
+ }
96
+ token {
97
+ t
98
+ o
99
+ h
100
+ l
101
+ c
102
+ volume
103
+ }
104
+ }
105
+ r240 {
106
+ t
107
+ usd {
108
+ t
109
+ o
110
+ h
111
+ l
112
+ c
113
+ volume
114
+ }
115
+ token {
116
+ t
117
+ o
118
+ h
119
+ l
120
+ c
121
+ volume
122
+ }
123
+ }
124
+ r720 {
125
+ t
126
+ usd {
127
+ t
128
+ o
129
+ h
130
+ l
131
+ c
132
+ volume
133
+ }
134
+ token {
135
+ t
136
+ o
137
+ h
138
+ l
139
+ c
140
+ volume
141
+ }
142
+ }
143
+ r1D {
144
+ t
145
+ usd {
146
+ t
147
+ o
148
+ h
149
+ l
150
+ c
151
+ volume
152
+ }
153
+ token {
154
+ t
155
+ o
156
+ h
157
+ l
158
+ c
159
+ volume
160
+ }
161
+ }
162
+ r7D {
163
+ t
164
+ usd {
165
+ t
166
+ o
167
+ h
168
+ l
169
+ c
170
+ volume
171
+ }
172
+ token {
173
+ t
174
+ o
175
+ h
176
+ l
177
+ c
178
+ volume
179
+ }
180
+ }
181
+ }
182
+ }
183
+ }