@sparkdreamnft/sparkdreamjs 0.0.17 → 0.0.18

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 (237) 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 +51 -50
  6. package/esm/sparkdream/bundle.js +448 -346
  7. package/esm/sparkdream/client.js +7 -1
  8. package/esm/sparkdream/collect/v1/params.js +13 -1
  9. package/esm/sparkdream/collect/v1/types.js +13 -1
  10. package/esm/sparkdream/commons/v1/genesis.js +29 -1
  11. package/esm/sparkdream/commons/v1/query.js +317 -0
  12. package/esm/sparkdream/commons/v1/query.lcd.js +23 -0
  13. package/esm/sparkdream/commons/v1/query.rpc.Query.js +20 -1
  14. package/esm/sparkdream/commons/v1/recurring_spend.js +296 -0
  15. package/esm/sparkdream/commons/v1/tx.js +693 -0
  16. package/esm/sparkdream/commons/v1/tx.registry.js +74 -2
  17. package/esm/sparkdream/commons/v1/tx.rpc.msg.js +33 -1
  18. package/esm/sparkdream/federation/v1/genesis.js +10 -10
  19. package/esm/sparkdream/federation/v1/params.js +29 -54
  20. package/esm/sparkdream/federation/v1/query.js +216 -71
  21. package/esm/sparkdream/federation/v1/query.lcd.js +11 -6
  22. package/esm/sparkdream/federation/v1/query.rpc.Query.js +24 -15
  23. package/esm/sparkdream/federation/v1/tx.amino.js +21 -21
  24. package/esm/sparkdream/federation/v1/tx.js +1146 -1105
  25. package/esm/sparkdream/federation/v1/tx.registry.js +74 -74
  26. package/esm/sparkdream/federation/v1/tx.rpc.msg.js +32 -26
  27. package/esm/sparkdream/federation/v1/types.js +355 -99
  28. package/esm/sparkdream/federation/v1/verifier_activity.js +13 -1
  29. package/esm/sparkdream/forum/v1/params.js +173 -148
  30. package/esm/sparkdream/guardian/module/v1/module.js +68 -0
  31. package/esm/sparkdream/guardian/v1/query.js +128 -0
  32. package/esm/sparkdream/guardian/v1/query.lcd.js +13 -0
  33. package/esm/sparkdream/guardian/v1/query.rpc.Query.js +26 -0
  34. package/esm/sparkdream/guardian/v1/tx.amino.js +9 -0
  35. package/esm/sparkdream/guardian/v1/tx.js +175 -0
  36. package/esm/sparkdream/guardian/v1/tx.registry.js +33 -0
  37. package/esm/sparkdream/guardian/v1/tx.rpc.msg.js +24 -0
  38. package/esm/sparkdream/identity/module/v1/module.js +71 -0
  39. package/esm/sparkdream/identity/v1/chain_identity.js +199 -0
  40. package/esm/sparkdream/identity/v1/genesis.js +84 -0
  41. package/esm/sparkdream/identity/v1/query.js +372 -0
  42. package/esm/sparkdream/identity/v1/query.lcd.js +21 -0
  43. package/esm/sparkdream/identity/v1/query.rpc.Query.js +42 -0
  44. package/esm/sparkdream/lcd.js +15 -0
  45. package/esm/sparkdream/name/v1/params.js +19 -18
  46. package/esm/sparkdream/rep/v1/bonded_role.js +48 -2
  47. package/esm/sparkdream/rep/v1/tag.js +6 -13
  48. package/esm/sparkdream/rpc.query.js +9 -0
  49. package/esm/sparkdream/rpc.tx.js +6 -0
  50. package/esm/sparkdream/service/module/v1/module.js +71 -0
  51. package/esm/sparkdream/service/v1/controller_transfer_case.js +155 -0
  52. package/esm/sparkdream/service/v1/genesis.js +240 -0
  53. package/esm/sparkdream/service/v1/operator.js +250 -0
  54. package/esm/sparkdream/service/v1/params.js +355 -0
  55. package/esm/sparkdream/service/v1/query.js +1582 -0
  56. package/esm/sparkdream/service/v1/query.lcd.js +107 -0
  57. package/esm/sparkdream/service/v1/query.rpc.Query.js +109 -0
  58. package/esm/sparkdream/service/v1/refile_cooldown.js +121 -0
  59. package/esm/sparkdream/service/v1/report.js +212 -0
  60. package/esm/sparkdream/service/v1/reporter_rate_limit.js +137 -0
  61. package/esm/sparkdream/service/v1/service_type_config.js +264 -0
  62. package/esm/sparkdream/service/v1/system_report_rate_limit.js +115 -0
  63. package/esm/sparkdream/service/v1/tier1_escrow_entry.js +145 -0
  64. package/esm/sparkdream/service/v1/tier1_last_slash.js +121 -0
  65. package/esm/sparkdream/service/v1/tx.amino.js +69 -0
  66. package/esm/sparkdream/service/v1/tx.js +2124 -0
  67. package/esm/sparkdream/service/v1/tx.registry.js +249 -0
  68. package/esm/sparkdream/service/v1/tx.rpc.msg.js +100 -0
  69. package/esm/sparkdream/service/v1/types.js +353 -0
  70. package/esm/sparkdream/session/v1/genesis.js +136 -10
  71. package/esm/sparkdream/session/v1/grant.js +1020 -0
  72. package/esm/sparkdream/session/v1/params.js +543 -19
  73. package/esm/sparkdream/session/v1/query.js +487 -0
  74. package/esm/sparkdream/session/v1/query.lcd.js +41 -3
  75. package/esm/sparkdream/session/v1/query.rpc.Query.js +36 -4
  76. package/esm/sparkdream/session/v1/session.js +6 -0
  77. package/esm/sparkdream/session/v1/tx.js +1066 -0
  78. package/esm/sparkdream/session/v1/tx.registry.js +110 -2
  79. package/esm/sparkdream/session/v1/tx.rpc.msg.js +65 -3
  80. package/esm/tendermint/bundle.js +20 -20
  81. package/ibc/bundle.d.ts +90 -90
  82. package/ibc/bundle.js +106 -106
  83. package/package.json +1 -1
  84. package/sparkdream/blog/v1/params.d.ts +37 -28
  85. package/sparkdream/blog/v1/params.js +51 -50
  86. package/sparkdream/blog/v1/post.d.ts +2 -2
  87. package/sparkdream/blog/v1/tx.d.ts +4 -4
  88. package/sparkdream/bundle.d.ts +14912 -12896
  89. package/sparkdream/bundle.js +448 -346
  90. package/sparkdream/client.d.ts +90 -20
  91. package/sparkdream/client.js +7 -1
  92. package/sparkdream/collect/v1/params.d.ts +16 -0
  93. package/sparkdream/collect/v1/params.js +13 -1
  94. package/sparkdream/collect/v1/types.d.ts +2 -0
  95. package/sparkdream/collect/v1/types.js +13 -1
  96. package/sparkdream/commons/v1/genesis.d.ts +17 -0
  97. package/sparkdream/commons/v1/genesis.js +29 -1
  98. package/sparkdream/commons/v1/query.d.ts +186 -0
  99. package/sparkdream/commons/v1/query.js +318 -1
  100. package/sparkdream/commons/v1/query.lcd.d.ts +3 -1
  101. package/sparkdream/commons/v1/query.lcd.js +23 -0
  102. package/sparkdream/commons/v1/query.rpc.Query.d.ts +12 -1
  103. package/sparkdream/commons/v1/query.rpc.Query.js +19 -0
  104. package/sparkdream/commons/v1/recurring_spend.d.ts +234 -0
  105. package/sparkdream/commons/v1/recurring_spend.js +301 -0
  106. package/sparkdream/commons/v1/tx.d.ts +472 -0
  107. package/sparkdream/commons/v1/tx.js +694 -1
  108. package/sparkdream/commons/v1/tx.registry.d.ts +49 -1
  109. package/sparkdream/commons/v1/tx.registry.js +73 -1
  110. package/sparkdream/commons/v1/tx.rpc.msg.d.ts +29 -1
  111. package/sparkdream/commons/v1/tx.rpc.msg.js +32 -0
  112. package/sparkdream/federation/v1/genesis.d.ts +3 -3
  113. package/sparkdream/federation/v1/genesis.js +9 -9
  114. package/sparkdream/federation/v1/params.d.ts +64 -13
  115. package/sparkdream/federation/v1/params.js +29 -54
  116. package/sparkdream/federation/v1/query.d.ts +209 -100
  117. package/sparkdream/federation/v1/query.js +216 -71
  118. package/sparkdream/federation/v1/query.lcd.d.ts +4 -3
  119. package/sparkdream/federation/v1/query.lcd.js +11 -6
  120. package/sparkdream/federation/v1/query.rpc.Query.d.ts +10 -7
  121. package/sparkdream/federation/v1/query.rpc.Query.js +24 -15
  122. package/sparkdream/federation/v1/tx.amino.d.ts +21 -21
  123. package/sparkdream/federation/v1/tx.amino.js +20 -20
  124. package/sparkdream/federation/v1/tx.d.ts +479 -352
  125. package/sparkdream/federation/v1/tx.js +1147 -1106
  126. package/sparkdream/federation/v1/tx.registry.d.ts +49 -49
  127. package/sparkdream/federation/v1/tx.registry.js +73 -73
  128. package/sparkdream/federation/v1/tx.rpc.msg.d.ts +18 -9
  129. package/sparkdream/federation/v1/tx.rpc.msg.js +31 -25
  130. package/sparkdream/federation/v1/types.d.ts +307 -41
  131. package/sparkdream/federation/v1/types.js +360 -100
  132. package/sparkdream/federation/v1/verifier_activity.d.ts +18 -0
  133. package/sparkdream/federation/v1/verifier_activity.js +13 -1
  134. package/sparkdream/forum/v1/params.d.ts +99 -62
  135. package/sparkdream/forum/v1/params.js +173 -148
  136. package/sparkdream/guardian/module/v1/module.d.ts +74 -0
  137. package/sparkdream/guardian/module/v1/module.js +71 -0
  138. package/sparkdream/guardian/v1/query.d.ts +88 -0
  139. package/sparkdream/guardian/v1/query.js +131 -0
  140. package/sparkdream/guardian/v1/query.lcd.d.ts +9 -0
  141. package/sparkdream/guardian/v1/query.lcd.js +17 -0
  142. package/sparkdream/guardian/v1/query.rpc.Query.d.ts +20 -0
  143. package/sparkdream/guardian/v1/query.rpc.Query.js +31 -0
  144. package/sparkdream/guardian/v1/tx.amino.d.ts +8 -0
  145. package/sparkdream/guardian/v1/tx.amino.js +12 -0
  146. package/sparkdream/guardian/v1/tx.d.ts +138 -0
  147. package/sparkdream/guardian/v1/tx.js +181 -0
  148. package/sparkdream/guardian/v1/tx.registry.d.ts +25 -0
  149. package/sparkdream/guardian/v1/tx.registry.js +37 -0
  150. package/sparkdream/guardian/v1/tx.rpc.msg.d.ts +22 -0
  151. package/sparkdream/guardian/v1/tx.rpc.msg.js +29 -0
  152. package/sparkdream/identity/module/v1/module.d.ts +54 -0
  153. package/sparkdream/identity/module/v1/module.js +74 -0
  154. package/sparkdream/identity/v1/chain_identity.d.ts +131 -0
  155. package/sparkdream/identity/v1/chain_identity.js +202 -0
  156. package/sparkdream/identity/v1/genesis.d.ts +65 -0
  157. package/sparkdream/identity/v1/genesis.js +87 -0
  158. package/sparkdream/identity/v1/query.d.ts +243 -0
  159. package/sparkdream/identity/v1/query.js +375 -0
  160. package/sparkdream/identity/v1/query.lcd.d.ts +11 -0
  161. package/sparkdream/identity/v1/query.lcd.js +25 -0
  162. package/sparkdream/identity/v1/query.rpc.Query.d.ts +26 -0
  163. package/sparkdream/identity/v1/query.rpc.Query.js +47 -0
  164. package/sparkdream/lcd.d.ts +9 -0
  165. package/sparkdream/lcd.js +15 -0
  166. package/sparkdream/name/v1/params.d.ts +25 -8
  167. package/sparkdream/name/v1/params.js +19 -18
  168. package/sparkdream/rep/v1/bonded_role.d.ts +51 -0
  169. package/sparkdream/rep/v1/bonded_role.js +48 -2
  170. package/sparkdream/rep/v1/tag.d.ts +15 -2
  171. package/sparkdream/rep/v1/tag.js +6 -13
  172. package/sparkdream/rpc.query.d.ts +34 -2
  173. package/sparkdream/rpc.query.js +9 -0
  174. package/sparkdream/rpc.tx.d.ts +6 -0
  175. package/sparkdream/rpc.tx.js +6 -0
  176. package/sparkdream/service/module/v1/module.d.ts +54 -0
  177. package/sparkdream/service/module/v1/module.js +74 -0
  178. package/sparkdream/service/v1/controller_transfer_case.d.ts +125 -0
  179. package/sparkdream/service/v1/controller_transfer_case.js +158 -0
  180. package/sparkdream/service/v1/genesis.d.ts +172 -0
  181. package/sparkdream/service/v1/genesis.js +243 -0
  182. package/sparkdream/service/v1/operator.d.ts +215 -0
  183. package/sparkdream/service/v1/operator.js +253 -0
  184. package/sparkdream/service/v1/params.d.ts +346 -0
  185. package/sparkdream/service/v1/params.js +358 -0
  186. package/sparkdream/service/v1/query.d.ts +964 -0
  187. package/sparkdream/service/v1/query.js +1585 -0
  188. package/sparkdream/service/v1/query.lcd.d.ts +18 -0
  189. package/sparkdream/service/v1/query.lcd.js +111 -0
  190. package/sparkdream/service/v1/query.rpc.Query.d.ts +63 -0
  191. package/sparkdream/service/v1/query.rpc.Query.js +114 -0
  192. package/sparkdream/service/v1/refile_cooldown.d.ts +105 -0
  193. package/sparkdream/service/v1/refile_cooldown.js +124 -0
  194. package/sparkdream/service/v1/report.d.ts +174 -0
  195. package/sparkdream/service/v1/report.js +215 -0
  196. package/sparkdream/service/v1/reporter_rate_limit.d.ts +112 -0
  197. package/sparkdream/service/v1/reporter_rate_limit.js +140 -0
  198. package/sparkdream/service/v1/service_type_config.d.ts +222 -0
  199. package/sparkdream/service/v1/service_type_config.js +269 -0
  200. package/sparkdream/service/v1/system_report_rate_limit.d.ts +106 -0
  201. package/sparkdream/service/v1/system_report_rate_limit.js +118 -0
  202. package/sparkdream/service/v1/tier1_escrow_entry.d.ts +125 -0
  203. package/sparkdream/service/v1/tier1_escrow_entry.js +148 -0
  204. package/sparkdream/service/v1/tier1_last_slash.d.ts +101 -0
  205. package/sparkdream/service/v1/tier1_last_slash.js +124 -0
  206. package/sparkdream/service/v1/tx.amino.d.ts +68 -0
  207. package/sparkdream/service/v1/tx.amino.js +72 -0
  208. package/sparkdream/service/v1/tx.d.ts +1264 -0
  209. package/sparkdream/service/v1/tx.js +2127 -0
  210. package/sparkdream/service/v1/tx.registry.d.ts +169 -0
  211. package/sparkdream/service/v1/tx.registry.js +253 -0
  212. package/sparkdream/service/v1/tx.rpc.msg.d.ts +80 -0
  213. package/sparkdream/service/v1/tx.rpc.msg.js +105 -0
  214. package/sparkdream/service/v1/types.d.ts +94 -0
  215. package/sparkdream/service/v1/types.js +370 -0
  216. package/sparkdream/session/v1/genesis.d.ts +93 -9
  217. package/sparkdream/session/v1/genesis.js +137 -11
  218. package/sparkdream/session/v1/grant.d.ts +517 -0
  219. package/sparkdream/session/v1/grant.js +1027 -0
  220. package/sparkdream/session/v1/params.d.ts +338 -7
  221. package/sparkdream/session/v1/params.js +543 -19
  222. package/sparkdream/session/v1/query.d.ts +265 -0
  223. package/sparkdream/session/v1/query.js +488 -1
  224. package/sparkdream/session/v1/query.lcd.d.ts +4 -1
  225. package/sparkdream/session/v1/query.lcd.js +41 -3
  226. package/sparkdream/session/v1/query.rpc.Query.d.ts +27 -4
  227. package/sparkdream/session/v1/query.rpc.Query.js +35 -3
  228. package/sparkdream/session/v1/session.d.ts +18 -0
  229. package/sparkdream/session/v1/session.js +6 -0
  230. package/sparkdream/session/v1/tx.d.ts +660 -0
  231. package/sparkdream/session/v1/tx.js +1067 -1
  232. package/sparkdream/session/v1/tx.registry.d.ts +73 -1
  233. package/sparkdream/session/v1/tx.registry.js +109 -1
  234. package/sparkdream/session/v1/tx.rpc.msg.d.ts +63 -3
  235. package/sparkdream/session/v1/tx.rpc.msg.js +64 -2
  236. package/tendermint/bundle.d.ts +844 -844
  237. package/tendermint/bundle.js +20 -20
