ault-sdk-ts 0.0.2-alpha.5

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 (138) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +932 -0
  3. package/dist/agent/create-agent-client.d.ts +3 -0
  4. package/dist/agent/sign-and-broadcast.d.ts +38 -0
  5. package/dist/agent/tx/clob.d.ts +7 -0
  6. package/dist/agent/tx-executor.d.ts +17 -0
  7. package/dist/client.d.ts +61 -0
  8. package/dist/core/address.d.ts +14 -0
  9. package/dist/core/base64.d.ts +2 -0
  10. package/dist/core/clob-msgs.d.ts +33 -0
  11. package/dist/core/errors.d.ts +17 -0
  12. package/dist/core/http.d.ts +14 -0
  13. package/dist/core/network.d.ts +59 -0
  14. package/dist/core/pagination.d.ts +14 -0
  15. package/dist/core/query.d.ts +5 -0
  16. package/dist/core/with-status-fallback.d.ts +5 -0
  17. package/dist/eip712/builder.d.ts +45 -0
  18. package/dist/eip712/field-order.d.ts +2 -0
  19. package/dist/eip712/msg-encoders.generated.d.ts +1 -0
  20. package/dist/eip712/msg.generated.d.ts +109 -0
  21. package/dist/eip712/registry.d.ts +36 -0
  22. package/dist/eip712/registry.generated.d.ts +2 -0
  23. package/dist/eip712/sign-and-broadcast.d.ts +55 -0
  24. package/dist/eip712/signers.d.ts +83 -0
  25. package/dist/eip712/types.d.ts +58 -0
  26. package/dist/high-level/address-utils.d.ts +2 -0
  27. package/dist/high-level/create-client.d.ts +26 -0
  28. package/dist/high-level/query-helpers.d.ts +3 -0
  29. package/dist/high-level/signer.d.ts +6 -0
  30. package/dist/high-level/tx/agent.d.ts +3 -0
  31. package/dist/high-level/tx/authority.d.ts +3 -0
  32. package/dist/high-level/tx/clob.d.ts +3 -0
  33. package/dist/high-level/tx/context.d.ts +5 -0
  34. package/dist/high-level/tx/license.d.ts +3 -0
  35. package/dist/high-level/tx/market.d.ts +3 -0
  36. package/dist/high-level/tx/miner.d.ts +3 -0
  37. package/dist/high-level/tx/ratelimit.d.ts +3 -0
  38. package/dist/high-level/tx/reward.d.ts +3 -0
  39. package/dist/high-level/tx/staking.d.ts +3 -0
  40. package/dist/high-level/tx/tokenregistry.d.ts +3 -0
  41. package/dist/high-level/tx-executor.d.ts +18 -0
  42. package/dist/high-level/types.d.ts +477 -0
  43. package/dist/high-level-client.d.ts +2 -0
  44. package/dist/index.cjs +18434 -0
  45. package/dist/index.cjs.map +1 -0
  46. package/dist/index.d.ts +38 -0
  47. package/dist/index.js +18162 -0
  48. package/dist/index.js.map +1 -0
  49. package/dist/proto/duration-json.d.ts +6 -0
  50. package/dist/proto/gen/amino/amino.d.ts +1 -0
  51. package/dist/proto/gen/ault/agent/v1/agent.d.ts +63 -0
  52. package/dist/proto/gen/ault/agent/v1/genesis.d.ts +44 -0
  53. package/dist/proto/gen/ault/agent/v1/params.d.ts +42 -0
  54. package/dist/proto/gen/ault/agent/v1/query.d.ts +73 -0
  55. package/dist/proto/gen/ault/agent/v1/tx.d.ts +91 -0
  56. package/dist/proto/gen/ault/authority/v1/authority.d.ts +15 -0
  57. package/dist/proto/gen/ault/authority/v1/genesis.d.ts +36 -0
  58. package/dist/proto/gen/ault/authority/v1/query.d.ts +53 -0
  59. package/dist/proto/gen/ault/authority/v1/tx.d.ts +50 -0
  60. package/dist/proto/gen/ault/clob/v1/fee.d.ts +37 -0
  61. package/dist/proto/gen/ault/clob/v1/genesis.d.ts +56 -0
  62. package/dist/proto/gen/ault/clob/v1/order_book.d.ts +32 -0
  63. package/dist/proto/gen/ault/clob/v1/params.d.ts +29 -0
  64. package/dist/proto/gen/ault/clob/v1/query.d.ts +56 -0
  65. package/dist/proto/gen/ault/clob/v1/tx.d.ts +116 -0
  66. package/dist/proto/gen/ault/license/v1/genesis.d.ts +140 -0
  67. package/dist/proto/gen/ault/license/v1/license.d.ts +151 -0
  68. package/dist/proto/gen/ault/license/v1/query.d.ts +273 -0
  69. package/dist/proto/gen/ault/license/v1/tx.d.ts +227 -0
  70. package/dist/proto/gen/ault/market/v1/genesis.d.ts +28 -0
  71. package/dist/proto/gen/ault/market/v1/market.d.ts +66 -0
  72. package/dist/proto/gen/ault/market/v1/params.d.ts +34 -0
  73. package/dist/proto/gen/ault/market/v1/query.d.ts +48 -0
  74. package/dist/proto/gen/ault/market/v1/tx.d.ts +87 -0
  75. package/dist/proto/gen/ault/miner/v1/genesis.d.ts +166 -0
  76. package/dist/proto/gen/ault/miner/v1/miner.d.ts +232 -0
  77. package/dist/proto/gen/ault/miner/v1/query.d.ts +254 -0
  78. package/dist/proto/gen/ault/miner/v1/tx.d.ts +207 -0
  79. package/dist/proto/gen/ault/ratelimit/v1/genesis.d.ts +27 -0
  80. package/dist/proto/gen/ault/ratelimit/v1/params.d.ts +35 -0
  81. package/dist/proto/gen/ault/ratelimit/v1/query.d.ts +42 -0
  82. package/dist/proto/gen/ault/ratelimit/v1/tx.d.ts +32 -0
  83. package/dist/proto/gen/ault/reward/v1/genesis.d.ts +67 -0
  84. package/dist/proto/gen/ault/reward/v1/query.d.ts +93 -0
  85. package/dist/proto/gen/ault/reward/v1/reward.d.ts +53 -0
  86. package/dist/proto/gen/ault/reward/v1/tx.d.ts +120 -0
  87. package/dist/proto/gen/ault/spot/v1/genesis.d.ts +26 -0
  88. package/dist/proto/gen/ault/spot/v1/order.d.ts +66 -0
  89. package/dist/proto/gen/ault/tokenregistry/v1/genesis.d.ts +34 -0
  90. package/dist/proto/gen/ault/tokenregistry/v1/query.d.ts +77 -0
  91. package/dist/proto/gen/ault/tokenregistry/v1/tokenregistry.d.ts +118 -0
  92. package/dist/proto/gen/ault/tokenregistry/v1/tx.d.ts +132 -0
  93. package/dist/proto/gen/cosmos/base/query/v1beta1/pagination.d.ts +82 -0
  94. package/dist/proto/gen/cosmos/base/v1beta1/coin.d.ts +59 -0
  95. package/dist/proto/gen/cosmos/distribution/v1beta1/distribution.d.ts +162 -0
  96. package/dist/proto/gen/cosmos/distribution/v1beta1/tx.d.ts +140 -0
  97. package/dist/proto/gen/cosmos/msg/v1/msg.d.ts +1 -0
  98. package/dist/proto/gen/cosmos/staking/v1beta1/staking.d.ts +310 -0
  99. package/dist/proto/gen/cosmos/staking/v1beta1/tx.d.ts +144 -0
  100. package/dist/proto/gen/cosmos_proto/cosmos.d.ts +80 -0
  101. package/dist/proto/gen/gogoproto/gogo.d.ts +1 -0
  102. package/dist/proto/gen/google/api/annotations.d.ts +1 -0
  103. package/dist/proto/gen/google/api/http.d.ts +379 -0
  104. package/dist/proto/gen/google/protobuf/any.d.ts +144 -0
  105. package/dist/proto/gen/google/protobuf/descriptor.d.ts +1285 -0
  106. package/dist/proto/gen/google/protobuf/duration.d.ts +99 -0
  107. package/dist/proto/gen/google/protobuf/timestamp.d.ts +128 -0
  108. package/dist/proto/gen/tendermint/abci/types.d.ts +507 -0
  109. package/dist/proto/gen/tendermint/crypto/keys.d.ts +27 -0
  110. package/dist/proto/gen/tendermint/crypto/proof.d.ts +57 -0
  111. package/dist/proto/gen/tendermint/types/params.d.ts +112 -0
  112. package/dist/proto/gen/tendermint/types/types.d.ts +197 -0
  113. package/dist/proto/gen/tendermint/types/validator.d.ts +54 -0
  114. package/dist/proto/gen/tendermint/version/types.d.ts +41 -0
  115. package/dist/proto/tx-encode.d.ts +78 -0
  116. package/dist/rest/agent.d.ts +12 -0
  117. package/dist/rest/authority.d.ts +12 -0
  118. package/dist/rest/clob.d.ts +11 -0
  119. package/dist/rest/context.d.ts +22 -0
  120. package/dist/rest/dex-fetcher.d.ts +10 -0
  121. package/dist/rest/dex-types.generated.d.ts +780 -0
  122. package/dist/rest/dex.d.ts +34 -0
  123. package/dist/rest/dex.generated.d.ts +1381 -0
  124. package/dist/rest/license.d.ts +79 -0
  125. package/dist/rest/market.d.ts +11 -0
  126. package/dist/rest/miner.d.ts +59 -0
  127. package/dist/rest/ratelimit.d.ts +7 -0
  128. package/dist/rest/reward.d.ts +25 -0
  129. package/dist/rest/staking.d.ts +38 -0
  130. package/dist/rest/tokenregistry.d.ts +11 -0
  131. package/dist/rest/types.d.ts +871 -0
  132. package/dist/utils/address.d.ts +6 -0
  133. package/dist/utils/chain-id.d.ts +1 -0
  134. package/dist/utils/cosmos-dec.d.ts +2 -0
  135. package/dist/ws/client.d.ts +37 -0
  136. package/dist/ws/index.d.ts +5 -0
  137. package/dist/ws/types.d.ts +66 -0
  138. package/package.json +103 -0
