coreum-js 2.16.2 → 2.17.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 (203) hide show
  1. package/dist/main/client/index.js +16 -17
  2. package/dist/main/coreum/asset/ft/v1/authz.d.ts +38 -0
  3. package/dist/main/coreum/asset/ft/v1/authz.js +122 -0
  4. package/dist/main/coreum/asset/ft/v1/event.d.ts +52 -120
  5. package/dist/main/coreum/asset/ft/v1/event.js +744 -138
  6. package/dist/main/coreum/asset/ft/v1/genesis.d.ts +31 -517
  7. package/dist/main/coreum/asset/ft/v1/genesis.js +273 -62
  8. package/dist/main/coreum/asset/ft/v1/params.d.ts +12 -63
  9. package/dist/main/coreum/asset/ft/v1/params.js +37 -33
  10. package/dist/main/coreum/asset/ft/v1/query.d.ts +86 -1950
  11. package/dist/main/coreum/asset/ft/v1/query.js +697 -217
  12. package/dist/main/coreum/asset/ft/v1/token.d.ts +17 -249
  13. package/dist/main/coreum/asset/ft/v1/token.js +273 -197
  14. package/dist/main/coreum/asset/ft/v1/tx.d.ts +30 -755
  15. package/dist/main/coreum/asset/ft/v1/tx.js +502 -386
  16. package/dist/main/coreum/asset/index.d.ts +2 -3
  17. package/dist/main/coreum/asset/nft/v1/authz.d.ts +33 -0
  18. package/dist/main/coreum/asset/nft/v1/authz.js +137 -0
  19. package/dist/main/coreum/asset/nft/v1/event.d.ts +35 -147
  20. package/dist/main/coreum/asset/nft/v1/event.js +475 -147
  21. package/dist/main/coreum/asset/nft/v1/genesis.d.ts +27 -286
  22. package/dist/main/coreum/asset/nft/v1/genesis.js +311 -119
  23. package/dist/main/coreum/asset/nft/v1/nft.d.ts +20 -108
  24. package/dist/main/coreum/asset/nft/v1/nft.js +136 -101
  25. package/dist/main/coreum/asset/nft/v1/params.d.ts +12 -38
  26. package/dist/main/coreum/asset/nft/v1/params.js +17 -20
  27. package/dist/main/coreum/asset/nft/v1/query.d.ts +110 -706
  28. package/dist/main/coreum/asset/nft/v1/query.js +1079 -185
  29. package/dist/main/coreum/asset/nft/v1/tx.d.ts +96 -266
  30. package/dist/main/coreum/asset/nft/v1/tx.js +865 -234
  31. package/dist/main/coreum/asset/nft/v1/types.d.ts +38 -19
  32. package/dist/main/coreum/asset/nft/v1/types.js +273 -45
  33. package/dist/main/coreum/customparams/v1/genesis.d.ts +12 -32
  34. package/dist/main/coreum/customparams/v1/genesis.js +26 -22
  35. package/dist/main/coreum/customparams/v1/params.d.ts +11 -19
  36. package/dist/main/coreum/customparams/v1/params.js +23 -20
  37. package/dist/main/coreum/customparams/v1/query.d.ts +14 -40
  38. package/dist/main/coreum/customparams/v1/query.js +35 -29
  39. package/dist/main/coreum/dex/index.d.ts +1 -0
  40. package/dist/main/coreum/dex/index.js +12 -0
  41. package/dist/main/coreum/dex/v1/event.d.ts +73 -0
  42. package/dist/main/coreum/dex/v1/event.js +470 -0
  43. package/dist/main/coreum/dex/v1/genesis.d.ts +49 -0
  44. package/dist/main/coreum/dex/v1/genesis.js +318 -0
  45. package/dist/main/coreum/dex/v1/order.d.ts +172 -0
  46. package/dist/main/coreum/dex/v1/order.js +1137 -0
  47. package/dist/main/coreum/dex/v1/params.d.ts +34 -0
  48. package/dist/main/coreum/dex/v1/params.js +139 -0
  49. package/dist/main/coreum/dex/v1/query.d.ts +133 -0
  50. package/dist/main/coreum/dex/v1/query.js +873 -0
  51. package/dist/main/coreum/dex/v1/tx.d.ts +102 -0
  52. package/dist/main/coreum/dex/v1/tx.js +521 -0
  53. package/dist/main/coreum/extensions/dex.d.ts +12 -0
  54. package/dist/main/coreum/extensions/dex.js +32 -0
  55. package/dist/main/coreum/feemodel/v1/genesis.d.ts +13 -233
  56. package/dist/main/coreum/feemodel/v1/genesis.js +23 -24
  57. package/dist/main/coreum/feemodel/v1/params.d.ts +14 -337
  58. package/dist/main/coreum/feemodel/v1/params.js +113 -66
  59. package/dist/main/coreum/feemodel/v1/query.d.ts +30 -261
  60. package/dist/main/coreum/feemodel/v1/query.js +196 -43
  61. package/dist/main/coreum/index.d.ts +46 -0
  62. package/dist/main/coreum/index.js +58 -1
  63. package/dist/main/coreum/nft/index.d.ts +1 -2
  64. package/dist/main/coreum/nft/v1beta1/event.d.ts +23 -79
  65. package/dist/main/coreum/nft/v1beta1/event.js +103 -77
  66. package/dist/main/coreum/nft/v1beta1/genesis.d.ts +13 -435
  67. package/dist/main/coreum/nft/v1beta1/genesis.js +50 -52
  68. package/dist/main/coreum/nft/v1beta1/nft.d.ts +15 -114
  69. package/dist/main/coreum/nft/v1beta1/nft.js +111 -81
  70. package/dist/main/coreum/nft/v1beta1/query.d.ts +54 -1628
  71. package/dist/main/coreum/nft/v1beta1/query.js +259 -223
  72. package/dist/main/coreum/nft/v1beta1/tx.d.ts +13 -39
  73. package/dist/main/coreum/nft/v1beta1/tx.js +54 -43
  74. package/dist/main/cosmos/extensions/distribution.d.ts +4 -4
  75. package/dist/main/cosmos/extensions/distribution.js +9 -9
  76. package/dist/main/cosmos/extensions/gov.d.ts +13 -13
  77. package/dist/main/cosmos/extensions/gov.js +14 -8
  78. package/dist/main/cosmos/index.d.ts +8 -8
  79. package/dist/main/google/api/http.js +18 -21
  80. package/dist/main/google/protobuf/any.js +3 -4
  81. package/dist/main/google/protobuf/duration.js +3 -4
  82. package/dist/main/google/protobuf/timestamp.js +3 -4
  83. package/dist/main/services/cosmostation.js +1 -1
  84. package/dist/main/tendermint/abci/types.js +183 -223
  85. package/dist/main/tendermint/crypto/keys.js +3 -4
  86. package/dist/main/tendermint/crypto/proof.js +19 -24
  87. package/dist/main/tendermint/types/params.js +15 -20
  88. package/dist/main/tendermint/types/types.js +57 -68
  89. package/dist/main/tendermint/types/validator.js +10 -13
  90. package/dist/main/tendermint/version/types.js +6 -8
  91. package/dist/main/types/core.d.ts +2 -1
  92. package/dist/main/types/core.js +2 -0
  93. package/dist/main/wasm/v1/authz.d.ts +20 -471
  94. package/dist/main/wasm/v1/authz.js +129 -148
  95. package/dist/main/wasm/v1/genesis.d.ts +14 -1020
  96. package/dist/main/wasm/v1/genesis.js +169 -140
  97. package/dist/main/wasm/v1/ibc.d.ts +13 -62
  98. package/dist/main/wasm/v1/ibc.js +91 -76
  99. package/dist/main/wasm/v1/index.d.ts +1 -2
  100. package/dist/main/wasm/v1/pagination.js +9 -11
  101. package/dist/main/wasm/v1/proposal.d.ts +23 -720
  102. package/dist/main/wasm/v1/proposal.js +634 -465
  103. package/dist/main/wasm/v1/query.d.ts +35 -1201
  104. package/dist/main/wasm/v1/query.js +370 -363
  105. package/dist/main/wasm/v1/tx.d.ts +37 -788
  106. package/dist/main/wasm/v1/tx.js +621 -497
  107. package/dist/main/wasm/v1/types.d.ts +19 -297
  108. package/dist/main/wasm/v1/types.js +219 -190
  109. package/dist/module/client/index.js +4 -3
  110. package/dist/module/coreum/asset/ft/v1/authz.d.ts +38 -0
  111. package/dist/module/coreum/asset/ft/v1/authz.js +119 -0
  112. package/dist/module/coreum/asset/ft/v1/event.d.ts +52 -120
  113. package/dist/module/coreum/asset/ft/v1/event.js +721 -109
  114. package/dist/module/coreum/asset/ft/v1/genesis.d.ts +31 -517
  115. package/dist/module/coreum/asset/ft/v1/genesis.js +266 -50
  116. package/dist/module/coreum/asset/ft/v1/params.d.ts +12 -63
  117. package/dist/module/coreum/asset/ft/v1/params.js +35 -27
  118. package/dist/module/coreum/asset/ft/v1/query.d.ts +86 -1950
  119. package/dist/module/coreum/asset/ft/v1/query.js +672 -180
  120. package/dist/module/coreum/asset/ft/v1/token.d.ts +17 -249
  121. package/dist/module/coreum/asset/ft/v1/token.js +236 -152
  122. package/dist/module/coreum/asset/ft/v1/tx.d.ts +30 -755
  123. package/dist/module/coreum/asset/ft/v1/tx.js +437 -301
  124. package/dist/module/coreum/asset/index.d.ts +2 -3
  125. package/dist/module/coreum/asset/nft/v1/authz.d.ts +33 -0
  126. package/dist/module/coreum/asset/nft/v1/authz.js +134 -0
  127. package/dist/module/coreum/asset/nft/v1/event.d.ts +35 -147
  128. package/dist/module/coreum/asset/nft/v1/event.js +448 -112
  129. package/dist/module/coreum/asset/nft/v1/genesis.d.ts +27 -286
  130. package/dist/module/coreum/asset/nft/v1/genesis.js +299 -100
  131. package/dist/module/coreum/asset/nft/v1/nft.d.ts +20 -108
  132. package/dist/module/coreum/asset/nft/v1/nft.js +121 -81
  133. package/dist/module/coreum/asset/nft/v1/params.d.ts +12 -38
  134. package/dist/module/coreum/asset/nft/v1/params.js +16 -16
  135. package/dist/module/coreum/asset/nft/v1/query.d.ts +110 -706
  136. package/dist/module/coreum/asset/nft/v1/query.js +1057 -153
  137. package/dist/module/coreum/asset/nft/v1/tx.d.ts +96 -266
  138. package/dist/module/coreum/asset/nft/v1/tx.js +825 -184
  139. package/dist/module/coreum/asset/nft/v1/types.d.ts +38 -19
  140. package/dist/module/coreum/asset/nft/v1/types.js +269 -39
  141. package/dist/module/coreum/customparams/v1/genesis.d.ts +12 -32
  142. package/dist/module/coreum/customparams/v1/genesis.js +25 -18
  143. package/dist/module/coreum/customparams/v1/params.d.ts +11 -19
  144. package/dist/module/coreum/customparams/v1/params.js +21 -14
  145. package/dist/module/coreum/customparams/v1/query.d.ts +14 -40
  146. package/dist/module/coreum/customparams/v1/query.js +32 -23
  147. package/dist/module/coreum/dex/index.d.ts +1 -0
  148. package/dist/module/coreum/dex/index.js +9 -0
  149. package/dist/module/coreum/dex/v1/event.d.ts +73 -0
  150. package/dist/module/coreum/dex/v1/event.js +467 -0
  151. package/dist/module/coreum/dex/v1/genesis.d.ts +49 -0
  152. package/dist/module/coreum/dex/v1/genesis.js +315 -0
  153. package/dist/module/coreum/dex/v1/order.d.ts +172 -0
  154. package/dist/module/coreum/dex/v1/order.js +1128 -0
  155. package/dist/module/coreum/dex/v1/params.d.ts +34 -0
  156. package/dist/module/coreum/dex/v1/params.js +136 -0
  157. package/dist/module/coreum/dex/v1/query.d.ts +133 -0
  158. package/dist/module/coreum/dex/v1/query.js +871 -0
  159. package/dist/module/coreum/dex/v1/tx.d.ts +102 -0
  160. package/dist/module/coreum/dex/v1/tx.js +519 -0
  161. package/dist/module/coreum/extensions/dex.d.ts +12 -0
  162. package/dist/module/coreum/extensions/dex.js +28 -0
  163. package/dist/module/coreum/feemodel/v1/genesis.d.ts +13 -233
  164. package/dist/module/coreum/feemodel/v1/genesis.js +22 -20
  165. package/dist/module/coreum/feemodel/v1/params.d.ts +14 -337
  166. package/dist/module/coreum/feemodel/v1/params.js +105 -54
  167. package/dist/module/coreum/feemodel/v1/query.d.ts +30 -261
  168. package/dist/module/coreum/feemodel/v1/query.js +191 -35
  169. package/dist/module/coreum/index.d.ts +46 -0
  170. package/dist/module/coreum/index.js +57 -0
  171. package/dist/module/coreum/nft/index.d.ts +1 -2
  172. package/dist/module/coreum/nft/v1beta1/event.d.ts +23 -79
  173. package/dist/module/coreum/nft/v1beta1/event.js +90 -58
  174. package/dist/module/coreum/nft/v1beta1/genesis.d.ts +13 -435
  175. package/dist/module/coreum/nft/v1beta1/genesis.js +44 -41
  176. package/dist/module/coreum/nft/v1beta1/nft.d.ts +15 -114
  177. package/dist/module/coreum/nft/v1beta1/nft.js +99 -64
  178. package/dist/module/coreum/nft/v1beta1/query.d.ts +54 -1628
  179. package/dist/module/coreum/nft/v1beta1/query.js +231 -183
  180. package/dist/module/coreum/nft/v1beta1/tx.d.ts +13 -39
  181. package/dist/module/coreum/nft/v1beta1/tx.js +47 -32
  182. package/dist/module/cosmos/extensions/distribution.d.ts +4 -4
  183. package/dist/module/cosmos/extensions/gov.d.ts +13 -13
  184. package/dist/module/cosmos/index.d.ts +8 -8
  185. package/dist/module/services/cosmostation.js +1 -1
  186. package/dist/module/types/core.d.ts +2 -1
  187. package/dist/module/types/core.js +2 -0
  188. package/dist/module/wasm/v1/authz.d.ts +20 -471
  189. package/dist/module/wasm/v1/authz.js +111 -119
  190. package/dist/module/wasm/v1/genesis.d.ts +14 -1020
  191. package/dist/module/wasm/v1/genesis.js +161 -125
  192. package/dist/module/wasm/v1/ibc.d.ts +13 -62
  193. package/dist/module/wasm/v1/ibc.js +83 -62
  194. package/dist/module/wasm/v1/index.d.ts +1 -2
  195. package/dist/module/wasm/v1/proposal.d.ts +23 -720
  196. package/dist/module/wasm/v1/proposal.js +562 -377
  197. package/dist/module/wasm/v1/query.d.ts +35 -1201
  198. package/dist/module/wasm/v1/query.js +330 -301
  199. package/dist/module/wasm/v1/tx.d.ts +37 -788
  200. package/dist/module/wasm/v1/tx.js +551 -404
  201. package/dist/module/wasm/v1/types.d.ts +19 -297
  202. package/dist/module/wasm/v1/types.js +196 -156
  203. package/package.json +11 -10
