envio 3.14.0-subgraph → 3.14.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 (63) hide show
  1. package/evm.schema.json +1 -1
  2. package/package.json +6 -6
  3. package/src/Config.res +0 -9
  4. package/src/Config.res.mjs +2 -6
  5. package/src/Core.res +0 -21
  6. package/src/Core.res.mjs +0 -17
  7. package/src/EventProcessing.res +6 -6
  8. package/src/EventProcessing.res.mjs +6 -8
  9. package/src/HandlerLoader.res +22 -48
  10. package/src/HandlerLoader.res.mjs +15 -41
  11. package/src/HandlerTypeCheck.res +207 -0
  12. package/src/HandlerTypeCheck.res.mjs +262 -0
  13. package/src/LoadLayer.res +7 -39
  14. package/src/LoadLayer.res.mjs +38 -65
  15. package/src/LoadLayer.resi +0 -28
  16. package/src/PgStorage.res +5 -24
  17. package/src/PgStorage.res.mjs +1 -18
  18. package/src/UserContext.res +62 -377
  19. package/src/UserContext.res.mjs +39 -297
  20. package/src/bindings/NodeJs.res +31 -0
  21. package/src/bindings/NodeJs.res.mjs +3 -0
  22. package/src/db/Table.res +0 -10
  23. package/src/db/Table.res.mjs +11 -22
  24. package/src/sources/EvmRpcClient.res +2 -0
  25. package/src/sources/RpcSource.res +17 -4
  26. package/src/sources/RpcSource.res.mjs +23 -5
  27. package/src/sources/SourceManager.res +63 -40
  28. package/src/sources/SourceManager.res.mjs +32 -20
  29. package/src/HandlerTypeCheck.mjs +0 -14
  30. package/src/HandlerTypeCheckWorker.mjs +0 -68
  31. package/src/SyncWrites.res +0 -86
  32. package/src/SyncWrites.res.mjs +0 -85
  33. package/src/subgraph/abi-types.ts +0 -63
  34. package/src/subgraph/assemblyscript.ts +0 -85
  35. package/src/subgraph/blocks.ts +0 -183
  36. package/src/subgraph/calls.ts +0 -149
  37. package/src/subgraph/conformance.ts +0 -83
  38. package/src/subgraph/errors.ts +0 -96
  39. package/src/subgraph/graph-cli-worker.mjs +0 -26
  40. package/src/subgraph/graph-cli.ts +0 -190
  41. package/src/subgraph/graph-ts-enums.ts +0 -28
  42. package/src/subgraph/graph-ts-types/VERSION +0 -2
  43. package/src/subgraph/graph-ts-types/chain/arweave.d.ts +0 -70
  44. package/src/subgraph/graph-ts-types/chain/cosmos.d.ts +0 -327
  45. package/src/subgraph/graph-ts-types/chain/ethereum.d.ts +0 -233
  46. package/src/subgraph/graph-ts-types/chain/near.d.ts +0 -253
  47. package/src/subgraph/graph-ts-types/chain/starknet.d.ts +0 -32
  48. package/src/subgraph/graph-ts-types/common/collections.d.ts +0 -136
  49. package/src/subgraph/graph-ts-types/common/conversion.d.ts +0 -11
  50. package/src/subgraph/graph-ts-types/common/datasource.d.ts +0 -30
  51. package/src/subgraph/graph-ts-types/common/eager-offset.d.ts +0 -0
  52. package/src/subgraph/graph-ts-types/common/json.d.ts +0 -17
  53. package/src/subgraph/graph-ts-types/common/numbers.d.ts +0 -120
  54. package/src/subgraph/graph-ts-types/common/value.d.ts +0 -120
  55. package/src/subgraph/graph-ts-types/common/yaml.d.ts +0 -90
  56. package/src/subgraph/graph-ts-types/global/global.d.ts +0 -194
  57. package/src/subgraph/graph-ts-types/helper-functions.d.ts +0 -22
  58. package/src/subgraph/graph-ts-types/index.d.ts +0 -102
  59. package/src/subgraph/graph-ts.ts +0 -2285
  60. package/src/subgraph/hosts.ts +0 -158
  61. package/src/subgraph/rpc.ts +0 -65
  62. package/src/subgraph/runtime.ts +0 -595
  63. package/src/subgraph/scope.ts +0 -68
