@sparkdreamnft/sparkdreamjs 0.0.17 → 0.0.19

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 (275) hide show
  1. package/cosmos/bundle.d.ts +160 -160
  2. package/cosmos/bundle.js +182 -182
  3. package/esm/cosmos/bundle.js +182 -182
  4. package/esm/ibc/bundle.js +106 -106
  5. package/esm/sparkdream/blog/v1/params.js +113 -52
  6. package/esm/sparkdream/blog/v1/tx.js +583 -2
  7. package/esm/sparkdream/blog/v1/tx.registry.js +74 -2
  8. package/esm/sparkdream/blog/v1/tx.rpc.msg.js +33 -3
  9. package/esm/sparkdream/bundle.js +448 -346
  10. package/esm/sparkdream/client.js +7 -1
  11. package/esm/sparkdream/collect/v1/params.js +121 -1
  12. package/esm/sparkdream/collect/v1/tx.js +293 -1
  13. package/esm/sparkdream/collect/v1/tx.registry.js +38 -2
  14. package/esm/sparkdream/collect/v1/tx.rpc.msg.js +17 -2
  15. package/esm/sparkdream/collect/v1/types.js +147 -3
  16. package/esm/sparkdream/commons/v1/genesis.js +29 -1
  17. package/esm/sparkdream/commons/v1/query.js +317 -0
  18. package/esm/sparkdream/commons/v1/query.lcd.js +23 -0
  19. package/esm/sparkdream/commons/v1/query.rpc.Query.js +20 -1
  20. package/esm/sparkdream/commons/v1/recurring_spend.js +296 -0
  21. package/esm/sparkdream/commons/v1/tx.js +693 -0
  22. package/esm/sparkdream/commons/v1/tx.registry.js +74 -2
  23. package/esm/sparkdream/commons/v1/tx.rpc.msg.js +33 -1
  24. package/esm/sparkdream/federation/v1/genesis.js +10 -10
  25. package/esm/sparkdream/federation/v1/params.js +29 -54
  26. package/esm/sparkdream/federation/v1/query.js +216 -71
  27. package/esm/sparkdream/federation/v1/query.lcd.js +11 -6
  28. package/esm/sparkdream/federation/v1/query.rpc.Query.js +24 -15
  29. package/esm/sparkdream/federation/v1/tx.amino.js +21 -21
  30. package/esm/sparkdream/federation/v1/tx.js +1146 -1105
  31. package/esm/sparkdream/federation/v1/tx.registry.js +74 -74
  32. package/esm/sparkdream/federation/v1/tx.rpc.msg.js +32 -26
  33. package/esm/sparkdream/federation/v1/types.js +355 -99
  34. package/esm/sparkdream/federation/v1/verifier_activity.js +13 -1
  35. package/esm/sparkdream/forum/v1/params.js +389 -148
  36. package/esm/sparkdream/forum/v1/post.js +25 -1
  37. package/esm/sparkdream/forum/v1/tx.js +460 -0
  38. package/esm/sparkdream/forum/v1/tx.registry.js +56 -2
  39. package/esm/sparkdream/forum/v1/tx.rpc.msg.js +30 -1
  40. package/esm/sparkdream/forum/v1/types.js +355 -0
  41. package/esm/sparkdream/forum/v1/user_rate_limit.js +41 -2
  42. package/esm/sparkdream/guardian/module/v1/module.js +68 -0
  43. package/esm/sparkdream/guardian/v1/query.js +128 -0
  44. package/esm/sparkdream/guardian/v1/query.lcd.js +13 -0
  45. package/esm/sparkdream/guardian/v1/query.rpc.Query.js +26 -0
  46. package/esm/sparkdream/guardian/v1/tx.amino.js +9 -0
  47. package/esm/sparkdream/guardian/v1/tx.js +175 -0
  48. package/esm/sparkdream/guardian/v1/tx.registry.js +33 -0
  49. package/esm/sparkdream/guardian/v1/tx.rpc.msg.js +24 -0
  50. package/esm/sparkdream/identity/module/v1/module.js +71 -0
  51. package/esm/sparkdream/identity/v1/chain_identity.js +199 -0
  52. package/esm/sparkdream/identity/v1/genesis.js +84 -0
  53. package/esm/sparkdream/identity/v1/query.js +372 -0
  54. package/esm/sparkdream/identity/v1/query.lcd.js +21 -0
  55. package/esm/sparkdream/identity/v1/query.rpc.Query.js +42 -0
  56. package/esm/sparkdream/lcd.js +15 -0
  57. package/esm/sparkdream/name/v1/params.js +19 -18
  58. package/esm/sparkdream/rep/v1/bonded_role.js +48 -2
  59. package/esm/sparkdream/rep/v1/member.js +209 -1
  60. package/esm/sparkdream/rep/v1/tag.js +6 -13
  61. package/esm/sparkdream/rpc.query.js +9 -0
  62. package/esm/sparkdream/rpc.tx.js +6 -0
  63. package/esm/sparkdream/service/module/v1/module.js +71 -0
  64. package/esm/sparkdream/service/v1/controller_transfer_case.js +155 -0
  65. package/esm/sparkdream/service/v1/genesis.js +240 -0
  66. package/esm/sparkdream/service/v1/operator.js +250 -0
  67. package/esm/sparkdream/service/v1/params.js +355 -0
  68. package/esm/sparkdream/service/v1/query.js +1582 -0
  69. package/esm/sparkdream/service/v1/query.lcd.js +107 -0
  70. package/esm/sparkdream/service/v1/query.rpc.Query.js +109 -0
  71. package/esm/sparkdream/service/v1/refile_cooldown.js +121 -0
  72. package/esm/sparkdream/service/v1/report.js +212 -0
  73. package/esm/sparkdream/service/v1/reporter_rate_limit.js +137 -0
  74. package/esm/sparkdream/service/v1/service_type_config.js +264 -0
  75. package/esm/sparkdream/service/v1/system_report_rate_limit.js +115 -0
  76. package/esm/sparkdream/service/v1/tier1_escrow_entry.js +145 -0
  77. package/esm/sparkdream/service/v1/tier1_last_slash.js +121 -0
  78. package/esm/sparkdream/service/v1/tx.amino.js +69 -0
  79. package/esm/sparkdream/service/v1/tx.js +2124 -0
  80. package/esm/sparkdream/service/v1/tx.registry.js +249 -0
  81. package/esm/sparkdream/service/v1/tx.rpc.msg.js +100 -0
  82. package/esm/sparkdream/service/v1/types.js +353 -0
  83. package/esm/sparkdream/session/v1/genesis.js +136 -10
  84. package/esm/sparkdream/session/v1/grant.js +1020 -0
  85. package/esm/sparkdream/session/v1/params.js +543 -19
  86. package/esm/sparkdream/session/v1/query.js +487 -0
  87. package/esm/sparkdream/session/v1/query.lcd.js +41 -3
  88. package/esm/sparkdream/session/v1/query.rpc.Query.js +36 -4
  89. package/esm/sparkdream/session/v1/session.js +6 -0
  90. package/esm/sparkdream/session/v1/tx.js +1066 -0
  91. package/esm/sparkdream/session/v1/tx.registry.js +110 -2
  92. package/esm/sparkdream/session/v1/tx.rpc.msg.js +65 -3
  93. package/esm/tendermint/bundle.js +20 -20
  94. package/ibc/bundle.d.ts +90 -90
  95. package/ibc/bundle.js +106 -106
  96. package/package.json +1 -1
  97. package/sparkdream/blog/v1/params.d.ts +89 -28
  98. package/sparkdream/blog/v1/params.js +113 -52
  99. package/sparkdream/blog/v1/post.d.ts +2 -2
  100. package/sparkdream/blog/v1/tx.d.ts +385 -10
  101. package/sparkdream/blog/v1/tx.js +584 -3
  102. package/sparkdream/blog/v1/tx.registry.d.ts +49 -1
  103. package/sparkdream/blog/v1/tx.registry.js +73 -1
  104. package/sparkdream/blog/v1/tx.rpc.msg.d.ts +27 -3
  105. package/sparkdream/blog/v1/tx.rpc.msg.js +32 -2
  106. package/sparkdream/bundle.d.ts +15308 -12896
  107. package/sparkdream/bundle.js +448 -346
  108. package/sparkdream/client.d.ts +90 -20
  109. package/sparkdream/client.js +7 -1
  110. package/sparkdream/collect/v1/params.d.ts +140 -0
  111. package/sparkdream/collect/v1/params.js +121 -1
  112. package/sparkdream/collect/v1/tx.d.ts +195 -3
  113. package/sparkdream/collect/v1/tx.js +294 -2
  114. package/sparkdream/collect/v1/tx.registry.d.ts +25 -1
  115. package/sparkdream/collect/v1/tx.registry.js +37 -1
  116. package/sparkdream/collect/v1/tx.rpc.msg.d.ts +15 -2
  117. package/sparkdream/collect/v1/tx.rpc.msg.js +16 -1
  118. package/sparkdream/collect/v1/types.d.ts +114 -0
  119. package/sparkdream/collect/v1/types.js +147 -3
  120. package/sparkdream/commons/v1/genesis.d.ts +17 -0
  121. package/sparkdream/commons/v1/genesis.js +29 -1
  122. package/sparkdream/commons/v1/query.d.ts +186 -0
  123. package/sparkdream/commons/v1/query.js +318 -1
  124. package/sparkdream/commons/v1/query.lcd.d.ts +3 -1
  125. package/sparkdream/commons/v1/query.lcd.js +23 -0
  126. package/sparkdream/commons/v1/query.rpc.Query.d.ts +12 -1
  127. package/sparkdream/commons/v1/query.rpc.Query.js +19 -0
  128. package/sparkdream/commons/v1/recurring_spend.d.ts +234 -0
  129. package/sparkdream/commons/v1/recurring_spend.js +301 -0
  130. package/sparkdream/commons/v1/tx.d.ts +472 -0
  131. package/sparkdream/commons/v1/tx.js +694 -1
  132. package/sparkdream/commons/v1/tx.registry.d.ts +49 -1
  133. package/sparkdream/commons/v1/tx.registry.js +73 -1
  134. package/sparkdream/commons/v1/tx.rpc.msg.d.ts +29 -1
  135. package/sparkdream/commons/v1/tx.rpc.msg.js +32 -0
  136. package/sparkdream/federation/v1/genesis.d.ts +3 -3
  137. package/sparkdream/federation/v1/genesis.js +9 -9
  138. package/sparkdream/federation/v1/params.d.ts +64 -13
  139. package/sparkdream/federation/v1/params.js +29 -54
  140. package/sparkdream/federation/v1/query.d.ts +209 -100
  141. package/sparkdream/federation/v1/query.js +216 -71
  142. package/sparkdream/federation/v1/query.lcd.d.ts +4 -3
  143. package/sparkdream/federation/v1/query.lcd.js +11 -6
  144. package/sparkdream/federation/v1/query.rpc.Query.d.ts +10 -7
  145. package/sparkdream/federation/v1/query.rpc.Query.js +24 -15
  146. package/sparkdream/federation/v1/tx.amino.d.ts +21 -21
  147. package/sparkdream/federation/v1/tx.amino.js +20 -20
  148. package/sparkdream/federation/v1/tx.d.ts +479 -352
  149. package/sparkdream/federation/v1/tx.js +1147 -1106
  150. package/sparkdream/federation/v1/tx.registry.d.ts +49 -49
  151. package/sparkdream/federation/v1/tx.registry.js +73 -73
  152. package/sparkdream/federation/v1/tx.rpc.msg.d.ts +18 -9
  153. package/sparkdream/federation/v1/tx.rpc.msg.js +31 -25
  154. package/sparkdream/federation/v1/types.d.ts +307 -41
  155. package/sparkdream/federation/v1/types.js +360 -100
  156. package/sparkdream/federation/v1/verifier_activity.d.ts +18 -0
  157. package/sparkdream/federation/v1/verifier_activity.js +13 -1
  158. package/sparkdream/forum/v1/params.d.ts +309 -62
  159. package/sparkdream/forum/v1/params.js +389 -148
  160. package/sparkdream/forum/v1/post.d.ts +28 -0
  161. package/sparkdream/forum/v1/post.js +25 -1
  162. package/sparkdream/forum/v1/tx.d.ts +291 -0
  163. package/sparkdream/forum/v1/tx.js +462 -2
  164. package/sparkdream/forum/v1/tx.registry.d.ts +37 -1
  165. package/sparkdream/forum/v1/tx.registry.js +55 -1
  166. package/sparkdream/forum/v1/tx.rpc.msg.d.ts +27 -1
  167. package/sparkdream/forum/v1/tx.rpc.msg.js +29 -0
  168. package/sparkdream/forum/v1/types.d.ts +247 -0
  169. package/sparkdream/forum/v1/types.js +356 -1
  170. package/sparkdream/forum/v1/user_rate_limit.d.ts +24 -3
  171. package/sparkdream/forum/v1/user_rate_limit.js +41 -2
  172. package/sparkdream/guardian/module/v1/module.d.ts +74 -0
  173. package/sparkdream/guardian/module/v1/module.js +71 -0
  174. package/sparkdream/guardian/v1/query.d.ts +88 -0
  175. package/sparkdream/guardian/v1/query.js +131 -0
  176. package/sparkdream/guardian/v1/query.lcd.d.ts +9 -0
  177. package/sparkdream/guardian/v1/query.lcd.js +17 -0
  178. package/sparkdream/guardian/v1/query.rpc.Query.d.ts +20 -0
  179. package/sparkdream/guardian/v1/query.rpc.Query.js +31 -0
  180. package/sparkdream/guardian/v1/tx.amino.d.ts +8 -0
  181. package/sparkdream/guardian/v1/tx.amino.js +12 -0
  182. package/sparkdream/guardian/v1/tx.d.ts +138 -0
  183. package/sparkdream/guardian/v1/tx.js +181 -0
  184. package/sparkdream/guardian/v1/tx.registry.d.ts +25 -0
  185. package/sparkdream/guardian/v1/tx.registry.js +37 -0
  186. package/sparkdream/guardian/v1/tx.rpc.msg.d.ts +22 -0
  187. package/sparkdream/guardian/v1/tx.rpc.msg.js +29 -0
  188. package/sparkdream/identity/module/v1/module.d.ts +54 -0
  189. package/sparkdream/identity/module/v1/module.js +74 -0
  190. package/sparkdream/identity/v1/chain_identity.d.ts +131 -0
  191. package/sparkdream/identity/v1/chain_identity.js +202 -0
  192. package/sparkdream/identity/v1/genesis.d.ts +65 -0
  193. package/sparkdream/identity/v1/genesis.js +87 -0
  194. package/sparkdream/identity/v1/query.d.ts +243 -0
  195. package/sparkdream/identity/v1/query.js +375 -0
  196. package/sparkdream/identity/v1/query.lcd.d.ts +11 -0
  197. package/sparkdream/identity/v1/query.lcd.js +25 -0
  198. package/sparkdream/identity/v1/query.rpc.Query.d.ts +26 -0
  199. package/sparkdream/identity/v1/query.rpc.Query.js +47 -0
  200. package/sparkdream/lcd.d.ts +9 -0
  201. package/sparkdream/lcd.js +15 -0
  202. package/sparkdream/name/v1/params.d.ts +25 -8
  203. package/sparkdream/name/v1/params.js +19 -18
  204. package/sparkdream/rep/v1/bonded_role.d.ts +51 -0
  205. package/sparkdream/rep/v1/bonded_role.js +48 -2
  206. package/sparkdream/rep/v1/member.d.ts +134 -0
  207. package/sparkdream/rep/v1/member.js +210 -2
  208. package/sparkdream/rep/v1/tag.d.ts +15 -2
  209. package/sparkdream/rep/v1/tag.js +6 -13
  210. package/sparkdream/rpc.query.d.ts +34 -2
  211. package/sparkdream/rpc.query.js +9 -0
  212. package/sparkdream/rpc.tx.d.ts +6 -0
  213. package/sparkdream/rpc.tx.js +6 -0
  214. package/sparkdream/service/module/v1/module.d.ts +54 -0
  215. package/sparkdream/service/module/v1/module.js +74 -0
  216. package/sparkdream/service/v1/controller_transfer_case.d.ts +125 -0
  217. package/sparkdream/service/v1/controller_transfer_case.js +158 -0
  218. package/sparkdream/service/v1/genesis.d.ts +172 -0
  219. package/sparkdream/service/v1/genesis.js +243 -0
  220. package/sparkdream/service/v1/operator.d.ts +215 -0
  221. package/sparkdream/service/v1/operator.js +253 -0
  222. package/sparkdream/service/v1/params.d.ts +346 -0
  223. package/sparkdream/service/v1/params.js +358 -0
  224. package/sparkdream/service/v1/query.d.ts +964 -0
  225. package/sparkdream/service/v1/query.js +1585 -0
  226. package/sparkdream/service/v1/query.lcd.d.ts +18 -0
  227. package/sparkdream/service/v1/query.lcd.js +111 -0
  228. package/sparkdream/service/v1/query.rpc.Query.d.ts +63 -0
  229. package/sparkdream/service/v1/query.rpc.Query.js +114 -0
  230. package/sparkdream/service/v1/refile_cooldown.d.ts +105 -0
  231. package/sparkdream/service/v1/refile_cooldown.js +124 -0
  232. package/sparkdream/service/v1/report.d.ts +174 -0
  233. package/sparkdream/service/v1/report.js +215 -0
  234. package/sparkdream/service/v1/reporter_rate_limit.d.ts +112 -0
  235. package/sparkdream/service/v1/reporter_rate_limit.js +140 -0
  236. package/sparkdream/service/v1/service_type_config.d.ts +222 -0
  237. package/sparkdream/service/v1/service_type_config.js +269 -0
  238. package/sparkdream/service/v1/system_report_rate_limit.d.ts +106 -0
  239. package/sparkdream/service/v1/system_report_rate_limit.js +118 -0
  240. package/sparkdream/service/v1/tier1_escrow_entry.d.ts +125 -0
  241. package/sparkdream/service/v1/tier1_escrow_entry.js +148 -0
  242. package/sparkdream/service/v1/tier1_last_slash.d.ts +101 -0
  243. package/sparkdream/service/v1/tier1_last_slash.js +124 -0
  244. package/sparkdream/service/v1/tx.amino.d.ts +68 -0
  245. package/sparkdream/service/v1/tx.amino.js +72 -0
  246. package/sparkdream/service/v1/tx.d.ts +1264 -0
  247. package/sparkdream/service/v1/tx.js +2127 -0
  248. package/sparkdream/service/v1/tx.registry.d.ts +169 -0
  249. package/sparkdream/service/v1/tx.registry.js +253 -0
  250. package/sparkdream/service/v1/tx.rpc.msg.d.ts +80 -0
  251. package/sparkdream/service/v1/tx.rpc.msg.js +105 -0
  252. package/sparkdream/service/v1/types.d.ts +94 -0
  253. package/sparkdream/service/v1/types.js +370 -0
  254. package/sparkdream/session/v1/genesis.d.ts +93 -9
  255. package/sparkdream/session/v1/genesis.js +137 -11
  256. package/sparkdream/session/v1/grant.d.ts +517 -0
  257. package/sparkdream/session/v1/grant.js +1027 -0
  258. package/sparkdream/session/v1/params.d.ts +338 -7
  259. package/sparkdream/session/v1/params.js +543 -19
  260. package/sparkdream/session/v1/query.d.ts +265 -0
  261. package/sparkdream/session/v1/query.js +488 -1
  262. package/sparkdream/session/v1/query.lcd.d.ts +4 -1
  263. package/sparkdream/session/v1/query.lcd.js +41 -3
  264. package/sparkdream/session/v1/query.rpc.Query.d.ts +27 -4
  265. package/sparkdream/session/v1/query.rpc.Query.js +35 -3
  266. package/sparkdream/session/v1/session.d.ts +18 -0
  267. package/sparkdream/session/v1/session.js +6 -0
  268. package/sparkdream/session/v1/tx.d.ts +660 -0
  269. package/sparkdream/session/v1/tx.js +1067 -1
  270. package/sparkdream/session/v1/tx.registry.d.ts +73 -1
  271. package/sparkdream/session/v1/tx.registry.js +109 -1
  272. package/sparkdream/session/v1/tx.rpc.msg.d.ts +63 -3
  273. package/sparkdream/session/v1/tx.rpc.msg.js +64 -2
  274. package/tendermint/bundle.d.ts +844 -844
  275. package/tendermint/bundle.js +20 -20
