envio 3.15.0-subgraph → 3.16.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.
Files changed (186) hide show
  1. package/README.md +40 -34
  2. package/evm.schema.json +3 -3
  3. package/fuel.schema.json +2 -2
  4. package/index.d.ts +3 -3
  5. package/licenses/README.md +1 -1
  6. package/package.json +9 -10
  7. package/src/Batch.res.mjs +5 -5
  8. package/src/BatchProcessing.res +1 -0
  9. package/src/BatchProcessing.res.mjs +1 -0
  10. package/src/Bin.res +0 -7
  11. package/src/Bin.res.mjs +0 -8
  12. package/src/ChainFetching.res +17 -456
  13. package/src/ChainFetching.res.mjs +33 -404
  14. package/src/ChainState.res +48 -83
  15. package/src/ChainState.res.mjs +83 -115
  16. package/src/ChainState.resi +0 -26
  17. package/src/Clock.res +57 -0
  18. package/src/Clock.res.mjs +72 -0
  19. package/src/Config.res +7 -16
  20. package/src/Config.res.mjs +4 -11
  21. package/src/ContractRegisterContext.res +6 -3
  22. package/src/ContractRegisterContext.res.mjs +2 -4
  23. package/src/Core.res +5 -136
  24. package/src/Core.res.mjs +1 -90
  25. package/src/CrossChainState.res +2 -8
  26. package/src/CrossChainState.res.mjs +3 -3
  27. package/src/Ecosystem.res +4 -7
  28. package/src/Ecosystem.res.mjs +8 -8
  29. package/src/EffectState.res +10 -2
  30. package/src/EffectState.res.mjs +8 -4
  31. package/src/EffectState.resi +3 -1
  32. package/src/EntityId.res +2 -7
  33. package/src/EntityId.res.mjs +1 -8
  34. package/src/EntityTables.res +4 -1
  35. package/src/EntityTables.res.mjs +1 -1
  36. package/src/Env.res +0 -16
  37. package/src/Env.res.mjs +0 -11
  38. package/src/EventProcessing.res +1 -38
  39. package/src/EventProcessing.res.mjs +1 -28
  40. package/src/FetchState.res +160 -319
  41. package/src/FetchState.res.mjs +182 -292
  42. package/src/FinalizeBackfill.res +2 -4
  43. package/src/FinalizeBackfill.res.mjs +3 -4
  44. package/src/HandlerLoader.res +15 -39
  45. package/src/HandlerLoader.res.mjs +8 -27
  46. package/src/HandlerRegister.res +0 -4
  47. package/src/HandlerRegister.res.mjs +2 -5
  48. package/src/HandlerRegister.resi +0 -2
  49. package/src/InMemoryTable.res +17 -16
  50. package/src/InMemoryTable.res.mjs +14 -15
  51. package/src/IndexerState.res +28 -4
  52. package/src/IndexerState.res.mjs +19 -6
  53. package/src/IndexerState.resi +4 -0
  54. package/src/Internal.res +0 -110
  55. package/src/Internal.res.mjs +1 -115
  56. package/src/LoadLayer.res +21 -47
  57. package/src/LoadLayer.res.mjs +47 -72
  58. package/src/LoadLayer.resi +0 -26
  59. package/src/Main.res +1 -14
  60. package/src/Main.res.mjs +3 -4
  61. package/src/Persistence.res +3 -23
  62. package/src/Persistence.res.mjs +3 -3
  63. package/src/Rollback.res +0 -1
  64. package/src/Rollback.res.mjs +1 -1
  65. package/src/RunScope.res +0 -3
  66. package/src/SafeCheckpointTracking.res +4 -4
  67. package/src/SafeCheckpointTracking.res.mjs +1 -1
  68. package/src/SimulateItems.res +26 -42
  69. package/src/SimulateItems.res.mjs +16 -40
  70. package/src/StagedRows.res +106 -0
  71. package/src/StagedRows.res.mjs +102 -0
  72. package/src/Staging.res +32 -14
  73. package/src/Staging.res.mjs +17 -20
  74. package/src/Storage.res +277 -998
  75. package/src/Storage.res.mjs +216 -731
  76. package/src/Supervisor.res +75 -56
  77. package/src/Supervisor.res.mjs +55 -26
  78. package/src/TestIndexer.res +22 -27
  79. package/src/TestIndexer.res.mjs +20 -17
  80. package/src/Throttler.res +15 -8
  81. package/src/Throttler.res.mjs +9 -6
  82. package/src/Throttler.resi +1 -1
  83. package/src/UserContext.res +46 -410
  84. package/src/UserContext.res.mjs +30 -318
  85. package/src/Utils.res +0 -23
  86. package/src/Utils.res.mjs +1 -17
  87. package/src/Writing.res +0 -1
  88. package/src/Writing.res.mjs +1 -1
  89. package/src/bindings/ClickHouse.res +0 -322
  90. package/src/bindings/ClickHouse.res.mjs +0 -338
  91. package/src/bindings/StorageClient.res +107 -175
  92. package/src/bindings/StorageClient.res.mjs +19 -8
  93. package/src/bindings/Vitest.res +0 -26
  94. package/src/bindings/Vitest.res.mjs +0 -3
  95. package/src/db/Table.res +24 -150
  96. package/src/db/Table.res.mjs +38 -272
  97. package/src/sources/AddressSet.res +0 -2
  98. package/src/sources/AddressStore.res +0 -3
  99. package/src/sources/ChainSources.res +2 -0
  100. package/src/sources/ChainSources.res.mjs +2 -2
  101. package/src/sources/EvmChain.res +4 -7
  102. package/src/sources/EvmChain.res.mjs +5 -4
  103. package/src/sources/EvmHyperSyncSource.res +2 -2
  104. package/src/sources/EvmHyperSyncSource.res.mjs +1 -1
  105. package/src/sources/EvmRpcClient.res +13 -3
  106. package/src/sources/EvmRpcClient.res.mjs +4 -3
  107. package/src/sources/EvmRpcWs.res +4 -3
  108. package/src/sources/EvmRpcWs.res.mjs +2 -2
  109. package/src/sources/HeightFeed.res +31 -10
  110. package/src/sources/HeightFeed.res.mjs +10 -6
  111. package/src/sources/HeightStream.res +32 -17
  112. package/src/sources/HeightStream.res.mjs +10 -10
  113. package/src/sources/HyperSync.res +1 -2
  114. package/src/sources/HyperSync.res.mjs +1 -2
  115. package/src/sources/HyperSyncSSE.res +4 -6
  116. package/src/sources/HyperSyncSSE.res.mjs +2 -2
  117. package/src/sources/RpcSource.res +10 -1
  118. package/src/sources/RpcSource.res.mjs +4 -3
  119. package/src/sources/Source.res +3 -0
  120. package/src/sources/SourceManager.res +85 -104
  121. package/src/sources/SourceManager.res.mjs +18 -37
  122. package/src/sources/SourceManager.resi +3 -5
  123. package/src/sources/StartBlockResolver.res +1 -0
  124. package/src/sources/StartBlockResolver.res.mjs +4 -3
  125. package/src/sources/SvmHyperSyncSource.res +2 -2
  126. package/src/sources/SvmHyperSyncSource.res.mjs +1 -1
  127. package/svm.schema.json +3 -3
  128. package/src/EffectCacheLookup.res +0 -98
  129. package/src/EffectCacheLookup.res.mjs +0 -116
  130. package/src/PgWriting.res +0 -36
  131. package/src/PgWriting.res.mjs +0 -34
  132. package/src/PreloadLookahead.res +0 -184
  133. package/src/PreloadLookahead.res.mjs +0 -197
  134. package/src/SubgraphLog.res +0 -19
  135. package/src/SubgraphLog.res.mjs +0 -26
  136. package/src/SyncWrites.res +0 -101
  137. package/src/SyncWrites.res.mjs +0 -98
  138. package/src/db/IndexDefinition.res +0 -47
  139. package/src/db/IndexDefinition.res.mjs +0 -60
  140. package/src/sources/CallSource.res +0 -274
  141. package/src/sources/CallSource.res.mjs +0 -196
  142. package/src/subgraph/abi-types.ts +0 -84
  143. package/src/subgraph/aggregations.ts +0 -745
  144. package/src/subgraph/as-package.ts +0 -143
  145. package/src/subgraph/assemblyscript-regex.ts +0 -67
  146. package/src/subgraph/assemblyscript.ts +0 -731
  147. package/src/subgraph/blocks.ts +0 -398
  148. package/src/subgraph/calls-source.ts +0 -702
  149. package/src/subgraph/calls.ts +0 -258
  150. package/src/subgraph/conformance.ts +0 -106
  151. package/src/subgraph/errors.ts +0 -85
  152. package/src/subgraph/graft.ts +0 -73
  153. package/src/subgraph/graph-cli-worker.mjs +0 -35
  154. package/src/subgraph/graph-cli.ts +0 -900
  155. package/src/subgraph/graph-node-decimal.ts +0 -199
  156. package/src/subgraph/graph-ts-enums.ts +0 -28
  157. package/src/subgraph/graph-ts-types/VERSION +0 -2
  158. package/src/subgraph/graph-ts-types/chain/arweave.d.ts +0 -70
  159. package/src/subgraph/graph-ts-types/chain/cosmos.d.ts +0 -327
  160. package/src/subgraph/graph-ts-types/chain/ethereum.d.ts +0 -233
  161. package/src/subgraph/graph-ts-types/chain/near.d.ts +0 -253
  162. package/src/subgraph/graph-ts-types/chain/starknet.d.ts +0 -32
  163. package/src/subgraph/graph-ts-types/common/collections.d.ts +0 -136
  164. package/src/subgraph/graph-ts-types/common/conversion.d.ts +0 -11
  165. package/src/subgraph/graph-ts-types/common/datasource.d.ts +0 -30
  166. package/src/subgraph/graph-ts-types/common/eager-offset.d.ts +0 -0
  167. package/src/subgraph/graph-ts-types/common/json.d.ts +0 -17
  168. package/src/subgraph/graph-ts-types/common/numbers.d.ts +0 -120
  169. package/src/subgraph/graph-ts-types/common/value.d.ts +0 -120
  170. package/src/subgraph/graph-ts-types/common/yaml.d.ts +0 -90
  171. package/src/subgraph/graph-ts-types/global/global.d.ts +0 -194
  172. package/src/subgraph/graph-ts-types/helper-functions.d.ts +0 -22
  173. package/src/subgraph/graph-ts-types/index.d.ts +0 -102
  174. package/src/subgraph/graph-ts.ts +0 -4280
  175. package/src/subgraph/hosts.ts +0 -554
  176. package/src/subgraph/log.ts +0 -28
  177. package/src/subgraph/receipts.ts +0 -184
  178. package/src/subgraph/register-slots.ts +0 -93
  179. package/src/subgraph/rollup.ts +0 -109
  180. package/src/subgraph/rpc.ts +0 -337
  181. package/src/subgraph/runtime.ts +0 -2060
  182. package/src/subgraph/scope.ts +0 -177
  183. package/src/subgraph/stats.ts +0 -42
  184. package/src/subgraph/template-instances.ts +0 -66
  185. package/src/subgraph/toolchain.ts +0 -327
  186. package/src/subgraph/transient.ts +0 -176