@@ -1,5 +1,4 @@
1
- import Long from "long";
2
- import _m0 from "protobufjs/minimal";
1
+ import { BinaryReader, BinaryWriter } from "cosmjs-types/binary";
3
2
  export declare const protobufPackage = "coreum.feemodel.v1";
4
3
  /**
5
4
  * ModelParams define fee model params.
@@ -22,7 +21,7 @@ export interface ModelParams {
22
21
  /** escalation_start_fraction defines fraction of max block gas usage where gas price escalation starts if short average block gas is higher than this value. */
23
22
  escalationStartFraction: string;
24
23
  /** max_block_gas sets the maximum capacity of block. This is enforced on tendermint level in genesis configuration. Once short average block gas goes above this value, gas price is a flat line equal to MaxGasPrice. */
25
- maxBlockGas: Long;
24
+ maxBlockGas: number;
26
25
  /**
27
26
  * short_ema_block_length defines inertia for short average long gas in EMA model. The equation is: NewAverage = ((ShortAverageBlockLength - 1)*PreviousAverage + GasUsedByCurrentBlock) / ShortAverageBlockLength
28
27
  * The value might be interpreted as the number of blocks which are taken to calculate the average. It would be exactly like that in SMA model, in EMA this is an approximation.
@@ -37,342 +36,12 @@ export interface ModelParams {
37
36
  /** Params store gov manageable feemodel parameters. */