@@ -0,0 +1,112 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ import { Duration } from "../../google/protobuf/duration";
3
+ export declare const protobufPackage = "tendermint.types";
4
+ /**
5
+ * ConsensusParams contains consensus critical parameters that determine the
6
+ * validity of blocks.
7
+ */
8
+ export interface ConsensusParams {
9
+ block: BlockParams | undefined;
10
+ evidence: EvidenceParams | undefined;
11
+ validator: ValidatorParams | undefined;
12
+ version: VersionParams | undefined;
13
+ abci: ABCIParams | undefined;
14
+ }
15
+ /** BlockParams contains limits on the block size. */
16
+ export interface BlockParams {
17
+ /**
18
+ * Max block size, in bytes.
19
+ * Note: must be greater than 0
20
+ */
21
+ maxBytes: bigint;
22
+ /**
23
+ * Max gas per block.
24
+ * Note: must be greater or equal to -1
25
+ */
26
+ maxGas: bigint;
27
+ }
28
+ /** EvidenceParams determine how we handle evidence of malfeasance. */
29
+ export interface EvidenceParams {
30
+ /**
31
+ * Max age of evidence, in blocks.
32
+ *
33
+ * The basic formula for calculating this is: MaxAgeDuration / {average block
34
+ * time}.
35
+ */
36
+ maxAgeNumBlocks: bigint;
37
+ /**
38
+ * Max age of evidence, in time.
39
+ *
40
+ * It should correspond with an app's "unbonding period" or other similar
41
+ * mechanism for handling [Nothing-At-Stake
42
+ * attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed).
43
+ */
44
+ maxAgeDuration: Duration | undefined;
45
+ /**
46
+ * This sets the maximum size of total evidence in bytes that can be committed in a single block.
47
+ * and should fall comfortably under the max block bytes.
48
+ * Default is 1048576 or 1MB
49
+ */
50
+ maxBytes: bigint;
51
+ }
52
+ /**
53
+ * ValidatorParams restrict the public key types validators can use.
54
+ * NOTE: uses ABCI pubkey naming, not Amino names.
55
+ */
56
+ export interface ValidatorParams {
57
+ pubKeyTypes: string[];
58
+ }
59
+ /** VersionParams contains the ABCI application version. */
60
+ export interface VersionParams {
61
+ app: bigint;
62
+ }
63
+ /**
64
+ * HashedParams is a subset of ConsensusParams.
65
+ *
66
+ * It is hashed into the Header.ConsensusHash.
67
+ */
68
+ export interface HashedParams {
69
+ blockMaxBytes: bigint;
70
+ blockMaxGas: bigint;
71
+ }
72
+ /** ABCIParams configure functionality specific to the Application Blockchain Interface. */
73
+ export interface ABCIParams {
74
+ /**
75
+ * vote_extensions_enable_height configures the first height during which
76
+ * vote extensions will be enabled. During this specified height, and for all
77
+ * subsequent heights, precommit messages that do not contain valid extension data
78
+ * will be considered invalid. Prior to this height, vote extensions will not
79
+ * be used or accepted by validators on the network.
80
+ *
81
+ * Once enabled, vote extensions will be created by the application in ExtendVote,
82
+ * passed to the application for validation in VerifyVoteExtension and given
83
+ * to the application to use when proposing a block during PrepareProposal.
84
+ */
85
+ voteExtensionsEnableHeight: bigint;
86
+ }
87
+ export declare const ConsensusParams: MessageFns<ConsensusParams>;
88
+ export declare const BlockParams: MessageFns<BlockParams>;
89
+ export declare const EvidenceParams: MessageFns<EvidenceParams>;
90
+ export declare const ValidatorParams: MessageFns<ValidatorParams>;
91
+ export declare const VersionParams: MessageFns<VersionParams>;
92
+ export declare const HashedParams: MessageFns<HashedParams>;
93
+ export declare const ABCIParams: MessageFns<ABCIParams>;
94
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
95
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
96
+ [K in keyof T]?: DeepPartial<T[K]>;
97
+ } : Partial<T>;
98
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
99
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
100
+ [K in keyof P]: Exact<P[K], I[K]>;
101
+ } & {
102
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
103
+ };
104
+ export interface MessageFns<T> {
105
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
106
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
107
+ fromJSON(object: any): T;
108
+ toJSON(message: T): unknown;
109
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
110
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
111
+ }
112
+ export {};
@@ -0,0 +1,197 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ import { Proof } from "../crypto/proof";
3
+ import { Consensus } from "../version/types";
4
+ import { BlockIDFlag, ValidatorSet } from "./validator";
5
+ export declare const protobufPackage = "tendermint.types";
6
+ /** SignedMsgType is a type of signed message in the consensus. */
7
+ export declare enum SignedMsgType {
8
+ SIGNED_MSG_TYPE_UNKNOWN = 0,
9
+ /** SIGNED_MSG_TYPE_PREVOTE - Votes */
10
+ SIGNED_MSG_TYPE_PREVOTE = 1,
11
+ SIGNED_MSG_TYPE_PRECOMMIT = 2,
12
+ /** SIGNED_MSG_TYPE_PROPOSAL - Proposals */
13
+ SIGNED_MSG_TYPE_PROPOSAL = 32,
14
+ UNRECOGNIZED = -1
15
+ }
16
+ export declare function signedMsgTypeFromJSON(object: any): SignedMsgType;
17
+ export declare function signedMsgTypeToJSON(object: SignedMsgType): string;
18
+ /** PartsetHeader */
19
+ export interface PartSetHeader {
20
+ total: number;
21
+ hash: Uint8Array;
22
+ }
23
+ export interface Part {
24
+ index: number;
25
+ bytes: Uint8Array;
26
+ proof: Proof | undefined;
27
+ }
28
+ /** BlockID */
29
+ export interface BlockID {
30
+ hash: Uint8Array;
31
+ partSetHeader: PartSetHeader | undefined;
32
+ }
33
+ /** Header defines the structure of a block header. */
34
+ export interface Header {
35
+ /** basic block info */
36
+ version: Consensus | undefined;
37
+ chainId: string;
38
+ height: bigint;
39
+ time: Date | undefined;
40
+ /** prev block info */
41
+ lastBlockId: BlockID | undefined;
42
+ /** hashes of block data */
43
+ lastCommitHash: Uint8Array;
44
+ /** transactions */
45
+ dataHash: Uint8Array;
46
+ /** hashes from the app output from the prev block */
47
+ validatorsHash: Uint8Array;
48
+ /** validators for the next block */
49
+ nextValidatorsHash: Uint8Array;
50
+ /** consensus params for current block */
51
+ consensusHash: Uint8Array;
52
+ /** state after txs from the previous block */
53
+ appHash: Uint8Array;
54
+ /** root hash of all results from the txs from the previous block */
55
+ lastResultsHash: Uint8Array;
56
+ /** consensus info */
57
+ evidenceHash: Uint8Array;
58
+ /** original proposer of the block */
59
+ proposerAddress: Uint8Array;
60
+ }
61
+ /** Data contains the set of transactions included in the block */
62
+ export interface Data {
63
+ /**
64
+ * Txs that will be applied by state @ block.Height+1.
65
+ * NOTE: not all txs here are valid. We're just agreeing on the order first.
66
+ * This means that block.AppHash does not include these txs.
67
+ */
68
+ txs: Uint8Array[];
69
+ }
70
+ /**
71
+ * Vote represents a prevote or precommit vote from validators for
72
+ * consensus.
73
+ */
74
+ export interface Vote {
75
+ type: SignedMsgType;
76
+ height: bigint;
77
+ round: number;
78
+ /** zero if vote is nil. */
79
+ blockId: BlockID | undefined;
80
+ timestamp: Date | undefined;
81
+ validatorAddress: Uint8Array;
82
+ validatorIndex: number;
83
+ /**
84
+ * Vote signature by the validator if they participated in consensus for the
85
+ * associated block.
86
+ */
87
+ signature: Uint8Array;
88
+ /**
89
+ * Vote extension provided by the application. Only valid for precommit
90
+ * messages.
91
+ */
92
+ extension: Uint8Array;
93
+ /**
94
+ * Vote extension signature by the validator if they participated in
95
+ * consensus for the associated block.
96
+ * Only valid for precommit messages.
97
+ */
98
+ extensionSignature: Uint8Array;
99
+ }
100
+ /** Commit contains the evidence that a block was committed by a set of validators. */
101
+ export interface Commit {
102
+ height: bigint;
103
+ round: number;
104
+ blockId: BlockID | undefined;
105
+ signatures: CommitSig[];
106
+ }
107
+ /** CommitSig is a part of the Vote included in a Commit. */
108
+ export interface CommitSig {
109
+ blockIdFlag: BlockIDFlag;
110
+ validatorAddress: Uint8Array;
111
+ timestamp: Date | undefined;
112
+ signature: Uint8Array;
113
+ }
114
+ export interface ExtendedCommit {
115
+ height: bigint;
116
+ round: number;
117
+ blockId: BlockID | undefined;
118
+ extendedSignatures: ExtendedCommitSig[];
119
+ }
120
+ /**
121
+ * ExtendedCommitSig retains all the same fields as CommitSig but adds vote
122
+ * extension-related fields. We use two signatures to ensure backwards compatibility.
123
+ * That is the digest of the original signature is still the same in prior versions
124
+ */
125
+ export interface ExtendedCommitSig {
126
+ blockIdFlag: BlockIDFlag;
127
+ validatorAddress: Uint8Array;
128
+ timestamp: Date | undefined;
129
+ signature: Uint8Array;
130
+ /** Vote extension data */
131
+ extension: Uint8Array;
132
+ /** Vote extension signature */
133
+ extensionSignature: Uint8Array;
134
+ }
135
+ export interface Proposal {
136
+ type: SignedMsgType;
137
+ height: bigint;
138
+ round: number;
139
+ polRound: number;
140
+ blockId: BlockID | undefined;
141
+ timestamp: Date | undefined;
142
+ signature: Uint8Array;
143
+ }
144
+ export interface SignedHeader {
145
+ header: Header | undefined;
146
+ commit: Commit | undefined;
147
+ }
148
+ export interface LightBlock {
149
+ signedHeader: SignedHeader | undefined;
150
+ validatorSet: ValidatorSet | undefined;
151
+ }
152
+ export interface BlockMeta {
153
+ blockId: BlockID | undefined;
154
+ blockSize: bigint;
155
+ header: Header | undefined;
156
+ numTxs: bigint;
157
+ }
158
+ /** TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree. */
159
+ export interface TxProof {
160
+ rootHash: Uint8Array;
161
+ data: Uint8Array;
162
+ proof: Proof | undefined;
163
+ }
164
+ export declare const PartSetHeader: MessageFns<PartSetHeader>;
165
+ export declare const Part: MessageFns<Part>;
166
+ export declare const BlockID: MessageFns<BlockID>;
167
+ export declare const Header: MessageFns<Header>;
168
+ export declare const Data: MessageFns<Data>;
169
+ export declare const Vote: MessageFns<Vote>;
170
+ export declare const Commit: MessageFns<Commit>;
171
+ export declare const CommitSig: MessageFns<CommitSig>;
172
+ export declare const ExtendedCommit: MessageFns<ExtendedCommit>;
173
+ export declare const ExtendedCommitSig: MessageFns<ExtendedCommitSig>;
174
+ export declare const Proposal: MessageFns<Proposal>;
175
+ export declare const SignedHeader: MessageFns<SignedHeader>;
176
+ export declare const LightBlock: MessageFns<LightBlock>;
177
+ export declare const BlockMeta: MessageFns<BlockMeta>;
178
+ export declare const TxProof: MessageFns<TxProof>;
179
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
180
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
181
+ [K in keyof T]?: DeepPartial<T[K]>;
182
+ } : Partial<T>;
183
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
184
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
185
+ [K in keyof P]: Exact<P[K], I[K]>;
186
+ } & {
187
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
188
+ };
189
+ export interface MessageFns<T> {
190
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
191
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
192
+ fromJSON(object: any): T;
193
+ toJSON(message: T): unknown;
194
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
195
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
196
+ }
197
+ export {};
@@ -0,0 +1,54 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ import { PublicKey } from "../crypto/keys";
3
+ export declare const protobufPackage = "tendermint.types";
4
+ /** BlockIdFlag indicates which BlockID the signature is for */
5
+ export declare enum BlockIDFlag {
6
+ /** BLOCK_ID_FLAG_UNKNOWN - indicates an error condition */
7
+ BLOCK_ID_FLAG_UNKNOWN = 0,
8
+ /** BLOCK_ID_FLAG_ABSENT - the vote was not received */
9
+ BLOCK_ID_FLAG_ABSENT = 1,
10
+ /** BLOCK_ID_FLAG_COMMIT - voted for the block that received the majority */
11
+ BLOCK_ID_FLAG_COMMIT = 2,
12
+ /** BLOCK_ID_FLAG_NIL - voted for nil */
13
+ BLOCK_ID_FLAG_NIL = 3,
14
+ UNRECOGNIZED = -1
15
+ }
16
+ export declare function blockIDFlagFromJSON(object: any): BlockIDFlag;
17
+ export declare function blockIDFlagToJSON(object: BlockIDFlag): string;
18
+ export interface ValidatorSet {
19
+ validators: Validator[];
20
+ proposer: Validator | undefined;
21
+ totalVotingPower: bigint;
22
+ }
23
+ export interface Validator {
24
+ address: Uint8Array;
25
+ pubKey: PublicKey | undefined;
26
+ votingPower: bigint;
27
+ proposerPriority: bigint;
28
+ }
29
+ export interface SimpleValidator {
30
+ pubKey: PublicKey | undefined;
31
+ votingPower: bigint;
32
+ }
33
+ export declare const ValidatorSet: MessageFns<ValidatorSet>;
34
+ export declare const Validator: MessageFns<Validator>;
35
+ export declare const SimpleValidator: MessageFns<SimpleValidator>;
36
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
37
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
38
+ [K in keyof T]?: DeepPartial<T[K]>;
39
+ } : Partial<T>;
40
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
41
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
42
+ [K in keyof P]: Exact<P[K], I[K]>;
43
+ } & {
44
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
45
+ };
46
+ export interface MessageFns<T> {
47
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
48
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
49
+ fromJSON(object: any): T;
50
+ toJSON(message: T): unknown;
51
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
52
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
53
+ }
54
+ export {};
@@ -0,0 +1,41 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ export declare const protobufPackage = "tendermint.version";
3
+ /**
4
+ * App includes the protocol and software version for the application.
5
+ * This information is included in ResponseInfo. The App.Protocol can be
6
+ * updated in ResponseEndBlock.
7
+ */
8
+ export interface App {
9
+ protocol: bigint;
10
+ software: string;
11
+ }
12
+ /**
13
+ * Consensus captures the consensus rules for processing a block in the blockchain,
14
+ * including all blockchain data structures and the rules of the application's
15
+ * state transition machine.
16
+ */
17
+ export interface Consensus {
18
+ block: bigint;
19
+ app: bigint;
20
+ }
21
+ export declare const App: MessageFns<App>;
22
+ export declare const Consensus: MessageFns<Consensus>;
23
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
24
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
25
+ [K in keyof T]?: DeepPartial<T[K]>;
26
+ } : Partial<T>;
27
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
28
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
29
+ [K in keyof P]: Exact<P[K], I[K]>;
30
+ } & {
31
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
32
+ };
33
+ export interface MessageFns<T> {
34
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
35
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
36
+ fromJSON(object: any): T;
37
+ toJSON(message: T): unknown;
38
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
39
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
40
+ }
41
+ export {};
@@ -0,0 +1,78 @@
1
+ export declare class BinaryWriter {
2
+ private chunks;
3
+ writeVarint(value: bigint | number): this;
4
+ writeTag(fieldNumber: number, wireType: number): this;
5
+ writeString(fieldNumber: number, value: string): this;
6
+ writeBool(fieldNumber: number, value: boolean): this;
7
+ writeUint64(fieldNumber: number, value: bigint | number): this;
8
+ writeInt32(fieldNumber: number, value: number): this;
9
+ writeBytes(fieldNumber: number, value: Uint8Array): this;
10
+ writeRepeatedString(fieldNumber: number, values: string[]): this;
11
+ writeRepeatedUint64(fieldNumber: number, values: (bigint | number)[]): this;
12
+ writeRepeatedBytes(fieldNumber: number, values: Uint8Array[]): this;
13
+ finish(): Uint8Array;
14
+ }
15
+ export declare function encodeAny(typeUrl: string, value: Uint8Array): Uint8Array;
16
+ export declare function encodeCoin(denom: string, amount: string): Uint8Array;
17
+ export interface TxFee {
18
+ amount: {
19
+ denom: string;
20
+ amount: string;
21
+ }[];
22
+ gasLimit: bigint | number;
23
+ }
24
+ export declare function encodeFee(fee: TxFee): Uint8Array;
25
+ export declare function encodeModeInfoSingle(mode: number): Uint8Array;
26
+ export declare function encodeModeInfo(mode: number): Uint8Array;
27
+ export interface SignerInfo {
28
+ publicKey: {
29
+ typeUrl: string;
30
+ value: Uint8Array;
31
+ };
32
+ sequence: bigint | number | string;
33
+ mode: number;
34
+ }
35
+ export declare function encodeSignerInfo(info: SignerInfo): Uint8Array;
36
+ export interface AuthInfo {
37
+ signerInfos: SignerInfo[];
38
+ fee: TxFee;
39
+ }
40
+ export declare function encodeAuthInfo(authInfo: AuthInfo): Uint8Array;
41
+ export interface TxBody {
42
+ messages: {
43
+ typeUrl: string;
44
+ value: Uint8Array;
45
+ }[];
46
+ memo: string;
47
+ timeoutHeight?: bigint | number;
48
+ }
49
+ export declare function encodeTxBody(body: TxBody): Uint8Array;
50
+ export interface TxRaw {
51
+ bodyBytes: Uint8Array;
52
+ authInfoBytes: Uint8Array;
53
+ signatures: Uint8Array[];
54
+ }
55
+ export declare function encodeTxRaw(txRaw: TxRaw): Uint8Array;
56
+ export declare function encodeEthSecp256k1PubKey(key: Uint8Array): Uint8Array;
57
+ export declare const SIGN_MODE_LEGACY_AMINO_JSON = 127;
58
+ export declare const SIGN_MODE_DIRECT = 1;
59
+ export declare function encodeTimestamp(seconds: bigint, nanos: number): Uint8Array;
60
+ export interface AgentTxBody extends TxBody {
61
+ unordered: boolean;
62
+ timeoutTimestamp: {
63
+ seconds: bigint;
64
+ nanos: number;
65
+ };
66
+ extensionOptions: {
67
+ typeUrl: string;
68
+ value: Uint8Array;
69
+ }[];
70
+ }
71
+ export declare function encodeTxBodyAgent(body: AgentTxBody): Uint8Array;
72
+ export interface SignDoc {
73
+ bodyBytes: Uint8Array;
74
+ authInfoBytes: Uint8Array;
75
+ chainId: string;
76
+ accountNumber: bigint | number;
77
+ }
78
+ export declare function encodeSignDoc(doc: SignDoc): Uint8Array;
@@ -0,0 +1,12 @@
1
+ import { type RestContext } from "./context";
2
+ import type { PaginationParams } from "./types";
3
+ import { QueryAgentResponse, QueryAgentsByMasterResponse, QueryIsAuthorizedResponse, QueryParamsResponse } from "../proto/gen/ault/agent/v1/query";
4
+ export interface AgentApi {
5
+ getAgent: (masterAddress: string, agentAddress: string) => Promise<QueryAgentResponse>;
6
+ getAgentsByMaster: (masterAddress: string, params?: {
7
+ pagination?: PaginationParams;
8
+ }) => Promise<QueryAgentsByMasterResponse>;
9
+ getParams: () => Promise<QueryParamsResponse>;
10
+ isAuthorized: (masterAddress: string, agentAddress: string) => Promise<QueryIsAuthorizedResponse>;
11
+ }
12
+ export declare function createAgentApi(context: RestContext): AgentApi;
@@ -0,0 +1,12 @@
1
+ import { type RestContext } from "./context";
2
+ import type { PaginationParams } from "./types";
3
+ import { type Role } from "../proto/gen/ault/authority/v1/authority";
4
+ import { QueryHasRoleResponse, QueryRoleMembersResponse } from "../proto/gen/ault/authority/v1/query";
5
+ export type AuthorityRoleInput = Role;
6
+ export interface AuthorityApi {
7
+ hasRole: (role: AuthorityRoleInput, member: string) => Promise<QueryHasRoleResponse>;
8
+ getRoleMembers: (role: AuthorityRoleInput, params?: {
9
+ pagination?: PaginationParams;
10
+ }) => Promise<QueryRoleMembersResponse>;
11
+ }
12
+ export declare function createAuthorityApi(context: RestContext): AuthorityApi;
@@ -0,0 +1,11 @@
1
+ import { type RestContext } from "./context";
2
+ import type { PaginationParams } from "./types";
3
+ import { QueryOrderResponse, QueryOrdersResponse } from "../proto/gen/ault/clob/v1/query";
4
+ export interface ClobApi {
5
+ getOrder: (orderId: Uint8Array | string) => Promise<QueryOrderResponse>;
6
+ getOrders: (params?: {
7
+ marketId?: Uint8Array | string;
8
+ pagination?: PaginationParams;
9
+ }) => Promise<QueryOrdersResponse>;
10
+ }
11
+ export declare function createClobApi(context: RestContext): ClobApi;
@@ -0,0 +1,22 @@
1
+ import "../proto/duration-json";
2
+ import { type FetchWithRetryOptions, type FetchFn } from "../core/http";
3
+ import type { ZodType } from "zod";
4
+ export declare const REST_CONTEXT_BRAND: unique symbol;
5
+ export interface RestContext {
6
+ [REST_CONTEXT_BRAND]: true;
7
+ restUrl: string;
8
+ fetchFn?: FetchFn;
9
+ fetchOptions?: FetchWithRetryOptions;
10
+ }
11
+ export declare function createRestContext(restUrl: string, fetchFn?: FetchFn, fetchOptions?: FetchWithRetryOptions): RestContext;
12
+ export interface ProtoJsonCodec<T> {
13
+ fromJSON(object: unknown): T;
14
+ }
15
+ export declare function buildFetchOptions(context: RestContext, overrides?: FetchWithRetryOptions): FetchWithRetryOptions;
16
+ export declare function fetchRest<T>(context: RestContext, path: string, fetchOptions?: FetchWithRetryOptions, schema?: ZodType<T>): Promise<T>;
17
+ export declare function fetchProtoJson<T>(context: RestContext, path: string, codec: ProtoJsonCodec<T>, fetchOptions?: FetchWithRetryOptions): Promise<T>;
18
+ export declare function parseRestResponse<T>(schema: ZodType<T>, data: unknown, url: string): T;
19
+ export declare function fetchAllPaginated<TResponse, TItem>(context: RestContext, path: string, schema: ZodType<TResponse>, getItems: (res: TResponse) => TItem[], getNextKey: (res: TResponse) => string | undefined | null): Promise<{
20
+ items: TItem[];
21
+ total: number;
22
+ }>;
@@ -0,0 +1,10 @@
1
+ import type { RestContext } from "./context";
2
+ export declare function initDexContext(context: RestContext): void;
3
+ export declare function getDexContext(): RestContext;
4
+ /**
5
+ * Custom fetcher for orval-generated functions.
6
+ * Bridges orval's fetch client to our RestContext (base URL, retries, custom fetch).
7
+ *
8
+ * Returns `{ data, status, headers }` as expected by orval's generated types.
9
+ */
10
+ export declare function dexFetch<T>(url: string, init?: RequestInit): Promise<T>;