@@ -1,199 +0,0 @@
1
- /**
2
- * graph-node's `BigDecimal` arithmetic, digit for digit.
3
- *
4
- * graph-node pins `bigdecimal` 0.1.2 for determinism and normalizes every value
5
- * it makes to 34 significant digits through that crate's `with_prec`. The
6
- * crate's rounding has quirks a subgraph's stored values inherit — positives
7
- * round half up, negatives truncate, and its digit count for a negative
8
- * coefficient undercounts, so those keep a digit more — so it is reproduced
9
- * here on the same integer-and-scale representation rather than approximated
10
- * with a general decimal library.
11
- */
12
-
13
- /** `int * 10 ** -scale`, as the crate holds a value. */
14
- export type Decimal = { int: bigint; scale: number };
15
-
16
- const MAX_SIGNIFICANT_DIGITS = 34;
17
- const DIVISION_DIGITS = 100;
18
- const LOG2_10 = 3.3219280949;
19
-
20
- /** Every operation reaches for powers of ten; they're computed once. */
21
- const TENS: bigint[] = [1n];
22
- function ten(power: number): bigint {
23
- if (power > 4096) return 10n ** BigInt(power);
24
- while (TENS.length <= power) TENS.push(TENS[TENS.length - 1] * 10n);
25
- return TENS[power];
26
- }
27
- const abs = (n: bigint) => (n < 0n ? -n : n);
28
- /** The magnitude's bit length, as num-bigint's `bits()`. */
29
- function bits(n: bigint): number {
30
- if (n === 0n) return 0;
31
- const hex = abs(n).toString(16);
32
- return (hex.length - 1) * 4 + (32 - Math.clz32(parseInt(hex[0], 16)));
33
- }
34
-
35
- /** `count_decimal_digits`: never corrects its guess upward for a negative. */
36
- function countDigits(n: bigint): number {
37
- if (n === 0n) return 1;
38
- // For a positive the crate's guess never overshoots and its loop corrects
39
- // it to the exact count, which a float's log10 finds with fewer steps.
40
- const approximate = Number(n);
41
- if (n > 0n && approximate < 1e300) {
42
- let digits = Math.max(1, Math.floor(Math.log10(approximate)) + 1);
43
- while (digits > 1 && n < ten(digits - 1)) digits -= 1;
44
- while (n >= ten(digits)) digits += 1;
45
- return digits;
46
- }
47
- let digits = Math.floor(bits(n) / LOG2_10);
48
- let num = ten(digits);
49
- while (n >= num) {
50
- num *= 10n;
51
- digits += 1;
52
- }
53
- return digits;
54
- }
55
-
56
- /**
57
- * `with_prec` of a coefficient with more digits (as `countDigits` counts
58
- * them) than `precision`. The crate adds `get_rounding_term(remainder)`, 1
59
- * when the remainder's leading digit is 5 or more, if `p < 10 * remainder`:
60
- * the remainder then has exactly `diff` digits, so its leading digit is 5 or
61
- * more just when `2 * remainder >= p`. A negative remainder never passes the
62
- * test, so a negative truncates.
63
- */
64
- function withPrecision({ int, scale }: Decimal, digits: number, precision: number): Decimal {
65
- const diff = digits - precision;
66
- const p = ten(diff);
67
- let quotient = int / p;
68
- const remainder = int - quotient * p;
69
- if (remainder > 0n && 2n * remainder >= p) quotient += 1n;
70
- return { int: quotient, scale: scale - diff };
71
- }
72
-
73
- const ZERO: Decimal = { int: 0n, scale: 0 };
74
- const TEN_TO_THE_8 = 10n ** 8n;
75
-
76
- /**
77
- * graph-node's `BigDecimal::normalized`, applied to every value it makes:
78
- * `with_prec(34)`, then trailing zeros dropped. A coefficient of 34 digits or
79
- * fewer comes out of `with_prec` padded with zeros that the second step drops
80
- * again, so only its own trailing zeros are dropped.
81
- */
82
- export function normalize(value: Decimal): Decimal {
83
- if (value.int === 0n) return ZERO;
84
- const digits = countDigits(value.int);
85
- let { int, scale } =
86
- digits > MAX_SIGNIFICANT_DIGITS ? withPrecision(value, digits, MAX_SIGNIFICANT_DIGITS) : value;
87
- if (int % 10n !== 0n) return int === value.int ? value : { int, scale };
88
- while (int % TEN_TO_THE_8 === 0n) {
89
- int /= TEN_TO_THE_8;
90
- scale -= 8;
91
- }
92
- while (int % 10n === 0n) {
93
- int /= 10n;
94
- scale -= 1;
95
- }
96
- return { int, scale };
97
- }
98
-
99
- const NEGATIVE_LIMIT = -(10n ** BigInt(MAX_SIGNIFICANT_DIGITS));
100
-
101
- /**
102
- * `normalize` of a value `normalize` made, as graph-node does when it reads a
103
- * result back from the module (`BigDecimal::new` in `FromAscObj`). It is the
104
- * identity except for a negative coefficient of 35 digits or more, which the
105
- * first pass's undercount can leave behind; anything shorter, or positive,
106
- * already is normal.
107
- */
108
- export function renormalize(value: Decimal): Decimal {
109
- return value.int <= NEGATIVE_LIMIT ? normalize(value) : value;
110
- }
111
-
112
- /** The sign of `a - b`. */
113
- export function compare(a: Decimal, b: Decimal): number {
114
- const [x, y] = align(a, b);
115
- return x < y ? -1 : x > y ? 1 : 0;
116
- }
117
-
118
- function align(a: Decimal, b: Decimal): [bigint, bigint, number] {
119
- const scale = Math.max(a.scale, b.scale);
120
- return [a.int * ten(scale - a.scale), b.int * ten(scale - b.scale), scale];
121
- }
122
-
123
- export function add(a: Decimal, b: Decimal): Decimal {
124
- const [x, y, scale] = align(a, b);
125
- return normalize({ int: x + y, scale });
126
- }
127
-
128
- export function subtract(a: Decimal, b: Decimal): Decimal {
129
- const [x, y, scale] = align(a, b);
130
- return normalize({ int: x - y, scale });
131
- }
132
-
133
- export function multiply(a: Decimal, b: Decimal): Decimal {
134
- return normalize({ int: a.int * b.int, scale: a.scale + b.scale });
135
- }
136
-
137
- /** The crate's long division: `DIVISION_DIGITS` digits, the last rounded half up. */
138
- function longDivision(num: bigint, den: bigint, scale: number): Decimal {
139
- if (num === 0n) return { int: 0n, scale: 0 };
140
- if (num < 0n !== den < 0n) {
141
- const { int, scale: s } = longDivision(abs(num), abs(den), scale);
142
- return { int: -int, scale: s };
143
- }
144
- num = abs(num);
145
- den = abs(den);
146
- while (num < den) {
147
- scale += 1;
148
- num *= 10n;
149
- }
150
- const first = num / den;
151
- if (num % den === 0n) return { int: first, scale };
152
- // The crate appends one digit at a time until the remainder is zero or the
153
- // quotient has DIVISION_DIGITS digits, then rounds half up on the next
154
- // digit. One division of `num * 10 ** extra` gives the same digits: the
155
- // digit that ends the remainder is never zero, so an early stop shows as
156
- // the quotient's trailing zeros.
157
- const extra = Math.max(0, DIVISION_DIGITS - countDigits(first));
158
- let quotient = (num * ten(extra)) / den;
159
- const remainder = (num * ten(extra)) % den;
160
- if (remainder !== 0n) return { int: quotient + (2n * remainder >= den ? 1n : 0n), scale: scale + extra };
161
- let appended = extra;
162
- while (appended > 0 && quotient % 10n === 0n) {
163
- quotient /= 10n;
164
- appended -= 1;
165
- }
166
- return { int: quotient, scale: scale + appended };
167
- }
168
-
169
- export function divide(a: Decimal, b: Decimal): Decimal {
170
- if (b.int === 0n) throw new Error("Cannot divide by zero-valued `BigDecimal`!");
171
- if (a.int === 0n || (b.int === 1n && b.scale === 0)) return normalize(a);
172
- const scale = a.scale - b.scale;
173
- if (a.int === b.int) return normalize({ int: 1n, scale });
174
- return normalize(longDivision(a.int, b.int, scale));
175
- }
176
-
177
- /** The crate's `from_str`: digits, a point and an exponent, all exact. */
178
- export function parse(text: string): Decimal {
179
- const match = /^([+-]?)(\d*)(?:\.(\d*))?(?:[eE]([+-]?\d+))?$/.exec(text.trim());
180
- if (!match || (match[2] === "" && (match[3] ?? "") === "")) {
181
- throw new Error(`Invalid BigDecimal: ${text}`);
182
- }
183
- const [, sign, lead, trail = "", exponent = "0"] = match;
184
- const int = BigInt(`${sign === "-" ? "-" : ""}${lead}${trail}` || "0");
185
- return normalize({ int, scale: trail.length - Number(exponent) });
186
- }
187
-
188
- export function fromInteger(value: bigint): Decimal {
189
- return normalize({ int: value, scale: 0 });
190
- }
191
-
192
- /** The plain decimal the crate prints, which is what `toString` returns. */
193
- export function format({ int, scale }: Decimal): string {
194
- if (scale <= 0) return (int * ten(-scale)).toString();
195
- const negative = int < 0n;
196
- const digits = abs(int).toString().padStart(scale + 1, "0");
197
- const point = digits.length - scale;
198
- return `${negative ? "-" : ""}${digits.slice(0, point)}.${digits.slice(point)}`;
199
- }
@@ -1,28 +0,0 @@
1
- /**
2
- * The type checker relates enums from separate declarations only when they
3
- * share a name, so these carry graph-ts' own names — the conformance check
4
- * then sees them as the enums a mapping codes against.
5
- */
6
-
7
- /** `ethereum.ValueKind` */
8
- export enum ValueKind {
9
- ADDRESS = 0,
10
- FIXED_BYTES = 1,
11
- BYTES = 2,
12
- INT = 3,
13
- UINT = 4,
14
- BOOL = 5,
15
- STRING = 6,
16
- FIXED_ARRAY = 7,
17
- ARRAY = 8,
18
- TUPLE = 9,
19
- }
20
-
21
- /** `log.Level` */
22
- export enum Level {
23
- CRITICAL = 0,
24
- ERROR = 1,
25
- WARNING = 2,
26
- INFO = 3,
27
- DEBUG = 4,
28
- }
@@ -1,2 +0,0 @@
1
- @graphprotocol/graph-ts 0.38.1
2
- Generated by scripts/generate-graph-ts-types.mjs
@@ -1,70 +0,0 @@
1
- import '../common/eager-offset';
2
- import { Bytes } from '../common/collections';
3
- export declare namespace arweave {
4
- /**
5
- * A key-value pair for arbitrary metadata
6
- */
7
- class Tag {
8
- name: Bytes;
9
- value: Bytes;
10
- constructor(name: Bytes, value: Bytes);
11
- }
12
- class ProofOfAccess {
13
- option: string;
14
- txPath: Bytes;
15
- dataPath: Bytes;
16
- chunk: Bytes;
17
- constructor(option: string, txPath: Bytes, dataPath: Bytes, chunk: Bytes);
18
- }
19
- /**
20
- * An Arweave block.
21
- */
22
- class Block {
23
- timestamp: bigint;
24
- lastRetarget: bigint;
25
- height: bigint;
26
- indepHash: Bytes;
27
- nonce: Bytes;
28
- previousBlock: Bytes;
29
- diff: Bytes;
30
- hash: Bytes;
31
- txRoot: Bytes;
32
- txs: Bytes[];
33
- walletList: Bytes;
34
- rewardAddr: Bytes;
35
- tags: Tag[];
36
- rewardPool: Bytes;
37
- weaveSize: Bytes;
38
- blockSize: Bytes;
39
- cumulativeDiff: Bytes;
40
- hashListMerkle: Bytes;
41
- poa: ProofOfAccess;
42
- constructor(timestamp: bigint, lastRetarget: bigint, height: bigint, indepHash: Bytes, nonce: Bytes, previousBlock: Bytes, diff: Bytes, hash: Bytes, txRoot: Bytes, txs: Bytes[], walletList: Bytes, rewardAddr: Bytes, tags: Tag[], rewardPool: Bytes, weaveSize: Bytes, blockSize: Bytes, cumulativeDiff: Bytes, hashListMerkle: Bytes, poa: ProofOfAccess);
43
- }
44
- /**
45
- * An Arweave transaction
46
- */
47
- class Transaction {
48
- format: number;
49
- id: Bytes;
50
- lastTx: Bytes;
51
- owner: Bytes;
52
- tags: Tag[];
53
- target: Bytes;
54
- quantity: Bytes;
55
- data: Bytes;
56
- dataSize: Bytes;
57
- dataRoot: Bytes;
58
- signature: Bytes;
59
- reward: Bytes;
60
- constructor(format: number, id: Bytes, lastTx: Bytes, owner: Bytes, tags: Tag[], target: Bytes, quantity: Bytes, data: Bytes, dataSize: Bytes, dataRoot: Bytes, signature: Bytes, reward: Bytes);
61
- }
62
- /**
63
- * An Arweave transaction with block ptr
64
- */
65
- class TransactionWithBlockPtr {
66
- tx: Transaction;
67
- block: Block;
68
- constructor(tx: Transaction, block: Block);
69
- }
70
- }
@@ -1,327 +0,0 @@
1
- import '../common/eager-offset';
2
- import { Bytes } from '../common/collections';
3
- export declare namespace cosmos {
4
- class Block {
5
- header: Header;
6
- evidence: EvidenceList;
7
- lastCommit: Commit;
8
- resultBeginBlock: ResponseBeginBlock;
9
- resultEndBlock: ResponseEndBlock;
10
- transactions: Array<TxResult>;
11
- validatorUpdates: Array<Validator>;
12
- constructor(header: Header, evidence: EvidenceList, lastCommit: Commit, resultBeginBlock: ResponseBeginBlock, resultEndBlock: ResponseEndBlock, transactions: Array<TxResult>, validatorUpdates: Array<Validator>);
13
- }
14
- class HeaderOnlyBlock {
15
- header: Header;
16
- constructor(header: Header);
17
- }
18
- class EventData {
19
- event: Event;
20
- block: HeaderOnlyBlock;
21
- tx: TransactionContext;
22
- constructor(event: Event, block: HeaderOnlyBlock, tx: TransactionContext);
23
- }
24
- class TransactionData {
25
- tx: TxResult;
26
- block: HeaderOnlyBlock;
27
- constructor(tx: TxResult, block: HeaderOnlyBlock);
28
- }
29
- class MessageData {
30
- message: Any;
31
- block: HeaderOnlyBlock;
32
- tx: TransactionContext;
33
- constructor(message: Any, block: HeaderOnlyBlock, tx: TransactionContext);
34
- }
35
- class TransactionContext {
36
- hash: Bytes;
37
- index: number;
38
- code: number;
39
- gasWanted: bigint;
40
- gasUsed: bigint;
41
- constructor(hash: Bytes, index: number, code: number, gasWanted: bigint, gasUsed: bigint);
42
- }
43
- class Header {
44
- version: Consensus;
45
- chainId: string;
46
- height: bigint;
47
- time: Timestamp;
48
- lastBlockId: BlockID;
49
- lastCommitHash: Bytes;
50
- dataHash: Bytes;
51
- validatorsHash: Bytes;
52
- nextValidatorsHash: Bytes;
53
- consensusHash: Bytes;
54
- appHash: Bytes;
55
- lastResultsHash: Bytes;
56
- evidenceHash: Bytes;
57
- proposerAddress: Bytes;
58
- hash: Bytes;
59
- constructor(version: Consensus, chainId: string, height: bigint, time: Timestamp, lastBlockId: BlockID, lastCommitHash: Bytes, dataHash: Bytes, validatorsHash: Bytes, nextValidatorsHash: Bytes, consensusHash: Bytes, appHash: Bytes, lastResultsHash: Bytes, evidenceHash: Bytes, proposerAddress: Bytes, hash: Bytes);
60
- }
61
- class Consensus {
62
- block: bigint;
63
- app: bigint;
64
- constructor(block: bigint, app: bigint);
65
- }
66
- class Timestamp {
67
- seconds: bigint;
68
- nanos: number;
69
- constructor(seconds: bigint, nanos: number);
70
- }
71
- class BlockID {
72
- hash: Bytes;
73
- partSetHeader: PartSetHeader;
74
- constructor(hash: Bytes, partSetHeader: PartSetHeader);
75
- }
76
- class PartSetHeader {
77
- total: number;
78
- hash: Bytes;
79
- constructor(total: number, hash: Bytes);
80
- }
81
- class EvidenceList {
82
- evidence: Array<Evidence>;
83
- constructor(evidence: Array<Evidence>);
84
- }
85
- class Evidence {
86
- duplicateVoteEvidence: DuplicateVoteEvidence;
87
- lightClientAttackEvidence: LightClientAttackEvidence;
88
- constructor(duplicateVoteEvidence: DuplicateVoteEvidence, lightClientAttackEvidence: LightClientAttackEvidence);
89
- }
90
- class DuplicateVoteEvidence {
91
- voteA: EventVote;
92
- voteB: EventVote;
93
- totalVotingPower: bigint;
94
- validatorPower: bigint;
95
- timestamp: Timestamp;
96
- constructor(voteA: EventVote, voteB: EventVote, totalVotingPower: bigint, validatorPower: bigint, timestamp: Timestamp);
97
- }
98
- class EventVote {
99
- eventVoteType: SignedMsgType;
100
- height: bigint;
101
- round: number;
102
- blockId: BlockID;
103
- timestamp: Timestamp;
104
- validatorAddress: Bytes;
105
- validatorIndex: number;
106
- signature: Bytes;
107
- constructor(eventVoteType: SignedMsgType, height: bigint, round: number, blockId: BlockID, timestamp: Timestamp, validatorAddress: Bytes, validatorIndex: number, signature: Bytes);
108
- }
109
- enum SignedMsgType {
110
- SIGNED_MSG_TYPE_UNKNOWN = 0,
111
- SIGNED_MSG_TYPE_PREVOTE = 1,
112
- SIGNED_MSG_TYPE_PRECOMMIT = 2,
113
- SIGNED_MSG_TYPE_PROPOSAL = 32
114
- }
115
- class LightClientAttackEvidence {
116
- conflictingBlock: LightBlock;
117
- commonHeight: bigint;
118
- byzantineValidators: Array<Validator>;
119
- totalVotingPower: bigint;
120
- timestamp: Timestamp;
121
- constructor(conflictingBlock: LightBlock, commonHeight: bigint, byzantineValidators: Array<Validator>, totalVotingPower: bigint, timestamp: Timestamp);
122
- }
123
- class LightBlock {
124
- signedHeader: SignedHeader;
125
- validatorSet: ValidatorSet;
126
- constructor(signedHeader: SignedHeader, validatorSet: ValidatorSet);
127
- }
128
- class SignedHeader {
129
- header: Header;
130
- commit: Commit;
131
- constructor(header: Header, commit: Commit);
132
- }
133
- class Commit {
134
- height: bigint;
135
- round: number;
136
- blockId: BlockID;
137
- signatures: Array<CommitSig>;
138
- constructor(height: bigint, round: number, blockId: BlockID, signatures: Array<CommitSig>);
139
- }
140
- class CommitSig {
141
- blockIdFlag: BlockIDFlag;
142
- validatorAddress: Bytes;
143
- timestamp: Timestamp;
144
- signature: Bytes;
145
- constructor(blockIdFlag: BlockIDFlag, validatorAddress: Bytes, timestamp: Timestamp, signature: Bytes);
146
- }
147
- enum BlockIDFlag {
148
- BLOCK_ID_FLAG_UNKNOWN = 0,
149
- BLOCK_ID_FLAG_ABSENT = 1,
150
- BLOCK_ID_FLAG_COMMIT = 2,
151
- BLOCK_ID_FLAG_NIL = 3
152
- }
153
- class ValidatorSet {
154
- validators: Array<Validator>;
155
- proposer: Validator;
156
- totalVotingPower: bigint;
157
- constructor(validators: Array<Validator>, proposer: Validator, totalVotingPower: bigint);
158
- }
159
- class Validator {
160
- address: Bytes;
161
- pubKey: PublicKey;
162
- votingPower: bigint;
163
- proposerPriority: bigint;
164
- constructor(address: Bytes, pubKey: PublicKey, votingPower: bigint, proposerPriority: bigint);
165
- }
166
- class PublicKey {
167
- ed25519: Bytes;
168
- secp256k1: Bytes;
169
- constructor(ed25519: Bytes, secp256k1: Bytes);
170
- }
171
- class ResponseBeginBlock {
172
- events: Array<Event>;
173
- constructor(events: Array<Event>);
174
- }
175
- class Event {
176
- eventType: string;
177
- attributes: Array<EventAttribute>;
178
- constructor(eventType: string, attributes: Array<EventAttribute>);
179
- getAttribute(key: string): EventAttribute | null;
180
- getAttributeValue(key: string): string;
181
- }
182
- class EventAttribute {
183
- key: string;
184
- value: string;
185
- index: boolean;
186
- constructor(key: string, value: string, index: boolean);
187
- }
188
- class ResponseEndBlock {
189
- validatorUpdates: Array<ValidatorUpdate>;
190
- consensusParamUpdates: ConsensusParams;
191
- events: Array<Event>;
192
- constructor(validatorUpdates: Array<ValidatorUpdate>, consensusParamUpdates: ConsensusParams, events: Array<Event>);
193
- }
194
- class ValidatorUpdate {
195
- address: Bytes;
196
- pubKey: PublicKey;
197
- power: bigint;
198
- constructor(address: Bytes, pubKey: PublicKey, power: bigint);
199
- }
200
- class ConsensusParams {
201
- block: BlockParams;
202
- evidence: EvidenceParams;
203
- validator: ValidatorParams;
204
- version: VersionParams;
205
- constructor(block: BlockParams, evidence: EvidenceParams, validator: ValidatorParams, version: VersionParams);
206
- }
207
- class BlockParams {
208
- maxBytes: bigint;
209
- maxGas: bigint;
210
- constructor(maxBytes: bigint, maxGas: bigint);
211
- }
212
- class EvidenceParams {
213
- maxAgeNumBlocks: bigint;
214
- maxAgeDuration: Duration;
215
- maxBytes: bigint;
216
- constructor(maxAgeNumBlocks: bigint, maxAgeDuration: Duration, maxBytes: bigint);
217
- }
218
- class Duration {
219
- seconds: bigint;
220
- nanos: number;
221
- constructor(seconds: bigint, nanos: number);
222
- }
223
- class ValidatorParams {
224
- pubKeyTypes: Array<string>;
225
- constructor(pubKeyTypes: Array<string>);
226
- }
227
- class VersionParams {
228
- appVersion: bigint;
229
- constructor(appVersion: bigint);
230
- }
231
- class TxResult {
232
- height: bigint;
233
- index: number;
234
- tx: Tx;
235
- result: ResponseDeliverTx;
236
- hash: Bytes;
237
- constructor(height: bigint, index: number, tx: Tx, result: ResponseDeliverTx, hash: Bytes);
238
- }
239
- class Tx {
240
- body: TxBody;
241
- authInfo: AuthInfo;
242
- signatures: Array<Bytes>;
243
- constructor(body: TxBody, authInfo: AuthInfo, signatures: Array<Bytes>);
244
- }
245
- class TxBody {
246
- messages: Array<Any>;
247
- memo: string;
248
- timeoutHeight: bigint;
249
- extensionOptions: Array<Any>;
250
- nonCriticalExtensionOptions: Array<Any>;
251
- constructor(messages: Array<Any>, memo: string, timeoutHeight: bigint, extensionOptions: Array<Any>, nonCriticalExtensionOptions: Array<Any>);
252
- }
253
- class Any {
254
- typeUrl: string;
255
- value: Bytes;
256
- constructor(typeUrl: string, value: Bytes);
257
- }
258
- class AuthInfo {
259
- signerInfos: Array<SignerInfo>;
260
- fee: Fee;
261
- tip: Tip;
262
- constructor(signerInfos: Array<SignerInfo>, fee: Fee, tip: Tip);
263
- }
264
- class SignerInfo {
265
- publicKey: Any;
266
- modeInfo: ModeInfo;
267
- sequence: bigint;
268
- constructor(publicKey: Any, modeInfo: ModeInfo, sequence: bigint);
269
- }
270
- class ModeInfo {
271
- single: ModeInfoSingle;
272
- multi: ModeInfoMulti;
273
- constructor(single: ModeInfoSingle, multi: ModeInfoMulti);
274
- }
275
- class ModeInfoSingle {
276
- mode: SignMode;
277
- constructor(mode: SignMode);
278
- }
279
- enum SignMode {
280
- SIGN_MODE_UNSPECIFIED = 0,
281
- SIGN_MODE_DIRECT = 1,
282
- SIGN_MODE_TEXTUAL = 2,
283
- SIGN_MODE_LEGACY_AMINO_JSON = 127
284
- }
285
- class ModeInfoMulti {
286
- bitarray: CompactBitArray;
287
- modeInfos: Array<ModeInfo>;
288
- constructor(bitarray: CompactBitArray, modeInfos: Array<ModeInfo>);
289
- }
290
- class CompactBitArray {
291
- extraBitsStored: number;
292
- elems: Bytes;
293
- constructor(extraBitsStored: number, elems: Bytes);
294
- }
295
- class Fee {
296
- amount: Array<Coin>;
297
- gasLimit: bigint;
298
- payer: string;
299
- granter: string;
300
- constructor(amount: Array<Coin>, gasLimit: bigint, payer: string, granter: string);
301
- }
302
- class Coin {
303
- denom: string;
304
- amount: string;
305
- constructor(denom: string, amount: string);
306
- }
307
- class Tip {
308
- amount: Array<Coin>;
309
- tipper: string;
310
- constructor(amount: Array<Coin>, tipper: string);
311
- }
312
- class ResponseDeliverTx {
313
- code: number;
314
- data: Bytes;
315
- log: string;
316
- info: string;
317
- gasWanted: bigint;
318
- gasUsed: bigint;
319
- events: Array<Event>;
320
- codespace: string;
321
- constructor(code: number, data: Bytes, log: string, info: string, gasWanted: bigint, gasUsed: bigint, events: Array<Event>, codespace: string);
322
- }
323
- class ValidatorSetUpdates {
324
- validatorUpdates: Array<Validator>;
325
- constructor(validatorUpdates: Array<Validator>);
326
- }
327
- }