@@ -1,190 +0,0 @@
1
- /**
2
- * The project's own graph-cli, run inside this process on a worker thread.
3
- *
4
- * Its own version, so the generated code is byte-for-byte what the developer
5
- * gets from `graph codegen`; a worker, so its heap can be sized for it alone —
6
- * codegen over a large ABI set outgrows Node's default heap long before envio
7
- * does.
8
- */
9
-
10
- import {
11
- existsSync,
12
- mkdirSync,
13
- readFileSync,
14
- readdirSync,
15
- realpathSync,
16
- statSync,
17
- writeFileSync,
18
- } from "node:fs";
19
- import { totalmem } from "node:os";
20
- import path from "node:path";
21
- import { Worker } from "node:worker_threads";
22
-
23
- const WORKER = new URL("./graph-cli-worker.mjs", import.meta.url);
24
-
25
- /**
26
- * Three quarters of the machine — the worker is the only thing running — or of
27
- * the container, whose limit `totalmem` doesn't see.
28
- */
29
- const HEAP_MB = Math.floor(
30
- (Math.min(totalmem(), process.constrainedMemory?.() || Infinity) / 2 ** 20) * 0.75,
31
- );
32
-
33
- function graphCliPackage(root: string): string | null {
34
- const dir = path.resolve(root, "node_modules", "@graphprotocol", "graph-cli");
35
- // pnpm links the package in; its own plugins resolve only from where it lives.
36
- return existsSync(dir) ? realpathSync(dir) : null;
37
- }
38
-
39
- type Outcome = "ok" | "failed" | "outOfMemory";
40
-
41
- function runGraphCli(packageDir: string, command: string, argv: string[]): Promise<Outcome> {
42
- return new Promise((resolve) => {
43
- let ok = false;
44
- const worker = new Worker(WORKER, {
45
- workerData: { packageDir, command, argv },
46
- resourceLimits: { maxOldGenerationSizeMb: HEAP_MB },
47
- });
48
- worker.on("message", (message: boolean) => (ok = message));
49
- worker.on("error", (error: NodeJS.ErrnoException) => {
50
- if (error.code === "ERR_WORKER_OUT_OF_MEMORY") {
51
- resolve("outOfMemory");
52
- } else {
53
- console.error(error);
54
- resolve("failed");
55
- }
56
- });
57
- worker.on("exit", () => resolve(ok ? "ok" : "failed"));
58
- });
59
- }
60
-
61
- /**
62
- * Migrations are skipped: they rewrite the developer's `subgraph.yaml` in
63
- * place, and envio reads a manifest, it doesn't maintain one.
64
- */
65
- async function runOrThrow(
66
- graphCli: string,
67
- root: string,
68
- command: string,
69
- outputDir: string,
70
- failure: string,
71
- ): Promise<void> {
72
- const outcome = await runGraphCli(graphCli, command, [
73
- path.resolve(root, "subgraph.yaml"),
74
- "--output-dir",
75
- outputDir,
76
- "--skip-migrations",
77
- ]);
78
- if (outcome === "outOfMemory") {
79
- throw new Error(
80
- `Envio Subgraph ran \`graph ${command}\` with a ${HEAP_MB} MB heap, three\n` +
81
- "quarters of this machine's memory, and it ran out. Run it on a machine\n" +
82
- "with more memory, then start envio again.",
83
- );
84
- }
85
- if (outcome === "failed") throw new Error(failure);
86
- }
87
-
88
- const RELATIVE_IMPORT = /\bfrom\s*["'](\.\.?\/[^"']+)["']/g;
89
-
90
- /**
91
- * Where the mappings import their generated code from: `graph codegen -o`
92
- * moves it, and the mappings are the only record of where. Every generated
93
- * tree has a `schema.ts`, and a template's a `templates.ts`.
94
- */
95
- export function generatedDir(root: string, mappingFiles: string[]): string {
96
- for (const mappingFile of new Set(mappingFiles)) {
97
- const file = path.resolve(root, mappingFile);
98
- let source: string;
99
- try {
100
- source = readFileSync(file, "utf8");
101
- } catch {
102
- continue;
103
- }
104
- for (const [, specifier] of source.matchAll(RELATIVE_IMPORT)) {
105
- const base = path.basename(specifier).replace(/\.ts$/, "");
106
- if (base === "schema" || base === "templates") {
107
- return path.resolve(path.dirname(file), path.dirname(specifier));
108
- }
109
- }
110
- }
111
- return path.join(root, "generated");
112
- }
113
-
114
- export function missingGeneratedCode(root: string, dir: string): Error {
115
- const relative = path.relative(root, dir);
116
- return new Error(
117
- `Envio Subgraph needs the project's generated code, but "${relative}/" is\n` +
118
- "missing and @graphprotocol/graph-cli isn't installed.\n" +
119
- "Install dependencies and try again:\n" +
120
- " pnpm install\n" +
121
- "Or generate manually:\n" +
122
- ` pnpm exec graph codegen --output-dir ${relative}`,
123
- );
124
- }
125
-
126
- /** The generated code is usually gitignored, so it's built when missing. */
127
- export async function ensureGeneratedCode(root: string, dir: string): Promise<void> {
128
- if (existsSync(dir)) return;
129
- const graphCli = graphCliPackage(root);
130
- // Reported when a mapping fails to import it, naming that mapping.
131
- if (!graphCli) return;
132
-
133
- await runOrThrow(
134
- graphCli,
135
- root,
136
- "codegen",
137
- dir,
138
- "Envio Subgraph ran `graph codegen` to build the generated code, but it\n" +
139
- "failed — the error above comes from The Graph's own codegen, so fix it\n" +
140
- "there and rerun. If `graph codegen` succeeds on its own but fails through\n" +
141
- "envio, please open an issue: https://github.com/enviodev/hyperindex/issues",
142
- );
143
- }
144
-
145
- /**
146
- * `graph build` compiles the mappings with `asc` against the real
147
- * `@graphprotocol/graph-ts`. That is the type check a subgraph project already
148
- * has, and running it in `envio dev` keeps the feedback loop the developer
149
- * knows — a type error reads the same here as it does on Graph Node.
150
- *
151
- * Only in dev, and only when something it reads has changed: it is an
152
- * AssemblyScript compile, not something to pay on every restart.
153
- */
154
- export async function typeCheckMappings(root: string): Promise<void> {
155
- const graphCli = graphCliPackage(root);
156
- if (!graphCli) return;
157
-
158
- const inputs = ["subgraph.yaml", "schema.graphql", "src", "abis"]
159
- .map((entry) => path.join(root, entry))
160
- .filter((entry) => existsSync(entry))
161
- .map((entry) => fingerprint(entry))
162
- .join("|");
163
-
164
- const stamp = path.join(root, ".envio", "graph-build.stamp");
165
- if (existsSync(stamp) && readFileSync(stamp, "utf8") === inputs) return;
166
-
167
- await runOrThrow(
168
- graphCli,
169
- root,
170
- "build",
171
- path.resolve(root, "build"),
172
- "Envio Subgraph ran `graph build` to type-check the mappings, and it\n" +
173
- "failed — the error above comes from The Graph's own AssemblyScript\n" +
174
- "compiler, so fix it there and rerun.",
175
- );
176
-
177
- mkdirSync(path.dirname(stamp), { recursive: true });
178
- writeFileSync(stamp, inputs);
179
- }
180
-
181
- function fingerprint(entry: string): string {
182
- const stats = statSync(entry);
183
- if (!stats.isDirectory()) {
184
- return `${entry}:${stats.mtimeMs}:${stats.size}`;
185
- }
186
- return readdirSync(entry)
187
- .sort()
188
- .map((child) => fingerprint(path.join(entry, child)))
189
- .join(",");
190
- }
@@ -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
- }