@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,222 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "../../../binary";
|
|
2
|
+
import { DeepPartial } from "../../../helpers";
|
|
3
|
+
/**
|
|
4
|
+
* ReportTimeoutAction controls what the EndBlocker does when a PENDING
|
|
5
|
+
* report ages past max_pending_blocks without a controller verdict.
|
|
6
|
+
* Per-service-type knob so consumer modules can pick the failure-mode
|
|
7
|
+
* best suited to their accountability model (see Phase 0 of the
|
|
8
|
+
* federation→service migration plan).
|
|
9
|
+
*/
|
|
10
|
+
export declare enum ReportTimeoutAction {
|
|
11
|
+
/**
|
|
12
|
+
* REPORT_TIMEOUT_ACTION_DISMISS - REPORT_TIMEOUT_ACTION_DISMISS is the default: aged reports auto-
|
|
13
|
+
* dismiss, deposit refunded to reporter, controller barred from
|
|
14
|
+
* re-filing the same allegation for report_refile_cooldown_blocks.
|
|
15
|
+
* Suits service types where "no decision" should default to the
|
|
16
|
+
* operator's benefit.
|
|
17
|
+
*/
|
|
18
|
+
REPORT_TIMEOUT_ACTION_DISMISS = 0,
|
|
19
|
+
/**
|
|
20
|
+
* REPORT_TIMEOUT_ACTION_ESCALATE - REPORT_TIMEOUT_ACTION_ESCALATE auto-opens an x/rep jury case via
|
|
21
|
+
* CreateAppealInitiative when the controller stalls. Suits service
|
|
22
|
+
* types where a silent/captured controller must not be able to park
|
|
23
|
+
* a slash indefinitely (e.g. federation bridges).
|
|
24
|
+
*/
|
|
25
|
+
REPORT_TIMEOUT_ACTION_ESCALATE = 1,
|
|
26
|
+
UNRECOGNIZED = -1
|
|
27
|
+
}
|
|
28
|
+
export declare const ReportTimeoutActionAmino: typeof ReportTimeoutAction;
|
|
29
|
+
export declare function reportTimeoutActionFromJSON(object: any): ReportTimeoutAction;
|
|
30
|
+
export declare function reportTimeoutActionToJSON(object: ReportTimeoutAction): string;
|
|
31
|
+
/**
|
|
32
|
+
* ServiceTypeConfig is the governance-managed allowlist entry that defines
|
|
33
|
+
* a permitted service type and its per-type knobs (see x-service-spec.md
|
|
34
|
+
* §3.2). Mutated only via MsgUpdateServiceTypeConfig (gov authority).
|
|
35
|
+
* @name ServiceTypeConfig
|
|
36
|
+
* @package sparkdream.service.v1
|
|
37
|
+
* @see proto type: sparkdream.service.v1.ServiceTypeConfig
|
|
38
|
+
*/
|
|
39
|
+
export interface ServiceTypeConfig {
|
|
40
|
+
/**
|
|
41
|
+
* service_type is the string key matching ^[a-z0-9-]{1,64}$. Immutable
|
|
42
|
+
* once created.
|
|
43
|
+
*/
|
|
44
|
+
serviceType: string;
|
|
45
|
+
/**
|
|
46
|
+
* description is human-readable purpose; <= 512 chars.
|
|
47
|
+
*/
|
|
48
|
+
description: string;
|
|
49
|
+
/**
|
|
50
|
+
* min_bond_amount is the minimum SPARK required to register or remain
|
|
51
|
+
* ACTIVE under this service type, in bond-denom micro-units. Wrapped
|
|
52
|
+
* into sdk.Coin with the chain's bond denom at the point of use.
|
|
53
|
+
*/
|
|
54
|
+
minBondAmount: string;
|
|
55
|
+
/**
|
|
56
|
+
* unbonding_period_blocks overrides the default unbonding window for
|
|
57
|
+
* this type. ~14 days at default block time.
|
|
58
|
+
*/
|
|
59
|
+
unbondingPeriodBlocks: bigint;
|
|
60
|
+
/**
|
|
61
|
+
* unilateral_slash_cap_bps is the per-slash cap (default 500 = 5%).
|
|
62
|
+
* basis points, in (0, 10000].
|
|
63
|
+
*/
|
|
64
|
+
unilateralSlashCapBps: number;
|
|
65
|
+
/**
|
|
66
|
+
* tier1_window_blocks is the rolling window for the aggregate tier-1
|
|
67
|
+
* cap (default ~90 days).
|
|
68
|
+
*/
|
|
69
|
+
tier1WindowBlocks: bigint;
|
|
70
|
+
/**
|
|
71
|
+
* tier1_aggregate_cap_bps is the cumulative-slash cap within the
|
|
72
|
+
* window (default 1500 = 15%). MUST be ≥ unilateral_slash_cap_bps.
|
|
73
|
+
*/
|
|
74
|
+
tier1AggregateCapBps: number;
|
|
75
|
+
/**
|
|
76
|
+
* tier1_cooldown_blocks is the minimum interval between tier-1 slashes
|
|
77
|
+
* against the same operator (default ~7 days). MUST be > 0.
|
|
78
|
+
*/
|
|
79
|
+
tier1CooldownBlocks: bigint;
|
|
80
|
+
/**
|
|
81
|
+
* underfunded_grace_blocks is the time an UNDERFUNDED operator has to
|
|
82
|
+
* top up before being force-unbonded by the EndBlocker (default ~7
|
|
83
|
+
* days).
|
|
84
|
+
*/
|
|
85
|
+
underfundedGraceBlocks: bigint;
|
|
86
|
+
/**
|
|
87
|
+
* enabled gates new registrations. Disabling does not affect existing
|
|
88
|
+
* operators (§3.2 disabled-type semantics).
|
|
89
|
+
*/
|
|
90
|
+
enabled: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* report_timeout_action controls what the EndBlocker does when a
|
|
93
|
+
* PENDING report against an operator of this service type ages past
|
|
94
|
+
* max_pending_blocks. Default DISMISS preserves prior behavior;
|
|
95
|
+
* ESCALATE auto-opens a jury case via CreateAppealInitiative so a
|
|
96
|
+
* silent controller can't park a slash forever. Per-type knob so
|
|
97
|
+
* each consumer chooses the right failure-mode.
|
|
98
|
+
*/
|
|
99
|
+
reportTimeoutAction: ReportTimeoutAction;
|
|
100
|
+
/**
|
|
101
|
+
* challenge_default_slash_bps is the *proposed* slash amount when a
|
|
102
|
+
* system report is filed via OpenSystemReport without an explicit
|
|
103
|
+
* override (e.g. federation files a report on challenge-quorum
|
|
104
|
+
* resolution). MUST be ≤ unilateral_slash_cap_bps. Cross-field
|
|
105
|
+
* validation is enforced in both directions at MsgUpdateServiceType-
|
|
106
|
+
* Config time. The controller can still adjust the actual slash up
|
|
107
|
+
* or down within unilateral_slash_cap_bps at MsgResolveReport time;
|
|
108
|
+
* this field is just the starting proposal.
|
|
109
|
+
*/
|
|
110
|
+
challengeDefaultSlashBps: number;
|
|
111
|
+
}
|
|
112
|
+
export interface ServiceTypeConfigProtoMsg {
|
|
113
|
+
typeUrl: "/sparkdream.service.v1.ServiceTypeConfig";
|
|
114
|
+
value: Uint8Array;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* ServiceTypeConfig is the governance-managed allowlist entry that defines
|
|
118
|
+
* a permitted service type and its per-type knobs (see x-service-spec.md
|
|
119
|
+
* §3.2). Mutated only via MsgUpdateServiceTypeConfig (gov authority).
|
|
120
|
+
* @name ServiceTypeConfigAmino
|
|
121
|
+
* @package sparkdream.service.v1
|
|
122
|
+
* @see proto type: sparkdream.service.v1.ServiceTypeConfig
|
|
123
|
+
*/
|
|
124
|
+
export interface ServiceTypeConfigAmino {
|
|
125
|
+
/**
|
|
126
|
+
* service_type is the string key matching ^[a-z0-9-]{1,64}$. Immutable
|
|
127
|
+
* once created.
|
|
128
|
+
*/
|
|
129
|
+
service_type?: string;
|
|
130
|
+
/**
|
|
131
|
+
* description is human-readable purpose; <= 512 chars.
|
|
132
|
+
*/
|
|
133
|
+
description?: string;
|
|
134
|
+
/**
|
|
135
|
+
* min_bond_amount is the minimum SPARK required to register or remain
|
|
136
|
+
* ACTIVE under this service type, in bond-denom micro-units. Wrapped
|
|
137
|
+
* into sdk.Coin with the chain's bond denom at the point of use.
|
|
138
|
+
*/
|
|
139
|
+
min_bond_amount?: string;
|
|
140
|
+
/**
|
|
141
|
+
* unbonding_period_blocks overrides the default unbonding window for
|
|
142
|
+
* this type. ~14 days at default block time.
|
|
143
|
+
*/
|
|
144
|
+
unbonding_period_blocks?: string;
|
|
145
|
+
/**
|
|
146
|
+
* unilateral_slash_cap_bps is the per-slash cap (default 500 = 5%).
|
|
147
|
+
* basis points, in (0, 10000].
|
|
148
|
+
*/
|
|
149
|
+
unilateral_slash_cap_bps?: number;
|
|
150
|
+
/**
|
|
151
|
+
* tier1_window_blocks is the rolling window for the aggregate tier-1
|
|
152
|
+
* cap (default ~90 days).
|
|
153
|
+
*/
|
|
154
|
+
tier1_window_blocks?: string;
|
|
155
|
+
/**
|
|
156
|
+
* tier1_aggregate_cap_bps is the cumulative-slash cap within the
|
|
157
|
+
* window (default 1500 = 15%). MUST be ≥ unilateral_slash_cap_bps.
|
|
158
|
+
*/
|
|
159
|
+
tier1_aggregate_cap_bps?: number;
|
|
160
|
+
/**
|
|
161
|
+
* tier1_cooldown_blocks is the minimum interval between tier-1 slashes
|
|
162
|
+
* against the same operator (default ~7 days). MUST be > 0.
|
|
163
|
+
*/
|
|
164
|
+
tier1_cooldown_blocks?: string;
|
|
165
|
+
/**
|
|
166
|
+
* underfunded_grace_blocks is the time an UNDERFUNDED operator has to
|
|
167
|
+
* top up before being force-unbonded by the EndBlocker (default ~7
|
|
168
|
+
* days).
|
|
169
|
+
*/
|
|
170
|
+
underfunded_grace_blocks?: string;
|
|
171
|
+
/**
|
|
172
|
+
* enabled gates new registrations. Disabling does not affect existing
|
|
173
|
+
* operators (§3.2 disabled-type semantics).
|
|
174
|
+
*/
|
|
175
|
+
enabled?: boolean;
|
|
176
|
+
/**
|
|
177
|
+
* report_timeout_action controls what the EndBlocker does when a
|
|
178
|
+
* PENDING report against an operator of this service type ages past
|
|
179
|
+
* max_pending_blocks. Default DISMISS preserves prior behavior;
|
|
180
|
+
* ESCALATE auto-opens a jury case via CreateAppealInitiative so a
|
|
181
|
+
* silent controller can't park a slash forever. Per-type knob so
|
|
182
|
+
* each consumer chooses the right failure-mode.
|
|
183
|
+
*/
|
|
184
|
+
report_timeout_action?: ReportTimeoutAction;
|
|
185
|
+
/**
|
|
186
|
+
* challenge_default_slash_bps is the *proposed* slash amount when a
|
|
187
|
+
* system report is filed via OpenSystemReport without an explicit
|
|
188
|
+
* override (e.g. federation files a report on challenge-quorum
|
|
189
|
+
* resolution). MUST be ≤ unilateral_slash_cap_bps. Cross-field
|
|
190
|
+
* validation is enforced in both directions at MsgUpdateServiceType-
|
|
191
|
+
* Config time. The controller can still adjust the actual slash up
|
|
192
|
+
* or down within unilateral_slash_cap_bps at MsgResolveReport time;
|
|
193
|
+
* this field is just the starting proposal.
|
|
194
|
+
*/
|
|
195
|
+
challenge_default_slash_bps?: number;
|
|
196
|
+
}
|
|
197
|
+
export interface ServiceTypeConfigAminoMsg {
|
|
198
|
+
type: "sparkdream/x/service/ServiceTypeConfig";
|
|
199
|
+
value: ServiceTypeConfigAmino;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* ServiceTypeConfig is the governance-managed allowlist entry that defines
|
|
203
|
+
* a permitted service type and its per-type knobs (see x-service-spec.md
|
|
204
|
+
* §3.2). Mutated only via MsgUpdateServiceTypeConfig (gov authority).
|
|
205
|
+
* @name ServiceTypeConfig
|
|
206
|
+
* @package sparkdream.service.v1
|
|
207
|
+
* @see proto type: sparkdream.service.v1.ServiceTypeConfig
|
|
208
|
+
*/
|
|
209
|
+
export declare const ServiceTypeConfig: {
|
|
210
|
+
typeUrl: string;
|
|
211
|
+
aminoType: string;
|
|
212
|
+
encode(message: ServiceTypeConfig, writer?: BinaryWriter): BinaryWriter;
|
|
213
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ServiceTypeConfig;
|
|
214
|
+
fromPartial(object: DeepPartial<ServiceTypeConfig>): ServiceTypeConfig;
|
|
215
|
+
fromAmino(object: ServiceTypeConfigAmino): ServiceTypeConfig;
|
|
216
|
+
toAmino(message: ServiceTypeConfig): ServiceTypeConfigAmino;
|
|
217
|
+
fromAminoMsg(object: ServiceTypeConfigAminoMsg): ServiceTypeConfig;
|
|
218
|
+
toAminoMsg(message: ServiceTypeConfig): ServiceTypeConfigAminoMsg;
|
|
219
|
+
fromProtoMsg(message: ServiceTypeConfigProtoMsg): ServiceTypeConfig;
|
|
220
|
+
toProto(message: ServiceTypeConfig): Uint8Array;
|
|
221
|
+
toProtoMsg(message: ServiceTypeConfig): ServiceTypeConfigProtoMsg;
|
|
222
|
+
};
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ServiceTypeConfig = exports.ReportTimeoutActionAmino = exports.ReportTimeoutAction = void 0;
|
|
4
|
+
exports.reportTimeoutActionFromJSON = reportTimeoutActionFromJSON;
|
|
5
|
+
exports.reportTimeoutActionToJSON = reportTimeoutActionToJSON;
|
|
6
|
+
//@ts-nocheck
|
|
7
|
+
const binary_1 = require("../../../binary");
|
|
8
|
+
/**
|
|
9
|
+
* ReportTimeoutAction controls what the EndBlocker does when a PENDING
|
|
10
|
+
* report ages past max_pending_blocks without a controller verdict.
|
|
11
|
+
* Per-service-type knob so consumer modules can pick the failure-mode
|
|
12
|
+
* best suited to their accountability model (see Phase 0 of the
|
|
13
|
+
* federation→service migration plan).
|
|
14
|
+
*/
|
|
15
|
+
var ReportTimeoutAction;
|
|
16
|
+
(function (ReportTimeoutAction) {
|
|
17
|
+
/**
|
|
18
|
+
* REPORT_TIMEOUT_ACTION_DISMISS - REPORT_TIMEOUT_ACTION_DISMISS is the default: aged reports auto-
|
|
19
|
+
* dismiss, deposit refunded to reporter, controller barred from
|
|
20
|
+
* re-filing the same allegation for report_refile_cooldown_blocks.
|
|
21
|
+
* Suits service types where "no decision" should default to the
|
|
22
|
+
* operator's benefit.
|
|
23
|
+
*/
|
|
24
|
+
ReportTimeoutAction[ReportTimeoutAction["REPORT_TIMEOUT_ACTION_DISMISS"] = 0] = "REPORT_TIMEOUT_ACTION_DISMISS";
|
|
25
|
+
/**
|
|
26
|
+
* REPORT_TIMEOUT_ACTION_ESCALATE - REPORT_TIMEOUT_ACTION_ESCALATE auto-opens an x/rep jury case via
|
|
27
|
+
* CreateAppealInitiative when the controller stalls. Suits service
|
|
28
|
+
* types where a silent/captured controller must not be able to park
|
|
29
|
+
* a slash indefinitely (e.g. federation bridges).
|
|
30
|
+
*/
|
|
31
|
+
ReportTimeoutAction[ReportTimeoutAction["REPORT_TIMEOUT_ACTION_ESCALATE"] = 1] = "REPORT_TIMEOUT_ACTION_ESCALATE";
|
|
32
|
+
ReportTimeoutAction[ReportTimeoutAction["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
33
|
+
})(ReportTimeoutAction || (exports.ReportTimeoutAction = ReportTimeoutAction = {}));
|
|
34
|
+
exports.ReportTimeoutActionAmino = ReportTimeoutAction;
|
|
35
|
+
function reportTimeoutActionFromJSON(object) {
|
|
36
|
+
switch (object) {
|
|
37
|
+
case 0:
|
|
38
|
+
case "REPORT_TIMEOUT_ACTION_DISMISS":
|
|
39
|
+
return ReportTimeoutAction.REPORT_TIMEOUT_ACTION_DISMISS;
|
|
40
|
+
case 1:
|
|
41
|
+
case "REPORT_TIMEOUT_ACTION_ESCALATE":
|
|
42
|
+
return ReportTimeoutAction.REPORT_TIMEOUT_ACTION_ESCALATE;
|
|
43
|
+
case -1:
|
|
44
|
+
case "UNRECOGNIZED":
|
|
45
|
+
default:
|
|
46
|
+
return ReportTimeoutAction.UNRECOGNIZED;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function reportTimeoutActionToJSON(object) {
|
|
50
|
+
switch (object) {
|
|
51
|
+
case ReportTimeoutAction.REPORT_TIMEOUT_ACTION_DISMISS:
|
|
52
|
+
return "REPORT_TIMEOUT_ACTION_DISMISS";
|
|
53
|
+
case ReportTimeoutAction.REPORT_TIMEOUT_ACTION_ESCALATE:
|
|
54
|
+
return "REPORT_TIMEOUT_ACTION_ESCALATE";
|
|
55
|
+
case ReportTimeoutAction.UNRECOGNIZED:
|
|
56
|
+
default:
|
|
57
|
+
return "UNRECOGNIZED";
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function createBaseServiceTypeConfig() {
|
|
61
|
+
return {
|
|
62
|
+
serviceType: "",
|
|
63
|
+
description: "",
|
|
64
|
+
minBondAmount: "",
|
|
65
|
+
unbondingPeriodBlocks: BigInt(0),
|
|
66
|
+
unilateralSlashCapBps: 0,
|
|
67
|
+
tier1WindowBlocks: BigInt(0),
|
|
68
|
+
tier1AggregateCapBps: 0,
|
|
69
|
+
tier1CooldownBlocks: BigInt(0),
|
|
70
|
+
underfundedGraceBlocks: BigInt(0),
|
|
71
|
+
enabled: false,
|
|
72
|
+
reportTimeoutAction: 0,
|
|
73
|
+
challengeDefaultSlashBps: 0
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* ServiceTypeConfig is the governance-managed allowlist entry that defines
|
|
78
|
+
* a permitted service type and its per-type knobs (see x-service-spec.md
|
|
79
|
+
* §3.2). Mutated only via MsgUpdateServiceTypeConfig (gov authority).
|
|
80
|
+
* @name ServiceTypeConfig
|
|
81
|
+
* @package sparkdream.service.v1
|
|
82
|
+
* @see proto type: sparkdream.service.v1.ServiceTypeConfig
|
|
83
|
+
*/
|
|
84
|
+
exports.ServiceTypeConfig = {
|
|
85
|
+
typeUrl: "/sparkdream.service.v1.ServiceTypeConfig",
|
|
86
|
+
aminoType: "sparkdream/x/service/ServiceTypeConfig",
|
|
87
|
+
encode(message, writer = binary_1.BinaryWriter.create()) {
|
|
88
|
+
if (message.serviceType !== "") {
|
|
89
|
+
writer.uint32(10).string(message.serviceType);
|
|
90
|
+
}
|
|
91
|
+
if (message.description !== "") {
|
|
92
|
+
writer.uint32(18).string(message.description);
|
|
93
|
+
}
|
|
94
|
+
if (message.minBondAmount !== "") {
|
|
95
|
+
writer.uint32(26).string(message.minBondAmount);
|
|
96
|
+
}
|
|
97
|
+
if (message.unbondingPeriodBlocks !== BigInt(0)) {
|
|
98
|
+
writer.uint32(32).int64(message.unbondingPeriodBlocks);
|
|
99
|
+
}
|
|
100
|
+
if (message.unilateralSlashCapBps !== 0) {
|
|
101
|
+
writer.uint32(40).uint32(message.unilateralSlashCapBps);
|
|
102
|
+
}
|
|
103
|
+
if (message.tier1WindowBlocks !== BigInt(0)) {
|
|
104
|
+
writer.uint32(48).int64(message.tier1WindowBlocks);
|
|
105
|
+
}
|
|
106
|
+
if (message.tier1AggregateCapBps !== 0) {
|
|
107
|
+
writer.uint32(56).uint32(message.tier1AggregateCapBps);
|
|
108
|
+
}
|
|
109
|
+
if (message.tier1CooldownBlocks !== BigInt(0)) {
|
|
110
|
+
writer.uint32(64).int64(message.tier1CooldownBlocks);
|
|
111
|
+
}
|
|
112
|
+
if (message.underfundedGraceBlocks !== BigInt(0)) {
|
|
113
|
+
writer.uint32(72).int64(message.underfundedGraceBlocks);
|
|
114
|
+
}
|
|
115
|
+
if (message.enabled === true) {
|
|
116
|
+
writer.uint32(80).bool(message.enabled);
|
|
117
|
+
}
|
|
118
|
+
if (message.reportTimeoutAction !== 0) {
|
|
119
|
+
writer.uint32(88).int32(message.reportTimeoutAction);
|
|
120
|
+
}
|
|
121
|
+
if (message.challengeDefaultSlashBps !== 0) {
|
|
122
|
+
writer.uint32(96).uint32(message.challengeDefaultSlashBps);
|
|
123
|
+
}
|
|
124
|
+
return writer;
|
|
125
|
+
},
|
|
126
|
+
decode(input, length) {
|
|
127
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
128
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
129
|
+
const message = createBaseServiceTypeConfig();
|
|
130
|
+
while (reader.pos < end) {
|
|
131
|
+
const tag = reader.uint32();
|
|
132
|
+
switch (tag >>> 3) {
|
|
133
|
+
case 1:
|
|
134
|
+
message.serviceType = reader.string();
|
|
135
|
+
break;
|
|
136
|
+
case 2:
|
|
137
|
+
message.description = reader.string();
|
|
138
|
+
break;
|
|
139
|
+
case 3:
|
|
140
|
+
message.minBondAmount = reader.string();
|
|
141
|
+
break;
|
|
142
|
+
case 4:
|
|
143
|
+
message.unbondingPeriodBlocks = reader.int64();
|
|
144
|
+
break;
|
|
145
|
+
case 5:
|
|
146
|
+
message.unilateralSlashCapBps = reader.uint32();
|
|
147
|
+
break;
|
|
148
|
+
case 6:
|
|
149
|
+
message.tier1WindowBlocks = reader.int64();
|
|
150
|
+
break;
|
|
151
|
+
case 7:
|
|
152
|
+
message.tier1AggregateCapBps = reader.uint32();
|
|
153
|
+
break;
|
|
154
|
+
case 8:
|
|
155
|
+
message.tier1CooldownBlocks = reader.int64();
|
|
156
|
+
break;
|
|
157
|
+
case 9:
|
|
158
|
+
message.underfundedGraceBlocks = reader.int64();
|
|
159
|
+
break;
|
|
160
|
+
case 10:
|
|
161
|
+
message.enabled = reader.bool();
|
|
162
|
+
break;
|
|
163
|
+
case 11:
|
|
164
|
+
message.reportTimeoutAction = reader.int32();
|
|
165
|
+
break;
|
|
166
|
+
case 12:
|
|
167
|
+
message.challengeDefaultSlashBps = reader.uint32();
|
|
168
|
+
break;
|
|
169
|
+
default:
|
|
170
|
+
reader.skipType(tag & 7);
|
|
171
|
+
break;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
return message;
|
|
175
|
+
},
|
|
176
|
+
fromPartial(object) {
|
|
177
|
+
const message = createBaseServiceTypeConfig();
|
|
178
|
+
message.serviceType = object.serviceType ?? "";
|
|
179
|
+
message.description = object.description ?? "";
|
|
180
|
+
message.minBondAmount = object.minBondAmount ?? "";
|
|
181
|
+
message.unbondingPeriodBlocks = object.unbondingPeriodBlocks !== undefined && object.unbondingPeriodBlocks !== null ? BigInt(object.unbondingPeriodBlocks.toString()) : BigInt(0);
|
|
182
|
+
message.unilateralSlashCapBps = object.unilateralSlashCapBps ?? 0;
|
|
183
|
+
message.tier1WindowBlocks = object.tier1WindowBlocks !== undefined && object.tier1WindowBlocks !== null ? BigInt(object.tier1WindowBlocks.toString()) : BigInt(0);
|
|
184
|
+
message.tier1AggregateCapBps = object.tier1AggregateCapBps ?? 0;
|
|
185
|
+
message.tier1CooldownBlocks = object.tier1CooldownBlocks !== undefined && object.tier1CooldownBlocks !== null ? BigInt(object.tier1CooldownBlocks.toString()) : BigInt(0);
|
|
186
|
+
message.underfundedGraceBlocks = object.underfundedGraceBlocks !== undefined && object.underfundedGraceBlocks !== null ? BigInt(object.underfundedGraceBlocks.toString()) : BigInt(0);
|
|
187
|
+
message.enabled = object.enabled ?? false;
|
|
188
|
+
message.reportTimeoutAction = object.reportTimeoutAction ?? 0;
|
|
189
|
+
message.challengeDefaultSlashBps = object.challengeDefaultSlashBps ?? 0;
|
|
190
|
+
return message;
|
|
191
|
+
},
|
|
192
|
+
fromAmino(object) {
|
|
193
|
+
const message = createBaseServiceTypeConfig();
|
|
194
|
+
if (object.service_type !== undefined && object.service_type !== null) {
|
|
195
|
+
message.serviceType = object.service_type;
|
|
196
|
+
}
|
|
197
|
+
if (object.description !== undefined && object.description !== null) {
|
|
198
|
+
message.description = object.description;
|
|
199
|
+
}
|
|
200
|
+
if (object.min_bond_amount !== undefined && object.min_bond_amount !== null) {
|
|
201
|
+
message.minBondAmount = object.min_bond_amount;
|
|
202
|
+
}
|
|
203
|
+
if (object.unbonding_period_blocks !== undefined && object.unbonding_period_blocks !== null) {
|
|
204
|
+
message.unbondingPeriodBlocks = BigInt(object.unbonding_period_blocks);
|
|
205
|
+
}
|
|
206
|
+
if (object.unilateral_slash_cap_bps !== undefined && object.unilateral_slash_cap_bps !== null) {
|
|
207
|
+
message.unilateralSlashCapBps = object.unilateral_slash_cap_bps;
|
|
208
|
+
}
|
|
209
|
+
if (object.tier1_window_blocks !== undefined && object.tier1_window_blocks !== null) {
|
|
210
|
+
message.tier1WindowBlocks = BigInt(object.tier1_window_blocks);
|
|
211
|
+
}
|
|
212
|
+
if (object.tier1_aggregate_cap_bps !== undefined && object.tier1_aggregate_cap_bps !== null) {
|
|
213
|
+
message.tier1AggregateCapBps = object.tier1_aggregate_cap_bps;
|
|
214
|
+
}
|
|
215
|
+
if (object.tier1_cooldown_blocks !== undefined && object.tier1_cooldown_blocks !== null) {
|
|
216
|
+
message.tier1CooldownBlocks = BigInt(object.tier1_cooldown_blocks);
|
|
217
|
+
}
|
|
218
|
+
if (object.underfunded_grace_blocks !== undefined && object.underfunded_grace_blocks !== null) {
|
|
219
|
+
message.underfundedGraceBlocks = BigInt(object.underfunded_grace_blocks);
|
|
220
|
+
}
|
|
221
|
+
if (object.enabled !== undefined && object.enabled !== null) {
|
|
222
|
+
message.enabled = object.enabled;
|
|
223
|
+
}
|
|
224
|
+
if (object.report_timeout_action !== undefined && object.report_timeout_action !== null) {
|
|
225
|
+
message.reportTimeoutAction = object.report_timeout_action;
|
|
226
|
+
}
|
|
227
|
+
if (object.challenge_default_slash_bps !== undefined && object.challenge_default_slash_bps !== null) {
|
|
228
|
+
message.challengeDefaultSlashBps = object.challenge_default_slash_bps;
|
|
229
|
+
}
|
|
230
|
+
return message;
|
|
231
|
+
},
|
|
232
|
+
toAmino(message) {
|
|
233
|
+
const obj = {};
|
|
234
|
+
obj.service_type = message.serviceType === "" ? undefined : message.serviceType;
|
|
235
|
+
obj.description = message.description === "" ? undefined : message.description;
|
|
236
|
+
obj.min_bond_amount = message.minBondAmount === "" ? undefined : message.minBondAmount;
|
|
237
|
+
obj.unbonding_period_blocks = message.unbondingPeriodBlocks !== BigInt(0) ? message.unbondingPeriodBlocks?.toString() : undefined;
|
|
238
|
+
obj.unilateral_slash_cap_bps = message.unilateralSlashCapBps === 0 ? undefined : message.unilateralSlashCapBps;
|
|
239
|
+
obj.tier1_window_blocks = message.tier1WindowBlocks !== BigInt(0) ? message.tier1WindowBlocks?.toString() : undefined;
|
|
240
|
+
obj.tier1_aggregate_cap_bps = message.tier1AggregateCapBps === 0 ? undefined : message.tier1AggregateCapBps;
|
|
241
|
+
obj.tier1_cooldown_blocks = message.tier1CooldownBlocks !== BigInt(0) ? message.tier1CooldownBlocks?.toString() : undefined;
|
|
242
|
+
obj.underfunded_grace_blocks = message.underfundedGraceBlocks !== BigInt(0) ? message.underfundedGraceBlocks?.toString() : undefined;
|
|
243
|
+
obj.enabled = message.enabled === false ? undefined : message.enabled;
|
|
244
|
+
obj.report_timeout_action = message.reportTimeoutAction === 0 ? undefined : message.reportTimeoutAction;
|
|
245
|
+
obj.challenge_default_slash_bps = message.challengeDefaultSlashBps === 0 ? undefined : message.challengeDefaultSlashBps;
|
|
246
|
+
return obj;
|
|
247
|
+
},
|
|
248
|
+
fromAminoMsg(object) {
|
|
249
|
+
return exports.ServiceTypeConfig.fromAmino(object.value);
|
|
250
|
+
},
|
|
251
|
+
toAminoMsg(message) {
|
|
252
|
+
return {
|
|
253
|
+
type: "sparkdream/x/service/ServiceTypeConfig",
|
|
254
|
+
value: exports.ServiceTypeConfig.toAmino(message)
|
|
255
|
+
};
|
|
256
|
+
},
|
|
257
|
+
fromProtoMsg(message) {
|
|
258
|
+
return exports.ServiceTypeConfig.decode(message.value);
|
|
259
|
+
},
|
|
260
|
+
toProto(message) {
|
|
261
|
+
return exports.ServiceTypeConfig.encode(message).finish();
|
|
262
|
+
},
|
|
263
|
+
toProtoMsg(message) {
|
|
264
|
+
return {
|
|
265
|
+
typeUrl: "/sparkdream.service.v1.ServiceTypeConfig",
|
|
266
|
+
value: exports.ServiceTypeConfig.encode(message).finish()
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "../../../binary";
|
|
2
|
+
import { DeepPartial } from "../../../helpers";
|
|
3
|
+
/**
|
|
4
|
+
* SystemReportRateLimit tracks recent OpenSystemReport call heights for
|
|
5
|
+
* a given allowlisted caller module (e.g. "federation"), implementing
|
|
6
|
+
* the sliding-window per-caller cap from Phase 0 of the federation→
|
|
7
|
+
* service migration plan.
|
|
8
|
+
*
|
|
9
|
+
* The keeper admits a new system-report filing iff fewer than
|
|
10
|
+
* `max_system_reports_per_caller_per_window` entries in
|
|
11
|
+
* `recent_filing_heights` fall within
|
|
12
|
+
* `[current_height - rate_limit_window_blocks, current_height]`.
|
|
13
|
+
*
|
|
14
|
+
* Ring-buffer semantics: when at capacity, the oldest entry is
|
|
15
|
+
* overwritten on each new filing. Idempotent re-calls (same dedupe_key
|
|
16
|
+
* resolving to an existing report) do NOT update the ring buffer.
|
|
17
|
+
* @name SystemReportRateLimit
|
|
18
|
+
* @package sparkdream.service.v1
|
|
19
|
+
* @see proto type: sparkdream.service.v1.SystemReportRateLimit
|
|
20
|
+
*/
|
|
21
|
+
export interface SystemReportRateLimit {
|
|
22
|
+
/**
|
|
23
|
+
* caller_module is the allowlisted caller name whose rate is being
|
|
24
|
+
* tracked (e.g. "federation"). Resolved by forward-derive from the
|
|
25
|
+
* address passed to OpenSystemReport.
|
|
26
|
+
*/
|
|
27
|
+
callerModule: string;
|
|
28
|
+
/**
|
|
29
|
+
* recent_filing_heights is the ring buffer of recent filing heights
|
|
30
|
+
* in insertion order. Length capped at
|
|
31
|
+
* max_system_reports_per_caller_per_window + 1.
|
|
32
|
+
*/
|
|
33
|
+
recentFilingHeights: bigint[];
|
|
34
|
+
}
|
|
35
|
+
export interface SystemReportRateLimitProtoMsg {
|
|
36
|
+
typeUrl: "/sparkdream.service.v1.SystemReportRateLimit";
|
|
37
|
+
value: Uint8Array;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* SystemReportRateLimit tracks recent OpenSystemReport call heights for
|
|
41
|
+
* a given allowlisted caller module (e.g. "federation"), implementing
|
|
42
|
+
* the sliding-window per-caller cap from Phase 0 of the federation→
|
|
43
|
+
* service migration plan.
|
|
44
|
+
*
|
|
45
|
+
* The keeper admits a new system-report filing iff fewer than
|
|
46
|
+
* `max_system_reports_per_caller_per_window` entries in
|
|
47
|
+
* `recent_filing_heights` fall within
|
|
48
|
+
* `[current_height - rate_limit_window_blocks, current_height]`.
|
|
49
|
+
*
|
|
50
|
+
* Ring-buffer semantics: when at capacity, the oldest entry is
|
|
51
|
+
* overwritten on each new filing. Idempotent re-calls (same dedupe_key
|
|
52
|
+
* resolving to an existing report) do NOT update the ring buffer.
|
|
53
|
+
* @name SystemReportRateLimitAmino
|
|
54
|
+
* @package sparkdream.service.v1
|
|
55
|
+
* @see proto type: sparkdream.service.v1.SystemReportRateLimit
|
|
56
|
+
*/
|
|
57
|
+
export interface SystemReportRateLimitAmino {
|
|
58
|
+
/**
|
|
59
|
+
* caller_module is the allowlisted caller name whose rate is being
|
|
60
|
+
* tracked (e.g. "federation"). Resolved by forward-derive from the
|
|
61
|
+
* address passed to OpenSystemReport.
|
|
62
|
+
*/
|
|
63
|
+
caller_module?: string;
|
|
64
|
+
/**
|
|
65
|
+
* recent_filing_heights is the ring buffer of recent filing heights
|
|
66
|
+
* in insertion order. Length capped at
|
|
67
|
+
* max_system_reports_per_caller_per_window + 1.
|
|
68
|
+
*/
|
|
69
|
+
recent_filing_heights?: string[];
|
|
70
|
+
}
|
|
71
|
+
export interface SystemReportRateLimitAminoMsg {
|
|
72
|
+
type: "sparkdream/x/service/SystemReportRateLimit";
|
|
73
|
+
value: SystemReportRateLimitAmino;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* SystemReportRateLimit tracks recent OpenSystemReport call heights for
|
|
77
|
+
* a given allowlisted caller module (e.g. "federation"), implementing
|
|
78
|
+
* the sliding-window per-caller cap from Phase 0 of the federation→
|
|
79
|
+
* service migration plan.
|
|
80
|
+
*
|
|
81
|
+
* The keeper admits a new system-report filing iff fewer than
|
|
82
|
+
* `max_system_reports_per_caller_per_window` entries in
|
|
83
|
+
* `recent_filing_heights` fall within
|
|
84
|
+
* `[current_height - rate_limit_window_blocks, current_height]`.
|
|
85
|
+
*
|
|
86
|
+
* Ring-buffer semantics: when at capacity, the oldest entry is
|
|
87
|
+
* overwritten on each new filing. Idempotent re-calls (same dedupe_key
|
|
88
|
+
* resolving to an existing report) do NOT update the ring buffer.
|
|
89
|
+
* @name SystemReportRateLimit
|
|
90
|
+
* @package sparkdream.service.v1
|
|
91
|
+
* @see proto type: sparkdream.service.v1.SystemReportRateLimit
|
|
92
|
+
*/
|
|
93
|
+
export declare const SystemReportRateLimit: {
|
|
94
|
+
typeUrl: string;
|
|
95
|
+
aminoType: string;
|
|
96
|
+
encode(message: SystemReportRateLimit, writer?: BinaryWriter): BinaryWriter;
|
|
97
|
+
decode(input: BinaryReader | Uint8Array, length?: number): SystemReportRateLimit;
|
|
98
|
+
fromPartial(object: DeepPartial<SystemReportRateLimit>): SystemReportRateLimit;
|
|
99
|
+
fromAmino(object: SystemReportRateLimitAmino): SystemReportRateLimit;
|
|
100
|
+
toAmino(message: SystemReportRateLimit): SystemReportRateLimitAmino;
|
|
101
|
+
fromAminoMsg(object: SystemReportRateLimitAminoMsg): SystemReportRateLimit;
|
|
102
|
+
toAminoMsg(message: SystemReportRateLimit): SystemReportRateLimitAminoMsg;
|
|
103
|
+
fromProtoMsg(message: SystemReportRateLimitProtoMsg): SystemReportRateLimit;
|
|
104
|
+
toProto(message: SystemReportRateLimit): Uint8Array;
|
|
105
|
+
toProtoMsg(message: SystemReportRateLimit): SystemReportRateLimitProtoMsg;
|
|
106
|
+
};
|