38
37
  export interface Params {
39
38
  /** model is a fee model params. */
40
- model?: ModelParams;
39
+ model: ModelParams | undefined;
41
40
  }
42
- export declare const ModelParams: {
43
- encode(message: ModelParams, writer?: _m0.Writer): _m0.Writer;
44
- decode(input: _m0.Reader | Uint8Array, length?: number): ModelParams;
45
- fromJSON(object: any): ModelParams;
46
- toJSON(message: ModelParams): unknown;
47
- create<I extends {
48
- initialGasPrice?: string;
49
- maxGasPriceMultiplier?: string;
50
- maxDiscount?: string;
51
- escalationStartFraction?: string;
52
- maxBlockGas?: string | number | Long.Long;
53
- shortEmaBlockLength?: number;
54
- longEmaBlockLength?: number;
55
- } & {
56
- initialGasPrice?: string;
57
- maxGasPriceMultiplier?: string;
58
- maxDiscount?: string;
59
- escalationStartFraction?: string;
60
- maxBlockGas?: string | number | (Long.Long & {
61
- high: number;
62
- low: number;
63
- unsigned: boolean;
64
- add: (addend: string | number | Long.Long) => Long.Long;
65
- and: (other: string | number | Long.Long) => Long.Long;
66
- compare: (other: string | number | Long.Long) => number;
67
- comp: (other: string | number | Long.Long) => number;
68
- divide: (divisor: string | number | Long.Long) => Long.Long;
69
- div: (divisor: string | number | Long.Long) => Long.Long;
70
- equals: (other: string | number | Long.Long) => boolean;
71
- eq: (other: string | number | Long.Long) => boolean;
72
- getHighBits: () => number;
73
- getHighBitsUnsigned: () => number;
74
- getLowBits: () => number;
75
- getLowBitsUnsigned: () => number;
76
- getNumBitsAbs: () => number;
77
- greaterThan: (other: string | number | Long.Long) => boolean;
78
- gt: (other: string | number | Long.Long) => boolean;
79
- greaterThanOrEqual: (other: string | number | Long.Long) => boolean;
80
- gte: (other: string | number | Long.Long) => boolean;
81
- isEven: () => boolean;
82
- isNegative: () => boolean;
83
- isOdd: () => boolean;
84
- isPositive: () => boolean;
85
- isZero: () => boolean;
86
- lessThan: (other: string | number | Long.Long) => boolean;
87
- lt: (other: string | number | Long.Long) => boolean;
88
- lessThanOrEqual: (other: string | number | Long.Long) => boolean;
89
- lte: (other: string | number | Long.Long) => boolean;
90
- modulo: (other: string | number | Long.Long) => Long.Long;
91
- mod: (other: string | number | Long.Long) => Long.Long;
92
- multiply: (multiplier: string | number | Long.Long) => Long.Long;
93
- mul: (multiplier: string | number | Long.Long) => Long.Long;
94
- negate: () => Long.Long;
95
- neg: () => Long.Long;
96
- not: () => Long.Long;
97
- notEquals: (other: string | number | Long.Long) => boolean;
98
- neq: (other: string | number | Long.Long) => boolean;
99
- or: (other: string | number | Long.Long) => Long.Long;
100
- shiftLeft: (numBits: number | Long.Long) => Long.Long;
101
- shl: (numBits: number | Long.Long) => Long.Long;
102
- shiftRight: (numBits: number | Long.Long) => Long.Long;
103
- shr: (numBits: number | Long.Long) => Long.Long;
104
- shiftRightUnsigned: (numBits: number | Long.Long) => Long.Long;
105
- shru: (numBits: number | Long.Long) => Long.Long;
106
- subtract: (subtrahend: string | number | Long.Long) => Long.Long;
107
- sub: (subtrahend: string | number | Long.Long) => Long.Long;
108
- toInt: () => number;
109
- toNumber: () => number;
110
- toBytes: (le?: boolean) => number[];
111
- toBytesLE: () => number[];
112
- toBytesBE: () => number[];
113
- toSigned: () => Long.Long;
114
- toString: (radix?: number) => string;
115
- toUnsigned: () => Long.Long;
116
- xor: (other: string | number | Long.Long) => Long.Long;
117
- } & { [K in Exclude<keyof I["maxBlockGas"], keyof Long.Long>]: never; });
118
- shortEmaBlockLength?: number;
119
- longEmaBlockLength?: number;
120
- } & { [K_1 in Exclude<keyof I, keyof ModelParams>]: never; }>(base?: I): ModelParams;
121
- fromPartial<I_1 extends {
122
- initialGasPrice?: string;
123
- maxGasPriceMultiplier?: string;
124
- maxDiscount?: string;
125
- escalationStartFraction?: string;
126
- maxBlockGas?: string | number | Long.Long;
127
- shortEmaBlockLength?: number;
128
- longEmaBlockLength?: number;
129
- } & {
130
- initialGasPrice?: string;
131
- maxGasPriceMultiplier?: string;
132
- maxDiscount?: string;
133
- escalationStartFraction?: string;
134
- maxBlockGas?: string | number | (Long.Long & {
135
- high: number;
136
- low: number;
137
- unsigned: boolean;
138
- add: (addend: string | number | Long.Long) => Long.Long;
139
- and: (other: string | number | Long.Long) => Long.Long;
140
- compare: (other: string | number | Long.Long) => number;
141
- comp: (other: string | number | Long.Long) => number;
142
- divide: (divisor: string | number | Long.Long) => Long.Long;
143
- div: (divisor: string | number | Long.Long) => Long.Long;
144
- equals: (other: string | number | Long.Long) => boolean;
145
- eq: (other: string | number | Long.Long) => boolean;
146
- getHighBits: () => number;
147
- getHighBitsUnsigned: () => number;
148
- getLowBits: () => number;
149
- getLowBitsUnsigned: () => number;
150
- getNumBitsAbs: () => number;
151
- greaterThan: (other: string | number | Long.Long) => boolean;
152
- gt: (other: string | number | Long.Long) => boolean;
153
- greaterThanOrEqual: (other: string | number | Long.Long) => boolean;
154
- gte: (other: string | number | Long.Long) => boolean;
155
- isEven: () => boolean;
156
- isNegative: () => boolean;
157
- isOdd: () => boolean;
158
- isPositive: () => boolean;
159
- isZero: () => boolean;
160
- lessThan: (other: string | number | Long.Long) => boolean;
161
- lt: (other: string | number | Long.Long) => boolean;
162
- lessThanOrEqual: (other: string | number | Long.Long) => boolean;
163
- lte: (other: string | number | Long.Long) => boolean;
164
- modulo: (other: string | number | Long.Long) => Long.Long;
165
- mod: (other: string | number | Long.Long) => Long.Long;
166
- multiply: (multiplier: string | number | Long.Long) => Long.Long;
167
- mul: (multiplier: string | number | Long.Long) => Long.Long;
168
- negate: () => Long.Long;
169
- neg: () => Long.Long;
170
- not: () => Long.Long;
171
- notEquals: (other: string | number | Long.Long) => boolean;
172
- neq: (other: string | number | Long.Long) => boolean;
173
- or: (other: string | number | Long.Long) => Long.Long;
174
- shiftLeft: (numBits: number | Long.Long) => Long.Long;
175
- shl: (numBits: number | Long.Long) => Long.Long;
176
- shiftRight: (numBits: number | Long.Long) => Long.Long;
177
- shr: (numBits: number | Long.Long) => Long.Long;
178
- shiftRightUnsigned: (numBits: number | Long.Long) => Long.Long;
179
- shru: (numBits: number | Long.Long) => Long.Long;
180
- subtract: (subtrahend: string | number | Long.Long) => Long.Long;
181
- sub: (subtrahend: string | number | Long.Long) => Long.Long;
182
- toInt: () => number;
183
- toNumber: () => number;
184
- toBytes: (le?: boolean) => number[];
185
- toBytesLE: () => number[];
186
- toBytesBE: () => number[];
187
- toSigned: () => Long.Long;
188
- toString: (radix?: number) => string;
189
- toUnsigned: () => Long.Long;
190
- xor: (other: string | number | Long.Long) => Long.Long;
191
- } & { [K_2 in Exclude<keyof I_1["maxBlockGas"], keyof Long.Long>]: never; });
192
- shortEmaBlockLength?: number;
193
- longEmaBlockLength?: number;
194
- } & { [K_3 in Exclude<keyof I_1, keyof ModelParams>]: never; }>(object: I_1): ModelParams;
195
- };
196
- export declare const Params: {
197
- encode(message: Params, writer?: _m0.Writer): _m0.Writer;
198
- decode(input: _m0.Reader | Uint8Array, length?: number): Params;
199
- fromJSON(object: any): Params;
200
- toJSON(message: Params): unknown;
201
- create<I extends {
202
- model?: {
203
- initialGasPrice?: string;
204
- maxGasPriceMultiplier?: string;
205
- maxDiscount?: string;
206
- escalationStartFraction?: string;
207
- maxBlockGas?: string | number | Long.Long;
208
- shortEmaBlockLength?: number;
209
- longEmaBlockLength?: number;
210
- };
211
- } & {
212
- model?: {
213
- initialGasPrice?: string;
214
- maxGasPriceMultiplier?: string;
215
- maxDiscount?: string;
216
- escalationStartFraction?: string;
217
- maxBlockGas?: string | number | Long.Long;
218
- shortEmaBlockLength?: number;
219
- longEmaBlockLength?: number;
220
- } & {
221
- initialGasPrice?: string;
222
- maxGasPriceMultiplier?: string;
223
- maxDiscount?: string;
224
- escalationStartFraction?: string;
225
- maxBlockGas?: string | number | (Long.Long & {
226
- high: number;
227
- low: number;
228
- unsigned: boolean;
229
- add: (addend: string | number | Long.Long) => Long.Long;
230
- and: (other: string | number | Long.Long) => Long.Long;
231
- compare: (other: string | number | Long.Long) => number;
232
- comp: (other: string | number | Long.Long) => number;
233
- divide: (divisor: string | number | Long.Long) => Long.Long;
234
- div: (divisor: string | number | Long.Long) => Long.Long;
235
- equals: (other: string | number | Long.Long) => boolean;
236
- eq: (other: string | number | Long.Long) => boolean;
237
- getHighBits: () => number;
238
- getHighBitsUnsigned: () => number;
239
- getLowBits: () => number;
240
- getLowBitsUnsigned: () => number;
241
- getNumBitsAbs: () => number;
242
- greaterThan: (other: string | number | Long.Long) => boolean;
243
- gt: (other: string | number | Long.Long) => boolean;
244
- greaterThanOrEqual: (other: string | number | Long.Long) => boolean;
245
- gte: (other: string | number | Long.Long) => boolean;
246
- isEven: () => boolean;
247
- isNegative: () => boolean;
248
- isOdd: () => boolean;
249
- isPositive: () => boolean;
250
- isZero: () => boolean;
251
- lessThan: (other: string | number | Long.Long) => boolean;
252
- lt: (other: string | number | Long.Long) => boolean;
253
- lessThanOrEqual: (other: string | number | Long.Long) => boolean;
254
- lte: (other: string | number | Long.Long) => boolean;
255
- modulo: (other: string | number | Long.Long) => Long.Long;
256
- mod: (other: string | number | Long.Long) => Long.Long;
257
- multiply: (multiplier: string | number | Long.Long) => Long.Long;
258
- mul: (multiplier: string | number | Long.Long) => Long.Long;
259
- negate: () => Long.Long;
260
- neg: () => Long.Long;
261
- not: () => Long.Long;
262
- notEquals: (other: string | number | Long.Long) => boolean;
263
- neq: (other: string | number | Long.Long) => boolean;
264
- or: (other: string | number | Long.Long) => Long.Long;
265
- shiftLeft: (numBits: number | Long.Long) => Long.Long;
266
- shl: (numBits: number | Long.Long) => Long.Long;
267
- shiftRight: (numBits: number | Long.Long) => Long.Long;
268
- shr: (numBits: number | Long.Long) => Long.Long;
269
- shiftRightUnsigned: (numBits: number | Long.Long) => Long.Long;
270
- shru: (numBits: number | Long.Long) => Long.Long;
271
- subtract: (subtrahend: string | number | Long.Long) => Long.Long;
272
- sub: (subtrahend: string | number | Long.Long) => Long.Long;
273
- toInt: () => number;
274
- toNumber: () => number;
275
- toBytes: (le?: boolean) => number[];
276
- toBytesLE: () => number[];
277
- toBytesBE: () => number[];
278
- toSigned: () => Long.Long;
279
- toString: (radix?: number) => string;
280
- toUnsigned: () => Long.Long;
281
- xor: (other: string | number | Long.Long) => Long.Long;
282
- } & { [K in Exclude<keyof I["model"]["maxBlockGas"], keyof Long.Long>]: never; });
283
- shortEmaBlockLength?: number;
284
- longEmaBlockLength?: number;
285
- } & { [K_1 in Exclude<keyof I["model"], keyof ModelParams>]: never; };
286
- } & { [K_2 in Exclude<keyof I, "model">]: never; }>(base?: I): Params;
287
- fromPartial<I_1 extends {
288
- model?: {
289
- initialGasPrice?: string;
290
- maxGasPriceMultiplier?: string;
291
- maxDiscount?: string;
292
- escalationStartFraction?: string;
293
- maxBlockGas?: string | number | Long.Long;
294
- shortEmaBlockLength?: number;
295
- longEmaBlockLength?: number;
296
- };
297
- } & {
298
- model?: {
299
- initialGasPrice?: string;
300
- maxGasPriceMultiplier?: string;
301
- maxDiscount?: string;
302
- escalationStartFraction?: string;
303
- maxBlockGas?: string | number | Long.Long;
304
- shortEmaBlockLength?: number;
305
- longEmaBlockLength?: number;
306
- } & {
307
- initialGasPrice?: string;
308
- maxGasPriceMultiplier?: string;
309
- maxDiscount?: string;
310
- escalationStartFraction?: string;
311
- maxBlockGas?: string | number | (Long.Long & {
312
- high: number;
313
- low: number;
314
- unsigned: boolean;
315
- add: (addend: string | number | Long.Long) => Long.Long;
316
- and: (other: string | number | Long.Long) => Long.Long;
317
- compare: (other: string | number | Long.Long) => number;
318
- comp: (other: string | number | Long.Long) => number;
319
- divide: (divisor: string | number | Long.Long) => Long.Long;
320
- div: (divisor: string | number | Long.Long) => Long.Long;
321
- equals: (other: string | number | Long.Long) => boolean;
322
- eq: (other: string | number | Long.Long) => boolean;
323
- getHighBits: () => number;
324
- getHighBitsUnsigned: () => number;
325
- getLowBits: () => number;
326
- getLowBitsUnsigned: () => number;
327
- getNumBitsAbs: () => number;
328
- greaterThan: (other: string | number | Long.Long) => boolean;
329
- gt: (other: string | number | Long.Long) => boolean;
330
- greaterThanOrEqual: (other: string | number | Long.Long) => boolean;
331
- gte: (other: string | number | Long.Long) => boolean;
332
- isEven: () => boolean;
333
- isNegative: () => boolean;
334
- isOdd: () => boolean;
335
- isPositive: () => boolean;
336
- isZero: () => boolean;
337
- lessThan: (other: string | number | Long.Long) => boolean;
338
- lt: (other: string | number | Long.Long) => boolean;
339
- lessThanOrEqual: (other: string | number | Long.Long) => boolean;
340
- lte: (other: string | number | Long.Long) => boolean;
341
- modulo: (other: string | number | Long.Long) => Long.Long;
342
- mod: (other: string | number | Long.Long) => Long.Long;
343
- multiply: (multiplier: string | number | Long.Long) => Long.Long;
344
- mul: (multiplier: string | number | Long.Long) => Long.Long;
345
- negate: () => Long.Long;
346
- neg: () => Long.Long;
347
- not: () => Long.Long;
348
- notEquals: (other: string | number | Long.Long) => boolean;
349
- neq: (other: string | number | Long.Long) => boolean;
350
- or: (other: string | number | Long.Long) => Long.Long;
351
- shiftLeft: (numBits: number | Long.Long) => Long.Long;
352
- shl: (numBits: number | Long.Long) => Long.Long;
353
- shiftRight: (numBits: number | Long.Long) => Long.Long;
354
- shr: (numBits: number | Long.Long) => Long.Long;
355
- shiftRightUnsigned: (numBits: number | Long.Long) => Long.Long;
356
- shru: (numBits: number | Long.Long) => Long.Long;
357
- subtract: (subtrahend: string | number | Long.Long) => Long.Long;
358
- sub: (subtrahend: string | number | Long.Long) => Long.Long;
359
- toInt: () => number;
360
- toNumber: () => number;
361
- toBytes: (le?: boolean) => number[];
362
- toBytesLE: () => number[];
363
- toBytesBE: () => number[];
364
- toSigned: () => Long.Long;
365
- toString: (radix?: number) => string;
366
- toUnsigned: () => Long.Long;
367
- xor: (other: string | number | Long.Long) => Long.Long;
368
- } & { [K_3 in Exclude<keyof I_1["model"]["maxBlockGas"], keyof Long.Long>]: never; });
369
- shortEmaBlockLength?: number;
370
- longEmaBlockLength?: number;
371
- } & { [K_4 in Exclude<keyof I_1["model"], keyof ModelParams>]: never; };
372
- } & { [K_5 in Exclude<keyof I_1, "model">]: never; }>(object: I_1): Params;
373
- };
41
+ export declare const ModelParams: MessageFns<ModelParams>;
42
+ export declare const Params: MessageFns<Params>;
374
43
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
375
- export type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
44
+ 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 {} ? {
376
45
  [K in keyof T]?: DeepPartial<T[K]>;
377
46
  } : Partial<T>;
