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,949 @@
|
|
|
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/lease/v1/msg.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
9
|
+
import { messageTypeRegistry } from "../../../typeRegistry";
|
|
10
|
+
import { Price } from "../../types/v1/price";
|
|
11
|
+
import { RenewalPricePolicy, renewalPricePolicyFromJSON, renewalPricePolicyToJSON } from "../../types/v1/renewal";
|
|
12
|
+
import { Params } from "./params";
|
|
13
|
+
|
|
14
|
+
export const protobufPackage = "sentinel.lease.v1";
|
|
15
|
+
|
|
16
|
+
export interface MsgEndLeaseRequest {
|
|
17
|
+
$type: "sentinel.lease.v1.MsgEndLeaseRequest";
|
|
18
|
+
from: string;
|
|
19
|
+
id: number;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface MsgRenewLeaseRequest {
|
|
23
|
+
$type: "sentinel.lease.v1.MsgRenewLeaseRequest";
|
|
24
|
+
from: string;
|
|
25
|
+
id: number;
|
|
26
|
+
hours: number;
|
|
27
|
+
maxPrice: Price | undefined;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface MsgStartLeaseRequest {
|
|
31
|
+
$type: "sentinel.lease.v1.MsgStartLeaseRequest";
|
|
32
|
+
from: string;
|
|
33
|
+
nodeAddress: string;
|
|
34
|
+
hours: number;
|
|
35
|
+
maxPrice: Price | undefined;
|
|
36
|
+
renewalPricePolicy: RenewalPricePolicy;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface MsgUpdateLeaseRequest {
|
|
40
|
+
$type: "sentinel.lease.v1.MsgUpdateLeaseRequest";
|
|
41
|
+
from: string;
|
|
42
|
+
id: number;
|
|
43
|
+
renewalPricePolicy: RenewalPricePolicy;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface MsgUpdateParamsRequest {
|
|
47
|
+
$type: "sentinel.lease.v1.MsgUpdateParamsRequest";
|
|
48
|
+
from: string;
|
|
49
|
+
params: Params | undefined;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface MsgEndLeaseResponse {
|
|
53
|
+
$type: "sentinel.lease.v1.MsgEndLeaseResponse";
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface MsgRenewLeaseResponse {
|
|
57
|
+
$type: "sentinel.lease.v1.MsgRenewLeaseResponse";
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface MsgStartLeaseResponse {
|
|
61
|
+
$type: "sentinel.lease.v1.MsgStartLeaseResponse";
|
|
62
|
+
id: number;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface MsgUpdateLeaseResponse {
|
|
66
|
+
$type: "sentinel.lease.v1.MsgUpdateLeaseResponse";
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface MsgUpdateParamsResponse {
|
|
70
|
+
$type: "sentinel.lease.v1.MsgUpdateParamsResponse";
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function createBaseMsgEndLeaseRequest(): MsgEndLeaseRequest {
|
|
74
|
+
return { $type: "sentinel.lease.v1.MsgEndLeaseRequest", from: "", id: 0 };
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export const MsgEndLeaseRequest: MessageFns<MsgEndLeaseRequest, "sentinel.lease.v1.MsgEndLeaseRequest"> = {
|
|
78
|
+
$type: "sentinel.lease.v1.MsgEndLeaseRequest" as const,
|
|
79
|
+
|
|
80
|
+
encode(message: MsgEndLeaseRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
81
|
+
if (message.from !== "") {
|
|
82
|
+
writer.uint32(10).string(message.from);
|
|
83
|
+
}
|
|
84
|
+
if (message.id !== 0) {
|
|
85
|
+
writer.uint32(16).uint64(message.id);
|
|
86
|
+
}
|
|
87
|
+
return writer;
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
decode(input: BinaryReader | Uint8Array, length?: number): MsgEndLeaseRequest {
|
|
91
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
92
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
93
|
+
const message = createBaseMsgEndLeaseRequest();
|
|
94
|
+
while (reader.pos < end) {
|
|
95
|
+
const tag = reader.uint32();
|
|
96
|
+
switch (tag >>> 3) {
|
|
97
|
+
case 1: {
|
|
98
|
+
if (tag !== 10) {
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
message.from = reader.string();
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
case 2: {
|
|
106
|
+
if (tag !== 16) {
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
message.id = longToNumber(reader.uint64());
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
reader.skip(tag & 7);
|
|
118
|
+
}
|
|
119
|
+
return message;
|
|
120
|
+
},
|
|
121
|
+
|
|
122
|
+
fromJSON(object: any): MsgEndLeaseRequest {
|
|
123
|
+
return {
|
|
124
|
+
$type: MsgEndLeaseRequest.$type,
|
|
125
|
+
from: isSet(object.from) ? globalThis.String(object.from) : "",
|
|
126
|
+
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
|
|
127
|
+
};
|
|
128
|
+
},
|
|
129
|
+
|
|
130
|
+
toJSON(message: MsgEndLeaseRequest): unknown {
|
|
131
|
+
const obj: any = {};
|
|
132
|
+
if (message.from !== "") {
|
|
133
|
+
obj.from = message.from;
|
|
134
|
+
}
|
|
135
|
+
if (message.id !== 0) {
|
|
136
|
+
obj.id = Math.round(message.id);
|
|
137
|
+
}
|
|
138
|
+
return obj;
|
|
139
|
+
},
|
|
140
|
+
|
|
141
|
+
create<I extends Exact<DeepPartial<MsgEndLeaseRequest>, I>>(base?: I): MsgEndLeaseRequest {
|
|
142
|
+
return MsgEndLeaseRequest.fromPartial(base ?? ({} as any));
|
|
143
|
+
},
|
|
144
|
+
fromPartial<I extends Exact<DeepPartial<MsgEndLeaseRequest>, I>>(object: I): MsgEndLeaseRequest {
|
|
145
|
+
const message = createBaseMsgEndLeaseRequest();
|
|
146
|
+
message.from = object.from ?? "";
|
|
147
|
+
message.id = object.id ?? 0;
|
|
148
|
+
return message;
|
|
149
|
+
},
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
messageTypeRegistry.set(MsgEndLeaseRequest.$type, MsgEndLeaseRequest);
|
|
153
|
+
|
|
154
|
+
function createBaseMsgRenewLeaseRequest(): MsgRenewLeaseRequest {
|
|
155
|
+
return { $type: "sentinel.lease.v1.MsgRenewLeaseRequest", from: "", id: 0, hours: 0, maxPrice: undefined };
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export const MsgRenewLeaseRequest: MessageFns<MsgRenewLeaseRequest, "sentinel.lease.v1.MsgRenewLeaseRequest"> = {
|
|
159
|
+
$type: "sentinel.lease.v1.MsgRenewLeaseRequest" as const,
|
|
160
|
+
|
|
161
|
+
encode(message: MsgRenewLeaseRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
162
|
+
if (message.from !== "") {
|
|
163
|
+
writer.uint32(10).string(message.from);
|
|
164
|
+
}
|
|
165
|
+
if (message.id !== 0) {
|
|
166
|
+
writer.uint32(16).uint64(message.id);
|
|
167
|
+
}
|
|
168
|
+
if (message.hours !== 0) {
|
|
169
|
+
writer.uint32(24).int64(message.hours);
|
|
170
|
+
}
|
|
171
|
+
if (message.maxPrice !== undefined) {
|
|
172
|
+
Price.encode(message.maxPrice, writer.uint32(34).fork()).join();
|
|
173
|
+
}
|
|
174
|
+
return writer;
|
|
175
|
+
},
|
|
176
|
+
|
|
177
|
+
decode(input: BinaryReader | Uint8Array, length?: number): MsgRenewLeaseRequest {
|
|
178
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
179
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
180
|
+
const message = createBaseMsgRenewLeaseRequest();
|
|
181
|
+
while (reader.pos < end) {
|
|
182
|
+
const tag = reader.uint32();
|
|
183
|
+
switch (tag >>> 3) {
|
|
184
|
+
case 1: {
|
|
185
|
+
if (tag !== 10) {
|
|
186
|
+
break;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
message.from = reader.string();
|
|
190
|
+
continue;
|
|
191
|
+
}
|
|
192
|
+
case 2: {
|
|
193
|
+
if (tag !== 16) {
|
|
194
|
+
break;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
message.id = longToNumber(reader.uint64());
|
|
198
|
+
continue;
|
|
199
|
+
}
|
|
200
|
+
case 3: {
|
|
201
|
+
if (tag !== 24) {
|
|
202
|
+
break;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
message.hours = longToNumber(reader.int64());
|
|
206
|
+
continue;
|
|
207
|
+
}
|
|
208
|
+
case 4: {
|
|
209
|
+
if (tag !== 34) {
|
|
210
|
+
break;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
message.maxPrice = Price.decode(reader, reader.uint32());
|
|
214
|
+
continue;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
218
|
+
break;
|
|
219
|
+
}
|
|
220
|
+
reader.skip(tag & 7);
|
|
221
|
+
}
|
|
222
|
+
return message;
|
|
223
|
+
},
|
|
224
|
+
|
|
225
|
+
fromJSON(object: any): MsgRenewLeaseRequest {
|
|
226
|
+
return {
|
|
227
|
+
$type: MsgRenewLeaseRequest.$type,
|
|
228
|
+
from: isSet(object.from) ? globalThis.String(object.from) : "",
|
|
229
|
+
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
|
|
230
|
+
hours: isSet(object.hours) ? globalThis.Number(object.hours) : 0,
|
|
231
|
+
maxPrice: isSet(object.maxPrice)
|
|
232
|
+
? Price.fromJSON(object.maxPrice)
|
|
233
|
+
: isSet(object.max_price)
|
|
234
|
+
? Price.fromJSON(object.max_price)
|
|
235
|
+
: undefined,
|
|
236
|
+
};
|
|
237
|
+
},
|
|
238
|
+
|
|
239
|
+
toJSON(message: MsgRenewLeaseRequest): unknown {
|
|
240
|
+
const obj: any = {};
|
|
241
|
+
if (message.from !== "") {
|
|
242
|
+
obj.from = message.from;
|
|
243
|
+
}
|
|
244
|
+
if (message.id !== 0) {
|
|
245
|
+
obj.id = Math.round(message.id);
|
|
246
|
+
}
|
|
247
|
+
if (message.hours !== 0) {
|
|
248
|
+
obj.hours = Math.round(message.hours);
|
|
249
|
+
}
|
|
250
|
+
if (message.maxPrice !== undefined) {
|
|
251
|
+
obj.maxPrice = Price.toJSON(message.maxPrice);
|
|
252
|
+
}
|
|
253
|
+
return obj;
|
|
254
|
+
},
|
|
255
|
+
|
|
256
|
+
create<I extends Exact<DeepPartial<MsgRenewLeaseRequest>, I>>(base?: I): MsgRenewLeaseRequest {
|
|
257
|
+
return MsgRenewLeaseRequest.fromPartial(base ?? ({} as any));
|
|
258
|
+
},
|
|
259
|
+
fromPartial<I extends Exact<DeepPartial<MsgRenewLeaseRequest>, I>>(object: I): MsgRenewLeaseRequest {
|
|
260
|
+
const message = createBaseMsgRenewLeaseRequest();
|
|
261
|
+
message.from = object.from ?? "";
|
|
262
|
+
message.id = object.id ?? 0;
|
|
263
|
+
message.hours = object.hours ?? 0;
|
|
264
|
+
message.maxPrice = (object.maxPrice !== undefined && object.maxPrice !== null)
|
|
265
|
+
? Price.fromPartial(object.maxPrice)
|
|
266
|
+
: undefined;
|
|
267
|
+
return message;
|
|
268
|
+
},
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
messageTypeRegistry.set(MsgRenewLeaseRequest.$type, MsgRenewLeaseRequest);
|
|
272
|
+
|
|
273
|
+
function createBaseMsgStartLeaseRequest(): MsgStartLeaseRequest {
|
|
274
|
+
return {
|
|
275
|
+
$type: "sentinel.lease.v1.MsgStartLeaseRequest",
|
|
276
|
+
from: "",
|
|
277
|
+
nodeAddress: "",
|
|
278
|
+
hours: 0,
|
|
279
|
+
maxPrice: undefined,
|
|
280
|
+
renewalPricePolicy: 0,
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
export const MsgStartLeaseRequest: MessageFns<MsgStartLeaseRequest, "sentinel.lease.v1.MsgStartLeaseRequest"> = {
|
|
285
|
+
$type: "sentinel.lease.v1.MsgStartLeaseRequest" as const,
|
|
286
|
+
|
|
287
|
+
encode(message: MsgStartLeaseRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
288
|
+
if (message.from !== "") {
|
|
289
|
+
writer.uint32(10).string(message.from);
|
|
290
|
+
}
|
|
291
|
+
if (message.nodeAddress !== "") {
|
|
292
|
+
writer.uint32(18).string(message.nodeAddress);
|
|
293
|
+
}
|
|
294
|
+
if (message.hours !== 0) {
|
|
295
|
+
writer.uint32(24).int64(message.hours);
|
|
296
|
+
}
|
|
297
|
+
if (message.maxPrice !== undefined) {
|
|
298
|
+
Price.encode(message.maxPrice, writer.uint32(34).fork()).join();
|
|
299
|
+
}
|
|
300
|
+
if (message.renewalPricePolicy !== 0) {
|
|
301
|
+
writer.uint32(40).int32(message.renewalPricePolicy);
|
|
302
|
+
}
|
|
303
|
+
return writer;
|
|
304
|
+
},
|
|
305
|
+
|
|
306
|
+
decode(input: BinaryReader | Uint8Array, length?: number): MsgStartLeaseRequest {
|
|
307
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
308
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
309
|
+
const message = createBaseMsgStartLeaseRequest();
|
|
310
|
+
while (reader.pos < end) {
|
|
311
|
+
const tag = reader.uint32();
|
|
312
|
+
switch (tag >>> 3) {
|
|
313
|
+
case 1: {
|
|
314
|
+
if (tag !== 10) {
|
|
315
|
+
break;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
message.from = reader.string();
|
|
319
|
+
continue;
|
|
320
|
+
}
|
|
321
|
+
case 2: {
|
|
322
|
+
if (tag !== 18) {
|
|
323
|
+
break;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
message.nodeAddress = reader.string();
|
|
327
|
+
continue;
|
|
328
|
+
}
|
|
329
|
+
case 3: {
|
|
330
|
+
if (tag !== 24) {
|
|
331
|
+
break;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
message.hours = longToNumber(reader.int64());
|
|
335
|
+
continue;
|
|
336
|
+
}
|
|
337
|
+
case 4: {
|
|
338
|
+
if (tag !== 34) {
|
|
339
|
+
break;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
message.maxPrice = Price.decode(reader, reader.uint32());
|
|
343
|
+
continue;
|
|
344
|
+
}
|
|
345
|
+
case 5: {
|
|
346
|
+
if (tag !== 40) {
|
|
347
|
+
break;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
message.renewalPricePolicy = reader.int32() as any;
|
|
351
|
+
continue;
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
355
|
+
break;
|
|
356
|
+
}
|
|
357
|
+
reader.skip(tag & 7);
|
|
358
|
+
}
|
|
359
|
+
return message;
|
|
360
|
+
},
|
|
361
|
+
|
|
362
|
+
fromJSON(object: any): MsgStartLeaseRequest {
|
|
363
|
+
return {
|
|
364
|
+
$type: MsgStartLeaseRequest.$type,
|
|
365
|
+
from: isSet(object.from) ? globalThis.String(object.from) : "",
|
|
366
|
+
nodeAddress: isSet(object.nodeAddress)
|
|
367
|
+
? globalThis.String(object.nodeAddress)
|
|
368
|
+
: isSet(object.node_address)
|
|
369
|
+
? globalThis.String(object.node_address)
|
|
370
|
+
: "",
|
|
371
|
+
hours: isSet(object.hours) ? globalThis.Number(object.hours) : 0,
|
|
372
|
+
maxPrice: isSet(object.maxPrice)
|
|
373
|
+
? Price.fromJSON(object.maxPrice)
|
|
374
|
+
: isSet(object.max_price)
|
|
375
|
+
? Price.fromJSON(object.max_price)
|
|
376
|
+
: undefined,
|
|
377
|
+
renewalPricePolicy: isSet(object.renewalPricePolicy)
|
|
378
|
+
? renewalPricePolicyFromJSON(object.renewalPricePolicy)
|
|
379
|
+
: isSet(object.renewal_price_policy)
|
|
380
|
+
? renewalPricePolicyFromJSON(object.renewal_price_policy)
|
|
381
|
+
: 0,
|
|
382
|
+
};
|
|
383
|
+
},
|
|
384
|
+
|
|
385
|
+
toJSON(message: MsgStartLeaseRequest): unknown {
|
|
386
|
+
const obj: any = {};
|
|
387
|
+
if (message.from !== "") {
|
|
388
|
+
obj.from = message.from;
|
|
389
|
+
}
|
|
390
|
+
if (message.nodeAddress !== "") {
|
|
391
|
+
obj.nodeAddress = message.nodeAddress;
|
|
392
|
+
}
|
|
393
|
+
if (message.hours !== 0) {
|
|
394
|
+
obj.hours = Math.round(message.hours);
|
|
395
|
+
}
|
|
396
|
+
if (message.maxPrice !== undefined) {
|
|
397
|
+
obj.maxPrice = Price.toJSON(message.maxPrice);
|
|
398
|
+
}
|
|
399
|
+
if (message.renewalPricePolicy !== 0) {
|
|
400
|
+
obj.renewalPricePolicy = renewalPricePolicyToJSON(message.renewalPricePolicy);
|
|
401
|
+
}
|
|
402
|
+
return obj;
|
|
403
|
+
},
|
|
404
|
+
|
|
405
|
+
create<I extends Exact<DeepPartial<MsgStartLeaseRequest>, I>>(base?: I): MsgStartLeaseRequest {
|
|
406
|
+
return MsgStartLeaseRequest.fromPartial(base ?? ({} as any));
|
|
407
|
+
},
|
|
408
|
+
fromPartial<I extends Exact<DeepPartial<MsgStartLeaseRequest>, I>>(object: I): MsgStartLeaseRequest {
|
|
409
|
+
const message = createBaseMsgStartLeaseRequest();
|
|
410
|
+
message.from = object.from ?? "";
|
|
411
|
+
message.nodeAddress = object.nodeAddress ?? "";
|
|
412
|
+
message.hours = object.hours ?? 0;
|
|
413
|
+
message.maxPrice = (object.maxPrice !== undefined && object.maxPrice !== null)
|
|
414
|
+
? Price.fromPartial(object.maxPrice)
|
|
415
|
+
: undefined;
|
|
416
|
+
message.renewalPricePolicy = object.renewalPricePolicy ?? 0;
|
|
417
|
+
return message;
|
|
418
|
+
},
|
|
419
|
+
};
|
|
420
|
+
|
|
421
|
+
messageTypeRegistry.set(MsgStartLeaseRequest.$type, MsgStartLeaseRequest);
|
|
422
|
+
|
|
423
|
+
function createBaseMsgUpdateLeaseRequest(): MsgUpdateLeaseRequest {
|
|
424
|
+
return { $type: "sentinel.lease.v1.MsgUpdateLeaseRequest", from: "", id: 0, renewalPricePolicy: 0 };
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
export const MsgUpdateLeaseRequest: MessageFns<MsgUpdateLeaseRequest, "sentinel.lease.v1.MsgUpdateLeaseRequest"> = {
|
|
428
|
+
$type: "sentinel.lease.v1.MsgUpdateLeaseRequest" as const,
|
|
429
|
+
|
|
430
|
+
encode(message: MsgUpdateLeaseRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
431
|
+
if (message.from !== "") {
|
|
432
|
+
writer.uint32(10).string(message.from);
|
|
433
|
+
}
|
|
434
|
+
if (message.id !== 0) {
|
|
435
|
+
writer.uint32(16).uint64(message.id);
|
|
436
|
+
}
|
|
437
|
+
if (message.renewalPricePolicy !== 0) {
|
|
438
|
+
writer.uint32(24).int32(message.renewalPricePolicy);
|
|
439
|
+
}
|
|
440
|
+
return writer;
|
|
441
|
+
},
|
|
442
|
+
|
|
443
|
+
decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdateLeaseRequest {
|
|
444
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
445
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
446
|
+
const message = createBaseMsgUpdateLeaseRequest();
|
|
447
|
+
while (reader.pos < end) {
|
|
448
|
+
const tag = reader.uint32();
|
|
449
|
+
switch (tag >>> 3) {
|
|
450
|
+
case 1: {
|
|
451
|
+
if (tag !== 10) {
|
|
452
|
+
break;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
message.from = reader.string();
|
|
456
|
+
continue;
|
|
457
|
+
}
|
|
458
|
+
case 2: {
|
|
459
|
+
if (tag !== 16) {
|
|
460
|
+
break;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
message.id = longToNumber(reader.uint64());
|
|
464
|
+
continue;
|
|
465
|
+
}
|
|
466
|
+
case 3: {
|
|
467
|
+
if (tag !== 24) {
|
|
468
|
+
break;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
message.renewalPricePolicy = reader.int32() as any;
|
|
472
|
+
continue;
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
476
|
+
break;
|
|
477
|
+
}
|
|
478
|
+
reader.skip(tag & 7);
|
|
479
|
+
}
|
|
480
|
+
return message;
|
|
481
|
+
},
|
|
482
|
+
|
|
483
|
+
fromJSON(object: any): MsgUpdateLeaseRequest {
|
|
484
|
+
return {
|
|
485
|
+
$type: MsgUpdateLeaseRequest.$type,
|
|
486
|
+
from: isSet(object.from) ? globalThis.String(object.from) : "",
|
|
487
|
+
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
|
|
488
|
+
renewalPricePolicy: isSet(object.renewalPricePolicy)
|
|
489
|
+
? renewalPricePolicyFromJSON(object.renewalPricePolicy)
|
|
490
|
+
: isSet(object.renewal_price_policy)
|
|
491
|
+
? renewalPricePolicyFromJSON(object.renewal_price_policy)
|
|
492
|
+
: 0,
|
|
493
|
+
};
|
|
494
|
+
},
|
|
495
|
+
|
|
496
|
+
toJSON(message: MsgUpdateLeaseRequest): unknown {
|
|
497
|
+
const obj: any = {};
|
|
498
|
+
if (message.from !== "") {
|
|
499
|
+
obj.from = message.from;
|
|
500
|
+
}
|
|
501
|
+
if (message.id !== 0) {
|
|
502
|
+
obj.id = Math.round(message.id);
|
|
503
|
+
}
|
|
504
|
+
if (message.renewalPricePolicy !== 0) {
|
|
505
|
+
obj.renewalPricePolicy = renewalPricePolicyToJSON(message.renewalPricePolicy);
|
|
506
|
+
}
|
|
507
|
+
return obj;
|
|
508
|
+
},
|
|
509
|
+
|
|
510
|
+
create<I extends Exact<DeepPartial<MsgUpdateLeaseRequest>, I>>(base?: I): MsgUpdateLeaseRequest {
|
|
511
|
+
return MsgUpdateLeaseRequest.fromPartial(base ?? ({} as any));
|
|
512
|
+
},
|
|
513
|
+
fromPartial<I extends Exact<DeepPartial<MsgUpdateLeaseRequest>, I>>(object: I): MsgUpdateLeaseRequest {
|
|
514
|
+
const message = createBaseMsgUpdateLeaseRequest();
|
|
515
|
+
message.from = object.from ?? "";
|
|
516
|
+
message.id = object.id ?? 0;
|
|
517
|
+
message.renewalPricePolicy = object.renewalPricePolicy ?? 0;
|
|
518
|
+
return message;
|
|
519
|
+
},
|
|
520
|
+
};
|
|
521
|
+
|
|
522
|
+
messageTypeRegistry.set(MsgUpdateLeaseRequest.$type, MsgUpdateLeaseRequest);
|
|
523
|
+
|
|
524
|
+
function createBaseMsgUpdateParamsRequest(): MsgUpdateParamsRequest {
|
|
525
|
+
return { $type: "sentinel.lease.v1.MsgUpdateParamsRequest", from: "", params: undefined };
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
export const MsgUpdateParamsRequest: MessageFns<MsgUpdateParamsRequest, "sentinel.lease.v1.MsgUpdateParamsRequest"> = {
|
|
529
|
+
$type: "sentinel.lease.v1.MsgUpdateParamsRequest" as const,
|
|
530
|
+
|
|
531
|
+
encode(message: MsgUpdateParamsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
532
|
+
if (message.from !== "") {
|
|
533
|
+
writer.uint32(10).string(message.from);
|
|
534
|
+
}
|
|
535
|
+
if (message.params !== undefined) {
|
|
536
|
+
Params.encode(message.params, writer.uint32(18).fork()).join();
|
|
537
|
+
}
|
|
538
|
+
return writer;
|
|
539
|
+
},
|
|
540
|
+
|
|
541
|
+
decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdateParamsRequest {
|
|
542
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
543
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
544
|
+
const message = createBaseMsgUpdateParamsRequest();
|
|
545
|
+
while (reader.pos < end) {
|
|
546
|
+
const tag = reader.uint32();
|
|
547
|
+
switch (tag >>> 3) {
|
|
548
|
+
case 1: {
|
|
549
|
+
if (tag !== 10) {
|
|
550
|
+
break;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
message.from = reader.string();
|
|
554
|
+
continue;
|
|
555
|
+
}
|
|
556
|
+
case 2: {
|
|
557
|
+
if (tag !== 18) {
|
|
558
|
+
break;
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
message.params = Params.decode(reader, reader.uint32());
|
|
562
|
+
continue;
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
566
|
+
break;
|
|
567
|
+
}
|
|
568
|
+
reader.skip(tag & 7);
|
|
569
|
+
}
|
|
570
|
+
return message;
|
|
571
|
+
},
|
|
572
|
+
|
|
573
|
+
fromJSON(object: any): MsgUpdateParamsRequest {
|
|
574
|
+
return {
|
|
575
|
+
$type: MsgUpdateParamsRequest.$type,
|
|
576
|
+
from: isSet(object.from) ? globalThis.String(object.from) : "",
|
|
577
|
+
params: isSet(object.params) ? Params.fromJSON(object.params) : undefined,
|
|
578
|
+
};
|
|
579
|
+
},
|
|
580
|
+
|
|
581
|
+
toJSON(message: MsgUpdateParamsRequest): unknown {
|
|
582
|
+
const obj: any = {};
|
|
583
|
+
if (message.from !== "") {
|
|
584
|
+
obj.from = message.from;
|
|
585
|
+
}
|
|
586
|
+
if (message.params !== undefined) {
|
|
587
|
+
obj.params = Params.toJSON(message.params);
|
|
588
|
+
}
|
|
589
|
+
return obj;
|
|
590
|
+
},
|
|
591
|
+
|
|
592
|
+
create<I extends Exact<DeepPartial<MsgUpdateParamsRequest>, I>>(base?: I): MsgUpdateParamsRequest {
|
|
593
|
+
return MsgUpdateParamsRequest.fromPartial(base ?? ({} as any));
|
|
594
|
+
},
|
|
595
|
+
fromPartial<I extends Exact<DeepPartial<MsgUpdateParamsRequest>, I>>(object: I): MsgUpdateParamsRequest {
|
|
596
|
+
const message = createBaseMsgUpdateParamsRequest();
|
|
597
|
+
message.from = object.from ?? "";
|
|
598
|
+
message.params = (object.params !== undefined && object.params !== null)
|
|
599
|
+
? Params.fromPartial(object.params)
|
|
600
|
+
: undefined;
|
|
601
|
+
return message;
|
|
602
|
+
},
|
|
603
|
+
};
|
|
604
|
+
|
|
605
|
+
messageTypeRegistry.set(MsgUpdateParamsRequest.$type, MsgUpdateParamsRequest);
|
|
606
|
+
|
|
607
|
+
function createBaseMsgEndLeaseResponse(): MsgEndLeaseResponse {
|
|
608
|
+
return { $type: "sentinel.lease.v1.MsgEndLeaseResponse" };
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
export const MsgEndLeaseResponse: MessageFns<MsgEndLeaseResponse, "sentinel.lease.v1.MsgEndLeaseResponse"> = {
|
|
612
|
+
$type: "sentinel.lease.v1.MsgEndLeaseResponse" as const,
|
|
613
|
+
|
|
614
|
+
encode(_: MsgEndLeaseResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
615
|
+
return writer;
|
|
616
|
+
},
|
|
617
|
+
|
|
618
|
+
decode(input: BinaryReader | Uint8Array, length?: number): MsgEndLeaseResponse {
|
|
619
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
620
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
621
|
+
const message = createBaseMsgEndLeaseResponse();
|
|
622
|
+
while (reader.pos < end) {
|
|
623
|
+
const tag = reader.uint32();
|
|
624
|
+
switch (tag >>> 3) {
|
|
625
|
+
}
|
|
626
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
627
|
+
break;
|
|
628
|
+
}
|
|
629
|
+
reader.skip(tag & 7);
|
|
630
|
+
}
|
|
631
|
+
return message;
|
|
632
|
+
},
|
|
633
|
+
|
|
634
|
+
fromJSON(_: any): MsgEndLeaseResponse {
|
|
635
|
+
return { $type: MsgEndLeaseResponse.$type };
|
|
636
|
+
},
|
|
637
|
+
|
|
638
|
+
toJSON(_: MsgEndLeaseResponse): unknown {
|
|
639
|
+
const obj: any = {};
|
|
640
|
+
return obj;
|
|
641
|
+
},
|
|
642
|
+
|
|
643
|
+
create<I extends Exact<DeepPartial<MsgEndLeaseResponse>, I>>(base?: I): MsgEndLeaseResponse {
|
|
644
|
+
return MsgEndLeaseResponse.fromPartial(base ?? ({} as any));
|
|
645
|
+
},
|
|
646
|
+
fromPartial<I extends Exact<DeepPartial<MsgEndLeaseResponse>, I>>(_: I): MsgEndLeaseResponse {
|
|
647
|
+
const message = createBaseMsgEndLeaseResponse();
|
|
648
|
+
return message;
|
|
649
|
+
},
|
|
650
|
+
};
|
|
651
|
+
|
|
652
|
+
messageTypeRegistry.set(MsgEndLeaseResponse.$type, MsgEndLeaseResponse);
|
|
653
|
+
|
|
654
|
+
function createBaseMsgRenewLeaseResponse(): MsgRenewLeaseResponse {
|
|
655
|
+
return { $type: "sentinel.lease.v1.MsgRenewLeaseResponse" };
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
export const MsgRenewLeaseResponse: MessageFns<MsgRenewLeaseResponse, "sentinel.lease.v1.MsgRenewLeaseResponse"> = {
|
|
659
|
+
$type: "sentinel.lease.v1.MsgRenewLeaseResponse" as const,
|
|
660
|
+
|
|
661
|
+
encode(_: MsgRenewLeaseResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
662
|
+
return writer;
|
|
663
|
+
},
|
|
664
|
+
|
|
665
|
+
decode(input: BinaryReader | Uint8Array, length?: number): MsgRenewLeaseResponse {
|
|
666
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
667
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
668
|
+
const message = createBaseMsgRenewLeaseResponse();
|
|
669
|
+
while (reader.pos < end) {
|
|
670
|
+
const tag = reader.uint32();
|
|
671
|
+
switch (tag >>> 3) {
|
|
672
|
+
}
|
|
673
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
674
|
+
break;
|
|
675
|
+
}
|
|
676
|
+
reader.skip(tag & 7);
|
|
677
|
+
}
|
|
678
|
+
return message;
|
|
679
|
+
},
|
|
680
|
+
|
|
681
|
+
fromJSON(_: any): MsgRenewLeaseResponse {
|
|
682
|
+
return { $type: MsgRenewLeaseResponse.$type };
|
|
683
|
+
},
|
|
684
|
+
|
|
685
|
+
toJSON(_: MsgRenewLeaseResponse): unknown {
|
|
686
|
+
const obj: any = {};
|
|
687
|
+
return obj;
|
|
688
|
+
},
|
|
689
|
+
|
|
690
|
+
create<I extends Exact<DeepPartial<MsgRenewLeaseResponse>, I>>(base?: I): MsgRenewLeaseResponse {
|
|
691
|
+
return MsgRenewLeaseResponse.fromPartial(base ?? ({} as any));
|
|
692
|
+
},
|
|
693
|
+
fromPartial<I extends Exact<DeepPartial<MsgRenewLeaseResponse>, I>>(_: I): MsgRenewLeaseResponse {
|
|
694
|
+
const message = createBaseMsgRenewLeaseResponse();
|
|
695
|
+
return message;
|
|
696
|
+
},
|
|
697
|
+
};
|
|
698
|
+
|
|
699
|
+
messageTypeRegistry.set(MsgRenewLeaseResponse.$type, MsgRenewLeaseResponse);
|
|
700
|
+
|
|
701
|
+
function createBaseMsgStartLeaseResponse(): MsgStartLeaseResponse {
|
|
702
|
+
return { $type: "sentinel.lease.v1.MsgStartLeaseResponse", id: 0 };
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
export const MsgStartLeaseResponse: MessageFns<MsgStartLeaseResponse, "sentinel.lease.v1.MsgStartLeaseResponse"> = {
|
|
706
|
+
$type: "sentinel.lease.v1.MsgStartLeaseResponse" as const,
|
|
707
|
+
|
|
708
|
+
encode(message: MsgStartLeaseResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
709
|
+
if (message.id !== 0) {
|
|
710
|
+
writer.uint32(8).uint64(message.id);
|
|
711
|
+
}
|
|
712
|
+
return writer;
|
|
713
|
+
},
|
|
714
|
+
|
|
715
|
+
decode(input: BinaryReader | Uint8Array, length?: number): MsgStartLeaseResponse {
|
|
716
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
717
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
718
|
+
const message = createBaseMsgStartLeaseResponse();
|
|
719
|
+
while (reader.pos < end) {
|
|
720
|
+
const tag = reader.uint32();
|
|
721
|
+
switch (tag >>> 3) {
|
|
722
|
+
case 1: {
|
|
723
|
+
if (tag !== 8) {
|
|
724
|
+
break;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
message.id = longToNumber(reader.uint64());
|
|
728
|
+
continue;
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
732
|
+
break;
|
|
733
|
+
}
|
|
734
|
+
reader.skip(tag & 7);
|
|
735
|
+
}
|
|
736
|
+
return message;
|
|
737
|
+
},
|
|
738
|
+
|
|
739
|
+
fromJSON(object: any): MsgStartLeaseResponse {
|
|
740
|
+
return { $type: MsgStartLeaseResponse.$type, id: isSet(object.id) ? globalThis.Number(object.id) : 0 };
|
|
741
|
+
},
|
|
742
|
+
|
|
743
|
+
toJSON(message: MsgStartLeaseResponse): unknown {
|
|
744
|
+
const obj: any = {};
|
|
745
|
+
if (message.id !== 0) {
|
|
746
|
+
obj.id = Math.round(message.id);
|
|
747
|
+
}
|
|
748
|
+
return obj;
|
|
749
|
+
},
|
|
750
|
+
|
|
751
|
+
create<I extends Exact<DeepPartial<MsgStartLeaseResponse>, I>>(base?: I): MsgStartLeaseResponse {
|
|
752
|
+
return MsgStartLeaseResponse.fromPartial(base ?? ({} as any));
|
|
753
|
+
},
|
|
754
|
+
fromPartial<I extends Exact<DeepPartial<MsgStartLeaseResponse>, I>>(object: I): MsgStartLeaseResponse {
|
|
755
|
+
const message = createBaseMsgStartLeaseResponse();
|
|
756
|
+
message.id = object.id ?? 0;
|
|
757
|
+
return message;
|
|
758
|
+
},
|
|
759
|
+
};
|
|
760
|
+
|
|
761
|
+
messageTypeRegistry.set(MsgStartLeaseResponse.$type, MsgStartLeaseResponse);
|
|
762
|
+
|
|
763
|
+
function createBaseMsgUpdateLeaseResponse(): MsgUpdateLeaseResponse {
|
|
764
|
+
return { $type: "sentinel.lease.v1.MsgUpdateLeaseResponse" };
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
export const MsgUpdateLeaseResponse: MessageFns<MsgUpdateLeaseResponse, "sentinel.lease.v1.MsgUpdateLeaseResponse"> = {
|
|
768
|
+
$type: "sentinel.lease.v1.MsgUpdateLeaseResponse" as const,
|
|
769
|
+
|
|
770
|
+
encode(_: MsgUpdateLeaseResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
771
|
+
return writer;
|
|
772
|
+
},
|
|
773
|
+
|
|
774
|
+
decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdateLeaseResponse {
|
|
775
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
776
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
777
|
+
const message = createBaseMsgUpdateLeaseResponse();
|
|
778
|
+
while (reader.pos < end) {
|
|
779
|
+
const tag = reader.uint32();
|
|
780
|
+
switch (tag >>> 3) {
|
|
781
|
+
}
|
|
782
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
783
|
+
break;
|
|
784
|
+
}
|
|
785
|
+
reader.skip(tag & 7);
|
|
786
|
+
}
|
|
787
|
+
return message;
|
|
788
|
+
},
|
|
789
|
+
|
|
790
|
+
fromJSON(_: any): MsgUpdateLeaseResponse {
|
|
791
|
+
return { $type: MsgUpdateLeaseResponse.$type };
|
|
792
|
+
},
|
|
793
|
+
|
|
794
|
+
toJSON(_: MsgUpdateLeaseResponse): unknown {
|
|
795
|
+
const obj: any = {};
|
|
796
|
+
return obj;
|
|
797
|
+
},
|
|
798
|
+
|
|
799
|
+
create<I extends Exact<DeepPartial<MsgUpdateLeaseResponse>, I>>(base?: I): MsgUpdateLeaseResponse {
|
|
800
|
+
return MsgUpdateLeaseResponse.fromPartial(base ?? ({} as any));
|
|
801
|
+
},
|
|
802
|
+
fromPartial<I extends Exact<DeepPartial<MsgUpdateLeaseResponse>, I>>(_: I): MsgUpdateLeaseResponse {
|
|
803
|
+
const message = createBaseMsgUpdateLeaseResponse();
|
|
804
|
+
return message;
|
|
805
|
+
},
|
|
806
|
+
};
|
|
807
|
+
|
|
808
|
+
messageTypeRegistry.set(MsgUpdateLeaseResponse.$type, MsgUpdateLeaseResponse);
|
|
809
|
+
|
|
810
|
+
function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse {
|
|
811
|
+
return { $type: "sentinel.lease.v1.MsgUpdateParamsResponse" };
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
export const MsgUpdateParamsResponse: MessageFns<MsgUpdateParamsResponse, "sentinel.lease.v1.MsgUpdateParamsResponse"> =
|
|
815
|
+
{
|
|
816
|
+
$type: "sentinel.lease.v1.MsgUpdateParamsResponse" as const,
|
|
817
|
+
|
|
818
|
+
encode(_: MsgUpdateParamsResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
819
|
+
return writer;
|
|
820
|
+
},
|
|
821
|
+
|
|
822
|
+
decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdateParamsResponse {
|
|
823
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
824
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
825
|
+
const message = createBaseMsgUpdateParamsResponse();
|
|
826
|
+
while (reader.pos < end) {
|
|
827
|
+
const tag = reader.uint32();
|
|
828
|
+
switch (tag >>> 3) {
|
|
829
|
+
}
|
|
830
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
831
|
+
break;
|
|
832
|
+
}
|
|
833
|
+
reader.skip(tag & 7);
|
|
834
|
+
}
|
|
835
|
+
return message;
|
|
836
|
+
},
|
|
837
|
+
|
|
838
|
+
fromJSON(_: any): MsgUpdateParamsResponse {
|
|
839
|
+
return { $type: MsgUpdateParamsResponse.$type };
|
|
840
|
+
},
|
|
841
|
+
|
|
842
|
+
toJSON(_: MsgUpdateParamsResponse): unknown {
|
|
843
|
+
const obj: any = {};
|
|
844
|
+
return obj;
|
|
845
|
+
},
|
|
846
|
+
|
|
847
|
+
create<I extends Exact<DeepPartial<MsgUpdateParamsResponse>, I>>(base?: I): MsgUpdateParamsResponse {
|
|
848
|
+
return MsgUpdateParamsResponse.fromPartial(base ?? ({} as any));
|
|
849
|
+
},
|
|
850
|
+
fromPartial<I extends Exact<DeepPartial<MsgUpdateParamsResponse>, I>>(_: I): MsgUpdateParamsResponse {
|
|
851
|
+
const message = createBaseMsgUpdateParamsResponse();
|
|
852
|
+
return message;
|
|
853
|
+
},
|
|
854
|
+
};
|
|
855
|
+
|
|
856
|
+
messageTypeRegistry.set(MsgUpdateParamsResponse.$type, MsgUpdateParamsResponse);
|
|
857
|
+
|
|
858
|
+
export interface MsgService {
|
|
859
|
+
MsgEndLease(request: MsgEndLeaseRequest): Promise<MsgEndLeaseResponse>;
|
|
860
|
+
MsgRenewLease(request: MsgRenewLeaseRequest): Promise<MsgRenewLeaseResponse>;
|
|
861
|
+
MsgStartLease(request: MsgStartLeaseRequest): Promise<MsgStartLeaseResponse>;
|
|
862
|
+
MsgUpdateLease(request: MsgUpdateLeaseRequest): Promise<MsgUpdateLeaseResponse>;
|
|
863
|
+
MsgUpdateParams(request: MsgUpdateParamsRequest): Promise<MsgUpdateParamsResponse>;
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
export const MsgServiceServiceName = "sentinel.lease.v1.MsgService";
|
|
867
|
+
export class MsgServiceClientImpl implements MsgService {
|
|
868
|
+
private readonly rpc: Rpc;
|
|
869
|
+
private readonly service: string;
|
|
870
|
+
constructor(rpc: Rpc, opts?: { service?: string }) {
|
|
871
|
+
this.service = opts?.service || MsgServiceServiceName;
|
|
872
|
+
this.rpc = rpc;
|
|
873
|
+
this.MsgEndLease = this.MsgEndLease.bind(this);
|
|
874
|
+
this.MsgRenewLease = this.MsgRenewLease.bind(this);
|
|
875
|
+
this.MsgStartLease = this.MsgStartLease.bind(this);
|
|
876
|
+
this.MsgUpdateLease = this.MsgUpdateLease.bind(this);
|
|
877
|
+
this.MsgUpdateParams = this.MsgUpdateParams.bind(this);
|
|
878
|
+
}
|
|
879
|
+
MsgEndLease(request: MsgEndLeaseRequest): Promise<MsgEndLeaseResponse> {
|
|
880
|
+
const data = MsgEndLeaseRequest.encode(request).finish();
|
|
881
|
+
const promise = this.rpc.request(this.service, "MsgEndLease", data);
|
|
882
|
+
return promise.then((data) => MsgEndLeaseResponse.decode(new BinaryReader(data)));
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
MsgRenewLease(request: MsgRenewLeaseRequest): Promise<MsgRenewLeaseResponse> {
|
|
886
|
+
const data = MsgRenewLeaseRequest.encode(request).finish();
|
|
887
|
+
const promise = this.rpc.request(this.service, "MsgRenewLease", data);
|
|
888
|
+
return promise.then((data) => MsgRenewLeaseResponse.decode(new BinaryReader(data)));
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
MsgStartLease(request: MsgStartLeaseRequest): Promise<MsgStartLeaseResponse> {
|
|
892
|
+
const data = MsgStartLeaseRequest.encode(request).finish();
|
|
893
|
+
const promise = this.rpc.request(this.service, "MsgStartLease", data);
|
|
894
|
+
return promise.then((data) => MsgStartLeaseResponse.decode(new BinaryReader(data)));
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
MsgUpdateLease(request: MsgUpdateLeaseRequest): Promise<MsgUpdateLeaseResponse> {
|
|
898
|
+
const data = MsgUpdateLeaseRequest.encode(request).finish();
|
|
899
|
+
const promise = this.rpc.request(this.service, "MsgUpdateLease", data);
|
|
900
|
+
return promise.then((data) => MsgUpdateLeaseResponse.decode(new BinaryReader(data)));
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
MsgUpdateParams(request: MsgUpdateParamsRequest): Promise<MsgUpdateParamsResponse> {
|
|
904
|
+
const data = MsgUpdateParamsRequest.encode(request).finish();
|
|
905
|
+
const promise = this.rpc.request(this.service, "MsgUpdateParams", data);
|
|
906
|
+
return promise.then((data) => MsgUpdateParamsResponse.decode(new BinaryReader(data)));
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
interface Rpc {
|
|
911
|
+
request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
915
|
+
|
|
916
|
+
export type DeepPartial<T> = T extends Builtin ? T
|
|
917
|
+
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
918
|
+
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
919
|
+
: T extends {} ? { [K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]> }
|
|
920
|
+
: Partial<T>;
|
|
921
|
+
|
|
922
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
923
|
+
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
924
|
+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P> | "$type">]: never };
|
|
925
|
+
|
|
926
|
+
function longToNumber(int64: { toString(): string }): number {
|
|
927
|
+
const num = globalThis.Number(int64.toString());
|
|
928
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
929
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
930
|
+
}
|
|
931
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
932
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
933
|
+
}
|
|
934
|
+
return num;
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
function isSet(value: any): boolean {
|
|
938
|
+
return value !== null && value !== undefined;
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
export interface MessageFns<T, V extends string> {
|
|
942
|
+
readonly $type: V;
|
|
943
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
944
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
945
|
+
fromJSON(object: any): T;
|
|
946
|
+
toJSON(message: T): unknown;
|
|
947
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
948
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
949
|
+
}
|