@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,18 @@
|
|
|
1
|
+
import { LCDClient } from "@cosmology/lcd";
|
|
2
|
+
import { QueryParamsRequest, QueryParamsResponse, QueryOperatorRequest, QueryOperatorResponse, QueryServiceTypeRequest, QueryServiceTypeResponse, QueryServiceTypesRequest, QueryServiceTypesResponse, QueryOperatorsRequest, QueryOperatorsResponse, QueryOperatorsByControllerRequest, QueryOperatorsByControllerResponse, QueryOperatorsByServiceTypeRequest, QueryOperatorsByServiceTypeResponse, QueryReportRequest, QueryReportResponse, QueryReportsByOperatorRequest, QueryReportsByOperatorResponse, QueryOperatorReputationSnapshotRequest, QueryOperatorReputationSnapshotResponse } from "./query";
|
|
3
|
+
export declare class LCDQueryClient {
|
|
4
|
+
req: LCDClient;
|
|
5
|
+
constructor({ requestClient }: {
|
|
6
|
+
requestClient: LCDClient;
|
|
7
|
+
});
|
|
8
|
+
params: (_params?: QueryParamsRequest) => Promise<QueryParamsResponse>;
|
|
9
|
+
operator: (params: QueryOperatorRequest) => Promise<QueryOperatorResponse>;
|
|
10
|
+
serviceType: (params: QueryServiceTypeRequest) => Promise<QueryServiceTypeResponse>;
|
|
11
|
+
serviceTypes: (params: QueryServiceTypesRequest) => Promise<QueryServiceTypesResponse>;
|
|
12
|
+
operators: (params: QueryOperatorsRequest) => Promise<QueryOperatorsResponse>;
|
|
13
|
+
operatorsByController: (params: QueryOperatorsByControllerRequest) => Promise<QueryOperatorsByControllerResponse>;
|
|
14
|
+
operatorsByServiceType: (params: QueryOperatorsByServiceTypeRequest) => Promise<QueryOperatorsByServiceTypeResponse>;
|
|
15
|
+
report: (params: QueryReportRequest) => Promise<QueryReportResponse>;
|
|
16
|
+
reportsByOperator: (params: QueryReportsByOperatorRequest) => Promise<QueryReportsByOperatorResponse>;
|
|
17
|
+
operatorReputationSnapshot: (params: QueryOperatorReputationSnapshotRequest) => Promise<QueryOperatorReputationSnapshotResponse>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LCDQueryClient = void 0;
|
|
4
|
+
//@ts-nocheck
|
|
5
|
+
const helpers_1 = require("../../../helpers");
|
|
6
|
+
class LCDQueryClient {
|
|
7
|
+
req;
|
|
8
|
+
constructor({ requestClient }) {
|
|
9
|
+
this.req = requestClient;
|
|
10
|
+
}
|
|
11
|
+
/* Parameters queries the parameters of the module. */
|
|
12
|
+
params = async (_params = {}) => {
|
|
13
|
+
const endpoint = `sparkdream/service/v1/params`;
|
|
14
|
+
return await this.req.get(endpoint);
|
|
15
|
+
};
|
|
16
|
+
/* Operator returns the live operator record for (address, service_type). */
|
|
17
|
+
operator = async (params) => {
|
|
18
|
+
const endpoint = `sparkdream/service/v1/operator/${params.address}/${params.serviceType}`;
|
|
19
|
+
return await this.req.get(endpoint);
|
|
20
|
+
};
|
|
21
|
+
/* ServiceType returns one service-type registry entry. */
|
|
22
|
+
serviceType = async (params) => {
|
|
23
|
+
const endpoint = `sparkdream/service/v1/service_type/${params.serviceType}`;
|
|
24
|
+
return await this.req.get(endpoint);
|
|
25
|
+
};
|
|
26
|
+
/* ServiceTypes returns all service-type registry entries (paginated). */
|
|
27
|
+
serviceTypes = async (params) => {
|
|
28
|
+
const options = {
|
|
29
|
+
params: {}
|
|
30
|
+
};
|
|
31
|
+
if (typeof params?.enabledOnly !== "undefined") {
|
|
32
|
+
options.params.enabled_only = params.enabledOnly;
|
|
33
|
+
}
|
|
34
|
+
if (typeof params?.pagination !== "undefined") {
|
|
35
|
+
(0, helpers_1.setPaginationParams)(options, params.pagination);
|
|
36
|
+
}
|
|
37
|
+
const endpoint = `sparkdream/service/v1/service_types`;
|
|
38
|
+
return await this.req.get(endpoint, options);
|
|
39
|
+
};
|
|
40
|
+
/* Operators returns all live operator records (paginated, optionally
|
|
41
|
+
filtered by status). */
|
|
42
|
+
operators = async (params) => {
|
|
43
|
+
const options = {
|
|
44
|
+
params: {}
|
|
45
|
+
};
|
|
46
|
+
if (typeof params?.statusFilter !== "undefined") {
|
|
47
|
+
options.params.status_filter = params.statusFilter;
|
|
48
|
+
}
|
|
49
|
+
if (typeof params?.pagination !== "undefined") {
|
|
50
|
+
(0, helpers_1.setPaginationParams)(options, params.pagination);
|
|
51
|
+
}
|
|
52
|
+
const endpoint = `sparkdream/service/v1/operators`;
|
|
53
|
+
return await this.req.get(endpoint, options);
|
|
54
|
+
};
|
|
55
|
+
/* OperatorsByController returns live operators whose controller is the
|
|
56
|
+
given address. */
|
|
57
|
+
operatorsByController = async (params) => {
|
|
58
|
+
const options = {
|
|
59
|
+
params: {}
|
|
60
|
+
};
|
|
61
|
+
if (typeof params?.statusFilter !== "undefined") {
|
|
62
|
+
options.params.status_filter = params.statusFilter;
|
|
63
|
+
}
|
|
64
|
+
if (typeof params?.pagination !== "undefined") {
|
|
65
|
+
(0, helpers_1.setPaginationParams)(options, params.pagination);
|
|
66
|
+
}
|
|
67
|
+
const endpoint = `sparkdream/service/v1/operators_by_controller/${params.controller}`;
|
|
68
|
+
return await this.req.get(endpoint, options);
|
|
69
|
+
};
|
|
70
|
+
/* OperatorsByServiceType returns live operators of the given service type. */
|
|
71
|
+
operatorsByServiceType = async (params) => {
|
|
72
|
+
const options = {
|
|
73
|
+
params: {}
|
|
74
|
+
};
|
|
75
|
+
if (typeof params?.statusFilter !== "undefined") {
|
|
76
|
+
options.params.status_filter = params.statusFilter;
|
|
77
|
+
}
|
|
78
|
+
if (typeof params?.pagination !== "undefined") {
|
|
79
|
+
(0, helpers_1.setPaginationParams)(options, params.pagination);
|
|
80
|
+
}
|
|
81
|
+
const endpoint = `sparkdream/service/v1/operators_by_service_type/${params.serviceType}`;
|
|
82
|
+
return await this.req.get(endpoint, options);
|
|
83
|
+
};
|
|
84
|
+
/* Report returns a single report by id. */
|
|
85
|
+
report = async (params) => {
|
|
86
|
+
const endpoint = `sparkdream/service/v1/report/${params.reportId}`;
|
|
87
|
+
return await this.req.get(endpoint);
|
|
88
|
+
};
|
|
89
|
+
/* ReportsByOperator returns reports against (operator_address, service_type). */
|
|
90
|
+
reportsByOperator = async (params) => {
|
|
91
|
+
const options = {
|
|
92
|
+
params: {}
|
|
93
|
+
};
|
|
94
|
+
if (typeof params?.statusFilter !== "undefined") {
|
|
95
|
+
options.params.status_filter = params.statusFilter;
|
|
96
|
+
}
|
|
97
|
+
if (typeof params?.pagination !== "undefined") {
|
|
98
|
+
(0, helpers_1.setPaginationParams)(options, params.pagination);
|
|
99
|
+
}
|
|
100
|
+
const endpoint = `sparkdream/service/v1/reports_by_operator/${params.operatorAddress}/${params.serviceType}`;
|
|
101
|
+
return await this.req.get(endpoint, options);
|
|
102
|
+
};
|
|
103
|
+
/* OperatorReputationSnapshot returns bond-block totals for an address
|
|
104
|
+
(§6.6 lazy accrual visibility). Settles in-memory at query time; no
|
|
105
|
+
state write. */
|
|
106
|
+
operatorReputationSnapshot = async (params) => {
|
|
107
|
+
const endpoint = `sparkdream/service/v1/operator_reputation_snapshot/${params.address}`;
|
|
108
|
+
return await this.req.get(endpoint);
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
exports.LCDQueryClient = LCDQueryClient;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { TxRpc } from "../../../types";
|
|
2
|
+
import { QueryClient } from "@cosmjs/stargate";
|
|
3
|
+
import { QueryParamsRequest, QueryParamsResponse, QueryOperatorRequest, QueryOperatorResponse, QueryServiceTypeRequest, QueryServiceTypeResponse, QueryServiceTypesRequest, QueryServiceTypesResponse, QueryOperatorsRequest, QueryOperatorsResponse, QueryOperatorsByControllerRequest, QueryOperatorsByControllerResponse, QueryOperatorsByServiceTypeRequest, QueryOperatorsByServiceTypeResponse, QueryReportRequest, QueryReportResponse, QueryReportsByOperatorRequest, QueryReportsByOperatorResponse, QueryOperatorReputationSnapshotRequest, QueryOperatorReputationSnapshotResponse } from "./query";
|
|
4
|
+
/** Query defines the gRPC querier service for x/service.
|
|
5
|
+
See x-service-spec.md §8. */
|
|
6
|
+
export interface Query {
|
|
7
|
+
/** Parameters queries the parameters of the module. */
|
|
8
|
+
params(request?: QueryParamsRequest): Promise<QueryParamsResponse>;
|
|
9
|
+
/** Operator returns the live operator record for (address, service_type). */
|
|
10
|
+
operator(request: QueryOperatorRequest): Promise<QueryOperatorResponse>;
|
|
11
|
+
/** ServiceType returns one service-type registry entry. */
|
|
12
|
+
serviceType(request: QueryServiceTypeRequest): Promise<QueryServiceTypeResponse>;
|
|
13
|
+
/** ServiceTypes returns all service-type registry entries (paginated). */
|
|
14
|
+
serviceTypes(request: QueryServiceTypesRequest): Promise<QueryServiceTypesResponse>;
|
|
15
|
+
/**
|
|
16
|
+
* Operators returns all live operator records (paginated, optionally
|
|
17
|
+
* filtered by status).
|
|
18
|
+
*/
|
|
19
|
+
operators(request: QueryOperatorsRequest): Promise<QueryOperatorsResponse>;
|
|
20
|
+
/**
|
|
21
|
+
* OperatorsByController returns live operators whose controller is the
|
|
22
|
+
* given address.
|
|
23
|
+
*/
|
|
24
|
+
operatorsByController(request: QueryOperatorsByControllerRequest): Promise<QueryOperatorsByControllerResponse>;
|
|
25
|
+
/** OperatorsByServiceType returns live operators of the given service type. */
|
|
26
|
+
operatorsByServiceType(request: QueryOperatorsByServiceTypeRequest): Promise<QueryOperatorsByServiceTypeResponse>;
|
|
27
|
+
/** Report returns a single report by id. */
|
|
28
|
+
report(request: QueryReportRequest): Promise<QueryReportResponse>;
|
|
29
|
+
/** ReportsByOperator returns reports against (operator_address, service_type). */
|
|
30
|
+
reportsByOperator(request: QueryReportsByOperatorRequest): Promise<QueryReportsByOperatorResponse>;
|
|
31
|
+
/**
|
|
32
|
+
* OperatorReputationSnapshot returns bond-block totals for an address
|
|
33
|
+
* (§6.6 lazy accrual visibility). Settles in-memory at query time; no
|
|
34
|
+
* state write.
|
|
35
|
+
*/
|
|
36
|
+
operatorReputationSnapshot(request: QueryOperatorReputationSnapshotRequest): Promise<QueryOperatorReputationSnapshotResponse>;
|
|
37
|
+
}
|
|
38
|
+
export declare class QueryClientImpl implements Query {
|
|
39
|
+
private readonly rpc;
|
|
40
|
+
constructor(rpc: TxRpc);
|
|
41
|
+
params: (request?: QueryParamsRequest) => Promise<QueryParamsResponse>;
|
|
42
|
+
operator: (request: QueryOperatorRequest) => Promise<QueryOperatorResponse>;
|
|
43
|
+
serviceType: (request: QueryServiceTypeRequest) => Promise<QueryServiceTypeResponse>;
|
|
44
|
+
serviceTypes: (request: QueryServiceTypesRequest) => Promise<QueryServiceTypesResponse>;
|
|
45
|
+
operators: (request: QueryOperatorsRequest) => Promise<QueryOperatorsResponse>;
|
|
46
|
+
operatorsByController: (request: QueryOperatorsByControllerRequest) => Promise<QueryOperatorsByControllerResponse>;
|
|
47
|
+
operatorsByServiceType: (request: QueryOperatorsByServiceTypeRequest) => Promise<QueryOperatorsByServiceTypeResponse>;
|
|
48
|
+
report: (request: QueryReportRequest) => Promise<QueryReportResponse>;
|
|
49
|
+
reportsByOperator: (request: QueryReportsByOperatorRequest) => Promise<QueryReportsByOperatorResponse>;
|
|
50
|
+
operatorReputationSnapshot: (request: QueryOperatorReputationSnapshotRequest) => Promise<QueryOperatorReputationSnapshotResponse>;
|
|
51
|
+
}
|
|
52
|
+
export declare const createRpcQueryExtension: (base: QueryClient) => {
|
|
53
|
+
params(request?: QueryParamsRequest): Promise<QueryParamsResponse>;
|
|
54
|
+
operator(request: QueryOperatorRequest): Promise<QueryOperatorResponse>;
|
|
55
|
+
serviceType(request: QueryServiceTypeRequest): Promise<QueryServiceTypeResponse>;
|
|
56
|
+
serviceTypes(request: QueryServiceTypesRequest): Promise<QueryServiceTypesResponse>;
|
|
57
|
+
operators(request: QueryOperatorsRequest): Promise<QueryOperatorsResponse>;
|
|
58
|
+
operatorsByController(request: QueryOperatorsByControllerRequest): Promise<QueryOperatorsByControllerResponse>;
|
|
59
|
+
operatorsByServiceType(request: QueryOperatorsByServiceTypeRequest): Promise<QueryOperatorsByServiceTypeResponse>;
|
|
60
|
+
report(request: QueryReportRequest): Promise<QueryReportResponse>;
|
|
61
|
+
reportsByOperator(request: QueryReportsByOperatorRequest): Promise<QueryReportsByOperatorResponse>;
|
|
62
|
+
operatorReputationSnapshot(request: QueryOperatorReputationSnapshotRequest): Promise<QueryOperatorReputationSnapshotResponse>;
|
|
63
|
+
};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createRpcQueryExtension = exports.QueryClientImpl = void 0;
|
|
4
|
+
const binary_1 = require("../../../binary");
|
|
5
|
+
const stargate_1 = require("@cosmjs/stargate");
|
|
6
|
+
const query_1 = require("./query");
|
|
7
|
+
class QueryClientImpl {
|
|
8
|
+
rpc;
|
|
9
|
+
constructor(rpc) {
|
|
10
|
+
this.rpc = rpc;
|
|
11
|
+
}
|
|
12
|
+
/* Parameters queries the parameters of the module. */
|
|
13
|
+
params = async (request = {}) => {
|
|
14
|
+
const data = query_1.QueryParamsRequest.encode(request).finish();
|
|
15
|
+
const promise = this.rpc.request("sparkdream.service.v1.Query", "Params", data);
|
|
16
|
+
return promise.then(data => query_1.QueryParamsResponse.decode(new binary_1.BinaryReader(data)));
|
|
17
|
+
};
|
|
18
|
+
/* Operator returns the live operator record for (address, service_type). */
|
|
19
|
+
operator = async (request) => {
|
|
20
|
+
const data = query_1.QueryOperatorRequest.encode(request).finish();
|
|
21
|
+
const promise = this.rpc.request("sparkdream.service.v1.Query", "Operator", data);
|
|
22
|
+
return promise.then(data => query_1.QueryOperatorResponse.decode(new binary_1.BinaryReader(data)));
|
|
23
|
+
};
|
|
24
|
+
/* ServiceType returns one service-type registry entry. */
|
|
25
|
+
serviceType = async (request) => {
|
|
26
|
+
const data = query_1.QueryServiceTypeRequest.encode(request).finish();
|
|
27
|
+
const promise = this.rpc.request("sparkdream.service.v1.Query", "ServiceType", data);
|
|
28
|
+
return promise.then(data => query_1.QueryServiceTypeResponse.decode(new binary_1.BinaryReader(data)));
|
|
29
|
+
};
|
|
30
|
+
/* ServiceTypes returns all service-type registry entries (paginated). */
|
|
31
|
+
serviceTypes = async (request) => {
|
|
32
|
+
const data = query_1.QueryServiceTypesRequest.encode(request).finish();
|
|
33
|
+
const promise = this.rpc.request("sparkdream.service.v1.Query", "ServiceTypes", data);
|
|
34
|
+
return promise.then(data => query_1.QueryServiceTypesResponse.decode(new binary_1.BinaryReader(data)));
|
|
35
|
+
};
|
|
36
|
+
/* Operators returns all live operator records (paginated, optionally
|
|
37
|
+
filtered by status). */
|
|
38
|
+
operators = async (request) => {
|
|
39
|
+
const data = query_1.QueryOperatorsRequest.encode(request).finish();
|
|
40
|
+
const promise = this.rpc.request("sparkdream.service.v1.Query", "Operators", data);
|
|
41
|
+
return promise.then(data => query_1.QueryOperatorsResponse.decode(new binary_1.BinaryReader(data)));
|
|
42
|
+
};
|
|
43
|
+
/* OperatorsByController returns live operators whose controller is the
|
|
44
|
+
given address. */
|
|
45
|
+
operatorsByController = async (request) => {
|
|
46
|
+
const data = query_1.QueryOperatorsByControllerRequest.encode(request).finish();
|
|
47
|
+
const promise = this.rpc.request("sparkdream.service.v1.Query", "OperatorsByController", data);
|
|
48
|
+
return promise.then(data => query_1.QueryOperatorsByControllerResponse.decode(new binary_1.BinaryReader(data)));
|
|
49
|
+
};
|
|
50
|
+
/* OperatorsByServiceType returns live operators of the given service type. */
|
|
51
|
+
operatorsByServiceType = async (request) => {
|
|
52
|
+
const data = query_1.QueryOperatorsByServiceTypeRequest.encode(request).finish();
|
|
53
|
+
const promise = this.rpc.request("sparkdream.service.v1.Query", "OperatorsByServiceType", data);
|
|
54
|
+
return promise.then(data => query_1.QueryOperatorsByServiceTypeResponse.decode(new binary_1.BinaryReader(data)));
|
|
55
|
+
};
|
|
56
|
+
/* Report returns a single report by id. */
|
|
57
|
+
report = async (request) => {
|
|
58
|
+
const data = query_1.QueryReportRequest.encode(request).finish();
|
|
59
|
+
const promise = this.rpc.request("sparkdream.service.v1.Query", "Report", data);
|
|
60
|
+
return promise.then(data => query_1.QueryReportResponse.decode(new binary_1.BinaryReader(data)));
|
|
61
|
+
};
|
|
62
|
+
/* ReportsByOperator returns reports against (operator_address, service_type). */
|
|
63
|
+
reportsByOperator = async (request) => {
|
|
64
|
+
const data = query_1.QueryReportsByOperatorRequest.encode(request).finish();
|
|
65
|
+
const promise = this.rpc.request("sparkdream.service.v1.Query", "ReportsByOperator", data);
|
|
66
|
+
return promise.then(data => query_1.QueryReportsByOperatorResponse.decode(new binary_1.BinaryReader(data)));
|
|
67
|
+
};
|
|
68
|
+
/* OperatorReputationSnapshot returns bond-block totals for an address
|
|
69
|
+
(§6.6 lazy accrual visibility). Settles in-memory at query time; no
|
|
70
|
+
state write. */
|
|
71
|
+
operatorReputationSnapshot = async (request) => {
|
|
72
|
+
const data = query_1.QueryOperatorReputationSnapshotRequest.encode(request).finish();
|
|
73
|
+
const promise = this.rpc.request("sparkdream.service.v1.Query", "OperatorReputationSnapshot", data);
|
|
74
|
+
return promise.then(data => query_1.QueryOperatorReputationSnapshotResponse.decode(new binary_1.BinaryReader(data)));
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
exports.QueryClientImpl = QueryClientImpl;
|
|
78
|
+
const createRpcQueryExtension = (base) => {
|
|
79
|
+
const rpc = (0, stargate_1.createProtobufRpcClient)(base);
|
|
80
|
+
const queryService = new QueryClientImpl(rpc);
|
|
81
|
+
return {
|
|
82
|
+
params(request) {
|
|
83
|
+
return queryService.params(request);
|
|
84
|
+
},
|
|
85
|
+
operator(request) {
|
|
86
|
+
return queryService.operator(request);
|
|
87
|
+
},
|
|
88
|
+
serviceType(request) {
|
|
89
|
+
return queryService.serviceType(request);
|
|
90
|
+
},
|
|
91
|
+
serviceTypes(request) {
|
|
92
|
+
return queryService.serviceTypes(request);
|
|
93
|
+
},
|
|
94
|
+
operators(request) {
|
|
95
|
+
return queryService.operators(request);
|
|
96
|
+
},
|
|
97
|
+
operatorsByController(request) {
|
|
98
|
+
return queryService.operatorsByController(request);
|
|
99
|
+
},
|
|
100
|
+
operatorsByServiceType(request) {
|
|
101
|
+
return queryService.operatorsByServiceType(request);
|
|
102
|
+
},
|
|
103
|
+
report(request) {
|
|
104
|
+
return queryService.report(request);
|
|
105
|
+
},
|
|
106
|
+
reportsByOperator(request) {
|
|
107
|
+
return queryService.reportsByOperator(request);
|
|
108
|
+
},
|
|
109
|
+
operatorReputationSnapshot(request) {
|
|
110
|
+
return queryService.operatorReputationSnapshot(request);
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
exports.createRpcQueryExtension = createRpcQueryExtension;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "../../../binary";
|
|
2
|
+
import { DeepPartial } from "../../../helpers";
|
|
3
|
+
/**
|
|
4
|
+
* RefileCooldown bars a controller from re-filing the same allegation
|
|
5
|
+
* against the same (operator, service_type) within
|
|
6
|
+
* `report_refile_cooldown_blocks` after a PENDING report was
|
|
7
|
+
* AUTO_DISMISSED (controller stall). See x-service-spec.md §3.4.5.
|
|
8
|
+
*
|
|
9
|
+
* Keyed by (controller, operator_address, service_type, dismissed_at)
|
|
10
|
+
* in the RefileCooldowns store; lazy expiry — entries are checked at
|
|
11
|
+
* MsgReportOperator time and pruned when expired.
|
|
12
|
+
* @name RefileCooldown
|
|
13
|
+
* @package sparkdream.service.v1
|
|
14
|
+
* @see proto type: sparkdream.service.v1.RefileCooldown
|
|
15
|
+
*/
|
|
16
|
+
export interface RefileCooldown {
|
|
17
|
+
/**
|
|
18
|
+
* controller is the bech32 address of the controller against whom the
|
|
19
|
+
* cooldown applies.
|
|
20
|
+
*/
|
|
21
|
+
controller: string;
|
|
22
|
+
/**
|
|
23
|
+
* operator_address is the operator the prior dismissed report targeted.
|
|
24
|
+
*/
|
|
25
|
+
operatorAddress: string;
|
|
26
|
+
/**
|
|
27
|
+
* service_type identifies the operator record.
|
|
28
|
+
*/
|
|
29
|
+
serviceType: string;
|
|
30
|
+
/**
|
|
31
|
+
* dismissed_at is the height the prior PENDING report was
|
|
32
|
+
* AUTO_DISMISSED. Cooldown expires at
|
|
33
|
+
* `dismissed_at + report_refile_cooldown_blocks`.
|
|
34
|
+
*/
|
|
35
|
+
dismissedAt: bigint;
|
|
36
|
+
}
|
|
37
|
+
export interface RefileCooldownProtoMsg {
|
|
38
|
+
typeUrl: "/sparkdream.service.v1.RefileCooldown";
|
|
39
|
+
value: Uint8Array;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* RefileCooldown bars a controller from re-filing the same allegation
|
|
43
|
+
* against the same (operator, service_type) within
|
|
44
|
+
* `report_refile_cooldown_blocks` after a PENDING report was
|
|
45
|
+
* AUTO_DISMISSED (controller stall). See x-service-spec.md §3.4.5.
|
|
46
|
+
*
|
|
47
|
+
* Keyed by (controller, operator_address, service_type, dismissed_at)
|
|
48
|
+
* in the RefileCooldowns store; lazy expiry — entries are checked at
|
|
49
|
+
* MsgReportOperator time and pruned when expired.
|
|
50
|
+
* @name RefileCooldownAmino
|
|
51
|
+
* @package sparkdream.service.v1
|
|
52
|
+
* @see proto type: sparkdream.service.v1.RefileCooldown
|
|
53
|
+
*/
|
|
54
|
+
export interface RefileCooldownAmino {
|
|
55
|
+
/**
|
|
56
|
+
* controller is the bech32 address of the controller against whom the
|
|
57
|
+
* cooldown applies.
|
|
58
|
+
*/
|
|
59
|
+
controller?: string;
|
|
60
|
+
/**
|
|
61
|
+
* operator_address is the operator the prior dismissed report targeted.
|
|
62
|
+
*/
|
|
63
|
+
operator_address?: string;
|
|
64
|
+
/**
|
|
65
|
+
* service_type identifies the operator record.
|
|
66
|
+
*/
|
|
67
|
+
service_type?: string;
|
|
68
|
+
/**
|
|
69
|
+
* dismissed_at is the height the prior PENDING report was
|
|
70
|
+
* AUTO_DISMISSED. Cooldown expires at
|
|
71
|
+
* `dismissed_at + report_refile_cooldown_blocks`.
|
|
72
|
+
*/
|
|
73
|
+
dismissed_at?: string;
|
|
74
|
+
}
|
|
75
|
+
export interface RefileCooldownAminoMsg {
|
|
76
|
+
type: "sparkdream/x/service/RefileCooldown";
|
|
77
|
+
value: RefileCooldownAmino;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* RefileCooldown bars a controller from re-filing the same allegation
|
|
81
|
+
* against the same (operator, service_type) within
|
|
82
|
+
* `report_refile_cooldown_blocks` after a PENDING report was
|
|
83
|
+
* AUTO_DISMISSED (controller stall). See x-service-spec.md §3.4.5.
|
|
84
|
+
*
|
|
85
|
+
* Keyed by (controller, operator_address, service_type, dismissed_at)
|
|
86
|
+
* in the RefileCooldowns store; lazy expiry — entries are checked at
|
|
87
|
+
* MsgReportOperator time and pruned when expired.
|
|
88
|
+
* @name RefileCooldown
|
|
89
|
+
* @package sparkdream.service.v1
|
|
90
|
+
* @see proto type: sparkdream.service.v1.RefileCooldown
|
|
91
|
+
*/
|
|
92
|
+
export declare const RefileCooldown: {
|
|
93
|
+
typeUrl: string;
|
|
94
|
+
aminoType: string;
|
|
95
|
+
encode(message: RefileCooldown, writer?: BinaryWriter): BinaryWriter;
|
|
96
|
+
decode(input: BinaryReader | Uint8Array, length?: number): RefileCooldown;
|
|
97
|
+
fromPartial(object: DeepPartial<RefileCooldown>): RefileCooldown;
|
|
98
|
+
fromAmino(object: RefileCooldownAmino): RefileCooldown;
|
|
99
|
+
toAmino(message: RefileCooldown): RefileCooldownAmino;
|
|
100
|
+
fromAminoMsg(object: RefileCooldownAminoMsg): RefileCooldown;
|
|
101
|
+
toAminoMsg(message: RefileCooldown): RefileCooldownAminoMsg;
|
|
102
|
+
fromProtoMsg(message: RefileCooldownProtoMsg): RefileCooldown;
|
|
103
|
+
toProto(message: RefileCooldown): Uint8Array;
|
|
104
|
+
toProtoMsg(message: RefileCooldown): RefileCooldownProtoMsg;
|
|
105
|
+
};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RefileCooldown = void 0;
|
|
4
|
+
//@ts-nocheck
|
|
5
|
+
const binary_1 = require("../../../binary");
|
|
6
|
+
function createBaseRefileCooldown() {
|
|
7
|
+
return {
|
|
8
|
+
controller: "",
|
|
9
|
+
operatorAddress: "",
|
|
10
|
+
serviceType: "",
|
|
11
|
+
dismissedAt: BigInt(0)
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* RefileCooldown bars a controller from re-filing the same allegation
|
|
16
|
+
* against the same (operator, service_type) within
|
|
17
|
+
* `report_refile_cooldown_blocks` after a PENDING report was
|
|
18
|
+
* AUTO_DISMISSED (controller stall). See x-service-spec.md §3.4.5.
|
|
19
|
+
*
|
|
20
|
+
* Keyed by (controller, operator_address, service_type, dismissed_at)
|
|
21
|
+
* in the RefileCooldowns store; lazy expiry — entries are checked at
|
|
22
|
+
* MsgReportOperator time and pruned when expired.
|
|
23
|
+
* @name RefileCooldown
|
|
24
|
+
* @package sparkdream.service.v1
|
|
25
|
+
* @see proto type: sparkdream.service.v1.RefileCooldown
|
|
26
|
+
*/
|
|
27
|
+
exports.RefileCooldown = {
|
|
28
|
+
typeUrl: "/sparkdream.service.v1.RefileCooldown",
|
|
29
|
+
aminoType: "sparkdream/x/service/RefileCooldown",
|
|
30
|
+
encode(message, writer = binary_1.BinaryWriter.create()) {
|
|
31
|
+
if (message.controller !== "") {
|
|
32
|
+
writer.uint32(10).string(message.controller);
|
|
33
|
+
}
|
|
34
|
+
if (message.operatorAddress !== "") {
|
|
35
|
+
writer.uint32(18).string(message.operatorAddress);
|
|
36
|
+
}
|
|
37
|
+
if (message.serviceType !== "") {
|
|
38
|
+
writer.uint32(26).string(message.serviceType);
|
|
39
|
+
}
|
|
40
|
+
if (message.dismissedAt !== BigInt(0)) {
|
|
41
|
+
writer.uint32(32).int64(message.dismissedAt);
|
|
42
|
+
}
|
|
43
|
+
return writer;
|
|
44
|
+
},
|
|
45
|
+
decode(input, length) {
|
|
46
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
47
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
48
|
+
const message = createBaseRefileCooldown();
|
|
49
|
+
while (reader.pos < end) {
|
|
50
|
+
const tag = reader.uint32();
|
|
51
|
+
switch (tag >>> 3) {
|
|
52
|
+
case 1:
|
|
53
|
+
message.controller = reader.string();
|
|
54
|
+
break;
|
|
55
|
+
case 2:
|
|
56
|
+
message.operatorAddress = reader.string();
|
|
57
|
+
break;
|
|
58
|
+
case 3:
|
|
59
|
+
message.serviceType = reader.string();
|
|
60
|
+
break;
|
|
61
|
+
case 4:
|
|
62
|
+
message.dismissedAt = reader.int64();
|
|
63
|
+
break;
|
|
64
|
+
default:
|
|
65
|
+
reader.skipType(tag & 7);
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return message;
|
|
70
|
+
},
|
|
71
|
+
fromPartial(object) {
|
|
72
|
+
const message = createBaseRefileCooldown();
|
|
73
|
+
message.controller = object.controller ?? "";
|
|
74
|
+
message.operatorAddress = object.operatorAddress ?? "";
|
|
75
|
+
message.serviceType = object.serviceType ?? "";
|
|
76
|
+
message.dismissedAt = object.dismissedAt !== undefined && object.dismissedAt !== null ? BigInt(object.dismissedAt.toString()) : BigInt(0);
|
|
77
|
+
return message;
|
|
78
|
+
},
|
|
79
|
+
fromAmino(object) {
|
|
80
|
+
const message = createBaseRefileCooldown();
|
|
81
|
+
if (object.controller !== undefined && object.controller !== null) {
|
|
82
|
+
message.controller = object.controller;
|
|
83
|
+
}
|
|
84
|
+
if (object.operator_address !== undefined && object.operator_address !== null) {
|
|
85
|
+
message.operatorAddress = object.operator_address;
|
|
86
|
+
}
|
|
87
|
+
if (object.service_type !== undefined && object.service_type !== null) {
|
|
88
|
+
message.serviceType = object.service_type;
|
|
89
|
+
}
|
|
90
|
+
if (object.dismissed_at !== undefined && object.dismissed_at !== null) {
|
|
91
|
+
message.dismissedAt = BigInt(object.dismissed_at);
|
|
92
|
+
}
|
|
93
|
+
return message;
|
|
94
|
+
},
|
|
95
|
+
toAmino(message) {
|
|
96
|
+
const obj = {};
|
|
97
|
+
obj.controller = message.controller === "" ? undefined : message.controller;
|
|
98
|
+
obj.operator_address = message.operatorAddress === "" ? undefined : message.operatorAddress;
|
|
99
|
+
obj.service_type = message.serviceType === "" ? undefined : message.serviceType;
|
|
100
|
+
obj.dismissed_at = message.dismissedAt !== BigInt(0) ? message.dismissedAt?.toString() : undefined;
|
|
101
|
+
return obj;
|
|
102
|
+
},
|
|
103
|
+
fromAminoMsg(object) {
|
|
104
|
+
return exports.RefileCooldown.fromAmino(object.value);
|
|
105
|
+
},
|
|
106
|
+
toAminoMsg(message) {
|
|
107
|
+
return {
|
|
108
|
+
type: "sparkdream/x/service/RefileCooldown",
|
|
109
|
+
value: exports.RefileCooldown.toAmino(message)
|
|
110
|
+
};
|
|
111
|
+
},
|
|
112
|
+
fromProtoMsg(message) {
|
|
113
|
+
return exports.RefileCooldown.decode(message.value);
|
|
114
|
+
},
|
|
115
|
+
toProto(message) {
|
|
116
|
+
return exports.RefileCooldown.encode(message).finish();
|
|
117
|
+
},
|
|
118
|
+
toProtoMsg(message) {
|
|
119
|
+
return {
|
|
120
|
+
typeUrl: "/sparkdream.service.v1.RefileCooldown",
|
|
121
|
+
value: exports.RefileCooldown.encode(message).finish()
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
};
|