378
47
  type KeysOfUnion<T> = T extends T ? keyof T : never;
@@ -381,4 +50,12 @@ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
381
50
  } & {
382
51
  [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
383
52
  };
53
+ export interface MessageFns<T> {
54
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
55
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
56
+ fromJSON(object: any): T;
57
+ toJSON(message: T): unknown;
58
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
59
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
60
+ }
384
61
  export {};
@@ -1,6 +1,10 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.7.0
4
+ // protoc v3.21.12
5
+ // source: coreum-protos/feemodel/params.proto
1
6
  /* eslint-disable */
2
- import Long from "long";
3
- import _m0 from "protobufjs/minimal";
7
+ import { BinaryReader, BinaryWriter } from "cosmjs-types/binary";
4
8
  export const protobufPackage = "coreum.feemodel.v1";
5
9
  function createBaseModelParams() {
6
10
  return {
@@ -8,13 +12,13 @@ function createBaseModelParams() {
8
12
  maxGasPriceMultiplier: "",
9
13
  maxDiscount: "",
10
14
  escalationStartFraction: "",
11
- maxBlockGas: Long.ZERO,
15
+ maxBlockGas: 0,
12
16
  shortEmaBlockLength: 0,
13
17
  longEmaBlockLength: 0,
14
18
  };
15
19
  }
16
20
  export const ModelParams = {
17
- encode(message, writer = _m0.Writer.create()) {
21
+ encode(message, writer = new BinaryWriter()) {
18
22
  if (message.initialGasPrice !== "") {
19
23
  writer.uint32(10).string(message.initialGasPrice);
20
24
  }
@@ -27,7 +31,7 @@ export const ModelParams = {
27
31
  if (message.escalationStartFraction !== "") {
28
32
  writer.uint32(34).string(message.escalationStartFraction);
29
33
  }
30
- if (!message.maxBlockGas.isZero()) {
34
+ if (message.maxBlockGas !== 0) {
31
35
  writer.uint32(40).int64(message.maxBlockGas);
32
36
  }
33
37
  if (message.shortEmaBlockLength !== 0) {
@@ -39,82 +43,117 @@ export const ModelParams = {
39
43
  return writer;
40
44
  },
41
45
  decode(input, length) {
42
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
46
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
43
47
  let end = length === undefined ? reader.len : reader.pos + length;
44
48
  const message = createBaseModelParams();
45
49
  while (reader.pos < end) {
46
50
  const tag = reader.uint32();
47
51
  switch (tag >>> 3) {
48
- case 1:
49
- if (tag != 10) {
52
+ case 1: {
53
+ if (tag !== 10) {
50
54
  break;
51
55
  }
52
56
  message.initialGasPrice = reader.string();
53
57
  continue;
54
- case 2:
55
- if (tag != 18) {
58
+ }
59
+ case 2: {
60
+ if (tag !== 18) {
56
61
  break;
57
62
  }
58
63
  message.maxGasPriceMultiplier = reader.string();
59
64
  continue;
60
- case 3:
61
- if (tag != 26) {
65
+ }
66
+ case 3: {
67
+ if (tag !== 26) {
62
68
  break;
63
69
  }
64
70
  message.maxDiscount = reader.string();
65
71
  continue;
66
- case 4:
67
- if (tag != 34) {
72
+ }
73
+ case 4: {
74
+ if (tag !== 34) {
68
75
  break;
69
76
  }
70
77
  message.escalationStartFraction = reader.string();
71
78
  continue;
72
- case 5:
73
- if (tag != 40) {
79
+ }
80
+ case 5: {
81
+ if (tag !== 40) {
74
82
  break;
75
83
  }
76
- message.maxBlockGas = reader.int64();
84
+ message.maxBlockGas = longToNumber(reader.int64());
77
85
  continue;
78
- case 6:
79
- if (tag != 48) {
86
+ }
87
+ case 6: {
88
+ if (tag !== 48) {
80
89
  break;
81
90
  }
82
91
  message.shortEmaBlockLength = reader.uint32();
83
92
  continue;
84
- case 7:
85
- if (tag != 56) {
93
+ }
94
+ case 7: {
95
+ if (tag !== 56) {
86
96
  break;
87
97
  }
88
98
  message.longEmaBlockLength = reader.uint32();
89
99
  continue;
100
+ }
90
101
  }
91
- if ((tag & 7) == 4 || tag == 0) {
102
+ if ((tag & 7) === 4 || tag === 0) {
92
103
  break;
93
104
  }
94
- reader.skipType(tag & 7);
105
+ reader.skip(tag & 7);
95
106
  }
96
107
  return message;
97
108
  },
98
109
  fromJSON(object) {
99
110
  return {
100
- initialGasPrice: isSet(object.initialGasPrice) ? String(object.initialGasPrice) : "",
101
- maxGasPriceMultiplier: isSet(object.maxGasPriceMultiplier) ? String(object.maxGasPriceMultiplier) : "",
102
- maxDiscount: isSet(object.maxDiscount) ? String(object.maxDiscount) : "",
103
- escalationStartFraction: isSet(object.escalationStartFraction) ? String(object.escalationStartFraction) : "",
104
- maxBlockGas: isSet(object.maxBlockGas) ? Long.fromValue(object.maxBlockGas) : Long.ZERO,
105
- shortEmaBlockLength: isSet(object.shortEmaBlockLength) ? Number(object.shortEmaBlockLength) : 0,
106
- longEmaBlockLength: isSet(object.longEmaBlockLength) ? Number(object.longEmaBlockLength) : 0,
111
+ initialGasPrice: isSet(object.initialGasPrice)
112
+ ? globalThis.String(object.initialGasPrice)
113
+ : "",
114
+ maxGasPriceMultiplier: isSet(object.maxGasPriceMultiplier)
115
+ ? globalThis.String(object.maxGasPriceMultiplier)
116
+ : "",
117
+ maxDiscount: isSet(object.maxDiscount)
118
+ ? globalThis.String(object.maxDiscount)
119
+ : "",
120
+ escalationStartFraction: isSet(object.escalationStartFraction)
121
+ ? globalThis.String(object.escalationStartFraction)
122
+ : "",
123
+ maxBlockGas: isSet(object.maxBlockGas)
124
+ ? globalThis.Number(object.maxBlockGas)
125
+ : 0,
126
+ shortEmaBlockLength: isSet(object.shortEmaBlockLength)
127
+ ? globalThis.Number(object.shortEmaBlockLength)
128
+ : 0,
129
+ longEmaBlockLength: isSet(object.longEmaBlockLength)
130
+ ? globalThis.Number(object.longEmaBlockLength)
131
+ : 0,
107
132
  };
108
133
  },
109
134
  toJSON(message) {
110
135
  const obj = {};
111
- message.initialGasPrice !== undefined && (obj.initialGasPrice = message.initialGasPrice);
112
- message.maxGasPriceMultiplier !== undefined && (obj.maxGasPriceMultiplier = message.maxGasPriceMultiplier);
113
- message.maxDiscount !== undefined && (obj.maxDiscount = message.maxDiscount);
114
- message.escalationStartFraction !== undefined && (obj.escalationStartFraction = message.escalationStartFraction);
115
- message.maxBlockGas !== undefined && (obj.maxBlockGas = (message.maxBlockGas || Long.ZERO).toString());
116
- message.shortEmaBlockLength !== undefined && (obj.shortEmaBlockLength = Math.round(message.shortEmaBlockLength));
117
- message.longEmaBlockLength !== undefined && (obj.longEmaBlockLength = Math.round(message.longEmaBlockLength));
136
+ if (message.initialGasPrice !== "") {
137
+ obj.initialGasPrice = message.initialGasPrice;
138
+ }
139
+ if (message.maxGasPriceMultiplier !== "") {
140
+ obj.maxGasPriceMultiplier = message.maxGasPriceMultiplier;
141
+ }
142
+ if (message.maxDiscount !== "") {
143
+ obj.maxDiscount = message.maxDiscount;
144
+ }
145
+ if (message.escalationStartFraction !== "") {
146
+ obj.escalationStartFraction = message.escalationStartFraction;
147
+ }
148
+ if (message.maxBlockGas !== 0) {
149
+ obj.maxBlockGas = Math.round(message.maxBlockGas);
150
+ }
151
+ if (message.shortEmaBlockLength !== 0) {
152
+ obj.shortEmaBlockLength = Math.round(message.shortEmaBlockLength);
153
+ }
154
+ if (message.longEmaBlockLength !== 0) {
155
+ obj.longEmaBlockLength = Math.round(message.longEmaBlockLength);
156
+ }
118
157
  return obj;
119
158
  },
120
159
  create(base) {
@@ -126,9 +165,7 @@ export const ModelParams = {
126
165
  message.maxGasPriceMultiplier = object.maxGasPriceMultiplier ?? "";
127
166
  message.maxDiscount = object.maxDiscount ?? "";
128
167
  message.escalationStartFraction = object.escalationStartFraction ?? "";
129
- message.maxBlockGas = (object.maxBlockGas !== undefined && object.maxBlockGas !== null)
130
- ? Long.fromValue(object.maxBlockGas)
131
- : Long.ZERO;
168
+ message.maxBlockGas = object.maxBlockGas ?? 0;
132
169
  message.shortEmaBlockLength = object.shortEmaBlockLength ?? 0;
133
170
  message.longEmaBlockLength = object.longEmaBlockLength ?? 0;
134
171
  return message;
@@ -138,39 +175,46 @@ function createBaseParams() {
138
175
  return { model: undefined };
139
176
  }
140
177
  export const Params = {
141
- encode(message, writer = _m0.Writer.create()) {
178
+ encode(message, writer = new BinaryWriter()) {
142
179
  if (message.model !== undefined) {
143
180
  ModelParams.encode(message.model, writer.uint32(10).fork()).ldelim();
144
181
  }
145
182
  return writer;
146
183
  },
147
184
  decode(input, length) {
148
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
185
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
149
186
  let end = length === undefined ? reader.len : reader.pos + length;
150
187
  const message = createBaseParams();
151
188
  while (reader.pos < end) {
152
189
  const tag = reader.uint32();
153
190
  switch (tag >>> 3) {
154
- case 1:
155
- if (tag != 10) {
191
+ case 1: {
192
+ if (tag !== 10) {
156
193
  break;
157
194
  }
158
195
  message.model = ModelParams.decode(reader, reader.uint32());
159
196
  continue;
197
+ }
160
198
  }
161
- if ((tag & 7) == 4 || tag == 0) {
199
+ if ((tag & 7) === 4 || tag === 0) {
162
200
  break;
163
201
  }
164
- reader.skipType(tag & 7);
202
+ reader.skip(tag & 7);
165
203
  }
166
204
  return message;
167
205
  },
168
206
  fromJSON(object) {
169
- return { model: isSet(object.model) ? ModelParams.fromJSON(object.model) : undefined };
207
+ return {
208
+ model: isSet(object.model)
209
+ ? ModelParams.fromJSON(object.model)
210
+ : undefined,
211
+ };
170
212
  },
171
213
  toJSON(message) {
172
214
  const obj = {};
173
- message.model !== undefined && (obj.model = message.model ? ModelParams.toJSON(message.model) : undefined);
215
+ if (message.model !== undefined) {
216
+ obj.model = ModelParams.toJSON(message.model);
217
+ }
174
218
  return obj;
175
219
  },
176
220
  create(base) {
@@ -178,15 +222,22 @@ export const Params = {
178
222
  },
179
223
  fromPartial(object) {
180
224
  const message = createBaseParams();
181
- message.model = (object.model !== undefined && object.model !== null)
182
- ? ModelParams.fromPartial(object.model)
183
- : undefined;
225
+ message.model =
226
+ object.model !== undefined && object.model !== null
227
+ ? ModelParams.fromPartial(object.model)
228
+ : undefined;
184
229
  return message;
185
230
  },
186
231
  };
187
- if (_m0.util.Long !== Long) {
188
- _m0.util.Long = Long;
189
- _m0.configure();
232
+ function longToNumber(int64) {
233
+ const num = globalThis.Number(int64.toString());
234
+ if (num > globalThis.Number.MAX_SAFE_INTEGER) {
235
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
236
+ }
237
+ if (num < globalThis.Number.MIN_SAFE_INTEGER) {
238
+ throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
239
+ }
240
+ return num;
190
241
  }
191
242
  function isSet(value) {
192
243
  return value !== null && value !== undefined;