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,675 @@
|
|
|
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/events.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
9
|
+
import { messageTypeRegistry } from "../../../typeRegistry";
|
|
10
|
+
|
|
11
|
+
export const protobufPackage = "sentinel.plan.v3";
|
|
12
|
+
|
|
13
|
+
export interface EventCreate {
|
|
14
|
+
$type: "sentinel.plan.v3.EventCreate";
|
|
15
|
+
planId: number;
|
|
16
|
+
provAddress: string;
|
|
17
|
+
bytes: string;
|
|
18
|
+
duration: string;
|
|
19
|
+
prices: string;
|
|
20
|
+
private: boolean;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface EventLinkNode {
|
|
24
|
+
$type: "sentinel.plan.v3.EventLinkNode";
|
|
25
|
+
planId: number;
|
|
26
|
+
provAddress: string;
|
|
27
|
+
nodeAddress: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface EventUnlinkNode {
|
|
31
|
+
$type: "sentinel.plan.v3.EventUnlinkNode";
|
|
32
|
+
planId: number;
|
|
33
|
+
provAddress: string;
|
|
34
|
+
nodeAddress: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface EventUpdateDetails {
|
|
38
|
+
$type: "sentinel.plan.v3.EventUpdateDetails";
|
|
39
|
+
planId: number;
|
|
40
|
+
provAddress: string;
|
|
41
|
+
private: boolean;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface EventUpdateStatus {
|
|
45
|
+
$type: "sentinel.plan.v3.EventUpdateStatus";
|
|
46
|
+
planId: number;
|
|
47
|
+
provAddress: string;
|
|
48
|
+
status: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function createBaseEventCreate(): EventCreate {
|
|
52
|
+
return {
|
|
53
|
+
$type: "sentinel.plan.v3.EventCreate",
|
|
54
|
+
planId: 0,
|
|
55
|
+
provAddress: "",
|
|
56
|
+
bytes: "",
|
|
57
|
+
duration: "",
|
|
58
|
+
prices: "",
|
|
59
|
+
private: false,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export const EventCreate: MessageFns<EventCreate, "sentinel.plan.v3.EventCreate"> = {
|
|
64
|
+
$type: "sentinel.plan.v3.EventCreate" as const,
|
|
65
|
+
|
|
66
|
+
encode(message: EventCreate, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
67
|
+
if (message.planId !== 0) {
|
|
68
|
+
writer.uint32(8).uint64(message.planId);
|
|
69
|
+
}
|
|
70
|
+
if (message.provAddress !== "") {
|
|
71
|
+
writer.uint32(18).string(message.provAddress);
|
|
72
|
+
}
|
|
73
|
+
if (message.bytes !== "") {
|
|
74
|
+
writer.uint32(26).string(message.bytes);
|
|
75
|
+
}
|
|
76
|
+
if (message.duration !== "") {
|
|
77
|
+
writer.uint32(34).string(message.duration);
|
|
78
|
+
}
|
|
79
|
+
if (message.prices !== "") {
|
|
80
|
+
writer.uint32(42).string(message.prices);
|
|
81
|
+
}
|
|
82
|
+
if (message.private !== false) {
|
|
83
|
+
writer.uint32(48).bool(message.private);
|
|
84
|
+
}
|
|
85
|
+
return writer;
|
|
86
|
+
},
|
|
87
|
+
|
|
88
|
+
decode(input: BinaryReader | Uint8Array, length?: number): EventCreate {
|
|
89
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
90
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
91
|
+
const message = createBaseEventCreate();
|
|
92
|
+
while (reader.pos < end) {
|
|
93
|
+
const tag = reader.uint32();
|
|
94
|
+
switch (tag >>> 3) {
|
|
95
|
+
case 1: {
|
|
96
|
+
if (tag !== 8) {
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
message.planId = longToNumber(reader.uint64());
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
103
|
+
case 2: {
|
|
104
|
+
if (tag !== 18) {
|
|
105
|
+
break;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
message.provAddress = reader.string();
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
case 3: {
|
|
112
|
+
if (tag !== 26) {
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
message.bytes = reader.string();
|
|
117
|
+
continue;
|
|
118
|
+
}
|
|
119
|
+
case 4: {
|
|
120
|
+
if (tag !== 34) {
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
message.duration = reader.string();
|
|
125
|
+
continue;
|
|
126
|
+
}
|
|
127
|
+
case 5: {
|
|
128
|
+
if (tag !== 42) {
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
message.prices = reader.string();
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
case 6: {
|
|
136
|
+
if (tag !== 48) {
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
message.private = reader.bool();
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
145
|
+
break;
|
|
146
|
+
}
|
|
147
|
+
reader.skip(tag & 7);
|
|
148
|
+
}
|
|
149
|
+
return message;
|
|
150
|
+
},
|
|
151
|
+
|
|
152
|
+
fromJSON(object: any): EventCreate {
|
|
153
|
+
return {
|
|
154
|
+
$type: EventCreate.$type,
|
|
155
|
+
planId: isSet(object.planId)
|
|
156
|
+
? globalThis.Number(object.planId)
|
|
157
|
+
: isSet(object.plan_id)
|
|
158
|
+
? globalThis.Number(object.plan_id)
|
|
159
|
+
: 0,
|
|
160
|
+
provAddress: isSet(object.provAddress)
|
|
161
|
+
? globalThis.String(object.provAddress)
|
|
162
|
+
: isSet(object.prov_address)
|
|
163
|
+
? globalThis.String(object.prov_address)
|
|
164
|
+
: "",
|
|
165
|
+
bytes: isSet(object.bytes) ? globalThis.String(object.bytes) : "",
|
|
166
|
+
duration: isSet(object.duration) ? globalThis.String(object.duration) : "",
|
|
167
|
+
prices: isSet(object.prices) ? globalThis.String(object.prices) : "",
|
|
168
|
+
private: isSet(object.private) ? globalThis.Boolean(object.private) : false,
|
|
169
|
+
};
|
|
170
|
+
},
|
|
171
|
+
|
|
172
|
+
toJSON(message: EventCreate): unknown {
|
|
173
|
+
const obj: any = {};
|
|
174
|
+
if (message.planId !== 0) {
|
|
175
|
+
obj.planId = Math.round(message.planId);
|
|
176
|
+
}
|
|
177
|
+
if (message.provAddress !== "") {
|
|
178
|
+
obj.provAddress = message.provAddress;
|
|
179
|
+
}
|
|
180
|
+
if (message.bytes !== "") {
|
|
181
|
+
obj.bytes = message.bytes;
|
|
182
|
+
}
|
|
183
|
+
if (message.duration !== "") {
|
|
184
|
+
obj.duration = message.duration;
|
|
185
|
+
}
|
|
186
|
+
if (message.prices !== "") {
|
|
187
|
+
obj.prices = message.prices;
|
|
188
|
+
}
|
|
189
|
+
if (message.private !== false) {
|
|
190
|
+
obj.private = message.private;
|
|
191
|
+
}
|
|
192
|
+
return obj;
|
|
193
|
+
},
|
|
194
|
+
|
|
195
|
+
create<I extends Exact<DeepPartial<EventCreate>, I>>(base?: I): EventCreate {
|
|
196
|
+
return EventCreate.fromPartial(base ?? ({} as any));
|
|
197
|
+
},
|
|
198
|
+
fromPartial<I extends Exact<DeepPartial<EventCreate>, I>>(object: I): EventCreate {
|
|
199
|
+
const message = createBaseEventCreate();
|
|
200
|
+
message.planId = object.planId ?? 0;
|
|
201
|
+
message.provAddress = object.provAddress ?? "";
|
|
202
|
+
message.bytes = object.bytes ?? "";
|
|
203
|
+
message.duration = object.duration ?? "";
|
|
204
|
+
message.prices = object.prices ?? "";
|
|
205
|
+
message.private = object.private ?? false;
|
|
206
|
+
return message;
|
|
207
|
+
},
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
messageTypeRegistry.set(EventCreate.$type, EventCreate);
|
|
211
|
+
|
|
212
|
+
function createBaseEventLinkNode(): EventLinkNode {
|
|
213
|
+
return { $type: "sentinel.plan.v3.EventLinkNode", planId: 0, provAddress: "", nodeAddress: "" };
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export const EventLinkNode: MessageFns<EventLinkNode, "sentinel.plan.v3.EventLinkNode"> = {
|
|
217
|
+
$type: "sentinel.plan.v3.EventLinkNode" as const,
|
|
218
|
+
|
|
219
|
+
encode(message: EventLinkNode, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
220
|
+
if (message.planId !== 0) {
|
|
221
|
+
writer.uint32(8).uint64(message.planId);
|
|
222
|
+
}
|
|
223
|
+
if (message.provAddress !== "") {
|
|
224
|
+
writer.uint32(18).string(message.provAddress);
|
|
225
|
+
}
|
|
226
|
+
if (message.nodeAddress !== "") {
|
|
227
|
+
writer.uint32(26).string(message.nodeAddress);
|
|
228
|
+
}
|
|
229
|
+
return writer;
|
|
230
|
+
},
|
|
231
|
+
|
|
232
|
+
decode(input: BinaryReader | Uint8Array, length?: number): EventLinkNode {
|
|
233
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
234
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
235
|
+
const message = createBaseEventLinkNode();
|
|
236
|
+
while (reader.pos < end) {
|
|
237
|
+
const tag = reader.uint32();
|
|
238
|
+
switch (tag >>> 3) {
|
|
239
|
+
case 1: {
|
|
240
|
+
if (tag !== 8) {
|
|
241
|
+
break;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
message.planId = longToNumber(reader.uint64());
|
|
245
|
+
continue;
|
|
246
|
+
}
|
|
247
|
+
case 2: {
|
|
248
|
+
if (tag !== 18) {
|
|
249
|
+
break;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
message.provAddress = reader.string();
|
|
253
|
+
continue;
|
|
254
|
+
}
|
|
255
|
+
case 3: {
|
|
256
|
+
if (tag !== 26) {
|
|
257
|
+
break;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
message.nodeAddress = reader.string();
|
|
261
|
+
continue;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
265
|
+
break;
|
|
266
|
+
}
|
|
267
|
+
reader.skip(tag & 7);
|
|
268
|
+
}
|
|
269
|
+
return message;
|
|
270
|
+
},
|
|
271
|
+
|
|
272
|
+
fromJSON(object: any): EventLinkNode {
|
|
273
|
+
return {
|
|
274
|
+
$type: EventLinkNode.$type,
|
|
275
|
+
planId: isSet(object.planId)
|
|
276
|
+
? globalThis.Number(object.planId)
|
|
277
|
+
: isSet(object.plan_id)
|
|
278
|
+
? globalThis.Number(object.plan_id)
|
|
279
|
+
: 0,
|
|
280
|
+
provAddress: isSet(object.provAddress)
|
|
281
|
+
? globalThis.String(object.provAddress)
|
|
282
|
+
: isSet(object.prov_address)
|
|
283
|
+
? globalThis.String(object.prov_address)
|
|
284
|
+
: "",
|
|
285
|
+
nodeAddress: isSet(object.nodeAddress)
|
|
286
|
+
? globalThis.String(object.nodeAddress)
|
|
287
|
+
: isSet(object.node_address)
|
|
288
|
+
? globalThis.String(object.node_address)
|
|
289
|
+
: "",
|
|
290
|
+
};
|
|
291
|
+
},
|
|
292
|
+
|
|
293
|
+
toJSON(message: EventLinkNode): unknown {
|
|
294
|
+
const obj: any = {};
|
|
295
|
+
if (message.planId !== 0) {
|
|
296
|
+
obj.planId = Math.round(message.planId);
|
|
297
|
+
}
|
|
298
|
+
if (message.provAddress !== "") {
|
|
299
|
+
obj.provAddress = message.provAddress;
|
|
300
|
+
}
|
|
301
|
+
if (message.nodeAddress !== "") {
|
|
302
|
+
obj.nodeAddress = message.nodeAddress;
|
|
303
|
+
}
|
|
304
|
+
return obj;
|
|
305
|
+
},
|
|
306
|
+
|
|
307
|
+
create<I extends Exact<DeepPartial<EventLinkNode>, I>>(base?: I): EventLinkNode {
|
|
308
|
+
return EventLinkNode.fromPartial(base ?? ({} as any));
|
|
309
|
+
},
|
|
310
|
+
fromPartial<I extends Exact<DeepPartial<EventLinkNode>, I>>(object: I): EventLinkNode {
|
|
311
|
+
const message = createBaseEventLinkNode();
|
|
312
|
+
message.planId = object.planId ?? 0;
|
|
313
|
+
message.provAddress = object.provAddress ?? "";
|
|
314
|
+
message.nodeAddress = object.nodeAddress ?? "";
|
|
315
|
+
return message;
|
|
316
|
+
},
|
|
317
|
+
};
|
|
318
|
+
|
|
319
|
+
messageTypeRegistry.set(EventLinkNode.$type, EventLinkNode);
|
|
320
|
+
|
|
321
|
+
function createBaseEventUnlinkNode(): EventUnlinkNode {
|
|
322
|
+
return { $type: "sentinel.plan.v3.EventUnlinkNode", planId: 0, provAddress: "", nodeAddress: "" };
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
export const EventUnlinkNode: MessageFns<EventUnlinkNode, "sentinel.plan.v3.EventUnlinkNode"> = {
|
|
326
|
+
$type: "sentinel.plan.v3.EventUnlinkNode" as const,
|
|
327
|
+
|
|
328
|
+
encode(message: EventUnlinkNode, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
329
|
+
if (message.planId !== 0) {
|
|
330
|
+
writer.uint32(8).uint64(message.planId);
|
|
331
|
+
}
|
|
332
|
+
if (message.provAddress !== "") {
|
|
333
|
+
writer.uint32(18).string(message.provAddress);
|
|
334
|
+
}
|
|
335
|
+
if (message.nodeAddress !== "") {
|
|
336
|
+
writer.uint32(26).string(message.nodeAddress);
|
|
337
|
+
}
|
|
338
|
+
return writer;
|
|
339
|
+
},
|
|
340
|
+
|
|
341
|
+
decode(input: BinaryReader | Uint8Array, length?: number): EventUnlinkNode {
|
|
342
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
343
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
344
|
+
const message = createBaseEventUnlinkNode();
|
|
345
|
+
while (reader.pos < end) {
|
|
346
|
+
const tag = reader.uint32();
|
|
347
|
+
switch (tag >>> 3) {
|
|
348
|
+
case 1: {
|
|
349
|
+
if (tag !== 8) {
|
|
350
|
+
break;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
message.planId = longToNumber(reader.uint64());
|
|
354
|
+
continue;
|
|
355
|
+
}
|
|
356
|
+
case 2: {
|
|
357
|
+
if (tag !== 18) {
|
|
358
|
+
break;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
message.provAddress = reader.string();
|
|
362
|
+
continue;
|
|
363
|
+
}
|
|
364
|
+
case 3: {
|
|
365
|
+
if (tag !== 26) {
|
|
366
|
+
break;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
message.nodeAddress = reader.string();
|
|
370
|
+
continue;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
374
|
+
break;
|
|
375
|
+
}
|
|
376
|
+
reader.skip(tag & 7);
|
|
377
|
+
}
|
|
378
|
+
return message;
|
|
379
|
+
},
|
|
380
|
+
|
|
381
|
+
fromJSON(object: any): EventUnlinkNode {
|
|
382
|
+
return {
|
|
383
|
+
$type: EventUnlinkNode.$type,
|
|
384
|
+
planId: isSet(object.planId)
|
|
385
|
+
? globalThis.Number(object.planId)
|
|
386
|
+
: isSet(object.plan_id)
|
|
387
|
+
? globalThis.Number(object.plan_id)
|
|
388
|
+
: 0,
|
|
389
|
+
provAddress: isSet(object.provAddress)
|
|
390
|
+
? globalThis.String(object.provAddress)
|
|
391
|
+
: isSet(object.prov_address)
|
|
392
|
+
? globalThis.String(object.prov_address)
|
|
393
|
+
: "",
|
|
394
|
+
nodeAddress: isSet(object.nodeAddress)
|
|
395
|
+
? globalThis.String(object.nodeAddress)
|
|
396
|
+
: isSet(object.node_address)
|
|
397
|
+
? globalThis.String(object.node_address)
|
|
398
|
+
: "",
|
|
399
|
+
};
|
|
400
|
+
},
|
|
401
|
+
|
|
402
|
+
toJSON(message: EventUnlinkNode): unknown {
|
|
403
|
+
const obj: any = {};
|
|
404
|
+
if (message.planId !== 0) {
|
|
405
|
+
obj.planId = Math.round(message.planId);
|
|
406
|
+
}
|
|
407
|
+
if (message.provAddress !== "") {
|
|
408
|
+
obj.provAddress = message.provAddress;
|
|
409
|
+
}
|
|
410
|
+
if (message.nodeAddress !== "") {
|
|
411
|
+
obj.nodeAddress = message.nodeAddress;
|
|
412
|
+
}
|
|
413
|
+
return obj;
|
|
414
|
+
},
|
|
415
|
+
|
|
416
|
+
create<I extends Exact<DeepPartial<EventUnlinkNode>, I>>(base?: I): EventUnlinkNode {
|
|
417
|
+
return EventUnlinkNode.fromPartial(base ?? ({} as any));
|
|
418
|
+
},
|
|
419
|
+
fromPartial<I extends Exact<DeepPartial<EventUnlinkNode>, I>>(object: I): EventUnlinkNode {
|
|
420
|
+
const message = createBaseEventUnlinkNode();
|
|
421
|
+
message.planId = object.planId ?? 0;
|
|
422
|
+
message.provAddress = object.provAddress ?? "";
|
|
423
|
+
message.nodeAddress = object.nodeAddress ?? "";
|
|
424
|
+
return message;
|
|
425
|
+
},
|
|
426
|
+
};
|
|
427
|
+
|
|
428
|
+
messageTypeRegistry.set(EventUnlinkNode.$type, EventUnlinkNode);
|
|
429
|
+
|
|
430
|
+
function createBaseEventUpdateDetails(): EventUpdateDetails {
|
|
431
|
+
return { $type: "sentinel.plan.v3.EventUpdateDetails", planId: 0, provAddress: "", private: false };
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
export const EventUpdateDetails: MessageFns<EventUpdateDetails, "sentinel.plan.v3.EventUpdateDetails"> = {
|
|
435
|
+
$type: "sentinel.plan.v3.EventUpdateDetails" as const,
|
|
436
|
+
|
|
437
|
+
encode(message: EventUpdateDetails, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
438
|
+
if (message.planId !== 0) {
|
|
439
|
+
writer.uint32(8).uint64(message.planId);
|
|
440
|
+
}
|
|
441
|
+
if (message.provAddress !== "") {
|
|
442
|
+
writer.uint32(18).string(message.provAddress);
|
|
443
|
+
}
|
|
444
|
+
if (message.private !== false) {
|
|
445
|
+
writer.uint32(24).bool(message.private);
|
|
446
|
+
}
|
|
447
|
+
return writer;
|
|
448
|
+
},
|
|
449
|
+
|
|
450
|
+
decode(input: BinaryReader | Uint8Array, length?: number): EventUpdateDetails {
|
|
451
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
452
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
453
|
+
const message = createBaseEventUpdateDetails();
|
|
454
|
+
while (reader.pos < end) {
|
|
455
|
+
const tag = reader.uint32();
|
|
456
|
+
switch (tag >>> 3) {
|
|
457
|
+
case 1: {
|
|
458
|
+
if (tag !== 8) {
|
|
459
|
+
break;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
message.planId = longToNumber(reader.uint64());
|
|
463
|
+
continue;
|
|
464
|
+
}
|
|
465
|
+
case 2: {
|
|
466
|
+
if (tag !== 18) {
|
|
467
|
+
break;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
message.provAddress = reader.string();
|
|
471
|
+
continue;
|
|
472
|
+
}
|
|
473
|
+
case 3: {
|
|
474
|
+
if (tag !== 24) {
|
|
475
|
+
break;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
message.private = reader.bool();
|
|
479
|
+
continue;
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
483
|
+
break;
|
|
484
|
+
}
|
|
485
|
+
reader.skip(tag & 7);
|
|
486
|
+
}
|
|
487
|
+
return message;
|
|
488
|
+
},
|
|
489
|
+
|
|
490
|
+
fromJSON(object: any): EventUpdateDetails {
|
|
491
|
+
return {
|
|
492
|
+
$type: EventUpdateDetails.$type,
|
|
493
|
+
planId: isSet(object.planId)
|
|
494
|
+
? globalThis.Number(object.planId)
|
|
495
|
+
: isSet(object.plan_id)
|
|
496
|
+
? globalThis.Number(object.plan_id)
|
|
497
|
+
: 0,
|
|
498
|
+
provAddress: isSet(object.provAddress)
|
|
499
|
+
? globalThis.String(object.provAddress)
|
|
500
|
+
: isSet(object.prov_address)
|
|
501
|
+
? globalThis.String(object.prov_address)
|
|
502
|
+
: "",
|
|
503
|
+
private: isSet(object.private) ? globalThis.Boolean(object.private) : false,
|
|
504
|
+
};
|
|
505
|
+
},
|
|
506
|
+
|
|
507
|
+
toJSON(message: EventUpdateDetails): unknown {
|
|
508
|
+
const obj: any = {};
|
|
509
|
+
if (message.planId !== 0) {
|
|
510
|
+
obj.planId = Math.round(message.planId);
|
|
511
|
+
}
|
|
512
|
+
if (message.provAddress !== "") {
|
|
513
|
+
obj.provAddress = message.provAddress;
|
|
514
|
+
}
|
|
515
|
+
if (message.private !== false) {
|
|
516
|
+
obj.private = message.private;
|
|
517
|
+
}
|
|
518
|
+
return obj;
|
|
519
|
+
},
|
|
520
|
+
|
|
521
|
+
create<I extends Exact<DeepPartial<EventUpdateDetails>, I>>(base?: I): EventUpdateDetails {
|
|
522
|
+
return EventUpdateDetails.fromPartial(base ?? ({} as any));
|
|
523
|
+
},
|
|
524
|
+
fromPartial<I extends Exact<DeepPartial<EventUpdateDetails>, I>>(object: I): EventUpdateDetails {
|
|
525
|
+
const message = createBaseEventUpdateDetails();
|
|
526
|
+
message.planId = object.planId ?? 0;
|
|
527
|
+
message.provAddress = object.provAddress ?? "";
|
|
528
|
+
message.private = object.private ?? false;
|
|
529
|
+
return message;
|
|
530
|
+
},
|
|
531
|
+
};
|
|
532
|
+
|
|
533
|
+
messageTypeRegistry.set(EventUpdateDetails.$type, EventUpdateDetails);
|
|
534
|
+
|
|
535
|
+
function createBaseEventUpdateStatus(): EventUpdateStatus {
|
|
536
|
+
return { $type: "sentinel.plan.v3.EventUpdateStatus", planId: 0, provAddress: "", status: "" };
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
export const EventUpdateStatus: MessageFns<EventUpdateStatus, "sentinel.plan.v3.EventUpdateStatus"> = {
|
|
540
|
+
$type: "sentinel.plan.v3.EventUpdateStatus" as const,
|
|
541
|
+
|
|
542
|
+
encode(message: EventUpdateStatus, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
543
|
+
if (message.planId !== 0) {
|
|
544
|
+
writer.uint32(8).uint64(message.planId);
|
|
545
|
+
}
|
|
546
|
+
if (message.provAddress !== "") {
|
|
547
|
+
writer.uint32(18).string(message.provAddress);
|
|
548
|
+
}
|
|
549
|
+
if (message.status !== "") {
|
|
550
|
+
writer.uint32(26).string(message.status);
|
|
551
|
+
}
|
|
552
|
+
return writer;
|
|
553
|
+
},
|
|
554
|
+
|
|
555
|
+
decode(input: BinaryReader | Uint8Array, length?: number): EventUpdateStatus {
|
|
556
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
557
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
558
|
+
const message = createBaseEventUpdateStatus();
|
|
559
|
+
while (reader.pos < end) {
|
|
560
|
+
const tag = reader.uint32();
|
|
561
|
+
switch (tag >>> 3) {
|
|
562
|
+
case 1: {
|
|
563
|
+
if (tag !== 8) {
|
|
564
|
+
break;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
message.planId = longToNumber(reader.uint64());
|
|
568
|
+
continue;
|
|
569
|
+
}
|
|
570
|
+
case 2: {
|
|
571
|
+
if (tag !== 18) {
|
|
572
|
+
break;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
message.provAddress = reader.string();
|
|
576
|
+
continue;
|
|
577
|
+
}
|
|
578
|
+
case 3: {
|
|
579
|
+
if (tag !== 26) {
|
|
580
|
+
break;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
message.status = reader.string();
|
|
584
|
+
continue;
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
588
|
+
break;
|
|
589
|
+
}
|
|
590
|
+
reader.skip(tag & 7);
|
|
591
|
+
}
|
|
592
|
+
return message;
|
|
593
|
+
},
|
|
594
|
+
|
|
595
|
+
fromJSON(object: any): EventUpdateStatus {
|
|
596
|
+
return {
|
|
597
|
+
$type: EventUpdateStatus.$type,
|
|
598
|
+
planId: isSet(object.planId)
|
|
599
|
+
? globalThis.Number(object.planId)
|
|
600
|
+
: isSet(object.plan_id)
|
|
601
|
+
? globalThis.Number(object.plan_id)
|
|
602
|
+
: 0,
|
|
603
|
+
provAddress: isSet(object.provAddress)
|
|
604
|
+
? globalThis.String(object.provAddress)
|
|
605
|
+
: isSet(object.prov_address)
|
|
606
|
+
? globalThis.String(object.prov_address)
|
|
607
|
+
: "",
|
|
608
|
+
status: isSet(object.status) ? globalThis.String(object.status) : "",
|
|
609
|
+
};
|
|
610
|
+
},
|
|
611
|
+
|
|
612
|
+
toJSON(message: EventUpdateStatus): unknown {
|
|
613
|
+
const obj: any = {};
|
|
614
|
+
if (message.planId !== 0) {
|
|
615
|
+
obj.planId = Math.round(message.planId);
|
|
616
|
+
}
|
|
617
|
+
if (message.provAddress !== "") {
|
|
618
|
+
obj.provAddress = message.provAddress;
|
|
619
|
+
}
|
|
620
|
+
if (message.status !== "") {
|
|
621
|
+
obj.status = message.status;
|
|
622
|
+
}
|
|
623
|
+
return obj;
|
|
624
|
+
},
|
|
625
|
+
|
|
626
|
+
create<I extends Exact<DeepPartial<EventUpdateStatus>, I>>(base?: I): EventUpdateStatus {
|
|
627
|
+
return EventUpdateStatus.fromPartial(base ?? ({} as any));
|
|
628
|
+
},
|
|
629
|
+
fromPartial<I extends Exact<DeepPartial<EventUpdateStatus>, I>>(object: I): EventUpdateStatus {
|
|
630
|
+
const message = createBaseEventUpdateStatus();
|
|
631
|
+
message.planId = object.planId ?? 0;
|
|
632
|
+
message.provAddress = object.provAddress ?? "";
|
|
633
|
+
message.status = object.status ?? "";
|
|
634
|
+
return message;
|
|
635
|
+
},
|
|
636
|
+
};
|
|
637
|
+
|
|
638
|
+
messageTypeRegistry.set(EventUpdateStatus.$type, EventUpdateStatus);
|
|
639
|
+
|
|
640
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
641
|
+
|
|
642
|
+
export type DeepPartial<T> = T extends Builtin ? T
|
|
643
|
+
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
644
|
+
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
645
|
+
: T extends {} ? { [K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]> }
|
|
646
|
+
: Partial<T>;
|
|
647
|
+
|
|
648
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
649
|
+
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
650
|
+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P> | "$type">]: never };
|
|
651
|
+
|
|
652
|
+
function longToNumber(int64: { toString(): string }): number {
|
|
653
|
+
const num = globalThis.Number(int64.toString());
|
|
654
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
655
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
656
|
+
}
|
|
657
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
658
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
659
|
+
}
|
|
660
|
+
return num;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
function isSet(value: any): boolean {
|
|
664
|
+
return value !== null && value !== undefined;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
export interface MessageFns<T, V extends string> {
|
|
668
|
+
readonly $type: V;
|
|
669
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
670
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
671
|
+
fromJSON(object: any): T;
|
|
672
|
+
toJSON(message: T): unknown;
|
|
673
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
674
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
675
|
+
}
|