blue-js-sdk 2.0.0
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/CHANGELOG.md +446 -0
- package/LICENSE +21 -0
- package/README.md +75 -0
- package/ai-path/ADMIN-ELEVATION.md +116 -0
- package/ai-path/AI-MANIFESTO.md +185 -0
- package/ai-path/BREAKING.md +74 -0
- package/ai-path/CHECKLIST.md +619 -0
- package/ai-path/CONNECTION-STEPS.md +724 -0
- package/ai-path/DECISION-TREE.md +378 -0
- package/ai-path/DEPENDENCIES.md +459 -0
- package/ai-path/E2E-FLOW.md +1555 -0
- package/ai-path/FAILURES.md +403 -0
- package/ai-path/GUIDE.md +1217 -0
- package/ai-path/README.md +558 -0
- package/ai-path/SPLIT-TUNNEL.md +266 -0
- package/ai-path/cli.js +535 -0
- package/ai-path/connect.js +884 -0
- package/ai-path/discover.js +178 -0
- package/ai-path/environment.js +266 -0
- package/ai-path/errors.js +86 -0
- package/ai-path/examples/autonomous-agent.mjs +220 -0
- package/ai-path/examples/multi-region.mjs +174 -0
- package/ai-path/examples/one-shot.mjs +31 -0
- package/ai-path/index.js +60 -0
- package/ai-path/pricing.js +136 -0
- package/ai-path/recommend.js +413 -0
- package/ai-path/run-admin.vbs +25 -0
- package/ai-path/setup.js +291 -0
- package/ai-path/wallet.js +137 -0
- package/app-helpers.js +363 -0
- package/app-settings.js +95 -0
- package/app-types.js +267 -0
- package/audit.js +847 -0
- package/batch.js +293 -0
- package/bin/setup.js +376 -0
- package/chain/authz.js +109 -0
- package/chain/broadcast.js +472 -0
- package/chain/client.js +160 -0
- package/chain/fee-grants.js +305 -0
- package/chain/index.js +891 -0
- package/chain/lcd.js +313 -0
- package/chain/queries.js +547 -0
- package/chain/rpc.js +408 -0
- package/chain/wallet.js +141 -0
- package/cli/config.js +143 -0
- package/cli/index.js +463 -0
- package/cli/output.js +182 -0
- package/cli.js +491 -0
- package/client/index.js +251 -0
- package/client.js +271 -0
- package/config/index.js +255 -0
- package/connection/connect.js +849 -0
- package/connection/disconnect.js +180 -0
- package/connection/discovery.js +321 -0
- package/connection/index.js +76 -0
- package/connection/proxy.js +148 -0
- package/connection/resilience.js +428 -0
- package/connection/security.js +232 -0
- package/connection/state.js +369 -0
- package/connection/tunnel.js +691 -0
- package/consumer.js +132 -0
- package/cosmjs-setup.js +1884 -0
- package/defaults.js +366 -0
- package/disk-cache.js +107 -0
- package/dist/client.d.ts +108 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +400 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/errors/index.js +112 -0
- package/errors.js +218 -0
- package/examples/README.md +64 -0
- package/examples/connect-direct.mjs +106 -0
- package/examples/connect-plan.mjs +125 -0
- package/examples/error-handling.mjs +109 -0
- package/examples/query-nodes.mjs +94 -0
- package/examples/wallet-basics.mjs +61 -0
- package/generated/amino/amino.ts +9 -0
- package/generated/cosmos/base/v1beta1/coin.ts +365 -0
- package/generated/cosmos_proto/cosmos.ts +323 -0
- package/generated/gogoproto/gogo.ts +9 -0
- package/generated/google/protobuf/descriptor.ts +7601 -0
- package/generated/google/protobuf/duration.ts +208 -0
- package/generated/google/protobuf/timestamp.ts +238 -0
- package/generated/sentinel/lease/v1/events.ts +924 -0
- package/generated/sentinel/lease/v1/lease.ts +292 -0
- package/generated/sentinel/lease/v1/msg.ts +949 -0
- package/generated/sentinel/lease/v1/params.ts +164 -0
- package/generated/sentinel/node/v3/events.ts +881 -0
- package/generated/sentinel/node/v3/msg.ts +1002 -0
- package/generated/sentinel/node/v3/node.ts +263 -0
- package/generated/sentinel/node/v3/params.ts +183 -0
- package/generated/sentinel/plan/v3/events.ts +675 -0
- package/generated/sentinel/plan/v3/msg.ts +1191 -0
- package/generated/sentinel/plan/v3/plan.ts +283 -0
- package/generated/sentinel/provider/v2/events.ts +171 -0
- package/generated/sentinel/provider/v2/msg.ts +480 -0
- package/generated/sentinel/provider/v2/params.ts +131 -0
- package/generated/sentinel/provider/v2/provider.ts +246 -0
- package/generated/sentinel/session/v3/events.ts +480 -0
- package/generated/sentinel/session/v3/msg.ts +616 -0
- package/generated/sentinel/session/v3/params.ts +260 -0
- package/generated/sentinel/session/v3/proof.ts +180 -0
- package/generated/sentinel/session/v3/session.ts +384 -0
- package/generated/sentinel/subscription/v3/events.ts +1181 -0
- package/generated/sentinel/subscription/v3/msg.ts +1305 -0
- package/generated/sentinel/subscription/v3/params.ts +167 -0
- package/generated/sentinel/subscription/v3/subscription.ts +315 -0
- package/generated/sentinel/types/v1/bandwidth.ts +124 -0
- package/generated/sentinel/types/v1/price.ts +149 -0
- package/generated/sentinel/types/v1/renewal.ts +87 -0
- package/generated/sentinel/types/v1/status.ts +54 -0
- package/generated/typeRegistry.ts +27 -0
- package/index.js +486 -0
- package/node-connect.js +3015 -0
- package/operator.js +134 -0
- package/package.json +113 -0
- package/plan-operations.js +199 -0
- package/preflight.js +352 -0
- package/pricing/index.js +262 -0
- package/proto/amino/amino.proto +84 -0
- package/proto/cosmos/base/v1beta1/coin.proto +61 -0
- package/proto/cosmos_proto/cosmos.proto +112 -0
- package/proto/gogoproto/gogo.proto +145 -0
- package/proto/google/api/annotations.proto +31 -0
- package/proto/google/api/http.proto +370 -0
- package/proto/google/protobuf/any.proto +106 -0
- package/proto/google/protobuf/duration.proto +115 -0
- package/proto/google/protobuf/timestamp.proto +145 -0
- package/proto/sentinel/lease/v1/events.proto +52 -0
- package/proto/sentinel/lease/v1/genesis.proto +15 -0
- package/proto/sentinel/lease/v1/lease.proto +25 -0
- package/proto/sentinel/lease/v1/msg.proto +62 -0
- package/proto/sentinel/lease/v1/params.proto +17 -0
- package/proto/sentinel/node/v3/events.proto +50 -0
- package/proto/sentinel/node/v3/genesis.proto +15 -0
- package/proto/sentinel/node/v3/msg.proto +63 -0
- package/proto/sentinel/node/v3/node.proto +27 -0
- package/proto/sentinel/node/v3/params.proto +21 -0
- package/proto/sentinel/node/v3/querier.proto +63 -0
- package/proto/sentinel/plan/v3/events.proto +41 -0
- package/proto/sentinel/plan/v3/genesis.proto +21 -0
- package/proto/sentinel/plan/v3/msg.proto +83 -0
- package/proto/sentinel/plan/v3/plan.proto +32 -0
- package/proto/sentinel/plan/v3/querier.proto +53 -0
- package/proto/sentinel/provider/v2/events.proto +16 -0
- package/proto/sentinel/provider/v2/genesis.proto +15 -0
- package/proto/sentinel/provider/v2/msg.proto +35 -0
- package/proto/sentinel/provider/v2/params.proto +17 -0
- package/proto/sentinel/provider/v2/provider.proto +24 -0
- package/proto/sentinel/provider/v3/genesis.proto +15 -0
- package/proto/sentinel/provider/v3/params.proto +13 -0
- package/proto/sentinel/session/v3/events.proto +30 -0
- package/proto/sentinel/session/v3/genesis.proto +15 -0
- package/proto/sentinel/session/v3/msg.proto +50 -0
- package/proto/sentinel/session/v3/params.proto +25 -0
- package/proto/sentinel/session/v3/proof.proto +25 -0
- package/proto/sentinel/session/v3/querier.proto +100 -0
- package/proto/sentinel/session/v3/session.proto +50 -0
- package/proto/sentinel/subscription/v2/allocation.proto +21 -0
- package/proto/sentinel/subscription/v2/payout.proto +22 -0
- package/proto/sentinel/subscription/v3/events.proto +65 -0
- package/proto/sentinel/subscription/v3/genesis.proto +17 -0
- package/proto/sentinel/subscription/v3/msg.proto +83 -0
- package/proto/sentinel/subscription/v3/params.proto +21 -0
- package/proto/sentinel/subscription/v3/subscription.proto +33 -0
- package/proto/sentinel/types/v1/bandwidth.proto +19 -0
- package/proto/sentinel/types/v1/price.proto +21 -0
- package/proto/sentinel/types/v1/renewal.proto +21 -0
- package/proto/sentinel/types/v1/status.proto +16 -0
- package/protocol/encoding.js +341 -0
- package/protocol/events.js +361 -0
- package/protocol/handshake.js +297 -0
- package/protocol/index.js +15 -0
- package/protocol/messages.js +346 -0
- package/protocol/plans.js +199 -0
- package/protocol/v2ray.js +268 -0
- package/protocol/v3.js +723 -0
- package/protocol/wireguard.js +125 -0
- package/security/index.js +132 -0
- package/session-manager.js +329 -0
- package/session-tracker.js +80 -0
- package/setup.js +376 -0
- package/speedtest/index.js +528 -0
- package/speedtest.js +567 -0
- package/src/client.ts +502 -0
- package/src/index.ts +20 -0
- package/state/index.js +347 -0
- package/state.js +516 -0
- package/test-all-chain-ops.js +493 -0
- package/test-all-logic.js +199 -0
- package/test-all-msg-types.js +292 -0
- package/test-every-connection.js +208 -0
- package/test-feegrant-connect.js +98 -0
- package/test-logic.js +148 -0
- package/test-mainnet.js +176 -0
- package/test-plan-lifecycle.js +335 -0
- package/tls-trust.js +132 -0
- package/tsconfig.build.json +20 -0
- package/tsconfig.json +34 -0
- package/types/chain.d.ts +746 -0
- package/types/connection.d.ts +425 -0
- package/types/errors.d.ts +174 -0
- package/types/index.d.ts +1380 -0
- package/types/nodes.d.ts +187 -0
- package/types/pricing.d.ts +156 -0
- package/types/protocol.d.ts +332 -0
- package/types/session.d.ts +236 -0
- package/types/settings.d.ts +192 -0
- package/v3protocol.js +1053 -0
- package/wallet/index.js +153 -0
- package/wireguard.js +307 -0
|
@@ -0,0 +1,1191 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.11.6
|
|
4
|
+
// protoc v7.34.0
|
|
5
|
+
// source: sentinel/plan/v3/msg.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
9
|
+
import { Duration } from "../../../google/protobuf/duration";
|
|
10
|
+
import { messageTypeRegistry } from "../../../typeRegistry";
|
|
11
|
+
import { Price } from "../../types/v1/price";
|
|
12
|
+
import { RenewalPricePolicy, renewalPricePolicyFromJSON, renewalPricePolicyToJSON } from "../../types/v1/renewal";
|
|
13
|
+
import { Status, statusFromJSON, statusToJSON } from "../../types/v1/status";
|
|
14
|
+
|
|
15
|
+
export const protobufPackage = "sentinel.plan.v3";
|
|
16
|
+
|
|
17
|
+
export interface MsgCreatePlanRequest {
|
|
18
|
+
$type: "sentinel.plan.v3.MsgCreatePlanRequest";
|
|
19
|
+
from: string;
|
|
20
|
+
bytes: string;
|
|
21
|
+
duration: Duration | undefined;
|
|
22
|
+
prices: Price[];
|
|
23
|
+
private: boolean;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface MsgLinkNodeRequest {
|
|
27
|
+
$type: "sentinel.plan.v3.MsgLinkNodeRequest";
|
|
28
|
+
from: string;
|
|
29
|
+
id: number;
|
|
30
|
+
nodeAddress: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface MsgUnlinkNodeRequest {
|
|
34
|
+
$type: "sentinel.plan.v3.MsgUnlinkNodeRequest";
|
|
35
|
+
from: string;
|
|
36
|
+
id: number;
|
|
37
|
+
nodeAddress: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface MsgUpdatePlanDetailsRequest {
|
|
41
|
+
$type: "sentinel.plan.v3.MsgUpdatePlanDetailsRequest";
|
|
42
|
+
from: string;
|
|
43
|
+
id: number;
|
|
44
|
+
private: boolean;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface MsgUpdatePlanStatusRequest {
|
|
48
|
+
$type: "sentinel.plan.v3.MsgUpdatePlanStatusRequest";
|
|
49
|
+
from: string;
|
|
50
|
+
id: number;
|
|
51
|
+
status: Status;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface MsgStartSessionRequest {
|
|
55
|
+
$type: "sentinel.plan.v3.MsgStartSessionRequest";
|
|
56
|
+
from: string;
|
|
57
|
+
id: number;
|
|
58
|
+
denom: string;
|
|
59
|
+
renewalPricePolicy: RenewalPricePolicy;
|
|
60
|
+
nodeAddress: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface MsgCreatePlanResponse {
|
|
64
|
+
$type: "sentinel.plan.v3.MsgCreatePlanResponse";
|
|
65
|
+
id: number;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface MsgLinkNodeResponse {
|
|
69
|
+
$type: "sentinel.plan.v3.MsgLinkNodeResponse";
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface MsgUnlinkNodeResponse {
|
|
73
|
+
$type: "sentinel.plan.v3.MsgUnlinkNodeResponse";
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface MsgUpdatePlanDetailsResponse {
|
|
77
|
+
$type: "sentinel.plan.v3.MsgUpdatePlanDetailsResponse";
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface MsgUpdatePlanStatusResponse {
|
|
81
|
+
$type: "sentinel.plan.v3.MsgUpdatePlanStatusResponse";
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface MsgStartSessionResponse {
|
|
85
|
+
$type: "sentinel.plan.v3.MsgStartSessionResponse";
|
|
86
|
+
id: number;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function createBaseMsgCreatePlanRequest(): MsgCreatePlanRequest {
|
|
90
|
+
return {
|
|
91
|
+
$type: "sentinel.plan.v3.MsgCreatePlanRequest",
|
|
92
|
+
from: "",
|
|
93
|
+
bytes: "",
|
|
94
|
+
duration: undefined,
|
|
95
|
+
prices: [],
|
|
96
|
+
private: false,
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export const MsgCreatePlanRequest: MessageFns<MsgCreatePlanRequest, "sentinel.plan.v3.MsgCreatePlanRequest"> = {
|
|
101
|
+
$type: "sentinel.plan.v3.MsgCreatePlanRequest" as const,
|
|
102
|
+
|
|
103
|
+
encode(message: MsgCreatePlanRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
104
|
+
if (message.from !== "") {
|
|
105
|
+
writer.uint32(10).string(message.from);
|
|
106
|
+
}
|
|
107
|
+
if (message.bytes !== "") {
|
|
108
|
+
writer.uint32(18).string(message.bytes);
|
|
109
|
+
}
|
|
110
|
+
if (message.duration !== undefined) {
|
|
111
|
+
Duration.encode(message.duration, writer.uint32(26).fork()).join();
|
|
112
|
+
}
|
|
113
|
+
for (const v of message.prices) {
|
|
114
|
+
Price.encode(v!, writer.uint32(34).fork()).join();
|
|
115
|
+
}
|
|
116
|
+
if (message.private !== false) {
|
|
117
|
+
writer.uint32(40).bool(message.private);
|
|
118
|
+
}
|
|
119
|
+
return writer;
|
|
120
|
+
},
|
|
121
|
+
|
|
122
|
+
decode(input: BinaryReader | Uint8Array, length?: number): MsgCreatePlanRequest {
|
|
123
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
124
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
125
|
+
const message = createBaseMsgCreatePlanRequest();
|
|
126
|
+
while (reader.pos < end) {
|
|
127
|
+
const tag = reader.uint32();
|
|
128
|
+
switch (tag >>> 3) {
|
|
129
|
+
case 1: {
|
|
130
|
+
if (tag !== 10) {
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
message.from = reader.string();
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
case 2: {
|
|
138
|
+
if (tag !== 18) {
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
message.bytes = reader.string();
|
|
143
|
+
continue;
|
|
144
|
+
}
|
|
145
|
+
case 3: {
|
|
146
|
+
if (tag !== 26) {
|
|
147
|
+
break;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
message.duration = Duration.decode(reader, reader.uint32());
|
|
151
|
+
continue;
|
|
152
|
+
}
|
|
153
|
+
case 4: {
|
|
154
|
+
if (tag !== 34) {
|
|
155
|
+
break;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
message.prices.push(Price.decode(reader, reader.uint32()));
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
case 5: {
|
|
162
|
+
if (tag !== 40) {
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
message.private = reader.bool();
|
|
167
|
+
continue;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
171
|
+
break;
|
|
172
|
+
}
|
|
173
|
+
reader.skip(tag & 7);
|
|
174
|
+
}
|
|
175
|
+
return message;
|
|
176
|
+
},
|
|
177
|
+
|
|
178
|
+
fromJSON(object: any): MsgCreatePlanRequest {
|
|
179
|
+
return {
|
|
180
|
+
$type: MsgCreatePlanRequest.$type,
|
|
181
|
+
from: isSet(object.from) ? globalThis.String(object.from) : "",
|
|
182
|
+
bytes: isSet(object.bytes) ? globalThis.String(object.bytes) : "",
|
|
183
|
+
duration: isSet(object.duration) ? Duration.fromJSON(object.duration) : undefined,
|
|
184
|
+
prices: globalThis.Array.isArray(object?.prices) ? object.prices.map((e: any) => Price.fromJSON(e)) : [],
|
|
185
|
+
private: isSet(object.private) ? globalThis.Boolean(object.private) : false,
|
|
186
|
+
};
|
|
187
|
+
},
|
|
188
|
+
|
|
189
|
+
toJSON(message: MsgCreatePlanRequest): unknown {
|
|
190
|
+
const obj: any = {};
|
|
191
|
+
if (message.from !== "") {
|
|
192
|
+
obj.from = message.from;
|
|
193
|
+
}
|
|
194
|
+
if (message.bytes !== "") {
|
|
195
|
+
obj.bytes = message.bytes;
|
|
196
|
+
}
|
|
197
|
+
if (message.duration !== undefined) {
|
|
198
|
+
obj.duration = Duration.toJSON(message.duration);
|
|
199
|
+
}
|
|
200
|
+
if (message.prices?.length) {
|
|
201
|
+
obj.prices = message.prices.map((e) => Price.toJSON(e));
|
|
202
|
+
}
|
|
203
|
+
if (message.private !== false) {
|
|
204
|
+
obj.private = message.private;
|
|
205
|
+
}
|
|
206
|
+
return obj;
|
|
207
|
+
},
|
|
208
|
+
|
|
209
|
+
create<I extends Exact<DeepPartial<MsgCreatePlanRequest>, I>>(base?: I): MsgCreatePlanRequest {
|
|
210
|
+
return MsgCreatePlanRequest.fromPartial(base ?? ({} as any));
|
|
211
|
+
},
|
|
212
|
+
fromPartial<I extends Exact<DeepPartial<MsgCreatePlanRequest>, I>>(object: I): MsgCreatePlanRequest {
|
|
213
|
+
const message = createBaseMsgCreatePlanRequest();
|
|
214
|
+
message.from = object.from ?? "";
|
|
215
|
+
message.bytes = object.bytes ?? "";
|
|
216
|
+
message.duration = (object.duration !== undefined && object.duration !== null)
|
|
217
|
+
? Duration.fromPartial(object.duration)
|
|
218
|
+
: undefined;
|
|
219
|
+
message.prices = object.prices?.map((e) => Price.fromPartial(e)) || [];
|
|
220
|
+
message.private = object.private ?? false;
|
|
221
|
+
return message;
|
|
222
|
+
},
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
messageTypeRegistry.set(MsgCreatePlanRequest.$type, MsgCreatePlanRequest);
|
|
226
|
+
|
|
227
|
+
function createBaseMsgLinkNodeRequest(): MsgLinkNodeRequest {
|
|
228
|
+
return { $type: "sentinel.plan.v3.MsgLinkNodeRequest", from: "", id: 0, nodeAddress: "" };
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export const MsgLinkNodeRequest: MessageFns<MsgLinkNodeRequest, "sentinel.plan.v3.MsgLinkNodeRequest"> = {
|
|
232
|
+
$type: "sentinel.plan.v3.MsgLinkNodeRequest" as const,
|
|
233
|
+
|
|
234
|
+
encode(message: MsgLinkNodeRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
235
|
+
if (message.from !== "") {
|
|
236
|
+
writer.uint32(10).string(message.from);
|
|
237
|
+
}
|
|
238
|
+
if (message.id !== 0) {
|
|
239
|
+
writer.uint32(16).uint64(message.id);
|
|
240
|
+
}
|
|
241
|
+
if (message.nodeAddress !== "") {
|
|
242
|
+
writer.uint32(26).string(message.nodeAddress);
|
|
243
|
+
}
|
|
244
|
+
return writer;
|
|
245
|
+
},
|
|
246
|
+
|
|
247
|
+
decode(input: BinaryReader | Uint8Array, length?: number): MsgLinkNodeRequest {
|
|
248
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
249
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
250
|
+
const message = createBaseMsgLinkNodeRequest();
|
|
251
|
+
while (reader.pos < end) {
|
|
252
|
+
const tag = reader.uint32();
|
|
253
|
+
switch (tag >>> 3) {
|
|
254
|
+
case 1: {
|
|
255
|
+
if (tag !== 10) {
|
|
256
|
+
break;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
message.from = reader.string();
|
|
260
|
+
continue;
|
|
261
|
+
}
|
|
262
|
+
case 2: {
|
|
263
|
+
if (tag !== 16) {
|
|
264
|
+
break;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
message.id = longToNumber(reader.uint64());
|
|
268
|
+
continue;
|
|
269
|
+
}
|
|
270
|
+
case 3: {
|
|
271
|
+
if (tag !== 26) {
|
|
272
|
+
break;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
message.nodeAddress = reader.string();
|
|
276
|
+
continue;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
280
|
+
break;
|
|
281
|
+
}
|
|
282
|
+
reader.skip(tag & 7);
|
|
283
|
+
}
|
|
284
|
+
return message;
|
|
285
|
+
},
|
|
286
|
+
|
|
287
|
+
fromJSON(object: any): MsgLinkNodeRequest {
|
|
288
|
+
return {
|
|
289
|
+
$type: MsgLinkNodeRequest.$type,
|
|
290
|
+
from: isSet(object.from) ? globalThis.String(object.from) : "",
|
|
291
|
+
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
|
|
292
|
+
nodeAddress: isSet(object.nodeAddress)
|
|
293
|
+
? globalThis.String(object.nodeAddress)
|
|
294
|
+
: isSet(object.node_address)
|
|
295
|
+
? globalThis.String(object.node_address)
|
|
296
|
+
: "",
|
|
297
|
+
};
|
|
298
|
+
},
|
|
299
|
+
|
|
300
|
+
toJSON(message: MsgLinkNodeRequest): unknown {
|
|
301
|
+
const obj: any = {};
|
|
302
|
+
if (message.from !== "") {
|
|
303
|
+
obj.from = message.from;
|
|
304
|
+
}
|
|
305
|
+
if (message.id !== 0) {
|
|
306
|
+
obj.id = Math.round(message.id);
|
|
307
|
+
}
|
|
308
|
+
if (message.nodeAddress !== "") {
|
|
309
|
+
obj.nodeAddress = message.nodeAddress;
|
|
310
|
+
}
|
|
311
|
+
return obj;
|
|
312
|
+
},
|
|
313
|
+
|
|
314
|
+
create<I extends Exact<DeepPartial<MsgLinkNodeRequest>, I>>(base?: I): MsgLinkNodeRequest {
|
|
315
|
+
return MsgLinkNodeRequest.fromPartial(base ?? ({} as any));
|
|
316
|
+
},
|
|
317
|
+
fromPartial<I extends Exact<DeepPartial<MsgLinkNodeRequest>, I>>(object: I): MsgLinkNodeRequest {
|
|
318
|
+
const message = createBaseMsgLinkNodeRequest();
|
|
319
|
+
message.from = object.from ?? "";
|
|
320
|
+
message.id = object.id ?? 0;
|
|
321
|
+
message.nodeAddress = object.nodeAddress ?? "";
|
|
322
|
+
return message;
|
|
323
|
+
},
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
messageTypeRegistry.set(MsgLinkNodeRequest.$type, MsgLinkNodeRequest);
|
|
327
|
+
|
|
328
|
+
function createBaseMsgUnlinkNodeRequest(): MsgUnlinkNodeRequest {
|
|
329
|
+
return { $type: "sentinel.plan.v3.MsgUnlinkNodeRequest", from: "", id: 0, nodeAddress: "" };
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
export const MsgUnlinkNodeRequest: MessageFns<MsgUnlinkNodeRequest, "sentinel.plan.v3.MsgUnlinkNodeRequest"> = {
|
|
333
|
+
$type: "sentinel.plan.v3.MsgUnlinkNodeRequest" as const,
|
|
334
|
+
|
|
335
|
+
encode(message: MsgUnlinkNodeRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
336
|
+
if (message.from !== "") {
|
|
337
|
+
writer.uint32(10).string(message.from);
|
|
338
|
+
}
|
|
339
|
+
if (message.id !== 0) {
|
|
340
|
+
writer.uint32(16).uint64(message.id);
|
|
341
|
+
}
|
|
342
|
+
if (message.nodeAddress !== "") {
|
|
343
|
+
writer.uint32(26).string(message.nodeAddress);
|
|
344
|
+
}
|
|
345
|
+
return writer;
|
|
346
|
+
},
|
|
347
|
+
|
|
348
|
+
decode(input: BinaryReader | Uint8Array, length?: number): MsgUnlinkNodeRequest {
|
|
349
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
350
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
351
|
+
const message = createBaseMsgUnlinkNodeRequest();
|
|
352
|
+
while (reader.pos < end) {
|
|
353
|
+
const tag = reader.uint32();
|
|
354
|
+
switch (tag >>> 3) {
|
|
355
|
+
case 1: {
|
|
356
|
+
if (tag !== 10) {
|
|
357
|
+
break;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
message.from = reader.string();
|
|
361
|
+
continue;
|
|
362
|
+
}
|
|
363
|
+
case 2: {
|
|
364
|
+
if (tag !== 16) {
|
|
365
|
+
break;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
message.id = longToNumber(reader.uint64());
|
|
369
|
+
continue;
|
|
370
|
+
}
|
|
371
|
+
case 3: {
|
|
372
|
+
if (tag !== 26) {
|
|
373
|
+
break;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
message.nodeAddress = reader.string();
|
|
377
|
+
continue;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
381
|
+
break;
|
|
382
|
+
}
|
|
383
|
+
reader.skip(tag & 7);
|
|
384
|
+
}
|
|
385
|
+
return message;
|
|
386
|
+
},
|
|
387
|
+
|
|
388
|
+
fromJSON(object: any): MsgUnlinkNodeRequest {
|
|
389
|
+
return {
|
|
390
|
+
$type: MsgUnlinkNodeRequest.$type,
|
|
391
|
+
from: isSet(object.from) ? globalThis.String(object.from) : "",
|
|
392
|
+
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
|
|
393
|
+
nodeAddress: isSet(object.nodeAddress)
|
|
394
|
+
? globalThis.String(object.nodeAddress)
|
|
395
|
+
: isSet(object.node_address)
|
|
396
|
+
? globalThis.String(object.node_address)
|
|
397
|
+
: "",
|
|
398
|
+
};
|
|
399
|
+
},
|
|
400
|
+
|
|
401
|
+
toJSON(message: MsgUnlinkNodeRequest): unknown {
|
|
402
|
+
const obj: any = {};
|
|
403
|
+
if (message.from !== "") {
|
|
404
|
+
obj.from = message.from;
|
|
405
|
+
}
|
|
406
|
+
if (message.id !== 0) {
|
|
407
|
+
obj.id = Math.round(message.id);
|
|
408
|
+
}
|
|
409
|
+
if (message.nodeAddress !== "") {
|
|
410
|
+
obj.nodeAddress = message.nodeAddress;
|
|
411
|
+
}
|
|
412
|
+
return obj;
|
|
413
|
+
},
|
|
414
|
+
|
|
415
|
+
create<I extends Exact<DeepPartial<MsgUnlinkNodeRequest>, I>>(base?: I): MsgUnlinkNodeRequest {
|
|
416
|
+
return MsgUnlinkNodeRequest.fromPartial(base ?? ({} as any));
|
|
417
|
+
},
|
|
418
|
+
fromPartial<I extends Exact<DeepPartial<MsgUnlinkNodeRequest>, I>>(object: I): MsgUnlinkNodeRequest {
|
|
419
|
+
const message = createBaseMsgUnlinkNodeRequest();
|
|
420
|
+
message.from = object.from ?? "";
|
|
421
|
+
message.id = object.id ?? 0;
|
|
422
|
+
message.nodeAddress = object.nodeAddress ?? "";
|
|
423
|
+
return message;
|
|
424
|
+
},
|
|
425
|
+
};
|
|
426
|
+
|
|
427
|
+
messageTypeRegistry.set(MsgUnlinkNodeRequest.$type, MsgUnlinkNodeRequest);
|
|
428
|
+
|
|
429
|
+
function createBaseMsgUpdatePlanDetailsRequest(): MsgUpdatePlanDetailsRequest {
|
|
430
|
+
return { $type: "sentinel.plan.v3.MsgUpdatePlanDetailsRequest", from: "", id: 0, private: false };
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
export const MsgUpdatePlanDetailsRequest: MessageFns<
|
|
434
|
+
MsgUpdatePlanDetailsRequest,
|
|
435
|
+
"sentinel.plan.v3.MsgUpdatePlanDetailsRequest"
|
|
436
|
+
> = {
|
|
437
|
+
$type: "sentinel.plan.v3.MsgUpdatePlanDetailsRequest" as const,
|
|
438
|
+
|
|
439
|
+
encode(message: MsgUpdatePlanDetailsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
440
|
+
if (message.from !== "") {
|
|
441
|
+
writer.uint32(10).string(message.from);
|
|
442
|
+
}
|
|
443
|
+
if (message.id !== 0) {
|
|
444
|
+
writer.uint32(16).uint64(message.id);
|
|
445
|
+
}
|
|
446
|
+
if (message.private !== false) {
|
|
447
|
+
writer.uint32(24).bool(message.private);
|
|
448
|
+
}
|
|
449
|
+
return writer;
|
|
450
|
+
},
|
|
451
|
+
|
|
452
|
+
decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdatePlanDetailsRequest {
|
|
453
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
454
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
455
|
+
const message = createBaseMsgUpdatePlanDetailsRequest();
|
|
456
|
+
while (reader.pos < end) {
|
|
457
|
+
const tag = reader.uint32();
|
|
458
|
+
switch (tag >>> 3) {
|
|
459
|
+
case 1: {
|
|
460
|
+
if (tag !== 10) {
|
|
461
|
+
break;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
message.from = reader.string();
|
|
465
|
+
continue;
|
|
466
|
+
}
|
|
467
|
+
case 2: {
|
|
468
|
+
if (tag !== 16) {
|
|
469
|
+
break;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
message.id = longToNumber(reader.uint64());
|
|
473
|
+
continue;
|
|
474
|
+
}
|
|
475
|
+
case 3: {
|
|
476
|
+
if (tag !== 24) {
|
|
477
|
+
break;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
message.private = reader.bool();
|
|
481
|
+
continue;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
485
|
+
break;
|
|
486
|
+
}
|
|
487
|
+
reader.skip(tag & 7);
|
|
488
|
+
}
|
|
489
|
+
return message;
|
|
490
|
+
},
|
|
491
|
+
|
|
492
|
+
fromJSON(object: any): MsgUpdatePlanDetailsRequest {
|
|
493
|
+
return {
|
|
494
|
+
$type: MsgUpdatePlanDetailsRequest.$type,
|
|
495
|
+
from: isSet(object.from) ? globalThis.String(object.from) : "",
|
|
496
|
+
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
|
|
497
|
+
private: isSet(object.private) ? globalThis.Boolean(object.private) : false,
|
|
498
|
+
};
|
|
499
|
+
},
|
|
500
|
+
|
|
501
|
+
toJSON(message: MsgUpdatePlanDetailsRequest): unknown {
|
|
502
|
+
const obj: any = {};
|
|
503
|
+
if (message.from !== "") {
|
|
504
|
+
obj.from = message.from;
|
|
505
|
+
}
|
|
506
|
+
if (message.id !== 0) {
|
|
507
|
+
obj.id = Math.round(message.id);
|
|
508
|
+
}
|
|
509
|
+
if (message.private !== false) {
|
|
510
|
+
obj.private = message.private;
|
|
511
|
+
}
|
|
512
|
+
return obj;
|
|
513
|
+
},
|
|
514
|
+
|
|
515
|
+
create<I extends Exact<DeepPartial<MsgUpdatePlanDetailsRequest>, I>>(base?: I): MsgUpdatePlanDetailsRequest {
|
|
516
|
+
return MsgUpdatePlanDetailsRequest.fromPartial(base ?? ({} as any));
|
|
517
|
+
},
|
|
518
|
+
fromPartial<I extends Exact<DeepPartial<MsgUpdatePlanDetailsRequest>, I>>(object: I): MsgUpdatePlanDetailsRequest {
|
|
519
|
+
const message = createBaseMsgUpdatePlanDetailsRequest();
|
|
520
|
+
message.from = object.from ?? "";
|
|
521
|
+
message.id = object.id ?? 0;
|
|
522
|
+
message.private = object.private ?? false;
|
|
523
|
+
return message;
|
|
524
|
+
},
|
|
525
|
+
};
|
|
526
|
+
|
|
527
|
+
messageTypeRegistry.set(MsgUpdatePlanDetailsRequest.$type, MsgUpdatePlanDetailsRequest);
|
|
528
|
+
|
|
529
|
+
function createBaseMsgUpdatePlanStatusRequest(): MsgUpdatePlanStatusRequest {
|
|
530
|
+
return { $type: "sentinel.plan.v3.MsgUpdatePlanStatusRequest", from: "", id: 0, status: 0 };
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
export const MsgUpdatePlanStatusRequest: MessageFns<
|
|
534
|
+
MsgUpdatePlanStatusRequest,
|
|
535
|
+
"sentinel.plan.v3.MsgUpdatePlanStatusRequest"
|
|
536
|
+
> = {
|
|
537
|
+
$type: "sentinel.plan.v3.MsgUpdatePlanStatusRequest" as const,
|
|
538
|
+
|
|
539
|
+
encode(message: MsgUpdatePlanStatusRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
540
|
+
if (message.from !== "") {
|
|
541
|
+
writer.uint32(10).string(message.from);
|
|
542
|
+
}
|
|
543
|
+
if (message.id !== 0) {
|
|
544
|
+
writer.uint32(16).uint64(message.id);
|
|
545
|
+
}
|
|
546
|
+
if (message.status !== 0) {
|
|
547
|
+
writer.uint32(24).int32(message.status);
|
|
548
|
+
}
|
|
549
|
+
return writer;
|
|
550
|
+
},
|
|
551
|
+
|
|
552
|
+
decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdatePlanStatusRequest {
|
|
553
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
554
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
555
|
+
const message = createBaseMsgUpdatePlanStatusRequest();
|
|
556
|
+
while (reader.pos < end) {
|
|
557
|
+
const tag = reader.uint32();
|
|
558
|
+
switch (tag >>> 3) {
|
|
559
|
+
case 1: {
|
|
560
|
+
if (tag !== 10) {
|
|
561
|
+
break;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
message.from = reader.string();
|
|
565
|
+
continue;
|
|
566
|
+
}
|
|
567
|
+
case 2: {
|
|
568
|
+
if (tag !== 16) {
|
|
569
|
+
break;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
message.id = longToNumber(reader.uint64());
|
|
573
|
+
continue;
|
|
574
|
+
}
|
|
575
|
+
case 3: {
|
|
576
|
+
if (tag !== 24) {
|
|
577
|
+
break;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
message.status = reader.int32() as any;
|
|
581
|
+
continue;
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
585
|
+
break;
|
|
586
|
+
}
|
|
587
|
+
reader.skip(tag & 7);
|
|
588
|
+
}
|
|
589
|
+
return message;
|
|
590
|
+
},
|
|
591
|
+
|
|
592
|
+
fromJSON(object: any): MsgUpdatePlanStatusRequest {
|
|
593
|
+
return {
|
|
594
|
+
$type: MsgUpdatePlanStatusRequest.$type,
|
|
595
|
+
from: isSet(object.from) ? globalThis.String(object.from) : "",
|
|
596
|
+
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
|
|
597
|
+
status: isSet(object.status) ? statusFromJSON(object.status) : 0,
|
|
598
|
+
};
|
|
599
|
+
},
|
|
600
|
+
|
|
601
|
+
toJSON(message: MsgUpdatePlanStatusRequest): unknown {
|
|
602
|
+
const obj: any = {};
|
|
603
|
+
if (message.from !== "") {
|
|
604
|
+
obj.from = message.from;
|
|
605
|
+
}
|
|
606
|
+
if (message.id !== 0) {
|
|
607
|
+
obj.id = Math.round(message.id);
|
|
608
|
+
}
|
|
609
|
+
if (message.status !== 0) {
|
|
610
|
+
obj.status = statusToJSON(message.status);
|
|
611
|
+
}
|
|
612
|
+
return obj;
|
|
613
|
+
},
|
|
614
|
+
|
|
615
|
+
create<I extends Exact<DeepPartial<MsgUpdatePlanStatusRequest>, I>>(base?: I): MsgUpdatePlanStatusRequest {
|
|
616
|
+
return MsgUpdatePlanStatusRequest.fromPartial(base ?? ({} as any));
|
|
617
|
+
},
|
|
618
|
+
fromPartial<I extends Exact<DeepPartial<MsgUpdatePlanStatusRequest>, I>>(object: I): MsgUpdatePlanStatusRequest {
|
|
619
|
+
const message = createBaseMsgUpdatePlanStatusRequest();
|
|
620
|
+
message.from = object.from ?? "";
|
|
621
|
+
message.id = object.id ?? 0;
|
|
622
|
+
message.status = object.status ?? 0;
|
|
623
|
+
return message;
|
|
624
|
+
},
|
|
625
|
+
};
|
|
626
|
+
|
|
627
|
+
messageTypeRegistry.set(MsgUpdatePlanStatusRequest.$type, MsgUpdatePlanStatusRequest);
|
|
628
|
+
|
|
629
|
+
function createBaseMsgStartSessionRequest(): MsgStartSessionRequest {
|
|
630
|
+
return {
|
|
631
|
+
$type: "sentinel.plan.v3.MsgStartSessionRequest",
|
|
632
|
+
from: "",
|
|
633
|
+
id: 0,
|
|
634
|
+
denom: "",
|
|
635
|
+
renewalPricePolicy: 0,
|
|
636
|
+
nodeAddress: "",
|
|
637
|
+
};
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
export const MsgStartSessionRequest: MessageFns<MsgStartSessionRequest, "sentinel.plan.v3.MsgStartSessionRequest"> = {
|
|
641
|
+
$type: "sentinel.plan.v3.MsgStartSessionRequest" as const,
|
|
642
|
+
|
|
643
|
+
encode(message: MsgStartSessionRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
644
|
+
if (message.from !== "") {
|
|
645
|
+
writer.uint32(10).string(message.from);
|
|
646
|
+
}
|
|
647
|
+
if (message.id !== 0) {
|
|
648
|
+
writer.uint32(16).uint64(message.id);
|
|
649
|
+
}
|
|
650
|
+
if (message.denom !== "") {
|
|
651
|
+
writer.uint32(26).string(message.denom);
|
|
652
|
+
}
|
|
653
|
+
if (message.renewalPricePolicy !== 0) {
|
|
654
|
+
writer.uint32(32).int32(message.renewalPricePolicy);
|
|
655
|
+
}
|
|
656
|
+
if (message.nodeAddress !== "") {
|
|
657
|
+
writer.uint32(42).string(message.nodeAddress);
|
|
658
|
+
}
|
|
659
|
+
return writer;
|
|
660
|
+
},
|
|
661
|
+
|
|
662
|
+
decode(input: BinaryReader | Uint8Array, length?: number): MsgStartSessionRequest {
|
|
663
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
664
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
665
|
+
const message = createBaseMsgStartSessionRequest();
|
|
666
|
+
while (reader.pos < end) {
|
|
667
|
+
const tag = reader.uint32();
|
|
668
|
+
switch (tag >>> 3) {
|
|
669
|
+
case 1: {
|
|
670
|
+
if (tag !== 10) {
|
|
671
|
+
break;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
message.from = reader.string();
|
|
675
|
+
continue;
|
|
676
|
+
}
|
|
677
|
+
case 2: {
|
|
678
|
+
if (tag !== 16) {
|
|
679
|
+
break;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
message.id = longToNumber(reader.uint64());
|
|
683
|
+
continue;
|
|
684
|
+
}
|
|
685
|
+
case 3: {
|
|
686
|
+
if (tag !== 26) {
|
|
687
|
+
break;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
message.denom = reader.string();
|
|
691
|
+
continue;
|
|
692
|
+
}
|
|
693
|
+
case 4: {
|
|
694
|
+
if (tag !== 32) {
|
|
695
|
+
break;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
message.renewalPricePolicy = reader.int32() as any;
|
|
699
|
+
continue;
|
|
700
|
+
}
|
|
701
|
+
case 5: {
|
|
702
|
+
if (tag !== 42) {
|
|
703
|
+
break;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
message.nodeAddress = reader.string();
|
|
707
|
+
continue;
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
711
|
+
break;
|
|
712
|
+
}
|
|
713
|
+
reader.skip(tag & 7);
|
|
714
|
+
}
|
|
715
|
+
return message;
|
|
716
|
+
},
|
|
717
|
+
|
|
718
|
+
fromJSON(object: any): MsgStartSessionRequest {
|
|
719
|
+
return {
|
|
720
|
+
$type: MsgStartSessionRequest.$type,
|
|
721
|
+
from: isSet(object.from) ? globalThis.String(object.from) : "",
|
|
722
|
+
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
|
|
723
|
+
denom: isSet(object.denom) ? globalThis.String(object.denom) : "",
|
|
724
|
+
renewalPricePolicy: isSet(object.renewalPricePolicy)
|
|
725
|
+
? renewalPricePolicyFromJSON(object.renewalPricePolicy)
|
|
726
|
+
: isSet(object.renewal_price_policy)
|
|
727
|
+
? renewalPricePolicyFromJSON(object.renewal_price_policy)
|
|
728
|
+
: 0,
|
|
729
|
+
nodeAddress: isSet(object.nodeAddress)
|
|
730
|
+
? globalThis.String(object.nodeAddress)
|
|
731
|
+
: isSet(object.node_address)
|
|
732
|
+
? globalThis.String(object.node_address)
|
|
733
|
+
: "",
|
|
734
|
+
};
|
|
735
|
+
},
|
|
736
|
+
|
|
737
|
+
toJSON(message: MsgStartSessionRequest): unknown {
|
|
738
|
+
const obj: any = {};
|
|
739
|
+
if (message.from !== "") {
|
|
740
|
+
obj.from = message.from;
|
|
741
|
+
}
|
|
742
|
+
if (message.id !== 0) {
|
|
743
|
+
obj.id = Math.round(message.id);
|
|
744
|
+
}
|
|
745
|
+
if (message.denom !== "") {
|
|
746
|
+
obj.denom = message.denom;
|
|
747
|
+
}
|
|
748
|
+
if (message.renewalPricePolicy !== 0) {
|
|
749
|
+
obj.renewalPricePolicy = renewalPricePolicyToJSON(message.renewalPricePolicy);
|
|
750
|
+
}
|
|
751
|
+
if (message.nodeAddress !== "") {
|
|
752
|
+
obj.nodeAddress = message.nodeAddress;
|
|
753
|
+
}
|
|
754
|
+
return obj;
|
|
755
|
+
},
|
|
756
|
+
|
|
757
|
+
create<I extends Exact<DeepPartial<MsgStartSessionRequest>, I>>(base?: I): MsgStartSessionRequest {
|
|
758
|
+
return MsgStartSessionRequest.fromPartial(base ?? ({} as any));
|
|
759
|
+
},
|
|
760
|
+
fromPartial<I extends Exact<DeepPartial<MsgStartSessionRequest>, I>>(object: I): MsgStartSessionRequest {
|
|
761
|
+
const message = createBaseMsgStartSessionRequest();
|
|
762
|
+
message.from = object.from ?? "";
|
|
763
|
+
message.id = object.id ?? 0;
|
|
764
|
+
message.denom = object.denom ?? "";
|
|
765
|
+
message.renewalPricePolicy = object.renewalPricePolicy ?? 0;
|
|
766
|
+
message.nodeAddress = object.nodeAddress ?? "";
|
|
767
|
+
return message;
|
|
768
|
+
},
|
|
769
|
+
};
|
|
770
|
+
|
|
771
|
+
messageTypeRegistry.set(MsgStartSessionRequest.$type, MsgStartSessionRequest);
|
|
772
|
+
|
|
773
|
+
function createBaseMsgCreatePlanResponse(): MsgCreatePlanResponse {
|
|
774
|
+
return { $type: "sentinel.plan.v3.MsgCreatePlanResponse", id: 0 };
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
export const MsgCreatePlanResponse: MessageFns<MsgCreatePlanResponse, "sentinel.plan.v3.MsgCreatePlanResponse"> = {
|
|
778
|
+
$type: "sentinel.plan.v3.MsgCreatePlanResponse" as const,
|
|
779
|
+
|
|
780
|
+
encode(message: MsgCreatePlanResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
781
|
+
if (message.id !== 0) {
|
|
782
|
+
writer.uint32(8).uint64(message.id);
|
|
783
|
+
}
|
|
784
|
+
return writer;
|
|
785
|
+
},
|
|
786
|
+
|
|
787
|
+
decode(input: BinaryReader | Uint8Array, length?: number): MsgCreatePlanResponse {
|
|
788
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
789
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
790
|
+
const message = createBaseMsgCreatePlanResponse();
|
|
791
|
+
while (reader.pos < end) {
|
|
792
|
+
const tag = reader.uint32();
|
|
793
|
+
switch (tag >>> 3) {
|
|
794
|
+
case 1: {
|
|
795
|
+
if (tag !== 8) {
|
|
796
|
+
break;
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
message.id = longToNumber(reader.uint64());
|
|
800
|
+
continue;
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
804
|
+
break;
|
|
805
|
+
}
|
|
806
|
+
reader.skip(tag & 7);
|
|
807
|
+
}
|
|
808
|
+
return message;
|
|
809
|
+
},
|
|
810
|
+
|
|
811
|
+
fromJSON(object: any): MsgCreatePlanResponse {
|
|
812
|
+
return { $type: MsgCreatePlanResponse.$type, id: isSet(object.id) ? globalThis.Number(object.id) : 0 };
|
|
813
|
+
},
|
|
814
|
+
|
|
815
|
+
toJSON(message: MsgCreatePlanResponse): unknown {
|
|
816
|
+
const obj: any = {};
|
|
817
|
+
if (message.id !== 0) {
|
|
818
|
+
obj.id = Math.round(message.id);
|
|
819
|
+
}
|
|
820
|
+
return obj;
|
|
821
|
+
},
|
|
822
|
+
|
|
823
|
+
create<I extends Exact<DeepPartial<MsgCreatePlanResponse>, I>>(base?: I): MsgCreatePlanResponse {
|
|
824
|
+
return MsgCreatePlanResponse.fromPartial(base ?? ({} as any));
|
|
825
|
+
},
|
|
826
|
+
fromPartial<I extends Exact<DeepPartial<MsgCreatePlanResponse>, I>>(object: I): MsgCreatePlanResponse {
|
|
827
|
+
const message = createBaseMsgCreatePlanResponse();
|
|
828
|
+
message.id = object.id ?? 0;
|
|
829
|
+
return message;
|
|
830
|
+
},
|
|
831
|
+
};
|
|
832
|
+
|
|
833
|
+
messageTypeRegistry.set(MsgCreatePlanResponse.$type, MsgCreatePlanResponse);
|
|
834
|
+
|
|
835
|
+
function createBaseMsgLinkNodeResponse(): MsgLinkNodeResponse {
|
|
836
|
+
return { $type: "sentinel.plan.v3.MsgLinkNodeResponse" };
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
export const MsgLinkNodeResponse: MessageFns<MsgLinkNodeResponse, "sentinel.plan.v3.MsgLinkNodeResponse"> = {
|
|
840
|
+
$type: "sentinel.plan.v3.MsgLinkNodeResponse" as const,
|
|
841
|
+
|
|
842
|
+
encode(_: MsgLinkNodeResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
843
|
+
return writer;
|
|
844
|
+
},
|
|
845
|
+
|
|
846
|
+
decode(input: BinaryReader | Uint8Array, length?: number): MsgLinkNodeResponse {
|
|
847
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
848
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
849
|
+
const message = createBaseMsgLinkNodeResponse();
|
|
850
|
+
while (reader.pos < end) {
|
|
851
|
+
const tag = reader.uint32();
|
|
852
|
+
switch (tag >>> 3) {
|
|
853
|
+
}
|
|
854
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
855
|
+
break;
|
|
856
|
+
}
|
|
857
|
+
reader.skip(tag & 7);
|
|
858
|
+
}
|
|
859
|
+
return message;
|
|
860
|
+
},
|
|
861
|
+
|
|
862
|
+
fromJSON(_: any): MsgLinkNodeResponse {
|
|
863
|
+
return { $type: MsgLinkNodeResponse.$type };
|
|
864
|
+
},
|
|
865
|
+
|
|
866
|
+
toJSON(_: MsgLinkNodeResponse): unknown {
|
|
867
|
+
const obj: any = {};
|
|
868
|
+
return obj;
|
|
869
|
+
},
|
|
870
|
+
|
|
871
|
+
create<I extends Exact<DeepPartial<MsgLinkNodeResponse>, I>>(base?: I): MsgLinkNodeResponse {
|
|
872
|
+
return MsgLinkNodeResponse.fromPartial(base ?? ({} as any));
|
|
873
|
+
},
|
|
874
|
+
fromPartial<I extends Exact<DeepPartial<MsgLinkNodeResponse>, I>>(_: I): MsgLinkNodeResponse {
|
|
875
|
+
const message = createBaseMsgLinkNodeResponse();
|
|
876
|
+
return message;
|
|
877
|
+
},
|
|
878
|
+
};
|
|
879
|
+
|
|
880
|
+
messageTypeRegistry.set(MsgLinkNodeResponse.$type, MsgLinkNodeResponse);
|
|
881
|
+
|
|
882
|
+
function createBaseMsgUnlinkNodeResponse(): MsgUnlinkNodeResponse {
|
|
883
|
+
return { $type: "sentinel.plan.v3.MsgUnlinkNodeResponse" };
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
export const MsgUnlinkNodeResponse: MessageFns<MsgUnlinkNodeResponse, "sentinel.plan.v3.MsgUnlinkNodeResponse"> = {
|
|
887
|
+
$type: "sentinel.plan.v3.MsgUnlinkNodeResponse" as const,
|
|
888
|
+
|
|
889
|
+
encode(_: MsgUnlinkNodeResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
890
|
+
return writer;
|
|
891
|
+
},
|
|
892
|
+
|
|
893
|
+
decode(input: BinaryReader | Uint8Array, length?: number): MsgUnlinkNodeResponse {
|
|
894
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
895
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
896
|
+
const message = createBaseMsgUnlinkNodeResponse();
|
|
897
|
+
while (reader.pos < end) {
|
|
898
|
+
const tag = reader.uint32();
|
|
899
|
+
switch (tag >>> 3) {
|
|
900
|
+
}
|
|
901
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
902
|
+
break;
|
|
903
|
+
}
|
|
904
|
+
reader.skip(tag & 7);
|
|
905
|
+
}
|
|
906
|
+
return message;
|
|
907
|
+
},
|
|
908
|
+
|
|
909
|
+
fromJSON(_: any): MsgUnlinkNodeResponse {
|
|
910
|
+
return { $type: MsgUnlinkNodeResponse.$type };
|
|
911
|
+
},
|
|
912
|
+
|
|
913
|
+
toJSON(_: MsgUnlinkNodeResponse): unknown {
|
|
914
|
+
const obj: any = {};
|
|
915
|
+
return obj;
|
|
916
|
+
},
|
|
917
|
+
|
|
918
|
+
create<I extends Exact<DeepPartial<MsgUnlinkNodeResponse>, I>>(base?: I): MsgUnlinkNodeResponse {
|
|
919
|
+
return MsgUnlinkNodeResponse.fromPartial(base ?? ({} as any));
|
|
920
|
+
},
|
|
921
|
+
fromPartial<I extends Exact<DeepPartial<MsgUnlinkNodeResponse>, I>>(_: I): MsgUnlinkNodeResponse {
|
|
922
|
+
const message = createBaseMsgUnlinkNodeResponse();
|
|
923
|
+
return message;
|
|
924
|
+
},
|
|
925
|
+
};
|
|
926
|
+
|
|
927
|
+
messageTypeRegistry.set(MsgUnlinkNodeResponse.$type, MsgUnlinkNodeResponse);
|
|
928
|
+
|
|
929
|
+
function createBaseMsgUpdatePlanDetailsResponse(): MsgUpdatePlanDetailsResponse {
|
|
930
|
+
return { $type: "sentinel.plan.v3.MsgUpdatePlanDetailsResponse" };
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
export const MsgUpdatePlanDetailsResponse: MessageFns<
|
|
934
|
+
MsgUpdatePlanDetailsResponse,
|
|
935
|
+
"sentinel.plan.v3.MsgUpdatePlanDetailsResponse"
|
|
936
|
+
> = {
|
|
937
|
+
$type: "sentinel.plan.v3.MsgUpdatePlanDetailsResponse" as const,
|
|
938
|
+
|
|
939
|
+
encode(_: MsgUpdatePlanDetailsResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
940
|
+
return writer;
|
|
941
|
+
},
|
|
942
|
+
|
|
943
|
+
decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdatePlanDetailsResponse {
|
|
944
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
945
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
946
|
+
const message = createBaseMsgUpdatePlanDetailsResponse();
|
|
947
|
+
while (reader.pos < end) {
|
|
948
|
+
const tag = reader.uint32();
|
|
949
|
+
switch (tag >>> 3) {
|
|
950
|
+
}
|
|
951
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
952
|
+
break;
|
|
953
|
+
}
|
|
954
|
+
reader.skip(tag & 7);
|
|
955
|
+
}
|
|
956
|
+
return message;
|
|
957
|
+
},
|
|
958
|
+
|
|
959
|
+
fromJSON(_: any): MsgUpdatePlanDetailsResponse {
|
|
960
|
+
return { $type: MsgUpdatePlanDetailsResponse.$type };
|
|
961
|
+
},
|
|
962
|
+
|
|
963
|
+
toJSON(_: MsgUpdatePlanDetailsResponse): unknown {
|
|
964
|
+
const obj: any = {};
|
|
965
|
+
return obj;
|
|
966
|
+
},
|
|
967
|
+
|
|
968
|
+
create<I extends Exact<DeepPartial<MsgUpdatePlanDetailsResponse>, I>>(base?: I): MsgUpdatePlanDetailsResponse {
|
|
969
|
+
return MsgUpdatePlanDetailsResponse.fromPartial(base ?? ({} as any));
|
|
970
|
+
},
|
|
971
|
+
fromPartial<I extends Exact<DeepPartial<MsgUpdatePlanDetailsResponse>, I>>(_: I): MsgUpdatePlanDetailsResponse {
|
|
972
|
+
const message = createBaseMsgUpdatePlanDetailsResponse();
|
|
973
|
+
return message;
|
|
974
|
+
},
|
|
975
|
+
};
|
|
976
|
+
|
|
977
|
+
messageTypeRegistry.set(MsgUpdatePlanDetailsResponse.$type, MsgUpdatePlanDetailsResponse);
|
|
978
|
+
|
|
979
|
+
function createBaseMsgUpdatePlanStatusResponse(): MsgUpdatePlanStatusResponse {
|
|
980
|
+
return { $type: "sentinel.plan.v3.MsgUpdatePlanStatusResponse" };
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
export const MsgUpdatePlanStatusResponse: MessageFns<
|
|
984
|
+
MsgUpdatePlanStatusResponse,
|
|
985
|
+
"sentinel.plan.v3.MsgUpdatePlanStatusResponse"
|
|
986
|
+
> = {
|
|
987
|
+
$type: "sentinel.plan.v3.MsgUpdatePlanStatusResponse" as const,
|
|
988
|
+
|
|
989
|
+
encode(_: MsgUpdatePlanStatusResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
990
|
+
return writer;
|
|
991
|
+
},
|
|
992
|
+
|
|
993
|
+
decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdatePlanStatusResponse {
|
|
994
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
995
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
996
|
+
const message = createBaseMsgUpdatePlanStatusResponse();
|
|
997
|
+
while (reader.pos < end) {
|
|
998
|
+
const tag = reader.uint32();
|
|
999
|
+
switch (tag >>> 3) {
|
|
1000
|
+
}
|
|
1001
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1002
|
+
break;
|
|
1003
|
+
}
|
|
1004
|
+
reader.skip(tag & 7);
|
|
1005
|
+
}
|
|
1006
|
+
return message;
|
|
1007
|
+
},
|
|
1008
|
+
|
|
1009
|
+
fromJSON(_: any): MsgUpdatePlanStatusResponse {
|
|
1010
|
+
return { $type: MsgUpdatePlanStatusResponse.$type };
|
|
1011
|
+
},
|
|
1012
|
+
|
|
1013
|
+
toJSON(_: MsgUpdatePlanStatusResponse): unknown {
|
|
1014
|
+
const obj: any = {};
|
|
1015
|
+
return obj;
|
|
1016
|
+
},
|
|
1017
|
+
|
|
1018
|
+
create<I extends Exact<DeepPartial<MsgUpdatePlanStatusResponse>, I>>(base?: I): MsgUpdatePlanStatusResponse {
|
|
1019
|
+
return MsgUpdatePlanStatusResponse.fromPartial(base ?? ({} as any));
|
|
1020
|
+
},
|
|
1021
|
+
fromPartial<I extends Exact<DeepPartial<MsgUpdatePlanStatusResponse>, I>>(_: I): MsgUpdatePlanStatusResponse {
|
|
1022
|
+
const message = createBaseMsgUpdatePlanStatusResponse();
|
|
1023
|
+
return message;
|
|
1024
|
+
},
|
|
1025
|
+
};
|
|
1026
|
+
|
|
1027
|
+
messageTypeRegistry.set(MsgUpdatePlanStatusResponse.$type, MsgUpdatePlanStatusResponse);
|
|
1028
|
+
|
|
1029
|
+
function createBaseMsgStartSessionResponse(): MsgStartSessionResponse {
|
|
1030
|
+
return { $type: "sentinel.plan.v3.MsgStartSessionResponse", id: 0 };
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
export const MsgStartSessionResponse: MessageFns<MsgStartSessionResponse, "sentinel.plan.v3.MsgStartSessionResponse"> =
|
|
1034
|
+
{
|
|
1035
|
+
$type: "sentinel.plan.v3.MsgStartSessionResponse" as const,
|
|
1036
|
+
|
|
1037
|
+
encode(message: MsgStartSessionResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1038
|
+
if (message.id !== 0) {
|
|
1039
|
+
writer.uint32(8).uint64(message.id);
|
|
1040
|
+
}
|
|
1041
|
+
return writer;
|
|
1042
|
+
},
|
|
1043
|
+
|
|
1044
|
+
decode(input: BinaryReader | Uint8Array, length?: number): MsgStartSessionResponse {
|
|
1045
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1046
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1047
|
+
const message = createBaseMsgStartSessionResponse();
|
|
1048
|
+
while (reader.pos < end) {
|
|
1049
|
+
const tag = reader.uint32();
|
|
1050
|
+
switch (tag >>> 3) {
|
|
1051
|
+
case 1: {
|
|
1052
|
+
if (tag !== 8) {
|
|
1053
|
+
break;
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
message.id = longToNumber(reader.uint64());
|
|
1057
|
+
continue;
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1061
|
+
break;
|
|
1062
|
+
}
|
|
1063
|
+
reader.skip(tag & 7);
|
|
1064
|
+
}
|
|
1065
|
+
return message;
|
|
1066
|
+
},
|
|
1067
|
+
|
|
1068
|
+
fromJSON(object: any): MsgStartSessionResponse {
|
|
1069
|
+
return { $type: MsgStartSessionResponse.$type, id: isSet(object.id) ? globalThis.Number(object.id) : 0 };
|
|
1070
|
+
},
|
|
1071
|
+
|
|
1072
|
+
toJSON(message: MsgStartSessionResponse): unknown {
|
|
1073
|
+
const obj: any = {};
|
|
1074
|
+
if (message.id !== 0) {
|
|
1075
|
+
obj.id = Math.round(message.id);
|
|
1076
|
+
}
|
|
1077
|
+
return obj;
|
|
1078
|
+
},
|
|
1079
|
+
|
|
1080
|
+
create<I extends Exact<DeepPartial<MsgStartSessionResponse>, I>>(base?: I): MsgStartSessionResponse {
|
|
1081
|
+
return MsgStartSessionResponse.fromPartial(base ?? ({} as any));
|
|
1082
|
+
},
|
|
1083
|
+
fromPartial<I extends Exact<DeepPartial<MsgStartSessionResponse>, I>>(object: I): MsgStartSessionResponse {
|
|
1084
|
+
const message = createBaseMsgStartSessionResponse();
|
|
1085
|
+
message.id = object.id ?? 0;
|
|
1086
|
+
return message;
|
|
1087
|
+
},
|
|
1088
|
+
};
|
|
1089
|
+
|
|
1090
|
+
messageTypeRegistry.set(MsgStartSessionResponse.$type, MsgStartSessionResponse);
|
|
1091
|
+
|
|
1092
|
+
export interface MsgService {
|
|
1093
|
+
MsgCreatePlan(request: MsgCreatePlanRequest): Promise<MsgCreatePlanResponse>;
|
|
1094
|
+
MsgLinkNode(request: MsgLinkNodeRequest): Promise<MsgLinkNodeResponse>;
|
|
1095
|
+
MsgUnlinkNode(request: MsgUnlinkNodeRequest): Promise<MsgUnlinkNodeResponse>;
|
|
1096
|
+
MsgUpdatePlanDetails(request: MsgUpdatePlanDetailsRequest): Promise<MsgUpdatePlanDetailsResponse>;
|
|
1097
|
+
MsgUpdatePlanStatus(request: MsgUpdatePlanStatusRequest): Promise<MsgUpdatePlanStatusResponse>;
|
|
1098
|
+
MsgStartSession(request: MsgStartSessionRequest): Promise<MsgStartSessionResponse>;
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
export const MsgServiceServiceName = "sentinel.plan.v3.MsgService";
|
|
1102
|
+
export class MsgServiceClientImpl implements MsgService {
|
|
1103
|
+
private readonly rpc: Rpc;
|
|
1104
|
+
private readonly service: string;
|
|
1105
|
+
constructor(rpc: Rpc, opts?: { service?: string }) {
|
|
1106
|
+
this.service = opts?.service || MsgServiceServiceName;
|
|
1107
|
+
this.rpc = rpc;
|
|
1108
|
+
this.MsgCreatePlan = this.MsgCreatePlan.bind(this);
|
|
1109
|
+
this.MsgLinkNode = this.MsgLinkNode.bind(this);
|
|
1110
|
+
this.MsgUnlinkNode = this.MsgUnlinkNode.bind(this);
|
|
1111
|
+
this.MsgUpdatePlanDetails = this.MsgUpdatePlanDetails.bind(this);
|
|
1112
|
+
this.MsgUpdatePlanStatus = this.MsgUpdatePlanStatus.bind(this);
|
|
1113
|
+
this.MsgStartSession = this.MsgStartSession.bind(this);
|
|
1114
|
+
}
|
|
1115
|
+
MsgCreatePlan(request: MsgCreatePlanRequest): Promise<MsgCreatePlanResponse> {
|
|
1116
|
+
const data = MsgCreatePlanRequest.encode(request).finish();
|
|
1117
|
+
const promise = this.rpc.request(this.service, "MsgCreatePlan", data);
|
|
1118
|
+
return promise.then((data) => MsgCreatePlanResponse.decode(new BinaryReader(data)));
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
MsgLinkNode(request: MsgLinkNodeRequest): Promise<MsgLinkNodeResponse> {
|
|
1122
|
+
const data = MsgLinkNodeRequest.encode(request).finish();
|
|
1123
|
+
const promise = this.rpc.request(this.service, "MsgLinkNode", data);
|
|
1124
|
+
return promise.then((data) => MsgLinkNodeResponse.decode(new BinaryReader(data)));
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
MsgUnlinkNode(request: MsgUnlinkNodeRequest): Promise<MsgUnlinkNodeResponse> {
|
|
1128
|
+
const data = MsgUnlinkNodeRequest.encode(request).finish();
|
|
1129
|
+
const promise = this.rpc.request(this.service, "MsgUnlinkNode", data);
|
|
1130
|
+
return promise.then((data) => MsgUnlinkNodeResponse.decode(new BinaryReader(data)));
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
MsgUpdatePlanDetails(request: MsgUpdatePlanDetailsRequest): Promise<MsgUpdatePlanDetailsResponse> {
|
|
1134
|
+
const data = MsgUpdatePlanDetailsRequest.encode(request).finish();
|
|
1135
|
+
const promise = this.rpc.request(this.service, "MsgUpdatePlanDetails", data);
|
|
1136
|
+
return promise.then((data) => MsgUpdatePlanDetailsResponse.decode(new BinaryReader(data)));
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
MsgUpdatePlanStatus(request: MsgUpdatePlanStatusRequest): Promise<MsgUpdatePlanStatusResponse> {
|
|
1140
|
+
const data = MsgUpdatePlanStatusRequest.encode(request).finish();
|
|
1141
|
+
const promise = this.rpc.request(this.service, "MsgUpdatePlanStatus", data);
|
|
1142
|
+
return promise.then((data) => MsgUpdatePlanStatusResponse.decode(new BinaryReader(data)));
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
MsgStartSession(request: MsgStartSessionRequest): Promise<MsgStartSessionResponse> {
|
|
1146
|
+
const data = MsgStartSessionRequest.encode(request).finish();
|
|
1147
|
+
const promise = this.rpc.request(this.service, "MsgStartSession", data);
|
|
1148
|
+
return promise.then((data) => MsgStartSessionResponse.decode(new BinaryReader(data)));
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
interface Rpc {
|
|
1153
|
+
request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
1157
|
+
|
|
1158
|
+
export type DeepPartial<T> = T extends Builtin ? T
|
|
1159
|
+
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
1160
|
+
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
1161
|
+
: T extends {} ? { [K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]> }
|
|
1162
|
+
: Partial<T>;
|
|
1163
|
+
|
|
1164
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
1165
|
+
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
1166
|
+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P> | "$type">]: never };
|
|
1167
|
+
|
|
1168
|
+
function longToNumber(int64: { toString(): string }): number {
|
|
1169
|
+
const num = globalThis.Number(int64.toString());
|
|
1170
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
1171
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
1172
|
+
}
|
|
1173
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
1174
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
1175
|
+
}
|
|
1176
|
+
return num;
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
function isSet(value: any): boolean {
|
|
1180
|
+
return value !== null && value !== undefined;
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
export interface MessageFns<T, V extends string> {
|
|
1184
|
+
readonly $type: V;
|
|
1185
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
1186
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
1187
|
+
fromJSON(object: any): T;
|
|
1188
|
+
toJSON(message: T): unknown;
|
|
1189
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
1190
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
1191
|
+
}
|