@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.
- package/cosmos/bundle.d.ts +160 -160
- package/cosmos/bundle.js +182 -182
- package/esm/cosmos/bundle.js +182 -182
- package/esm/ibc/bundle.js +106 -106
- package/esm/sparkdream/blog/v1/params.js +51 -50
- package/esm/sparkdream/bundle.js +448 -346
- package/esm/sparkdream/client.js +7 -1
- package/esm/sparkdream/collect/v1/params.js +13 -1
- package/esm/sparkdream/collect/v1/types.js +13 -1
- package/esm/sparkdream/commons/v1/genesis.js +29 -1
- package/esm/sparkdream/commons/v1/query.js +317 -0
- package/esm/sparkdream/commons/v1/query.lcd.js +23 -0
- package/esm/sparkdream/commons/v1/query.rpc.Query.js +20 -1
- package/esm/sparkdream/commons/v1/recurring_spend.js +296 -0
- package/esm/sparkdream/commons/v1/tx.js +693 -0
- package/esm/sparkdream/commons/v1/tx.registry.js +74 -2
- package/esm/sparkdream/commons/v1/tx.rpc.msg.js +33 -1
- package/esm/sparkdream/federation/v1/genesis.js +10 -10
- package/esm/sparkdream/federation/v1/params.js +29 -54
- package/esm/sparkdream/federation/v1/query.js +216 -71
- package/esm/sparkdream/federation/v1/query.lcd.js +11 -6
- package/esm/sparkdream/federation/v1/query.rpc.Query.js +24 -15
- package/esm/sparkdream/federation/v1/tx.amino.js +21 -21
- package/esm/sparkdream/federation/v1/tx.js +1146 -1105
- package/esm/sparkdream/federation/v1/tx.registry.js +74 -74
- package/esm/sparkdream/federation/v1/tx.rpc.msg.js +32 -26
- package/esm/sparkdream/federation/v1/types.js +355 -99
- package/esm/sparkdream/federation/v1/verifier_activity.js +13 -1
- package/esm/sparkdream/forum/v1/params.js +173 -148
- package/esm/sparkdream/guardian/module/v1/module.js +68 -0
- package/esm/sparkdream/guardian/v1/query.js +128 -0
- package/esm/sparkdream/guardian/v1/query.lcd.js +13 -0
- package/esm/sparkdream/guardian/v1/query.rpc.Query.js +26 -0
- package/esm/sparkdream/guardian/v1/tx.amino.js +9 -0
- package/esm/sparkdream/guardian/v1/tx.js +175 -0
- package/esm/sparkdream/guardian/v1/tx.registry.js +33 -0
- package/esm/sparkdream/guardian/v1/tx.rpc.msg.js +24 -0
- package/esm/sparkdream/identity/module/v1/module.js +71 -0
- package/esm/sparkdream/identity/v1/chain_identity.js +199 -0
- package/esm/sparkdream/identity/v1/genesis.js +84 -0
- package/esm/sparkdream/identity/v1/query.js +372 -0
- package/esm/sparkdream/identity/v1/query.lcd.js +21 -0
- package/esm/sparkdream/identity/v1/query.rpc.Query.js +42 -0
- package/esm/sparkdream/lcd.js +15 -0
- package/esm/sparkdream/name/v1/params.js +19 -18
- package/esm/sparkdream/rep/v1/bonded_role.js +48 -2
- package/esm/sparkdream/rep/v1/tag.js +6 -13
- package/esm/sparkdream/rpc.query.js +9 -0
- package/esm/sparkdream/rpc.tx.js +6 -0
- package/esm/sparkdream/service/module/v1/module.js +71 -0
- package/esm/sparkdream/service/v1/controller_transfer_case.js +155 -0
- package/esm/sparkdream/service/v1/genesis.js +240 -0
- package/esm/sparkdream/service/v1/operator.js +250 -0
- package/esm/sparkdream/service/v1/params.js +355 -0
- package/esm/sparkdream/service/v1/query.js +1582 -0
- package/esm/sparkdream/service/v1/query.lcd.js +107 -0
- package/esm/sparkdream/service/v1/query.rpc.Query.js +109 -0
- package/esm/sparkdream/service/v1/refile_cooldown.js +121 -0
- package/esm/sparkdream/service/v1/report.js +212 -0
- package/esm/sparkdream/service/v1/reporter_rate_limit.js +137 -0
- package/esm/sparkdream/service/v1/service_type_config.js +264 -0
- package/esm/sparkdream/service/v1/system_report_rate_limit.js +115 -0
- package/esm/sparkdream/service/v1/tier1_escrow_entry.js +145 -0
- package/esm/sparkdream/service/v1/tier1_last_slash.js +121 -0
- package/esm/sparkdream/service/v1/tx.amino.js +69 -0
- package/esm/sparkdream/service/v1/tx.js +2124 -0
- package/esm/sparkdream/service/v1/tx.registry.js +249 -0
- package/esm/sparkdream/service/v1/tx.rpc.msg.js +100 -0
- package/esm/sparkdream/service/v1/types.js +353 -0
- package/esm/sparkdream/session/v1/genesis.js +136 -10
- package/esm/sparkdream/session/v1/grant.js +1020 -0
- package/esm/sparkdream/session/v1/params.js +543 -19
- package/esm/sparkdream/session/v1/query.js +487 -0
- package/esm/sparkdream/session/v1/query.lcd.js +41 -3
- package/esm/sparkdream/session/v1/query.rpc.Query.js +36 -4
- package/esm/sparkdream/session/v1/session.js +6 -0
- package/esm/sparkdream/session/v1/tx.js +1066 -0
- package/esm/sparkdream/session/v1/tx.registry.js +110 -2
- package/esm/sparkdream/session/v1/tx.rpc.msg.js +65 -3
- package/esm/tendermint/bundle.js +20 -20
- package/ibc/bundle.d.ts +90 -90
- package/ibc/bundle.js +106 -106
- package/package.json +1 -1
- package/sparkdream/blog/v1/params.d.ts +37 -28
- package/sparkdream/blog/v1/params.js +51 -50
- package/sparkdream/blog/v1/post.d.ts +2 -2
- package/sparkdream/blog/v1/tx.d.ts +4 -4
- package/sparkdream/bundle.d.ts +14912 -12896
- package/sparkdream/bundle.js +448 -346
- package/sparkdream/client.d.ts +90 -20
- package/sparkdream/client.js +7 -1
- package/sparkdream/collect/v1/params.d.ts +16 -0
- package/sparkdream/collect/v1/params.js +13 -1
- package/sparkdream/collect/v1/types.d.ts +2 -0
- package/sparkdream/collect/v1/types.js +13 -1
- package/sparkdream/commons/v1/genesis.d.ts +17 -0
- package/sparkdream/commons/v1/genesis.js +29 -1
- package/sparkdream/commons/v1/query.d.ts +186 -0
- package/sparkdream/commons/v1/query.js +318 -1
- package/sparkdream/commons/v1/query.lcd.d.ts +3 -1
- package/sparkdream/commons/v1/query.lcd.js +23 -0
- package/sparkdream/commons/v1/query.rpc.Query.d.ts +12 -1
- package/sparkdream/commons/v1/query.rpc.Query.js +19 -0
- package/sparkdream/commons/v1/recurring_spend.d.ts +234 -0
- package/sparkdream/commons/v1/recurring_spend.js +301 -0
- package/sparkdream/commons/v1/tx.d.ts +472 -0
- package/sparkdream/commons/v1/tx.js +694 -1
- package/sparkdream/commons/v1/tx.registry.d.ts +49 -1
- package/sparkdream/commons/v1/tx.registry.js +73 -1
- package/sparkdream/commons/v1/tx.rpc.msg.d.ts +29 -1
- package/sparkdream/commons/v1/tx.rpc.msg.js +32 -0
- package/sparkdream/federation/v1/genesis.d.ts +3 -3
- package/sparkdream/federation/v1/genesis.js +9 -9
- package/sparkdream/federation/v1/params.d.ts +64 -13
- package/sparkdream/federation/v1/params.js +29 -54
- package/sparkdream/federation/v1/query.d.ts +209 -100
- package/sparkdream/federation/v1/query.js +216 -71
- package/sparkdream/federation/v1/query.lcd.d.ts +4 -3
- package/sparkdream/federation/v1/query.lcd.js +11 -6
- package/sparkdream/federation/v1/query.rpc.Query.d.ts +10 -7
- package/sparkdream/federation/v1/query.rpc.Query.js +24 -15
- package/sparkdream/federation/v1/tx.amino.d.ts +21 -21
- package/sparkdream/federation/v1/tx.amino.js +20 -20
- package/sparkdream/federation/v1/tx.d.ts +479 -352
- package/sparkdream/federation/v1/tx.js +1147 -1106
- package/sparkdream/federation/v1/tx.registry.d.ts +49 -49
- package/sparkdream/federation/v1/tx.registry.js +73 -73
- package/sparkdream/federation/v1/tx.rpc.msg.d.ts +18 -9
- package/sparkdream/federation/v1/tx.rpc.msg.js +31 -25
- package/sparkdream/federation/v1/types.d.ts +307 -41
- package/sparkdream/federation/v1/types.js +360 -100
- package/sparkdream/federation/v1/verifier_activity.d.ts +18 -0
- package/sparkdream/federation/v1/verifier_activity.js +13 -1
- package/sparkdream/forum/v1/params.d.ts +99 -62
- package/sparkdream/forum/v1/params.js +173 -148
- package/sparkdream/guardian/module/v1/module.d.ts +74 -0
- package/sparkdream/guardian/module/v1/module.js +71 -0
- package/sparkdream/guardian/v1/query.d.ts +88 -0
- package/sparkdream/guardian/v1/query.js +131 -0
- package/sparkdream/guardian/v1/query.lcd.d.ts +9 -0
- package/sparkdream/guardian/v1/query.lcd.js +17 -0
- package/sparkdream/guardian/v1/query.rpc.Query.d.ts +20 -0
- package/sparkdream/guardian/v1/query.rpc.Query.js +31 -0
- package/sparkdream/guardian/v1/tx.amino.d.ts +8 -0
- package/sparkdream/guardian/v1/tx.amino.js +12 -0
- package/sparkdream/guardian/v1/tx.d.ts +138 -0
- package/sparkdream/guardian/v1/tx.js +181 -0
- package/sparkdream/guardian/v1/tx.registry.d.ts +25 -0
- package/sparkdream/guardian/v1/tx.registry.js +37 -0
- package/sparkdream/guardian/v1/tx.rpc.msg.d.ts +22 -0
- package/sparkdream/guardian/v1/tx.rpc.msg.js +29 -0
- package/sparkdream/identity/module/v1/module.d.ts +54 -0
- package/sparkdream/identity/module/v1/module.js +74 -0
- package/sparkdream/identity/v1/chain_identity.d.ts +131 -0
- package/sparkdream/identity/v1/chain_identity.js +202 -0
- package/sparkdream/identity/v1/genesis.d.ts +65 -0
- package/sparkdream/identity/v1/genesis.js +87 -0
- package/sparkdream/identity/v1/query.d.ts +243 -0
- package/sparkdream/identity/v1/query.js +375 -0
- package/sparkdream/identity/v1/query.lcd.d.ts +11 -0
- package/sparkdream/identity/v1/query.lcd.js +25 -0
- package/sparkdream/identity/v1/query.rpc.Query.d.ts +26 -0
- package/sparkdream/identity/v1/query.rpc.Query.js +47 -0
- package/sparkdream/lcd.d.ts +9 -0
- package/sparkdream/lcd.js +15 -0
- package/sparkdream/name/v1/params.d.ts +25 -8
- package/sparkdream/name/v1/params.js +19 -18
- package/sparkdream/rep/v1/bonded_role.d.ts +51 -0
- package/sparkdream/rep/v1/bonded_role.js +48 -2
- package/sparkdream/rep/v1/tag.d.ts +15 -2
- package/sparkdream/rep/v1/tag.js +6 -13
- package/sparkdream/rpc.query.d.ts +34 -2
- package/sparkdream/rpc.query.js +9 -0
- package/sparkdream/rpc.tx.d.ts +6 -0
- package/sparkdream/rpc.tx.js +6 -0
- package/sparkdream/service/module/v1/module.d.ts +54 -0
- package/sparkdream/service/module/v1/module.js +74 -0
- package/sparkdream/service/v1/controller_transfer_case.d.ts +125 -0
- package/sparkdream/service/v1/controller_transfer_case.js +158 -0
- package/sparkdream/service/v1/genesis.d.ts +172 -0
- package/sparkdream/service/v1/genesis.js +243 -0
- package/sparkdream/service/v1/operator.d.ts +215 -0
- package/sparkdream/service/v1/operator.js +253 -0
- package/sparkdream/service/v1/params.d.ts +346 -0
- package/sparkdream/service/v1/params.js +358 -0
- package/sparkdream/service/v1/query.d.ts +964 -0
- package/sparkdream/service/v1/query.js +1585 -0
- package/sparkdream/service/v1/query.lcd.d.ts +18 -0
- package/sparkdream/service/v1/query.lcd.js +111 -0
- package/sparkdream/service/v1/query.rpc.Query.d.ts +63 -0
- package/sparkdream/service/v1/query.rpc.Query.js +114 -0
- package/sparkdream/service/v1/refile_cooldown.d.ts +105 -0
- package/sparkdream/service/v1/refile_cooldown.js +124 -0
- package/sparkdream/service/v1/report.d.ts +174 -0
- package/sparkdream/service/v1/report.js +215 -0
- package/sparkdream/service/v1/reporter_rate_limit.d.ts +112 -0
- package/sparkdream/service/v1/reporter_rate_limit.js +140 -0
- package/sparkdream/service/v1/service_type_config.d.ts +222 -0
- package/sparkdream/service/v1/service_type_config.js +269 -0
- package/sparkdream/service/v1/system_report_rate_limit.d.ts +106 -0
- package/sparkdream/service/v1/system_report_rate_limit.js +118 -0
- package/sparkdream/service/v1/tier1_escrow_entry.d.ts +125 -0
- package/sparkdream/service/v1/tier1_escrow_entry.js +148 -0
- package/sparkdream/service/v1/tier1_last_slash.d.ts +101 -0
- package/sparkdream/service/v1/tier1_last_slash.js +124 -0
- package/sparkdream/service/v1/tx.amino.d.ts +68 -0
- package/sparkdream/service/v1/tx.amino.js +72 -0
- package/sparkdream/service/v1/tx.d.ts +1264 -0
- package/sparkdream/service/v1/tx.js +2127 -0
- package/sparkdream/service/v1/tx.registry.d.ts +169 -0
- package/sparkdream/service/v1/tx.registry.js +253 -0
- package/sparkdream/service/v1/tx.rpc.msg.d.ts +80 -0
- package/sparkdream/service/v1/tx.rpc.msg.js +105 -0
- package/sparkdream/service/v1/types.d.ts +94 -0
- package/sparkdream/service/v1/types.js +370 -0
- package/sparkdream/session/v1/genesis.d.ts +93 -9
- package/sparkdream/session/v1/genesis.js +137 -11
- package/sparkdream/session/v1/grant.d.ts +517 -0
- package/sparkdream/session/v1/grant.js +1027 -0
- package/sparkdream/session/v1/params.d.ts +338 -7
- package/sparkdream/session/v1/params.js +543 -19
- package/sparkdream/session/v1/query.d.ts +265 -0
- package/sparkdream/session/v1/query.js +488 -1
- package/sparkdream/session/v1/query.lcd.d.ts +4 -1
- package/sparkdream/session/v1/query.lcd.js +41 -3
- package/sparkdream/session/v1/query.rpc.Query.d.ts +27 -4
- package/sparkdream/session/v1/query.rpc.Query.js +35 -3
- package/sparkdream/session/v1/session.d.ts +18 -0
- package/sparkdream/session/v1/session.js +6 -0
- package/sparkdream/session/v1/tx.d.ts +660 -0
- package/sparkdream/session/v1/tx.js +1067 -1
- package/sparkdream/session/v1/tx.registry.d.ts +73 -1
- package/sparkdream/session/v1/tx.registry.js +109 -1
- package/sparkdream/session/v1/tx.rpc.msg.d.ts +63 -3
- package/sparkdream/session/v1/tx.rpc.msg.js +64 -2
- package/tendermint/bundle.d.ts +844 -844
- 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
|
+
};
|