@@ -0,0 +1,253 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Operator = void 0;
4
+ const binary_1 = require("../../../binary");
5
+ const helpers_1 = require("../../../helpers");
6
+ function createBaseOperator() {
7
+ return {
8
+ address: "",
9
+ serviceType: "",
10
+ controller: "",
11
+ bondAmount: "",
12
+ metadata: new Uint8Array(),
13
+ status: 0,
14
+ underfundedSince: BigInt(0),
15
+ unbondCompleteAt: BigInt(0),
16
+ tier1SlashedInWindow: "",
17
+ tier1WindowStart: BigInt(0),
18
+ tier1WindowStartBond: "",
19
+ registeredAt: BigInt(0),
20
+ retiredAt: BigInt(0),
21
+ totalLifetimeBondBlocks: "",
22
+ lastBondBlockUpdateAt: BigInt(0)
23
+ };
24
+ }
25
+ /**
26
+ * Operator is the canonical record for a SPARK-bonded external-service
27
+ * operator (see x-service-spec.md §3.1). Live records (status ∈
28
+ * {ACTIVE, UNDERFUNDED, UNBONDING}) live in the Operators store keyed by
29
+ * (address, service_type); terminal records (SLASHED, RETIRED) are moved
30
+ * to ArchivedOperators at the terminal transition.
31
+ * @name Operator
32
+ * @package sparkdream.service.v1
33
+ * @see proto type: sparkdream.service.v1.Operator
34
+ */
35
+ exports.Operator = {
36
+ typeUrl: "/sparkdream.service.v1.Operator",
37
+ aminoType: "sparkdream/x/service/Operator",
38
+ encode(message, writer = binary_1.BinaryWriter.create()) {
39
+ if (message.address !== "") {
40
+ writer.uint32(10).string(message.address);
41
+ }
42
+ if (message.serviceType !== "") {
43
+ writer.uint32(18).string(message.serviceType);
44
+ }
45
+ if (message.controller !== "") {
46
+ writer.uint32(26).string(message.controller);
47
+ }
48
+ if (message.bondAmount !== "") {
49
+ writer.uint32(34).string(message.bondAmount);
50
+ }
51
+ if (message.metadata.length !== 0) {
52
+ writer.uint32(42).bytes(message.metadata);
53
+ }
54
+ if (message.status !== 0) {
55
+ writer.uint32(48).int32(message.status);
56
+ }
57
+ if (message.underfundedSince !== BigInt(0)) {
58
+ writer.uint32(56).int64(message.underfundedSince);
59
+ }
60
+ if (message.unbondCompleteAt !== BigInt(0)) {
61
+ writer.uint32(64).int64(message.unbondCompleteAt);
62
+ }
63
+ if (message.tier1SlashedInWindow !== "") {
64
+ writer.uint32(74).string(message.tier1SlashedInWindow);
65
+ }
66
+ if (message.tier1WindowStart !== BigInt(0)) {
67
+ writer.uint32(80).int64(message.tier1WindowStart);
68
+ }
69
+ if (message.tier1WindowStartBond !== "") {
70
+ writer.uint32(90).string(message.tier1WindowStartBond);
71
+ }
72
+ if (message.registeredAt !== BigInt(0)) {
73
+ writer.uint32(96).int64(message.registeredAt);
74
+ }
75
+ if (message.retiredAt !== BigInt(0)) {
76
+ writer.uint32(104).int64(message.retiredAt);
77
+ }
78
+ if (message.totalLifetimeBondBlocks !== "") {
79
+ writer.uint32(114).string(message.totalLifetimeBondBlocks);
80
+ }
81
+ if (message.lastBondBlockUpdateAt !== BigInt(0)) {
82
+ writer.uint32(120).int64(message.lastBondBlockUpdateAt);
83
+ }
84
+ return writer;
85
+ },
86
+ decode(input, length) {
87
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
88
+ let end = length === undefined ? reader.len : reader.pos + length;
89
+ const message = createBaseOperator();
90
+ while (reader.pos < end) {
91
+ const tag = reader.uint32();
92
+ switch (tag >>> 3) {
93
+ case 1:
94
+ message.address = reader.string();
95
+ break;
96
+ case 2:
97
+ message.serviceType = reader.string();
98
+ break;
99
+ case 3:
100
+ message.controller = reader.string();
101
+ break;
102
+ case 4:
103
+ message.bondAmount = reader.string();
104
+ break;
105
+ case 5:
106
+ message.metadata = reader.bytes();
107
+ break;
108
+ case 6:
109
+ message.status = reader.int32();
110
+ break;
111
+ case 7:
112
+ message.underfundedSince = reader.int64();
113
+ break;
114
+ case 8:
115
+ message.unbondCompleteAt = reader.int64();
116
+ break;
117
+ case 9:
118
+ message.tier1SlashedInWindow = reader.string();
119
+ break;
120
+ case 10:
121
+ message.tier1WindowStart = reader.int64();
122
+ break;
123
+ case 11:
124
+ message.tier1WindowStartBond = reader.string();
125
+ break;
126
+ case 12:
127
+ message.registeredAt = reader.int64();
128
+ break;
129
+ case 13:
130
+ message.retiredAt = reader.int64();
131
+ break;
132
+ case 14:
133
+ message.totalLifetimeBondBlocks = reader.string();
134
+ break;
135
+ case 15:
136
+ message.lastBondBlockUpdateAt = reader.int64();
137
+ break;
138
+ default:
139
+ reader.skipType(tag & 7);
140
+ break;
141
+ }
142
+ }
143
+ return message;
144
+ },
145
+ fromPartial(object) {
146
+ const message = createBaseOperator();
147
+ message.address = object.address ?? "";
148
+ message.serviceType = object.serviceType ?? "";
149
+ message.controller = object.controller ?? "";
150
+ message.bondAmount = object.bondAmount ?? "";
151
+ message.metadata = object.metadata ?? new Uint8Array();
152
+ message.status = object.status ?? 0;
153
+ message.underfundedSince = object.underfundedSince !== undefined && object.underfundedSince !== null ? BigInt(object.underfundedSince.toString()) : BigInt(0);
154
+ message.unbondCompleteAt = object.unbondCompleteAt !== undefined && object.unbondCompleteAt !== null ? BigInt(object.unbondCompleteAt.toString()) : BigInt(0);
155
+ message.tier1SlashedInWindow = object.tier1SlashedInWindow ?? "";
156
+ message.tier1WindowStart = object.tier1WindowStart !== undefined && object.tier1WindowStart !== null ? BigInt(object.tier1WindowStart.toString()) : BigInt(0);
157
+ message.tier1WindowStartBond = object.tier1WindowStartBond ?? "";
158
+ message.registeredAt = object.registeredAt !== undefined && object.registeredAt !== null ? BigInt(object.registeredAt.toString()) : BigInt(0);
159
+ message.retiredAt = object.retiredAt !== undefined && object.retiredAt !== null ? BigInt(object.retiredAt.toString()) : BigInt(0);
160
+ message.totalLifetimeBondBlocks = object.totalLifetimeBondBlocks ?? "";
161
+ message.lastBondBlockUpdateAt = object.lastBondBlockUpdateAt !== undefined && object.lastBondBlockUpdateAt !== null ? BigInt(object.lastBondBlockUpdateAt.toString()) : BigInt(0);
162
+ return message;
163
+ },
164
+ fromAmino(object) {
165
+ const message = createBaseOperator();
166
+ if (object.address !== undefined && object.address !== null) {
167
+ message.address = object.address;
168
+ }
169
+ if (object.service_type !== undefined && object.service_type !== null) {
170
+ message.serviceType = object.service_type;
171
+ }
172
+ if (object.controller !== undefined && object.controller !== null) {
173
+ message.controller = object.controller;
174
+ }
175
+ if (object.bond_amount !== undefined && object.bond_amount !== null) {
176
+ message.bondAmount = object.bond_amount;
177
+ }
178
+ if (object.metadata !== undefined && object.metadata !== null) {
179
+ message.metadata = (0, helpers_1.bytesFromBase64)(object.metadata);
180
+ }
181
+ if (object.status !== undefined && object.status !== null) {
182
+ message.status = object.status;
183
+ }
184
+ if (object.underfunded_since !== undefined && object.underfunded_since !== null) {
185
+ message.underfundedSince = BigInt(object.underfunded_since);
186
+ }
187
+ if (object.unbond_complete_at !== undefined && object.unbond_complete_at !== null) {
188
+ message.unbondCompleteAt = BigInt(object.unbond_complete_at);
189
+ }
190
+ if (object.tier1_slashed_in_window !== undefined && object.tier1_slashed_in_window !== null) {
191
+ message.tier1SlashedInWindow = object.tier1_slashed_in_window;
192
+ }
193
+ if (object.tier1_window_start !== undefined && object.tier1_window_start !== null) {
194
+ message.tier1WindowStart = BigInt(object.tier1_window_start);
195
+ }
196
+ if (object.tier1_window_start_bond !== undefined && object.tier1_window_start_bond !== null) {
197
+ message.tier1WindowStartBond = object.tier1_window_start_bond;
198
+ }
199
+ if (object.registered_at !== undefined && object.registered_at !== null) {
200
+ message.registeredAt = BigInt(object.registered_at);
201
+ }
202
+ if (object.retired_at !== undefined && object.retired_at !== null) {
203
+ message.retiredAt = BigInt(object.retired_at);
204
+ }
205
+ if (object.total_lifetime_bond_blocks !== undefined && object.total_lifetime_bond_blocks !== null) {
206
+ message.totalLifetimeBondBlocks = object.total_lifetime_bond_blocks;
207
+ }
208
+ if (object.last_bond_block_update_at !== undefined && object.last_bond_block_update_at !== null) {
209
+ message.lastBondBlockUpdateAt = BigInt(object.last_bond_block_update_at);
210
+ }
211
+ return message;
212
+ },
213
+ toAmino(message) {
214
+ const obj = {};
215
+ obj.address = message.address === "" ? undefined : message.address;
216
+ obj.service_type = message.serviceType === "" ? undefined : message.serviceType;
217
+ obj.controller = message.controller === "" ? undefined : message.controller;
218
+ obj.bond_amount = message.bondAmount === "" ? undefined : message.bondAmount;
219
+ obj.metadata = message.metadata ? (0, helpers_1.base64FromBytes)(message.metadata) : undefined;
220
+ obj.status = message.status === 0 ? undefined : message.status;
221
+ obj.underfunded_since = message.underfundedSince !== BigInt(0) ? message.underfundedSince?.toString() : undefined;
222
+ obj.unbond_complete_at = message.unbondCompleteAt !== BigInt(0) ? message.unbondCompleteAt?.toString() : undefined;
223
+ obj.tier1_slashed_in_window = message.tier1SlashedInWindow === "" ? undefined : message.tier1SlashedInWindow;
224
+ obj.tier1_window_start = message.tier1WindowStart !== BigInt(0) ? message.tier1WindowStart?.toString() : undefined;
225
+ obj.tier1_window_start_bond = message.tier1WindowStartBond === "" ? undefined : message.tier1WindowStartBond;
226
+ obj.registered_at = message.registeredAt !== BigInt(0) ? message.registeredAt?.toString() : undefined;
227
+ obj.retired_at = message.retiredAt !== BigInt(0) ? message.retiredAt?.toString() : undefined;
228
+ obj.total_lifetime_bond_blocks = message.totalLifetimeBondBlocks === "" ? undefined : message.totalLifetimeBondBlocks;
229
+ obj.last_bond_block_update_at = message.lastBondBlockUpdateAt !== BigInt(0) ? message.lastBondBlockUpdateAt?.toString() : undefined;
230
+ return obj;
231
+ },
232
+ fromAminoMsg(object) {
233
+ return exports.Operator.fromAmino(object.value);
234
+ },
235
+ toAminoMsg(message) {
236
+ return {
237
+ type: "sparkdream/x/service/Operator",
238
+ value: exports.Operator.toAmino(message)
239
+ };
240
+ },
241
+ fromProtoMsg(message) {
242
+ return exports.Operator.decode(message.value);
243
+ },
244
+ toProto(message) {
245
+ return exports.Operator.encode(message).finish();
246
+ },
247
+ toProtoMsg(message) {
248
+ return {
249
+ typeUrl: "/sparkdream.service.v1.Operator",
250
+ value: exports.Operator.encode(message).finish()
251
+ };
252
+ }
253
+ };
@@ -0,0 +1,346 @@
1
+ import { BinaryReader, BinaryWriter } from "../../../binary";
2
+ import { DeepPartial } from "../../../helpers";
3
+ /**
4
+ * Params defines the module-wide parameters for x/service. See
5
+ * x-service-spec.md §4.2 for full semantics and validation rules. All
6
+ * fields are x/gov-mutable via MsgUpdateParams unless hardened later
7
+ * via the x/mint immutable-parameter pattern (§4.2 high-impact
8
+ * hardening candidates).
9
+ *
10
+ * Per-service-type overrides for `default_*` fields live on
11
+ * ServiceTypeConfig (§3.2). The values here are the defaults that
12
+ * apply when a service type's override is zero.
13
+ *
14
+ * Bond-denom-valued amounts are stored as bare math.Int values; the
15
+ * keeper wraps them into sdk.Coin at the point of use via the identity
16
+ * keeper's BondDenom(ctx).
17
+ * @name Params
18
+ * @package sparkdream.service.v1
19
+ * @see proto type: sparkdream.service.v1.Params
20
+ */
21
+ export interface Params {
22
+ /**
23
+ * default_unbonding_period_blocks is the default unbonding window
24
+ * (~14 days at default block time).
25
+ */
26
+ defaultUnbondingPeriodBlocks: bigint;
27
+ /**
28
+ * default_unilateral_slash_cap_bps is the default per-slash cap
29
+ * (500 = 5%).
30
+ */
31
+ defaultUnilateralSlashCapBps: number;
32
+ /**
33
+ * default_tier1_window_blocks is the default rolling-window length
34
+ * for aggregate tier-1 cap accounting (~90 days).
35
+ */
36
+ defaultTier1WindowBlocks: bigint;
37
+ /**
38
+ * default_tier1_aggregate_cap_bps is the default cumulative-slash
39
+ * cap within the window (1500 = 15%).
40
+ */
41
+ defaultTier1AggregateCapBps: number;
42
+ /**
43
+ * default_tier1_cooldown_blocks is the default minimum interval
44
+ * between tier-1 slashes against the same operator (~7 days).
45
+ */
46
+ defaultTier1CooldownBlocks: bigint;
47
+ /**
48
+ * default_underfunded_grace_blocks is the default time an
49
+ * UNDERFUNDED operator has to top up before being force-unbonded
50
+ * (~7 days).
51
+ */
52
+ defaultUnderfundedGraceBlocks: bigint;
53
+ /**
54
+ * report_contest_window_blocks is the window an operator has to
55
+ * contest a tier-1 slash (~24 hours). Also the tier-1 escrow
56
+ * release delay.
57
+ */
58
+ reportContestWindowBlocks: bigint;
59
+ /**
60
+ * max_pending_blocks is the auto-dismiss horizon for PENDING
61
+ * reports (~30 days).
62
+ */
63
+ maxPendingBlocks: bigint;
64
+ /**
65
+ * max_escalated_blocks is the auto-timeout horizon for ESCALATED
66
+ * reports awaiting jury verdict (~60 days). MUST be greater than
67
+ * max_pending_blocks.
68
+ */
69
+ maxEscalatedBlocks: bigint;
70
+ /**
71
+ * report_refile_cooldown_blocks is the per-controller cooldown for
72
+ * re-filing a previously-dismissed allegation (~30 days). MUST be
73
+ * ≥ max_pending_blocks.
74
+ */
75
+ reportRefileCooldownBlocks: bigint;
76
+ /**
77
+ * report_deposit_amount is the SPARK escrow required to file
78
+ * MsgReportOperator, in bond-denom micro-units (default 10 SPARK =
79
+ * 10_000_000). Wrapped into sdk.Coin with the chain's bond denom
80
+ * at the point of use.
81
+ */
82
+ reportDepositAmount: string;
83
+ /**
84
+ * min_reporter_trust_level gates who can file reports, as an enum
85
+ * name (e.g. "TRUST_LEVEL_ESTABLISHED"). Empty = no gate.
86
+ */
87
+ minReporterTrustLevel: string;
88
+ /**
89
+ * max_reports_per_reporter_per_operator_per_window is the
90
+ * sliding-window cap on filings by a single reporter against a
91
+ * single (operator, service_type) (default 3).
92
+ */
93
+ maxReportsPerReporterPerOperatorPerWindow: number;
94
+ /**
95
+ * reporter_rate_limit_window_blocks is the window over which the
96
+ * above cap applies (~30 days).
97
+ */
98
+ reporterRateLimitWindowBlocks: bigint;
99
+ /**
100
+ * endblocker_sweep_limit is the per-queue per-block cap on records
101
+ * processed by EndBlocker sweeps (default 100). Prevents unbounded
102
+ * per-block work.
103
+ */
104
+ endblockerSweepLimit: number;
105
+ /**
106
+ * max_metadata_bytes caps Operator.metadata size (default 4096;
107
+ * hard cap 65536).
108
+ */
109
+ maxMetadataBytes: number;
110
+ /**
111
+ * max_reason_bytes caps Report.reason and similar free-form text
112
+ * (default 512; hard cap 4096).
113
+ */
114
+ maxReasonBytes: number;
115
+ /**
116
+ * max_active_operators_per_address caps the number of live
117
+ * operator records a single address may hold across service types
118
+ * (default 16). Prevents reputation gaming via mass
119
+ * micro-registration (§6.6).
120
+ */
121
+ maxActiveOperatorsPerAddress: number;
122
+ /**
123
+ * reputation_grant_per_bond_block is the reputation accrued per
124
+ * SPARK-block of ACTIVE bond, applied at successful unbond claim
125
+ * and capped by the §6.6 anti-gaming rule.
126
+ */
127
+ reputationGrantPerBondBlock: string;
128
+ /**
129
+ * default_pagination_limit is the default page size when a client
130
+ * omits pagination.limit on a paginated query (default 100).
131
+ */
132
+ defaultPaginationLimit: number;
133
+ /**
134
+ * max_pagination_limit hard-caps pagination.limit to bound query
135
+ * gas (default 1000; absolute cap 10000).
136
+ */
137
+ maxPaginationLimit: number;
138
+ /**
139
+ * max_system_reports_per_caller_per_window caps how many distinct
140
+ * system reports a single allowlisted caller module (e.g.
141
+ * "federation") may open via OpenSystemReport within a rolling
142
+ * window of rate_limit_window_blocks. Idempotent re-calls (same
143
+ * dedupe_key) don't count against the cap. Default 50 — tunable
144
+ * from observed federation challenge volume post-launch.
145
+ */
146
+ maxSystemReportsPerCallerPerWindow: number;
147
+ /**
148
+ * rate_limit_window_blocks is the rolling window over which the
149
+ * above per-caller cap applies (~1 day at default block time).
150
+ * x/service has no native epoch concept, so this is an explicit
151
+ * block-count param rather than reusing season/shield epochs.
152
+ */
153
+ rateLimitWindowBlocks: bigint;
154
+ }
155
+ export interface ParamsProtoMsg {
156
+ typeUrl: "/sparkdream.service.v1.Params";
157
+ value: Uint8Array;
158
+ }
159
+ /**
160
+ * Params defines the module-wide parameters for x/service. See
161
+ * x-service-spec.md §4.2 for full semantics and validation rules. All
162
+ * fields are x/gov-mutable via MsgUpdateParams unless hardened later
163
+ * via the x/mint immutable-parameter pattern (§4.2 high-impact
164
+ * hardening candidates).
165
+ *
166
+ * Per-service-type overrides for `default_*` fields live on
167
+ * ServiceTypeConfig (§3.2). The values here are the defaults that
168
+ * apply when a service type's override is zero.
169
+ *
170
+ * Bond-denom-valued amounts are stored as bare math.Int values; the
171
+ * keeper wraps them into sdk.Coin at the point of use via the identity
172
+ * keeper's BondDenom(ctx).
173
+ * @name ParamsAmino
174
+ * @package sparkdream.service.v1
175
+ * @see proto type: sparkdream.service.v1.Params
176
+ */
177
+ export interface ParamsAmino {
178
+ /**
179
+ * default_unbonding_period_blocks is the default unbonding window
180
+ * (~14 days at default block time).
181
+ */
182
+ default_unbonding_period_blocks?: string;
183
+ /**
184
+ * default_unilateral_slash_cap_bps is the default per-slash cap
185
+ * (500 = 5%).
186
+ */
187
+ default_unilateral_slash_cap_bps?: number;
188
+ /**
189
+ * default_tier1_window_blocks is the default rolling-window length
190
+ * for aggregate tier-1 cap accounting (~90 days).
191
+ */
192
+ default_tier1_window_blocks?: string;
193
+ /**
194
+ * default_tier1_aggregate_cap_bps is the default cumulative-slash
195
+ * cap within the window (1500 = 15%).
196
+ */
197
+ default_tier1_aggregate_cap_bps?: number;
198
+ /**
199
+ * default_tier1_cooldown_blocks is the default minimum interval
200
+ * between tier-1 slashes against the same operator (~7 days).
201
+ */
202
+ default_tier1_cooldown_blocks?: string;
203
+ /**
204
+ * default_underfunded_grace_blocks is the default time an
205
+ * UNDERFUNDED operator has to top up before being force-unbonded
206
+ * (~7 days).
207
+ */
208
+ default_underfunded_grace_blocks?: string;
209
+ /**
210
+ * report_contest_window_blocks is the window an operator has to
211
+ * contest a tier-1 slash (~24 hours). Also the tier-1 escrow
212
+ * release delay.
213
+ */
214
+ report_contest_window_blocks?: string;
215
+ /**
216
+ * max_pending_blocks is the auto-dismiss horizon for PENDING
217
+ * reports (~30 days).
218
+ */
219
+ max_pending_blocks?: string;
220
+ /**
221
+ * max_escalated_blocks is the auto-timeout horizon for ESCALATED
222
+ * reports awaiting jury verdict (~60 days). MUST be greater than
223
+ * max_pending_blocks.
224
+ */
225
+ max_escalated_blocks?: string;
226
+ /**
227
+ * report_refile_cooldown_blocks is the per-controller cooldown for
228
+ * re-filing a previously-dismissed allegation (~30 days). MUST be
229
+ * ≥ max_pending_blocks.
230
+ */
231
+ report_refile_cooldown_blocks?: string;
232
+ /**
233
+ * report_deposit_amount is the SPARK escrow required to file
234
+ * MsgReportOperator, in bond-denom micro-units (default 10 SPARK =
235
+ * 10_000_000). Wrapped into sdk.Coin with the chain's bond denom
236
+ * at the point of use.
237
+ */
238
+ report_deposit_amount?: string;
239
+ /**
240
+ * min_reporter_trust_level gates who can file reports, as an enum
241
+ * name (e.g. "TRUST_LEVEL_ESTABLISHED"). Empty = no gate.
242
+ */
243
+ min_reporter_trust_level?: string;
244
+ /**
245
+ * max_reports_per_reporter_per_operator_per_window is the
246
+ * sliding-window cap on filings by a single reporter against a
247
+ * single (operator, service_type) (default 3).
248
+ */
249
+ max_reports_per_reporter_per_operator_per_window?: number;
250
+ /**
251
+ * reporter_rate_limit_window_blocks is the window over which the
252
+ * above cap applies (~30 days).
253
+ */
254
+ reporter_rate_limit_window_blocks?: string;
255
+ /**
256
+ * endblocker_sweep_limit is the per-queue per-block cap on records
257
+ * processed by EndBlocker sweeps (default 100). Prevents unbounded
258
+ * per-block work.
259
+ */
260
+ endblocker_sweep_limit?: number;
261
+ /**
262
+ * max_metadata_bytes caps Operator.metadata size (default 4096;
263
+ * hard cap 65536).
264
+ */
265
+ max_metadata_bytes?: number;
266
+ /**
267
+ * max_reason_bytes caps Report.reason and similar free-form text
268
+ * (default 512; hard cap 4096).
269
+ */
270
+ max_reason_bytes?: number;
271
+ /**
272
+ * max_active_operators_per_address caps the number of live
273
+ * operator records a single address may hold across service types
274
+ * (default 16). Prevents reputation gaming via mass
275
+ * micro-registration (§6.6).
276
+ */
277
+ max_active_operators_per_address?: number;
278
+ /**
279
+ * reputation_grant_per_bond_block is the reputation accrued per
280
+ * SPARK-block of ACTIVE bond, applied at successful unbond claim
281
+ * and capped by the §6.6 anti-gaming rule.
282
+ */
283
+ reputation_grant_per_bond_block?: string;
284
+ /**
285
+ * default_pagination_limit is the default page size when a client
286
+ * omits pagination.limit on a paginated query (default 100).
287
+ */
288
+ default_pagination_limit?: number;
289
+ /**
290
+ * max_pagination_limit hard-caps pagination.limit to bound query
291
+ * gas (default 1000; absolute cap 10000).
292
+ */
293
+ max_pagination_limit?: number;
294
+ /**
295
+ * max_system_reports_per_caller_per_window caps how many distinct
296
+ * system reports a single allowlisted caller module (e.g.
297
+ * "federation") may open via OpenSystemReport within a rolling
298
+ * window of rate_limit_window_blocks. Idempotent re-calls (same
299
+ * dedupe_key) don't count against the cap. Default 50 — tunable
300
+ * from observed federation challenge volume post-launch.
301
+ */
302
+ max_system_reports_per_caller_per_window?: number;
303
+ /**
304
+ * rate_limit_window_blocks is the rolling window over which the
305
+ * above per-caller cap applies (~1 day at default block time).
306
+ * x/service has no native epoch concept, so this is an explicit
307
+ * block-count param rather than reusing season/shield epochs.
308
+ */
309
+ rate_limit_window_blocks?: string;
310
+ }
311
+ export interface ParamsAminoMsg {
312
+ type: "sparkdream/x/service/Params";
313
+ value: ParamsAmino;
314
+ }
315
+ /**
316
+ * Params defines the module-wide parameters for x/service. See
317
+ * x-service-spec.md §4.2 for full semantics and validation rules. All
318
+ * fields are x/gov-mutable via MsgUpdateParams unless hardened later
319
+ * via the x/mint immutable-parameter pattern (§4.2 high-impact
320
+ * hardening candidates).
321
+ *
322
+ * Per-service-type overrides for `default_*` fields live on
323
+ * ServiceTypeConfig (§3.2). The values here are the defaults that
324
+ * apply when a service type's override is zero.
325
+ *
326
+ * Bond-denom-valued amounts are stored as bare math.Int values; the
327
+ * keeper wraps them into sdk.Coin at the point of use via the identity
328
+ * keeper's BondDenom(ctx).
329
+ * @name Params
330
+ * @package sparkdream.service.v1
331
+ * @see proto type: sparkdream.service.v1.Params
332
+ */
333
+ export declare const Params: {
334
+ typeUrl: string;
335
+ aminoType: string;
336
+ encode(message: Params, writer?: BinaryWriter): BinaryWriter;
337
+ decode(input: BinaryReader | Uint8Array, length?: number): Params;
338
+ fromPartial(object: DeepPartial<Params>): Params;
339
+ fromAmino(object: ParamsAmino): Params;
340
+ toAmino(message: Params): ParamsAmino;
341
+ fromAminoMsg(object: ParamsAminoMsg): Params;
342
+ toAminoMsg(message: Params): ParamsAminoMsg;
343
+ fromProtoMsg(message: ParamsProtoMsg): Params;
344
+ toProto(message: Params): Uint8Array;
345
+ toProtoMsg(message: Params): ParamsProtoMsg;
346
+ };