@@ -0,0 +1,243 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GenesisState = void 0;
4
+ //@ts-nocheck
5
+ const params_1 = require("./params");
6
+ const service_type_config_1 = require("./service_type_config");
7
+ const operator_1 = require("./operator");
8
+ const report_1 = require("./report");
9
+ const tier1_escrow_entry_1 = require("./tier1_escrow_entry");
10
+ const controller_transfer_case_1 = require("./controller_transfer_case");
11
+ const reporter_rate_limit_1 = require("./reporter_rate_limit");
12
+ const refile_cooldown_1 = require("./refile_cooldown");
13
+ const tier1_last_slash_1 = require("./tier1_last_slash");
14
+ const binary_1 = require("../../../binary");
15
+ function createBaseGenesisState() {
16
+ return {
17
+ params: params_1.Params.fromPartial({}),
18
+ serviceTypes: [],
19
+ operators: [],
20
+ archivedOperators: [],
21
+ reports: [],
22
+ tier1Escrow: [],
23
+ controllerTransferCases: [],
24
+ reporterRateLimits: [],
25
+ refileCooldowns: [],
26
+ tier1LastSlash: [],
27
+ nextReportId: BigInt(0),
28
+ nextEscrowId: BigInt(0)
29
+ };
30
+ }
31
+ /**
32
+ * GenesisState defines the service module's genesis state. See
33
+ * x-service-spec.md §7 for full validation rules.
34
+ * @name GenesisState
35
+ * @package sparkdream.service.v1
36
+ * @see proto type: sparkdream.service.v1.GenesisState
37
+ */
38
+ exports.GenesisState = {
39
+ typeUrl: "/sparkdream.service.v1.GenesisState",
40
+ encode(message, writer = binary_1.BinaryWriter.create()) {
41
+ if (message.params !== undefined) {
42
+ params_1.Params.encode(message.params, writer.uint32(10).fork()).ldelim();
43
+ }
44
+ for (const v of message.serviceTypes) {
45
+ service_type_config_1.ServiceTypeConfig.encode(v, writer.uint32(18).fork()).ldelim();
46
+ }
47
+ for (const v of message.operators) {
48
+ operator_1.Operator.encode(v, writer.uint32(26).fork()).ldelim();
49
+ }
50
+ for (const v of message.archivedOperators) {
51
+ operator_1.Operator.encode(v, writer.uint32(34).fork()).ldelim();
52
+ }
53
+ for (const v of message.reports) {
54
+ report_1.Report.encode(v, writer.uint32(42).fork()).ldelim();
55
+ }
56
+ for (const v of message.tier1Escrow) {
57
+ tier1_escrow_entry_1.Tier1EscrowEntry.encode(v, writer.uint32(50).fork()).ldelim();
58
+ }
59
+ for (const v of message.controllerTransferCases) {
60
+ controller_transfer_case_1.ControllerTransferCase.encode(v, writer.uint32(58).fork()).ldelim();
61
+ }
62
+ for (const v of message.reporterRateLimits) {
63
+ reporter_rate_limit_1.ReporterRateLimit.encode(v, writer.uint32(66).fork()).ldelim();
64
+ }
65
+ for (const v of message.refileCooldowns) {
66
+ refile_cooldown_1.RefileCooldown.encode(v, writer.uint32(74).fork()).ldelim();
67
+ }
68
+ for (const v of message.tier1LastSlash) {
69
+ tier1_last_slash_1.Tier1LastSlash.encode(v, writer.uint32(82).fork()).ldelim();
70
+ }
71
+ if (message.nextReportId !== BigInt(0)) {
72
+ writer.uint32(88).uint64(message.nextReportId);
73
+ }
74
+ if (message.nextEscrowId !== BigInt(0)) {
75
+ writer.uint32(96).uint64(message.nextEscrowId);
76
+ }
77
+ return writer;
78
+ },
79
+ decode(input, length) {
80
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
81
+ let end = length === undefined ? reader.len : reader.pos + length;
82
+ const message = createBaseGenesisState();
83
+ while (reader.pos < end) {
84
+ const tag = reader.uint32();
85
+ switch (tag >>> 3) {
86
+ case 1:
87
+ message.params = params_1.Params.decode(reader, reader.uint32());
88
+ break;
89
+ case 2:
90
+ message.serviceTypes.push(service_type_config_1.ServiceTypeConfig.decode(reader, reader.uint32()));
91
+ break;
92
+ case 3:
93
+ message.operators.push(operator_1.Operator.decode(reader, reader.uint32()));
94
+ break;
95
+ case 4:
96
+ message.archivedOperators.push(operator_1.Operator.decode(reader, reader.uint32()));
97
+ break;
98
+ case 5:
99
+ message.reports.push(report_1.Report.decode(reader, reader.uint32()));
100
+ break;
101
+ case 6:
102
+ message.tier1Escrow.push(tier1_escrow_entry_1.Tier1EscrowEntry.decode(reader, reader.uint32()));
103
+ break;
104
+ case 7:
105
+ message.controllerTransferCases.push(controller_transfer_case_1.ControllerTransferCase.decode(reader, reader.uint32()));
106
+ break;
107
+ case 8:
108
+ message.reporterRateLimits.push(reporter_rate_limit_1.ReporterRateLimit.decode(reader, reader.uint32()));
109
+ break;
110
+ case 9:
111
+ message.refileCooldowns.push(refile_cooldown_1.RefileCooldown.decode(reader, reader.uint32()));
112
+ break;
113
+ case 10:
114
+ message.tier1LastSlash.push(tier1_last_slash_1.Tier1LastSlash.decode(reader, reader.uint32()));
115
+ break;
116
+ case 11:
117
+ message.nextReportId = reader.uint64();
118
+ break;
119
+ case 12:
120
+ message.nextEscrowId = reader.uint64();
121
+ break;
122
+ default:
123
+ reader.skipType(tag & 7);
124
+ break;
125
+ }
126
+ }
127
+ return message;
128
+ },
129
+ fromPartial(object) {
130
+ const message = createBaseGenesisState();
131
+ message.params = object.params !== undefined && object.params !== null ? params_1.Params.fromPartial(object.params) : undefined;
132
+ message.serviceTypes = object.serviceTypes?.map(e => service_type_config_1.ServiceTypeConfig.fromPartial(e)) || [];
133
+ message.operators = object.operators?.map(e => operator_1.Operator.fromPartial(e)) || [];
134
+ message.archivedOperators = object.archivedOperators?.map(e => operator_1.Operator.fromPartial(e)) || [];
135
+ message.reports = object.reports?.map(e => report_1.Report.fromPartial(e)) || [];
136
+ message.tier1Escrow = object.tier1Escrow?.map(e => tier1_escrow_entry_1.Tier1EscrowEntry.fromPartial(e)) || [];
137
+ message.controllerTransferCases = object.controllerTransferCases?.map(e => controller_transfer_case_1.ControllerTransferCase.fromPartial(e)) || [];
138
+ message.reporterRateLimits = object.reporterRateLimits?.map(e => reporter_rate_limit_1.ReporterRateLimit.fromPartial(e)) || [];
139
+ message.refileCooldowns = object.refileCooldowns?.map(e => refile_cooldown_1.RefileCooldown.fromPartial(e)) || [];
140
+ message.tier1LastSlash = object.tier1LastSlash?.map(e => tier1_last_slash_1.Tier1LastSlash.fromPartial(e)) || [];
141
+ message.nextReportId = object.nextReportId !== undefined && object.nextReportId !== null ? BigInt(object.nextReportId.toString()) : BigInt(0);
142
+ message.nextEscrowId = object.nextEscrowId !== undefined && object.nextEscrowId !== null ? BigInt(object.nextEscrowId.toString()) : BigInt(0);
143
+ return message;
144
+ },
145
+ fromAmino(object) {
146
+ const message = createBaseGenesisState();
147
+ if (object.params !== undefined && object.params !== null) {
148
+ message.params = params_1.Params.fromAmino(object.params);
149
+ }
150
+ message.serviceTypes = object.service_types?.map(e => service_type_config_1.ServiceTypeConfig.fromAmino(e)) || [];
151
+ message.operators = object.operators?.map(e => operator_1.Operator.fromAmino(e)) || [];
152
+ message.archivedOperators = object.archived_operators?.map(e => operator_1.Operator.fromAmino(e)) || [];
153
+ message.reports = object.reports?.map(e => report_1.Report.fromAmino(e)) || [];
154
+ message.tier1Escrow = object.tier1_escrow?.map(e => tier1_escrow_entry_1.Tier1EscrowEntry.fromAmino(e)) || [];
155
+ message.controllerTransferCases = object.controller_transfer_cases?.map(e => controller_transfer_case_1.ControllerTransferCase.fromAmino(e)) || [];
156
+ message.reporterRateLimits = object.reporter_rate_limits?.map(e => reporter_rate_limit_1.ReporterRateLimit.fromAmino(e)) || [];
157
+ message.refileCooldowns = object.refile_cooldowns?.map(e => refile_cooldown_1.RefileCooldown.fromAmino(e)) || [];
158
+ message.tier1LastSlash = object.tier1_last_slash?.map(e => tier1_last_slash_1.Tier1LastSlash.fromAmino(e)) || [];
159
+ if (object.next_report_id !== undefined && object.next_report_id !== null) {
160
+ message.nextReportId = BigInt(object.next_report_id);
161
+ }
162
+ if (object.next_escrow_id !== undefined && object.next_escrow_id !== null) {
163
+ message.nextEscrowId = BigInt(object.next_escrow_id);
164
+ }
165
+ return message;
166
+ },
167
+ toAmino(message) {
168
+ const obj = {};
169
+ obj.params = message.params ? params_1.Params.toAmino(message.params) : params_1.Params.toAmino(params_1.Params.fromPartial({}));
170
+ if (message.serviceTypes) {
171
+ obj.service_types = message.serviceTypes.map(e => e ? service_type_config_1.ServiceTypeConfig.toAmino(e) : undefined);
172
+ }
173
+ else {
174
+ obj.service_types = message.serviceTypes;
175
+ }
176
+ if (message.operators) {
177
+ obj.operators = message.operators.map(e => e ? operator_1.Operator.toAmino(e) : undefined);
178
+ }
179
+ else {
180
+ obj.operators = message.operators;
181
+ }
182
+ if (message.archivedOperators) {
183
+ obj.archived_operators = message.archivedOperators.map(e => e ? operator_1.Operator.toAmino(e) : undefined);
184
+ }
185
+ else {
186
+ obj.archived_operators = message.archivedOperators;
187
+ }
188
+ if (message.reports) {
189
+ obj.reports = message.reports.map(e => e ? report_1.Report.toAmino(e) : undefined);
190
+ }
191
+ else {
192
+ obj.reports = message.reports;
193
+ }
194
+ if (message.tier1Escrow) {
195
+ obj.tier1_escrow = message.tier1Escrow.map(e => e ? tier1_escrow_entry_1.Tier1EscrowEntry.toAmino(e) : undefined);
196
+ }
197
+ else {
198
+ obj.tier1_escrow = message.tier1Escrow;
199
+ }
200
+ if (message.controllerTransferCases) {
201
+ obj.controller_transfer_cases = message.controllerTransferCases.map(e => e ? controller_transfer_case_1.ControllerTransferCase.toAmino(e) : undefined);
202
+ }
203
+ else {
204
+ obj.controller_transfer_cases = message.controllerTransferCases;
205
+ }
206
+ if (message.reporterRateLimits) {
207
+ obj.reporter_rate_limits = message.reporterRateLimits.map(e => e ? reporter_rate_limit_1.ReporterRateLimit.toAmino(e) : undefined);
208
+ }
209
+ else {
210
+ obj.reporter_rate_limits = message.reporterRateLimits;
211
+ }
212
+ if (message.refileCooldowns) {
213
+ obj.refile_cooldowns = message.refileCooldowns.map(e => e ? refile_cooldown_1.RefileCooldown.toAmino(e) : undefined);
214
+ }
215
+ else {
216
+ obj.refile_cooldowns = message.refileCooldowns;
217
+ }
218
+ if (message.tier1LastSlash) {
219
+ obj.tier1_last_slash = message.tier1LastSlash.map(e => e ? tier1_last_slash_1.Tier1LastSlash.toAmino(e) : undefined);
220
+ }
221
+ else {
222
+ obj.tier1_last_slash = message.tier1LastSlash;
223
+ }
224
+ obj.next_report_id = message.nextReportId !== BigInt(0) ? message.nextReportId?.toString() : undefined;
225
+ obj.next_escrow_id = message.nextEscrowId !== BigInt(0) ? message.nextEscrowId?.toString() : undefined;
226
+ return obj;
227
+ },
228
+ fromAminoMsg(object) {
229
+ return exports.GenesisState.fromAmino(object.value);
230
+ },
231
+ fromProtoMsg(message) {
232
+ return exports.GenesisState.decode(message.value);
233
+ },
234
+ toProto(message) {
235
+ return exports.GenesisState.encode(message).finish();
236
+ },
237
+ toProtoMsg(message) {
238
+ return {
239
+ typeUrl: "/sparkdream.service.v1.GenesisState",
240
+ value: exports.GenesisState.encode(message).finish()
241
+ };
242
+ }
243
+ };
@@ -0,0 +1,215 @@
1
+ import { OperatorStatus } from "./types";
2
+ import { BinaryReader, BinaryWriter } from "../../../binary";
3
+ import { DeepPartial } from "../../../helpers";
4
+ /**
5
+ * Operator is the canonical record for a SPARK-bonded external-service
6
+ * operator (see x-service-spec.md §3.1). Live records (status ∈
7
+ * {ACTIVE, UNDERFUNDED, UNBONDING}) live in the Operators store keyed by
8
+ * (address, service_type); terminal records (SLASHED, RETIRED) are moved
9
+ * to ArchivedOperators at the terminal transition.
10
+ * @name Operator
11
+ * @package sparkdream.service.v1
12
+ * @see proto type: sparkdream.service.v1.Operator
13
+ */
14
+ export interface Operator {
15
+ /**
16
+ * address is the bech32 address of the operator (the wallet doing the
17
+ * work and signing on-chain ops).
18
+ */
19
+ address: string;
20
+ /**
21
+ * service_type is the service-type-registry key this operator serves
22
+ * (e.g. "akash-funding", "federation-bridge").
23
+ */
24
+ serviceType: string;
25
+ /**
26
+ * controller is the bech32 address of the x/commons Group that hired
27
+ * this operator. MUST not equal `address` (§3.3).
28
+ */
29
+ controller: string;
30
+ /**
31
+ * bond_amount is the SPARK currently locked in the module account's
32
+ * bond pool (excludes any amount sitting in Tier1Escrow), in
33
+ * bond-denom micro-units. Wrapped into sdk.Coin with the chain's bond
34
+ * denom at the point of use.
35
+ */
36
+ bondAmount: string;
37
+ /**
38
+ * metadata is service-specific opaque config (e.g. JSON with akash_dseq);
39
+ * capped by `max_metadata_bytes` param.
40
+ */
41
+ metadata: Uint8Array;
42
+ /**
43
+ * status is the operator's lifecycle status (§3.1).
44
+ */
45
+ status: OperatorStatus;
46
+ /**
47
+ * underfunded_since is the height at which `bond` first fell below the
48
+ * current `min_bond`; 0 if never. Used by the underfunded EndBlocker
49
+ * sweep with `underfunded_grace_blocks` (§3.6 queue 1).
50
+ */
51
+ underfundedSince: bigint;
52
+ /**
53
+ * unbond_complete_at is the height at which UNBONDING completes (subject
54
+ * to clock pausing, §3.5); 0 if not unbonding.
55
+ */
56
+ unbondCompleteAt: bigint;
57
+ /**
58
+ * tier1_slashed_in_window is the cumulative SPARK amount slashed via
59
+ * tier-1 within the current rolling window (§3.4.3). Stored as
60
+ * math.Int string to avoid coin-shape duplication.
61
+ */
62
+ tier1SlashedInWindow: string;
63
+ /**
64
+ * tier1_window_start is the height the current tier-1 rolling window
65
+ * opened.
66
+ */
67
+ tier1WindowStart: bigint;
68
+ /**
69
+ * tier1_window_start_bond is the bond at the moment the current window
70
+ * opened — the denominator for the aggregate-cap check (§3.4.3).
71
+ */
72
+ tier1WindowStartBond: string;
73
+ /**
74
+ * registered_at is the height the live record was created.
75
+ */
76
+ registeredAt: bigint;
77
+ /**
78
+ * retired_at is the height the record transitioned to a terminal status
79
+ * (SLASHED or RETIRED); 0 if live.
80
+ */
81
+ retiredAt: bigint;
82
+ /**
83
+ * total_lifetime_bond_blocks is the running sum of (current_bond *
84
+ * elapsed_active_blocks) for reputation accrual (§6.6). Updated lazily
85
+ * via settleBondBlocks at any event that changes bond or status.
86
+ */
87
+ totalLifetimeBondBlocks: string;
88
+ /**
89
+ * last_bond_block_update_at is the height of the last settleBondBlocks
90
+ * call for this operator; used by lazy accrual (§6.6).
91
+ */
92
+ lastBondBlockUpdateAt: bigint;
93
+ }
94
+ export interface OperatorProtoMsg {
95
+ typeUrl: "/sparkdream.service.v1.Operator";
96
+ value: Uint8Array;
97
+ }
98
+ /**
99
+ * Operator is the canonical record for a SPARK-bonded external-service
100
+ * operator (see x-service-spec.md §3.1). Live records (status ∈
101
+ * {ACTIVE, UNDERFUNDED, UNBONDING}) live in the Operators store keyed by
102
+ * (address, service_type); terminal records (SLASHED, RETIRED) are moved
103
+ * to ArchivedOperators at the terminal transition.
104
+ * @name OperatorAmino
105
+ * @package sparkdream.service.v1
106
+ * @see proto type: sparkdream.service.v1.Operator
107
+ */
108
+ export interface OperatorAmino {
109
+ /**
110
+ * address is the bech32 address of the operator (the wallet doing the
111
+ * work and signing on-chain ops).
112
+ */
113
+ address?: string;
114
+ /**
115
+ * service_type is the service-type-registry key this operator serves
116
+ * (e.g. "akash-funding", "federation-bridge").
117
+ */
118
+ service_type?: string;
119
+ /**
120
+ * controller is the bech32 address of the x/commons Group that hired
121
+ * this operator. MUST not equal `address` (§3.3).
122
+ */
123
+ controller?: string;
124
+ /**
125
+ * bond_amount is the SPARK currently locked in the module account's
126
+ * bond pool (excludes any amount sitting in Tier1Escrow), in
127
+ * bond-denom micro-units. Wrapped into sdk.Coin with the chain's bond
128
+ * denom at the point of use.
129
+ */
130
+ bond_amount?: string;
131
+ /**
132
+ * metadata is service-specific opaque config (e.g. JSON with akash_dseq);
133
+ * capped by `max_metadata_bytes` param.
134
+ */
135
+ metadata?: string;
136
+ /**
137
+ * status is the operator's lifecycle status (§3.1).
138
+ */
139
+ status?: OperatorStatus;
140
+ /**
141
+ * underfunded_since is the height at which `bond` first fell below the
142
+ * current `min_bond`; 0 if never. Used by the underfunded EndBlocker
143
+ * sweep with `underfunded_grace_blocks` (§3.6 queue 1).
144
+ */
145
+ underfunded_since?: string;
146
+ /**
147
+ * unbond_complete_at is the height at which UNBONDING completes (subject
148
+ * to clock pausing, §3.5); 0 if not unbonding.
149
+ */
150
+ unbond_complete_at?: string;
151
+ /**
152
+ * tier1_slashed_in_window is the cumulative SPARK amount slashed via
153
+ * tier-1 within the current rolling window (§3.4.3). Stored as
154
+ * math.Int string to avoid coin-shape duplication.
155
+ */
156
+ tier1_slashed_in_window?: string;
157
+ /**
158
+ * tier1_window_start is the height the current tier-1 rolling window
159
+ * opened.
160
+ */
161
+ tier1_window_start?: string;
162
+ /**
163
+ * tier1_window_start_bond is the bond at the moment the current window
164
+ * opened — the denominator for the aggregate-cap check (§3.4.3).
165
+ */
166
+ tier1_window_start_bond?: string;
167
+ /**
168
+ * registered_at is the height the live record was created.
169
+ */
170
+ registered_at?: string;
171
+ /**
172
+ * retired_at is the height the record transitioned to a terminal status
173
+ * (SLASHED or RETIRED); 0 if live.
174
+ */
175
+ retired_at?: string;
176
+ /**
177
+ * total_lifetime_bond_blocks is the running sum of (current_bond *
178
+ * elapsed_active_blocks) for reputation accrual (§6.6). Updated lazily
179
+ * via settleBondBlocks at any event that changes bond or status.
180
+ */
181
+ total_lifetime_bond_blocks?: string;
182
+ /**
183
+ * last_bond_block_update_at is the height of the last settleBondBlocks
184
+ * call for this operator; used by lazy accrual (§6.6).
185
+ */
186
+ last_bond_block_update_at?: string;
187
+ }
188
+ export interface OperatorAminoMsg {
189
+ type: "sparkdream/x/service/Operator";
190
+ value: OperatorAmino;
191
+ }
192
+ /**
193
+ * Operator is the canonical record for a SPARK-bonded external-service
194
+ * operator (see x-service-spec.md §3.1). Live records (status ∈
195
+ * {ACTIVE, UNDERFUNDED, UNBONDING}) live in the Operators store keyed by
196
+ * (address, service_type); terminal records (SLASHED, RETIRED) are moved
197
+ * to ArchivedOperators at the terminal transition.
198
+ * @name Operator
199
+ * @package sparkdream.service.v1
200
+ * @see proto type: sparkdream.service.v1.Operator
201
+ */
202
+ export declare const Operator: {
203
+ typeUrl: string;
204
+ aminoType: string;
205
+ encode(message: Operator, writer?: BinaryWriter): BinaryWriter;
206
+ decode(input: BinaryReader | Uint8Array, length?: number): Operator;
207
+ fromPartial(object: DeepPartial<Operator>): Operator;
208
+ fromAmino(object: OperatorAmino): Operator;
209
+ toAmino(message: Operator): OperatorAmino;
210
+ fromAminoMsg(object: OperatorAminoMsg): Operator;
211
+ toAminoMsg(message: Operator): OperatorAminoMsg;
212
+ fromProtoMsg(message: OperatorProtoMsg): Operator;
213
+ toProto(message: Operator): Uint8Array;
214
+ toProtoMsg(message: Operator): OperatorProtoMsg;
215
+ };